@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.
Files changed (110) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/build/blocks/widget-area/edit/index.js +33 -30
  3. package/build/blocks/widget-area/edit/index.js.map +1 -1
  4. package/build/blocks/widget-area/edit/inner-blocks.js +6 -5
  5. package/build/blocks/widget-area/edit/inner-blocks.js.map +1 -1
  6. package/build/components/error-boundary/index.js +14 -12
  7. package/build/components/error-boundary/index.js.map +1 -1
  8. package/build/components/header/document-tools/index.js +36 -33
  9. package/build/components/header/document-tools/index.js.map +1 -1
  10. package/build/components/header/index.js +32 -22
  11. package/build/components/header/index.js.map +1 -1
  12. package/build/components/header/undo-redo/redo.js +2 -2
  13. package/build/components/header/undo-redo/redo.js.map +1 -1
  14. package/build/components/header/undo-redo/undo.js +2 -2
  15. package/build/components/header/undo-redo/undo.js.map +1 -1
  16. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +2 -2
  17. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  18. package/build/components/keyboard-shortcut-help-modal/index.js +53 -48
  19. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  20. package/build/components/keyboard-shortcut-help-modal/shortcut.js +30 -26
  21. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  22. package/build/components/layout/index.js +11 -8
  23. package/build/components/layout/index.js.map +1 -1
  24. package/build/components/layout/interface.js +16 -13
  25. package/build/components/layout/interface.js.map +1 -1
  26. package/build/components/more-menu/index.js +81 -70
  27. package/build/components/more-menu/index.js.map +1 -1
  28. package/build/components/more-menu/tools-more-menu-group.js +5 -4
  29. package/build/components/more-menu/tools-more-menu-group.js.map +1 -1
  30. package/build/components/notices/index.js +15 -13
  31. package/build/components/notices/index.js.map +1 -1
  32. package/build/components/save-button/index.js +5 -4
  33. package/build/components/save-button/index.js.map +1 -1
  34. package/build/components/secondary-sidebar/index.js +3 -3
  35. package/build/components/secondary-sidebar/index.js.map +1 -1
  36. package/build/components/secondary-sidebar/inserter-sidebar.js +21 -18
  37. package/build/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
  38. package/build/components/secondary-sidebar/list-view-sidebar.js +21 -15
  39. package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  40. package/build/components/sidebar/index.js +49 -37
  41. package/build/components/sidebar/index.js.map +1 -1
  42. package/build/components/sidebar/widget-areas.js +29 -22
  43. package/build/components/sidebar/widget-areas.js.map +1 -1
  44. package/build/components/welcome-guide/index.js +80 -53
  45. package/build/components/welcome-guide/index.js.map +1 -1
  46. package/build/components/widget-areas-block-editor-content/index.js +18 -11
  47. package/build/components/widget-areas-block-editor-content/index.js.map +1 -1
  48. package/build/components/widget-areas-block-editor-provider/index.js +14 -11
  49. package/build/components/widget-areas-block-editor-provider/index.js.map +1 -1
  50. package/build/filters/move-to-widget-area.js +14 -10
  51. package/build/filters/move-to-widget-area.js.map +1 -1
  52. package/build/index.js +3 -3
  53. package/build/index.js.map +1 -1
  54. package/build-module/blocks/widget-area/edit/index.js +32 -28
  55. package/build-module/blocks/widget-area/edit/index.js.map +1 -1
  56. package/build-module/blocks/widget-area/edit/inner-blocks.js +6 -5
  57. package/build-module/blocks/widget-area/edit/inner-blocks.js.map +1 -1
  58. package/build-module/components/error-boundary/index.js +14 -12
  59. package/build-module/components/error-boundary/index.js.map +1 -1
  60. package/build-module/components/header/document-tools/index.js +38 -33
  61. package/build-module/components/header/document-tools/index.js.map +1 -1
  62. package/build-module/components/header/index.js +34 -22
  63. package/build-module/components/header/index.js.map +1 -1
  64. package/build-module/components/header/undo-redo/redo.js +2 -2
  65. package/build-module/components/header/undo-redo/redo.js.map +1 -1
  66. package/build-module/components/header/undo-redo/undo.js +2 -2
  67. package/build-module/components/header/undo-redo/undo.js.map +1 -1
  68. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +2 -2
  69. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  70. package/build-module/components/keyboard-shortcut-help-modal/index.js +54 -48
  71. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  72. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +32 -26
  73. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  74. package/build-module/components/layout/index.js +12 -8
  75. package/build-module/components/layout/index.js.map +1 -1
  76. package/build-module/components/layout/interface.js +17 -13
  77. package/build-module/components/layout/interface.js.map +1 -1
  78. package/build-module/components/more-menu/index.js +83 -70
  79. package/build-module/components/more-menu/index.js.map +1 -1
  80. package/build-module/components/more-menu/tools-more-menu-group.js +5 -4
  81. package/build-module/components/more-menu/tools-more-menu-group.js.map +1 -1
  82. package/build-module/components/notices/index.js +17 -13
  83. package/build-module/components/notices/index.js.map +1 -1
  84. package/build-module/components/save-button/index.js +5 -4
  85. package/build-module/components/save-button/index.js.map +1 -1
  86. package/build-module/components/secondary-sidebar/index.js +3 -3
  87. package/build-module/components/secondary-sidebar/index.js.map +1 -1
  88. package/build-module/components/secondary-sidebar/inserter-sidebar.js +22 -18
  89. package/build-module/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
  90. package/build-module/components/secondary-sidebar/list-view-sidebar.js +22 -15
  91. package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  92. package/build-module/components/sidebar/index.js +50 -37
  93. package/build-module/components/sidebar/index.js.map +1 -1
  94. package/build-module/components/sidebar/widget-areas.js +30 -22
  95. package/build-module/components/sidebar/widget-areas.js.map +1 -1
  96. package/build-module/components/welcome-guide/index.js +82 -53
  97. package/build-module/components/welcome-guide/index.js.map +1 -1
  98. package/build-module/components/widget-areas-block-editor-content/index.js +19 -11
  99. package/build-module/components/widget-areas-block-editor-content/index.js.map +1 -1
  100. package/build-module/components/widget-areas-block-editor-provider/index.js +15 -11
  101. package/build-module/components/widget-areas-block-editor-provider/index.js.map +1 -1
  102. package/build-module/filters/move-to-widget-area.js +16 -10
  103. package/build-module/filters/move-to-widget-area.js.map +1 -1
  104. package/build-module/index.js +3 -3
  105. package/build-module/index.js.map +1 -1
  106. package/build-style/style-rtl.css +9 -4
  107. package/build-style/style.css +9 -4
  108. package/package.json +30 -29
  109. package/src/components/layout/style.scss +1 -1
  110. 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, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_components.DropdownMenu, {
33
- icon: _icons.moreVertical,
34
- label: (0, _i18n.__)('Options'),
35
- popoverProps: {
36
- placement: 'bottom-end',
37
- className: 'more-menu-dropdown__content'
38
- },
39
- toggleProps: {
40
- tooltipPosition: 'bottom',
41
- size: 'compact'
42
- }
43
- }, onClose => (0, _react.createElement)(_react.Fragment, null, isLargeViewport && (0, _react.createElement)(_components.MenuGroup, {
44
- label: (0, _i18n._x)('View', 'noun')
45
- }, (0, _react.createElement)(_preferences.PreferenceToggleMenuItem, {
46
- scope: "core/edit-widgets",
47
- name: "fixedToolbar",
48
- label: (0, _i18n.__)('Top toolbar'),
49
- info: (0, _i18n.__)('Access all block and document tools in a single place'),
50
- messageActivated: (0, _i18n.__)('Top toolbar activated'),
51
- messageDeactivated: (0, _i18n.__)('Top toolbar deactivated')
52
- })), (0, _react.createElement)(_components.MenuGroup, {
53
- label: (0, _i18n.__)('Tools')
54
- }, (0, _react.createElement)(_components.MenuItem, {
55
- onClick: () => {
56
- setIsKeyboardShortcutsModalVisible(true);
57
- },
58
- shortcut: _keycodes.displayShortcut.access('h')
59
- }, (0, _i18n.__)('Keyboard shortcuts')), (0, _react.createElement)(_preferences.PreferenceToggleMenuItem, {
60
- scope: "core/edit-widgets",
61
- name: "welcomeGuide",
62
- label: (0, _i18n.__)('Welcome Guide')
63
- }), (0, _react.createElement)(_components.MenuItem, {
64
- role: "menuitem",
65
- icon: _icons.external,
66
- href: (0, _i18n.__)('https://wordpress.org/documentation/article/block-based-widgets-editor/'),
67
- target: "_blank",
68
- rel: "noopener noreferrer"
69
- }, (0, _i18n.__)('Help'), (0, _react.createElement)(_components.VisuallyHidden, {
70
- as: "span"
71
- }, /* translators: accessibility text */
72
- (0, _i18n.__)('(opens in a new tab)'))), (0, _react.createElement)(_toolsMoreMenuGroup.default.Slot, {
73
- fillProps: {
74
- onClose
75
- }
76
- })), (0, _react.createElement)(_components.MenuGroup, {
77
- label: (0, _i18n.__)('Preferences')
78
- }, (0, _react.createElement)(_preferences.PreferenceToggleMenuItem, {
79
- scope: "core/edit-widgets",
80
- name: "keepCaretInsideBlock",
81
- label: (0, _i18n.__)('Contain text cursor inside block'),
82
- info: (0, _i18n.__)('Aids screen readers by stopping text caret from leaving blocks.'),
83
- messageActivated: (0, _i18n.__)('Contain text cursor inside block activated'),
84
- messageDeactivated: (0, _i18n.__)('Contain text cursor inside block deactivated')
85
- }), (0, _react.createElement)(_preferences.PreferenceToggleMenuItem, {
86
- scope: "core/edit-widgets",
87
- name: "themeStyles",
88
- info: (0, _i18n.__)('Make the editor look like your theme.'),
89
- label: (0, _i18n.__)('Use theme styles')
90
- }), isLargeViewport && (0, _react.createElement)(_preferences.PreferenceToggleMenuItem, {
91
- scope: "core/edit-widgets",
92
- name: "showBlockBreadcrumbs",
93
- label: (0, _i18n.__)('Display block breadcrumbs'),
94
- info: (0, _i18n.__)('Shows block breadcrumbs at the bottom of the editor.'),
95
- messageActivated: (0, _i18n.__)('Display block breadcrumbs activated'),
96
- messageDeactivated: (0, _i18n.__)('Display block breadcrumbs deactivated')
97
- })))), (0, _react.createElement)(_keyboardShortcutHelpModal.default, {
98
- isModalActive: isKeyboardShortcutsModalActive,
99
- toggleModal: toggleKeyboardShortcutsModal
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","_react","createElement","Fragment","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;AArBA;AACA;AACA;;AAeA;AACA;AACA;;AAIe,SAASW,QAAQA,CAAA,EAAG;EAClC,MAAM,CACLC,8BAA8B,EAC9BC,kCAAkC,CAClC,GAAG,IAAAC,iBAAQ,EAAE,KAAM,CAAC;EACrB,MAAMC,4BAA4B,G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Ad,QAAE,EACpB,4CACD,CAAG;IACHe,kBAAkB,EAAG,IAAAf,QAAE,EACtB,8CACD;EAAG,CACH,CAAC,EACF,IAAAP,MAAA,CAAAC,aAAA,EAAChB,YAAA,CAAAgC,wBAAwB;IACxBC,KAAK,EAAC,mBAAmB;IACzBC,IAAI,EAAC,aAAa;IAClBC,IAAI,EAAG,IAAAb,QAAE,EACR,uCACD,CAAG;IACHD,KAAK,EAAG,IAAAC,QAAE,EAAE,kBAAmB;EAAG,CAClC,CAAC,EACAT,eAAe,IAChB,IAAAE,MAAA,CAAAC,aAAA,EAAChB,YAAA,CAAAgC,wBAAwB;IACxBC,KAAK,EAAC,mBAAmB;IACzBC,IAAI,EAAC,sBAAsB;IAC3Bb,KAAK,EAAG,IAAAC,QAAE,EAAE,2BAA4B,CAAG;IAC3Ca,IAAI,EAAG,IAAAb,QAAE,EACR,sDACD,CAAG;IACHc,gBAAgB,EAAG,IAAAd,QAAE,EACpB,qCACD,CAAG;IACHe,kBAAkB,EAAG,IAAAf,QAAE,EACtB,uCACD;EAAG,CACH,CAEQ,CACV,CAEU,CAAC,EACf,IAAAP,MAAA,CAAAC,aAAA,EAACZ,0BAAA,CAAA8C,OAAyB;IACzBG,aAAa,EAAG7C,8BAAgC;IAChD8C,WAAW,EAAG3C;EAA8B,CAC5C,CACA,CAAC;AAEL","ignoreList":[]}
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,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gD,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, _react.createElement)(Slot, {
20
- fillProps: fillProps
21
- }, fills => fills.length > 0 && fills);
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","_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,GAAAC,OAAA,CAAAC,OAAA,GAEaV,kBAAkB","ignoreList":[]}
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, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_components.NoticeList, {
40
- notices: nonDismissibleNotices,
41
- className: "edit-widgets-notices__pinned"
42
- }), (0, _react.createElement)(_components.NoticeList, {
43
- notices: dismissibleNotices,
44
- className: "edit-widgets-notices__dismissible",
45
- onRemove: removeNotice
46
- }), (0, _react.createElement)(_components.SnackbarList, {
47
- notices: snackbarNotices,
48
- className: "edit-widgets-notices__snackbar",
49
- onRemove: removeNotice
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","_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\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,GAAAF,OAAA;AALA;AACA;AACA;;AAKA;AACA,MAAMG,mBAAmB,GAAG,CAAC,CAAC;AAE9B,SAASC,O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qB,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcxB,OAAO","ignoreList":[]}
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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,EAAGI,kBAAoB;MAC9BY,SAAS,EAAC,mCAAmC;MAC7CC,QAAQ,EAAGpB;IAAc,CACzB,CAAC,eACF,IAAAH,WAAA,CAAAoB,GAAA,EAACxB,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, _react.createElement)(_components.Button, {
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
- }, isSaving ? (0, _i18n.__)('Saving…') : (0, _i18n.__)('Update'));
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","_react","createElement","Button","variant","isBusy","onClick","undefined","size","__","_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;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,MAAMI,UAAU,GAAGT,QAAQ,IAAI,CAAED,sBAAsB;EAEvD,OACC,IAAAW,MAAA,CAAAC,aAAA,EAAClB,WAAA,CAAAmB,MAAM;IACNC,OAAO,EAAC,SAAS;IACjBC,MAAM,EAAGd,QAAU;IACnB,iBAAgBS,UAAY;IAC5BM,OAAO,EAAGN,UAAU,GAAGO,SAAS,GAAGT,qBAAuB;IAC1DU,IAAI,EAAC;EAAS,GAEZjB,QAAQ,GAAG,IAAAkB,QAAE,EAAE,SAAU,CAAC,GAAG,IAAAA,QAAE,EAAE,QAAS,CACrC,CAAC;AAEX;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcvB,UAAU","ignoreList":[]}
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, _react.createElement)(_inserterSidebar.default, null);
40
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_inserterSidebar.default, {});
41
41
  }
