@wordpress/edit-widgets 6.8.5 → 6.8.7
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/build/components/layout/index.js +14 -7
- package/build/components/layout/index.js.map +1 -1
- package/build/components/layout/interface.js +3 -12
- package/build/components/layout/interface.js.map +1 -1
- package/build-module/components/layout/index.js +14 -7
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/layout/interface.js +3 -12
- package/build-module/components/layout/interface.js.map +1 -1
- package/package.json +12 -12
- package/src/components/layout/index.js +17 -8
- package/src/components/layout/interface.js +0 -15
|
@@ -9,6 +9,7 @@ var _i18n = require("@wordpress/i18n");
|
|
|
9
9
|
var _data = require("@wordpress/data");
|
|
10
10
|
var _plugins = require("@wordpress/plugins");
|
|
11
11
|
var _notices = require("@wordpress/notices");
|
|
12
|
+
var _components = require("@wordpress/components");
|
|
12
13
|
var _errorBoundary = _interopRequireDefault(require("../error-boundary"));
|
|
13
14
|
var _widgetAreasBlockEditorProvider = _interopRequireDefault(require("../widget-areas-block-editor-provider"));
|
|
14
15
|
var _sidebar = _interopRequireDefault(require("../sidebar"));
|
|
@@ -34,14 +35,20 @@ function Layout({
|
|
|
34
35
|
createErrorNotice((0, _i18n.sprintf)( /* translators: %s: plugin name */
|
|
35
36
|
(0, _i18n.__)('The "%s" plugin has encountered an error and cannot be rendered.'), name));
|
|
36
37
|
}
|
|
38
|
+
const navigateRegionsProps = (0, _components.__unstableUseNavigateRegions)();
|
|
37
39
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_errorBoundary.default, {
|
|
38
|
-
children: /*#__PURE__*/(0, _jsxRuntime.
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
41
|
+
className: navigateRegionsProps.className,
|
|
42
|
+
...navigateRegionsProps,
|
|
43
|
+
ref: navigateRegionsProps.ref,
|
|
44
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_widgetAreasBlockEditorProvider.default, {
|
|
45
|
+
blockEditorSettings: blockEditorSettings,
|
|
46
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_interface.default, {
|
|
47
|
+
blockEditorSettings: blockEditorSettings
|
|
48
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_sidebar.default, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_plugins.PluginArea, {
|
|
49
|
+
onError: onPluginAreaError
|
|
50
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_unsavedChangesWarning.default, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_welcomeGuide.default, {})]
|
|
51
|
+
})
|
|
45
52
|
})
|
|
46
53
|
});
|
|
47
54
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_data","_plugins","_notices","_errorBoundary","_interopRequireDefault","_widgetAreasBlockEditorProvider","_sidebar","_interface","_unsavedChangesWarning","_welcomeGuide","_jsxRuntime","Layout","blockEditorSettings","createErrorNotice","useDispatch","noticesStore","onPluginAreaError","name","sprintf","__","jsx","default","children","jsxs","PluginArea","onError","_default","exports"],"sources":["@wordpress/edit-widgets/src/components/layout/index.js"],"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';\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\treturn (\n\t\t<ErrorBoundary>\n\t\t\t<WidgetAreasBlockEditorProvider\n\t\t\t\tblockEditorSettings={ blockEditorSettings }\n\t\t\t>\n\t\t\t\t<Interface blockEditorSettings={ blockEditorSettings } />\n\t\t\t\t<Sidebar />\n\t\t\t\t<PluginArea onError={ onPluginAreaError } />\n\t\t\t\t<UnsavedChangesWarning />\n\t\t\t\t<WelcomeGuide />\n\t\t\t</WidgetAreasBlockEditorProvider>\n\t\t</ErrorBoundary>\n\t);\n}\n\nexport default Layout;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;
|
|
1
|
+
{"version":3,"names":["_i18n","require","_data","_plugins","_notices","_components","_errorBoundary","_interopRequireDefault","_widgetAreasBlockEditorProvider","_sidebar","_interface","_unsavedChangesWarning","_welcomeGuide","_jsxRuntime","Layout","blockEditorSettings","createErrorNotice","useDispatch","noticesStore","onPluginAreaError","name","sprintf","__","navigateRegionsProps","useNavigateRegions","jsx","default","children","className","ref","jsxs","PluginArea","onError","_default","exports"],"sources":["@wordpress/edit-widgets/src/components/layout/index.js"],"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"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AAKA,IAAAK,cAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,+BAAA,GAAAD,sBAAA,CAAAN,OAAA;AACA,IAAAQ,QAAA,GAAAF,sBAAA,CAAAN,OAAA;AACA,IAAAS,UAAA,GAAAH,sBAAA,CAAAN,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AAY,IAAE,CAAC;MAAA,CACe;IAAC,CAC7B;EAAC,CACQ,CAAC;AAElB;AAAC,IAAAO,QAAA,GAAAC,OAAA,CAAAR,OAAA,GAEcZ,MAAM","ignoreList":[]}
|
|
@@ -11,7 +11,6 @@ var _element = require("@wordpress/element");
|
|
|
11
11
|
var _data = require("@wordpress/data");
|
|
12
12
|
var _interface = require("@wordpress/interface");
|
|
13
13
|
var _i18n = require("@wordpress/i18n");
|
|
14
|
-
var _keyboardShortcuts = require("@wordpress/keyboard-shortcuts");
|
|
15
14
|
var _preferences = require("@wordpress/preferences");
|
|
16
15
|
var _header = _interopRequireDefault(require("../header"));
|
|
17
16
|
var _widgetAreasBlockEditorContent = _interopRequireDefault(require("../widget-areas-block-editor-content"));
|
|
@@ -50,16 +49,12 @@ function Interface({
|
|
|
50
49
|
hasBlockBreadCrumbsEnabled,
|
|
51
50
|
hasSidebarEnabled,
|
|
52
51
|
isInserterOpened,
|
|
53
|
-
isListViewOpened
|
|
54
|
-
previousShortcut,
|
|
55
|
-
nextShortcut
|
|
52
|
+
isListViewOpened
|
|
56
53
|
} = (0, _data.useSelect)(select => ({
|
|
57
54
|
hasSidebarEnabled: !!select(_interface.store).getActiveComplementaryArea(_store.store.name),
|
|
58
55
|
isInserterOpened: !!select(_store.store).isInserterOpened(),
|
|
59
56
|
isListViewOpened: !!select(_store.store).isListViewOpened(),
|
|
60
|
-
hasBlockBreadCrumbsEnabled: !!select(_preferences.store).get('core/edit-widgets', 'showBlockBreadcrumbs')
|
|
61
|
-
previousShortcut: select(_keyboardShortcuts.store).getAllShortcutKeyCombinations('core/edit-widgets/previous-region'),
|
|
62
|
-
nextShortcut: select(_keyboardShortcuts.store).getAllShortcutKeyCombinations('core/edit-widgets/next-region')
|
|
57
|
+
hasBlockBreadCrumbsEnabled: !!select(_preferences.store).get('core/edit-widgets', 'showBlockBreadcrumbs')
|
|
63
58
|
}), []);
|
|
64
59
|
|
|
65
60
|
// Inserter and Sidebars are mutually exclusive
|
|
@@ -96,11 +91,7 @@ function Interface({
|
|
|
96
91
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.BlockBreadcrumb, {
|
|
97
92
|
rootLabelText: (0, _i18n.__)('Widgets')
|
|
98
93
|
})
|
|
99
|
-
})
|
|
100
|
-
shortcuts: {
|
|
101
|
-
previous: previousShortcut,
|
|
102
|
-
next: nextShortcut
|
|
103
|
-
}
|
|
94
|
+
})
|
|
104
95
|
});
|
|
105
96
|
}
|
|
106
97
|
var _default = exports.default = Interface;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_compose","require","_blockEditor","_element","_data","_interface","_i18n","
|
|
1
|
+
{"version":3,"names":["_compose","require","_blockEditor","_element","_data","_interface","_i18n","_preferences","_header","_interopRequireDefault","_widgetAreasBlockEditorContent","_store","_secondarySidebar","_jsxRuntime","interfaceLabels","header","__","body","sidebar","footer","Interface","blockEditorSettings","isMobileViewport","useViewportMatch","isHugeViewport","setIsInserterOpened","setIsListViewOpened","closeGeneralSidebar","useDispatch","editWidgetsStore","hasBlockBreadCrumbsEnabled","hasSidebarEnabled","isInserterOpened","isListViewOpened","useSelect","select","interfaceStore","getActiveComplementaryArea","name","preferencesStore","get","useEffect","secondarySidebarLabel","hasSecondarySidebar","jsx","InterfaceSkeleton","labels","secondarySidebar","default","ComplementaryArea","Slot","scope","content","Fragment","children","className","BlockBreadcrumb","rootLabelText","_default","exports"],"sources":["@wordpress/edit-widgets/src/components/layout/interface.js"],"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=\"edit-widgets-layout__footer\">\n\t\t\t\t\t\t<BlockBreadcrumb rootLabelText={ __( 'Widgets' ) } />\n\t\t\t\t\t</div>\n\t\t\t\t)\n\t\t\t}\n\t\t/>\n\t);\n}\n\nexport default Interface;\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AAKA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AAKA,IAAAO,OAAA,GAAAC,sBAAA,CAAAR,OAAA;AACA,IAAAS,8BAAA,GAAAD,sBAAA,CAAAR,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AACA,IAAAW,iBAAA,GAAAH,sBAAA,CAAAR,OAAA;AAAoD,IA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AC1B,CAAER,gBAAgB,iBACjB,IAAAT,WAAA,CAAA+B,GAAA;MAAKW,SAAS,EAAC,6BAA6B;MAAAD,QAAA,eAC3C,IAAAzC,WAAA,CAAA+B,GAAA,EAAC1C,YAAA,CAAAsD,eAAe;QAACC,aAAa,EAAG,IAAAzC,QAAE,EAAE,SAAU;MAAG,CAAE;IAAC,CACjD;EAEN,CACD,CAAC;AAEJ;AAAC,IAAA0C,QAAA,GAAAC,OAAA,CAAAX,OAAA,GAEc5B,SAAS","ignoreList":[]}
|
|
@@ -5,6 +5,7 @@ import { __, sprintf } from '@wordpress/i18n';
|
|
|
5
5
|
import { useDispatch } from '@wordpress/data';
|
|
6
6
|
import { PluginArea } from '@wordpress/plugins';
|
|
7
7
|
import { store as noticesStore } from '@wordpress/notices';
|
|
8
|
+
import { __unstableUseNavigateRegions as useNavigateRegions } from '@wordpress/components';
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* Internal dependencies
|
|
@@ -27,14 +28,20 @@ function Layout({
|
|
|
27
28
|
createErrorNotice(sprintf( /* translators: %s: plugin name */
|
|
28
29
|
__('The "%s" plugin has encountered an error and cannot be rendered.'), name));
|
|
29
30
|
}
|
|
31
|
+
const navigateRegionsProps = useNavigateRegions();
|
|
30
32
|
return /*#__PURE__*/_jsx(ErrorBoundary, {
|
|
31
|
-
children: /*#__PURE__*/
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
34
|
+
className: navigateRegionsProps.className,
|
|
35
|
+
...navigateRegionsProps,
|
|
36
|
+
ref: navigateRegionsProps.ref,
|
|
37
|
+
children: /*#__PURE__*/_jsxs(WidgetAreasBlockEditorProvider, {
|
|
38
|
+
blockEditorSettings: blockEditorSettings,
|
|
39
|
+
children: [/*#__PURE__*/_jsx(Interface, {
|
|
40
|
+
blockEditorSettings: blockEditorSettings
|
|
41
|
+
}), /*#__PURE__*/_jsx(Sidebar, {}), /*#__PURE__*/_jsx(PluginArea, {
|
|
42
|
+
onError: onPluginAreaError
|
|
43
|
+
}), /*#__PURE__*/_jsx(UnsavedChangesWarning, {}), /*#__PURE__*/_jsx(WelcomeGuide, {})]
|
|
44
|
+
})
|
|
38
45
|
})
|
|
39
46
|
});
|
|
40
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__","sprintf","useDispatch","PluginArea","store","noticesStore","ErrorBoundary","WidgetAreasBlockEditorProvider","Sidebar","Interface","UnsavedChangesWarning","WelcomeGuide","jsx","_jsx","jsxs","_jsxs","Layout","blockEditorSettings","createErrorNotice","onPluginAreaError","name","children","onError"],"sources":["@wordpress/edit-widgets/src/components/layout/index.js"],"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';\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\treturn (\n\t\t<ErrorBoundary>\n\t\t\t<WidgetAreasBlockEditorProvider\n\t\t\t\tblockEditorSettings={ blockEditorSettings }\n\t\t\t>\n\t\t\t\t<Interface blockEditorSettings={ blockEditorSettings } />\n\t\t\t\t<Sidebar />\n\t\t\t\t<PluginArea onError={ onPluginAreaError } />\n\t\t\t\t<UnsavedChangesWarning />\n\t\t\t\t<WelcomeGuide />\n\t\t\t</WidgetAreasBlockEditorProvider>\n\t\t</ErrorBoundary>\n\t);\n}\n\nexport default Layout;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,SAASC,KAAK,IAAIC,YAAY,QAAQ,oBAAoB;;
|
|
1
|
+
{"version":3,"names":["__","sprintf","useDispatch","PluginArea","store","noticesStore","__unstableUseNavigateRegions","useNavigateRegions","ErrorBoundary","WidgetAreasBlockEditorProvider","Sidebar","Interface","UnsavedChangesWarning","WelcomeGuide","jsx","_jsx","jsxs","_jsxs","Layout","blockEditorSettings","createErrorNotice","onPluginAreaError","name","navigateRegionsProps","children","className","ref","onError"],"sources":["@wordpress/edit-widgets/src/components/layout/index.js"],"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"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,SAASC,KAAK,IAAIC,YAAY,QAAQ,oBAAoB;AAC1D,SAASC,4BAA4B,IAAIC,kBAAkB,QAAQ,uBAAuB;;AAE1F;AACA;AACA;AACA,OAAOC,aAAa,MAAM,mBAAmB;AAC7C,OAAOC,8BAA8B,MAAM,uCAAuC;AAClF,OAAOC,OAAO,MAAM,YAAY;AAChC,OAAOC,SAAS,MAAM,aAAa;AACnC,OAAOC,qBAAqB,MAAM,2BAA2B;AAC7D,OAAOC,YAAY,MAAM,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAE5C,SAASC,MAAMA,CAAE;EAAEC;AAAoB,CAAC,EAAG;EAC1C,MAAM;IAAEC;EAAkB,CAAC,GAAGlB,WAAW,CAAEG,YAAa,CAAC;EAEzD,SAASgB,iBAAiBA,CAAEC,IAAI,EAAG;IAClCF,iBAAiB,CAChBnB,OAAO,EACN;IACAD,EAAE,CACD,kEACD,CAAC,EACDsB,IACD,CACD,CAAC;EACF;EAEA,MAAMC,oBAAoB,GAAGhB,kBAAkB,CAAC,CAAC;EAEjD,oBACCQ,IAAA,CAACP,aAAa;IAAAgB,QAAA,eACbT,IAAA;MACCU,SAAS,EAAGF,oBAAoB,CAACE,SAAW;MAAA,GACvCF,oBAAoB;MACzBG,GAAG,EAAGH,oBAAoB,CAACG,GAAK;MAAAF,QAAA,eAEhCP,KAAA,CAACR,8BAA8B;QAC9BU,mBAAmB,EAAGA,mBAAqB;QAAAK,QAAA,gBAE3CT,IAAA,CAACJ,SAAS;UAACQ,mBAAmB,EAAGA;QAAqB,CAAE,CAAC,eACzDJ,IAAA,CAACL,OAAO,IAAE,CAAC,eACXK,IAAA,CAACZ,UAAU;UAACwB,OAAO,EAAGN;QAAmB,CAAE,CAAC,eAC5CN,IAAA,CAACH,qBAAqB,IAAE,CAAC,eACzBG,IAAA,CAACF,YAAY,IAAE,CAAC;MAAA,CACe;IAAC,CAC7B;EAAC,CACQ,CAAC;AAElB;AAEA,eAAeK,MAAM","ignoreList":[]}
|
|
@@ -7,7 +7,6 @@ import { useEffect } from '@wordpress/element';
|
|
|
7
7
|
import { useDispatch, useSelect } from '@wordpress/data';
|
|
8
8
|
import { InterfaceSkeleton, ComplementaryArea, store as interfaceStore } from '@wordpress/interface';
|
|
9
9
|
import { __ } from '@wordpress/i18n';
|
|
10
|
-
import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';
|
|
11
10
|
import { store as preferencesStore } from '@wordpress/preferences';
|
|
12
11
|
|
|
13
12
|
/**
|
|
@@ -43,16 +42,12 @@ function Interface({
|
|
|
43
42
|
hasBlockBreadCrumbsEnabled,
|
|
44
43
|
hasSidebarEnabled,
|
|
45
44
|
isInserterOpened,
|
|
46
|
-
isListViewOpened
|
|
47
|
-
previousShortcut,
|
|
48
|
-
nextShortcut
|
|
45
|
+
isListViewOpened
|
|
49
46
|
} = useSelect(select => ({
|
|
50
47
|
hasSidebarEnabled: !!select(interfaceStore).getActiveComplementaryArea(editWidgetsStore.name),
|
|
51
48
|
isInserterOpened: !!select(editWidgetsStore).isInserterOpened(),
|
|
52
49
|
isListViewOpened: !!select(editWidgetsStore).isListViewOpened(),
|
|
53
|
-
hasBlockBreadCrumbsEnabled: !!select(preferencesStore).get('core/edit-widgets', 'showBlockBreadcrumbs')
|
|
54
|
-
previousShortcut: select(keyboardShortcutsStore).getAllShortcutKeyCombinations('core/edit-widgets/previous-region'),
|
|
55
|
-
nextShortcut: select(keyboardShortcutsStore).getAllShortcutKeyCombinations('core/edit-widgets/next-region')
|
|
50
|
+
hasBlockBreadCrumbsEnabled: !!select(preferencesStore).get('core/edit-widgets', 'showBlockBreadcrumbs')
|
|
56
51
|
}), []);
|
|
57
52
|
|
|
58
53
|
// Inserter and Sidebars are mutually exclusive
|
|
@@ -89,11 +84,7 @@ function Interface({
|
|
|
89
84
|
children: /*#__PURE__*/_jsx(BlockBreadcrumb, {
|
|
90
85
|
rootLabelText: __('Widgets')
|
|
91
86
|
})
|
|
92
|
-
})
|
|
93
|
-
shortcuts: {
|
|
94
|
-
previous: previousShortcut,
|
|
95
|
-
next: nextShortcut
|
|
96
|
-
}
|
|
87
|
+
})
|
|
97
88
|
});
|
|
98
89
|
}
|
|
99
90
|
export default Interface;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useViewportMatch","BlockBreadcrumb","useEffect","useDispatch","useSelect","InterfaceSkeleton","ComplementaryArea","store","interfaceStore","__","
|
|
1
|
+
{"version":3,"names":["useViewportMatch","BlockBreadcrumb","useEffect","useDispatch","useSelect","InterfaceSkeleton","ComplementaryArea","store","interfaceStore","__","preferencesStore","Header","WidgetAreasBlockEditorContent","editWidgetsStore","SecondarySidebar","jsx","_jsx","Fragment","_Fragment","interfaceLabels","header","body","sidebar","footer","Interface","blockEditorSettings","isMobileViewport","isHugeViewport","setIsInserterOpened","setIsListViewOpened","closeGeneralSidebar","hasBlockBreadCrumbsEnabled","hasSidebarEnabled","isInserterOpened","isListViewOpened","select","getActiveComplementaryArea","name","get","secondarySidebarLabel","hasSecondarySidebar","labels","secondarySidebar","Slot","scope","content","children","className","rootLabelText"],"sources":["@wordpress/edit-widgets/src/components/layout/interface.js"],"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=\"edit-widgets-layout__footer\">\n\t\t\t\t\t\t<BlockBreadc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,IAAA,CAACL,MAAM,IAAE,CAAG;IACrB+B,gBAAgB,EAAGF,mBAAmB,iBAAIxB,IAAA,CAACF,gBAAgB,IAAE,CAAG;IAChEQ,OAAO,eAAGN,IAAA,CAACV,iBAAiB,CAACqC,IAAI;MAACC,KAAK,EAAC;IAAmB,CAAE,CAAG;IAChEC,OAAO,eACN7B,IAAA,CAAAE,SAAA;MAAA4B,QAAA,eACC9B,IAAA,CAACJ,6BAA6B;QAC7Ba,mBAAmB,EAAGA;MAAqB,CAC3C;IAAC,CACD,CACF;IACDF,MAAM,EACLQ,0BAA0B,IAC1B,CAAEL,gBAAgB,iBACjBV,IAAA;MAAK+B,SAAS,EAAC,6BAA6B;MAAAD,QAAA,eAC3C9B,IAAA,CAACf,eAAe;QAAC+C,aAAa,EAAGvC,EAAE,CAAE,SAAU;MAAG,CAAE;IAAC,CACjD;EAEN,CACD,CAAC;AAEJ;AAEA,eAAee,SAAS","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/edit-widgets",
|
|
3
|
-
"version": "6.8.
|
|
3
|
+
"version": "6.8.7",
|
|
4
4
|
"description": "Widgets Page module for WordPress..",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@babel/runtime": "^7.16.0",
|
|
31
31
|
"@wordpress/api-fetch": "^7.8.2",
|
|
32
|
-
"@wordpress/block-editor": "^14.3.
|
|
33
|
-
"@wordpress/block-library": "^9.8.
|
|
32
|
+
"@wordpress/block-editor": "^14.3.6",
|
|
33
|
+
"@wordpress/block-library": "^9.8.7",
|
|
34
34
|
"@wordpress/blocks": "^13.8.4",
|
|
35
|
-
"@wordpress/components": "^28.8.
|
|
35
|
+
"@wordpress/components": "^28.8.6",
|
|
36
36
|
"@wordpress/compose": "^7.8.3",
|
|
37
|
-
"@wordpress/core-data": "^7.8.
|
|
37
|
+
"@wordpress/core-data": "^7.8.6",
|
|
38
38
|
"@wordpress/data": "^10.8.3",
|
|
39
39
|
"@wordpress/deprecated": "^4.8.2",
|
|
40
40
|
"@wordpress/dom": "^4.8.2",
|
|
@@ -42,18 +42,18 @@
|
|
|
42
42
|
"@wordpress/hooks": "^4.8.2",
|
|
43
43
|
"@wordpress/i18n": "^5.8.2",
|
|
44
44
|
"@wordpress/icons": "^10.8.2",
|
|
45
|
-
"@wordpress/interface": "^6.8.
|
|
45
|
+
"@wordpress/interface": "^6.8.6",
|
|
46
46
|
"@wordpress/keyboard-shortcuts": "^5.8.3",
|
|
47
47
|
"@wordpress/keycodes": "^4.8.2",
|
|
48
48
|
"@wordpress/media-utils": "^5.8.2",
|
|
49
49
|
"@wordpress/notices": "^5.8.3",
|
|
50
|
-
"@wordpress/patterns": "^2.8.
|
|
51
|
-
"@wordpress/plugins": "^7.8.
|
|
52
|
-
"@wordpress/preferences": "^4.8.
|
|
50
|
+
"@wordpress/patterns": "^2.8.6",
|
|
51
|
+
"@wordpress/plugins": "^7.8.6",
|
|
52
|
+
"@wordpress/preferences": "^4.8.6",
|
|
53
53
|
"@wordpress/private-apis": "^1.8.1",
|
|
54
|
-
"@wordpress/reusable-blocks": "^5.8.
|
|
54
|
+
"@wordpress/reusable-blocks": "^5.8.6",
|
|
55
55
|
"@wordpress/url": "^4.8.1",
|
|
56
|
-
"@wordpress/widgets": "^4.8.
|
|
56
|
+
"@wordpress/widgets": "^4.8.6",
|
|
57
57
|
"clsx": "^2.1.1"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"publishConfig": {
|
|
64
64
|
"access": "public"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "b7af02f8431034ee19cdc33dd105d21705823eed"
|
|
67
67
|
}
|
|
@@ -5,6 +5,7 @@ import { __, sprintf } from '@wordpress/i18n';
|
|
|
5
5
|
import { useDispatch } from '@wordpress/data';
|
|
6
6
|
import { PluginArea } from '@wordpress/plugins';
|
|
7
7
|
import { store as noticesStore } from '@wordpress/notices';
|
|
8
|
+
import { __unstableUseNavigateRegions as useNavigateRegions } from '@wordpress/components';
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* Internal dependencies
|
|
@@ -31,17 +32,25 @@ function Layout( { blockEditorSettings } ) {
|
|
|
31
32
|
);
|
|
32
33
|
}
|
|
33
34
|
|
|
35
|
+
const navigateRegionsProps = useNavigateRegions();
|
|
36
|
+
|
|
34
37
|
return (
|
|
35
38
|
<ErrorBoundary>
|
|
36
|
-
<
|
|
37
|
-
|
|
39
|
+
<div
|
|
40
|
+
className={ navigateRegionsProps.className }
|
|
41
|
+
{ ...navigateRegionsProps }
|
|
42
|
+
ref={ navigateRegionsProps.ref }
|
|
38
43
|
>
|
|
39
|
-
<
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
<WidgetAreasBlockEditorProvider
|
|
45
|
+
blockEditorSettings={ blockEditorSettings }
|
|
46
|
+
>
|
|
47
|
+
<Interface blockEditorSettings={ blockEditorSettings } />
|
|
48
|
+
<Sidebar />
|
|
49
|
+
<PluginArea onError={ onPluginAreaError } />
|
|
50
|
+
<UnsavedChangesWarning />
|
|
51
|
+
<WelcomeGuide />
|
|
52
|
+
</WidgetAreasBlockEditorProvider>
|
|
53
|
+
</div>
|
|
45
54
|
</ErrorBoundary>
|
|
46
55
|
);
|
|
47
56
|
}
|
|
@@ -11,7 +11,6 @@ import {
|
|
|
11
11
|
store as interfaceStore,
|
|
12
12
|
} from '@wordpress/interface';
|
|
13
13
|
import { __ } from '@wordpress/i18n';
|
|
14
|
-
import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';
|
|
15
14
|
import { store as preferencesStore } from '@wordpress/preferences';
|
|
16
15
|
|
|
17
16
|
/**
|
|
@@ -43,8 +42,6 @@ function Interface( { blockEditorSettings } ) {
|
|
|
43
42
|
hasSidebarEnabled,
|
|
44
43
|
isInserterOpened,
|
|
45
44
|
isListViewOpened,
|
|
46
|
-
previousShortcut,
|
|
47
|
-
nextShortcut,
|
|
48
45
|
} = useSelect(
|
|
49
46
|
( select ) => ( {
|
|
50
47
|
hasSidebarEnabled: !! select(
|
|
@@ -56,14 +53,6 @@ function Interface( { blockEditorSettings } ) {
|
|
|
56
53
|
'core/edit-widgets',
|
|
57
54
|
'showBlockBreadcrumbs'
|
|
58
55
|
),
|
|
59
|
-
previousShortcut: select(
|
|
60
|
-
keyboardShortcutsStore
|
|
61
|
-
).getAllShortcutKeyCombinations(
|
|
62
|
-
'core/edit-widgets/previous-region'
|
|
63
|
-
),
|
|
64
|
-
nextShortcut: select(
|
|
65
|
-
keyboardShortcutsStore
|
|
66
|
-
).getAllShortcutKeyCombinations( 'core/edit-widgets/next-region' ),
|
|
67
56
|
} ),
|
|
68
57
|
[]
|
|
69
58
|
);
|
|
@@ -112,10 +101,6 @@ function Interface( { blockEditorSettings } ) {
|
|
|
112
101
|
</div>
|
|
113
102
|
)
|
|
114
103
|
}
|
|
115
|
-
shortcuts={ {
|
|
116
|
-
previous: previousShortcut,
|
|
117
|
-
next: nextShortcut,
|
|
118
|
-
} }
|
|
119
104
|
/>
|
|
120
105
|
);
|
|
121
106
|
}
|