@wordpress/edit-widgets 5.19.6 → 5.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/build/blocks/widget-area/edit/index.js +6 -5
- package/build/blocks/widget-area/edit/index.js.map +1 -1
- package/build/blocks/widget-area/edit/inner-blocks.js +4 -3
- package/build/blocks/widget-area/edit/inner-blocks.js.map +1 -1
- package/build/components/error-boundary/index.js +5 -4
- package/build/components/error-boundary/index.js.map +1 -1
- package/build/components/header/index.js +12 -11
- package/build/components/header/index.js.map +1 -1
- package/build/components/header/undo-redo/redo.js +2 -2
- package/build/components/header/undo-redo/redo.js.map +1 -1
- package/build/components/header/undo-redo/undo.js +2 -2
- package/build/components/header/undo-redo/undo.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +2 -2
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/index.js +15 -15
- package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/shortcut.js +8 -7
- package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
- package/build/components/layout/index.js +5 -5
- package/build/components/layout/index.js.map +1 -1
- package/build/components/layout/interface.js +9 -8
- package/build/components/layout/interface.js.map +1 -1
- package/build/components/layout/unsaved-changes-warning.js +1 -1
- package/build/components/layout/unsaved-changes-warning.js.map +1 -1
- package/build/components/more-menu/index.js +15 -14
- package/build/components/more-menu/index.js.map +1 -1
- package/build/components/more-menu/tools-more-menu-group.js +2 -2
- package/build/components/more-menu/tools-more-menu-group.js.map +1 -1
- package/build/components/notices/index.js +4 -4
- package/build/components/notices/index.js.map +1 -1
- package/build/components/save-button/index.js +2 -2
- package/build/components/save-button/index.js.map +1 -1
- package/build/components/secondary-sidebar/index.js +3 -3
- package/build/components/secondary-sidebar/index.js.map +1 -1
- package/build/components/secondary-sidebar/inserter-sidebar.js +7 -6
- package/build/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
- package/build/components/secondary-sidebar/list-view-sidebar.js +7 -6
- package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build/components/sidebar/index.js +9 -8
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/sidebar/widget-areas.js +7 -6
- package/build/components/sidebar/widget-areas.js.map +1 -1
- package/build/components/welcome-guide/index.js +23 -22
- package/build/components/welcome-guide/index.js.map +1 -1
- package/build/components/widget-areas-block-editor-content/index.js +5 -4
- package/build/components/widget-areas-block-editor-content/index.js.map +1 -1
- package/build/components/widget-areas-block-editor-provider/index.js +4 -3
- package/build/components/widget-areas-block-editor-provider/index.js.map +1 -1
- package/build/filters/move-to-widget-area.js +3 -3
- package/build/filters/move-to-widget-area.js.map +1 -1
- package/build/index.js +3 -2
- package/build/index.js.map +1 -1
- package/build/lock-unlock.js +1 -1
- package/build/lock-unlock.js.map +1 -1
- package/build-module/blocks/widget-area/edit/index.js +1 -1
- package/build-module/blocks/widget-area/edit/inner-blocks.js +1 -1
- package/build-module/components/error-boundary/index.js +1 -1
- package/build-module/components/header/index.js +1 -1
- package/build-module/components/header/undo-redo/redo.js +1 -1
- package/build-module/components/header/undo-redo/undo.js +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/index.js +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +1 -1
- package/build-module/components/layout/index.js +1 -1
- package/build-module/components/layout/interface.js +1 -1
- package/build-module/components/layout/unsaved-changes-warning.js +1 -1
- package/build-module/components/layout/unsaved-changes-warning.js.map +1 -1
- package/build-module/components/more-menu/index.js +1 -1
- package/build-module/components/more-menu/tools-more-menu-group.js +1 -1
- package/build-module/components/notices/index.js +1 -1
- package/build-module/components/save-button/index.js +1 -1
- package/build-module/components/secondary-sidebar/index.js +1 -1
- package/build-module/components/secondary-sidebar/inserter-sidebar.js +1 -1
- package/build-module/components/secondary-sidebar/list-view-sidebar.js +1 -1
- package/build-module/components/sidebar/index.js +1 -1
- package/build-module/components/sidebar/widget-areas.js +1 -1
- package/build-module/components/welcome-guide/index.js +1 -1
- package/build-module/components/widget-areas-block-editor-content/index.js +1 -1
- package/build-module/components/widget-areas-block-editor-provider/index.js +3 -3
- package/build-module/components/widget-areas-block-editor-provider/index.js.map +1 -1
- package/build-module/filters/move-to-widget-area.js +1 -1
- package/build-module/index.js +1 -1
- package/build-module/lock-unlock.js +1 -1
- package/build-module/lock-unlock.js.map +1 -1
- package/build-style/style-rtl.css +11 -10
- package/build-style/style.css +11 -10
- package/package.json +28 -28
- package/src/components/layout/unsaved-changes-warning.js +1 -1
- package/src/components/widget-areas-block-editor-provider/index.js +2 -5
- package/src/lock-unlock.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_element","require","_keycodes","KeyCombination","keyCombination","forceAriaLabel","shortcut","modifier","displayShortcutList","character","ariaLabel","shortcutAriaLabel","shortcuts","Array","isArray","createElement","className","map","index","Fragment","key","Shortcut","description","aliases","alias","_default","exports","default"],"sources":["@wordpress/edit-widgets/src/components/keyboard-shortcut-help-modal/shortcut.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Fragment } from '@wordpress/element';\nimport { displayShortcutList, shortcutAriaLabel } from '@wordpress/keycodes';\n\nfunction KeyCombination( { keyCombination, forceAriaLabel } ) {\n\tconst shortcut = keyCombination.modifier\n\t\t? displayShortcutList[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t )\n\t\t: keyCombination.character;\n\tconst ariaLabel = keyCombination.modifier\n\t\t? shortcutAriaLabel[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t )\n\t\t: keyCombination.character;\n\tconst shortcuts = Array.isArray( shortcut ) ? shortcut : [ shortcut ];\n\n\treturn (\n\t\t<kbd\n\t\t\tclassName=\"edit-widgets-keyboard-shortcut-help-modal__shortcut-key-combination\"\n\t\t\taria-label={ forceAriaLabel || ariaLabel }\n\t\t>\n\t\t\t{ shortcuts.map( ( character, index ) => {\n\t\t\t\tif ( character === '+' ) {\n\t\t\t\t\treturn <Fragment key={ index }>{ character }</Fragment>;\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\t<kbd\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\tclassName=\"edit-widgets-keyboard-shortcut-help-modal__shortcut-key\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ character }\n\t\t\t\t\t</kbd>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</kbd>\n\t);\n}\n\nfunction Shortcut( { description, keyCombination, aliases = [], ariaLabel } ) {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"edit-widgets-keyboard-shortcut-help-modal__shortcut-description\">\n\t\t\t\t{ description }\n\t\t\t</div>\n\t\t\t<div className=\"edit-widgets-keyboard-shortcut-help-modal__shortcut-term\">\n\t\t\t\t<KeyCombination\n\t\t\t\t\tkeyCombination={ keyCombination }\n\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t/>\n\t\t\t\t{ aliases.map( ( alias, index ) => (\n\t\t\t\t\t<KeyCombination\n\t\t\t\t\t\tkeyCombination={ alias }\n\t\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default Shortcut;\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_element","require","_keycodes","KeyCombination","keyCombination","forceAriaLabel","shortcut","modifier","displayShortcutList","character","ariaLabel","shortcutAriaLabel","shortcuts","Array","isArray","_react","createElement","className","map","index","Fragment","key","Shortcut","description","aliases","alias","_default","exports","default"],"sources":["@wordpress/edit-widgets/src/components/keyboard-shortcut-help-modal/shortcut.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Fragment } from '@wordpress/element';\nimport { displayShortcutList, shortcutAriaLabel } from '@wordpress/keycodes';\n\nfunction KeyCombination( { keyCombination, forceAriaLabel } ) {\n\tconst shortcut = keyCombination.modifier\n\t\t? displayShortcutList[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t )\n\t\t: keyCombination.character;\n\tconst ariaLabel = keyCombination.modifier\n\t\t? shortcutAriaLabel[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t )\n\t\t: keyCombination.character;\n\tconst shortcuts = Array.isArray( shortcut ) ? shortcut : [ shortcut ];\n\n\treturn (\n\t\t<kbd\n\t\t\tclassName=\"edit-widgets-keyboard-shortcut-help-modal__shortcut-key-combination\"\n\t\t\taria-label={ forceAriaLabel || ariaLabel }\n\t\t>\n\t\t\t{ shortcuts.map( ( character, index ) => {\n\t\t\t\tif ( character === '+' ) {\n\t\t\t\t\treturn <Fragment key={ index }>{ character }</Fragment>;\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\t<kbd\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\tclassName=\"edit-widgets-keyboard-shortcut-help-modal__shortcut-key\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ character }\n\t\t\t\t\t</kbd>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</kbd>\n\t);\n}\n\nfunction Shortcut( { description, keyCombination, aliases = [], ariaLabel } ) {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"edit-widgets-keyboard-shortcut-help-modal__shortcut-description\">\n\t\t\t\t{ description }\n\t\t\t</div>\n\t\t\t<div className=\"edit-widgets-keyboard-shortcut-help-modal__shortcut-term\">\n\t\t\t\t<KeyCombination\n\t\t\t\t\tkeyCombination={ keyCombination }\n\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t/>\n\t\t\t\t{ aliases.map( ( alias, index ) => (\n\t\t\t\t\t<KeyCombination\n\t\t\t\t\t\tkeyCombination={ alias }\n\t\t\t\t\t\tforceAriaLabel={ ari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EAAG;EAC7E,OACC,IAAAK,MAAA,CAAAC,aAAA,EAAAhB,QAAA,CAAAoB,QAAA,QACC,IAAAL,MAAA,CAAAC,aAAA;IAAKC,SAAS,EAAC;EAAiE,GAC7EM,WACE,CAAC,EACN,IAAAR,MAAA,CAAAC,aAAA;IAAKC,SAAS,EAAC;EAA0D,GACxE,IAAAF,MAAA,CAAAC,aAAA,EAACb,cAAc;IACdC,cAAc,EAAGA,cAAgB;IACjCC,cAAc,EAAGK;EAAW,CAC5B,CAAC,EACAc,OAAO,CAACN,GAAG,CAAE,CAAEO,KAAK,EAAEN,KAAK,KAC5B,IAAAJ,MAAA,CAAAC,aAAA,EAACb,cAAc;IACdC,cAAc,EAAGqB,KAAO;IACxBpB,cAAc,EAAGK,SAAW;IAC5BW,GAAG,EAAGF;EAAO,CACb,CACA,CACE,CACJ,CAAC;AAEL;AAAC,IAAAO,QAAA,GAEcJ,QAAQ;AAAAK,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var
|
|
8
|
+
var _react = require("react");
|
|
9
9
|
var _i18n = require("@wordpress/i18n");
|
|
10
10
|
var _data = require("@wordpress/data");
|
|
11
11
|
var _plugins = require("@wordpress/plugins");
|
|
@@ -34,13 +34,13 @@ function Layout({
|
|
|
34
34
|
createErrorNotice((0, _i18n.sprintf)( /* translators: %s: plugin name */
|
|
35
35
|
(0, _i18n.__)('The "%s" plugin has encountered an error and cannot be rendered.'), name));
|
|
36
36
|
}
|
|
37
|
-
return (0,
|
|
37
|
+
return (0, _react.createElement)(_errorBoundary.default, null, (0, _react.createElement)(_widgetAreasBlockEditorProvider.default, {
|
|
38
38
|
blockEditorSettings: blockEditorSettings
|
|
39
|
-
}, (0,
|
|
39
|
+
}, (0, _react.createElement)(_interface.default, {
|
|
40
40
|
blockEditorSettings: blockEditorSettings
|
|
41
|
-
}), (0,
|
|
41
|
+
}), (0, _react.createElement)(_sidebar.default, null), (0, _react.createElement)(_plugins.PluginArea, {
|
|
42
42
|
onError: onPluginAreaError
|
|
43
|
-
}), (0,
|
|
43
|
+
}), (0, _react.createElement)(_unsavedChangesWarning.default, null), (0, _react.createElement)(_welcomeGuide.default, null)));
|
|
44
44
|
}
|
|
45
45
|
var _default = Layout;
|
|
46
46
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_data","_plugins","_notices","_errorBoundary","_interopRequireDefault","_widgetAreasBlockEditorProvider","_sidebar","_interface","_unsavedChangesWarning","_welcomeGuide","Layout","blockEditorSettings","createErrorNotice","useDispatch","noticesStore","onPluginAreaError","name","sprintf","__","
|
|
1
|
+
{"version":3,"names":["_i18n","require","_data","_plugins","_notices","_errorBoundary","_interopRequireDefault","_widgetAreasBlockEditorProvider","_sidebar","_interface","_unsavedChangesWarning","_welcomeGuide","Layout","blockEditorSettings","createErrorNotice","useDispatch","noticesStore","onPluginAreaError","name","sprintf","__","_react","createElement","default","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;AAKA,IAAAI,cAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,+BAAA,GAAAD,sBAAA,CAAAL,OAAA;AACA,IAAAO,QAAA,GAAAF,sBAAA,CAAAL,OAAA;AACA,IAAAQ,UAAA,GAAAH,sBAAA,CAAAL,OAAA;AACA,IAAAS,sBAAA,GAAAJ,sBAAA,CAAAL,OAAA;AACA,IAAAU,aAAA,GAAAL,sBAAA,CAAAL,OAAA;AAhBA;AACA;AACA;;AAMA;AACA;AACA;;AAQA,SAASW,MAAMA,CAAE;EAAEC;AAAoB,CAAC,EAAG;EAC1C,MAAM;IAAEC;EAAkB,CAAC,GAAG,IAAAC,iBAAW,EAAEC,cAAa,CAAC;EAEzD,SAASC,iBAAiBA,CAAEC,IAAI,EAAG;IAClCJ,iBAAiB,CAChB,IAAAK,aAAO,GACN;IACA,IAAAC,QAAE,EACD,kEACD,CAAC,EACDF,IACD,CACD,CAAC;EACF;EAEA,OACC,IAAAG,MAAA,CAAAC,aAAA,EAACjB,cAAA,CAAAkB,OAAa,QACb,IAAAF,MAAA,CAAAC,aAAA,EAACf,+BAAA,CAAAgB,OAA8B;IAC9BV,mBAAmB,EAAGA;EAAqB,GAE3C,IAAAQ,MAAA,CAAAC,aAAA,EAACb,UAAA,CAAAc,OAAS;IAACV,mBAAmB,EAAGA;EAAqB,CAAE,CAAC,EACzD,IAAAQ,MAAA,CAAAC,aAAA,EAACd,QAAA,CAAAe,OAAO,MAAE,CAAC,EACX,IAAAF,MAAA,CAAAC,aAAA,EAACnB,QAAA,CAAAqB,UAAU;IAACC,OAAO,EAAGR;EAAmB,CAAE,CAAC,EAC5C,IAAAI,MAAA,CAAAC,aAAA,EAACZ,sBAAA,CAAAa,OAAqB,MAAE,CAAC,EACzB,IAAAF,MAAA,CAAAC,aAAA,EAACX,aAAA,CAAAY,OAAY,MAAE,CACgB,CAClB,CAAC;AAElB;AAAC,IAAAG,QAAA,GAEcd,MAAM;AAAAe,OAAA,CAAAJ,OAAA,GAAAG,QAAA"}
|
|
@@ -5,9 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var
|
|
8
|
+
var _react = require("react");
|
|
9
9
|
var _compose = require("@wordpress/compose");
|
|
10
10
|
var _blockEditor = require("@wordpress/block-editor");
|
|
11
|
+
var _element = require("@wordpress/element");
|
|
11
12
|
var _data = require("@wordpress/data");
|
|
12
13
|
var _interface = require("@wordpress/interface");
|
|
13
14
|
var _i18n = require("@wordpress/i18n");
|
|
@@ -76,26 +77,26 @@ function Interface({
|
|
|
76
77
|
}, [isInserterOpened, isListViewOpened, isHugeViewport]);
|
|
77
78
|
const secondarySidebarLabel = isListViewOpened ? (0, _i18n.__)('List View') : (0, _i18n.__)('Block Library');
|
|
78
79
|
const hasSecondarySidebar = isListViewOpened || isInserterOpened;
|
|
79
|
-
return (0,
|
|
80
|
+
return (0, _react.createElement)(_interface.InterfaceSkeleton, {
|
|
80
81
|
labels: {
|
|
81
82
|
...interfaceLabels,
|
|
82
83
|
secondarySidebar: secondarySidebarLabel
|
|
83
84
|
},
|
|
84
|
-
header: (0,
|
|
85
|
+
header: (0, _react.createElement)(_header.default, {
|
|
85
86
|
setListViewToggleElement: setListViewToggleElement
|
|
86
87
|
}),
|
|
87
|
-
secondarySidebar: hasSecondarySidebar && (0,
|
|
88
|
+
secondarySidebar: hasSecondarySidebar && (0, _react.createElement)(_secondarySidebar.default, {
|
|
88
89
|
listViewToggleElement: listViewToggleElement
|
|
89
90
|
}),
|
|
90
|
-
sidebar: hasSidebarEnabled && (0,
|
|
91
|
+
sidebar: hasSidebarEnabled && (0, _react.createElement)(_interface.ComplementaryArea.Slot, {
|
|
91
92
|
scope: "core/edit-widgets"
|
|
92
93
|
}),
|
|
93
|
-
content: (0,
|
|
94
|
+
content: (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_widgetAreasBlockEditorContent.default, {
|
|
94
95
|
blockEditorSettings: blockEditorSettings
|
|
95
96
|
})),
|
|
96
|
-
footer: hasBlockBreadCrumbsEnabled && !isMobileViewport && (0,
|
|
97
|
+
footer: hasBlockBreadCrumbsEnabled && !isMobileViewport && (0, _react.createElement)("div", {
|
|
97
98
|
className: "edit-widgets-layout__footer"
|
|
98
|
-
}, (0,
|
|
99
|
+
}, (0, _react.createElement)(_blockEditor.BlockBreadcrumb, {
|
|
99
100
|
rootLabelText: (0, _i18n.__)('Widgets')
|
|
100
101
|
})),
|
|
101
102
|
shortcuts: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_compose","require","_blockEditor","_element","_data","_interface","_i18n","_keyboardShortcuts","_preferences","_header","_interopRequireDefault","_widgetAreasBlockEditorContent","_store","_secondarySidebar","interfaceLabels","header","__","body","sidebar","footer","Interface","blockEditorSettings","isMobileViewport","useViewportMatch","isHugeViewport","setIsInserterOpened","setIsListViewOpened","closeGeneralSidebar","useDispatch","editWidgetsStore","hasBlockBreadCrumbsEnabled","hasSidebarEnabled","isInserterOpened","isListViewOpened","previousShortcut","nextShortcut","useSelect","select","interfaceStore","getActiveComplementaryArea","name","preferencesStore","get","keyboardShortcutsStore","getAllShortcutKeyCombinations","listViewToggleElement","setListViewToggleElement","useState","useEffect","secondarySidebarLabel","hasSecondarySidebar","_react","createElement","InterfaceSkeleton","labels","secondarySidebar","default","ComplementaryArea","Slot","scope","content","Fragment","className","BlockBreadcrumb","rootLabelText","shortcuts","previous","next","_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, useState } 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 keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\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\tpreviousShortcut,\n\t\tnextShortcut,\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\tpreviousShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations(\n\t\t\t\t'core/edit-widgets/previous-region'\n\t\t\t),\n\t\t\tnextShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations( 'core/edit-widgets/next-region' ),\n\t\t} ),\n\t\t[]\n\t);\n\n\tconst [ listViewToggleElement, setListViewToggleElement ] =\n\t\tuseState( null );\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={\n\t\t\t\t<Header setListViewToggleElement={ setListViewToggleElement } />\n\t\t\t}\n\t\t\tsecondarySidebar={\n\t\t\t\thasSecondarySidebar && (\n\t\t\t\t\t<SecondarySidebar\n\t\t\t\t\t\tlistViewToggleElement={ listViewToggleElement }\n\t\t\t\t\t/>\n\t\t\t\t)\n\t\t\t}\n\t\t\tsidebar={\n\t\t\t\thasSidebarEnabled && (\n\t\t\t\t\t<ComplementaryArea.Slot scope=\"core/edit-widgets\" />\n\t\t\t\t)\n\t\t\t}\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\tshortcuts={ {\n\t\t\t\tprevious: previousShortcut,\n\t\t\t\tnext: nextShortcut,\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,kBAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AAKA,IAAAQ,OAAA,GAAAC,sBAAA,CAAAT,OAAA;AACA,IAAAU,8BAAA,GAAAD,sBAAA,CAAAT,OA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qB,EAAGA;IAAuB,CAC/C,CAEF;IACD3B,OAAO,EACNa,iBAAiB,IAChB,IAAAoB,MAAA,CAAAC,aAAA,EAAC/C,UAAA,CAAAoD,iBAAiB,CAACC,IAAI;MAACC,KAAK,EAAC;IAAmB,CAAE,CAEpD;IACDC,OAAO,EACN,IAAAT,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAU,QAAA,QACC,IAAAV,MAAA,CAAAC,aAAA,EAACzC,8BAAA,CAAA6C,OAA6B;MAC7BnC,mBAAmB,EAAGA;IAAqB,CAC3C,CACA,CACF;IACDF,MAAM,EACLW,0BAA0B,IAC1B,CAAER,gBAAgB,IACjB,IAAA6B,MAAA,CAAAC,aAAA;MAAKU,SAAS,EAAC;IAA6B,GAC3C,IAAAX,MAAA,CAAAC,aAAA,EAAClD,YAAA,CAAA6D,eAAe;MAACC,aAAa,EAAG,IAAAhD,QAAE,EAAE,SAAU;IAAG,CAAE,CAChD,CAEN;IACDiD,SAAS,EAAG;MACXC,QAAQ,EAAEhC,gBAAgB;MAC1BiC,IAAI,EAAEhC;IACP;EAAG,CACH,CAAC;AAEJ;AAAC,IAAAiC,QAAA,GAEchD,SAAS;AAAAiD,OAAA,CAAAb,OAAA,GAAAY,QAAA"}
|
|
@@ -22,7 +22,7 @@ var _store = require("../../store");
|
|
|
22
22
|
* This is a duplicate of the component implemented in the editor package.
|
|
23
23
|
* Duplicated here as edit-widgets doesn't depend on editor.
|
|
24
24
|
*
|
|
25
|
-
* @return {
|
|
25
|
+
* @return {Component} The component.
|
|
26
26
|
*/
|
|
27
27
|
function UnsavedChangesWarning() {
|
|
28
28
|
const isDirty = (0, _data.useSelect)(select => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_element","_data","_store","UnsavedChangesWarning","isDirty","useSelect","select","getEditedWidgetAreas","editWidgetsStore","editedWidgetAreas","length","useEffect","warnIfUnsavedChanges","event","returnValue","__","window","addEventListener","removeEventListener"],"sources":["@wordpress/edit-widgets/src/components/layout/unsaved-changes-warning.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useEffect } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\n/**\n * Warns the user if there are unsaved changes before leaving the editor.\n *\n * This is a duplicate of the component implemented in the editor package.\n * Duplicated here as edit-widgets doesn't depend on editor.\n *\n * @return {
|
|
1
|
+
{"version":3,"names":["_i18n","require","_element","_data","_store","UnsavedChangesWarning","isDirty","useSelect","select","getEditedWidgetAreas","editWidgetsStore","editedWidgetAreas","length","useEffect","warnIfUnsavedChanges","event","returnValue","__","window","addEventListener","removeEventListener"],"sources":["@wordpress/edit-widgets/src/components/layout/unsaved-changes-warning.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useEffect } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\n/**\n * Warns the user if there are unsaved changes before leaving the editor.\n *\n * This is a duplicate of the component implemented in the editor package.\n * Duplicated here as edit-widgets doesn't depend on editor.\n *\n * @return {Component} The component.\n */\nexport default function UnsavedChangesWarning() {\n\tconst isDirty = useSelect( ( select ) => {\n\t\tconst { getEditedWidgetAreas } = select( editWidgetsStore );\n\t\tconst editedWidgetAreas = getEditedWidgetAreas();\n\n\t\treturn editedWidgetAreas?.length > 0;\n\t}, [] );\n\n\tuseEffect( () => {\n\t\t/**\n\t\t * Warns the user if there are unsaved changes before leaving the editor.\n\t\t *\n\t\t * @param {Event} event `beforeunload` event.\n\t\t *\n\t\t * @return {string | undefined} Warning prompt message, if unsaved changes exist.\n\t\t */\n\t\tconst warnIfUnsavedChanges = ( event ) => {\n\t\t\tif ( isDirty ) {\n\t\t\t\tevent.returnValue = __(\n\t\t\t\t\t'You have unsaved changes. If you proceed, they will be lost.'\n\t\t\t\t);\n\t\t\t\treturn event.returnValue;\n\t\t\t}\n\t\t};\n\n\t\twindow.addEventListener( 'beforeunload', warnIfUnsavedChanges );\n\n\t\treturn () => {\n\t\t\twindow.removeEventListener( 'beforeunload', warnIfUnsavedChanges );\n\t\t};\n\t}, [ isDirty ] );\n\n\treturn null;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAKA,IAAAG,MAAA,GAAAH,OAAA;AAVA;AACA;AACA;;AAKA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASI,qBAAqBA,CAAA,EAAG;EAC/C,MAAMC,OAAO,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IACxC,MAAM;MAAEC;IAAqB,CAAC,GAAGD,MAAM,CAAEE,YAAiB,CAAC;IAC3D,MAAMC,iBAAiB,GAAGF,oBAAoB,CAAC,CAAC;IAEhD,OAAOE,iBAAiB,EAAEC,MAAM,GAAG,CAAC;EACrC,CAAC,EAAE,EAAG,CAAC;EAEP,IAAAC,kBAAS,EAAE,MAAM;IAChB;AACF;AACA;AACA;AACA;AACA;AACA;IACE,MAAMC,oBAAoB,GAAKC,KAAK,IAAM;MACzC,IAAKT,OAAO,EAAG;QACdS,KAAK,CAACC,WAAW,GAAG,IAAAC,QAAE,EACrB,8DACD,CAAC;QACD,OAAOF,KAAK,CAACC,WAAW;MACzB;IACD,CAAC;IAEDE,MAAM,CAACC,gBAAgB,CAAE,cAAc,EAAEL,oBAAqB,CAAC;IAE/D,OAAO,MAAM;MACZI,MAAM,CAACE,mBAAmB,CAAE,cAAc,EAAEN,oBAAqB,CAAC;IACnE,CAAC;EACF,CAAC,EAAE,CAAER,OAAO,CAAG,CAAC;EAEhB,OAAO,IAAI;AACZ"}
|
|
@@ -5,8 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = MoreMenu;
|
|
8
|
-
var
|
|
8
|
+
var _react = require("react");
|
|
9
9
|
var _components = require("@wordpress/components");
|
|
10
|
+
var _element = require("@wordpress/element");
|
|
10
11
|
var _i18n = require("@wordpress/i18n");
|
|
11
12
|
var _icons = require("@wordpress/icons");
|
|
12
13
|
var _interface = require("@wordpress/interface");
|
|
@@ -29,61 +30,61 @@ function MoreMenu() {
|
|
|
29
30
|
const toggleKeyboardShortcutsModal = () => setIsKeyboardShortcutsModalVisible(!isKeyboardShortcutsModalActive);
|
|
30
31
|
(0, _keyboardShortcuts.useShortcut)('core/edit-widgets/keyboard-shortcuts', toggleKeyboardShortcutsModal);
|
|
31
32
|
const isLargeViewport = (0, _compose.useViewportMatch)('medium');
|
|
32
|
-
return (0,
|
|
33
|
+
return (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_interface.MoreMenuDropdown, null, onClose => (0, _react.createElement)(_react.Fragment, null, isLargeViewport && (0, _react.createElement)(_components.MenuGroup, {
|
|
33
34
|
label: (0, _i18n._x)('View', 'noun')
|
|
34
|
-
}, (0,
|
|
35
|
+
}, (0, _react.createElement)(_preferences.PreferenceToggleMenuItem, {
|
|
35
36
|
scope: "core/edit-widgets",
|
|
36
37
|
name: "fixedToolbar",
|
|
37
38
|
label: (0, _i18n.__)('Top toolbar'),
|
|
38
39
|
info: (0, _i18n.__)('Access all block and document tools in a single place'),
|
|
39
40
|
messageActivated: (0, _i18n.__)('Top toolbar activated'),
|
|
40
41
|
messageDeactivated: (0, _i18n.__)('Top toolbar deactivated')
|
|
41
|
-
})), (0,
|
|
42
|
+
})), (0, _react.createElement)(_components.MenuGroup, {
|
|
42
43
|
label: (0, _i18n.__)('Tools')
|
|
43
|
-
}, (0,
|
|
44
|
+
}, (0, _react.createElement)(_components.MenuItem, {
|
|
44
45
|
onClick: () => {
|
|
45
46
|
setIsKeyboardShortcutsModalVisible(true);
|
|
46
47
|
},
|
|
47
48
|
shortcut: _keycodes.displayShortcut.access('h')
|
|
48
|
-
}, (0, _i18n.__)('Keyboard shortcuts')), (0,
|
|
49
|
+
}, (0, _i18n.__)('Keyboard shortcuts')), (0, _react.createElement)(_preferences.PreferenceToggleMenuItem, {
|
|
49
50
|
scope: "core/edit-widgets",
|
|
50
51
|
name: "welcomeGuide",
|
|
51
52
|
label: (0, _i18n.__)('Welcome Guide')
|
|
52
|
-
}), (0,
|
|
53
|
+
}), (0, _react.createElement)(_components.MenuItem, {
|
|
53
54
|
role: "menuitem",
|
|
54
55
|
icon: _icons.external,
|
|
55
56
|
href: (0, _i18n.__)('https://wordpress.org/documentation/article/block-based-widgets-editor/'),
|
|
56
57
|
target: "_blank",
|
|
57
58
|
rel: "noopener noreferrer"
|
|
58
|
-
}, (0, _i18n.__)('Help'), (0,
|
|
59
|
+
}, (0, _i18n.__)('Help'), (0, _react.createElement)(_components.VisuallyHidden, {
|
|
59
60
|
as: "span"
|
|
60
61
|
}, /* translators: accessibility text */
|
|
61
|
-
(0, _i18n.__)('(opens in a new tab)'))), (0,
|
|
62
|
+
(0, _i18n.__)('(opens in a new tab)'))), (0, _react.createElement)(_toolsMoreMenuGroup.default.Slot, {
|
|
62
63
|
fillProps: {
|
|
63
64
|
onClose
|
|
64
65
|
}
|
|
65
|
-
})), (0,
|
|
66
|
+
})), (0, _react.createElement)(_components.MenuGroup, {
|
|
66
67
|
label: (0, _i18n.__)('Preferences')
|
|
67
|
-
}, (0,
|
|
68
|
+
}, (0, _react.createElement)(_preferences.PreferenceToggleMenuItem, {
|
|
68
69
|
scope: "core/edit-widgets",
|
|
69
70
|
name: "keepCaretInsideBlock",
|
|
70
71
|
label: (0, _i18n.__)('Contain text cursor inside block'),
|
|
71
72
|
info: (0, _i18n.__)('Aids screen readers by stopping text caret from leaving blocks.'),
|
|
72
73
|
messageActivated: (0, _i18n.__)('Contain text cursor inside block activated'),
|
|
73
74
|
messageDeactivated: (0, _i18n.__)('Contain text cursor inside block deactivated')
|
|
74
|
-
}), (0,
|
|
75
|
+
}), (0, _react.createElement)(_preferences.PreferenceToggleMenuItem, {
|
|
75
76
|
scope: "core/edit-widgets",
|
|
76
77
|
name: "themeStyles",
|
|
77
78
|
info: (0, _i18n.__)('Make the editor look like your theme.'),
|
|
78
79
|
label: (0, _i18n.__)('Use theme styles')
|
|
79
|
-
}), isLargeViewport && (0,
|
|
80
|
+
}), isLargeViewport && (0, _react.createElement)(_preferences.PreferenceToggleMenuItem, {
|
|
80
81
|
scope: "core/edit-widgets",
|
|
81
82
|
name: "showBlockBreadcrumbs",
|
|
82
83
|
label: (0, _i18n.__)('Display block breadcrumbs'),
|
|
83
84
|
info: (0, _i18n.__)('Shows block breadcrumbs at the bottom of the editor.'),
|
|
84
85
|
messageActivated: (0, _i18n.__)('Display block breadcrumbs activated'),
|
|
85
86
|
messageDeactivated: (0, _i18n.__)('Display block breadcrumbs deactivated')
|
|
86
|
-
})))), (0,
|
|
87
|
+
})))), (0, _react.createElement)(_keyboardShortcutHelpModal.default, {
|
|
87
88
|
isModalActive: isKeyboardShortcutsModalActive,
|
|
88
89
|
toggleModal: toggleKeyboardShortcutsModal
|
|
89
90
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_components","require","_element","_i18n","_icons","_interface","_preferences","_keycodes","_keyboardShortcuts","_compose","_keyboardShortcutHelpModal","_interopRequireDefault","_toolsMoreMenuGroup","MoreMenu","isKeyboardShortcutsModalActive","setIsKeyboardShortcutsModalVisible","useState","toggleKeyboardShortcutsModal","useShortcut","isLargeViewport","useViewportMatch","_react","createElement","Fragment","MoreMenuDropdown","onClose","MenuGroup","label","_x","PreferenceToggleMenuItem","scope","name","__","info","messageActivated","messageDeactivated","MenuItem","onClick","shortcut","displayShortcut","access","role","icon","external","href","target","rel","VisuallyHidden","as","default","Slot","fillProps","isModalActive","toggleModal"],"sources":["@wordpress/edit-widgets/src/components/more-menu/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { MenuGroup, MenuItem, VisuallyHidden } from '@wordpress/components';\nimport { useState } from '@wordpress/element';\nimport { __, _x } from '@wordpress/i18n';\nimport { external } from '@wordpress/icons';\nimport { MoreMenuDropdown } from '@wordpress/interface';\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<MoreMenuDropdown>\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</MoreMenuDropdown>\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"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AACA,IAAAO,kBAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AAKA,IAAAS,0BAAA,GAAAC,sBAAA,CAAAV,OAAA;AACA,IAAAW,mBAAA,GAAAD,sBAAA,CAAAV,OAAA;AAjBA;AACA;AACA;;AAWA;AACA;AACA;;AAIe,SAASY,QAAQA,CAAA,EAAG;EAClC,MAAM,CACLC,8BAA8B,EAC9BC,kCAAkC,CAClC,GAAG,IAAAC,iBAAQ,EAAE,KAAM,CAAC;EACrB,MAAMC,4BAA4B,GAAGA,CAAA,KACpCF,kCAAkC,CAAE,CAAED,8BAA+B,CAAC;EAEvE,IAAAI,8BAAW,EACV,sCAAsC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AC,EACAb,eAAe,IAChB,IAAAE,MAAA,CAAAC,aAAA,EAAChB,YAAA,CAAAuB,wBAAwB;IACxBC,KAAK,EAAC,mBAAmB;IACzBC,IAAI,EAAC,sBAAsB;IAC3BJ,KAAK,EAAG,IAAAK,QAAE,EAAE,2BAA4B,CAAG;IAC3CC,IAAI,EAAG,IAAAD,QAAE,EACR,sDACD,CAAG;IACHE,gBAAgB,EAAG,IAAAF,QAAE,EACpB,qCACD,CAAG;IACHG,kBAAkB,EAAG,IAAAH,QAAE,EACtB,uCACD;EAAG,CACH,CAEQ,CACV,CAEc,CAAC,EACnB,IAAAX,MAAA,CAAAC,aAAA,EAACZ,0BAAA,CAAAuC,OAAyB;IACzBG,aAAa,EAAGtC,8BAAgC;IAChDuC,WAAW,EAAGpC;EAA8B,CAC5C,CACA,CAAC;AAEL"}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _react = require("react");
|
|
8
8
|
var _components = require("@wordpress/components");
|
|
9
9
|
/**
|
|
10
10
|
* WordPress dependencies
|
|
@@ -16,7 +16,7 @@ const {
|
|
|
16
16
|
} = (0, _components.createSlotFill)('EditWidgetsToolsMoreMenuGroup');
|
|
17
17
|
ToolsMoreMenuGroup.Slot = ({
|
|
18
18
|
fillProps
|
|
19
|
-
}) => (0,
|
|
19
|
+
}) => (0, _react.createElement)(Slot, {
|
|
20
20
|
fillProps: fillProps
|
|
21
21
|
}, fills => fills.length > 0 && fills);
|
|
22
22
|
var _default = ToolsMoreMenuGroup;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","Fill","ToolsMoreMenuGroup","Slot","createSlotFill","fillProps","
|
|
1
|
+
{"version":3,"names":["_components","require","Fill","ToolsMoreMenuGroup","Slot","createSlotFill","fillProps","_react","createElement","fills","length","_default","exports","default"],"sources":["@wordpress/edit-widgets/src/components/more-menu/tools-more-menu-group.js"],"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"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGA,MAAM;EAAEC,IAAI,EAAEC,kBAAkB;EAAEC;AAAK,CAAC,GAAG,IAAAC,0BAAc,EACxD,+BACD,CAAC;AAEDF,kBAAkB,CAACC,IAAI,GAAG,CAAE;EAAEE;AAAU,CAAC,KACxC,IAAAC,MAAA,CAAAC,aAAA,EAACJ,IAAI;EAACE,SAAS,EAAGA;AAAW,GACxBG,KAAK,IAAMA,KAAK,CAACC,MAAM,GAAG,CAAC,IAAID,KAC9B,CACN;AAAC,IAAAE,QAAA,GAEaR,kBAAkB;AAAAS,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _react = require("react");
|
|
8
8
|
var _components = require("@wordpress/components");
|
|
9
9
|
var _data = require("@wordpress/data");
|
|
10
10
|
var _notices = require("@wordpress/notices");
|
|
@@ -34,14 +34,14 @@ function Notices() {
|
|
|
34
34
|
const snackbarNotices = notices.filter(({
|
|
35
35
|
type
|
|
36
36
|
}) => type === 'snackbar');
|
|
37
|
-
return (0,
|
|
37
|
+
return (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_components.NoticeList, {
|
|
38
38
|
notices: nonDismissibleNotices,
|
|
39
39
|
className: "edit-widgets-notices__pinned"
|
|
40
|
-
}), (0,
|
|
40
|
+
}), (0, _react.createElement)(_components.NoticeList, {
|
|
41
41
|
notices: dismissibleNotices,
|
|
42
42
|
className: "edit-widgets-notices__dismissible",
|
|
43
43
|
onRemove: removeNotice
|
|
44
|
-
}), (0,
|
|
44
|
+
}), (0, _react.createElement)(_components.SnackbarList, {
|
|
45
45
|
notices: snackbarNotices,
|
|
46
46
|
className: "edit-widgets-notices__snackbar",
|
|
47
47
|
onRemove: removeNotice
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_data","_notices","Notices","removeNotice","useDispatch","noticesStore","notices","useSelect","select","getNotices","dismissibleNotices","filter","isDismissible","type","nonDismissibleNotices","snackbarNotices","
|
|
1
|
+
{"version":3,"names":["_components","require","_data","_notices","Notices","removeNotice","useDispatch","noticesStore","notices","useSelect","select","getNotices","dismissibleNotices","filter","isDismissible","type","nonDismissibleNotices","snackbarNotices","_react","createElement","Fragment","NoticeList","className","onRemove","SnackbarList","_default","exports","default"],"sources":["@wordpress/edit-widgets/src/components/notices/index.js"],"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\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.filter(\n\t\t( { type } ) => type === 'snackbar'\n\t);\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"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AALA;AACA;AACA;;AAKA,SAASG,OAAOA,CAAA,EAAG;EAClB,MAAM;IAAEC;EAAa,CAAC,GAAG,IAAAC,iBAAW,EAAEC,cAAa,CAAC;EACpD,MAAM;IAAEC;EAAQ,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IAC5C,OAAO;MACNF,OAAO,EAAEE,MAAM,CAAEH,cAAa,CAAC,CAACI,UAAU,CAAC;IAC5C,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,MAAMC,kBAAkB,GAAGJ,OAAO,CAACK,MAAM,CACxC,CAAE;IAAEC,aAAa;IAAEC;EAAK,CAAC,KAAMD,aAAa,IAAIC,IAAI,KAAK,SAC1D,CAAC;EACD,MAAMC,qBAAqB,GAAGR,OAAO,CAACK,MAAM,CAC3C,CAAE;IAAEC,aAAa;IAAEC;EAAK,CAAC,KAAM,CAAED,aAAa,IAAIC,IAAI,KAAK,SAC5D,CAAC;EACD,MAAME,eAAe,GAAGT,OAAO,CAACK,MAAM,CACrC,CAAE;IAAEE;EAAK,CAAC,KAAMA,IAAI,KAAK,UAC1B,CAAC;EAED,OACC,IAAAG,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAE,QAAA,QACC,IAAAF,MAAA,CAAAC,aAAA,EAACnB,WAAA,CAAAqB,UAAU;IACVb,OAAO,EAAGQ,qBAAuB;IACjCM,SAAS,EAAC;EAA8B,CACxC,CAAC,EACF,IAAAJ,MAAA,CAAAC,aAAA,EAACnB,WAAA,CAAAqB,UAAU;IACVb,OAAO,EAAGI,kBAAoB;IAC9BU,SAAS,EAAC,mCAAmC;IAC7CC,QAAQ,EAAGlB;EAAc,CACzB,CAAC,EACF,IAAAa,MAAA,CAAAC,aAAA,EAACnB,WAAA,CAAAwB,YAAY;IACZhB,OAAO,EAAGS,eAAiB;IAC3BK,SAAS,EAAC,gCAAgC;IAC1CC,QAAQ,EAAGlB;EAAc,CACzB,CACA,CAAC;AAEL;AAAC,IAAAoB,QAAA,GAEcrB,OAAO;AAAAsB,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _react = require("react");
|
|
8
8
|
var _components = require("@wordpress/components");
|
|
9
9
|
var _i18n = require("@wordpress/i18n");
|
|
10
10
|
var _data = require("@wordpress/data");
|
|
@@ -34,7 +34,7 @@ function SaveButton() {
|
|
|
34
34
|
const {
|
|
35
35
|
saveEditedWidgetAreas
|
|
36
36
|
} = (0, _data.useDispatch)(_store.store);
|
|
37
|
-
return (0,
|
|
37
|
+
return (0, _react.createElement)(_components.Button, {
|
|
38
38
|
variant: "primary",
|
|
39
39
|
isBusy: isSaving,
|
|
40
40
|
"aria-disabled": isSaving,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_i18n","_data","_store","SaveButton","hasEditedWidgetAreaIds","isSaving","useSelect","select","getEditedWidgetAreas","isSavingWidgetAreas","editWidgetsStore","length","saveEditedWidgetAreas","useDispatch","
|
|
1
|
+
{"version":3,"names":["_components","require","_i18n","_data","_store","SaveButton","hasEditedWidgetAreaIds","isSaving","useSelect","select","getEditedWidgetAreas","isSavingWidgetAreas","editWidgetsStore","length","saveEditedWidgetAreas","useDispatch","_react","createElement","Button","variant","isBusy","onClick","undefined","disabled","__","_default","exports","default"],"sources":["@wordpress/edit-widgets/src/components/save-button/index.js"],"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 } = useSelect( ( select ) => {\n\t\tconst { getEditedWidgetAreas, isSavingWidgetAreas } =\n\t\t\tselect( editWidgetsStore );\n\n\t\treturn {\n\t\t\thasEditedWidgetAreaIds: getEditedWidgetAreas()?.length > 0,\n\t\t\tisSaving: isSavingWidgetAreas(),\n\t\t};\n\t}, [] );\n\tconst { saveEditedWidgetAreas } = useDispatch( editWidgetsStore );\n\n\treturn (\n\t\t<Button\n\t\t\tvariant=\"primary\"\n\t\t\tisBusy={ isSaving }\n\t\t\taria-disabled={ isSaving }\n\t\t\tonClick={ isSaving ? undefined : saveEditedWidgetAreas }\n\t\t\tdisabled={ ! hasEditedWidgetAreaIds }\n\t\t>\n\t\t\t{ isSaving ? __( 'Saving…' ) : __( 'Update' ) }\n\t\t</Button>\n\t);\n}\n\nexport default SaveButton;\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAKA,IAAAG,MAAA,GAAAH,OAAA;AAVA;AACA;AACA;;AAKA;AACA;AACA;;AAGA,SAASI,UAAUA,CAAA,EAAG;EACrB,MAAM;IAAEC,sBAAsB;IAAEC;EAAS,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IACrE,MAAM;MAAEC,oBAAoB;MAAEC;IAAoB,CAAC,GAClDF,MAAM,CAAEG,YAAiB,CAAC;IAE3B,OAAO;MACNN,sBAAsB,EAAEI,oBAAoB,CAAC,CAAC,EAAEG,MAAM,GAAG,CAAC;MAC1DN,QAAQ,EAAEI,mBAAmB,CAAC;IAC/B,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EACP,MAAM;IAAEG;EAAsB,CAAC,GAAG,IAAAC,iBAAW,EAAEH,YAAiB,CAAC;EAEjE,OACC,IAAAI,MAAA,CAAAC,aAAA,EAACjB,WAAA,CAAAkB,MAAM;IACNC,OAAO,EAAC,SAAS;IACjBC,MAAM,EAAGb,QAAU;IACnB,iBAAgBA,QAAU;IAC1Bc,OAAO,EAAGd,QAAQ,GAAGe,SAAS,GAAGR,qBAAuB;IACxDS,QAAQ,EAAG,CAAEjB;EAAwB,GAEnCC,QAAQ,GAAG,IAAAiB,QAAE,EAAE,SAAU,CAAC,GAAG,IAAAA,QAAE,EAAE,QAAS,CACrC,CAAC;AAEX;AAAC,IAAAC,QAAA,GAEcpB,UAAU;AAAAqB,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = SecondarySidebar;
|
|
8
|
-
var
|
|
8
|
+
var _react = require("react");
|
|
9
9
|
var _data = require("@wordpress/data");
|
|
10
10
|
var _store = require("../../store");
|
|
11
11
|
var _inserterSidebar = _interopRequireDefault(require("./inserter-sidebar"));
|
|
@@ -39,10 +39,10 @@ function SecondarySidebar({
|
|
|
39
39
|
};
|
|
40
40
|
}, []);
|
|
41
41
|
if (isInserterOpen) {
|
|
42
|
-
return (0,
|
|
42
|
+
return (0, _react.createElement)(_inserterSidebar.default, null);
|
|
43
43
|
}
|
|
44
44
|
if (isListViewOpen) {
|
|
45
|
-
return (0,
|
|
45
|
+
return (0, _react.createElement)(_listViewSidebar.default, {
|
|
46
46
|
listViewToggleElement: listViewToggleElement
|
|
47
47
|
});
|
|
48
48
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_data","require","_store","_inserterSidebar","_interopRequireDefault","_listViewSidebar","SecondarySidebar","listViewToggleElement","isInserterOpen","isListViewOpen","useSelect","select","isInserterOpened","isListViewOpened","editWidgetsStore","
|
|
1
|
+
{"version":3,"names":["_data","require","_store","_inserterSidebar","_interopRequireDefault","_listViewSidebar","SecondarySidebar","listViewToggleElement","isInserterOpen","isListViewOpen","useSelect","select","isInserterOpened","isListViewOpened","editWidgetsStore","_react","createElement","default"],"sources":["@wordpress/edit-widgets/src/components/secondary-sidebar/index.js"],"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( { listViewToggleElement } ) {\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 (\n\t\t\t<ListViewSidebar listViewToggleElement={ listViewToggleElement } />\n\t\t);\n\t}\n\treturn null;\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAIA,IAAAC,MAAA,GAAAD,OAAA;AAKA,IAAAE,gBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,gBAAA,GAAAD,sBAAA,CAAAH,OAAA;AAbA;AACA;AACA;;AAEA;AACA;AACA;;AAGA;AACA;AACA;;AAIe,SAASK,gBAAgBA,CAAE;EAAEC;AAAsB,CAAC,EAAG;EACrE,MAAM;IAAEC,cAAc;IAAEC;EAAe,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IACnE,MAAM;MAAEC,gBAAgB;MAAEC;IAAiB,CAAC,GAC3CF,MAAM,CAAEG,YAAiB,CAAC;IAC3B,OAAO;MACNN,cAAc,EAAEI,gBAAgB,CAAC,CAAC;MAClCH,cAAc,EAAEI,gBAAgB,CAAC;IAClC,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,IAAKL,cAAc,EAAG;IACrB,OAAO,IAAAO,MAAA,CAAAC,aAAA,EAACb,gBAAA,CAAAc,OAAe,MAAE,CAAC;EAC3B;EACA,IAAKR,cAAc,EAAG;IACrB,OACC,IAAAM,MAAA,CAAAC,aAAA,EAACX,gBAAA,CAAAY,OAAe;MAACV,qBAAqB,EAAGA;IAAuB,CAAE,CAAC;EAErE;EACA,OAAO,IAAI;AACZ"}
|
|
@@ -5,11 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = InserterSidebar;
|
|
8
|
-
var
|
|
8
|
+
var _react = require("react");
|
|
9
9
|
var _components = require("@wordpress/components");
|
|
10
10
|
var _icons = require("@wordpress/icons");
|
|
11
11
|
var _blockEditor = require("@wordpress/block-editor");
|
|
12
12
|
var _compose = require("@wordpress/compose");
|
|
13
|
+
var _element = require("@wordpress/element");
|
|
13
14
|
var _data = require("@wordpress/data");
|
|
14
15
|
var _i18n = require("@wordpress/i18n");
|
|
15
16
|
var _useWidgetLibraryInsertionPoint = _interopRequireDefault(require("../../hooks/use-widget-library-insertion-point"));
|
|
@@ -43,19 +44,19 @@ function InserterSidebar() {
|
|
|
43
44
|
(0, _element.useEffect)(() => {
|
|
44
45
|
libraryRef.current.focusSearch();
|
|
45
46
|
}, []);
|
|
46
|
-
return (0,
|
|
47
|
+
return (0, _react.createElement)("div", {
|
|
47
48
|
ref: inserterDialogRef,
|
|
48
49
|
...inserterDialogProps,
|
|
49
50
|
className: "edit-widgets-layout__inserter-panel"
|
|
50
|
-
}, (0,
|
|
51
|
+
}, (0, _react.createElement)(TagName, {
|
|
51
52
|
className: "edit-widgets-layout__inserter-panel-header"
|
|
52
|
-
}, (0,
|
|
53
|
+
}, (0, _react.createElement)(_components.Button, {
|
|
53
54
|
icon: _icons.close,
|
|
54
55
|
onClick: closeInserter,
|
|
55
56
|
label: (0, _i18n.__)('Close block inserter')
|
|
56
|
-
})), (0,
|
|
57
|
+
})), (0, _react.createElement)("div", {
|
|
57
58
|
className: "edit-widgets-layout__inserter-panel-content"
|
|
58
|
-
}, (0,
|
|
59
|
+
}, (0, _react.createElement)(_blockEditor.__experimentalLibrary, {
|
|
59
60
|
showInserterHelpPanel: true,
|
|
60
61
|
shouldFocusBlock: isMobileViewport,
|
|
61
62
|
rootClientId: rootClientId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_components","require","_icons","_blockEditor","_compose","_element","_data","_i18n","_useWidgetLibraryInsertionPoint","_interopRequireDefault","_store","InserterSidebar","isMobileViewport","useViewportMatch","rootClientId","insertionIndex","useWidgetLibraryInsertionPoint","setIsInserterOpened","useDispatch","editWidgetsStore","closeInserter","useCallback","TagName","VisuallyHidden","inserterDialogRef","inserterDialogProps","useDialog","onClose","focusOnMount","libraryRef","useRef","useEffect","current","focusSearch","_react","createElement","ref","className","Button","icon","close","onClick","label","__","__experimentalLibrary","showInserterHelpPanel","shouldFocusBlock","__experimentalInsertionIndex"],"sources":["@wordpress/edit-widgets/src/components/secondary-sidebar/inserter-sidebar.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Button, VisuallyHidden } from '@wordpress/components';\nimport { close } from '@wordpress/icons';\nimport { __experimentalLibrary as Library } from '@wordpress/block-editor';\nimport {\n\tuseViewportMatch,\n\t__experimentalUseDialog as useDialog,\n} from '@wordpress/compose';\nimport { useCallback, useEffect, useRef } from '@wordpress/element';\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\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 TagName = ! isMobileViewport ? VisuallyHidden : 'div';\n\tconst [ inserterDialogRef, inserterDialogProps ] = useDialog( {\n\t\tonClose: closeInserter,\n\t\tfocusOnMount: null,\n\t} );\n\n\tconst libraryRef = useRef();\n\tuseEffect( () => {\n\t\tlibraryRef.current.focusSearch();\n\t}, [] );\n\n\treturn (\n\t\t<div\n\t\t\tref={ inserterDialogRef }\n\t\t\t{ ...inserterDialogProps }\n\t\t\tclassName=\"edit-widgets-layout__inserter-panel\"\n\t\t>\n\t\t\t<TagName className=\"edit-widgets-layout__inserter-panel-header\">\n\t\t\t\t<Button\n\t\t\t\t\ticon={ close }\n\t\t\t\t\tonClick={ closeInserter }\n\t\t\t\t\tlabel={ __( 'Close block inserter' ) }\n\t\t\t\t/>\n\t\t\t</TagName>\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/>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAIA,IAA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,EAAGC,YAAO;IACdC,OAAO,EAAGrB,aAAe;IACzBsB,KAAK,EAAG,IAAAC,QAAE,EAAE,sBAAuB;EAAG,CACtC,CACO,CAAC,EACV,IAAAT,MAAA,CAAAC,aAAA;IAAKE,SAAS,EAAC;EAA6C,GAC3D,IAAAH,MAAA,CAAAC,aAAA,EAAChC,YAAA,CAAAyC,qBAAO;IACPC,qBAAqB;IACrBC,gBAAgB,EAAGlC,gBAAkB;IACrCE,YAAY,EAAGA,YAAc;IAC7BiC,4BAA4B,EAAGhC,cAAgB;IAC/CqB,GAAG,EAAGP;EAAY,CAClB,CACG,CACD,CAAC;AAER"}
|
|
@@ -4,11 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = ListViewSidebar;
|
|
7
|
-
var
|
|
7
|
+
var _react = require("react");
|
|
8
8
|
var _blockEditor = require("@wordpress/block-editor");
|
|
9
9
|
var _components = require("@wordpress/components");
|
|
10
10
|
var _compose = require("@wordpress/compose");
|
|
11
11
|
var _data = require("@wordpress/data");
|
|
12
|
+
var _element = require("@wordpress/element");
|
|
12
13
|
var _i18n = require("@wordpress/i18n");
|
|
13
14
|
var _icons = require("@wordpress/icons");
|
|
14
15
|
var _keycodes = require("@wordpress/keycodes");
|
|
@@ -46,19 +47,19 @@ function ListViewSidebar({
|
|
|
46
47
|
}, [closeListView]);
|
|
47
48
|
return (
|
|
48
49
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
49
|
-
(0,
|
|
50
|
+
(0, _react.createElement)("div", {
|
|
50
51
|
className: "edit-widgets-editor__list-view-panel",
|
|
51
52
|
onKeyDown: closeOnEscape
|
|
52
|
-
}, (0,
|
|
53
|
+
}, (0, _react.createElement)("div", {
|
|
53
54
|
className: "edit-widgets-editor__list-view-panel-header"
|
|
54
|
-
}, (0,
|
|
55
|
+
}, (0, _react.createElement)("strong", null, (0, _i18n.__)('List View')), (0, _react.createElement)(_components.Button, {
|
|
55
56
|
icon: _icons.closeSmall,
|
|
56
57
|
label: (0, _i18n.__)('Close'),
|
|
57
58
|
onClick: closeListView
|
|
58
|
-
})), (0,
|
|
59
|
+
})), (0, _react.createElement)("div", {
|
|
59
60
|
className: "edit-widgets-editor__list-view-panel-content",
|
|
60
61
|
ref: (0, _compose.useMergeRefs)([focusOnMountRef, setDropZoneElement])
|
|
61
|
-
}, (0,
|
|
62
|
+
}, (0, _react.createElement)(_blockEditor.__experimentalListView, {
|
|
62
63
|
dropZoneElement: dropZoneElement
|
|
63
64
|
})))
|
|
64
65
|
);
|