@wordpress/edit-post 7.32.0 → 7.34.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 (302) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +17 -223
  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 +20 -51
  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 +17 -42
  16. package/build/components/header/more-menu/index.js.map +1 -1
  17. package/build/components/header/more-menu/manage-patterns-menu-item.js +40 -0
  18. package/build/components/header/more-menu/manage-patterns-menu-item.js.map +1 -0
  19. package/build/{plugins/welcome-guide-menu-item/index.js → components/header/more-menu/welcome-guide-menu-item.js} +1 -1
  20. package/build/components/header/more-menu/welcome-guide-menu-item.js.map +1 -0
  21. package/build/components/init-pattern-modal/index.js.map +1 -1
  22. package/build/components/keyboard-shortcuts/index.js +0 -123
  23. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  24. package/build/components/layout/index.js +28 -29
  25. package/build/components/layout/index.js.map +1 -1
  26. package/build/components/layout/index.native.js.map +1 -1
  27. package/build/components/meta-boxes/index.js.map +1 -1
  28. package/build/components/meta-boxes/meta-box-visibility.js.map +1 -1
  29. package/build/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
  30. package/build/components/preferences-modal/enable-custom-fields.js.map +1 -1
  31. package/build/components/preferences-modal/enable-panel.js.map +1 -1
  32. package/build/components/preferences-modal/index.js +3 -32
  33. package/build/components/preferences-modal/index.js.map +1 -1
  34. package/build/components/preferences-modal/meta-boxes-section.js.map +1 -1
  35. package/build/components/sidebar/post-format/index.js.map +1 -1
  36. package/build/components/sidebar/post-pending-status/index.js.map +1 -1
  37. package/build/components/sidebar/post-slug/index.js.map +1 -1
  38. package/build/components/sidebar/post-status/index.js +35 -12
  39. package/build/components/sidebar/post-status/index.js.map +1 -1
  40. package/build/components/sidebar/post-sticky/index.js.map +1 -1
  41. package/build/components/sidebar/post-trash/index.js.map +1 -1
  42. package/build/components/sidebar/post-visibility/index.js.map +1 -1
  43. package/build/components/sidebar/settings-header/index.js.map +1 -1
  44. package/build/components/sidebar/settings-sidebar/index.js +68 -41
  45. package/build/components/sidebar/settings-sidebar/index.js.map +1 -1
  46. package/build/components/text-editor/index.js.map +1 -1
  47. package/build/components/visual-editor/block-inspector-button.js +1 -1
  48. package/build/components/visual-editor/block-inspector-button.js.map +1 -1
  49. package/build/components/visual-editor/header.native.js.map +1 -1
  50. package/build/components/visual-editor/index.js +4 -1
  51. package/build/components/visual-editor/index.js.map +1 -1
  52. package/build/components/visual-editor/index.native.js.map +1 -1
  53. package/build/components/visual-editor/use-padding-appender.js +62 -0
  54. package/build/components/visual-editor/use-padding-appender.js.map +1 -0
  55. package/build/components/welcome-guide/default.js.map +1 -1
  56. package/build/components/welcome-guide/image.js.map +1 -1
  57. package/build/components/welcome-guide/index.js.map +1 -1
  58. package/build/components/welcome-guide/template.js.map +1 -1
  59. package/build/deprecated.js +132 -0
  60. package/build/deprecated.js.map +1 -0
  61. package/build/editor.js +2 -2
  62. package/build/editor.js.map +1 -1
  63. package/build/editor.native.js.map +1 -1
  64. package/build/hooks/commands/use-common-commands.js +5 -22
  65. package/build/hooks/commands/use-common-commands.js.map +1 -1
  66. package/build/hooks/components/index.js.map +1 -1
  67. package/build/hooks/index.js.map +1 -1
  68. package/build/hooks/use-navigate-to-entity-record.js.map +1 -1
  69. package/build/hooks/validate-multiple-use/index.js.map +1 -1
  70. package/build/index.js +19 -62
  71. package/build/index.js.map +1 -1
  72. package/build/index.native.js.map +1 -1
  73. package/build/lock-unlock.js.map +1 -1
  74. package/build/store/actions.js +10 -8
  75. package/build/store/actions.js.map +1 -1
  76. package/build/store/constants.js.map +1 -1
  77. package/build/store/index.js +1 -1
  78. package/build/store/index.js.map +1 -1
  79. package/build/store/reducer.js.map +1 -1
  80. package/build/store/selectors.js +34 -19
  81. package/build/store/selectors.js.map +1 -1
  82. package/build/utils/meta-boxes.js.map +1 -1
  83. package/build-module/components/browser-url/index.js.map +1 -1
  84. package/build-module/components/editor-initialization/index.js +1 -2
  85. package/build-module/components/editor-initialization/index.js.map +1 -1
  86. package/build-module/components/editor-initialization/listener-hooks.js +2 -38
  87. package/build-module/components/editor-initialization/listener-hooks.js.map +1 -1
  88. package/build-module/components/header/fullscreen-mode-close/index.js.map +1 -1
  89. package/build-module/components/header/header-toolbar/index.native.js.map +1 -1
  90. package/build-module/components/header/index.js +22 -53
  91. package/build-module/components/header/index.js.map +1 -1
  92. package/build-module/components/header/index.native.js +1 -1
  93. package/build-module/components/header/index.native.js.map +1 -1
  94. package/build-module/components/header/main-dashboard-button/index.js.map +1 -1
  95. package/build-module/components/header/more-menu/index.js +17 -42
  96. package/build-module/components/header/more-menu/index.js.map +1 -1
  97. package/build-module/components/header/more-menu/manage-patterns-menu-item.js +33 -0
  98. package/build-module/components/header/more-menu/manage-patterns-menu-item.js.map +1 -0
  99. package/build-module/{plugins/welcome-guide-menu-item/index.js → components/header/more-menu/welcome-guide-menu-item.js} +1 -1
  100. package/build-module/components/header/more-menu/welcome-guide-menu-item.js.map +1 -0
  101. package/build-module/components/init-pattern-modal/index.js.map +1 -1
  102. package/build-module/components/keyboard-shortcuts/index.js +1 -124
  103. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  104. package/build-module/components/layout/index.js +28 -29
  105. package/build-module/components/layout/index.js.map +1 -1
  106. package/build-module/components/layout/index.native.js.map +1 -1
  107. package/build-module/components/meta-boxes/index.js.map +1 -1
  108. package/build-module/components/meta-boxes/meta-box-visibility.js.map +1 -1
  109. package/build-module/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
  110. package/build-module/components/preferences-modal/enable-custom-fields.js.map +1 -1
  111. package/build-module/components/preferences-modal/enable-panel.js.map +1 -1
  112. package/build-module/components/preferences-modal/index.js +4 -32
  113. package/build-module/components/preferences-modal/index.js.map +1 -1
  114. package/build-module/components/preferences-modal/meta-boxes-section.js.map +1 -1
  115. package/build-module/components/sidebar/post-format/index.js.map +1 -1
  116. package/build-module/components/sidebar/post-pending-status/index.js.map +1 -1
  117. package/build-module/components/sidebar/post-slug/index.js.map +1 -1
  118. package/build-module/components/sidebar/post-status/index.js +36 -14
  119. package/build-module/components/sidebar/post-status/index.js.map +1 -1
  120. package/build-module/components/sidebar/post-sticky/index.js.map +1 -1
  121. package/build-module/components/sidebar/post-trash/index.js.map +1 -1
  122. package/build-module/components/sidebar/post-visibility/index.js.map +1 -1
  123. package/build-module/components/sidebar/settings-header/index.js.map +1 -1
  124. package/build-module/components/sidebar/settings-sidebar/index.js +71 -44
  125. package/build-module/components/sidebar/settings-sidebar/index.js.map +1 -1
  126. package/build-module/components/text-editor/index.js.map +1 -1
  127. package/build-module/components/visual-editor/block-inspector-button.js +1 -1
  128. package/build-module/components/visual-editor/block-inspector-button.js.map +1 -1
  129. package/build-module/components/visual-editor/header.native.js.map +1 -1
  130. package/build-module/components/visual-editor/index.js +4 -1
  131. package/build-module/components/visual-editor/index.js.map +1 -1
  132. package/build-module/components/visual-editor/index.native.js.map +1 -1
  133. package/build-module/components/visual-editor/use-padding-appender.js +55 -0
  134. package/build-module/components/visual-editor/use-padding-appender.js.map +1 -0
  135. package/build-module/components/welcome-guide/default.js.map +1 -1
  136. package/build-module/components/welcome-guide/image.js.map +1 -1
  137. package/build-module/components/welcome-guide/index.js.map +1 -1
  138. package/build-module/components/welcome-guide/template.js.map +1 -1
  139. package/build-module/deprecated.js +116 -0
  140. package/build-module/deprecated.js.map +1 -0
  141. package/build-module/editor.js +2 -2
  142. package/build-module/editor.js.map +1 -1
  143. package/build-module/editor.native.js.map +1 -1
  144. package/build-module/hooks/commands/use-common-commands.js +7 -24
  145. package/build-module/hooks/commands/use-common-commands.js.map +1 -1
  146. package/build-module/hooks/components/index.js.map +1 -1
  147. package/build-module/hooks/index.js.map +1 -1
  148. package/build-module/hooks/use-navigate-to-entity-record.js.map +1 -1
  149. package/build-module/hooks/validate-multiple-use/index.js.map +1 -1
  150. package/build-module/index.js +2 -15
  151. package/build-module/index.js.map +1 -1
  152. package/build-module/index.native.js.map +1 -1
  153. package/build-module/lock-unlock.js.map +1 -1
  154. package/build-module/store/actions.js +8 -7
  155. package/build-module/store/actions.js.map +1 -1
  156. package/build-module/store/constants.js.map +1 -1
  157. package/build-module/store/index.js.map +1 -1
  158. package/build-module/store/reducer.js.map +1 -1
  159. package/build-module/store/selectors.js +33 -18
  160. package/build-module/store/selectors.js.map +1 -1
  161. package/build-module/utils/meta-boxes.js.map +1 -1
  162. package/build-style/classic-rtl.css +2 -2
  163. package/build-style/classic.css +2 -2
  164. package/build-style/style-rtl.css +18 -589
  165. package/build-style/style.css +18 -589
  166. package/package.json +32 -34
  167. package/src/classic.scss +1 -1
  168. package/src/components/editor-initialization/index.js +1 -5
  169. package/src/components/editor-initialization/listener-hooks.js +1 -40
  170. package/src/components/editor-initialization/test/listener-hooks.js +1 -96
  171. package/src/components/header/index.js +25 -71
  172. package/src/components/header/index.native.js +1 -1
  173. package/src/components/header/more-menu/index.js +27 -43
  174. package/src/components/header/more-menu/manage-patterns-menu-item.js +33 -0
  175. package/src/components/header/style.scss +5 -82
  176. package/src/components/keyboard-shortcuts/index.js +2 -148
  177. package/src/components/layout/index.js +26 -47
  178. package/src/components/layout/style.scss +7 -80
  179. package/src/components/preferences-modal/index.js +3 -46
  180. package/src/components/sidebar/post-status/index.js +61 -24
  181. package/src/components/sidebar/settings-sidebar/index.js +113 -73
  182. package/src/components/visual-editor/block-inspector-button.js +1 -1
  183. package/src/components/visual-editor/index.js +4 -0
  184. package/src/components/visual-editor/use-padding-appender.js +66 -0
  185. package/src/deprecated.js +107 -0
  186. package/src/editor.js +2 -2
  187. package/src/hooks/commands/use-common-commands.js +11 -26
  188. package/src/index.js +3 -20
  189. package/src/store/actions.js +10 -12
  190. package/src/store/selectors.js +41 -33
  191. package/src/store/test/actions.js +11 -10
  192. package/src/style.scss +1 -19
  193. package/build/components/header/plugin-more-menu-item/index.js +0 -78
  194. package/build/components/header/plugin-more-menu-item/index.js.map +0 -1
  195. package/build/components/header/plugin-sidebar-more-menu-item/index.js +0 -71
  196. package/build/components/header/plugin-sidebar-more-menu-item/index.js.map +0 -1
  197. package/build/components/header/post-publish-button-or-toggle.js +0 -91
  198. package/build/components/header/post-publish-button-or-toggle.js.map +0 -1
  199. package/build/components/header/preferences-menu-item/index.js +0 -31
  200. package/build/components/header/preferences-menu-item/index.js.map +0 -1
  201. package/build/components/header/tools-more-menu-group/index.js +0 -26
  202. package/build/components/header/tools-more-menu-group/index.js.map +0 -1
  203. package/build/components/header/writing-menu/index.js +0 -71
  204. package/build/components/header/writing-menu/index.js.map +0 -1
  205. package/build/components/keyboard-shortcut-help-modal/config.js +0 -78
  206. package/build/components/keyboard-shortcut-help-modal/config.js.map +0 -1
  207. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -49
  208. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +0 -1
  209. package/build/components/keyboard-shortcut-help-modal/index.js +0 -132
  210. package/build/components/keyboard-shortcut-help-modal/index.js.map +0 -1
  211. package/build/components/keyboard-shortcut-help-modal/shortcut.js +0 -55
  212. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +0 -1
  213. package/build/components/layout/actions-panel.js +0 -86
  214. package/build/components/layout/actions-panel.js.map +0 -1
  215. package/build/components/preferences-modal/enable-publish-sidebar.js +0 -38
  216. package/build/components/preferences-modal/enable-publish-sidebar.js.map +0 -1
  217. package/build/components/sidebar/plugin-post-publish-panel/index.js +0 -39
  218. package/build/components/sidebar/plugin-post-publish-panel/index.js.map +0 -1
  219. package/build/components/sidebar/plugin-post-status-info/index.js +0 -73
  220. package/build/components/sidebar/plugin-post-status-info/index.js.map +0 -1
  221. package/build/components/sidebar/plugin-pre-publish-panel/index.js +0 -43
  222. package/build/components/sidebar/plugin-pre-publish-panel/index.js.map +0 -1
  223. package/build/components/sidebar/plugin-sidebar/index.js +0 -104
  224. package/build/components/sidebar/plugin-sidebar/index.js.map +0 -1
  225. package/build/components/start-page-options/index.js +0 -107
  226. package/build/components/start-page-options/index.js.map +0 -1
  227. package/build/plugins/copy-content-menu-item/index.js +0 -39
  228. package/build/plugins/copy-content-menu-item/index.js.map +0 -1
  229. package/build/plugins/index.js +0 -69
  230. package/build/plugins/index.js.map +0 -1
  231. package/build/plugins/keyboard-shortcuts-help-menu-item/index.js +0 -41
  232. package/build/plugins/keyboard-shortcuts-help-menu-item/index.js.map +0 -1
  233. package/build/plugins/welcome-guide-menu-item/index.js.map +0 -1
  234. package/build-module/components/header/plugin-more-menu-item/index.js +0 -73
  235. package/build-module/components/header/plugin-more-menu-item/index.js.map +0 -1
  236. package/build-module/components/header/plugin-sidebar-more-menu-item/index.js +0 -65
  237. package/build-module/components/header/plugin-sidebar-more-menu-item/index.js.map +0 -1
  238. package/build-module/components/header/post-publish-button-or-toggle.js +0 -83
  239. package/build-module/components/header/post-publish-button-or-toggle.js.map +0 -1
  240. package/build-module/components/header/preferences-menu-item/index.js +0 -24
  241. package/build-module/components/header/preferences-menu-item/index.js.map +0 -1
  242. package/build-module/components/header/tools-more-menu-group/index.js +0 -19
  243. package/build-module/components/header/tools-more-menu-group/index.js.map +0 -1
  244. package/build-module/components/header/writing-menu/index.js +0 -64
  245. package/build-module/components/header/writing-menu/index.js.map +0 -1
  246. package/build-module/components/keyboard-shortcut-help-modal/config.js +0 -71
  247. package/build-module/components/keyboard-shortcut-help-modal/config.js.map +0 -1
  248. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -41
  249. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +0 -1
  250. package/build-module/components/keyboard-shortcut-help-modal/index.js +0 -122
  251. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +0 -1
  252. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +0 -48
  253. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +0 -1
  254. package/build-module/components/layout/actions-panel.js +0 -78
  255. package/build-module/components/layout/actions-panel.js.map +0 -1
  256. package/build-module/components/preferences-modal/enable-publish-sidebar.js +0 -31
  257. package/build-module/components/preferences-modal/enable-publish-sidebar.js.map +0 -1
  258. package/build-module/components/sidebar/plugin-post-publish-panel/index.js +0 -32
  259. package/build-module/components/sidebar/plugin-post-publish-panel/index.js.map +0 -1
  260. package/build-module/components/sidebar/plugin-post-status-info/index.js +0 -66
  261. package/build-module/components/sidebar/plugin-post-status-info/index.js.map +0 -1
  262. package/build-module/components/sidebar/plugin-pre-publish-panel/index.js +0 -36
  263. package/build-module/components/sidebar/plugin-pre-publish-panel/index.js.map +0 -1
  264. package/build-module/components/sidebar/plugin-sidebar/index.js +0 -98
  265. package/build-module/components/sidebar/plugin-sidebar/index.js.map +0 -1
  266. package/build-module/components/start-page-options/index.js +0 -100
  267. package/build-module/components/start-page-options/index.js.map +0 -1
  268. package/build-module/plugins/copy-content-menu-item/index.js +0 -32
  269. package/build-module/plugins/copy-content-menu-item/index.js.map +0 -1
  270. package/build-module/plugins/index.js +0 -65
  271. package/build-module/plugins/index.js.map +0 -1
  272. package/build-module/plugins/keyboard-shortcuts-help-menu-item/index.js +0 -33
  273. package/build-module/plugins/keyboard-shortcuts-help-menu-item/index.js.map +0 -1
  274. package/build-module/plugins/welcome-guide-menu-item/index.js.map +0 -1
  275. package/src/components/header/plugin-more-menu-item/index.js +0 -73
  276. package/src/components/header/plugin-sidebar-more-menu-item/index.js +0 -64
  277. package/src/components/header/post-publish-button-or-toggle.js +0 -92
  278. package/src/components/header/preferences-menu-item/index.js +0 -25
  279. package/src/components/header/test/index.js +0 -51
  280. package/src/components/header/tools-more-menu-group/index.js +0 -20
  281. package/src/components/header/writing-menu/index.js +0 -73
  282. package/src/components/keyboard-shortcut-help-modal/config.js +0 -53
  283. package/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -43
  284. package/src/components/keyboard-shortcut-help-modal/index.js +0 -163
  285. package/src/components/keyboard-shortcut-help-modal/shortcut.js +0 -67
  286. package/src/components/keyboard-shortcut-help-modal/style.scss +0 -61
  287. package/src/components/keyboard-shortcut-help-modal/test/index.js +0 -36
  288. package/src/components/layout/actions-panel.js +0 -103
  289. package/src/components/preferences-modal/enable-publish-sidebar.js +0 -32
  290. package/src/components/preferences-modal/test/index.js +0 -28
  291. package/src/components/sidebar/plugin-post-publish-panel/index.js +0 -28
  292. package/src/components/sidebar/plugin-post-status-info/index.js +0 -63
  293. package/src/components/sidebar/plugin-post-status-info/test/__snapshots__/index.js.snap +0 -11
  294. package/src/components/sidebar/plugin-post-status-info/test/index.js +0 -29
  295. package/src/components/sidebar/plugin-pre-publish-panel/index.js +0 -32
  296. package/src/components/sidebar/plugin-sidebar/index.js +0 -94
  297. package/src/components/start-page-options/index.js +0 -108
  298. package/src/components/start-page-options/style.scss +0 -26
  299. package/src/plugins/copy-content-menu-item/index.js +0 -29
  300. package/src/plugins/index.js +0 -85
  301. package/src/plugins/keyboard-shortcuts-help-menu-item/index.js +0 -34
  302. /package/src/{plugins/welcome-guide-menu-item/index.js → components/header/more-menu/welcome-guide-menu-item.js} +0 -0
