@wordpress/edit-site 5.19.6 → 5.20.1

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 (725) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/components/add-new-page/index.js +9 -8
  3. package/build/components/add-new-page/index.js.map +1 -1
  4. package/build/components/add-new-pattern/index.js +6 -5
  5. package/build/components/add-new-pattern/index.js.map +1 -1
  6. package/build/components/add-new-template/add-custom-generic-template-modal-content.js +8 -7
  7. package/build/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
  8. package/build/components/add-new-template/add-custom-template-modal-content.js +20 -19
  9. package/build/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  10. package/build/components/add-new-template/index.js +2 -2
  11. package/build/components/add-new-template/index.js.map +1 -1
  12. package/build/components/add-new-template/new-template.js +17 -16
  13. package/build/components/add-new-template/new-template.js.map +1 -1
  14. package/build/components/add-new-template/template-actions-loading-screen.js +4 -4
  15. package/build/components/add-new-template/template-actions-loading-screen.js.map +1 -1
  16. package/build/components/app/index.js +2 -2
  17. package/build/components/app/index.js.map +1 -1
  18. package/build/components/block-editor/back-button.js +2 -2
  19. package/build/components/block-editor/back-button.js.map +1 -1
  20. package/build/components/block-editor/block-editor-provider/default-block-editor-provider.js +10 -6
  21. package/build/components/block-editor/block-editor-provider/default-block-editor-provider.js.map +1 -1
  22. package/build/components/block-editor/block-editor-provider/index.js +3 -3
  23. package/build/components/block-editor/block-editor-provider/index.js.map +1 -1
  24. package/build/components/block-editor/block-editor-provider/navigation-block-editor-provider.js +3 -2
  25. package/build/components/block-editor/block-editor-provider/navigation-block-editor-provider.js.map +1 -1
  26. package/build/components/block-editor/block-editor-provider/use-page-content-blocks.js +19 -11
  27. package/build/components/block-editor/block-editor-provider/use-page-content-blocks.js.map +1 -1
  28. package/build/components/block-editor/block-inspector-button.js +2 -2
  29. package/build/components/block-editor/block-inspector-button.js.map +1 -1
  30. package/build/components/block-editor/editor-canvas.js +4 -3
  31. package/build/components/block-editor/editor-canvas.js.map +1 -1
  32. package/build/components/block-editor/index.js +2 -2
  33. package/build/components/block-editor/index.js.map +1 -1
  34. package/build/components/block-editor/resizable-editor.js +4 -3
  35. package/build/components/block-editor/resizable-editor.js.map +1 -1
  36. package/build/components/block-editor/resize-handle.js +3 -3
  37. package/build/components/block-editor/resize-handle.js.map +1 -1
  38. package/build/components/block-editor/site-editor-canvas.js +8 -7
  39. package/build/components/block-editor/site-editor-canvas.js.map +1 -1
  40. package/build/components/canvas-loader/index.js +4 -4
  41. package/build/components/canvas-loader/index.js.map +1 -1
  42. package/build/components/code-editor/index.js +8 -7
  43. package/build/components/code-editor/index.js.map +1 -1
  44. package/build/components/create-template-part-modal/index.js +17 -16
  45. package/build/components/create-template-part-modal/index.js.map +1 -1
  46. package/build/components/dataviews/dataviews.js +61 -0
  47. package/build/components/dataviews/dataviews.js.map +1 -0
  48. package/build/components/dataviews/index.js +21 -0
  49. package/build/components/dataviews/index.js.map +1 -0
  50. package/build/components/dataviews/list-view.js +89 -0
  51. package/build/components/dataviews/list-view.js.map +1 -0
  52. package/build/components/dataviews/pagination.js +89 -0
  53. package/build/components/dataviews/pagination.js.map +1 -0
  54. package/build/components/dataviews/text-filter.js +44 -0
  55. package/build/components/dataviews/text-filter.js.map +1 -0
  56. package/build/components/dataviews/view-actions.js +189 -0
  57. package/build/components/dataviews/view-actions.js.map +1 -0
  58. package/build/components/editor/index.js +15 -14
  59. package/build/components/editor/index.js.map +1 -1
  60. package/build/components/editor-canvas-container/index.js +4 -3
  61. package/build/components/editor-canvas-container/index.js.map +1 -1
  62. package/build/components/error-boundary/index.js +2 -1
  63. package/build/components/error-boundary/index.js.map +1 -1
  64. package/build/components/error-boundary/warning.js +4 -4
  65. package/build/components/error-boundary/warning.js.map +1 -1
  66. package/build/components/global-styles/block-preview-panel.js +5 -4
  67. package/build/components/global-styles/block-preview-panel.js.map +1 -1
  68. package/build/components/global-styles/color-indicator-wrapper.js +2 -2
  69. package/build/components/global-styles/color-indicator-wrapper.js.map +1 -1
  70. package/build/components/global-styles/color-palette-panel.js +5 -5
  71. package/build/components/global-styles/color-palette-panel.js.map +1 -1
  72. package/build/components/global-styles/dimensions-panel.js +3 -2
  73. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  74. package/build/components/global-styles/font-families.js +14 -14
  75. package/build/components/global-styles/font-families.js.map +1 -1
  76. package/build/components/global-styles/font-family-item.js +6 -5
  77. package/build/components/global-styles/font-family-item.js.map +1 -1
  78. package/build/components/global-styles/font-library-modal/collection-font-details.js +6 -6
  79. package/build/components/global-styles/font-library-modal/collection-font-details.js.map +1 -1
  80. package/build/components/global-styles/font-library-modal/collection-font-variant.js +5 -5
  81. package/build/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
  82. package/build/components/global-styles/font-library-modal/confirm-delete-dialog.js +2 -2
  83. package/build/components/global-styles/font-library-modal/confirm-delete-dialog.js.map +1 -1
  84. package/build/components/global-styles/font-library-modal/context.js +2 -1
  85. package/build/components/global-styles/font-library-modal/context.js.map +1 -1
  86. package/build/components/global-styles/font-library-modal/font-card.js +7 -7
  87. package/build/components/global-styles/font-library-modal/font-card.js.map +1 -1
  88. package/build/components/global-styles/font-library-modal/font-collection.js +17 -16
  89. package/build/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  90. package/build/components/global-styles/font-library-modal/font-demo.js +5 -4
  91. package/build/components/global-styles/font-library-modal/font-demo.js.map +1 -1
  92. package/build/components/global-styles/font-library-modal/font-variant.js +7 -7
  93. package/build/components/global-styles/font-library-modal/font-variant.js.map +1 -1
  94. package/build/components/global-styles/font-library-modal/fonts-grid.js +8 -7
  95. package/build/components/global-styles/font-library-modal/fonts-grid.js.map +1 -1
  96. package/build/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js +9 -9
  97. package/build/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +1 -1
  98. package/build/components/global-styles/font-library-modal/index.js +7 -6
  99. package/build/components/global-styles/font-library-modal/index.js.map +1 -1
  100. package/build/components/global-styles/font-library-modal/installed-fonts.js +17 -16
  101. package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  102. package/build/components/global-styles/font-library-modal/library-font-card.js +3 -2
  103. package/build/components/global-styles/font-library-modal/library-font-card.js.map +1 -1
  104. package/build/components/global-styles/font-library-modal/library-font-details.js +6 -6
  105. package/build/components/global-styles/font-library-modal/library-font-details.js.map +1 -1
  106. package/build/components/global-styles/font-library-modal/library-font-variant.js +5 -4
  107. package/build/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
  108. package/build/components/global-styles/font-library-modal/local-fonts.js +12 -11
  109. package/build/components/global-styles/font-library-modal/local-fonts.js.map +1 -1
  110. package/build/components/global-styles/font-library-modal/tab-layout.js +9 -9
  111. package/build/components/global-styles/font-library-modal/tab-layout.js.map +1 -1
  112. package/build/components/global-styles/font-library-modal/upload-fonts.js +3 -3
  113. package/build/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  114. package/build/components/global-styles/global-styles-provider.js +3 -2
  115. package/build/components/global-styles/global-styles-provider.js.map +1 -1
  116. package/build/components/global-styles/gradients-palette-panel.js +8 -8
  117. package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
  118. package/build/components/global-styles/header.js +7 -7
  119. package/build/components/global-styles/header.js.map +1 -1
  120. package/build/components/global-styles/icon-with-current-color.js +2 -2
  121. package/build/components/global-styles/icon-with-current-color.js.map +1 -1
  122. package/build/components/global-styles/navigation-button.js +7 -7
  123. package/build/components/global-styles/navigation-button.js.map +1 -1
  124. package/build/components/global-styles/palette.js +11 -10
  125. package/build/components/global-styles/palette.js.map +1 -1
  126. package/build/components/global-styles/preview.js +17 -16
  127. package/build/components/global-styles/preview.js.map +1 -1
  128. package/build/components/global-styles/root-menu.js +4 -4
  129. package/build/components/global-styles/root-menu.js.map +1 -1
  130. package/build/components/global-styles/screen-block-list.js +10 -9
  131. package/build/components/global-styles/screen-block-list.js.map +1 -1
  132. package/build/components/global-styles/screen-block.js +17 -16
  133. package/build/components/global-styles/screen-block.js.map +1 -1
  134. package/build/components/global-styles/screen-color-palette.js +5 -5
  135. package/build/components/global-styles/screen-color-palette.js.map +1 -1
  136. package/build/components/global-styles/screen-colors.js +5 -5
  137. package/build/components/global-styles/screen-colors.js.map +1 -1
  138. package/build/components/global-styles/screen-css.js +5 -5
  139. package/build/components/global-styles/screen-css.js.map +1 -1
  140. package/build/components/global-styles/screen-layout.js +3 -3
  141. package/build/components/global-styles/screen-layout.js.map +1 -1
  142. package/build/components/global-styles/screen-revisions/index.js +10 -9
  143. package/build/components/global-styles/screen-revisions/index.js.map +1 -1
  144. package/build/components/global-styles/screen-revisions/revisions-buttons.js +10 -10
  145. package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  146. package/build/components/global-styles/screen-root.js +14 -14
  147. package/build/components/global-styles/screen-root.js.map +1 -1
  148. package/build/components/global-styles/screen-style-variations.js +5 -4
  149. package/build/components/global-styles/screen-style-variations.js.map +1 -1
  150. package/build/components/global-styles/screen-typography-element.js +15 -14
  151. package/build/components/global-styles/screen-typography-element.js.map +1 -1
  152. package/build/components/global-styles/screen-typography.js +5 -5
  153. package/build/components/global-styles/screen-typography.js.map +1 -1
  154. package/build/components/global-styles/style-variations-container.js +8 -7
  155. package/build/components/global-styles/style-variations-container.js.map +1 -1
  156. package/build/components/global-styles/subtitle.js +2 -2
  157. package/build/components/global-styles/subtitle.js.map +1 -1
  158. package/build/components/global-styles/typography-panel.js +2 -2
  159. package/build/components/global-styles/typography-panel.js.map +1 -1
  160. package/build/components/global-styles/typography-preview.js +2 -2
  161. package/build/components/global-styles/typography-preview.js.map +1 -1
  162. package/build/components/global-styles/typogrphy-elements.js +13 -13
  163. package/build/components/global-styles/typogrphy-elements.js.map +1 -1
  164. package/build/components/global-styles/ui.js +41 -40
  165. package/build/components/global-styles/ui.js.map +1 -1
  166. package/build/components/global-styles/variations-panel.js +3 -3
  167. package/build/components/global-styles/variations-panel.js.map +1 -1
  168. package/build/components/header-edit-mode/document-actions/index.js +16 -15
  169. package/build/components/header-edit-mode/document-actions/index.js.map +1 -1
  170. package/build/components/header-edit-mode/index.js +20 -19
  171. package/build/components/header-edit-mode/index.js.map +1 -1
  172. package/build/components/header-edit-mode/mode-switcher/index.js +3 -3
  173. package/build/components/header-edit-mode/mode-switcher/index.js.map +1 -1
  174. package/build/components/header-edit-mode/more-menu/copy-content-menu-item.js +2 -2
  175. package/build/components/header-edit-mode/more-menu/copy-content-menu-item.js.map +1 -1
  176. package/build/components/header-edit-mode/more-menu/index.js +14 -14
  177. package/build/components/header-edit-mode/more-menu/index.js.map +1 -1
  178. package/build/components/header-edit-mode/more-menu/site-export.js +2 -2
  179. package/build/components/header-edit-mode/more-menu/site-export.js.map +1 -1
  180. package/build/components/header-edit-mode/more-menu/welcome-guide-menu-item.js +2 -2
  181. package/build/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +1 -1
  182. package/build/components/header-edit-mode/plugin-more-menu-item/index.js +1 -1
  183. package/build/components/header-edit-mode/plugin-more-menu-item/index.js.map +1 -1
  184. package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +3 -3
  185. package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +1 -1
  186. package/build/components/header-edit-mode/tools-more-menu-group/index.js +2 -2
  187. package/build/components/header-edit-mode/tools-more-menu-group/index.js.map +1 -1
  188. package/build/components/header-edit-mode/undo-redo/redo.js +3 -2
  189. package/build/components/header-edit-mode/undo-redo/redo.js.map +1 -1
  190. package/build/components/header-edit-mode/undo-redo/undo.js +3 -2
  191. package/build/components/header-edit-mode/undo-redo/undo.js.map +1 -1
  192. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +2 -2
  193. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  194. package/build/components/keyboard-shortcut-help-modal/index.js +15 -15
  195. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  196. package/build/components/keyboard-shortcut-help-modal/shortcut.js +8 -7
  197. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  198. package/build/components/layout/index.js +15 -14
  199. package/build/components/layout/index.js.map +1 -1
  200. package/build/components/list/added-by.js +9 -8
  201. package/build/components/list/added-by.js.map +1 -1
  202. package/build/components/list/header.js +5 -5
  203. package/build/components/list/header.js.map +1 -1
  204. package/build/components/list/index.js +5 -5
  205. package/build/components/list/index.js.map +1 -1
  206. package/build/components/list/table.js +15 -15
  207. package/build/components/list/table.js.map +1 -1
  208. package/build/components/page/header.js +6 -6
  209. package/build/components/page/header.js.map +1 -1
  210. package/build/components/page/index.js +5 -5
  211. package/build/components/page/index.js.map +1 -1
  212. package/build/components/page-actions/index.js +3 -3
  213. package/build/components/page-actions/index.js.map +1 -1
  214. package/build/components/page-actions/trash-page-menu-item.js +2 -2
  215. package/build/components/page-actions/trash-page-menu-item.js.map +1 -1
  216. package/build/components/page-content-focus-manager/disable-non-page-content-blocks.js +3 -2
  217. package/build/components/page-content-focus-manager/disable-non-page-content-blocks.js.map +1 -1
  218. package/build/components/page-content-focus-manager/edit-template-notification.js +3 -2
  219. package/build/components/page-content-focus-manager/edit-template-notification.js.map +1 -1
  220. package/build/components/page-content-focus-manager/index.js +35 -4
  221. package/build/components/page-content-focus-manager/index.js.map +1 -1
  222. package/build/components/page-main/index.js +7 -4
  223. package/build/components/page-main/index.js.map +1 -1
  224. package/build/components/page-pages/index.js +174 -0
  225. package/build/components/page-pages/index.js.map +1 -0
  226. package/build/components/page-patterns/duplicate-menu-item.js +2 -2
  227. package/build/components/page-patterns/duplicate-menu-item.js.map +1 -1
  228. package/build/components/page-patterns/grid-item.js +21 -20
  229. package/build/components/page-patterns/grid-item.js.map +1 -1
  230. package/build/components/page-patterns/grid.js +3 -3
  231. package/build/components/page-patterns/grid.js.map +1 -1
  232. package/build/components/page-patterns/header.js +4 -4
  233. package/build/components/page-patterns/header.js.map +1 -1
  234. package/build/components/page-patterns/index.js +4 -4
  235. package/build/components/page-patterns/index.js.map +1 -1
  236. package/build/components/page-patterns/no-patterns.js +2 -2
  237. package/build/components/page-patterns/no-patterns.js.map +1 -1
  238. package/build/components/page-patterns/pagination.js +10 -10
  239. package/build/components/page-patterns/pagination.js.map +1 -1
  240. package/build/components/page-patterns/patterns-list.js +15 -14
  241. package/build/components/page-patterns/patterns-list.js.map +1 -1
  242. package/build/components/page-patterns/rename-menu-item.js +10 -9
  243. package/build/components/page-patterns/rename-menu-item.js.map +1 -1
  244. package/build/components/page-template-parts/add-new-template-part.js +4 -3
  245. package/build/components/page-template-parts/add-new-template-part.js.map +1 -1
  246. package/build/components/page-template-parts/index.js +9 -9
  247. package/build/components/page-template-parts/index.js.map +1 -1
  248. package/build/components/page-templates/index.js +10 -10
  249. package/build/components/page-templates/index.js.map +1 -1
  250. package/build/components/plugin-template-setting-panel/index.js +1 -1
  251. package/build/components/plugin-template-setting-panel/index.js.map +1 -1
  252. package/build/components/preferences-modal/enable-feature.js +2 -2
  253. package/build/components/preferences-modal/enable-feature.js.map +1 -1
  254. package/build/components/preferences-modal/index.js +12 -11
  255. package/build/components/preferences-modal/index.js.map +1 -1
  256. package/build/components/resizable-frame/index.js +7 -6
  257. package/build/components/resizable-frame/index.js.map +1 -1
  258. package/build/components/revisions/index.js +9 -8
  259. package/build/components/revisions/index.js.map +1 -1
  260. package/build/components/routes/link.js +2 -2
  261. package/build/components/routes/link.js.map +1 -1
  262. package/build/components/save-button/index.js +2 -2
  263. package/build/components/save-button/index.js.map +1 -1
  264. package/build/components/save-hub/index.js +4 -4
  265. package/build/components/save-hub/index.js.map +1 -1
  266. package/build/components/save-panel/index.js +11 -11
  267. package/build/components/save-panel/index.js.map +1 -1
  268. package/build/components/secondary-sidebar/inserter-sidebar.js +7 -6
  269. package/build/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
  270. package/build/components/secondary-sidebar/list-view-sidebar.js +7 -6
  271. package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  272. package/build/components/sidebar/index.js +23 -14
  273. package/build/components/sidebar/index.js.map +1 -1
  274. package/build/components/sidebar-button/index.js +2 -2
  275. package/build/components/sidebar-button/index.js.map +1 -1
  276. package/build/components/sidebar-edit-mode/default-sidebar.js +3 -3
  277. package/build/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
  278. package/build/components/sidebar-edit-mode/global-styles-sidebar.js +8 -7
  279. package/build/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
  280. package/build/components/sidebar-edit-mode/index.js +6 -5
  281. package/build/components/sidebar-edit-mode/index.js.map +1 -1
  282. package/build/components/sidebar-edit-mode/page-panels/edit-template.js +20 -10
  283. package/build/components/sidebar-edit-mode/page-panels/edit-template.js.map +1 -1
  284. package/build/components/sidebar-edit-mode/page-panels/index.js +7 -7
  285. package/build/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
  286. package/build/components/sidebar-edit-mode/page-panels/page-content.js +3 -2
  287. package/build/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -1
  288. package/build/components/sidebar-edit-mode/page-panels/page-status.js +21 -20
  289. package/build/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -1
  290. package/build/components/sidebar-edit-mode/page-panels/page-summary.js +4 -4
  291. package/build/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
  292. package/build/components/sidebar-edit-mode/page-panels/publish-date.js +7 -6
  293. package/build/components/sidebar-edit-mode/page-panels/publish-date.js.map +1 -1
  294. package/build/components/sidebar-edit-mode/page-panels/reset-default-template.js +2 -2
  295. package/build/components/sidebar-edit-mode/page-panels/reset-default-template.js.map +1 -1
  296. package/build/components/sidebar-edit-mode/page-panels/swap-template-button.js +7 -6
  297. package/build/components/sidebar-edit-mode/page-panels/swap-template-button.js.map +1 -1
  298. package/build/components/sidebar-edit-mode/plugin-sidebar/index.js +2 -2
  299. package/build/components/sidebar-edit-mode/plugin-sidebar/index.js.map +1 -1
  300. package/build/components/sidebar-edit-mode/settings-header/index.js +3 -3
  301. package/build/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
  302. package/build/components/sidebar-edit-mode/sidebar-card/index.js +7 -7
  303. package/build/components/sidebar-edit-mode/sidebar-card/index.js.map +1 -1
  304. package/build/components/sidebar-edit-mode/sidebar-fixed-bottom.js +2 -2
  305. package/build/components/sidebar-edit-mode/sidebar-fixed-bottom.js.map +1 -1
  306. package/build/components/sidebar-edit-mode/template-panel/index.js +5 -5
  307. package/build/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
  308. package/build/components/sidebar-edit-mode/template-panel/last-revision.js +5 -5
  309. package/build/components/sidebar-edit-mode/template-panel/last-revision.js.map +1 -1
  310. package/build/components/sidebar-edit-mode/template-panel/pattern-categories.js +4 -3
  311. package/build/components/sidebar-edit-mode/template-panel/pattern-categories.js.map +1 -1
  312. package/build/components/sidebar-edit-mode/template-panel/replace-template-button.js +7 -6
  313. package/build/components/sidebar-edit-mode/template-panel/replace-template-button.js.map +1 -1
  314. package/build/components/sidebar-edit-mode/template-panel/template-actions.js +4 -4
  315. package/build/components/sidebar-edit-mode/template-panel/template-actions.js.map +1 -1
  316. package/build/components/sidebar-edit-mode/template-panel/template-areas.js +7 -7
  317. package/build/components/sidebar-edit-mode/template-panel/template-areas.js.map +1 -1
  318. package/build/components/sidebar-navigation-item/index.js +5 -5
  319. package/build/components/sidebar-navigation-item/index.js.map +1 -1
  320. package/build/components/sidebar-navigation-screen/index.js +11 -11
  321. package/build/components/sidebar-navigation-screen/index.js.map +1 -1
  322. package/build/components/sidebar-navigation-screen-details-footer/index.js +8 -7
  323. package/build/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  324. package/build/components/sidebar-navigation-screen-details-panel/index.js +3 -3
  325. package/build/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
  326. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +2 -2
  327. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
  328. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +2 -2
  329. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
  330. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +2 -2
  331. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
  332. package/build/components/sidebar-navigation-screen-global-styles/index.js +12 -11
  333. package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  334. package/build/components/sidebar-navigation-screen-main/index.js +9 -8
  335. package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
  336. package/build/components/sidebar-navigation-screen-main/template-part-hint.js +2 -2
  337. package/build/components/sidebar-navigation-screen-main/template-part-hint.js.map +1 -1
  338. package/build/components/sidebar-navigation-screen-navigation-item/index.js +4 -4
  339. package/build/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -1
  340. package/build/components/sidebar-navigation-screen-navigation-menu/delete-modal.js +2 -2
  341. package/build/components/sidebar-navigation-screen-navigation-menu/delete-modal.js.map +1 -1
  342. package/build/components/sidebar-navigation-screen-navigation-menu/edit-button.js +2 -2
  343. package/build/components/sidebar-navigation-screen-navigation-menu/edit-button.js.map +1 -1
  344. package/build/components/sidebar-navigation-screen-navigation-menu/index.js +7 -7
  345. package/build/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  346. package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js +8 -7
  347. package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
  348. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +4 -3
  349. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
  350. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +9 -8
  351. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  352. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +5 -5
  353. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  354. package/build/components/sidebar-navigation-screen-navigation-menus/index.js +8 -8
  355. package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  356. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +7 -6
  357. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  358. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +5 -4
  359. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  360. package/build/components/sidebar-navigation-screen-page/index.js +11 -11
  361. package/build/components/sidebar-navigation-screen-page/index.js.map +1 -1
  362. package/build/components/sidebar-navigation-screen-page/page-details.js +6 -6
  363. package/build/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
  364. package/build/components/sidebar-navigation-screen-page/status-label.js +5 -4
  365. package/build/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
  366. package/build/components/sidebar-navigation-screen-pages/index.js +26 -17
  367. package/build/components/sidebar-navigation-screen-pages/index.js.map +1 -1
  368. package/build/components/sidebar-navigation-screen-pattern/index.js +4 -4
  369. package/build/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
  370. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +4 -4
  371. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -1
  372. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +3 -3
  373. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -1
  374. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +6 -5
  375. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
  376. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +4 -4
  377. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
  378. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +2 -2
  379. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -1
  380. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js +7 -7
  381. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
  382. package/build/components/sidebar-navigation-screen-patterns/category-item.js +3 -3
  383. package/build/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
  384. package/build/components/sidebar-navigation-screen-patterns/index.js +14 -14
  385. package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  386. package/build/components/sidebar-navigation-screen-template/home-template-details.js +13 -12
  387. package/build/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -1
  388. package/build/components/sidebar-navigation-screen-template/index.js +12 -12
  389. package/build/components/sidebar-navigation-screen-template/index.js.map +1 -1
  390. package/build/components/sidebar-navigation-screen-templates/index.js +6 -6
  391. package/build/components/sidebar-navigation-screen-templates/index.js.map +1 -1
  392. package/build/components/sidebar-navigation-screen-templates-browse/index.js +2 -2
  393. package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  394. package/build/components/site-hub/index.js +12 -11
  395. package/build/components/site-hub/index.js.map +1 -1
  396. package/build/components/site-icon/index.js +5 -5
  397. package/build/components/site-icon/index.js.map +1 -1
  398. package/build/components/start-template-options/index.js +10 -9
  399. package/build/components/start-template-options/index.js.map +1 -1
  400. package/build/components/style-book/index.js +19 -18
  401. package/build/components/style-book/index.js.map +1 -1
  402. package/build/components/table/index.js +6 -6
  403. package/build/components/table/index.js.map +1 -1
  404. package/build/components/template-actions/index.js +8 -7
  405. package/build/components/template-actions/index.js.map +1 -1
  406. package/build/components/template-actions/rename-menu-item.js +10 -9
  407. package/build/components/template-actions/rename-menu-item.js.map +1 -1
  408. package/build/components/template-part-converter/convert-to-regular.js +2 -2
  409. package/build/components/template-part-converter/convert-to-regular.js.map +1 -1
  410. package/build/components/template-part-converter/convert-to-template-part.js +4 -3
  411. package/build/components/template-part-converter/convert-to-template-part.js.map +1 -1
  412. package/build/components/template-part-converter/index.js +5 -5
  413. package/build/components/template-part-converter/index.js.map +1 -1
  414. package/build/components/welcome-guide/editor.js +8 -7
  415. package/build/components/welcome-guide/editor.js.map +1 -1
  416. package/build/components/welcome-guide/image.js +4 -4
  417. package/build/components/welcome-guide/image.js.map +1 -1
  418. package/build/components/welcome-guide/index.js +2 -2
  419. package/build/components/welcome-guide/index.js.map +1 -1
  420. package/build/components/welcome-guide/page.js +6 -6
  421. package/build/components/welcome-guide/page.js.map +1 -1
  422. package/build/components/welcome-guide/styles.js +15 -15
  423. package/build/components/welcome-guide/styles.js.map +1 -1
  424. package/build/components/welcome-guide/template.js +6 -6
  425. package/build/components/welcome-guide/template.js.map +1 -1
  426. package/build/hooks/commands/use-common-commands.js +2 -2
  427. package/build/hooks/commands/use-common-commands.js.map +1 -1
  428. package/build/hooks/navigation-menu-edit.js +5 -5
  429. package/build/hooks/navigation-menu-edit.js.map +1 -1
  430. package/build/hooks/push-changes-to-global-styles/index.js +6 -5
  431. package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
  432. package/build/hooks/template-part-edit.js +5 -5
  433. package/build/hooks/template-part-edit.js.map +1 -1
  434. package/build/index.js +3 -2
  435. package/build/index.js.map +1 -1
  436. package/build/lock-unlock.js +1 -1
  437. package/build/lock-unlock.js.map +1 -1
  438. package/build/store/selectors.js +5 -4
  439. package/build/store/selectors.js.map +1 -1
  440. package/build/utils/get-is-list-page.js +1 -1
  441. package/build/utils/get-is-list-page.js.map +1 -1
  442. package/build-module/components/add-new-page/index.js +1 -1
  443. package/build-module/components/add-new-pattern/index.js +1 -1
  444. package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js +1 -1
  445. package/build-module/components/add-new-template/add-custom-template-modal-content.js +1 -1
  446. package/build-module/components/add-new-template/index.js +1 -1
  447. package/build-module/components/add-new-template/new-template.js +1 -1
  448. package/build-module/components/add-new-template/template-actions-loading-screen.js +1 -1
  449. package/build-module/components/app/index.js +1 -1
  450. package/build-module/components/block-editor/back-button.js +1 -1
  451. package/build-module/components/block-editor/block-editor-provider/default-block-editor-provider.js +9 -5
  452. package/build-module/components/block-editor/block-editor-provider/default-block-editor-provider.js.map +1 -1
  453. package/build-module/components/block-editor/block-editor-provider/index.js +1 -1
  454. package/build-module/components/block-editor/block-editor-provider/navigation-block-editor-provider.js +1 -1
  455. package/build-module/components/block-editor/block-editor-provider/use-page-content-blocks.js +19 -11
  456. package/build-module/components/block-editor/block-editor-provider/use-page-content-blocks.js.map +1 -1
  457. package/build-module/components/block-editor/block-inspector-button.js +1 -1
  458. package/build-module/components/block-editor/editor-canvas.js +1 -1
  459. package/build-module/components/block-editor/index.js +1 -1
  460. package/build-module/components/block-editor/resizable-editor.js +1 -1
  461. package/build-module/components/block-editor/resize-handle.js +1 -1
  462. package/build-module/components/block-editor/site-editor-canvas.js +1 -1
  463. package/build-module/components/canvas-loader/index.js +1 -1
  464. package/build-module/components/code-editor/index.js +1 -1
  465. package/build-module/components/create-template-part-modal/index.js +1 -1
  466. package/build-module/components/dataviews/dataviews.js +53 -0
  467. package/build-module/components/dataviews/dataviews.js.map +1 -0
  468. package/build-module/components/dataviews/index.js +3 -0
  469. package/build-module/components/dataviews/index.js.map +1 -0
  470. package/build-module/components/dataviews/list-view.js +80 -0
  471. package/build-module/components/dataviews/list-view.js.map +1 -0
  472. package/build-module/components/dataviews/pagination.js +83 -0
  473. package/build-module/components/dataviews/pagination.js.map +1 -0
  474. package/build-module/components/dataviews/text-filter.js +36 -0
  475. package/build-module/components/dataviews/text-filter.js.map +1 -0
  476. package/build-module/components/dataviews/view-actions.js +179 -0
  477. package/build-module/components/dataviews/view-actions.js.map +1 -0
  478. package/build-module/components/editor/index.js +1 -1
  479. package/build-module/components/editor-canvas-container/index.js +1 -1
  480. package/build-module/components/error-boundary/index.js +1 -1
  481. package/build-module/components/error-boundary/warning.js +1 -1
  482. package/build-module/components/global-styles/block-preview-panel.js +1 -1
  483. package/build-module/components/global-styles/color-indicator-wrapper.js +1 -1
  484. package/build-module/components/global-styles/color-palette-panel.js +1 -1
  485. package/build-module/components/global-styles/dimensions-panel.js +1 -1
  486. package/build-module/components/global-styles/font-families.js +3 -4
  487. package/build-module/components/global-styles/font-families.js.map +1 -1
  488. package/build-module/components/global-styles/font-family-item.js +1 -1
  489. package/build-module/components/global-styles/font-library-modal/collection-font-details.js +1 -1
  490. package/build-module/components/global-styles/font-library-modal/collection-font-variant.js +1 -1
  491. package/build-module/components/global-styles/font-library-modal/confirm-delete-dialog.js +1 -1
  492. package/build-module/components/global-styles/font-library-modal/context.js +1 -1
  493. package/build-module/components/global-styles/font-library-modal/font-card.js +1 -1
  494. package/build-module/components/global-styles/font-library-modal/font-collection.js +1 -1
  495. package/build-module/components/global-styles/font-library-modal/font-demo.js +1 -1
  496. package/build-module/components/global-styles/font-library-modal/font-variant.js +1 -1
  497. package/build-module/components/global-styles/font-library-modal/fonts-grid.js +1 -1
  498. package/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js +1 -1
  499. package/build-module/components/global-styles/font-library-modal/index.js +1 -1
  500. package/build-module/components/global-styles/font-library-modal/installed-fonts.js +1 -1
  501. package/build-module/components/global-styles/font-library-modal/library-font-card.js +1 -1
  502. package/build-module/components/global-styles/font-library-modal/library-font-details.js +1 -1
  503. package/build-module/components/global-styles/font-library-modal/library-font-variant.js +1 -1
  504. package/build-module/components/global-styles/font-library-modal/local-fonts.js +1 -1
  505. package/build-module/components/global-styles/font-library-modal/tab-layout.js +1 -1
  506. package/build-module/components/global-styles/font-library-modal/upload-fonts.js +1 -1
  507. package/build-module/components/global-styles/global-styles-provider.js +1 -1
  508. package/build-module/components/global-styles/gradients-palette-panel.js +1 -1
  509. package/build-module/components/global-styles/header.js +1 -1
  510. package/build-module/components/global-styles/icon-with-current-color.js +1 -1
  511. package/build-module/components/global-styles/navigation-button.js +1 -1
  512. package/build-module/components/global-styles/palette.js +1 -1
  513. package/build-module/components/global-styles/preview.js +1 -1
  514. package/build-module/components/global-styles/root-menu.js +1 -1
  515. package/build-module/components/global-styles/screen-block-list.js +1 -1
  516. package/build-module/components/global-styles/screen-block.js +1 -1
  517. package/build-module/components/global-styles/screen-color-palette.js +1 -1
  518. package/build-module/components/global-styles/screen-colors.js +1 -1
  519. package/build-module/components/global-styles/screen-css.js +1 -1
  520. package/build-module/components/global-styles/screen-layout.js +1 -1
  521. package/build-module/components/global-styles/screen-revisions/index.js +1 -1
  522. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +1 -1
  523. package/build-module/components/global-styles/screen-root.js +1 -1
  524. package/build-module/components/global-styles/screen-style-variations.js +1 -1
  525. package/build-module/components/global-styles/screen-typography-element.js +1 -1
  526. package/build-module/components/global-styles/screen-typography.js +2 -2
  527. package/build-module/components/global-styles/screen-typography.js.map +1 -1
  528. package/build-module/components/global-styles/style-variations-container.js +1 -1
  529. package/build-module/components/global-styles/subtitle.js +1 -1
  530. package/build-module/components/global-styles/typography-panel.js +1 -1
  531. package/build-module/components/global-styles/typography-preview.js +1 -1
  532. package/build-module/components/global-styles/typogrphy-elements.js +1 -1
  533. package/build-module/components/global-styles/ui.js +1 -1
  534. package/build-module/components/global-styles/variations-panel.js +1 -1
  535. package/build-module/components/header-edit-mode/document-actions/index.js +1 -1
  536. package/build-module/components/header-edit-mode/index.js +1 -1
  537. package/build-module/components/header-edit-mode/mode-switcher/index.js +1 -1
  538. package/build-module/components/header-edit-mode/more-menu/copy-content-menu-item.js +1 -1
  539. package/build-module/components/header-edit-mode/more-menu/index.js +1 -1
  540. package/build-module/components/header-edit-mode/more-menu/site-export.js +1 -1
  541. package/build-module/components/header-edit-mode/more-menu/welcome-guide-menu-item.js +1 -1
  542. package/build-module/components/header-edit-mode/plugin-more-menu-item/index.js +1 -1
  543. package/build-module/components/header-edit-mode/plugin-more-menu-item/index.js.map +1 -1
  544. package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +2 -2
  545. package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +1 -1
  546. package/build-module/components/header-edit-mode/tools-more-menu-group/index.js +1 -1
  547. package/build-module/components/header-edit-mode/undo-redo/redo.js +1 -1
  548. package/build-module/components/header-edit-mode/undo-redo/undo.js +1 -1
  549. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +1 -1
  550. package/build-module/components/keyboard-shortcut-help-modal/index.js +1 -1
  551. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +1 -1
  552. package/build-module/components/layout/index.js +1 -1
  553. package/build-module/components/list/added-by.js +1 -1
  554. package/build-module/components/list/header.js +1 -1
  555. package/build-module/components/list/index.js +1 -1
  556. package/build-module/components/list/table.js +1 -1
  557. package/build-module/components/page/header.js +1 -1
  558. package/build-module/components/page/index.js +1 -1
  559. package/build-module/components/page-actions/index.js +1 -1
  560. package/build-module/components/page-actions/trash-page-menu-item.js +1 -1
  561. package/build-module/components/page-content-focus-manager/disable-non-page-content-blocks.js +1 -1
  562. package/build-module/components/page-content-focus-manager/edit-template-notification.js +1 -1
  563. package/build-module/components/page-content-focus-manager/index.js +34 -4
  564. package/build-module/components/page-content-focus-manager/index.js.map +1 -1
  565. package/build-module/components/page-main/index.js +4 -1
  566. package/build-module/components/page-main/index.js.map +1 -1
  567. package/build-module/components/page-pages/index.js +166 -0
  568. package/build-module/components/page-pages/index.js.map +1 -0
  569. package/build-module/components/page-patterns/duplicate-menu-item.js +1 -1
  570. package/build-module/components/page-patterns/grid-item.js +1 -1
  571. package/build-module/components/page-patterns/grid.js +1 -1
  572. package/build-module/components/page-patterns/header.js +1 -1
  573. package/build-module/components/page-patterns/index.js +1 -1
  574. package/build-module/components/page-patterns/no-patterns.js +1 -1
  575. package/build-module/components/page-patterns/pagination.js +1 -1
  576. package/build-module/components/page-patterns/patterns-list.js +1 -1
  577. package/build-module/components/page-patterns/rename-menu-item.js +1 -1
  578. package/build-module/components/page-template-parts/add-new-template-part.js +1 -1
  579. package/build-module/components/page-template-parts/index.js +1 -1
  580. package/build-module/components/page-templates/index.js +1 -1
  581. package/build-module/components/plugin-template-setting-panel/index.js +1 -1
  582. package/build-module/components/plugin-template-setting-panel/index.js.map +1 -1
  583. package/build-module/components/preferences-modal/enable-feature.js +1 -1
  584. package/build-module/components/preferences-modal/index.js +1 -1
  585. package/build-module/components/resizable-frame/index.js +1 -1
  586. package/build-module/components/revisions/index.js +1 -1
  587. package/build-module/components/routes/link.js +1 -1
  588. package/build-module/components/save-button/index.js +1 -1
  589. package/build-module/components/save-hub/index.js +1 -1
  590. package/build-module/components/save-panel/index.js +1 -1
  591. package/build-module/components/secondary-sidebar/inserter-sidebar.js +1 -1
  592. package/build-module/components/secondary-sidebar/list-view-sidebar.js +1 -1
  593. package/build-module/components/sidebar/index.js +10 -2
  594. package/build-module/components/sidebar/index.js.map +1 -1
  595. package/build-module/components/sidebar-button/index.js +1 -1
  596. package/build-module/components/sidebar-edit-mode/default-sidebar.js +1 -1
  597. package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js +1 -1
  598. package/build-module/components/sidebar-edit-mode/index.js +1 -1
  599. package/build-module/components/sidebar-edit-mode/page-panels/edit-template.js +15 -5
  600. package/build-module/components/sidebar-edit-mode/page-panels/edit-template.js.map +1 -1
  601. package/build-module/components/sidebar-edit-mode/page-panels/index.js +1 -1
  602. package/build-module/components/sidebar-edit-mode/page-panels/page-content.js +1 -1
  603. package/build-module/components/sidebar-edit-mode/page-panels/page-status.js +1 -1
  604. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js +1 -1
  605. package/build-module/components/sidebar-edit-mode/page-panels/publish-date.js +1 -1
  606. package/build-module/components/sidebar-edit-mode/page-panels/reset-default-template.js +1 -1
  607. package/build-module/components/sidebar-edit-mode/page-panels/swap-template-button.js +1 -1
  608. package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js +1 -1
  609. package/build-module/components/sidebar-edit-mode/settings-header/index.js +1 -1
  610. package/build-module/components/sidebar-edit-mode/sidebar-card/index.js +1 -1
  611. package/build-module/components/sidebar-edit-mode/sidebar-fixed-bottom.js +1 -1
  612. package/build-module/components/sidebar-edit-mode/template-panel/index.js +1 -1
  613. package/build-module/components/sidebar-edit-mode/template-panel/last-revision.js +1 -1
  614. package/build-module/components/sidebar-edit-mode/template-panel/pattern-categories.js +1 -1
  615. package/build-module/components/sidebar-edit-mode/template-panel/replace-template-button.js +1 -1
  616. package/build-module/components/sidebar-edit-mode/template-panel/template-actions.js +1 -1
  617. package/build-module/components/sidebar-edit-mode/template-panel/template-areas.js +1 -1
  618. package/build-module/components/sidebar-navigation-item/index.js +1 -1
  619. package/build-module/components/sidebar-navigation-screen/index.js +1 -1
  620. package/build-module/components/sidebar-navigation-screen-details-footer/index.js +1 -1
  621. package/build-module/components/sidebar-navigation-screen-details-panel/index.js +1 -1
  622. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +1 -1
  623. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +1 -1
  624. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +1 -1
  625. package/build-module/components/sidebar-navigation-screen-global-styles/index.js +1 -1
  626. package/build-module/components/sidebar-navigation-screen-main/index.js +1 -1
  627. package/build-module/components/sidebar-navigation-screen-main/template-part-hint.js +1 -1
  628. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js +1 -1
  629. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-modal.js +1 -1
  630. package/build-module/components/sidebar-navigation-screen-navigation-menu/edit-button.js +1 -1
  631. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js +1 -1
  632. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js +1 -1
  633. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +1 -1
  634. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +1 -1
  635. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +1 -1
  636. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
  637. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +1 -1
  638. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +1 -1
  639. package/build-module/components/sidebar-navigation-screen-page/index.js +1 -1
  640. package/build-module/components/sidebar-navigation-screen-page/page-details.js +1 -1
  641. package/build-module/components/sidebar-navigation-screen-page/status-label.js +1 -1
  642. package/build-module/components/sidebar-navigation-screen-pages/index.js +13 -5
  643. package/build-module/components/sidebar-navigation-screen-pages/index.js.map +1 -1
  644. package/build-module/components/sidebar-navigation-screen-pattern/index.js +1 -1
  645. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +3 -3
  646. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -1
  647. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +1 -1
  648. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +4 -3
  649. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
  650. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +1 -1
  651. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +1 -1
  652. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js +1 -1
  653. package/build-module/components/sidebar-navigation-screen-patterns/category-item.js +1 -1
  654. package/build-module/components/sidebar-navigation-screen-patterns/index.js +1 -1
  655. package/build-module/components/sidebar-navigation-screen-template/home-template-details.js +1 -1
  656. package/build-module/components/sidebar-navigation-screen-template/index.js +1 -1
  657. package/build-module/components/sidebar-navigation-screen-templates/index.js +1 -1
  658. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +1 -1
  659. package/build-module/components/site-hub/index.js +1 -1
  660. package/build-module/components/site-icon/index.js +1 -1
  661. package/build-module/components/start-template-options/index.js +4 -4
  662. package/build-module/components/start-template-options/index.js.map +1 -1
  663. package/build-module/components/style-book/index.js +1 -1
  664. package/build-module/components/table/index.js +1 -1
  665. package/build-module/components/template-actions/index.js +1 -1
  666. package/build-module/components/template-actions/rename-menu-item.js +1 -1
  667. package/build-module/components/template-part-converter/convert-to-regular.js +1 -1
  668. package/build-module/components/template-part-converter/convert-to-template-part.js +1 -1
  669. package/build-module/components/template-part-converter/index.js +1 -1
  670. package/build-module/components/welcome-guide/editor.js +1 -1
  671. package/build-module/components/welcome-guide/image.js +1 -1
  672. package/build-module/components/welcome-guide/index.js +1 -1
  673. package/build-module/components/welcome-guide/page.js +1 -1
  674. package/build-module/components/welcome-guide/styles.js +1 -1
  675. package/build-module/components/welcome-guide/template.js +1 -1
  676. package/build-module/hooks/commands/use-common-commands.js +4 -4
  677. package/build-module/hooks/commands/use-common-commands.js.map +1 -1
  678. package/build-module/hooks/navigation-menu-edit.js +1 -1
  679. package/build-module/hooks/push-changes-to-global-styles/index.js +1 -1
  680. package/build-module/hooks/template-part-edit.js +1 -1
  681. package/build-module/index.js +1 -1
  682. package/build-module/lock-unlock.js +1 -1
  683. package/build-module/lock-unlock.js.map +1 -1
  684. package/build-module/store/selectors.js +5 -4
  685. package/build-module/store/selectors.js.map +1 -1
  686. package/build-module/utils/get-is-list-page.js +1 -1
  687. package/build-module/utils/get-is-list-page.js.map +1 -1
  688. package/build-style/style-rtl.css +58 -21
  689. package/build-style/style.css +58 -21
  690. package/package.json +41 -40
  691. package/src/components/block-editor/block-editor-provider/default-block-editor-provider.js +10 -5
  692. package/src/components/block-editor/block-editor-provider/test/use-page-content-blocks.js +33 -4
  693. package/src/components/block-editor/block-editor-provider/use-page-content-blocks.js +27 -14
  694. package/src/components/dataviews/dataviews.js +60 -0
  695. package/src/components/dataviews/index.js +2 -0
  696. package/src/components/dataviews/list-view.js +106 -0
  697. package/src/components/dataviews/pagination.js +118 -0
  698. package/src/components/dataviews/style.scss +36 -0
  699. package/src/components/dataviews/text-filter.js +37 -0
  700. package/src/components/dataviews/view-actions.js +246 -0
  701. package/src/components/global-styles/font-families.js +1 -5
  702. package/src/components/global-styles/screen-typography.js +3 -4
  703. package/src/components/header-edit-mode/plugin-more-menu-item/index.js +1 -1
  704. package/src/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +1 -1
  705. package/src/components/page-content-focus-manager/index.js +29 -4
  706. package/src/components/page-main/index.js +3 -0
  707. package/src/components/page-pages/index.js +190 -0
  708. package/src/components/plugin-template-setting-panel/index.js +1 -1
  709. package/src/components/sidebar/index.js +11 -0
  710. package/src/components/sidebar-edit-mode/page-panels/edit-template.js +31 -16
  711. package/src/components/sidebar-navigation-screen/style.scss +0 -13
  712. package/src/components/sidebar-navigation-screen-pages/index.js +11 -4
  713. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +7 -2
  714. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +8 -2
  715. package/src/components/start-template-options/index.js +3 -3
  716. package/src/hooks/commands/use-common-commands.js +12 -4
  717. package/src/lock-unlock.js +1 -1
  718. package/src/store/selectors.js +10 -9
  719. package/src/style.scss +1 -0
  720. package/src/utils/get-is-list-page.js +3 -2
  721. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js +0 -29
  722. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js.map +0 -1
  723. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js +0 -22
  724. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js.map +0 -1
  725. package/src/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js +0 -32
