@wordpress/edit-widgets 6.32.0 → 6.32.1-next.ff1cebbba.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 (202) hide show
  1. package/build/blocks/widget-area/block.json +26 -0
  2. package/build/blocks/widget-area/edit/index.js +94 -87
  3. package/build/blocks/widget-area/edit/index.js.map +7 -1
  4. package/build/blocks/widget-area/edit/inner-blocks.js +68 -50
  5. package/build/blocks/widget-area/edit/inner-blocks.js.map +7 -1
  6. package/build/blocks/widget-area/edit/use-is-dragging-within.js +34 -40
  7. package/build/blocks/widget-area/edit/use-is-dragging-within.js.map +7 -1
  8. package/build/blocks/widget-area/index.js +49 -52
  9. package/build/blocks/widget-area/index.js.map +7 -1
  10. package/build/components/error-boundary/index.js +49 -51
  11. package/build/components/error-boundary/index.js.map +7 -1
  12. package/build/components/header/document-tools/index.js +104 -74
  13. package/build/components/header/document-tools/index.js.map +7 -1
  14. package/build/components/header/index.js +81 -62
  15. package/build/components/header/index.js.map +7 -1
  16. package/build/components/header/undo-redo/redo.js +50 -38
  17. package/build/components/header/undo-redo/redo.js.map +7 -1
  18. package/build/components/header/undo-redo/undo.js +49 -37
  19. package/build/components/header/undo-redo/undo.js.map +7 -1
  20. package/build/components/keyboard-shortcut-help-modal/config.js +74 -71
  21. package/build/components/keyboard-shortcut-help-modal/config.js.map +7 -1
  22. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +61 -44
  23. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +7 -1
  24. package/build/components/keyboard-shortcut-help-modal/index.js +154 -103
  25. package/build/components/keyboard-shortcut-help-modal/index.js.map +7 -1
  26. package/build/components/keyboard-shortcut-help-modal/shortcut.js +74 -56
  27. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +7 -1
  28. package/build/components/keyboard-shortcuts/index.js +89 -82
  29. package/build/components/keyboard-shortcuts/index.js.map +7 -1
  30. package/build/components/layout/index.js +75 -49
  31. package/build/components/layout/index.js.map +7 -1
  32. package/build/components/layout/interface.js +89 -75
  33. package/build/components/layout/interface.js.map +7 -1
  34. package/build/components/layout/unsaved-changes-warning.js +35 -42
  35. package/build/components/layout/unsaved-changes-warning.js.map +7 -1
  36. package/build/components/more-menu/index.js +189 -108
  37. package/build/components/more-menu/index.js.map +7 -1
  38. package/build/components/more-menu/tools-more-menu-group.js +29 -23
  39. package/build/components/more-menu/tools-more-menu-group.js.map +7 -1
  40. package/build/components/notices/index.js +62 -48
  41. package/build/components/notices/index.js.map +7 -1
  42. package/build/components/save-button/index.js +55 -47
  43. package/build/components/save-button/index.js.map +7 -1
  44. package/build/components/secondary-sidebar/index.js +41 -34
  45. package/build/components/secondary-sidebar/index.js.map +7 -1
  46. package/build/components/secondary-sidebar/inserter-sidebar.js +55 -46
  47. package/build/components/secondary-sidebar/inserter-sidebar.js.map +7 -1
  48. package/build/components/secondary-sidebar/list-view-sidebar.js +76 -67
  49. package/build/components/secondary-sidebar/list-view-sidebar.js.map +7 -1
  50. package/build/components/sidebar/index.js +149 -138
  51. package/build/components/sidebar/index.js.map +7 -1
  52. package/build/components/sidebar/widget-areas.js +73 -57
  53. package/build/components/sidebar/widget-areas.js.map +7 -1
  54. package/build/components/welcome-guide/index.js +182 -137
  55. package/build/components/welcome-guide/index.js.map +7 -1
  56. package/build/components/widget-areas-block-editor-content/index.js +64 -43
  57. package/build/components/widget-areas-block-editor-content/index.js.map +7 -1
  58. package/build/components/widget-areas-block-editor-provider/index.js +115 -92
  59. package/build/components/widget-areas-block-editor-provider/index.js.map +7 -1
  60. package/build/constants.js +30 -8
  61. package/build/constants.js.map +7 -1
  62. package/build/filters/index.js +3 -5
  63. package/build/filters/index.js.map +7 -1
  64. package/build/filters/move-to-widget-area.js +52 -59
  65. package/build/filters/move-to-widget-area.js.map +7 -1
  66. package/build/filters/replace-media-upload.js +9 -11
  67. package/build/filters/replace-media-upload.js.map +7 -1
  68. package/build/hooks/use-last-selected-widget-area.js +38 -44
  69. package/build/hooks/use-last-selected-widget-area.js.map +7 -1
  70. package/build/hooks/use-widget-library-insertion-point.js +60 -55
  71. package/build/hooks/use-widget-library-insertion-point.js.map +7 -1
  72. package/build/index.js +86 -93
  73. package/build/index.js.map +7 -1
  74. package/build/lock-unlock.js +31 -15
  75. package/build/lock-unlock.js.map +7 -1
  76. package/build/store/actions.js +181 -313
  77. package/build/store/actions.js.map +7 -1
  78. package/build/store/constants.js +27 -10
  79. package/build/store/constants.js.map +7 -1
  80. package/build/store/index.js +51 -51
  81. package/build/store/index.js.map +7 -1
  82. package/build/store/private-selectors.js +28 -7
  83. package/build/store/private-selectors.js.map +7 -1
  84. package/build/store/reducer.js +65 -118
  85. package/build/store/reducer.js.map +7 -1
  86. package/build/store/resolvers.js +64 -63
  87. package/build/store/resolvers.js.map +7 -1
  88. package/build/store/selectors.js +194 -231
  89. package/build/store/selectors.js.map +7 -1
  90. package/build/store/transformers.js +47 -41
  91. package/build/store/transformers.js.map +7 -1
  92. package/build/store/utils.js +47 -70
  93. package/build/store/utils.js.map +7 -1
  94. package/build-module/blocks/widget-area/block.json +26 -0
  95. package/build-module/blocks/widget-area/edit/index.js +63 -75
  96. package/build-module/blocks/widget-area/edit/index.js.map +7 -1
  97. package/build-module/blocks/widget-area/edit/inner-blocks.js +38 -41
  98. package/build-module/blocks/widget-area/edit/inner-blocks.js.map +7 -1
  99. package/build-module/blocks/widget-area/edit/use-is-dragging-within.js +14 -33
  100. package/build-module/blocks/widget-area/edit/use-is-dragging-within.js.map +7 -1
  101. package/build-module/blocks/widget-area/index.js +14 -46
  102. package/build-module/blocks/widget-area/index.js.map +7 -1
  103. package/build-module/components/error-boundary/index.js +30 -43
  104. package/build-module/components/error-boundary/index.js.map +7 -1
  105. package/build-module/components/header/document-tools/index.js +75 -66
  106. package/build-module/components/header/document-tools/index.js.map +7 -1
  107. package/build-module/components/header/index.js +52 -54
  108. package/build-module/components/header/index.js.map +7 -1
  109. package/build-module/components/header/undo-redo/redo.js +32 -32
  110. package/build-module/components/header/undo-redo/redo.js.map +7 -1
  111. package/build-module/components/header/undo-redo/undo.js +31 -31
  112. package/build-module/components/header/undo-redo/undo.js.map +7 -1
  113. package/build-module/components/keyboard-shortcut-help-modal/config.js +62 -75
  114. package/build-module/components/keyboard-shortcut-help-modal/config.js.map +7 -1
  115. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +33 -37
  116. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +7 -1
  117. package/build-module/components/keyboard-shortcut-help-modal/index.js +130 -97
  118. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +7 -1
  119. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +56 -50
  120. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +7 -1
  121. package/build-module/components/keyboard-shortcuts/index.js +73 -75
  122. package/build-module/components/keyboard-shortcuts/index.js.map +7 -1
  123. package/build-module/components/layout/index.js +46 -41
  124. package/build-module/components/layout/index.js.map +7 -1
  125. package/build-module/components/layout/interface.js +63 -66
  126. package/build-module/components/layout/interface.js.map +7 -1
  127. package/build-module/components/layout/unsaved-changes-warning.js +17 -37
  128. package/build-module/components/layout/unsaved-changes-warning.js.map +7 -1
  129. package/build-module/components/more-menu/index.js +167 -102
  130. package/build-module/components/more-menu/index.js.map +7 -1
  131. package/build-module/components/more-menu/tools-more-menu-group.js +11 -17
  132. package/build-module/components/more-menu/tools-more-menu-group.js.map +7 -1
  133. package/build-module/components/notices/index.js +43 -42
  134. package/build-module/components/notices/index.js.map +7 -1
  135. package/build-module/components/save-button/index.js +37 -41
  136. package/build-module/components/save-button/index.js.map +7 -1
  137. package/build-module/components/secondary-sidebar/index.js +14 -27
  138. package/build-module/components/secondary-sidebar/index.js.map +7 -1
  139. package/build-module/components/secondary-sidebar/inserter-sidebar.js +26 -38
  140. package/build-module/components/secondary-sidebar/inserter-sidebar.js.map +7 -1
  141. package/build-module/components/secondary-sidebar/list-view-sidebar.js +57 -60
  142. package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +7 -1
  143. package/build-module/components/sidebar/index.js +129 -127
  144. package/build-module/components/sidebar/index.js.map +7 -1
  145. package/build-module/components/sidebar/widget-areas.js +53 -49
  146. package/build-module/components/sidebar/widget-areas.js.map +7 -1
  147. package/build-module/components/welcome-guide/index.js +165 -132
  148. package/build-module/components/welcome-guide/index.js.map +7 -1
  149. package/build-module/components/widget-areas-block-editor-content/index.js +43 -36
  150. package/build-module/components/widget-areas-block-editor-content/index.js.map +7 -1
  151. package/build-module/components/widget-areas-block-editor-provider/index.js +85 -83
  152. package/build-module/components/widget-areas-block-editor-provider/index.js.map +7 -1
  153. package/build-module/constants.js +7 -3
  154. package/build-module/constants.js.map +7 -1
  155. package/build-module/filters/index.js +3 -6
  156. package/build-module/filters/index.js.map +7 -1
  157. package/build-module/filters/move-to-widget-area.js +52 -57
  158. package/build-module/filters/move-to-widget-area.js.map +7 -1
  159. package/build-module/filters/replace-media-upload.js +8 -7
  160. package/build-module/filters/replace-media-upload.js.map +7 -1
  161. package/build-module/hooks/use-last-selected-widget-area.js +20 -39
  162. package/build-module/hooks/use-last-selected-widget-area.js.map +7 -1
  163. package/build-module/hooks/use-widget-library-insertion-point.js +42 -49
  164. package/build-module/hooks/use-widget-library-insertion-point.js.map +7 -1
  165. package/build-module/index.js +60 -72
  166. package/build-module/index.js.map +7 -1
  167. package/build-module/lock-unlock.js +8 -7
  168. package/build-module/lock-unlock.js.map +7 -1
  169. package/build-module/store/actions.js +153 -293
  170. package/build-module/store/actions.js.map +7 -1
  171. package/build-module/store/constants.js +5 -5
  172. package/build-module/store/constants.js.map +7 -1
  173. package/build-module/store/index.js +16 -40
  174. package/build-module/store/index.js.map +7 -1
  175. package/build-module/store/private-selectors.js +7 -3
  176. package/build-module/store/private-selectors.js.map +7 -1
  177. package/build-module/store/reducer.js +42 -111
  178. package/build-module/store/reducer.js.map +7 -1
  179. package/build-module/store/resolvers.js +43 -51
  180. package/build-module/store/resolvers.js.map +7 -1
  181. package/build-module/store/selectors.js +171 -224
  182. package/build-module/store/selectors.js.map +7 -1
  183. package/build-module/store/transformers.js +23 -34
  184. package/build-module/store/transformers.js.map +7 -1
  185. package/build-module/store/utils.js +22 -63
  186. package/build-module/store/utils.js.map +7 -1
  187. package/build-style/style-rtl.css +216 -88
  188. package/build-style/style.css +216 -88
  189. package/package.json +36 -29
  190. package/src/blocks/widget-area/editor.scss +3 -0
  191. package/src/components/customizer-edit-widgets-initializer/style.scss +3 -0
  192. package/src/components/error-boundary/style.scss +2 -0
  193. package/src/components/header/style.scss +5 -0
  194. package/src/components/keyboard-shortcut-help-modal/style.scss +2 -0
  195. package/src/components/layout/style.scss +3 -0
  196. package/src/components/more-menu/style.scss +2 -0
  197. package/src/components/notices/style.scss +3 -0
  198. package/src/components/secondary-sidebar/style.scss +4 -0
  199. package/src/components/sidebar/style.scss +2 -0
  200. package/src/components/welcome-guide/style.scss +2 -0
  201. package/src/components/widget-areas-block-editor-content/style.scss +2 -0
  202. package/src/style.scss +16 -13