@@ -1 +1 @@
1
- {"version":3,"names":["PanelRow","PostSlug","PostSlugForm","PostSlugCheck","createElement","className"],"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":";AAAA;AACA;AACA;AACA,SAASA,QAAQ,QAAQ,uBAAuB;AAChD,SAASC,QAAQ,IAAIC,YAAY,EAAEC,aAAa,QAAQ,mBAAmB;AAE3E,OAAO,SAASF,QAAQA,CAAA,EAAG;EAC1B,OACCG,aAAA,CAACD,aAAa,QACbC,aAAA,CAACJ,QAAQ;IAACK,SAAS,EAAC;EAAqB,GACxCD,aAAA,CAACF,YAAY,MAAE,CACN,CACI,CAAC;AAElB;AAEA,eAAeD,QAAQ"}
1
+ {"version":3,"names":["PanelRow","PostSlug","PostSlugForm","PostSlugCheck","createElement","className"],"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":";AAAA;AACA;AACA;AACA,SAASA,QAAQ,QAAQ,uBAAuB;AAChD,SAASC,QAAQ,IAAIC,YAAY,EAAEC,aAAa,QAAQ,mBAAmB;AAE3E,OAAO,SAASF,QAAQA,CAAA,EAAG;EAC1B,OACCG,aAAA,CAACD,aAAa,QACbC,aAAA,CAACJ,QAAQ;IAACK,SAAS,EAAC;EAAqB,GACxCD,aAAA,CAACF,YAAY,MAAE,CACN,CACI,CAAC;AAElB;AAEA,eAAeD,QAAQ","ignoreList":[]}
@@ -3,20 +3,24 @@ import { createElement, Fragment } from "react";
3
3
  * WordPress dependencies
4
4
  */
5
5
  import { __ } from '@wordpress/i18n';
6
- import { __experimentalHStack as HStack, PanelBody } from '@wordpress/components';
6
+ import { __experimentalHStack as HStack, __experimentalVStack as VStack, PanelBody } from '@wordpress/components';
7
7
  import { useDispatch, useSelect } from '@wordpress/data';
8
- import { PostAuthorPanel, PostSchedulePanel, PostSwitchToDraftButton, PostSyncStatus, PostURLPanel, PostTemplatePanel, PostFeaturedImagePanel, store as editorStore } from '@wordpress/editor';
8
+ import { PluginPostStatusInfo, PostAuthorPanel, PostSchedulePanel, PostSyncStatus, PostURLPanel, PostTemplatePanel, PostFeaturedImagePanel, store as editorStore, privateApis as editorPrivateApis } from '@wordpress/editor';
9
9
 
10
10
  /**
11
11
  * Internal dependencies
12
12
  */
13
- import PostVisibility from '../post-visibility';
14
13
  import PostTrash from '../post-trash';
15
14
  import PostSticky from '../post-sticky';
16
15
  import PostSlug from '../post-slug';
17
16
  import PostFormat from '../post-format';
18
- import PostPendingStatus from '../post-pending-status';
19
- import PluginPostStatusInfo from '../plugin-post-status-info';
17
+ import { unlock } from '../../../lock-unlock';
18
+ const {
19
+ PostStatus: PostStatusPanel,
20
+ PrivatePostExcerptPanel,
21
+ PostContentInformation,
22
+ PostLastEditedPanel
23
+ } = unlock(editorPrivateApis);
20
24
 
