@wordpress/edit-post 7.31.0 → 7.33.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 (294) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +9 -323
  3. package/build/components/browser-url/index.js.map +1 -1
  4. package/build/components/editor-initialization/index.js +0 -1
  5. package/build/components/editor-initialization/index.js.map +1 -1
  6. package/build/components/editor-initialization/listener-hooks.js +1 -38
  7. package/build/components/editor-initialization/listener-hooks.js.map +1 -1
  8. package/build/components/header/fullscreen-mode-close/index.js.map +1 -1
  9. package/build/components/header/header-toolbar/index.native.js.map +1 -1
  10. package/build/components/header/index.js +5 -5
  11. package/build/components/header/index.js.map +1 -1
  12. package/build/components/header/index.native.js +1 -1
  13. package/build/components/header/index.native.js.map +1 -1
  14. package/build/components/header/main-dashboard-button/index.js.map +1 -1
  15. package/build/components/header/more-menu/index.js +7 -6
  16. package/build/components/header/more-menu/index.js.map +1 -1
  17. package/build/components/header/post-publish-button-or-toggle.js +11 -13
  18. package/build/components/header/post-publish-button-or-toggle.js.map +1 -1
  19. package/build/components/header/preferences-menu-item/index.js +12 -4
  20. package/build/components/header/preferences-menu-item/index.js.map +1 -1
  21. package/build/components/header/tools-more-menu-group/index.js.map +1 -1
  22. package/build/components/header/writing-menu/index.js.map +1 -1
  23. package/build/components/init-pattern-modal/index.js.map +1 -1
  24. package/build/components/keyboard-shortcuts/index.js +1 -36
  25. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  26. package/build/components/layout/actions-panel.js +4 -7
  27. package/build/components/layout/actions-panel.js.map +1 -1
  28. package/build/components/layout/index.js +16 -21
  29. package/build/components/layout/index.js.map +1 -1
  30. package/build/components/layout/index.native.js.map +1 -1
  31. package/build/components/meta-boxes/index.js.map +1 -1
  32. package/build/components/meta-boxes/meta-box-visibility.js.map +1 -1
  33. package/build/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
  34. package/build/components/preferences-modal/enable-custom-fields.js.map +1 -1
  35. package/build/components/preferences-modal/enable-panel.js.map +1 -1
  36. package/build/components/preferences-modal/enable-publish-sidebar.js.map +1 -1
  37. package/build/components/preferences-modal/index.js +1 -21
  38. package/build/components/preferences-modal/index.js.map +1 -1
  39. package/build/components/preferences-modal/meta-boxes-section.js.map +1 -1
  40. package/build/components/sidebar/plugin-post-publish-panel/index.js +16 -64
  41. package/build/components/sidebar/plugin-post-publish-panel/index.js.map +1 -1
  42. package/build/components/sidebar/plugin-pre-publish-panel/index.js +16 -63
  43. package/build/components/sidebar/plugin-pre-publish-panel/index.js.map +1 -1
  44. package/build/components/sidebar/post-format/index.js.map +1 -1
  45. package/build/components/sidebar/post-pending-status/index.js.map +1 -1
  46. package/build/components/sidebar/post-slug/index.js.map +1 -1
  47. package/build/components/sidebar/post-status/index.js +9 -9
  48. package/build/components/sidebar/post-status/index.js.map +1 -1
  49. package/build/components/sidebar/post-sticky/index.js.map +1 -1
  50. package/build/components/sidebar/post-trash/index.js.map +1 -1
  51. package/build/components/sidebar/post-visibility/index.js.map +1 -1
  52. package/build/components/sidebar/settings-header/index.js.map +1 -1
  53. package/build/components/sidebar/settings-sidebar/index.js +42 -40
  54. package/build/components/sidebar/settings-sidebar/index.js.map +1 -1
  55. package/build/components/text-editor/index.js.map +1 -1
  56. package/build/components/visual-editor/block-inspector-button.js +1 -1
  57. package/build/components/visual-editor/block-inspector-button.js.map +1 -1
  58. package/build/components/visual-editor/header.native.js.map +1 -1
  59. package/build/components/visual-editor/index.js +4 -1
  60. package/build/components/visual-editor/index.js.map +1 -1
  61. package/build/components/visual-editor/index.native.js.map +1 -1
  62. package/build/components/visual-editor/use-padding-appender.js +62 -0
  63. package/build/components/visual-editor/use-padding-appender.js.map +1 -0
  64. package/build/components/welcome-guide/default.js.map +1 -1
  65. package/build/components/welcome-guide/image.js.map +1 -1
  66. package/build/components/welcome-guide/index.js.map +1 -1
  67. package/build/components/welcome-guide/template.js.map +1 -1
  68. package/build/editor.js +9 -4
  69. package/build/editor.js.map +1 -1
  70. package/build/editor.native.js.map +1 -1
  71. package/build/hooks/commands/use-common-commands.js +7 -24
  72. package/build/hooks/commands/use-common-commands.js.map +1 -1
  73. package/build/hooks/components/index.js.map +1 -1
  74. package/build/hooks/index.js.map +1 -1
  75. package/build/hooks/use-navigate-to-entity-record.js +36 -19
  76. package/build/hooks/use-navigate-to-entity-record.js.map +1 -1
  77. package/build/hooks/validate-multiple-use/index.js.map +1 -1
  78. package/build/index.js +7 -12
  79. package/build/index.js.map +1 -1
  80. package/build/index.native.js +2 -4
  81. package/build/index.native.js.map +1 -1
  82. package/build/lock-unlock.js.map +1 -1
  83. package/build/plugins/copy-content-menu-item/index.js.map +1 -1
  84. package/build/plugins/index.js.map +1 -1
  85. package/build/plugins/keyboard-shortcuts-help-menu-item/index.js +7 -4
  86. package/build/plugins/keyboard-shortcuts-help-menu-item/index.js.map +1 -1
  87. package/build/plugins/welcome-guide-menu-item/index.js.map +1 -1
  88. package/build/store/actions.js +46 -31
  89. package/build/store/actions.js.map +1 -1
  90. package/build/store/constants.js.map +1 -1
  91. package/build/store/index.js +1 -1
  92. package/build/store/index.js.map +1 -1
  93. package/build/store/reducer.js +1 -15
  94. package/build/store/reducer.js.map +1 -1
  95. package/build/store/selectors.js +44 -24
  96. package/build/store/selectors.js.map +1 -1
  97. package/build/utils/meta-boxes.js.map +1 -1
  98. package/build-module/components/browser-url/index.js.map +1 -1
  99. package/build-module/components/editor-initialization/index.js +1 -2
  100. package/build-module/components/editor-initialization/index.js.map +1 -1
  101. package/build-module/components/editor-initialization/listener-hooks.js +2 -38
  102. package/build-module/components/editor-initialization/listener-hooks.js.map +1 -1
  103. package/build-module/components/header/fullscreen-mode-close/index.js.map +1 -1
  104. package/build-module/components/header/header-toolbar/index.native.js.map +1 -1
  105. package/build-module/components/header/index.js +4 -4
  106. package/build-module/components/header/index.js.map +1 -1
  107. package/build-module/components/header/index.native.js +1 -1
  108. package/build-module/components/header/index.native.js.map +1 -1
  109. package/build-module/components/header/main-dashboard-button/index.js.map +1 -1
  110. package/build-module/components/header/more-menu/index.js +5 -4
  111. package/build-module/components/header/more-menu/index.js.map +1 -1
  112. package/build-module/components/header/post-publish-button-or-toggle.js +11 -13
  113. package/build-module/components/header/post-publish-button-or-toggle.js.map +1 -1
  114. package/build-module/components/header/preferences-menu-item/index.js +11 -3
  115. package/build-module/components/header/preferences-menu-item/index.js.map +1 -1
  116. package/build-module/components/header/tools-more-menu-group/index.js.map +1 -1
  117. package/build-module/components/header/writing-menu/index.js.map +1 -1
  118. package/build-module/components/init-pattern-modal/index.js.map +1 -1
  119. package/build-module/components/keyboard-shortcuts/index.js +1 -36
  120. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  121. package/build-module/components/layout/actions-panel.js +4 -5
  122. package/build-module/components/layout/actions-panel.js.map +1 -1
  123. package/build-module/components/layout/index.js +15 -20
  124. package/build-module/components/layout/index.js.map +1 -1
  125. package/build-module/components/layout/index.native.js.map +1 -1
  126. package/build-module/components/meta-boxes/index.js.map +1 -1
  127. package/build-module/components/meta-boxes/meta-box-visibility.js.map +1 -1
  128. package/build-module/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
  129. package/build-module/components/preferences-modal/enable-custom-fields.js.map +1 -1
  130. package/build-module/components/preferences-modal/enable-panel.js.map +1 -1
  131. package/build-module/components/preferences-modal/enable-publish-sidebar.js.map +1 -1
  132. package/build-module/components/preferences-modal/index.js +1 -20
  133. package/build-module/components/preferences-modal/index.js.map +1 -1
  134. package/build-module/components/preferences-modal/meta-boxes-section.js.map +1 -1
  135. package/build-module/components/sidebar/plugin-post-publish-panel/index.js +14 -62
  136. package/build-module/components/sidebar/plugin-post-publish-panel/index.js.map +1 -1
  137. package/build-module/components/sidebar/plugin-pre-publish-panel/index.js +14 -61
  138. package/build-module/components/sidebar/plugin-pre-publish-panel/index.js.map +1 -1
  139. package/build-module/components/sidebar/post-format/index.js.map +1 -1
  140. package/build-module/components/sidebar/post-pending-status/index.js.map +1 -1
  141. package/build-module/components/sidebar/post-slug/index.js.map +1 -1
  142. package/build-module/components/sidebar/post-status/index.js +9 -10
  143. package/build-module/components/sidebar/post-status/index.js.map +1 -1
  144. package/build-module/components/sidebar/post-sticky/index.js.map +1 -1
  145. package/build-module/components/sidebar/post-trash/index.js.map +1 -1
  146. package/build-module/components/sidebar/post-visibility/index.js.map +1 -1
  147. package/build-module/components/sidebar/settings-header/index.js.map +1 -1
  148. package/build-module/components/sidebar/settings-sidebar/index.js +43 -41
  149. package/build-module/components/sidebar/settings-sidebar/index.js.map +1 -1
  150. package/build-module/components/text-editor/index.js.map +1 -1
  151. package/build-module/components/visual-editor/block-inspector-button.js +1 -1
  152. package/build-module/components/visual-editor/block-inspector-button.js.map +1 -1
  153. package/build-module/components/visual-editor/header.native.js.map +1 -1
  154. package/build-module/components/visual-editor/index.js +4 -1
  155. package/build-module/components/visual-editor/index.js.map +1 -1
  156. package/build-module/components/visual-editor/index.native.js.map +1 -1
  157. package/build-module/components/visual-editor/use-padding-appender.js +55 -0
  158. package/build-module/components/visual-editor/use-padding-appender.js.map +1 -0
  159. package/build-module/components/welcome-guide/default.js.map +1 -1
  160. package/build-module/components/welcome-guide/image.js.map +1 -1
  161. package/build-module/components/welcome-guide/index.js.map +1 -1
  162. package/build-module/components/welcome-guide/template.js.map +1 -1
  163. package/build-module/editor.js +9 -4
  164. package/build-module/editor.js.map +1 -1
  165. package/build-module/editor.native.js.map +1 -1
  166. package/build-module/hooks/commands/use-common-commands.js +9 -26
  167. package/build-module/hooks/commands/use-common-commands.js.map +1 -1
  168. package/build-module/hooks/components/index.js.map +1 -1
  169. package/build-module/hooks/index.js.map +1 -1
  170. package/build-module/hooks/use-navigate-to-entity-record.js +37 -20
  171. package/build-module/hooks/use-navigate-to-entity-record.js.map +1 -1
  172. package/build-module/hooks/validate-multiple-use/index.js.map +1 -1
  173. package/build-module/index.js +8 -8
  174. package/build-module/index.js.map +1 -1
  175. package/build-module/index.native.js +2 -4
  176. package/build-module/index.native.js.map +1 -1
  177. package/build-module/lock-unlock.js.map +1 -1
  178. package/build-module/plugins/copy-content-menu-item/index.js.map +1 -1
  179. package/build-module/plugins/index.js.map +1 -1
  180. package/build-module/plugins/keyboard-shortcuts-help-menu-item/index.js +6 -3
  181. package/build-module/plugins/keyboard-shortcuts-help-menu-item/index.js.map +1 -1
  182. package/build-module/plugins/welcome-guide-menu-item/index.js.map +1 -1
  183. package/build-module/store/actions.js +38 -22
  184. package/build-module/store/actions.js.map +1 -1
  185. package/build-module/store/constants.js.map +1 -1
  186. package/build-module/store/index.js.map +1 -1
  187. package/build-module/store/reducer.js +1 -13
  188. package/build-module/store/reducer.js.map +1 -1
  189. package/build-module/store/selectors.js +42 -21
  190. package/build-module/store/selectors.js.map +1 -1
  191. package/build-module/utils/meta-boxes.js.map +1 -1
  192. package/build-style/classic-rtl.css +2 -2
  193. package/build-style/classic.css +2 -2
  194. package/build-style/style-rtl.css +12 -454
  195. package/build-style/style.css +12 -454
  196. package/package.json +32 -34
  197. package/src/classic.scss +2 -1
  198. package/src/components/editor-initialization/index.js +1 -5
  199. package/src/components/editor-initialization/listener-hooks.js +1 -40
  200. package/src/components/editor-initialization/test/listener-hooks.js +1 -96
  201. package/src/components/header/index.js +3 -4
  202. package/src/components/header/index.native.js +1 -1
  203. package/src/components/header/more-menu/index.js +3 -4
  204. package/src/components/header/post-publish-button-or-toggle.js +10 -11
  205. package/src/components/header/preferences-menu-item/index.js +9 -3
  206. package/src/components/header/style.scss +5 -3
  207. package/src/components/header/test/index.js +13 -1
  208. package/src/components/keyboard-shortcuts/index.js +3 -44
  209. package/src/components/layout/actions-panel.js +5 -4
  210. package/src/components/layout/index.js +20 -42
  211. package/src/components/meta-boxes/meta-boxes-area/style.scss +1 -1
  212. package/src/components/preferences-modal/index.js +1 -24
  213. package/src/components/sidebar/plugin-post-publish-panel/index.js +12 -67
  214. package/src/components/sidebar/plugin-pre-publish-panel/index.js +12 -66
  215. package/src/components/sidebar/post-status/index.js +6 -9
  216. package/src/components/sidebar/settings-sidebar/index.js +64 -56
  217. package/src/components/visual-editor/block-inspector-button.js +1 -1
  218. package/src/components/visual-editor/index.js +4 -0
  219. package/src/components/visual-editor/use-padding-appender.js +66 -0
  220. package/src/editor.js +14 -4
  221. package/src/hooks/commands/use-common-commands.js +13 -28
  222. package/src/hooks/use-navigate-to-entity-record.js +37 -24
  223. package/src/index.js +11 -6
  224. package/src/index.native.js +1 -4
  225. package/src/plugins/keyboard-shortcuts-help-menu-item/index.js +5 -3
  226. package/src/store/actions.js +37 -24
  227. package/src/store/reducer.js +0 -13
  228. package/src/store/selectors.js +52 -36
  229. package/src/store/test/actions.js +11 -10
  230. package/src/style.scss +1 -20
  231. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js +0 -107
  232. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +0 -1
  233. package/build/components/header/plugin-more-menu-item/index.js +0 -78
  234. package/build/components/header/plugin-more-menu-item/index.js.map +0 -1
  235. package/build/components/header/plugin-sidebar-more-menu-item/index.js +0 -71
  236. package/build/components/header/plugin-sidebar-more-menu-item/index.js.map +0 -1
  237. package/build/components/keyboard-shortcut-help-modal/config.js +0 -78
  238. package/build/components/keyboard-shortcut-help-modal/config.js.map +0 -1
  239. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -49
  240. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +0 -1
  241. package/build/components/keyboard-shortcut-help-modal/index.js +0 -129
  242. package/build/components/keyboard-shortcut-help-modal/index.js.map +0 -1
  243. package/build/components/keyboard-shortcut-help-modal/shortcut.js +0 -55
  244. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +0 -1
  245. package/build/components/sidebar/plugin-post-status-info/index.js +0 -73
  246. package/build/components/sidebar/plugin-post-status-info/index.js.map +0 -1
  247. package/build/components/sidebar/plugin-sidebar/index.js +0 -104
  248. package/build/components/sidebar/plugin-sidebar/index.js.map +0 -1
  249. package/build/components/sidebar/template-summary/index.js +0 -36
  250. package/build/components/sidebar/template-summary/index.js.map +0 -1
  251. package/build/components/start-page-options/index.js +0 -107
  252. package/build/components/start-page-options/index.js.map +0 -1
  253. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js +0 -100
  254. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +0 -1
  255. package/build-module/components/header/plugin-more-menu-item/index.js +0 -73
  256. package/build-module/components/header/plugin-more-menu-item/index.js.map +0 -1
  257. package/build-module/components/header/plugin-sidebar-more-menu-item/index.js +0 -65
  258. package/build-module/components/header/plugin-sidebar-more-menu-item/index.js.map +0 -1
  259. package/build-module/components/keyboard-shortcut-help-modal/config.js +0 -71
  260. package/build-module/components/keyboard-shortcut-help-modal/config.js.map +0 -1
  261. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -41
  262. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +0 -1
  263. package/build-module/components/keyboard-shortcut-help-modal/index.js +0 -119
  264. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +0 -1
  265. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +0 -48
  266. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +0 -1
  267. package/build-module/components/sidebar/plugin-post-status-info/index.js +0 -66
  268. package/build-module/components/sidebar/plugin-post-status-info/index.js.map +0 -1
  269. package/build-module/components/sidebar/plugin-sidebar/index.js +0 -98
  270. package/build-module/components/sidebar/plugin-sidebar/index.js.map +0 -1
  271. package/build-module/components/sidebar/template-summary/index.js +0 -29
  272. package/build-module/components/sidebar/template-summary/index.js.map +0 -1
  273. package/build-module/components/start-page-options/index.js +0 -100
  274. package/build-module/components/start-page-options/index.js.map +0 -1
  275. package/src/components/block-settings-menu/plugin-block-settings-menu-item.js +0 -108
  276. package/src/components/header/plugin-more-menu-item/index.js +0 -73
  277. package/src/components/header/plugin-sidebar-more-menu-item/index.js +0 -64
  278. package/src/components/keyboard-shortcut-help-modal/config.js +0 -53
  279. package/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -43
  280. package/src/components/keyboard-shortcut-help-modal/index.js +0 -159
  281. package/src/components/keyboard-shortcut-help-modal/shortcut.js +0 -67
  282. package/src/components/keyboard-shortcut-help-modal/style.scss +0 -61
  283. package/src/components/keyboard-shortcut-help-modal/test/index.js +0 -36
  284. package/src/components/sidebar/plugin-post-publish-panel/test/__snapshots__/index.js.snap +0 -39
  285. package/src/components/sidebar/plugin-post-publish-panel/test/index.js +0 -33
  286. package/src/components/sidebar/plugin-post-status-info/index.js +0 -63
  287. package/src/components/sidebar/plugin-post-status-info/test/__snapshots__/index.js.snap +0 -11
  288. package/src/components/sidebar/plugin-post-status-info/test/index.js +0 -29
  289. package/src/components/sidebar/plugin-pre-publish-panel/test/index.js +0 -33
  290. package/src/components/sidebar/plugin-sidebar/index.js +0 -94
  291. package/src/components/sidebar/template-summary/index.js +0 -37
  292. package/src/components/sidebar/template-summary/style.scss +0 -5
  293. package/src/components/start-page-options/index.js +0 -108
  294. package/src/components/start-page-options/style.scss +0 -26
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_data","_editor","_preferences","_enableCustomFields","_interopRequireDefault","_enablePanel","_store","_lockUnlock","PreferencesModalSection","unlock","preferencesPrivateApis","MetaBoxesSection","areCustomFieldsRegistered","metaBoxes","sectionProps","thirdPartyMetaBoxes","filter","id","length","_react","createElement","default","label","__","map","title","key","panelName","_default","exports","withSelect","select","getEditorSettings","editorStore","getAllMetaBoxes","editPostStore","enableCustomFields","undefined"],"sources":["@wordpress/edit-post/src/components/preferences-modal/meta-boxes-section.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { withSelect } from '@wordpress/data';\nimport { store as editorStore } from '@wordpress/editor';\nimport { privateApis as preferencesPrivateApis } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport EnableCustomFieldsOption from './enable-custom-fields';\nimport EnablePanelOption from './enable-panel';\nimport { store as editPostStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { PreferencesModalSection } = unlock( preferencesPrivateApis );\n\nexport function MetaBoxesSection( {\n\tareCustomFieldsRegistered,\n\tmetaBoxes,\n\t...sectionProps\n} ) {\n\t// The 'Custom Fields' meta box is a special case that we handle separately.\n\tconst thirdPartyMetaBoxes = metaBoxes.filter(\n\t\t( { id } ) => id !== 'postcustom'\n\t);\n\n\tif ( ! areCustomFieldsRegistered && thirdPartyMetaBoxes.length === 0 ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PreferencesModalSection { ...sectionProps }>\n\t\t\t{ areCustomFieldsRegistered && (\n\t\t\t\t<EnableCustomFieldsOption label={ __( 'Custom fields' ) } />\n\t\t\t) }\n\t\t\t{ thirdPartyMetaBoxes.map( ( { id, title } ) => (\n\t\t\t\t<EnablePanelOption\n\t\t\t\t\tkey={ id }\n\t\t\t\t\tlabel={ title }\n\t\t\t\t\tpanelName={ `meta-box-${ id }` }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</PreferencesModalSection>\n\t);\n}\n\nexport default withSelect( ( select ) => {\n\tconst { getEditorSettings } = select( editorStore );\n\tconst { getAllMetaBoxes } = select( editPostStore );\n\n\treturn {\n\t\t// This setting should not live in the block editor's store.\n\t\tareCustomFieldsRegistered:\n\t\t\tgetEditorSettings().enableCustomFields !== undefined,\n\t\tmetaBoxes: getAllMetaBoxes(),\n\t};\n} )( MetaBoxesSection );\n"],"mappings":";;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAKA,IAAAI,mBAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,YAAA,GAAAD,sBAAA,CAAAL,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AAdA;AACA;AACA;;AAMA;AACA;AACA;;AAMA,MAAM;EAAES;AAAwB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAE7D,SAASC,gBAAgBA,CAAE;EACjCC,yBAAyB;EACzBC,SAAS;EACT,GAAGC;AACJ,CAAC,EAAG;EACH;EACA,MAAMC,mBAAmB,GAAGF,SAAS,CAACG,MAAM,CAC3C,CAAE;IAAEC;EAAG,CAAC,KAAMA,EAAE,KAAK,YACtB,CAAC;EAED,IAAK,CAAEL,yBAAyB,IAAIG,mBAAmB,CAACG,MAAM,KAAK,CAAC,EAAG;IACtE,OAAO,IAAI;EACZ;EAEA,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACZ,uBAAuB;IAAA,GAAMM;EAAY,GACvCF,yBAAyB,IAC1B,IAAAO,MAAA,CAAAC,aAAA,EAACjB,mBAAA,CAAAkB,OAAwB;IAACC,KAAK,EAAG,IAAAC,QAAE,EAAE,eAAgB;EAAG,CAAE,CAC3D,EACCR,mBAAmB,CAACS,GAAG,CAAE,CAAE;IAAEP,EAAE;IAAEQ;EAAM,CAAC,KACzC,IAAAN,MAAA,CAAAC,aAAA,EAACf,YAAA,CAAAgB,OAAiB;IACjBK,GAAG,EAAGT,EAAI;IACVK,KAAK,EAAGG,KAAO;IACfE,SAAS,EAAI,YAAYV,EAAI;EAAG,CAChC,CACA,CACsB,CAAC;AAE5B;AAAC,IAAAW,QAAA,GAAAC,OAAA,CAAAR,OAAA,GAEc,IAAAS,gBAAU,EAAIC,MAAM,IAAM;EACxC,MAAM;IAAEC;EAAkB,CAAC,GAAGD,MAAM,CAAEE,aAAY,CAAC;EACnD,MAAM;IAAEC;EAAgB,CAAC,GAAGH,MAAM,CAAEI,YAAc,CAAC;EAEnD,OAAO;IACN;IACAvB,yBAAyB,EACxBoB,iBAAiB,CAAC,CAAC,CAACI,kBAAkB,KAAKC,SAAS;IACrDxB,SAAS,EAAEqB,eAAe,CAAC;EAC5B,CAAC;AACF,CAAE,CAAC,CAAEvB,gBAAiB,CAAC"}
1
+ {"version":3,"names":["_i18n","require","_data","_editor","_preferences","_enableCustomFields","_interopRequireDefault","_enablePanel","_store","_lockUnlock","PreferencesModalSection","unlock","preferencesPrivateApis","MetaBoxesSection","areCustomFieldsRegistered","metaBoxes","sectionProps","thirdPartyMetaBoxes","filter","id","length","_react","createElement","default","label","__","map","title","key","panelName","_default","exports","withSelect","select","getEditorSettings","editorStore","getAllMetaBoxes","editPostStore","enableCustomFields","undefined"],"sources":["@wordpress/edit-post/src/components/preferences-modal/meta-boxes-section.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { withSelect } from '@wordpress/data';\nimport { store as editorStore } from '@wordpress/editor';\nimport { privateApis as preferencesPrivateApis } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport EnableCustomFieldsOption from './enable-custom-fields';\nimport EnablePanelOption from './enable-panel';\nimport { store as editPostStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { PreferencesModalSection } = unlock( preferencesPrivateApis );\n\nexport function MetaBoxesSection( {\n\tareCustomFieldsRegistered,\n\tmetaBoxes,\n\t...sectionProps\n} ) {\n\t// The 'Custom Fields' meta box is a special case that we handle separately.\n\tconst thirdPartyMetaBoxes = metaBoxes.filter(\n\t\t( { id } ) => id !== 'postcustom'\n\t);\n\n\tif ( ! areCustomFieldsRegistered && thirdPartyMetaBoxes.length === 0 ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PreferencesModalSection { ...sectionProps }>\n\t\t\t{ areCustomFieldsRegistered && (\n\t\t\t\t<EnableCustomFieldsOption label={ __( 'Custom fields' ) } />\n\t\t\t) }\n\t\t\t{ thirdPartyMetaBoxes.map( ( { id, title } ) => (\n\t\t\t\t<EnablePanelOption\n\t\t\t\t\tkey={ id }\n\t\t\t\t\tlabel={ title }\n\t\t\t\t\tpanelName={ `meta-box-${ id }` }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</PreferencesModalSection>\n\t);\n}\n\nexport default withSelect( ( select ) => {\n\tconst { getEditorSettings } = select( editorStore );\n\tconst { getAllMetaBoxes } = select( editPostStore );\n\n\treturn {\n\t\t// This setting should not live in the block editor's store.\n\t\tareCustomFieldsRegistered:\n\t\t\tgetEditorSettings().enableCustomFields !== undefined,\n\t\tmetaBoxes: getAllMetaBoxes(),\n\t};\n} )( MetaBoxesSection );\n"],"mappings":";;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAKA,IAAAI,mBAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,YAAA,GAAAD,sBAAA,CAAAL,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AAdA;AACA;AACA;;AAMA;AACA;AACA;;AAMA,MAAM;EAAES;AAAwB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAE7D,SAASC,gBAAgBA,CAAE;EACjCC,yBAAyB;EACzBC,SAAS;EACT,GAAGC;AACJ,CAAC,EAAG;EACH;EACA,MAAMC,mBAAmB,GAAGF,SAAS,CAACG,MAAM,CAC3C,CAAE;IAAEC;EAAG,CAAC,KAAMA,EAAE,KAAK,YACtB,CAAC;EAED,IAAK,CAAEL,yBAAyB,IAAIG,mBAAmB,CAACG,MAAM,KAAK,CAAC,EAAG;IACtE,OAAO,IAAI;EACZ;EAEA,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACZ,uBAAuB;IAAA,GAAMM;EAAY,GACvCF,yBAAyB,IAC1B,IAAAO,MAAA,CAAAC,aAAA,EAACjB,mBAAA,CAAAkB,OAAwB;IAACC,KAAK,EAAG,IAAAC,QAAE,EAAE,eAAgB;EAAG,CAAE,CAC3D,EACCR,mBAAmB,CAACS,GAAG,CAAE,CAAE;IAAEP,EAAE;IAAEQ;EAAM,CAAC,KACzC,IAAAN,MAAA,CAAAC,aAAA,EAACf,YAAA,CAAAgB,OAAiB;IACjBK,GAAG,EAAGT,EAAI;IACVK,KAAK,EAAGG,KAAO;IACfE,SAAS,EAAI,YAAYV,EAAI;EAAG,CAChC,CACA,CACsB,CAAC;AAE5B;AAAC,IAAAW,QAAA,GAAAC,OAAA,CAAAR,OAAA,GAEc,IAAAS,gBAAU,EAAIC,MAAM,IAAM;EACxC,MAAM;IAAEC;EAAkB,CAAC,GAAGD,MAAM,CAAEE,aAAY,CAAC;EACnD,MAAM;IAAEC;EAAgB,CAAC,GAAGH,MAAM,CAAEI,YAAc,CAAC;EAEnD,OAAO;IACN;IACAvB,yBAAyB,EACxBoB,iBAAiB,CAAC,CAAC,CAACI,kBAAkB,KAAKC,SAAS;IACrDxB,SAAS,EAAEqB,eAAe,CAAC;EAC5B,CAAC;AACF,CAAE,CAAC,CAAEvB,gBAAiB,CAAC","ignoreList":[]}
@@ -1,87 +1,39 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
- exports.default = void 0;
7
+ exports.default = EditPostPluginPostPublishPanel;
7
8
  var _react = require("react");
8
- var _plugins = require("@wordpress/plugins");
9
- var _components = require("@wordpress/components");
9
+ var _deprecated = _interopRequireDefault(require("@wordpress/deprecated"));
10
+ var _editor = require("@wordpress/editor");
10
11
  /**
11
12
  * WordPress dependencies
12
13
  */
13
14
 
14
- const {
15
- Fill,
16
- Slot
17
- } = (0, _components.createSlotFill)('PluginPostPublishPanel');
18
-
19
15
  /**
20
16
  * Renders provided content to the post-publish panel in the publish flow
21
17
  * (side panel that opens after a user publishes the post).
22
18
  *
19
+ * @deprecated since 6.6, use `wp.editor.PluginPostPublishPanel` instead.
20
+ *
23
21
  * @param {Object} props Component properties.
24
22
  * @param {string} [props.className] An optional class name added to the panel.
25
23
  * @param {string} [props.title] Title displayed at the top of the panel.
26
24
  * @param {boolean} [props.initialOpen=false] Whether to have the panel initially opened. When no title is provided it is always opened.
27
25
  * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.
28
26
  * @param {Element} props.children Children to be rendered
29
- *
30
- * @example
31
- * ```js
32
- * // Using ES5 syntax
33
- * var __ = wp.i18n.__;
34
- * var PluginPostPublishPanel = wp.editPost.PluginPostPublishPanel;
35
- *
36
- * function MyPluginPostPublishPanel() {
37
- * return React.createElement(
38
- * PluginPostPublishPanel,
39
- * {
40
- * className: 'my-plugin-post-publish-panel',
41
- * title: __( 'My panel title' ),
42
- * initialOpen: true,
43
- * },
44
- * __( 'My panel content' )
45
- * );
46
- * }
47
- * ```
48
- *
49
- * @example
50
- * ```jsx
51
- * // Using ESNext syntax
52
- * import { __ } from '@wordpress/i18n';
53
- * import { PluginPostPublishPanel } from '@wordpress/edit-post';
54
- *
55
- * const MyPluginPostPublishPanel = () => (
56
- * <PluginPostPublishPanel
57
- * className="my-plugin-post-publish-panel"
58
- * title={ __( 'My panel title' ) }
59
- * initialOpen={ true }
60
- * >
61
- * { __( 'My panel content' ) }
62
- * </PluginPostPublishPanel>
63
- * );
64
- * ```
65
- *
66
27
  * @return {Component} The component to be rendered.
67
28
  */
68
- const PluginPostPublishPanel = ({
69
- children,
70
- className,
71
- title,
72
- initialOpen = false,
73
- icon
74
- }) => {
75
- const {
76
- icon: pluginIcon
77
- } = (0, _plugins.usePluginContext)();
78
- return (0, _react.createElement)(Fill, null, (0, _react.createElement)(_components.PanelBody, {
79
- className: className,
80
- initialOpen: initialOpen || !title,
81
- title: title,
82
- icon: icon !== null && icon !== void 0 ? icon : pluginIcon
83
- }, children));
84
- };
85
- PluginPostPublishPanel.Slot = Slot;
86
- var _default = exports.default = PluginPostPublishPanel;
29
+ function EditPostPluginPostPublishPanel(props) {
30
+ (0, _deprecated.default)('wp.editPost.PluginPostPublishPanel', {
31
+ since: '6.6',
32
+ version: '6.8',
33
+ alternative: 'wp.editor.PluginPostPublishPanel'
34
+ });
35
+ return (0, _react.createElement)(_editor.PluginPostPublishPanel, {
36
+ ...props
37
+ });
38
+ }
87
39
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_plugins","require","_components","Fill","Slot","createSlotFill","PluginPostPublishPanel","children","className","title","initialOpen","icon","pluginIcon","usePluginContext","_react","createElement","PanelBody","_default","exports","default"],"sources":["@wordpress/edit-post/src/components/sidebar/plugin-post-publish-panel/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { usePluginContext } from '@wordpress/plugins';\nimport { createSlotFill, PanelBody } from '@wordpress/components';\n\nconst { Fill, Slot } = createSlotFill( 'PluginPostPublishPanel' );\n\n/**\n * Renders provided content to the post-publish panel in the publish flow\n * (side panel that opens after a user publishes the post).\n *\n * @param {Object} props Component properties.\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. 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/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.\n * @param {Element} props.children Children to be rendered\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var PluginPostPublishPanel = wp.editPost.PluginPostPublishPanel;\n *\n * function MyPluginPostPublishPanel() {\n * \treturn React.createElement(\n * \t\tPluginPostPublishPanel,\n * \t\t{\n * \t\t\tclassName: 'my-plugin-post-publish-panel',\n * \t\t\ttitle: __( 'My panel title' ),\n * \t\t\tinitialOpen: true,\n * \t\t},\n * \t\t__( 'My panel content' )\n * \t);\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PluginPostPublishPanel } from '@wordpress/edit-post';\n *\n * const MyPluginPostPublishPanel = () => (\n * \t<PluginPostPublishPanel\n * \t\tclassName=\"my-plugin-post-publish-panel\"\n * \t\ttitle={ __( 'My panel title' ) }\n * \t\tinitialOpen={ true }\n * \t>\n * { __( 'My panel content' ) }\n * \t</PluginPostPublishPanel>\n * );\n * ```\n *\n * @return {Component} The component to be rendered.\n */\nconst PluginPostPublishPanel = ( {\n\tchildren,\n\tclassName,\n\ttitle,\n\tinitialOpen = false,\n\ticon,\n} ) => {\n\tconst { icon: pluginIcon } = usePluginContext();\n\n\treturn (\n\t\t<Fill>\n\t\t\t<PanelBody\n\t\t\t\tclassName={ className }\n\t\t\t\tinitialOpen={ initialOpen || ! title }\n\t\t\t\ttitle={ title }\n\t\t\t\ticon={ icon ?? pluginIcon }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</PanelBody>\n\t\t</Fill>\n\t);\n};\n\nPluginPostPublishPanel.Slot = Slot;\n\nexport default PluginPostPublishPanel;\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAIA,MAAM;EAAEE,IAAI;EAAEC;AAAK,CAAC,GAAG,IAAAC,0BAAc,EAAE,wBAAyB,CAAC;;AAEjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,sBAAsB,GAAGA,CAAE;EAChCC,QAAQ;EACRC,SAAS;EACTC,KAAK;EACLC,WAAW,GAAG,KAAK;EACnBC;AACD,CAAC,KAAM;EACN,MAAM;IAAEA,IAAI,EAAEC;EAAW,CAAC,GAAG,IAAAC,yBAAgB,EAAC,CAAC;EAE/C,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACZ,IAAI,QACJ,IAAAW,MAAA,CAAAC,aAAA,EAACb,WAAA,CAAAc,SAAS;IACTR,SAAS,EAAGA,SAAW;IACvBE,WAAW,EAAGA,WAAW,IAAI,CAAED,KAAO;IACtCA,KAAK,EAAGA,KAAO;IACfE,IAAI,EAAGA,IAAI,aAAJA,IAAI,cAAJA,IAAI,GAAIC;EAAY,GAEzBL,QACQ,CACN,CAAC;AAET,CAAC;AAEDD,sBAAsB,CAACF,IAAI,GAAGA,IAAI;AAAC,IAAAa,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEpBb,sBAAsB"}
1
+ {"version":3,"names":["_deprecated","_interopRequireDefault","require","_editor","EditPostPluginPostPublishPanel","props","deprecated","since","version","alternative","_react","createElement","PluginPostPublishPanel"],"sources":["@wordpress/edit-post/src/components/sidebar/plugin-post-publish-panel/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { PluginPostPublishPanel } from '@wordpress/editor';\n\n/**\n * Renders provided content to the post-publish panel in the publish flow\n * (side panel that opens after a user publishes the post).\n *\n * @deprecated since 6.6, use `wp.editor.PluginPostPublishPanel` instead.\n *\n * @param {Object} props Component properties.\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. 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/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.\n * @param {Element} props.children Children to be rendered\n * @return {Component} The component to be rendered.\n */\nexport default function EditPostPluginPostPublishPanel( props ) {\n\tdeprecated( 'wp.editPost.PluginPostPublishPanel', {\n\t\tsince: '6.6',\n\t\tversion: '6.8',\n\t\talternative: 'wp.editor.PluginPostPublishPanel',\n\t} );\n\treturn <PluginPostPublishPanel { ...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;AACe,SAASE,8BAA8BA,CAAEC,KAAK,EAAG;EAC/D,IAAAC,mBAAU,EAAE,oCAAoC,EAAE;IACjDC,KAAK,EAAE,KAAK;IACZC,OAAO,EAAE,KAAK;IACdC,WAAW,EAAE;EACd,CAAE,CAAC;EACH,OAAO,IAAAC,MAAA,CAAAC,aAAA,EAACR,OAAA,CAAAS,sBAAsB;IAAA,GAAMP;EAAK,CAAI,CAAC;AAC/C","ignoreList":[]}
@@ -1,25 +1,23 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
- exports.default = void 0;
7
+ exports.default = EditPostPluginPrePublishPanel;
7
8
  var _react = require("react");
8
- var _components = require("@wordpress/components");
9
- var _plugins = require("@wordpress/plugins");
9
+ var _deprecated = _interopRequireDefault(require("@wordpress/deprecated"));
10
+ var _editor = require("@wordpress/editor");
10
11
  /**
11
12
  * WordPress dependencies
12
13
  */
13
14
 
14
- const {
15
- Fill,
16
- Slot
17
- } = (0, _components.createSlotFill)('PluginPrePublishPanel');
18
-
19
15
  /**
20
16
  * Renders provided content to the pre-publish side panel in the publish flow
21
17
  * (side panel that opens when a user first pushes "Publish" from the main editor).
22
18
  *
19
+ * @deprecated since 6.6, use `wp.editor.PluginPrePublishPanel` instead.
20
+ *
23
21
  * @param {Object} props Component props.
24
22
  * @param {string} [props.className] An optional class name added to the panel.
25
23
  * @param {string} [props.title] Title displayed at the top of the panel.
@@ -30,61 +28,16 @@ const {
30
28
  * the sidebar is pinned to toolbar.
31
29
  * @param {Element} props.children Children to be rendered
32
30
  *
33
- * @example
34
- * ```js
35
- * // Using ES5 syntax
36
- * var __ = wp.i18n.__;
37
- * var PluginPrePublishPanel = wp.editPost.PluginPrePublishPanel;
38
- *
39
- * function MyPluginPrePublishPanel() {
40
- * return React.createElement(
41
- * PluginPrePublishPanel,
42
- * {
43
- * className: 'my-plugin-pre-publish-panel',
44
- * title: __( 'My panel title' ),
45
- * initialOpen: true,
46
- * },
47
- * __( 'My panel content' )
48
- * );
49
- * }
50
- * ```
51
- *
52
- * @example
53
- * ```jsx
54
- * // Using ESNext syntax
55
- * import { __ } from '@wordpress/i18n';
56
- * import { PluginPrePublishPanel } from '@wordpress/edit-post';
57
- *
58
- * const MyPluginPrePublishPanel = () => (
59
- * <PluginPrePublishPanel
60
- * className="my-plugin-pre-publish-panel"
61
- * title={ __( 'My panel title' ) }
62
- * initialOpen={ true }
63
- * >
64
- * { __( 'My panel content' ) }
65
- * </PluginPrePublishPanel>
66
- * );
67
- * ```
68
- *
69
31
  * @return {Component} The component to be rendered.
70
32
  */
71
- const PluginPrePublishPanel = ({
72
- children,
73
- className,
74
- title,
75
- initialOpen = false,
76
- icon
77
- }) => {
78
- const {
79
- icon: pluginIcon
80
- } = (0, _plugins.usePluginContext)();
81
- return (0, _react.createElement)(Fill, null, (0, _react.createElement)(_components.PanelBody, {
82
- className: className,
83
- initialOpen: initialOpen || !title,
84
- title: title,
85
- icon: icon !== null && icon !== void 0 ? icon : pluginIcon
86
- }, children));
87
- };
88
- PluginPrePublishPanel.Slot = Slot;
89
- var _default = exports.default = PluginPrePublishPanel;
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
+ }
90
43
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_plugins","Fill","Slot","createSlotFill","PluginPrePublishPanel","children","className","title","initialOpen","icon","pluginIcon","usePluginContext","_react","createElement","PanelBody","_default","exports","default"],"sources":["@wordpress/edit-post/src/components/sidebar/plugin-pre-publish-panel/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createSlotFill, PanelBody } from '@wordpress/components';\nimport { usePluginContext } from '@wordpress/plugins';\n\nconst { Fill, Slot } = createSlotFill( 'PluginPrePublishPanel' );\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 * @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 * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var PluginPrePublishPanel = wp.editPost.PluginPrePublishPanel;\n *\n * function MyPluginPrePublishPanel() {\n * \treturn React.createElement(\n * \t\tPluginPrePublishPanel,\n * \t\t{\n * \t\t\tclassName: 'my-plugin-pre-publish-panel',\n * \t\t\ttitle: __( 'My panel title' ),\n * \t\t\tinitialOpen: true,\n * \t\t},\n * \t\t__( 'My panel content' )\n * \t);\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PluginPrePublishPanel } from '@wordpress/edit-post';\n *\n * const MyPluginPrePublishPanel = () => (\n * \t<PluginPrePublishPanel\n * \t\tclassName=\"my-plugin-pre-publish-panel\"\n * \t\ttitle={ __( 'My panel title' ) }\n * \t\tinitialOpen={ true }\n * \t>\n * \t { __( 'My panel content' ) }\n * \t</PluginPrePublishPanel>\n * );\n * ```\n *\n * @return {Component} The component to be rendered.\n */\nconst PluginPrePublishPanel = ( {\n\tchildren,\n\tclassName,\n\ttitle,\n\tinitialOpen = false,\n\ticon,\n} ) => {\n\tconst { icon: pluginIcon } = usePluginContext();\n\n\treturn (\n\t\t<Fill>\n\t\t\t<PanelBody\n\t\t\t\tclassName={ className }\n\t\t\t\tinitialOpen={ initialOpen || ! title }\n\t\t\t\ttitle={ title }\n\t\t\t\ticon={ icon ?? pluginIcon }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</PanelBody>\n\t\t</Fill>\n\t);\n};\n\nPluginPrePublishPanel.Slot = Slot;\n\nexport default PluginPrePublishPanel;\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAIA,MAAM;EAAEE,IAAI;EAAEC;AAAK,CAAC,GAAG,IAAAC,0BAAc,EAAE,uBAAwB,CAAC;;AAEhE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,qBAAqB,GAAGA,CAAE;EAC/BC,QAAQ;EACRC,SAAS;EACTC,KAAK;EACLC,WAAW,GAAG,KAAK;EACnBC;AACD,CAAC,KAAM;EACN,MAAM;IAAEA,IAAI,EAAEC;EAAW,CAAC,GAAG,IAAAC,yBAAgB,EAAC,CAAC;EAE/C,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACZ,IAAI,QACJ,IAAAW,MAAA,CAAAC,aAAA,EAACf,WAAA,CAAAgB,SAAS;IACTR,SAAS,EAAGA,SAAW;IACvBE,WAAW,EAAGA,WAAW,IAAI,CAAED,KAAO;IACtCA,KAAK,EAAGA,KAAO;IACfE,IAAI,EAAGA,IAAI,aAAJA,IAAI,cAAJA,IAAI,GAAIC;EAAY,GAEzBL,QACQ,CACN,CAAC;AAET,CAAC;AAEDD,qBAAqB,CAACF,IAAI,GAAGA,IAAI;AAAC,IAAAa,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEnBb,qBAAqB"}
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 +1 @@
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"}
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 +1 @@
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"}
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 +1 @@
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"}
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":[]}
@@ -10,13 +10,11 @@ var _i18n = require("@wordpress/i18n");
10
10
  var _components = require("@wordpress/components");
11
11
  var _data = require("@wordpress/data");
12
12
  var _editor = require("@wordpress/editor");
13
- var _postVisibility = _interopRequireDefault(require("../post-visibility"));
14
13
  var _postTrash = _interopRequireDefault(require("../post-trash"));
15
14
  var _postSticky = _interopRequireDefault(require("../post-sticky"));
16
15
  var _postSlug = _interopRequireDefault(require("../post-slug"));
17
16
  var _postFormat = _interopRequireDefault(require("../post-format"));
18
- var _postPendingStatus = _interopRequireDefault(require("../post-pending-status"));
19
- var _pluginPostStatusInfo = _interopRequireDefault(require("../plugin-post-status-info"));
17
+ var _lockUnlock = require("../../../lock-unlock");
20
18
  /**
21
19
  * WordPress dependencies
22
20
  */
@@ -25,6 +23,10 @@ var _pluginPostStatusInfo = _interopRequireDefault(require("../plugin-post-statu
25
23
  * Internal dependencies
26
24
  */
27
25
 
26
+ const {
27
+ PostStatus: PostStatusPanel
28
+ } = (0, _lockUnlock.unlock)(_editor.privateApis);
29
+
28
30
  /**
29
31
  * Module Constants
30
32
  */
@@ -56,14 +58,12 @@ function PostStatus() {
56
58
  title: (0, _i18n.__)('Summary'),
57
59
  opened: isOpened,
58
60
  onToggle: () => toggleEditorPanelOpened(PANEL_NAME)
59
- }, (0, _react.createElement)(_pluginPostStatusInfo.default.Slot, null, fills => (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_editor.PostFeaturedImagePanel, {
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, {
60
62
  withPanelBody: false
61
- }), (0, _react.createElement)(_postVisibility.default, null), (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)(_postPendingStatus.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, {
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, {
62
64
  style: {
63
65
  marginTop: '16px'
64
- },
65
- spacing: 4,
66
- wrap: true
67
- }, (0, _react.createElement)(_editor.PostSwitchToDraftButton, null), (0, _react.createElement)(_postTrash.default, null)))));
66
+ }
67
+ }, (0, _react.createElement)(_postTrash.default, null)))));
68
68
  }
