kollapsminoriteten/wp-includes/js/dist/preferences.js

572 lines
20 KiB
JavaScript
Raw Normal View History

2024-04-17 11:32:24 +02:00
/******/ (() => { // webpackBootstrap
2022-06-16 14:03:35 +02:00
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
2024-04-17 11:32:24 +02:00
/******/ /* webpack/runtime/compat get default export */
/******/ (() => {
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = (module) => {
/******/ var getter = module && module.__esModule ?
/******/ () => (module['default']) :
/******/ () => (module);
/******/ __webpack_require__.d(getter, { a: getter });
/******/ return getter;
/******/ };
/******/ })();
/******/
2022-06-16 14:03:35 +02:00
/******/ /* webpack/runtime/define property getters */
2024-04-17 11:32:24 +02:00
/******/ (() => {
2022-06-16 14:03:35 +02:00
/******/ // define getter functions for harmony exports
2024-04-17 11:32:24 +02:00
/******/ __webpack_require__.d = (exports, definition) => {
2022-06-16 14:03:35 +02:00
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
2024-04-17 11:32:24 +02:00
/******/ })();
2022-06-16 14:03:35 +02:00
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
2024-04-17 11:32:24 +02:00
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
2022-06-16 14:03:35 +02:00
/******/
/******/ /* webpack/runtime/make namespace object */
2024-04-17 11:32:24 +02:00
/******/ (() => {
2022-06-16 14:03:35 +02:00
/******/ // define __esModule on exports
2024-04-17 11:32:24 +02:00
/******/ __webpack_require__.r = (exports) => {
2022-06-16 14:03:35 +02:00
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
2024-04-17 11:32:24 +02:00
/******/ })();
2022-06-16 14:03:35 +02:00
/******/
/************************************************************************/
var __webpack_exports__ = {};
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
2024-04-17 11:32:24 +02:00
PreferenceToggleMenuItem: () => (/* reexport */ PreferenceToggleMenuItem),
privateApis: () => (/* reexport */ privateApis),
store: () => (/* reexport */ store)
2022-06-16 14:03:35 +02:00
});
// NAMESPACE OBJECT: ./node_modules/@wordpress/preferences/build-module/store/actions.js
var actions_namespaceObject = {};
__webpack_require__.r(actions_namespaceObject);
__webpack_require__.d(actions_namespaceObject, {
2024-04-17 11:32:24 +02:00
set: () => (set),
setDefaults: () => (setDefaults),
setPersistenceLayer: () => (setPersistenceLayer),
toggle: () => (toggle)
2022-06-16 14:03:35 +02:00
});
// NAMESPACE OBJECT: ./node_modules/@wordpress/preferences/build-module/store/selectors.js
var selectors_namespaceObject = {};
__webpack_require__.r(selectors_namespaceObject);
__webpack_require__.d(selectors_namespaceObject, {
2024-04-17 11:32:24 +02:00
get: () => (get)
2022-06-16 14:03:35 +02:00
});
2025-12-12 13:15:55 +01:00
;// external "ReactJSXRuntime"
const external_ReactJSXRuntime_namespaceObject = window["ReactJSXRuntime"];
2025-04-25 12:30:07 +02:00
;// external ["wp","data"]
2024-04-17 11:32:24 +02:00
const external_wp_data_namespaceObject = window["wp"]["data"];
2025-04-25 12:30:07 +02:00
;// external ["wp","components"]
2024-04-17 11:32:24 +02:00
const external_wp_components_namespaceObject = window["wp"]["components"];
2025-04-25 12:30:07 +02:00
;// external ["wp","i18n"]
2024-04-17 11:32:24 +02:00
const external_wp_i18n_namespaceObject = window["wp"]["i18n"];
2025-04-25 12:30:07 +02:00
;// external ["wp","primitives"]
2024-04-17 11:32:24 +02:00
const external_wp_primitives_namespaceObject = window["wp"]["primitives"];
2025-04-25 12:30:07 +02:00
;// ./node_modules/@wordpress/icons/build-module/library/check.js
2022-06-16 14:03:35 +02:00
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
var check_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z" }) });
2022-06-16 14:03:35 +02:00
2025-04-25 12:30:07 +02:00
;// external ["wp","a11y"]
2024-04-17 11:32:24 +02:00
const external_wp_a11y_namespaceObject = window["wp"]["a11y"];
2025-04-25 12:30:07 +02:00
;// ./node_modules/@wordpress/preferences/build-module/store/reducer.js
2025-12-12 13:15:55 +01:00
2023-09-26 10:33:34 +02:00
function defaults(state = {}, action) {
2025-12-12 13:15:55 +01:00
if (action.type === "SET_PREFERENCE_DEFAULTS") {
const { scope, defaults: values } = action;
2023-12-07 09:44:11 +01:00
return {
...state,
[scope]: {
...state[scope],
2022-06-16 14:03:35 +02:00
...values
}
};
}
return state;
}
2022-12-15 17:47:31 +01:00
function withPersistenceLayer(reducer) {
let persistenceLayer;
return (state, action) => {
2025-12-12 13:15:55 +01:00
if (action.type === "SET_PERSISTENCE_LAYER") {
const { persistenceLayer: persistence, persistedData } = action;
2022-12-15 17:47:31 +01:00
persistenceLayer = persistence;
return persistedData;
}
const nextState = reducer(state, action);
2025-12-12 13:15:55 +01:00
if (action.type === "SET_PREFERENCE_VALUE") {
2023-09-26 10:33:34 +02:00
persistenceLayer?.set(nextState);
2022-12-15 17:47:31 +01:00
}
return nextState;
};
}
2023-09-26 10:33:34 +02:00
const preferences = withPersistenceLayer((state = {}, action) => {
2025-12-12 13:15:55 +01:00
if (action.type === "SET_PREFERENCE_VALUE") {
const { scope, name, value } = action;
2023-12-07 09:44:11 +01:00
return {
...state,
[scope]: {
...state[scope],
2022-06-16 14:03:35 +02:00
[name]: value
}
};
}
return state;
2022-12-15 17:47:31 +01:00
});
2025-12-12 13:15:55 +01:00
var reducer_default = (0,external_wp_data_namespaceObject.combineReducers)({
2022-06-16 14:03:35 +02:00
defaults,
preferences
2025-12-12 13:15:55 +01:00
});
2022-06-16 14:03:35 +02:00
2025-04-25 12:30:07 +02:00
;// ./node_modules/@wordpress/preferences/build-module/store/actions.js
2022-06-16 14:03:35 +02:00
function toggle(scope, name) {
2025-12-12 13:15:55 +01:00
return function({ select, dispatch }) {
2022-06-16 14:03:35 +02:00
const currentValue = select.get(scope, name);
dispatch.set(scope, name, !currentValue);
};
}
function set(scope, name, value) {
return {
2025-12-12 13:15:55 +01:00
type: "SET_PREFERENCE_VALUE",
2022-06-16 14:03:35 +02:00
scope,
name,
value
};
}
function setDefaults(scope, defaults) {
return {
2025-12-12 13:15:55 +01:00
type: "SET_PREFERENCE_DEFAULTS",
2022-06-16 14:03:35 +02:00
scope,
defaults
};
}
2022-12-15 17:47:31 +01:00
async function setPersistenceLayer(persistenceLayer) {
const persistedData = await persistenceLayer.get();
return {
2025-12-12 13:15:55 +01:00
type: "SET_PERSISTENCE_LAYER",
2022-12-15 17:47:31 +01:00
persistenceLayer,
persistedData
};
}
2022-06-16 14:03:35 +02:00
2025-12-12 13:15:55 +01:00
2025-04-25 12:30:07 +02:00
;// external ["wp","deprecated"]
2024-04-17 11:32:24 +02:00
const external_wp_deprecated_namespaceObject = window["wp"]["deprecated"];
var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_namespaceObject);
2025-04-25 12:30:07 +02:00
;// ./node_modules/@wordpress/preferences/build-module/store/selectors.js
2025-12-12 13:15:55 +01:00
const withDeprecatedKeys = (originalGet) => (state, scope, name) => {
const settingsToMoveToCore = [
"allowRightClickOverrides",
"distractionFree",
"editorMode",
"fixedToolbar",
"focusMode",
"hiddenBlockTypes",
"inactivePanels",
"keepCaretInsideBlock",
"mostUsedBlocks",
"openPanels",
"showBlockBreadcrumbs",
"showIconLabels",
"showListViewByDefault",
"isPublishSidebarEnabled",
"isComplementaryAreaVisible",
"pinnedItems"
];
if (settingsToMoveToCore.includes(name) && ["core/edit-post", "core/edit-site"].includes(scope)) {
external_wp_deprecated_default()(
`wp.data.select( 'core/preferences' ).get( '${scope}', '${name}' )`,
{
since: "6.5",
alternative: `wp.data.select( 'core/preferences' ).get( 'core', '${name}' )`
}
);
return originalGet(state, "core", name);
2024-04-17 11:32:24 +02:00
}
return originalGet(state, scope, name);
};
const get = withDeprecatedKeys((state, scope, name) => {
2023-09-26 10:33:34 +02:00
const value = state.preferences[scope]?.[name];
2025-12-12 13:15:55 +01:00
return value !== void 0 ? value : state.defaults[scope]?.[name];
2024-04-17 11:32:24 +02:00
});
2022-06-16 14:03:35 +02:00
2025-12-12 13:15:55 +01:00
;// ./node_modules/@wordpress/preferences/build-module/store/constants.js
const STORE_NAME = "core/preferences";
2022-06-16 14:03:35 +02:00
2023-12-07 09:44:11 +01:00
2025-12-12 13:15:55 +01:00
;// ./node_modules/@wordpress/preferences/build-module/store/index.js
2022-06-16 14:03:35 +02:00
const store = (0,external_wp_data_namespaceObject.createReduxStore)(STORE_NAME, {
2025-12-12 13:15:55 +01:00
reducer: reducer_default,
2022-06-16 14:03:35 +02:00
actions: actions_namespaceObject,
2022-12-15 17:47:31 +01:00
selectors: selectors_namespaceObject
2022-06-16 14:03:35 +02:00
});
2022-12-15 17:47:31 +01:00
(0,external_wp_data_namespaceObject.register)(store);
2022-06-16 14:03:35 +02:00
2025-12-12 13:15:55 +01:00
;// ./node_modules/@wordpress/preferences/build-module/components/preference-toggle-menu-item/index.js
2022-06-16 14:03:35 +02:00
2023-12-07 09:44:11 +01:00
2022-06-16 14:03:35 +02:00
2025-02-28 08:42:11 +01:00
2023-09-26 10:33:34 +02:00
function PreferenceToggleMenuItem({
scope,
name,
label,
info,
messageActivated,
messageDeactivated,
shortcut,
2024-04-17 11:32:24 +02:00
handleToggling = true,
2023-09-26 10:33:34 +02:00
onToggle = () => null,
disabled = false
}) {
2025-12-12 13:15:55 +01:00
const isActive = (0,external_wp_data_namespaceObject.useSelect)(
(select) => !!select(store).get(scope, name),
[scope, name]
);
const { toggle } = (0,external_wp_data_namespaceObject.useDispatch)(store);
2022-06-16 14:03:35 +02:00
const speakMessage = () => {
if (isActive) {
2025-12-12 13:15:55 +01:00
const message = messageDeactivated || (0,external_wp_i18n_namespaceObject.sprintf)(
/* translators: %s: preference name, e.g. 'Fullscreen mode' */
(0,external_wp_i18n_namespaceObject.__)("Preference deactivated - %s"),
label
);
2022-06-16 14:03:35 +02:00
(0,external_wp_a11y_namespaceObject.speak)(message);
} else {
2025-12-12 13:15:55 +01:00
const message = messageActivated || (0,external_wp_i18n_namespaceObject.sprintf)(
/* translators: %s: preference name, e.g. 'Fullscreen mode' */
(0,external_wp_i18n_namespaceObject.__)("Preference activated - %s"),
label
);
2022-06-16 14:03:35 +02:00
(0,external_wp_a11y_namespaceObject.speak)(message);
}
};
2025-12-12 13:15:55 +01:00
return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
external_wp_components_namespaceObject.MenuItem,
{
icon: isActive && check_default,
isSelected: isActive,
onClick: () => {
onToggle();
if (handleToggling) {
toggle(scope, name);
}
speakMessage();
},
role: "menuitemcheckbox",
info,
shortcut,
disabled,
children: label
}
);
2022-06-16 14:03:35 +02:00
}
2025-12-12 13:15:55 +01:00
2025-04-25 12:30:07 +02:00
;// ./node_modules/@wordpress/preferences/build-module/components/index.js
2022-06-16 14:03:35 +02:00
2025-12-12 13:15:55 +01:00
2025-04-25 12:30:07 +02:00
;// ./node_modules/@wordpress/preferences/build-module/components/preference-base-option/index.js
2024-04-17 11:32:24 +02:00
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
function BaseOption({ help, label, isChecked, onChange, children }) {
return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "preference-base-option", children: [
/* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
external_wp_components_namespaceObject.ToggleControl,
{
__nextHasNoMarginBottom: true,
help,
label,
checked: isChecked,
onChange
}
),
children
] });
2024-04-17 11:32:24 +02:00
}
2025-12-12 13:15:55 +01:00
var preference_base_option_default = BaseOption;
2024-04-17 11:32:24 +02:00
2025-12-12 13:15:55 +01:00
;// ./node_modules/@wordpress/preferences/build-module/components/preference-toggle-control/index.js
2024-04-17 11:32:24 +02:00
2025-02-28 08:42:11 +01:00
2024-04-17 11:32:24 +02:00
function PreferenceToggleControl(props) {
const {
scope,
featureName,
2025-12-12 13:15:55 +01:00
onToggle = () => {
},
2024-04-17 11:32:24 +02:00
...remainingProps
} = props;
2025-12-12 13:15:55 +01:00
const isChecked = (0,external_wp_data_namespaceObject.useSelect)(
(select) => !!select(store).get(scope, featureName),
[scope, featureName]
);
const { toggle } = (0,external_wp_data_namespaceObject.useDispatch)(store);
2024-04-17 11:32:24 +02:00
const onChange = () => {
onToggle();
toggle(scope, featureName);
};
2025-12-12 13:15:55 +01:00
return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
preference_base_option_default,
{
onChange,
isChecked,
...remainingProps
}
);
2024-04-17 11:32:24 +02:00
}
2025-12-12 13:15:55 +01:00
var preference_toggle_control_default = PreferenceToggleControl;
2024-04-17 11:32:24 +02:00
2025-04-25 12:30:07 +02:00
;// ./node_modules/@wordpress/preferences/build-module/components/preferences-modal/index.js
2024-04-17 11:32:24 +02:00
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
function PreferencesModal({ closeModal, children }) {
return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
external_wp_components_namespaceObject.Modal,
{
className: "preferences-modal",
title: (0,external_wp_i18n_namespaceObject.__)("Preferences"),
onRequestClose: closeModal,
children
}
);
2024-04-17 11:32:24 +02:00
}
2025-12-12 13:15:55 +01:00
2025-04-25 12:30:07 +02:00
;// ./node_modules/@wordpress/preferences/build-module/components/preferences-modal-section/index.js
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
const Section = ({ description, title, children }) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("fieldset", { className: "preferences-modal__section", children: [
/* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("legend", { className: "preferences-modal__section-legend", children: [
/* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("h2", { className: "preferences-modal__section-title", children: title }),
description && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { className: "preferences-modal__section-description", children: description })
] }),
/* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "preferences-modal__section-content", children })
] });
var preferences_modal_section_default = Section;
2024-04-17 11:32:24 +02:00
2025-04-25 12:30:07 +02:00
;// external ["wp","compose"]
2024-04-17 11:32:24 +02:00
const external_wp_compose_namespaceObject = window["wp"]["compose"];
2025-04-25 12:30:07 +02:00
;// external ["wp","element"]
2024-04-17 11:32:24 +02:00
const external_wp_element_namespaceObject = window["wp"]["element"];
2025-04-25 12:30:07 +02:00
;// ./node_modules/@wordpress/icons/build-module/icon/index.js
2025-12-12 13:15:55 +01:00
var icon_default = (0,external_wp_element_namespaceObject.forwardRef)(
({ icon, size = 24, ...props }, ref) => {
return (0,external_wp_element_namespaceObject.cloneElement)(icon, {
width: size,
height: size,
...props,
ref
});
}
);
2024-04-17 11:32:24 +02:00
2025-04-25 12:30:07 +02:00
;// ./node_modules/@wordpress/icons/build-module/library/chevron-left.js
2024-04-17 11:32:24 +02:00
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
var chevron_left_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z" }) });
2024-04-17 11:32:24 +02:00
2025-04-25 12:30:07 +02:00
;// ./node_modules/@wordpress/icons/build-module/library/chevron-right.js
2024-04-17 11:32:24 +02:00
2025-02-28 08:42:11 +01:00
2025-12-12 13:15:55 +01:00
var chevron_right_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z" }) });
2024-04-17 11:32:24 +02:00
2025-04-25 12:30:07 +02:00
;// external ["wp","privateApis"]
2024-04-17 11:32:24 +02:00
const external_wp_privateApis_namespaceObject = window["wp"]["privateApis"];
2025-04-25 12:30:07 +02:00
;// ./node_modules/@wordpress/preferences/build-module/lock-unlock.js
2024-04-17 11:32:24 +02:00
2025-12-12 13:15:55 +01:00
const { lock, unlock } = (0,external_wp_privateApis_namespaceObject.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
"I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
"@wordpress/preferences"
);
2024-04-17 11:32:24 +02:00
2025-12-12 13:15:55 +01:00
;// ./node_modules/@wordpress/preferences/build-module/components/preferences-modal-tabs/index.js
2024-04-17 11:32:24 +02:00
2025-02-28 08:42:11 +01:00
2024-04-17 11:32:24 +02:00
2025-12-12 13:15:55 +01:00
const { Tabs } = unlock(external_wp_components_namespaceObject.privateApis);
const PREFERENCES_MENU = "preferences-menu";
function PreferencesModalTabs({ sections }) {
const isLargeViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)("medium");
2024-04-17 11:32:24 +02:00
const [activeMenu, setActiveMenu] = (0,external_wp_element_namespaceObject.useState)(PREFERENCES_MENU);
2025-12-12 13:15:55 +01:00
const { tabs, sectionsContentMap } = (0,external_wp_element_namespaceObject.useMemo)(() => {
2024-04-17 11:32:24 +02:00
let mappedTabs = {
tabs: [],
sectionsContentMap: {}
};
if (sections.length) {
2025-12-12 13:15:55 +01:00
mappedTabs = sections.reduce(
(accumulator, { name, tabLabel: title, content }) => {
accumulator.tabs.push({ name, title });
accumulator.sectionsContentMap[name] = content;
return accumulator;
},
{ tabs: [], sectionsContentMap: {} }
);
2024-04-17 11:32:24 +02:00
}
return mappedTabs;
}, [sections]);
let modalContent;
if (isLargeViewport) {
2025-12-12 13:15:55 +01:00
modalContent = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "preferences__tabs", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
Tabs,
{
defaultTabId: activeMenu !== PREFERENCES_MENU ? activeMenu : void 0,
2025-02-28 08:42:11 +01:00
onSelect: setActiveMenu,
orientation: "vertical",
2025-12-12 13:15:55 +01:00
children: [
/* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tabs.TabList, { className: "preferences__tabs-tablist", children: tabs.map((tab) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
Tabs.Tab,
{
tabId: tab.name,
className: "preferences__tabs-tab",
children: tab.title
},
tab.name
)) }),
tabs.map((tab) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
Tabs.TabPanel,
{
tabId: tab.name,
className: "preferences__tabs-tabpanel",
focusable: false,
children: sectionsContentMap[tab.name] || null
},
tab.name
))
]
}
) });
2024-04-17 11:32:24 +02:00
} else {
2025-12-12 13:15:55 +01:00
modalContent = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Navigator, { initialPath: "/", className: "preferences__provider", children: [
/* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Navigator.Screen, { path: "/", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Card, { isBorderless: true, size: "small", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.CardBody, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalItemGroup, { children: tabs.map((tab) => {
return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
external_wp_components_namespaceObject.Navigator.Button,
{
path: `/${tab.name}`,
as: external_wp_components_namespaceObject.__experimentalItem,
isAction: true,
children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, { justify: "space-between", children: [
/* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalTruncate, { children: tab.title }) }),
/* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
icon_default,
{
icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? chevron_left_default : chevron_right_default
}
) })
] })
},
tab.name
);
}) }) }) }) }),
sections.length && sections.map((section) => {
return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
external_wp_components_namespaceObject.Navigator.Screen,
{
path: `/${section.name}`,
children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Card, { isBorderless: true, size: "large", children: [
/* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
external_wp_components_namespaceObject.CardHeader,
{
isBorderless: false,
justify: "left",
size: "small",
gap: "6",
children: [
/* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
external_wp_components_namespaceObject.Navigator.BackButton,
{
icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? chevron_right_default : chevron_left_default,
label: (0,external_wp_i18n_namespaceObject.__)("Back")
}
),
/* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, { size: "16", children: section.tabLabel })
]
}
),
/* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.CardBody, { children: section.content })
] })
},
`${section.name}-menu`
);
})
] });
2024-04-17 11:32:24 +02:00
}
return modalContent;
}
2025-12-12 13:15:55 +01:00
2025-04-25 12:30:07 +02:00
;// ./node_modules/@wordpress/preferences/build-module/private-apis.js
2024-04-17 11:32:24 +02:00
const privateApis = {};
lock(privateApis, {
2025-12-12 13:15:55 +01:00
PreferenceBaseOption: preference_base_option_default,
PreferenceToggleControl: preference_toggle_control_default,
2024-04-17 11:32:24 +02:00
PreferencesModal: PreferencesModal,
2025-12-12 13:15:55 +01:00
PreferencesModalSection: preferences_modal_section_default,
2024-04-17 11:32:24 +02:00
PreferencesModalTabs: PreferencesModalTabs
});
2025-12-12 13:15:55 +01:00
2025-04-25 12:30:07 +02:00
;// ./node_modules/@wordpress/preferences/build-module/index.js
2022-06-16 14:03:35 +02:00
2024-04-17 11:32:24 +02:00
2025-12-12 13:15:55 +01:00
2022-06-16 14:03:35 +02:00
(window.wp = window.wp || {}).preferences = __webpack_exports__;
/******/ })()
;