@@ -1 +1,7 @@
1
- {"version":3,"names":["useSelect","store","editWidgetsStore","InserterSidebar","ListViewSidebar","jsx","_jsx","SecondarySidebar","isInserterOpen","isListViewOpen","select","isInserterOpened","isListViewOpened"],"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":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;;AAEvD;AACA;AACA;AACA,OAAOC,eAAe,MAAM,oBAAoB;AAChD,OAAOC,eAAe,MAAM,qBAAqB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAElD,eAAe,SAASC,gBAAgBA,CAAA,EAAG;EAC1C,MAAM;IAAEC,cAAc;IAAEC;EAAe,CAAC,GAAGT,SAAS,CAAIU,MAAM,IAAM;IACnE,MAAM;MAAEC,gBAAgB;MAAEC;IAAiB,CAAC,GAC3CF,MAAM,CAAER,gBAAiB,CAAC;IAC3B,OAAO;MACNM,cAAc,EAAEG,gBAAgB,CAAC,CAAC;MAClCF,cAAc,EAAEG,gBAAgB,CAAC;IAClC,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,IAAKJ,cAAc,EAAG;IACrB,oBAAOF,IAAA,CAACH,eAAe,IAAE,CAAC;EAC3B;EACA,IAAKM,cAAc,EAAG;IACrB,oBAAOH,IAAA,CAACF,eAAe,IAAE,CAAC;EAC3B;EACA,OAAO,IAAI;AACZ","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/secondary-sidebar/index.js"],
4
+ "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"],
5
+ "mappings": "AA0BS;AAvBT,SAAS,iBAAiB;AAI1B,SAAS,SAAS,wBAAwB;AAK1C,OAAO,qBAAqB;AAC5B,OAAO,qBAAqB;AAEb,SAAR,mBAAoC;AAC1C,QAAM,EAAE,gBAAgB,eAAe,IAAI,UAAW,CAAE,WAAY;AACnE,UAAM,EAAE,kBAAkB,iBAAiB,IAC1C,OAAQ,gBAAiB;AAC1B,WAAO;AAAA,MACN,gBAAgB,iBAAiB;AAAA,MACjC,gBAAgB,iBAAiB;AAAA,IAClC;AAAA,EACD,GAAG,CAAC,CAAE;AAEN,MAAK,gBAAiB;AACrB,WAAO,oBAAC,mBAAgB;AAAA,EACzB;AACA,MAAK,gBAAiB;AACrB,WAAO,oBAAC,mBAAgB;AAAA,EACzB;AACA,SAAO;AACR;",
6
+ "names": []
7
+ }
@@ -1,43 +1,31 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { __experimentalLibrary as Library } from '@wordpress/block-editor';
5
- import { useViewportMatch } from '@wordpress/compose';
6
- import { useCallback, useRef } from '@wordpress/element';
7
- import { useDispatch } from '@wordpress/data';
8
-
9
- /**
10
- * Internal dependencies
11
- */
12
- import useWidgetLibraryInsertionPoint from '../../hooks/use-widget-library-insertion-point';
13
- import { store as editWidgetsStore } from '../../store';
14
- import { jsx as _jsx } from "react/jsx-runtime";
15
- export default function InserterSidebar() {
16
- const isMobileViewport = useViewportMatch('medium', '<');
17
- const {
18
- rootClientId,
19
- insertionIndex
20
- } = useWidgetLibraryInsertionPoint();
21
- const {
22
- setIsInserterOpened
23
- } = useDispatch(editWidgetsStore);
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { __experimentalLibrary as Library } from "@wordpress/block-editor";
3
+ import { useViewportMatch } from "@wordpress/compose";
4
+ import { useCallback, useRef } from "@wordpress/element";
5
+ import { useDispatch } from "@wordpress/data";
6
+ import useWidgetLibraryInsertionPoint from "../../hooks/use-widget-library-insertion-point";
7
+ import { store as editWidgetsStore } from "../../store";
8
+ function InserterSidebar() {
9
+ const isMobileViewport = useViewportMatch("medium", "<");
10
+ const { rootClientId, insertionIndex } = useWidgetLibraryInsertionPoint();
11
+ const { setIsInserterOpened } = useDispatch(editWidgetsStore);
24
12
  const closeInserter = useCallback(() => {
25
13
  return setIsInserterOpened(false);
26
14
  }, [setIsInserterOpened]);
27
15
  const libraryRef = useRef();
28
- return /*#__PURE__*/_jsx("div", {
29
- className: "edit-widgets-layout__inserter-panel",
30
- children: /*#__PURE__*/_jsx("div", {
31
- className: "edit-widgets-layout__inserter-panel-content",
32
- children: /*#__PURE__*/_jsx(Library, {
33
- showInserterHelpPanel: true,
34
- shouldFocusBlock: isMobileViewport,
35
- rootClientId: rootClientId,
36
- __experimentalInsertionIndex: insertionIndex,
37
- ref: libraryRef,
38
- onClose: closeInserter
39
- })
40
- })
41
- });
16
+ return /* @__PURE__ */ jsx("div", { className: "edit-widgets-layout__inserter-panel", children: /* @__PURE__ */ jsx("div", { className: "edit-widgets-layout__inserter-panel-content", children: /* @__PURE__ */ jsx(
17
+ Library,
18
+ {
19
+ showInserterHelpPanel: true,
20
+ shouldFocusBlock: isMobileViewport,
21
+ rootClientId,
22
+ __experimentalInsertionIndex: insertionIndex,
23
+ ref: libraryRef,
24
+ onClose: closeInserter
25
+ }
26
+ ) }) });
42
27
  }
43
- //# sourceMappingURL=inserter-sidebar.js.map
28
+ export {
29
+ InserterSidebar as default
30
+ };
31
+ //# sourceMappingURL=inserter-sidebar.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["__experimentalLibrary","Library","useViewportMatch","useCallback","useRef","useDispatch","useWidgetLibraryInsertionPoint","store","editWidgetsStore","jsx","_jsx","InserterSidebar","isMobileViewport","rootClientId","insertionIndex","setIsInserterOpened","closeInserter","libraryRef","className","children","showInserterHelpPanel","shouldFocusBlock","__experimentalInsertionIndex","ref","onClose"],"sources":["@wordpress/edit-widgets/src/components/secondary-sidebar/inserter-sidebar.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalLibrary as Library } from '@wordpress/block-editor';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { useCallback, useRef } from '@wordpress/element';\nimport { useDispatch } from '@wordpress/data';\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 libraryRef = useRef();\n\n\treturn (\n\t\t<div className=\"edit-widgets-layout__inserter-panel\">\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\tonClose={ closeInserter }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,qBAAqB,IAAIC,OAAO,QAAQ,yBAAyB;AAC1E,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,WAAW,EAAEC,MAAM,QAAQ,oBAAoB;AACxD,SAASC,WAAW,QAAQ,iBAAiB;;AAE7C;AACA;AACA;AACA,OAAOC,8BAA8B,MAAM,gDAAgD;AAC3F,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAExD,eAAe,SAASC,eAAeA,CAAA,EAAG;EACzC,MAAMC,gBAAgB,GAAGV,gBAAgB,CAAE,QAAQ,EAAE,GAAI,CAAC;EAC1D,MAAM;IAAEW,YAAY;IAAEC;EAAe,CAAC,GAAGR,8BAA8B,CAAC,CAAC;EAEzE,MAAM;IAAES;EAAoB,CAAC,GAAGV,WAAW,CAAEG,gBAAiB,CAAC;EAE/D,MAAMQ,aAAa,GAAGb,WAAW,CAAE,MAAM;IACxC,OAAOY,mBAAmB,CAAE,KAAM,CAAC;EACpC,CAAC,EAAE,CAAEA,mBAAmB,CAAG,CAAC;EAE5B,MAAME,UAAU,GAAGb,MAAM,CAAC,CAAC;EAE3B,oBACCM,IAAA;IAAKQ,SAAS,EAAC,qCAAqC;IAAAC,QAAA,eACnDT,IAAA;MAAKQ,SAAS,EAAC,6CAA6C;MAAAC,QAAA,eAC3DT,IAAA,CAACT,OAAO;QACPmB,qBAAqB;QACrBC,gBAAgB,EAAGT,gBAAkB;QACrCC,YAAY,EAAGA,YAAc;QAC7BS,4BAA4B,EAAGR,cAAgB;QAC/CS,GAAG,EAAGN,UAAY;QAClBO,OAAO,EAAGR;MAAe,CACzB;IAAC,CACE;EAAC,CACF,CAAC;AAER","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/secondary-sidebar/inserter-sidebar.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __experimentalLibrary as Library } from '@wordpress/block-editor';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { useCallback, useRef } from '@wordpress/element';\nimport { useDispatch } from '@wordpress/data';\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 libraryRef = useRef();\n\n\treturn (\n\t\t<div className=\"edit-widgets-layout__inserter-panel\">\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\tonClose={ closeInserter }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],
5
+ "mappings": "AA6BI;AA1BJ,SAAS,yBAAyB,eAAe;AACjD,SAAS,wBAAwB;AACjC,SAAS,aAAa,cAAc;AACpC,SAAS,mBAAmB;AAK5B,OAAO,oCAAoC;AAC3C,SAAS,SAAS,wBAAwB;AAE3B,SAAR,kBAAmC;AACzC,QAAM,mBAAmB,iBAAkB,UAAU,GAAI;AACzD,QAAM,EAAE,cAAc,eAAe,IAAI,+BAA+B;AAExE,QAAM,EAAE,oBAAoB,IAAI,YAAa,gBAAiB;AAE9D,QAAM,gBAAgB,YAAa,MAAM;AACxC,WAAO,oBAAqB,KAAM;AAAA,EACnC,GAAG,CAAE,mBAAoB,CAAE;AAE3B,QAAM,aAAa,OAAO;AAE1B,SACC,oBAAC,SAAI,WAAU,uCACd,8BAAC,SAAI,WAAU,+CACd;AAAA,IAAC;AAAA;AAAA,MACA,uBAAqB;AAAA,MACrB,kBAAmB;AAAA,MACnB;AAAA,MACA,8BAA+B;AAAA,MAC/B,KAAM;AAAA,MACN,SAAU;AAAA;AAAA,EACX,GACD,GACD;AAEF;",
6
+ "names": []
7
+ }
@@ -1,69 +1,66 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { __experimentalListView as ListView } from '@wordpress/block-editor';
5
- import { Button } from '@wordpress/components';
6
- import { useFocusOnMount, useMergeRefs } from '@wordpress/compose';
7
- import { useDispatch, useSelect } from '@wordpress/data';
8
- import { useCallback, useState } from '@wordpress/element';
9
- import { __ } from '@wordpress/i18n';
10
- import { closeSmall } from '@wordpress/icons';
11
- import { ESCAPE } from '@wordpress/keycodes';
12
-
13
- /**
14
- * Internal dependencies
15
- */
16
- import { store as editWidgetsStore } from '../../store';
17
- import { unlock } from '../../lock-unlock';
18
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
19
- export default function ListViewSidebar() {
20
- const {
21
- setIsListViewOpened
22
- } = useDispatch(editWidgetsStore);
23
- const {
24
- getListViewToggleRef
25
- } = unlock(useSelect(editWidgetsStore));
26
-
27
- // Use internal state instead of a ref to make sure that the component
28
- // re-renders when the dropZoneElement updates.
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { __experimentalListView as ListView } from "@wordpress/block-editor";
3
+ import { Button } from "@wordpress/components";
4
+ import { useFocusOnMount, useMergeRefs } from "@wordpress/compose";
5
+ import { useDispatch, useSelect } from "@wordpress/data";
6
+ import { useCallback, useState } from "@wordpress/element";
7
+ import { __ } from "@wordpress/i18n";
8
+ import { closeSmall } from "@wordpress/icons";
9
+ import { ESCAPE } from "@wordpress/keycodes";
10
+ import { store as editWidgetsStore } from "../../store";
11
+ import { unlock } from "../../lock-unlock";
12
+ function ListViewSidebar() {
13
+ const { setIsListViewOpened } = useDispatch(editWidgetsStore);
14
+ const { getListViewToggleRef } = unlock(useSelect(editWidgetsStore));
29
15
  const [dropZoneElement, setDropZoneElement] = useState(null);
30
- const focusOnMountRef = useFocusOnMount('firstElement');
31
-
32
- // When closing the list view, focus should return to the toggle button.
16
+ const focusOnMountRef = useFocusOnMount("firstElement");
33
17
  const closeListView = useCallback(() => {
34
18
  setIsListViewOpened(false);
35
19
  getListViewToggleRef().current?.focus();
36
20
  }, [getListViewToggleRef, setIsListViewOpened]);
37
- const closeOnEscape = useCallback(event => {
38
- if (event.keyCode === ESCAPE && !event.defaultPrevented) {
39
- event.preventDefault();
40
- closeListView();
41
- }
42
- }, [closeListView]);
21
+ const closeOnEscape = useCallback(
22
+ (event) => {
23
+ if (event.keyCode === ESCAPE && !event.defaultPrevented) {
24
+ event.preventDefault();
25
+ closeListView();
26
+ }
27
+ },
28
+ [closeListView]
29
+ );
43
30
  return (
44
- /*#__PURE__*/
45
31
  // eslint-disable-next-line jsx-a11y/no-static-element-interactions
46
- _jsxs("div", {
47
- className: "edit-widgets-editor__list-view-panel",
48
- onKeyDown: closeOnEscape,
49
- children: [/*#__PURE__*/_jsxs("div", {
50
- className: "edit-widgets-editor__list-view-panel-header",
51
- children: [/*#__PURE__*/_jsx("strong", {
52
- children: __('List View')
53
- }), /*#__PURE__*/_jsx(Button, {
54
- icon: closeSmall,
55
- label: __('Close'),
56
- onClick: closeListView,
57
- size: "compact"
58
- })]
59
- }), /*#__PURE__*/_jsx("div", {
60
- className: "edit-widgets-editor__list-view-panel-content",
61
- ref: useMergeRefs([focusOnMountRef, setDropZoneElement]),
62
- children: /*#__PURE__*/_jsx(ListView, {
63
- dropZoneElement: dropZoneElement
64
- })
65
- })]
66
- })
32
+ /* @__PURE__ */ jsxs(
33
+ "div",
34
+ {
35
+ className: "edit-widgets-editor__list-view-panel",
36
+ onKeyDown: closeOnEscape,
37
+ children: [
38
+ /* @__PURE__ */ jsxs("div", { className: "edit-widgets-editor__list-view-panel-header", children: [
39
+ /* @__PURE__ */ jsx("strong", { children: __("List View") }),
40
+ /* @__PURE__ */ jsx(
41
+ Button,
42
+ {
43
+ icon: closeSmall,
44
+ label: __("Close"),
45
+ onClick: closeListView,
46
+ size: "compact"
47
+ }
48
+ )
49
+ ] }),
50
+ /* @__PURE__ */ jsx(
51
+ "div",
52
+ {
53
+ className: "edit-widgets-editor__list-view-panel-content",
54
+ ref: useMergeRefs([focusOnMountRef, setDropZoneElement]),
55
+ children: /* @__PURE__ */ jsx(ListView, { dropZoneElement })
56
+ }
57
+ )
58
+ ]
59
+ }
60
+ )
67
61
  );
68
62
  }
69
- //# sourceMappingURL=list-view-sidebar.js.map
63
+ export {
64
+ ListViewSidebar as default
65
+ };
66
+ //# sourceMappingURL=list-view-sidebar.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["__experimentalListView","ListView","Button","useFocusOnMount","useMergeRefs","useDispatch","useSelect","useCallback","useState","__","closeSmall","ESCAPE","store","editWidgetsStore","unlock","jsx","_jsx","jsxs","_jsxs","ListViewSidebar","setIsListViewOpened","getListViewToggleRef","dropZoneElement","setDropZoneElement","focusOnMountRef","closeListView","current","focus","closeOnEscape","event","keyCode","defaultPrevented","preventDefault","className","onKeyDown","children","icon","label","onClick","size","ref"],"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 { useFocusOnMount, useMergeRefs } from '@wordpress/compose';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useCallback, 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';\nimport { unlock } from '../../lock-unlock';\n\nexport default function ListViewSidebar() {\n\tconst { setIsListViewOpened } = useDispatch( editWidgetsStore );\n\tconst { getListViewToggleRef } = unlock( useSelect( 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\n\t// When closing the list view, focus should return to the toggle button.\n\tconst closeListView = useCallback( () => {\n\t\tsetIsListViewOpened( false );\n\t\tgetListViewToggleRef().current?.focus();\n\t}, [ getListViewToggleRef, setIsListViewOpened ] );\n\n\tconst closeOnEscape = useCallback(\n\t\t( event ) => {\n\t\t\tif ( event.keyCode === ESCAPE && ! event.defaultPrevented ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tcloseListView();\n\t\t\t}\n\t\t},\n\t\t[ closeListView ]\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 className=\"edit-widgets-editor__list-view-panel-header\">\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={ closeListView }\n\t\t\t\t\tsize=\"compact\"\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( [ focusOnMountRef, setDropZoneElement ] ) }\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":"AAAA;AACA;AACA;AACA,SAASA,sBAAsB,IAAIC,QAAQ,QAAQ,yBAAyB;AAC5E,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,eAAe,EAAEC,YAAY,QAAQ,oBAAoB;AAClE,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,WAAW,EAAEC,QAAQ,QAAQ,oBAAoB;AAC1D,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,UAAU,QAAQ,kBAAkB;AAC7C,SAASC,MAAM,QAAQ,qBAAqB;;AAE5C;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,SA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,EAAGb,aAAe;UACzBc,IAAI,EAAC;QAAS,CACd,CAAC;MAAA,CACE,CAAC,eACNvB,IAAA;QACCiB,SAAS,EAAC,8CAA8C;QACxDO,GAAG,EAAGpC,YAAY,CAAE,CAAEoB,eAAe,EAAED,kBAAkB,CAAG,CAAG;QAAAY,QAAA,eAE/DnB,IAAA,CAACf,QAAQ;UAACqB,eAAe,EAAGA;QAAiB,CAAE;MAAC,CAC5C,CAAC;IAAA,CACF;EAAC;AAER","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/secondary-sidebar/list-view-sidebar.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __experimentalListView as ListView } from '@wordpress/block-editor';\nimport { Button } from '@wordpress/components';\nimport { useFocusOnMount, useMergeRefs } from '@wordpress/compose';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useCallback, 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';\nimport { unlock } from '../../lock-unlock';\n\nexport default function ListViewSidebar() {\n\tconst { setIsListViewOpened } = useDispatch( editWidgetsStore );\n\tconst { getListViewToggleRef } = unlock( useSelect( 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\n\t// When closing the list view, focus should return to the toggle button.\n\tconst closeListView = useCallback( () => {\n\t\tsetIsListViewOpened( false );\n\t\tgetListViewToggleRef().current?.focus();\n\t}, [ getListViewToggleRef, setIsListViewOpened ] );\n\n\tconst closeOnEscape = useCallback(\n\t\t( event ) => {\n\t\t\tif ( event.keyCode === ESCAPE && ! event.defaultPrevented ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tcloseListView();\n\t\t\t}\n\t\t},\n\t\t[ closeListView ]\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 className=\"edit-widgets-editor__list-view-panel-header\">\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={ closeListView }\n\t\t\t\t\tsize=\"compact\"\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( [ focusOnMountRef, setDropZoneElement ] ) }\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"],
5
+ "mappings": "AAkDG,SACC,KADD;AA/CH,SAAS,0BAA0B,gBAAgB;AACnD,SAAS,cAAc;AACvB,SAAS,iBAAiB,oBAAoB;AAC9C,SAAS,aAAa,iBAAiB;AACvC,SAAS,aAAa,gBAAgB;AACtC,SAAS,UAAU;AACnB,SAAS,kBAAkB;AAC3B,SAAS,cAAc;AAKvB,SAAS,SAAS,wBAAwB;AAC1C,SAAS,cAAc;AAER,SAAR,kBAAmC;AACzC,QAAM,EAAE,oBAAoB,IAAI,YAAa,gBAAiB;AAC9D,QAAM,EAAE,qBAAqB,IAAI,OAAQ,UAAW,gBAAiB,CAAE;AAIvE,QAAM,CAAE,iBAAiB,kBAAmB,IAAI,SAAU,IAAK;AAE/D,QAAM,kBAAkB,gBAAiB,cAAe;AAGxD,QAAM,gBAAgB,YAAa,MAAM;AACxC,wBAAqB,KAAM;AAC3B,yBAAqB,EAAE,SAAS,MAAM;AAAA,EACvC,GAAG,CAAE,sBAAsB,mBAAoB,CAAE;AAEjD,QAAM,gBAAgB;AAAA,IACrB,CAAE,UAAW;AACZ,UAAK,MAAM,YAAY,UAAU,CAAE,MAAM,kBAAmB;AAC3D,cAAM,eAAe;AACrB,sBAAc;AAAA,MACf;AAAA,IACD;AAAA,IACA,CAAE,aAAc;AAAA,EACjB;AAEA;AAAA;AAAA,IAEC;AAAA,MAAC;AAAA;AAAA,QACA,WAAU;AAAA,QACV,WAAY;AAAA,QAEZ;AAAA,+BAAC,SAAI,WAAU,+CACd;AAAA,gCAAC,YAAS,aAAI,WAAY,GAAG;AAAA,YAC7B;AAAA,cAAC;AAAA;AAAA,gBACA,MAAO;AAAA,gBACP,OAAQ,GAAI,OAAQ;AAAA,gBACpB,SAAU;AAAA,gBACV,MAAK;AAAA;AAAA,YACN;AAAA,aACD;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACA,WAAU;AAAA,cACV,KAAM,aAAc,CAAE,iBAAiB,kBAAmB,CAAE;AAAA,cAE5D,8BAAC,YAAS,iBAAoC;AAAA;AAAA,UAC/C;AAAA;AAAA;AAAA,IACD;AAAA;AAEF;",
6
+ "names": []
7
+ }
@@ -1,45 +1,37 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { useEffect, Platform, useContext, useCallback } from '@wordpress/element';
5
- import { isRTL, __ } from '@wordpress/i18n';
6
- import { ComplementaryArea, store as interfaceStore } from '@wordpress/interface';
7
- import { BlockInspector, store as blockEditorStore } from '@wordpress/block-editor';
8
- import { drawerLeft, drawerRight } from '@wordpress/icons';
9
- import { privateApis as componentsPrivateApis } from '@wordpress/components';
10
- import { useSelect, useDispatch } from '@wordpress/data';
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import {
3
+ useEffect,
4
+ Platform,
5
+ useContext,
6
+ useCallback
7
+ } from "@wordpress/element";
8
+ import { isRTL, __ } from "@wordpress/i18n";
9
+ import {
10
+ ComplementaryArea,
11
+ store as interfaceStore
12
+ } from "@wordpress/interface";
13
+ import {
14
+ BlockInspector,
15
+ store as blockEditorStore
16
+ } from "@wordpress/block-editor";
17
+ import { drawerLeft, drawerRight } from "@wordpress/icons";
18
+ import { privateApis as componentsPrivateApis } from "@wordpress/components";
19
+ import { useSelect, useDispatch } from "@wordpress/data";
11
20
  const SIDEBAR_ACTIVE_BY_DEFAULT = Platform.select({
12
21
  web: true,
13
22
  native: false
14
23
  });
