@wordpress/edit-widgets 5.19.6 → 5.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/build/blocks/widget-area/edit/index.js +6 -5
- package/build/blocks/widget-area/edit/index.js.map +1 -1
- package/build/blocks/widget-area/edit/inner-blocks.js +4 -3
- package/build/blocks/widget-area/edit/inner-blocks.js.map +1 -1
- package/build/components/error-boundary/index.js +5 -4
- package/build/components/error-boundary/index.js.map +1 -1
- package/build/components/header/index.js +12 -11
- package/build/components/header/index.js.map +1 -1
- package/build/components/header/undo-redo/redo.js +2 -2
- package/build/components/header/undo-redo/redo.js.map +1 -1
- package/build/components/header/undo-redo/undo.js +2 -2
- package/build/components/header/undo-redo/undo.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +2 -2
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/index.js +15 -15
- package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/shortcut.js +8 -7
- package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
- package/build/components/layout/index.js +5 -5
- package/build/components/layout/index.js.map +1 -1
- package/build/components/layout/interface.js +9 -8
- package/build/components/layout/interface.js.map +1 -1
- package/build/components/layout/unsaved-changes-warning.js +1 -1
- package/build/components/layout/unsaved-changes-warning.js.map +1 -1
- package/build/components/more-menu/index.js +15 -14
- package/build/components/more-menu/index.js.map +1 -1
- package/build/components/more-menu/tools-more-menu-group.js +2 -2
- package/build/components/more-menu/tools-more-menu-group.js.map +1 -1
- package/build/components/notices/index.js +4 -4
- package/build/components/notices/index.js.map +1 -1
- package/build/components/save-button/index.js +2 -2
- package/build/components/save-button/index.js.map +1 -1
- package/build/components/secondary-sidebar/index.js +3 -3
- package/build/components/secondary-sidebar/index.js.map +1 -1
- package/build/components/secondary-sidebar/inserter-sidebar.js +7 -6
- package/build/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
- package/build/components/secondary-sidebar/list-view-sidebar.js +7 -6
- package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build/components/sidebar/index.js +9 -8
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/sidebar/widget-areas.js +7 -6
- package/build/components/sidebar/widget-areas.js.map +1 -1
- package/build/components/welcome-guide/index.js +23 -22
- package/build/components/welcome-guide/index.js.map +1 -1
- package/build/components/widget-areas-block-editor-content/index.js +5 -4
- package/build/components/widget-areas-block-editor-content/index.js.map +1 -1
- package/build/components/widget-areas-block-editor-provider/index.js +4 -3
- package/build/components/widget-areas-block-editor-provider/index.js.map +1 -1
- package/build/filters/move-to-widget-area.js +3 -3
- package/build/filters/move-to-widget-area.js.map +1 -1
- package/build/index.js +3 -2
- package/build/index.js.map +1 -1
- package/build/lock-unlock.js +1 -1
- package/build/lock-unlock.js.map +1 -1
- package/build-module/blocks/widget-area/edit/index.js +1 -1
- package/build-module/blocks/widget-area/edit/inner-blocks.js +1 -1
- package/build-module/components/error-boundary/index.js +1 -1
- package/build-module/components/header/index.js +1 -1
- package/build-module/components/header/undo-redo/redo.js +1 -1
- package/build-module/components/header/undo-redo/undo.js +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/index.js +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +1 -1
- package/build-module/components/layout/index.js +1 -1
- package/build-module/components/layout/interface.js +1 -1
- package/build-module/components/layout/unsaved-changes-warning.js +1 -1
- package/build-module/components/layout/unsaved-changes-warning.js.map +1 -1
- package/build-module/components/more-menu/index.js +1 -1
- package/build-module/components/more-menu/tools-more-menu-group.js +1 -1
- package/build-module/components/notices/index.js +1 -1
- package/build-module/components/save-button/index.js +1 -1
- package/build-module/components/secondary-sidebar/index.js +1 -1
- package/build-module/components/secondary-sidebar/inserter-sidebar.js +1 -1
- package/build-module/components/secondary-sidebar/list-view-sidebar.js +1 -1
- package/build-module/components/sidebar/index.js +1 -1
- package/build-module/components/sidebar/widget-areas.js +1 -1
- package/build-module/components/welcome-guide/index.js +1 -1
- package/build-module/components/widget-areas-block-editor-content/index.js +1 -1
- package/build-module/components/widget-areas-block-editor-provider/index.js +3 -3
- package/build-module/components/widget-areas-block-editor-provider/index.js.map +1 -1
- package/build-module/filters/move-to-widget-area.js +1 -1
- package/build-module/index.js +1 -1
- package/build-module/lock-unlock.js +1 -1
- package/build-module/lock-unlock.js.map +1 -1
- package/build-style/style-rtl.css +11 -10
- package/build-style/style.css +11 -10
- package/package.json +28 -28
- package/src/components/layout/unsaved-changes-warning.js +1 -1
- package/src/components/widget-areas-block-editor-provider/index.js +2 -5
- package/src/lock-unlock.js +1 -1
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_blocks","require","_data","_deprecated","_interopRequireDefault","_element","_blockLibrary","_coreData","_widgets","_preferences","_store","widgetArea","_interopRequireWildcard","_layout","_constants","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","disabledBlocks","ALLOW_REUSABLE_BLOCKS","initializeEditor","id","settings","target","document","getElementById","root","createRoot","coreBlocks","__experimentalGetCoreBlocks","filter","block","includes","name","startsWith","dispatch","preferencesStore","setDefaults","fixedToolbar","welcomeGuide","showBlockBreadcrumbs","themeStyles","blocksStore","reapplyBlockTypeFilters","registerCoreBlocks","registerLegacyWidgetBlock","process","env","IS_GUTENBERG_PLUGIN","__experimentalRegisterExperimentalCoreBlocks","enableFSEBlocks","ENABLE_EXPERIMENTAL_FSE_BLOCKS","registerLegacyWidgetVariations","registerBlock","registerWidgetGroupBlock","__experimentalFetchLinkSuggestions","search","searchOptions","fetchLinkSuggestions","setFreeformContentHandlerName","render","_react","createElement","blockEditorSettings","initialize","exports","reinitializeEditor","deprecated","since","version","metadata","unstable__bootstrapServerSideBlockDefinitions","registerBlockType"],"sources":["@wordpress/edit-widgets/src/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tregisterBlockType,\n\tunstable__bootstrapServerSideBlockDefinitions, // eslint-disable-line camelcase\n\tsetFreeformContentHandlerName,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\nimport { dispatch } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { createRoot } from '@wordpress/element';\nimport {\n\tregisterCoreBlocks,\n\t__experimentalGetCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport { __experimentalFetchLinkSuggestions as fetchLinkSuggestions } from '@wordpress/core-data';\nimport {\n\tregisterLegacyWidgetBlock,\n\tregisterLegacyWidgetVariations,\n\tregisterWidgetGroupBlock,\n} from '@wordpress/widgets';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport './store';\nimport './filters';\nimport * as widgetArea from './blocks/widget-area';\n\nimport Layout from './components/layout';\nimport {\n\tALLOW_REUSABLE_BLOCKS,\n\tENABLE_EXPERIMENTAL_FSE_BLOCKS,\n} from './constants';\n\nconst disabledBlocks = [\n\t'core/more',\n\t'core/freeform',\n\t'core/template-part',\n\t...( ALLOW_REUSABLE_BLOCKS ? [] : [ 'core/block' ] ),\n];\n\n/**\n * Initializes the block editor in the widgets screen.\n *\n * @param {string} id ID of the root element to render the screen in.\n * @param {Object} settings Block editor settings.\n */\nexport function initializeEditor( id, settings ) {\n\tconst target = document.getElementById( id );\n\tconst root = createRoot( target );\n\n\tconst coreBlocks = __experimentalGetCoreBlocks().filter( ( block ) => {\n\t\treturn ! (\n\t\t\tdisabledBlocks.includes( block.name ) ||\n\t\t\tblock.name.startsWith( 'core/post' ) ||\n\t\t\tblock.name.startsWith( 'core/query' ) ||\n\t\t\tblock.name.startsWith( 'core/site' ) ||\n\t\t\tblock.name.startsWith( 'core/navigation' )\n\t\t);\n\t} );\n\n\tdispatch( preferencesStore ).setDefaults( 'core/edit-widgets', {\n\t\tfixedToolbar: false,\n\t\twelcomeGuide: true,\n\t\tshowBlockBreadcrumbs: true,\n\t\tthemeStyles: true,\n\t} );\n\n\tdispatch( blocksStore ).reapplyBlockTypeFilters();\n\tregisterCoreBlocks( coreBlocks );\n\tregisterLegacyWidgetBlock();\n\tif ( process.env.IS_GUTENBERG_PLUGIN ) {\n\t\t__experimentalRegisterExperimentalCoreBlocks( {\n\t\t\tenableFSEBlocks: ENABLE_EXPERIMENTAL_FSE_BLOCKS,\n\t\t} );\n\t}\n\tregisterLegacyWidgetVariations( settings );\n\tregisterBlock( widgetArea );\n\tregisterWidgetGroupBlock();\n\n\tsettings.__experimentalFetchLinkSuggestions = ( search, searchOptions ) =>\n\t\tfetchLinkSuggestions( search, searchOptions, settings );\n\n\t// As we are unregistering `core/freeform` to avoid the Classic block, we must\n\t// replace it with something as the default freeform content handler. Failure to\n\t// do this will result in errors in the default block parser.\n\t// see: https://github.com/WordPress/gutenberg/issues/33097\n\tsetFreeformContentHandlerName( 'core/html' );\n\n\troot.render( <Layout blockEditorSettings={ settings } /> );\n\n\treturn root;\n}\n\n/**\n * Compatibility export under the old `initialize` name.\n */\nexport const initialize = initializeEditor;\n\nexport function reinitializeEditor() {\n\tdeprecated( 'wp.editWidgets.reinitializeEditor', {\n\t\tsince: '6.2',\n\t\tversion: '6.3',\n\t} );\n}\n\n/**\n * Function to register an individual block.\n *\n * @param {Object} block The block to be registered.\n */\nconst registerBlock = ( block ) => {\n\tif ( ! block ) {\n\t\treturn;\n\t}\n\tconst { metadata, settings, name } = block;\n\tif ( metadata ) {\n\t\tunstable__bootstrapServerSideBlockDefinitions( { [ name ]: metadata } );\n\t}\n\tregisterBlockType( name, settings );\n};\n\nexport { store } from './store';\n"],"mappings":";;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,QAAQ,EAAG;IACf,IAAAC,qDAA6C,EAAE;MAAE,CAAEtC,IAAI,GAAIqC;IAAS,CAAE,CAAC;EACxE;EACA,IAAAE,yBAAiB,EAAEvC,IAAI,EAAEX,QAAS,CAAC;AACpC,CAAC"}
|
package/build/lock-unlock.js
CHANGED
|
@@ -12,7 +12,7 @@ var _privateApis = require("@wordpress/private-apis");
|
|
|
12
12
|
const {
|
|
13
13
|
lock,
|
|
14
14
|
unlock
|
|
15
|
-
} = (0, _privateApis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I know using unstable features means my
|
|
15
|
+
} = (0, _privateApis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.', '@wordpress/edit-widgets');
|
|
16
16
|
exports.unlock = unlock;
|
|
17
17
|
exports.lock = lock;
|
|
18
18
|
//# sourceMappingURL=lock-unlock.js.map
|
package/build/lock-unlock.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_privateApis","require","lock","unlock","__dangerousOptInToUnstableAPIsOnlyForCoreModules","exports"],"sources":["@wordpress/edit-widgets/src/lock-unlock.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';\n\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I know using unstable features means my
|
|
1
|
+
{"version":3,"names":["_privateApis","require","lock","unlock","__dangerousOptInToUnstableAPIsOnlyForCoreModules","exports"],"sources":["@wordpress/edit-widgets/src/lock-unlock.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';\n\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.',\n\t\t'@wordpress/edit-widgets'\n\t);\n"],"mappings":";;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGO,MAAM;EAAEC,IAAI;EAAEC;AAAO,CAAC,GAC5B,IAAAC,6DAAgD,EAC/C,8GAA8G,EAC9G,yBACD,CAAC;AAACC,OAAA,CAAAF,MAAA,GAAAA,MAAA;AAAAE,OAAA,CAAAH,IAAA,GAAAA,IAAA"}
|
|
@@ -16,7 +16,7 @@ import { store as editWidgetsStore } from '../../store';
|
|
|
16
16
|
* This is a duplicate of the component implemented in the editor package.
|
|
17
17
|
* Duplicated here as edit-widgets doesn't depend on editor.
|
|
18
18
|
*
|
|
19
|
-
* @return {
|
|
19
|
+
* @return {Component} The component.
|
|
20
20
|
*/
|
|
21
21
|
export default function UnsavedChangesWarning() {
|
|
22
22
|
const isDirty = useSelect(select => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__","useEffect","useSelect","store","editWidgetsStore","UnsavedChangesWarning","isDirty","select","getEditedWidgetAreas","editedWidgetAreas","length","warnIfUnsavedChanges","event","returnValue","window","addEventListener","removeEventListener"],"sources":["@wordpress/edit-widgets/src/components/layout/unsaved-changes-warning.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useEffect } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\n/**\n * Warns the user if there are unsaved changes before leaving the editor.\n *\n * This is a duplicate of the component implemented in the editor package.\n * Duplicated here as edit-widgets doesn't depend on editor.\n *\n * @return {
|
|
1
|
+
{"version":3,"names":["__","useEffect","useSelect","store","editWidgetsStore","UnsavedChangesWarning","isDirty","select","getEditedWidgetAreas","editedWidgetAreas","length","warnIfUnsavedChanges","event","returnValue","window","addEventListener","removeEventListener"],"sources":["@wordpress/edit-widgets/src/components/layout/unsaved-changes-warning.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useEffect } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\n/**\n * Warns the user if there are unsaved changes before leaving the editor.\n *\n * This is a duplicate of the component implemented in the editor package.\n * Duplicated here as edit-widgets doesn't depend on editor.\n *\n * @return {Component} The component.\n */\nexport default function UnsavedChangesWarning() {\n\tconst isDirty = useSelect( ( select ) => {\n\t\tconst { getEditedWidgetAreas } = select( editWidgetsStore );\n\t\tconst editedWidgetAreas = getEditedWidgetAreas();\n\n\t\treturn editedWidgetAreas?.length > 0;\n\t}, [] );\n\n\tuseEffect( () => {\n\t\t/**\n\t\t * Warns the user if there are unsaved changes before leaving the editor.\n\t\t *\n\t\t * @param {Event} event `beforeunload` event.\n\t\t *\n\t\t * @return {string | undefined} Warning prompt message, if unsaved changes exist.\n\t\t */\n\t\tconst warnIfUnsavedChanges = ( event ) => {\n\t\t\tif ( isDirty ) {\n\t\t\t\tevent.returnValue = __(\n\t\t\t\t\t'You have unsaved changes. If you proceed, they will be lost.'\n\t\t\t\t);\n\t\t\t\treturn event.returnValue;\n\t\t\t}\n\t\t};\n\n\t\twindow.addEventListener( 'beforeunload', warnIfUnsavedChanges );\n\n\t\treturn () => {\n\t\t\twindow.removeEventListener( 'beforeunload', warnIfUnsavedChanges );\n\t\t};\n\t}, [ isDirty ] );\n\n\treturn null;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,SAAS,QAAQ,oBAAoB;AAC9C,SAASC,SAAS,QAAQ,iBAAiB;;AAE3C;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,qBAAqBA,CAAA,EAAG;EAC/C,MAAMC,OAAO,GAAGJ,SAAS,CAAIK,MAAM,IAAM;IACxC,MAAM;MAAEC;IAAqB,CAAC,GAAGD,MAAM,CAAEH,gBAAiB,CAAC;IAC3D,MAAMK,iBAAiB,GAAGD,oBAAoB,CAAC,CAAC;IAEhD,OAAOC,iBAAiB,EAAEC,MAAM,GAAG,CAAC;EACrC,CAAC,EAAE,EAAG,CAAC;EAEPT,SAAS,CAAE,MAAM;IAChB;AACF;AACA;AACA;AACA;AACA;AACA;IACE,MAAMU,oBAAoB,GAAKC,KAAK,IAAM;MACzC,IAAKN,OAAO,EAAG;QACdM,KAAK,CAACC,WAAW,GAAGb,EAAE,CACrB,8DACD,CAAC;QACD,OAAOY,KAAK,CAACC,WAAW;MACzB;IACD,CAAC;IAEDC,MAAM,CAACC,gBAAgB,CAAE,cAAc,EAAEJ,oBAAqB,CAAC;IAE/D,OAAO,MAAM;MACZG,MAAM,CAACE,mBAAmB,CAAE,cAAc,EAAEL,oBAAqB,CAAC;IACnE,CAAC;EACF,CAAC,EAAE,CAAEL,OAAO,CAAG,CAAC;EAEhB,OAAO,IAAI;AACZ"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createElement } from "
|
|
1
|
+
import { createElement } from "react";
|
|
2
2
|
/**
|
|
3
3
|
* WordPress dependencies
|
|
4
4
|
*/
|
|
@@ -7,7 +7,7 @@ import { uploadMedia } from '@wordpress/media-utils';
|
|
|
7
7
|
import { useDispatch, useSelect } from '@wordpress/data';
|
|
8
8
|
import { useEntityBlockEditor, store as coreStore, useResourcePermissions } from '@wordpress/core-data';
|
|
9
9
|
import { useMemo } from '@wordpress/element';
|
|
10
|
-
import {
|
|
10
|
+
import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
|
|
11
11
|
import { privateApis as editPatternsPrivateApis } from '@wordpress/patterns';
|
|
12
12
|
import { store as preferencesStore } from '@wordpress/preferences';
|
|
13
13
|
|
|
@@ -83,7 +83,7 @@ export default function WidgetAreasBlockEditorProvider({
|
|
|
83
83
|
settings: settings,
|
|
84
84
|
useSubRegistry: false,
|
|
85
85
|
...props
|
|
86
|
-
},
|
|
86
|
+
}, children, createElement(PatternsMenuItems, {
|
|
87
87
|
rootClientId: widgetAreaId
|
|
88
88
|
})));
|
|
89
89
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SlotFillProvider","uploadMedia","useDispatch","useSelect","useEntityBlockEditor","store","coreStore","useResourcePermissions","useMemo","
|
|
1
|
+
{"version":3,"names":["SlotFillProvider","uploadMedia","useDispatch","useSelect","useEntityBlockEditor","store","coreStore","useResourcePermissions","useMemo","privateApis","blockEditorPrivateApis","editPatternsPrivateApis","preferencesStore","KeyboardShortcuts","buildWidgetAreasPostId","KIND","POST_TYPE","useLastSelectedWidgetArea","editWidgetsStore","ALLOW_REUSABLE_BLOCKS","unlock","ExperimentalBlockEditorProvider","PatternsMenuItems","WidgetAreasBlockEditorProvider","blockEditorSettings","children","props","mediaPermissions","reusableBlocks","isFixedToolbarActive","keepCaretInsideBlock","select","widgetAreas","getWidgetAreas","widgets","getWidgets","getEntityRecords","get","setIsInserterOpened","settings","mediaUploadBlockEditor","canCreate","onError","argumentsObject","wpAllowedMimeTypes","allowedMimeTypes","message","__experimentalReusableBlocks","hasFixedToolbar","mediaUpload","templateLock","__experimentalSetIsInserterOpened","widgetAreaId","blocks","onInput","onChange","id","createElement","Register","value","useSubRegistry","rootClientId"],"sources":["@wordpress/edit-widgets/src/components/widget-areas-block-editor-provider/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { SlotFillProvider } from '@wordpress/components';\nimport { uploadMedia } from '@wordpress/media-utils';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tuseEntityBlockEditor,\n\tstore as coreStore,\n\tuseResourcePermissions,\n} from '@wordpress/core-data';\nimport { useMemo } from '@wordpress/element';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { privateApis as editPatternsPrivateApis } from '@wordpress/patterns';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport KeyboardShortcuts from '../keyboard-shortcuts';\nimport { buildWidgetAreasPostId, KIND, POST_TYPE } from '../../store/utils';\nimport useLastSelectedWidgetArea from '../../hooks/use-last-selected-widget-area';\nimport { store as editWidgetsStore } from '../../store';\nimport { ALLOW_REUSABLE_BLOCKS } from '../../constants';\nimport { unlock } from '../../lock-unlock';\n\nconst { ExperimentalBlockEditorProvider } = unlock( blockEditorPrivateApis );\nconst { PatternsMenuItems } = unlock( editPatternsPrivateApis );\nexport default function WidgetAreasBlockEditorProvider( {\n\tblockEditorSettings,\n\tchildren,\n\t...props\n} ) {\n\tconst mediaPermissions = useResourcePermissions( 'media' );\n\tconst { reusableBlocks, isFixedToolbarActive, keepCaretInsideBlock } =\n\t\tuseSelect(\n\t\t\t( select ) => ( {\n\t\t\t\twidgetAreas: select( editWidgetsStore ).getWidgetAreas(),\n\t\t\t\twidgets: select( editWidgetsStore ).getWidgets(),\n\t\t\t\treusableBlocks: ALLOW_REUSABLE_BLOCKS\n\t\t\t\t\t? select( coreStore ).getEntityRecords(\n\t\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t\t'wp_block'\n\t\t\t\t\t )\n\t\t\t\t\t: [],\n\t\t\t\tisFixedToolbarActive: !! select( preferencesStore ).get(\n\t\t\t\t\t'core/edit-widgets',\n\t\t\t\t\t'fixedToolbar'\n\t\t\t\t),\n\t\t\t\tkeepCaretInsideBlock: !! select( preferencesStore ).get(\n\t\t\t\t\t'core/edit-widgets',\n\t\t\t\t\t'keepCaretInsideBlock'\n\t\t\t\t),\n\t\t\t} ),\n\t\t\t[]\n\t\t);\n\tconst { setIsInserterOpened } = useDispatch( editWidgetsStore );\n\n\tconst settings = useMemo( () => {\n\t\tlet mediaUploadBlockEditor;\n\t\tif ( mediaPermissions.canCreate ) {\n\t\t\tmediaUploadBlockEditor = ( { onError, ...argumentsObject } ) => {\n\t\t\t\tuploadMedia( {\n\t\t\t\t\twpAllowedMimeTypes: blockEditorSettings.allowedMimeTypes,\n\t\t\t\t\tonError: ( { message } ) => onError( message ),\n\t\t\t\t\t...argumentsObject,\n\t\t\t\t} );\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t...blockEditorSettings,\n\t\t\t__experimentalReusableBlocks: reusableBlocks,\n\t\t\thasFixedToolbar: isFixedToolbarActive,\n\t\t\tkeepCaretInsideBlock,\n\t\t\tmediaUpload: mediaUploadBlockEditor,\n\t\t\ttemplateLock: 'all',\n\t\t\t__experimentalSetIsInserterOpened: setIsInserterOpened,\n\t\t};\n\t}, [\n\t\tblockEditorSettings,\n\t\tisFixedToolbarActive,\n\t\tkeepCaretInsideBlock,\n\t\tmediaPermissions.canCreate,\n\t\treusableBlocks,\n\t\tsetIsInserterOpened,\n\t] );\n\n\tconst widgetAreaId = useLastSelectedWidgetArea();\n\n\tconst [ blocks, onInput, onChange ] = useEntityBlockEditor(\n\t\tKIND,\n\t\tPOST_TYPE,\n\t\t{ id: buildWidgetAreasPostId() }\n\t);\n\n\treturn (\n\t\t<SlotFillProvider>\n\t\t\t<KeyboardShortcuts.Register />\n\t\t\t<ExperimentalBlockEditorProvider\n\t\t\t\tvalue={ blocks }\n\t\t\t\tonInput={ onInput }\n\t\t\t\tonChange={ onChange }\n\t\t\t\tsettings={ settings }\n\t\t\t\tuseSubRegistry={ false }\n\t\t\t\t{ ...props }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t\t<PatternsMenuItems rootClientId={ widgetAreaId } />\n\t\t\t</ExperimentalBlockEditorProvider>\n\t\t</SlotFillProvider>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,gBAAgB,QAAQ,uBAAuB;AACxD,SAASC,WAAW,QAAQ,wBAAwB;AACpD,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SACCC,oBAAoB,EACpBC,KAAK,IAAIC,SAAS,EAClBC,sBAAsB,QAChB,sBAAsB;AAC7B,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,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EAAGA,QAAU;IACrBhB,QAAQ,EAAGA,QAAU;IACrBqB,cAAc,EAAG,KAAO;IAAA,GACnBlC;EAAK,GAERD,QAAQ,EACVgC,aAAA,CAACnC,iBAAiB;IAACuC,YAAY,EAAGT;EAAc,CAAE,CAClB,CAChB,CAAC;AAErB"}
|
package/build-module/index.js
CHANGED
|
@@ -5,5 +5,5 @@ import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/pri
|
|
|
5
5
|
export const {
|
|
6
6
|
lock,
|
|
7
7
|
unlock
|
|
8
|
-
} = __dangerousOptInToUnstableAPIsOnlyForCoreModules('I know using unstable features means my
|
|
8
|
+
} = __dangerousOptInToUnstableAPIsOnlyForCoreModules('I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.', '@wordpress/edit-widgets');
|
|
9
9
|
//# sourceMappingURL=lock-unlock.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__dangerousOptInToUnstableAPIsOnlyForCoreModules","lock","unlock"],"sources":["@wordpress/edit-widgets/src/lock-unlock.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';\n\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I know using unstable features means my
|
|
1
|
+
{"version":3,"names":["__dangerousOptInToUnstableAPIsOnlyForCoreModules","lock","unlock"],"sources":["@wordpress/edit-widgets/src/lock-unlock.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';\n\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.',\n\t\t'@wordpress/edit-widgets'\n\t);\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,gDAAgD,QAAQ,yBAAyB;AAE1F,OAAO,MAAM;EAAEC,IAAI;EAAEC;AAAO,CAAC,GAC5BF,gDAAgD,CAC/C,8GAA8G,EAC9G,yBACD,CAAC"}
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
--wp-block-synced-color: #7a00df;
|
|
98
98
|
--wp-block-synced-color--rgb: 122, 0, 223;
|
|
99
99
|
}
|
|
100
|
-
@media (min-resolution: 192dpi) {
|
|
100
|
+
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
|
|
101
101
|
:root {
|
|
102
102
|
--wp-admin-border-width-focus: 1.5px;
|
|
103
103
|
}
|
|
@@ -962,7 +962,8 @@ body.is-fullscreen-mode .edit-widgets-notices__snackbar {
|
|
|
962
962
|
.edit-widgets-welcome-guide__image > img {
|
|
963
963
|
display: block;
|
|
964
964
|
max-width: 100%;
|
|
965
|
-
object-fit: cover;
|
|
965
|
+
-o-object-fit: cover;
|
|
966
|
+
object-fit: cover;
|
|
966
967
|
}
|
|
967
968
|
.edit-widgets-welcome-guide__heading {
|
|
968
969
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
@@ -1221,7 +1222,7 @@ body.admin-color-light {
|
|
|
1221
1222
|
--wp-admin-theme-color-darker-20--rgb: 0, 97, 135;
|
|
1222
1223
|
--wp-admin-border-width-focus: 2px;
|
|
1223
1224
|
}
|
|
1224
|
-
@media (min-resolution: 192dpi) {
|
|
1225
|
+
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
|
|
1225
1226
|
body.admin-color-light {
|
|
1226
1227
|
--wp-admin-border-width-focus: 1.5px;
|
|
1227
1228
|
}
|
|
@@ -1236,7 +1237,7 @@ body.admin-color-modern {
|
|
|
1236
1237
|
--wp-admin-theme-color-darker-20--rgb: 24, 58, 214;
|
|
1237
1238
|
--wp-admin-border-width-focus: 2px;
|
|
1238
1239
|
}
|
|
1239
|
-
@media (min-resolution: 192dpi) {
|
|
1240
|
+
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
|
|
1240
1241
|
body.admin-color-modern {
|
|
1241
1242
|
--wp-admin-border-width-focus: 1.5px;
|
|
1242
1243
|
}
|
|
@@ -1251,7 +1252,7 @@ body.admin-color-blue {
|
|
|
1251
1252
|
--wp-admin-theme-color-darker-20--rgb: 6, 64, 84;
|
|
1252
1253
|
--wp-admin-border-width-focus: 2px;
|
|
1253
1254
|
}
|
|
1254
|
-
@media (min-resolution: 192dpi) {
|
|
1255
|
+
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
|
|
1255
1256
|
body.admin-color-blue {
|
|
1256
1257
|
--wp-admin-border-width-focus: 1.5px;
|
|
1257
1258
|
}
|
|
@@ -1266,7 +1267,7 @@ body.admin-color-coffee {
|
|
|
1266
1267
|
--wp-admin-theme-color-darker-20--rgb: 43, 39, 36;
|
|
1267
1268
|
--wp-admin-border-width-focus: 2px;
|
|
1268
1269
|
}
|
|
1269
|
-
@media (min-resolution: 192dpi) {
|
|
1270
|
+
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
|
|
1270
1271
|
body.admin-color-coffee {
|
|
1271
1272
|
--wp-admin-border-width-focus: 1.5px;
|
|
1272
1273
|
}
|
|
@@ -1281,7 +1282,7 @@ body.admin-color-ectoplasm {
|
|
|
1281
1282
|
--wp-admin-theme-color-darker-20--rgb: 58, 44, 77;
|
|
1282
1283
|
--wp-admin-border-width-focus: 2px;
|
|
1283
1284
|
}
|
|
1284
|
-
@media (min-resolution: 192dpi) {
|
|
1285
|
+
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
|
|
1285
1286
|
body.admin-color-ectoplasm {
|
|
1286
1287
|
--wp-admin-border-width-focus: 1.5px;
|
|
1287
1288
|
}
|
|
@@ -1296,7 +1297,7 @@ body.admin-color-midnight {
|
|
|
1296
1297
|
--wp-admin-theme-color-darker-20--rgb: 208, 44, 33;
|
|
1297
1298
|
--wp-admin-border-width-focus: 2px;
|
|
1298
1299
|
}
|
|
1299
|
-
@media (min-resolution: 192dpi) {
|
|
1300
|
+
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
|
|
1300
1301
|
body.admin-color-midnight {
|
|
1301
1302
|
--wp-admin-border-width-focus: 1.5px;
|
|
1302
1303
|
}
|
|
@@ -1311,7 +1312,7 @@ body.admin-color-ocean {
|
|
|
1311
1312
|
--wp-admin-theme-color-darker-20--rgb: 76, 96, 102;
|
|
1312
1313
|
--wp-admin-border-width-focus: 2px;
|
|
1313
1314
|
}
|
|
1314
|
-
@media (min-resolution: 192dpi) {
|
|
1315
|
+
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
|
|
1315
1316
|
body.admin-color-ocean {
|
|
1316
1317
|
--wp-admin-border-width-focus: 1.5px;
|
|
1317
1318
|
}
|
|
@@ -1326,7 +1327,7 @@ body.admin-color-sunrise {
|
|
|
1326
1327
|
--wp-admin-theme-color-darker-20--rgb: 195, 105, 34;
|
|
1327
1328
|
--wp-admin-border-width-focus: 2px;
|
|
1328
1329
|
}
|
|
1329
|
-
@media (min-resolution: 192dpi) {
|
|
1330
|
+
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
|
|
1330
1331
|
body.admin-color-sunrise {
|
|
1331
1332
|
--wp-admin-border-width-focus: 1.5px;
|
|
1332
1333
|
}
|
package/build-style/style.css
CHANGED
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
--wp-block-synced-color: #7a00df;
|
|
98
98
|
--wp-block-synced-color--rgb: 122, 0, 223;
|
|
99
99
|
}
|
|
100
|
-
@media (min-resolution: 192dpi) {
|
|
100
|
+
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
|
|
101
101
|
:root {
|
|
102
102
|
--wp-admin-border-width-focus: 1.5px;
|
|
103
103
|
}
|
|
@@ -962,7 +962,8 @@ body.is-fullscreen-mode .edit-widgets-notices__snackbar {
|
|
|
962
962
|
.edit-widgets-welcome-guide__image > img {
|
|
963
963
|
display: block;
|
|
964
964
|
max-width: 100%;
|
|
965
|
-
object-fit: cover;
|
|
965
|
+
-o-object-fit: cover;
|
|
966
|
+
object-fit: cover;
|
|
966
967
|
}
|
|
967
968
|
.edit-widgets-welcome-guide__heading {
|
|
968
969
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
@@ -1221,7 +1222,7 @@ body.admin-color-light {
|
|
|
1221
1222
|
--wp-admin-theme-color-darker-20--rgb: 0, 97, 135;
|
|
1222
1223
|
--wp-admin-border-width-focus: 2px;
|
|
1223
1224
|
}
|
|
1224
|
-
@media (min-resolution: 192dpi) {
|
|
1225
|
+
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
|
|
1225
1226
|
body.admin-color-light {
|
|
1226
1227
|
--wp-admin-border-width-focus: 1.5px;
|
|
1227
1228
|
}
|
|
@@ -1236,7 +1237,7 @@ body.admin-color-modern {
|
|
|
1236
1237
|
--wp-admin-theme-color-darker-20--rgb: 24, 58, 214;
|
|
1237
1238
|
--wp-admin-border-width-focus: 2px;
|
|
1238
1239
|
}
|
|
1239
|
-
@media (min-resolution: 192dpi) {
|
|
1240
|
+
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
|
|
1240
1241
|
body.admin-color-modern {
|
|
1241
1242
|
--wp-admin-border-width-focus: 1.5px;
|
|
1242
1243
|
}
|
|
@@ -1251,7 +1252,7 @@ body.admin-color-blue {
|
|
|
1251
1252
|
--wp-admin-theme-color-darker-20--rgb: 6, 64, 84;
|
|
1252
1253
|
--wp-admin-border-width-focus: 2px;
|
|
1253
1254
|
}
|
|
1254
|
-
@media (min-resolution: 192dpi) {
|
|
1255
|
+
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
|
|
1255
1256
|
body.admin-color-blue {
|
|
1256
1257
|
--wp-admin-border-width-focus: 1.5px;
|
|
1257
1258
|
}
|
|
@@ -1266,7 +1267,7 @@ body.admin-color-coffee {
|
|
|
1266
1267
|
--wp-admin-theme-color-darker-20--rgb: 43, 39, 36;
|
|
1267
1268
|
--wp-admin-border-width-focus: 2px;
|
|
1268
1269
|
}
|
|
1269
|
-
@media (min-resolution: 192dpi) {
|
|
1270
|
+
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
|
|
1270
1271
|
body.admin-color-coffee {
|
|
1271
1272
|
--wp-admin-border-width-focus: 1.5px;
|
|
1272
1273
|
}
|
|
@@ -1281,7 +1282,7 @@ body.admin-color-ectoplasm {
|
|
|
1281
1282
|
--wp-admin-theme-color-darker-20--rgb: 58, 44, 77;
|
|
1282
1283
|
--wp-admin-border-width-focus: 2px;
|
|
1283
1284
|
}
|
|
1284
|
-
@media (min-resolution: 192dpi) {
|
|
1285
|
+
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
|
|
1285
1286
|
body.admin-color-ectoplasm {
|
|
1286
1287
|
--wp-admin-border-width-focus: 1.5px;
|
|
1287
1288
|
}
|
|
@@ -1296,7 +1297,7 @@ body.admin-color-midnight {
|
|
|
1296
1297
|
--wp-admin-theme-color-darker-20--rgb: 208, 44, 33;
|
|
1297
1298
|
--wp-admin-border-width-focus: 2px;
|
|
1298
1299
|
}
|
|
1299
|
-
@media (min-resolution: 192dpi) {
|
|
1300
|
+
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
|
|
1300
1301
|
body.admin-color-midnight {
|
|
1301
1302
|
--wp-admin-border-width-focus: 1.5px;
|
|
1302
1303
|
}
|
|
@@ -1311,7 +1312,7 @@ body.admin-color-ocean {
|
|
|
1311
1312
|
--wp-admin-theme-color-darker-20--rgb: 76, 96, 102;
|
|
1312
1313
|
--wp-admin-border-width-focus: 2px;
|
|
1313
1314
|
}
|
|
1314
|
-
@media (min-resolution: 192dpi) {
|
|
1315
|
+
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
|
|
1315
1316
|
body.admin-color-ocean {
|
|
1316
1317
|
--wp-admin-border-width-focus: 1.5px;
|
|
1317
1318
|
}
|
|
@@ -1326,7 +1327,7 @@ body.admin-color-sunrise {
|
|
|
1326
1327
|
--wp-admin-theme-color-darker-20--rgb: 195, 105, 34;
|
|
1327
1328
|
--wp-admin-border-width-focus: 2px;
|
|
1328
1329
|
}
|
|
1329
|
-
@media (min-resolution: 192dpi) {
|
|
1330
|
+
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
|
|
1330
1331
|
body.admin-color-sunrise {
|
|
1331
1332
|
--wp-admin-border-width-focus: 1.5px;
|
|
1332
1333
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/edit-widgets",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.20.1",
|
|
4
4
|
"description": "Widgets Page module for WordPress..",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -27,32 +27,32 @@
|
|
|
27
27
|
"react-native": "src/index",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@babel/runtime": "^7.16.0",
|
|
30
|
-
"@wordpress/api-fetch": "^6.
|
|
31
|
-
"@wordpress/block-editor": "^12.
|
|
32
|
-
"@wordpress/block-library": "^8.
|
|
33
|
-
"@wordpress/blocks": "^12.
|
|
34
|
-
"@wordpress/components": "^25.
|
|
35
|
-
"@wordpress/compose": "^6.
|
|
36
|
-
"@wordpress/core-data": "^6.
|
|
37
|
-
"@wordpress/data": "^9.
|
|
38
|
-
"@wordpress/deprecated": "^3.
|
|
39
|
-
"@wordpress/dom": "^3.
|
|
40
|
-
"@wordpress/element": "^5.
|
|
41
|
-
"@wordpress/hooks": "^3.
|
|
42
|
-
"@wordpress/i18n": "^4.
|
|
43
|
-
"@wordpress/icons": "^9.
|
|
44
|
-
"@wordpress/interface": "^5.
|
|
45
|
-
"@wordpress/keyboard-shortcuts": "^4.
|
|
46
|
-
"@wordpress/keycodes": "^3.
|
|
47
|
-
"@wordpress/media-utils": "^4.
|
|
48
|
-
"@wordpress/notices": "^4.
|
|
49
|
-
"@wordpress/patterns": "^1.
|
|
50
|
-
"@wordpress/plugins": "^6.
|
|
51
|
-
"@wordpress/preferences": "^3.
|
|
52
|
-
"@wordpress/private-apis": "^0.
|
|
53
|
-
"@wordpress/reusable-blocks": "^4.
|
|
54
|
-
"@wordpress/url": "^3.
|
|
55
|
-
"@wordpress/widgets": "^3.
|
|
30
|
+
"@wordpress/api-fetch": "^6.40.0",
|
|
31
|
+
"@wordpress/block-editor": "^12.11.1",
|
|
32
|
+
"@wordpress/block-library": "^8.20.1",
|
|
33
|
+
"@wordpress/blocks": "^12.20.1",
|
|
34
|
+
"@wordpress/components": "^25.9.1",
|
|
35
|
+
"@wordpress/compose": "^6.20.0",
|
|
36
|
+
"@wordpress/core-data": "^6.20.1",
|
|
37
|
+
"@wordpress/data": "^9.13.1",
|
|
38
|
+
"@wordpress/deprecated": "^3.43.0",
|
|
39
|
+
"@wordpress/dom": "^3.43.0",
|
|
40
|
+
"@wordpress/element": "^5.20.0",
|
|
41
|
+
"@wordpress/hooks": "^3.43.0",
|
|
42
|
+
"@wordpress/i18n": "^4.43.0",
|
|
43
|
+
"@wordpress/icons": "^9.34.0",
|
|
44
|
+
"@wordpress/interface": "^5.20.1",
|
|
45
|
+
"@wordpress/keyboard-shortcuts": "^4.20.1",
|
|
46
|
+
"@wordpress/keycodes": "^3.43.0",
|
|
47
|
+
"@wordpress/media-utils": "^4.34.0",
|
|
48
|
+
"@wordpress/notices": "^4.11.1",
|
|
49
|
+
"@wordpress/patterns": "^1.4.1",
|
|
50
|
+
"@wordpress/plugins": "^6.11.1",
|
|
51
|
+
"@wordpress/preferences": "^3.20.1",
|
|
52
|
+
"@wordpress/private-apis": "^0.25.0",
|
|
53
|
+
"@wordpress/reusable-blocks": "^4.20.1",
|
|
54
|
+
"@wordpress/url": "^3.44.0",
|
|
55
|
+
"@wordpress/widgets": "^3.20.1",
|
|
56
56
|
"classnames": "^2.3.1"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"publishConfig": {
|
|
63
63
|
"access": "public"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "e17f760ed0dc11cce78157d7c2f2086b1b3c09d8"
|
|
66
66
|
}
|
|
@@ -16,7 +16,7 @@ import { store as editWidgetsStore } from '../../store';
|
|
|
16
16
|
* This is a duplicate of the component implemented in the editor package.
|
|
17
17
|
* Duplicated here as edit-widgets doesn't depend on editor.
|
|
18
18
|
*
|
|
19
|
-
* @return {
|
|
19
|
+
* @return {Component} The component.
|
|
20
20
|
*/
|
|
21
21
|
export default function UnsavedChangesWarning() {
|
|
22
22
|
const isDirty = useSelect( ( select ) => {
|