diff options
Diffstat (limited to 'wp-includes/js/dist/preferences-persistence.js')
-rw-r--r-- | wp-includes/js/dist/preferences-persistence.js | 74 |
1 files changed, 55 insertions, 19 deletions
diff --git a/wp-includes/js/dist/preferences-persistence.js b/wp-includes/js/dist/preferences-persistence.js index 621b478..80ebebe 100644 --- a/wp-includes/js/dist/preferences-persistence.js +++ b/wp-includes/js/dist/preferences-persistence.js @@ -1,48 +1,48 @@ -/******/ (function() { // webpackBootstrap +/******/ (() => { // webpackBootstrap /******/ "use strict"; /******/ // The require scope /******/ var __webpack_require__ = {}; /******/ /************************************************************************/ /******/ /* webpack/runtime/compat get default export */ -/******/ !function() { +/******/ (() => { /******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { +/******/ __webpack_require__.n = (module) => { /******/ var getter = module && module.__esModule ? -/******/ function() { return module['default']; } : -/******/ function() { return module; }; +/******/ () => (module['default']) : +/******/ () => (module); /******/ __webpack_require__.d(getter, { a: getter }); /******/ return getter; /******/ }; -/******/ }(); +/******/ })(); /******/ /******/ /* webpack/runtime/define property getters */ -/******/ !function() { +/******/ (() => { /******/ // define getter functions for harmony exports -/******/ __webpack_require__.d = function(exports, definition) { +/******/ __webpack_require__.d = (exports, definition) => { /******/ 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] }); /******/ } /******/ } /******/ }; -/******/ }(); +/******/ })(); /******/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ -/******/ !function() { -/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } -/******/ }(); +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); /******/ /******/ /* webpack/runtime/make namespace object */ -/******/ !function() { +/******/ (() => { /******/ // define __esModule on exports -/******/ __webpack_require__.r = function(exports) { +/******/ __webpack_require__.r = (exports) => { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; -/******/ }(); +/******/ })(); /******/ /************************************************************************/ var __webpack_exports__ = {}; @@ -51,12 +51,12 @@ __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { - __unstableCreatePersistenceLayer: function() { return /* binding */ __unstableCreatePersistenceLayer; }, - create: function() { return /* reexport */ create; } + __unstableCreatePersistenceLayer: () => (/* binding */ __unstableCreatePersistenceLayer), + create: () => (/* reexport */ create) }); ;// CONCATENATED MODULE: external ["wp","apiFetch"] -var external_wp_apiFetch_namespaceObject = window["wp"]["apiFetch"]; +const external_wp_apiFetch_namespaceObject = window["wp"]["apiFetch"]; var external_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_wp_apiFetch_namespaceObject); ;// CONCATENATED MODULE: ./node_modules/@wordpress/preferences-persistence/build-module/create/debounce-async.js /** @@ -802,13 +802,49 @@ function convertComplementaryAreas(state) { }, state); } +;// CONCATENATED MODULE: ./node_modules/@wordpress/preferences-persistence/build-module/migrations/preferences-package-data/convert-editor-settings.js +/** + * Internal dependencies + */ + +function convertEditorSettings(data) { + var _newData$coreEditPo, _newData$coreEditSi; + let newData = data; + const settingsToMoveToCore = ['allowRightClickOverrides', 'distractionFree', 'editorMode', 'fixedToolbar', 'focusMode', 'hiddenBlockTypes', 'inactivePanels', 'keepCaretInsideBlock', 'mostUsedBlocks', 'openPanels', 'showBlockBreadcrumbs', 'showIconLabels', 'showListViewByDefault']; + settingsToMoveToCore.forEach(setting => { + if (data?.['core/edit-post']?.[setting] !== undefined) { + newData = { + ...newData, + core: { + ...newData?.core, + [setting]: data['core/edit-post'][setting] + } + }; + delete newData['core/edit-post'][setting]; + } + if (data?.['core/edit-site']?.[setting] !== undefined) { + delete newData['core/edit-site'][setting]; + } + }); + if (Object.keys((_newData$coreEditPo = newData?.['core/edit-post']) !== null && _newData$coreEditPo !== void 0 ? _newData$coreEditPo : {})?.length === 0) { + delete newData['core/edit-post']; + } + if (Object.keys((_newData$coreEditSi = newData?.['core/edit-site']) !== null && _newData$coreEditSi !== void 0 ? _newData$coreEditSi : {})?.length === 0) { + delete newData['core/edit-site']; + } + return newData; +} + ;// CONCATENATED MODULE: ./node_modules/@wordpress/preferences-persistence/build-module/migrations/preferences-package-data/index.js /** * Internal dependencies */ + function convertPreferencesPackageData(data) { - return convertComplementaryAreas(data); + let newData = convertComplementaryAreas(data); + newData = convertEditorSettings(newData); + return newData; } ;// CONCATENATED MODULE: ./node_modules/@wordpress/preferences-persistence/build-module/index.js |