69
69
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_components","_data","_editor","_postVisibility","_interopRequireDefault","_postTrash","_postSticky","_postSlug","_postFormat","_postPendingStatus","_pluginPostStatusInfo","PANEL_NAME","PostStatus","isOpened","isRemoved","useSelect","select","isEditorPanelRemoved","isEditorPanelOpened","editorStore","toggleEditorPanelOpened","useDispatch","_react","createElement","PanelBody","className","title","__","opened","onToggle","default","Slot","fills","Fragment","PostFeaturedImagePanel","withPanelBody","PostSchedulePanel","PostTemplatePanel","PostURLPanel","PostSyncStatus","PostAuthorPanel","__experimentalHStack","style","marginTop","spacing","wrap","PostSwitchToDraftButton"],"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\tPostAuthorPanel,\n\tPostSchedulePanel,\n\tPostSwitchToDraftButton,\n\tPostSyncStatus,\n\tPostURLPanel,\n\tPostTemplatePanel,\n\tPostFeaturedImagePanel,\n\tstore as editorStore,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport PostVisibility from '../post-visibility';\nimport PostTrash from '../post-trash';\nimport PostSticky from '../post-sticky';\nimport PostSlug from '../post-slug';\nimport PostFormat from '../post-format';\nimport PostPendingStatus from '../post-pending-status';\nimport PluginPostStatusInfo from '../plugin-post-status-info';\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<PostFeaturedImagePanel withPanelBody={ false } />\n\t\t\t\t\t\t<PostVisibility />\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<PostPendingStatus />\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\tspacing={ 4 }\n\t\t\t\t\t\t\twrap\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<PostSwitchToDraftButton />\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":"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"}
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":"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","ignoreList":[]}
@@ -1 +1 @@
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"}
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 +1 @@
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"}
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 +1 @@
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,IAAAC,QAAE,EAAE,YAAa,CAAG;MAC5BC,GAAG,EAAGb;IAAkB,GAEtB,CAAEU,OAAO,IACV,IAAAJ,MAAA,CAAAC,aAAA,gBACC,IAAAD,MAAA,CAAAC,aAAA,EAACf,OAAA,CAAAsB,mBAAmB,MAAE,CACjB,CACN,EACCJ,OAAO,IACR,IAAAJ,MAAA,CAAAC,aAAA,EAAChB,WAAA,CAAAwB,QAAQ;MACRC,gBAAgB,EAAC,mCAAmC;MACpDd,YAAY,EAAGA,YAAc;MAC7Be,YAAY;MACZC,YAAY,EAAGA,CAAE;QAAEC,MAAM;QAAEC;MAAS,CAAC,KACpC,IAAAd,MAAA,CAAAC,aAAA,EAACc,oBAAoB;QACpBF,MAAM,EAAGA,MAAQ;QACjBG,OAAO,EAAGF;MAAU,CACpB,CACC;MACHG,aAAa,EAAGA,CAAE;QAAEC;MAAQ,CAAC,KAC5B,IAAAlB,MAAA,CAAAC,aAAA,EAACf,OAAA,CAAAM,cAAkB;QAAC0B,OAAO,EAAGA;MAAS,CAAE;IACvC,CACH,CAEW;EACZ,CACH,CAAC;AAEJ;AAEA,SAASH,oBAAoBA,CAAE;EAAEF,MAAM;EAAEG;AAAQ,CAAC,EAAG;EACpD,MAAMX,KAAK,GAAG,IAAAc,8BAAsB,EAAC,CAAC;EACtC,OACC,IAAAnB,MAAA,CAAAC,aAAA,EAAChB,WAAA,CAAAmC,MAAM;IACNC,qBAAqB;IACrBC,SAAS,EAAC,mCAAmC;IAC7CC,OAAO,EAAC,UAAU;IAClB,iBAAgBV;IAChB;IAAA;IACA,cAAa,IAAAW,aAAO,EAAE,IAAAlB,QAAE,EAAE,uBAAwB,CAAC,EAAED,KAAM,CAAG;IAC9DW,OAAO,EAAGA;EAAS,GAEjBX,KACK,CAAC;AAEX;AAAC,IAAAoB,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcnC,cAAc"}
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,IAAAC,QAAE,EAAE,YAAa,CAAG;MAC5BC,GAAG,EAAGb;IAAkB,GAEtB,CAAEU,OAAO,IACV,IAAAJ,MAAA,CAAAC,aAAA,gBACC,IAAAD,MAAA,CAAAC,aAAA,EAACf,OAAA,CAAAsB,mBAAmB,MAAE,CACjB,CACN,EACCJ,OAAO,IACR,IAAAJ,MAAA,CAAAC,aAAA,EAAChB,WAAA,CAAAwB,QAAQ;MACRC,gBAAgB,EAAC,mCAAmC;MACpDd,YAAY,EAAGA,YAAc;MAC7Be,YAAY;MACZC,YAAY,EAAGA,CAAE;QAAEC,MAAM;QAAEC;MAAS,CAAC,KACpC,IAAAd,MAAA,CAAAC,aAAA,EAACc,oBAAoB;QACpBF,MAAM,EAAGA,MAAQ;QACjBG,OAAO,EAAGF;MAAU,CACpB,CACC;MACHG,aAAa,EAAGA,CAAE;QAAEC;MAAQ,CAAC,KAC5B,IAAAlB,MAAA,CAAAC,aAAA,EAACf,OAAA,CAAAM,cAAkB;QAAC0B,OAAO,EAAGA;MAAS,CAAE;IACvC,CACH,CAEW;EACZ,CACH,CAAC;AAEJ;AAEA,SAASH,oBAAoBA,CAAE;EAAEF,MAAM;EAAEG;AAAQ,CAAC,EAAG;EACpD,MAAMX,KAAK,GAAG,IAAAc,8BAAsB,EAAC,CAAC;EACtC,OACC,IAAAnB,MAAA,CAAAC,aAAA,EAAChB,WAAA,CAAAmC,MAAM;IACNC,qBAAqB;IACrBC,SAAS,EAAC,mCAAmC;IAC7CC,OAAO,EAAC,UAAU;IAClB,iBAAgBV;IAChB;IAAA;IACA,cAAa,IAAAW,aAAO,EAAE,IAAAlB,QAAE,EAAE,uBAAwB,CAAC,EAAED,KAAM,CAAG;IAC9DW,OAAO,EAAGA;EAAS,GAEjBX,KACK,CAAC;AAEX;AAAC,IAAAoB,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcnC,cAAc","ignoreList":[]}
@@ -1 +1 @@
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"}
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":[]}
@@ -11,14 +11,12 @@ var _data = require("@wordpress/data");
11
11
  var _element = require("@wordpress/element");