42
42
  if (isListViewOpen) {
43
- return (0, _react.createElement)(_listViewSidebar.default, null);
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","_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() {\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;AAbA;AACA;AACA;;AAEA;AACA;AACA;;AAGA;AACA;AACA;;AAIe,SAASK,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,OAAO,IAAAO,MAAA,CAAAC,aAAA,EAACZ,gBAAA,CAAAa,OAAe,MAAE,CAAC;EAC3B;EACA,IAAKR,cAAc,EAAG;IACrB,OAAO,IAAAM,MAAA,CAAAC,aAAA,EAACV,gBAAA,CAAAW,OAAe,MAAE,CAAC;EAC3B;EACA,OAAO,IAAI;AACZ","ignoreList":[]}
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, _react.createElement)("div", {
44
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
45
45
  ref: inserterDialogRef,
46
46
  ...inserterDialogProps,
47
- className: "edit-widgets-layout__inserter-panel"
48
- }, (0, _react.createElement)(TagName, {
49
- className: "edit-widgets-layout__inserter-panel-header"
50
- }, (0, _react.createElement)(_components.Button, {
51
- icon: _icons.close,
52
- onClick: closeInserter,
53
- label: (0, _i18n.__)('Close block inserter')
54
- })), (0, _react.createElement)("div", {
55
- className: "edit-widgets-layout__inserter-panel-content"
56
- }, (0, _react.createElement)(_blockEditor.__experimentalLibrary, {
57
- showInserterHelpPanel: true,
58
- shouldFocusBlock: isMobileViewport,
59
- rootClientId: rootClientId,
60
- __experimentalInsertionIndex: insertionIndex,
61
- ref: libraryRef
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","_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, 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,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C,EACV,IAAAT,MAAA,CAAAC,aAAA;IAAKE,SAAS,EAAC;EAA6C,GAC3D,IAAAH,MAAA,CAAAC,aAAA,EAAC7B,YAAA,CAAAsC,qBAAO;IACPC,qBAAqB;IACrBC,gBAAgB,EAAG/B,gBAAkB;IACrCE,YAAY,EAAGA,YAAc;IAC7B8B,4BAA4B,EAAG7B,cAAgB;IAC/CkB,GAAG,EAAGJ;EAAY,CAClB,CACG,CACD,CAAC;AAER","ignoreList":[]}
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,WAAA,GAAAV,OAAA;AAlBxD;AACA;AACA;;AAYA;AACA;AACA;;AAIe,SAASW,eAAeA,CAAA,EAAG;EACzC,MAAMC,gBAAgB,GAAG,IA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+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, _react.createElement)("div", {
53
+ (0, _jsxRuntime.jsxs)("div", {
53
54
  className: "edit-widgets-editor__list-view-panel",
54
- onKeyDown: closeOnEscape
55
- }, (0, _react.createElement)("div", {
56
- className: "edit-widgets-editor__list-view-panel-header"
57
- }, (0, _react.createElement)("strong", null, (0, _i18n.__)('List View')), (0, _react.createElement)(_components.Button, {
58
- icon: _icons.closeSmall,
59
- label: (0, _i18n.__)('Close'),
60
- onClick: closeListView
61
- })), (0, _react.createElement)("div", {
62
- className: "edit-widgets-editor__list-view-panel-content",
63
- ref: (0, _compose.useMergeRefs)([focusOnMountRef, setDropZoneElement])
64
- }, (0, _react.createElement)(_blockEditor.__experimentalListView, {
65
- dropZoneElement: dropZoneElement
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