@wordpress/edit-widgets 6.33.4 → 6.34.1-next.2f1c7c01b.0
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 +4 -2
- package/build/blocks/widget-area/edit/index.js.map +1 -1
- package/build/blocks/widget-area/edit/inner-blocks.js +3 -1
- package/build/blocks/widget-area/edit/inner-blocks.js.map +1 -1
- package/build/blocks/widget-area/edit/use-is-dragging-within.js +3 -1
- package/build/blocks/widget-area/edit/use-is-dragging-within.js.map +1 -1
- package/build/blocks/widget-area/index.js +4 -2
- package/build/blocks/widget-area/index.js.map +1 -1
- package/build/components/error-boundary/index.js +5 -3
- package/build/components/error-boundary/index.js.map +1 -1
- package/build/components/header/document-tools/index.js +3 -1
- package/build/components/header/document-tools/index.js.map +1 -1
- package/build/components/header/index.js +3 -1
- package/build/components/header/index.js.map +1 -1
- package/build/components/header/undo-redo/redo.js +3 -1
- package/build/components/header/undo-redo/redo.js.map +1 -1
- package/build/components/header/undo-redo/undo.js +3 -1
- package/build/components/header/undo-redo/undo.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/config.js +3 -1
- package/build/components/keyboard-shortcut-help-modal/config.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +3 -1
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/index.js +6 -4
- package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/shortcut.js +3 -1
- package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
- package/build/components/keyboard-shortcuts/index.js +2 -0
- package/build/components/keyboard-shortcuts/index.js.map +1 -1
- package/build/components/layout/index.js +3 -1
- package/build/components/layout/index.js.map +1 -1
- package/build/components/layout/interface.js +4 -2
- package/build/components/layout/interface.js.map +1 -1
- package/build/components/layout/unsaved-changes-warning.js +2 -0
- package/build/components/layout/unsaved-changes-warning.js.map +1 -1
- package/build/components/more-menu/index.js +3 -1
- package/build/components/more-menu/index.js.map +1 -1
- package/build/components/more-menu/tools-more-menu-group.js +4 -2
- package/build/components/more-menu/tools-more-menu-group.js.map +1 -1
- package/build/components/notices/index.js +4 -2
- package/build/components/notices/index.js.map +1 -1
- package/build/components/save-button/index.js +3 -1
- package/build/components/save-button/index.js.map +1 -1
- package/build/components/secondary-sidebar/index.js +3 -1
- package/build/components/secondary-sidebar/index.js.map +1 -1
- package/build/components/secondary-sidebar/inserter-sidebar.js +3 -1
- package/build/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
- package/build/components/secondary-sidebar/list-view-sidebar.js +3 -1
- package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build/components/sidebar/index.js +7 -5
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/sidebar/widget-areas.js +3 -1
- package/build/components/sidebar/widget-areas.js.map +1 -1
- package/build/components/welcome-guide/index.js +3 -1
- package/build/components/welcome-guide/index.js.map +1 -1
- package/build/components/widget-areas-block-editor-content/index.js +3 -1
- package/build/components/widget-areas-block-editor-content/index.js.map +1 -1
- package/build/components/widget-areas-block-editor-provider/index.js +7 -5
- package/build/components/widget-areas-block-editor-provider/index.js.map +1 -1
- package/build/constants.js +4 -2
- package/build/constants.js.map +1 -1
- package/build/filters/index.js +1 -0
- package/build/filters/index.js.map +1 -1
- package/build/filters/move-to-widget-area.js +3 -2
- package/build/filters/move-to-widget-area.js.map +1 -1
- package/build/filters/replace-media-upload.js +15 -1
- package/build/filters/replace-media-upload.js.map +3 -3
- package/build/hooks/use-last-selected-widget-area.js +3 -1
- package/build/hooks/use-last-selected-widget-area.js.map +1 -1
- package/build/hooks/use-widget-library-insertion-point.js +3 -1
- package/build/hooks/use-widget-library-insertion-point.js.map +1 -1
- package/build/index.js +6 -4
- package/build/index.js.map +1 -1
- package/build/lock-unlock.js +3 -1
- package/build/lock-unlock.js.map +1 -1
- package/build/store/actions.js +9 -7
- package/build/store/actions.js.map +1 -1
- package/build/store/constants.js +3 -1
- package/build/store/constants.js.map +1 -1
- package/build/store/index.js +4 -2
- package/build/store/index.js.map +1 -1
- package/build/store/private-selectors.js +2 -0
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.js +2 -0
- package/build/store/reducer.js.map +1 -1
- package/build/store/resolvers.js +4 -2
- package/build/store/resolvers.js.map +1 -1
- package/build/store/selectors.js +13 -11
- package/build/store/selectors.js.map +1 -1
- package/build/store/transformers.js +2 -0
- package/build/store/transformers.js.map +1 -1
- package/build/store/utils.js +8 -6
- package/build/store/utils.js.map +1 -1
- package/build-module/blocks/widget-area/edit/index.js +3 -2
- package/build-module/blocks/widget-area/edit/index.js.map +1 -1
- package/build-module/blocks/widget-area/edit/inner-blocks.js +2 -1
- package/build-module/blocks/widget-area/edit/inner-blocks.js.map +1 -1
- package/build-module/blocks/widget-area/edit/use-is-dragging-within.js +2 -1
- package/build-module/blocks/widget-area/edit/use-is-dragging-within.js.map +1 -1
- package/build-module/blocks/widget-area/index.js +3 -2
- package/build-module/blocks/widget-area/index.js.map +1 -1
- package/build-module/components/error-boundary/index.js +4 -3
- package/build-module/components/error-boundary/index.js.map +1 -1
- package/build-module/components/header/document-tools/index.js +2 -1
- package/build-module/components/header/document-tools/index.js.map +1 -1
- package/build-module/components/header/index.js +2 -1
- package/build-module/components/header/index.js.map +1 -1
- package/build-module/components/header/undo-redo/redo.js +2 -1
- package/build-module/components/header/undo-redo/redo.js.map +1 -1
- package/build-module/components/header/undo-redo/undo.js +2 -1
- package/build-module/components/header/undo-redo/undo.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/config.js +2 -1
- package/build-module/components/keyboard-shortcut-help-modal/config.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +2 -1
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/index.js +5 -4
- package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +5 -4
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/index.js +1 -0
- package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
- package/build-module/components/layout/index.js +2 -1
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/layout/interface.js +3 -2
- package/build-module/components/layout/interface.js.map +1 -1
- package/build-module/components/layout/unsaved-changes-warning.js +1 -0
- package/build-module/components/layout/unsaved-changes-warning.js.map +1 -1
- package/build-module/components/more-menu/index.js +2 -1
- package/build-module/components/more-menu/index.js.map +1 -1
- package/build-module/components/more-menu/tools-more-menu-group.js +3 -2
- package/build-module/components/more-menu/tools-more-menu-group.js.map +1 -1
- package/build-module/components/notices/index.js +3 -2
- package/build-module/components/notices/index.js.map +1 -1
- package/build-module/components/save-button/index.js +2 -1
- package/build-module/components/save-button/index.js.map +1 -1
- package/build-module/components/secondary-sidebar/index.js +2 -1
- package/build-module/components/secondary-sidebar/index.js.map +1 -1
- package/build-module/components/secondary-sidebar/inserter-sidebar.js +2 -1
- package/build-module/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
- package/build-module/components/secondary-sidebar/list-view-sidebar.js +2 -1
- package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build-module/components/sidebar/index.js +9 -8
- package/build-module/components/sidebar/index.js.map +1 -1
- package/build-module/components/sidebar/widget-areas.js +2 -1
- package/build-module/components/sidebar/widget-areas.js.map +1 -1
- package/build-module/components/welcome-guide/index.js +2 -1
- package/build-module/components/welcome-guide/index.js.map +1 -1
- package/build-module/components/widget-areas-block-editor-content/index.js +2 -1
- package/build-module/components/widget-areas-block-editor-content/index.js.map +1 -1
- package/build-module/components/widget-areas-block-editor-provider/index.js +6 -5
- package/build-module/components/widget-areas-block-editor-provider/index.js.map +1 -1
- package/build-module/constants.js +3 -2
- package/build-module/constants.js.map +1 -1
- package/build-module/filters/index.js +1 -0
- package/build-module/filters/index.js.map +1 -1
- package/build-module/filters/move-to-widget-area.js +3 -2
- package/build-module/filters/move-to-widget-area.js.map +1 -1
- package/build-module/filters/replace-media-upload.js +19 -2
- package/build-module/filters/replace-media-upload.js.map +2 -2
- package/build-module/hooks/use-last-selected-widget-area.js +2 -1
- package/build-module/hooks/use-last-selected-widget-area.js.map +1 -1
- package/build-module/hooks/use-widget-library-insertion-point.js +2 -1
- package/build-module/hooks/use-widget-library-insertion-point.js.map +1 -1
- package/build-module/index.js +6 -5
- package/build-module/index.js.map +1 -1
- package/build-module/lock-unlock.js +2 -1
- package/build-module/lock-unlock.js.map +1 -1
- package/build-module/store/actions.js +8 -7
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/constants.js +2 -1
- package/build-module/store/constants.js.map +1 -1
- package/build-module/store/index.js +3 -2
- package/build-module/store/index.js.map +1 -1
- package/build-module/store/private-selectors.js +1 -0
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/reducer.js +1 -0
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/resolvers.js +3 -2
- package/build-module/store/resolvers.js.map +1 -1
- package/build-module/store/selectors.js +12 -11
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/store/transformers.js +1 -0
- package/build-module/store/transformers.js.map +1 -1
- package/build-module/store/utils.js +7 -6
- package/build-module/store/utils.js.map +1 -1
- package/build-style/style-rtl.css +2 -2
- package/build-style/style.css +2 -2
- package/package.json +29 -29
- package/src/filters/replace-media-upload.js +24 -1
|
@@ -25,12 +25,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
25
25
|
mod
|
|
26
26
|
));
|
|
27
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// packages/edit-widgets/src/components/layout/index.js
|
|
28
30
|
var layout_exports = {};
|
|
29
31
|
__export(layout_exports, {
|
|
30
32
|
default: () => layout_default
|
|
31
33
|
});
|
|
32
34
|
module.exports = __toCommonJS(layout_exports);
|
|
33
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
35
|
var import_i18n = require("@wordpress/i18n");
|
|
35
36
|
var import_data = require("@wordpress/data");
|
|
36
37
|
var import_plugins = require("@wordpress/plugins");
|
|
@@ -42,6 +43,7 @@ var import_sidebar = __toESM(require("../sidebar"));
|
|
|
42
43
|
var import_interface = __toESM(require("./interface"));
|
|
43
44
|
var import_unsaved_changes_warning = __toESM(require("./unsaved-changes-warning"));
|
|
44
45
|
var import_welcome_guide = __toESM(require("../welcome-guide"));
|
|
46
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
45
47
|
function Layout({ blockEditorSettings }) {
|
|
46
48
|
const { createErrorNotice } = (0, import_data.useDispatch)(import_notices.store);
|
|
47
49
|
function onPluginAreaError(name) {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/layout/index.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useDispatch } from '@wordpress/data';\nimport { PluginArea } from '@wordpress/plugins';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { __unstableUseNavigateRegions as useNavigateRegions } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport ErrorBoundary from '../error-boundary';\nimport WidgetAreasBlockEditorProvider from '../widget-areas-block-editor-provider';\nimport Sidebar from '../sidebar';\nimport Interface from './interface';\nimport UnsavedChangesWarning from './unsaved-changes-warning';\nimport WelcomeGuide from '../welcome-guide';\n\nfunction Layout( { blockEditorSettings } ) {\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\n\tfunction onPluginAreaError( name ) {\n\t\tcreateErrorNotice(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %s: plugin name */\n\t\t\t\t__(\n\t\t\t\t\t'The \"%s\" plugin has encountered an error and cannot be rendered.'\n\t\t\t\t),\n\t\t\t\tname\n\t\t\t)\n\t\t);\n\t}\n\n\tconst navigateRegionsProps = useNavigateRegions();\n\n\treturn (\n\t\t<ErrorBoundary>\n\t\t\t<div\n\t\t\t\tclassName={ navigateRegionsProps.className }\n\t\t\t\t{ ...navigateRegionsProps }\n\t\t\t\tref={ navigateRegionsProps.ref }\n\t\t\t>\n\t\t\t\t<WidgetAreasBlockEditorProvider\n\t\t\t\t\tblockEditorSettings={ blockEditorSettings }\n\t\t\t\t>\n\t\t\t\t\t<Interface blockEditorSettings={ blockEditorSettings } />\n\t\t\t\t\t<Sidebar />\n\t\t\t\t\t<PluginArea onError={ onPluginAreaError } />\n\t\t\t\t\t<UnsavedChangesWarning />\n\t\t\t\t\t<WelcomeGuide />\n\t\t\t\t</WidgetAreasBlockEditorProvider>\n\t\t\t</div>\n\t\t</ErrorBoundary>\n\t);\n}\n\nexport default Layout;\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAA4B;AAC5B,kBAA4B;AAC5B,qBAA2B;AAC3B,qBAAsC;AACtC,wBAAmE;AAKnE,4BAA0B;AAC1B,gDAA2C;AAC3C,qBAAoB;AACpB,uBAAsB;AACtB,qCAAkC;AAClC,2BAAyB;AA0BrB;AAxBJ,SAAS,OAAQ,EAAE,oBAAoB,GAAI;AAC1C,QAAM,EAAE,kBAAkB,QAAI,yBAAa,eAAAA,KAAa;AAExD,WAAS,kBAAmB,MAAO;AAClC;AAAA,UACC;AAAA;AAAA,YAEC;AAAA,UACC;AAAA,QACD;AAAA,QACA;AAAA,MACD;AAAA,IACD;AAAA,EACD;AAEA,QAAM,2BAAuB,kBAAAC,8BAAmB;AAEhD,SACC,4CAAC,sBAAAC,SAAA,EACA;AAAA,IAAC;AAAA;AAAA,MACA,WAAY,qBAAqB;AAAA,MAC/B,GAAG;AAAA,MACL,KAAM,qBAAqB;AAAA,MAE3B;AAAA,QAAC,0CAAAC;AAAA,QAAA;AAAA,UACA;AAAA,UAEA;AAAA,wDAAC,iBAAAC,SAAA,EAAU,qBAA4C;AAAA,YACvD,4CAAC,eAAAC,SAAA,EAAQ;AAAA,YACT,4CAAC,6BAAW,SAAU,mBAAoB;AAAA,YAC1C,4CAAC,+BAAAC,SAAA,EAAsB;AAAA,YACvB,4CAAC,qBAAAC,SAAA,EAAa;AAAA;AAAA;AAAA,MACf;AAAA;AAAA,EACD,GACD;AAEF;AAEA,IAAO,iBAAQ;",
|
|
6
6
|
"names": ["noticesStore", "useNavigateRegions", "ErrorBoundary", "WidgetAreasBlockEditorProvider", "Interface", "Sidebar", "UnsavedChangesWarning", "WelcomeGuide"]
|
|
7
7
|
}
|
|
@@ -25,12 +25,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
25
25
|
mod
|
|
26
26
|
));
|
|
27
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// packages/edit-widgets/src/components/layout/interface.js
|
|
28
30
|
var interface_exports = {};
|
|
29
31
|
__export(interface_exports, {
|
|
30
32
|
default: () => interface_default
|
|
31
33
|
});
|
|
32
34
|
module.exports = __toCommonJS(interface_exports);
|
|
33
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
35
|
var import_compose = require("@wordpress/compose");
|
|
35
36
|
var import_block_editor = require("@wordpress/block-editor");
|
|
36
37
|
var import_element = require("@wordpress/element");
|
|
@@ -42,7 +43,8 @@ var import_header = __toESM(require("../header"));
|
|
|
42
43
|
var import_widget_areas_block_editor_content = __toESM(require("../widget-areas-block-editor-content"));
|
|
43
44
|
var import_store = require("../../store");
|
|
44
45
|
var import_secondary_sidebar = __toESM(require("../secondary-sidebar"));
|
|
45
|
-
|
|
46
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
47
|
+
var interfaceLabels = {
|
|
46
48
|
/* translators: accessibility text for the widgets screen top bar landmark region. */
|
|
47
49
|
header: (0, import_i18n.__)("Widgets top bar"),
|
|
48
50
|
/* translators: accessibility text for the widgets screen content landmark region. */
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/layout/interface.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport { BlockBreadcrumb } from '@wordpress/block-editor';\nimport { useEffect } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tInterfaceSkeleton,\n\tComplementaryArea,\n\tstore as interfaceStore,\n} from '@wordpress/interface';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport Header from '../header';\nimport WidgetAreasBlockEditorContent from '../widget-areas-block-editor-content';\nimport { store as editWidgetsStore } from '../../store';\nimport SecondarySidebar from '../secondary-sidebar';\n\nconst interfaceLabels = {\n\t/* translators: accessibility text for the widgets screen top bar landmark region. */\n\theader: __( 'Widgets top bar' ),\n\t/* translators: accessibility text for the widgets screen content landmark region. */\n\tbody: __( 'Widgets and blocks' ),\n\t/* translators: accessibility text for the widgets screen settings landmark region. */\n\tsidebar: __( 'Widgets settings' ),\n\t/* translators: accessibility text for the widgets screen footer landmark region. */\n\tfooter: __( 'Widgets footer' ),\n};\n\nfunction Interface( { blockEditorSettings } ) {\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst isHugeViewport = useViewportMatch( 'huge', '>=' );\n\tconst { setIsInserterOpened, setIsListViewOpened, closeGeneralSidebar } =\n\t\tuseDispatch( editWidgetsStore );\n\tconst {\n\t\thasBlockBreadCrumbsEnabled,\n\t\thasSidebarEnabled,\n\t\tisInserterOpened,\n\t\tisListViewOpened,\n\t} = useSelect(\n\t\t( select ) => ( {\n\t\t\thasSidebarEnabled: !! select(\n\t\t\t\tinterfaceStore\n\t\t\t).getActiveComplementaryArea( editWidgetsStore.name ),\n\t\t\tisInserterOpened: !! select( editWidgetsStore ).isInserterOpened(),\n\t\t\tisListViewOpened: !! select( editWidgetsStore ).isListViewOpened(),\n\t\t\thasBlockBreadCrumbsEnabled: !! select( preferencesStore ).get(\n\t\t\t\t'core/edit-widgets',\n\t\t\t\t'showBlockBreadcrumbs'\n\t\t\t),\n\t\t} ),\n\t\t[]\n\t);\n\n\t// Inserter and Sidebars are mutually exclusive\n\tuseEffect( () => {\n\t\tif ( hasSidebarEnabled && ! isHugeViewport ) {\n\t\t\tsetIsInserterOpened( false );\n\t\t\tsetIsListViewOpened( false );\n\t\t}\n\t}, [ hasSidebarEnabled, isHugeViewport ] );\n\n\tuseEffect( () => {\n\t\tif ( ( isInserterOpened || isListViewOpened ) && ! isHugeViewport ) {\n\t\t\tcloseGeneralSidebar();\n\t\t}\n\t}, [ isInserterOpened, isListViewOpened, isHugeViewport ] );\n\n\tconst secondarySidebarLabel = isListViewOpened\n\t\t? __( 'List View' )\n\t\t: __( 'Block Library' );\n\n\tconst hasSecondarySidebar = isListViewOpened || isInserterOpened;\n\n\treturn (\n\t\t<InterfaceSkeleton\n\t\t\tlabels={ {\n\t\t\t\t...interfaceLabels,\n\t\t\t\tsecondarySidebar: secondarySidebarLabel,\n\t\t\t} }\n\t\t\theader={ <Header /> }\n\t\t\tsecondarySidebar={ hasSecondarySidebar && <SecondarySidebar /> }\n\t\t\tsidebar={ <ComplementaryArea.Slot scope=\"core/edit-widgets\" /> }\n\t\t\tcontent={\n\t\t\t\t<>\n\t\t\t\t\t<WidgetAreasBlockEditorContent\n\t\t\t\t\t\tblockEditorSettings={ blockEditorSettings }\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t}\n\t\t\tfooter={\n\t\t\t\thasBlockBreadCrumbsEnabled &&\n\t\t\t\t! isMobileViewport && (\n\t\t\t\t\t<div className=\"ed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AAA,MACD;AAAA,IACD;AAAA,IACA,CAAC;AAAA,EACF;AAGA,gCAAW,MAAM;AAChB,QAAK,qBAAqB,CAAE,gBAAiB;AAC5C,0BAAqB,KAAM;AAC3B,0BAAqB,KAAM;AAAA,IAC5B;AAAA,EACD,GAAG,CAAE,mBAAmB,cAAe,CAAE;AAEzC,gCAAW,MAAM;AAChB,SAAO,oBAAoB,qBAAsB,CAAE,gBAAiB;AACnE,0BAAoB;AAAA,IACrB;AAAA,EACD,GAAG,CAAE,kBAAkB,kBAAkB,cAAe,CAAE;AAE1D,QAAM,wBAAwB,uBAC3B,gBAAI,WAAY,QAChB,gBAAI,eAAgB;AAEvB,QAAM,sBAAsB,oBAAoB;AAEhD,SACC;AAAA,IAAC;AAAA;AAAA,MACA,QAAS;AAAA,QACR,GAAG;AAAA,QACH,kBAAkB;AAAA,MACnB;AAAA,MACA,QAAS,4CAAC,cAAAC,SAAA,EAAO;AAAA,MACjB,kBAAmB,uBAAuB,4CAAC,yBAAAC,SAAA,EAAiB;AAAA,MAC5D,SAAU,4CAAC,mCAAkB,MAAlB,EAAuB,OAAM,qBAAoB;AAAA,MAC5D,SACC,2EACC;AAAA,QAAC,yCAAAC;AAAA,QAAA;AAAA,UACA;AAAA;AAAA,MACD,GACD;AAAA,MAED,QACC,8BACA,CAAE,oBACD,4CAAC,SAAI,WAAU,+BACd,sDAAC,uCAAgB,mBAAgB,gBAAI,SAAU,GAAI,GACpD;AAAA;AAAA,EAGH;AAEF;AAEA,IAAO,oBAAQ;",
|
|
6
6
|
"names": ["editWidgetsStore", "interfaceStore", "preferencesStore", "Header", "SecondarySidebar", "WidgetAreasBlockEditorContent"]
|
|
7
7
|
}
|
|
@@ -15,6 +15,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
15
|
return to;
|
|
16
16
|
};
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// packages/edit-widgets/src/components/layout/unsaved-changes-warning.js
|
|
18
20
|
var unsaved_changes_warning_exports = {};
|
|
19
21
|
__export(unsaved_changes_warning_exports, {
|
|
20
22
|
default: () => UnsavedChangesWarning
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/layout/unsaved-changes-warning.js"],
|
|
4
4
|
"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"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAmB;AACnB,qBAA0B;AAC1B,kBAA0B;AAK1B,mBAA0C;AAU3B,SAAR,wBAAyC;AAC/C,QAAM,cAAU,uBAAW,CAAE,WAAY;AACxC,UAAM,EAAE,qBAAqB,IAAI,OAAQ,aAAAA,KAAiB;AAC1D,UAAM,oBAAoB,qBAAqB;AAE/C,WAAO,mBAAmB,SAAS;AAAA,EACpC,GAAG,CAAC,CAAE;AAEN,gCAAW,MAAM;AAQhB,UAAM,uBAAuB,CAAE,UAAW;AACzC,UAAK,SAAU;AACd,cAAM,kBAAc;AAAA,UACnB;AAAA,QACD;AACA,eAAO,MAAM;AAAA,MACd;AAAA,IACD;AAEA,WAAO,iBAAkB,gBAAgB,oBAAqB;AAE9D,WAAO,MAAM;AACZ,aAAO,oBAAqB,gBAAgB,oBAAqB;AAAA,IAClE;AAAA,EACD,GAAG,CAAE,OAAQ,CAAE;AAEf,SAAO;AACR;",
|
|
6
6
|
"names": ["editWidgetsStore"]
|
|
7
7
|
}
|
|
@@ -25,12 +25,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
25
25
|
mod
|
|
26
26
|
));
|
|
27
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// packages/edit-widgets/src/components/more-menu/index.js
|
|
28
30
|
var more_menu_exports = {};
|
|
29
31
|
__export(more_menu_exports, {
|
|
30
32
|
default: () => MoreMenu
|
|
31
33
|
});
|
|
32
34
|
module.exports = __toCommonJS(more_menu_exports);
|
|
33
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
35
|
var import_components = require("@wordpress/components");
|
|
35
36
|
var import_element = require("@wordpress/element");
|
|
36
37
|
var import_i18n = require("@wordpress/i18n");
|
|
@@ -41,6 +42,7 @@ var import_keyboard_shortcuts = require("@wordpress/keyboard-shortcuts");
|
|
|
41
42
|
var import_compose = require("@wordpress/compose");
|
|
42
43
|
var import_keyboard_shortcut_help_modal = __toESM(require("../keyboard-shortcut-help-modal"));
|
|
43
44
|
var import_tools_more_menu_group = __toESM(require("./tools-more-menu-group"));
|
|
45
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
44
46
|
function MoreMenu() {
|
|
45
47
|
const [
|
|
46
48
|
isKeyboardShortcutsModalActive,
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/more-menu/index.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {\n\tMenuGroup,\n\tMenuItem,\n\tVisuallyHidden,\n\tDropdownMenu,\n} from '@wordpress/components';\nimport { useState } from '@wordpress/element';\nimport { __, _x } from '@wordpress/i18n';\nimport { external, moreVertical } from '@wordpress/icons';\nimport { PreferenceToggleMenuItem } from '@wordpress/preferences';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { useShortcut } from '@wordpress/keyboard-shortcuts';\nimport { useViewportMatch } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport KeyboardShortcutHelpModal from '../keyboard-shortcut-help-modal';\nimport ToolsMoreMenuGroup from './tools-more-menu-group';\n\nexport default function MoreMenu() {\n\tconst [\n\t\tisKeyboardShortcutsModalActive,\n\t\tsetIsKeyboardShortcutsModalVisible,\n\t] = useState( false );\n\tconst toggleKeyboardShortcutsModal = () =>\n\t\tsetIsKeyboardShortcutsModalVisible( ! isKeyboardShortcutsModalActive );\n\n\tuseShortcut(\n\t\t'core/edit-widgets/keyboard-shortcuts',\n\t\ttoggleKeyboardShortcutsModal\n\t);\n\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\n\treturn (\n\t\t<>\n\t\t\t<DropdownMenu\n\t\t\t\ticon={ moreVertical }\n\t\t\t\tlabel={ __( 'Options' ) }\n\t\t\t\tpopoverProps={ {\n\t\t\t\t\tplacement: 'bottom-end',\n\t\t\t\t\tclassName: 'more-menu-dropdown__content',\n\t\t\t\t} }\n\t\t\t\ttoggleProps={ {\n\t\t\t\t\ttooltipPosition: 'bottom',\n\t\t\t\t\tsize: 'compact',\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ ( onClose ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ isLargeViewport && (\n\t\t\t\t\t\t\t<MenuGroup label={ _x( 'View', 'noun' ) }>\n\t\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\t\tscope=\"core/edit-widgets\"\n\t\t\t\t\t\t\t\t\tname=\"fixedToolbar\"\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Top toolbar' ) }\n\t\t\t\t\t\t\t\t\tinfo={ __(\n\t\t\t\t\t\t\t\t\t\t'Access all block and document tools in a single place'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t\t'Top toolbar activated'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t\t'Top toolbar deactivated'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<MenuGroup label={ __( 'Tools' ) }>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tsetIsKeyboardShortcutsModalVisible( true );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tshortcut={ displayShortcut.access( 'h' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Keyboard shortcuts' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core/edit-widgets\"\n\t\t\t\t\t\t\t\tname=\"welcomeGuide\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Welcome Guide' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\trole=\"menuitem\"\n\t\t\t\t\t\t\t\ticon={ external }\n\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/block-based-widgets-editor/'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Help' ) }\n\t\t\t\t\t\t\t\t<VisuallyHidden as=\"span\">\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t/* translators: accessibility text */\n\t\t\t\t\t\t\t\t\t\t__( '(opens in a new tab)' )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<ToolsMoreMenuGroup.Slot\n\t\t\t\t\t\t\t\tfillProps={ { onClose } }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<MenuGroup label={ __( 'Preferences' ) }>\n\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core/edit-widgets\"\n\t\t\t\t\t\t\t\tname=\"keepCaretInsideBlock\"\n\t\t\t\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t\t\t\t'Contain text cursor inside block'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tinfo={ __(\n\t\t\t\t\t\t\t\t\t'Aids screen readers by stopping text caret from leaving blocks.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t'Contain text cursor inside block activated'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t'Contain text cursor inside block deactivated'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core/edit-widgets\"\n\t\t\t\t\t\t\t\tname=\"themeStyles\"\n\t\t\t\t\t\t\t\tinfo={ __(\n\t\t\t\t\t\t\t\t\t'Make the editor look like your theme.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tlabel={ __( 'Use theme styles' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{ isLargeViewport && (\n\t\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\t\tscope=\"core/edit-widgets\"\n\t\t\t\t\t\t\t\t\tname=\"showBlockBreadcrumbs\"\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Display block breadcrumbs' ) }\n\t\t\t\t\t\t\t\t\tinfo={ __(\n\t\t\t\t\t\t\t\t\t\t'Shows block breadcrumbs at the bottom of the editor.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t\t'Display block breadcrumbs activated'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t\t'Display block breadcrumbs deactivated'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</DropdownMenu>\n\t\t\t<KeyboardShortcutHelpModal\n\t\t\t\tisModalActive={ isKeyboardShortcutsModalActive }\n\t\t\t\ttoggleModal={ toggleKeyboardShortcutsModal }\n\t\t\t/>\n\t\t</>\n\t);\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;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AA,MAAC,oCAAAC;AAAA,MAAA;AAAA,QACA,eAAgB;AAAA,QAChB,aAAc;AAAA;AAAA,IACf;AAAA,KACD;AAEF;",
|
|
6
6
|
"names": ["ToolsMoreMenuGroup", "KeyboardShortcutHelpModal"]
|
|
7
7
|
}
|
|
@@ -15,14 +15,16 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
15
|
return to;
|
|
16
16
|
};
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// packages/edit-widgets/src/components/more-menu/tools-more-menu-group.js
|
|
18
20
|
var tools_more_menu_group_exports = {};
|
|
19
21
|
__export(tools_more_menu_group_exports, {
|
|
20
22
|
default: () => tools_more_menu_group_default
|
|
21
23
|
});
|
|
22
24
|
module.exports = __toCommonJS(tools_more_menu_group_exports);
|
|
23
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
24
25
|
var import_components = require("@wordpress/components");
|
|
25
|
-
|
|
26
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
27
|
+
var { Fill: ToolsMoreMenuGroup, Slot } = (0, import_components.createSlotFill)(
|
|
26
28
|
"EditWidgetsToolsMoreMenuGroup"
|
|
27
29
|
);
|
|
28
30
|
ToolsMoreMenuGroup.Slot = ({ fillProps }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Slot, { fillProps, children: (fills) => fills.length > 0 && fills });
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/more-menu/tools-more-menu-group.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { createSlotFill } from '@wordpress/components';\n\nconst { Fill: ToolsMoreMenuGroup, Slot } = createSlotFill(\n\t'EditWidgetsToolsMoreMenuGroup'\n);\n\nToolsMoreMenuGroup.Slot = ( { fillProps } ) => (\n\t<Slot fillProps={ fillProps }>\n\t\t{ ( fills ) => fills.length > 0 && fills }\n\t</Slot>\n);\n\nexport default ToolsMoreMenuGroup;\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,wBAA+B;AAO9B;AALD,IAAM,EAAE,MAAM,oBAAoB,KAAK,QAAI;AAAA,EAC1C;AACD;AAEA,mBAAmB,OAAO,CAAE,EAAE,UAAU,MACvC,4CAAC,QAAK,WACH,WAAE,UAAW,MAAM,SAAS,KAAK,OACpC;AAGD,IAAO,gCAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -15,16 +15,18 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
15
|
return to;
|
|
16
16
|
};
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// packages/edit-widgets/src/components/notices/index.js
|
|
18
20
|
var notices_exports = {};
|
|
19
21
|
__export(notices_exports, {
|
|
20
22
|
default: () => notices_default
|
|
21
23
|
});
|
|
22
24
|
module.exports = __toCommonJS(notices_exports);
|
|
23
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
24
25
|
var import_components = require("@wordpress/components");
|
|
25
26
|
var import_data = require("@wordpress/data");
|
|
26
27
|
var import_notices = require("@wordpress/notices");
|
|
27
|
-
|
|
28
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
+
var MAX_VISIBLE_NOTICES = -3;
|
|
28
30
|
function Notices() {
|
|
29
31
|
const { removeNotice } = (0, import_data.useDispatch)(import_notices.store);
|
|
30
32
|
const { notices } = (0, import_data.useSelect)((select) => {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/notices/index.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { NoticeList, SnackbarList } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as noticesStore } from '@wordpress/notices';\n\n// Last three notices. Slices from the tail end of the list.\nconst MAX_VISIBLE_NOTICES = -3;\n\nfunction Notices() {\n\tconst { removeNotice } = useDispatch( noticesStore );\n\tconst { notices } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tnotices: select( noticesStore ).getNotices(),\n\t\t};\n\t}, [] );\n\n\tconst dismissibleNotices = notices.filter(\n\t\t( { isDismissible, type } ) => isDismissible && type === 'default'\n\t);\n\tconst nonDismissibleNotices = notices.filter(\n\t\t( { isDismissible, type } ) => ! isDismissible && type === 'default'\n\t);\n\tconst snackbarNotices = notices\n\t\t.filter( ( { type } ) => type === 'snackbar' )\n\t\t.slice( MAX_VISIBLE_NOTICES );\n\n\treturn (\n\t\t<>\n\t\t\t<NoticeList\n\t\t\t\tnotices={ nonDismissibleNotices }\n\t\t\t\tclassName=\"edit-widgets-notices__pinned\"\n\t\t\t/>\n\t\t\t<NoticeList\n\t\t\t\tnotices={ dismissibleNotices }\n\t\t\t\tclassName=\"edit-widgets-notices__dismissible\"\n\t\t\t\tonRemove={ removeNotice }\n\t\t\t/>\n\t\t\t<SnackbarList\n\t\t\t\tnotices={ snackbarNotices }\n\t\t\t\tclassName=\"edit-widgets-notices__snackbar\"\n\t\t\t\tonRemove={ removeNotice }\n\t\t\t/>\n\t\t</>\n\t);\n}\n\nexport default Notices;\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,wBAAyC;AACzC,kBAAuC;AACvC,qBAAsC;AAwBpC;AArBF,IAAM,sBAAsB;AAE5B,SAAS,UAAU;AAClB,QAAM,EAAE,aAAa,QAAI,yBAAa,eAAAA,KAAa;AACnD,QAAM,EAAE,QAAQ,QAAI,uBAAW,CAAE,WAAY;AAC5C,WAAO;AAAA,MACN,SAAS,OAAQ,eAAAA,KAAa,EAAE,WAAW;AAAA,IAC5C;AAAA,EACD,GAAG,CAAC,CAAE;AAEN,QAAM,qBAAqB,QAAQ;AAAA,IAClC,CAAE,EAAE,eAAe,KAAK,MAAO,iBAAiB,SAAS;AAAA,EAC1D;AACA,QAAM,wBAAwB,QAAQ;AAAA,IACrC,CAAE,EAAE,eAAe,KAAK,MAAO,CAAE,iBAAiB,SAAS;AAAA,EAC5D;AACA,QAAM,kBAAkB,QACtB,OAAQ,CAAE,EAAE,KAAK,MAAO,SAAS,UAAW,EAC5C,MAAO,mBAAoB;AAE7B,SACC,4EACC;AAAA;AAAA,MAAC;AAAA;AAAA,QACA,SAAU;AAAA,QACV,WAAU;AAAA;AAAA,IACX;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACA,SAAU;AAAA,QACV,WAAU;AAAA,QACV,UAAW;AAAA;AAAA,IACZ;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACA,SAAU;AAAA,QACV,WAAU;AAAA,QACV,UAAW;AAAA;AAAA,IACZ;AAAA,KACD;AAEF;AAEA,IAAO,kBAAQ;",
|
|
6
6
|
"names": ["noticesStore"]
|
|
7
7
|
}
|
|
@@ -15,16 +15,18 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
15
|
return to;
|
|
16
16
|
};
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// packages/edit-widgets/src/components/save-button/index.js
|
|
18
20
|
var save_button_exports = {};
|
|
19
21
|
__export(save_button_exports, {
|
|
20
22
|
default: () => save_button_default
|
|
21
23
|
});
|
|
22
24
|
module.exports = __toCommonJS(save_button_exports);
|
|
23
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
24
25
|
var import_components = require("@wordpress/components");
|
|
25
26
|
var import_i18n = require("@wordpress/i18n");
|
|
26
27
|
var import_data = require("@wordpress/data");
|
|
27
28
|
var import_store = require("../../store");
|
|
29
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
28
30
|
function SaveButton() {
|
|
29
31
|
const { hasEditedWidgetAreaIds, isSaving, isWidgetSaveLocked } = (0, import_data.useSelect)(
|
|
30
32
|
(select) => {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/save-button/index.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { Button } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\nfunction SaveButton() {\n\tconst { hasEditedWidgetAreaIds, isSaving, isWidgetSaveLocked } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetEditedWidgetAreas,\n\t\t\t\tisSavingWidgetAreas,\n\t\t\t\tisWidgetSavingLocked,\n\t\t\t} = select( editWidgetsStore );\n\n\t\t\treturn {\n\t\t\t\thasEditedWidgetAreaIds: getEditedWidgetAreas()?.length > 0,\n\t\t\t\tisSaving: isSavingWidgetAreas(),\n\t\t\t\tisWidgetSaveLocked: isWidgetSavingLocked(),\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst { saveEditedWidgetAreas } = useDispatch( editWidgetsStore );\n\n\tconst isDisabled =\n\t\tisWidgetSaveLocked || isSaving || ! hasEditedWidgetAreaIds;\n\n\treturn (\n\t\t<Button\n\t\t\tvariant=\"primary\"\n\t\t\tisBusy={ isSaving }\n\t\t\taria-disabled={ isDisabled }\n\t\t\tonClick={ isDisabled ? undefined : saveEditedWidgetAreas }\n\t\t\tsize=\"compact\"\n\t\t>\n\t\t\t{ isSaving ? __( 'Saving\u2026' ) : __( 'Update' ) }\n\t\t</Button>\n\t);\n}\n\nexport default SaveButton;\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,wBAAuB;AACvB,kBAAmB;AACnB,kBAAuC;AAKvC,mBAA0C;AAyBxC;AAvBF,SAAS,aAAa;AACrB,QAAM,EAAE,wBAAwB,UAAU,mBAAmB,QAAI;AAAA,IAChE,CAAE,WAAY;AACb,YAAM;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA,MACD,IAAI,OAAQ,aAAAA,KAAiB;AAE7B,aAAO;AAAA,QACN,wBAAwB,qBAAqB,GAAG,SAAS;AAAA,QACzD,UAAU,oBAAoB;AAAA,QAC9B,oBAAoB,qBAAqB;AAAA,MAC1C;AAAA,IACD;AAAA,IACA,CAAC;AAAA,EACF;AACA,QAAM,EAAE,sBAAsB,QAAI,yBAAa,aAAAA,KAAiB;AAEhE,QAAM,aACL,sBAAsB,YAAY,CAAE;AAErC,SACC;AAAA,IAAC;AAAA;AAAA,MACA,SAAQ;AAAA,MACR,QAAS;AAAA,MACT,iBAAgB;AAAA,MAChB,SAAU,aAAa,SAAY;AAAA,MACnC,MAAK;AAAA,MAEH,yBAAW,gBAAI,cAAU,QAAI,gBAAI,QAAS;AAAA;AAAA,EAC7C;AAEF;AAEA,IAAO,sBAAQ;",
|
|
6
6
|
"names": ["editWidgetsStore"]
|
|
7
7
|
}
|
|
@@ -25,16 +25,18 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
25
25
|
mod
|
|
26
26
|
));
|
|
27
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// packages/edit-widgets/src/components/secondary-sidebar/index.js
|
|
28
30
|
var secondary_sidebar_exports = {};
|
|
29
31
|
__export(secondary_sidebar_exports, {
|
|
30
32
|
default: () => SecondarySidebar
|
|
31
33
|
});
|
|
32
34
|
module.exports = __toCommonJS(secondary_sidebar_exports);
|
|
33
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
35
|
var import_data = require("@wordpress/data");
|
|
35
36
|
var import_store = require("../../store");
|
|
36
37
|
var import_inserter_sidebar = __toESM(require("./inserter-sidebar"));
|
|
37
38
|
var import_list_view_sidebar = __toESM(require("./list-view-sidebar"));
|
|
39
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
38
40
|
function SecondarySidebar() {
|
|
39
41
|
const { isInserterOpen, isListViewOpen } = (0, import_data.useSelect)((select) => {
|
|
40
42
|
const { isInserterOpened, isListViewOpened } = select(import_store.store);
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/secondary-sidebar/index.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\n/**\n * Internal dependencies\n */\nimport InserterSidebar from './inserter-sidebar';\nimport ListViewSidebar from './list-view-sidebar';\n\nexport default function SecondarySidebar() {\n\tconst { isInserterOpen, isListViewOpen } = useSelect( ( select ) => {\n\t\tconst { isInserterOpened, isListViewOpened } =\n\t\t\tselect( editWidgetsStore );\n\t\treturn {\n\t\t\tisInserterOpen: isInserterOpened(),\n\t\t\tisListViewOpen: isListViewOpened(),\n\t\t};\n\t}, [] );\n\n\tif ( isInserterOpen ) {\n\t\treturn <InserterSidebar />;\n\t}\n\tif ( isListViewOpen ) {\n\t\treturn <ListViewSidebar />;\n\t}\n\treturn null;\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAA0B;AAI1B,mBAA0C;AAK1C,8BAA4B;AAC5B,+BAA4B;AAanB;AAXM,SAAR,mBAAoC;AAC1C,QAAM,EAAE,gBAAgB,eAAe,QAAI,uBAAW,CAAE,WAAY;AACnE,UAAM,EAAE,kBAAkB,iBAAiB,IAC1C,OAAQ,aAAAA,KAAiB;AAC1B,WAAO;AAAA,MACN,gBAAgB,iBAAiB;AAAA,MACjC,gBAAgB,iBAAiB;AAAA,IAClC;AAAA,EACD,GAAG,CAAC,CAAE;AAEN,MAAK,gBAAiB;AACrB,WAAO,4CAAC,wBAAAC,SAAA,EAAgB;AAAA,EACzB;AACA,MAAK,gBAAiB;AACrB,WAAO,4CAAC,yBAAAC,SAAA,EAAgB;AAAA,EACzB;AACA,SAAO;AACR;",
|
|
6
6
|
"names": ["editWidgetsStore", "InserterSidebar", "ListViewSidebar"]
|
|
7
7
|
}
|
|
@@ -25,18 +25,20 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
25
25
|
mod
|
|
26
26
|
));
|
|
27
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// packages/edit-widgets/src/components/secondary-sidebar/inserter-sidebar.js
|
|
28
30
|
var inserter_sidebar_exports = {};
|
|
29
31
|
__export(inserter_sidebar_exports, {
|
|
30
32
|
default: () => InserterSidebar
|
|
31
33
|
});
|
|
32
34
|
module.exports = __toCommonJS(inserter_sidebar_exports);
|
|
33
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
35
|
var import_block_editor = require("@wordpress/block-editor");
|
|
35
36
|
var import_compose = require("@wordpress/compose");
|
|
36
37
|
var import_element = require("@wordpress/element");
|
|
37
38
|
var import_data = require("@wordpress/data");
|
|
38
39
|
var import_use_widget_library_insertion_point = __toESM(require("../../hooks/use-widget-library-insertion-point"));
|
|
39
40
|
var import_store = require("../../store");
|
|
41
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
40
42
|
function InserterSidebar() {
|
|
41
43
|
const isMobileViewport = (0, import_compose.useViewportMatch)("medium", "<");
|
|
42
44
|
const { rootClientId, insertionIndex } = (0, import_use_widget_library_insertion_point.default)();
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/secondary-sidebar/inserter-sidebar.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __experimentalLibrary as Library } from '@wordpress/block-editor';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { useCallback, useRef } from '@wordpress/element';\nimport { useDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport useWidgetLibraryInsertionPoint from '../../hooks/use-widget-library-insertion-point';\nimport { store as editWidgetsStore } from '../../store';\n\nexport default function InserterSidebar() {\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst { rootClientId, insertionIndex } = useWidgetLibraryInsertionPoint();\n\n\tconst { setIsInserterOpened } = useDispatch( editWidgetsStore );\n\n\tconst closeInserter = useCallback( () => {\n\t\treturn setIsInserterOpened( false );\n\t}, [ setIsInserterOpened ] );\n\n\tconst libraryRef = useRef();\n\n\treturn (\n\t\t<div className=\"edit-widgets-layout__inserter-panel\">\n\t\t\t<div className=\"edit-widgets-layout__inserter-panel-content\">\n\t\t\t\t<Library\n\t\t\t\t\tshowInserterHelpPanel\n\t\t\t\t\tshouldFocusBlock={ isMobileViewport }\n\t\t\t\t\trootClientId={ rootClientId }\n\t\t\t\t\t__experimentalInsertionIndex={ insertionIndex }\n\t\t\t\t\tref={ libraryRef }\n\t\t\t\t\tonClose={ closeInserter }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,0BAAiD;AACjD,qBAAiC;AACjC,qBAAoC;AACpC,kBAA4B;AAK5B,gDAA2C;AAC3C,mBAA0C;AAiBtC;AAfW,SAAR,kBAAmC;AACzC,QAAM,uBAAmB,iCAAkB,UAAU,GAAI;AACzD,QAAM,EAAE,cAAc,eAAe,QAAI,0CAAAA,SAA+B;AAExE,QAAM,EAAE,oBAAoB,QAAI,yBAAa,aAAAC,KAAiB;AAE9D,QAAM,oBAAgB,4BAAa,MAAM;AACxC,WAAO,oBAAqB,KAAM;AAAA,EACnC,GAAG,CAAE,mBAAoB,CAAE;AAE3B,QAAM,iBAAa,uBAAO;AAE1B,SACC,4CAAC,SAAI,WAAU,uCACd,sDAAC,SAAI,WAAU,+CACd;AAAA,IAAC,oBAAAC;AAAA,IAAA;AAAA,MACA,uBAAqB;AAAA,MACrB,kBAAmB;AAAA,MACnB;AAAA,MACA,8BAA+B;AAAA,MAC/B,KAAM;AAAA,MACN,SAAU;AAAA;AAAA,EACX,GACD,GACD;AAEF;",
|
|
6
6
|
"names": ["useWidgetLibraryInsertionPoint", "editWidgetsStore", "Library"]
|
|
7
7
|
}
|
|
@@ -15,12 +15,13 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
15
|
return to;
|
|
16
16
|
};
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// packages/edit-widgets/src/components/secondary-sidebar/list-view-sidebar.js
|
|
18
20
|
var list_view_sidebar_exports = {};
|
|
19
21
|
__export(list_view_sidebar_exports, {
|
|
20
22
|
default: () => ListViewSidebar
|
|
21
23
|
});
|
|
22
24
|
module.exports = __toCommonJS(list_view_sidebar_exports);
|
|
23
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
24
25
|
var import_block_editor = require("@wordpress/block-editor");
|
|
25
26
|
var import_components = require("@wordpress/components");
|
|
26
27
|
var import_compose = require("@wordpress/compose");
|
|
@@ -31,6 +32,7 @@ var import_icons = require("@wordpress/icons");
|
|
|
31
32
|
var import_keycodes = require("@wordpress/keycodes");
|
|
32
33
|
var import_store = require("../../store");
|
|
33
34
|
var import_lock_unlock = require("../../lock-unlock");
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
36
|
function ListViewSidebar() {
|
|
35
37
|
const { setIsListViewOpened } = (0, import_data.useDispatch)(import_store.store);
|
|
36
38
|
const { getListViewToggleRef } = (0, import_lock_unlock.unlock)((0, import_data.useSelect)(import_store.store));
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/secondary-sidebar/list-view-sidebar.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __experimentalListView as ListView } from '@wordpress/block-editor';\nimport { Button } from '@wordpress/components';\nimport { useFocusOnMount, useMergeRefs } from '@wordpress/compose';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useCallback, useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { closeSmall } from '@wordpress/icons';\nimport { ESCAPE } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nexport default function ListViewSidebar() {\n\tconst { setIsListViewOpened } = useDispatch( editWidgetsStore );\n\tconst { getListViewToggleRef } = unlock( useSelect( editWidgetsStore ) );\n\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the dropZoneElement updates.\n\tconst [ dropZoneElement, setDropZoneElement ] = useState( null );\n\n\tconst focusOnMountRef = useFocusOnMount( 'firstElement' );\n\n\t// When closing the list view, focus should return to the toggle button.\n\tconst closeListView = useCallback( () => {\n\t\tsetIsListViewOpened( false );\n\t\tgetListViewToggleRef().current?.focus();\n\t}, [ getListViewToggleRef, setIsListViewOpened ] );\n\n\tconst closeOnEscape = useCallback(\n\t\t( event ) => {\n\t\t\tif ( event.keyCode === ESCAPE && ! event.defaultPrevented ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tcloseListView();\n\t\t\t}\n\t\t},\n\t\t[ closeListView ]\n\t);\n\n\treturn (\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<div\n\t\t\tclassName=\"edit-widgets-editor__list-view-panel\"\n\t\t\tonKeyDown={ closeOnEscape }\n\t\t>\n\t\t\t<div className=\"edit-widgets-editor__list-view-panel-header\">\n\t\t\t\t<strong>{ __( 'List View' ) }</strong>\n\t\t\t\t<Button\n\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\tlabel={ __( 'Close' ) }\n\t\t\t\t\tonClick={ closeListView }\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<div\n\t\t\t\tclassName=\"edit-widgets-editor__list-view-panel-content\"\n\t\t\t\tref={ useMergeRefs( [ focusOnMountRef, setDropZoneElement ] ) }\n\t\t\t>\n\t\t\t\t<ListView dropZoneElement={ dropZoneElement } />\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,0BAAmD;AACnD,wBAAuB;AACvB,qBAA8C;AAC9C,kBAAuC;AACvC,qBAAsC;AACtC,kBAAmB;AACnB,mBAA2B;AAC3B,sBAAuB;AAKvB,mBAA0C;AAC1C,yBAAuB;AAkCpB;AAhCY,SAAR,kBAAmC;AACzC,QAAM,EAAE,oBAAoB,QAAI,yBAAa,aAAAA,KAAiB;AAC9D,QAAM,EAAE,qBAAqB,QAAI,+BAAQ,uBAAW,aAAAA,KAAiB,CAAE;AAIvE,QAAM,CAAE,iBAAiB,kBAAmB,QAAI,yBAAU,IAAK;AAE/D,QAAM,sBAAkB,gCAAiB,cAAe;AAGxD,QAAM,oBAAgB,4BAAa,MAAM;AACxC,wBAAqB,KAAM;AAC3B,yBAAqB,EAAE,SAAS,MAAM;AAAA,EACvC,GAAG,CAAE,sBAAsB,mBAAoB,CAAE;AAEjD,QAAM,oBAAgB;AAAA,IACrB,CAAE,UAAW;AACZ,UAAK,MAAM,YAAY,0BAAU,CAAE,MAAM,kBAAmB;AAC3D,cAAM,eAAe;AACrB,sBAAc;AAAA,MACf;AAAA,IACD;AAAA,IACA,CAAE,aAAc;AAAA,EACjB;AAEA;AAAA;AAAA,IAEC;AAAA,MAAC;AAAA;AAAA,QACA,WAAU;AAAA,QACV,WAAY;AAAA,QAEZ;AAAA,uDAAC,SAAI,WAAU,+CACd;AAAA,wDAAC,YAAS,8BAAI,WAAY,GAAG;AAAA,YAC7B;AAAA,cAAC;AAAA;AAAA,gBACA,MAAO;AAAA,gBACP,WAAQ,gBAAI,OAAQ;AAAA,gBACpB,SAAU;AAAA,gBACV,MAAK;AAAA;AAAA,YACN;AAAA,aACD;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACA,WAAU;AAAA,cACV,SAAM,6BAAc,CAAE,iBAAiB,kBAAmB,CAAE;AAAA,cAE5D,sDAAC,oBAAAC,wBAAA,EAAS,iBAAoC;AAAA;AAAA,UAC/C;AAAA;AAAA;AAAA,IACD;AAAA;AAEF;",
|
|
6
6
|
"names": ["editWidgetsStore", "ListView"]
|
|
7
7
|
}
|
|
@@ -25,12 +25,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
25
25
|
mod
|
|
26
26
|
));
|
|
27
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// packages/edit-widgets/src/components/sidebar/index.js
|
|
28
30
|
var sidebar_exports = {};
|
|
29
31
|
__export(sidebar_exports, {
|
|
30
32
|
default: () => Sidebar
|
|
31
33
|
});
|
|
32
34
|
module.exports = __toCommonJS(sidebar_exports);
|
|
33
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
35
|
var import_element = require("@wordpress/element");
|
|
35
36
|
var import_i18n = require("@wordpress/i18n");
|
|
36
37
|
var import_interface = require("@wordpress/interface");
|
|
@@ -41,13 +42,14 @@ var import_data = require("@wordpress/data");
|
|
|
41
42
|
var import_widget_areas = __toESM(require("./widget-areas"));
|
|
42
43
|
var import_store = require("../../store");
|
|
43
44
|
var import_lock_unlock = require("../../lock-unlock");
|
|
44
|
-
|
|
45
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
46
|
+
var SIDEBAR_ACTIVE_BY_DEFAULT = import_element.Platform.select({
|
|
45
47
|
web: true,
|
|
46
48
|
native: false
|
|
47
49
|
});
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
50
|
+
var BLOCK_INSPECTOR_IDENTIFIER = "edit-widgets/block-inspector";
|
|
51
|
+
var WIDGET_AREAS_IDENTIFIER = "edit-widgets/block-areas";
|
|
52
|
+
var { Tabs } = (0, import_lock_unlock.unlock)(import_components.privateApis);
|
|
51
53
|
function SidebarHeader({ selectedWidgetAreaBlock }) {
|
|
52
54
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Tabs.TabList, { children: [
|
|
53
55
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tabs.Tab, { tabId: WIDGET_AREAS_IDENTIFIER, children: selectedWidgetAreaBlock ? selectedWidgetAreaBlock.attributes.name : (0, import_i18n.__)("Widget Areas") }),
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/sidebar/index.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {\n\tuseEffect,\n\tPlatform,\n\tuseContext,\n\tuseCallback,\n} from '@wordpress/element';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport {\n\tComplementaryArea,\n\tstore as interfaceStore,\n} from '@wordpress/interface';\nimport {\n\tBlockInspector,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\n\nimport { drawerLeft, drawerRight } from '@wordpress/icons';\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\n\nconst SIDEBAR_ACTIVE_BY_DEFAULT = Platform.select( {\n\tweb: true,\n\tnative: false,\n} );\n\nconst BLOCK_INSPECTOR_IDENTIFIER = 'edit-widgets/block-inspector';\n\n// Widget areas were once called block areas, so use 'edit-widgets/block-areas'\n// for backwards compatibility.\nconst WIDGET_AREAS_IDENTIFIER = 'edit-widgets/block-areas';\n\n/**\n * Internal dependencies\n */\nimport WidgetAreas from './widget-areas';\nimport { store as editWidgetsStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nfunction SidebarHeader( { selectedWidgetAreaBlock } ) {\n\treturn (\n\t\t<Tabs.TabList>\n\t\t\t<Tabs.Tab tabId={ WIDGET_AREAS_IDENTIFIER }>\n\t\t\t\t{ selectedWidgetAreaBlock\n\t\t\t\t\t? selectedWidgetAreaBlock.attributes.name\n\t\t\t\t\t: __( 'Widget Areas' ) }\n\t\t\t</Tabs.Tab>\n\t\t\t<Tabs.Tab tabId={ BLOCK_INSPECTOR_IDENTIFIER }>\n\t\t\t\t{ __( 'Block' ) }\n\t\t\t</Tabs.Tab>\n\t\t</Tabs.TabList>\n\t);\n}\n\nfunction SidebarContent( {\n\thasSelectedNonAreaBlock,\n\tcurrentArea,\n\tisGeneralSidebarOpen,\n\tselectedWidgetAreaBlock,\n} ) {\n\tconst { enableComplementaryArea } = useDispatch( interfaceStore );\n\n\tuseEffect( () => {\n\t\tif (\n\t\t\thasSelectedNonAreaBlock &&\n\t\t\tcurrentArea === WIDGET_AREAS_IDENTIFIER &&\n\t\t\tisGeneralSidebarOpen\n\t\t) {\n\t\t\tenableComplementaryArea(\n\t\t\t\t'core/edit-widgets',\n\t\t\t\tBLOCK_INSPECTOR_IDENTIFIER\n\t\t\t);\n\t\t}\n\t\tif (\n\t\t\t! hasSelectedNonAreaBlock &&\n\t\t\tcurrentArea === BLOCK_INSPECTOR_IDENTIFIER &&\n\t\t\tisGeneralSidebarOpen\n\t\t) {\n\t\t\tenableComplementaryArea(\n\t\t\t\t'core/edit-widgets',\n\t\t\t\tWIDGET_AREAS_IDENTIFIER\n\t\t\t);\n\t\t}\n\t\t// We're intentionally leaving `currentArea` and `isGeneralSidebarOpen`\n\t\t// out of the dep array because we want this effect to run based on\n\t\t// block selection changes, not sidebar state changes.\n\t}, [ hasSelectedNonAreaBlock, enableComplementaryArea ] );\n\n\tconst tabsContextValue = useContext( Tabs.Context );\n\n\treturn (\n\t\t<ComplementaryArea\n\t\t\tclassName=\"edit-widgets-sidebar\"\n\t\t\theader={\n\t\t\t\t<Tabs.Context.Provider value={ tabsContextValue }>\n\t\t\t\t\t<SidebarHeader\n\t\t\t\t\t\tselectedWidgetAreaBlock={ selectedWidgetAreaBlock }\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.Context.Provider>\n\t\t\t}\n\t\t\theaderClassName=\"edit-widgets-sidebar__panel-tabs\"\n\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\ttitle={ __( 'Settings' ) }\n\t\t\tcloseLabel={ __( 'Close Settings' ) }\n\t\t\tscope=\"core/edit-widgets\"\n\t\t\tidentifier={ currentArea }\n\t\t\ticon={ isRTL() ? drawerLeft : drawerRight }\n\t\t\tisActiveByDefault={ SIDEBAR_ACTIVE_BY_DEFAULT }\n\t\t>\n\t\t\t<Tabs.Context.Provider value={ tabsContextValue }>\n\t\t\t\t<Tabs.TabPanel\n\t\t\t\t\ttabId={ WIDGET_AREAS_IDENTIFIER }\n\t\t\t\t\tfocusable={ false }\n\t\t\t\t>\n\t\t\t\t\t<WidgetAreas\n\t\t\t\t\t\tselectedWidgetAreaId={\n\t\t\t\t\t\t\tselectedWidgetAreaBlock?.attributes.id\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t<Tabs.TabPanel\n\t\t\t\t\ttabId={ BLOCK_INSPECTOR_IDENTIFIER }\n\t\t\t\t\tfocusable={ false }\n\t\t\t\t>\n\t\t\t\t\t{ hasSelectedNonAreaBlock ? (\n\t\t\t\t\t\t<BlockInspector />\n\t\t\t\t\t) : (\n\t\t\t\t\t\t// Pretend that Widget Areas are part of the UI by not\n\t\t\t\t\t\t// showing the Block Inspector when one is selected.\n\t\t\t\t\t\t<span className=\"block-editor-block-inspector__no-blocks\">\n\t\t\t\t\t\t\t{ __( 'No block selected.' ) }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t) }\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t</Tabs.Context.Provider>\n\t\t</ComplementaryArea>\n\t);\n}\n\nexport default function Sidebar() {\n\tconst {\n\t\tcurrentArea,\n\t\thasSelectedNonAreaBlock,\n\t\tisGeneralSidebarOpen,\n\t\tselectedWidgetAreaBlock,\n\t} = useSelect( ( select ) => {\n\t\tconst { getSelectedBlock, getBlock, getBlockParentsByBlockName } =\n\t\t\tselect( blockEditorStore );\n\t\tconst { getActiveComplementaryArea } = select( interfaceStore );\n\n\t\tconst selectedBlock = getSelectedBlock();\n\n\t\tconst activeArea = getActiveComplementaryArea( editWidgetsStore.name );\n\n\t\tlet currentSelection = activeArea;\n\t\tif ( ! currentSelection ) {\n\t\t\tif ( selectedBlock ) {\n\t\t\t\tcurrentSelection = BLOCK_INSPECTOR_IDENTIFIER;\n\t\t\t} else {\n\t\t\t\tcurrentSelection = WIDGET_AREAS_IDENTIFIER;\n\t\t\t}\n\t\t}\n\n\t\tlet widgetAreaBlock;\n\t\tif ( selectedBlock ) {\n\t\t\tif ( selectedBlock.name === 'core/widget-area' ) {\n\t\t\t\twidgetAreaBlock = selectedBlock;\n\t\t\t} else {\n\t\t\t\twidgetAreaBlock = getBlock(\n\t\t\t\t\tgetBlockParentsByBlockName(\n\t\t\t\t\t\tselectedBlock.clientId,\n\t\t\t\t\t\t'core/widget-area'\n\t\t\t\t\t)[ 0 ]\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tcurrentArea: currentSelection,\n\t\t\thasSelectedNonAreaBlock: !! (\n\t\t\t\tselectedBlock && selectedBlock.name !== 'core/widget-area'\n\t\t\t),\n\t\t\tisGeneralSidebarOpen: !! activeArea,\n\t\t\tselectedWidgetAreaBlock: widgetAreaBlock,\n\t\t};\n\t}, [] );\n\n\tconst { enableComplementaryArea } = useDispatch( interfaceStore );\n\n\t// `newSelectedTabId` could technically be falsy if no tab is selected (i.e.\n\t// the initial render) or when we don't want a tab displayed (i.e. the\n\t// sidebar is closed). These cases should both be covered by the `!!` check\n\t// below, so we shouldn't need any additional falsy handling.\n\tconst onTabSelect = useCallback(\n\t\t( newSelectedTabId ) => {\n\t\t\tif ( !! newSelectedTabId ) {\n\t\t\t\tenableComplementaryArea(\n\t\t\t\t\teditWidgetsStore.name,\n\t\t\t\t\tnewSelectedTabId\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[ enableComplementaryArea ]\n\t);\n\n\treturn (\n\t\t<Tabs\n\t\t\t// Due to how this component is controlled (via a value from the\n\t\t\t// `interfaceStore`), when the sidebar closes the currently selected\n\t\t\t// tab can't be found. This causes the component to continuously reset\n\t\t\t// the selection to `null` in an infinite loop. Proactively setting\n\t\t\t// the selected tab to `null` avoids that.\n\t\t\tselectedTabId={ isGeneralSidebarOpen ? currentArea : null }\n\t\t\tonSelect={ onTabSelect }\n\t\t\tselectOnMove={ false }\n\t\t>\n\t\t\t<SidebarContent\n\t\t\t\thasSelectedNonAreaBlock={ hasSelectedNonAreaBlock }\n\t\t\t\tcurrentArea={ currentArea }\n\t\t\t\tisGeneralSidebarOpen={ isGeneralSidebarOpen }\n\t\t\t\tselectedWidgetAreaBlock={ selectedWidgetAreaBlock }\n\t\t\t/>\n\t\t</Tabs>\n\t);\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAKO;AACP,kBAA0B;AAC1B,uBAGO;AACP,0BAGO;AAEP,mBAAwC;AACxC,wBAAqD;AACrD,kBAAuC;AAgBvC,0BAAwB;AACxB,mBAA0C;AAC1C,yBAAuB;AAMrB;AAtBF,IAAM,4BAA4B,wBAAS,OAAQ;AAAA,EAClD,KAAK;AAAA,EACL,QAAQ;AACT,CAAE;AAEF,IAAM,6BAA6B;AAInC,IAAM,0BAA0B;AAShC,IAAM,EAAE,KAAK,QAAI,2BAAQ,kBAAAA,WAAsB;AAE/C,SAAS,c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AAAG,MAAiB;AAAA,UACjB;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAAA,IACA,CAAE,uBAAwB;AAAA,EAC3B;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MAMA,eAAgB,uBAAuB,cAAc;AAAA,MACrD,UAAW;AAAA,MACX,cAAe;AAAA,MAEf;AAAA,QAAC;AAAA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA;AAAA,MACD;AAAA;AAAA,EACD;AAEF;",
|
|
6
6
|
"names": ["componentsPrivateApis", "interfaceStore", "WidgetAreas", "blockEditorStore", "editWidgetsStore"]
|
|
7
7
|
}
|
|
@@ -15,12 +15,13 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
15
|
return to;
|
|
16
16
|
};
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// packages/edit-widgets/src/components/sidebar/widget-areas.js
|
|
18
20
|
var widget_areas_exports = {};
|
|
19
21
|
__export(widget_areas_exports, {
|
|
20
22
|
default: () => WidgetAreas
|
|
21
23
|
});
|
|
22
24
|
module.exports = __toCommonJS(widget_areas_exports);
|
|
23
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
24
25
|
var import_data = require("@wordpress/data");
|
|
25
26
|
var import_element = require("@wordpress/element");
|
|
26
27
|
var import_icons = require("@wordpress/icons");
|
|
@@ -30,6 +31,7 @@ var import_i18n = require("@wordpress/i18n");
|
|
|
30
31
|
var import_url = require("@wordpress/url");
|
|
31
32
|
var import_dom = require("@wordpress/dom");
|
|
32
33
|
var import_store = require("../../store");
|
|
34
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
33
35
|
function WidgetAreas({ selectedWidgetAreaId }) {
|
|
34
36
|
const widgetAreas = (0, import_data.useSelect)(
|
|
35
37
|
(select) => select(import_store.store).getWidgetAreas(),
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/sidebar/widget-areas.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { blockDefault } from '@wordpress/icons';\nimport { BlockIcon } from '@wordpress/block-editor';\nimport { Button } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { addQueryArgs } from '@wordpress/url';\nimport { safeHTML } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\nexport default function WidgetAreas( { selectedWidgetAreaId } ) {\n\tconst widgetAreas = useSelect(\n\t\t( select ) => select( editWidgetsStore ).getWidgetAreas(),\n\t\t[]\n\t);\n\n\tconst selectedWidgetArea = useMemo(\n\t\t() =>\n\t\t\tselectedWidgetAreaId &&\n\t\t\twidgetAreas?.find(\n\t\t\t\t( widgetArea ) => widgetArea.id === selectedWidgetAreaId\n\t\t\t),\n\t\t[ selectedWidgetAreaId, widgetAreas ]\n\t);\n\n\tlet description;\n\tif ( ! selectedWidgetArea ) {\n\t\tdescription = __(\n\t\t\t// eslint-disable-next-line no-restricted-syntax -- 'sidebar' is a common web design term for layouts\n\t\t\t'Widget Areas are global parts in your site\u2019s layout that can accept blocks. These vary by theme, but are typically parts like your Sidebar or Footer.'\n\t\t);\n\t} else if ( selectedWidgetAreaId === 'wp_inactive_widgets' ) {\n\t\tdescription = __(\n\t\t\t'Blocks in this Widget Area will not be displayed in your site.'\n\t\t);\n\t} else {\n\t\tdescription = selectedWidgetArea.description;\n\t}\n\n\treturn (\n\t\t<div className=\"edit-widgets-widget-areas\">\n\t\t\t<div className=\"edit-widgets-widget-areas__top-container\">\n\t\t\t\t<BlockIcon icon={ blockDefault } />\n\t\t\t\t<div>\n\t\t\t\t\t<p\n\t\t\t\t\t\t// Use `dangerouslySetInnerHTML` to keep backwards\n\t\t\t\t\t\t// compatibility. Basic markup in the description is an\n\t\t\t\t\t\t// established feature of WordPress.\n\t\t\t\t\t\t// @see https://github.com/WordPress/gutenberg/issues/33106\n\t\t\t\t\t\tdangerouslySetInnerHTML={ {\n\t\t\t\t\t\t\t__html: safeHTML( description ),\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t{ widgetAreas?.length === 0 && (\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Your theme does not contain any Widget Areas.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</p>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ! selectedWidgetArea && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\thref={ addQueryArgs( 'customize.php', {\n\t\t\t\t\t\t\t\t'autofocus[panel]': 'widgets',\n\t\t\t\t\t\t\t\treturn: window.location.pathname,\n\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Manage with live preview' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAA0B;AAC1B,qBAAwB;AACxB,mBAA6B;AAC7B,0BAA0B;AAC1B,wBAAuB;AACvB,kBAAmB;AACnB,iBAA6B;AAC7B,iBAAyB;AAKzB,mBAA0C;AAkCtC;AAhCW,SAAR,YAA8B,EAAE,qBAAqB,GAAI;AAC/D,QAAM,kBAAc;AAAA,IACnB,CAAE,WAAY,OAAQ,aAAAA,KAAiB,EAAE,eAAe;AAAA,IACxD,CAAC;AAAA,EACF;AAEA,QAAM,yBAAqB;AAAA,IAC1B,MACC,wBACA,aAAa;AAAA,MACZ,CAAE,eAAgB,WAAW,OAAO;AAAA,IACrC;AAAA,IACD,CAAE,sBAAsB,WAAY;AAAA,EACrC;AAEA,MAAI;AACJ,MAAK,CAAE,oBAAqB;AAC3B,sBAAc;AAAA;AAAA,MAEb;AAAA,IACD;AAAA,EACD,WAAY,yBAAyB,uBAAwB;AAC5D,sBAAc;AAAA,MACb;AAAA,IACD;AAAA,EACD,OAAO;AACN,kBAAc,mBAAmB;AAAA,EAClC;AAEA,SACC,4CAAC,SAAI,WAAU,6BACd,uDAAC,SAAI,WAAU,4CACd;AAAA,gDAAC,iCAAU,MAAO,2BAAe;AAAA,IACjC,6CAAC,SACA;AAAA;AAAA,QAAC;AAAA;AAAA,UAKA,yBAA0B;AAAA,YACzB,YAAQ,qBAAU,WAAY;AAAA,UAC/B;AAAA;AAAA,MACD;AAAA,MACE,aAAa,WAAW,KACzB,4CAAC,OACE;AAAA,QACD;AAAA,MACD,GACD;AAAA,MAEC,CAAE,sBACH;AAAA,QAAC;AAAA;AAAA,UACA,uBAAqB;AAAA,UACrB,UAAO,yBAAc,iBAAiB;AAAA,YACrC,oBAAoB;AAAA,YACpB,QAAQ,OAAO,SAAS;AAAA,UACzB,CAAE;AAAA,UACF,SAAQ;AAAA,UAEN,8BAAI,0BAA2B;AAAA;AAAA,MAClC;AAAA,OAEF;AAAA,KACD,GACD;AAEF;",
|
|
6
6
|
"names": ["editWidgetsStore"]
|
|
7
7
|
}
|
|
@@ -15,18 +15,20 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
15
|
return to;
|
|
16
16
|
};
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// packages/edit-widgets/src/components/welcome-guide/index.js
|
|
18
20
|
var welcome_guide_exports = {};
|
|
19
21
|
__export(welcome_guide_exports, {
|
|
20
22
|
default: () => WelcomeGuide
|
|
21
23
|
});
|
|
22
24
|
module.exports = __toCommonJS(welcome_guide_exports);
|
|
23
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
24
25
|
var import_data = require("@wordpress/data");
|
|
25
26
|
var import_components = require("@wordpress/components");
|
|
26
27
|
var import_i18n = require("@wordpress/i18n");
|
|
27
28
|
var import_element = require("@wordpress/element");
|
|
28
29
|
var import_preferences = require("@wordpress/preferences");
|
|
29
30
|
var import_store = require("../../store");
|
|
31
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
30
32
|
function WelcomeGuide() {
|
|
31
33
|
const isActive = (0, import_data.useSelect)(
|
|
32
34
|
(select) => !!select(import_preferences.store).get(
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/welcome-guide/index.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { ExternalLink, Guide } from '@wordpress/components';\nimport { __, sprintf, _n } from '@wordpress/i18n';\nimport { createInterpolateElement } from '@wordpress/element';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\nexport default function WelcomeGuide() {\n\tconst isActive = useSelect(\n\t\t( select ) =>\n\t\t\t!! select( preferencesStore ).get(\n\t\t\t\t'core/edit-widgets',\n\t\t\t\t'welcomeGuide'\n\t\t\t),\n\t\t[]\n\t);\n\n\tconst { toggle } = useDispatch( preferencesStore );\n\n\tconst widgetAreas = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editWidgetsStore ).getWidgetAreas( { per_page: -1 } ),\n\t\t[]\n\t);\n\n\tif ( ! isActive ) {\n\t\treturn null;\n\t}\n\n\tconst isEntirelyBlockWidgets = widgetAreas?.every(\n\t\t( widgetArea ) =>\n\t\t\twidgetArea.id === 'wp_inactive_widgets' ||\n\t\t\twidgetArea.widgets.every( ( widgetId ) =>\n\t\t\t\twidgetId.startsWith( 'block-' )\n\t\t\t)\n\t);\n\n\tconst numWidgetAreas =\n\t\twidgetAreas?.filter(\n\t\t\t( widgetArea ) => widgetArea.id !== 'wp_inactive_widgets'\n\t\t).length ?? 0;\n\n\treturn (\n\t\t<Guide\n\t\t\tclassName=\"edit-widgets-welcome-guide\"\n\t\t\tcontentLabel={ __( 'Welcome to block Widgets' ) }\n\t\t\tfinishButtonText={ __( 'Get started' ) }\n\t\t\tonFinish={ () => toggle( 'core/edit-widgets', 'welcomeGuide' ) }\n\t\t\tpages={ [\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-canvas.svg\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-canvas.gif\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-widgets-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Welcome to block Widgets' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t{ isEntirelyBlockWidgets ? (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<p className=\"edit-widgets-welcome-guide__text\">\n\t\t\t\t\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t\t\t\t\t// Translators: %s: Number of block areas in the current theme.\n\t\t\t\t\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t\t\t\t\t'Your theme provides %s \u201Cblock\u201D area for you to add and edit content.\u00A0Try adding a search bar, social icons, or other types of blocks here and see how they\u2019ll look on your site.',\n\t\t\t\t\t\t\t\t\t\t\t\t'Your theme provides %s different \u201Cblock\u201D areas for you to add and edit content.\u00A0Try adding a search bar, social icons, or other types of blocks here and see how they\u2019ll look on your site.',\n\t\t\t\t\t\t\t\t\t\t\t\tnumWidgetAreas\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\tnumWidgetAreas\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<p className=\"edit-widgets-welcome-guide__text\">\n\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t'You can now add any block to your site\u2019s widget areas. Don\u2019t worry, all of your favorite widgets still work flawlessly.'\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t<p className=\"edit-widgets-welcome-guide__text\">\n\t\t\t\t\t\t\t\t\t\t<strong>\n\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Want to stick with the old widgets?'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</strong>{ ' ' }\n\t\t\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'https://wordpress.org/plugins/classic-widgets/'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Get the Classic Widgets plugin.'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-editor.svg\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-editor.gif\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-widgets-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Customize each block' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-widgets-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'Each block comes with its own set of controls for changing things like color, width, and alignment. These will show and hide automatically when you have a block selected.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-library.svg\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-library.gif\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-widgets-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Explore all blocks' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-widgets-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t'All of the blocks available to you live in the block library. You\u2019ll find it wherever you see the <InserterIconImage /> icon.'\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tInserterIconImage: (\n\t\t\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"edit-widgets-welcome-guide__inserter-icon\"\n\t\t\t\t\t\t\t\t\t\t\t\talt={ __( 'inserter' ) }\n\t\t\t\t\t\t\t\t\t\t\t\tsrc=\"data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='18' height='18' rx='2' fill='%231E1E1E'/%3E%3Cpath d='M9.22727 4V14M4 8.77273H14' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E%0A\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-documentation.svg\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-documentation.gif\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-widgets-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Learn more' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-widgets-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\"New to the block editor? Want to learn more about using it? <a>Here's a detailed guide.</a>\"\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ta: (\n\t\t\t\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/wordpress-block-editor/'\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t] }\n\t\t/>\n\t);\n}\n\nfunction WelcomeGuideImage( { nonAnimatedSrc, animatedSrc } ) {\n\treturn (\n\t\t<picture className=\"edit-widgets-welcome-guide__image\">\n\t\t\t<source\n\t\t\t\tsrcSet={ nonAnimatedSrc }\n\t\t\t\tmedia=\"(prefers-reduced-motion: reduce)\"\n\t\t\t/>\n\t\t\t<img src={ animatedSrc } width=\"312\" height=\"240\" alt=\"\" />\n\t\t</picture>\n\t);\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAuC;AACvC,wBAAoC;AACpC,kBAAgC;AAChC,qBAAyC;AACzC,yBAA0C;AAK1C,mBAA0C;AA8CpC;AA5CS,SAAR,eAAgC;AACtC,QAAM,eAAW;AAAA,IAChB,CAAE,WACD,CAAC,CAAE,OAAQ,mBAAAA,KAAiB,EAAE;AAAA,MAC7B;AAAA,MACA;AAAA,IACD;AAAA,IACD,CAAC;AAAA,EACF;AAEA,QAAM,EAAE,OAAO,QAAI,yBAAa,mBAAAA,KAAiB;AAEjD,QAAM,kBAAc;AAAA,IACnB,CAAE,WACD,OAAQ,aAAAC,KAAiB,EAAE,eAAgB,EAAE,UAAU,GAAG,CAAE;AAAA,IAC7D,CAAC;AAAA,EACF;AAEA,MAAK,CAAE,UAAW;AACjB,WAAO;AAAA,EACR;AAEA,QAAM,yBAAyB,aAAa;AAAA,IAC3C,CAAE,eACD,WAAW,OAAO,yBAClB,WAAW,QAAQ;AAAA,MAAO,CAAE,aAC3B,SAAS,WAAY,QAAS;AAAA,IAC/B;AAAA,EACF;AAEA,QAAM,iBACL,aAAa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,aAAY;AAAA;AAAA,UACb;AAAA,UAED,SACC,4EACC;AAAA,wDAAC,QAAG,WAAU,uCACX,8BAAI,oBAAqB,GAC5B;AAAA,YACA,4CAAC,OAAE,WAAU,oCACV;AAAA,kBACD;AAAA,gBACC;AAAA,cACD;AAAA,cACA;AAAA,gBACC,mBACC;AAAA,kBAAC;AAAA;AAAA,oBACA,WAAU;AAAA,oBACV,SAAM,gBAAI,UAAW;AAAA,oBACrB,KAAI;AAAA;AAAA,gBACL;AAAA,cAEF;AAAA,YACD,GACD;AAAA,aACD;AAAA,QAEF;AAAA,QACA;AAAA,UACC,OACC;AAAA,YAAC;AAAA;AAAA,cACA,gBAAe;AAAA,cACf,aAAY;AAAA;AAAA,UACb;AAAA,UAED,SACC,4EACC;AAAA,wDAAC,QAAG,WAAU,uCACX,8BAAI,YAAa,GACpB;AAAA,YACA,4CAAC,OAAE,WAAU,oCACV;AAAA,kBACD;AAAA,gBACC;AAAA,cACD;AAAA,cACA;AAAA,gBACC,GACC;AAAA,kBAAC;AAAA;AAAA,oBACA,UAAO;AAAA,sBACN;AAAA,oBACD;AAAA;AAAA,gBACD;AAAA,cAEF;AAAA,YACD,GACD;AAAA,aACD;AAAA,QAEF;AAAA,MACD;AAAA;AAAA,EACD;AAEF;AAEA,SAAS,kBAAmB,EAAE,gBAAgB,YAAY,GAAI;AAC7D,SACC,6CAAC,aAAQ,WAAU,qCAClB;AAAA;AAAA,MAAC;AAAA;AAAA,QACA,QAAS;AAAA,QACT,OAAM;AAAA;AAAA,IACP;AAAA,IACA,4CAAC,SAAI,KAAM,aAAc,OAAM,OAAM,QAAO,OAAM,KAAI,IAAG;AAAA,KAC1D;AAEF;",
|
|
6
6
|
"names": ["preferencesStore", "editWidgetsStore"]
|
|
7
7
|
}
|
|
@@ -25,12 +25,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
25
25
|
mod
|
|
26
26
|
));
|
|
27
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// packages/edit-widgets/src/components/widget-areas-block-editor-content/index.js
|
|
28
30
|
var widget_areas_block_editor_content_exports = {};
|
|
29
31
|
__export(widget_areas_block_editor_content_exports, {
|
|
30
32
|
default: () => WidgetAreasBlockEditorContent
|
|
31
33
|
});
|
|
32
34
|
module.exports = __toCommonJS(widget_areas_block_editor_content_exports);
|
|
33
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
35
|
var import_block_editor = require("@wordpress/block-editor");
|
|
35
36
|
var import_compose = require("@wordpress/compose");
|
|
36
37
|
var import_data = require("@wordpress/data");
|
|
@@ -38,6 +39,7 @@ var import_element = require("@wordpress/element");
|
|
|
38
39
|
var import_preferences = require("@wordpress/preferences");
|
|
39
40
|
var import_notices = __toESM(require("../notices"));
|
|
40
41
|
var import_keyboard_shortcuts = __toESM(require("../keyboard-shortcuts"));
|
|
42
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
41
43
|
function WidgetAreasBlockEditorContent({
|
|
42
44
|
blockEditorSettings
|
|
43
45
|
}) {
|