@wordpress/edit-widgets 5.35.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/build/blocks/widget-area/edit/index.js +33 -30
- package/build/blocks/widget-area/edit/index.js.map +1 -1
- package/build/blocks/widget-area/edit/inner-blocks.js +6 -5
- package/build/blocks/widget-area/edit/inner-blocks.js.map +1 -1
- package/build/components/error-boundary/index.js +14 -12
- package/build/components/error-boundary/index.js.map +1 -1
- package/build/components/header/document-tools/index.js +36 -33
- package/build/components/header/document-tools/index.js.map +1 -1
- package/build/components/header/index.js +32 -22
- 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 +53 -48
- package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/shortcut.js +30 -26
- package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
- package/build/components/layout/index.js +11 -8
- package/build/components/layout/index.js.map +1 -1
- package/build/components/layout/interface.js +16 -13
- package/build/components/layout/interface.js.map +1 -1
- package/build/components/more-menu/index.js +81 -70
- package/build/components/more-menu/index.js.map +1 -1
- package/build/components/more-menu/tools-more-menu-group.js +5 -4
- package/build/components/more-menu/tools-more-menu-group.js.map +1 -1
- package/build/components/notices/index.js +15 -13
- package/build/components/notices/index.js.map +1 -1
- package/build/components/save-button/index.js +5 -4
- 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 +21 -18
- package/build/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
- package/build/components/secondary-sidebar/list-view-sidebar.js +21 -15
- package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build/components/sidebar/index.js +49 -37
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/sidebar/widget-areas.js +29 -22
- package/build/components/sidebar/widget-areas.js.map +1 -1
- package/build/components/welcome-guide/index.js +80 -53
- package/build/components/welcome-guide/index.js.map +1 -1
- package/build/components/widget-areas-block-editor-content/index.js +18 -11
- package/build/components/widget-areas-block-editor-content/index.js.map +1 -1
- package/build/components/widget-areas-block-editor-provider/index.js +14 -11
- package/build/components/widget-areas-block-editor-provider/index.js.map +1 -1
- package/build/filters/move-to-widget-area.js +14 -10
- package/build/filters/move-to-widget-area.js.map +1 -1
- package/build/index.js +3 -3
- package/build/index.js.map +1 -1
- package/build-module/blocks/widget-area/edit/index.js +32 -28
- package/build-module/blocks/widget-area/edit/index.js.map +1 -1
- package/build-module/blocks/widget-area/edit/inner-blocks.js +6 -5
- package/build-module/blocks/widget-area/edit/inner-blocks.js.map +1 -1
- package/build-module/components/error-boundary/index.js +14 -12
- package/build-module/components/error-boundary/index.js.map +1 -1
- package/build-module/components/header/document-tools/index.js +38 -33
- package/build-module/components/header/document-tools/index.js.map +1 -1
- package/build-module/components/header/index.js +34 -22
- package/build-module/components/header/index.js.map +1 -1
- package/build-module/components/header/undo-redo/redo.js +2 -2
- package/build-module/components/header/undo-redo/redo.js.map +1 -1
- package/build-module/components/header/undo-redo/undo.js +2 -2
- package/build-module/components/header/undo-redo/undo.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +2 -2
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/index.js +54 -48
- package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +32 -26
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
- package/build-module/components/layout/index.js +12 -8
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/layout/interface.js +17 -13
- package/build-module/components/layout/interface.js.map +1 -1
- package/build-module/components/more-menu/index.js +83 -70
- package/build-module/components/more-menu/index.js.map +1 -1
- package/build-module/components/more-menu/tools-more-menu-group.js +5 -4
- package/build-module/components/more-menu/tools-more-menu-group.js.map +1 -1
- package/build-module/components/notices/index.js +17 -13
- package/build-module/components/notices/index.js.map +1 -1
- package/build-module/components/save-button/index.js +5 -4
- package/build-module/components/save-button/index.js.map +1 -1
- package/build-module/components/secondary-sidebar/index.js +3 -3
- package/build-module/components/secondary-sidebar/index.js.map +1 -1
- package/build-module/components/secondary-sidebar/inserter-sidebar.js +22 -18
- package/build-module/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
- package/build-module/components/secondary-sidebar/list-view-sidebar.js +22 -15
- package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build-module/components/sidebar/index.js +50 -37
- package/build-module/components/sidebar/index.js.map +1 -1
- package/build-module/components/sidebar/widget-areas.js +30 -22
- package/build-module/components/sidebar/widget-areas.js.map +1 -1
- package/build-module/components/welcome-guide/index.js +82 -53
- package/build-module/components/welcome-guide/index.js.map +1 -1
- package/build-module/components/widget-areas-block-editor-content/index.js +19 -11
- package/build-module/components/widget-areas-block-editor-content/index.js.map +1 -1
- package/build-module/components/widget-areas-block-editor-provider/index.js +15 -11
- package/build-module/components/widget-areas-block-editor-provider/index.js.map +1 -1
- package/build-module/filters/move-to-widget-area.js +16 -10
- package/build-module/filters/move-to-widget-area.js.map +1 -1
- package/build-module/index.js +3 -3
- package/build-module/index.js.map +1 -1
- package/build-style/style-rtl.css +9 -4
- package/build-style/style.css +9 -4
- package/package.json +30 -29
- package/src/components/layout/style.scss +1 -1
- package/src/index.js +1 -1
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = MoreMenu;
|
|
8
|
-
var _react = require("react");
|
|
9
8
|
var _components = require("@wordpress/components");
|
|
10
9
|
var _element = require("@wordpress/element");
|
|
11
10
|
var _i18n = require("@wordpress/i18n");
|
|
@@ -16,6 +15,7 @@ var _keyboardShortcuts = require("@wordpress/keyboard-shortcuts");
|
|
|
16
15
|
var _compose = require("@wordpress/compose");
|
|
17
16
|
var _keyboardShortcutHelpModal = _interopRequireDefault(require("../keyboard-shortcut-help-modal"));
|
|
18
17
|
var _toolsMoreMenuGroup = _interopRequireDefault(require("./tools-more-menu-group"));
|
|
18
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
19
|
/**
|
|
20
20
|
* WordPress dependencies
|
|
21
21
|
*/
|
|
@@ -29,74 +29,85 @@ function MoreMenu() {
|
|
|
29
29
|
const toggleKeyboardShortcutsModal = () => setIsKeyboardShortcutsModalVisible(!isKeyboardShortcutsModalActive);
|
|
30
30
|
(0, _keyboardShortcuts.useShortcut)('core/edit-widgets/keyboard-shortcuts', toggleKeyboardShortcutsModal);
|
|
31
31
|
const isLargeViewport = (0, _compose.useViewportMatch)('medium');
|
|
32
|
-
return (0,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
32
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
33
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.DropdownMenu, {
|
|
34
|
+
icon: _icons.moreVertical,
|
|
35
|
+
label: (0, _i18n.__)('Options'),
|
|
36
|
+
popoverProps: {
|
|
37
|
+
placement: 'bottom-end',
|
|
38
|
+
className: 'more-menu-dropdown__content'
|
|
39
|
+
},
|
|
40
|
+
toggleProps: {
|
|
41
|
+
tooltipPosition: 'bottom',
|
|
42
|
+
size: 'compact'
|
|
43
|
+
},
|
|
44
|
+
children: onClose => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
45
|
+
children: [isLargeViewport && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.MenuGroup, {
|
|
46
|
+
label: (0, _i18n._x)('View', 'noun'),
|
|
47
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_preferences.PreferenceToggleMenuItem, {
|
|
48
|
+
scope: "core/edit-widgets",
|
|
49
|
+
name: "fixedToolbar",
|
|
50
|
+
label: (0, _i18n.__)('Top toolbar'),
|
|
51
|
+
info: (0, _i18n.__)('Access all block and document tools in a single place'),
|
|
52
|
+
messageActivated: (0, _i18n.__)('Top toolbar activated'),
|
|
53
|
+
messageDeactivated: (0, _i18n.__)('Top toolbar deactivated')
|
|
54
|
+
})
|
|
55
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.MenuGroup, {
|
|
56
|
+
label: (0, _i18n.__)('Tools'),
|
|
57
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.MenuItem, {
|
|
58
|
+
onClick: () => {
|
|
59
|
+
setIsKeyboardShortcutsModalVisible(true);
|
|
60
|
+
},
|
|
61
|
+
shortcut: _keycodes.displayShortcut.access('h'),
|
|
62
|
+
children: (0, _i18n.__)('Keyboard shortcuts')
|
|
63
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_preferences.PreferenceToggleMenuItem, {
|
|
64
|
+
scope: "core/edit-widgets",
|
|
65
|
+
name: "welcomeGuide",
|
|
66
|
+
label: (0, _i18n.__)('Welcome Guide')
|
|
67
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.MenuItem, {
|
|
68
|
+
role: "menuitem",
|
|
69
|
+
icon: _icons.external,
|
|
70
|
+
href: (0, _i18n.__)('https://wordpress.org/documentation/article/block-based-widgets-editor/'),
|
|
71
|
+
target: "_blank",
|
|
72
|
+
rel: "noopener noreferrer",
|
|
73
|
+
children: [(0, _i18n.__)('Help'), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.VisuallyHidden, {
|
|
74
|
+
as: "span",
|
|
75
|
+
children: /* translators: accessibility text */
|
|
76
|
+
(0, _i18n.__)('(opens in a new tab)')
|
|
77
|
+
})]
|
|
78
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_toolsMoreMenuGroup.default.Slot, {
|
|
79
|
+
fillProps: {
|
|
80
|
+
onClose
|
|
81
|
+
}
|
|
82
|
+
})]
|
|
83
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.MenuGroup, {
|
|
84
|
+
label: (0, _i18n.__)('Preferences'),
|
|
85
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_preferences.PreferenceToggleMenuItem, {
|
|
86
|
+
scope: "core/edit-widgets",
|
|
87
|
+
name: "keepCaretInsideBlock",
|
|
88
|
+
label: (0, _i18n.__)('Contain text cursor inside block'),
|
|
89
|
+
info: (0, _i18n.__)('Aids screen readers by stopping text caret from leaving blocks.'),
|
|
90
|
+
messageActivated: (0, _i18n.__)('Contain text cursor inside block activated'),
|
|
91
|
+
messageDeactivated: (0, _i18n.__)('Contain text cursor inside block deactivated')
|
|
92
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_preferences.PreferenceToggleMenuItem, {
|
|
93
|
+
scope: "core/edit-widgets",
|
|
94
|
+
name: "themeStyles",
|
|
95
|
+
info: (0, _i18n.__)('Make the editor look like your theme.'),
|
|
96
|
+
label: (0, _i18n.__)('Use theme styles')
|
|
97
|
+
}), isLargeViewport && /*#__PURE__*/(0, _jsxRuntime.jsx)(_preferences.PreferenceToggleMenuItem, {
|
|
98
|
+
scope: "core/edit-widgets",
|
|
99
|
+
name: "showBlockBreadcrumbs",
|
|
100
|
+
label: (0, _i18n.__)('Display block breadcrumbs'),
|
|
101
|
+
info: (0, _i18n.__)('Shows block breadcrumbs at the bottom of the editor.'),
|
|
102
|
+
messageActivated: (0, _i18n.__)('Display block breadcrumbs activated'),
|
|
103
|
+
messageDeactivated: (0, _i18n.__)('Display block breadcrumbs deactivated')
|
|
104
|
+
})]
|
|
105
|
+
})]
|
|
106
|
+
})
|
|
107
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_keyboardShortcutHelpModal.default, {
|
|
108
|
+
isModalActive: isKeyboardShortcutsModalActive,
|
|
109
|
+
toggleModal: toggleKeyboardShortcutsModal
|
|
110
|
+
})]
|
|
111
|
+
});
|
|
101
112
|
}
|
|
102
113
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_element","_i18n","_icons","_preferences","_keycodes","_keyboardShortcuts","_compose","_keyboardShortcutHelpModal","_interopRequireDefault","_toolsMoreMenuGroup","MoreMenu","isKeyboardShortcutsModalActive","setIsKeyboardShortcutsModalVisible","useState","toggleKeyboardShortcutsModal","useShortcut","isLargeViewport","useViewportMatch","
|
|
1
|
+
{"version":3,"names":["_components","require","_element","_i18n","_icons","_preferences","_keycodes","_keyboardShortcuts","_compose","_keyboardShortcutHelpModal","_interopRequireDefault","_toolsMoreMenuGroup","_jsxRuntime","MoreMenu","isKeyboardShortcutsModalActive","setIsKeyboardShortcutsModalVisible","useState","toggleKeyboardShortcutsModal","useShortcut","isLargeViewport","useViewportMatch","jsxs","Fragment","children","jsx","DropdownMenu","icon","moreVertical","label","__","popoverProps","placement","className","toggleProps","tooltipPosition","size","onClose","MenuGroup","_x","PreferenceToggleMenuItem","scope","name","info","messageActivated","messageDeactivated","MenuItem","onClick","shortcut","displayShortcut","access","role","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 {\n\tMenuGroup,\n\tMenuItem,\n\tVisuallyHidden,\n\tDropdownMenu,\n} from '@wordpress/components';\nimport { useState } from '@wordpress/element';\nimport { __, _x } from '@wordpress/i18n';\nimport { external, moreVertical } from '@wordpress/icons';\nimport { PreferenceToggleMenuItem } from '@wordpress/preferences';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { useShortcut } from '@wordpress/keyboard-shortcuts';\nimport { useViewportMatch } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport KeyboardShortcutHelpModal from '../keyboard-shortcut-help-modal';\nimport ToolsMoreMenuGroup from './tools-more-menu-group';\n\nexport default function MoreMenu() {\n\tconst [\n\t\tisKeyboardShortcutsModalActive,\n\t\tsetIsKeyboardShortcutsModalVisible,\n\t] = useState( false );\n\tconst toggleKeyboardShortcutsModal = () =>\n\t\tsetIsKeyboardShortcutsModalVisible( ! isKeyboardShortcutsModalActive );\n\n\tuseShortcut(\n\t\t'core/edit-widgets/keyboard-shortcuts',\n\t\ttoggleKeyboardShortcutsModal\n\t);\n\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\n\treturn (\n\t\t<>\n\t\t\t<DropdownMenu\n\t\t\t\ticon={ moreVertical }\n\t\t\t\tlabel={ __( 'Options' ) }\n\t\t\t\tpopoverProps={ {\n\t\t\t\t\tplacement: 'bottom-end',\n\t\t\t\t\tclassName: 'more-menu-dropdown__content',\n\t\t\t\t} }\n\t\t\t\ttoggleProps={ {\n\t\t\t\t\ttooltipPosition: 'bottom',\n\t\t\t\t\tsize: 'compact',\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ ( onClose ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ isLargeViewport && (\n\t\t\t\t\t\t\t<MenuGroup label={ _x( 'View', 'noun' ) }>\n\t\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\t\tscope=\"core/edit-widgets\"\n\t\t\t\t\t\t\t\t\tname=\"fixedToolbar\"\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Top toolbar' ) }\n\t\t\t\t\t\t\t\t\tinfo={ __(\n\t\t\t\t\t\t\t\t\t\t'Access all block and document tools in a single place'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t\t'Top toolbar activated'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t\t'Top toolbar deactivated'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<MenuGroup label={ __( 'Tools' ) }>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tsetIsKeyboardShortcutsModalVisible( true );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tshortcut={ displayShortcut.access( 'h' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Keyboard shortcuts' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core/edit-widgets\"\n\t\t\t\t\t\t\t\tname=\"welcomeGuide\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Welcome Guide' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\trole=\"menuitem\"\n\t\t\t\t\t\t\t\ticon={ external }\n\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/block-based-widgets-editor/'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Help' ) }\n\t\t\t\t\t\t\t\t<VisuallyHidden as=\"span\">\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t/* translators: accessibility text */\n\t\t\t\t\t\t\t\t\t\t__( '(opens in a new tab)' )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<ToolsMoreMenuGroup.Slot\n\t\t\t\t\t\t\t\tfillProps={ { onClose } }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<MenuGroup label={ __( 'Preferences' ) }>\n\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core/edit-widgets\"\n\t\t\t\t\t\t\t\tname=\"keepCaretInsideBlock\"\n\t\t\t\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t\t\t\t'Contain text cursor inside block'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tinfo={ __(\n\t\t\t\t\t\t\t\t\t'Aids screen readers by stopping text caret from leaving blocks.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t'Contain text cursor inside block activated'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t'Contain text cursor inside block deactivated'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core/edit-widgets\"\n\t\t\t\t\t\t\t\tname=\"themeStyles\"\n\t\t\t\t\t\t\t\tinfo={ __(\n\t\t\t\t\t\t\t\t\t'Make the editor look like your theme.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tlabel={ __( 'Use theme styles' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{ isLargeViewport && (\n\t\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\t\tscope=\"core/edit-widgets\"\n\t\t\t\t\t\t\t\t\tname=\"showBlockBreadcrumbs\"\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Display block breadcrumbs' ) }\n\t\t\t\t\t\t\t\t\tinfo={ __(\n\t\t\t\t\t\t\t\t\t\t'Shows block breadcrumbs at the bottom of the editor.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t\t'Display block breadcrumbs activated'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t\t'Display block breadcrumbs deactivated'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</DropdownMenu>\n\t\t\t<KeyboardShortcutHelpModal\n\t\t\t\tisModalActive={ isKeyboardShortcutsModalActive }\n\t\t\t\ttoggleModal={ toggleKeyboardShortcutsModal }\n\t\t\t/>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAMA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,kBAAA,GAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AAKA,IAAAQ,0BAAA,GAAAC,sBAAA,CAAAT,OAAA;AACA,IAAAU,mBAAA,GAAAD,sBAAA,CAAAT,OAAA;AAAyD,IAAAW,WAAA,GAAAX,OAAA;AArBzD;AACA;AACA;;AAeA;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,EACtCD,4BACD,CAAC;EAED,MAAME,eAAe,GAAG,IAAAC,yBAAgB,EAAE,QAAS,CAAC;EAEpD,oBACC,IAAAR,WAAA,CAAAS,IAAA,EAAAT,WAAA,CAAAU,QAAA;IAAAC,QAAA,gBACC,IAAAX,WAAA,CAAAY,GAAA,EAACxB,WAAA,CAAAyB,YAAY;MACZC,IAAI,EAAGC,mBAAc;MACrBC,KAAK,EAAG,IAAAC,QAAE,EAAE,SAAU,CAAG;MACzBC,YAAY,EAAG;QACdC,SAAS,EAAE,YAAY;QACvBC,SAAS,EAAE;MACZ,CAAG;MACHC,WAAW,EAAG;QACbC,e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;UAAG,CAClC,CAAC,EACAV,eAAe,iBAChB,IAAAP,WAAA,CAAAY,GAAA,EAACnB,YAAA,CAAAkC,wBAAwB;YACxBC,KAAK,EAAC,mBAAmB;YACzBC,IAAI,EAAC,sBAAsB;YAC3Bb,KAAK,EAAG,IAAAC,QAAE,EAAE,2BAA4B,CAAG;YAC3Ca,IAAI,EAAG,IAAAb,QAAE,EACR,sDACD,CAAG;YACHc,gBAAgB,EAAG,IAAAd,QAAE,EACpB,qCACD,CAAG;YACHe,kBAAkB,EAAG,IAAAf,QAAE,EACtB,uCACD;UAAG,CACH,CACD;QAAA,CACS,CAAC;MAAA,CACX;IACF,CACY,CAAC,eACf,IAAAjB,WAAA,CAAAY,GAAA,EAACf,0BAAA,CAAAgD,OAAyB;MACzBG,aAAa,EAAG9C,8BAAgC;MAChD+C,WAAW,EAAG5C;IAA8B,CAC5C,CAAC;EAAA,CACD,CAAC;AAEL","ignoreList":[]}
|
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var _react = require("react");
|
|
8
7
|
var _components = require("@wordpress/components");
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
9
|
/**
|
|
10
10
|
* WordPress dependencies
|
|
11
11
|
*/
|
|
@@ -16,8 +16,9 @@ const {
|
|
|
16
16
|
} = (0, _components.createSlotFill)('EditWidgetsToolsMoreMenuGroup');
|
|
17
17
|
ToolsMoreMenuGroup.Slot = ({
|
|
18
18
|
fillProps
|
|
19
|
-
}) => (0,
|
|
20
|
-
fillProps: fillProps
|
|
21
|
-
|
|
19
|
+
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(Slot, {
|
|
20
|
+
fillProps: fillProps,
|
|
21
|
+
children: fills => fills.length > 0 && fills
|
|
22
|
+
});
|
|
22
23
|
var _default = exports.default = ToolsMoreMenuGroup;
|
|
23
24
|
//# sourceMappingURL=tools-more-menu-group.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","Fill","ToolsMoreMenuGroup","Slot","createSlotFill","fillProps","
|
|
1
|
+
{"version":3,"names":["_components","require","_jsxRuntime","Fill","ToolsMoreMenuGroup","Slot","createSlotFill","fillProps","jsx","children","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;AAAuD,IAAAC,WAAA,GAAAD,OAAA;AAHvD;AACA;AACA;;AAGA,MAAM;EAAEE,IAAI,EAAEC,kBAAkB;EAAEC;AAAK,CAAC,GAAG,IAAAC,0BAAc,EACxD,+BACD,CAAC;AAEDF,kBAAkB,CAACC,IAAI,GAAG,CAAE;EAAEE;AAAU,CAAC,kBACxC,IAAAL,WAAA,CAAAM,GAAA,EAACH,IAAI;EAACE,SAAS,EAAGA,SAAW;EAAAE,QAAA,EACxBC,KAAK,IAAMA,KAAK,CAACC,MAAM,GAAG,CAAC,IAAID;AAAK,CACnC,CACN;AAAC,IAAAE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaV,kBAAkB","ignoreList":[]}
|
|
@@ -4,10 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var _react = require("react");
|
|
8
7
|
var _components = require("@wordpress/components");
|
|
9
8
|
var _data = require("@wordpress/data");
|
|
10
9
|
var _notices = require("@wordpress/notices");
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
11
|
/**
|
|
12
12
|
* WordPress dependencies
|
|
13
13
|
*/
|
|
@@ -36,18 +36,20 @@ function Notices() {
|
|
|
36
36
|
const snackbarNotices = notices.filter(({
|
|
37
37
|
type
|
|
38
38
|
}) => type === 'snackbar').slice(MAX_VISIBLE_NOTICES);
|
|
39
|
-
return (0,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
39
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
40
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.NoticeList, {
|
|
41
|
+
notices: nonDismissibleNotices,
|
|
42
|
+
className: "edit-widgets-notices__pinned"
|
|
43
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.NoticeList, {
|
|
44
|
+
notices: dismissibleNotices,
|
|
45
|
+
className: "edit-widgets-notices__dismissible",
|
|
46
|
+
onRemove: removeNotice
|
|
47
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.SnackbarList, {
|
|
48
|
+
notices: snackbarNotices,
|
|
49
|
+
className: "edit-widgets-notices__snackbar",
|
|
50
|
+
onRemove: removeNotice
|
|
51
|
+
})]
|
|
52
|
+
});
|
|
51
53
|
}
|
|
52
54
|
var _default = exports.default = Notices;
|
|
53
55
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_data","_notices","MAX_VISIBLE_NOTICES","Notices","removeNotice","useDispatch","noticesStore","notices","useSelect","select","getNotices","dismissibleNotices","filter","isDismissible","type","nonDismissibleNotices","snackbarNotices","slice","
|
|
1
|
+
{"version":3,"names":["_components","require","_data","_notices","_jsxRuntime","MAX_VISIBLE_NOTICES","Notices","removeNotice","useDispatch","noticesStore","notices","useSelect","select","getNotices","dismissibleNotices","filter","isDismissible","type","nonDismissibleNotices","snackbarNotices","slice","jsxs","Fragment","children","jsx","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\n// Last three notices. Slices from the tail end of the list.\nconst MAX_VISIBLE_NOTICES = -3;\n\nfunction Notices() {\n\tconst { removeNotice } = useDispatch( noticesStore );\n\tconst { notices } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tnotices: select( noticesStore ).getNotices(),\n\t\t};\n\t}, [] );\n\n\tconst dismissibleNotices = notices.filter(\n\t\t( { isDismissible, type } ) => isDismissible && type === 'default'\n\t);\n\tconst nonDismissibleNotices = notices.filter(\n\t\t( { isDismissible, type } ) => ! isDismissible && type === 'default'\n\t);\n\tconst snackbarNotices = notices\n\t\t.filter( ( { type } ) => type === 'snackbar' )\n\t\t.slice( MAX_VISIBLE_NOTICES );\n\n\treturn (\n\t\t<>\n\t\t\t<NoticeList\n\t\t\t\tnotices={ nonDismissibleNotices }\n\t\t\t\tclassName=\"edit-widgets-notices__pinned\"\n\t\t\t/>\n\t\t\t<NoticeList\n\t\t\t\tnotices={ dismissibleNotices }\n\t\t\t\tclassName=\"edit-widgets-notices__dismissible\"\n\t\t\t\tonRemove={ removeNotice }\n\t\t\t/>\n\t\t\t<SnackbarList\n\t\t\t\tnotices={ snackbarNotices }\n\t\t\t\tclassName=\"edit-widgets-notices__snackbar\"\n\t\t\t\tonRemove={ removeNotice }\n\t\t\t/>\n\t\t</>\n\t);\n}\n\nexport default Notices;\n"],"mappings":";;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAA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B,WAAA,CAAA4B,YAAY;MACZlB,OAAO,EAAGS,eAAiB;MAC3BO,SAAS,EAAC,gCAAgC;MAC1CC,QAAQ,EAAGpB;IAAc,CACzB,CAAC;EAAA,CACD,CAAC;AAEL;AAAC,IAAAsB,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEczB,OAAO","ignoreList":[]}
|
|
@@ -4,11 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var _react = require("react");
|
|
8
7
|
var _components = require("@wordpress/components");
|
|
9
8
|
var _i18n = require("@wordpress/i18n");
|
|
10
9
|
var _data = require("@wordpress/data");
|
|
11
10
|
var _store = require("../../store");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
/**
|
|
13
13
|
* WordPress dependencies
|
|
14
14
|
*/
|
|
@@ -35,13 +35,14 @@ function SaveButton() {
|
|
|
35
35
|
saveEditedWidgetAreas
|
|
36
36
|
} = (0, _data.useDispatch)(_store.store);
|
|
37
37
|
const isDisabled = isSaving || !hasEditedWidgetAreaIds;
|
|
38
|
-
return (0,
|
|
38
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
39
39
|
variant: "primary",
|
|
40
40
|
isBusy: isSaving,
|
|
41
41
|
"aria-disabled": isDisabled,
|
|
42
42
|
onClick: isDisabled ? undefined : saveEditedWidgetAreas,
|
|
43
|
-
size: "compact"
|
|
44
|
-
|
|
43
|
+
size: "compact",
|
|
44
|
+
children: isSaving ? (0, _i18n.__)('Saving…') : (0, _i18n.__)('Update')
|
|
45
|
+
});
|
|
45
46
|
}
|
|
46
47
|
var _default = exports.default = SaveButton;
|
|
47
48
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_i18n","_data","_store","SaveButton","hasEditedWidgetAreaIds","isSaving","useSelect","select","getEditedWidgetAreas","isSavingWidgetAreas","editWidgetsStore","length","saveEditedWidgetAreas","useDispatch","isDisabled","
|
|
1
|
+
{"version":3,"names":["_components","require","_i18n","_data","_store","_jsxRuntime","SaveButton","hasEditedWidgetAreaIds","isSaving","useSelect","select","getEditedWidgetAreas","isSavingWidgetAreas","editWidgetsStore","length","saveEditedWidgetAreas","useDispatch","isDisabled","jsx","Button","variant","isBusy","onClick","undefined","size","children","__","_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\tconst isDisabled = isSaving || ! hasEditedWidgetAreaIds;\n\n\treturn (\n\t\t<Button\n\t\t\tvariant=\"primary\"\n\t\t\tisBusy={ isSaving }\n\t\t\taria-disabled={ isDisabled }\n\t\t\tonClick={ isDisabled ? undefined : saveEditedWidgetAreas }\n\t\t\tsize=\"compact\"\n\t\t>\n\t\t\t{ isSaving ? __( 'Saving…' ) : __( '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;AAAwD,IAAAI,WAAA,GAAAJ,OAAA;AAVxD;AACA;AACA;;AAKA;AACA;AACA;;AAGA,SAASK,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,MAAMI,UAAU,GAAGT,QAAQ,IAAI,CAAED,sBAAsB;EAEvD,oBACC,IAAAF,WAAA,CAAAa,GAAA,EAAClB,WAAA,CAAAmB,MAAM;IACNC,OAAO,EAAC,SAAS;IACjBC,MAAM,EAAGb,QAAU;IACnB,iBAAgBS,UAAY;IAC5BK,OAAO,EAAGL,UAAU,GAAGM,SAAS,GAAGR,qBAAuB;IAC1DS,IAAI,EAAC,SAAS;IAAAC,QAAA,EAEZjB,QAAQ,GAAG,IAAAkB,QAAE,EAAE,SAAU,CAAC,GAAG,IAAAA,QAAE,EAAE,QAAS;EAAC,CACtC,CAAC;AAEX;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcvB,UAAU","ignoreList":[]}
|
|
@@ -5,11 +5,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = SecondarySidebar;
|
|
8
|
-
var _react = require("react");
|
|
9
8
|
var _data = require("@wordpress/data");
|
|
10
9
|
var _store = require("../../store");
|
|
11
10
|
var _inserterSidebar = _interopRequireDefault(require("./inserter-sidebar"));
|
|
12
11
|
var _listViewSidebar = _interopRequireDefault(require("./list-view-sidebar"));
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
13
|
/**
|
|
14
14
|
* WordPress dependencies
|
|
15
15
|
*/
|
|
@@ -37,10 +37,10 @@ function SecondarySidebar() {
|
|
|
37
37
|
};
|
|
38
38
|
}, []);
|
|
39
39
|
if (isInserterOpen) {
|
|
40
|
-
return (0,
|
|
40
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_inserterSidebar.default, {});
|
|
41
41
|
}
|
|
42
42
|
if (isListViewOpen) {
|
|
43
|
-
return (0,
|
|
43
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_listViewSidebar.default, {});
|
|
44
44
|
}
|
|
45
45
|
return null;
|
|
46
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_data","require","_store","_inserterSidebar","_interopRequireDefault","_listViewSidebar","SecondarySidebar","isInserterOpen","isListViewOpen","useSelect","select","isInserterOpened","isListViewOpened","editWidgetsStore","
|
|
1
|
+
{"version":3,"names":["_data","require","_store","_inserterSidebar","_interopRequireDefault","_listViewSidebar","_jsxRuntime","SecondarySidebar","isInserterOpen","isListViewOpen","useSelect","select","isInserterOpened","isListViewOpened","editWidgetsStore","jsx","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() {\n\tconst { isInserterOpen, isListViewOpen } = useSelect( ( select ) => {\n\t\tconst { isInserterOpened, isListViewOpened } =\n\t\t\tselect( editWidgetsStore );\n\t\treturn {\n\t\t\tisInserterOpen: isInserterOpened(),\n\t\t\tisListViewOpen: isListViewOpened(),\n\t\t};\n\t}, [] );\n\n\tif ( isInserterOpen ) {\n\t\treturn <InserterSidebar />;\n\t}\n\tif ( isListViewOpen ) {\n\t\treturn <ListViewSidebar />;\n\t}\n\treturn null;\n}\n"],"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;AAAkD,IAAAK,WAAA,GAAAL,OAAA;AAblD;AACA;AACA;;AAEA;AACA;AACA;;AAGA;AACA;AACA;;AAIe,SAASM,gBAAgBA,CAAA,EAAG;EAC1C,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,oBAAO,IAAAF,WAAA,CAAAS,GAAA,EAACZ,gBAAA,CAAAa,OAAe,IAAE,CAAC;EAC3B;EACA,IAAKP,cAAc,EAAG;IACrB,oBAAO,IAAAH,WAAA,CAAAS,GAAA,EAACV,gBAAA,CAAAW,OAAe,IAAE,CAAC;EAC3B;EACA,OAAO,IAAI;AACZ","ignoreList":[]}
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = InserterSidebar;
|
|
8
|
-
var _react = require("react");
|
|
9
8
|
var _components = require("@wordpress/components");
|
|
10
9
|
var _icons = require("@wordpress/icons");
|
|
11
10
|
var _blockEditor = require("@wordpress/block-editor");
|
|
@@ -15,6 +14,7 @@ var _data = require("@wordpress/data");
|
|
|
15
14
|
var _i18n = require("@wordpress/i18n");
|
|
16
15
|
var _useWidgetLibraryInsertionPoint = _interopRequireDefault(require("../../hooks/use-widget-library-insertion-point"));
|
|
17
16
|
var _store = require("../../store");
|
|
17
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
18
|
/**
|
|
19
19
|
* WordPress dependencies
|
|
20
20
|
*/
|
|
@@ -41,24 +41,27 @@ function InserterSidebar() {
|
|
|
41
41
|
focusOnMount: true
|
|
42
42
|
});
|
|
43
43
|
const libraryRef = (0, _element.useRef)();
|
|
44
|
-
return (0,
|
|
44
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
45
45
|
ref: inserterDialogRef,
|
|
46
46
|
...inserterDialogProps,
|
|
47
|
-
className: "edit-widgets-layout__inserter-panel"
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
47
|
+
className: "edit-widgets-layout__inserter-panel",
|
|
48
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(TagName, {
|
|
49
|
+
className: "edit-widgets-layout__inserter-panel-header",
|
|
50
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
51
|
+
icon: _icons.close,
|
|
52
|
+
onClick: closeInserter,
|
|
53
|
+
label: (0, _i18n.__)('Close block inserter')
|
|
54
|
+
})
|
|
55
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
56
|
+
className: "edit-widgets-layout__inserter-panel-content",
|
|
57
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.__experimentalLibrary, {
|
|
58
|
+
showInserterHelpPanel: true,
|
|
59
|
+
shouldFocusBlock: isMobileViewport,
|
|
60
|
+
rootClientId: rootClientId,
|
|
61
|
+
__experimentalInsertionIndex: insertionIndex,
|
|
62
|
+
ref: libraryRef
|
|
63
|
+
})
|
|
64
|
+
})]
|
|
65
|
+
});
|
|
63
66
|
}
|
|
64
67
|
//# sourceMappingURL=inserter-sidebar.js.map
|
|
@@ -1 +1 @@
|
|
|
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","
|
|
1
|
+
{"version":3,"names":["_components","require","_icons","_blockEditor","_compose","_element","_data","_i18n","_useWidgetLibraryInsertionPoint","_interopRequireDefault","_store","_jsxRuntime","InserterSidebar","isMobileViewport","useViewportMatch","rootClientId","insertionIndex","useWidgetLibraryInsertionPoint","setIsInserterOpened","useDispatch","editWidgetsStore","closeInserter","useCallback","TagName","VisuallyHidden","inserterDialogRef","inserterDialogProps","useDialog","onClose","focusOnMount","libraryRef","useRef","jsxs","ref","className","children","jsx","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, 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: true,\n\t} );\n\n\tconst libraryRef = useRef();\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,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AAKA,IAAAO,+BAAA,GAAAC,sBAAA,CAAAR,OAAA;AACA,IAAAS,MAAA,GAAAT,OAAA;AAAwD,IAAAU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yB,GAAA,EAACjC,YAAA,CAAAwC,qBAAO;QACPC,qBAAqB;QACrBC,gBAAgB,EAAGhC,gBAAkB;QACrCE,YAAY,EAAGA,YAAc;QAC7B+B,4BAA4B,EAAG9B,cAAgB;QAC/CiB,GAAG,EAAGH;MAAY,CAClB;IAAC,CACE,CAAC;EAAA,CACF,CAAC;AAER","ignoreList":[]}
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = ListViewSidebar;
|
|
7
|
-
var _react = require("react");
|
|
8
7
|
var _blockEditor = require("@wordpress/block-editor");
|
|
9
8
|
var _components = require("@wordpress/components");
|
|
10
9
|
var _compose = require("@wordpress/compose");
|
|
@@ -15,6 +14,7 @@ var _icons = require("@wordpress/icons");
|
|
|
15
14
|
var _keycodes = require("@wordpress/keycodes");
|
|
16
15
|
var _store = require("../../store");
|
|
17
16
|
var _lockUnlock = require("../../lock-unlock");
|
|
17
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
18
|
/**
|
|
19
19
|
* WordPress dependencies
|
|
20
20
|
*/
|
|
@@ -48,22 +48,28 @@ function ListViewSidebar() {
|
|
|
48
48
|
}
|
|
49
49
|
}, [closeListView]);
|
|
50
50
|
return (
|
|
51
|
+
/*#__PURE__*/
|
|
51
52
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
52
|
-
(0,
|
|
53
|
+
(0, _jsxRuntime.jsxs)("div", {
|
|
53
54
|
className: "edit-widgets-editor__list-view-panel",
|
|
54
|
-
onKeyDown: closeOnEscape
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
55
|
+
onKeyDown: closeOnEscape,
|
|
56
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
57
|
+
className: "edit-widgets-editor__list-view-panel-header",
|
|
58
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("strong", {
|
|
59
|
+
children: (0, _i18n.__)('List View')
|
|
60
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
61
|
+
icon: _icons.closeSmall,
|
|
62
|
+
label: (0, _i18n.__)('Close'),
|
|
63
|
+
onClick: closeListView
|
|
64
|
+
})]
|
|
65
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
66
|
+
className: "edit-widgets-editor__list-view-panel-content",
|
|
67
|
+
ref: (0, _compose.useMergeRefs)([focusOnMountRef, setDropZoneElement]),
|
|
68
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.__experimentalListView, {
|
|
69
|
+
dropZoneElement: dropZoneElement
|
|
70
|
+
})
|
|
71
|
+
})]
|
|
72
|
+
})
|
|
67
73
|
);
|
|
68
74
|
}
|
|
69
75
|
//# sourceMappingURL=list-view-sidebar.js.map
|