@wordpress/edit-post 7.10.0 → 7.12.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 (298) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/components/block-manager/category.js +14 -22
  3. package/build/components/block-manager/category.js.map +1 -1
  4. package/build/components/block-manager/checklist.js +6 -13
  5. package/build/components/block-manager/checklist.js.map +1 -1
  6. package/build/components/block-manager/index.js +10 -14
  7. package/build/components/block-manager/index.js.map +1 -1
  8. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js +21 -26
  9. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
  10. package/build/components/device-preview/index.js +1 -1
  11. package/build/components/device-preview/index.js.map +1 -1
  12. package/build/components/editor-initialization/index.js +3 -4
  13. package/build/components/editor-initialization/index.js.map +1 -1
  14. package/build/components/header/document-title/index.js +103 -0
  15. package/build/components/header/document-title/index.js.map +1 -0
  16. package/build/components/header/fullscreen-mode-close/index.js +8 -9
  17. package/build/components/header/fullscreen-mode-close/index.js.map +1 -1
  18. package/build/components/header/header-toolbar/index.js +4 -3
  19. package/build/components/header/header-toolbar/index.js.map +1 -1
  20. package/build/components/header/header-toolbar/index.native.js +12 -13
  21. package/build/components/header/header-toolbar/index.native.js.map +1 -1
  22. package/build/components/header/index.js +7 -6
  23. package/build/components/header/index.js.map +1 -1
  24. package/build/components/header/main-dashboard-button/index.js +3 -4
  25. package/build/components/header/main-dashboard-button/index.js.map +1 -1
  26. package/build/components/header/more-menu/index.js +19 -23
  27. package/build/components/header/more-menu/index.js.map +1 -1
  28. package/build/components/header/post-publish-button-or-toggle.js +15 -16
  29. package/build/components/header/post-publish-button-or-toggle.js.map +1 -1
  30. package/build/components/header/tools-more-menu-group/index.js +7 -10
  31. package/build/components/header/tools-more-menu-group/index.js.map +1 -1
  32. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +3 -4
  33. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  34. package/build/components/keyboard-shortcut-help-modal/index.js +44 -54
  35. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  36. package/build/components/keyboard-shortcut-help-modal/shortcut.js +10 -12
  37. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  38. package/build/components/layout/actions-panel.js +5 -6
  39. package/build/components/layout/actions-panel.js.map +1 -1
  40. package/build/components/layout/index.js +3 -4
  41. package/build/components/layout/index.js.map +1 -1
  42. package/build/components/layout/index.native.js +3 -7
  43. package/build/components/layout/index.native.js.map +1 -1
  44. package/build/components/meta-boxes/index.js +9 -13
  45. package/build/components/meta-boxes/index.js.map +1 -1
  46. package/build/components/meta-boxes/meta-box-visibility.js +5 -8
  47. package/build/components/meta-boxes/meta-box-visibility.js.map +1 -1
  48. package/build/components/meta-boxes/meta-boxes-area/index.js +3 -4
  49. package/build/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
  50. package/build/components/preferences-modal/meta-boxes-section.js +16 -23
  51. package/build/components/preferences-modal/meta-boxes-section.js.map +1 -1
  52. package/build/components/preferences-modal/options/enable-custom-fields.js +7 -9
  53. package/build/components/preferences-modal/options/enable-custom-fields.js.map +1 -1
  54. package/build/components/preferences-modal/options/enable-feature.js +12 -16
  55. package/build/components/preferences-modal/options/enable-feature.js.map +1 -1
  56. package/build/components/preferences-modal/options/enable-panel.js +10 -17
  57. package/build/components/preferences-modal/options/enable-panel.js.map +1 -1
  58. package/build/components/preferences-modal/options/enable-plugin-document-setting-panel.js +7 -10
  59. package/build/components/preferences-modal/options/enable-plugin-document-setting-panel.js.map +1 -1
  60. package/build/components/secondary-sidebar/list-view-sidebar.js +58 -44
  61. package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  62. package/build/components/sidebar/discussion-panel/index.js +5 -7
  63. package/build/components/sidebar/discussion-panel/index.js.map +1 -1
  64. package/build/components/sidebar/featured-image/index.js +9 -17
  65. package/build/components/sidebar/featured-image/index.js.map +1 -1
  66. package/build/components/sidebar/page-attributes/index.js +3 -9
  67. package/build/components/sidebar/page-attributes/index.js.map +1 -1
  68. package/build/components/sidebar/plugin-document-setting-panel/index.js +20 -25
  69. package/build/components/sidebar/plugin-document-setting-panel/index.js.map +1 -1
  70. package/build/components/sidebar/plugin-post-publish-panel/index.js +12 -15
  71. package/build/components/sidebar/plugin-post-publish-panel/index.js.map +1 -1
  72. package/build/components/sidebar/plugin-post-status-info/index.js +6 -9
  73. package/build/components/sidebar/plugin-post-status-info/index.js.map +1 -1
  74. package/build/components/sidebar/plugin-pre-publish-panel/index.js +12 -15
  75. package/build/components/sidebar/plugin-pre-publish-panel/index.js.map +1 -1
  76. package/build/components/sidebar/plugin-sidebar/index.js +4 -5
  77. package/build/components/sidebar/plugin-sidebar/index.js.map +1 -1
  78. package/build/components/sidebar/post-excerpt/index.js +5 -7
  79. package/build/components/sidebar/post-excerpt/index.js.map +1 -1
  80. package/build/components/sidebar/post-schedule/index.js +16 -23
  81. package/build/components/sidebar/post-schedule/index.js.map +1 -1
  82. package/build/components/sidebar/post-status/index.js +7 -11
  83. package/build/components/sidebar/post-status/index.js.map +1 -1
  84. package/build/components/sidebar/post-taxonomies/taxonomy-panel.js +9 -15
  85. package/build/components/sidebar/post-taxonomies/taxonomy-panel.js.map +1 -1
  86. package/build/components/sidebar/post-template/create-modal.js +3 -4
  87. package/build/components/sidebar/post-template/create-modal.js.map +1 -1
  88. package/build/components/sidebar/post-template/form.js +13 -20
  89. package/build/components/sidebar/post-template/form.js.map +1 -1
  90. package/build/components/sidebar/post-template/index.js +18 -25
  91. package/build/components/sidebar/post-template/index.js.map +1 -1
  92. package/build/components/sidebar/post-url/index.js +16 -23
  93. package/build/components/sidebar/post-url/index.js.map +1 -1
  94. package/build/components/sidebar/post-visibility/index.js +26 -36
  95. package/build/components/sidebar/post-visibility/index.js.map +1 -1
  96. package/build/components/sidebar/settings-header/index.js +3 -4
  97. package/build/components/sidebar/settings-header/index.js.map +1 -1
  98. package/build/components/sidebar/template-summary/index.js +1 -1
  99. package/build/components/sidebar/template-summary/index.js.map +1 -1
  100. package/build/components/start-page-options/index.js +3 -4
  101. package/build/components/start-page-options/index.js.map +1 -1
  102. package/build/components/view-link/index.js +1 -1
  103. package/build/components/view-link/index.js.map +1 -1
  104. package/build/components/visual-editor/block-inspector-button.js +4 -5
  105. package/build/components/visual-editor/block-inspector-button.js.map +1 -1
  106. package/build/components/visual-editor/header.native.js +6 -7
  107. package/build/components/visual-editor/header.native.js.map +1 -1
  108. package/build/components/visual-editor/index.js +32 -48
  109. package/build/components/visual-editor/index.js.map +1 -1
  110. package/build/components/welcome-guide/image.js +4 -5
  111. package/build/components/welcome-guide/image.js.map +1 -1
  112. package/build/editor.js +15 -23
  113. package/build/editor.js.map +1 -1
  114. package/build/editor.native.js +3 -6
  115. package/build/editor.native.js.map +1 -1
  116. package/build/hooks/validate-multiple-use/index.js +18 -29
  117. package/build/hooks/validate-multiple-use/index.js.map +1 -1
  118. package/build/index.js +2 -2
  119. package/build/index.js.map +1 -1
  120. package/build/plugins/index.js +20 -23
  121. package/build/plugins/index.js.map +1 -1
  122. package/build/plugins/keyboard-shortcuts-help-menu-item/index.js +3 -4
  123. package/build/plugins/keyboard-shortcuts-help-menu-item/index.js.map +1 -1
  124. package/build/store/actions.js +60 -88
  125. package/build/store/actions.js.map +1 -1
  126. package/build/store/reducer.js +11 -43
  127. package/build/store/reducer.js.map +1 -1
  128. package/build/store/selectors.js +11 -16
  129. package/build/store/selectors.js.map +1 -1
  130. package/build-module/components/block-manager/category.js +14 -22
  131. package/build-module/components/block-manager/category.js.map +1 -1
  132. package/build-module/components/block-manager/checklist.js +6 -13
  133. package/build-module/components/block-manager/checklist.js.map +1 -1
  134. package/build-module/components/block-manager/index.js +10 -14
  135. package/build-module/components/block-manager/index.js.map +1 -1
  136. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js +21 -26
  137. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
  138. package/build-module/components/device-preview/index.js +1 -1
  139. package/build-module/components/device-preview/index.js.map +1 -1
  140. package/build-module/components/editor-initialization/index.js +3 -4
  141. package/build-module/components/editor-initialization/index.js.map +1 -1
  142. package/build-module/components/header/document-title/index.js +88 -0
  143. package/build-module/components/header/document-title/index.js.map +1 -0
  144. package/build-module/components/header/fullscreen-mode-close/index.js +7 -8
  145. package/build-module/components/header/fullscreen-mode-close/index.js.map +1 -1
  146. package/build-module/components/header/header-toolbar/index.js +3 -3
  147. package/build-module/components/header/header-toolbar/index.js.map +1 -1
  148. package/build-module/components/header/header-toolbar/index.native.js +12 -13
  149. package/build-module/components/header/header-toolbar/index.native.js.map +1 -1
  150. package/build-module/components/header/index.js +7 -6
  151. package/build-module/components/header/index.js.map +1 -1
  152. package/build-module/components/header/main-dashboard-button/index.js +3 -4
  153. package/build-module/components/header/main-dashboard-button/index.js.map +1 -1
  154. package/build-module/components/header/more-menu/index.js +19 -23
  155. package/build-module/components/header/more-menu/index.js.map +1 -1
  156. package/build-module/components/header/post-publish-button-or-toggle.js +15 -16
  157. package/build-module/components/header/post-publish-button-or-toggle.js.map +1 -1
  158. package/build-module/components/header/tools-more-menu-group/index.js +7 -10
  159. package/build-module/components/header/tools-more-menu-group/index.js.map +1 -1
  160. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +3 -4
  161. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  162. package/build-module/components/keyboard-shortcut-help-modal/index.js +42 -52
  163. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  164. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +10 -12
  165. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  166. package/build-module/components/layout/actions-panel.js +5 -6
  167. package/build-module/components/layout/actions-panel.js.map +1 -1
  168. package/build-module/components/layout/index.js +3 -4
  169. package/build-module/components/layout/index.js.map +1 -1
  170. package/build-module/components/layout/index.native.js +3 -7
  171. package/build-module/components/layout/index.native.js.map +1 -1
  172. package/build-module/components/meta-boxes/index.js +9 -13
  173. package/build-module/components/meta-boxes/index.js.map +1 -1
  174. package/build-module/components/meta-boxes/meta-box-visibility.js +5 -8
  175. package/build-module/components/meta-boxes/meta-box-visibility.js.map +1 -1
  176. package/build-module/components/meta-boxes/meta-boxes-area/index.js +3 -4
  177. package/build-module/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
  178. package/build-module/components/preferences-modal/meta-boxes-section.js +16 -23
  179. package/build-module/components/preferences-modal/meta-boxes-section.js.map +1 -1
  180. package/build-module/components/preferences-modal/options/enable-custom-fields.js +7 -9
  181. package/build-module/components/preferences-modal/options/enable-custom-fields.js.map +1 -1
  182. package/build-module/components/preferences-modal/options/enable-feature.js +12 -16
  183. package/build-module/components/preferences-modal/options/enable-feature.js.map +1 -1
  184. package/build-module/components/preferences-modal/options/enable-panel.js +10 -17
  185. package/build-module/components/preferences-modal/options/enable-panel.js.map +1 -1
  186. package/build-module/components/preferences-modal/options/enable-plugin-document-setting-panel.js +7 -10
  187. package/build-module/components/preferences-modal/options/enable-plugin-document-setting-panel.js.map +1 -1
  188. package/build-module/components/secondary-sidebar/list-view-sidebar.js +58 -44
  189. package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  190. package/build-module/components/sidebar/discussion-panel/index.js +5 -7
  191. package/build-module/components/sidebar/discussion-panel/index.js.map +1 -1
  192. package/build-module/components/sidebar/featured-image/index.js +9 -17
  193. package/build-module/components/sidebar/featured-image/index.js.map +1 -1
  194. package/build-module/components/sidebar/page-attributes/index.js +3 -9
  195. package/build-module/components/sidebar/page-attributes/index.js.map +1 -1
  196. package/build-module/components/sidebar/plugin-document-setting-panel/index.js +20 -25
  197. package/build-module/components/sidebar/plugin-document-setting-panel/index.js.map +1 -1
  198. package/build-module/components/sidebar/plugin-post-publish-panel/index.js +12 -15
  199. package/build-module/components/sidebar/plugin-post-publish-panel/index.js.map +1 -1
  200. package/build-module/components/sidebar/plugin-post-status-info/index.js +6 -9
  201. package/build-module/components/sidebar/plugin-post-status-info/index.js.map +1 -1
  202. package/build-module/components/sidebar/plugin-pre-publish-panel/index.js +12 -15
  203. package/build-module/components/sidebar/plugin-pre-publish-panel/index.js.map +1 -1
  204. package/build-module/components/sidebar/plugin-sidebar/index.js +4 -5
  205. package/build-module/components/sidebar/plugin-sidebar/index.js.map +1 -1
  206. package/build-module/components/sidebar/post-excerpt/index.js +5 -7
  207. package/build-module/components/sidebar/post-excerpt/index.js.map +1 -1
  208. package/build-module/components/sidebar/post-schedule/index.js +16 -23
  209. package/build-module/components/sidebar/post-schedule/index.js.map +1 -1
  210. package/build-module/components/sidebar/post-status/index.js +7 -11
  211. package/build-module/components/sidebar/post-status/index.js.map +1 -1
  212. package/build-module/components/sidebar/post-taxonomies/taxonomy-panel.js +9 -15
  213. package/build-module/components/sidebar/post-taxonomies/taxonomy-panel.js.map +1 -1
  214. package/build-module/components/sidebar/post-template/create-modal.js +3 -4
  215. package/build-module/components/sidebar/post-template/create-modal.js.map +1 -1
  216. package/build-module/components/sidebar/post-template/form.js +13 -20
  217. package/build-module/components/sidebar/post-template/form.js.map +1 -1
  218. package/build-module/components/sidebar/post-template/index.js +18 -25
  219. package/build-module/components/sidebar/post-template/index.js.map +1 -1
  220. package/build-module/components/sidebar/post-url/index.js +16 -23
  221. package/build-module/components/sidebar/post-url/index.js.map +1 -1
  222. package/build-module/components/sidebar/post-visibility/index.js +26 -36
  223. package/build-module/components/sidebar/post-visibility/index.js.map +1 -1
  224. package/build-module/components/sidebar/settings-header/index.js +3 -4
  225. package/build-module/components/sidebar/settings-header/index.js.map +1 -1
  226. package/build-module/components/sidebar/template-summary/index.js +1 -1
  227. package/build-module/components/sidebar/template-summary/index.js.map +1 -1
  228. package/build-module/components/start-page-options/index.js +3 -4
  229. package/build-module/components/start-page-options/index.js.map +1 -1
  230. package/build-module/components/view-link/index.js +1 -1
  231. package/build-module/components/view-link/index.js.map +1 -1
  232. package/build-module/components/visual-editor/block-inspector-button.js +4 -5
  233. package/build-module/components/visual-editor/block-inspector-button.js.map +1 -1
  234. package/build-module/components/visual-editor/header.native.js +6 -7
  235. package/build-module/components/visual-editor/header.native.js.map +1 -1
  236. package/build-module/components/visual-editor/index.js +35 -49
  237. package/build-module/components/visual-editor/index.js.map +1 -1
  238. package/build-module/components/welcome-guide/image.js +4 -5
  239. package/build-module/components/welcome-guide/image.js.map +1 -1
  240. package/build-module/editor.js +15 -23
  241. package/build-module/editor.js.map +1 -1
  242. package/build-module/editor.native.js +3 -6
  243. package/build-module/editor.native.js.map +1 -1
  244. package/build-module/hooks/validate-multiple-use/index.js +18 -29
  245. package/build-module/hooks/validate-multiple-use/index.js.map +1 -1
  246. package/build-module/index.js +2 -2
  247. package/build-module/index.js.map +1 -1
  248. package/build-module/plugins/index.js +20 -23
  249. package/build-module/plugins/index.js.map +1 -1
  250. package/build-module/plugins/keyboard-shortcuts-help-menu-item/index.js +3 -4
  251. package/build-module/plugins/keyboard-shortcuts-help-menu-item/index.js.map +1 -1
  252. package/build-module/store/actions.js +60 -88
  253. package/build-module/store/actions.js.map +1 -1
  254. package/build-module/store/reducer.js +11 -43
  255. package/build-module/store/reducer.js.map +1 -1
  256. package/build-module/store/selectors.js +11 -16
  257. package/build-module/store/selectors.js.map +1 -1
  258. package/build-style/classic-rtl.css +1 -1
  259. package/build-style/classic.css +1 -1
  260. package/build-style/style-rtl.css +74 -114
  261. package/build-style/style.css +74 -114
  262. package/package.json +33 -33
  263. package/src/components/header/document-title/index.js +86 -0
  264. package/src/components/header/document-title/style.scss +61 -0
  265. package/src/components/header/header-toolbar/index.js +2 -2
  266. package/src/components/header/header-toolbar/style.scss +0 -1
  267. package/src/components/header/index.js +4 -2
  268. package/src/components/header/style.scss +6 -0
  269. package/src/components/keyboard-shortcut-help-modal/test/__snapshots__/index.js.snap +1 -3
  270. package/src/components/preferences-modal/test/__snapshots__/index.js.snap +2 -6
  271. package/src/components/secondary-sidebar/list-view-sidebar.js +68 -66
  272. package/src/components/secondary-sidebar/style.scss +28 -31
  273. package/src/components/visual-editor/index.js +10 -21
  274. package/src/components/visual-editor/style.scss +0 -13
  275. package/src/editor.js +1 -3
  276. package/src/index.js +3 -2
  277. package/src/style.scss +1 -1
  278. package/build/components/header/template-title/delete-template.js +0 -117
  279. package/build/components/header/template-title/delete-template.js.map +0 -1
  280. package/build/components/header/template-title/edit-template-title.js +0 -95
  281. package/build/components/header/template-title/edit-template-title.js.map +0 -1
  282. package/build/components/header/template-title/index.js +0 -124
  283. package/build/components/header/template-title/index.js.map +0 -1
  284. package/build/components/header/template-title/template-description.js +0 -55
  285. package/build/components/header/template-title/template-description.js.map +0 -1
  286. package/build-module/components/header/template-title/delete-template.js +0 -104
  287. package/build-module/components/header/template-title/delete-template.js.map +0 -1
  288. package/build-module/components/header/template-title/edit-template-title.js +0 -83
  289. package/build-module/components/header/template-title/edit-template-title.js.map +0 -1
  290. package/build-module/components/header/template-title/index.js +0 -105
  291. package/build-module/components/header/template-title/index.js.map +0 -1
  292. package/build-module/components/header/template-title/template-description.js +0 -45
  293. package/build-module/components/header/template-title/template-description.js.map +0 -1
  294. package/src/components/header/template-title/delete-template.js +0 -106
  295. package/src/components/header/template-title/edit-template-title.js +0 -78
  296. package/src/components/header/template-title/index.js +0 -115
  297. package/src/components/header/template-title/style.scss +0 -94
  298. package/src/components/header/template-title/template-description.js +0 -42
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/header/header-toolbar/index.js"],"names":["preventDefault","event","HeaderToolbar","inserterButton","setIsInserterOpened","setIsListViewOpened","editPostStore","isInserterEnabled","isInserterOpened","isTextModeEnabled","showIconLabels","isListViewOpen","listViewShortcut","select","hasInserterItems","getBlockRootClientId","getBlockSelectionEnd","blockEditorStore","getEditorSettings","editorStore","getEditorMode","isFeatureActive","isListViewOpened","getShortcutRepresentation","keyboardShortcutsStore","richEditingEnabled","useShouldContextualToolbarShow","blockEditorPrivateApis","isLargeViewport","isWideViewport","shouldShowContextualToolbar","canFocusHiddenToolbar","fixedToolbarCanBeFocused","blockToolbarCanBeFocused","toolbarAriaLabel","toggleListView","overflowItems","Button","listView","undefined","toggleInserter","current","focus","longLabel","shortLabel","plus","ToolSelector","EditorHistoryUndo","EditorHistoryRedo"],"mappings":";;;;;;;AAmBA;;AAhBA;;AACA;;AACA;;AACA;;AAMA;;AAKA;;AACA;;AAEA;;AAKA;;AACA;;AA1BA;AACA;AACA;;AAoBA;AACA;AACA;AAIA,MAAMA,cAAc,GAAKC,KAAF,IAAa;AACnCA,EAAAA,KAAK,CAACD,cAAN;AACA,CAFD;;AAIA,SAASE,aAAT,GAAyB;AACxB,QAAMC,cAAc,GAAG,sBAAvB;AACA,QAAM;AAAEC,IAAAA,mBAAF;AAAuBC,IAAAA;AAAvB,MACL,uBAAaC,YAAb,CADD;AAEA,QAAM;AACLC,IAAAA,iBADK;AAELC,IAAAA,gBAFK;AAGLC,IAAAA,iBAHK;AAILC,IAAAA,cAJK;AAKLC,IAAAA,cALK;AAMLC,IAAAA;AANK,MAOF,qBAAaC,MAAF,IAAc;AAC5B,UAAM;AAAEC,MAAAA,gBAAF;AAAoBC,MAAAA,oBAApB;AAA0CC,MAAAA;AAA1C,QACLH,MAAM,CAAEI,kBAAF,CADP;AAEA,UAAM;AAAEC,MAAAA;AAAF,QAAwBL,MAAM,CAAEM,aAAF,CAApC;AACA,UAAM;AAAEC,MAAAA,aAAF;AAAiBC,MAAAA,eAAjB;AAAkCC,MAAAA;AAAlC,QACLT,MAAM,CAAEP,YAAF,CADP;AAEA,UAAM;AAAEiB,MAAAA;AAAF,QAAgCV,MAAM,CAAEW,wBAAF,CAA5C;AAEA,WAAO;AACN;AACAjB,MAAAA,iBAAiB,EAChBa,aAAa,OAAO,QAApB,IACAF,iBAAiB,GAAGO,kBADpB,IAEAX,gBAAgB,CACfC,oBAAoB,CAAEC,oBAAoB,EAAtB,CADL,CALX;AAQNR,MAAAA,gBAAgB,EAAEK,MAAM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,UAAH,GAAgB6B,SAJhC;AAMC,IAAA,QAAQ,EAAG9B;AANZ,IAFF,EAWC,4BAAC,uBAAD;AACC,IAAA,EAAE,EAAGsC,yBADN;AAEC,IAAA,WAAW,EAAG,CAAErC,cAFjB;AAGC,IAAA,OAAO,EAAGA,cAAc,GAAG,UAAH,GAAgB6B;AAHzC,IAXD,EAgBC,4BAAC,uBAAD;AACC,IAAA,EAAE,EAAGS,yBADN;AAEC,IAAA,WAAW,EAAG,CAAEtC,cAFjB;AAGC,IAAA,OAAO,EAAGA,cAAc,GAAG,UAAH,GAAgB6B;AAHzC,IAhBD,EAqBGH,aArBH,CAfF,CALD,CADD;AAgDA;;eAEclC,a","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\tNavigableToolbar,\n\tToolSelector,\n\tstore as blockEditorStore,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport {\n\tEditorHistoryRedo,\n\tEditorHistoryUndo,\n\tstore as editorStore,\n} from '@wordpress/editor';\nimport { Button, ToolbarItem } from '@wordpress/components';\nimport { listView, plus } from '@wordpress/icons';\nimport { useRef, useCallback } from '@wordpress/element';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../../store';\nimport { unlock } from '../../../private-apis';\n\nconst preventDefault = ( event ) => {\n\tevent.preventDefault();\n};\n\nfunction HeaderToolbar() {\n\tconst inserterButton = useRef();\n\tconst { setIsInserterOpened, setIsListViewOpened } =\n\t\tuseDispatch( editPostStore );\n\tconst {\n\t\tisInserterEnabled,\n\t\tisInserterOpened,\n\t\tisTextModeEnabled,\n\t\tshowIconLabels,\n\t\tisListViewOpen,\n\t\tlistViewShortcut,\n\t} = useSelect( ( select ) => {\n\t\tconst { hasInserterItems, getBlockRootClientId, getBlockSelectionEnd } =\n\t\t\tselect( blockEditorStore );\n\t\tconst { getEditorSettings } = select( editorStore );\n\t\tconst { getEditorMode, isFeatureActive, isListViewOpened } =\n\t\t\tselect( editPostStore );\n\t\tconst { getShortcutRepresentation } = select( keyboardShortcutsStore );\n\n\t\treturn {\n\t\t\t// This setting (richEditingEnabled) should not live in the block editor's setting.\n\t\t\tisInserterEnabled:\n\t\t\t\tgetEditorMode() === 'visual' &&\n\t\t\t\tgetEditorSettings().richEditingEnabled &&\n\t\t\t\thasInserterItems(\n\t\t\t\t\tgetBlockRootClientId( getBlockSelectionEnd() )\n\t\t\t\t),\n\t\t\tisInserterOpened: select( editPostStore ).isInserterOpened(),\n\t\t\tisTextModeEnabled: getEditorMode() === 'text',\n\t\t\tshowIconLabels: isFeatureActive( 'showIconLabels' ),\n\t\t\tisListViewOpen: isListViewOpened(),\n\t\t\tlistViewShortcut: getShortcutRepresentation(\n\t\t\t\t'core/edit-post/toggle-list-view'\n\t\t\t),\n\t\t};\n\t}, [] );\n\n\tconst { useShouldContextualToolbarShow } = unlock( blockEditorPrivateApis );\n\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst isWideViewport = useViewportMatch( 'wide' );\n\tconst {\n\t\tshouldShowContextualToolbar,\n\t\tcanFocusHiddenToolbar,\n\t\tfixedToolbarCanBeFocused,\n\t} = useShouldContextualToolbarShow();\n\t// If there's a block toolbar to be focused, disable the focus shortcut for the document toolbar.\n\t// There's a fixed block toolbar when the fixed toolbar option is enabled or when the browser width is less than the large viewport.\n\tconst blockToolbarCanBeFocused =\n\t\tshouldShowContextualToolbar ||\n\t\tcanFocusHiddenToolbar ||\n\t\tfixedToolbarCanBeFocused;\n\t/* translators: accessibility text for the editor toolbar */\n\tconst toolbarAriaLabel = __( 'Document tools' );\n\n\tconst toggleListView = useCallback(\n\t\t() => setIsListViewOpened( ! isListViewOpen ),\n\t\t[ setIsListViewOpened, isListViewOpen ]\n\t);\n\tconst overflowItems = (\n\t\t<>\n\t\t\t<ToolbarItem\n\t\t\t\tas={ Button }\n\t\t\t\tclassName=\"edit-post-header-toolbar__document-overview-toggle\"\n\t\t\t\ticon={ listView }\n\t\t\t\tdisabled={ isTextModeEnabled }\n\t\t\t\tisPressed={ isListViewOpen }\n\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\tlabel={ __( 'Document Overview' ) }\n\t\t\t\tonClick={ toggleListView }\n\t\t\t\tshortcut={ listViewShortcut }\n\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\tvariant={ showIconLabels ? 'tertiary' : undefined }\n\t\t\t/>\n\t\t</>\n\t);\n\tconst toggleInserter = useCallback( () => {\n\t\tif ( isInserterOpened ) {\n\t\t\t// Focusing the inserter button should close the inserter popover.\n\t\t\t// However, there are some cases it won't close when the focus is lost.\n\t\t\t// See https://github.com/WordPress/gutenberg/issues/43090 for more details.\n\t\t\tinserterButton.current.focus();\n\t\t\tsetIsInserterOpened( false );\n\t\t} else {\n\t\t\tsetIsInserterOpened( true );\n\t\t}\n\t}, [ isInserterOpened, setIsInserterOpened ] );\n\n\t/* translators: button label text should, if possible, be under 16 characters. */\n\tconst longLabel = _x(\n\t\t'Toggle block inserter',\n\t\t'Generic label for block inserter button'\n\t);\n\tconst shortLabel = ! isInserterOpened ? __( 'Add' ) : __( 'Close' );\n\n\treturn (\n\t\t<NavigableToolbar\n\t\t\tclassName=\"edit-post-header-toolbar\"\n\t\t\taria-label={ toolbarAriaLabel }\n\t\t\tshouldUseKeyboardFocusShortcut={ ! blockToolbarCanBeFocused }\n\t\t>\n\t\t\t<div className=\"edit-post-header-toolbar__left\">\n\t\t\t\t<ToolbarItem\n\t\t\t\t\tref={ inserterButton }\n\t\t\t\t\tas={ Button }\n\t\t\t\t\tclassName=\"edit-post-header-toolbar__inserter-toggle\"\n\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\tisPressed={ isInserterOpened }\n\t\t\t\t\tonMouseDown={ preventDefault }\n\t\t\t\t\tonClick={ toggleInserter }\n\t\t\t\t\tdisabled={ ! isInserterEnabled }\n\t\t\t\t\ticon={ plus }\n\t\t\t\t\tlabel={ showIconLabels ? shortLabel : longLabel }\n\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t/>\n\t\t\t\t{ ( isWideViewport || ! showIconLabels ) && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ isLargeViewport && (\n\t\t\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\t\t\tas={ ToolSelector }\n\t\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\tshowIconLabels ? 'tertiary' : undefined\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdisabled={ isTextModeEnabled }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\t\tas={ EditorHistoryUndo }\n\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\tvariant={ showIconLabels ? 'tertiary' : undefined }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\t\tas={ EditorHistoryRedo }\n\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\tvariant={ showIconLabels ? 'tertiary' : undefined }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{ overflowItems }\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</NavigableToolbar>\n\t);\n}\n\nexport default HeaderToolbar;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/components/header/header-toolbar/index.js"],"names":["useShouldContextualToolbarShow","blockEditorPrivateApis","preventDefault","event","HeaderToolbar","inserterButton","setIsInserterOpened","setIsListViewOpened","editPostStore","isInserterEnabled","isInserterOpened","isTextModeEnabled","showIconLabels","isListViewOpen","listViewShortcut","select","hasInserterItems","getBlockRootClientId","getBlockSelectionEnd","blockEditorStore","getEditorSettings","editorStore","getEditorMode","isFeatureActive","isListViewOpened","getShortcutRepresentation","keyboardShortcutsStore","richEditingEnabled","isLargeViewport","isWideViewport","shouldShowContextualToolbar","canFocusHiddenToolbar","fixedToolbarCanBeFocused","blockToolbarCanBeFocused","toolbarAriaLabel","toggleListView","overflowItems","Button","listView","undefined","toggleInserter","current","focus","longLabel","shortLabel","plus","ToolSelector","EditorHistoryUndo","EditorHistoryRedo"],"mappings":";;;;;;;AAmBA;;AAhBA;;AACA;;AACA;;AACA;;AAMA;;AAKA;;AACA;;AAEA;;AAKA;;AACA;;AA1BA;AACA;AACA;;AAoBA;AACA;AACA;AAIA,MAAM;AAAEA,EAAAA;AAAF,IAAqC,yBAAQC,wBAAR,CAA3C;;AAEA,MAAMC,cAAc,GAAKC,KAAF,IAAa;AACnCA,EAAAA,KAAK,CAACD,cAAN;AACA,CAFD;;AAIA,SAASE,aAAT,GAAyB;AACxB,QAAMC,cAAc,GAAG,sBAAvB;AACA,QAAM;AAAEC,IAAAA,mBAAF;AAAuBC,IAAAA;AAAvB,MACL,uBAAaC,YAAb,CADD;AAEA,QAAM;AACLC,IAAAA,iBADK;AAELC,IAAAA,gBAFK;AAGLC,IAAAA,iBAHK;AAILC,IAAAA,cAJK;AAKLC,IAAAA,cALK;AAMLC,IAAAA;AANK,MAOF,qBAAaC,MAAF,IAAc;AAC5B,UAAM;AAAEC,MAAAA,gBAAF;AAAoBC,MAAAA,oBAApB;AAA0CC,MAAAA;AAA1C,QACLH,MAAM,CAAEI,kBAAF,CADP;AAEA,UAAM;AAAEC,MAAAA;AAAF,QAAwBL,MAAM,CAAEM,aAAF,CAApC;AACA,UAAM;AAAEC,MAAAA,aAAF;AAAiBC,MAAAA,eAAjB;AAAkCC,MAAAA;AAAlC,QACLT,MAAM,CAAEP,YAAF,CADP;AAEA,UAAM;AAAEiB,MAAAA;AAAF,QAAgCV,MAAM,CAAEW,wBAAF,CAA5C;AAEA,WAAO;AACN;A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AD;AACC,IAAA,EAAE,EAAGkB,yBADN;AAEC,IAAA,WAAW,EAAG,CAAElC,cAFjB;AAGC,IAAA,OAAO,EACNA,cAAc,GAAG,UAAH,GAAgB2B,SAJhC;AAMC,IAAA,QAAQ,EAAG5B;AANZ,IAFF,EAWC,4BAAC,uBAAD;AACC,IAAA,EAAE,EAAGoC,yBADN;AAEC,IAAA,WAAW,EAAG,CAAEnC,cAFjB;AAGC,IAAA,OAAO,EAAGA,cAAc,GAAG,UAAH,GAAgB2B;AAHzC,IAXD,EAgBC,4BAAC,uBAAD;AACC,IAAA,EAAE,EAAGS,yBADN;AAEC,IAAA,WAAW,EAAG,CAAEpC,cAFjB;AAGC,IAAA,OAAO,EAAGA,cAAc,GAAG,UAAH,GAAgB2B;AAHzC,IAhBD,EAqBGH,aArBH,CAfF,CALD,CADD;AAgDA;;eAEchC,a","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\tNavigableToolbar,\n\tToolSelector,\n\tstore as blockEditorStore,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport {\n\tEditorHistoryRedo,\n\tEditorHistoryUndo,\n\tstore as editorStore,\n} from '@wordpress/editor';\nimport { Button, ToolbarItem } from '@wordpress/components';\nimport { listView, plus } from '@wordpress/icons';\nimport { useRef, useCallback } from '@wordpress/element';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../../store';\nimport { unlock } from '../../../private-apis';\n\nconst { useShouldContextualToolbarShow } = unlock( blockEditorPrivateApis );\n\nconst preventDefault = ( event ) => {\n\tevent.preventDefault();\n};\n\nfunction HeaderToolbar() {\n\tconst inserterButton = useRef();\n\tconst { setIsInserterOpened, setIsListViewOpened } =\n\t\tuseDispatch( editPostStore );\n\tconst {\n\t\tisInserterEnabled,\n\t\tisInserterOpened,\n\t\tisTextModeEnabled,\n\t\tshowIconLabels,\n\t\tisListViewOpen,\n\t\tlistViewShortcut,\n\t} = useSelect( ( select ) => {\n\t\tconst { hasInserterItems, getBlockRootClientId, getBlockSelectionEnd } =\n\t\t\tselect( blockEditorStore );\n\t\tconst { getEditorSettings } = select( editorStore );\n\t\tconst { getEditorMode, isFeatureActive, isListViewOpened } =\n\t\t\tselect( editPostStore );\n\t\tconst { getShortcutRepresentation } = select( keyboardShortcutsStore );\n\n\t\treturn {\n\t\t\t// This setting (richEditingEnabled) should not live in the block editor's setting.\n\t\t\tisInserterEnabled:\n\t\t\t\tgetEditorMode() === 'visual' &&\n\t\t\t\tgetEditorSettings().richEditingEnabled &&\n\t\t\t\thasInserterItems(\n\t\t\t\t\tgetBlockRootClientId( getBlockSelectionEnd() )\n\t\t\t\t),\n\t\t\tisInserterOpened: select( editPostStore ).isInserterOpened(),\n\t\t\tisTextModeEnabled: getEditorMode() === 'text',\n\t\t\tshowIconLabels: isFeatureActive( 'showIconLabels' ),\n\t\t\tisListViewOpen: isListViewOpened(),\n\t\t\tlistViewShortcut: getShortcutRepresentation(\n\t\t\t\t'core/edit-post/toggle-list-view'\n\t\t\t),\n\t\t};\n\t}, [] );\n\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst isWideViewport = useViewportMatch( 'wide' );\n\tconst {\n\t\tshouldShowContextualToolbar,\n\t\tcanFocusHiddenToolbar,\n\t\tfixedToolbarCanBeFocused,\n\t} = useShouldContextualToolbarShow();\n\t// If there's a block toolbar to be focused, disable the focus shortcut for the document toolbar.\n\t// There's a fixed block toolbar when the fixed toolbar option is enabled or when the browser width is less than the large viewport.\n\tconst blockToolbarCanBeFocused =\n\t\tshouldShowContextualToolbar ||\n\t\tcanFocusHiddenToolbar ||\n\t\tfixedToolbarCanBeFocused;\n\t/* translators: accessibility text for the editor toolbar */\n\tconst toolbarAriaLabel = __( 'Document tools' );\n\n\tconst toggleListView = useCallback(\n\t\t() => setIsListViewOpened( ! isListViewOpen ),\n\t\t[ setIsListViewOpened, isListViewOpen ]\n\t);\n\tconst overflowItems = (\n\t\t<>\n\t\t\t<ToolbarItem\n\t\t\t\tas={ Button }\n\t\t\t\tclassName=\"edit-post-header-toolbar__document-overview-toggle\"\n\t\t\t\ticon={ listView }\n\t\t\t\tdisabled={ isTextModeEnabled }\n\t\t\t\tisPressed={ isListViewOpen }\n\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\tlabel={ __( 'Document Overview' ) }\n\t\t\t\tonClick={ toggleListView }\n\t\t\t\tshortcut={ listViewShortcut }\n\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\tvariant={ showIconLabels ? 'tertiary' : undefined }\n\t\t\t/>\n\t\t</>\n\t);\n\tconst toggleInserter = useCallback( () => {\n\t\tif ( isInserterOpened ) {\n\t\t\t// Focusing the inserter button should close the inserter popover.\n\t\t\t// However, there are some cases it won't close when the focus is lost.\n\t\t\t// See https://github.com/WordPress/gutenberg/issues/43090 for more details.\n\t\t\tinserterButton.current.focus();\n\t\t\tsetIsInserterOpened( false );\n\t\t} else {\n\t\t\tsetIsInserterOpened( true );\n\t\t}\n\t}, [ isInserterOpened, setIsInserterOpened ] );\n\n\t/* translators: button label text should, if possible, be under 16 characters. */\n\tconst longLabel = _x(\n\t\t'Toggle block inserter',\n\t\t'Generic label for block inserter button'\n\t);\n\tconst shortLabel = ! isInserterOpened ? __( 'Add' ) : __( 'Close' );\n\n\treturn (\n\t\t<NavigableToolbar\n\t\t\tclassName=\"edit-post-header-toolbar\"\n\t\t\taria-label={ toolbarAriaLabel }\n\t\t\tshouldUseKeyboardFocusShortcut={ ! blockToolbarCanBeFocused }\n\t\t>\n\t\t\t<div className=\"edit-post-header-toolbar__left\">\n\t\t\t\t<ToolbarItem\n\t\t\t\t\tref={ inserterButton }\n\t\t\t\t\tas={ Button }\n\t\t\t\t\tclassName=\"edit-post-header-toolbar__inserter-toggle\"\n\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\tisPressed={ isInserterOpened }\n\t\t\t\t\tonMouseDown={ preventDefault }\n\t\t\t\t\tonClick={ toggleInserter }\n\t\t\t\t\tdisabled={ ! isInserterEnabled }\n\t\t\t\t\ticon={ plus }\n\t\t\t\t\tlabel={ showIconLabels ? shortLabel : longLabel }\n\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t/>\n\t\t\t\t{ ( isWideViewport || ! showIconLabels ) && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ isLargeViewport && (\n\t\t\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\t\t\tas={ ToolSelector }\n\t\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\tshowIconLabels ? 'tertiary' : undefined\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdisabled={ isTextModeEnabled }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\t\tas={ EditorHistoryUndo }\n\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\tvariant={ showIconLabels ? 'tertiary' : undefined }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\t\tas={ EditorHistoryRedo }\n\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\tvariant={ showIconLabels ? 'tertiary' : undefined }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{ overflowItems }\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</NavigableToolbar>\n\t);\n}\n\nexport default HeaderToolbar;\n"]}
@@ -42,19 +42,18 @@ var _store = require("../../../store");
42
42
  /**
43
43
  * Internal dependencies
44
44
  */
