| @@ -1,40 +1,7 @@ | ||
| 1 | 1 | /******/ (() => { // webpackBootstrap |
| 2 | 2 | /******/ var __webpack_modules__ = ({ |
| 3 | 3 | |
| 4 | -/***/ 20 | |
| 5 | -(__unused_webpack_module, exports, __webpack_require__) { | |
| 6 | - | |
| 7 | -"use strict"; | |
| 8 | -/** | |
| 9 | - * @license React | |
| 10 | - * react-jsx-runtime.production.min.js | |
| 11 | - * | |
| 12 | - * Copyright (c) Facebook, Inc. and its affiliates. | |
| 13 | - * | |
| 14 | - * This source code is licensed under the MIT license found in the | |
| 15 | - * LICENSE file in the root directory of this source tree. | |
| 16 | - */ | |
| 17 | -var f=__webpack_require__(677),k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0}; | |
| 18 | -function q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=""+g);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q; | |
| 19 | - | |
| 20 | - | |
| 21 | -/***/ }, | |
| 22 | - | |
| 23 | -/***/ 848 | |
| 24 | -(module, __unused_webpack_exports, __webpack_require__) { | |
| 25 | - | |
| 26 | -"use strict"; | |
| 27 | - | |
| 28 | - | |
| 29 | -if (true) { | |
| 30 | - module.exports = __webpack_require__(20); | |
| 31 | -} else // removed by dead control flow | |
| 32 | -{} | |
| 33 | - | |
| 34 | - | |
| 35 | -/***/ }, | |
| 36 | - | |
| 37 | 4 | /***/ 677 |
| 38 | 5 | (module) { |
| 39 | 6 | |
| 40 | 7 | module.exports = (function() { return this["React"]; }()); |
| @@ -145,50 +112,46 @@ | ||
| 145 | 112 | /******/ } |
| 146 | 113 | /******/ |
| 147 | 114 | /************************************************************************/ |
| 148 | 115 | /******/ /* webpack/runtime/compat get default export */ |
| 149 | -/******/ (() => { | |
| 150 | -/******/ // getDefaultExport function for compatibility with non-harmony modules | |
| 151 | -/******/ __webpack_require__.n = (module) => { | |
| 152 | -/******/ const getter = module && module.__esModule ? | |
| 153 | -/******/ () => (module['default']) : | |
| 154 | -/******/ () => (module); | |
| 155 | -/******/ __webpack_require__.d(getter, { a: getter }); | |
| 156 | -/******/ return getter; | |
| 116 | +/******/ // getDefaultExport function for compatibility with non-harmony modules | |
| 117 | +/******/ __webpack_require__.n = (module) => { | |
| 118 | +/******/ const getter = module && module.__esModule ? | |
| 119 | +/******/ () => (module['default']) : | |
| 120 | +/******/ () => (module); | |
| 121 | +/******/ __webpack_require__.d(getter, { a: getter }); | |
| 122 | +/******/ return getter; | |
| 123 | +/******/ }; | |
| 124 | +/******/ | |
| 125 | +/******/ /* webpack/runtime/concatenation wrap */ | |
| 126 | +/******/ // wrap a concatenated module body as a lazy, memoized accessor; mod is | |
| 127 | +/******/ // set before the body runs so re-entrant calls (require cycles) observe | |
| 128 | +/******/ // the partial exports like Node.js | |
| 129 | +/******/ __webpack_require__.cw = (body) => { | |
| 130 | +/******/ var mod; | |
| 131 | +/******/ return () => { | |
| 132 | +/******/ if (body) { | |
| 133 | +/******/ var fn = body; | |
| 134 | +/******/ body = 0; | |
| 135 | +/******/ mod = { exports: {} }; | |
| 136 | +/******/ fn.call(mod.exports, mod, mod.exports); | |
| 137 | +/******/ } | |
| 138 | +/******/ return mod.exports; | |
| 157 | 139 | /******/ }; |
| 158 | -/******/ })(); | |
| 140 | +/******/ }; | |
| 159 | 141 | /******/ |
| 160 | 142 | /******/ /* webpack/runtime/define property getters */ |
| 161 | -/******/ (() => { | |
| 162 | -/******/ // define getter/value functions for harmony exports | |
| 163 | -/******/ __webpack_require__.d = (exports, definition) => { | |
| 164 | -/******/ if(Array.isArray(definition)) { | |
| 165 | -/******/ var i = 0; | |
| 166 | -/******/ while(i < definition.length) { | |
| 167 | -/******/ var key = definition[i++]; | |
| 168 | -/******/ var binding = definition[i++]; | |
| 169 | -/******/ if(!__webpack_require__.o(exports, key)) { | |
| 170 | -/******/ if(binding === 0) { | |
| 171 | -/******/ Object.defineProperty(exports, key, { enumerable: true, value: definition[i++] }); | |
| 172 | -/******/ } else { | |
| 173 | -/******/ Object.defineProperty(exports, key, { enumerable: true, get: binding }); | |
| 174 | -/******/ } | |
| 175 | -/******/ } else if(binding === 0) { i++; } | |
| 176 | -/******/ } | |
| 177 | -/******/ } else { | |
| 178 | -/******/ for(var key in definition) { | |
| 179 | -/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { | |
| 180 | -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); | |
| 181 | -/******/ } | |
| 182 | -/******/ } | |
| 143 | +/******/ // define getter/value functions for harmony exports | |
| 144 | +/******/ __webpack_require__.d = (exports, definition) => { | |
| 145 | +/******/ for(var key in definition) { | |
| 146 | +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { | |
| 147 | +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); | |
| 183 | 148 | /******/ } |
| 184 | -/******/ }; | |
| 185 | -/******/ })(); | |
| 149 | +/******/ } | |
| 150 | +/******/ }; | |
| 186 | 151 | /******/ |
| 187 | 152 | /******/ /* webpack/runtime/hasOwnProperty shorthand */ |
| 188 | -/******/ (() => { | |
| 189 | -/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) | |
| 190 | -/******/ })(); | |
| 153 | +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)); | |
| 191 | 154 | /******/ |
| 192 | 155 | /************************************************************************/ |
| 193 | 156 | let __webpack_exports__ = {}; |
| 194 | 157 | // This entry needs to be wrapped in an IIFE because it needs to be in strict mode. |
| @@ -194,14 +157,47 @@ | ||
| 194 | 157 | // This entry needs to be wrapped in an IIFE because it needs to be in strict mode. |
| 195 | 158 | (() => { |
| 196 | 159 | "use strict"; |
| 197 | 160 | |
| 161 | +// MODULE: ./node_modules/react/cjs/react-jsx-runtime.production.min.js | |
| 162 | +var react_jsx_runtime_production_min_namespaceFn = /*#__PURE__*/__webpack_require__.cw(function(module, exports) { | |
| 163 | +/** | |
| 164 | + * @license React | |
| 165 | + * react-jsx-runtime.production.min.js | |
| 166 | + * | |
| 167 | + * Copyright (c) Facebook, Inc. and its affiliates. | |
| 168 | + * | |
| 169 | + * This source code is licensed under the MIT license found in the | |
| 170 | + * LICENSE file in the root directory of this source tree. | |
| 171 | + */ | |
| 172 | +var f=(external_React_namespaceFn()),k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0}; | |
| 173 | +function q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=""+g);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q; | |
| 174 | + | |
| 175 | +}); | |
| 176 | + | |
| 177 | +// MODULE: ./node_modules/react/jsx-runtime.js | |
| 178 | +var jsx_runtime_namespaceFn = /*#__PURE__*/__webpack_require__.cw(function(module, exports) { | |
| 179 | + | |
| 180 | + | |
| 181 | +if (true) { | |
| 182 | + module.exports = (react_jsx_runtime_production_min_namespaceFn()); | |
| 183 | +} else // removed by dead control flow | |
| 184 | +{} | |
| 185 | + | |
| 186 | +}); | |
| 187 | + | |
| 188 | +// EXTERNAL MODULE: external "React" | |
| 189 | +var external_React_namespaceFn = () => { | |
| 190 | + return __webpack_require__(677); | |
| 191 | +}; | |
| 192 | + | |
| 198 | 193 | // EXTERNAL MODULE: external {"this":["wp","blocks"]} |
| 199 | 194 | var external_this_wp_blocks_ = __webpack_require__(545); |
| 200 | 195 | // EXTERNAL MODULE: external {"this":["wp","primitives"]} |
| 201 | 196 | var external_this_wp_primitives_ = __webpack_require__(933); |
| 202 | -// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js | |
| 203 | -var jsx_runtime = __webpack_require__(848); | |
| 197 | +;// ./node_modules/react/jsx-runtime.js | |
| 198 | +jsx_runtime_namespaceFn(); | |
| 199 | + | |
| 204 | 200 | ;// ./node_modules/@wpsyntex/polylang-react-library/build/icons/translation.js |
| 205 | 201 | /** |
| 206 | 202 | * Translation icon - translation Dashicon. |
| 207 | 203 | */ |
| @@ -211,14 +207,14 @@ | ||
| 211 | 207 | */ |
| 212 | 208 | |
| 213 | 209 | |
| 214 | 210 | const isPrimitivesComponents = 'undefined' !== typeof wp.primitives; |
| 215 | -const translation = isPrimitivesComponents ? /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_primitives_.SVG, { | |
| 211 | +const translation = isPrimitivesComponents ? /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)(external_this_wp_primitives_.SVG, { | |
| 216 | 212 | width: "20", |
| 217 | 213 | height: "20", |
| 218 | 214 | xmlns: "http://www.w3.org/2000/svg", |
| 219 | 215 | viewBox: "0 0 20 20", |
| 220 | - children: /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_primitives_.Path, { | |
| 216 | + children: /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)(external_this_wp_primitives_.Path, { | |
| 221 | 217 | d: "M11 7H9.49c-.63 0-1.25.3-1.59.7L7 5H4.13l-2.39 7h1.69l.74-2H7v4H2c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h7c1.1 0 2 .9 2 2v2zM6.51 9H4.49l1-2.93zM10 8h7c1.1 0 2 .9 2 2v7c0 1.1-.9 2-2 2h-7c-1.1 0-2-.9-2-2v-7c0-1.1.9-2 2-2zm7.25 5v-1.08h-3.17V9.75h-1.16v2.17H9.75V13h1.28c.11.85.56 1.85 1.28 2.62-.87.36-1.89.62-2.31.62-.01.02.22.97.2 1.46.84 0 2.21-.5 3.28-1.15 1.09.65 2.48 1.15 3.34 1.15-.02-.49.2-1.44.2-1.46-.43 0-1.49-.27-2.38-.63.7-.77 1.14-1.77 1.25-2.61h1.36zm-3.81 1.93c-.5-.46-.85-1.13-1.01-1.93h2.09c-.17.8-.51 1.47-1 1.93l-.04.03s-.03-.02-.04-.03z" |
| 222 | 218 | }) |
| 223 | 219 | }) : 'translation'; |
| 224 | 220 | /* harmony default export */ const icons_translation = (translation); |
| @@ -294,9 +290,9 @@ | ||
| 294 | 290 | hide_current, |
| 295 | 291 | hide_if_no_translation |
| 296 | 292 | } = props.attributes; |
| 297 | 293 | function ToggleControlDropdown() { |
| 298 | - return /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_components_.ToggleControl, { | |
| 294 | + return /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)(external_this_wp_components_.ToggleControl, { | |
| 299 | 295 | label: i18nAttributeStrings.dropdown, |
| 300 | 296 | checked: dropdown, |
| 301 | 297 | onChange: toggleDropdown |
| 302 | 298 | }); |
| @@ -301,9 +297,9 @@ | ||
| 301 | 297 | onChange: toggleDropdown |
| 302 | 298 | }); |
| 303 | 299 | } |
| 304 | 300 | function ToggleControlShowNames() { |
| 305 | - return /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_components_.ToggleControl, { | |
| 301 | + return /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)(external_this_wp_components_.ToggleControl, { | |
| 306 | 302 | label: i18nAttributeStrings.show_names, |
| 307 | 303 | checked: show_names // eslint-disable-line camelcase |
| 308 | 304 | , |
| 309 | 305 | onChange: toggleShowNames |
| @@ -309,9 +305,9 @@ | ||
| 309 | 305 | onChange: toggleShowNames |
| 310 | 306 | }); |
| 311 | 307 | } |
| 312 | 308 | function ToggleControlShowFlags() { |
| 313 | - return /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_components_.ToggleControl, { | |
| 309 | + return /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)(external_this_wp_components_.ToggleControl, { | |
| 314 | 310 | label: i18nAttributeStrings.show_flags, |
| 315 | 311 | checked: show_flags // eslint-disable-line camelcase |
| 316 | 312 | , |
| 317 | 313 | onChange: toggleShowFlags |
| @@ -317,9 +313,9 @@ | ||
| 317 | 313 | onChange: toggleShowFlags |
| 318 | 314 | }); |
| 319 | 315 | } |
| 320 | 316 | function ToggleControlForceHome() { |
| 321 | - return /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_components_.ToggleControl, { | |
| 317 | + return /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)(external_this_wp_components_.ToggleControl, { | |
| 322 | 318 | label: i18nAttributeStrings.force_home, |
| 323 | 319 | checked: force_home // eslint-disable-line camelcase |
| 324 | 320 | , |
| 325 | 321 | onChange: toggleForceHome |
| @@ -325,9 +321,9 @@ | ||
| 325 | 321 | onChange: toggleForceHome |
| 326 | 322 | }); |
| 327 | 323 | } |
| 328 | 324 | function ToggleControlHideCurrent() { |
| 329 | - return /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_components_.ToggleControl, { | |
| 325 | + return /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)(external_this_wp_components_.ToggleControl, { | |
| 330 | 326 | label: i18nAttributeStrings.hide_current, |
| 331 | 327 | checked: hide_current // eslint-disable-line camelcase |
| 332 | 328 | , |
| 333 | 329 | onChange: toggleHideCurrent |
| @@ -333,9 +329,9 @@ | ||
| 333 | 329 | onChange: toggleHideCurrent |
| 334 | 330 | }); |
| 335 | 331 | } |
| 336 | 332 | function ToggleControlHideIfNoTranslations() { |
| 337 | - return /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_components_.ToggleControl, { | |
| 333 | + return /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)(external_this_wp_components_.ToggleControl, { | |
| 338 | 334 | label: i18nAttributeStrings.hide_if_no_translation, |
| 339 | 335 | checked: hide_if_no_translation // eslint-disable-line camelcase |
| 340 | 336 | , |
| 341 | 337 | onChange: toggleHideIfNoTranslation |
| @@ -482,10 +478,10 @@ | ||
| 482 | 478 | const { |
| 483 | 479 | text, |
| 484 | 480 | flag |
| 485 | 481 | } = useMemoizedSwitcherLabel(language, showFlags, showNames); |
| 486 | - return /*#__PURE__*/(0,jsx_runtime.jsxs)("li", { | |
| 487 | - children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", { | |
| 482 | + return /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsxs)("li", { | |
| 483 | + children: [/*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)("span", { | |
| 488 | 484 | dangerouslySetInnerHTML: { |
| 489 | 485 | __html: flag |
| 490 | 486 | } |
| 491 | 487 | }), " ", text, " "] |
| @@ -514,11 +510,11 @@ | ||
| 514 | 510 | showNames, |
| 515 | 511 | isDropdown |
| 516 | 512 | }) => { |
| 517 | 513 | if (isDropdown) { |
| 518 | - return /*#__PURE__*/(0,jsx_runtime.jsx)("select", { | |
| 514 | + return /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)("select", { | |
| 519 | 515 | children: languages.map(language => { |
| 520 | - return /*#__PURE__*/(0,jsx_runtime.jsx)("option", { | |
| 516 | + return /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)("option", { | |
| 521 | 517 | value: language.slug, |
| 522 | 518 | children: language.name |
| 523 | 519 | }, language.slug); |
| 524 | 520 | }) |
| @@ -523,11 +519,11 @@ | ||
| 523 | 519 | }, language.slug); |
| 524 | 520 | }) |
| 525 | 521 | }); |
| 526 | 522 | } |
| 527 | - return /*#__PURE__*/(0,jsx_runtime.jsx)("ul", { | |
| 523 | + return /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)("ul", { | |
| 528 | 524 | children: languages.map(language => { |
| 529 | - return /*#__PURE__*/(0,jsx_runtime.jsx)(SwitcherListElement, { | |
| 525 | + return /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)(SwitcherListElement, { | |
| 530 | 526 | language: language, |
| 531 | 527 | showFlags: showFlags, |
| 532 | 528 | showNames: showNames |
| 533 | 529 | }, language.slug); |
| @@ -597,9 +593,9 @@ | ||
| 597 | 593 | languages |
| 598 | 594 | } = (0,external_this_wp_element_.useContext)(LanguagesContext); |
| 599 | 595 | const currentLanguage = useCurrentLanguageWithEditorContext(languages); |
| 600 | 596 | const curatedLanguages = useCuratedLanguages(languages, currentLanguage, dropdown); |
| 601 | - return /*#__PURE__*/(0,jsx_runtime.jsx)(SwitcherUI, { | |
| 597 | + return /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)(SwitcherUI, { | |
| 602 | 598 | languages: curatedLanguages, |
| 603 | 599 | showFlags: show_flags, |
| 604 | 600 | showNames: show_names, |
| 605 | 601 | isDropdown: dropdown |
| @@ -669,21 +665,21 @@ | ||
| 669 | 665 | ToggleControlForceHome, |
| 670 | 666 | ToggleControlHideCurrent, |
| 671 | 667 | ToggleControlHideIfNoTranslations |
| 672 | 668 | } = createLanguageSwitcherEdit(props); |
| 673 | - return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { | |
| 669 | + return /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsxs)("div", { | |
| 674 | 670 | ...(0,external_this_wp_blockEditor_.useBlockProps)(), |
| 675 | - children: [/*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_blockEditor_.InspectorControls, { | |
| 676 | - children: /*#__PURE__*/(0,jsx_runtime.jsxs)(external_this_wp_components_.PanelBody, { | |
| 671 | + children: [/*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)(external_this_wp_blockEditor_.InspectorControls, { | |
| 672 | + children: /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsxs)(external_this_wp_components_.PanelBody, { | |
| 677 | 673 | title: (0,external_this_wp_i18n_.__)('Language switcher settings', 'polylang'), |
| 678 | - children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ToggleControlDropdown, {}), !dropdown && /*#__PURE__*/(0,jsx_runtime.jsx)(ToggleControlShowNames, {}), !dropdown && /*#__PURE__*/(0,jsx_runtime.jsx)(ToggleControlShowFlags, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(ToggleControlForceHome, {}), !dropdown && /*#__PURE__*/(0,jsx_runtime.jsx)(ToggleControlHideCurrent, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(ToggleControlHideIfNoTranslations, {})] | |
| 674 | + children: [/*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)(ToggleControlDropdown, {}), !dropdown && /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)(ToggleControlShowNames, {}), !dropdown && /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)(ToggleControlShowFlags, {}), /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)(ToggleControlForceHome, {}), !dropdown && /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)(ToggleControlHideCurrent, {}), /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)(ToggleControlHideIfNoTranslations, {})] | |
| 679 | 675 | }) |
| 680 | - }), /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_components_.Disabled, { | |
| 681 | - children: /*#__PURE__*/(0,jsx_runtime.jsx)(LanguagesContext.Provider, { | |
| 676 | + }), /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)(external_this_wp_components_.Disabled, { | |
| 677 | + children: /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)(LanguagesContext.Provider, { | |
| 682 | 678 | value: { |
| 683 | 679 | languages |
| 684 | 680 | }, |
| 685 | - children: /*#__PURE__*/(0,jsx_runtime.jsx)(SwitcherContainer, { | |
| 681 | + children: /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)(SwitcherContainer, { | |
| 686 | 682 | attributes: props.attributes |
| 687 | 683 | }) |
| 688 | 684 | }) |
| 689 | 685 | })] |
| @@ -743,11 +739,11 @@ | ||
| 743 | 739 | const prefix = isTopLevel ? '' : ' '; |
| 744 | 740 | return ( |
| 745 | 741 | /*#__PURE__*/ |
| 746 | 742 | // eslint-disable-next-line jsx-a11y/anchor-is-valid |
| 747 | - (0,jsx_runtime.jsxs)("a", { | |
| 743 | + (0,react_jsx_runtime_production_min_namespaceFn().jsxs)("a", { | |
| 748 | 744 | href: '#', |
| 749 | - children: [prefix, /*#__PURE__*/(0,jsx_runtime.jsx)("span", { | |
| 745 | + children: [prefix, /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)("span", { | |
| 750 | 746 | dangerouslySetInnerHTML: { |
| 751 | 747 | __html: flag |
| 752 | 748 | } |
| 753 | 749 | }), " ", text, " "] |
| @@ -764,15 +760,15 @@ | ||
| 764 | 760 | */ |
| 765 | 761 | |
| 766 | 762 | |
| 767 | 763 | const submenu_isPrimitivesComponents = 'undefined' !== typeof wp.primitives; |
| 768 | -const SubmenuIcon = () => submenu_isPrimitivesComponents ? /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_primitives_.SVG, { | |
| 764 | +const SubmenuIcon = () => submenu_isPrimitivesComponents ? /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)(external_this_wp_primitives_.SVG, { | |
| 769 | 765 | xmlns: "http://www.w3.org/2000/svg", |
| 770 | 766 | width: "12", |
| 771 | 767 | height: "12", |
| 772 | 768 | viewBox: "0 0 12 12", |
| 773 | 769 | fill: "none", |
| 774 | - children: /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_primitives_.Path, { | |
| 770 | + children: /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)(external_this_wp_primitives_.Path, { | |
| 775 | 771 | d: "M1.50002 4L6.00002 8L10.5 4", |
| 776 | 772 | strokeWidth: "1.5" |
| 777 | 773 | }) |
| 778 | 774 | }) : 'submenu'; |
| @@ -805,19 +801,19 @@ | ||
| 805 | 801 | showFlags, |
| 806 | 802 | showNames, |
| 807 | 803 | withSubmenuIcon |
| 808 | 804 | }) => { |
| 809 | - return /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, { | |
| 805 | + return /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)((react_jsx_runtime_production_min_namespaceFn().Fragment), { | |
| 810 | 806 | children: languages && languages.map(language => { |
| 811 | - return /*#__PURE__*/(0,jsx_runtime.jsxs)(external_this_wp_element_.Fragment, { | |
| 812 | - children: [/*#__PURE__*/(0,jsx_runtime.jsx)(SwitcherLinkElement, { | |
| 807 | + return /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsxs)(external_this_wp_element_.Fragment, { | |
| 808 | + children: [/*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)(SwitcherLinkElement, { | |
| 813 | 809 | language: language, |
| 814 | 810 | isTopLevel: languages.indexOf(language) === 0, |
| 815 | 811 | showFlags: showFlags, |
| 816 | 812 | showNames: showNames |
| 817 | - }), withSubmenuIcon && /*#__PURE__*/(0,jsx_runtime.jsx)("span", { | |
| 813 | + }), withSubmenuIcon && /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)("span", { | |
| 818 | 814 | className: "wp-block-navigation__submenu-icon", |
| 819 | - children: /*#__PURE__*/(0,jsx_runtime.jsx)(submenu, {}) | |
| 815 | + children: /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)(submenu, {}) | |
| 820 | 816 | })] |
| 821 | 817 | }, language.slug); |
| 822 | 818 | }) |
| 823 | 819 | }); |
| @@ -828,10 +824,8 @@ | ||
| 828 | 824 | /** |
| 829 | 825 | * WordPress dependencies |
| 830 | 826 | */ |
| 831 | 827 | |
| 832 | -// This package is not found in `@wordpress/scripts` like others (peer dependency). | |
| 833 | -// eslint-disable-next-line import/no-unresolved | |
| 834 | 828 | |
| 835 | 829 | |
| 836 | 830 | /** |
| 837 | 831 | * Custom hook to get the current language from the editor. |
| @@ -843,10 +837,9 @@ | ||
| 843 | 837 | const currentPost = (0,external_this_wp_data_.useSelect)(select => select(external_this_wp_editor_.store).getCurrentPost()); |
| 844 | 838 | if (!languages || !currentPost) { |
| 845 | 839 | return null; |
| 846 | 840 | } |
| 847 | - const currentLanguageSlug = currentPost.lang ?? pllEditorCurrentLanguageSlug; // eslint-disable-line no-undef | |
| 848 | - | |
| 841 | + const currentLanguageSlug = currentPost.lang ?? pllEditorCurrentLanguageSlug; | |
| 849 | 842 | const currentLanguage = languages.find(language => { |
| 850 | 843 | return language.slug === currentLanguageSlug; |
| 851 | 844 | }); |
| 852 | 845 | return currentLanguage ? currentLanguage : null; |
| @@ -890,9 +883,9 @@ | ||
| 890 | 883 | languages |
| 891 | 884 | } = (0,external_this_wp_element_.useContext)(LanguagesContext); |
| 892 | 885 | const currentLanguage = useCurrentLanguage(languages); |
| 893 | 886 | const curatedLanguages = useCuratedLanguages(languages, currentLanguage, dropdown); |
| 894 | - return /*#__PURE__*/(0,jsx_runtime.jsx)(switcher_ui_SwitcherUI, { | |
| 887 | + return /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)(switcher_ui_SwitcherUI, { | |
| 895 | 888 | languages: curatedLanguages, |
| 896 | 889 | showFlags: Boolean(show_flags), |
| 897 | 890 | showNames: Boolean(show_names), |
| 898 | 891 | withSubmenuIcon: Boolean((showSubmenuIcon || openSubmenusOnClick) && dropdown) |
| @@ -937,21 +930,21 @@ | ||
| 937 | 930 | ToggleControlForceHome, |
| 938 | 931 | ToggleControlHideCurrent, |
| 939 | 932 | ToggleControlHideIfNoTranslations |
| 940 | 933 | } = createLanguageSwitcherEdit(props); |
| 941 | - return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { | |
| 934 | + return /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsxs)("div", { | |
| 942 | 935 | ...(0,external_this_wp_blockEditor_.useBlockProps)(), |
| 943 | - children: [/*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_blockEditor_.InspectorControls, { | |
| 944 | - children: /*#__PURE__*/(0,jsx_runtime.jsxs)(external_this_wp_components_.PanelBody, { | |
| 936 | + children: [/*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)(external_this_wp_blockEditor_.InspectorControls, { | |
| 937 | + children: /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsxs)(external_this_wp_components_.PanelBody, { | |
| 945 | 938 | title: (0,external_this_wp_i18n_.__)('Language switcher settings', 'polylang'), |
| 946 | - children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ToggleControlDropdown, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(ToggleControlShowNames, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(ToggleControlShowFlags, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(ToggleControlForceHome, {}), !dropdown && /*#__PURE__*/(0,jsx_runtime.jsx)(ToggleControlHideCurrent, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(ToggleControlHideIfNoTranslations, {})] | |
| 939 | + children: [/*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)(ToggleControlDropdown, {}), /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)(ToggleControlShowNames, {}), /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)(ToggleControlShowFlags, {}), /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)(ToggleControlForceHome, {}), !dropdown && /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)(ToggleControlHideCurrent, {}), /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)(ToggleControlHideIfNoTranslations, {})] | |
| 947 | 940 | }) |
| 948 | - }), /*#__PURE__*/(0,jsx_runtime.jsx)(external_this_wp_components_.Disabled, { | |
| 949 | - children: /*#__PURE__*/(0,jsx_runtime.jsx)(LanguagesContext.Provider, { | |
| 941 | + }), /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)(external_this_wp_components_.Disabled, { | |
| 942 | + children: /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)(LanguagesContext.Provider, { | |
| 950 | 943 | value: { |
| 951 | 944 | languages |
| 952 | 945 | }, |
| 953 | - children: /*#__PURE__*/(0,jsx_runtime.jsx)(NavigationSwitcherContainer, { | |
| 946 | + children: /*#__PURE__*/(0,react_jsx_runtime_production_min_namespaceFn().jsx)(NavigationSwitcherContainer, { | |
| 954 | 947 | attributes: props.attributes, |
| 955 | 948 | context: props.context |
| 956 | 949 | }) |
| 957 | 950 | }) |