@wordpress/edit-widgets 5.16.0 → 5.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/blocks/widget-area/edit/index.js +4 -16
  3. package/build/blocks/widget-area/edit/index.js.map +1 -1
  4. package/build/blocks/widget-area/edit/inner-blocks.js +5 -10
  5. package/build/blocks/widget-area/edit/inner-blocks.js.map +1 -1
  6. package/build/blocks/widget-area/edit/use-is-dragging-within.js +5 -10
  7. package/build/blocks/widget-area/edit/use-is-dragging-within.js.map +1 -1
  8. package/build/blocks/widget-area/index.js +0 -5
  9. package/build/blocks/widget-area/index.js.map +1 -1
  10. package/build/components/error-boundary/index.js +1 -15
  11. package/build/components/error-boundary/index.js.map +1 -1
  12. package/build/components/header/index.js +9 -32
  13. package/build/components/header/index.js.map +1 -1
  14. package/build/components/header/undo-redo/redo.js +3 -9
  15. package/build/components/header/undo-redo/redo.js.map +1 -1
  16. package/build/components/header/undo-redo/undo.js +3 -9
  17. package/build/components/header/undo-redo/undo.js.map +1 -1
  18. package/build/components/keyboard-shortcut-help-modal/config.js +1 -2
  19. package/build/components/keyboard-shortcut-help-modal/config.js.map +1 -1
  20. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +1 -9
  21. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  22. package/build/components/keyboard-shortcut-help-modal/index.js +4 -20
  23. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  24. package/build/components/keyboard-shortcut-help-modal/shortcut.js +1 -6
  25. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  26. package/build/components/keyboard-shortcuts/index.js +1 -18
  27. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  28. package/build/components/layout/index.js +2 -19
  29. package/build/components/layout/index.js.map +1 -1
  30. package/build/components/layout/interface.js +5 -21
  31. package/build/components/layout/interface.js.map +1 -1
  32. package/build/components/layout/unsaved-changes-warning.js +0 -6
  33. package/build/components/layout/unsaved-changes-warning.js.map +1 -1
  34. package/build/components/more-menu/index.js +2 -17
  35. package/build/components/more-menu/index.js.map +1 -1
  36. package/build/components/more-menu/tools-more-menu-group.js +1 -5
  37. package/build/components/more-menu/tools-more-menu-group.js.map +1 -1
  38. package/build/components/notices/index.js +1 -6
  39. package/build/components/notices/index.js.map +1 -1
  40. package/build/components/save-button/index.js +1 -7
  41. package/build/components/save-button/index.js.map +1 -1
  42. package/build/components/secondary-sidebar/index.js +1 -10
  43. package/build/components/secondary-sidebar/index.js.map +1 -1
  44. package/build/components/secondary-sidebar/inserter-sidebar.js +1 -11
  45. package/build/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
  46. package/build/components/secondary-sidebar/list-view-sidebar.js +6 -15
  47. package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  48. package/build/components/sidebar/index.js +12 -26
  49. package/build/components/sidebar/index.js.map +1 -1
  50. package/build/components/sidebar/widget-areas.js +1 -12
  51. package/build/components/sidebar/widget-areas.js.map +1 -1
  52. package/build/components/welcome-guide/index.js +3 -12
  53. package/build/components/welcome-guide/index.js.map +1 -1
  54. package/build/components/widget-areas-block-editor-content/index.js +1 -8
  55. package/build/components/widget-areas-block-editor-content/index.js.map +1 -1
  56. package/build/components/widget-areas-block-editor-provider/index.js +8 -23
  57. package/build/components/widget-areas-block-editor-provider/index.js.map +1 -1
  58. package/build/constants.js.map +1 -1
  59. package/build/filters/index.js +0 -1
  60. package/build/filters/index.js.map +1 -1
  61. package/build/filters/move-to-widget-area.js +3 -9
  62. package/build/filters/move-to-widget-area.js.map +1 -1
  63. package/build/filters/replace-media-upload.js +1 -3
  64. package/build/filters/replace-media-upload.js.map +1 -1
  65. package/build/hooks/use-last-selected-widget-area.js +5 -13
  66. package/build/hooks/use-last-selected-widget-area.js.map +1 -1
  67. package/build/hooks/use-widget-library-insertion-point.js +6 -14
  68. package/build/hooks/use-widget-library-insertion-point.js.map +1 -1
  69. package/build/index.js +6 -34
  70. package/build/index.js.map +1 -1
  71. package/build/lock-unlock.js +1 -2
  72. package/build/lock-unlock.js.map +1 -1
  73. package/build/store/actions.js +41 -79
  74. package/build/store/actions.js.map +1 -1
  75. package/build/store/constants.js +0 -1
  76. package/build/store/constants.js.map +1 -1
  77. package/build/store/index.js +4 -15
  78. package/build/store/index.js.map +1 -1
  79. package/build/store/reducer.js +4 -16
  80. package/build/store/reducer.js.map +1 -1
  81. package/build/store/resolvers.js +1 -17
  82. package/build/store/resolvers.js.map +1 -1
  83. package/build/store/selectors.js +28 -49
  84. package/build/store/selectors.js.map +1 -1
  85. package/build/store/transformers.js +7 -16
  86. package/build/store/transformers.js.map +1 -1
  87. package/build/store/utils.js +7 -16
  88. package/build/store/utils.js.map +1 -1
  89. package/build-module/blocks/widget-area/edit/index.js +5 -8
  90. package/build-module/blocks/widget-area/edit/index.js.map +1 -1
  91. package/build-module/blocks/widget-area/edit/inner-blocks.js +6 -6
  92. package/build-module/blocks/widget-area/edit/inner-blocks.js.map +1 -1
  93. package/build-module/blocks/widget-area/edit/use-is-dragging-within.js +6 -9
  94. package/build-module/blocks/widget-area/edit/use-is-dragging-within.js.map +1 -1
  95. package/build-module/blocks/widget-area/index.js +1 -1
  96. package/build-module/blocks/widget-area/index.js.map +1 -1
  97. package/build-module/components/error-boundary/index.js +0 -9
  98. package/build-module/components/error-boundary/index.js.map +1 -1
  99. package/build-module/components/header/index.js +9 -17
  100. package/build-module/components/header/index.js.map +1 -1
  101. package/build-module/components/header/undo-redo/redo.js +2 -2
  102. package/build-module/components/header/undo-redo/redo.js.map +1 -1
  103. package/build-module/components/header/undo-redo/undo.js +2 -2
  104. package/build-module/components/header/undo-redo/undo.js.map +1 -1
  105. package/build-module/components/keyboard-shortcut-help-modal/config.js.map +1 -1
  106. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +1 -6
  107. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  108. package/build-module/components/keyboard-shortcut-help-modal/index.js +5 -13
  109. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  110. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +0 -5
  111. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  112. package/build-module/components/keyboard-shortcuts/index.js +1 -10
  113. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  114. package/build-module/components/layout/index.js +2 -8
  115. package/build-module/components/layout/index.js.map +1 -1
  116. package/build-module/components/layout/interface.js +5 -9
  117. package/build-module/components/layout/interface.js.map +1 -1
  118. package/build-module/components/layout/unsaved-changes-warning.js +2 -3
  119. package/build-module/components/layout/unsaved-changes-warning.js.map +1 -1
  120. package/build-module/components/more-menu/index.js +2 -6
  121. package/build-module/components/more-menu/index.js.map +1 -1
  122. package/build-module/components/more-menu/tools-more-menu-group.js +0 -3
  123. package/build-module/components/more-menu/tools-more-menu-group.js.map +1 -1
  124. package/build-module/components/notices/index.js +0 -3
  125. package/build-module/components/notices/index.js.map +1 -1
  126. package/build-module/components/save-button/index.js +1 -4
  127. package/build-module/components/save-button/index.js.map +1 -1
  128. package/build-module/components/secondary-sidebar/index.js +1 -6
  129. package/build-module/components/secondary-sidebar/index.js.map +1 -1
  130. package/build-module/components/secondary-sidebar/inserter-sidebar.js +1 -2
  131. package/build-module/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
  132. package/build-module/components/secondary-sidebar/list-view-sidebar.js +6 -7
  133. package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  134. package/build-module/components/sidebar/index.js +13 -18
  135. package/build-module/components/sidebar/index.js.map +1 -1
  136. package/build-module/components/sidebar/widget-areas.js +1 -4
  137. package/build-module/components/sidebar/widget-areas.js.map +1 -1
  138. package/build-module/components/welcome-guide/index.js +3 -7
  139. package/build-module/components/welcome-guide/index.js.map +1 -1
  140. package/build-module/components/widget-areas-block-editor-content/index.js +1 -2
  141. package/build-module/components/widget-areas-block-editor-content/index.js.map +1 -1
  142. package/build-module/components/widget-areas-block-editor-provider/index.js +8 -7
  143. package/build-module/components/widget-areas-block-editor-provider/index.js.map +1 -1
  144. package/build-module/constants.js.map +1 -1
  145. package/build-module/filters/index.js.map +1 -1
  146. package/build-module/filters/move-to-widget-area.js +4 -4
  147. package/build-module/filters/move-to-widget-area.js.map +1 -1
  148. package/build-module/filters/replace-media-upload.js +0 -2
  149. package/build-module/filters/replace-media-upload.js.map +1 -1
  150. package/build-module/hooks/use-last-selected-widget-area.js +7 -9
  151. package/build-module/hooks/use-last-selected-widget-area.js.map +1 -1
  152. package/build-module/hooks/use-widget-library-insertion-point.js +6 -10
  153. package/build-module/hooks/use-widget-library-insertion-point.js.map +1 -1
  154. package/build-module/index.js +8 -20
  155. package/build-module/index.js.map +1 -1
  156. package/build-module/lock-unlock.js.map +1 -1
  157. package/build-module/store/actions.js +43 -56
  158. package/build-module/store/actions.js.map +1 -1
  159. package/build-module/store/constants.js.map +1 -1
  160. package/build-module/store/index.js +6 -6
  161. package/build-module/store/index.js.map +1 -1
  162. package/build-module/store/reducer.js +5 -11
  163. package/build-module/store/reducer.js.map +1 -1
  164. package/build-module/store/resolvers.js +3 -10
  165. package/build-module/store/resolvers.js.map +1 -1
  166. package/build-module/store/selectors.js +29 -38
  167. package/build-module/store/selectors.js.map +1 -1
  168. package/build-module/store/transformers.js +8 -13
  169. package/build-module/store/transformers.js.map +1 -1
  170. package/build-module/store/utils.js +7 -7
  171. package/build-module/store/utils.js.map +1 -1
  172. package/build-style/style-rtl.css +14 -11
  173. package/build-style/style.css +14 -11
  174. package/package.json +28 -27
  175. package/src/components/keyboard-shortcut-help-modal/style.scss +0 -5
  176. package/src/components/widget-areas-block-editor-provider/index.js +3 -3
  177. package/src/index.js +0 -1
  178. package/src/store/selectors.js +10 -2
@@ -1,36 +1,22 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = void 0;
9
-
10
8
  var _element = require("@wordpress/element");
11
-
12
9
  var _compose = require("@wordpress/compose");
13
-
14
10
  var _blockEditor = require("@wordpress/block-editor");
15
-
16
11
  var _data = require("@wordpress/data");
17
-
18
12
  var _interface = require("@wordpress/interface");
19
-
20
13
  var _i18n = require("@wordpress/i18n");
21
-
22
14
  var _keyboardShortcuts = require("@wordpress/keyboard-shortcuts");
23
-
24
15
  var _preferences = require("@wordpress/preferences");
25
-
26
16
  var _header = _interopRequireDefault(require("../header"));
27
-
28
17
  var _widgetAreasBlockEditorContent = _interopRequireDefault(require("../widget-areas-block-editor-content"));
29
-
30
18
  var _store = require("../../store");
31
-
32
19
  var _secondarySidebar = _interopRequireDefault(require("../secondary-sidebar"));
33
-
34
20
  /**
35
21
  * WordPress dependencies
36
22
  */