45
- function HeaderToolbar(_ref) {
46
- let {
47
- hasRedo,
48
- hasUndo,
49
- redo,
50
- undo,
51
- showInserter,
52
- showKeyboardHideButton,
53
- getStylesFromColorScheme,
54
- onHideKeyboard,
55
- isRTL,
56
- noContentSelected
57
- } = _ref;
45
+ function HeaderToolbar({
46
+ hasRedo,
47
+ hasUndo,
48
+ redo,
49
+ undo,
50
+ showInserter,
51
+ showKeyboardHideButton,
52
+ getStylesFromColorScheme,
53
+ onHideKeyboard,
54
+ isRTL,
55
+ noContentSelected
56
+ }) {
58
57
  const wasNoContentSelected = (0, _element.useRef)(noContentSelected);
59
58
  const [isInserterOpen, setIsInserterOpen] = (0, _element.useState)(false);
60
59
  const scrollViewRef = (0, _element.useRef)(null);
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/header/header-toolbar/index.native.js"],"names":["HeaderToolbar","hasRedo","hasUndo","redo","undo","showInserter","showKeyboardHideButton","getStylesFromColorScheme","onHideKeyboard","isRTL","noContentSelected","wasNoContentSelected","isInserterOpen","setIsInserterOpen","scrollViewRef","scrollToStart","isAndroid","Platform","OS","current","scrollToEnd","scrollTo","x","renderHistoryButtons","buttons","undoIcon","redoIcon","hint","reverse","onToggleInserter","isOpen","useExpandedMode","toolbarAriaLabel","styles","keyboardClose","select","getBlockRootClientId","getBlockSelectionEnd","hasInserterItems","hasSelectedBlock","blockEditorStore","getEditorSettings","editorStore","isAnyBlockSelected","hasEditorRedo","hasEditorUndo","editPostStore","getEditorMode","richEditingEnabled","isTextModeEnabled","getSettings","dispatch","clearSelectedBlock","togglePostTitleSelection","isLargeViewport","withPreferredColorScheme"],"mappings":";;;;;;;;;AAQA;;AALA;;AAMA;;AACA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AAKA;;AAKA;;AACA;;AA9BA;AACA;AACA;;AAGA;AACA;AACA;;AAmBA;AACA;AACA;AAIA,SAASA,aAAT,OAWI;AAAA,MAXoB;AACvBC,IAAAA,OADuB;AAEvBC,IAAAA,OAFuB;AAGvBC,IAAAA,IAHuB;AAIvBC,IAAAA,IAJuB;AAKvBC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D,QAAQ,CAAEX,kBAAF,CAAvC;AACA,QAAM;AAAEa,IAAAA;AAAF,MAA+BF,QAAQ,CAAET,aAAF,CAA7C;AAEA,SAAO;AACNvC,IAAAA,IAAI,EAAEgD,QAAQ,CAAET,aAAF,CAAR,CAAwBvC,IADxB;AAENC,IAAAA,IAAI,EAAE+C,QAAQ,CAAET,aAAF,CAAR,CAAwBtC,IAFxB;;AAGNI,IAAAA,cAAc,GAAG;AAChB4C,MAAAA,kBAAkB;AAClBC,MAAAA,wBAAwB,CAAE,KAAF,CAAxB;AACA;;AANK,GAAP;AAQA,CAZD,CA1BuB,EAuCvB,iCAAmB;AAAEC,EAAAA,eAAe,EAAE;AAAnB,CAAnB,CAvCuB,EAwCvBC,iCAxCuB,CAAT,EAyCVvD,aAzCU,C","sourcesContent":["/**\n * External dependencies\n */\nimport { Platform, ScrollView, View } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { useCallback, useRef, useState } from '@wordpress/element';\nimport { compose, withPreferredColorScheme } from '@wordpress/compose';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { withViewportMatch } from '@wordpress/viewport';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tInserter,\n\tBlockToolbar,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { ToolbarGroup, ToolbarButton } from '@wordpress/components';\nimport {\n\tkeyboardClose,\n\tundo as undoIcon,\n\tredo as redoIcon,\n} from '@wordpress/icons';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport { store as editPostStore } from '../../../store';\n\nfunction HeaderToolbar( {\n\thasRedo,\n\thasUndo,\n\tredo,\n\tundo,\n\tshowInserter,\n\tshowKeyboardHideButton,\n\tgetStylesFromColorScheme,\n\tonHideKeyboard,\n\tisRTL,\n\tnoContentSelected,\n} ) {\n\tconst wasNoContentSelected = useRef( noContentSelected );\n\tconst [ isInserterOpen, setIsInserterOpen ] = useState( false );\n\n\tconst scrollViewRef = useRef( null );\n\tconst scrollToStart = () => {\n\t\t// scrollview doesn't seem to automatically adjust to RTL on Android so, scroll to end when Android\n\t\tconst isAndroid = Platform.OS === 'android';\n\t\tif ( isAndroid && isRTL ) {\n\t\t\tscrollViewRef.current.scrollToEnd();\n\t\t} else {\n\t\t\tscrollViewRef.current.scrollTo( { x: 0 } );\n\t\t}\n\t};\n\tconst renderHistoryButtons = () => {\n\t\tconst buttons = [\n\t\t\t/* TODO: replace with EditorHistoryRedo and EditorHistoryUndo. */\n\t\t\t<ToolbarButton\n\t\t\t\tkey=\"undoButton\"\n\t\t\t\ttitle={ __( 'Undo' ) }\n\t\t\t\ticon={ ! isRTL ? undoIcon : redoIcon }\n\t\t\t\tisDisabled={ ! hasUndo }\n\t\t\t\tonClick={ undo }\n\t\t\t\textraProps={ {\n\t\t\t\t\thint: __( 'Double tap to undo last change' ),\n\t\t\t\t} }\n\t\t\t/>,\n\t\t\t<ToolbarButton\n\t\t\t\tkey=\"redoButton\"\n\t\t\t\ttitle={ __( 'Redo' ) }\n\t\t\t\ticon={ ! isRTL ? redoIcon : undoIcon }\n\t\t\t\tisDisabled={ ! hasRedo }\n\t\t\t\tonClick={ redo }\n\t\t\t\textraProps={ {\n\t\t\t\t\thint: __( 'Double tap to redo last change' ),\n\t\t\t\t} }\n\t\t\t/>,\n\t\t];\n\n\t\treturn isRTL ? buttons.reverse() : buttons;\n\t};\n\n\tconst onToggleInserter = useCallback(\n\t\t( isOpen ) => {\n\t\t\tif ( isOpen ) {\n\t\t\t\twasNoContentSelected.current = noContentSelected;\n\t\t\t}\n\t\t\tsetIsInserterOpen( isOpen );\n\t\t},\n\t\t[ noContentSelected ]\n\t);\n\n\t// Expanded mode should be preserved while the inserter is open.\n\t// This way we prevent style updates during the opening transition.\n\tconst useExpandedMode = isInserterOpen\n\t\t? wasNoContentSelected.current\n\t\t: noContentSelected;\n\n\t/* translators: accessibility text for the editor toolbar */\n\tconst toolbarAriaLabel = __( 'Document tools' );\n\n\treturn (\n\t\t<View\n\t\t\ttestID={ toolbarAriaLabel }\n\t\t\taccessibilityLabel={ toolbarAriaLabel }\n\t\t\tstyle={ [\n\t\t\t\tgetStylesFromColorScheme(\n\t\t\t\t\tstyles[ 'header-toolbar__container' ],\n\t\t\t\t\tstyles[ 'header-toolbar__container--dark' ]\n\t\t\t\t),\n\t\t\t\tuseExpandedMode &&\n\t\t\t\t\tstyles[ 'header-toolbar__container--expanded' ],\n\t\t\t] }\n\t\t>\n\t\t\t<ScrollView\n\t\t\t\tref={ scrollViewRef }\n\t\t\t\tonContentSizeChange={ scrollToStart }\n\t\t\t\thorizontal={ true }\n\t\t\t\tshowsHorizontalScrollIndicator={ false }\n\t\t\t\tkeyboardShouldPersistTaps=\"always\"\n\t\t\t\talwaysBounceHorizontal={ false }\n\t\t\t\tcontentContainerStyle={\n\t\t\t\t\tstyles[ 'header-toolbar__scrollable-content' ]\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t<Inserter\n\t\t\t\t\tdisabled={ ! showInserter }\n\t\t\t\t\tuseExpandedMode={ useExpandedMode }\n\t\t\t\t\tonToggle={ onToggleInserter }\n\t\t\t\t/>\n\t\t\t\t{ renderHistoryButtons() }\n\t\t\t\t<BlockToolbar />\n\t\t\t</ScrollView>\n\t\t\t{ showKeyboardHideButton && (\n\t\t\t\t<ToolbarGroup\n\t\t\t\t\tpassedStyle={\n\t\t\t\t\t\tstyles[ 'header-toolbar__keyboard-hide-container' ]\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\ttitle={ __( 'Hide keyboard' ) }\n\t\t\t\t\t\ticon={ keyboardClose }\n\t\t\t\t\t\tonClick={ onHideKeyboard }\n\t\t\t\t\t\textraProps={ {\n\t\t\t\t\t\t\thint: __( 'Tap to hide the keyboard' ),\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t</ToolbarGroup>\n\t\t\t) }\n\t\t</View>\n\t);\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetBlockRootClientId,\n\t\t\tgetBlockSelectionEnd,\n\t\t\thasInserterItems,\n\t\t\thasSelectedBlock,\n\t\t} = select( blockEditorStore );\n\t\tconst { getEditorSettings } = select( editorStore );\n\t\tconst isAnyBlockSelected = hasSelectedBlock();\n\t\treturn {\n\t\t\thasRedo: select( editorStore ).hasEditorRedo(),\n\t\t\thasUndo: select( editorStore ).hasEditorUndo(),\n\t\t\t// This setting (richEditingEnabled) should not live in the block editor's setting.\n\t\t\tshowInserter:\n\t\t\t\tselect( editPostStore ).getEditorMode() === 'visual' &&\n\t\t\t\tgetEditorSettings().richEditingEnabled &&\n\t\t\t\thasInserterItems(\n\t\t\t\t\tgetBlockRootClientId( getBlockSelectionEnd() )\n\t\t\t\t),\n\t\t\tisTextModeEnabled:\n\t\t\t\tselect( editPostStore ).getEditorMode() === 'text',\n\t\t\tisRTL: select( blockEditorStore ).getSettings().isRTL,\n\t\t\tnoContentSelected: ! isAnyBlockSelected,\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst { clearSelectedBlock } = dispatch( blockEditorStore );\n\t\tconst { togglePostTitleSelection } = dispatch( editorStore );\n\n\t\treturn {\n\t\t\tredo: dispatch( editorStore ).redo,\n\t\t\tundo: dispatch( editorStore ).undo,\n\t\t\tonHideKeyboard() {\n\t\t\t\tclearSelectedBlock();\n\t\t\t\ttogglePostTitleSelection( false );\n\t\t\t},\n\t\t};\n\t} ),\n\twithViewportMatch( { isLargeViewport: 'medium' } ),\n\twithPreferredColorScheme,\n] )( HeaderToolbar );\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/components/header/header-toolbar/index.native.js"],"names":["HeaderToolbar","hasRedo","hasUndo","redo","undo","showInserter","showKeyboardHideButton","getStylesFromColorScheme","onHideKeyboard","isRTL","noContentSelected","wasNoContentSelected","isInserterOpen","setIsInserterOpen","scrollViewRef","scrollToStart","isAndroid","Platform","OS","current","scrollToEnd","scrollTo","x","renderHistoryButtons","buttons","undoIcon","redoIcon","hint","reverse","onToggleInserter","isOpen","useExpandedMode","toolbarAriaLabel","styles","keyboardClose","select","getBlockRootClientId","getBlockSelectionEnd","hasInserterItems","hasSelectedBlock","blockEditorStore","getEditorSettings","editorStore","isAnyBlockSelected","hasEditorRedo","hasEditorUndo","editPostStore","getEditorMode","richEditingEnabled","isTextModeEnabled","getSettings","dispatch","clearSelectedBlock","togglePostTitleSelection","isLargeViewport","withPreferredColorScheme"],"mappings":";;;;;;;;;AAQA;;AALA;;AAMA;;AACA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AAKA;;AAKA;;AACA;;AA9BA;AACA;AACA;;AAGA;AACA;AACA;;AAmBA;AACA;AACA;AAIA,SAASA,aAAT,CAAwB;AACvBC,EAAAA,OADuB;AAEvBC,EAAAA,OAFuB;AAGvBC,EAAAA,IAHuB;AAIvBC,EAAAA,IAJuB;AAKvBC,EAAAA,YALuB;AAMvBC,EAAAA,sBANuB;AAOvBC,EAAAA,wBAPuB;AAQvBC,EAAAA,cARuB;AASvBC,EAAAA,KATuB;AAUvBC,EAAAA;AAVuB,CAAxB,EAWI;AACH,QAAMC,oBAAoB,GAAG,qBAAQD,iBAAR,CAA7B;AACA,QAAM,CAAEE,cAAF,EAAkBC,iBAAlB,IAAwC,uBAAU,KAAV,CAA9C;AAEA,QAAMC,aAAa,GAAG,qBAAQ,IAAR,CAAtB;;AACA,QAAMC,aAAa,GAAG,MAAM;AAC3B;AACA,UAAMC,SAAS,GAAGC,sBAASC,EAAT,KAAgB,SAAlC;;AACA,QAAKF,SAAS,IAAIP,KAAlB,EAA0B;AACzBK,MAAAA,aAAa,CAACK,OAAd,CAAsBC,WAAtB;AACA,KAFD,MAEO;AACNN,MAAAA,aAAa,CAACK,OAAd,CAAsBE,QAAtB,CAAgC;AAAEC,QAAAA,CAAC,EAAE;AAAL,OAAhC;AACA;AACD,GARD;;AASA,QAAMC,oBAAoB,GAAG,MAAM;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AAsBE,aAAtB,EADH;AAEN1C,IAAAA,OAAO,EAAEiC,MAAM,CAAEO,aAAF,CAAN,CAAsBG,aAAtB,EAFH;AAGN;AACAxC,IAAAA,YAAY,EACX8B,MAAM,CAAEW,YAAF,CAAN,CAAwBC,aAAxB,OAA4C,QAA5C,IACAN,iBAAiB,GAAGO,kBADpB,IAEAV,gBAAgB,CACfF,oBAAoB,CAAEC,oBAAoB,EAAtB,CADL,CAPX;AAUNY,IAAAA,iBAAiB,EAChBd,MAAM,CAAEW,YAAF,CAAN,CAAwBC,aAAxB,OAA4C,MAXvC;AAYNtC,IAAAA,KAAK,EAAE0B,MAAM,CAAEK,kBAAF,CAAN,CAA2BU,WAA3B,GAAyCzC,KAZ1C;AAaNC,IAAAA,iBAAiB,EAAE,CAAEiC;AAbf,GAAP;AAeA,CAxBD,CADuB,EA0BvB,wBAAgBQ,QAAF,IAAgB;AAC7B,QAAM;AAAEC,IAAAA;AAAF,MAAyBD,QAAQ,CAAEX,kBAAF,CAAvC;AACA,QAAM;AAAEa,IAAAA;AAAF,MAA+BF,QAAQ,CAAET,aAAF,CAA7C;AAEA,SAAO;AACNvC,IAAAA,IAAI,EAAEgD,QAAQ,CAAET,aAAF,CAAR,CAAwBvC,IADxB;AAENC,IAAAA,IAAI,EAAE+C,QAAQ,CAAET,aAAF,CAAR,CAAwBtC,IAFxB;;AAGNI,IAAAA,cAAc,GAAG;AAChB4C,MAAAA,kBAAkB;AAClBC,MAAAA,wBAAwB,CAAE,KAAF,CAAxB;AACA;;AANK,GAAP;AAQA,CAZD,CA1BuB,EAuCvB,iCAAmB;AAAEC,EAAAA,eAAe,EAAE;AAAnB,CAAnB,CAvCuB,EAwCvBC,iCAxCuB,CAAT,EAyCVvD,aAzCU,C","sourcesContent":["/**\n * External dependencies\n */\nimport { Platform, ScrollView, View } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { useCallback, useRef, useState } from '@wordpress/element';\nimport { compose, withPreferredColorScheme } from '@wordpress/compose';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { withViewportMatch } from '@wordpress/viewport';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tInserter,\n\tBlockToolbar,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { ToolbarGroup, ToolbarButton } from '@wordpress/components';\nimport {\n\tkeyboardClose,\n\tundo as undoIcon,\n\tredo as redoIcon,\n} from '@wordpress/icons';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport { store as editPostStore } from '../../../store';\n\nfunction HeaderToolbar( {\n\thasRedo,\n\thasUndo,\n\tredo,\n\tundo,\n\tshowInserter,\n\tshowKeyboardHideButton,\n\tgetStylesFromColorScheme,\n\tonHideKeyboard,\n\tisRTL,\n\tnoContentSelected,\n} ) {\n\tconst wasNoContentSelected = useRef( noContentSelected );\n\tconst [ isInserterOpen, setIsInserterOpen ] = useState( false );\n\n\tconst scrollViewRef = useRef( null );\n\tconst scrollToStart = () => {\n\t\t// scrollview doesn't seem to automatically adjust to RTL on Android so, scroll to end when Android\n\t\tconst isAndroid = Platform.OS === 'android';\n\t\tif ( isAndroid && isRTL ) {\n\t\t\tscrollViewRef.current.scrollToEnd();\n\t\t} else {\n\t\t\tscrollViewRef.current.scrollTo( { x: 0 } );\n\t\t}\n\t};\n\tconst renderHistoryButtons = () => {\n\t\tconst buttons = [\n\t\t\t/* TODO: replace with EditorHistoryRedo and EditorHistoryUndo. */\n\t\t\t<ToolbarButton\n\t\t\t\tkey=\"undoButton\"\n\t\t\t\ttitle={ __( 'Undo' ) }\n\t\t\t\ticon={ ! isRTL ? undoIcon : redoIcon }\n\t\t\t\tisDisabled={ ! hasUndo }\n\t\t\t\tonClick={ undo }\n\t\t\t\textraProps={ {\n\t\t\t\t\thint: __( 'Double tap to undo last change' ),\n\t\t\t\t} }\n\t\t\t/>,\n\t\t\t<ToolbarButton\n\t\t\t\tkey=\"redoButton\"\n\t\t\t\ttitle={ __( 'Redo' ) }\n\t\t\t\ticon={ ! isRTL ? redoIcon : undoIcon }\n\t\t\t\tisDisabled={ ! hasRedo }\n\t\t\t\tonClick={ redo }\n\t\t\t\textraProps={ {\n\t\t\t\t\thint: __( 'Double tap to redo last change' ),\n\t\t\t\t} }\n\t\t\t/>,\n\t\t];\n\n\t\treturn isRTL ? buttons.reverse() : buttons;\n\t};\n\n\tconst onToggleInserter = useCallback(\n\t\t( isOpen ) => {\n\t\t\tif ( isOpen ) {\n\t\t\t\twasNoContentSelected.current = noContentSelected;\n\t\t\t}\n\t\t\tsetIsInserterOpen( isOpen );\n\t\t},\n\t\t[ noContentSelected ]\n\t);\n\n\t// Expanded mode should be preserved while the inserter is open.\n\t// This way we prevent style updates during the opening transition.\n\tconst useExpandedMode = isInserterOpen\n\t\t? wasNoContentSelected.current\n\t\t: noContentSelected;\n\n\t/* translators: accessibility text for the editor toolbar */\n\tconst toolbarAriaLabel = __( 'Document tools' );\n\n\treturn (\n\t\t<View\n\t\t\ttestID={ toolbarAriaLabel }\n\t\t\taccessibilityLabel={ toolbarAriaLabel }\n\t\t\tstyle={ [\n\t\t\t\tgetStylesFromColorScheme(\n\t\t\t\t\tstyles[ 'header-toolbar__container' ],\n\t\t\t\t\tstyles[ 'header-toolbar__container--dark' ]\n\t\t\t\t),\n\t\t\t\tuseExpandedMode &&\n\t\t\t\t\tstyles[ 'header-toolbar__container--expanded' ],\n\t\t\t] }\n\t\t>\n\t\t\t<ScrollView\n\t\t\t\tref={ scrollViewRef }\n\t\t\t\tonContentSizeChange={ scrollToStart }\n\t\t\t\thorizontal={ true }\n\t\t\t\tshowsHorizontalScrollIndicator={ false }\n\t\t\t\tkeyboardShouldPersistTaps=\"always\"\n\t\t\t\talwaysBounceHorizontal={ false }\n\t\t\t\tcontentContainerStyle={\n\t\t\t\t\tstyles[ 'header-toolbar__scrollable-content' ]\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t<Inserter\n\t\t\t\t\tdisabled={ ! showInserter }\n\t\t\t\t\tuseExpandedMode={ useExpandedMode }\n\t\t\t\t\tonToggle={ onToggleInserter }\n\t\t\t\t/>\n\t\t\t\t{ renderHistoryButtons() }\n\t\t\t\t<BlockToolbar />\n\t\t\t</ScrollView>\n\t\t\t{ showKeyboardHideButton && (\n\t\t\t\t<ToolbarGroup\n\t\t\t\t\tpassedStyle={\n\t\t\t\t\t\tstyles[ 'header-toolbar__keyboard-hide-container' ]\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\ttitle={ __( 'Hide keyboard' ) }\n\t\t\t\t\t\ticon={ keyboardClose }\n\t\t\t\t\t\tonClick={ onHideKeyboard }\n\t\t\t\t\t\textraProps={ {\n\t\t\t\t\t\t\thint: __( 'Tap to hide the keyboard' ),\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t</ToolbarGroup>\n\t\t\t) }\n\t\t</View>\n\t);\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetBlockRootClientId,\n\t\t\tgetBlockSelectionEnd,\n\t\t\thasInserterItems,\n\t\t\thasSelectedBlock,\n\t\t} = select( blockEditorStore );\n\t\tconst { getEditorSettings } = select( editorStore );\n\t\tconst isAnyBlockSelected = hasSelectedBlock();\n\t\treturn {\n\t\t\thasRedo: select( editorStore ).hasEditorRedo(),\n\t\t\thasUndo: select( editorStore ).hasEditorUndo(),\n\t\t\t// This setting (richEditingEnabled) should not live in the block editor's setting.\n\t\t\tshowInserter:\n\t\t\t\tselect( editPostStore ).getEditorMode() === 'visual' &&\n\t\t\t\tgetEditorSettings().richEditingEnabled &&\n\t\t\t\thasInserterItems(\n\t\t\t\t\tgetBlockRootClientId( getBlockSelectionEnd() )\n\t\t\t\t),\n\t\t\tisTextModeEnabled:\n\t\t\t\tselect( editPostStore ).getEditorMode() === 'text',\n\t\t\tisRTL: select( blockEditorStore ).getSettings().isRTL,\n\t\t\tnoContentSelected: ! isAnyBlockSelected,\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst { clearSelectedBlock } = dispatch( blockEditorStore );\n\t\tconst { togglePostTitleSelection } = dispatch( editorStore );\n\n\t\treturn {\n\t\t\tredo: dispatch( editorStore ).redo,\n\t\t\tundo: dispatch( editorStore ).undo,\n\t\t\tonHideKeyboard() {\n\t\t\t\tclearSelectedBlock();\n\t\t\t\ttogglePostTitleSelection( false );\n\t\t\t},\n\t\t};\n\t} ),\n\twithViewportMatch( { isLargeViewport: 'medium' } ),\n\twithPreferredColorScheme,\n] )( HeaderToolbar );\n"]}
@@ -35,7 +35,7 @@ var _mainDashboardButton = _interopRequireDefault(require("./main-dashboard-butt
35
35
 
36
36
  var _store = require("../../store");
37
37
 
38
- var _templateTitle = _interopRequireDefault(require("./template-title"));
38
+ var _documentTitle = _interopRequireDefault(require("./document-title"));
39
39
 
40
40
  /**
41
41
  * WordPress dependencies
@@ -44,10 +44,9 @@ var _templateTitle = _interopRequireDefault(require("./template-title"));
44
44
  /**
45
45
  * Internal dependencies
46
46
  */
47
- function Header(_ref) {
48
- let {
49
- setEntitiesSavedStatesCallback
50
- } = _ref;
47
+ function Header({
48
+ setEntitiesSavedStatesCallback
49
+ }) {
51
50
  const isLargeViewport = (0, _compose.useViewportMatch)('large');
52
51
  const {
53
52
  hasActiveMetaboxes,
@@ -108,7 +107,9 @@ function Header(_ref) {
108
107
  delay: 0.8
109
108
  },
110
109
  className: "edit-post-header__toolbar"
111
- }, (0, _element.createElement)(_headerToolbar.default, null), (0, _element.createElement)(_templateTitle.default, null)), (0, _element.createElement)(_components.__unstableMotion.div, {
110
+ }, (0, _element.createElement)(_headerToolbar.default, null), (0, _element.createElement)("div", {
111
+ className: "edit-post-header__document-title"
112
+ }, (0, _element.createElement)(_documentTitle.default, null))), (0, _element.createElement)(_components.__unstableMotion.div, {
112
113
  variants: slideY,
113
114
  transition: {
114
115
  type: 'tween',
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/header/index.js"],"names":["Header","setEntitiesSavedStatesCallback","isLargeViewport","hasActiveMetaboxes","isPublishSidebarOpened","isSaving","showIconLabels","isDistractionFreeMode","select","editPostStore","hasMetaBoxes","isSavingMetaBoxes","isFeatureActive","isDistractionFree","slideY","hidden","y","hover","transition","type","delay","slideX","x","undefined"],"mappings":";;;;;;;;;;;AAGA;;AACA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AApBA;AACA;AACA;;AAOA;AACA;AACA;AAWA,SAASA,MAAT,OAAsD;AAAA,MAArC;AAAEC,IAAAA;AAAF,GAAqC;AACrD,QAAMC,eAAe,GAAG,+BAAkB,OAAlB,CAAxB;AACA,QAAM;AACLC,IAAAA,kBADK;AAELC,IAAAA,sBAFK;AAGLC,IAAAA,QAHK;AAILC,IAAAA,cAJK;AAKLC,IAAAA;AALK,MAMF,qBACDC,MAAF,KAAgB;AACfL,IAAAA,kBAAkB,EAAEK,MAAM,CAAEC,YAAF,CAAN,CAAwBC,YAAxB,EADL;AAEfN,IAAAA,sBAAsB,EACrBI,MAAM,CAAEC,YAAF,CAAN,CAAwBL,sBAAxB,EAHc;AAIfC,IAAAA,QAAQ,EAAEG,MAAM,CAAEC,YAAF,CAAN,CAAwBE,iBAAxB,EAJK;AAKfL,IAAAA,cAAc,EACbE,MAAM,CAAEC,YAAF,CAAN,CAAwBG,eAAxB,CAAyC,gBAAzC,CANc;AAOfL,IAAAA,qBAAqB,EACpBC,MAAM,CAAEC,YAAF,CAAN,CAAwBG,eAAxB,CAAyC,iBAAzC;AARc,GAAhB,CADG,EAWH,EAXG,CANJ;AAoBA,QAAMC,iBAAiB,GAAGN,qBAAqB,IAAIL,eAAnD;AAEA,QAAMY,MAAM,GAAG;AACdC,IAAAA,MAAM,EAAEF,iBAAiB,GAAG;AAAEG,MAAAA,CAAC,EAAE;AAAL,KAAH,GAAkB;AAAEA,MAAAA,CAAC,EAAE;AAAL,K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HX,KAKG,CAAEhB,sBAAF,IACD;AACA;AACA;AACA;AACA;AACA,8BAAC,sBAAD;AACC,IAAA,YAAY,EAAGD,kBADhB;AAEC,IAAA,aAAa,EAAGE,QAFjB;AAGC,IAAA,cAAc,EAAGC;AAHlB,IAXF,EAiBC,4BAAC,iBAAD,OAjBD,EAkBC,4BAAC,sBAAD,OAlBD,EAmBC,4BAAC,yBAAD;AACC,IAAA,mBAAmB,EAAGH,kBADvB;AAEC,IAAA,gBAAgB,EAAGE,QAAQ,GAAG,IAAH,GAAUkB;AAFtC,IAnBD,EAuBC,4BAAC,kCAAD;AACC,IAAA,YAAY,EAAGpB,kBADhB;AAEC,IAAA,aAAa,EAAGE,QAFjB;AAGC,IAAA,8BAA8B,EAC7BJ;AAJF,IAvBD,EA8BG,CAAEC,eAAe,IAAI,CAAEI,cAAvB,KACD,qDACC,4BAAC,sBAAD,CAAa,IAAb;AAAkB,IAAA,KAAK,EAAC;AAAxB,IADD,EAEC,4BAAC,iBAAD;AAAU,IAAA,cAAc,EAAGA;AAA3B,IAFD,CA/BF,EAoCGA,cAAc,IAAI,CAAEJ,eAApB,IACD,4BAAC,iBAAD;AAAU,IAAA,cAAc,EAAGI;AAA3B,IArCF,CAjBD,CADD;AA4DA;;eAEcN,M","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { PostSavedState, PostPreviewButton } from '@wordpress/editor';\nimport { useSelect } from '@wordpress/data';\nimport { PinnedItems } from '@wordpress/interface';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { __unstableMotion as motion } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport FullscreenModeClose from './fullscreen-mode-close';\nimport HeaderToolbar from './header-toolbar';\nimport MoreMenu from './more-menu';\nimport PostPublishButtonOrToggle from './post-publish-button-or-toggle';\nimport { default as DevicePreview } from '../device-preview';\nimport ViewLink from '../view-link';\nimport MainDashboardButton from './main-dashboard-button';\nimport { store as editPostStore } from '../../store';\nimport TemplateTitle from './template-title';\n\nfunction Header( { setEntitiesSavedStatesCallback } ) {\n\tconst isLargeViewport = useViewportMatch( 'large' );\n\tconst {\n\t\thasActiveMetaboxes,\n\t\tisPublishSidebarOpened,\n\t\tisSaving,\n\t\tshowIconLabels,\n\t\tisDistractionFreeMode,\n\t} = useSelect(\n\t\t( select ) => ( {\n\t\t\thasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),\n\t\t\tisPublishSidebarOpened:\n\t\t\t\tselect( editPostStore ).isPublishSidebarOpened(),\n\t\t\tisSaving: select( editPostStore ).isSavingMetaBoxes(),\n\t\t\tshowIconLabels:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'showIconLabels' ),\n\t\t\tisDistractionFreeMode:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'distractionFree' ),\n\t\t} ),\n\t\t[]\n\t);\n\n\tconst isDistractionFree = isDistractionFreeMode && isLargeViewport;\n\n\tconst slideY = {\n\t\thidden: isDistractionFree ? { y: '-50' } : { y: 0 },\n\t\thover: { y: 0, transition: { type: 'tween', delay: 0.2 } },\n\t};\n\n\tconst slideX = {\n\t\thidden: isDistractionFree ? { x: '-100%' } : { x: 0 },\n\t\thover: { x: 0, transition: { type: 'tween', delay: 0.2 } },\n\t};\n\n\treturn (\n\t\t<div className=\"edit-post-header\">\n\t\t\t<MainDashboardButton.Slot>\n\t\t\t\t<motion.div\n\t\t\t\t\tvariants={ slideX }\n\t\t\t\t\ttransition={ { type: 'tween', delay: 0.8 } }\n\t\t\t\t>\n\t\t\t\t\t<FullscreenModeClose showTooltip />\n\t\t\t\t</motion.div>\n\t\t\t</MainDashboardButton.Slot>\n\t\t\t<motion.div\n\t\t\t\tvariants={ slideY }\n\t\t\t\ttransition={ { type: 'tween', delay: 0.8 } }\n\t\t\t\tclassName=\"edit-post-header__toolbar\"\n\t\t\t>\n\t\t\t\t<HeaderToolbar />\n\t\t\t\t<TemplateTitle />\n\t\t\t</motion.div>\n\t\t\t<motion.div\n\t\t\t\tvariants={ slideY }\n\t\t\t\ttransition={ { type: 'tween', delay: 0.8 } }\n\t\t\t\tclassName=\"edit-post-header__settings\"\n\t\t\t>\n\t\t\t\t{ ! isPublishSidebarOpened && (\n\t\t\t\t\t// This button isn't completely hidden by the publish sidebar.\n\t\t\t\t\t// We can't hide the whole toolbar when the publish sidebar is open because\n\t\t\t\t\t// we want to prevent mounting/unmounting the PostPublishButtonOrToggle DOM node.\n\t\t\t\t\t// We track that DOM node to return focus to the PostPublishButtonOrToggle\n\t\t\t\t\t// when the publish sidebar has been closed.\n\t\t\t\t\t<PostSavedState\n\t\t\t\t\t\tforceIsDirty={ hasActiveMetaboxes }\n\t\t\t\t\t\tforceIsSaving={ isSaving }\n\t\t\t\t\t\tshowIconLabels={ showIconLabels }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t<ViewLink />\n\t\t\t\t<DevicePreview />\n\t\t\t\t<PostPreviewButton\n\t\t\t\t\tforceIsAutosaveable={ hasActiveMetaboxes }\n\t\t\t\t\tforcePreviewLink={ isSaving ? null : undefined }\n\t\t\t\t/>\n\t\t\t\t<PostPublishButtonOrToggle\n\t\t\t\t\tforceIsDirty={ hasActiveMetaboxes }\n\t\t\t\t\tforceIsSaving={ isSaving }\n\t\t\t\t\tsetEntitiesSavedStatesCallback={\n\t\t\t\t\t\tsetEntitiesSavedStatesCallback\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t{ ( isLargeViewport || ! showIconLabels ) && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<PinnedItems.Slot scope=\"core/edit-post\" />\n\t\t\t\t\t\t<MoreMenu showIconLabels={ showIconLabels } />\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t\t{ showIconLabels && ! isLargeViewport && (\n\t\t\t\t\t<MoreMenu showIconLabels={ showIconLabels } />\n\t\t\t\t) }\n\t\t\t</motion.div>\n\t\t</div>\n\t);\n}\n\nexport default Header;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/components/header/index.js"],"names":["Header","setEntitiesSavedStatesCallback","isLargeViewport","hasActiveMetaboxes","isPublishSidebarOpened","isSaving","showIconLabels","isDistractionFreeMode","select","editPostStore","hasMetaBoxes","isSavingMetaBoxes","isFeatureActive","isDistractionFree","slideY","hidden","y","hover","transition","type","delay","slideX","x","undefined"],"mappings":";;;;;;;;;;;AAGA;;AACA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AApBA;AACA;AACA;;AAOA;AACA;AACA;AAWA,SAASA,MAAT,CAAiB;AAAEC,EAAAA;AAAF,CAAjB,EAAsD;AACrD,QAAMC,eAAe,GAAG,+BAAkB,OAAlB,CAAxB;AACA,QAAM;AACLC,IAAAA,kBADK;AAELC,IAAAA,sBAFK;AAGLC,IAAAA,QAHK;AAILC,IAAAA,cAJK;AAKLC,IAAAA;AALK,MAMF,qBACDC,MAAF,KAAgB;AACfL,IAAAA,kBAAkB,EAAEK,MAAM,CAAEC,YAAF,CAAN,CAAwBC,YAAxB,EADL;AAEfN,IAAAA,sBAAsB,EACrBI,MAAM,CAAEC,YAAF,CAAN,CAAwBL,sBAAxB,EAHc;AAIfC,IAAAA,QAAQ,EAAEG,MAAM,CAAEC,YAAF,CAAN,CAAwBE,iBAAxB,EAJK;AAKfL,IAAAA,cAAc,EACbE,MAAM,CAAEC,YAAF,CAAN,CAAwBG,eAAxB,CAAyC,gBAAzC,CANc;AAOfL,IAAAA,qBAAqB,EACpBC,MAAM,CAAEC,YAAF,CAAN,CAAwBG,eAAxB,CAAyC,iBAAzC;AARc,GAAhB,CADG,EAWH,EAXG,CANJ;AAoBA,QAAMC,iBAAiB,GAAGN,qBAAqB,IAAIL,eAAnD;AAEA,QAAMY,MAAM,GAAG;AACdC,IAAAA,MAAM,EAAEF,iBAAiB,GAAG;AAAEG,MAAAA,CAAC,EAAE;AAAL,KAAH,GAAkB;AAAEA,MAAAA,CAAC,EAAE;AAAL,KAD7B;AAEdC,IAAAA,KAAK,EAA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,EAAC;AAHX,KAKG,CAAEhB,sBAAF,IACD;AACA;AACA;AACA;AACA;AACA,8BAAC,sBAAD;AACC,IAAA,YAAY,EAAGD,kBADhB;AAEC,IAAA,aAAa,EAAGE,QAFjB;AAGC,IAAA,cAAc,EAAGC;AAHlB,IAXF,EAiBC,4BAAC,iBAAD,OAjBD,EAkBC,4BAAC,sBAAD,OAlBD,EAmBC,4BAAC,yBAAD;AACC,IAAA,mBAAmB,EAAGH,kBADvB;AAEC,IAAA,gBAAgB,EAAGE,QAAQ,GAAG,IAAH,GAAUkB;AAFtC,IAnBD,EAuBC,4BAAC,kCAAD;AACC,IAAA,YAAY,EAAGpB,kBADhB;AAEC,IAAA,aAAa,EAAGE,QAFjB;AAGC,IAAA,8BAA8B,EAC7BJ;AAJF,IAvBD,EA8BG,CAAEC,eAAe,IAAI,CAAEI,cAAvB,KACD,qDACC,4BAAC,sBAAD,CAAa,IAAb;AAAkB,IAAA,KAAK,EAAC;AAAxB,IADD,EAEC,4BAAC,iBAAD;AAAU,IAAA,cAAc,EAAGA;AAA3B,IAFD,CA/BF,EAoCGA,cAAc,IAAI,CAAEJ,eAApB,IACD,4BAAC,iBAAD;AAAU,IAAA,cAAc,EAAGI;AAA3B,IArCF,CAnBD,CADD;AA8DA;;eAEcN,M","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { PostSavedState, PostPreviewButton } from '@wordpress/editor';\nimport { useSelect } from '@wordpress/data';\nimport { PinnedItems } from '@wordpress/interface';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { __unstableMotion as motion } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport FullscreenModeClose from './fullscreen-mode-close';\nimport HeaderToolbar from './header-toolbar';\nimport MoreMenu from './more-menu';\nimport PostPublishButtonOrToggle from './post-publish-button-or-toggle';\nimport { default as DevicePreview } from '../device-preview';\nimport ViewLink from '../view-link';\nimport MainDashboardButton from './main-dashboard-button';\nimport { store as editPostStore } from '../../store';\nimport DocumentTitle from './document-title';\n\nfunction Header( { setEntitiesSavedStatesCallback } ) {\n\tconst isLargeViewport = useViewportMatch( 'large' );\n\tconst {\n\t\thasActiveMetaboxes,\n\t\tisPublishSidebarOpened,\n\t\tisSaving,\n\t\tshowIconLabels,\n\t\tisDistractionFreeMode,\n\t} = useSelect(\n\t\t( select ) => ( {\n\t\t\thasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),\n\t\t\tisPublishSidebarOpened:\n\t\t\t\tselect( editPostStore ).isPublishSidebarOpened(),\n\t\t\tisSaving: select( editPostStore ).isSavingMetaBoxes(),\n\t\t\tshowIconLabels:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'showIconLabels' ),\n\t\t\tisDistractionFreeMode:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'distractionFree' ),\n\t\t} ),\n\t\t[]\n\t);\n\n\tconst isDistractionFree = isDistractionFreeMode && isLargeViewport;\n\n\tconst slideY = {\n\t\thidden: isDistractionFree ? { y: '-50' } : { y: 0 },\n\t\thover: { y: 0, transition: { type: 'tween', delay: 0.2 } },\n\t};\n\n\tconst slideX = {\n\t\thidden: isDistractionFree ? { x: '-100%' } : { x: 0 },\n\t\thover: { x: 0, transition: { type: 'tween', delay: 0.2 } },\n\t};\n\n\treturn (\n\t\t<div className=\"edit-post-header\">\n\t\t\t<MainDashboardButton.Slot>\n\t\t\t\t<motion.div\n\t\t\t\t\tvariants={ slideX }\n\t\t\t\t\ttransition={ { type: 'tween', delay: 0.8 } }\n\t\t\t\t>\n\t\t\t\t\t<FullscreenModeClose showTooltip />\n\t\t\t\t</motion.div>\n\t\t\t</MainDashboardButton.Slot>\n\t\t\t<motion.div\n\t\t\t\tvariants={ slideY }\n\t\t\t\ttransition={ { type: 'tween', delay: 0.8 } }\n\t\t\t\tclassName=\"edit-post-header__toolbar\"\n\t\t\t>\n\t\t\t\t<HeaderToolbar />\n\t\t\t\t<div className=\"edit-post-header__document-title\">\n\t\t\t\t\t<DocumentTitle />\n\t\t\t\t</div>\n\t\t\t</motion.div>\n\t\t\t<motion.div\n\t\t\t\tvariants={ slideY }\n\t\t\t\ttransition={ { type: 'tween', delay: 0.8 } }\n\t\t\t\tclassName=\"edit-post-header__settings\"\n\t\t\t>\n\t\t\t\t{ ! isPublishSidebarOpened && (\n\t\t\t\t\t// This button isn't completely hidden by the publish sidebar.\n\t\t\t\t\t// We can't hide the whole toolbar when the publish sidebar is open because\n\t\t\t\t\t// we want to prevent mounting/unmounting the PostPublishButtonOrToggle DOM node.\n\t\t\t\t\t// We track that DOM node to return focus to the PostPublishButtonOrToggle\n\t\t\t\t\t// when the publish sidebar has been closed.\n\t\t\t\t\t<PostSavedState\n\t\t\t\t\t\tforceIsDirty={ hasActiveMetaboxes }\n\t\t\t\t\t\tforceIsSaving={ isSaving }\n\t\t\t\t\t\tshowIconLabels={ showIconLabels }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t<ViewLink />\n\t\t\t\t<DevicePreview />\n\t\t\t\t<PostPreviewButton\n\t\t\t\t\tforceIsAutosaveable={ hasActiveMetaboxes }\n\t\t\t\t\tforcePreviewLink={ isSaving ? null : undefined }\n\t\t\t\t/>\n\t\t\t\t<PostPublishButtonOrToggle\n\t\t\t\t\tforceIsDirty={ hasActiveMetaboxes }\n\t\t\t\t\tforceIsSaving={ isSaving }\n\t\t\t\t\tsetEntitiesSavedStatesCallback={\n\t\t\t\t\t\tsetEntitiesSavedStatesCallback\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t{ ( isLargeViewport || ! showIconLabels ) && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<PinnedItems.Slot scope=\"core/edit-post\" />\n\t\t\t\t\t\t<MoreMenu showIconLabels={ showIconLabels } />\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t\t{ showIconLabels && ! isLargeViewport && (\n\t\t\t\t\t<MoreMenu showIconLabels={ showIconLabels } />\n\t\t\t\t) }\n\t\t\t</motion.div>\n\t\t</div>\n\t);\n}\n\nexport default Header;\n"]}
@@ -19,10 +19,9 @@ const {
19
19
  } = (0, _components.createSlotFill)(slotName);
20
20
  const MainDashboardButton = Fill;
21
21
 
22
- const Slot = _ref => {
23
- let {
24
- children
25
- } = _ref;
22
+ const Slot = ({
23
+ children
24
+ }) => {
26
25
  const fills = (0, _components.__experimentalUseSlotFills)(slotName);
27
26
  const hasFills = Boolean(fills && fills.length);
28
27
 
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/header/main-dashboard-button/index.js"],"names":["slotName","Fill","Slot","MainDashboardButtonSlot","MainDashboardButton","children","fills","hasFills","Boolean","length"],"mappings":";;;;;;;;;AAGA;;AAHA;AACA;AACA;AAMA,MAAMA,QAAQ,GAAG,mCAAjB;AAEA,MAAM;AAAEC,EAAAA,IAAF;AAAQC,EAAAA,IAAI,EAAEC;AAAd,IAA0C,gCAAgBH,QAAhB,CAAhD;AAEA,MAAMI,mBAAmB,GAAGH,IAA5B;;AAEA,MAAMC,IAAI,GAAG,QAAoB;AAAA,MAAlB;AAAEG,IAAAA;AAAF,GAAkB;AAChC,QAAMC,KAAK,GAAG,4CAAcN,QAAd,CAAd;AACA,QAAMO,QAAQ,GAAGC,OAAO,CAAEF,KAAK,IAAIA,KAAK,CAACG,MAAjB,CAAxB;;AAEA,MAAK,CAAEF,QAAP,EAAkB;AACjB,WAAOF,QAAP;AACA;;AAED,SAAO,4BAAC,uBAAD;AAAyB,IAAA,gBAAgB;AAAzC,IAAP;AACA,CATD;;AAWAD,mBAAmB,CAACF,IAApB,GAA2BA,IAA3B;eAEeE,mB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalUseSlotFills as useSlotFills,\n\tcreateSlotFill,\n} from '@wordpress/components';\n\nconst slotName = '__experimentalMainDashboardButton';\n\nconst { Fill, Slot: MainDashboardButtonSlot } = createSlotFill( slotName );\n\nconst MainDashboardButton = Fill;\n\nconst Slot = ( { children } ) => {\n\tconst fills = useSlotFills( slotName );\n\tconst hasFills = Boolean( fills && fills.length );\n\n\tif ( ! hasFills ) {\n\t\treturn children;\n\t}\n\n\treturn <MainDashboardButtonSlot bubblesVirtually />;\n};\n\nMainDashboardButton.Slot = Slot;\n\nexport default MainDashboardButton;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/components/header/main-dashboard-button/index.js"],"names":["slotName","Fill","Slot","MainDashboardButtonSlot","MainDashboardButton","children","fills","hasFills","Boolean","length"],"mappings":";;;;;;;;;AAGA;;AAHA;AACA;AACA;AAMA,MAAMA,QAAQ,GAAG,mCAAjB;AAEA,MAAM;AAAEC,EAAAA,IAAF;AAAQC,EAAAA,IAAI,EAAEC;AAAd,IAA0C,gCAAgBH,QAAhB,CAAhD;AAEA,MAAMI,mBAAmB,GAAGH,IAA5B;;AAEA,MAAMC,IAAI,GAAG,CAAE;AAAEG,EAAAA;AAAF,CAAF,KAAoB;AAChC,QAAMC,KAAK,GAAG,4CAAcN,QAAd,CAAd;AACA,QAAMO,QAAQ,GAAGC,OAAO,CAAEF,KAAK,IAAIA,KAAK,CAACG,MAAjB,CAAxB;;AAEA,MAAK,CAAEF,QAAP,EAAkB;AACjB,WAAOF,QAAP;AACA;;AAED,SAAO,4BAAC,uBAAD;AAAyB,IAAA,gBAAgB;AAAzC,IAAP;AACA,CATD;;AAWAD,mBAAmB,CAACF,IAApB,GAA2BA,IAA3B;eAEeE,mB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalUseSlotFills as useSlotFills,\n\tcreateSlotFill,\n} from '@wordpress/components';\n\nconst slotName = '__experimentalMainDashboardButton';\n\nconst { Fill, Slot: MainDashboardButtonSlot } = createSlotFill( slotName );\n\nconst MainDashboardButton = Fill;\n\nconst Slot = ( { children } ) => {\n\tconst fills = useSlotFills( slotName );\n\tconst hasFills = Boolean( fills && fills.length );\n\n\tif ( ! hasFills ) {\n\t\treturn children;\n\t}\n\n\treturn <MainDashboardButtonSlot bubblesVirtually />;\n};\n\nMainDashboardButton.Slot = Slot;\n\nexport default MainDashboardButton;\n"]}
@@ -32,10 +32,9 @@ var _writingMenu = _interopRequireDefault(require("../writing-menu"));
32
32
  /**
33
33
  * Internal dependencies
34
34
  */
35
- const MoreMenu = _ref => {
36
- let {
37
- showIconLabels
38
- } = _ref;
35
+ const MoreMenu = ({
36
+ showIconLabels
37
+ }) => {
39
38
  const isLargeViewport = (0, _compose.useViewportMatch)('large');
40
39
  return (0, _element.createElement)(_interface.MoreMenuDropdown, {
41
40
  toggleProps: {
@@ -44,26 +43,23 @@ const MoreMenu = _ref => {
44
43
  variant: 'tertiary'
45
44
  })
46
45
  }
47
- }, _ref2 => {
48
- let {
46
+ }, ({
47
+ onClose
48
+ }) => (0, _element.createElement)(_element.Fragment, null, showIconLabels && !isLargeViewport && (0, _element.createElement)(_interface.PinnedItems.Slot, {
49
+ className: showIconLabels && 'show-icon-labels',
50
+ scope: "core/edit-post"
51
+ }), (0, _element.createElement)(_writingMenu.default, null), (0, _element.createElement)(_modeSwitcher.default, null), (0, _element.createElement)(_interface.ActionItem.Slot, {
52
+ name: "core/edit-post/plugin-more-menu",
53
+ label: (0, _i18n.__)('Plugins'),
54
+ as: _components.MenuGroup,
55
+ fillProps: {
56
+ onClick: onClose
57
+ }
58
+ }), (0, _element.createElement)(_toolsMoreMenuGroup.default.Slot, {
59
+ fillProps: {
49
60
  onClose
50
- } = _ref2;
51
- return (0, _element.createElement)(_element.Fragment, null, showIconLabels && !isLargeViewport && (0, _element.createElement)(_interface.PinnedItems.Slot, {
52
- className: showIconLabels && 'show-icon-labels',
53
- scope: "core/edit-post"
54
- }), (0, _element.createElement)(_writingMenu.default, null), (0, _element.createElement)(_modeSwitcher.default, null), (0, _element.createElement)(_interface.ActionItem.Slot, {
55
- name: "core/edit-post/plugin-more-menu",
56
- label: (0, _i18n.__)('Plugins'),
57
- as: _components.MenuGroup,
58
- fillProps: {
59
- onClick: onClose
60
- }
61
- }), (0, _element.createElement)(_toolsMoreMenuGroup.default.Slot, {
62
- fillProps: {
63
- onClose
64
- }
65
- }), (0, _element.createElement)(_components.MenuGroup, null, (0, _element.createElement)(_preferencesMenuItem.default, null)));
66
- });
61
+ }
62
+ }), (0, _element.createElement)(_components.MenuGroup, null, (0, _element.createElement)(_preferencesMenuItem.default, null))));
67
63
  };
68
64
 
69
65
  var _default = MoreMenu;
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/header/more-menu/index.js"],"names":["MoreMenu","showIconLabels","isLargeViewport","showTooltip","variant","onClose","MenuGroup","onClick"],"mappings":";;;;;;;;;;;AAGA;;AACA;;AACA;;AAKA;;AAKA;;AACA;;AACA;;AACA;;AAlBA;AACA;AACA;;AAUA;AACA;AACA;AAMA,MAAMA,QAAQ,GAAG,QAA0B;AAAA,MAAxB;AAAEC,IAAAA;AAAF,GAAwB;AAC1C,QAAMC,eAAe,GAAG,+BAAkB,OAAlB,CAAxB;AAEA,SACC,4BAAC,2BAAD;AACC,IAAA,WAAW,EAAG;AACbC,MAAAA,WAAW,EAAE,CAAEF,cADF;AAEb,UAAKA,cAAc,IAAI;AAAEG,QAAAA,OAAO,EAAE;AAAX,OAAvB;AAFa;AADf,KAMG;AAAA,QAAE;AAAEC,MAAAA;AAAF,KAAF;AAAA,WACD,qDACGJ,cAAc,IAAI,CAAEC,eAApB,IACD,4BAAC,sBAAD,CAAa,IAAb;AACC,MAAA,SAAS,EAAGD,cAAc,IAAI,kBAD/B;AAEC,MAAA,KAAK,EAAC;AAFP,MAFF,EAOC,4BAAC,oBAAD,OAPD,EAQC,4BAAC,qBAAD,OARD,EASC,4BAAC,qBAAD,CAAY,IAAZ;AACC,MAAA,IAAI,EAAC,iCADN;AAEC,MAAA,KAAK,EAAG,cAAI,SAAJ,CAFT;AAGC,MAAA,EAAE,EAAGK,qBAHN;AAIC,MAAA,SAAS,EAAG;AAAEC,QAAAA,OAAO,EAAEF;AAAX;AAJb,MATD,EAeC,4BAAC,2BAAD,CAAoB,IAApB;AAAyB,MAAA,SAAS,EAAG;AAAEA,QAAAA;AAAF;AAArC,MAfD,EAgBC,4BAAC,qBAAD,QACC,4BAAC,4BAAD,OADD,CAhBD,CADC;AAAA,GANH,CADD;AA+BA,CAlCD;;eAoCeL,Q","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { MenuGroup } from '@wordpress/components';\nimport {\n\tActionItem,\n\tMoreMenuDropdown,\n\tPinnedItems,\n} from '@wordpress/interface';\nimport { useViewportMatch } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport ModeSwitcher from '../mode-switcher';\nimport PreferencesMenuItem from '../preferences-menu-item';\nimport ToolsMoreMenuGroup from '../tools-more-menu-group';\nimport WritingMenu from '../writing-menu';\n\nconst MoreMenu = ( { showIconLabels } ) => {\n\tconst isLargeViewport = useViewportMatch( 'large' );\n\n\treturn (\n\t\t<MoreMenuDropdown\n\t\t\ttoggleProps={ {\n\t\t\t\tshowTooltip: ! showIconLabels,\n\t\t\t\t...( showIconLabels && { variant: 'tertiary' } ),\n\t\t\t} }\n\t\t>\n\t\t\t{ ( { onClose } ) => (\n\t\t\t\t<>\n\t\t\t\t\t{ showIconLabels && ! isLargeViewport && (\n\t\t\t\t\t\t<PinnedItems.Slot\n\t\t\t\t\t\t\tclassName={ showIconLabels && 'show-icon-labels' }\n\t\t\t\t\t\t\tscope=\"core/edit-post\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t<WritingMenu />\n\t\t\t\t\t<ModeSwitcher />\n\t\t\t\t\t<ActionItem.Slot\n\t\t\t\t\t\tname=\"core/edit-post/plugin-more-menu\"\n\t\t\t\t\t\tlabel={ __( 'Plugins' ) }\n\t\t\t\t\t\tas={ MenuGroup }\n\t\t\t\t\t\tfillProps={ { onClick: onClose } }\n\t\t\t\t\t/>\n\t\t\t\t\t<ToolsMoreMenuGroup.Slot fillProps={ { onClose } } />\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t<PreferencesMenuItem />\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t</>\n\t\t\t) }\n\t\t</MoreMenuDropdown>\n\t);\n};\n\nexport default MoreMenu;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/components/header/more-menu/index.js"],"names":["MoreMenu","showIconLabels","isLargeViewport","showTooltip","variant","onClose","MenuGroup","onClick"],"mappings":";;;;;;;;;;;AAGA;;AACA;;AACA;;AAKA;;AAKA;;AACA;;AACA;;AACA;;AAlBA;AACA;AACA;;AAUA;AACA;AACA;AAMA,MAAMA,QAAQ,GAAG,CAAE;AAAEC,EAAAA;AAAF,CAAF,KAA0B;AAC1C,QAAMC,eAAe,GAAG,+BAAkB,OAAlB,CAAxB;AAEA,SACC,4BAAC,2BAAD;AACC,IAAA,WAAW,EAAG;AACbC,MAAAA,WAAW,EAAE,CAAEF,cADF;AAEb,UAAKA,cAAc,IAAI;AAAEG,QAAAA,OAAO,EAAE;AAAX,OAAvB;AAFa;AADf,KAMG,CAAE;AAAEC,IAAAA;AAAF,GAAF,KACD,qDACGJ,cAAc,IAAI,CAAEC,eAApB,IACD,4BAAC,sBAAD,CAAa,IAAb;AACC,IAAA,SAAS,EAAGD,cAAc,IAAI,kBAD/B;AAEC,IAAA,KAAK,EAAC;AAFP,IAFF,EAOC,4BAAC,oBAAD,OAPD,EAQC,4BAAC,qBAAD,OARD,EASC,4BAAC,qBAAD,CAAY,IAAZ;AACC,IAAA,IAAI,EAAC,iCADN;AAEC,IAAA,KAAK,EAAG,cAAI,SAAJ,CAFT;AAGC,IAAA,EAAE,EAAGK,qBAHN;AAIC,IAAA,SAAS,EAAG;AAAEC,MAAAA,OAAO,EAAEF;AAAX;AAJb,IATD,EAeC,4BAAC,2BAAD,CAAoB,IAApB;AAAyB,IAAA,SAAS,EAAG;AAAEA,MAAAA;AAAF;AAArC,IAfD,EAgBC,4BAAC,qBAAD,QACC,4BAAC,4BAAD,OADD,CAhBD,CAPF,CADD;AA+BA,CAlCD;;eAoCeL,Q","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { MenuGroup } from '@wordpress/components';\nimport {\n\tActionItem,\n\tMoreMenuDropdown,\n\tPinnedItems,\n} from '@wordpress/interface';\nimport { useViewportMatch } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport ModeSwitcher from '../mode-switcher';\nimport PreferencesMenuItem from '../preferences-menu-item';\nimport ToolsMoreMenuGroup from '../tools-more-menu-group';\nimport WritingMenu from '../writing-menu';\n\nconst MoreMenu = ( { showIconLabels } ) => {\n\tconst isLargeViewport = useViewportMatch( 'large' );\n\n\treturn (\n\t\t<MoreMenuDropdown\n\t\t\ttoggleProps={ {\n\t\t\t\tshowTooltip: ! showIconLabels,\n\t\t\t\t...( showIconLabels && { variant: 'tertiary' } ),\n\t\t\t} }\n\t\t>\n\t\t\t{ ( { onClose } ) => (\n\t\t\t\t<>\n\t\t\t\t\t{ showIconLabels && ! isLargeViewport && (\n\t\t\t\t\t\t<PinnedItems.Slot\n\t\t\t\t\t\t\tclassName={ showIconLabels && 'show-icon-labels' }\n\t\t\t\t\t\t\tscope=\"core/edit-post\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t<WritingMenu />\n\t\t\t\t\t<ModeSwitcher />\n\t\t\t\t\t<ActionItem.Slot\n\t\t\t\t\t\tname=\"core/edit-post/plugin-more-menu\"\n\t\t\t\t\t\tlabel={ __( 'Plugins' ) }\n\t\t\t\t\t\tas={ MenuGroup }\n\t\t\t\t\t\tfillProps={ { onClick: onClose } }\n\t\t\t\t\t/>\n\t\t\t\t\t<ToolsMoreMenuGroup.Slot fillProps={ { onClose } } />\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t<PreferencesMenuItem />\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t</>\n\t\t\t) }\n\t\t</MoreMenuDropdown>\n\t);\n};\n\nexport default MoreMenu;\n"]}
@@ -23,20 +23,19 @@ var _store = require("../../store");
23
23
  /**
24
24
  * Internal dependencies
25
25
  */
26
- function PostPublishButtonOrToggle(_ref) {
27
- let {
28
- forceIsDirty,
29
- forceIsSaving,
30
- hasPublishAction,
31
- isBeingScheduled,
32
- isPending,
33
- isPublished,
34
- isPublishSidebarEnabled,
35
- isPublishSidebarOpened,
36
- isScheduled,
37
- togglePublishSidebar,
38
- setEntitiesSavedStatesCallback
39
- } = _ref;
26
+ function PostPublishButtonOrToggle({
27
+ forceIsDirty,
28
+ forceIsSaving,
29
+ hasPublishAction,
30
+ isBeingScheduled,
31
+ isPending,
32
+ isPublished,
33
+ isPublishSidebarEnabled,
34
+ isPublishSidebarOpened,
35
+ isScheduled,
36
+ togglePublishSidebar,
37
+ setEntitiesSavedStatesCallback
38
+ }) {
40
39
  const IS_TOGGLE = 'toggle';
41
40
  const IS_BUTTON = 'button';
42
41
  const isSmallerThanMediumViewport = (0, _compose.useViewportMatch)('medium', '<');
@@ -85,10 +84,10 @@ function PostPublishButtonOrToggle(_ref) {
85
84
  }
86
85
 
87
86
  var _default = (0, _compose.compose)((0, _data.withSelect)(select => {
88
- var _select$getCurrentPos, _select$getCurrentPos2, _select$getCurrentPos3;
87
+ var _select$getCurrentPos;
89
88
 
90
89
  return {
91
- hasPublishAction: (_select$getCurrentPos = (_select$getCurrentPos2 = select(_editor.store).getCurrentPost()) === null || _select$getCurrentPos2 === void 0 ? void 0 : (_select$getCurrentPos3 = _select$getCurrentPos2._links) === null || _select$getCurrentPos3 === void 0 ? void 0 : _select$getCurrentPos3['wp:action-publish']) !== null && _select$getCurrentPos !== void 0 ? _select$getCurrentPos : false,
90
+ hasPublishAction: (_select$getCurrentPos = select(_editor.store).getCurrentPost()?._links?.['wp:action-publish']) !== null && _select$getCurrentPos !== void 0 ? _select$getCurrentPos : false,
92
91
  isBeingScheduled: select(_editor.store).isEditedPostBeingScheduled(),
93
92
  isPending: select(_editor.store).isCurrentPostPending(),
94
93
  isPublished: select(_editor.store).isCurrentPostPublished(),
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/header/post-publish-button-or-toggle.js"],"names":["PostPublishButtonOrToggle","forceIsDirty","forceIsSaving","hasPublishAction","isBeingScheduled","isPending","isPublished","isPublishSidebarEnabled","isPublishSidebarOpened","isScheduled","togglePublishSidebar","setEntitiesSavedStatesCallback","IS_TOGGLE","IS_BUTTON","isSmallerThanMediumViewport","component","select","editorStore","getCurrentPost","_links","isEditedPostBeingScheduled","isCurrentPostPending","isCurrentPostPublished","editPostStore","isCurrentPostScheduled","dispatch"],"mappings":";;;;;;;;;;AAGA;;AACA;;AACA;;AAKA;;AAVA;AACA;AACA;;AAKA;AACA;AACA;AAGO,SAASA,yBAAT,OAYH;AAAA,MAZuC;AAC1CC,IAAAA,YAD0C;AAE1CC,IAAAA,aAF0C;AAG1CC,IAAAA,gBAH0C;AAI1CC,IAAAA,gBAJ0C;AAK1CC,IAAAA,SAL0C;AAM1CC,IAAAA,WAN0C;AAO1CC,IAAAA,uBAP0C;AAQ1CC,IAAAA,sBAR0C;AAS1CC,IAAAA,WAT0C;AAU1CC,IAAAA,oBAV0C;AAW1CC,IAAAA;AAX0C,GAYvC;AACH,QAAMC,SAAS,GAAG,QAAlB;AACA,QAAMC,SAAS,GAAG,QAAlB;AACA,QAAMC,2BAA2B,GAAG,+BAAkB,QAAlB,EAA4B,GAA5B,CAApC;AACA,MAAIC,SAAJ;AAEA;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACC,MACCT,WAAW,IACTG,WAAW,IAAIL,gBADjB,IAEEC,SAAS,IAAI,CAAEF,gBAAf,IAAmC,CAAEW,2BAHxC,EAIE;AACDC,IAAAA,SAAS,GAAGF,SAAZ;AACA,GAND,MAMO,IAAKC,2BAAL,EAAmC;AACzCC,IAAAA,SAAS,GAAGH,SAAZ;AACA,GAFM,MAEA,IAAKL,uBAAL,EAA+B;AACrCQ,IAAAA,S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press/compose';\nimport { withDispatch, withSelect } from '@wordpress/data';\nimport { PostPublishButton, store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../store';\n\nexport function PostPublishButtonOrToggle( {\n\tforceIsDirty,\n\tforceIsSaving,\n\thasPublishAction,\n\tisBeingScheduled,\n\tisPending,\n\tisPublished,\n\tisPublishSidebarEnabled,\n\tisPublishSidebarOpened,\n\tisScheduled,\n\ttogglePublishSidebar,\n\tsetEntitiesSavedStatesCallback,\n} ) {\n\tconst IS_TOGGLE = 'toggle';\n\tconst IS_BUTTON = 'button';\n\tconst isSmallerThanMediumViewport = useViewportMatch( 'medium', '<' );\n\tlet component;\n\n\t/**\n\t * Conditions to show a BUTTON (publish directly) or a TOGGLE (open publish sidebar):\n\t *\n\t * 1) We want to show a BUTTON when the post status is at the _final stage_\n\t * for a particular role (see https://wordpress.org/documentation/article/post-status/):\n\t *\n\t * - is published\n\t * - is scheduled to be published\n\t * - is pending and can't be published (but only for viewports >= medium).\n\t * \t Originally, we considered showing a button for pending posts that couldn't be published\n\t * \t (for example, for an author with the contributor role). Some languages can have\n\t * \t long translations for \"Submit for review\", so given the lack of UI real estate available\n\t * \t we decided to take into account the viewport in that case.\n\t * \t See: https://github.com/WordPress/gutenberg/issues/10475\n\t *\n\t * 2) Then, in small viewports, we'll show a TOGGLE.\n\t *\n\t * 3) Finally, we'll use the publish sidebar status to decide:\n\t *\n\t * - if it is enabled, we show a TOGGLE\n\t * - if it is disabled, we show a BUTTON\n\t */\n\tif (\n\t\tisPublished ||\n\t\t( isScheduled && isBeingScheduled ) ||\n\t\t( isPending && ! hasPublishAction && ! isSmallerThanMediumViewport )\n\t) {\n\t\tcomponent = IS_BUTTON;\n\t} else if ( isSmallerThanMediumViewport ) {\n\t\tcomponent = IS_TOGGLE;\n\t} else if ( isPublishSidebarEnabled ) {\n\t\tcomponent = IS_TOGGLE;\n\t} else {\n\t\tcomponent = IS_BUTTON;\n\t}\n\n\treturn (\n\t\t<PostPublishButton\n\t\t\tforceIsDirty={ forceIsDirty }\n\t\t\tforceIsSaving={ forceIsSaving }\n\t\t\tisOpen={ isPublishSidebarOpened }\n\t\t\tisToggle={ component === IS_TOGGLE }\n\t\t\tonToggle={ togglePublishSidebar }\n\t\t\tsetEntitiesSavedStatesCallback={ setEntitiesSavedStatesCallback }\n\t\t/>\n\t);\n}\n\nexport default compose(\n\twithSelect( ( select ) => ( {\n\t\thasPublishAction:\n\t\t\tselect( editorStore ).getCurrentPost()?._links?.[\n\t\t\t\t'wp:action-publish'\n\t\t\t] ?? false,\n\t\tisBeingScheduled: select( editorStore ).isEditedPostBeingScheduled(),\n\t\tisPending: select( editorStore ).isCurrentPostPending(),\n\t\tisPublished: select( editorStore ).isCurrentPostPublished(),\n\t\tisPublishSidebarEnabled:\n\t\t\tselect( editorStore ).isPublishSidebarEnabled(),\n\t\tisPublishSidebarOpened:\n\t\t\tselect( editPostStore ).isPublishSidebarOpened(),\n\t\tisScheduled: select( editorStore ).isCurrentPostScheduled(),\n\t} ) ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst { togglePublishSidebar } = dispatch( editPostStore );\n\t\treturn {\n\t\t\ttogglePublishSidebar,\n\t\t};\n\t} )\n)( PostPublishButtonOrToggle );\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/components/header/post-publish-button-or-toggle.js"],"names":["PostPublishButtonOrToggle","forceIsDirty","forceIsSaving","hasPublishAction","isBeingScheduled","isPending","isPublished","isPublishSidebarEnabled","isPublishSidebarOpened","isScheduled","togglePublishSidebar","setEntitiesSavedStatesCallback","IS_TOGGLE","IS_BUTTON","isSmallerThanMediumViewport","component","select","editorStore","getCurrentPost","_links","isEditedPostBeingScheduled","isCurrentPostPending","isCurrentPostPublished","editPostStore","isCurrentPostScheduled","dispatch"],"mappings":";;;;;;;;;;AAGA;;AACA;;AACA;;AAKA;;AAVA;AACA;AACA;;AAKA;AACA;AACA;AAGO,SAASA,yBAAT,CAAoC;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tB,IAAwCC,MAAxC,GACC,mBADD,CADe,yEAGV,KAJqB;AAK3Bf,IAAAA,gBAAgB,EAAEY,MAAM,CAAEC,aAAF,CAAN,CAAsBG,0BAAtB,EALS;AAM3Bf,IAAAA,SAAS,EAAEW,MAAM,CAAEC,aAAF,CAAN,CAAsBI,oBAAtB,EANgB;AAO3Bf,IAAAA,WAAW,EAAEU,MAAM,CAAEC,aAAF,CAAN,CAAsBK,sBAAtB,EAPc;AAQ3Bf,IAAAA,uBAAuB,EACtBS,MAAM,CAAEC,aAAF,CAAN,CAAsBV,uBAAtB,EAT0B;AAU3BC,IAAAA,sBAAsB,EACrBQ,MAAM,CAAEO,YAAF,CAAN,CAAwBf,sBAAxB,EAX0B;AAY3BC,IAAAA,WAAW,EAAEO,MAAM,CAAEC,aAAF,CAAN,CAAsBO,sBAAtB;AAZc,GAAhB;AAAA,CAAZ,CADc,EAed,wBAAgBC,QAAF,IAAgB;AAC7B,QAAM;AAAEf,IAAAA;AAAF,MAA2Be,QAAQ,CAAEF,YAAF,CAAzC;AACA,SAAO;AACNb,IAAAA;AADM,GAAP;AAGA,CALD,CAfc,EAqBZV,yBArBY,C","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useViewportMatch, compose } from '@wordpress/compose';\nimport { withDispatch, withSelect } from '@wordpress/data';\nimport { PostPublishButton, store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editPostStore } from '../../store';\n\nexport function PostPublishButtonOrToggle( {\n\tforceIsDirty,\n\tforceIsSaving,\n\thasPublishAction,\n\tisBeingScheduled,\n\tisPending,\n\tisPublished,\n\tisPublishSidebarEnabled,\n\tisPublishSidebarOpened,\n\tisScheduled,\n\ttogglePublishSidebar,\n\tsetEntitiesSavedStatesCallback,\n} ) {\n\tconst IS_TOGGLE = 'toggle';\n\tconst IS_BUTTON = 'button';\n\tconst isSmallerThanMediumViewport = useViewportMatch( 'medium', '<' );\n\tlet component;\n\n\t/**\n\t * Conditions to show a BUTTON (publish directly) or a TOGGLE (open publish sidebar):\n\t *\n\t * 1) We want to show a BUTTON when the post status is at the _final stage_\n\t * for a particular role (see https://wordpress.org/documentation/article/post-status/):\n\t *\n\t * - is published\n\t * - is scheduled to be published\n\t * - is pending and can't be published (but only for viewports >= medium).\n\t * \t Originally, we considered showing a button for pending posts that couldn't be published\n\t * \t (for example, for an author with the contributor role). Some languages can have\n\t * \t long translations for \"Submit for review\", so given the lack of UI real estate available\n\t * \t we decided to take into account the viewport in that case.\n\t * \t See: https://github.com/WordPress/gutenberg/issues/10475\n\t *\n\t * 2) Then, in small viewports, we'll show a TOGGLE.\n\t *\n\t * 3) Finally, we'll use the publish sidebar status to decide:\n\t *\n\t * - if it is enabled, we show a TOGGLE\n\t * - if it is disabled, we show a BUTTON\n\t */\n\tif (\n\t\tisPublished ||\n\t\t( isScheduled && isBeingScheduled ) ||\n\t\t( isPending && ! hasPublishAction && ! isSmallerThanMediumViewport )\n\t) {\n\t\tcomponent = IS_BUTTON;\n\t} else if ( isSmallerThanMediumViewport ) {\n\t\tcomponent = IS_TOGGLE;\n\t} else if ( isPublishSidebarEnabled ) {\n\t\tcomponent = IS_TOGGLE;\n\t} else {\n\t\tcomponent = IS_BUTTON;\n\t}\n\n\treturn (\n\t\t<PostPublishButton\n\t\t\tforceIsDirty={ forceIsDirty }\n\t\t\tforceIsSaving={ forceIsSaving }\n\t\t\tisOpen={ isPublishSidebarOpened }\n\t\t\tisToggle={ component === IS_TOGGLE }\n\t\t\tonToggle={ togglePublishSidebar }\n\t\t\tsetEntitiesSavedStatesCallback={ setEntitiesSavedStatesCallback }\n\t\t/>\n\t);\n}\n\nexport default compose(\n\twithSelect( ( select ) => ( {\n\t\thasPublishAction:\n\t\t\tselect( editorStore ).getCurrentPost()?._links?.[\n\t\t\t\t'wp:action-publish'\n\t\t\t] ?? false,\n\t\tisBeingScheduled: select( editorStore ).isEditedPostBeingScheduled(),\n\t\tisPending: select( editorStore ).isCurrentPostPending(),\n\t\tisPublished: select( editorStore ).isCurrentPostPublished(),\n\t\tisPublishSidebarEnabled:\n\t\t\tselect( editorStore ).isPublishSidebarEnabled(),\n\t\tisPublishSidebarOpened:\n\t\t\tselect( editPostStore ).isPublishSidebarOpened(),\n\t\tisScheduled: select( editorStore ).isCurrentPostScheduled(),\n\t} ) ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst { togglePublishSidebar } = dispatch( editPostStore );\n\t\treturn {\n\t\t\ttogglePublishSidebar,\n\t\t};\n\t} )\n)( PostPublishButtonOrToggle );\n"]}
@@ -19,16 +19,13 @@ const {
19
19
  Slot
20
20
  } = (0, _components.createSlotFill)('ToolsMoreMenuGroup');
21
21
 
22
- ToolsMoreMenuGroup.Slot = _ref => {
23
- let {
24
- fillProps
25
- } = _ref;
26
- return (0, _element.createElement)(Slot, {
27
- fillProps: fillProps
28
- }, fills => fills.length > 0 && (0, _element.createElement)(_components.MenuGroup, {
29
- label: (0, _i18n.__)('Tools')
30
- }, fills));
31
- };
22
+ ToolsMoreMenuGroup.Slot = ({
23
+ fillProps
24
+ }) => (0, _element.createElement)(Slot, {
25
+ fillProps: fillProps
26
+ }, fills => fills.length > 0 && (0, _element.createElement)(_components.MenuGroup, {
27
+ label: (0, _i18n.__)('Tools')
28
+ }, fills));
32
29
 
33
30
  var _default = ToolsMoreMenuGroup;
34
31
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/header/tools-more-menu-group/index.js"],"names":["Fill","ToolsMoreMenuGroup","Slot","fillProps","fills","length"],"mappings":";;;;;;;;;AAGA;;AACA;;AAJA;AACA;AACA;AAIA,MAAM;AAAEA,EAAAA,IAAI,EAAEC,kBAAR;AAA4BC,EAAAA;AAA5B,IACL,gCAAgB,oBAAhB,CADD;;AAGAD,kBAAkB,CAACC,IAAnB,GAA0B;AAAA,MAAE;AAAEC,IAAAA;AAAF,GAAF;AAAA,SACzB,4BAAC,IAAD;AAAM,IAAA,SAAS,EAAGA;AAAlB,KACKC,KAAF,IACDA,KAAK,CAACC,MAAN,GAAe,CAAf,IACC,4BAAC,qBAAD;AAAW,IAAA,KAAK,EAAG,cAAI,OAAJ;AAAnB,KAAqCD,KAArC,CAHH,CADyB;AAAA,CAA1B;;eAUeH,kB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createSlotFill, MenuGroup } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nconst { Fill: ToolsMoreMenuGroup, Slot } =\n\tcreateSlotFill( 'ToolsMoreMenuGroup' );\n\nToolsMoreMenuGroup.Slot = ( { fillProps } ) => (\n\t<Slot fillProps={ fillProps }>\n\t\t{ ( fills ) =>\n\t\t\tfills.length > 0 && (\n\t\t\t\t<MenuGroup label={ __( 'Tools' ) }>{ fills }</MenuGroup>\n\t\t\t)\n\t\t}\n\t</Slot>\n);\n\nexport default ToolsMoreMenuGroup;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/components/header/tools-more-menu-group/index.js"],"names":["Fill","ToolsMoreMenuGroup","Slot","fillProps","fills","length"],"mappings":";;;;;;;;;AAGA;;AACA;;AAJA;AACA;AACA;AAIA,MAAM;AAAEA,EAAAA,IAAI,EAAEC,kBAAR;AAA4BC,EAAAA;AAA5B,IACL,gCAAgB,oBAAhB,CADD;;AAGAD,kBAAkB,CAACC,IAAnB,GAA0B,CAAE;AAAEC,EAAAA;AAAF,CAAF,KACzB,4BAAC,IAAD;AAAM,EAAA,SAAS,EAAGA;AAAlB,GACKC,KAAF,IACDA,KAAK,CAACC,MAAN,GAAe,CAAf,IACC,4BAAC,qBAAD;AAAW,EAAA,KAAK,EAAG,cAAI,OAAJ;AAAnB,GAAqCD,KAArC,CAHH,CADD;;eAUeH,kB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createSlotFill, MenuGroup } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nconst { Fill: ToolsMoreMenuGroup, Slot } =\n\tcreateSlotFill( 'ToolsMoreMenuGroup' );\n\nToolsMoreMenuGroup.Slot = ( { fillProps } ) => (\n\t<Slot fillProps={ fillProps }>\n\t\t{ ( fills ) =>\n\t\t\tfills.length > 0 && (\n\t\t\t\t<MenuGroup label={ __( 'Tools' ) }>{ fills }</MenuGroup>\n\t\t\t)\n\t\t}\n\t</Slot>\n);\n\nexport default ToolsMoreMenuGroup;\n"]}
@@ -22,10 +22,9 @@ var _shortcut = _interopRequireDefault(require("./shortcut"));
22
22
  /**
23
23
  * Internal dependencies
24
24
  */
25
- function DynamicShortcut(_ref) {
26
- let {
27
- name
28
- } = _ref;
25
+ function DynamicShortcut({
26
+ name
27
+ }) {
29
28
  const {
30
29
  keyCombination,
31
30
  description,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js"],"names":["DynamicShortcut","name","keyCombination","description","aliases","select","getShortcutKeyCombination","getShortcutDescription","getShortcutAliases","keyboardShortcutsStore"],"mappings":";;;;;;;;;;;AAGA;;AACA;;AAKA;;AATA;AACA;AACA;;AAIA;AACA;AACA;AAGA,SAASA,eAAT,OAAqC;AAAA,MAAX;AAAEC,IAAAA;AAAF,GAAW;AACpC,QAAM;AAAEC,IAAAA,cAAF;AAAkBC,IAAAA,WAAlB;AAA+BC,IAAAA;AAA/B,MAA2C,qBAC9CC,MAAF,IAAc;AACb,UAAM;AACLC,MAAAA,yBADK;AAELC,MAAAA,sBAFK;AAGLC,MAAAA;AAHK,QAIFH,MAAM,CAAEI,wBAAF,CAJV;AAMA,WAAO;AACNP,MAAAA,cAAc,EAAEI,yBAAyB,CAAEL,IAAF,CADnC;AAENG,MAAAA,OAAO,EAAEI,kBAAkB,CAAEP,IAAF,CAFrB;AAGNE,MAAAA,WAAW,EAAEI,sBAAsB,CAAEN,IAAF;AAH7B,KAAP;AAKA,GAb+C,EAchD,CAAEA,IAAF,CAdgD,CAAjD;;AAiBA,MAAK,CAAEC,cAAP,EAAwB;AACvB,WAAO,IAAP;AACA;;AAED,SACC,4BAAC,iBAAD;AACC,IAAA,cAAc,EAAGA,cADlB;AAEC,IAAA,WAAW,EAAGC,WAFf;AAGC,IAAA,OAAO,EAAGC;AAHX,IADD;AAOA;;eAEcJ,e","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\n\n/**\n * Internal dependencies\n */\nimport Shortcut from './shortcut';\n\nfunction DynamicShortcut( { name } ) {\n\tconst { keyCombination, description, aliases } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetShortcutKeyCombination,\n\t\t\t\tgetShortcutDescription,\n\t\t\t\tgetShortcutAliases,\n\t\t\t} = select( keyboardShortcutsStore );\n\n\t\t\treturn {\n\t\t\t\tkeyCombination: getShortcutKeyCombination( name ),\n\t\t\t\taliases: getShortcutAliases( name ),\n\t\t\t\tdescription: getShortcutDescription( name ),\n\t\t\t};\n\t\t},\n\t\t[ name ]\n\t);\n\n\tif ( ! keyCombination ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Shortcut\n\t\t\tkeyCombination={ keyCombination }\n\t\t\tdescription={ description }\n\t\t\taliases={ aliases }\n\t\t/>\n\t);\n}\n\nexport default DynamicShortcut;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js"],"names":["DynamicShortcut","name","keyCombination","description","aliases","select","getShortcutKeyCombination","getShortcutDescription","getShortcutAliases","keyboardShortcutsStore"],"mappings":";;;;;;;;;;;AAGA;;AACA;;AAKA;;AATA;AACA;AACA;;AAIA;AACA;AACA;AAGA,SAASA,eAAT,CAA0B;AAAEC,EAAAA;AAAF,CAA1B,EAAqC;AACpC,QAAM;AAAEC,IAAAA,cAAF;AAAkBC,IAAAA,WAAlB;AAA+BC,IAAAA;AAA/B,MAA2C,qBAC9CC,MAAF,IAAc;AACb,UAAM;AACLC,MAAAA,yBADK;AAELC,MAAAA,sBAFK;AAGLC,MAAAA;AAHK,QAIFH,MAAM,CAAEI,wBAAF,CAJV;AAMA,WAAO;AACNP,MAAAA,cAAc,EAAEI,yBAAyB,CAAEL,IAAF,CADnC;AAENG,MAAAA,OAAO,EAAEI,kBAAkB,CAAEP,IAAF,CAFrB;AAGNE,MAAAA,WAAW,EAAEI,sBAAsB,CAAEN,IAAF;AAH7B,KAAP;AAKA,GAb+C,EAchD,CAAEA,IAAF,CAdgD,CAAjD;;AAiBA,MAAK,CAAEC,cAAP,EAAwB;AACvB,WAAO,IAAP;AACA;;AAED,SACC,4BAAC,iBAAD;AACC,IAAA,cAAc,EAAGA,cADlB;AAEC,IAAA,WAAW,EAAGC,WAFf;AAGC,IAAA,OAAO,EAAGC;AAHX,IADD;AAOA;;eAEcJ,e","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\n\n/**\n * Internal dependencies\n */\nimport Shortcut from './shortcut';\n\nfunction DynamicShortcut( { name } ) {\n\tconst { keyCombination, description, aliases } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetShortcutKeyCombination,\n\t\t\t\tgetShortcutDescription,\n\t\t\t\tgetShortcutAliases,\n\t\t\t} = select( keyboardShortcutsStore );\n\n\t\t\treturn {\n\t\t\t\tkeyCombination: getShortcutKeyCombination( name ),\n\t\t\t\taliases: getShortcutAliases( name ),\n\t\t\t\tdescription: getShortcutDescription( name ),\n\t\t\t};\n\t\t},\n\t\t[ name ]\n\t);\n\n\tif ( ! keyCombination ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Shortcut\n\t\t\tkeyCombination={ keyCombination }\n\t\t\tdescription={ description }\n\t\t\taliases={ aliases }\n\t\t/>\n\t);\n}\n\nexport default DynamicShortcut;\n"]}
@@ -43,52 +43,44 @@ var _store = require("../../store");
43
43
  */
44
44
  const MODAL_NAME = 'edit-post/keyboard-shortcut-help';
45
45
 
46
- const ShortcutList = _ref => {
47
- let {
48
- shortcuts
49
- } = _ref;
50
- return (
51
- /*
52
- * Disable reason: The `list` ARIA role is redundant but
53
- * Safari+VoiceOver won't announce the list otherwise.
54
- */
55
-
56
- /* eslint-disable jsx-a11y/no-redundant-roles */
57
- (0, _element.createElement)("ul", {
58
- className: "edit-post-keyboard-shortcut-help-modal__shortcut-list",
59
- role: "list"
60
- }, shortcuts.map((shortcut, index) => (0, _element.createElement)("li", {
61
- className: "edit-post-keyboard-shortcut-help-modal__shortcut",
62
- key: index
63
- }, typeof shortcut === 'string' ? (0, _element.createElement)(_dynamicShortcut.default, {
64
- name: shortcut
65
- }) : (0, _element.createElement)(_shortcut.default, shortcut))))
66
- /* eslint-enable jsx-a11y/no-redundant-roles */
67
-
68
- );
69
- };
70
-
71
- const ShortcutSection = _ref2 => {
72
- let {
73
- title,
74
- shortcuts,
75
- className
76
- } = _ref2;
77
- return (0, _element.createElement)("section", {
78
- className: (0, _classnames.default)('edit-post-keyboard-shortcut-help-modal__section', className)
79
- }, !!title && (0, _element.createElement)("h2", {
80
- className: "edit-post-keyboard-shortcut-help-modal__section-title"
81
- }, title), (0, _element.createElement)(ShortcutList, {
82
- shortcuts: shortcuts
83
- }));
84
- };
46
+ const ShortcutList = ({
47
+ shortcuts
48
+ }) =>
49
+ /*
50
+ * Disable reason: The `list` ARIA role is redundant but
51
+ * Safari+VoiceOver won't announce the list otherwise.
52
+ */
85
53
 
86
- const ShortcutCategorySection = _ref3 => {
87
- let {
88
- title,
89
- categoryName,
90
- additionalShortcuts = []
91
- } = _ref3;
54
+ /* eslint-disable jsx-a11y/no-redundant-roles */
55
+ (0, _element.createElement)("ul", {
56
+ className: "edit-post-keyboard-shortcut-help-modal__shortcut-list",
57
+ role: "list"
58
+ }, shortcuts.map((shortcut, index) => (0, _element.createElement)("li", {
59
+ className: "edit-post-keyboard-shortcut-help-modal__shortcut",
60
+ key: index
61
+ }, typeof shortcut === 'string' ? (0, _element.createElement)(_dynamicShortcut.default, {
62
+ name: shortcut
63
+ }) : (0, _element.createElement)(_shortcut.default, shortcut))))
64
+ /* eslint-enable jsx-a11y/no-redundant-roles */
65
+ ;
66
+
67
+ const ShortcutSection = ({
68
+ title,
69
+ shortcuts,
70
+ className
71
+ }) => (0, _element.createElement)("section", {
72
+ className: (0, _classnames.default)('edit-post-keyboard-shortcut-help-modal__section', className)
73
+ }, !!title && (0, _element.createElement)("h2", {
74
+ className: "edit-post-keyboard-shortcut-help-modal__section-title"
75
+ }, title), (0, _element.createElement)(ShortcutList, {
76
+ shortcuts: shortcuts
77
+ }));
78
+
79
+ const ShortcutCategorySection = ({
80
+ title,
81
+ categoryName,
82
+ additionalShortcuts = []
83
+ }) => {
92
84
  const categoryShortcuts = (0, _data.useSelect)(select => {
93
85
  return select(_keyboardShortcuts.store).getCategoryShortcuts(categoryName);
94
86
  }, [categoryName]);
@@ -98,11 +90,10 @@ const ShortcutCategorySection = _ref3 => {
98
90
  });
99
91
  };
100
92
 
101
- function KeyboardShortcutHelpModal(_ref4) {
102
- let {
103
- isModalActive,
104
- toggleModal
105
- } = _ref4;
93
+ function KeyboardShortcutHelpModal({
94
+ isModalActive,
95
+ toggleModal
96
+ }) {
106
97
  (0, _keyboardShortcuts.useShortcut)('core/edit-post/keyboard-shortcuts', toggleModal);
107
98
 
108
99
  if (!isModalActive) {
@@ -143,10 +134,9 @@ function KeyboardShortcutHelpModal(_ref4) {
143
134
 
144
135
  var _default = (0, _compose.compose)([(0, _data.withSelect)(select => ({
145
136
  isModalActive: select(_store.store).isModalActive(MODAL_NAME)
146
- })), (0, _data.withDispatch)((dispatch, _ref5) => {
147
- let {
148
- isModalActive
149
- } = _ref5;
137
+ })), (0, _data.withDispatch)((dispatch, {
138
+ isModalActive
139
+ }) => {
150
140
  const {
151
141
  openModal,
152
142
  closeModal