15
- const BLOCK_INSPECTOR_IDENTIFIER = 'edit-widgets/block-inspector';
16
-
17
- // Widget areas were once called block areas, so use 'edit-widgets/block-areas'
18
- // for backwards compatibility.
19
- const WIDGET_AREAS_IDENTIFIER = 'edit-widgets/block-areas';
20
-
21
- /**
22
- * Internal dependencies
23
- */
24
- import WidgetAreas from './widget-areas';
25
- import { store as editWidgetsStore } from '../../store';
26
- import { unlock } from '../../lock-unlock';
27
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
28
- const {
29
- Tabs
30
- } = unlock(componentsPrivateApis);
31
- function SidebarHeader({
32
- selectedWidgetAreaBlock
33
- }) {
34
- return /*#__PURE__*/_jsxs(Tabs.TabList, {
35
- children: [/*#__PURE__*/_jsx(Tabs.Tab, {
36
- tabId: WIDGET_AREAS_IDENTIFIER,
37
- children: selectedWidgetAreaBlock ? selectedWidgetAreaBlock.attributes.name : __('Widget Areas')
38
- }), /*#__PURE__*/_jsx(Tabs.Tab, {
39
- tabId: BLOCK_INSPECTOR_IDENTIFIER,
40
- children: __('Block')
41
- })]
42
- });
24
+ const BLOCK_INSPECTOR_IDENTIFIER = "edit-widgets/block-inspector";
25
+ const WIDGET_AREAS_IDENTIFIER = "edit-widgets/block-areas";
26
+ import WidgetAreas from "./widget-areas";
27
+ import { store as editWidgetsStore } from "../../store";
28
+ import { unlock } from "../../lock-unlock";
29
+ const { Tabs } = unlock(componentsPrivateApis);
30
+ function SidebarHeader({ selectedWidgetAreaBlock }) {
31
+ return /* @__PURE__ */ jsxs(Tabs.TabList, { children: [
32
+ /* @__PURE__ */ jsx(Tabs.Tab, { tabId: WIDGET_AREAS_IDENTIFIER, children: selectedWidgetAreaBlock ? selectedWidgetAreaBlock.attributes.name : __("Widget Areas") }),
33
+ /* @__PURE__ */ jsx(Tabs.Tab, { tabId: BLOCK_INSPECTOR_IDENTIFIER, children: __("Block") })
34
+ ] });
43
35
  }
44
36
  function SidebarContent({
45
37
  hasSelectedNonAreaBlock,
@@ -47,75 +39,78 @@ function SidebarContent({
47
39
  isGeneralSidebarOpen,
48
40
  selectedWidgetAreaBlock
49
41
  }) {
50
- const {
51
- enableComplementaryArea
52
- } = useDispatch(interfaceStore);
42
+ const { enableComplementaryArea } = useDispatch(interfaceStore);
53
43
  useEffect(() => {
54
44
  if (hasSelectedNonAreaBlock && currentArea === WIDGET_AREAS_IDENTIFIER && isGeneralSidebarOpen) {
55
- enableComplementaryArea('core/edit-widgets', BLOCK_INSPECTOR_IDENTIFIER);
45
+ enableComplementaryArea(
46
+ "core/edit-widgets",
47
+ BLOCK_INSPECTOR_IDENTIFIER
48
+ );
56
49
  }
57
50
  if (!hasSelectedNonAreaBlock && currentArea === BLOCK_INSPECTOR_IDENTIFIER && isGeneralSidebarOpen) {
58
- enableComplementaryArea('core/edit-widgets', WIDGET_AREAS_IDENTIFIER);
51
+ enableComplementaryArea(
52
+ "core/edit-widgets",
53
+ WIDGET_AREAS_IDENTIFIER
54
+ );
59
55
  }
60
- // We're intentionally leaving `currentArea` and `isGeneralSidebarOpen`
61
- // out of the dep array because we want this effect to run based on
62
- // block selection changes, not sidebar state changes.
63
56
  }, [hasSelectedNonAreaBlock, enableComplementaryArea]);
64
57
  const tabsContextValue = useContext(Tabs.Context);
65
- return /*#__PURE__*/_jsx(ComplementaryArea, {
66
- className: "edit-widgets-sidebar",
67
- header: /*#__PURE__*/_jsx(Tabs.Context.Provider, {
68
- value: tabsContextValue,
69
- children: /*#__PURE__*/_jsx(SidebarHeader, {
70
- selectedWidgetAreaBlock: selectedWidgetAreaBlock
71
- })
72
- }),
73
- headerClassName: "edit-widgets-sidebar__panel-tabs"
74
- /* translators: button label text should, if possible, be under 16 characters. */,
75
- title: __('Settings'),
76
- closeLabel: __('Close Settings'),
77
- scope: "core/edit-widgets",
78
- identifier: currentArea,
79
- icon: isRTL() ? drawerLeft : drawerRight,
80
- isActiveByDefault: SIDEBAR_ACTIVE_BY_DEFAULT,
81
- children: /*#__PURE__*/_jsxs(Tabs.Context.Provider, {
82
- value: tabsContextValue,
83
- children: [/*#__PURE__*/_jsx(Tabs.TabPanel, {
84
- tabId: WIDGET_AREAS_IDENTIFIER,
85
- focusable: false,
86
- children: /*#__PURE__*/_jsx(WidgetAreas, {
87
- selectedWidgetAreaId: selectedWidgetAreaBlock?.attributes.id
88
- })
89
- }), /*#__PURE__*/_jsx(Tabs.TabPanel, {
90
- tabId: BLOCK_INSPECTOR_IDENTIFIER,
91
- focusable: false,
92
- children: hasSelectedNonAreaBlock ? /*#__PURE__*/_jsx(BlockInspector, {}) :
93
- /*#__PURE__*/
94
- // Pretend that Widget Areas are part of the UI by not
95
- // showing the Block Inspector when one is selected.
96
- _jsx("span", {
97
- className: "block-editor-block-inspector__no-blocks",
98
- children: __('No block selected.')
99
- })
100
- })]
101
- })
102
- });
58
+ return /* @__PURE__ */ jsx(
59
+ ComplementaryArea,
60
+ {
61
+ className: "edit-widgets-sidebar",
62
+ header: /* @__PURE__ */ jsx(Tabs.Context.Provider, { value: tabsContextValue, children: /* @__PURE__ */ jsx(
63
+ SidebarHeader,
64
+ {
65
+ selectedWidgetAreaBlock
66
+ }
67
+ ) }),
68
+ headerClassName: "edit-widgets-sidebar__panel-tabs",
69
+ title: __("Settings"),
70
+ closeLabel: __("Close Settings"),
71
+ scope: "core/edit-widgets",
72
+ identifier: currentArea,
73
+ icon: isRTL() ? drawerLeft : drawerRight,
74
+ isActiveByDefault: SIDEBAR_ACTIVE_BY_DEFAULT,
75
+ children: /* @__PURE__ */ jsxs(Tabs.Context.Provider, { value: tabsContextValue, children: [
76
+ /* @__PURE__ */ jsx(
77
+ Tabs.TabPanel,
78
+ {
79
+ tabId: WIDGET_AREAS_IDENTIFIER,
80
+ focusable: false,
81
+ children: /* @__PURE__ */ jsx(
82
+ WidgetAreas,
83
+ {
84
+ selectedWidgetAreaId: selectedWidgetAreaBlock?.attributes.id
85
+ }
86
+ )
87
+ }
88
+ ),
89
+ /* @__PURE__ */ jsx(
90
+ Tabs.TabPanel,
91
+ {
92
+ tabId: BLOCK_INSPECTOR_IDENTIFIER,
93
+ focusable: false,
94
+ children: hasSelectedNonAreaBlock ? /* @__PURE__ */ jsx(BlockInspector, {}) : (
95
+ // Pretend that Widget Areas are part of the UI by not
96
+ // showing the Block Inspector when one is selected.
97
+ /* @__PURE__ */ jsx("span", { className: "block-editor-block-inspector__no-blocks", children: __("No block selected.") })
98
+ )
99
+ }
100
+ )
101
+ ] })
102
+ }
103
+ );
103
104
  }
104
- export default function Sidebar() {
105
+ function Sidebar() {
105
106
  const {
106
107
  currentArea,
107
108
  hasSelectedNonAreaBlock,
108
109
  isGeneralSidebarOpen,
109
110
  selectedWidgetAreaBlock
110
- } = useSelect(select => {
111
- const {
112
- getSelectedBlock,
113
- getBlock,
114
- getBlockParentsByBlockName
115
- } = select(blockEditorStore);
116
- const {
117
- getActiveComplementaryArea
118
- } = select(interfaceStore);
111
+ } = useSelect((select) => {
112
+ const { getSelectedBlock, getBlock, getBlockParentsByBlockName } = select(blockEditorStore);
113
+ const { getActiveComplementaryArea } = select(interfaceStore);
119
114
  const selectedBlock = getSelectedBlock();
120
115
  const activeArea = getActiveComplementaryArea(editWidgetsStore.name);
121
116
  let currentSelection = activeArea;
@@ -128,48 +123,55 @@ export default function Sidebar() {
128
123
  }
129
124
  let widgetAreaBlock;
130
125
  if (selectedBlock) {
131
- if (selectedBlock.name === 'core/widget-area') {
126
+ if (selectedBlock.name === "core/widget-area") {
132
127
  widgetAreaBlock = selectedBlock;
133
128
  } else {
134
- widgetAreaBlock = getBlock(getBlockParentsByBlockName(selectedBlock.clientId, 'core/widget-area')[0]);
129
+ widgetAreaBlock = getBlock(
130
+ getBlockParentsByBlockName(
131
+ selectedBlock.clientId,
132
+ "core/widget-area"
133
+ )[0]
134
+ );
135
135
  }
136
136
  }
137
137
  return {
138
138
  currentArea: currentSelection,
139
- hasSelectedNonAreaBlock: !!(selectedBlock && selectedBlock.name !== 'core/widget-area'),
139
+ hasSelectedNonAreaBlock: !!(selectedBlock && selectedBlock.name !== "core/widget-area"),
140
140
  isGeneralSidebarOpen: !!activeArea,
141
141
  selectedWidgetAreaBlock: widgetAreaBlock
142
142
  };
143
143
  }, []);
144
- const {
145
- enableComplementaryArea
146
- } = useDispatch(interfaceStore);
147
-
148
- // `newSelectedTabId` could technically be falsy if no tab is selected (i.e.
149
- // the initial render) or when we don't want a tab displayed (i.e. the
150
- // sidebar is closed). These cases should both be covered by the `!!` check
151
- // below, so we shouldn't need any additional falsy handling.
152
- const onTabSelect = useCallback(newSelectedTabId => {
153
- if (!!newSelectedTabId) {
154
- enableComplementaryArea(editWidgetsStore.name, newSelectedTabId);
144
+ const { enableComplementaryArea } = useDispatch(interfaceStore);
145
+ const onTabSelect = useCallback(
146
+ (newSelectedTabId) => {
147
+ if (!!newSelectedTabId) {
148
+ enableComplementaryArea(
149
+ editWidgetsStore.name,
150
+ newSelectedTabId
151
+ );
152
+ }
153
+ },
154
+ [enableComplementaryArea]
155
+ );
156
+ return /* @__PURE__ */ jsx(
157
+ Tabs,
158
+ {
159
+ selectedTabId: isGeneralSidebarOpen ? currentArea : null,
160
+ onSelect: onTabSelect,
161
+ selectOnMove: false,
162
+ children: /* @__PURE__ */ jsx(
163
+ SidebarContent,
164
+ {
165
+ hasSelectedNonAreaBlock,
166
+ currentArea,
167
+ isGeneralSidebarOpen,
168
+ selectedWidgetAreaBlock
169
+ }
170
+ )
155
171
  }
156
- }, [enableComplementaryArea]);
157
- return /*#__PURE__*/_jsx(Tabs
158
- // Due to how this component is controlled (via a value from the
159
- // `interfaceStore`), when the sidebar closes the currently selected
160
- // tab can't be found. This causes the component to continuously reset
161
- // the selection to `null` in an infinite loop. Proactively setting
162
- // the selected tab to `null` avoids that.
163
- , {
164
- selectedTabId: isGeneralSidebarOpen ? currentArea : null,
165
- onSelect: onTabSelect,
166
- selectOnMove: false,
167
- children: /*#__PURE__*/_jsx(SidebarContent, {
168
- hasSelectedNonAreaBlock: hasSelectedNonAreaBlock,
169
- currentArea: currentArea,
170
- isGeneralSidebarOpen: isGeneralSidebarOpen,
171
- selectedWidgetAreaBlock: selectedWidgetAreaBlock
172
- })
173
- });
172
+ );
174
173
  }
175
- //# sourceMappingURL=index.js.map
174
+ export {
175
+ Sidebar as default
176
+ };
177
+ //# sourceMappingURL=index.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["useEffect","Platform","useContext","useCallback","isRTL","__","ComplementaryArea","store","interfaceStore","BlockInspector","blockEditorStore","drawerLeft","drawerRight","privateApis","componentsPrivateApis","useSelect","useDispatch","SIDEBAR_ACTIVE_BY_DEFAULT","select","web","native","BLOCK_INSPECTOR_IDENTIFIER","WIDGET_AREAS_IDENTIFIER","WidgetAreas","editWidgetsStore","unlock","jsx","_jsx","jsxs","_jsxs","Tabs","SidebarHeader","selectedWidgetAreaBlock","TabList","children","Tab","tabId","attributes","name","SidebarContent","hasSelectedNonAreaBlock","currentArea","isGeneralSidebarOpen","enableComplementaryArea","tabsContextValue","Context","className","header","Provider","value","headerClassName","title","closeLabel","scope","identifier","icon","isActiveByDefault","TabPanel","focusable","selectedWidgetAreaId","id","Sidebar","getSelectedBlock","getBlock","getBlockParentsByBlockName","getActiveComplementaryArea","selectedBlock","activeArea","currentSelection","widgetAreaBlock","clientId","onTabSelect","newSelectedTabId","selectedTabId","onSelect","selectOnMove"],"sources":["@wordpress/edit-widgets/src/components/sidebar/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tuseEffect,\n\tPlatform,\n\tuseContext,\n\tuseCallback,\n} from '@wordpress/element';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport {\n\tComplementaryArea,\n\tstore as interfaceStore,\n} from '@wordpress/interface';\nimport {\n\tBlockInspector,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\n\nimport { drawerLeft, drawerRight } from '@wordpress/icons';\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\n\nconst SIDEBAR_ACTIVE_BY_DEFAULT = Platform.select( {\n\tweb: true,\n\tnative: false,\n} );\n\nconst BLOCK_INSPECTOR_IDENTIFIER = 'edit-widgets/block-inspector';\n\n// Widget areas were once called block areas, so use 'edit-widgets/block-areas'\n// for backwards compatibility.\nconst WIDGET_AREAS_IDENTIFIER = 'edit-widgets/block-areas';\n\n/**\n * Internal dependencies\n */\nimport WidgetAreas from './widget-areas';\nimport { store as editWidgetsStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nfunction SidebarHeader( { selectedWidgetAreaBlock } ) {\n\treturn (\n\t\t<Tabs.TabList>\n\t\t\t<Tabs.Tab tabId={ WIDGET_AREAS_IDENTIFIER }>\n\t\t\t\t{ selectedWidgetAreaBlock\n\t\t\t\t\t? selectedWidgetAreaBlock.attributes.name\n\t\t\t\t\t: __( 'Widget Areas' ) }\n\t\t\t</Tabs.Tab>\n\t\t\t<Tabs.Tab tabId={ BLOCK_INSPECTOR_IDENTIFIER }>\n\t\t\t\t{ __( 'Block' ) }\n\t\t\t</Tabs.Tab>\n\t\t</Tabs.TabList>\n\t);\n}\n\nfunction SidebarContent( {\n\thasSelectedNonAreaBlock,\n\tcurrentArea,\n\tisGeneralSidebarOpen,\n\tselectedWidgetAreaBlock,\n} ) {\n\tconst { enableComplementaryArea } = useDispatch( interfaceStore );\n\n\tuseEffect( () => {\n\t\tif (\n\t\t\thasSelectedNonAreaBlock &&\n\t\t\tcurrentArea === WIDGET_AREAS_IDENTIFIER &&\n\t\t\tisGeneralSidebarOpen\n\t\t) {\n\t\t\tenableComplementaryArea(\n\t\t\t\t'core/edit-widgets',\n\t\t\t\tBLOCK_INSPECTOR_IDENTIFIER\n\t\t\t);\n\t\t}\n\t\tif (\n\t\t\t! hasSelectedNonAreaBlock &&\n\t\t\tcurrentArea === BLOCK_INSPECTOR_IDENTIFIER &&\n\t\t\tisGeneralSidebarOpen\n\t\t) {\n\t\t\tenableComplementaryArea(\n\t\t\t\t'core/edit-widgets',\n\t\t\t\tWIDGET_AREAS_IDENTIFIER\n\t\t\t);\n\t\t}\n\t\t// We're intentionally leaving `currentArea` and `isGeneralSidebarOpen`\n\t\t// out of the dep array because we want this effect to run based on\n\t\t// block selection changes, not sidebar state changes.\n\t}, [ hasSelectedNonAreaBlock, enableComplementaryArea ] );\n\n\tconst tabsContextValue = useContext( Tabs.Context );\n\n\treturn (\n\t\t<ComplementaryArea\n\t\t\tclassName=\"edit-widgets-sidebar\"\n\t\t\theader={\n\t\t\t\t<Tabs.Context.Provider value={ tabsContextValue }>\n\t\t\t\t\t<SidebarHeader\n\t\t\t\t\t\tselectedWidgetAreaBlock={ selectedWidgetAreaBlock }\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.Context.Provider>\n\t\t\t}\n\t\t\theaderClassName=\"edit-widgets-sidebar__panel-tabs\"\n\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\ttitle={ __( 'Settings' ) }\n\t\t\tcloseLabel={ __( 'Close Settings' ) }\n\t\t\tscope=\"core/edit-widgets\"\n\t\t\tidentifier={ currentArea }\n\t\t\ticon={ isRTL() ? drawerLeft : drawerRight }\n\t\t\tisActiveByDefault={ SIDEBAR_ACTIVE_BY_DEFAULT }\n\t\t>\n\t\t\t<Tabs.Context.Provider value={ tabsContextValue }>\n\t\t\t\t<Tabs.TabPanel\n\t\t\t\t\ttabId={ WIDGET_AREAS_IDENTIFIER }\n\t\t\t\t\tfocusable={ false }\n\t\t\t\t>\n\t\t\t\t\t<WidgetAreas\n\t\t\t\t\t\tselectedWidgetAreaId={\n\t\t\t\t\t\t\tselectedWidgetAreaBlock?.attributes.id\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t<Tabs.TabPanel\n\t\t\t\t\ttabId={ BLOCK_INSPECTOR_IDENTIFIER }\n\t\t\t\t\tfocusable={ false }\n\t\t\t\t>\n\t\t\t\t\t{ hasSelectedNonAreaBlock ? (\n\t\t\t\t\t\t<BlockInspector />\n\t\t\t\t\t) : (\n\t\t\t\t\t\t// Pretend that Widget Areas are part of the UI by not\n\t\t\t\t\t\t// showing the Block Inspector when one is selected.\n\t\t\t\t\t\t<span className=\"block-editor-block-inspector__no-blocks\">\n\t\t\t\t\t\t\t{ __( 'No block selected.' ) }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t) }\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t</Tabs.Context.Provider>\n\t\t</ComplementaryArea>\n\t);\n}\n\nexport default function Sidebar() {\n\tconst {\n\t\tcurrentArea,\n\t\thasSelectedNonAreaBlock,\n\t\tisGeneralSidebarOpen,\n\t\tselectedWidgetAreaBlock,\n\t} = useSelect( ( select ) => {\n\t\tconst { getSelectedBlock, getBlock, getBlockParentsByBlockName } =\n\t\t\tselect( blockEditorStore );\n\t\tconst { getActiveComplementaryArea } = select( interfaceStore );\n\n\t\tconst selectedBlock = getSelectedBlock();\n\n\t\tconst activeArea = getActiveComplementaryArea( editWidgetsStore.name );\n\n\t\tlet currentSelection = activeArea;\n\t\tif ( ! currentSelection ) {\n\t\t\tif ( selectedBlock ) {\n\t\t\t\tcurrentSelection = BLOCK_INSPECTOR_IDENTIFIER;\n\t\t\t} else {\n\t\t\t\tcurrentSelection = WIDGET_AREAS_IDENTIFIER;\n\t\t\t}\n\t\t}\n\n\t\tlet widgetAreaBlock;\n\t\tif ( selectedBlock ) {\n\t\t\tif ( selectedBlock.name === 'core/widget-area' ) {\n\t\t\t\twidgetAreaBlock = selectedBlock;\n\t\t\t} else {\n\t\t\t\twidgetAreaBlock = getBlock(\n\t\t\t\t\tgetBlockParentsByBlockName(\n\t\t\t\t\t\tselectedBlock.clientId,\n\t\t\t\t\t\t'core/widget-area'\n\t\t\t\t\t)[ 0 ]\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tcurrentArea: currentSelection,\n\t\t\thasSelectedNonAreaBlock: !! (\n\t\t\t\tselectedBlock && selectedBlock.name !== 'core/widget-area'\n\t\t\t),\n\t\t\tisGeneralSidebarOpen: !! activeArea,\n\t\t\tselectedWidgetAreaBlock: widgetAreaBlock,\n\t\t};\n\t}, [] );\n\n\tconst { enableComplementaryArea } = useDispatch( interfaceStore );\n\n\t// `newSelectedTabId` could technically be falsy if no tab is selected (i.e.\n\t// the initial render) or when we don't want a tab displayed (i.e. the\n\t// sidebar is closed). These cases should both be covered by the `!!` check\n\t// below, so we shouldn't need any additional falsy handling.\n\tconst onTabSelect = useCallback(\n\t\t( newSelectedTabId ) => {\n\t\t\tif ( !! newSelectedTabId ) {\n\t\t\t\tenableComplementaryArea(\n\t\t\t\t\teditWidgetsStore.name,\n\t\t\t\t\tnewSelectedTabId\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[ enableComplementaryArea ]\n\t);\n\n\treturn (\n\t\t<Tabs\n\t\t\t// Due to how this component is controlled (via a value from the\n\t\t\t// `interfaceStore`), when the sidebar closes the currently selected\n\t\t\t// tab can't be found. This causes the component to continuously reset\n\t\t\t// the selection to `null` in an infinite loop. Proactively setting\n\t\t\t// the selected tab to `null` avoids that.\n\t\t\tselectedTabId={ isGeneralSidebarOpen ? currentArea : null }\n\t\t\tonSelect={ onTabSelect }\n\t\t\tselectOnMove={ false }\n\t\t>\n\t\t\t<SidebarContent\n\t\t\t\thasSelectedNonAreaBlock={ hasSelectedNonAreaBlock }\n\t\t\t\tcurrentArea={ currentArea }\n\t\t\t\tisGeneralSidebarOpen={ isGeneralSidebarOpen }\n\t\t\t\tselectedWidgetAreaBlock={ selectedWidgetAreaBlock }\n\t\t\t/>\n\t\t</Tabs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
3
+ "sources": ["../../../src/components/sidebar/index.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {\n\tuseEffect,\n\tPlatform,\n\tuseContext,\n\tuseCallback,\n} from '@wordpress/element';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport {\n\tComplementaryArea,\n\tstore as interfaceStore,\n} from '@wordpress/interface';\nimport {\n\tBlockInspector,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\n\nimport { drawerLeft, drawerRight } from '@wordpress/icons';\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\n\nconst SIDEBAR_ACTIVE_BY_DEFAULT = Platform.select( {\n\tweb: true,\n\tnative: false,\n} );\n\nconst BLOCK_INSPECTOR_IDENTIFIER = 'edit-widgets/block-inspector';\n\n// Widget areas were once called block areas, so use 'edit-widgets/block-areas'\n// for backwards compatibility.\nconst WIDGET_AREAS_IDENTIFIER = 'edit-widgets/block-areas';\n\n/**\n * Internal dependencies\n */\nimport WidgetAreas from './widget-areas';\nimport { store as editWidgetsStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nfunction SidebarHeader( { selectedWidgetAreaBlock } ) {\n\treturn (\n\t\t<Tabs.TabList>\n\t\t\t<Tabs.Tab tabId={ WIDGET_AREAS_IDENTIFIER }>\n\t\t\t\t{ selectedWidgetAreaBlock\n\t\t\t\t\t? selectedWidgetAreaBlock.attributes.name\n\t\t\t\t\t: __( 'Widget Areas' ) }\n\t\t\t</Tabs.Tab>\n\t\t\t<Tabs.Tab tabId={ BLOCK_INSPECTOR_IDENTIFIER }>\n\t\t\t\t{ __( 'Block' ) }\n\t\t\t</Tabs.Tab>\n\t\t</Tabs.TabList>\n\t);\n}\n\nfunction SidebarContent( {\n\thasSelectedNonAreaBlock,\n\tcurrentArea,\n\tisGeneralSidebarOpen,\n\tselectedWidgetAreaBlock,\n} ) {\n\tconst { enableComplementaryArea } = useDispatch( interfaceStore );\n\n\tuseEffect( () => {\n\t\tif (\n\t\t\thasSelectedNonAreaBlock &&\n\t\t\tcurrentArea === WIDGET_AREAS_IDENTIFIER &&\n\t\t\tisGeneralSidebarOpen\n\t\t) {\n\t\t\tenableComplementaryArea(\n\t\t\t\t'core/edit-widgets',\n\t\t\t\tBLOCK_INSPECTOR_IDENTIFIER\n\t\t\t);\n\t\t}\n\t\tif (\n\t\t\t! hasSelectedNonAreaBlock &&\n\t\t\tcurrentArea === BLOCK_INSPECTOR_IDENTIFIER &&\n\t\t\tisGeneralSidebarOpen\n\t\t) {\n\t\t\tenableComplementaryArea(\n\t\t\t\t'core/edit-widgets',\n\t\t\t\tWIDGET_AREAS_IDENTIFIER\n\t\t\t);\n\t\t}\n\t\t// We're intentionally leaving `currentArea` and `isGeneralSidebarOpen`\n\t\t// out of the dep array because we want this effect to run based on\n\t\t// block selection changes, not sidebar state changes.\n\t}, [ hasSelectedNonAreaBlock, enableComplementaryArea ] );\n\n\tconst tabsContextValue = useContext( Tabs.Context );\n\n\treturn (\n\t\t<ComplementaryArea\n\t\t\tclassName=\"edit-widgets-sidebar\"\n\t\t\theader={\n\t\t\t\t<Tabs.Context.Provider value={ tabsContextValue }>\n\t\t\t\t\t<SidebarHeader\n\t\t\t\t\t\tselectedWidgetAreaBlock={ selectedWidgetAreaBlock }\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.Context.Provider>\n\t\t\t}\n\t\t\theaderClassName=\"edit-widgets-sidebar__panel-tabs\"\n\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\ttitle={ __( 'Settings' ) }\n\t\t\tcloseLabel={ __( 'Close Settings' ) }\n\t\t\tscope=\"core/edit-widgets\"\n\t\t\tidentifier={ currentArea }\n\t\t\ticon={ isRTL() ? drawerLeft : drawerRight }\n\t\t\tisActiveByDefault={ SIDEBAR_ACTIVE_BY_DEFAULT }\n\t\t>\n\t\t\t<Tabs.Context.Provider value={ tabsContextValue }>\n\t\t\t\t<Tabs.TabPanel\n\t\t\t\t\ttabId={ WIDGET_AREAS_IDENTIFIER }\n\t\t\t\t\tfocusable={ false }\n\t\t\t\t>\n\t\t\t\t\t<WidgetAreas\n\t\t\t\t\t\tselectedWidgetAreaId={\n\t\t\t\t\t\t\tselectedWidgetAreaBlock?.attributes.id\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t<Tabs.TabPanel\n\t\t\t\t\ttabId={ BLOCK_INSPECTOR_IDENTIFIER }\n\t\t\t\t\tfocusable={ false }\n\t\t\t\t>\n\t\t\t\t\t{ hasSelectedNonAreaBlock ? (\n\t\t\t\t\t\t<BlockInspector />\n\t\t\t\t\t) : (\n\t\t\t\t\t\t// Pretend that Widget Areas are part of the UI by not\n\t\t\t\t\t\t// showing the Block Inspector when one is selected.\n\t\t\t\t\t\t<span className=\"block-editor-block-inspector__no-blocks\">\n\t\t\t\t\t\t\t{ __( 'No block selected.' ) }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t) }\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t</Tabs.Context.Provider>\n\t\t</ComplementaryArea>\n\t);\n}\n\nexport default function Sidebar() {\n\tconst {\n\t\tcurrentArea,\n\t\thasSelectedNonAreaBlock,\n\t\tisGeneralSidebarOpen,\n\t\tselectedWidgetAreaBlock,\n\t} = useSelect( ( select ) => {\n\t\tconst { getSelectedBlock, getBlock, getBlockParentsByBlockName } =\n\t\t\tselect( blockEditorStore );\n\t\tconst { getActiveComplementaryArea } = select( interfaceStore );\n\n\t\tconst selectedBlock = getSelectedBlock();\n\n\t\tconst activeArea = getActiveComplementaryArea( editWidgetsStore.name );\n\n\t\tlet currentSelection = activeArea;\n\t\tif ( ! currentSelection ) {\n\t\t\tif ( selectedBlock ) {\n\t\t\t\tcurrentSelection = BLOCK_INSPECTOR_IDENTIFIER;\n\t\t\t} else {\n\t\t\t\tcurrentSelection = WIDGET_AREAS_IDENTIFIER;\n\t\t\t}\n\t\t}\n\n\t\tlet widgetAreaBlock;\n\t\tif ( selectedBlock ) {\n\t\t\tif ( selectedBlock.name === 'core/widget-area' ) {\n\t\t\t\twidgetAreaBlock = selectedBlock;\n\t\t\t} else {\n\t\t\t\twidgetAreaBlock = getBlock(\n\t\t\t\t\tgetBlockParentsByBlockName(\n\t\t\t\t\t\tselectedBlock.clientId,\n\t\t\t\t\t\t'core/widget-area'\n\t\t\t\t\t)[ 0 ]\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tcurrentArea: currentSelection,\n\t\t\thasSelectedNonAreaBlock: !! (\n\t\t\t\tselectedBlock && selectedBlock.name !== 'core/widget-area'\n\t\t\t),\n\t\t\tisGeneralSidebarOpen: !! activeArea,\n\t\t\tselectedWidgetAreaBlock: widgetAreaBlock,\n\t\t};\n\t}, [] );\n\n\tconst { enableComplementaryArea } = useDispatch( interfaceStore );\n\n\t// `newSelectedTabId` could technically be falsy if no tab is selected (i.e.\n\t// the initial render) or when we don't want a tab displayed (i.e. the\n\t// sidebar is closed). These cases should both be covered by the `!!` check\n\t// below, so we shouldn't need any additional falsy handling.\n\tconst onTabSelect = useCallback(\n\t\t( newSelectedTabId ) => {\n\t\t\tif ( !! newSelectedTabId ) {\n\t\t\t\tenableComplementaryArea(\n\t\t\t\t\teditWidgetsStore.name,\n\t\t\t\t\tnewSelectedTabId\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[ enableComplementaryArea ]\n\t);\n\n\treturn (\n\t\t<Tabs\n\t\t\t// Due to how this component is controlled (via a value from the\n\t\t\t// `interfaceStore`), when the sidebar closes the currently selected\n\t\t\t// tab can't be found. This causes the component to continuously reset\n\t\t\t// the selection to `null` in an infinite loop. Proactively setting\n\t\t\t// the selected tab to `null` avoids that.\n\t\t\tselectedTabId={ isGeneralSidebarOpen ? currentArea : null }\n\t\t\tonSelect={ onTabSelect }\n\t\t\tselectOnMove={ false }\n\t\t>\n\t\t\t<SidebarContent\n\t\t\t\thasSelectedNonAreaBlock={ hasSelectedNonAreaBlock }\n\t\t\t\tcurrentArea={ currentArea }\n\t\t\t\tisGeneralSidebarOpen={ isGeneralSidebarOpen }\n\t\t\t\tselectedWidgetAreaBlock={ selectedWidgetAreaBlock }\n\t\t\t/>\n\t\t</Tabs>\n\t);\n}\n"],
5
+ "mappings": "AA6CE,SACC,KADD;AA1CF;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,OAAO,UAAU;AAC1B;AAAA,EACC;AAAA,EACA,SAAS;AAAA,OACH;AACP;AAAA,EACC;AAAA,EACA,SAAS;AAAA,OACH;AAEP,SAAS,YAAY,mBAAmB;AACxC,SAAS,eAAe,6BAA6B;AACrD,SAAS,WAAW,mBAAmB;AAEvC,MAAM,4BAA4B,SAAS,OAAQ;AAAA,EAClD,KAAK;AAAA,EACL,QAAQ;AACT,CAAE;AAEF,MAAM,6BAA6B;AAInC,MAAM,0BAA0B;AAKhC,OAAO,iBAAiB;AACxB,SAAS,SAAS,wBAAwB;AAC1C,SAAS,cAAc;AAEvB,MAAM,EAAE,KAAK,IAAI,OAAQ,qBAAsB;AAE/C,SAAS,cAAe,EAAE,wBAAwB,GAAI;AACrD,SACC,qBAAC,KAAK,SAAL,EACA;AAAA,wBAAC,KAAK,KAAL,EAAS,OAAQ,yBACf,oCACC,wBAAwB,WAAW,OACnC,GAAI,cAAe,GACvB;AAAA,IACA,oBAAC,KAAK,KAAL,EAAS,OAAQ,4BACf,aAAI,OAAQ,GACf;AAAA,KACD;AAEF;AAEA,SAAS,eAAgB;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAAI;AACH,QAAM,EAAE,wBAAwB,IAAI,YAAa,cAAe;AAEhE,YAAW,MAAM;AAChB,QACC,2BACA,gBAAgB,2BAChB,sBACC;AACD;AAAA,QACC;AAAA,QACA;AAAA,MACD;AAAA,IACD;AACA,QACC,CAAE,2BACF,gBAAgB,8B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