@@ -38,20 +24,17 @@ var _secondarySidebar = _interopRequireDefault(require("../secondary-sidebar"));
38
24
  /**
39
25
  * Internal dependencies
40
26
  */
27
+
41
28
  const interfaceLabels = {
42
29
  /* translators: accessibility text for the widgets screen top bar landmark region. */
43
30
  header: (0, _i18n.__)('Widgets top bar'),
44
-
45
31
  /* translators: accessibility text for the widgets screen content landmark region. */
46
32
  body: (0, _i18n.__)('Widgets and blocks'),
47
-
48
33
  /* translators: accessibility text for the widgets screen settings landmark region. */
49
34
  sidebar: (0, _i18n.__)('Widgets settings'),
50
-
51
35
  /* translators: accessibility text for the widgets screen footer landmark region. */
52
36
  footer: (0, _i18n.__)('Widgets footer')
53
37
  };
54
-
55
38
  function Interface({
56
39
  blockEditorSettings
57
40
  }) {
@@ -76,8 +59,9 @@ function Interface({
76
59
  hasBlockBreadCrumbsEnabled: !!select(_preferences.store).get('core/edit-widgets', 'showBlockBreadcrumbs'),
77
60
  previousShortcut: select(_keyboardShortcuts.store).getAllShortcutKeyCombinations('core/edit-widgets/previous-region'),
78
61
  nextShortcut: select(_keyboardShortcuts.store).getAllShortcutKeyCombinations('core/edit-widgets/next-region')
79
- }), []); // Inserter and Sidebars are mutually exclusive
62
+ }), []);
80
63
 