21
25
  /**
22
26
  * Module Constants
@@ -25,17 +29,23 @@ const PANEL_NAME = 'post-status';
25
29
  export default function PostStatus() {
26
30
  const {
27
31
  isOpened,
28
- isRemoved
32
+ isRemoved,
33
+ showPostContentPanels
29
34
  } = useSelect(select => {
30
35
  // We use isEditorPanelRemoved to hide the panel if it was programatically removed. We do
31
36
  // not use isEditorPanelEnabled since this panel should not be disabled through the UI.
32
37
  const {
33
38
  isEditorPanelRemoved,
34
- isEditorPanelOpened
39
+ isEditorPanelOpened,
40
+ getCurrentPostType
35
41
  } = select(editorStore);
42
+ const postType = getCurrentPostType();
36
43
  return {
37
44
  isRemoved: isEditorPanelRemoved(PANEL_NAME),
38
- isOpened: isEditorPanelOpened(PANEL_NAME)
45
+ isOpened: isEditorPanelOpened(PANEL_NAME),
46
+ // Post excerpt panel is rendered in different place depending on the post type.
47
+ // So we cannot make this check inside the PostExcerpt component based on the current edited entity.
48
+ showPostContentPanels: !['wp_template', 'wp_template_part', 'wp_block'].includes(postType)
39
49
  };
40
50
  }, []);
41
51
  const {
@@ -49,14 +59,26 @@ export default function PostStatus() {
49
59
  title: __('Summary'),
50
60
  opened: isOpened,
51
61
  onToggle: () => toggleEditorPanelOpened(PANEL_NAME)
52
- }, createElement(PluginPostStatusInfo.Slot, null, fills => createElement(Fragment, null, createElement(PostFeaturedImagePanel, {
62
+ }, createElement(PluginPostStatusInfo.Slot, null, fills => createElement(Fragment, null, showPostContentPanels && createElement(VStack, {
63
+ spacing: 3
64
+ // TODO: this needs to be consolidated with the panel in site editor, when we unify them.
65
+ ,
66
+ style: {
67
+ marginBlockEnd: '24px'
68
+ }
69
+ }, createElement(PostFeaturedImagePanel, {
53
70
  withPanelBody: false
54
- }), createElement(PostVisibility, null), createElement(PostSchedulePanel, null), createElement(PostTemplatePanel, null), createElement(PostURLPanel, null), createElement(PostSyncStatus, null), createElement(PostSticky, null), createElement(PostPendingStatus, null), createElement(PostFormat, null), createElement(PostSlug, null), createElement(PostAuthorPanel, null), fills, createElement(HStack, {
71
+ }), createElement(PrivatePostExcerptPanel, null), createElement(VStack, {
72
+ spacing: 1
73
+ }, createElement(PostContentInformation, null), createElement(PostLastEditedPanel, null))), createElement(VStack, {
74
+ spacing: 1,
75
+ style: {
76
+ marginBlockEnd: '12px'
77
+ }
78
+ }, createElement(PostStatusPanel, null), createElement(PostSchedulePanel, null), createElement(PostTemplatePanel, null), createElement(PostURLPanel, null), createElement(PostSyncStatus, null)), createElement(PostSticky, null), createElement(PostFormat, null), createElement(PostSlug, null), createElement(PostAuthorPanel, null), fills, createElement(HStack, {
55
79
  style: {
56
80
  marginTop: '16px'
57
- },
58
- spacing: 4,
59
- wrap: true
60
- }, createElement(PostSwitchToDraftButton, null), createElement(PostTrash, null)))));
81
+ }
82
+ }, createElement(PostTrash, null)))));
61
83
  }
62
84
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__","__experimentalHStack","HStack","PanelBody","useDispatch","useSelect","PostAuthorPanel","PostSchedulePanel","PostSwitchToDraftButton","PostSyncStatus","PostURLPanel","PostTemplatePanel","PostFeaturedImagePanel","store","editorStore","PostVisibility","PostTrash","PostSticky","PostSlug","PostFormat","PostPendingStatus","PluginPostStatusInfo","PANEL_NAME","PostStatus","isOpened","isRemoved","select","isEditorPanelRemoved","isEditorPanelOpened","toggleEditorPanelOpened","createElement","className","title","opened","onToggle","Slot","fills","Fragment","withPanelBody","style","marginTop","spacing","wrap"],"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":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SACCC,oBAAoB,IAAIC,MAAM,EAC9BC,SAAS,QACH,uBAAuB;AAC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AAA,QACCP,aAAA,CAAClB,sBAAsB;IAAC0B,aAAa,EAAG;EAAO,CAAE,CAAC,EAClDR,aAAA,CAACf,cAAc,MAAE,CAAC,EAClBe,aAAA,CAACvB,iBAAiB,MAAE,CAAC,EACrBuB,aAAA,CAACnB,iBAAiB,MAAE,CAAC,EACrBmB,aAAA,CAACpB,YAAY,MAAE,CAAC,EAChBoB,aAAA,CAACrB,cAAc,MAAE,CAAC,EAClBqB,aAAA,CAACb,UAAU,MAAE,CAAC,EACda,aAAA,CAACV,iBAAiB,MAAE,CAAC,EACrBU,aAAA,CAACX,UAAU,MAAE,CAAC,EACdW,aAAA,CAACZ,QAAQ,MAAE,CAAC,EACZY,aAAA,CAACxB,eAAe,MAAE,CAAC,EACjB8B,KAAK,EACPN,aAAA,CAAC5B,MAAM;IACNqC,KAAK,EAAG;MACPC,SAAS,EAAE;IACZ,CAAG;IACHC,OAAO,EAAG,CAAG;IACbC,IAAI;EAAA,GAEJZ,aAAA,CAACtB,uBAAuB,MAAE,CAAC,EAC3BsB,aAAA,CAACd,SAAS,MAAE,CACL,CACP,CAEuB,CACjB,CAAC;AAEd"}
1
+ {"version":3,"names":["__","__experimentalHStack","HStack","__experimentalVStack","VStack","PanelBody","useDispatch","useSelect","PluginPostStatusInfo","PostAuthorPanel","PostSchedulePanel","PostSyncStatus","PostURLPanel","PostTemplatePanel","PostFeaturedImagePanel","store","editorStore","privateApis","editorPrivateApis","PostTrash","PostSticky","PostSlug","PostFormat","unlock","PostStatus","PostStatusPanel","PrivatePostExcerptPanel","PostContentInformation","PostLastEditedPanel","PANEL_NAME","isOpened","isRemoved","showPostContentPanels","select","isEditorPanelRemoved","isEditorPanelOpened","getCurrentPostType","postType","includes","toggleEditorPanelOpened","createElement","className","title","opened","onToggle","Slot","fills","Fragment","spacing","style","marginBlockEnd","withPanelBody","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\t__experimentalVStack as VStack,\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 {\n\tPostStatus: PostStatusPanel,\n\tPrivatePostExcerptPanel,\n\tPostContentInformation,\n\tPostLastEditedPanel,\n} = unlock( editorPrivateApis );\n\n/**\n * Module Constants\n */\nconst PANEL_NAME = 'post-status';\n\nexport default function PostStatus() {\n\tconst { isOpened, isRemoved, showPostContentPanels } = useSelect(\n\t\t( select ) => {\n\t\t\t// We use isEditorPanelRemoved to hide the panel if it was programatically removed. We do\n\t\t\t// not use isEditorPanelEnabled since this panel should not be disabled through the UI.\n\t\t\tconst {\n\t\t\t\tisEditorPanelRemoved,\n\t\t\t\tisEditorPanelOpened,\n\t\t\t\tgetCurrentPostType,\n\t\t\t} = select( editorStore );\n\t\t\tconst postType = getCurrentPostType();\n\t\t\treturn {\n\t\t\t\tisRemoved: isEditorPanelRemoved( PANEL_NAME ),\n\t\t\t\tisOpened: isEditorPanelOpened( PANEL_NAME ),\n\t\t\t\t// Post excerpt panel is rendered in different place depending on the post type.\n\t\t\t\t// So we cannot make this check inside the PostExcerpt component based on the current edited entity.\n\t\t\t\tshowPostContentPanels: ! [\n\t\t\t\t\t'wp_template',\n\t\t\t\t\t'wp_template_part',\n\t\t\t\t\t'wp_block',\n\t\t\t\t].includes( postType ),\n\t\t\t};\n\t\t},\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{ showPostContentPanels && (\n\t\t\t\t\t\t\t<VStack\n\t\t\t\t\t\t\t\tspacing={ 3 }\n\t\t\t\t\t\t\t\t// TODO: this needs to be consolidated with the panel in site editor, when we unify them.\n\t\t\t\t\t\t\t\tstyle={ { marginBlockEnd: '24px' } }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<PostFeaturedImagePanel\n\t\t\t\t\t\t\t\t\twithPanelBody={ false }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<PrivatePostExcerptPanel />\n\t\t\t\t\t\t\t\t<VStack spacing={ 1 }>\n\t\t\t\t\t\t\t\t\t<PostContentInformation />\n\t\t\t\t\t\t\t\t\t<PostLastEditedPanel />\n\t\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<VStack\n\t\t\t\t\t\t\tspacing={ 1 }\n\t\t\t\t\t\t\tstyle={ { marginBlockEnd: '12px' } }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<PostStatusPanel />\n\t\t\t\t\t\t\t<PostSchedulePanel />\n\t\t\t\t\t\t\t<PostTemplatePanel />\n\t\t\t\t\t\t\t<PostURLPanel />\n\t\t\t\t\t\t\t<PostSyncStatus />\n\t\t\t\t\t\t</VStack>\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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,iBAAiB,MAAE,CAAC,EACrB8B,aAAA,CAAC3B,iBAAiB,MAAE,CAAC,EACrB2B,aAAA,CAAC5B,YAAY,MAAE,CAAC,EAChB4B,aAAA,CAAC7B,cAAc,MAAE,CACV,CAAC,EACT6B,aAAA,CAACpB,UAAU,MAAE,CAAC,EACdoB,aAAA,CAAClB,UAAU,MAAE,CAAC,EACdkB,aAAA,CAACnB,QAAQ,MAAE,CAAC,EACZmB,aAAA,CAAC/B,eAAe,MAAE,CAAC,EACjBqC,KAAK,EACPN,aAAA,CAACtC,MAAM;IACN+C,KAAK,EAAG;MACPG,SAAS,EAAE;IACZ;EAAG,GAEHZ,aAAA,CAACrB,SAAS,MAAE,CACL,CACP,CAEuB,CACjB,CAAC;AAEd","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["PostSticky","PostStickyForm","PostStickyCheck","privateApis","editorPrivateApis","unlock","PostPanelRow","createElement"],"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":";AAAA;AACA;AACA;AACA,SACCA,UAAU,IAAIC,cAAc,EAC5BC,eAAe,EACfC,WAAW,IAAIC,iBAAiB,QAC1B,mBAAmB;;AAE1B;AACA;AACA;AACA,SAASC,MAAM,QAAQ,sBAAsB;AAE7C,MAAM;EAAEC;AAAa,CAAC,GAAGD,MAAM,CAAED,iBAAkB,CAAC;AAEpD,OAAO,SAASJ,UAAUA,CAAA,EAAG;EAC5B,OACCO,aAAA,CAACL,eAAe,QACfK,aAAA,CAACD,YAAY,QACZC,aAAA,CAACN,cAAc,MAAE,CACJ,CACE,CAAC;AAEpB;AAEA,eAAeD,UAAU"}
1
+ {"version":3,"names":["PostSticky","PostStickyForm","PostStickyCheck","privateApis","editorPrivateApis","unlock","PostPanelRow","createElement"],"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":";AAAA;AACA;AACA;AACA,SACCA,UAAU,IAAIC,cAAc,EAC5BC,eAAe,EACfC,WAAW,IAAIC,iBAAiB,QAC1B,mBAAmB;;AAE1B;AACA;AACA;AACA,SAASC,MAAM,QAAQ,sBAAsB;AAE7C,MAAM;EAAEC;AAAa,CAAC,GAAGD,MAAM,CAAED,iBAAkB,CAAC;AAEpD,OAAO,SAASJ,UAAUA,CAAA,EAAG;EAC5B,OACCO,aAAA,CAACL,eAAe,QACfK,aAAA,CAACD,YAAY,QACZC,aAAA,CAACN,cAAc,MAAE,CACJ,CACE,CAAC;AAEpB;AAEA,eAAeD,UAAU","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["PostTrash","PostTrashLink","PostTrashCheck","createElement"],"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":";AAAA;AACA;AACA;AACA,SAASA,SAAS,IAAIC,aAAa,EAAEC,cAAc,QAAQ,mBAAmB;AAE9E,eAAe,SAASF,SAASA,CAAA,EAAG;EACnC,OACCG,aAAA,CAACD,cAAc,QACdC,aAAA,CAACF,aAAa,MAAE,CACD,CAAC;AAEnB"}
1
+ {"version":3,"names":["PostTrash","PostTrashLink","PostTrashCheck","createElement"],"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":";AAAA;AACA;AACA;AACA,SAASA,SAAS,IAAIC,aAAa,EAAEC,cAAc,QAAQ,mBAAmB;AAE9E,eAAe,SAASF,SAASA,CAAA,EAAG;EACnC,OACCG,aAAA,CAACD,cAAc,QACdC,aAAA,CAACF,aAAa,MAAE,CACD,CAAC;AAEnB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["__","sprintf","Dropdown","Button","PostVisibility","PostVisibilityForm","PostVisibilityLabel","PostVisibilityCheck","usePostVisibilityLabel","privateApis","editorPrivateApis","useMemo","useState","unlock","PostPanelRow","popoverAnchor","setPopoverAnchor","popoverProps","anchor","placement","createElement","render","canEdit","label","ref","contentClassName","focusOnMount","renderToggle","isOpen","onToggle","PostVisibilityToggle","onClick","renderContent","onClose","__next40pxDefaultSize","className","variant"],"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":";AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,QAAQ,EAAEC,MAAM,QAAQ,uBAAuB;AACxD,SACCC,cAAc,IAAIC,kBAAkB,EACpCC,mBAAmB,EACnBC,mBAAmB,EACnBC,sBAAsB,EACtBC,WAAW,IAAIC,iBAAiB,QAC1B,mBAAmB;AAC1B,SAASC,OAAO,EAAEC,QAAQ,QAAQ,oBAAoB;;AAEtD;AACA;AACA;AACA,SAASC,MAAM,QAAQ,sBAAsB;AAE7C,MAAM;EAAEC;AAAa,CAAC,GAAGD,MAAM,CAAEH,iBAAkB,CAAC;AAEpD,OAAO,SAASN,cAAcA,CAAA,EAAG;EAChC;EACA;EACA,MAAM,CAAEW,aAAa,EAAEC,gBAAgB,CAAE,GAAGJ,QAAQ,CAAE,IAAK,CAAC;EAC5D;EACA,MAAMK,YAAY,GAAGN,OAAO,CAC3B,OAAQ;IACP;IACA;IACAO,MAAM,EAAEH,aAAa;IACrBI,SAAS,EAAE;EACZ,CAAC,CAAE,EACH,CAAEJ,aAAa,CAChB,CAAC;EAED,OACCK,aAAA,CAACb,mBAAmB;IACnBc,MAAM,EAAGA,CAAE;MAAEC;IAAQ,CAAC,KACrBF,aAAA,CAACN,YAAY;MACZS,KAAK,EAAGvB,EAAE,CAAE,YAAa,CAAG;MAC5BwB,GAAG,EAAGR;IAAkB,GAEtB,CAAEM,OAAO,IACVF,aAAA,eACCA,aAAA,CAACd,mBAAmB,MAAE,CACjB,CACN,EACCgB,OAAO,IACRF,aAAA,CAAClB,QAAQ;MACRuB,gBAAgB,EAAC,mCAAmC;MACpDR,YAAY,EAAGA,YAAc;MAC7BS,YAAY;MACZC,YAAY,EAAGA,CAAE;QAAEC,MAAM;QAAEC;MAAS,CAAC,KACpCT,aAAA,CAACU,oBAAoB;QACpBF,MAAM,EAAGA,MAAQ;QACjBG,OAAO,EAAGF;MAAU,CACpB,CACC;MACHG,aAAa,EAAGA,CAAE;QAAEC;MAAQ,CAAC,KAC5Bb,aAAA,CAACf,kBAAkB;QAAC4B,OAAO,EAAGA;MAAS,CAAE;IACvC,CACH,CAEW;EACZ,CACH,CAAC;AAEJ;AAEA,SAASH,oBAAoBA,CAAE;EAAEF,MAAM;EAAEG;AAAQ,CAAC,EAAG;EACpD,MAAMR,KAAK,GAAGf,sBAAsB,CAAC,CAAC;EACtC,OACCY,aAAA,CAACjB,MAAM;IACN+B,qBAAqB;IACrBC,SAAS,EAAC,mCAAmC;IAC7CC,OAAO,EAAC,UAAU;IAClB,iBAAgBR;IAChB;IAAA;IACA,cAAa3B,OAAO,CAAED,EAAE,CAAE,uBAAwB,CAAC,EAAEuB,KAAM,CAAG;IAC9DQ,OAAO,EAAGA;EAAS,GAEjBR,KACK,CAAC;AAEX;AAEA,eAAenB,cAAc"}
1
+ {"version":3,"names":["__","sprintf","Dropdown","Button","PostVisibility","PostVisibilityForm","PostVisibilityLabel","PostVisibilityCheck","usePostVisibilityLabel","privateApis","editorPrivateApis","useMemo","useState","unlock","PostPanelRow","popoverAnchor","setPopoverAnchor","popoverProps","anchor","placement","createElement","render","canEdit","label","ref","contentClassName","focusOnMount","renderToggle","isOpen","onToggle","PostVisibilityToggle","onClick","renderContent","onClose","__next40pxDefaultSize","className","variant"],"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":";AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,QAAQ,EAAEC,MAAM,QAAQ,uBAAuB;AACxD,SACCC,cAAc,IAAIC,kBAAkB,EACpCC,mBAAmB,EACnBC,mBAAmB,EACnBC,sBAAsB,EACtBC,WAAW,IAAIC,iBAAiB,QAC1B,mBAAmB;AAC1B,SAASC,OAAO,EAAEC,QAAQ,QAAQ,oBAAoB;;AAEtD;AACA;AACA;AACA,SAASC,MAAM,QAAQ,sBAAsB;AAE7C,MAAM;EAAEC;AAAa,CAAC,GAAGD,MAAM,CAAEH,iBAAkB,CAAC;AAEpD,OAAO,SAASN,cAAcA,CAAA,EAAG;EAChC;EACA;EACA,MAAM,CAAEW,aAAa,EAAEC,gBAAgB,CAAE,GAAGJ,QAAQ,CAAE,IAAK,CAAC;EAC5D;EACA,MAAMK,YAAY,GAAGN,OAA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is","__","_x","useSelect","forwardRef","store","editorStore","unlock","sidebars","Tabs","SettingsHeader","_","ref","documentLabel","select","getPostTypeLabel","createElement","TabList","Tab","tabId","document","block"],"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":";AAAA;AACA;AACA;AACA,SAASA,WAAW,IAAIC,qBAAqB,QAAQ,uBAAuB;AAC5E,SAASC,EAAE,EAAEC,EAAE,QAAQ,iBAAiB;AACxC,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,SAASC,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;;AAExD;AACA;AACA;AACA,SAASC,MAAM,QAAQ,sBAAsB;AAC7C,SAASC,QAAQ,QAAQ,qBAAqB;AAE9C,MAAM;EAAEC;AAAK,CAAC,GAAGF,MAAM,CAAEP,qBAAsB,CAAC;AAEhD,MAAMU,cAAc,GAAGA,CAAEC,CAAC,EAAEC,GAAG,KAAM;EACpC,MAAM;IAAEC;EAAc,CAAC,GAAGV,SAAS,CAAIW,MAAM,IAAM;IAClD,MAAM;MAAEC;IAAiB,CAAC,GAAGD,MAAM,CAAER,WAAY,CAAC;IAElD,OAAO;MACN;MACAO,aAAa,EAAEE,gBAAgB,CAAC,CAAC,IAAIb,EAAE,CAAE,UAAU,EAAE,MAAO;IAC7D,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,OACCc,aAAA,CAACP,IAAI,CAACQ,OAAO;IAACL,GAAG,EAAGA;EAAK,GACxBI,aAAA,CAACP,IAAI,CAACS,GAAG;IACRC,KAAK,EAAGX,QAAQ,CAACY;IACjB;IAAA;IACA,eAAcZ,QAAQ,CAACY;EAAU,GAE/BP,aACO,CAAC,EACXG,aAAA,CAACP,IAAI,CAACS,GAAG;IACRC,KAAK,EAAGX,QAAQ,CAACa;IACjB;IAAA;IACA,eAAcb,QAAQ,CAACa;EAAO,GAG5BpB,EAAE,CAAE,OAAQ,CACL,CACG,CAAC;AAEjB,CAAC;AAED,eAAeG,UAAU,CAAEM,cAAe,CAAC"}
1
+ {"version":3,"names":["privateApis","componentsPrivateApis","__","_x","useSelect","forwardRef","store","editorStore","unlock","sidebars","Tabs","SettingsHeader","_","ref","documentLabel","select","getPostTypeLabel","createElement","TabList","Tab","tabId","document","block"],"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":";AAAA;AACA;AACA;AACA,SAASA,WAAW,IAAIC,qBAAqB,QAAQ,uBAAuB;AAC5E,SAASC,EAAE,EAAEC,EAAE,QAAQ,iBAAiB;AACxC,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,SAASC,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;;AAExD;AACA;AACA;AACA,SAASC,MAAM,QAAQ,sBAAsB;AAC7C,SAASC,QAAQ,QAAQ,qBAAqB;AAE9C,MAAM;EAAEC;AAAK,CAAC,GAAGF,MAAM,CAAEP,qBAAsB,CAAC;AAEhD,MAAMU,cAAc,GAAGA,CAAEC,CAAC,EAAEC,GAAG,KAAM;EACpC,MAAM;IAAEC;EAAc,CAAC,GAAGV,SAAS,CAAIW,MAAM,IAAM;IAClD,MAAM;MAAEC;IAAiB,CAAC,GAAGD,MAAM,CAAER,WAAY,CAAC;IAElD,OAAO;MACN;MACAO,aAAa,EAAEE,gBAAgB,CAAC,CAAC,IAAIb,EAAE,CAAE,UAAU,EAAE,MAAO;IAC7D,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,OACCc,aAAA,CAACP,IAAI,CAACQ,OAAO;IAACL,GAAG,EAAGA;EAAK,GACxBI,aAAA,CAACP,IAAI,CAACS,GAAG;IACRC,KAAK,EAAGX,QAAQ,CAACY;IACjB;IAAA;IACA,eAAcZ,QAAQ,CAACY;EAAU,GAE/BP,aACO,CAAC,EACXG,aAAA,CAACP,IAAI,CAACS,GAAG;IACRC,KAAK,EAAGX,QAAQ,CAACa;IACjB;IAAA;IACA,eAAcb,QAAQ,CAACa;EAAO,GAG5BpB,EAAE,CAAE,OAAQ,CACL,CACG,CAAC;AAEjB,CAAC;AAED,eAAeG,UAAU,CAAEM,cAAe,CAAC","ignoreList":[]}
@@ -1,15 +1,16 @@
1
- import { createElement, Fragment } from "react";
1
+ import { createElement } from "react";
2
2
  /**
3
3
  * WordPress dependencies
4
4
  */
5
5
  import { BlockInspector, store as blockEditorStore } from '@wordpress/block-editor';
6
6
  import { useSelect, useDispatch } from '@wordpress/data';
7
7
  import { Platform, useCallback, useContext, useEffect, useRef } from '@wordpress/element';
8
- import { isRTL, __ } from '@wordpress/i18n';
8
+ import { isRTL, __, sprintf } from '@wordpress/i18n';
9
9
  import { drawerLeft, drawerRight } from '@wordpress/icons';
10
- import { store as interfaceStore } from '@wordpress/interface';
11
10
  import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';
12
- import { store as editorStore, PageAttributesPanel, PluginDocumentSettingPanel, PostDiscussionPanel, PostExcerptPanel, PostLastRevisionPanel, PostTaxonomiesPanel, privateApis as editorPrivateApis } from '@wordpress/editor';
11
+ import { store as editorStore, PageAttributesPanel, PluginDocumentSettingPanel, PluginSidebar, PostDiscussionPanel, PostLastRevisionPanel, PostTaxonomiesPanel, privateApis as editorPrivateApis } from '@wordpress/editor';
12
+ import { addQueryArgs } from '@wordpress/url';
13
+ import { store as noticesStore } from '@wordpress/notices';
13
14
 
14
15
  /**
15
16
  * Internal dependencies
@@ -17,18 +18,20 @@ import { store as editorStore, PageAttributesPanel, PluginDocumentSettingPanel,
17
18
  import SettingsHeader from '../settings-header';
18
19
  import PostStatus from '../post-status';
19
20
  import MetaBoxes from '../../meta-boxes';
20
- import PluginSidebarEditPost from '../plugin-sidebar';
21
21
  import { store as editPostStore } from '../../../store';
22
22
  import { privateApis as componentsPrivateApis } from '@wordpress/components';
23
23
  import { unlock } from '../../../lock-unlock';
24
24
  const {
25
- PostCardPanel
25
+ PostCardPanel,
26
+ PostActions,
27
+ interfaceStore
26
28
  } = unlock(editorPrivateApis);
27
29
  const {
28
30
  Tabs
29
31
  } = unlock(componentsPrivateApis);
30
32
  const {
31
- PatternOverridesPanel
33
+ PatternOverridesPanel,
34
+ useAutoSwitchEditorSidebars
32
35
  } = unlock(editorPrivateApis);
33
36
  const SIDEBAR_ACTIVE_BY_DEFAULT = Platform.select({
34
37
  web: true,
@@ -39,12 +42,12 @@ export const sidebars = {
39
42
  block: 'edit-post/block'
40
43
  };
41
44
  const SidebarContent = ({
42
- sidebarName,
45
+ tabName,
43
46
  keyboardShortcut,
44
47
  isEditingTemplate
45
48
  }) => {
46
49
  const tabListRef = useRef(null);
47
- // Because `PluginSidebarEditPost` renders a `ComplementaryArea`, we
50
+ // Because `PluginSidebar` renders a `ComplementaryArea`, we
48
51
  // need to forward the `Tabs` context so it can be passed through the
49
52
  // underlying slot/fill.
50
53
  const tabsContextValue = useContext(Tabs.Context);
@@ -59,7 +62,7 @@ const SidebarContent = ({
59
62
  // We are purposefully using a custom `data-tab-id` attribute here
60
63
  // because we don't want rely on any assumptions about `Tabs`
61
64
  // component internals.
62
- element => element.getAttribute('data-tab-id') === sidebarName);
65
+ element => element.getAttribute('data-tab-id') === tabName);
63
66
  const activeElement = selectedTabElement?.ownerDocument.activeElement;
64
67
  const tabsHasFocus = tabsElements.some(element => {
65
68
  return activeElement && activeElement.id === element.id;
@@ -67,9 +70,46 @@ const SidebarContent = ({
67
70
  if (tabsHasFocus && selectedTabElement && selectedTabElement.id !== activeElement?.id) {
68
71
  selectedTabElement?.focus();
69
72
  }
70
- }, [sidebarName]);
71
- return createElement(PluginSidebarEditPost, {
72
- identifier: sidebarName,
73
+ }, [tabName]);
74
+ const {
75
+ createSuccessNotice
76
+ } = useDispatch(noticesStore);
77
+ const onActionPerformed = useCallback((actionId, items) => {
78
+ switch (actionId) {
79
+ case 'move-to-trash':
80
+ {
81
+ const postType = items[0].type;
82
+ document.location.href = addQueryArgs('edit.php', {
83
+ post_type: postType
84
+ });
85
+ }
86
+ break;
87
+ case 'duplicate-post':
88
+ {
89
+ const newItem = items[0];
90
+ const title = typeof newItem.title === 'string' ? newItem.title : newItem.title?.rendered;
91
+ createSuccessNotice(sprintf(
92
+ // translators: %s: Title of the created post e.g: "Post 1".
93
+ __('"%s" successfully created.'), title), {
94
+ type: 'snackbar',
95
+ id: 'duplicate-post-action',
96
+ actions: [{
97
+ label: __('Edit'),
98
+ onClick: () => {
99
+ const postId = newItem.id;
100
+ document.location.href = addQueryArgs('post.php', {
101
+ post: postId,
102
+ action: 'edit'
103
+ });
104
+ }
105
+ }]
106
+ });
107
+ }
108
+ break;
109
+ }
110
+ }, [createSuccessNotice]);
111
+ return createElement(PluginSidebar, {
112
+ identifier: tabName,
73
113
  header: createElement(Tabs.Context.Provider, {
74
114
  value: tabsContextValue
75
115
  }, createElement(SettingsHeader, {
@@ -92,40 +132,33 @@ const SidebarContent = ({
92
132
  }, createElement(Tabs.TabPanel, {
93
133
  tabId: sidebars.document,
94
134
  focusable: false
95
- }, createElement(PostCardPanel, null), !isEditingTemplate && createElement(Fragment, null, createElement(PostStatus, null), createElement(PluginDocumentSettingPanel.Slot, null), createElement(PostLastRevisionPanel, null), createElement(PostTaxonomiesPanel, null), createElement(PostExcerptPanel, null), createElement(PostDiscussionPanel, null), createElement(PageAttributesPanel, null), createElement(PatternOverridesPanel, null), createElement(MetaBoxes, {
135
+ }, createElement(PostCardPanel, {
136
+ actions: createElement(PostActions, {
137
+ onActionPerformed: onActionPerformed
138
+ })
139
+ }), !isEditingTemplate && createElement(PostStatus, null), createElement(PluginDocumentSettingPanel.Slot, null), createElement(PostLastRevisionPanel, null), createElement(PostTaxonomiesPanel, null), createElement(PostDiscussionPanel, null), createElement(PageAttributesPanel, null), createElement(PatternOverridesPanel, null), !isEditingTemplate && createElement(MetaBoxes, {
96
140
  location: "side"
97
- }))), createElement(Tabs.TabPanel, {
141
+ })), createElement(Tabs.TabPanel, {
98
142
  tabId: sidebars.block,
99
143
  focusable: false
100
144
  }, createElement(BlockInspector, null))));
101
145
  };
102
146
  const SettingsSidebar = () => {
147
+ useAutoSwitchEditorSidebars();
103
148
  const {
104
- sidebarName,
105
- isSettingsSidebarActive,
149
+ tabName,
106
150
  keyboardShortcut,
107
151
  isEditingTemplate
108
152
  } = useSelect(select => {
109
- // The settings sidebar is used by the edit-post/document and edit-post/block sidebars.
110
- // sidebarName represents the sidebar that is active or that should be active when the SettingsSidebar toggle button is pressed.
111
- // If one of the two sidebars is active the component will contain the content of that sidebar.
112
- // When neither of the two sidebars is active we can not simply return null, because the PluginSidebarEditPost
113
- // component, besides being used to render the sidebar, also renders the toggle button. In that case sidebarName
114
- // should contain the sidebar that will be active when the toggle button is pressed. If a block
115
- // is selected, that should be edit-post/block otherwise it's edit-post/document.
116
- let sidebar = select(interfaceStore).getActiveComplementaryArea(editPostStore.name);
117
- let isSettingsSidebar = true;
118
- if (![sidebars.document, sidebars.block].includes(sidebar)) {
119
- isSettingsSidebar = false;
120
- if (select(blockEditorStore).getBlockSelectionStart()) {
121
- sidebar = sidebars.block;
122
- }
123
- sidebar = sidebars.document;
153
+ const shortcut = select(keyboardShortcutsStore).getShortcutRepresentation('core/editor/toggle-sidebar');
154
+ const sidebar = select(interfaceStore).getActiveComplementaryArea('core');
155
+ const _isEditorSidebarOpened = [sidebars.block, sidebars.document].includes(sidebar);
156
+ let _tabName = sidebar;
157
+ if (!_isEditorSidebarOpened) {
158
+ _tabName = !!select(blockEditorStore).getBlockSelectionStart() ? sidebars.block : sidebars.document;
124
159
  }
125
- const shortcut = select(keyboardShortcutsStore).getShortcutRepresentation('core/edit-post/toggle-sidebar');
126
160
  return {
127
- sidebarName: sidebar,
128
- isSettingsSidebarActive: isSettingsSidebar,
161
+ tabName: _tabName,
129
162
  keyboardShortcut: shortcut,
130
163
  isEditingTemplate: select(editorStore).getCurrentPostType() === 'wp_template'
131
164
  };
@@ -138,18 +171,12 @@ const SettingsSidebar = () => {
138
171
  openGeneralSidebar(newSelectedTabId);
139
172
  }
140
173
  }, [openGeneralSidebar]);
141
- return createElement(Tabs
142
- // Due to how this component is controlled (via a value from the
143
- // `interfaceStore`), when the sidebar closes the currently selected
144
- // tab can't be found. This causes the component to continuously reset
145
- // the selection to `null` in an infinite loop.Proactively setting
146
- // the selected tab to `null` avoids that.
147
- , {
148
- selectedTabId: isSettingsSidebarActive ? sidebarName : null,
174
+ return createElement(Tabs, {
175
+ selectedTabId: tabName,
149
176
  onSelect: onTabSelect,
150
177
  selectOnMove: false
151
178
  }, createElement(SidebarContent, {
152
- sidebarName: sidebarName,
179
+ tabName: tabName,
153
180
  keyboardShortcut: keyboardShortcut,
154
181
  isEditingTemplate: isEditingTemplate
155
182
  }));
@@ -1 +1 @@
1
- {"version":3,"names":["BlockInspector","store","blockEditorStore","useSelect","useDispatch","Platform","useCallback","useContext","useEffect","useRef","isRTL","__","drawerLeft","drawerRight","interfaceStore","keyboardShortcutsStore","editorStore","PageAttributesPanel","PluginDocumentSettingPanel","PostDiscussionPanel","PostExcerptPanel","PostLastRevisionPanel","PostTaxonomiesPanel","privateApis","editorPrivateApis","SettingsHeader","PostStatus","MetaBoxes","PluginSidebarEditPost","editPostStore","componentsPrivateApis","unlock","PostCardPanel","Tabs","PatternOverridesPanel","SIDEBAR_ACTIVE_BY_DEFAULT","select","web","native","sidebars","document","block","SidebarContent","sidebarName","keyboardShortcut","isEditingTemplate","tabListRef","tabsContextValue","Context","tabsElements","Array","from","current","querySelectorAll","selectedTabElement","find","element","getAttribute","activeElement","ownerDocument","tabsHasFocus","some","id","focus","createElement","identifier","header","Provider","value","ref","closeLabel","className","headerClassName","title","toggleShortcut","icon","isActiveByDefault","TabPanel","tabId","focusable","Fragment","Slot","location","SettingsSidebar","isSettingsSidebarActive","sidebar","getActiveComplementaryArea","name","isSettingsSidebar","includes","getBlockSelectionStart","shortcut","getShortcutRepresentation","getCurrentPostType","openGeneralSidebar","onTabSelect","newSelectedTabId","selectedTabId","onSelect","selectOnMove"],"sources":["@wordpress/edit-post/src/components/sidebar/settings-sidebar/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tBlockInspector,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tPlatform,\n\tuseCallback,\n\tuseContext,\n\tuseEffect,\n\tuseRef,\n} from '@wordpress/element';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport { drawerLeft, drawerRight } from '@wordpress/icons';\nimport { store as interfaceStore } from '@wordpress/interface';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport {\n\tstore as editorStore,\n\tPageAttributesPanel,\n\tPluginDocumentSettingPanel,\n\tPostDiscussionPanel,\n\tPostExcerptPanel,\n\tPostLastRevisionPanel,\n\tPostTaxonomiesPanel,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport SettingsHeader from '../settings-header';\nimport PostStatus from '../post-status';\nimport MetaBoxes from '../../meta-boxes';\nimport PluginSidebarEditPost from '../plugin-sidebar';\nimport { store as editPostStore } from '../../../store';\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\nimport { unlock } from '../../../lock-unlock';\n\nconst { PostCardPanel } = unlock( editorPrivateApis );\n\nconst { Tabs } = unlock( componentsPrivateApis );\nconst { PatternOverridesPanel } = unlock( editorPrivateApis );\n\nconst SIDEBAR_ACTIVE_BY_DEFAULT = Platform.select( {\n\tweb: true,\n\tnative: false,\n} );\nexport const sidebars = {\n\tdocument: 'edit-post/document',\n\tblock: 'edit-post/block',\n};\n\nconst SidebarContent = ( {\n\tsidebarName,\n\tkeyboardShortcut,\n\tisEditingTemplate,\n} ) => {\n\tconst tabListRef = useRef( null );\n\t// Because `PluginSidebarEditPost` renders a `ComplementaryArea`, we\n\t// need to forward the `Tabs` context so it can be passed through the\n\t// underlying slot/fill.\n\tconst tabsContextValue = useContext( Tabs.Context );\n\n\t// This effect addresses a race condition caused by tabbing from the last\n\t// block in the editor into the settings sidebar. Without this effect, the\n\t// selected tab and browser focus can become separated in an unexpected way\n\t// (e.g the \"block\" tab is focused, but the \"post\" tab is selected).\n\tuseEffect( () => {\n\t\tconst tabsElements = Array.from(\n\t\t\ttabListRef.current?.querySelectorAll( '[role=\"tab\"]' ) || []\n\t\t);\n\t\tconst selectedTabElement = tabsElements.find(\n\t\t\t// We are purposefully using a custom `data-tab-id` attribute here\n\t\t\t// because we don't want rely on any assumptions about `Tabs`\n\t\t\t// component internals.\n\t\t\t( element ) => element.getAttribute( 'data-tab-id' ) === sidebarName\n\t\t);\n\t\tconst activeElement = selectedTabElement?.ownerDocument.activeElement;\n\t\tconst tabsHasFocus = tabsElements.some( ( element ) => {\n\t\t\treturn activeElement && activeElement.id === element.id;\n\t\t} );\n\t\tif (\n\t\t\ttabsHasFocus &&\n\t\t\tselectedTabElement &&\n\t\t\tselectedTabElement.id !== activeElement?.id\n\t\t) {\n\t\t\tselectedTabElement?.focus();\n\t\t}\n\t}, [ sidebarName ] );\n\n\treturn (\n\t\t<PluginSidebarEditPost\n\t\t\tidentifier={ sidebarName }\n\t\t\theader={\n\t\t\t\t<Tabs.Context.Provider value={ tabsContextValue }>\n\t\t\t\t\t<SettingsHeader ref={ tabListRef } />\n\t\t\t\t</Tabs.Context.Provider>\n\t\t\t}\n\t\t\tcloseLabel={ __( 'Close Settings' ) }\n\t\t\t// This classname is added so we can apply a corrective negative\n\t\t\t// margin to the panel.\n\t\t\t// see https://github.com/WordPress/gutenberg/pull/55360#pullrequestreview-1737671049\n\t\t\tclassName=\"edit-post-sidebar__panel\"\n\t\t\theaderClassName=\"edit-post-sidebar__panel-tabs\"\n\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\ttitle={ __( 'Settings' ) }\n\t\t\ttoggleShortcut={ keyboardShortcut }\n\t\t\ticon={ isRTL() ? drawerLeft : drawerRight }\n\t\t\tisActiveByDefault={ SIDEBAR_ACTIVE_BY_DEFAULT }\n\t\t>\n\t\t\t<Tabs.Context.Provider value={ tabsContextValue }>\n\t\t\t\t<Tabs.TabPanel tabId={ sidebars.document } focusable={ false }>\n\t\t\t\t\t<PostCardPanel />\n\t\t\t\t\t{ ! isEditingTemplate && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<PostStatus />\n\t\t\t\t\t\t\t<PluginDocumentSettingPanel.Slot />\n\t\t\t\t\t\t\t<PostLastRevisionPanel />\n\t\t\t\t\t\t\t<PostTaxonomiesPanel />\n\t\t\t\t\t\t\t<PostExcerptPanel />\n\t\t\t\t\t\t\t<PostDiscussionPanel />\n\t\t\t\t\t\t\t<PageAttributesPanel />\n\t\t\t\t\t\t\t<PatternOverridesPanel />\n\t\t\t\t\t\t\t<MetaBoxes location=\"side\" />\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t<Tabs.TabPanel tabId={ sidebars.block } focusable={ false }>\n\t\t\t\t\t<BlockInspector />\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t</Tabs.Context.Provider>\n\t\t</PluginSidebarEditPost>\n\t);\n};\n\nconst SettingsSidebar = () => {\n\tconst {\n\t\tsidebarName,\n\t\tisSettingsSidebarActive,\n\t\tkeyboardShortcut,\n\t\tisEditingTemplate,\n\t} = useSelect( ( select ) => {\n\t\t// The settings sidebar is used by the edit-post/document and edit-post/block sidebars.\n\t\t// sidebarName represents the sidebar that is active or that should be active when the SettingsSidebar toggle button is pressed.\n\t\t// If one of the two sidebars is active the component will contain the content of that sidebar.\n\t\t// When neither of the two sidebars is active we can not simply return null, because the PluginSidebarEditPost\n\t\t// component, besides being used to render the sidebar, also renders the toggle button. In that case sidebarName\n\t\t// should contain the sidebar that will be active when the toggle button is pressed. If a block\n\t\t// is selected, that should be edit-post/block otherwise it's edit-post/document.\n\t\tlet sidebar = select( interfaceStore ).getActiveComplementaryArea(\n\t\t\teditPostStore.name\n\t\t);\n\t\tlet isSettingsSidebar = true;\n\t\tif ( ! [ sidebars.document, sidebars.block ].includes( sidebar ) ) {\n\t\t\tisSettingsSidebar = false;\n\t\t\tif ( select( blockEditorStore ).getBlockSelectionStart() ) {\n\t\t\t\tsidebar = sidebars.block;\n\t\t\t}\n\t\t\tsidebar = sidebars.document;\n\t\t}\n\t\tconst shortcut = select(\n\t\t\tkeyboardShortcutsStore\n\t\t).getShortcutRepresentation( 'core/edit-post/toggle-sidebar' );\n\t\treturn {\n\t\t\tsidebarName: sidebar,\n\t\t\tisSettingsSidebarActive: isSettingsSidebar,\n\t\t\tkeyboardShortcut: shortcut,\n\t\t\tisEditingTemplate:\n\t\t\t\tselect( editorStore ).getCurrentPostType() === 'wp_template',\n\t\t};\n\t}, [] );\n\n\tconst { openGeneralSidebar } = useDispatch( editPostStore );\n\n\tconst onTabSelect = useCallback(\n\t\t( newSelectedTabId ) => {\n\t\t\tif ( !! newSelectedTabId ) {\n\t\t\t\topenGeneralSidebar( newSelectedTabId );\n\t\t\t}\n\t\t},\n\t\t[ openGeneralSidebar ]\n\t);\n\n\treturn (\n\t\t<Tabs\n\t\t\t// Due to how this component is controlled (via a value from the\n\t\t\t// `interfaceStore`), when the sidebar closes the currently selected\n\t\t\t// tab can't be found. This causes the component to continuously reset\n\t\t\t// the selection to `null` in an infinite loop.Proactively setting\n\t\t\t// the selected tab to `null` avoids that.\n\t\t\tselectedTabId={ isSettingsSidebarActive ? sidebarName : null }\n\t\t\tonSelect={ onTabSelect }\n\t\t\tselectOnMove={ false }\n\t\t>\n\t\t\t<SidebarContent\n\t\t\t\tsidebarName={ sidebarName }\n\t\t\t\tkeyboardShortcut={ keyboardShortcut }\n\t\t\t\tisEditingTemplate={ isEditingTemplate }\n\t\t\t/>\n\t\t</Tabs>\n\t);\n};\n\nexport default SettingsSidebar;\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,cAAc,EACdC,KAAK,IAAIC,gBAAgB,QACnB,yBAAyB;AAChC,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SACCC,QAAQ,EACRC,WAAW,EACXC,UAAU,EACVC,SAAS,EACTC,MAAM,QACA,oBAAoB;AAC3B,SAASC,KAAK,EAAEC,EAAE,QAAQ,iBAAiB;AAC3C,SAASC,UAAU,EAAEC,WAAW,QAAQ,kBAAkB;AAC1D,SAASZ,KAAK,IAAIa,cAAc,QAAQ,sBAAsB;AAC9D,SAASb,KAAK,IAAIc,sBAAsB,QAAQ,+BAA+B;AAC/E,SACCd,KAAK,IAAIe,WAAW,EACpBC,mBAAmB,EACnBC,0BAA0B,EAC1BC,mBAAmB,EACnBC,gBAAgB,EAChBC,qBAAqB,EACrBC,mBAAmB,EACnBC,WAAW,IAAIC,iBAAiB,QAC1B,mBAAmB;;AAE1B;AACA;AACA;AACA,OAAOC,cAAc,MAAM,oBAAoB;AAC/C,OAAOC,UAAU,MAAM,gBAAgB;AACv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AC9D,OAAO;MACNjD,WAAW,EAAE0C,OAAO;MACpBD,uBAAuB,EAAEI,iBAAiB;MAC1C5C,gBAAgB,EAAE+C,QAAQ;MAC1B9C,iBAAiB,EAChBT,MAAM,CAAEpB,WAAY,CAAC,CAAC6E,kBAAkB,CAAC,CAAC,KAAK;IACjD,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,MAAM;IAAEC;EAAmB,CAAC,GAAG1F,WAAW,CAAEyB,aAAc,CAAC;EAE3D,MAAMkE,WAAW,GAAGzF,WAAW,CAC5B0F,gBAAgB,IAAM;IACvB,IAAK,CAAC,CAAEA,gBAAgB,EAAG;MAC1BF,kBAAkB,CAAEE,gBAAiB,CAAC;IACvC;EACD,CAAC,EACD,CAAEF,kBAAkB,CACrB,CAAC;EAED,OACC9B,aAAA,CAAC/B;EACA;EACA;EACA;EACA;EACA;EAAA;IACAgE,aAAa,EAAGb,uBAAuB,GAAGzC,WAAW,GAAG,IAAM;IAC9DuD,QAAQ,EAAGH,WAAa;IACxBI,YAAY,EAAG;EAAO,GAEtBnC,aAAA,CAACtB,cAAc;IACdC,WAAW,EAAGA,WAAa;IAC3BC,gBAAgB,EAAGA,gBAAkB;IACrCC,iBAAiB,EAAGA;EAAmB,CACvC,CACI,CAAC;AAET,CAAC;AAED,eAAesC,eAAe"}
1
+ {"version":3,"names":["BlockInspector","store","blockEditorStore","useSelect","useDispatch","Platform","useCallback","useContext","useEffect","useRef","isRTL","__","sprintf","drawerLeft","drawerRight","keyboardShortcutsStore","editorStore","PageAttributesPanel","PluginDocumentSettingPanel","PluginSidebar","PostDiscussionPanel","PostLastRevisionPanel","PostTaxonomiesPanel","privateApis","editorPrivateApis","addQueryArgs","noticesStore","SettingsHeader","PostStatus","MetaBoxes","editPostStore","componentsPrivateApis","unlock","PostCardPanel","PostActions","interfaceStore","Tabs","PatternOverridesPanel","useAutoSwitchEditorSidebars","SIDEBAR_ACTIVE_BY_DEFAULT","select","web","native","sidebars","document","block","SidebarContent","tabName","keyboardShortcut","isEditingTemplate","tabListRef","tabsContextValue","Context","tabsElements","Array","from","current","querySelectorAll","selectedTabElement","find","element","getAttribute","activeElement","ownerDocument","tabsHasFocus","some","id","focus","createSuccessNotice","onActionPerformed","actionId","items","postType","type","location","href","post_type","newItem","title","rendered","actions","label","onClick","postId","post","action","createElement","identifier","header","Provider","value","ref","closeLabel","className","headerClassName","toggleShortcut","icon","isActiveByDefault","TabPanel","tabId","focusable","Slot","SettingsSidebar","shortcut","getShortcutRepresentation","sidebar","getActiveComplementaryArea","_isEditorSidebarOpened","includes","_tabName","getBlockSelectionStart","getCurrentPostType","openGeneralSidebar","onTabSelect","newSelectedTabId","selectedTabId","onSelect","selectOnMove"],"sources":["@wordpress/edit-post/src/components/sidebar/settings-sidebar/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tBlockInspector,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tPlatform,\n\tuseCallback,\n\tuseContext,\n\tuseEffect,\n\tuseRef,\n} from '@wordpress/element';\nimport { isRTL, __, sprintf } from '@wordpress/i18n';\nimport { drawerLeft, drawerRight } from '@wordpress/icons';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport {\n\tstore as editorStore,\n\tPageAttributesPanel,\n\tPluginDocumentSettingPanel,\n\tPluginSidebar,\n\tPostDiscussionPanel,\n\tPostLastRevisionPanel,\n\tPostTaxonomiesPanel,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { addQueryArgs } from '@wordpress/url';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport SettingsHeader from '../settings-header';\nimport PostStatus from '../post-status';\nimport MetaBoxes from '../../meta-boxes';\nimport { store as editPostStore } from '../../../store';\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\nimport { unlock } from '../../../lock-unlock';\n\nconst { PostCardPanel, PostActions, interfaceStore } =\n\tunlock( editorPrivateApis );\nconst { Tabs } = unlock( componentsPrivateApis );\nconst { PatternOverridesPanel, useAutoSwitchEditorSidebars } =\n\tunlock( editorPrivateApis );\n\nconst SIDEBAR_ACTIVE_BY_DEFAULT = Platform.select( {\n\tweb: true,\n\tnative: false,\n} );\nexport const sidebars = {\n\tdocument: 'edit-post/document',\n\tblock: 'edit-post/block',\n};\n\nconst SidebarContent = ( { tabName, keyboardShortcut, isEditingTemplate } ) => {\n\tconst tabListRef = useRef( null );\n\t// Because `PluginSidebar` renders a `ComplementaryArea`, we\n\t// need to forward the `Tabs` context so it can be passed through the\n\t// underlying slot/fill.\n\tconst tabsContextValue = useContext( Tabs.Context );\n\n\t// This effect addresses a race condition caused by tabbing from the last\n\t// block in the editor into the settings sidebar. Without this effect, the\n\t// selected tab and browser focus can become separated in an unexpected way\n\t// (e.g the \"block\" tab is focused, but the \"post\" tab is selected).\n\tuseEffect( () => {\n\t\tconst tabsElements = Array.from(\n\t\t\ttabListRef.current?.querySelectorAll( '[role=\"tab\"]' ) || []\n\t\t);\n\t\tconst selectedTabElement = tabsElements.find(\n\t\t\t// We are purposefully using a custom `data-tab-id` attribute here\n\t\t\t// because we don't want rely on any assumptions about `Tabs`\n\t\t\t// component internals.\n\t\t\t( element ) => element.getAttribute( 'data-tab-id' ) === tabName\n\t\t);\n\t\tconst activeElement = selectedTabElement?.ownerDocument.activeElement;\n\t\tconst tabsHasFocus = tabsElements.some( ( element ) => {\n\t\t\treturn activeElement && activeElement.id === element.id;\n\t\t} );\n\t\tif (\n\t\t\ttabsHasFocus &&\n\t\t\tselectedTabElement &&\n\t\t\tselectedTabElement.id !== activeElement?.id\n\t\t) {\n\t\t\tselectedTabElement?.focus();\n\t\t}\n\t}, [ tabName ] );\n\tconst { createSuccessNotice } = useDispatch( noticesStore );\n\n\tconst onActionPerformed = useCallback(\n\t\t( actionId, items ) => {\n\t\t\tswitch ( actionId ) {\n\t\t\t\tcase 'move-to-trash':\n\t\t\t\t\t{\n\t\t\t\t\t\tconst postType = items[ 0 ].type;\n\t\t\t\t\t\tdocument.location.href = addQueryArgs( 'edit.php', {\n\t\t\t\t\t\t\tpost_type: postType,\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'duplicate-post':\n\t\t\t\t\t{\n\t\t\t\t\t\tconst newItem = items[ 0 ];\n\t\t\t\t\t\tconst title =\n\t\t\t\t\t\t\ttypeof newItem.title === 'string'\n\t\t\t\t\t\t\t\t? newItem.title\n\t\t\t\t\t\t\t\t: newItem.title?.rendered;\n\t\t\t\t\t\tcreateSuccessNotice(\n\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t// translators: %s: Title of the created post e.g: \"Post 1\".\n\t\t\t\t\t\t\t\t__( '\"%s\" successfully created.' ),\n\t\t\t\t\t\t\t\ttitle\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\t\t\tid: 'duplicate-post-action',\n\t\t\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlabel: __( 'Edit' ),\n\t\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\t\tconst postId = newItem.id;\n\t\t\t\t\t\t\t\t\t\t\tdocument.location.href =\n\t\t\t\t\t\t\t\t\t\t\t\taddQueryArgs( 'post.php', {\n\t\t\t\t\t\t\t\t\t\t\t\t\tpost: postId,\n\t\t\t\t\t\t\t\t\t\t\t\t\taction: 'edit',\n\t\t\t\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t},\n\t\t[ createSuccessNotice ]\n\t);\n\n\treturn (\n\t\t<PluginSidebar\n\t\t\tidentifier={ tabName }\n\t\t\theader={\n\t\t\t\t<Tabs.Context.Provider value={ tabsContextValue }>\n\t\t\t\t\t<SettingsHeader ref={ tabListRef } />\n\t\t\t\t</Tabs.Context.Provider>\n\t\t\t}\n\t\t\tcloseLabel={ __( 'Close Settings' ) }\n\t\t\t// This classname is added so we can apply a corrective negative\n\t\t\t// margin to the panel.\n\t\t\t// see https://github.com/WordPress/gutenberg/pull/55360#pullrequestreview-1737671049\n\t\t\tclassName=\"edit-post-sidebar__panel\"\n\t\t\theaderClassName=\"edit-post-sidebar__panel-tabs\"\n\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\ttitle={ __( 'Settings' ) }\n\t\t\ttoggleShortcut={ keyboardShortcut }\n\t\t\ticon={ isRTL() ? drawerLeft : drawerRight }\n\t\t\tisActiveByDefault={ SIDEBAR_ACTIVE_BY_DEFAULT }\n\t\t>\n\t\t\t<Tabs.Context.Provider value={ tabsContextValue }>\n\t\t\t\t<Tabs.TabPanel tabId={ sidebars.document } focusable={ false }>\n\t\t\t\t\t<PostCardPanel\n\t\t\t\t\t\tactions={\n\t\t\t\t\t\t\t<PostActions\n\t\t\t\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t\t{ ! isEditingTemplate && <PostStatus /> }\n\t\t\t\t\t<PluginDocumentSettingPanel.Slot />\n\t\t\t\t\t<PostLastRevisionPanel />\n\t\t\t\t\t<PostTaxonomiesPanel />\n\t\t\t\t\t<PostDiscussionPanel />\n\t\t\t\t\t<PageAttributesPanel />\n\t\t\t\t\t<PatternOverridesPanel />\n\t\t\t\t\t{ ! isEditingTemplate && <MetaBoxes location=\"side\" /> }\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t<Tabs.TabPanel tabId={ sidebars.block } focusable={ false }>\n\t\t\t\t\t<BlockInspector />\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t</Tabs.Context.Provider>\n\t\t</PluginSidebar>\n\t);\n};\n\nconst SettingsSidebar = () => {\n\tuseAutoSwitchEditorSidebars();\n\tconst { tabName, keyboardShortcut, isEditingTemplate } = useSelect(\n\t\t( select ) => {\n\t\t\tconst shortcut = select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getShortcutRepresentation( 'core/editor/toggle-sidebar' );\n\n\t\t\tconst sidebar =\n\t\t\t\tselect( interfaceStore ).getActiveComplementaryArea( 'core' );\n\t\t\tconst _isEditorSidebarOpened = [\n\t\t\t\tsidebars.block,\n\t\t\t\tsidebars.document,\n\t\t\t].includes( sidebar );\n\t\t\tlet _tabName = sidebar;\n\t\t\tif ( ! _isEditorSidebarOpened ) {\n\t\t\t\t_tabName = !! select(\n\t\t\t\t\tblockEditorStore\n\t\t\t\t).getBlockSelectionStart()\n\t\t\t\t\t? sidebars.block\n\t\t\t\t\t: sidebars.document;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\ttabName: _tabName,\n\t\t\t\tkeyboardShortcut: shortcut,\n\t\t\t\tisEditingTemplate:\n\t\t\t\t\tselect( editorStore ).getCurrentPostType() ===\n\t\t\t\t\t'wp_template',\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst { openGeneralSidebar } = useDispatch( editPostStore );\n\n\tconst onTabSelect = useCallback(\n\t\t( newSelectedTabId ) => {\n\t\t\tif ( !! newSelectedTabId ) {\n\t\t\t\topenGeneralSidebar( newSelectedTabId );\n\t\t\t}\n\t\t},\n\t\t[ openGeneralSidebar ]\n\t);\n\n\treturn (\n\t\t<Tabs\n\t\t\tselectedTabId={ tabName }\n\t\t\tonSelect={ onTabSelect }\n\t\t\tselectOnMove={ false }\n\t\t>\n\t\t\t<SidebarContent\n\t\t\t\ttabName={ tabName }\n\t\t\t\tkeyboardShortcut={ keyboardShortcut }\n\t\t\t\tisEditingTemplate={ isEditingTemplate }\n\t\t\t/>\n\t\t</Tabs>\n\t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BAAkB;IACrCC,iBAAiB,EAAGA;EAAmB,CACvC,CACI,CAAC;AAET,CAAC;AAED,eAAeqD,eAAe","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["PostTextEditor","PostTitleRaw","store","editorStore","Button","useDispatch","useSelect","__","displayShortcut","useEffect","useRef","editPostStore","TextEditor","isRichEditingEnabled","select","getEditorSettings","richEditingEnabled","switchEditorMode","isWelcomeGuideVisible","isFeatureActive","titleRef","current","focus","createElement","className","variant","onClick","shortcut","secondary","ref"],"sources":["@wordpress/edit-post/src/components/text-editor/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tPostTextEditor,\n\tPostTitleRaw,\n\tstore as editorStore,\n} from '@wordpress/editor';\nimport { Button } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { useEffect, useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../store';\n\nexport default function TextEditor() {\n\tconst isRichEditingEnabled = useSelect( ( select ) => {\n\t\treturn select( editorStore ).getEditorSettings().richEditingEnabled;\n\t}, [] );\n\tconst { switchEditorMode } = useDispatch( editorStore );\n\n\tconst { isWelcomeGuideVisible } = useSelect( ( select ) => {\n\t\tconst { isFeatureActive } = select( editPostStore );\n\n\t\treturn {\n\t\t\tisWelcomeGuideVisible: isFeatureActive( 'welcomeGuide' ),\n\t\t};\n\t}, [] );\n\n\tconst titleRef = useRef();\n\n\tuseEffect( () => {\n\t\tif ( isWelcomeGuideVisible ) {\n\t\t\treturn;\n\t\t}\n\t\ttitleRef?.current?.focus();\n\t}, [ isWelcomeGuideVisible ] );\n\n\treturn (\n\t\t<div className=\"edit-post-text-editor\">\n\t\t\t{ isRichEditingEnabled && (\n\t\t\t\t<div className=\"edit-post-text-editor__toolbar\">\n\t\t\t\t\t<h2>{ __( 'Editing code' ) }</h2>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ () => switchEditorMode( 'visual' ) }\n\t\t\t\t\t\tshortcut={ displayShortcut.secondary( 'm' ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Exit code editor' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<div className=\"edit-post-text-editor__body\">\n\t\t\t\t<PostTitleRaw ref={ titleRef } />\n\t\t\t\t<PostTextEditor />\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,cAAc,EACdC,YAAY,EACZC,KAAK,IAAIC,WAAW,QACd,mBAAmB;AAC1B,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,eAAe,QAAQ,qBAAqB;AACrD,SAASC,SAAS,EAAEC,MAAM,QAAQ,oBAAoB;;AAEtD;AACA;AACA;AACA,SAASR,KAAK,IAAIS,aAAa,QAAQ,aAAa;AAEpD,eAAe,SAASC,UAAUA,CAAA,EAAG;EACpC,MAAMC,oBAAoB,GAAGP,SAAS,CAAIQ,MAAM,IAAM;IACrD,OAAOA,MAAM,CAAEX,WAAY,CAAC,CAACY,iBAAiB,CAAC,CAAC,CAACC,kBAAkB;EACpE,CAAC,EAAE,EAAG,CAAC;EACP,MAAM;IAAEC;EAAiB,CAAC,GAAGZ,WAAW,CAAEF,WAAY,CAAC;EAEvD,MAAM;IAAEe;EAAsB,CAAC,GAAGZ,SAAS,CAAIQ,MAAM,IAAM;IAC1D,MAAM;MAAEK;IAAgB,CAAC,GAAGL,MAAM,CAAEH,aAAc,CAAC;IAEnD,OAAO;MACNO,qBAAqB,EAAEC,eAAe,CAAE,cAAe;IACxD,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,MAAMC,QAAQ,GAAGV,MAAM,CAAC,CAAC;EAEzBD,SAAS,CAAE,MAAM;IAChB,IAAKS,qBAAqB,EAAG;MAC5B;IACD;IACAE,QAAQ,EAAEC,OAAO,EAAEC,KAAK,CAAC,CAAC;EAC3B,CAAC,EAAE,CAAEJ,qBAAqB,CAAG,CAAC;EAE9B,OACCK,aAAA;IAAKC,SAAS,EAAC;EAAuB,GACnCX,oBAAoB,IACrBU,aAAA;IAAKC,SAAS,EAAC;EAAgC,GAC9CD,aAAA,aAAMhB,EAAE,CAAE,cAAe,CAAO,CAAC,EACjCgB,aAAA,CAACnB,MAAM;IACNqB,OAAO,EAAC,UAAU;IAClBC,OAAO,EAAGA,CAAA,KAAMT,gBAAgB,CAAE,QAAS,CAAG;IAC9CU,QAAQ,EAAGnB,eAAe,CAACoB,SAAS,CAAE,GAAI;EAAG,GAE3CrB,EAAE,CAAE,kBAAmB,CAClB,CACJ,CACL,EACDgB,aAAA;IAAKC,SAAS,EAAC;EAA6B,GAC3CD,aAAA,CAACtB,YAAY;IAAC4B,GAAG,EAAGT;EAAU,CAAE,CAAC,EACjCG,aAAA,CAACvB,cAAc,MAAE,CACb,CACD,CAAC;AAER"}
1
+ {"version":3,"names":["PostTextEditor","PostTitleRaw","store","editorStore","Button","useDispatch","useSelect","__","displayShortcut","useEffect","useRef","editPostStore","TextEditor","isRichEditingEnabled","select","getEditorSettings","richEditingEnabled","switchEditorMode","isWelcomeGuideVisible","isFeatureActive","titleRef","current","focus","createElement","className","variant","onClick","shortcut","secondary","ref"],"sources":["@wordpress/edit-post/src/components/text-editor/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tPostTextEditor,\n\tPostTitleRaw,\n\tstore as editorStore,\n} from '@wordpress/editor';\nimport { Button } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { useEffect, useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../store';\n\nexport default function TextEditor() {\n\tconst isRichEditingEnabled = useSelect( ( select ) => {\n\t\treturn select( editorStore ).getEditorSettings().richEditingEnabled;\n\t}, [] );\n\tconst { switchEditorMode } = useDispatch( editorStore );\n\n\tconst { isWelcomeGuideVisible } = useSelect( ( select ) => {\n\t\tconst { isFeatureActive } = select( editPostStore );\n\n\t\treturn {\n\t\t\tisWelcomeGuideVisible: isFeatureActive( 'welcomeGuide' ),\n\t\t};\n\t}, [] );\n\n\tconst titleRef = useRef();\n\n\tuseEffect( () => {\n\t\tif ( isWelcomeGuideVisible ) {\n\t\t\treturn;\n\t\t}\n\t\ttitleRef?.current?.focus();\n\t}, [ isWelcomeGuideVisible ] );\n\n\treturn (\n\t\t<div className=\"edit-post-text-editor\">\n\t\t\t{ isRichEditingEnabled && (\n\t\t\t\t<div className=\"edit-post-text-editor__toolbar\">\n\t\t\t\t\t<h2>{ __( 'Editing code' ) }</h2>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ () => switchEditorMode( 'visual' ) }\n\t\t\t\t\t\tshortcut={ displayShortcut.secondary( 'm' ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Exit code editor' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<div className=\"edit-post-text-editor__body\">\n\t\t\t\t<PostTitleRaw ref={ titleRef } />\n\t\t\t\t<PostTextEditor />\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,cAAc,EACdC,YAAY,EACZC,KAAK,IAAIC,WAAW,QACd,mBAAmB;AAC1B,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,eAAe,QAAQ,qBAAqB;AACrD,SAASC,SAAS,EAAEC,MAAM,QAAQ,oBA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EAAGT;EAAU,CAAE,CAAC,EACjCG,aAAA,CAACvB,cAAc,MAAE,CACb,CACD,CAAC;AAER","ignoreList":[]}
@@ -21,7 +21,7 @@ export function BlockInspectorButton({
21
21
  shortcut,
22
22
  areAdvancedSettingsOpened
23
23
  } = useSelect(select => ({
24
- shortcut: select(keyboardShortcutsStore).getShortcutRepresentation('core/edit-post/toggle-sidebar'),
24
+ shortcut: select(keyboardShortcutsStore).getShortcutRepresentation('core/editor/toggle-sidebar'),
25
25
  areAdvancedSettingsOpened: select(editPostStore).getActiveGeneralSidebarName() === 'edit-post/block'
26
26
  }), []);
27
27
  const {
@@ -1 +1 @@
1
- {"version":3,"names":["__","MenuItem","useSelect","useDispatch","speak","store","keyboardShortcutsStore","editPostStore","noop","BlockInspectorButton","onClick","small","shortcut","areAdvancedSettingsOpened","select","getShortcutRepresentation","getActiveGeneralSidebarName","openGeneralSidebar","closeGeneralSidebar","label","createElement"],"sources":["@wordpress/edit-post/src/components/visual-editor/block-inspector-button.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { MenuItem } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { speak } from '@wordpress/a11y';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../store';\n\nconst noop = () => {};\n\nexport function BlockInspectorButton( { onClick = noop, small = false } ) {\n\tconst { shortcut, areAdvancedSettingsOpened } = useSelect(\n\t\t( select ) => ( {\n\t\t\tshortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getShortcutRepresentation( 'core/edit-post/toggle-sidebar' ),\n\t\t\tareAdvancedSettingsOpened:\n\t\t\t\tselect( editPostStore ).getActiveGeneralSidebarName() ===\n\t\t\t\t'edit-post/block',\n\t\t} ),\n\t\t[]\n\t);\n\tconst { openGeneralSidebar, closeGeneralSidebar } =\n\t\tuseDispatch( editPostStore );\n\n\tconst label = areAdvancedSettingsOpened\n\t\t? __( 'Hide more settings' )\n\t\t: __( 'Show more settings' );\n\n\treturn (\n\t\t<MenuItem\n\t\t\tonClick={ () => {\n\t\t\t\tif ( areAdvancedSettingsOpened ) {\n\t\t\t\t\tcloseGeneralSidebar();\n\t\t\t\t\tspeak( __( 'Block settings closed' ) );\n\t\t\t\t} else {\n\t\t\t\t\topenGeneralSidebar( 'edit-post/block' );\n\t\t\t\t\tspeak(\n\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t'Additional settings are now available in the Editor block settings sidebar'\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tonClick();\n\t\t\t} }\n\t\t\tshortcut={ shortcut }\n\t\t>\n\t\t\t{ ! small && label }\n\t\t</MenuItem>\n\t);\n}\n\nexport default BlockInspectorButton;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,QAAQ,QAAQ,uBAAuB;AAChD,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,KAAK,QAAQ,iBAAiB;AACvC,SAASC,KAAK,IAAIC,sBAAsB,QAAQ,+BAA+B;;AAE/E;AACA;AACA;AACA,SAASD,KAAK,IAAIE,aAAa,QAAQ,aAAa;AAEpD,MAAMC,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;AAErB,OAAO,SAASC,oBAAoBA,CAAE;EAAEC,OAAO,GAAGF,IAAI;EAAEG,KAAK,GAAG;AAAM,CAAC,EAAG;EACzE,MAAM;IAAEC,QAAQ;IAAEC;EAA0B,CAAC,GAAGX,SAAS,CACtDY,MAAM,KAAQ;IACfF,QAAQ,EAAEE,MAAM,CACfR,sBACD,CAAC,CAACS,yBAAyB,CAAE,+BAAgC,CAAC;IAC9DF,yBAAyB,EACxBC,MAAM,CAAEP,aAAc,CAAC,CAACS,2BAA2B,CAAC,CAAC,KACrD;EACF,CAAC,CAAE,EACH,EACD,CAAC;EACD,MAAM;IAAEC,kBAAkB;IAAEC;EAAoB,CAAC,GAChDf,WAAW,CAAEI,aAAc,CAAC;EAE7B,MAAMY,KAAK,GAAGN,yBAAyB,GACpCb,EAAE,CAAE,oBAAqB,CAAC,GAC1BA,EAAE,CAAE,oBAAqB,CAAC;EAE7B,OACCoB,aAAA,CAACnB,QAAQ;IACRS,OAAO,EAAGA,CAAA,KAAM;MACf,IAAKG,yBAAyB,EAAG;QAChCK,mBAAmB,CAAC,CAAC;QACrBd,KAAK,CAAEJ,EAAE,CAAE,uBAAwB,CAAE,CAAC;MACvC,CAAC,MAAM;QACNiB,kBAAkB,CAAE,iBAAkB,CAAC;QACvCb,KAAK,CACJJ,EAAE,CACD,4EACD,CACD,CAAC;MACF;MACAU,OAAO,CAAC,CAAC;IACV,CAAG;IACHE,QAAQ,EAAGA;EAAU,GAEnB,CAAED,KAAK,IAAIQ,KACJ,CAAC;AAEb;AAEA,eAAeV,oBAAoB"}
1
+ {"version":3,"names":["__","MenuItem","useSelect","useDispatch","speak","store","keyboardShortcutsStore","editPostStore","noop","BlockInspectorButton","onClick","small","shortcut","areAdvancedSettingsOpened","select","getShortcutRepresentation","getActiveGeneralSidebarName","openGeneralSidebar","closeGeneralSidebar","label","createElement"],"sources":["@wordpress/edit-post/src/components/visual-editor/block-inspector-button.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { MenuItem } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { speak } from '@wordpress/a11y';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../store';\n\nconst noop = () => {};\n\nexport function BlockInspectorButton( { onClick = noop, small = false } ) {\n\tconst { shortcut, areAdvancedSettingsOpened } = useSelect(\n\t\t( select ) => ( {\n\t\t\tshortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getShortcutRepresentation( 'core/editor/toggle-sidebar' ),\n\t\t\tareAdvancedSettingsOpened:\n\t\t\t\tselect( editPostStore ).getActiveGeneralSidebarName() ===\n\t\t\t\t'edit-post/block',\n\t\t} ),\n\t\t[]\n\t);\n\tconst { openGeneralSidebar, closeGeneralSidebar } =\n\t\tuseDispatch( editPostStore );\n\n\tconst label = areAdvancedSettingsOpened\n\t\t? __( 'Hide more settings' )\n\t\t: __( 'Show more settings' );\n\n\treturn (\n\t\t<MenuItem\n\t\t\tonClick={ () => {\n\t\t\t\tif ( areAdvancedSettingsOpened ) {\n\t\t\t\t\tcloseGeneralSidebar();\n\t\t\t\t\tspeak( __( 'Block settings closed' ) );\n\t\t\t\t} else {\n\t\t\t\t\topenGeneralSidebar( 'edit-post/block' );\n\t\t\t\t\tspeak(\n\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t'Additional settings are now available in the Editor block settings sidebar'\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tonClick();\n\t\t\t} }\n\t\t\tshortcut={ shortcut }\n\t\t>\n\t\t\t{ ! small && label }\n\t\t</MenuItem>\n\t);\n}\n\nexport default BlockInspectorButton;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,QAAQ,QAAQ,uBAAuB;AAChD,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,KAAK,QAAQ,iBAAiB;AACvC,SAASC,KAAK,IAAIC,sBAAsB,QAAQ,+BAA+B;;AAE/E;AACA;AACA;AACA,SAASD,KAAK,IAAIE,aAAa,QAAQ,aAAa;AAEpD,MAAMC,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;AAErB,OAAO,SAASC,oBAAoBA,CAAE;EAAEC,OAAO,GAAGF,IAAI;EAAEG,KAAK,GAAG;AAAM,CAAC,EAAG;EACzE,MAAM;IAAEC,QAAQ;IAAEC;EAA0B,CAAC,GAAGX,SAAS,CACtDY,MAAM,KAAQ;IACfF,QAAQ,EAAEE,MAAM,CACfR,sBACD,CAAC,CAACS,yBAAyB,CAAE,4BAA6B,CAAC;IAC3DF,yBAAyB,EACxBC,MAAM,CAAEP,aAAc,CAAC,CAACS,2BAA2B,CAAC,CAAC,KACrD;EACF,CAAC,CAAE,EACH,EACD,CAAC;EACD,MAAM;IAAEC,kBAAkB;IAAEC;EAAoB,CAAC,GAChDf,WAAW,CAAEI,aAAc,CAAC;EAE7B,MAAMY,KAAK,GAAGN,yBAAyB,GACpCb,EAAE,CAAE,oBAAqB,CAAC,GAC1BA,EAAE,CAAE,oBAAqB,CAAC;EAE7B,OACCoB,aAAA,CAACnB,QAAQ;IACRS,OAAO,EAAGA,CAAA,KAAM;MACf,IAAKG,yBAAyB,EAAG;QAChCK,mBAAmB,CAAC,CAAC;QACrBd,KAAK,CAAEJ,EAAE,CAAE,uBAAwB,CAAE,CAAC;MACvC,CAAC,MAAM;QACNiB,kBAAkB,CAAE,iBAAkB,CAAC;QACvCb,KAAK,CACJJ,EAAE,CACD,4EACD,CACD,CAAC;MACF;MACAU,OAAO,CAAC,CAAC;IACV,CAAG;IACHE,QAAQ,EAAGA;EAAU,GAEnB,CAAED,KAAK,IAAIQ,KACJ,CAAC;AAEb;AAEA,eAAeV,oBAAoB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["View","memo","__","withDispatch","withSelect","compose","withPreferredColorScheme","PostTitle","store","blockEditorStore","useEditorWrapperStyles","Header","EditorHeader","editTitle","setTitleRef","title","wrapperStyles","createElement","style","innerRef","onUpdate","placeholder","accessibilityLabel","prevProps","nextProps","select","getEditedPostAttribute","dispatch","editPost","clearSelectedBlock"],"sources":["@wordpress/edit-post/src/components/visual-editor/header.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { memo } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { withDispatch, withSelect } from '@wordpress/data';\nimport { compose, withPreferredColorScheme } from '@wordpress/compose';\nimport { PostTitle } from '@wordpress/editor';\nimport {\n\tstore as blockEditorStore,\n\tuseEditorWrapperStyles,\n} from '@wordpress/block-editor';\n\nconst Header = memo(\n\tfunction EditorHeader( { editTitle, setTitleRef, title } ) {\n\t\tconst [ wrapperStyles ] = useEditorWrapperStyles();\n\t\treturn (\n\t\t\t<View style={ wrapperStyles }>\n\t\t\t\t<PostTitle\n\t\t\t\t\tinnerRef={ setTitleRef }\n\t\t\t\t\ttitle={ title }\n\t\t\t\t\tonUpdate={ editTitle }\n\t\t\t\t\tplaceholder={ __( 'Add title' ) }\n\t\t\t\t\taccessibilityLabel=\"post-title\"\n\t\t\t\t/>\n\t\t\t</View>\n\t\t);\n\t},\n\t( prevProps, nextProps ) => prevProps.title === nextProps.title\n);\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute } = select( 'core/editor' );\n\n\t\treturn {\n\t\t\ttitle: getEditedPostAttribute( 'title' ),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst { editPost } = dispatch( 'core/editor' );\n\n\t\tconst { clearSelectedBlock } = dispatch( blockEditorStore );\n\n\t\treturn {\n\t\t\tclearSelectedBlock,\n\t\t\teditTitle( title ) {\n\t\t\t\teditPost( { title } );\n\t\t\t},\n\t\t};\n\t} ),\n\twithPreferredColorScheme,\n] )( Header );\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,IAAI,QAAQ,cAAc;;AAEnC;AACA;AACA;AACA,SAASC,IAAI,QAAQ,oBAAoB;AACzC,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,YAAY,EAAEC,UAAU,QAAQ,iBAAiB;AAC1D,SAASC,OAAO,EAAEC,wBAAwB,QAAQ,oBAAoB;AACtE,SAASC,SAAS,QAAQ,mBAAmB;AAC7C,SACCC,KAAK,IAAIC,gBAAgB,EACzBC,sBAAsB,QAChB,yBAAyB;AAEhC,MAAMC,MAAM,GAAGV,IAAI,CAClB,SAASW,YAAYA,CAAE;EAAEC,SAAS;EAAEC,WAAW;EAAEC;AAAM,CAAC,EAAG;EAC1D,MAAM,CAAEC,aAAa,CAAE,GAAGN,sBAAsB,CAAC,CAAC;EAClD,OACCO,aAAA,CAACjB,IAAI;IAACkB,KAAK,EAAGF;EAAe,GAC5BC,aAAA,CAACV,SAAS;IACTY,QAAQ,EAAGL,WAAa;IACxBC,KAAK,EAAGA,KAAO;IACfK,QAAQ,EAAGP,SAAW;IACtBQ,WAAW,EAAGnB,EAAE,CAAE,WAAY,CAAG;IACjCoB,kBAAkB,EAAC;EAAY,CAC/B,CACI,CAAC;AAET,CAAC,EACD,CAAEC,SAAS,EAAEC,SAAS,KAAMD,SAAS,CAACR,KAAK,KAAKS,SAAS,CAACT,KAC3D,CAAC;AAED,eAAeV,OAAO,CAAE,CACvBD,UAAU,CAAIqB,MAAM,IAAM;EACzB,MAAM;IAAEC;EAAuB,CAAC,GAAGD,MAAM,CAAE,aAAc,CAAC;EAE1D,OAAO;IACNV,KAAK,EAAEW,sBAAsB,CAAE,OAAQ;EACxC,CAAC;AACF,CAAE,CAAC,EACHvB,YAAY,CAAIwB,QAAQ,IAAM;EAC7B,MAAM;IAAEC;EAAS,CAAC,GAAGD,QAAQ,CAAE,aAAc,CAAC;EAE9C,MAAM;IAAEE;EAAmB,CAAC,GAAGF,QAAQ,CAAElB,gBAAiB,CAAC;EAE3D,OAAO;IACNoB,kBAAkB;IAClBhB,SAASA,CAAEE,KAAK,EAAG;MAClBa,QAAQ,CAAE;QAAEb;MAAM,CAAE,CAAC;IACtB;EACD,CAAC;AACF,CAAE,CAAC,EACHT,wBAAwB,CACvB,CAAC,CAAEK,MAAO,CAAC"}
1
+ {"version":3,"names":["View","memo","__","withDispatch","withSelect","compose","withPreferredColorScheme","PostTitle","store","blockEditorStore","useEditorWrapperStyles","Header","EditorHeader","editTitle","setTitleRef","title","wrapperStyles","createElement","style","innerRef","onUpdate","placeholder","accessibilityLabel","prevProps","nextProps","select","getEditedPostAttribute","dispatch","editPost","clearSelectedBlock"],"sources":["@wordpress/edit-post/src/components/visual-editor/header.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { memo } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { withDispatch, withSelect } from '@wordpress/data';\nimport { compose, withPreferredColorScheme } from '@wordpress/compose';\nimport { PostTitle } from '@wordpress/editor';\nimport {\n\tstore as blockEditorStore,\n\tuseEditorWrapperStyles,\n} from '@wordpress/block-editor';\n\nconst Header = memo(\n\tfunction EditorHeader( { editTitle, setTitleRef, title } ) {\n\t\tconst [ wrapperStyles ] = useEditorWrapperStyles();\n\t\treturn (\n\t\t\t<View style={ wrapperStyles }>\n\t\t\t\t<PostTitle\n\t\t\t\t\tinnerRef={ setTitleRef }\n\t\t\t\t\ttitle={ title }\n\t\t\t\t\tonUpdate={ editTitle }\n\t\t\t\t\tplaceholder={ __( 'Add title' ) }\n\t\t\t\t\taccessibilityLabel=\"post-title\"\n\t\t\t\t/>\n\t\t\t</View>\n\t\t);\n\t},\n\t( prevProps, nextProps ) => prevProps.title === nextProps.title\n);\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute } = select( 'core/editor' );\n\n\t\treturn {\n\t\t\ttitle: getEditedPostAttribute( 'title' ),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst { editPost } = dispatch( 'core/editor' );\n\n\t\tconst { clearSelectedBlock } = dispatch( blockEditorStore );\n\n\t\treturn {\n\t\t\tclearSelectedBlock,\n\t\t\teditTitle( title ) {\n\t\t\t\teditPost( { title } );\n\t\t\t},\n\t\t};\n\t} ),\n\twithPreferredColorScheme,\n] )( Header );\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,IAAI,QAAQ,cAAc;;AAEnC;AACA;AACA;AACA,SAASC,IAAI,QAAQ,oBAAoB;AACzC,SAASC,EAAE,QAAQ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C;AACF,CAAE,CAAC,EACHT,wBAAwB,CACvB,CAAC,CAAEK,MAAO,CAAC","ignoreList":[]}
@@ -17,6 +17,7 @@ import { store as blocksStore } from '@wordpress/blocks';
17
17
  */
18
18
  import { store as editPostStore } from '../../store';
19
19
  import { unlock } from '../../lock-unlock';
20
+ import { usePaddingAppender } from './use-padding-appender';
20
21
  const {
21
22
  EditorCanvas
22
23
  } = unlock(editorPrivateApis);
@@ -53,6 +54,7 @@ export default function VisualEditor({
53
54
  };
54
55
  }, []);
55
56
  const hasMetaBoxes = useSelect(select => select(editPostStore).hasMetaBoxes(), []);
57
+ const paddingAppenderRef = usePaddingAppender();
56
58
  let paddingBottom;
57
59
 
58
60
  // Add a constant padding for the typewritter effect. When typing at the
@@ -75,7 +77,8 @@ export default function VisualEditor({
75
77
  // We should auto-focus the canvas (title) on load.
76
78
  // eslint-disable-next-line jsx-a11y/no-autofocus
77
79
  ,
78
- autoFocus: !isWelcomeGuideVisible
80
+ autoFocus: !isWelcomeGuideVisible,
81
+ contentRef: paddingAppenderRef
79
82
  }));
80
83
  }
81
84
  //# sourceMappingURL=index.js.map