12
12
  var _i18n = require("@wordpress/i18n");
13
13
  var _icons = require("@wordpress/icons");
14
- var _interface = require("@wordpress/interface");
15
14
  var _keyboardShortcuts = require("@wordpress/keyboard-shortcuts");
16
15
  var _editor = require("@wordpress/editor");
16
+ var _url = require("@wordpress/url");
17
17
  var _settingsHeader = _interopRequireDefault(require("../settings-header"));
18
18
  var _postStatus = _interopRequireDefault(require("../post-status"));
19
19
  var _metaBoxes = _interopRequireDefault(require("../../meta-boxes"));
20
- var _pluginSidebar = _interopRequireDefault(require("../plugin-sidebar"));
21
- var _templateSummary = _interopRequireDefault(require("../template-summary"));
22
20
  var _store = require("../../../store");
23
21
  var _components = require("@wordpress/components");
24
22
  var _lockUnlock = require("../../../lock-unlock");
@@ -30,9 +28,18 @@ var _lockUnlock = require("../../../lock-unlock");
30
28
  * Internal dependencies
31
29
  */
32
30
 
31
+ const {
32
+ PostCardPanel,
33
+ PostActions,
34
+ interfaceStore
35
+ } = (0, _lockUnlock.unlock)(_editor.privateApis);
33
36
  const {
34
37
  Tabs
35
38
  } = (0, _lockUnlock.unlock)(_components.privateApis);
