@wordpress/edit-post 7.33.0 → 7.35.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 (181) hide show
  1. package/CHANGELOG.md +10 -2
  2. package/README.md +22 -36
  3. package/build/components/header/fullscreen-mode-close/index.js +2 -2
  4. package/build/components/header/fullscreen-mode-close/index.js.map +1 -1
  5. package/build/components/header/index.js +7 -127
  6. package/build/components/header/index.js.map +1 -1
  7. package/build/components/header/more-menu/index.js +17 -43
  8. package/build/components/header/more-menu/index.js.map +1 -1
  9. package/build/components/header/more-menu/manage-patterns-menu-item.js +40 -0
  10. package/build/components/header/more-menu/manage-patterns-menu-item.js.map +1 -0
  11. package/build/{plugins/welcome-guide-menu-item/index.js → components/header/more-menu/welcome-guide-menu-item.js} +1 -1
  12. package/build/components/header/more-menu/welcome-guide-menu-item.js.map +1 -0
  13. package/build/components/keyboard-shortcuts/index.js +0 -88
  14. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  15. package/build/components/layout/index.js +72 -33
  16. package/build/components/layout/index.js.map +1 -1
  17. package/build/components/meta-boxes/meta-boxes-area/index.js +2 -2
  18. package/build/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
  19. package/build/components/preferences-modal/index.js +2 -11
  20. package/build/components/preferences-modal/index.js.map +1 -1
  21. package/build/components/visual-editor/index.js +11 -5
  22. package/build/components/visual-editor/index.js.map +1 -1
  23. package/build/components/visual-editor/use-padding-appender.js +6 -1
  24. package/build/components/visual-editor/use-padding-appender.js.map +1 -1
  25. package/build/deprecated.js +132 -0
  26. package/build/deprecated.js.map +1 -0
  27. package/build/index.js +19 -58
  28. package/build/index.js.map +1 -1
  29. package/build-module/components/header/fullscreen-mode-close/index.js +2 -2
  30. package/build-module/components/header/fullscreen-mode-close/index.js.map +1 -1
  31. package/build-module/components/header/index.js +11 -131
  32. package/build-module/components/header/index.js.map +1 -1
  33. package/build-module/components/header/more-menu/index.js +17 -43
  34. package/build-module/components/header/more-menu/index.js.map +1 -1
  35. package/build-module/components/header/more-menu/manage-patterns-menu-item.js +33 -0
  36. package/build-module/components/header/more-menu/manage-patterns-menu-item.js.map +1 -0
  37. package/build-module/{plugins/welcome-guide-menu-item/index.js → components/header/more-menu/welcome-guide-menu-item.js} +1 -1
  38. package/build-module/components/header/more-menu/welcome-guide-menu-item.js.map +1 -0
  39. package/build-module/components/keyboard-shortcuts/index.js +1 -89
  40. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  41. package/build-module/components/layout/index.js +73 -34
  42. package/build-module/components/layout/index.js.map +1 -1
  43. package/build-module/components/meta-boxes/meta-boxes-area/index.js +2 -2
  44. package/build-module/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
  45. package/build-module/components/preferences-modal/index.js +3 -12
  46. package/build-module/components/preferences-modal/index.js.map +1 -1
  47. package/build-module/components/visual-editor/index.js +11 -5
  48. package/build-module/components/visual-editor/index.js.map +1 -1
  49. package/build-module/components/visual-editor/use-padding-appender.js +6 -1
  50. package/build-module/components/visual-editor/use-padding-appender.js.map +1 -1
  51. package/build-module/deprecated.js +116 -0
  52. package/build-module/deprecated.js.map +1 -0
  53. package/build-module/index.js +2 -15
  54. package/build-module/index.js.map +1 -1
  55. package/build-style/style-rtl.css +14 -409
  56. package/build-style/style.css +14 -409
  57. package/package.json +32 -32
  58. package/src/components/header/fullscreen-mode-close/index.js +2 -2
  59. package/src/components/header/index.js +11 -159
  60. package/src/components/header/more-menu/index.js +27 -42
  61. package/src/components/header/more-menu/manage-patterns-menu-item.js +33 -0
  62. package/src/components/header/style.scss +4 -320
  63. package/src/components/keyboard-shortcuts/index.js +1 -106
  64. package/src/components/layout/index.js +84 -25
  65. package/src/components/layout/style.scss +7 -80
  66. package/src/components/meta-boxes/meta-boxes-area/index.js +4 -8
  67. package/src/components/preferences-modal/index.js +2 -22
  68. package/src/components/visual-editor/index.js +11 -4
  69. package/src/components/visual-editor/use-padding-appender.js +7 -1
  70. package/src/deprecated.js +107 -0
  71. package/src/index.js +3 -24
  72. package/src/style.scss +1 -5
  73. package/build/components/header/post-publish-button-or-toggle.js +0 -94
  74. package/build/components/header/post-publish-button-or-toggle.js.map +0 -1
  75. package/build/components/header/preferences-menu-item/index.js +0 -39
  76. package/build/components/header/preferences-menu-item/index.js.map +0 -1
  77. package/build/components/header/tools-more-menu-group/index.js +0 -26
  78. package/build/components/header/tools-more-menu-group/index.js.map +0 -1
  79. package/build/components/header/writing-menu/index.js +0 -71
  80. package/build/components/header/writing-menu/index.js.map +0 -1
  81. package/build/components/layout/actions-panel.js +0 -86
  82. package/build/components/layout/actions-panel.js.map +0 -1
  83. package/build/components/preferences-modal/enable-publish-sidebar.js +0 -38
  84. package/build/components/preferences-modal/enable-publish-sidebar.js.map +0 -1
  85. package/build/components/sidebar/plugin-post-publish-panel/index.js +0 -39
  86. package/build/components/sidebar/plugin-post-publish-panel/index.js.map +0 -1
  87. package/build/components/sidebar/plugin-pre-publish-panel/index.js +0 -43
  88. package/build/components/sidebar/plugin-pre-publish-panel/index.js.map +0 -1
  89. package/build/components/sidebar/post-format/index.js +0 -21
  90. package/build/components/sidebar/post-format/index.js.map +0 -1
  91. package/build/components/sidebar/post-pending-status/index.js +0 -26
  92. package/build/components/sidebar/post-pending-status/index.js.map +0 -1
  93. package/build/components/sidebar/post-slug/index.js +0 -21
  94. package/build/components/sidebar/post-slug/index.js.map +0 -1
  95. package/build/components/sidebar/post-status/index.js +0 -69
  96. package/build/components/sidebar/post-status/index.js.map +0 -1
  97. package/build/components/sidebar/post-sticky/index.js +0 -26
  98. package/build/components/sidebar/post-sticky/index.js.map +0 -1
  99. package/build/components/sidebar/post-trash/index.js +0 -16
  100. package/build/components/sidebar/post-trash/index.js.map +0 -1
  101. package/build/components/sidebar/post-visibility/index.js +0 -78
  102. package/build/components/sidebar/post-visibility/index.js.map +0 -1
  103. package/build/components/sidebar/settings-header/index.js +0 -53
  104. package/build/components/sidebar/settings-header/index.js.map +0 -1
  105. package/build/components/sidebar/settings-sidebar/index.js +0 -163
  106. package/build/components/sidebar/settings-sidebar/index.js.map +0 -1
  107. package/build/plugins/copy-content-menu-item/index.js +0 -39
  108. package/build/plugins/copy-content-menu-item/index.js.map +0 -1
  109. package/build/plugins/index.js +0 -69
  110. package/build/plugins/index.js.map +0 -1
  111. package/build/plugins/keyboard-shortcuts-help-menu-item/index.js +0 -44
  112. package/build/plugins/keyboard-shortcuts-help-menu-item/index.js.map +0 -1
  113. package/build/plugins/welcome-guide-menu-item/index.js.map +0 -1
  114. package/build-module/components/header/post-publish-button-or-toggle.js +0 -86
  115. package/build-module/components/header/post-publish-button-or-toggle.js.map +0 -1
  116. package/build-module/components/header/preferences-menu-item/index.js +0 -32
  117. package/build-module/components/header/preferences-menu-item/index.js.map +0 -1
  118. package/build-module/components/header/tools-more-menu-group/index.js +0 -19
  119. package/build-module/components/header/tools-more-menu-group/index.js.map +0 -1
  120. package/build-module/components/header/writing-menu/index.js +0 -64
  121. package/build-module/components/header/writing-menu/index.js.map +0 -1
  122. package/build-module/components/layout/actions-panel.js +0 -78
  123. package/build-module/components/layout/actions-panel.js.map +0 -1
  124. package/build-module/components/preferences-modal/enable-publish-sidebar.js +0 -31
  125. package/build-module/components/preferences-modal/enable-publish-sidebar.js.map +0 -1
  126. package/build-module/components/sidebar/plugin-post-publish-panel/index.js +0 -32
  127. package/build-module/components/sidebar/plugin-post-publish-panel/index.js.map +0 -1
  128. package/build-module/components/sidebar/plugin-pre-publish-panel/index.js +0 -36
  129. package/build-module/components/sidebar/plugin-pre-publish-panel/index.js.map +0 -1
  130. package/build-module/components/sidebar/post-format/index.js +0 -13
  131. package/build-module/components/sidebar/post-format/index.js.map +0 -1
  132. package/build-module/components/sidebar/post-pending-status/index.js +0 -18
  133. package/build-module/components/sidebar/post-pending-status/index.js.map +0 -1
  134. package/build-module/components/sidebar/post-slug/index.js +0 -13
  135. package/build-module/components/sidebar/post-slug/index.js.map +0 -1
  136. package/build-module/components/sidebar/post-status/index.js +0 -61
  137. package/build-module/components/sidebar/post-status/index.js.map +0 -1
  138. package/build-module/components/sidebar/post-sticky/index.js +0 -18
  139. package/build-module/components/sidebar/post-sticky/index.js.map +0 -1
  140. package/build-module/components/sidebar/post-trash/index.js +0 -9
  141. package/build-module/components/sidebar/post-trash/index.js.map +0 -1
  142. package/build-module/components/sidebar/post-visibility/index.js +0 -70
  143. package/build-module/components/sidebar/post-visibility/index.js.map +0 -1
  144. package/build-module/components/sidebar/settings-header/index.js +0 -46
  145. package/build-module/components/sidebar/settings-header/index.js.map +0 -1
  146. package/build-module/components/sidebar/settings-sidebar/index.js +0 -155
  147. package/build-module/components/sidebar/settings-sidebar/index.js.map +0 -1
  148. package/build-module/plugins/copy-content-menu-item/index.js +0 -32
  149. package/build-module/plugins/copy-content-menu-item/index.js.map +0 -1
  150. package/build-module/plugins/index.js +0 -65
  151. package/build-module/plugins/index.js.map +0 -1
  152. package/build-module/plugins/keyboard-shortcuts-help-menu-item/index.js +0 -36
  153. package/build-module/plugins/keyboard-shortcuts-help-menu-item/index.js.map +0 -1
  154. package/build-module/plugins/welcome-guide-menu-item/index.js.map +0 -1
  155. package/src/components/header/post-publish-button-or-toggle.js +0 -97
  156. package/src/components/header/preferences-menu-item/index.js +0 -31
  157. package/src/components/header/test/index.js +0 -63
  158. package/src/components/header/tools-more-menu-group/index.js +0 -20
  159. package/src/components/header/writing-menu/index.js +0 -73
  160. package/src/components/layout/actions-panel.js +0 -103
  161. package/src/components/preferences-modal/enable-publish-sidebar.js +0 -32
  162. package/src/components/preferences-modal/test/index.js +0 -28
  163. package/src/components/sidebar/plugin-post-publish-panel/index.js +0 -28
  164. package/src/components/sidebar/plugin-pre-publish-panel/index.js +0 -32
  165. package/src/components/sidebar/post-format/index.js +0 -20
  166. package/src/components/sidebar/post-format/style.scss +0 -5
  167. package/src/components/sidebar/post-pending-status/index.js +0 -27
  168. package/src/components/sidebar/post-slug/index.js +0 -17
  169. package/src/components/sidebar/post-slug/style.scss +0 -5
  170. package/src/components/sidebar/post-status/index.js +0 -88
  171. package/src/components/sidebar/post-sticky/index.js +0 -27
  172. package/src/components/sidebar/post-trash/index.js +0 -12
  173. package/src/components/sidebar/post-visibility/index.js +0 -88
  174. package/src/components/sidebar/post-visibility/style.scss +0 -5
  175. package/src/components/sidebar/settings-header/index.js +0 -49
  176. package/src/components/sidebar/settings-sidebar/index.js +0 -211
  177. package/src/components/sidebar/style.scss +0 -18
  178. package/src/plugins/copy-content-menu-item/index.js +0 -29
  179. package/src/plugins/index.js +0 -85
  180. package/src/plugins/keyboard-shortcuts-help-menu-item/index.js +0 -36
  181. /package/src/{plugins/welcome-guide-menu-item/index.js → components/header/more-menu/welcome-guide-menu-item.js} +0 -0