@@ -4,10 +4,11 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = LeafMoreMenu;
7
- var _element = require("@wordpress/element");
7
+ var _react = require("react");
8
8
  var _icons = require("@wordpress/icons");
9
9
  var _components = require("@wordpress/components");
10
10
  var _data = require("@wordpress/data");
11
+ var _element = require("@wordpress/element");
11
12
  var _i18n = require("@wordpress/i18n");
12
13
  var _blockEditor = require("@wordpress/block-editor");
13
14
  var _router = require("@wordpress/router");
@@ -89,7 +90,7 @@ function LeafMoreMenu(props) {
89
90
  });
90
91
  }
91
92
  }, [history]);
92
- return (0, _element.createElement)(_components.DropdownMenu, {
93
+ return (0, _react.createElement)(_components.DropdownMenu, {
93
94
  icon: _icons.moreVertical,
94
95
  label: (0, _i18n.__)('Options'),
95
96
  className: "block-editor-block-settings-menu",
@@ -98,24 +99,24 @@ function LeafMoreMenu(props) {
98
99
  ...props
99
100
  }, ({
100
101
  onClose
101
- }) => (0, _element.createElement)(_element.Fragment, null, (0, _element.createElement)(_components.MenuGroup, null, (0, _element.createElement)(_components.MenuItem, {
102
+ }) => (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_components.MenuGroup, null, (0, _react.createElement)(_components.MenuItem, {
102
103
  icon: _icons.chevronUp,
103
104
  onClick: () => {
104
105
  moveBlocksUp([clientId], rootClientId);
105
106
  onClose();
106
107
  }
107
- }, (0, _i18n.__)('Move up')), (0, _element.createElement)(_components.MenuItem, {
108
+ }, (0, _i18n.__)('Move up')), (0, _react.createElement)(_components.MenuItem, {
108
109
  icon: _icons.chevronDown,
109
110
  onClick: () => {
110
111
  moveBlocksDown([clientId], rootClientId);
111
112
  onClose();
112
113
  }
113
- }, (0, _i18n.__)('Move down')), block.attributes?.type === 'page' && block.attributes?.id && (0, _element.createElement)(_components.MenuItem, {
114
+ }, (0, _i18n.__)('Move down')), block.attributes?.type === 'page' && block.attributes?.id && (0, _react.createElement)(_components.MenuItem, {
114
115
  onClick: () => {
115
116
  onGoToPage(block);
116
117
  onClose();
117
118
  }
118
- }, goToLabel)), (0, _element.createElement)(_components.MenuGroup, null, (0, _element.createElement)(_components.MenuItem, {
119
+ }, goToLabel)), (0, _react.createElement)(_components.MenuGroup, null, (0, _react.createElement)(_components.MenuItem, {
119
120
  onClick: () => {
120
121
  removeBlocks([clientId], false);
121
122
  onClose();
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_icons","_components","_data","_i18n","_blockEditor","_router","_isPreviewingTheme","_lockUnlock","_useSyncPathWithUrl","POPOVER_PROPS","className","placement","useLocation","useHistory","unlock","routerPrivateApis","LeafMoreMenu","props","location","history","block","clientId","moveBlocksDown","moveBlocksUp","removeBlocks","useDispatch","blockEditorStore","removeLabel","sprintf","__","BlockTitle","maximumLength","goToLabel","rootClientId","useSelect","select","getBlockRootClientId","onGoToPage","useCallback","selectedBlock","attributes","name","kind","id","type","push","postType","postId","isPreviewingTheme","wp_theme_preview","currentlyPreviewingTheme","backPath","getPathFromURL","params","createElement","DropdownMenu","icon","moreVertical","label","popoverProps","noIcons","onClose","Fragment","MenuGroup","MenuItem","chevronUp","onClick","chevronDown"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\n\nimport { chevronUp, chevronDown, moreVertical } from '@wordpress/icons';\nimport { DropdownMenu, MenuItem, MenuGroup } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useCallback } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { BlockTitle, store as blockEditorStore } from '@wordpress/block-editor';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\nconst POPOVER_PROPS = {\n\tclassName: 'block-editor-block-settings-menu__popover',\n\tplacement: 'bottom-start',\n};\n\n/**\n * Internal dependencies\n */\nimport {\n\tisPreviewingTheme,\n\tcurrentlyPreviewingTheme,\n} from '../../utils/is-previewing-theme';\nimport { unlock } from '../../lock-unlock';\nimport { getPathFromURL } from '../sync-state-with-url/use-sync-path-with-url';\n\nconst { useLocation, useHistory } = unlock( routerPrivateApis );\n\nexport default function LeafMoreMenu( props ) {\n\tconst location = useLocation();\n\tconst history = useHistory();\n\tconst { block } = props;\n\tconst { clientId } = block;\n\tconst { moveBlocksDown, moveBlocksUp, removeBlocks } =\n\t\tuseDispatch( blockEditorStore );\n\n\tconst removeLabel = sprintf(\n\t\t/* translators: %s: block name */\n\t\t__( 'Remove %s' ),\n\t\tBlockTitle( { clientId, maximumLength: 25 } )\n\t);\n\n\tconst goToLabel = sprintf(\n\t\t/* translators: %s: block name */\n\t\t__( 'Go to %s' ),\n\t\tBlockTitle( { clientId, maximumLength: 25 } )\n\t);\n\n\tconst rootClientId = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockRootClientId } = select( blockEditorStore );\n\n\t\t\treturn getBlockRootClientId( clientId );\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst onGoToPage = useCallback(\n\t\t( selectedBlock ) => {\n\t\t\tconst { attributes, name } = selectedBlock;\n\t\t\tif (\n\t\t\t\tattributes.kind === 'post-type' &&\n\t\t\t\tattributes.id &&\n\t\t\t\tattributes.type &&\n\t\t\t\thistory\n\t\t\t) {\n\t\t\t\thistory.push(\n\t\t\t\t\t{\n\t\t\t\t\t\tpostType: attributes.type,\n\t\t\t\t\t\tpostId: attributes.id,\n\t\t\t\t\t\t...( isPreviewingTheme() && {\n\t\t\t\t\t\t\twp_theme_preview: currentlyPreviewingTheme(),\n\t\t\t\t\t\t} ),\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tbackPath: getPathFromURL( location.params ),\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\t\t\tif ( name === 'core/page-list-item' && attributes.id && history ) {\n\t\t\t\thistory.push(\n\t\t\t\t\t{\n\t\t\t\t\t\tpostType: 'page',\n\t\t\t\t\t\tpostId: attributes.id,\n\t\t\t\t\t\t...( isPreviewingTheme() && {\n\t\t\t\t\t\t\twp_theme_preview: currentlyPreviewingTheme(),\n\t\t\t\t\t\t} ),\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tbackPath: getPathFromURL( location.params ),\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[ history ]\n\t);\n\n\treturn (\n\t\t<DropdownMenu\n\t\t\ticon={ moreVertical }\n\t\t\tlabel={ __( 'Options' ) }\n\t\t\tclassName=\"block-editor-block-settings-menu\"\n\t\t\tpopoverProps={ POPOVER_PROPS }\n\t\t\tnoIcons\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ ( { onClose } ) => (\n\t\t\t\t<>\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\ticon={ chevronUp }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tmoveBlocksUp( [ clientId ], rootClientId );\n\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Move up' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\ticon={ chevronDown }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tmoveBlocksDown( [ clientId ], rootClientId );\n\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Move down' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t{ block.attributes?.type === 'page' &&\n\t\t\t\t\t\t\tblock.attributes?.id && (\n\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\tonGoToPage( block );\n\t\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ goToLabel }\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tremoveB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CAAEjB,KAAM,CAAC;MACnByC,OAAO,CAAC,CAAC;IACV;EAAG,GAED7B,SACO,CAEF,CAAC,EACZ,IAAAlC,QAAA,CAAAwD,aAAA,EAACrD,WAAA,CAAA8D,SAAS,QACT,IAAAjE,QAAA,CAAAwD,aAAA,EAACrD,WAAA,CAAA+D,QAAQ;IACRE,OAAO,EAAGA,CAAA,KAAM;MACf1C,YAAY,CAAE,CAAEH,QAAQ,CAAE,EAAE,KAAM,CAAC;MACnCwC,OAAO,CAAC,CAAC;IACV;EAAG,GAEDlC,WACO,CACA,CACV,CAEU,CAAC;AAEjB"}
1
+ {"version":3,"names":["_icons","require","_components","_data","_element","_i18n","_blockEditor","_router","_isPreviewingTheme","_lockUnlock","_useSyncPathWithUrl","POPOVER_PROPS","className","placement","useLocation","useHistory","unlock","routerPrivateApis","LeafMoreMenu","props","location","history","block","clientId","moveBlocksDown","moveBlocksUp","removeBlocks","useDispatch","blockEditorStore","removeLabel","sprintf","__","BlockTitle","maximumLength","goToLabel","rootClientId","useSelect","select","getBlockRootClientId","onGoToPage","useCallback","selectedBlock","attributes","name","kind","id","type","push","postType","postId","isPreviewingTheme","wp_theme_preview","currentlyPreviewingTheme","backPath","getPathFromURL","params","_react","createElement","DropdownMenu","icon","moreVertical","label","popoverProps","noIcons","onClose","Fragment","MenuGroup","MenuItem","chevronUp","onClick","chevronDown"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\n\nimport { chevronUp, chevronDown, moreVertical } from '@wordpress/icons';\nimport { DropdownMenu, MenuItem, MenuGroup } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useCallback } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { BlockTitle, store as blockEditorStore } from '@wordpress/block-editor';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\nconst POPOVER_PROPS = {\n\tclassName: 'block-editor-block-settings-menu__popover',\n\tplacement: 'bottom-start',\n};\n\n/**\n * Internal dependencies\n */\nimport {\n\tisPreviewingTheme,\n\tcurrentlyPreviewingTheme,\n} from '../../utils/is-previewing-theme';\nimport { unlock } from '../../lock-unlock';\nimport { getPathFromURL } from '../sync-state-with-url/use-sync-path-with-url';\n\nconst { useLocation, useHistory } = unlock( routerPrivateApis );\n\nexport default function LeafMoreMenu( props ) {\n\tconst location = useLocation();\n\tconst history = useHistory();\n\tconst { block } = props;\n\tconst { clientId } = block;\n\tconst { moveBlocksDown, moveBlocksUp, removeBlocks } =\n\t\tuseDispatch( blockEditorStore );\n\n\tconst removeLabel = sprintf(\n\t\t/* translators: %s: block name */\n\t\t__( 'Remove %s' ),\n\t\tBlockTitle( { clientId, maximumLength: 25 } )\n\t);\n\n\tconst goToLabel = sprintf(\n\t\t/* translators: %s: block name */\n\t\t__( 'Go to %s' ),\n\t\tBlockTitle( { clientId, maximumLength: 25 } )\n\t);\n\n\tconst rootClientId = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockRootClientId } = select( blockEditorStore );\n\n\t\t\treturn getBlockRootClientId( clientId );\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst onGoToPage = useCallback(\n\t\t( selectedBlock ) => {\n\t\t\tconst { attributes, name } = selectedBlock;\n\t\t\tif (\n\t\t\t\tattributes.kind === 'post-type' &&\n\t\t\t\tattributes.id &&\n\t\t\t\tattributes.type &&\n\t\t\t\thistory\n\t\t\t) {\n\t\t\t\thistory.push(\n\t\t\t\t\t{\n\t\t\t\t\t\tpostType: attributes.type,\n\t\t\t\t\t\tpostId: attributes.id,\n\t\t\t\t\t\t...( isPreviewingTheme() && {\n\t\t\t\t\t\t\twp_theme_preview: currentlyPreviewingTheme(),\n\t\t\t\t\t\t} ),\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tbackPath: getPathFromURL( location.params ),\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\t\t\tif ( name === 'core/page-list-item' && attributes.id && history ) {\n\t\t\t\thistory.push(\n\t\t\t\t\t{\n\t\t\t\t\t\tpostType: 'page',\n\t\t\t\t\t\tpostId: attributes.id,\n\t\t\t\t\t\t...( isPreviewingTheme() && {\n\t\t\t\t\t\t\twp_theme_preview: currentlyPreviewingTheme(),\n\t\t\t\t\t\t} ),\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tbackPath: getPathFromURL( location.params ),\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[ history ]\n\t);\n\n\treturn (\n\t\t<DropdownMenu\n\t\t\ticon={ moreVertical }\n\t\t\tlabel={ __( 'Options' ) }\n\t\t\tclassName=\"block-editor-block-settings-menu\"\n\t\t\tpopoverProps={ POPOVER_PROPS }\n\t\t\tnoIcons\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ ( { onClose } ) => (\n\t\t\t\t<>\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\ticon={ chevronUp }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tmoveBlocksUp( [ clientId ], rootClientId );\n\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Move up' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\ticon={ chevronDown }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tmoveBlocksDown( [ clientId ], rootClientId );\n\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Move down' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t{ block.attributes?.type === 'page' &&\n\t\t\t\t\t\t\tblock.attributes?.id && (\n\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\tonGoToPage( block );\n\t\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ goToLabel }\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tremoveBlocks( [ clientId ], false );\n\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ removeLabel }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t</>\n\t\t\t) }\n\t\t</DropdownMenu>\n\t);\n}\n"],"mappings":";;;;;;;AAIA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAUA,IAAAO,kBAAA,GAAAP,OAAA;AAIA,IAAAQ,WAAA,GAAAR,OAAA;AACA,IAAAS,mBAAA,GAAAT,OAAA;AAzBA;AACA;AACA;;AAUA,MAAMU,aAAa,GAAG;EACrBC,SAAS,EAAE,2CAA2C;EACtDC,SAAS,EAAE;AACZ,CAAC;;AAED;AACA;AACA;;AAQA,MAAM;EAAEC,WAAW;EAAEC;AAAW,CAAC,GAAG,IAAAC,kBAAM,EAAEC,mBAAkB,CAAC;AAEhD,SAASC,YAAYA,CAAEC,KAAK,EAAG;EAC7C,MAAMC,QAAQ,GAAGN,WAAW,CAAC,CAAC;EAC9B,MAAMO,OAAO,GAAGN,UAAU,C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MACf7C,cAAc,CAAE,CAAED,QAAQ,CAAE,EAAEY,YAAa,CAAC;MAC5C6B,OAAO,CAAC,CAAC;IACV;EAAG,GAED,IAAAjC,QAAE,EAAE,WAAY,CACT,CAAC,EACTT,KAAK,CAACoB,UAAU,EAAEI,IAAI,KAAK,MAAM,IAClCxB,KAAK,CAACoB,UAAU,EAAEG,EAAE,IACnB,IAAAW,MAAA,CAAAC,aAAA,EAACvD,WAAA,CAAAiE,QAAQ;IACRE,OAAO,EAAGA,CAAA,KAAM;MACf9B,UAAU,CAAEjB,KAAM,CAAC;MACnB0C,OAAO,CAAC,CAAC;IACV;EAAG,GAED9B,SACO,CAEF,CAAC,EACZ,IAAAsB,MAAA,CAAAC,aAAA,EAACvD,WAAA,CAAAgE,SAAS,QACT,IAAAV,MAAA,CAAAC,aAAA,EAACvD,WAAA,CAAAiE,QAAQ;IACRE,OAAO,EAAGA,CAAA,KAAM;MACf3C,YAAY,CAAE,CAAEH,QAAQ,CAAE,EAAE,KAAM,CAAC;MACnCyC,OAAO,CAAC,CAAC;IACV;EAAG,GAEDnC,WACO,CACA,CACV,CAEU,CAAC;AAEjB"}
@@ -5,10 +5,11 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = NavigationMenuContent;
8
- var _element = require("@wordpress/element");
8
+ var _react = require("react");
9
9
  var _blockEditor = require("@wordpress/block-editor");
10
10
  var _data = require("@wordpress/data");
11
11
  var _blocks = require("@wordpress/blocks");
12
+ var _element = require("@wordpress/element");
12
13
  var _coreData = require("@wordpress/core-data");
13
14
  var _lockUnlock = require("../../lock-unlock");
14
15
  var _leafMoreMenu = _interopRequireDefault(require("./leaf-more-menu"));
@@ -75,13 +76,13 @@ function NavigationMenuContent({
75
76
 
76
77
  // The hidden block is needed because it makes block edit side effects trigger.
77
78
  // For example a navigation page list load its items has an effect on edit to load its items.
78
- return (0, _element.createElement)(_element.Fragment, null, !isLoading && (0, _element.createElement)(PrivateListView, {
79
+ return (0, _react.createElement)(_react.Fragment, null, !isLoading && (0, _react.createElement)(PrivateListView, {
79
80
  rootClientId: listViewRootClientId,
80
81
  onSelect: offCanvasOnselect,
81
82
  blockSettingsMenu: _leafMoreMenu.default,
82
83
  showAppender: false
83
- }), (0, _element.createElement)("div", {
84
+ }), (0, _react.createElement)("div", {
84
85
  className: "edit-site-sidebar-navigation-screen-navigation-menus__helper-block-editor"
85
- }, (0, _element.createElement)(_blockEditor.BlockList, null)));
86
+ }, (0, _react.createElement)(_blockEditor.BlockList, null)));
86
87
  }
87
88
  //# sourceMappingURL=navigation-menu-content.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_blockEditor","_data","_blocks","_coreData","_lockUnlock","_leafMoreMenu","_interopRequireDefault","PrivateListView","unlock","blockEditorPrivateApis","MAX_PAGE_COUNT","PAGES_QUERY","per_page","_fields","orderby","order","NavigationMenuContent","rootClientId","listViewRootClientId","isLoading","useSelect","select","areInnerBlocksControlled","getBlockName","getBlockCount","getBlockOrder","blockEditorStore","isResolving","coreStore","blockClientIds","hasOnlyPageListBlock","length","pageListHasBlocks","isLoadingPages","replaceBlock","__unstableMarkNextChangeAsNotPersistent","useDispatch","offCanvasOnselect","useCallback","block","name","attributes","url","clientId","createBlock","createElement","Fragment","onSelect","blockSettingsMenu","LeafMoreMenu","showAppender","className","BlockList"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n\tBlockList,\n} from '@wordpress/block-editor';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { createBlock } from '@wordpress/blocks';\nimport { useCallback } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport LeafMoreMenu from './leaf-more-menu';\n\nconst { PrivateListView } = unlock( blockEditorPrivateApis );\n\n// Needs to be kept in sync with the query used at packages/block-library/src/page-list/edit.js.\nconst MAX_PAGE_COUNT = 100;\nconst PAGES_QUERY = [\n\t'postType',\n\t'page',\n\t{\n\t\tper_page: MAX_PAGE_COUNT,\n\t\t_fields: [ 'id', 'link', 'menu_order', 'parent', 'title', 'type' ],\n\t\t// TODO: When https://core.trac.wordpress.org/ticket/39037 REST API support for multiple orderby\n\t\t// values is resolved, update 'orderby' to [ 'menu_order', 'post_title' ] to provide a consistent\n\t\t// sort.\n\t\torderby: 'menu_order',\n\t\torder: 'asc',\n\t},\n];\n\nexport default function NavigationMenuContent( { rootClientId } ) {\n\tconst { listViewRootClientId, isLoading } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tareInnerBlocksControlled,\n\t\t\t\tgetBlockName,\n\t\t\t\tgetBlockCount,\n\t\t\t\tgetBlockOrder,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst { isResolving } = select( coreStore );\n\n\t\t\tconst blockClientIds = getBlockOrder( rootClientId );\n\n\t\t\tconst hasOnlyPageListBlock =\n\t\t\t\tblockClientIds.length === 1 &&\n\t\t\t\tgetBlockName( blockClientIds[ 0 ] ) === 'core/page-list';\n\t\t\tconst pageListHasBlocks =\n\t\t\t\thasOnlyPageListBlock &&\n\t\t\t\tgetBlockCount( blockClientIds[ 0 ] ) > 0;\n\n\t\t\tconst isLoadingPages = isResolving(\n\t\t\t\t'getEntityRecords',\n\t\t\t\tPAGES_QUERY\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\tlistViewRootClientId: pageListHasBlocks\n\t\t\t\t\t? blockClientIds[ 0 ]\n\t\t\t\t\t: rootClientId,\n\t\t\t\t// This is a small hack to wait for the navigation block\n\t\t\t\t// to actually load its inner blocks.\n\t\t\t\tisLoading:\n\t\t\t\t\t! areInnerBlocksControlled( rootClientId ) ||\n\t\t\t\t\tisLoadingPages,\n\t\t\t};\n\t\t},\n\t\t[ rootClientId ]\n\t);\n\tconst { replaceBlock, __unstableMarkNextChangeAsNotPersistent } =\n\t\tuseDispatch( blockEditorStore );\n\n\tconst offCanvasOnselect = useCallback(\n\t\t( block ) => {\n\t\t\tif (\n\t\t\t\tblock.name === 'core/navigation-link' &&\n\t\t\t\t! block.attributes.url\n\t\t\t) {\n\t\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\t\treplaceBlock(\n\t\t\t\t\tblock.clientId,\n\t\t\t\t\tcreateBlock( 'core/navigation-link', block.attributes )\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[ __unstableMarkNextChangeAsNotPersistent, replaceBlock ]\n\t);\n\n\t// The hidden block is needed because it makes block edit side effects trigger.\n\t// For example a navigation page list load its items has an effect on edit to load its items.\n\treturn (\n\t\t<>\n\t\t\t{ ! isLoading && (\n\t\t\t\t<PrivateListView\n\t\t\t\t\trootClientId={ listViewRootClientId }\n\t\t\t\t\tonSelect={ offCanvasOnselect }\n\t\t\t\t\tblockSettingsMenu={ LeafMoreMenu }\n\t\t\t\t\tshowAppender={ false }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<div className=\"edit-site-sidebar-navigation-screen-navigation-menus__helper-block-editor\">\n\t\t\t\t<BlockList />\n\t\t\t</div>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAUA,IAAAA,QAAA,GAAAC,OAAA;AAPA,IAAAC,YAAA,GAAAD,OAAA;AAKA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAEA,IAAAI,SAAA,GAAAJ,OAAA;AAKA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,aAAA,GAAAC,sBAAA,CAAAP,OAAA;AAjBA;AACA;AACA;;AAWA;AACA;AACA;;AAIA,MAAM;EAAEQ;AAAgB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;;AAE5D;AACA,MAAMC,cAAc,GAAG,GAAG;AAC1B,MAAMC,WAAW,GAAG,CACnB,UAAU,EACV,MAAM,EACN;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CAACC,IAAI,KAAK,sBAAsB,IACrC,CAAED,KAAK,CAACE,UAAU,CAACC,GAAG,EACrB;MACDP,uCAAuC,CAAC,CAAC;MACzCD,YAAY,CACXK,KAAK,CAACI,QAAQ,EACd,IAAAC,mBAAW,EAAE,sBAAsB,EAAEL,KAAK,CAACE,UAAW,CACvD,CAAC;IACF;EACD,CAAC,EACD,CAAEN,uCAAuC,EAAED,YAAY,CACxD,CAAC;;EAED;EACA;EACA,OACC,IAAApC,QAAA,CAAA+C,aAAA,EAAA/C,QAAA,CAAAgD,QAAA,QACG,CAAE3B,SAAS,IACZ,IAAArB,QAAA,CAAA+C,aAAA,EAACtC,eAAe;IACfU,YAAY,EAAGC,oBAAsB;IACrC6B,QAAQ,EAAGV,iBAAmB;IAC9BW,iBAAiB,EAAGC,qBAAc;IAClCC,YAAY,EAAG;EAAO,CACtB,CACD,EACD,IAAApD,QAAA,CAAA+C,aAAA;IAAKM,SAAS,EAAC;EAA2E,GACzF,IAAArD,QAAA,CAAA+C,aAAA,EAAC7C,YAAA,CAAAoD,SAAS,MAAE,CACR,CACJ,CAAC;AAEL"}
1
+ {"version":3,"names":["_blockEditor","require","_data","_blocks","_element","_coreData","_lockUnlock","_leafMoreMenu","_interopRequireDefault","PrivateListView","unlock","blockEditorPrivateApis","MAX_PAGE_COUNT","PAGES_QUERY","per_page","_fields","orderby","order","NavigationMenuContent","rootClientId","listViewRootClientId","isLoading","useSelect","select","areInnerBlocksControlled","getBlockName","getBlockCount","getBlockOrder","blockEditorStore","isResolving","coreStore","blockClientIds","hasOnlyPageListBlock","length","pageListHasBlocks","isLoadingPages","replaceBlock","__unstableMarkNextChangeAsNotPersistent","useDispatch","offCanvasOnselect","useCallback","block","name","attributes","url","clientId","createBlock","_react","createElement","Fragment","onSelect","blockSettingsMenu","LeafMoreMenu","showAppender","className","BlockList"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n\tBlockList,\n} from '@wordpress/block-editor';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { createBlock } from '@wordpress/blocks';\nimport { useCallback } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport LeafMoreMenu from './leaf-more-menu';\n\nconst { PrivateListView } = unlock( blockEditorPrivateApis );\n\n// Needs to be kept in sync with the query used at packages/block-library/src/page-list/edit.js.\nconst MAX_PAGE_COUNT = 100;\nconst PAGES_QUERY = [\n\t'postType',\n\t'page',\n\t{\n\t\tper_page: MAX_PAGE_COUNT,\n\t\t_fields: [ 'id', 'link', 'menu_order', 'parent', 'title', 'type' ],\n\t\t// TODO: When https://core.trac.wordpress.org/ticket/39037 REST API support for multiple orderby\n\t\t// values is resolved, update 'orderby' to [ 'menu_order', 'post_title' ] to provide a consistent\n\t\t// sort.\n\t\torderby: 'menu_order',\n\t\torder: 'asc',\n\t},\n];\n\nexport default function NavigationMenuContent( { rootClientId } ) {\n\tconst { listViewRootClientId, isLoading } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tareInnerBlocksControlled,\n\t\t\t\tgetBlockName,\n\t\t\t\tgetBlockCount,\n\t\t\t\tgetBlockOrder,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst { isResolving } = select( coreStore );\n\n\t\t\tconst blockClientIds = getBlockOrder( rootClientId );\n\n\t\t\tconst hasOnlyPageListBlock =\n\t\t\t\tblockClientIds.length === 1 &&\n\t\t\t\tgetBlockName( blockClientIds[ 0 ] ) === 'core/page-list';\n\t\t\tconst pageListHasBlocks =\n\t\t\t\thasOnlyPageListBlock &&\n\t\t\t\tgetBlockCount( blockClientIds[ 0 ] ) > 0;\n\n\t\t\tconst isLoadingPages = isResolving(\n\t\t\t\t'getEntityRecords',\n\t\t\t\tPAGES_QUERY\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\tlistViewRootClientId: pageListHasBlocks\n\t\t\t\t\t? blockClientIds[ 0 ]\n\t\t\t\t\t: rootClientId,\n\t\t\t\t// This is a small hack to wait for the navigation block\n\t\t\t\t// to actually load its inner blocks.\n\t\t\t\tisLoading:\n\t\t\t\t\t! areInnerBlocksControlled( rootClientId ) ||\n\t\t\t\t\tisLoadingPages,\n\t\t\t};\n\t\t},\n\t\t[ rootClientId ]\n\t);\n\tconst { replaceBlock, __unstableMarkNextChangeAsNotPersistent } =\n\t\tuseDispatch( blockEditorStore );\n\n\tconst offCanvasOnselect = useCallback(\n\t\t( block ) => {\n\t\t\tif (\n\t\t\t\tblock.name === 'core/navigation-link' &&\n\t\t\t\t! block.attributes.url\n\t\t\t) {\n\t\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\t\treplaceBlock(\n\t\t\t\t\tblock.clientId,\n\t\t\t\t\tcreateBlock( 'core/navigation-link', block.attributes )\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[ __unstableMarkNextChangeAsNotPersistent, replaceBlock ]\n\t);\n\n\t// The hidden block is needed because it makes block edit side effects trigger.\n\t// For example a navigation page list load its items has an effect on edit to load its items.\n\treturn (\n\t\t<>\n\t\t\t{ ! isLoading && (\n\t\t\t\t<PrivateListView\n\t\t\t\t\trootClientId={ listViewRootClientId }\n\t\t\t\t\tonSelect={ offCanvasOnselect }\n\t\t\t\t\tblockSettingsMenu={ LeafMoreMenu }\n\t\t\t\t\tshowAppender={ false }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<div className=\"edit-site-sidebar-navigation-screen-navigation-menus__helper-block-editor\">\n\t\t\t\t<BlockList />\n\t\t\t</div>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,I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,GACnBZ,YAAY;MACf;MACA;MACAE,SAAS,EACR,CAAEG,wBAAwB,CAAEL,YAAa,CAAC,IAC1CgB;IACF,CAAC;EACF,CAAC,EACD,CAAEhB,YAAY,CACf,CAAC;EACD,MAAM;IAAEiB,YAAY;IAAEC;EAAwC,CAAC,GAC9D,IAAAC,iBAAW,EAAEV,kBAAiB,CAAC;EAEhC,MAAMW,iBAAiB,GAAG,IAAAC,oBAAW,EAClCC,KAAK,IAAM;IACZ,IACCA,KAAK,CAACC,IAAI,KAAK,sBAAsB,IACrC,CAAED,KAAK,CAACE,UAAU,CAACC,GAAG,EACrB;MACDP,uCAAuC,CAAC,CAAC;MACzCD,YAAY,CACXK,KAAK,CAACI,QAAQ,EACd,IAAAC,mBAAW,EAAE,sBAAsB,EAAEL,KAAK,CAACE,UAAW,CACvD,CAAC;IACF;EACD,CAAC,EACD,CAAEN,uCAAuC,EAAED,YAAY,CACxD,CAAC;;EAED;EACA;EACA,OACC,IAAAW,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAE,QAAA,QACG,CAAE5B,SAAS,IACZ,IAAA0B,MAAA,CAAAC,aAAA,EAACvC,eAAe;IACfU,YAAY,EAAGC,oBAAsB;IACrC8B,QAAQ,EAAGX,iBAAmB;IAC9BY,iBAAiB,EAAGC,qBAAc;IAClCC,YAAY,EAAG;EAAO,CACtB,CACD,EACD,IAAAN,MAAA,CAAAC,aAAA;IAAKM,SAAS,EAAC;EAA2E,GACzF,IAAAP,MAAA,CAAAC,aAAA,EAAChD,YAAA,CAAAuD,SAAS,MAAE,CACR,CACJ,CAAC;AAEL"}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = SidebarNavigationScreenPage;
8
- var _element = require("@wordpress/element");
8
+ var _react = require("react");
9
9
  var _i18n = require("@wordpress/i18n");
10
10
  var _data = require("@wordpress/data");
11
11
  var _components = require("@wordpress/components");
@@ -58,9 +58,9 @@ function SidebarNavigationScreenPage() {
58
58
  };
59
59
  }, [record]);
60
60
  const featureImageAltText = featuredMediaAltText ? (0, _htmlEntities.decodeEntities)(featuredMediaAltText) : (0, _htmlEntities.decodeEntities)(record?.title?.rendered || (0, _i18n.__)('Featured image'));
61
- return record ? (0, _element.createElement)(_sidebarNavigationScreen.default, {
61
+ return record ? (0, _react.createElement)(_sidebarNavigationScreen.default, {
62
62
  title: (0, _htmlEntities.decodeEntities)(record?.title?.rendered || (0, _i18n.__)('(no title)')),
63
- actions: (0, _element.createElement)(_element.Fragment, null, (0, _element.createElement)(_pageActions.default, {
63
+ actions: (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_pageActions.default, {
64
64
  postId: postId,
65
65
  toggleProps: {
66
66
  as: _sidebarButton.default
@@ -68,31 +68,31 @@ function SidebarNavigationScreenPage() {
68
68
  onRemove: () => {
69
69
  navigator.goTo('/page');
70
70
  }
71
- }), (0, _element.createElement)(_sidebarButton.default, {
71
+ }), (0, _react.createElement)(_sidebarButton.default, {
72
72
  onClick: () => setCanvasMode('edit'),
73
73
  label: (0, _i18n.__)('Edit'),
74
74
  icon: _icons.pencil
75
75
  })),
76
- meta: (0, _element.createElement)(_components.ExternalLink, {
76
+ meta: (0, _react.createElement)(_components.ExternalLink, {
77
77
  className: "edit-site-sidebar-navigation-screen__page-link",
78
78
  href: record.link
79
79
  }, (0, _url.filterURLForDisplay)((0, _url.safeDecodeURIComponent)(record.link))),
80
- content: (0, _element.createElement)(_element.Fragment, null, !!featuredMediaSourceUrl && (0, _element.createElement)(_components.__experimentalVStack, {
80
+ content: (0, _react.createElement)(_react.Fragment, null, !!featuredMediaSourceUrl && (0, _react.createElement)(_components.__experimentalVStack, {
81
81
  className: "edit-site-sidebar-navigation-screen-page__featured-image-wrapper",
82
82
  alignment: "left",
83
83
  spacing: 2
84
- }, (0, _element.createElement)("div", {
84
+ }, (0, _react.createElement)("div", {
85
85
  className: "edit-site-sidebar-navigation-screen-page__featured-image has-image"
86
- }, (0, _element.createElement)("img", {
86
+ }, (0, _react.createElement)("img", {
87
87
  alt: featureImageAltText,
88
88
  src: featuredMediaSourceUrl
89
- }))), !!record?.excerpt?.rendered && (0, _element.createElement)(_components.__experimentalTruncate, {
89
+ }))), !!record?.excerpt?.rendered && (0, _react.createElement)(_components.__experimentalTruncate, {
90
90
  className: "edit-site-sidebar-navigation-screen-page__excerpt",
91
91
  numberOfLines: 3
92
- }, (0, _dom.__unstableStripHTML)(record.excerpt.rendered)), (0, _element.createElement)(_pageDetails.default, {
92
+ }, (0, _dom.__unstableStripHTML)(record.excerpt.rendered)), (0, _react.createElement)(_pageDetails.default, {
93
93
  id: postId
94
94
  })),
95
- footer: record?.modified ? (0, _element.createElement)(_sidebarNavigationScreenDetailsFooter.default, {
95
+ footer: record?.modified ? (0, _react.createElement)(_sidebarNavigationScreenDetailsFooter.default, {
96
96
  record: record
97
97
  }) : null
98
98
  }) : null;
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_data","_components","_coreData","_htmlEntities","_icons","_dom","_escapeHtml","_url","_sidebarNavigationScreen","_interopRequireDefault","_lockUnlock","_store","_sidebarButton","_pageDetails","_pageActions","_sidebarNavigationScreenDetailsFooter","SidebarNavigationScreenPage","navigator","useNavigator","setCanvasMode","unlock","useDispatch","editSiteStore","params","postId","record","useEntityRecord","featuredMediaAltText","featuredMediaSourceUrl","useSelect","select","getEntityRecord","coreStore","attachedMedia","featured_media","media_details","sizes","medium","source_url","escapeAttribute","alt_text","description","raw","featureImageAltText","decodeEntities","title","rendered","__","_element","createElement","default","actions","Fragment","toggleProps","as","SidebarButton","onRemove","goTo","onClick","label","icon","pencil","meta","ExternalLink","className","href","link","filterURLForDisplay","safeDecodeURIComponent","content","__experimentalVStack","alignment","spacing","alt","src","excerpt","__experimentalTruncate","numberOfLines","stripHTML","id","footer","modified"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-page/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\t__experimentalUseNavigator as useNavigator,\n\t__experimentalVStack as VStack,\n\tExternalLink,\n\t__experimentalTruncate as Truncate,\n} from '@wordpress/components';\nimport { store as coreStore, useEntityRecord } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { pencil } from '@wordpress/icons';\nimport { __unstableStripHTML as stripHTML } from '@wordpress/dom';\nimport { escapeAttribute } from '@wordpress/escape-html';\nimport { safeDecodeURIComponent, filterURLForDisplay } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport SidebarButton from '../sidebar-button';\nimport PageDetails from './page-details';\nimport PageActions from '../page-actions';\nimport SidebarNavigationScreenDetailsFooter from '../sidebar-navigation-screen-details-footer';\n\nexport default function SidebarNavigationScreenPage() {\n\tconst navigator = useNavigator();\n\tconst { setCanvasMode } = unlock( useDispatch( editSiteStore ) );\n\tconst {\n\t\tparams: { postId },\n\t} = useNavigator();\n\tconst { record } = useEntityRecord( 'postType', 'page', postId );\n\n\tconst { featuredMediaAltText, featuredMediaSourceUrl } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecord } = select( coreStore );\n\t\t\t// Featured image.\n\t\t\tconst attachedMedia = record?.featured_media\n\t\t\t\t? getEntityRecord(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t'attachment',\n\t\t\t\t\t\trecord?.featured_media\n\t\t\t\t )\n\t\t\t\t: null;\n\n\t\t\treturn {\n\t\t\t\tfeaturedMediaSourceUrl:\n\t\t\t\t\tattachedMedia?.media_details.sizes?.medium?.source_url ||\n\t\t\t\t\tattachedMedia?.source_url,\n\t\t\t\tfeaturedMediaAltText: escapeAttribute(\n\t\t\t\t\tattachedMedia?.alt_text ||\n\t\t\t\t\t\tattachedMedia?.description?.raw ||\n\t\t\t\t\t\t''\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ record ]\n\t);\n\n\tconst featureImageAltText = featuredMediaAltText\n\t\t? decodeEntities( featuredMediaAltText )\n\t\t: decodeEntities( record?.title?.rendered || __( 'Featured image' ) );\n\n\treturn record ? (\n\t\t<SidebarNavigationScreen\n\t\t\ttitle={ decodeEntities(\n\t\t\t\trecord?.title?.rendered || __( '(no title)' )\n\t\t\t) }\n\t\t\tactions={\n\t\t\t\t<>\n\t\t\t\t\t<PageActions\n\t\t\t\t\t\tpostId={ postId }\n\t\t\t\t\t\ttoggleProps={ { as: SidebarButton } }\n\t\t\t\t\t\tonRemove={ () => {\n\t\t\t\t\t\t\tnavigator.goTo( '/page' );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\tonClick={ () => setCanvasMode( 'edit' ) }\n\t\t\t\t\t\tlabel={ __( 'Edit' ) }\n\t\t\t\t\t\ticon={ pencil }\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t}\n\t\t\tmeta={\n\t\t\t\t<ExternalLink\n\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen__page-link\"\n\t\t\t\t\thref={ record.link }\n\t\t\t\t>\n\t\t\t\t\t{ filterURLForDisplay(\n\t\t\t\t\t\tsafeDecodeURIComponent( record.link )\n\t\t\t\t\t) }\n\t\t\t\t</ExternalLink>\n\t\t\t}\n\t\t\tcontent={\n\t\t\t\t<>\n\t\t\t\t\t{ !! featuredMediaSourceUrl && (\n\t\t\t\t\t\t<VStack\n\t\t\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen-page__featured-image-wrapper\"\n\t\t\t\t\t\t\talignment=\"left\"\n\t\t\t\t\t\t\tspacing={ 2 }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<div className=\"edit-site-sidebar-navigation-screen-page__featured-image has-image\">\n\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\talt={ featureImageAltText }\n\t\t\t\t\t\t\t\t\tsrc={ featuredMediaSourceUrl }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</VStack>\n\t\t\t\t\t) }\n\t\t\t\t\t{ !! record?.excerpt?.rendered && (\n\t\t\t\t\t\t<Truncate\n\t\t\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen-page__excerpt\"\n\t\t\t\t\t\t\tnumberOfLines={ 3 }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ stripHTML( record.excerpt.rendered ) }\n\t\t\t\t\t\t</Truncate>\n\t\t\t\t\t) }\n\t\t\t\t\t<PageDetails id={ postId } />\n\t\t\t\t</>\n\t\t\t}\n\t\t\tfooter={\n\t\t\t\trecord?.modified ? (\n\t\t\t\t\t<SidebarNavigationScreenDetailsFooter record={ record } />\n\t\t\t\t) : null\n\t\t\t}\n\t\t/>\n\t) : null;\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAMA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,IAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AACA,IAAAQ,IAAA,GAAAR,OAAA;AAKA,IAAAS,wBAAA,GAAAC,sBAAA,CAAAV,OAAA;AACA,IAAAW,WAAA,GAAAX,OAAA;AACA,IAAAY,MAAA,GAAAZ,OAAA;AACA,IAAAa,cAAA,GAAAH,sBAAA,CAAAV,OAAA;AACA,IAAAc,YAAA,GAAAJ,sBAAA,CAAAV,OAAA;AACA,IAAAe,YAAA,GAAAL,sBAAA,CAAAV,OAAA;AACA,IAAAgB,qCAAA,GAAAN,sBAAA,CAAAV,OAAA;AA3BA;AACA;AACA;;AAgBA;AACA;AACA;;AASe,SAASiB,2BAA2BA,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B,CACG,CACE,CACR,EACC,CAAC,CAAEH,MAAM,EAAEkD,OAAO,EAAE7B,QAAQ,IAC7B,IAAAE,QAAA,CAAAC,aAAA,EAAChD,WAAA,CAAA2E,sBAAQ;MACRZ,SAAS,EAAC,mDAAmD;MAC7Da,aAAa,EAAG;IAAG,GAEjB,IAAAC,wBAAS,EAAErD,MAAM,CAACkD,OAAO,CAAC7B,QAAS,CAC5B,CACV,EACD,IAAAE,QAAA,CAAAC,aAAA,EAACpC,YAAA,CAAAqC,OAAW;MAAC6B,EAAE,EAAGvD;IAAQ,CAAE,CAC3B,CACF;IACDwD,MAAM,EACLvD,MAAM,EAAEwD,QAAQ,GACf,IAAAjC,QAAA,CAAAC,aAAA,EAAClC,qCAAA,CAAAmC,OAAoC;MAACzB,MAAM,EAAGA;IAAQ,CAAE,CAAC,GACvD;EACJ,CACD,CAAC,GACC,IAAI;AACT"}
1
+ {"version":3,"names":["_i18n","require","_data","_components","_coreData","_htmlEntities","_icons","_dom","_escapeHtml","_url","_sidebarNavigationScreen","_interopRequireDefault","_lockUnlock","_store","_sidebarButton","_pageDetails","_pageActions","_sidebarNavigationScreenDetailsFooter","SidebarNavigationScreenPage","navigator","useNavigator","setCanvasMode","unlock","useDispatch","editSiteStore","params","postId","record","useEntityRecord","featuredMediaAltText","featuredMediaSourceUrl","useSelect","select","getEntityRecord","coreStore","attachedMedia","featured_media","media_details","sizes","medium","source_url","escapeAttribute","alt_text","description","raw","featureImageAltText","decodeEntities","title","rendered","__","_react","createElement","default","actions","Fragment","toggleProps","as","SidebarButton","onRemove","goTo","onClick","label","icon","pencil","meta","ExternalLink","className","href","link","filterURLForDisplay","safeDecodeURIComponent","content","__experimentalVStack","alignment","spacing","alt","src","excerpt","__experimentalTruncate","numberOfLines","stripHTML","id","footer","modified"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-page/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\t__experimentalUseNavigator as useNavigator,\n\t__experimentalVStack as VStack,\n\tExternalLink,\n\t__experimentalTruncate as Truncate,\n} from '@wordpress/components';\nimport { store as coreStore, useEntityRecord } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { pencil } from '@wordpress/icons';\nimport { __unstableStripHTML as stripHTML } from '@wordpress/dom';\nimport { escapeAttribute } from '@wordpress/escape-html';\nimport { safeDecodeURIComponent, filterURLForDisplay } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport SidebarButton from '../sidebar-button';\nimport PageDetails from './page-details';\nimport PageActions from '../page-actions';\nimport SidebarNavigationScreenDetailsFooter from '../sidebar-navigation-screen-details-footer';\n\nexport default function SidebarNavigationScreenPage() {\n\tconst navigator = useNavigator();\n\tconst { setCanvasMode } = unlock( useDispatch( editSiteStore ) );\n\tconst {\n\t\tparams: { postId },\n\t} = useNavigator();\n\tconst { record } = useEntityRecord( 'postType', 'page', postId );\n\n\tconst { featuredMediaAltText, featuredMediaSourceUrl } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecord } = select( coreStore );\n\t\t\t// Featured image.\n\t\t\tconst attachedMedia = record?.featured_media\n\t\t\t\t? getEntityRecord(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t'attachment',\n\t\t\t\t\t\trecord?.featured_media\n\t\t\t\t )\n\t\t\t\t: null;\n\n\t\t\treturn {\n\t\t\t\tfeaturedMediaSourceUrl:\n\t\t\t\t\tattachedMedia?.media_details.sizes?.medium?.source_url ||\n\t\t\t\t\tattachedMedia?.source_url,\n\t\t\t\tfeaturedMediaAltText: escapeAttribute(\n\t\t\t\t\tattachedMedia?.alt_text ||\n\t\t\t\t\t\tattachedMedia?.description?.raw ||\n\t\t\t\t\t\t''\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ record ]\n\t);\n\n\tconst featureImageAltText = featuredMediaAltText\n\t\t? decodeEntities( featuredMediaAltText )\n\t\t: decodeEntities( record?.title?.rendered || __( 'Featured image' ) );\n\n\treturn record ? (\n\t\t<SidebarNavigationScreen\n\t\t\ttitle={ decodeEntities(\n\t\t\t\trecord?.title?.rendered || __( '(no title)' )\n\t\t\t) }\n\t\t\tactions={\n\t\t\t\t<>\n\t\t\t\t\t<PageActions\n\t\t\t\t\t\tpostId={ postId }\n\t\t\t\t\t\ttoggleProps={ { as: SidebarButton } }\n\t\t\t\t\t\tonRemove={ () => {\n\t\t\t\t\t\t\tnavigator.goTo( '/page' );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\tonClick={ () => setCanvasMode( 'edit' ) }\n\t\t\t\t\t\tlabel={ __( 'Edit' ) }\n\t\t\t\t\t\ticon={ pencil }\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t}\n\t\t\tmeta={\n\t\t\t\t<ExternalLink\n\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen__page-link\"\n\t\t\t\t\thref={ record.link }\n\t\t\t\t>\n\t\t\t\t\t{ filterURLForDisplay(\n\t\t\t\t\t\tsafeDecodeURIComponent( record.link )\n\t\t\t\t\t) }\n\t\t\t\t</ExternalLink>\n\t\t\t}\n\t\t\tcontent={\n\t\t\t\t<>\n\t\t\t\t\t{ !! featuredMediaSourceUrl && (\n\t\t\t\t\t\t<VStack\n\t\t\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen-page__featured-image-wrapper\"\n\t\t\t\t\t\t\talignment=\"left\"\n\t\t\t\t\t\t\tspacing={ 2 }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<div className=\"edit-site-sidebar-navigation-screen-page__featured-image has-image\">\n\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\talt={ featureImageAltText }\n\t\t\t\t\t\t\t\t\tsrc={ featuredMediaSourceUrl }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</VStack>\n\t\t\t\t\t) }\n\t\t\t\t\t{ !! record?.excerpt?.rendered && (\n\t\t\t\t\t\t<Truncate\n\t\t\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen-page__excerpt\"\n\t\t\t\t\t\t\tnumberOfLines={ 3 }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ stripHTML( record.excerpt.rendered ) }\n\t\t\t\t\t\t</Truncate>\n\t\t\t\t\t) }\n\t\t\t\t\t<PageDetails id={ postId } />\n\t\t\t\t</>\n\t\t\t}\n\t\t\tfooter={\n\t\t\t\trecord?.modified ? (\n\t\t\t\t\t<SidebarNavigationScreenDetailsFooter record={ record } />\n\t\t\t\t) : null\n\t\t\t}\n\t\t/>\n\t) : null;\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAMA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,IAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AACA,IAAAQ,IAAA,GAAAR,OAAA;AAKA,IAAAS,wBAAA,GAAAC,sBAAA,CAAAV,OAAA;AACA,IAAAW,WAAA,GAAAX,OAAA;AACA,IAAAY,MAAA,GAAAZ,OAAA;AACA,IAAAa,cAAA,GAAAH,sBAAA,CAAAV,OAAA;AACA,IAAAc,YAAA,GAAAJ,sBAAA,CAAAV,OAAA;AACA,IAAAe,YAAA,GAAAL,sBAAA,CAAAV,OAAA;AACA,IAAAgB,qCAAA,GAAAN,sBAAA,CAAAV,OAAA;AA3BA;AACA;AACA;;AAgBA;AACA;AACA;;AASe,SAASiB,2BAA2BA,CAAA,EAAG;EACrD,MAAM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AAC,CAAEH,MAAM,EAAEkD,OAAO,EAAE7B,QAAQ,IAC7B,IAAAE,MAAA,CAAAC,aAAA,EAAChD,WAAA,CAAA2E,sBAAQ;MACRZ,SAAS,EAAC,mDAAmD;MAC7Da,aAAa,EAAG;IAAG,GAEjB,IAAAC,wBAAS,EAAErD,MAAM,CAACkD,OAAO,CAAC7B,QAAS,CAC5B,CACV,EACD,IAAAE,MAAA,CAAAC,aAAA,EAACpC,YAAA,CAAAqC,OAAW;MAAC6B,EAAE,EAAGvD;IAAQ,CAAE,CAC3B,CACF;IACDwD,MAAM,EACLvD,MAAM,EAAEwD,QAAQ,GACf,IAAAjC,MAAA,CAAAC,aAAA,EAAClC,qCAAA,CAAAmC,OAAoC;MAACzB,MAAM,EAAGA;IAAQ,CAAE,CAAC,GACvD;EACJ,CACD,CAAC,GACC,IAAI;AACT"}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = PageDetails;
8
- var _element = require("@wordpress/element");
8
+ var _react = require("react");
9
9
  var _i18n = require("@wordpress/i18n");
10
10
  var _components = require("@wordpress/components");
11
11
  var _wordcount = require("@wordpress/wordcount");
@@ -34,14 +34,14 @@ function getPageDetails(page) {
34
34
  }
35
35
  const details = [{
36
36
  label: (0, _i18n.__)('Status'),
37
- value: (0, _element.createElement)(_statusLabel.default, {
37
+ value: (0, _react.createElement)(_statusLabel.default, {
38
38
  status: page?.password ? 'protected' : page.status,
39
39
  date: page?.date,
40
40
  short: true
41
41
  })
42
42
  }, {
43
43
  label: (0, _i18n.__)('Slug'),
44
- value: (0, _element.createElement)(_components.__experimentalTruncate, {
44
+ value: (0, _react.createElement)(_components.__experimentalTruncate, {
45
45
  numberOfLines: 1
46
46
  }, (0, _url.safeDecodeURIComponent)(page.slug))
47
47
  }];
@@ -117,7 +117,7 @@ function PageDetails({
117
117
  isPostsPage: record?.id === siteSettings?.page_for_posts
118
118
  };
119
119
  }, [record?.parent, record?.id]);
120
- return (0, _element.createElement)(_sidebarNavigationScreenDetailsPanel.SidebarNavigationScreenDetailsPanel, {
120
+ return (0, _react.createElement)(_sidebarNavigationScreenDetailsPanel.SidebarNavigationScreenDetailsPanel, {
121
121
  spacing: 5,
122
122
  title: (0, _i18n.__)('Details')
123
123
  }, getPageDetails({
@@ -128,8 +128,8 @@ function PageDetails({
128
128
  }).map(({
129
129
  label,
130
130
  value
131
- }) => (0, _element.createElement)(_sidebarNavigationScreenDetailsPanel.SidebarNavigationScreenDetailsPanelRow, {
131
+ }) => (0, _react.createElement)(_sidebarNavigationScreenDetailsPanel.SidebarNavigationScreenDetailsPanelRow, {
132
132
  key: label
133
- }, (0, _element.createElement)(_sidebarNavigationScreenDetailsPanel.SidebarNavigationScreenDetailsPanelLabel, null, label), (0, _element.createElement)(_sidebarNavigationScreenDetailsPanel.SidebarNavigationScreenDetailsPanelValue, null, value))));
133
+ }, (0, _react.createElement)(_sidebarNavigationScreenDetailsPanel.SidebarNavigationScreenDetailsPanelLabel, null, label), (0, _react.createElement)(_sidebarNavigationScreenDetailsPanel.SidebarNavigationScreenDetailsPanelValue, null, value))));
134
134
  }
135
135
  //# sourceMappingURL=page-details.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_components","_wordcount","_data","_htmlEntities","_coreData","_url","_statusLabel","_interopRequireDefault","_lockUnlock","_store","_sidebarNavigationScreenDetailsPanel","_constants","AVERAGE_READING_RATE","getPageDetails","page","details","label","__","value","_element","createElement","default","status","password","date","short","__experimentalTruncate","numberOfLines","safeDecodeURIComponent","slug","templateTitle","push","decodeEntities","parentTitle","wordCountType","_x","wordsCounted","content","rendered","wordCount","readingTime","Math","round","isPostsPage","toLocaleString","sprintf","PageDetails","id","record","useEntityRecord","useSelect","select","getEditedPostContext","unlock","editSiteStore","postContext","templates","coreStore","getEntityRecords","TEMPLATE_POST_TYPE","per_page","templateSlug","postType","_templateTitle","find","template","title","_parentTitle","parent","getEntityRecord","_fields","siteSettings","page_for_posts","SidebarNavigationScreenDetailsPanel","spacing","map","SidebarNavigationScreenDetailsPanelRow","key","SidebarNavigationScreenDetailsPanelLabel","SidebarNavigationScreenDetailsPanelValue"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-page/page-details.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { __experimentalTruncate as Truncate } from '@wordpress/components';\nimport { count as wordCount } from '@wordpress/wordcount';\nimport { useSelect } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { store as coreStore, useEntityRecord } from '@wordpress/core-data';\nimport { safeDecodeURIComponent } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport StatusLabel from './status-label';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport {\n\tSidebarNavigationScreenDetailsPanel,\n\tSidebarNavigationScreenDetailsPanelRow,\n\tSidebarNavigationScreenDetailsPanelLabel,\n\tSidebarNavigationScreenDetailsPanelValue,\n} from '../sidebar-navigation-screen-details-panel';\nimport { TEMPLATE_POST_TYPE } from '../../utils/constants';\n\n// Taken from packages/editor/src/components/time-to-read/index.js.\nconst AVERAGE_READING_RATE = 189;\n\nfunction getPageDetails( page ) {\n\tif ( ! page ) {\n\t\treturn [];\n\t}\n\n\tconst details = [\n\t\t{\n\t\t\tlabel: __( 'Status' ),\n\t\t\tvalue: (\n\t\t\t\t<StatusLabel\n\t\t\t\t\tstatus={ page?.password ? 'protected' : page.status }\n\t\t\t\t\tdate={ page?.date }\n\t\t\t\t\tshort\n\t\t\t\t/>\n\t\t\t),\n\t\t},\n\t\t{\n\t\t\tlabel: __( 'Slug' ),\n\t\t\tvalue: (\n\t\t\t\t<Truncate numberOfLines={ 1 }>\n\t\t\t\t\t{ safeDecodeURIComponent( page.slug ) }\n\t\t\t\t</Truncate>\n\t\t\t),\n\t\t},\n\t];\n\n\tif ( page?.templateTitle ) {\n\t\tdetails.push( {\n\t\t\tlabel: __( 'Template' ),\n\t\t\tvalue: decodeEntities( page.templateTitle ),\n\t\t} );\n\t}\n\n\tif ( page?.parentTitle ) {\n\t\tdetails.push( {\n\t\t\tlabel: __( 'Parent' ),\n\t\t\tvalue: decodeEntities( page.parentTitle || __( '(no title)' ) ),\n\t\t} );\n\t}\n\n\t/*\n\t * translators: If your word count is based on single characters (e.g. East Asian characters),\n\t * enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.\n\t * Do not translate into your own language.\n\t */\n\tconst wordCountType = _x( 'words', 'Word count type. Do not translate!' );\n\tconst wordsCounted = page?.content?.rendered\n\t\t? wordCount( page.content.rendered, wordCountType )\n\t\t: 0;\n\tconst readingTime = Math.round( wordsCounted / AVERAGE_READING_RATE );\n\n\tif ( wordsCounted && ! page?.isPostsPage ) {\n\t\tdetails.push(\n\t\t\t{\n\t\t\t\tlabel: __( 'Words' ),\n\t\t\t\tvalue: wordsCounted.toLocaleString() || __( 'Unknown' ),\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: __( 'Time to read' ),\n\t\t\t\tvalue:\n\t\t\t\t\treadingTime > 1\n\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: is the number of minutes. */\n\t\t\t\t\t\t\t\t__( '%s mins' ),\n\t\t\t\t\t\t\t\treadingTime.toLocaleString()\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: __( '< 1 min' ),\n\t\t\t}\n\t\t);\n\t}\n\treturn details;\n}\n\nexport default function PageDetails( { id } ) {\n\tconst { record } = useEntityRecord( 'postType', 'page', id );\n\tconst { parentTitle, templateTitle, isPostsPage } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedPostContext } = unlock( select( editSiteStore ) );\n\t\t\tconst postContext = getEditedPostContext();\n\t\t\tconst templates = select( coreStore ).getEntityRecords(\n\t\t\t\t'postType',\n\t\t\t\tTEMPLATE_POST_TYPE,\n\t\t\t\t{ per_page: -1 }\n\t\t\t);\n\t\t\t// Template title.\n\t\t\tconst templateSlug =\n\t\t\t\t// Checks that the post type matches the current theme's post type, otherwise\n\t\t\t\t// the templateSlug returns 'home'.\n\t\t\t\tpostContext?.postType === 'page'\n\t\t\t\t\t? postContext?.templateSlug\n\t\t\t\t\t: null;\n\t\t\tconst _templateTitle =\n\t\t\t\ttemplates && templateSlug\n\t\t\t\t\t? templates.find(\n\t\t\t\t\t\t\t( template ) => template.slug === templateSlug\n\t\t\t\t\t )?.title?.rendered\n\t\t\t\t\t: null;\n\n\t\t\t// Parent page title.\n\t\t\tconst _parentTitle = record?.parent\n\t\t\t\t? select( coreStore ).getEntityRecord(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t'page',\n\t\t\t\t\t\trecord.parent,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t_fields: [ 'title' ],\n\t\t\t\t\t\t}\n\t\t\t\t )?.title?.rendered\n\t\t\t\t: null;\n\n\t\t\tconst { getEntityRecord } = select( coreStore );\n\t\t\tconst siteSettings = getEntityRecord( 'root', 'site' );\n\n\t\t\treturn {\n\t\t\t\tparentTitle: _parentTitle,\n\t\t\t\ttemplateTitle: _templateTitle,\n\t\t\t\tisPostsPage: record?.id === siteSettings?.page_for_posts,\n\t\t\t};\n\t\t},\n\t\t[ record?.parent, record?.id ]\n\t);\n\treturn (\n\t\t<SidebarNavigationScreenDetailsPanel\n\t\t\tspacing={ 5 }\n\t\t\ttitle={ __( 'Details' ) }\n\t\t>\n\t\t\t{ getPageDetails( {\n\t\t\t\tparentTitle,\n\t\t\t\ttemplateTitle,\n\t\t\t\tisPostsPage,\n\t\t\t\t...record,\n\t\t\t} ).map( ( { label, value } ) => (\n\t\t\t\t<SidebarNavigationScreenDetailsPanelRow key={ label }>\n\t\t\t\t\t<SidebarNavigationScreenDetailsPanelLabel>\n\t\t\t\t\t\t{ label }\n\t\t\t\t\t</SidebarNavigationScreenDetailsPanelLabel>\n\t\t\t\t\t<SidebarNavigationScreenDetailsPanelValue>\n\t\t\t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AC/C,MAAMc,YAAY,GAAGF,eAAe,CAAE,MAAM,EAAE,MAAO,CAAC;IAEtD,OAAO;MACNpC,WAAW,EAAEkC,YAAY;MACzBrC,aAAa,EAAEiC,cAAc;MAC7BpB,WAAW,EAAEK,MAAM,EAAED,EAAE,KAAKwB,YAAY,EAAEC;IAC3C,CAAC;EACF,CAAC,EACD,CAAExB,MAAM,EAAEoB,MAAM,EAAEpB,MAAM,EAAED,EAAE,CAC7B,CAAC;EACD,OACC,IAAA5B,QAAA,CAAAC,aAAA,EAACV,oCAAA,CAAA+D,mCAAmC;IACnCC,OAAO,EAAG,CAAG;IACbR,KAAK,EAAG,IAAAjD,QAAE,EAAE,SAAU;EAAG,GAEvBJ,cAAc,CAAE;IACjBoB,WAAW;IACXH,aAAa;IACba,WAAW;IACX,GAAGK;EACJ,CAAE,CAAC,CAAC2B,GAAG,CAAE,CAAE;IAAE3D,KAAK;IAAEE;EAAM,CAAC,KAC1B,IAAAC,QAAA,CAAAC,aAAA,EAACV,oCAAA,CAAAkE,sCAAsC;IAACC,GAAG,EAAG7D;EAAO,GACpD,IAAAG,QAAA,CAAAC,aAAA,EAACV,oCAAA,CAAAoE,wCAAwC,QACtC9D,KACuC,CAAC,EAC3C,IAAAG,QAAA,CAAAC,aAAA,EAACV,oCAAA,CAAAqE,wCAAwC,QACtC7D,KACuC,CACH,CACvC,CACkC,CAAC;AAExC"}
1
+ {"version":3,"names":["_i18n","require","_components","_wordcount","_data","_htmlEntities","_coreData","_url","_statusLabel","_interopRequireDefault","_lockUnlock","_store","_sidebarNavigationScreenDetailsPanel","_constants","AVERAGE_READING_RATE","getPageDetails","page","details","label","__","value","_react","createElement","default","status","password","date","short","__experimentalTruncate","numberOfLines","safeDecodeURIComponent","slug","templateTitle","push","decodeEntities","parentTitle","wordCountType","_x","wordsCounted","content","rendered","wordCount","readingTime","Math","round","isPostsPage","toLocaleString","sprintf","PageDetails","id","record","useEntityRecord","useSelect","select","getEditedPostContext","unlock","editSiteStore","postContext","templates","coreStore","getEntityRecords","TEMPLATE_POST_TYPE","per_page","templateSlug","postType","_templateTitle","find","template","title","_parentTitle","parent","getEntityRecord","_fields","siteSettings","page_for_posts","SidebarNavigationScreenDetailsPanel","spacing","map","SidebarNavigationScreenDetailsPanelRow","key","SidebarNavigationScreenDetailsPanelLabel","SidebarNavigationScreenDetailsPanelValue"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-page/page-details.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { __experimentalTruncate as Truncate } from '@wordpress/components';\nimport { count as wordCount } from '@wordpress/wordcount';\nimport { useSelect } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { store as coreStore, useEntityRecord } from '@wordpress/core-data';\nimport { safeDecodeURIComponent } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport StatusLabel from './status-label';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport {\n\tSidebarNavigationScreenDetailsPanel,\n\tSidebarNavigationScreenDetailsPanelRow,\n\tSidebarNavigationScreenDetailsPanelLabel,\n\tSidebarNavigationScreenDetailsPanelValue,\n} from '../sidebar-navigation-screen-details-panel';\nimport { TEMPLATE_POST_TYPE } from '../../utils/constants';\n\n// Taken from packages/editor/src/components/time-to-read/index.js.\nconst AVERAGE_READING_RATE = 189;\n\nfunction getPageDetails( page ) {\n\tif ( ! page ) {\n\t\treturn [];\n\t}\n\n\tconst details = [\n\t\t{\n\t\t\tlabel: __( 'Status' ),\n\t\t\tvalue: (\n\t\t\t\t<StatusLabel\n\t\t\t\t\tstatus={ page?.password ? 'protected' : page.status }\n\t\t\t\t\tdate={ page?.date }\n\t\t\t\t\tshort\n\t\t\t\t/>\n\t\t\t),\n\t\t},\n\t\t{\n\t\t\tlabel: __( 'Slug' ),\n\t\t\tvalue: (\n\t\t\t\t<Truncate numberOfLines={ 1 }>\n\t\t\t\t\t{ safeDecodeURIComponent( page.slug ) }\n\t\t\t\t</Truncate>\n\t\t\t),\n\t\t},\n\t];\n\n\tif ( page?.templateTitle ) {\n\t\tdetails.push( {\n\t\t\tlabel: __( 'Template' ),\n\t\t\tvalue: decodeEntities( page.templateTitle ),\n\t\t} );\n\t}\n\n\tif ( page?.parentTitle ) {\n\t\tdetails.push( {\n\t\t\tlabel: __( 'Parent' ),\n\t\t\tvalue: decodeEntities( page.parentTitle || __( '(no title)' ) ),\n\t\t} );\n\t}\n\n\t/*\n\t * translators: If your word count is based on single characters (e.g. East Asian characters),\n\t * enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.\n\t * Do not translate into your own language.\n\t */\n\tconst wordCountType = _x( 'words', 'Word count type. Do not translate!' );\n\tconst wordsCounted = page?.content?.rendered\n\t\t? wordCount( page.content.rendered, wordCountType )\n\t\t: 0;\n\tconst readingTime = Math.round( wordsCounted / AVERAGE_READING_RATE );\n\n\tif ( wordsCounted && ! page?.isPostsPage ) {\n\t\tdetails.push(\n\t\t\t{\n\t\t\t\tlabel: __( 'Words' ),\n\t\t\t\tvalue: wordsCounted.toLocaleString() || __( 'Unknown' ),\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: __( 'Time to read' ),\n\t\t\t\tvalue:\n\t\t\t\t\treadingTime > 1\n\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: is the number of minutes. */\n\t\t\t\t\t\t\t\t__( '%s mins' ),\n\t\t\t\t\t\t\t\treadingTime.toLocaleString()\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: __( '< 1 min' ),\n\t\t\t}\n\t\t);\n\t}\n\treturn details;\n}\n\nexport default function PageDetails( { id } ) {\n\tconst { record } = useEntityRecord( 'postType', 'page', id );\n\tconst { parentTitle, templateTitle, isPostsPage } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedPostContext } = unlock( select( editSiteStore ) );\n\t\t\tconst postContext = getEditedPostContext();\n\t\t\tconst templates = select( coreStore ).getEntityRecords(\n\t\t\t\t'postType',\n\t\t\t\tTEMPLATE_POST_TYPE,\n\t\t\t\t{ per_page: -1 }\n\t\t\t);\n\t\t\t// Template title.\n\t\t\tconst templateSlug =\n\t\t\t\t// Checks that the post type matches the current theme's post type, otherwise\n\t\t\t\t// the templateSlug returns 'home'.\n\t\t\t\tpostContext?.postType === 'page'\n\t\t\t\t\t? postContext?.templateSlug\n\t\t\t\t\t: null;\n\t\t\tconst _templateTitle =\n\t\t\t\ttemplates && templateSlug\n\t\t\t\t\t? templates.find(\n\t\t\t\t\t\t\t( template ) => template.slug === templateSlug\n\t\t\t\t\t )?.title?.rendered\n\t\t\t\t\t: null;\n\n\t\t\t// Parent page title.\n\t\t\tconst _parentTitle = record?.parent\n\t\t\t\t? select( coreStore ).getEntityRecord(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t'page',\n\t\t\t\t\t\trecord.parent,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t_fields: [ 'title' ],\n\t\t\t\t\t\t}\n\t\t\t\t )?.title?.rendered\n\t\t\t\t: null;\n\n\t\t\tconst { getEntityRecord } = select( coreStore );\n\t\t\tconst siteSettings = getEntityRecord( 'root', 'site' );\n\n\t\t\treturn {\n\t\t\t\tparentTitle: _parentTitle,\n\t\t\t\ttemplateTitle: _templateTitle,\n\t\t\t\tisPostsPage: record?.id === siteSettings?.page_for_posts,\n\t\t\t};\n\t\t},\n\t\t[ record?.parent, record?.id ]\n\t);\n\treturn (\n\t\t<SidebarNavigationScreenDetailsPanel\n\t\t\tspacing={ 5 }\n\t\t\ttitle={ __( 'Details' ) }\n\t\t>\n\t\t\t{ getPageDetails( {\n\t\t\t\tparentTitle,\n\t\t\t\ttemplateTitle,\n\t\t\t\tisPostsPage,\n\t\t\t\t...record,\n\t\t\t} ).map( ( { label, value } ) => (\n\t\t\t\t<SidebarNavigationScreenDetailsPanelRow key={ label }>\n\t\t\t\t\t<SidebarNavigationScreenDetailsPanelLabel>\n\t\t\t\t\t\t{ label }\n\t\t\t\t\t</SidebarNavigationScreenDetailsPanelLabel>\n\t\t\t\t\t<SidebarNavigationScreenDetailsPanelValue>\n\t\t\t\t\t\t{ value }\n\t\t\t\t\t</SidebarNavigationScreenDetailsPanelValue>\n\t\t\t\t</SidebarNavigationScreenDetailsPanelRow>\n\t\t\t) ) }\n\t\t</SidebarNavigationScreenDetailsPanel>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,IAAA,GAAAN,OAAA;AAKA,IAAAO,YAAA,GAAAC,sBAAA,CAAAR,OAAA;AACA,IAAAS,WAAA,GAAAT,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AACA,IAAAW,oCAAA,GAAAX,OAAA;AAMA,IAAAY,UAAA,GAAAZ,OAAA;AAvBA;AACA;AACA;;AASA;AACA;AACA;;AAYA;AACA,MAAMa,oBAAoB,GAAG,GAAG;AAEhC,SAASC,cAAcA,CAAEC,IAAI,EAAG;EAC/B,IAAK,CAAEA,IAAI,EAAG;IACb,OAAO,EAAE;EACV;EAEA,MAAMC,OAAO,GAAG,CACf;IACCC,KAAK,EAAE,IAAAC,QAAE,EAAE,QAAS,CAAC;IACrBC,KAAK,EACJ,IAAAC,MAAA,CAAAC,aAAA,EAACd,YAAA,CAAAe,OAAW;MACXC,MAAM,EAAGR,IAAI,EAAES,QAAQ,GAAG,WAAW,GAAGT,IAAI,CAACQ,MAAQ;MACrDE,IAAI,EAAGV,IAAI,EAAEU,IAAM;MACnBC,KAAK;IAAA,CACL;EAEH,CAAC,EACD;IACCT,KAAK,EAAE,IAAAC,QAAE,EAAE,MAAO,CAAC;IACnBC,KAAK,EACJ,IAAAC,MAA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C,EAAEJ,KAAK,EAAE5B,QAAQ,GAClB,IAAI;IAEP,MAAM;MAAE+B;IAAgB,CAAC,GAAGlB,MAAM,CAAEM,eAAU,CAAC;IAC/C,MAAMc,YAAY,GAAGF,eAAe,CAAE,MAAM,EAAE,MAAO,CAAC;IAEtD,OAAO;MACNpC,WAAW,EAAEkC,YAAY;MACzBrC,aAAa,EAAEiC,cAAc;MAC7BpB,WAAW,EAAEK,MAAM,EAAED,EAAE,KAAKwB,YAAY,EAAEC;IAC3C,CAAC;EACF,CAAC,EACD,CAAExB,MAAM,EAAEoB,MAAM,EAAEpB,MAAM,EAAED,EAAE,CAC7B,CAAC;EACD,OACC,IAAA5B,MAAA,CAAAC,aAAA,EAACV,oCAAA,CAAA+D,mCAAmC;IACnCC,OAAO,EAAG,CAAG;IACbR,KAAK,EAAG,IAAAjD,QAAE,EAAE,SAAU;EAAG,GAEvBJ,cAAc,CAAE;IACjBoB,WAAW;IACXH,aAAa;IACba,WAAW;IACX,GAAGK;EACJ,CAAE,CAAC,CAAC2B,GAAG,CAAE,CAAE;IAAE3D,KAAK;IAAEE;EAAM,CAAC,KAC1B,IAAAC,MAAA,CAAAC,aAAA,EAACV,oCAAA,CAAAkE,sCAAsC;IAACC,GAAG,EAAG7D;EAAO,GACpD,IAAAG,MAAA,CAAAC,aAAA,EAACV,oCAAA,CAAAoE,wCAAwC,QACtC9D,KACuC,CAAC,EAC3C,IAAAG,MAAA,CAAAC,aAAA,EAACV,oCAAA,CAAAqE,wCAAwC,QACtC7D,KACuC,CACH,CACvC,CACkC,CAAC;AAExC"}
@@ -5,10 +5,11 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = StatusLabel;
8
- var _element = require("@wordpress/element");
8
+ var _react = require("react");
9
9
  var _classnames = _interopRequireDefault(require("classnames"));
10
10
  var _i18n = require("@wordpress/i18n");
11
11
  var _date = require("@wordpress/date");
12
+ var _element = require("@wordpress/element");
12
13
  /**
13
14
  * External dependencies
14
15
  */
@@ -28,7 +29,7 @@ function StatusLabel({
28
29
  case 'publish':
29
30
  statusLabel = date ? (0, _element.createInterpolateElement)((0, _i18n.sprintf)( /* translators: %s: is the relative time when the post was published. */
30
31
  (0, _i18n.__)('Published <time>%s</time>'), relateToNow), {
31
- time: (0, _element.createElement)("time", {
32
+ time: (0, _react.createElement)("time", {
32
33
  dateTime: date
33
34
  })
34
35
  }) : (0, _i18n.__)('Published');
@@ -37,7 +38,7 @@ function StatusLabel({
37
38
  const formattedDate = (0, _date.dateI18n)(short ? 'M j' : 'F j', (0, _date.getDate)(date));
38
39
  statusLabel = date ? (0, _element.createInterpolateElement)((0, _i18n.sprintf)( /* translators: %s: is the formatted date and time on which the post is scheduled to be published. */
39
40
  (0, _i18n.__)('Scheduled: <time>%s</time>'), formattedDate), {
40
- time: (0, _element.createElement)("time", {
41
+ time: (0, _react.createElement)("time", {
41
42
  dateTime: date
42
43
  })
43
44
  }) : (0, _i18n.__)('Scheduled');
@@ -55,7 +56,7 @@ function StatusLabel({
55
56
  statusLabel = (0, _i18n.__)('Password protected');
56
57
  break;
57
58
  }
58
- return (0, _element.createElement)("div", {
59
+ return (0, _react.createElement)("div", {
59
60
  className: (0, _classnames.default)('edit-site-sidebar-navigation-screen-page__status', {
60
61
  [`has-status has-${status}-status`]: !!status
61
62
  })
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_classnames","_interopRequireDefault","_i18n","_date","StatusLabel","status","date","short","relateToNow","humanTimeDiff","statusLabel","createInterpolateElement","sprintf","__","time","createElement","dateTime","formattedDate","dateI18n","getDate","className","classnames"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-page/status-label.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { dateI18n, getDate, humanTimeDiff } from '@wordpress/date';\nimport { createInterpolateElement } from '@wordpress/element';\n\nexport default function StatusLabel( { status, date, short } ) {\n\tconst relateToNow = humanTimeDiff( date );\n\tlet statusLabel = status;\n\tswitch ( status ) {\n\t\tcase 'publish':\n\t\t\tstatusLabel = date\n\t\t\t\t? createInterpolateElement(\n\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t/* translators: %s: is the relative time when the post was published. */\n\t\t\t\t\t\t\t__( 'Published <time>%s</time>' ),\n\t\t\t\t\t\t\trelateToNow\n\t\t\t\t\t\t),\n\t\t\t\t\t\t{ time: <time dateTime={ date } /> }\n\t\t\t\t )\n\t\t\t\t: __( 'Published' );\n\t\t\tbreak;\n\t\tcase 'future':\n\t\t\tconst formattedDate = dateI18n(\n\t\t\t\tshort ? 'M j' : 'F j',\n\t\t\t\tgetDate( date )\n\t\t\t);\n\t\t\tstatusLabel = date\n\t\t\t\t? createInterpolateElement(\n\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t/* translators: %s: is the formatted date and time on which the post is scheduled to be published. */\n\t\t\t\t\t\t\t__( 'Scheduled: <time>%s</time>' ),\n\t\t\t\t\t\t\tformattedDate\n\t\t\t\t\t\t),\n\t\t\t\t\t\t{ time: <time dateTime={ date } /> }\n\t\t\t\t )\n\t\t\t\t: __( 'Scheduled' );\n\t\t\tbreak;\n\t\tcase 'draft':\n\t\t\tstatusLabel = __( 'Draft' );\n\t\t\tbreak;\n\t\tcase 'pending':\n\t\t\tstatusLabel = __( 'Pending' );\n\t\t\tbreak;\n\t\tcase 'private':\n\t\t\tstatusLabel = __( 'Private' );\n\t\t\tbreak;\n\t\tcase 'protected':\n\t\t\tstatusLabel = __( 'Password protected' );\n\t\t\tbreak;\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ classnames(\n\t\t\t\t'edit-site-sidebar-navigation-screen-page__status',\n\t\t\t\t{\n\t\t\t\t\t[ `has-status has-${ status }-status` ]: !! status,\n\t\t\t\t}\n\t\t\t) }\n\t\t>\n\t\t\t{ statusLabel }\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;A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MACbH,WAAW,GAAG,IAAAG,QAAE,EAAE,SAAU,CAAC;MAC7B;IACD,KAAK,WAAW;MACfH,WAAW,GAAG,IAAAG,QAAE,EAAE,oBAAqB,CAAC;MACxC;EACF;EAEA,OACC,IAAAf,QAAA,CAAAiB,aAAA;IACCK,SAAS,EAAG,IAAAC,mBAAU,EACrB,kDAAkD,EAClD;MACC,CAAG,kBAAkBhB,MAAQ,SAAQ,GAAI,CAAC,CAAEA;IAC7C,CACD;EAAG,GAEDK,WACE,CAAC;AAER"}
1
+ {"version":3,"names":["_classnames","_interopRequireDefault","require","_i18n","_date","_element","StatusLabel","status","date","short","relateToNow","humanTimeDiff","statusLabel","createInterpolateElement","sprintf","__","time","_react","createElement","dateTime","formattedDate","dateI18n","getDate","className","classnames"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-page/status-label.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { dateI18n, getDate, humanTimeDiff } from '@wordpress/date';\nimport { createInterpolateElement } from '@wordpress/element';\n\nexport default function StatusLabel( { status, date, short } ) {\n\tconst relateToNow = humanTimeDiff( date );\n\tlet statusLabel = status;\n\tswitch ( status ) {\n\t\tcase 'publish':\n\t\t\tstatusLabel = date\n\t\t\t\t? createInterpolateElement(\n\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t/* translators: %s: is the relative time when the post was published. */\n\t\t\t\t\t\t\t__( 'Published <time>%s</time>' ),\n\t\t\t\t\t\t\trelateToNow\n\t\t\t\t\t\t),\n\t\t\t\t\t\t{ time: <time dateTime={ date } /> }\n\t\t\t\t )\n\t\t\t\t: __( 'Published' );\n\t\t\tbreak;\n\t\tcase 'future':\n\t\t\tconst formattedDate = dateI18n(\n\t\t\t\tshort ? 'M j' : 'F j',\n\t\t\t\tgetDate( date )\n\t\t\t);\n\t\t\tstatusLabel = date\n\t\t\t\t? createInterpolateElement(\n\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t/* translators: %s: is the formatted date and time on which the post is scheduled to be published. */\n\t\t\t\t\t\t\t__( 'Scheduled: <time>%s</time>' ),\n\t\t\t\t\t\t\tformattedDate\n\t\t\t\t\t\t),\n\t\t\t\t\t\t{ time: <time dateTime={ date } /> }\n\t\t\t\t )\n\t\t\t\t: __( 'Scheduled' );\n\t\t\tbreak;\n\t\tcase 'draft':\n\t\t\tstatusLabel = __( 'Draft' );\n\t\t\tbreak;\n\t\tcase 'pending':\n\t\t\tstatusLabel = __( 'Pending' );\n\t\t\tbreak;\n\t\tcase 'private':\n\t\t\tstatusLabel = __( 'Private' );\n\t\t\tbreak;\n\t\tcase 'protected':\n\t\t\tstatusLabel = __( 'Password protected' );\n\t\t\tbreak;\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ classnames(\n\t\t\t\t'edit-site-sidebar-navigation-screen-page__status',\n\t\t\t\t{\n\t\t\t\t\t[ `has-status has-${ status }-status` ]: !! status,\n\t\t\t\t}\n\t\t\t) }\n\t\t>\n\t\t\t{ statusLabel }\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAVA;AACA;AACA;;AAGA;AACA;AACA;;AAKe,SAASI,WAAWA,CAAE;EAAEC,MAAM;EAAEC,IAAI;EAAEC;AAAM,CAAC,EAAG;EAC9D,MAAMC,WAAW,GAAG,IAAAC,mBAAa,EAAEH,IAAK,CAAC;EACzC,IAAII,WAAW,GAAGL,MAAM;EACxB,QAASA,MAAM;IACd,KAAK,SAAS;MACbK,WAAW,GAAGJ,IAAI,GACf,IAAAK,iCAAwB,EACxB,IAAAC,aAAO,GACN;MACA,IAAAC,QAAE,EAAE,2BAA4B,CAAC,EACjCL,WACD,CAAC,EACD;QAAEM,IAAI,EAAE,IAAAC,MAAA,CAAAC,aAAA;UAAMC,QAAQ,EAAGX;QAAM,CAAE;MAAE,CACnC,CAAC,GACD,IAAAO,QAAE,EAAE,WAAY,CAAC;MACpB;IACD,KAAK,QAAQ;MACZ,MAAMK,aAAa,GAAG,IAAAC,cAAQ,EAC7BZ,KAAK,GAAG,KAAK,GAAG,KAAK,EACrB,IAAAa,aAAO,EAAEd,IAAK,CACf,CAAC;MACDI,WAAW,GAAGJ,IAAI,GACf,IAAAK,iCAAwB,EACxB,IAAAC,aAAO,GACN;MACA,IAAAC,QAAE,EAAE,4BAA6B,CAAC,EAClCK,aACD,CAAC,EACD;QAAEJ,IAAI,EAAE,IAAAC,MAAA,CAAAC,aAAA;UAAMC,QAAQ,EAAGX;QAAM,CAAE;MAAE,CACnC,CAAC,GACD,IAAAO,QAAE,EAAE,WAAY,CAAC;MACpB;IACD,KAAK,OAAO;MACXH,WAAW,GAAG,IAAAG,QAAE,EAAE,OAAQ,CAAC;MAC3B;IACD,KAAK,SAAS;MACbH,WAAW,GAAG,IAAAG,QAAE,EAAE,SAAU,CAAC;MAC7B;IACD,KAAK,SAAS;MACbH,WAAW,GAAG,IAAAG,QAAE,EAAE,SAAU,CAAC;MAC7B;IACD,KAAK,WAAW;MACfH,WAAW,GAAG,IAAAG,QAAE,EAAE,oBAAqB,CAAC;MACxC;EACF;EAEA,OACC,IAAAE,MAAA,CAAAC,aAAA;IACCK,SAAS,EAAG,IAAAC,mBAAU,EACrB,kDAAkD,EAClD;MACC,CAAG,kBAAkBjB,MAAQ,SAAQ,GAAI,CAAC,CAAEA;IAC7C,CACD;EAAG,GAEDK,WACE,CAAC;AAER"}
@@ -5,8 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = SidebarNavigationScreenPages;
8
- var _element = require("@wordpress/element");
8
+ var _react = require("react");
9
9
  var _components = require("@wordpress/components");
10
+ var _element = require("@wordpress/element");
10
11
  var _i18n = require("@wordpress/i18n");
11
12
  var _coreData = require("@wordpress/core-data");
12
13
  var _htmlEntities = require("@wordpress/html-entities");
@@ -42,7 +43,7 @@ const PageItem = ({
42
43
  }, {
43
44
  backPath: '/page'
44
45
  });
45
- return (0, _element.createElement)(_sidebarNavigationItem.default, {
46
+ return (0, _react.createElement)(_sidebarNavigationItem.default, {
46
47
  ...linkInfo,
47
48
  ...props
48
49
  });
@@ -121,51 +122,59 @@ function SidebarNavigationScreenPages() {
121
122
  postId: postsPageTemplateId || id
122
123
  };
123
124
  };
124
- return (0, _element.createElement)(_element.Fragment, null, showAddPage && (0, _element.createElement)(_addNewPage.default, {
125
+ const pagesLink = (0, _link.useLink)({
126
+ path: '/pages'
127
+ });
128
+ const manageAllPagesProps = window?.__experimentalAdminViews ? {
129
+ ...pagesLink
130
+ } : {
131
+ href: 'edit.php?post_type=page',
132
+ onClick: () => {
133
+ document.location = 'edit.php?post_type=page';
134
+ }
135
+ };
136
+ return (0, _react.createElement)(_react.Fragment, null, showAddPage && (0, _react.createElement)(_addNewPage.default, {
125
137
  onSave: handleNewPage,
126
138
  onClose: () => setShowAddPage(false)
127
- }), (0, _element.createElement)(_sidebarNavigationScreen.default, {
139
+ }), (0, _react.createElement)(_sidebarNavigationScreen.default, {
128
140
  title: (0, _i18n.__)('Pages'),
129
141
  description: (0, _i18n.__)('Browse and edit pages on your site.'),
130
- actions: (0, _element.createElement)(_sidebarButton.default, {
142
+ actions: (0, _react.createElement)(_sidebarButton.default, {
131
143
  icon: _icons.plus,
132
144
  label: (0, _i18n.__)('Draft a new page'),
133
145
  onClick: () => setShowAddPage(true)
134
146
  }),
135
- content: (0, _element.createElement)(_element.Fragment, null, (isLoadingPages || isLoadingTemplates) && (0, _element.createElement)(_components.__experimentalItemGroup, null, (0, _element.createElement)(_components.__experimentalItem, null, (0, _i18n.__)('Loading pages…'))), !(isLoadingPages || isLoadingTemplates) && (0, _element.createElement)(_components.__experimentalItemGroup, null, !pagesAndTemplates?.length && (0, _element.createElement)(_components.__experimentalItem, null, (0, _i18n.__)('No page found')), isHomePageBlog && homeTemplate && (0, _element.createElement)(PageItem, {
147
+ content: (0, _react.createElement)(_react.Fragment, null, (isLoadingPages || isLoadingTemplates) && (0, _react.createElement)(_components.__experimentalItemGroup, null, (0, _react.createElement)(_components.__experimentalItem, null, (0, _i18n.__)('Loading pages…'))), !(isLoadingPages || isLoadingTemplates) && (0, _react.createElement)(_components.__experimentalItemGroup, null, !pagesAndTemplates?.length && (0, _react.createElement)(_components.__experimentalItem, null, (0, _i18n.__)('No page found')), isHomePageBlog && homeTemplate && (0, _react.createElement)(PageItem, {
136
148
  postType: _constants.TEMPLATE_POST_TYPE,
137
149
  postId: homeTemplate.id,
138
150
  key: homeTemplate.id,
139
151
  icon: _icons.home,
140
152
  withChevron: true
141
- }, (0, _element.createElement)(_components.__experimentalTruncate, {
153
+ }, (0, _react.createElement)(_components.__experimentalTruncate, {
142
154
  numberOfLines: 1
143
155
  }, (0, _htmlEntities.decodeEntities)(homeTemplate.title?.rendered || (0, _i18n.__)('(no title)')))), reorderedPages?.map(({
144
156
  id,
145
157
  title
146
- }) => (0, _element.createElement)(PageItem, {
158
+ }) => (0, _react.createElement)(PageItem, {
147
159
  ...getPageProps(id),
148
160
  key: id,
149
161
  withChevron: true
150
- }, (0, _element.createElement)(_components.__experimentalTruncate, {
162
+ }, (0, _react.createElement)(_components.__experimentalTruncate, {
151
163
  numberOfLines: 1
152
164
  }, (0, _htmlEntities.decodeEntities)(title?.rendered || (0, _i18n.__)('(no title)'))))))),
153
- footer: (0, _element.createElement)(_components.__experimentalVStack, {
165
+ footer: (0, _react.createElement)(_components.__experimentalVStack, {
154
166
  spacing: 0
155
- }, dynamicPageTemplates?.map(item => (0, _element.createElement)(PageItem, {
167
+ }, dynamicPageTemplates?.map(item => (0, _react.createElement)(PageItem, {
156
168
  postType: _constants.TEMPLATE_POST_TYPE,
157
169
  postId: item.id,
158
170
  key: item.id,
159
171
  icon: _icons.layout,
160
172
  withChevron: true
161
- }, (0, _element.createElement)(_components.__experimentalTruncate, {
173
+ }, (0, _react.createElement)(_components.__experimentalTruncate, {
162
174
  numberOfLines: 1
163
- }, (0, _htmlEntities.decodeEntities)(item.title?.rendered || (0, _i18n.__)('(no title)'))))), (0, _element.createElement)(_sidebarNavigationItem.default, {
175
+ }, (0, _htmlEntities.decodeEntities)(item.title?.rendered || (0, _i18n.__)('(no title)'))))), (0, _react.createElement)(_sidebarNavigationItem.default, {
164
176
  className: "edit-site-sidebar-navigation-screen-pages__see-all",
165
- href: "edit.php?post_type=page",
166
- onClick: () => {
167
- document.location = 'edit.php?post_type=page';
168
- }
177
+ ...manageAllPagesProps
169
178
  }, (0, _i18n.__)('Manage all pages')))
170
179
  }));
171
180
  }