64
+ // Inserter and Sidebars are mutually exclusive
81
65
  (0, _element.useEffect)(() => {
82
66
  if (hasSidebarEnabled && !isHugeViewport) {
83
67
  setIsInserterOpened(false);
@@ -92,7 +76,8 @@ function Interface({
92
76
  const secondarySidebarLabel = isListViewOpened ? (0, _i18n.__)('List View') : (0, _i18n.__)('Block Library');
93
77
  const hasSecondarySidebar = isListViewOpened || isInserterOpened;
94
78
  return (0, _element.createElement)(_interface.InterfaceSkeleton, {
95
- labels: { ...interfaceLabels,
79
+ labels: {
80
+ ...interfaceLabels,
96
81
  secondarySidebar: secondarySidebarLabel
97
82
  },
98
83
  header: (0, _element.createElement)(_header.default, null),
@@ -114,7 +99,6 @@ function Interface({
114
99
  }
115
100
  });
116
101
  }
117
-
118
102
  var _default = Interface;
119
103
  exports.default = _default;
120
104
  //# sourceMappingURL=interface.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-widgets/src/components/layout/interface.js"],"names":["interfaceLabels","header","body","sidebar","footer","Interface","blockEditorSettings","isMobileViewport","isHugeViewport","setIsInserterOpened","setIsListViewOpened","closeGeneralSidebar","editWidgetsStore","hasBlockBreadCrumbsEnabled","hasSidebarEnabled","isInserterOpened","isListViewOpened","previousShortcut","nextShortcut","select","interfaceStore","getActiveComplementaryArea","name","preferencesStore","get","keyboardShortcutsStore","getAllShortcutKeyCombinations","secondarySidebarLabel","hasSecondarySidebar","secondarySidebar","previous","next"],"mappings":";;;;;;;;;AAKA;;AAFA;;AACA;;AAEA;;AACA;;AAKA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AAtBA;AACA;AACA;;AAcA;AACA;AACA;AAMA,MAAMA,eAAe,GAAG;AACvB;AACAC,EAAAA,MAAM,EAAE,cAAI,iBAAJ,CAFe;;AAGvB;AACAC,EAAAA,IAAI,EAAE,cAAI,oBAAJ,CA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**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport { BlockBreadcrumb } from '@wordpress/block-editor';\nimport { useEffect } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tInterfaceSkeleton,\n\tComplementaryArea,\n\tstore as interfaceStore,\n} from '@wordpress/interface';\nimport { __ } from '@wordpress/i18n';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport Header from '../header';\nimport WidgetAreasBlockEditorContent from '../widget-areas-block-editor-content';\nimport { store as editWidgetsStore } from '../../store';\nimport SecondarySidebar from '../secondary-sidebar';\n\nconst interfaceLabels = {\n\t/* translators: accessibility text for the widgets screen top bar landmark region. */\n\theader: __( 'Widgets top bar' ),\n\t/* translators: accessibility text for the widgets screen content landmark region. */\n\tbody: __( 'Widgets and blocks' ),\n\t/* translators: accessibility text for the widgets screen settings landmark region. */\n\tsidebar: __( 'Widgets settings' ),\n\t/* translators: accessibility text for the widgets screen footer landmark region. */\n\tfooter: __( 'Widgets footer' ),\n};\n\nfunction Interface( { blockEditorSettings } ) {\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst isHugeViewport = useViewportMatch( 'huge', '>=' );\n\tconst { setIsInserterOpened, setIsListViewOpened, closeGeneralSidebar } =\n\t\tuseDispatch( editWidgetsStore );\n\tconst {\n\t\thasBlockBreadCrumbsEnabled,\n\t\thasSidebarEnabled,\n\t\tisInserterOpened,\n\t\tisListViewOpened,\n\t\tpreviousShortcut,\n\t\tnextShortcut,\n\t} = useSelect(\n\t\t( select ) => ( {\n\t\t\thasSidebarEnabled: !! select(\n\t\t\t\tinterfaceStore\n\t\t\t).getActiveComplementaryArea( editWidgetsStore.name ),\n\t\t\tisInserterOpened: !! select( editWidgetsStore ).isInserterOpened(),\n\t\t\tisListViewOpened: !! select( editWidgetsStore ).isListViewOpened(),\n\t\t\thasBlockBreadCrumbsEnabled: !! select( preferencesStore ).get(\n\t\t\t\t'core/edit-widgets',\n\t\t\t\t'showBlockBreadcrumbs'\n\t\t\t),\n\t\t\tpreviousShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations(\n\t\t\t\t'core/edit-widgets/previous-region'\n\t\t\t),\n\t\t\tnextShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations( 'core/edit-widgets/next-region' ),\n\t\t} ),\n\t\t[]\n\t);\n\n\t// Inserter and Sidebars are mutually exclusive\n\tuseEffect( () => {\n\t\tif ( hasSidebarEnabled && ! isHugeViewport ) {\n\t\t\tsetIsInserterOpened( false );\n\t\t\tsetIsListViewOpened( false );\n\t\t}\n\t}, [ hasSidebarEnabled, isHugeViewport ] );\n\n\tuseEffect( () => {\n\t\tif ( ( isInserterOpened || isListViewOpened ) && ! isHugeViewport ) {\n\t\t\tcloseGeneralSidebar();\n\t\t}\n\t}, [ isInserterOpened, isListViewOpened, isHugeViewport ] );\n\n\tconst secondarySidebarLabel = isListViewOpened\n\t\t? __( 'List View' )\n\t\t: __( 'Block Library' );\n\n\tconst hasSecondarySidebar = isListViewOpened || isInserterOpened;\n\n\treturn (\n\t\t<InterfaceSkeleton\n\t\t\tlabels={ {\n\t\t\t\t...interfaceLabels,\n\t\t\t\tsecondarySidebar: secondarySidebarLabel,\n\t\t\t} }\n\t\t\theader={ <Header /> }\n\t\t\tsecondarySidebar={ hasSecondarySidebar && <SecondarySidebar /> }\n\t\t\tsidebar={\n\t\t\t\thasSidebarEnabled && (\n\t\t\t\t\t<ComplementaryArea.Slot scope=\"core/edit-widgets\" />\n\t\t\t\t)\n\t\t\t}\n\t\t\tcontent={\n\t\t\t\t<>\n\t\t\t\t\t<WidgetAreasBlockEditorContent\n\t\t\t\t\t\tblockEditorSettings={ blockEditorSettings }\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t}\n\t\t\tfooter={\n\t\t\t\thasBlockBreadCrumbsEnabled &&\n\t\t\t\t! isMobileViewport && (\n\t\t\t\t\t<div className=\"edit-widgets-layout__footer\">\n\t\t\t\t\t\t<BlockBreadcrumb rootLabelText={ __( 'Widgets' ) } />\n\t\t\t\t\t</div>\n\t\t\t\t)\n\t\t\t}\n\t\t\tshortcuts={ {\n\t\t\t\tprevious: previousShortcut,\n\t\t\t\tnext: nextShortcut,\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nexport default Interface;\n"]}
1
+ {"version":3,"names":["_element","require","_compose","_blockEditor","_data","_interface","_i18n","_keyboardShortcuts","_preferences","_header","_interopRequireDefault","_widgetAreasBlockEditorContent","_store","_secondarySidebar","interfaceLabels","header","__","body","sidebar","footer","Interface","blockEditorSettings","isMobileViewport","useViewportMatch","isHugeViewport","setIsInserterOpened","setIsListViewOpened","closeGeneralSidebar","useDispatch","editWidgetsStore","hasBlockBreadCrumbsEnabled","hasSidebarEnabled","isInserterOpened","isListViewOpened","previousShortcut","nextShortcut","useSelect","select","interfaceStore","getActiveComplementaryArea","name","preferencesStore","get","keyboardShortcutsStore","getAllShortcutKeyCombinations","useEffect","secondarySidebarLabel","hasSecondarySidebar","createElement","InterfaceSkeleton","labels","secondarySidebar","default","ComplementaryArea","Slot","scope","content","Fragment","className","BlockBreadcrumb","rootLabelText","shortcuts","previous","next","_default","exports"],"sources":["@wordpress/edit-widgets/src/components/layout/interface.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport { BlockBreadcrumb } from '@wordpress/block-editor';\nimport { useEffect } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tInterfaceSkeleton,\n\tComplementaryArea,\n\tstore as interfaceStore,\n} from '@wordpress/interface';\nimport { __ } from '@wordpress/i18n';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport Header from '../header';\nimport WidgetAreasBlockEditorContent from '../widget-areas-block-editor-content';\nimport { store as editWidgetsStore } from '../../store';\nimport SecondarySidebar from '../secondary-sidebar';\n\nconst interfaceLabels = {\n\t/* translators: accessibility text for the widgets screen top bar landmark region. */\n\theader: __( 'Widgets top bar' ),\n\t/* translators: accessibility text for the widgets screen content landmark region. */\n\tbody: __( 'Widgets and blocks' ),\n\t/* translators: accessibility text for the widgets screen settings landmark region. */\n\tsidebar: __( 'Widgets settings' ),\n\t/* translators: accessibility text for the widgets screen footer landmark region. */\n\tfooter: __( 'Widgets footer' ),\n};\n\nfunction Interface( { blockEditorSettings } ) {\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst isHugeViewport = useViewportMatch( 'huge', '>=' );\n\tconst { setIsInserterOpened, setIsListViewOpened, closeGeneralSidebar } =\n\t\tuseDispatch( editWidgetsStore );\n\tconst {\n\t\thasBlockBreadCrumbsEnabled,\n\t\thasSidebarEnabled,\n\t\tisInserterOpened,\n\t\tisListViewOpened,\n\t\tpreviousShortcut,\n\t\tnextShortcut,\n\t} = useSelect(\n\t\t( select ) => ( {\n\t\t\thasSidebarEnabled: !! select(\n\t\t\t\tinterfaceStore\n\t\t\t).getActiveComplementaryArea( editWidgetsStore.name ),\n\t\t\tisInserterOpened: !! select( editWidgetsStore ).isInserterOpened(),\n\t\t\tisListViewOpened: !! select( editWidgetsStore ).isListViewOpened(),\n\t\t\thasBlockBreadCrumbsEnabled: !! select( preferencesStore ).get(\n\t\t\t\t'core/edit-widgets',\n\t\t\t\t'showBlockBreadcrumbs'\n\t\t\t),\n\t\t\tpreviousShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations(\n\t\t\t\t'core/edit-widgets/previous-region'\n\t\t\t),\n\t\t\tnextShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations( 'core/edit-widgets/next-region' ),\n\t\t} ),\n\t\t[]\n\t);\n\n\t// Inserter and Sidebars are mutually exclusive\n\tuseEffect( () => {\n\t\tif ( hasSidebarEnabled && ! isHugeViewport ) {\n\t\t\tsetIsInserterOpened( false );\n\t\t\tsetIsListViewOpened( false );\n\t\t}\n\t}, [ hasSidebarEnabled, isHugeViewport ] );\n\n\tuseEffect( () => {\n\t\tif ( ( isInserterOpened || isListViewOpened ) && ! isHugeViewport ) {\n\t\t\tcloseGeneralSidebar();\n\t\t}\n\t}, [ isInserterOpened, isListViewOpened, isHugeViewport ] );\n\n\tconst secondarySidebarLabel = isListViewOpened\n\t\t? __( 'List View' )\n\t\t: __( 'Block Library' );\n\n\tconst hasSecondarySidebar = isListViewOpened || isInserterOpened;\n\n\treturn (\n\t\t<InterfaceSkeleton\n\t\t\tlabels={ {\n\t\t\t\t...interfaceLabels,\n\t\t\t\tsecondarySidebar: secondarySidebarLabel,\n\t\t\t} }\n\t\t\theader={ <Header /> }\n\t\t\tsecondarySidebar={ hasSecondarySidebar && <SecondarySidebar /> }\n\t\t\tsidebar={\n\t\t\t\thasSidebarEnabled && (\n\t\t\t\t\t<ComplementaryArea.Slot scope=\"core/edit-widgets\" />\n\t\t\t\t)\n\t\t\t}\n\t\t\tcontent={\n\t\t\t\t<>\n\t\t\t\t\t<WidgetAreasBlockEditorContent\n\t\t\t\t\t\tblockEditorSettings={ blockEditorSettings }\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t}\n\t\t\tfooter={\n\t\t\t\thasBlockBreadCrumbsEnabled &&\n\t\t\t\t! isMobileViewport && (\n\t\t\t\t\t<div className=\"edit-widgets-layout__footer\">\n\t\t\t\t\t\t<BlockBreadcrumb rootLabelText={ __( 'Widgets' ) } />\n\t\t\t\t\t</div>\n\t\t\t\t)\n\t\t\t}\n\t\t\tshortcuts={ {\n\t\t\t\tprevious: previousShortcut,\n\t\t\t\tnext: nextShortcut,\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nexport default Interface;\n"],"mappings":";;;;;;;AAKA,IAA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BAAgB,EAAEL;IACnB,CAAG;IACH/B,MAAM,EAAG,IAAAf,QAAA,CAAAgD,aAAA,EAACvC,OAAA,CAAA2C,OAAM,MAAE,CAAG;IACrBD,gBAAgB,EAAGJ,mBAAmB,IAAI,IAAA/C,QAAA,CAAAgD,aAAA,EAACnC,iBAAA,CAAAuC,OAAgB,MAAE,CAAG;IAChElC,OAAO,EACNa,iBAAiB,IAChB,IAAA/B,QAAA,CAAAgD,aAAA,EAAC3C,UAAA,CAAAgD,iBAAiB,CAACC,IAAI;MAACC,KAAK,EAAC;IAAmB,CAAE,CAEpD;IACDC,OAAO,EACN,IAAAxD,QAAA,CAAAgD,aAAA,EAAAhD,QAAA,CAAAyD,QAAA,QACC,IAAAzD,QAAA,CAAAgD,aAAA,EAACrC,8BAAA,CAAAyC,OAA6B;MAC7B/B,mBAAmB,EAAGA;IAAqB,CAC3C,CACA,CACF;IACDF,MAAM,EACLW,0BAA0B,IAC1B,CAAER,gBAAgB,IACjB,IAAAtB,QAAA,CAAAgD,aAAA;MAAKU,SAAS,EAAC;IAA6B,GAC3C,IAAA1D,QAAA,CAAAgD,aAAA,EAAC7C,YAAA,CAAAwD,eAAe;MAACC,aAAa,EAAG,IAAA5C,QAAE,EAAE,SAAU;IAAG,CAAE,CAChD,CAEN;IACD6C,SAAS,EAAG;MACXC,QAAQ,EAAE5B,gBAAgB;MAC1B6B,IAAI,EAAE5B;IACP;EAAG,CACH,CAAC;AAEJ;AAAC,IAAA6B,QAAA,GAEc5C,SAAS;AAAA6C,OAAA,CAAAb,OAAA,GAAAY,QAAA"}
@@ -4,15 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = UnsavedChangesWarning;
7
-
8
7
  var _i18n = require("@wordpress/i18n");
9
-
10
8
  var _element = require("@wordpress/element");
11
-
12
9
  var _data = require("@wordpress/data");
13
-
14
10
  var _store = require("../../store");
15
-
16
11
  /**
17
12
  * WordPress dependencies
18
13
  */
@@ -51,7 +46,6 @@ function UnsavedChangesWarning() {
51
46
  return event.returnValue;
52
47
  }
53
48
  };
54
-
55
49
  window.addEventListener('beforeunload', warnIfUnsavedChanges);
56
50
  return () => {
57
51
  window.removeEventListener('beforeunload', warnIfUnsavedChanges);
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-widgets/src/components/layout/unsaved-changes-warning.js"],"names":["UnsavedChangesWarning","isDirty","select","getEditedWidgetAreas","editWidgetsStore","editedWidgetAreas","length","warnIfUnsavedChanges","event","returnValue","window","addEventListener","removeEventListener"],"mappings":";;;;;;;AAGA;;AACA;;AACA;;AAKA;;AAVA;AACA;AACA;;AAKA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,qBAAT,GAAiC;AAC/C,QAAMC,OAAO,GAAG,qBAAaC,MAAF,IAAc;AACxC,UAAM;AAAEC,MAAAA;AAAF,QAA2BD,MAAM,CAAEE,YAAF,CAAvC;AACA,UAAMC,iBAAiB,GAAGF,oBAAoB,EAA9C;AAEA,WAAOE,iBAAiB,EAAEC,MAAnB,GAA4B,CAAnC;AACA,GALe,EAKb,EALa,CAAhB;AAOA,0BAAW,MAAM;AAChB;AACF;AACA;AACA;AACA;AACA;AACA;AACE,UAAMC,oBAAoB,GAAKC,KAAF,IAAa;AACzC,UAAKP,OAAL,EAAe;AACdO,QAAAA,KAAK,CAACC,WAAN,GAAoB,cACnB,8DADmB,CAApB;AAGA,eAAOD,KAAK,CAACC,WAAb;AACA;AACD,KAPD;;AASAC,IAAAA,MAAM,CAACC,gBAAP,CAAyB,cAAzB,EAAyCJ,oBAAzC;AAEA,WAAO,MAAM;AACZG,MAAAA,MAAM,CAACE,mBAAP,CAA4B,cAA5B,EAA4CL,oBAA5C;AACA,KAFD;AAGA,GAtBD,EAsBG,CAAEN,OAAF,CAtBH;AAwBA,SAAO,IAAP;AACA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useEffect } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\n/**\n * Warns the user if there are unsaved changes before leaving the editor.\n *\n * This is a duplicate of the component implemented in the editor package.\n * Duplicated here as edit-widgets doesn't depend on editor.\n *\n * @return {WPComponent} The component.\n */\nexport default function UnsavedChangesWarning() {\n\tconst isDirty = useSelect( ( select ) => {\n\t\tconst { getEditedWidgetAreas } = select( editWidgetsStore );\n\t\tconst editedWidgetAreas = getEditedWidgetAreas();\n\n\t\treturn editedWidgetAreas?.length > 0;\n\t}, [] );\n\n\tuseEffect( () => {\n\t\t/**\n\t\t * Warns the user if there are unsaved changes before leaving the editor.\n\t\t *\n\t\t * @param {Event} event `beforeunload` event.\n\t\t *\n\t\t * @return {string | undefined} Warning prompt message, if unsaved changes exist.\n\t\t */\n\t\tconst warnIfUnsavedChanges = ( event ) => {\n\t\t\tif ( isDirty ) {\n\t\t\t\tevent.returnValue = __(\n\t\t\t\t\t'You have unsaved changes. If you proceed, they will be lost.'\n\t\t\t\t);\n\t\t\t\treturn event.returnValue;\n\t\t\t}\n\t\t};\n\n\t\twindow.addEventListener( 'beforeunload', warnIfUnsavedChanges );\n\n\t\treturn () => {\n\t\t\twindow.removeEventListener( 'beforeunload', warnIfUnsavedChanges );\n\t\t};\n\t}, [ isDirty ] );\n\n\treturn null;\n}\n"]}
1
+ {"version":3,"names":["_i18n","require","_element","_data","_store","UnsavedChangesWarning","isDirty","useSelect","select","getEditedWidgetAreas","editWidgetsStore","editedWidgetAreas","length","useEffect","warnIfUnsavedChanges","event","returnValue","__","window","addEventListener","removeEventListener"],"sources":["@wordpress/edit-widgets/src/components/layout/unsaved-changes-warning.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useEffect } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\n/**\n * Warns the user if there are unsaved changes before leaving the editor.\n *\n * This is a duplicate of the component implemented in the editor package.\n * Duplicated here as edit-widgets doesn't depend on editor.\n *\n * @return {WPComponent} The component.\n */\nexport default function UnsavedChangesWarning() {\n\tconst isDirty = useSelect( ( select ) => {\n\t\tconst { getEditedWidgetAreas } = select( editWidgetsStore );\n\t\tconst editedWidgetAreas = getEditedWidgetAreas();\n\n\t\treturn editedWidgetAreas?.length > 0;\n\t}, [] );\n\n\tuseEffect( () => {\n\t\t/**\n\t\t * Warns the user if there are unsaved changes before leaving the editor.\n\t\t *\n\t\t * @param {Event} event `beforeunload` event.\n\t\t *\n\t\t * @return {string | undefined} Warning prompt message, if unsaved changes exist.\n\t\t */\n\t\tconst warnIfUnsavedChanges = ( event ) => {\n\t\t\tif ( isDirty ) {\n\t\t\t\tevent.returnValue = __(\n\t\t\t\t\t'You have unsaved changes. If you proceed, they will be lost.'\n\t\t\t\t);\n\t\t\t\treturn event.returnValue;\n\t\t\t}\n\t\t};\n\n\t\twindow.addEventListener( 'beforeunload', warnIfUnsavedChanges );\n\n\t\treturn () => {\n\t\t\twindow.removeEventListener( 'beforeunload', warnIfUnsavedChanges );\n\t\t};\n\t}, [ isDirty ] );\n\n\treturn null;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAKA,IAAAG,MAAA,GAAAH,OAAA;AAVA;AACA;AACA;;AAKA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASI,qBAAqBA,CAAA,EAAG;EAC/C,MAAMC,OAAO,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IACxC,MAAM;MAAEC;IAAqB,CAAC,GAAGD,MAAM,CAAEE,YAAiB,CAAC;IAC3D,MAAMC,iBAAiB,GAAGF,oBAAoB,CAAC,CAAC;IAEhD,OAAOE,iBAAiB,EAAEC,MAAM,GAAG,CAAC;EACrC,CAAC,EAAE,EAAG,CAAC;EAEP,IAAAC,kBAAS,EAAE,MAAM;IAChB;AACF;AACA;AACA;AACA;AACA;AACA;IACE,MAAMC,oBAAoB,GAAKC,KAAK,IAAM;MACzC,IAAKT,OAAO,EAAG;QACdS,KAAK,CAACC,WAAW,GAAG,IAAAC,QAAE,EACrB,8DACD,CAAC;QACD,OAAOF,KAAK,CAACC,WAAW;MACzB;IACD,CAAC;IAEDE,MAAM,CAACC,gBAAgB,CAAE,cAAc,EAAEL,oBAAqB,CAAC;IAE/D,OAAO,MAAM;MACZI,MAAM,CAACE,mBAAmB,CAAE,cAAc,EAAEN,oBAAqB,CAAC;IACnE,CAAC;EACF,CAAC,EAAE,CAAER,OAAO,CAAG,CAAC;EAEhB,OAAO,IAAI;AACZ"}
@@ -1,34 +1,21 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = MoreMenu;
9
-
10
8
  var _element = require("@wordpress/element");
11
-
12
9
  var _components = require("@wordpress/components");
13
-
14
10
  var _i18n = require("@wordpress/i18n");
15
-
16
11
  var _icons = require("@wordpress/icons");
17
-
18
12
  var _interface = require("@wordpress/interface");
19
-
20
13
  var _preferences = require("@wordpress/preferences");
21
-
22
14
  var _keycodes = require("@wordpress/keycodes");
23
-
24
15
  var _keyboardShortcuts = require("@wordpress/keyboard-shortcuts");
25
-
26
16
  var _compose = require("@wordpress/compose");
27
-
28
17
  var _keyboardShortcutHelpModal = _interopRequireDefault(require("../keyboard-shortcut-help-modal"));
29
-
30
18
  var _toolsMoreMenuGroup = _interopRequireDefault(require("./tools-more-menu-group"));
31
-
32
19
  /**
33
20
  * WordPress dependencies
34
21
  */
@@ -36,11 +23,10 @@ var _toolsMoreMenuGroup = _interopRequireDefault(require("./tools-more-menu-grou
36
23
  /**
37
24
  * Internal dependencies
38
25
  */
26
+
39
27
  function MoreMenu() {
40
28
  const [isKeyboardShortcutsModalActive, setIsKeyboardShortcutsModalVisible] = (0, _element.useState)(false);
41
-
42
29
  const toggleKeyboardShortcutsModal = () => setIsKeyboardShortcutsModalVisible(!isKeyboardShortcutsModalActive);
43
-
44
30
  (0, _keyboardShortcuts.useShortcut)('core/edit-widgets/keyboard-shortcuts', toggleKeyboardShortcutsModal);
45
31
  const isLargeViewport = (0, _compose.useViewportMatch)('medium');
46
32
  return (0, _element.createElement)(_element.Fragment, null, (0, _element.createElement)(_interface.MoreMenuDropdown, null, onClose => (0, _element.createElement)(_element.Fragment, null, isLargeViewport && (0, _element.createElement)(_components.MenuGroup, {
@@ -71,8 +57,7 @@ function MoreMenu() {
71
57
  rel: "noopener noreferrer"
72
58
  }, (0, _i18n.__)('Help'), (0, _element.createElement)(_components.VisuallyHidden, {
73
59
  as: "span"
74
- },
75
- /* translators: accessibility text */
60
+ }, /* translators: accessibility text */
76
61
  (0, _i18n.__)('(opens in a new tab)'))), (0, _element.createElement)(_toolsMoreMenuGroup.default.Slot, {
77
62
  fillProps: {
78
63
  onClose
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-widgets/src/components/more-menu/index.js"],"names":["MoreMenu","isKeyboardShortcutsModalActive","setIsKeyboardShortcutsModalVisible","toggleKeyboardShortcutsModal","isLargeViewport","onClose","displayShortcut","access","external"],"mappings":";;;;;;;;;AAIA;;AADA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AAjBA;AACA;AACA;;AAWA;AACA;AACA;AAIe,SAASA,QAAT,GAAoB;AAClC,QAAM,CACLC,8BADK,EAELC,kCAFK,IAGF,uBAAU,KAAV,CAHJ;;AAIA,QAAMC,4BAA4B,GAAG,MACpCD,kCAAkC,CAAE,CAAED,8BAAJ,CADnC;;AAGA,sCACC,sCADD,EAECE,4BAFD;AAKA,QAAMC,eAAe,GAAG,+BAAkB,QAAlB,CAAxB;AAEA,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AAI,aAAJ;AAAnB,KACC,4BAAC,qCAAD;AACC,IAAA,KAAK,EAAC,mBADP;AAEC,IAAA,IAAI,EAAC,sBAFN;AAGC,IAAA,KAAK,EAAG,cACP,kCADO,CAHT;AAMC,IAAA,IAAI,EAAG,cACN,iEADM,CANR;AASC,IAAA,gBAAgB,EAAG,cAClB,4CADkB,CATpB;AAYC,IAAA,kBAAkB,EAAG,cACpB,8CADoB;AAZtB,IADD,EAiBC,4BAAC,qCAAD;AACC,IAAA,KAAK,EAAC,mBADP;AAEC,IAAA,IAAI,EAAC,aAFN;AAGC,IAAA,IAAI,EAAG,cACN,uCADM,CAHR;AAMC,IAAA,KAAK,EAAG,cAAI,kBAAJ;AANT,IAjBD,EAyBGD,eAAe,IAChB,4BAAC,qCAAD;AACC,IAAA,KAAK,EAAC,mBADP;AAEC,IAAA,IAAI,EAAC,sBAFN;AAGC,IAAA,KAAK,EAAG,cAAI,2BAAJ,CAHT;AAIC,IAAA,IAAI,EAAG,cACN,sDADM,CAJR;AAOC,IAAA,gBAAgB,EAAG,cAClB,qCADkB,CAPpB;AAUC,IAAA,kBAAkB,EAAG,cACpB,uCADoB;AAVtB,IA1BF,CAtDD,CAFF,CADD,EAsGC,4BAAC,kCAAD;AACC,IAAA,aAAa,EAAGH,8BADjB;AAEC,IAAA,WAAW,EAAGE;AAFf,IAtGD,CADD;AA6GA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { MenuGroup, MenuItem, VisuallyHidden } from '@wordpress/components';\nimport { useState } from '@wordpress/element';\nimport { __, _x } from '@wordpress/i18n';\nimport { external } from '@wordpress/icons';\nimport { MoreMenuDropdown } from '@wordpress/interface';\nimport { PreferenceToggleMenuItem } from '@wordpress/preferences';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { useShortcut } from '@wordpress/keyboard-shortcuts';\nimport { useViewportMatch } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport KeyboardShortcutHelpModal from '../keyboard-shortcut-help-modal';\nimport ToolsMoreMenuGroup from './tools-more-menu-group';\n\nexport default function MoreMenu() {\n\tconst [\n\t\tisKeyboardShortcutsModalActive,\n\t\tsetIsKeyboardShortcutsModalVisible,\n\t] = useState( false );\n\tconst toggleKeyboardShortcutsModal = () =>\n\t\tsetIsKeyboardShortcutsModalVisible( ! isKeyboardShortcutsModalActive );\n\n\tuseShortcut(\n\t\t'core/edit-widgets/keyboard-shortcuts',\n\t\ttoggleKeyboardShortcutsModal\n\t);\n\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\n\treturn (\n\t\t<>\n\t\t\t<MoreMenuDropdown>\n\t\t\t\t{ ( onClose ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ isLargeViewport && (\n\t\t\t\t\t\t\t<MenuGroup label={ _x( 'View', 'noun' ) }>\n\t\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\t\tscope=\"core/edit-widgets\"\n\t\t\t\t\t\t\t\t\tname=\"fixedToolbar\"\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Top toolbar' ) }\n\t\t\t\t\t\t\t\t\tinfo={ __(\n\t\t\t\t\t\t\t\t\t\t'Access all block and document tools in a single place'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t\t'Top toolbar activated'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t\t'Top toolbar deactivated'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<MenuGroup label={ __( 'Tools' ) }>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tsetIsKeyboardShortcutsModalVisible( true );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tshortcut={ displayShortcut.access( 'h' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Keyboard shortcuts' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core/edit-widgets\"\n\t\t\t\t\t\t\t\tname=\"welcomeGuide\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Welcome Guide' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\trole=\"menuitem\"\n\t\t\t\t\t\t\t\ticon={ external }\n\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/block-based-widgets-editor/'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Help' ) }\n\t\t\t\t\t\t\t\t<VisuallyHidden as=\"span\">\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t/* translators: accessibility text */\n\t\t\t\t\t\t\t\t\t\t__( '(opens in a new tab)' )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<ToolsMoreMenuGroup.Slot\n\t\t\t\t\t\t\t\tfillProps={ { onClose } }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<MenuGroup label={ __( 'Preferences' ) }>\n\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core/edit-widgets\"\n\t\t\t\t\t\t\t\tname=\"keepCaretInsideBlock\"\n\t\t\t\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t\t\t\t'Contain text cursor inside block'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tinfo={ __(\n\t\t\t\t\t\t\t\t\t'Aids screen readers by stopping text caret from leaving blocks.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t'Contain text cursor inside block activated'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t'Contain text cursor inside block deactivated'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core/edit-widgets\"\n\t\t\t\t\t\t\t\tname=\"themeStyles\"\n\t\t\t\t\t\t\t\tinfo={ __(\n\t\t\t\t\t\t\t\t\t'Make the editor look like your theme.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tlabel={ __( 'Use theme styles' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{ isLargeViewport && (\n\t\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\t\tscope=\"core/edit-widgets\"\n\t\t\t\t\t\t\t\t\tname=\"showBlockBreadcrumbs\"\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Display block breadcrumbs' ) }\n\t\t\t\t\t\t\t\t\tinfo={ __(\n\t\t\t\t\t\t\t\t\t\t'Shows block breadcrumbs at the bottom of the editor.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t\t'Display block breadcrumbs activated'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t\t'Display block breadcrumbs deactivated'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</MoreMenuDropdown>\n\t\t\t<KeyboardShortcutHelpModal\n\t\t\t\tisModalActive={ isKeyboardShortcutsModalActive }\n\t\t\t\ttoggleModal={ toggleKeyboardShortcutsModal }\n\t\t\t/>\n\t\t</>\n\t);\n}\n"]}
1
+ {"version":3,"names":["_element","require","_components","_i18n","_icons","_interface","_preferences","_keycodes","_keyboardShortcuts","_compose","_keyboardShortcutHelpModal","_interopRequireDefault","_toolsMoreMenuGroup","MoreMenu","isKeyboardShortcutsModalActive","setIsKeyboardShortcutsModalVisible","useState","toggleKeyboardShortcutsModal","useShortcut","isLargeViewport","useViewportMatch","createElement","Fragment","MoreMenuDropdown","onClose","MenuGroup","label","_x","PreferenceToggleMenuItem","scope","name","__","info","messageActivated","messageDeactivated","MenuItem","onClick","shortcut","displayShortcut","access","role","icon","external","href","target","rel","VisuallyHidden","as","default","Slot","fillProps","isModalActive","toggleModal"],"sources":["@wordpress/edit-widgets/src/components/more-menu/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { MenuGroup, MenuItem, VisuallyHidden } from '@wordpress/components';\nimport { useState } from '@wordpress/element';\nimport { __, _x } from '@wordpress/i18n';\nimport { external } from '@wordpress/icons';\nimport { MoreMenuDropdown } from '@wordpress/interface';\nimport { PreferenceToggleMenuItem } from '@wordpress/preferences';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { useShortcut } from '@wordpress/keyboard-shortcuts';\nimport { useViewportMatch } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport KeyboardShortcutHelpModal from '../keyboard-shortcut-help-modal';\nimport ToolsMoreMenuGroup from './tools-more-menu-group';\n\nexport default function MoreMenu() {\n\tconst [\n\t\tisKeyboardShortcutsModalActive,\n\t\tsetIsKeyboardShortcutsModalVisible,\n\t] = useState( false );\n\tconst toggleKeyboardShortcutsModal = () =>\n\t\tsetIsKeyboardShortcutsModalVisible( ! isKeyboardShortcutsModalActive );\n\n\tuseShortcut(\n\t\t'core/edit-widgets/keyboard-shortcuts',\n\t\ttoggleKeyboardShortcutsModal\n\t);\n\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\n\treturn (\n\t\t<>\n\t\t\t<MoreMenuDropdown>\n\t\t\t\t{ ( onClose ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ isLargeViewport && (\n\t\t\t\t\t\t\t<MenuGroup label={ _x( 'View', 'noun' ) }>\n\t\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\t\tscope=\"core/edit-widgets\"\n\t\t\t\t\t\t\t\t\tname=\"fixedToolbar\"\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Top toolbar' ) }\n\t\t\t\t\t\t\t\t\tinfo={ __(\n\t\t\t\t\t\t\t\t\t\t'Access all block and document tools in a single place'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t\t'Top toolbar activated'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t\t'Top toolbar deactivated'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<MenuGroup label={ __( 'Tools' ) }>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tsetIsKeyboardShortcutsModalVisible( true );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tshortcut={ displayShortcut.access( 'h' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Keyboard shortcuts' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core/edit-widgets\"\n\t\t\t\t\t\t\t\tname=\"welcomeGuide\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Welcome Guide' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\trole=\"menuitem\"\n\t\t\t\t\t\t\t\ticon={ external }\n\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/block-based-widgets-editor/'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Help' ) }\n\t\t\t\t\t\t\t\t<VisuallyHidden as=\"span\">\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t/* translators: accessibility text */\n\t\t\t\t\t\t\t\t\t\t__( '(opens in a new tab)' )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<ToolsMoreMenuGroup.Slot\n\t\t\t\t\t\t\t\tfillProps={ { onClose } }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<MenuGroup label={ __( 'Preferences' ) }>\n\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core/edit-widgets\"\n\t\t\t\t\t\t\t\tname=\"keepCaretInsideBlock\"\n\t\t\t\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t\t\t\t'Contain text cursor inside block'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tinfo={ __(\n\t\t\t\t\t\t\t\t\t'Aids screen readers by stopping text caret from leaving blocks.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t'Contain text cursor inside block activated'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t'Contain text cursor inside block deactivated'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core/edit-widgets\"\n\t\t\t\t\t\t\t\tname=\"themeStyles\"\n\t\t\t\t\t\t\t\tinfo={ __(\n\t\t\t\t\t\t\t\t\t'Make the editor look like your theme.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tlabel={ __( 'Use theme styles' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{ isLargeViewport && (\n\t\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\t\tscope=\"core/edit-widgets\"\n\t\t\t\t\t\t\t\t\tname=\"showBlockBreadcrumbs\"\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Display block breadcrumbs' ) }\n\t\t\t\t\t\t\t\t\tinfo={ __(\n\t\t\t\t\t\t\t\t\t\t'Shows block breadcrumbs at the bottom of the editor.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t\t'Display block breadcrumbs activated'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t\t'Display block breadcrumbs deactivated'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</MoreMenuDropdown>\n\t\t\t<KeyboardShortcutHelpModal\n\t\t\t\tisModalActive={ isKeyboardShortcutsModalActive }\n\t\t\t\ttoggleModal={ toggleKeyboardShortcutsModal }\n\t\t\t/>\n\t\t</>\n\t);\n}\n"],"mappings":";;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Property(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _element = require("@wordpress/element");
9
-
10
8
  var _components = require("@wordpress/components");
11
-
12
9
  /**
13
10
  * WordPress dependencies
14
11
  */
12
+
15
13
  const {
16
14
  Fill: ToolsMoreMenuGroup,
17
15
  Slot
18
16
  } = (0, _components.createSlotFill)('EditWidgetsToolsMoreMenuGroup');
19
-
20
17
  ToolsMoreMenuGroup.Slot = ({
21
18
  fillProps
22
19
  }) => (0, _element.createElement)(Slot, {
23
20
  fillProps: fillProps
24
21
  }, fills => fills.length > 0 && fills);
25
-
26
22
  var _default = ToolsMoreMenuGroup;
27
23
  exports.default = _default;
28
24
  //# sourceMappingURL=tools-more-menu-group.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-widgets/src/components/more-menu/tools-more-menu-group.js"],"names":["Fill","ToolsMoreMenuGroup","Slot","fillProps","fills","length"],"mappings":";;;;;;;;;AAGA;;AAHA;AACA;AACA;AAGA,MAAM;AAAEA,EAAAA,IAAI,EAAEC,kBAAR;AAA4BC,EAAAA;AAA5B,IAAqC,gCAC1C,+BAD0C,CAA3C;;AAIAD,kBAAkB,CAACC,IAAnB,GAA0B,CAAE;AAAEC,EAAAA;AAAF,CAAF,KACzB,4BAAC,IAAD;AAAM,EAAA,SAAS,EAAGA;AAAlB,GACKC,KAAF,IAAaA,KAAK,CAACC,MAAN,GAAe,CAAf,IAAoBD,KADpC,CADD;;eAMeH,kB","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"]}
1
+ {"version":3,"names":["_components","require","Fill","ToolsMoreMenuGroup","Slot","createSlotFill","fillProps","_element","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,QAAA,CAAAC,aAAA,EAACJ,IAAI;EAACE,SAAS,EAAGA;AAAW,GACxBG,KAAK,IAAMA,KAAK,CAACC,MAAM,GAAG,CAAC,IAAID,KAC9B,CACN;AAAC,IAAAE,QAAA,GAEaR,kBAAkB;AAAAS,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
@@ -4,18 +4,14 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _element = require("@wordpress/element");
9
-
10
8
  var _components = require("@wordpress/components");
11
-
12
9
  var _data = require("@wordpress/data");
13
-
14
10
  var _notices = require("@wordpress/notices");
15
-
16
11
  /**
17
12
  * WordPress dependencies
18
13
  */
14
+
19
15
  function Notices() {
20
16
  const {
21
17
  removeNotice
@@ -51,7 +47,6 @@ function Notices() {
51
47
  onRemove: removeNotice
52
48
  }));
53
49
  }
54
-
55
50
  var _default = Notices;
56
51
  exports.default = _default;
57
52
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-widgets/src/components/notices/index.js"],"names":["Notices","removeNotice","noticesStore","notices","select","getNotices","dismissibleNotices","filter","isDismissible","type","nonDismissibleNotices","snackbarNotices"],"mappings":";;;;;;;;;AAGA;;AACA;;AACA;;AALA;AACA;AACA;AAKA,SAASA,OAAT,GAAmB;AAClB,QAAM;AAAEC,IAAAA;AAAF,MAAmB,uBAAaC,cAAb,CAAzB;AACA,QAAM;AAAEC,IAAAA;AAAF,MAAc,qBAAaC,MAAF,IAAc;AAC5C,WAAO;AACND,MAAAA,OAAO,EAAEC,MAAM,CAAEF,cAAF,CAAN,CAAuBG,UAAvB;AADH,KAAP;AAGA,GAJmB,EAIjB,EAJiB,CAApB;AAMA,QAAMC,kBAAkB,GAAGH,OAAO,CAACI,MAAR,CAC1B,CAAE;AAAEC,IAAAA,aAAF;AAAiBC,IAAAA;AAAjB,GAAF,KAA+BD,aAAa,IAAIC,IAAI,KAAK,SAD/B,CAA3B;AAGA,QAAMC,qBAAqB,GAAGP,OAAO,CAACI,MAAR,CAC7B,CAAE;AAAEC,IAAAA,aAAF;AAAiBC,IAAAA;AAAjB,GAAF,KAA+B,CAAED,aAAF,IAAmBC,IAAI,KAAK,SAD9B,CAA9B;AAGA,QAAME,eAAe,GAAGR,OAAO,CAACI,MAAR,CACvB,CAAE;AAAEE,IAAAA;AAAF,GAAF,KAAgBA,IAAI,KAAK,UADF,CAAxB;AAIA,SACC,qDACC,4BAAC,sBAAD;AACC,IAAA,OAAO,EAAGC,qBADX;AAEC,IAAA,SAAS,EAAC;AAFX,IADD,EAKC,4BAAC,sBAAD;AACC,IAAA,OAAO,EAAGJ,kBADX;AAEC,IAAA,SAAS,EAAC,mCAFX;AAGC,IAAA,QAAQ,EAAGL;AAHZ,IALD,EAUC,4BAAC,wBAAD;AACC,IAAA,OAAO,EAAGU,eADX;AAEC,IAAA,SAAS,EAAC,gCAFX;AAGC,IAAA,QAAQ,EAAGV;AAHZ,IAVD,CADD;AAkBA;;eAEcD,O","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { NoticeList, SnackbarList } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as noticesStore } from '@wordpress/notices';\n\nfunction Notices() {\n\tconst { removeNotice } = useDispatch( noticesStore );\n\tconst { notices } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tnotices: select( noticesStore ).getNotices(),\n\t\t};\n\t}, [] );\n\n\tconst dismissibleNotices = notices.filter(\n\t\t( { isDismissible, type } ) => isDismissible && type === 'default'\n\t);\n\tconst nonDismissibleNotices = notices.filter(\n\t\t( { isDismissible, type } ) => ! isDismissible && type === 'default'\n\t);\n\tconst snackbarNotices = notices.filter(\n\t\t( { type } ) => type === 'snackbar'\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<NoticeList\n\t\t\t\tnotices={ nonDismissibleNotices }\n\t\t\t\tclassName=\"edit-widgets-notices__pinned\"\n\t\t\t/>\n\t\t\t<NoticeList\n\t\t\t\tnotices={ dismissibleNotices }\n\t\t\t\tclassName=\"edit-widgets-notices__dismissible\"\n\t\t\t\tonRemove={ removeNotice }\n\t\t\t/>\n\t\t\t<SnackbarList\n\t\t\t\tnotices={ snackbarNotices }\n\t\t\t\tclassName=\"edit-widgets-notices__snackbar\"\n\t\t\t\tonRemove={ removeNotice }\n\t\t\t/>\n\t\t</>\n\t);\n}\n\nexport default Notices;\n"]}
1
+ {"version":3,"names":["_components","require","_data","_notices","Notices","removeNotice","useDispatch","noticesStore","notices","useSelect","select","getNotices","dismissibleNotices","filter","isDismissible","type","nonDismissibleNotices","snackbarNotices","_element","createElement","Fragment","NoticeList","className","onRemove","SnackbarList","_default","exports","default"],"sources":["@wordpress/edit-widgets/src/components/notices/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { NoticeList, SnackbarList } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as noticesStore } from '@wordpress/notices';\n\nfunction Notices() {\n\tconst { removeNotice } = useDispatch( noticesStore );\n\tconst { notices } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tnotices: select( noticesStore ).getNotices(),\n\t\t};\n\t}, [] );\n\n\tconst dismissibleNotices = notices.filter(\n\t\t( { isDismissible, type } ) => isDismissible && type === 'default'\n\t);\n\tconst nonDismissibleNotices = notices.filter(\n\t\t( { isDismissible, type } ) => ! isDismissible && type === 'default'\n\t);\n\tconst snackbarNotices = notices.filter(\n\t\t( { type } ) => type === 'snackbar'\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<NoticeList\n\t\t\t\tnotices={ nonDismissibleNotices }\n\t\t\t\tclassName=\"edit-widgets-notices__pinned\"\n\t\t\t/>\n\t\t\t<NoticeList\n\t\t\t\tnotices={ dismissibleNotices }\n\t\t\t\tclassName=\"edit-widgets-notices__dismissible\"\n\t\t\t\tonRemove={ removeNotice }\n\t\t\t/>\n\t\t\t<SnackbarList\n\t\t\t\tnotices={ snackbarNotices }\n\t\t\t\tclassName=\"edit-widgets-notices__snackbar\"\n\t\t\t\tonRemove={ removeNotice }\n\t\t\t/>\n\t\t</>\n\t);\n}\n\nexport default Notices;\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AALA;AACA;AACA;;AAKA,SAASG,OAAOA,CAAA,EAAG;EAClB,MAAM;IAAEC;EAAa,CAAC,GAAG,IAAAC,iBAAW,EAAEC,cAAa,CAAC;EACpD,MAAM;IAAEC;EAAQ,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IAC5C,OAAO;MACNF,OAAO,EAAEE,MAAM,CAAEH,cAAa,CAAC,CAACI,UAAU,CAAC;IAC5C,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,MAAMC,kBAAkB,GAAGJ,OAAO,CAACK,MAAM,CACxC,CAAE;IAAEC,aAAa;IAAEC;EAAK,CAAC,KAAMD,aAAa,IAAIC,IAAI,KAAK,SAC1D,CAAC;EACD,MAAMC,qBAAqB,GAAGR,OAAO,CAACK,MAAM,CAC3C,CAAE;IAAEC,aAAa;IAAEC;EAAK,CAAC,KAAM,CAAED,aAAa,IAAIC,IAAI,KAAK,SAC5D,CAAC;EACD,MAAME,eAAe,GAAGT,OAAO,CAACK,MAAM,CACrC,CAAE;IAAEE;EAAK,CAAC,KAAMA,IAAI,KAAK,UAC1B,CAAC;EAED,OACC,IAAAG,QAAA,CAAAC,aAAA,EAAAD,QAAA,CAAAE,QAAA,QACC,IAAAF,QAAA,CAAAC,aAAA,EAACnB,WAAA,CAAAqB,UAAU;IACVb,OAAO,EAAGQ,qBAAuB;IACjCM,SAAS,EAAC;EAA8B,CACxC,CAAC,EACF,IAAAJ,QAAA,CAAAC,aAAA,EAACnB,WAAA,CAAAqB,UAAU;IACVb,OAAO,EAAGI,kBAAoB;IAC9BU,SAAS,EAAC,mCAAmC;IAC7CC,QAAQ,EAAGlB;EAAc,CACzB,CAAC,EACF,IAAAa,QAAA,CAAAC,aAAA,EAACnB,WAAA,CAAAwB,YAAY;IACZhB,OAAO,EAAGS,eAAiB;IAC3BK,SAAS,EAAC,gCAAgC;IAC1CC,QAAQ,EAAGlB;EAAc,CACzB,CACA,CAAC;AAEL;AAAC,IAAAoB,QAAA,GAEcrB,OAAO;AAAAsB,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
@@ -4,17 +4,11 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _element = require("@wordpress/element");
9
-
10
8
  var _components = require("@wordpress/components");
11
-
12
9
  var _i18n = require("@wordpress/i18n");
13
-
14
10
  var _data = require("@wordpress/data");
15
-
16
11
  var _store = require("../../store");
17
-
18
12
  /**
19
13
  * WordPress dependencies
20
14
  */
@@ -22,6 +16,7 @@ var _store = require("../../store");
22
16
  /**
23
17
  * Internal dependencies
24
18
  */
19
+
25
20
  function SaveButton() {
26
21
  const {
27
22
  hasEditedWidgetAreaIds,
@@ -47,7 +42,6 @@ function SaveButton() {
47
42
  disabled: !hasEditedWidgetAreaIds
48
43
  }, isSaving ? (0, _i18n.__)('Saving…') : (0, _i18n.__)('Update'));
49
44
  }
50
-
51
45
  var _default = SaveButton;
52
46
  exports.default = _default;
53
47
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-widgets/src/components/save-button/index.js"],"names":["SaveButton","hasEditedWidgetAreaIds","isSaving","select","getEditedWidgetAreas","isSavingWidgetAreas","editWidgetsStore","length","saveEditedWidgetAreas","undefined"],"mappings":";;;;;;;;;AAGA;;AACA;;AACA;;AAKA;;AAVA;AACA;AACA;;AAKA;AACA;AACA;AAGA,SAASA,UAAT,GAAsB;AACrB,QAAM;AAAEC,IAAAA,sBAAF;AAA0BC,IAAAA;AAA1B,MAAuC,qBAAaC,MAAF,IAAc;AACrE,UAAM;AAAEC,MAAAA,oBAAF;AAAwBC,MAAAA;AAAxB,QACLF,MAAM,CAAEG,YAAF,CADP;AAGA,WAAO;AACNL,MAAAA,sBAAsB,EAAEG,oBAAoB,IAAIG,MAAxB,GAAiC,CADnD;AAENL,MAAAA,QAAQ,EAAEG,mBAAmB;AAFvB,KAAP;AAIA,GAR4C,EAQ1C,EAR0C,CAA7C;AASA,QAAM;AAAEG,IAAAA;AAAF,MAA4B,uBAAaF,YAAb,CAAlC;AAEA,SACC,4BAAC,kBAAD;AACC,IAAA,OAAO,EAAC,SADT;AAEC,IAAA,MAAM,EAAGJ,QAFV;AAGC,qBAAgBA,QAHjB;AAIC,IAAA,OAAO,EAAGA,QAAQ,GAAGO,SAAH,GAAeD,qBAJlC;AAKC,IAAA,QAAQ,EAAG,CAAEP;AALd,KAOGC,QAAQ,GAAG,cAAI,SAAJ,CAAH,GAAqB,cAAI,QAAJ,CAPhC,CADD;AAWA;;eAEcF,U","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Button } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\nfunction SaveButton() {\n\tconst { hasEditedWidgetAreaIds, isSaving } = useSelect( ( select ) => {\n\t\tconst { getEditedWidgetAreas, isSavingWidgetAreas } =\n\t\t\tselect( editWidgetsStore );\n\n\t\treturn {\n\t\t\thasEditedWidgetAreaIds: getEditedWidgetAreas()?.length > 0,\n\t\t\tisSaving: isSavingWidgetAreas(),\n\t\t};\n\t}, [] );\n\tconst { saveEditedWidgetAreas } = useDispatch( editWidgetsStore );\n\n\treturn (\n\t\t<Button\n\t\t\tvariant=\"primary\"\n\t\t\tisBusy={ isSaving }\n\t\t\taria-disabled={ isSaving }\n\t\t\tonClick={ isSaving ? undefined : saveEditedWidgetAreas }\n\t\t\tdisabled={ ! hasEditedWidgetAreaIds }\n\t\t>\n\t\t\t{ isSaving ? __( 'Saving…' ) : __( 'Update' ) }\n\t\t</Button>\n\t);\n}\n\nexport default SaveButton;\n"]}
1
+ {"version":3,"names":["_components","require","_i18n","_data","_store","SaveButton","hasEditedWidgetAreaIds","isSaving","useSelect","select","getEditedWidgetAreas","isSavingWidgetAreas","editWidgetsStore","length","saveEditedWidgetAreas","useDispatch","_element","createElement","Button","variant","isBusy","onClick","undefined","disabled","__","_default","exports","default"],"sources":["@wordpress/edit-widgets/src/components/save-button/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Button } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\nfunction SaveButton() {\n\tconst { hasEditedWidgetAreaIds, isSaving } = useSelect( ( select ) => {\n\t\tconst { getEditedWidgetAreas, isSavingWidgetAreas } =\n\t\t\tselect( editWidgetsStore );\n\n\t\treturn {\n\t\t\thasEditedWidgetAreaIds: getEditedWidgetAreas()?.length > 0,\n\t\t\tisSaving: isSavingWidgetAreas(),\n\t\t};\n\t}, [] );\n\tconst { saveEditedWidgetAreas } = useDispatch( editWidgetsStore );\n\n\treturn (\n\t\t<Button\n\t\t\tvariant=\"primary\"\n\t\t\tisBusy={ isSaving }\n\t\t\taria-disabled={ isSaving }\n\t\t\tonClick={ isSaving ? undefined : saveEditedWidgetAreas }\n\t\t\tdisabled={ ! hasEditedWidgetAreaIds }\n\t\t>\n\t\t\t{ isSaving ? __( 'Saving…' ) : __( 'Update' ) }\n\t\t</Button>\n\t);\n}\n\nexport default SaveButton;\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAKA,IAAAG,MAAA,GAAAH,OAAA;AAVA;AACA;AACA;;AAKA;AACA;AACA;;AAGA,SAASI,UAAUA,CAAA,EAAG;EACrB,MAAM;IAAEC,sBAAsB;IAAEC;EAAS,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IACrE,MAAM;MAAEC,oBAAoB;MAAEC;IAAoB,CAAC,GAClDF,MAAM,CAAEG,YAAiB,CAAC;IAE3B,OAAO;MACNN,sBAAsB,EAAEI,oBAAoB,CAAC,CAAC,EAAEG,MAAM,GAAG,CAAC;MAC1DN,QAAQ,EAAEI,mBAAmB,CAAC;IAC/B,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EACP,MAAM;IAAEG;EAAsB,CAAC,GAAG,IAAAC,iBAAW,EAAEH,YAAiB,CAAC;EAEjE,OACC,IAAAI,QAAA,CAAAC,aAAA,EAACjB,WAAA,CAAAkB,MAAM;IACNC,OAAO,EAAC,SAAS;IACjBC,MAAM,EAAGb,QAAU;IACnB,iBAAgBA,QAAU;IAC1Bc,OAAO,EAAGd,QAAQ,GAAGe,SAAS,GAAGR,qBAAuB;IACxDS,QAAQ,EAAG,CAAEjB;EAAwB,GAEnCC,QAAQ,GAAG,IAAAiB,QAAE,EAAE,SAAU,CAAC,GAAG,IAAAA,QAAE,EAAE,QAAS,CACrC,CAAC;AAEX;AAAC,IAAAC,QAAA,GAEcpB,UAAU;AAAAqB,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
@@ -1,22 +1,15 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = SecondarySidebar;
9
-
10
8
  var _element = require("@wordpress/element");
11
-
12
9
  var _data = require("@wordpress/data");
13
-
14
10
  var _store = require("../../store");
15
-
16
11
  var _inserterSidebar = _interopRequireDefault(require("./inserter-sidebar"));
17
-
18
12
  var _listViewSidebar = _interopRequireDefault(require("./list-view-sidebar"));
19
-
20
13
  /**
21
14
  * WordPress dependencies
22
15
  */
@@ -28,6 +21,7 @@ var _listViewSidebar = _interopRequireDefault(require("./list-view-sidebar"));
28
21
  /**
29
22
  * Internal dependencies
30
23
  */
24
+
31
25
  function SecondarySidebar() {
32
26
  const {
33
27
  isInserterOpen,
@@ -42,15 +36,12 @@ function SecondarySidebar() {
42
36
  isListViewOpen: isListViewOpened()
43
37
  };
44
38
  }, []);
45
-
46
39
  if (isInserterOpen) {
47
40
  return (0, _element.createElement)(_inserterSidebar.default, null);
48
41
  }
49
-
50
42
  if (isListViewOpen) {
51
43
  return (0, _element.createElement)(_listViewSidebar.default, null);
52
44
  }
53
-
54
45
  return null;
55
46
  }
56
47
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-widgets/src/components/secondary-sidebar/index.js"],"names":["SecondarySidebar","isInserterOpen","isListViewOpen","select","isInserterOpened","isListViewOpened","editWidgetsStore"],"mappings":";;;;;;;;;;;AAGA;;AAIA;;AAKA;;AACA;;AAbA;AACA;AACA;;AAEA;AACA;AACA;;AAGA;AACA;AACA;AAIe,SAASA,gBAAT,GAA4B;AAC1C,QAAM;AAAEC,IAAAA,cAAF;AAAkBC,IAAAA;AAAlB,MAAqC,qBAAaC,MAAF,IAAc;AACnE,UAAM;AAAEC,MAAAA,gBAAF;AAAoBC,MAAAA;AAApB,QACLF,MAAM,CAAEG,YAAF,CADP;AAEA,WAAO;AACNL,MAAAA,cAAc,EAAEG,gBAAgB,EAD1B;AAENF,MAAAA,cAAc,EAAEG,gBAAgB;AAF1B,KAAP;AAIA,GAP0C,EAOxC,EAPwC,CAA3C;;AASA,MAAKJ,cAAL,EAAsB;AACrB,WAAO,4BAAC,wBAAD,OAAP;AACA;;AACD,MAAKC,cAAL,EAAsB;AACrB,WAAO,4BAAC,wBAAD,OAAP;AACA;;AACD,SAAO,IAAP;AACA","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"]}
1
+ {"version":3,"names":["_data","require","_store","_inserterSidebar","_interopRequireDefault","_listViewSidebar","SecondarySidebar","isInserterOpen","isListViewOpen","useSelect","select","isInserterOpened","isListViewOpened","editWidgetsStore","_element","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,QAAA,CAAAC,aAAA,EAACZ,gBAAA,CAAAa,OAAe,MAAE,CAAC;EAC3B;EACA,IAAKR,cAAc,EAAG;IACrB,OAAO,IAAAM,QAAA,CAAAC,aAAA,EAACV,gBAAA,CAAAW,OAAe,MAAE,CAAC;EAC3B;EACA,OAAO,IAAI;AACZ"}
@@ -1,30 +1,19 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = InserterSidebar;
9
-
10
8
  var _element = require("@wordpress/element");
11
-
12
9
  var _components = require("@wordpress/components");
13
-
14
10
  var _icons = require("@wordpress/icons");
15
-
16
11
  var _blockEditor = require("@wordpress/block-editor");
17
-
18
12
  var _compose = require("@wordpress/compose");
19
-
20
13
  var _data = require("@wordpress/data");
21
-
22
14
  var _i18n = require("@wordpress/i18n");
23
-
24
15
  var _useWidgetLibraryInsertionPoint = _interopRequireDefault(require("../../hooks/use-widget-library-insertion-point"));
25
-
26
16
  var _store = require("../../store");
27
-
28
17
  /**
29
18
  * WordPress dependencies
30
19
  */
@@ -32,6 +21,7 @@ var _store = require("../../store");
32
21
  /**
33
22
  * Internal dependencies
34
23
  */
24
+
35
25
  function InserterSidebar() {
36
26
  const isMobileViewport = (0, _compose.useViewportMatch)('medium', '<');
37
27
  const {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-widgets/src/components/secondary-sidebar/inserter-sidebar.js"],"names":["InserterSidebar","isMobileViewport","rootClientId","insertionIndex","setIsInserterOpened","editWidgetsStore","closeInserter","TagName","VisuallyHidden","inserterDialogRef","inserterDialogProps","onClose","focusOnMount","libraryRef","current","focusSearch","close"],"mappings":";;;;;;;;;AAUA;;AAPA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AAKA;;AACA;;AAlBA;AACA;AACA;;AAYA;AACA;AACA;AAIe,SAASA,eAAT,GAA2B;AACzC,QAAMC,gBAAgB,GAAG,+BAAkB,QAAlB,EAA4B,GAA5B,CAAzB;AACA,QAAM;AAAEC,IAAAA,YAAF;AAAgBC,IAAAA;AAAhB,MAAmC,8CAAzC;AAEA,QAAM;AAAEC,IAAAA;AAAF,MAA0B,uBAAaC,YAAb,CAAhC;AAEA,QAAMC,aAAa,GAAG,0BAAa,MAAM;AACxC,WAAOF,mBAAmB,CAAE,KAAF,CAA1B;AACA,GAFqB,EAEnB,CAAEA,mBAAF,CAFmB,CAAtB;AAIA,QAAMG,OAAO,GAAG,CAAEN,gBAAF,GAAqBO,0BAArB,GAAsC,KAAtD;AACA,QAAM,CAAEC,iBAAF,EAAqBC,mBAArB,IAA6C,sCAAW;AAC7DC,IAAAA,OAAO,EAAEL,aADoD;AAE7DM,IAAAA,YAAY,EAAE;AAF+C,GAAX,CAAnD;AAKA,QAAMC,UAAU,GAAG,sBAAnB;AACA,0BAAW,MAAM;AAChBA,IAAAA,UAAU,CAACC,OAAX,CAAmBC,WAAnB;AACA,GAFD,EAEG,EAFH;AAIA,SACC;AACC,IAAA,GAAG,EAAGN,iBADP;AAAA,OAEMC,mBAFN;AAGC,IAAA,SAAS,EAAC;AAHX,KAKC,4BAAC,OAAD;AAAS,IAAA,SAAS,EAAC;AAAnB,KACC,4BAAC,kBAAD;AACC,IAAA,IAAI,EAAGM,YADR;AAEC,IAAA,OAAO,EAAGV,aAFX;AAGC,IAAA,KAAK,EAAG,cAAI,sBAAJ;AAHT,IADD,CALD,EAYC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC,4BAAC,kCAAD;AACC,IAAA,qBAAqB,MADtB;AAEC,IAAA,gBAAgB,EAAGL,gBAFpB;AAGC,IAAA,YAAY,EAAGC,YAHhB;AAIC,IAAA,4BAA4B,EAAGC,cAJhC;AAKC,IAAA,GAAG,EAAGU;AALP,IADD,CAZD,CADD;AAwBA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Button, VisuallyHidden } from '@wordpress/components';\nimport { close } from '@wordpress/icons';\nimport { __experimentalLibrary as Library } from '@wordpress/block-editor';\nimport {\n\tuseViewportMatch,\n\t__experimentalUseDialog as useDialog,\n} from '@wordpress/compose';\nimport { useCallback, useEffect, useRef } from '@wordpress/element';\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport useWidgetLibraryInsertionPoint from '../../hooks/use-widget-library-insertion-point';\nimport { store as editWidgetsStore } from '../../store';\n\nexport default function InserterSidebar() {\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst { rootClientId, insertionIndex } = useWidgetLibraryInsertionPoint();\n\n\tconst { setIsInserterOpened } = useDispatch( editWidgetsStore );\n\n\tconst closeInserter = useCallback( () => {\n\t\treturn setIsInserterOpened( false );\n\t}, [ setIsInserterOpened ] );\n\n\tconst TagName = ! isMobileViewport ? VisuallyHidden : 'div';\n\tconst [ inserterDialogRef, inserterDialogProps ] = useDialog( {\n\t\tonClose: closeInserter,\n\t\tfocusOnMount: null,\n\t} );\n\n\tconst libraryRef = useRef();\n\tuseEffect( () => {\n\t\tlibraryRef.current.focusSearch();\n\t}, [] );\n\n\treturn (\n\t\t<div\n\t\t\tref={ inserterDialogRef }\n\t\t\t{ ...inserterDialogProps }\n\t\t\tclassName=\"edit-widgets-layout__inserter-panel\"\n\t\t>\n\t\t\t<TagName className=\"edit-widgets-layout__inserter-panel-header\">\n\t\t\t\t<Button\n\t\t\t\t\ticon={ close }\n\t\t\t\t\tonClick={ closeInserter }\n\t\t\t\t\tlabel={ __( 'Close block inserter' ) }\n\t\t\t\t/>\n\t\t\t</TagName>\n\t\t\t<div className=\"edit-widgets-layout__inserter-panel-content\">\n\t\t\t\t<Library\n\t\t\t\t\tshowInserterHelpPanel\n\t\t\t\t\tshouldFocusBlock={ isMobileViewport }\n\t\t\t\t\trootClientId={ rootClientId }\n\t\t\t\t\t__experimentalInsertionIndex={ insertionIndex }\n\t\t\t\t\tref={ libraryRef }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"]}
1
+ {"version":3,"names":["_element","require","_components","_icons","_blockEditor","_compose","_data","_i18n","_useWidgetLibraryInsertionPoint","_interopRequireDefault","_store","InserterSidebar","isMobileViewport","useViewportMatch","rootClientId","insertionIndex","useWidgetLibraryInsertionPoint","setIsInserterOpened","useDispatch","editWidgetsStore","closeInserter","useCallback","TagName","VisuallyHidden","inserterDialogRef","inserterDialogProps","useDialog","onClose","focusOnMount","libraryRef","useRef","useEffect","current","focusSearch","createElement","ref","className","Button","icon","close","onClick","label","__","__experimentalLibrary","showInserterHelpPanel","shouldFocusBlock","__experimentalInsertionIndex"],"sources":["@wordpress/edit-widgets/src/components/secondary-sidebar/inserter-sidebar.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Button, VisuallyHidden } from '@wordpress/components';\nimport { close } from '@wordpress/icons';\nimport { __experimentalLibrary as Library } from '@wordpress/block-editor';\nimport {\n\tuseViewportMatch,\n\t__experimentalUseDialog as useDialog,\n} from '@wordpress/compose';\nimport { useCallback, useEffect, useRef } from '@wordpress/element';\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport useWidgetLibraryInsertionPoint from '../../hooks/use-widget-library-insertion-point';\nimport { store as editWidgetsStore } from '../../store';\n\nexport default function InserterSidebar() {\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst { rootClientId, insertionIndex } = useWidgetLibraryInsertionPoint();\n\n\tconst { setIsInserterOpened } = useDispatch( editWidgetsStore );\n\n\tconst closeInserter = useCallback( () => {\n\t\treturn setIsInserterOpened( false );\n\t}, [ setIsInserterOpened ] );\n\n\tconst TagName = ! isMobileViewport ? VisuallyHidden : 'div';\n\tconst [ inserterDialogRef, inserterDialogProps ] = useDialog( {\n\t\tonClose: closeInserter,\n\t\tfocusOnMount: null,\n\t} );\n\n\tconst libraryRef = useRef();\n\tuseEffect( () => {\n\t\tlibraryRef.current.focusSearch();\n\t}, [] );\n\n\treturn (\n\t\t<div\n\t\t\tref={ inserterDialogRef }\n\t\t\t{ ...inserterDialogProps }\n\t\t\tclassName=\"edit-widgets-layout__inserter-panel\"\n\t\t>\n\t\t\t<TagName className=\"edit-widgets-layout__inserter-panel-header\">\n\t\t\t\t<Button\n\t\t\t\t\ticon={ close }\n\t\t\t\t\tonClick={ closeInserter }\n\t\t\t\t\tlabel={ __( 'Close block inserter' ) }\n\t\t\t\t/>\n\t\t\t</TagName>\n\t\t\t<div className=\"edit-widgets-layout__inserter-panel-content\">\n\t\t\t\t<Library\n\t\t\t\t\tshowInserterHelpPanel\n\t\t\t\t\tshouldFocusBlock={ isMobileViewport }\n\t\t\t\t\trootClientId={ rootClientId }\n\t\t\t\t\t__experimentalInsertionIndex={ insertionIndex }\n\t\t\t\t\tref={ libraryRef }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;AAUA,IAAAA,QAAA,GAAAC,OAAA;AAPA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAKA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AAKA,IAAAO,+BAAA,GAAAC,sBAAA,CAAAR,OAAA;AACA,IAAAS,MAAA,GAAAT,OAAA;AAlBA;AACA;AACA;;AAYA;AACA;AACA;;AAIe,SAASU,eAAeA,CAAA,EAAG;EACzC,MAAMC,gBAAgB,GAAG,IAAAC,yBAAgB,EAAE,QAAQ,EAAE,GAAI,CAAC;EAC1D,MAAM;IAAEC,YAAY;IAAEC;EAAe,CAAC,GAAG,IAAAC,uCAA8B,EAAC,CAAC;EAEzE,MAAM;IAAEC;EAAoB,CAAC,GAAG,IAAAC,iBAAW,EAAEC,YAAiB,CAAC;EAE/D,MAAMC,aAAa,GAAG,IAAAC,oBAAW,EAAE,MAAM;IACxC,OAAOJ,mBAAmB,CAAE,KAAM,CAAC;EACpC,CAAC,EAAE,CAAEA,mBAAmB,CAAG,CAAC;EAE5B,MAAMK,OAAO,GAAG,CAAEV,gBAAgB,GAAGW,0BAAc,GAAG,KAAK;EAC3D,MAAM,CAAEC,iBAAiB,EAAEC,mBAAmB,CAAE,GAAG,IAAAC,gCAAS,EAAE;IAC7DC,OAAO,EAAEP,aAAa;IACtBQ,YAAY,EAAE;EACf,CAAE,CAAC;EAEH,MAAMC,UAAU,GAAG,IAAAC,eAAM,EAAC,CAAC;EAC3B,IAAAC,kBAAS,EAAE,MAAM;IAChBF,UAAU,CAACG,OAAO,CAACC,WAAW,CAAC,CAAC;EACjC,CAAC,EAAE,EAAG,CAAC;EAEP,OACC,IAAAjC,QAAA,CAAAkC,aAAA;IACCC,GAAG,EAAGX,iBAAmB;IAAA,GACpBC,mBAAmB;IACxBW,SAAS,EAAC;EAAqC,GAE/C,IAAApC,QAAA,CAAAkC,aAAA,EAACZ,OAAO;IAACc,SAAS,EAAC;EAA4C,GAC9D,IAAApC,QAAA,CAAAkC,aAAA,EAAChC,WAAA,CAAAmC,MAAM;IACNC,IAAI,EAAGC,YAAO;IACdC,OAAO,EAAGpB,aAAe;IACzBqB,KAAK,EAAG,IAAAC,QAAE,EAAE,sBAAuB;EAAG,CACtC,CACO,CAAC,EACV,IAAA1C,QAAA,CAAAkC,aAAA;IAAKE,SAAS,EAAC;EAA6C,GAC3D,IAAApC,QAAA,CAAAkC,aAAA,EAAC9B,YAAA,CAAAuC,qBAAO;IACPC,qBAAqB;IACrBC,gBAAgB,EAAGjC,gBAAkB;IACrCE,YAAY,EAAGA,YAAc;IAC7BgC,4BAA4B,EAAG/B,cAAgB;IAC/CoB,GAAG,EAAGN;EAAY,CAClB,CACG,CACD,CAAC;AAER"}
@@ -4,25 +4,15 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = ListViewSidebar;
7
-
8
7
  var _element = require("@wordpress/element");
9
-
10
8
  var _blockEditor = require("@wordpress/block-editor");
11
-
12
9
  var _components = require("@wordpress/components");
13
-
14
10
  var _compose = require("@wordpress/compose");
15
-
16
11
  var _data = require("@wordpress/data");
17
-
18
12
  var _i18n = require("@wordpress/i18n");
19
-
20
13
  var _icons = require("@wordpress/icons");
21
-
22
14
  var _keycodes = require("@wordpress/keycodes");
23
-
24
15
  var _store = require("../../store");
25
-
26
16
  /**
27
17
  * WordPress dependencies
28
18
  */
@@ -30,25 +20,26 @@ var _store = require("../../store");
30
20
  /**
31
21
  * Internal dependencies
32
22
  */
23
+
33
24
  function ListViewSidebar() {
34
25
  const {
35
26
  setIsListViewOpened
36
- } = (0, _data.useDispatch)(_store.store); // Use internal state instead of a ref to make sure that the component
37
- // re-renders when the dropZoneElement updates.
27
+ } = (0, _data.useDispatch)(_store.store);
38
28
 
29
+ // Use internal state instead of a ref to make sure that the component
30
+ // re-renders when the dropZoneElement updates.
39
31
  const [dropZoneElement, setDropZoneElement] = (0, _element.useState)(null);
40
32
  const focusOnMountRef = (0, _compose.useFocusOnMount)('firstElement');
41
33
  const headerFocusReturnRef = (0, _compose.useFocusReturn)();
42
34
  const contentFocusReturnRef = (0, _compose.useFocusReturn)();
43
-
44
35
  function closeOnEscape(event) {
45
36
  if (event.keyCode === _keycodes.ESCAPE && !event.defaultPrevented) {
46
37
  event.preventDefault();
47
38
  setIsListViewOpened(false);
48
39
  }
49
40
  }
50
-
51
- return (// eslint-disable-next-line jsx-a11y/no-static-element-interactions
41
+ return (
42
+ // eslint-disable-next-line jsx-a11y/no-static-element-interactions
52
43
  (0, _element.createElement)("div", {
53
44
  className: "edit-widgets-editor__list-view-panel",
54
45
  onKeyDown: closeOnEscape
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-widgets/src/components/secondary-sidebar/list-view-sidebar.js"],"names":["ListViewSidebar","setIsListViewOpened","editWidgetsStore","dropZoneElement","setDropZoneElement","focusOnMountRef","headerFocusReturnRef","contentFocusReturnRef","closeOnEscape","event","keyCode","ESCAPE","defaultPrevented","preventDefault","closeSmall"],"mappings":";;;;;;;AAWA;;AARA;;AACA;;AACA;;AAKA;;AAEA;;AACA;;AACA;;AAKA;;AAnBA;AACA;AACA;;AAcA;AACA;AACA;AAGe,SAASA,eAAT,GAA2B;AACzC,QAAM;AAAEC,IAAAA;AAAF,MAA0B,uBAAaC,YAAb,CAAhC,CADyC,CAGzC;AACA;;AACA,QAAM,CAAEC,eAAF,EAAmBC,kBAAnB,IAA0C,uBAAU,IAAV,CAAhD;AAEA,QAAMC,eAAe,GAAG,8BAAiB,cAAjB,CAAxB;AACA,QAAMC,oBAAoB,GAAG,8BAA7B;AACA,QAAMC,qBAAqB,GAAG,8BAA9B;;AAEA,WAASC,aAAT,CAAwBC,KAAxB,EAAgC;AAC/B,QAAKA,KAAK,CAACC,OAAN,KAAkBC,gBAAlB,IAA4B,CAAEF,KAAK,CAACG,gBAAzC,EAA4D;AAC3DH,MAAAA,KAAK,CAACI,cAAN;AACAZ,MAAAA,mBAAmB,CAAE,KAAF,CAAnB;AACA;AACD;;AAED,SACC;AACA;AACC,MAAA,SAAS,EAAC,sCADX;AAEC,MAAA,SAAS,EAAGO;AAFb,OAIC;AACC,MAAA,SAAS,EAAC,6CADX;AAEC,MAAA,GAAG,EAAGF;AAFP,OAIC,4CAAU,cAAI,WAAJ,CAAV,CAJD,EAKC,4BAAC,kBAAD;AACC,MAAA,IAAI,EAAGQ,iBADR;AAEC,MAAA,KAAK,EAAG,cAAI,OAAJ,CAFT;AAGC,MAAA,OAAO,EAAG,MAAMb,mBAAmB,CAAE,KAAF;AAHpC,MALD,CAJD,EAeC;AACC,MAAA,SAAS,EAAC,8CADX;AAEC,MAAA,GAAG,EAAG,2BAAc,CACnBM,qBADmB,EAEnBF,eAFmB,EAGnBD,kBAHmB,CAAd;AAFP,OAQC,4BAAC,mCAAD;AAAU,MAAA,eAAe,EAAGD;AAA5B,MARD,CAfD;AAFD;AA6BA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalListView as ListView } from '@wordpress/block-editor';\nimport { Button } from '@wordpress/components';\nimport {\n\tuseFocusOnMount,\n\tuseFocusReturn,\n\tuseMergeRefs,\n} from '@wordpress/compose';\nimport { useDispatch } from '@wordpress/data';\nimport { useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { closeSmall } from '@wordpress/icons';\nimport { ESCAPE } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\nexport default function ListViewSidebar() {\n\tconst { setIsListViewOpened } = useDispatch( editWidgetsStore );\n\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the dropZoneElement updates.\n\tconst [ dropZoneElement, setDropZoneElement ] = useState( null );\n\n\tconst focusOnMountRef = useFocusOnMount( 'firstElement' );\n\tconst headerFocusReturnRef = useFocusReturn();\n\tconst contentFocusReturnRef = useFocusReturn();\n\n\tfunction closeOnEscape( event ) {\n\t\tif ( event.keyCode === ESCAPE && ! event.defaultPrevented ) {\n\t\t\tevent.preventDefault();\n\t\t\tsetIsListViewOpened( false );\n\t\t}\n\t}\n\n\treturn (\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<div\n\t\t\tclassName=\"edit-widgets-editor__list-view-panel\"\n\t\t\tonKeyDown={ closeOnEscape }\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName=\"edit-widgets-editor__list-view-panel-header\"\n\t\t\t\tref={ headerFocusReturnRef }\n\t\t\t>\n\t\t\t\t<strong>{ __( 'List View' ) }</strong>\n\t\t\t\t<Button\n\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\tlabel={ __( 'Close' ) }\n\t\t\t\t\tonClick={ () => setIsListViewOpened( false ) }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<div\n\t\t\t\tclassName=\"edit-widgets-editor__list-view-panel-content\"\n\t\t\t\tref={ useMergeRefs( [\n\t\t\t\t\tcontentFocusReturnRef,\n\t\t\t\t\tfocusOnMountRef,\n\t\t\t\t\tsetDropZoneElement,\n\t\t\t\t] ) }\n\t\t\t>\n\t\t\t\t<ListView dropZoneElement={ dropZoneElement } />\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"]}
1
+ {"version":3,"names":["_element","require","_blockEditor","_components","_compose","_data","_i18n","_icons","_keycodes","_store","ListViewSidebar","setIsListViewOpened","useDispatch","editWidgetsStore","dropZoneElement","setDropZoneElement","useState","focusOnMountRef","useFocusOnMount","headerFocusReturnRef","useFocusReturn","contentFocusReturnRef","closeOnEscape","event","keyCode","ESCAPE","defaultPrevented","preventDefault","createElement","className","onKeyDown","ref","__","Button","icon","closeSmall","label","onClick","useMergeRefs","__experimentalListView"],"sources":["@wordpress/edit-widgets/src/components/secondary-sidebar/list-view-sidebar.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalListView as ListView } from '@wordpress/block-editor';\nimport { Button } from '@wordpress/components';\nimport {\n\tuseFocusOnMount,\n\tuseFocusReturn,\n\tuseMergeRefs,\n} from '@wordpress/compose';\nimport { useDispatch } from '@wordpress/data';\nimport { useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { closeSmall } from '@wordpress/icons';\nimport { ESCAPE } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\nexport default function ListViewSidebar() {\n\tconst { setIsListViewOpened } = useDispatch( editWidgetsStore );\n\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the dropZoneElement updates.\n\tconst [ dropZoneElement, setDropZoneElement ] = useState( null );\n\n\tconst focusOnMountRef = useFocusOnMount( 'firstElement' );\n\tconst headerFocusReturnRef = useFocusReturn();\n\tconst contentFocusReturnRef = useFocusReturn();\n\n\tfunction closeOnEscape( event ) {\n\t\tif ( event.keyCode === ESCAPE && ! event.defaultPrevented ) {\n\t\t\tevent.preventDefault();\n\t\t\tsetIsListViewOpened( false );\n\t\t}\n\t}\n\n\treturn (\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<div\n\t\t\tclassName=\"edit-widgets-editor__list-view-panel\"\n\t\t\tonKeyDown={ closeOnEscape }\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName=\"edit-widgets-editor__list-view-panel-header\"\n\t\t\t\tref={ headerFocusReturnRef }\n\t\t\t>\n\t\t\t\t<strong>{ __( 'List View' ) }</strong>\n\t\t\t\t<Button\n\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\tlabel={ __( 'Close' ) }\n\t\t\t\t\tonClick={ () => setIsListViewOpened( false ) }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<div\n\t\t\t\tclassName=\"edit-widgets-editor__list-view-panel-content\"\n\t\t\t\tref={ useMergeRefs( [\n\t\t\t\t\tcontentFocusReturnRef,\n\t\t\t\t\tfocusOnMountRef,\n\t\t\t\t\tsetDropZoneElement,\n\t\t\t\t] ) }\n\t\t\t>\n\t\t\t\t<ListView dropZoneElement={ dropZoneElement } />\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;AAWA,IAAAA,QAAA,GAAAC,OAAA;AARA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAKA,IAAAI,KAAA,GAAAJ,OAAA;AAEA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AAKA,IAAAQ,MAAA,GAAAR,OAAA;AAnBA;AACA;AACA;;AAcA;AACA;AACA;;AAGe,SAASS,eAAeA,CAAA,EAAG;EACzC,MAAM;IAAEC;EAAoB,CAAC,GAAG,IAAAC,iBAAW,EAAEC,YAAiB,CAAC;;EAE/D;EACA;EACA,MAAM,CAAEC,eAAe,EAAEC,kBAAkB,CAAE,GAAG,IAAAC,iBAAQ,EAAE,IAAK,CAAC;EAEhE,MAAMC,eAAe,GAAG,IAAAC,wBAAe,EAAE,cAAe,CAAC;EACzD,MAAMC,oBAAoB,GAAG,IAAAC,uBAAc,EAAC,CAAC;EAC7C,MAAMC,qBAAqB,GAAG,IAAAD,uBAAc,EAAC,CAAC;EAE9C,SAASE,aAAaA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