@@ -1,43 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = EditPostPluginPrePublishPanel;
8
- var _react = require("react");
9
- var _deprecated = _interopRequireDefault(require("@wordpress/deprecated"));
10
- var _editor = require("@wordpress/editor");
11
- /**
12
- * WordPress dependencies
13
- */
14
-
15
- /**
16
- * Renders provided content to the pre-publish side panel in the publish flow
17
- * (side panel that opens when a user first pushes "Publish" from the main editor).
18
- *
19
- * @deprecated since 6.6, use `wp.editor.PluginPrePublishPanel` instead.
20
- *
21
- * @param {Object} props Component props.
22
- * @param {string} [props.className] An optional class name added to the panel.
23
- * @param {string} [props.title] Title displayed at the top of the panel.
24
- * @param {boolean} [props.initialOpen=false] Whether to have the panel initially opened.
25
- * When no title is provided it is always opened.
26
- * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/)
27
- * icon slug string, or an SVG WP element, to be rendered when
28
- * the sidebar is pinned to toolbar.
29
- * @param {Element} props.children Children to be rendered
30
- *
31
- * @return {Component} The component to be rendered.
32
- */
33
- function EditPostPluginPrePublishPanel(props) {
34
- (0, _deprecated.default)('wp.editPost.PluginPrePublishPanel', {
35
- since: '6.6',
36
- version: '6.8',
37
- alternative: 'wp.editor.PluginPrePublishPanel'
38
- });
39
- return (0, _react.createElement)(_editor.PluginPrePublishPanel, {
40
- ...props
41
- });
42
- }
43
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_deprecated","_interopRequireDefault","require","_editor","EditPostPluginPrePublishPanel","props","deprecated","since","version","alternative","_react","createElement","PluginPrePublishPanel"],"sources":["@wordpress/edit-post/src/components/sidebar/plugin-pre-publish-panel/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { PluginPrePublishPanel } from '@wordpress/editor';\n\n/**\n * Renders provided content to the pre-publish side panel in the publish flow\n * (side panel that opens when a user first pushes \"Publish\" from the main editor).\n *\n * @deprecated since 6.6, use `wp.editor.PluginPrePublishPanel` instead.\n *\n * @param {Object} props Component props.\n * @param {string} [props.className] An optional class name added to the panel.\n * @param {string} [props.title] Title displayed at the top of the panel.\n * @param {boolean} [props.initialOpen=false] Whether to have the panel initially opened.\n * When no title is provided it is always opened.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/)\n * icon slug string, or an SVG WP element, to be rendered when\n * the sidebar is pinned to toolbar.\n * @param {Element} props.children Children to be rendered\n *\n * @return {Component} The component to be rendered.\n */\nexport default function EditPostPluginPrePublishPanel( props ) {\n\tdeprecated( 'wp.editPost.PluginPrePublishPanel', {\n\t\tsince: '6.6',\n\t\tversion: '6.8',\n\t\talternative: 'wp.editor.PluginPrePublishPanel',\n\t} );\n\treturn <PluginPrePublishPanel { ...props } />;\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASE,6BAA6BA,CAAEC,KAAK,EAAG;EAC9D,IAAAC,mBAAU,EAAE,mCAAmC,EAAE;IAChDC,KAAK,EAAE,KAAK;IACZC,OAAO,EAAE,KAAK;IACdC,WAAW,EAAE;EACd,CAAE,CAAC;EACH,OAAO,IAAAC,MAAA,CAAAC,aAAA,EAACR,OAAA,CAAAS,qBAAqB;IAAA,GAAMP;EAAK,CAAI,CAAC;AAC9C","ignoreList":[]}
@@ -1,21 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.PostFormat = PostFormat;
7
- exports.default = void 0;
8
- var _react = require("react");
9
- var _components = require("@wordpress/components");
10
- var _editor = require("@wordpress/editor");
11
- /**
12
- * WordPress dependencies
13
- */
14
-
15
- function PostFormat() {
16
- return (0, _react.createElement)(_editor.PostFormatCheck, null, (0, _react.createElement)(_components.PanelRow, {
17
- className: "edit-post-post-format"
18
- }, (0, _react.createElement)(_editor.PostFormat, null)));
19
- }
20
- var _default = exports.default = PostFormat;
21
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_components","require","_editor","PostFormat","_react","createElement","PostFormatCheck","PanelRow","className","_default","exports","default"],"sources":["@wordpress/edit-post/src/components/sidebar/post-format/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { PanelRow } from '@wordpress/components';\nimport {\n\tPostFormat as PostFormatForm,\n\tPostFormatCheck,\n} from '@wordpress/editor';\n\nexport function PostFormat() {\n\treturn (\n\t\t<PostFormatCheck>\n\t\t\t<PanelRow className=\"edit-post-post-format\">\n\t\t\t\t<PostFormatForm />\n\t\t\t</PanelRow>\n\t\t</PostFormatCheck>\n\t);\n}\n\nexport default PostFormat;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAOO,SAASE,UAAUA,CAAA,EAAG;EAC5B,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACH,OAAA,CAAAI,eAAe,QACf,IAAAF,MAAA,CAAAC,aAAA,EAACL,WAAA,CAAAO,QAAQ;IAACC,SAAS,EAAC;EAAuB,GAC1C,IAAAJ,MAAA,CAAAC,aAAA,EAACH,OAAA,CAAAC,UAAc,MAAE,CACR,CACM,CAAC;AAEpB;AAAC,IAAAM,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcR,UAAU","ignoreList":[]}
@@ -1,26 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.PostPendingStatus = PostPendingStatus;
7
- exports.default = void 0;
8
- var _react = require("react");
9
- var _editor = require("@wordpress/editor");
10
- var _lockUnlock = require("../../../lock-unlock");
11
- /**
12
- * WordPress dependencies
13
- */
14
-
15
- /**
16
- * Internal dependencies
17
- */
18
-
19
- const {
20
- PostPanelRow
21
- } = (0, _lockUnlock.unlock)(_editor.privateApis);
22
- function PostPendingStatus() {
23
- return (0, _react.createElement)(_editor.PostPendingStatusCheck, null, (0, _react.createElement)(PostPanelRow, null, (0, _react.createElement)(_editor.PostPendingStatus, null)));
24
- }
25
- var _default = exports.default = PostPendingStatus;
26
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_editor","require","_lockUnlock","PostPanelRow","unlock","editorPrivateApis","PostPendingStatus","_react","createElement","PostPendingStatusCheck","_default","exports","default"],"sources":["@wordpress/edit-post/src/components/sidebar/post-pending-status/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tPostPendingStatus as PostPendingStatusForm,\n\tPostPendingStatusCheck,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\n\nconst { PostPanelRow } = unlock( editorPrivateApis );\n\nexport function PostPendingStatus() {\n\treturn (\n\t\t<PostPendingStatusCheck>\n\t\t\t<PostPanelRow>\n\t\t\t\t<PostPendingStatusForm />\n\t\t\t</PostPanelRow>\n\t\t</PostPendingStatusCheck>\n\t);\n}\n\nexport default PostPendingStatus;\n"],"mappings":";;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AASA,IAAAC,WAAA,GAAAD,OAAA;AAZA;AACA;AACA;;AAOA;AACA;AACA;;AAGA,MAAM;EAAEE;AAAa,CAAC,GAAG,IAAAC,kBAAM,EAAEC,mBAAkB,CAAC;AAE7C,SAASC,iBAAiBA,CAAA,EAAG;EACnC,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACR,OAAA,CAAAS,sBAAsB,QACtB,IAAAF,MAAA,CAAAC,aAAA,EAACL,YAAY,QACZ,IAAAI,MAAA,CAAAC,aAAA,EAACR,OAAA,CAAAM,iBAAqB,MAAE,CACX,CACS,CAAC;AAE3B;AAAC,IAAAI,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcN,iBAAiB","ignoreList":[]}
@@ -1,21 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.PostSlug = PostSlug;
7
- exports.default = void 0;
8
- var _react = require("react");
9
- var _components = require("@wordpress/components");
10
- var _editor = require("@wordpress/editor");
11
- /**
12
- * WordPress dependencies
13
- */
14
-
15
- function PostSlug() {
16
- return (0, _react.createElement)(_editor.PostSlugCheck, null, (0, _react.createElement)(_components.PanelRow, {
17
- className: "edit-post-post-slug"
18
- }, (0, _react.createElement)(_editor.PostSlug, null)));
19
- }
20
- var _default = exports.default = PostSlug;
21
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_components","require","_editor","PostSlug","_react","createElement","PostSlugCheck","PanelRow","className","_default","exports","default"],"sources":["@wordpress/edit-post/src/components/sidebar/post-slug/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { PanelRow } from '@wordpress/components';\nimport { PostSlug as PostSlugForm, PostSlugCheck } from '@wordpress/editor';\n\nexport function PostSlug() {\n\treturn (\n\t\t<PostSlugCheck>\n\t\t\t<PanelRow className=\"edit-post-post-slug\">\n\t\t\t\t<PostSlugForm />\n\t\t\t</PanelRow>\n\t\t</PostSlugCheck>\n\t);\n}\n\nexport default PostSlug;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAIO,SAASE,QAAQA,CAAA,EAAG;EAC1B,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACH,OAAA,CAAAI,aAAa,QACb,IAAAF,MAAA,CAAAC,aAAA,EAACL,WAAA,CAAAO,QAAQ;IAACC,SAAS,EAAC;EAAqB,GACxC,IAAAJ,MAAA,CAAAC,aAAA,EAACH,OAAA,CAAAC,QAAY,MAAE,CACN,CACI,CAAC;AAElB;AAAC,IAAAM,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcR,QAAQ","ignoreList":[]}
@@ -1,69 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = PostStatus;
8
- var _react = require("react");
9
- var _i18n = require("@wordpress/i18n");
10
- var _components = require("@wordpress/components");
11
- var _data = require("@wordpress/data");
12
- var _editor = require("@wordpress/editor");
13
- var _postTrash = _interopRequireDefault(require("../post-trash"));
14
- var _postSticky = _interopRequireDefault(require("../post-sticky"));
15
- var _postSlug = _interopRequireDefault(require("../post-slug"));
16
- var _postFormat = _interopRequireDefault(require("../post-format"));
17
- var _lockUnlock = require("../../../lock-unlock");
18
- /**
19
- * WordPress dependencies
20
- */
21
-
22
- /**
23
- * Internal dependencies
24
- */
25
-
26
- const {
27
- PostStatus: PostStatusPanel
28
- } = (0, _lockUnlock.unlock)(_editor.privateApis);
29
-
30
- /**
31
- * Module Constants
32
- */
33
- const PANEL_NAME = 'post-status';
34
- function PostStatus() {
35
- const {
36
- isOpened,
37
- isRemoved
38
- } = (0, _data.useSelect)(select => {
39
- // We use isEditorPanelRemoved to hide the panel if it was programatically removed. We do
40
- // not use isEditorPanelEnabled since this panel should not be disabled through the UI.
41
- const {
42
- isEditorPanelRemoved,
43
- isEditorPanelOpened
44
- } = select(_editor.store);
45
- return {
46
- isRemoved: isEditorPanelRemoved(PANEL_NAME),
47
- isOpened: isEditorPanelOpened(PANEL_NAME)
48
- };
49
- }, []);
50
- const {
51
- toggleEditorPanelOpened
52
- } = (0, _data.useDispatch)(_editor.store);
53
- if (isRemoved) {
54
- return null;
55
- }
56
- return (0, _react.createElement)(_components.PanelBody, {
57
- className: "edit-post-post-status",
58
- title: (0, _i18n.__)('Summary'),
59
- opened: isOpened,
60
- onToggle: () => toggleEditorPanelOpened(PANEL_NAME)
61
- }, (0, _react.createElement)(_editor.PluginPostStatusInfo.Slot, null, fills => (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(PostStatusPanel, null), (0, _react.createElement)(_editor.PostFeaturedImagePanel, {
62
- withPanelBody: false
63
- }), (0, _react.createElement)(_editor.PostSchedulePanel, null), (0, _react.createElement)(_editor.PostTemplatePanel, null), (0, _react.createElement)(_editor.PostURLPanel, null), (0, _react.createElement)(_editor.PostSyncStatus, null), (0, _react.createElement)(_postSticky.default, null), (0, _react.createElement)(_postFormat.default, null), (0, _react.createElement)(_postSlug.default, null), (0, _react.createElement)(_editor.PostAuthorPanel, null), fills, (0, _react.createElement)(_components.__experimentalHStack, {
64
- style: {
65
- marginTop: '16px'
66
- }
67
- }, (0, _react.createElement)(_postTrash.default, null)))));
68
- }
69
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_i18n","require","_components","_data","_editor","_postTrash","_interopRequireDefault","_postSticky","_postSlug","_postFormat","_lockUnlock","PostStatus","PostStatusPanel","unlock","editorPrivateApis","PANEL_NAME","isOpened","isRemoved","useSelect","select","isEditorPanelRemoved","isEditorPanelOpened","editorStore","toggleEditorPanelOpened","useDispatch","_react","createElement","PanelBody","className","title","__","opened","onToggle","PluginPostStatusInfo","Slot","fills","Fragment","PostFeaturedImagePanel","withPanelBody","PostSchedulePanel","PostTemplatePanel","PostURLPanel","PostSyncStatus","default","PostAuthorPanel","__experimentalHStack","style","marginTop"],"sources":["@wordpress/edit-post/src/components/sidebar/post-status/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\t__experimentalHStack as HStack,\n\tPanelBody,\n} from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tPluginPostStatusInfo,\n\tPostAuthorPanel,\n\tPostSchedulePanel,\n\tPostSyncStatus,\n\tPostURLPanel,\n\tPostTemplatePanel,\n\tPostFeaturedImagePanel,\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport PostTrash from '../post-trash';\nimport PostSticky from '../post-sticky';\nimport PostSlug from '../post-slug';\nimport PostFormat from '../post-format';\nimport { unlock } from '../../../lock-unlock';\n\nconst { PostStatus: PostStatusPanel } = unlock( editorPrivateApis );\n\n/**\n * Module Constants\n */\nconst PANEL_NAME = 'post-status';\n\nexport default function PostStatus() {\n\tconst { isOpened, isRemoved } = useSelect( ( select ) => {\n\t\t// We use isEditorPanelRemoved to hide the panel if it was programatically removed. We do\n\t\t// not use isEditorPanelEnabled since this panel should not be disabled through the UI.\n\t\tconst { isEditorPanelRemoved, isEditorPanelOpened } =\n\t\t\tselect( editorStore );\n\t\treturn {\n\t\t\tisRemoved: isEditorPanelRemoved( PANEL_NAME ),\n\t\t\tisOpened: isEditorPanelOpened( PANEL_NAME ),\n\t\t};\n\t}, [] );\n\tconst { toggleEditorPanelOpened } = useDispatch( editorStore );\n\n\tif ( isRemoved ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PanelBody\n\t\t\tclassName=\"edit-post-post-status\"\n\t\t\ttitle={ __( 'Summary' ) }\n\t\t\topened={ isOpened }\n\t\t\tonToggle={ () => toggleEditorPanelOpened( PANEL_NAME ) }\n\t\t>\n\t\t\t<PluginPostStatusInfo.Slot>\n\t\t\t\t{ ( fills ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<PostStatusPanel />\n\t\t\t\t\t\t<PostFeaturedImagePanel withPanelBody={ false } />\n\t\t\t\t\t\t<PostSchedulePanel />\n\t\t\t\t\t\t<PostTemplatePanel />\n\t\t\t\t\t\t<PostURLPanel />\n\t\t\t\t\t\t<PostSyncStatus />\n\t\t\t\t\t\t<PostSticky />\n\t\t\t\t\t\t<PostFormat />\n\t\t\t\t\t\t<PostSlug />\n\t\t\t\t\t\t<PostAuthorPanel />\n\t\t\t\t\t\t{ fills }\n\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\tmarginTop: '16px',\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<PostTrash />\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</PluginPostStatusInfo.Slot>\n\t\t</PanelBody>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAIA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAeA,IAAAI,UAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,WAAA,GAAAD,sBAAA,CAAAL,OAAA;AACA,IAAAO,SAAA,GAAAF,sBAAA,CAAAL,OAAA;AACA,IAAAQ,WAAA,GAAAH,sBAAA,CAAAL,OAAA;AACA,IAAAS,WAAA,GAAAT,OAAA;AA5BA;AACA;AACA;;AAmBA;AACA;AACA;;AAOA,MAAM;EAAEU,UAAU,EAAEC;AAAgB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,mBAAkB,CAA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C,aAAA,EAACtB,OAAA,CAAAqC,YAAY,MAAE,CAAC,EAChB,IAAAhB,MAAA,CAAAC,aAAA,EAACtB,OAAA,CAAAsC,cAAc,MAAE,CAAC,EAClB,IAAAjB,MAAA,CAAAC,aAAA,EAACnB,WAAA,CAAAoC,OAAU,MAAE,CAAC,EACd,IAAAlB,MAAA,CAAAC,aAAA,EAACjB,WAAA,CAAAkC,OAAU,MAAE,CAAC,EACd,IAAAlB,MAAA,CAAAC,aAAA,EAAClB,SAAA,CAAAmC,OAAQ,MAAE,CAAC,EACZ,IAAAlB,MAAA,CAAAC,aAAA,EAACtB,OAAA,CAAAwC,eAAe,MAAE,CAAC,EACjBT,KAAK,EACP,IAAAV,MAAA,CAAAC,aAAA,EAACxB,WAAA,CAAA2C,oBAAM;IACNC,KAAK,EAAG;MACPC,SAAS,EAAE;IACZ;EAAG,GAEH,IAAAtB,MAAA,CAAAC,aAAA,EAACrB,UAAA,CAAAsC,OAAS,MAAE,CACL,CACP,CAEuB,CACjB,CAAC;AAEd","ignoreList":[]}
@@ -1,26 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.PostSticky = PostSticky;
7
- exports.default = void 0;
8
- var _react = require("react");
9
- var _editor = require("@wordpress/editor");
10
- var _lockUnlock = require("../../../lock-unlock");
11
- /**
12
- * WordPress dependencies
13
- */
14
-
15
- /**
16
- * Internal dependencies
17
- */
18
-
19
- const {
20
- PostPanelRow
21
- } = (0, _lockUnlock.unlock)(_editor.privateApis);
22
- function PostSticky() {
23
- return (0, _react.createElement)(_editor.PostStickyCheck, null, (0, _react.createElement)(PostPanelRow, null, (0, _react.createElement)(_editor.PostSticky, null)));
24
- }
25
- var _default = exports.default = PostSticky;
26
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_editor","require","_lockUnlock","PostPanelRow","unlock","editorPrivateApis","PostSticky","_react","createElement","PostStickyCheck","_default","exports","default"],"sources":["@wordpress/edit-post/src/components/sidebar/post-sticky/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tPostSticky as PostStickyForm,\n\tPostStickyCheck,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\n\nconst { PostPanelRow } = unlock( editorPrivateApis );\n\nexport function PostSticky() {\n\treturn (\n\t\t<PostStickyCheck>\n\t\t\t<PostPanelRow>\n\t\t\t\t<PostStickyForm />\n\t\t\t</PostPanelRow>\n\t\t</PostStickyCheck>\n\t);\n}\n\nexport default PostSticky;\n"],"mappings":";;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AASA,IAAAC,WAAA,GAAAD,OAAA;AAZA;AACA;AACA;;AAOA;AACA;AACA;;AAGA,MAAM;EAAEE;AAAa,CAAC,GAAG,IAAAC,kBAAM,EAAEC,mBAAkB,CAAC;AAE7C,SAASC,UAAUA,CAAA,EAAG;EAC5B,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACR,OAAA,CAAAS,eAAe,QACf,IAAAF,MAAA,CAAAC,aAAA,EAACL,YAAY,QACZ,IAAAI,MAAA,CAAAC,aAAA,EAACR,OAAA,CAAAM,UAAc,MAAE,CACJ,CACE,CAAC;AAEpB;AAAC,IAAAI,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcN,UAAU","ignoreList":[]}
@@ -1,16 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = PostTrash;
7
- var _react = require("react");
8
- var _editor = require("@wordpress/editor");
9
- /**
10
- * WordPress dependencies
11
- */
12
-
13
- function PostTrash() {
14
- return (0, _react.createElement)(_editor.PostTrashCheck, null, (0, _react.createElement)(_editor.PostTrash, null));
15
- }
16
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_editor","require","PostTrash","_react","createElement","PostTrashCheck"],"sources":["@wordpress/edit-post/src/components/sidebar/post-trash/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { PostTrash as PostTrashLink, PostTrashCheck } from '@wordpress/editor';\n\nexport default function PostTrash() {\n\treturn (\n\t\t<PostTrashCheck>\n\t\t\t<PostTrashLink />\n\t\t</PostTrashCheck>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGe,SAASC,SAASA,CAAA,EAAG;EACnC,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACJ,OAAA,CAAAK,cAAc,QACd,IAAAF,MAAA,CAAAC,aAAA,EAACJ,OAAA,CAAAE,SAAa,MAAE,CACD,CAAC;AAEnB","ignoreList":[]}
@@ -1,78 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.PostVisibility = PostVisibility;
7
- exports.default = void 0;
8
- var _react = require("react");
9
- var _i18n = require("@wordpress/i18n");
10
- var _components = require("@wordpress/components");
11
- var _editor = require("@wordpress/editor");
12
- var _element = require("@wordpress/element");
13
- var _lockUnlock = require("../../../lock-unlock");
14
- /**
15
- * WordPress dependencies
16
- */
17
-
18
- /**
19
- * Internal dependencies
20
- */
21
-
22
- const {
23
- PostPanelRow
24
- } = (0, _lockUnlock.unlock)(_editor.privateApis);
25
- function PostVisibility() {
26
- // Use internal state instead of a ref to make sure that the component
27
- // re-renders when the popover's anchor updates.
28
- const [popoverAnchor, setPopoverAnchor] = (0, _element.useState)(null);
29
- // Memoize popoverProps to avoid returning a new object every time.
30
- const popoverProps = (0, _element.useMemo)(() => ({
31
- // Anchor the popover to the middle of the entire row so that it doesn't
32
- // move around when the label changes.
33
- anchor: popoverAnchor,
34
- placement: 'bottom-end'
35
- }), [popoverAnchor]);
36
- return (0, _react.createElement)(_editor.PostVisibilityCheck, {
37
- render: ({
38
- canEdit
39
- }) => (0, _react.createElement)(PostPanelRow, {
40
- label: (0, _i18n.__)('Visibility'),
41
- ref: setPopoverAnchor
42
- }, !canEdit && (0, _react.createElement)("span", null, (0, _react.createElement)(_editor.PostVisibilityLabel, null)), canEdit && (0, _react.createElement)(_components.Dropdown, {
43
- contentClassName: "edit-post-post-visibility__dialog",
44
- popoverProps: popoverProps,
45
- focusOnMount: true,
46
- renderToggle: ({
47
- isOpen,
48
- onToggle
49
- }) => (0, _react.createElement)(PostVisibilityToggle, {
50
- isOpen: isOpen,
51
- onClick: onToggle
52
- }),
53
- renderContent: ({
54
- onClose
55
- }) => (0, _react.createElement)(_editor.PostVisibility, {
56
- onClose: onClose
57
- })
58
- }))
59
- });
60
- }
61
- function PostVisibilityToggle({
62
- isOpen,
63
- onClick
64
- }) {
65
- const label = (0, _editor.usePostVisibilityLabel)();
66
- return (0, _react.createElement)(_components.Button, {
67
- __next40pxDefaultSize: true,
68
- className: "edit-post-post-visibility__toggle",
69
- variant: "tertiary",
70
- "aria-expanded": isOpen
71
- // translators: %s: Current post visibility.
72
- ,
73
- "aria-label": (0, _i18n.sprintf)((0, _i18n.__)('Select visibility: %s'), label),
74
- onClick: onClick
75
- }, label);
76
- }
77
- var _default = exports.default = PostVisibility;
78
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_i18n","require","_components","_editor","_element","_lockUnlock","PostPanelRow","unlock","editorPrivateApis","PostVisibility","popoverAnchor","setPopoverAnchor","useState","popoverProps","useMemo","anchor","placement","_react","createElement","PostVisibilityCheck","render","canEdit","label","__","ref","PostVisibilityLabel","Dropdown","contentClassName","focusOnMount","renderToggle","isOpen","onToggle","PostVisibilityToggle","onClick","renderContent","onClose","usePostVisibilityLabel","Button","__next40pxDefaultSize","className","variant","sprintf","_default","exports","default"],"sources":["@wordpress/edit-post/src/components/sidebar/post-visibility/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Dropdown, Button } from '@wordpress/components';\nimport {\n\tPostVisibility as PostVisibilityForm,\n\tPostVisibilityLabel,\n\tPostVisibilityCheck,\n\tusePostVisibilityLabel,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { useMemo, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\n\nconst { PostPanelRow } = unlock( editorPrivateApis );\n\nexport function PostVisibility() {\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\tplacement: 'bottom-end',\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\n\treturn (\n\t\t<PostVisibilityCheck\n\t\t\trender={ ( { canEdit } ) => (\n\t\t\t\t<PostPanelRow\n\t\t\t\t\tlabel={ __( 'Visibility' ) }\n\t\t\t\t\tref={ setPopoverAnchor }\n\t\t\t\t>\n\t\t\t\t\t{ ! canEdit && (\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<PostVisibilityLabel />\n\t\t\t\t\t\t</span>\n\t\t\t\t\t) }\n\t\t\t\t\t{ canEdit && (\n\t\t\t\t\t\t<Dropdown\n\t\t\t\t\t\t\tcontentClassName=\"edit-post-post-visibility__dialog\"\n\t\t\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\t\t\tfocusOnMount\n\t\t\t\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t\t\t\t<PostVisibilityToggle\n\t\t\t\t\t\t\t\t\tisOpen={ isOpen }\n\t\t\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t\t\t\t<PostVisibilityForm onClose={ onClose } />\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</PostPanelRow>\n\t\t\t) }\n\t\t/>\n\t);\n}\n\nfunction PostVisibilityToggle( { isOpen, onClick } ) {\n\tconst label = usePostVisibilityLabel();\n\treturn (\n\t\t<Button\n\t\t\t__next40pxDefaultSize\n\t\t\tclassName=\"edit-post-post-visibility__toggle\"\n\t\t\tvariant=\"tertiary\"\n\t\t\taria-expanded={ isOpen }\n\t\t\t// translators: %s: Current post visibility.\n\t\t\taria-label={ sprintf( __( 'Select visibility: %s' ), label ) }\n\t\t\tonClick={ onClick }\n\t\t>\n\t\t\t{ label }\n\t\t</Button>\n\t);\n}\n\nexport default PostVisibility;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAOA,IAAAG,QAAA,GAAAH,OAAA;AAKA,IAAAI,WAAA,GAAAJ,OAAA;AAjBA;AACA;AACA;;AAYA;AACA;AACA;;AAGA,MAAM;EAAEK;AAAa,CAAC,GAAG,IAAAC,kBAAM,EAAEC,mBAAkB,CAAC;AAE7C,SAASC,cAAcA,CAAA,EAAG;EAChC;EACA;EACA,MAAM,CAAEC,aAAa,EAAEC,gBAAgB,CAAE,GAAG,IAAAC,iBAAQ,EAAE,IAAK,CAAC;EAC5D;EACA,MAAMC,YAAY,GAAG,IAAAC,gBAAO,EAC3B,OAAQ;IACP;IACA;IACAC,MAAM,EAAEL,aAAa;IACrBM,SAAS,EAAE;EACZ,CAAC,CAAE,EACH,CAAEN,aAAa,CAChB,CAAC;EAED,OACC,IAAAO,MAAA,CAAAC,aAAA,EAACf,OAAA,CAAAgB,mBAAmB;IACnBC,MAAM,EAAGA,CAAE;MAAEC;IAAQ,CAAC,KACrB,IAAAJ,MAAA,CAAAC,aAAA,EAACZ,YAAY;MACZgB,KAAK,EAAG,I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__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _react = require("react");
8
- var _components = require("@wordpress/components");
9
- var _i18n = require("@wordpress/i18n");
10
- var _data = require("@wordpress/data");
11
- var _element = require("@wordpress/element");
12
- var _editor = require("@wordpress/editor");
13
- var _lockUnlock = require("../../../lock-unlock");
14
- var _settingsSidebar = require("../settings-sidebar");
15
- /**
16
- * WordPress dependencies
17
- */
18
-
19
- /**
20
- * Internal dependencies
21
- */
22
-
23
- const {
24
- Tabs
25
- } = (0, _lockUnlock.unlock)(_components.privateApis);
26
- const SettingsHeader = (_, ref) => {
27
- const {
28
- documentLabel
29
- } = (0, _data.useSelect)(select => {
30
- const {
31
- getPostTypeLabel
32
- } = select(_editor.store);
33
- return {
34
- // translators: Default label for the Document sidebar tab, not selected.
35
- documentLabel: getPostTypeLabel() || (0, _i18n._x)('Document', 'noun')
36
- };
37
- }, []);
38
- return (0, _react.createElement)(Tabs.TabList, {
39
- ref: ref
40
- }, (0, _react.createElement)(Tabs.Tab, {
41
- tabId: _settingsSidebar.sidebars.document
42
- // Used for focus management in the SettingsSidebar component.
43
- ,
44
- "data-tab-id": _settingsSidebar.sidebars.document
45
- }, documentLabel), (0, _react.createElement)(Tabs.Tab, {
46
- tabId: _settingsSidebar.sidebars.block
47
- // Used for focus management in the SettingsSidebar component.
48
- ,
49
- "data-tab-id": _settingsSidebar.sidebars.block
50
- }, (0, _i18n.__)('Block')));
51
- };
52
- var _default = exports.default = (0, _element.forwardRef)(SettingsHeader);
53
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_components","require","_i18n","_data","_element","_editor","_lockUnlock","_settingsSidebar","Tabs","unlock","componentsPrivateApis","SettingsHeader","_","ref","documentLabel","useSelect","select","getPostTypeLabel","editorStore","_x","_react","createElement","TabList","Tab","tabId","sidebars","document","block","__","_default","exports","default","forwardRef"],"sources":["@wordpress/edit-post/src/components/sidebar/settings-header/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\nimport { __, _x } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { forwardRef } from '@wordpress/element';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\nimport { sidebars } from '../settings-sidebar';\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nconst SettingsHeader = ( _, ref ) => {\n\tconst { documentLabel } = useSelect( ( select ) => {\n\t\tconst { getPostTypeLabel } = select( editorStore );\n\n\t\treturn {\n\t\t\t// translators: Default label for the Document sidebar tab, not selected.\n\t\t\tdocumentLabel: getPostTypeLabel() || _x( 'Document', 'noun' ),\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<Tabs.TabList ref={ ref }>\n\t\t\t<Tabs.Tab\n\t\t\t\ttabId={ sidebars.document }\n\t\t\t\t// Used for focus management in the SettingsSidebar component.\n\t\t\t\tdata-tab-id={ sidebars.document }\n\t\t\t>\n\t\t\t\t{ documentLabel }\n\t\t\t</Tabs.Tab>\n\t\t\t<Tabs.Tab\n\t\t\t\ttabId={ sidebars.block }\n\t\t\t\t// Used for focus management in the SettingsSidebar component.\n\t\t\t\tdata-tab-id={ sidebars.block }\n\t\t\t>\n\t\t\t\t{ /* translators: Text label for the Block Settings Sidebar tab. */ }\n\t\t\t\t{ __( 'Block' ) }\n\t\t\t</Tabs.Tab>\n\t\t</Tabs.TabList>\n\t);\n};\n\nexport default forwardRef( SettingsHeader );\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAKA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,gBAAA,GAAAN,OAAA;AAbA;AACA;AACA;;AAOA;AACA;AACA;;AAIA,MAAM;EAAEO;AAAK,CAAC,GAAG,IAAAC,kBAAM,EAAEC,uBAAsB,CAAC;AAEhD,MAAMC,cAAc,GAAGA,CAAEC,CAAC,EAAEC,GAAG,KAAM;EACpC,MAAM;IAAEC;EAAc,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IAClD,MAAM;MAAEC;IAAiB,CAAC,GAAGD,MAAM,CAAEE,aAAY,CAAC;IAElD,OAAO;MACN;MACAJ,aAAa,EAAEG,gBAAgB,CAAC,CAAC,IAAI,IAAAE,QAAE,EAAE,UAAU,EAAE,MAAO;IAC7D,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACb,IAAI,CAACc,OAAO;IAACT,GAAG,EAAGA;EAAK,GACxB,IAAAO,MAAA,CAAAC,aAAA,EAACb,IAAI,CAACe,GAAG;IACRC,KAAK,EAAGC,yBAAQ,CAACC;IACjB;IAAA;IACA,eAAcD,yBAAQ,CAACC;EAAU,GAE/BZ,aACO,CAAC,EACX,IAAAM,MAAA,CAAAC,aAAA,EAACb,IAAI,CAACe,GAAG;IACRC,KAAK,EAAGC,yBAAQ,CAACE;IACjB;IAAA;IACA,eAAcF,yBAAQ,CAACE;EAAO,GAG5B,IAAAC,QAAE,EAAE,OAAQ,CACL,CACG,CAAC;AAEjB,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEa,IAAAC,mBAAU,EAAErB,cAAe,CAAC","ignoreList":[]}
@@ -1,163 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.sidebars = exports.default = void 0;
8
- var _react = require("react");
9
- var _blockEditor = require("@wordpress/block-editor");
10
- var _data = require("@wordpress/data");
11
- var _element = require("@wordpress/element");
12
- var _i18n = require("@wordpress/i18n");
13
- var _icons = require("@wordpress/icons");
14
- var _keyboardShortcuts = require("@wordpress/keyboard-shortcuts");
15
- var _editor = require("@wordpress/editor");
16
- var _url = require("@wordpress/url");
17
- var _settingsHeader = _interopRequireDefault(require("../settings-header"));
18
- var _postStatus = _interopRequireDefault(require("../post-status"));
19
- var _metaBoxes = _interopRequireDefault(require("../../meta-boxes"));
20
- var _store = require("../../../store");
21
- var _components = require("@wordpress/components");
22
- var _lockUnlock = require("../../../lock-unlock");
23
- /**
24
- * WordPress dependencies
25
- */
26
-
27
- /**
28
- * Internal dependencies
29
- */
30
-
31
- const {
32
- PostCardPanel,
33
- PostActions,
34
- interfaceStore
35
- } = (0, _lockUnlock.unlock)(_editor.privateApis);
36
- const {
37
- Tabs
38
- } = (0, _lockUnlock.unlock)(_components.privateApis);
39
- const {
40
- PatternOverridesPanel,
41
- useAutoSwitchEditorSidebars
42
- } = (0, _lockUnlock.unlock)(_editor.privateApis);
43
- const SIDEBAR_ACTIVE_BY_DEFAULT = _element.Platform.select({
44
- web: true,
45
- native: false
46
- });
47
- const sidebars = exports.sidebars = {
48
- document: 'edit-post/document',
49
- block: 'edit-post/block'
50
- };
51
- function onActionPerformed(actionId, items) {
52
- if (actionId === 'move-to-trash') {
53
- const postType = items[0].type;
54
- document.location.href = (0, _url.addQueryArgs)('edit.php', {
55
- post_type: postType
56
- });
57
- }
58
- }
59
- const SidebarContent = ({
60
- tabName,
61
- keyboardShortcut,
62
- isEditingTemplate
63
- }) => {
64
- const tabListRef = (0, _element.useRef)(null);
65
- // Because `PluginSidebar` renders a `ComplementaryArea`, we
66
- // need to forward the `Tabs` context so it can be passed through the
67
- // underlying slot/fill.
68
- const tabsContextValue = (0, _element.useContext)(Tabs.Context);
69
-
70
- // This effect addresses a race condition caused by tabbing from the last
71
- // block in the editor into the settings sidebar. Without this effect, the
72
- // selected tab and browser focus can become separated in an unexpected way
73
- // (e.g the "block" tab is focused, but the "post" tab is selected).
74
- (0, _element.useEffect)(() => {
75
- const tabsElements = Array.from(tabListRef.current?.querySelectorAll('[role="tab"]') || []);
76
- const selectedTabElement = tabsElements.find(
77
- // We are purposefully using a custom `data-tab-id` attribute here
78
- // because we don't want rely on any assumptions about `Tabs`
79
- // component internals.
80
- element => element.getAttribute('data-tab-id') === tabName);
81
- const activeElement = selectedTabElement?.ownerDocument.activeElement;
82
- const tabsHasFocus = tabsElements.some(element => {
83
- return activeElement && activeElement.id === element.id;
84
- });
85
- if (tabsHasFocus && selectedTabElement && selectedTabElement.id !== activeElement?.id) {
86
- selectedTabElement?.focus();
87
- }
88
- }, [tabName]);
89
- return (0, _react.createElement)(_editor.PluginSidebar, {
90
- identifier: tabName,
91
- header: (0, _react.createElement)(Tabs.Context.Provider, {
92
- value: tabsContextValue
93
- }, (0, _react.createElement)(_settingsHeader.default, {
94
- ref: tabListRef
95
- })),
96
- closeLabel: (0, _i18n.__)('Close Settings')
97
- // This classname is added so we can apply a corrective negative
98
- // margin to the panel.
99
- // see https://github.com/WordPress/gutenberg/pull/55360#pullrequestreview-1737671049
100
- ,
101
- className: "edit-post-sidebar__panel",
102
- headerClassName: "edit-post-sidebar__panel-tabs"
103
- /* translators: button label text should, if possible, be under 16 characters. */,
104
- title: (0, _i18n.__)('Settings'),
105
- toggleShortcut: keyboardShortcut,
106
- icon: (0, _i18n.isRTL)() ? _icons.drawerLeft : _icons.drawerRight,
107
- isActiveByDefault: SIDEBAR_ACTIVE_BY_DEFAULT
108
- }, (0, _react.createElement)(Tabs.Context.Provider, {
109
- value: tabsContextValue
110
- }, (0, _react.createElement)(Tabs.TabPanel, {
111
- tabId: sidebars.document,
112
- focusable: false
113
- }, (0, _react.createElement)(PostCardPanel, {
114
- actions: (0, _react.createElement)(PostActions, {
115
- onActionPerformed: onActionPerformed
116
- })
117
- }), !isEditingTemplate && (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_postStatus.default, null), (0, _react.createElement)(_editor.PluginDocumentSettingPanel.Slot, null), (0, _react.createElement)(_editor.PostLastRevisionPanel, null), (0, _react.createElement)(_editor.PostTaxonomiesPanel, null), (0, _react.createElement)(_editor.PostExcerptPanel, null), (0, _react.createElement)(_editor.PostDiscussionPanel, null), (0, _react.createElement)(_editor.PageAttributesPanel, null), (0, _react.createElement)(PatternOverridesPanel, null), (0, _react.createElement)(_metaBoxes.default, {
118
- location: "side"
119
- }))), (0, _react.createElement)(Tabs.TabPanel, {
120
- tabId: sidebars.block,
121
- focusable: false
122
- }, (0, _react.createElement)(_blockEditor.BlockInspector, null))));
123
- };
124
- const SettingsSidebar = () => {
125
- useAutoSwitchEditorSidebars();
126
- const {
127
- tabName,
128
- keyboardShortcut,
129
- isEditingTemplate
130
- } = (0, _data.useSelect)(select => {
131
- const shortcut = select(_keyboardShortcuts.store).getShortcutRepresentation('core/editor/toggle-sidebar');
132
- const sidebar = select(interfaceStore).getActiveComplementaryArea('core');
133
- const _isEditorSidebarOpened = [sidebars.block, sidebars.document].includes(sidebar);
134
- let _tabName = sidebar;
135
- if (!_isEditorSidebarOpened) {
136
- _tabName = !!select(_blockEditor.store).getBlockSelectionStart() ? sidebars.block : sidebars.document;
137
- }
138
- return {
139
- tabName: _tabName,
140
- keyboardShortcut: shortcut,
141
- isEditingTemplate: select(_editor.store).getCurrentPostType() === 'wp_template'
142
- };
143
- }, []);
144
- const {
145
- openGeneralSidebar
146
- } = (0, _data.useDispatch)(_store.store);
147
- const onTabSelect = (0, _element.useCallback)(newSelectedTabId => {
148
- if (!!newSelectedTabId) {
149
- openGeneralSidebar(newSelectedTabId);
150
- }
151
- }, [openGeneralSidebar]);
152
- return (0, _react.createElement)(Tabs, {
153
- selectedTabId: tabName,
154
- onSelect: onTabSelect,
155
- selectOnMove: false
156
- }, (0, _react.createElement)(SidebarContent, {
157
- tabName: tabName,
158
- keyboardShortcut: keyboardShortcut,
159
- isEditingTemplate: isEditingTemplate
160
- }));
161
- };
162
- var _default = exports.default = SettingsSidebar;
163
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_blockEditor","require","_data","_element","_i18n","_icons","_keyboardShortcuts","_editor","_url","_settingsHeader","_interopRequireDefault","_postStatus","_metaBoxes","_store","_components","_lockUnlock","PostCardPanel","PostActions","interfaceStore","unlock","editorPrivateApis","Tabs","componentsPrivateApis","PatternOverridesPanel","useAutoSwitchEditorSidebars","SIDEBAR_ACTIVE_BY_DEFAULT","Platform","select","web","native","sidebars","exports","document","block","onActionPerformed","actionId","items","postType","type","location","href","addQueryArgs","post_type","SidebarContent","tabName","keyboardShortcut","isEditingTemplate","tabListRef","useRef","tabsContextValue","useContext","Context","useEffect","tabsElements","Array","from","current","querySelectorAll","selectedTabElement","find","element","getAttribute","activeElement","ownerDocument","tabsHasFocus","some","id","focus","_react","createElement","PluginSidebar","identifier","header","Provider","value","default","ref","closeLabel","__","className","headerClassName","title","toggleShortcut","icon","isRTL","drawerLeft","drawerRight","isActiveByDefault","TabPanel","tabId","focusable","actions","Fragment","PluginDocumentSettingPanel","Slot","PostLastRevisionPanel","PostTaxonomiesPanel","PostExcerptPanel","PostDiscussionPanel","PageAttributesPanel","BlockInspector","SettingsSidebar","useSelect","shortcut","keyboardShortcutsStore","getShortcutRepresentation","sidebar","getActiveComplementaryArea","_isEditorSidebarOpened","includes","_tabName","blockEditorStore","getBlockSelectionStart","editorStore","getCurrentPostType","openGeneralSidebar","useDispatch","editPostStore","onTabSelect","useCallback","newSelectedTabId","selectedTabId","onSelect","selectOnMove","_default"],"sources":["@wordpress/edit-post/src/components/sidebar/settings-sidebar/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tBlockInspector,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tPlatform,\n\tuseCallback,\n\tuseContext,\n\tuseEffect,\n\tuseRef,\n} from '@wordpress/element';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport { drawerLeft, drawerRight } from '@wordpress/icons';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport {\n\tstore as editorStore,\n\tPageAttributesPanel,\n\tPluginDocumentSettingPanel,\n\tPluginSidebar,\n\tPostDiscussionPanel,\n\tPostExcerptPanel,\n\tPostLastRevisionPanel,\n\tPostTaxonomiesPanel,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { addQueryArgs } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport SettingsHeader from '../settings-header';\nimport PostStatus from '../post-status';\nimport MetaBoxes from '../../meta-boxes';\nimport { store as editPostStore } from '../../../store';\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\nimport { unlock } from '../../../lock-unlock';\n\nconst { PostCardPanel, PostActions, interfaceStore } =\n\tunlock( editorPrivateApis );\nconst { Tabs } = unlock( componentsPrivateApis );\nconst { PatternOverridesPanel, useAutoSwitchEditorSidebars } =\n\tunlock( editorPrivateApis );\n\nconst SIDEBAR_ACTIVE_BY_DEFAULT = Platform.select( {\n\tweb: true,\n\tnative: false,\n} );\nexport const sidebars = {\n\tdocument: 'edit-post/document',\n\tblock: 'edit-post/block',\n};\n\nfunction onActionPerformed( actionId, items ) {\n\tif ( actionId === 'move-to-trash' ) {\n\t\tconst postType = items[ 0 ].type;\n\t\tdocument.location.href = addQueryArgs( 'edit.php', {\n\t\t\tpost_type: postType,\n\t\t} );\n\t}\n}\n\nconst SidebarContent = ( { tabName, keyboardShortcut, isEditingTemplate } ) => {\n\tconst tabListRef = useRef( null );\n\t// Because `PluginSidebar` renders a `ComplementaryArea`, we\n\t// need to forward the `Tabs` context so it can be passed through the\n\t// underlying slot/fill.\n\tconst tabsContextValue = useContext( Tabs.Context );\n\n\t// This effect addresses a race condition caused by tabbing from the last\n\t// block in the editor into the settings sidebar. Without this effect, the\n\t// selected tab and browser focus can become separated in an unexpected way\n\t// (e.g the \"block\" tab is focused, but the \"post\" tab is selected).\n\tuseEffect( () => {\n\t\tconst tabsElements = Array.from(\n\t\t\ttabListRef.current?.querySelectorAll( '[role=\"tab\"]' ) || []\n\t\t);\n\t\tconst selectedTabElement = tabsElements.find(\n\t\t\t// We are purposefully using a custom `data-tab-id` attribute here\n\t\t\t// because we don't want rely on any assumptions about `Tabs`\n\t\t\t// component internals.\n\t\t\t( element ) => element.getAttribute( 'data-tab-id' ) === tabName\n\t\t);\n\t\tconst activeElement = selectedTabElement?.ownerDocument.activeElement;\n\t\tconst tabsHasFocus = tabsElements.some( ( element ) => {\n\t\t\treturn activeElement && activeElement.id === element.id;\n\t\t} );\n\t\tif (\n\t\t\ttabsHasFocus &&\n\t\t\tselectedTabElement &&\n\t\t\tselectedTabElement.id !== activeElement?.id\n\t\t) {\n\t\t\tselectedTabElement?.focus();\n\t\t}\n\t}, [ tabName ] );\n\n\treturn (\n\t\t<PluginSidebar\n\t\t\tidentifier={ tabName }\n\t\t\theader={\n\t\t\t\t<Tabs.Context.Provider value={ tabsContextValue }>\n\t\t\t\t\t<SettingsHeader ref={ tabListRef } />\n\t\t\t\t</Tabs.Context.Provider>\n\t\t\t}\n\t\t\tcloseLabel={ __( 'Close Settings' ) }\n\t\t\t// This classname is added so we can apply a corrective negative\n\t\t\t// margin to the panel.\n\t\t\t// see https://github.com/WordPress/gutenberg/pull/55360#pullrequestreview-1737671049\n\t\t\tclassName=\"edit-post-sidebar__panel\"\n\t\t\theaderClassName=\"edit-post-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\ttoggleShortcut={ keyboardShortcut }\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 tabId={ sidebars.document } focusable={ false }>\n\t\t\t\t\t<PostCardPanel\n\t\t\t\t\t\tactions={\n\t\t\t\t\t\t\t<PostActions\n\t\t\t\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t\t{ ! isEditingTemplate && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<PostStatus />\n\t\t\t\t\t\t\t<PluginDocumentSettingPanel.Slot />\n\t\t\t\t\t\t\t<PostLastRevisionPanel />\n\t\t\t\t\t\t\t<PostTaxonomiesPanel />\n\t\t\t\t\t\t\t<PostExcerptPanel />\n\t\t\t\t\t\t\t<PostDiscussionPanel />\n\t\t\t\t\t\t\t<PageAttributesPanel />\n\t\t\t\t\t\t\t<PatternOverridesPanel />\n\t\t\t\t\t\t\t<MetaBoxes location=\"side\" />\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 tabId={ sidebars.block } focusable={ false }>\n\t\t\t\t\t<BlockInspector />\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t</Tabs.Context.Provider>\n\t\t</PluginSidebar>\n\t);\n};\n\nconst SettingsSidebar = () => {\n\tuseAutoSwitchEditorSidebars();\n\tconst { tabName, keyboardShortcut, isEditingTemplate } = useSelect(\n\t\t( select ) => {\n\t\t\tconst shortcut = select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getShortcutRepresentation( 'core/editor/toggle-sidebar' );\n\n\t\t\tconst sidebar =\n\t\t\t\tselect( interfaceStore ).getActiveComplementaryArea( 'core' );\n\t\t\tconst _isEditorSidebarOpened = [\n\t\t\t\tsidebars.block,\n\t\t\t\tsidebars.document,\n\t\t\t].includes( sidebar );\n\t\t\tlet _tabName = sidebar;\n\t\t\tif ( ! _isEditorSidebarOpened ) {\n\t\t\t\t_tabName = !! select(\n\t\t\t\t\tblockEditorStore\n\t\t\t\t).getBlockSelectionStart()\n\t\t\t\t\t? sidebars.block\n\t\t\t\t\t: sidebars.document;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\ttabName: _tabName,\n\t\t\t\tkeyboardShortcut: shortcut,\n\t\t\t\tisEditingTemplate:\n\t\t\t\t\tselect( editorStore ).getCurrentPostType() ===\n\t\t\t\t\t'wp_template',\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst { openGeneralSidebar } = useDispatch( editPostStore );\n\n\tconst onTabSelect = useCallback(\n\t\t( newSelectedTabId ) => {\n\t\t\tif ( !! newSelectedTabId ) {\n\t\t\t\topenGeneralSidebar( newSelectedTabId );\n\t\t\t}\n\t\t},\n\t\t[ openGeneralSidebar ]\n\t);\n\n\treturn (\n\t\t<Tabs\n\t\t\tselectedTabId={ tabName }\n\t\t\tonSelect={ onTabSelect }\n\t\t\tselectOnMove={ false }\n\t\t>\n\t\t\t<SidebarContent\n\t\t\t\ttabName={ tabName }\n\t\t\t\tkeyboardShortcut={ keyboardShortcut }\n\t\t\t\tisEditingTemplate={ isEditingTemplate }\n\t\t\t/>\n\t\t</Tabs>\n\t);\n};\n\nexport default SettingsSidebar;\n"],"mappings":";;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAIA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAOA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,kBAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAWA,IAAAO,IAAA,GAAAP,OAAA;AAKA,IAAAQ,eAAA,GAAAC,sBAAA,CAAAT,OAAA;AACA,IAAAU,WAAA,GAAAD,sBAAA,CAAAT,OAAA;AACA,IAAAW,UAAA,GAAAF,sBAAA,CAAAT,OAAA;AACA,IAAAY,MAAA,GAAAZ,OAAA;AACA,IAAAa,WAAA,GAAAb,OAAA;AACA,IAAAc,WAAA,GAAAd,OAAA;AAvCA;AACA;AACA;;AA6BA;AACA;AACA;;AAQA,MAAM;EAAEe,aAAa;EAAEC,WAAW;EAAEC;AAAe,CAAC,GACnD,IAAAC,kBAAM,EAAEC,mBAAkB,CAAC;AAC5B,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