39
+ const {
40
+ PatternOverridesPanel,
41
+ useAutoSwitchEditorSidebars
42
+ } = (0, _lockUnlock.unlock)(_editor.privateApis);
36
43
  const SIDEBAR_ACTIVE_BY_DEFAULT = _element.Platform.select({
37
44
  web: true,
38
45
  native: false
@@ -41,13 +48,21 @@ const sidebars = exports.sidebars = {
41
48
  document: 'edit-post/document',
42
49
  block: 'edit-post/block'
43
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
+ }
44
59
  const SidebarContent = ({
45
- sidebarName,
60
+ tabName,
46
61
  keyboardShortcut,
47
62
  isEditingTemplate
48
63
  }) => {
49
64
  const tabListRef = (0, _element.useRef)(null);
50
- // Because `PluginSidebarEditPost` renders a `ComplementaryArea`, we
65
+ // Because `PluginSidebar` renders a `ComplementaryArea`, we
51
66
  // need to forward the `Tabs` context so it can be passed through the
52
67
  // underlying slot/fill.
53
68
  const tabsContextValue = (0, _element.useContext)(Tabs.Context);
@@ -62,7 +77,7 @@ const SidebarContent = ({
62
77
  // We are purposefully using a custom `data-tab-id` attribute here
63
78
  // because we don't want rely on any assumptions about `Tabs`
64
79
  // component internals.
65
- element => element.getAttribute('data-tab-id') === sidebarName);
80
+ element => element.getAttribute('data-tab-id') === tabName);
66
81
  const activeElement = selectedTabElement?.ownerDocument.activeElement;
67
82
  const tabsHasFocus = tabsElements.some(element => {
68
83
  return activeElement && activeElement.id === element.id;
@@ -70,9 +85,9 @@ const SidebarContent = ({
70
85
  if (tabsHasFocus && selectedTabElement && selectedTabElement.id !== activeElement?.id) {
71
86
  selectedTabElement?.focus();
72
87
  }
73
- }, [sidebarName]);
74
- return (0, _react.createElement)(_pluginSidebar.default, {
75
- identifier: sidebarName,
88
+ }, [tabName]);
89
+ return (0, _react.createElement)(_editor.PluginSidebar, {
90
+ identifier: tabName,
76
91
  header: (0, _react.createElement)(Tabs.Context.Provider, {
77
92
  value: tabsContextValue
78
93
  }, (0, _react.createElement)(_settingsHeader.default, {
@@ -95,40 +110,33 @@ const SidebarContent = ({
95
110
  }, (0, _react.createElement)(Tabs.TabPanel, {
96
111
  tabId: sidebars.document,
97
112
  focusable: false
98
- }, !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)(_metaBoxes.default, {
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, {
99
118
  location: "side"
100
- })), isEditingTemplate && (0, _react.createElement)(_templateSummary.default, null)), (0, _react.createElement)(Tabs.TabPanel, {
119
+ }))), (0, _react.createElement)(Tabs.TabPanel, {
101
120
  tabId: sidebars.block,
102
121
  focusable: false
103
122
  }, (0, _react.createElement)(_blockEditor.BlockInspector, null))));
104
123
  };
105
124
  const SettingsSidebar = () => {
125
+ useAutoSwitchEditorSidebars();
106
126
  const {
107
- sidebarName,
108
- isSettingsSidebarActive,
127
+ tabName,
109
128
  keyboardShortcut,
110
129
  isEditingTemplate
111
130
  } = (0, _data.useSelect)(select => {
112
- // The settings sidebar is used by the edit-post/document and edit-post/block sidebars.
113
- // sidebarName represents the sidebar that is active or that should be active when the SettingsSidebar toggle button is pressed.
114
- // If one of the two sidebars is active the component will contain the content of that sidebar.
115
- // When neither of the two sidebars is active we can not simply return null, because the PluginSidebarEditPost
116
- // component, besides being used to render the sidebar, also renders the toggle button. In that case sidebarName
117
- // should contain the sidebar that will be active when the toggle button is pressed. If a block
118
- // is selected, that should be edit-post/block otherwise it's edit-post/document.
119
- let sidebar = select(_interface.store).getActiveComplementaryArea(_store.store.name);
120
- let isSettingsSidebar = true;
121
- if (![sidebars.document, sidebars.block].includes(sidebar)) {
122
- isSettingsSidebar = false;
123
- if (select(_blockEditor.store).getBlockSelectionStart()) {
124
- sidebar = sidebars.block;
125
- }
126
- sidebar = sidebars.document;
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;
127
137
  }
128
- const shortcut = select(_keyboardShortcuts.store).getShortcutRepresentation('core/edit-post/toggle-sidebar');
129
138
  return {
130
- sidebarName: sidebar,
131
- isSettingsSidebarActive: isSettingsSidebar,
139
+ tabName: _tabName,
132
140
  keyboardShortcut: shortcut,
133
141
  isEditingTemplate: select(_editor.store).getCurrentPostType() === 'wp_template'
134
142
  };
@@ -141,18 +149,12 @@ const SettingsSidebar = () => {
141
149
  openGeneralSidebar(newSelectedTabId);
142
150
  }
143
151
  }, [openGeneralSidebar]);
144
- return (0, _react.createElement)(Tabs
145
- // Due to how this component is controlled (via a value from the
146
- // `interfaceStore`), when the sidebar closes the currently selected
147
- // tab can't be found. This causes the component to continuously reset
148
- // the selection to `null` in an infinite loop.Proactively setting
149
- // the selected tab to `null` avoids that.
150
- , {
151
- selectedTabId: isSettingsSidebarActive ? sidebarName : null,
152
+ return (0, _react.createElement)(Tabs, {
153
+ selectedTabId: tabName,
152
154
  onSelect: onTabSelect,
153
155
  selectOnMove: false
154
156
  }, (0, _react.createElement)(SidebarContent, {
155
- sidebarName: sidebarName,
157
+ tabName: tabName,
156
158
  keyboardShortcut: keyboardShortcut,
157
159
  isEditingTemplate: isEditingTemplate
158
160
  }));