@wordpress/edit-site 5.32.0 → 5.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (872) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/components/add-new-page/index.js +3 -0
  3. package/build/components/add-new-page/index.js.map +1 -1
  4. package/build/components/add-new-pattern/index.js +8 -7
  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 +3 -0
  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 +3 -1
  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 +282 -13
  11. package/build/components/add-new-template/index.js.map +1 -1
  12. package/build/components/add-new-template/utils.js +22 -11
  13. package/build/components/add-new-template/utils.js.map +1 -1
  14. package/build/components/app/index.js.map +1 -1
  15. package/build/components/async/index.js +51 -0
  16. package/build/components/async/index.js.map +1 -0
  17. package/build/components/block-editor/block-inspector-button.js +10 -9
  18. package/build/components/block-editor/block-inspector-button.js.map +1 -1
  19. package/build/components/block-editor/editor-canvas.js +15 -6
  20. package/build/components/block-editor/editor-canvas.js.map +1 -1
  21. package/build/components/block-editor/inserter-media-categories.js.map +1 -1
  22. package/build/components/block-editor/resizable-editor.js.map +1 -1
  23. package/build/components/block-editor/resize-handle.js +20 -5
  24. package/build/components/block-editor/resize-handle.js.map +1 -1
  25. package/build/components/block-editor/site-editor-canvas.js +5 -1
  26. package/build/components/block-editor/site-editor-canvas.js.map +1 -1
  27. package/build/components/block-editor/use-navigate-to-entity-record.js.map +1 -1
  28. package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
  29. package/build/components/canvas-loader/index.js.map +1 -1
  30. package/build/components/code-editor/index.js.map +1 -1
  31. package/build/components/create-template-part-modal/index.js +3 -0
  32. package/build/components/create-template-part-modal/index.js.map +1 -1
  33. package/build/components/editor/index.js +61 -11
  34. package/build/components/editor/index.js.map +1 -1
  35. package/build/components/editor-canvas-container/index.js.map +1 -1
  36. package/build/components/error-boundary/index.js.map +1 -1
  37. package/build/components/error-boundary/warning.js.map +1 -1
  38. package/build/components/global-styles/background-panel.js +13 -1
  39. package/build/components/global-styles/background-panel.js.map +1 -1
  40. package/build/components/global-styles/block-preview-panel.js +6 -1
  41. package/build/components/global-styles/block-preview-panel.js.map +1 -1
  42. package/build/components/global-styles/color-indicator-wrapper.js.map +1 -1
  43. package/build/components/global-styles/color-palette-panel.js.map +1 -1
  44. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  45. package/build/components/global-styles/font-families.js +1 -1
  46. package/build/components/global-styles/font-families.js.map +1 -1
  47. package/build/components/global-styles/font-family-item.js.map +1 -1
  48. package/build/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
  49. package/build/components/global-styles/font-library-modal/context.js +69 -35
  50. package/build/components/global-styles/font-library-modal/context.js.map +1 -1
  51. package/build/components/global-styles/font-library-modal/font-card.js.map +1 -1
  52. package/build/components/global-styles/font-library-modal/font-collection.js +18 -6
  53. package/build/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  54. package/build/components/global-styles/font-library-modal/font-demo.js.map +1 -1
  55. package/build/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +1 -1
  56. package/build/components/global-styles/font-library-modal/index.js +1 -1
  57. package/build/components/global-styles/font-library-modal/index.js.map +1 -1
  58. package/build/components/global-styles/font-library-modal/installed-fonts.js +31 -28
  59. package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  60. package/build/components/global-styles/font-library-modal/library-font-details.js.map +1 -1
  61. package/build/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
  62. package/build/components/global-styles/font-library-modal/resolvers.js.map +1 -1
  63. package/build/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  64. package/build/components/global-styles/font-library-modal/utils/constants.js.map +1 -1
  65. package/build/components/global-styles/font-library-modal/utils/filter-fonts.js.map +1 -1
  66. package/build/components/global-styles/font-library-modal/utils/fonts-outline.js.map +1 -1
  67. package/build/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  68. package/build/components/global-styles/font-library-modal/utils/make-families-from-faces.js.map +1 -1
  69. package/build/components/global-styles/font-library-modal/utils/preview-styles.js.map +1 -1
  70. package/build/components/global-styles/font-library-modal/utils/sort-font-faces.js +6 -2
  71. package/build/components/global-styles/font-library-modal/utils/sort-font-faces.js.map +1 -1
  72. package/build/components/global-styles/font-library-modal/utils/toggleFont.js.map +1 -1
  73. package/build/components/global-styles/global-styles-provider.js.map +1 -1
  74. package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
  75. package/build/components/global-styles/header.js.map +1 -1
  76. package/build/components/global-styles/highlighted-colors.js +1 -1
  77. package/build/components/global-styles/highlighted-colors.js.map +1 -1
  78. package/build/components/global-styles/hooks.js +11 -3
  79. package/build/components/global-styles/hooks.js.map +1 -1
  80. package/build/components/global-styles/icon-with-current-color.js.map +1 -1
  81. package/build/components/global-styles/index.js.map +1 -1
  82. package/build/components/global-styles/navigation-button.js.map +1 -1
  83. package/build/components/global-styles/palette.js.map +1 -1
  84. package/build/components/global-styles/preview-colors.js.map +1 -1
  85. package/build/components/global-styles/preview-iframe.js.map +1 -1
  86. package/build/components/global-styles/preview-styles.js.map +1 -1
  87. package/build/components/global-styles/root-menu.js +2 -2
  88. package/build/components/global-styles/root-menu.js.map +1 -1
  89. package/build/components/global-styles/screen-background.js +1 -1
  90. package/build/components/global-styles/screen-background.js.map +1 -1
  91. package/build/components/global-styles/screen-block-list.js.map +1 -1
  92. package/build/components/global-styles/screen-block.js.map +1 -1
  93. package/build/components/global-styles/screen-color-palette.js.map +1 -1
  94. package/build/components/global-styles/screen-colors.js.map +1 -1
  95. package/build/components/global-styles/screen-css.js.map +1 -1
  96. package/build/components/global-styles/screen-layout.js.map +1 -1
  97. package/build/components/global-styles/screen-revisions/index.js +1 -1
  98. package/build/components/global-styles/screen-revisions/index.js.map +1 -1
  99. package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  100. package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  101. package/build/components/global-styles/screen-root.js.map +1 -1
  102. package/build/components/global-styles/screen-style-variations.js.map +1 -1
  103. package/build/components/global-styles/screen-typography-element.js.map +1 -1
  104. package/build/components/global-styles/screen-typography.js.map +1 -1
  105. package/build/components/global-styles/style-variations-container.js +8 -2
  106. package/build/components/global-styles/style-variations-container.js.map +1 -1
  107. package/build/components/global-styles/subtitle.js.map +1 -1
  108. package/build/components/global-styles/typography-elements.js.map +1 -1
  109. package/build/components/global-styles/typography-example.js.map +1 -1
  110. package/build/components/global-styles/typography-panel.js.map +1 -1
  111. package/build/components/global-styles/typography-preview.js.map +1 -1
  112. package/build/components/global-styles/ui.js +1 -1
  113. package/build/components/global-styles/ui.js.map +1 -1
  114. package/build/components/global-styles/utils.js.map +1 -1
  115. package/build/components/global-styles/variations/variation.js.map +1 -1
  116. package/build/components/global-styles/variations/variations-color.js.map +1 -1
  117. package/build/components/global-styles/variations/variations-panel.js.map +1 -1
  118. package/build/components/global-styles/variations/variations-typography.js.map +1 -1
  119. package/build/components/global-styles-renderer/index.js.map +1 -1
  120. package/build/components/header-edit-mode/document-tools/index.js.map +1 -1
  121. package/build/components/header-edit-mode/index.js +36 -52
  122. package/build/components/header-edit-mode/index.js.map +1 -1
  123. package/build/components/header-edit-mode/more-menu/index.js +4 -100
  124. package/build/components/header-edit-mode/more-menu/index.js.map +1 -1
  125. package/build/components/header-edit-mode/more-menu/site-export.js.map +1 -1
  126. package/build/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +1 -1
  127. package/build/components/keyboard-shortcuts/global.js.map +1 -1
  128. package/build/components/keyboard-shortcuts/register.js +0 -67
  129. package/build/components/keyboard-shortcuts/register.js.map +1 -1
  130. package/build/components/layout/animation.js +3 -2
  131. package/build/components/layout/animation.js.map +1 -1
  132. package/build/components/layout/hooks.js.map +1 -1
  133. package/build/components/layout/index.js +20 -52
  134. package/build/components/layout/index.js.map +1 -1
  135. package/build/components/layout/router.js +70 -33
  136. package/build/components/layout/router.js.map +1 -1
  137. package/build/components/media/index.js.map +1 -1
  138. package/build/components/page/header.js.map +1 -1
  139. package/build/components/page/index.js +5 -2
  140. package/build/components/page/index.js.map +1 -1
  141. package/build/components/page-pages/index.js +18 -19
  142. package/build/components/page-pages/index.js.map +1 -1
  143. package/build/components/page-patterns/dataviews-pattern-actions.js +16 -11
  144. package/build/components/page-patterns/dataviews-pattern-actions.js.map +1 -1
  145. package/build/components/page-patterns/delete-category-menu-item.js.map +1 -1
  146. package/build/components/page-patterns/header.js +5 -3
  147. package/build/components/page-patterns/header.js.map +1 -1
  148. package/build/components/page-patterns/index.js +140 -62
  149. package/build/components/page-patterns/index.js.map +1 -1
  150. package/build/components/page-patterns/rename-category-menu-item.js.map +1 -1
  151. package/build/components/page-patterns/search-items.js +2 -1
  152. package/build/components/page-patterns/search-items.js.map +1 -1
  153. package/build/components/page-patterns/use-pattern-settings.js.map +1 -1
  154. package/build/components/page-patterns/use-patterns.js +6 -10
  155. package/build/components/page-patterns/use-patterns.js.map +1 -1
  156. package/build/components/page-patterns/utils.js.map +1 -1
  157. package/build/components/page-templates/hooks.js.map +1 -0
  158. package/build/components/{page-templates-template-parts → page-templates}/index.js +78 -103
  159. package/build/components/page-templates/index.js.map +1 -0
  160. package/build/components/pagination/index.js.map +1 -1
  161. package/build/components/pattern-modal/duplicate.js +13 -8
  162. package/build/components/pattern-modal/duplicate.js.map +1 -1
  163. package/build/components/pattern-modal/index.js.map +1 -1
  164. package/build/components/pattern-modal/rename.js +6 -3
  165. package/build/components/pattern-modal/rename.js.map +1 -1
  166. package/build/components/plugin-template-setting-panel/index.js +9 -0
  167. package/build/components/plugin-template-setting-panel/index.js.map +1 -1
  168. package/build/components/{template-actions/rename-menu-item.js → rename-post-menu-item/index.js} +18 -16
  169. package/build/components/rename-post-menu-item/index.js.map +1 -0
  170. package/build/components/resizable-frame/index.js +10 -11
  171. package/build/components/resizable-frame/index.js.map +1 -1
  172. package/build/components/revisions/index.js.map +1 -1
  173. package/build/components/routes/link.js.map +1 -1
  174. package/build/components/routes/use-title.js.map +1 -1
  175. package/build/components/save-button/index.js.map +1 -1
  176. package/build/components/save-hub/index.js.map +1 -1
  177. package/build/components/save-panel/index.js +3 -3
  178. package/build/components/save-panel/index.js.map +1 -1
  179. package/build/components/sidebar/index.js +41 -75
  180. package/build/components/sidebar/index.js.map +1 -1
  181. package/build/components/sidebar-button/index.js.map +1 -1
  182. package/build/components/sidebar-dataviews/add-new-view.js.map +1 -1
  183. package/build/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
  184. package/build/components/sidebar-dataviews/dataview-item.js.map +1 -1
  185. package/build/components/sidebar-dataviews/default-views.js +1 -1
  186. package/build/components/sidebar-dataviews/default-views.js.map +1 -1
  187. package/build/components/sidebar-dataviews/index.js +1 -1
  188. package/build/components/sidebar-dataviews/index.js.map +1 -1
  189. package/build/components/sidebar-edit-mode/default-sidebar.js +18 -7
  190. package/build/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
  191. package/build/components/sidebar-edit-mode/global-styles-sidebar.js +5 -3
  192. package/build/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
  193. package/build/components/sidebar-edit-mode/index.js +31 -55
  194. package/build/components/sidebar-edit-mode/index.js.map +1 -1
  195. package/build/components/sidebar-edit-mode/page-panels/index.js +55 -3
  196. package/build/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
  197. package/build/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -1
  198. package/build/components/sidebar-edit-mode/page-panels/page-summary.js +23 -16
  199. package/build/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
  200. package/build/components/sidebar-edit-mode/settings-header/index.js +4 -5
  201. package/build/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
  202. package/build/components/sidebar-edit-mode/template-panel/hooks.js.map +1 -1
  203. package/build/components/sidebar-edit-mode/template-panel/index.js +3 -6
  204. package/build/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
  205. package/build/components/sidebar-navigation-item/index.js +31 -0
  206. package/build/components/sidebar-navigation-item/index.js.map +1 -1
  207. package/build/components/sidebar-navigation-screen/index.js +36 -9
  208. package/build/components/sidebar-navigation-screen/index.js.map +1 -1
  209. package/build/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  210. package/build/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
  211. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
  212. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
  213. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
  214. package/build/components/sidebar-navigation-screen-global-styles/index.js +1 -2
  215. package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  216. package/build/components/sidebar-navigation-screen-main/index.js +6 -15
  217. package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
  218. package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +1 -1
  219. package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
  220. package/build/components/sidebar-navigation-screen-navigation-menu/index.js +7 -2
  221. package/build/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  222. package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
  223. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
  224. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  225. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +1 -1
  226. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  227. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +20 -15
  228. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  229. package/build/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
  230. package/build/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
  231. package/build/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
  232. package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  233. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +6 -5
  234. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  235. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  236. package/build/components/sidebar-navigation-screen-page/index.js +53 -12
  237. package/build/components/sidebar-navigation-screen-page/index.js.map +1 -1
  238. package/build/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
  239. package/build/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
  240. package/build/components/sidebar-navigation-screen-pattern/index.js +17 -15
  241. package/build/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
  242. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -1
  243. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -1
  244. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
  245. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +3 -1
  246. package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
  247. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -1
  248. package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js.map +1 -1
  249. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js +1 -1
  250. package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
  251. package/build/components/sidebar-navigation-screen-patterns/category-item.js +3 -2
  252. package/build/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
  253. package/build/components/sidebar-navigation-screen-patterns/index.js +64 -52
  254. package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  255. package/build/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +1 -1
  256. package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
  257. package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
  258. package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
  259. package/build/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -1
  260. package/build/components/sidebar-navigation-screen-template/index.js +11 -8
  261. package/build/components/sidebar-navigation-screen-template/index.js.map +1 -1
  262. package/build/components/sidebar-navigation-screen-template/template-areas.js.map +1 -1
  263. package/build/components/sidebar-navigation-screen-templates-browse/content.js +3 -3
  264. package/build/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
  265. package/build/components/sidebar-navigation-screen-templates-browse/index.js +4 -36
  266. package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  267. package/build/components/site-hub/index.js +22 -21
  268. package/build/components/site-hub/index.js.map +1 -1
  269. package/build/components/site-icon/index.js.map +1 -1
  270. package/build/components/start-template-options/index.js.map +1 -1
  271. package/build/components/style-book/index.js.map +1 -1
  272. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +14 -13
  273. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  274. package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  275. package/build/components/table/index.js.map +1 -1
  276. package/build/components/template-actions/index.js +7 -8
  277. package/build/components/template-actions/index.js.map +1 -1
  278. package/build/components/template-part-converter/convert-to-regular.js.map +1 -1
  279. package/build/components/template-part-converter/convert-to-template-part.js.map +1 -1
  280. package/build/components/template-part-converter/index.js.map +1 -1
  281. package/build/components/use-edited-entity-record/index.js.map +1 -1
  282. package/build/components/welcome-guide/editor.js.map +1 -1
  283. package/build/components/welcome-guide/image.js.map +1 -1
  284. package/build/components/welcome-guide/index.js.map +1 -1
  285. package/build/components/welcome-guide/page.js.map +1 -1
  286. package/build/components/welcome-guide/styles.js +6 -3
  287. package/build/components/welcome-guide/styles.js.map +1 -1
  288. package/build/components/welcome-guide/template.js.map +1 -1
  289. package/build/deprecated.js +55 -0
  290. package/build/deprecated.js.map +1 -0
  291. package/build/hooks/commands/use-common-commands.js.map +1 -1
  292. package/build/hooks/commands/use-edit-mode-commands.js +10 -28
  293. package/build/hooks/commands/use-edit-mode-commands.js.map +1 -1
  294. package/build/hooks/components.js.map +1 -1
  295. package/build/hooks/index.js.map +1 -1
  296. package/build/hooks/push-changes-to-global-styles/index.js +3 -40
  297. package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
  298. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +36 -5
  299. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  300. package/build/index.js +18 -23
  301. package/build/index.js.map +1 -1
  302. package/build/lock-unlock.js.map +1 -1
  303. package/build/store/actions.js +21 -96
  304. package/build/store/actions.js.map +1 -1
  305. package/build/store/constants.js.map +1 -1
  306. package/build/store/index.js +1 -1
  307. package/build/store/index.js.map +1 -1
  308. package/build/store/private-actions.js +1 -85
  309. package/build/store/private-actions.js.map +1 -1
  310. package/build/store/private-selectors.js.map +1 -1
  311. package/build/store/reducer.js.map +1 -1
  312. package/build/store/selectors.js.map +1 -1
  313. package/build/utils/clone-deep.js.map +1 -1
  314. package/build/utils/constants.js +2 -2
  315. package/build/utils/constants.js.map +1 -1
  316. package/build/utils/get-is-list-page.js.map +1 -1
  317. package/build/utils/is-previewing-theme.js.map +1 -1
  318. package/build/utils/is-template-removable.js.map +1 -1
  319. package/build/utils/is-template-revertable.js.map +1 -1
  320. package/build/utils/math.js.map +1 -1
  321. package/build/utils/set-nested-value.js +44 -0
  322. package/build/utils/set-nested-value.js.map +1 -0
  323. package/build/utils/template-part-create.js.map +1 -1
  324. package/build/utils/use-activate-theme.js.map +1 -1
  325. package/build/utils/use-actual-current-theme.js.map +1 -1
  326. package/build-module/components/add-new-page/index.js +3 -0
  327. package/build-module/components/add-new-page/index.js.map +1 -1
  328. package/build-module/components/add-new-pattern/index.js +8 -7
  329. package/build-module/components/add-new-pattern/index.js.map +1 -1
  330. package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js +3 -0
  331. package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
  332. package/build-module/components/add-new-template/add-custom-template-modal-content.js +3 -1
  333. package/build-module/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  334. package/build-module/components/add-new-template/index.js +283 -14
  335. package/build-module/components/add-new-template/index.js.map +1 -1
  336. package/build-module/components/add-new-template/utils.js +21 -11
  337. package/build-module/components/add-new-template/utils.js.map +1 -1
  338. package/build-module/components/app/index.js.map +1 -1
  339. package/build-module/components/async/index.js +44 -0
  340. package/build-module/components/async/index.js.map +1 -0
  341. package/build-module/components/block-editor/block-inspector-button.js +9 -8
  342. package/build-module/components/block-editor/block-inspector-button.js.map +1 -1
  343. package/build-module/components/block-editor/editor-canvas.js +16 -7
  344. package/build-module/components/block-editor/editor-canvas.js.map +1 -1
  345. package/build-module/components/block-editor/inserter-media-categories.js.map +1 -1
  346. package/build-module/components/block-editor/resizable-editor.js.map +1 -1
  347. package/build-module/components/block-editor/resize-handle.js +21 -6
  348. package/build-module/components/block-editor/resize-handle.js.map +1 -1
  349. package/build-module/components/block-editor/site-editor-canvas.js +5 -1
  350. package/build-module/components/block-editor/site-editor-canvas.js.map +1 -1
  351. package/build-module/components/block-editor/use-navigate-to-entity-record.js.map +1 -1
  352. package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
  353. package/build-module/components/canvas-loader/index.js.map +1 -1
  354. package/build-module/components/code-editor/index.js.map +1 -1
  355. package/build-module/components/create-template-part-modal/index.js +3 -0
  356. package/build-module/components/create-template-part-modal/index.js.map +1 -1
  357. package/build-module/components/editor/index.js +61 -11
  358. package/build-module/components/editor/index.js.map +1 -1
  359. package/build-module/components/editor-canvas-container/index.js.map +1 -1
  360. package/build-module/components/error-boundary/index.js.map +1 -1
  361. package/build-module/components/error-boundary/warning.js.map +1 -1
  362. package/build-module/components/global-styles/background-panel.js +14 -1
  363. package/build-module/components/global-styles/background-panel.js.map +1 -1
  364. package/build-module/components/global-styles/block-preview-panel.js +6 -1
  365. package/build-module/components/global-styles/block-preview-panel.js.map +1 -1
  366. package/build-module/components/global-styles/color-indicator-wrapper.js.map +1 -1
  367. package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
  368. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  369. package/build-module/components/global-styles/font-families.js.map +1 -1
  370. package/build-module/components/global-styles/font-family-item.js.map +1 -1
  371. package/build-module/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
  372. package/build-module/components/global-styles/font-library-modal/context.js +68 -35
  373. package/build-module/components/global-styles/font-library-modal/context.js.map +1 -1
  374. package/build-module/components/global-styles/font-library-modal/font-card.js.map +1 -1
  375. package/build-module/components/global-styles/font-library-modal/font-collection.js +19 -7
  376. package/build-module/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  377. package/build-module/components/global-styles/font-library-modal/font-demo.js.map +1 -1
  378. package/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +1 -1
  379. package/build-module/components/global-styles/font-library-modal/index.js +2 -2
  380. package/build-module/components/global-styles/font-library-modal/index.js.map +1 -1
  381. package/build-module/components/global-styles/font-library-modal/installed-fonts.js +32 -29
  382. package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  383. package/build-module/components/global-styles/font-library-modal/library-font-details.js.map +1 -1
  384. package/build-module/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
  385. package/build-module/components/global-styles/font-library-modal/resolvers.js.map +1 -1
  386. package/build-module/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  387. package/build-module/components/global-styles/font-library-modal/utils/constants.js.map +1 -1
  388. package/build-module/components/global-styles/font-library-modal/utils/filter-fonts.js.map +1 -1
  389. package/build-module/components/global-styles/font-library-modal/utils/fonts-outline.js.map +1 -1
  390. package/build-module/components/global-styles/font-library-modal/utils/index.js.map +1 -1
  391. package/build-module/components/global-styles/font-library-modal/utils/make-families-from-faces.js.map +1 -1
  392. package/build-module/components/global-styles/font-library-modal/utils/preview-styles.js.map +1 -1
  393. package/build-module/components/global-styles/font-library-modal/utils/sort-font-faces.js +6 -2
  394. package/build-module/components/global-styles/font-library-modal/utils/sort-font-faces.js.map +1 -1
  395. package/build-module/components/global-styles/font-library-modal/utils/toggleFont.js.map +1 -1
  396. package/build-module/components/global-styles/global-styles-provider.js.map +1 -1
  397. package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
  398. package/build-module/components/global-styles/header.js.map +1 -1
  399. package/build-module/components/global-styles/highlighted-colors.js +1 -1
  400. package/build-module/components/global-styles/highlighted-colors.js.map +1 -1
  401. package/build-module/components/global-styles/hooks.js +11 -3
  402. package/build-module/components/global-styles/hooks.js.map +1 -1
  403. package/build-module/components/global-styles/icon-with-current-color.js.map +1 -1
  404. package/build-module/components/global-styles/index.js.map +1 -1
  405. package/build-module/components/global-styles/navigation-button.js.map +1 -1
  406. package/build-module/components/global-styles/palette.js.map +1 -1
  407. package/build-module/components/global-styles/preview-colors.js.map +1 -1
  408. package/build-module/components/global-styles/preview-iframe.js.map +1 -1
  409. package/build-module/components/global-styles/preview-styles.js.map +1 -1
  410. package/build-module/components/global-styles/root-menu.js +2 -2
  411. package/build-module/components/global-styles/root-menu.js.map +1 -1
  412. package/build-module/components/global-styles/screen-background.js +1 -1
  413. package/build-module/components/global-styles/screen-background.js.map +1 -1
  414. package/build-module/components/global-styles/screen-block-list.js.map +1 -1
  415. package/build-module/components/global-styles/screen-block.js.map +1 -1
  416. package/build-module/components/global-styles/screen-color-palette.js.map +1 -1
  417. package/build-module/components/global-styles/screen-colors.js.map +1 -1
  418. package/build-module/components/global-styles/screen-css.js.map +1 -1
  419. package/build-module/components/global-styles/screen-layout.js.map +1 -1
  420. package/build-module/components/global-styles/screen-revisions/index.js +1 -1
  421. package/build-module/components/global-styles/screen-revisions/index.js.map +1 -1
  422. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  423. package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
  424. package/build-module/components/global-styles/screen-root.js.map +1 -1
  425. package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
  426. package/build-module/components/global-styles/screen-typography-element.js.map +1 -1
  427. package/build-module/components/global-styles/screen-typography.js.map +1 -1
  428. package/build-module/components/global-styles/style-variations-container.js +8 -2
  429. package/build-module/components/global-styles/style-variations-container.js.map +1 -1
  430. package/build-module/components/global-styles/subtitle.js.map +1 -1
  431. package/build-module/components/global-styles/typography-elements.js.map +1 -1
  432. package/build-module/components/global-styles/typography-example.js.map +1 -1
  433. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  434. package/build-module/components/global-styles/typography-preview.js.map +1 -1
  435. package/build-module/components/global-styles/ui.js.map +1 -1
  436. package/build-module/components/global-styles/utils.js.map +1 -1
  437. package/build-module/components/global-styles/variations/variation.js.map +1 -1
  438. package/build-module/components/global-styles/variations/variations-color.js.map +1 -1
  439. package/build-module/components/global-styles/variations/variations-panel.js.map +1 -1
  440. package/build-module/components/global-styles/variations/variations-typography.js.map +1 -1
  441. package/build-module/components/global-styles-renderer/index.js.map +1 -1
  442. package/build-module/components/header-edit-mode/document-tools/index.js.map +1 -1
  443. package/build-module/components/header-edit-mode/index.js +41 -57
  444. package/build-module/components/header-edit-mode/index.js.map +1 -1
  445. package/build-module/components/header-edit-mode/more-menu/index.js +6 -100
  446. package/build-module/components/header-edit-mode/more-menu/index.js.map +1 -1
  447. package/build-module/components/header-edit-mode/more-menu/site-export.js.map +1 -1
  448. package/build-module/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +1 -1
  449. package/build-module/components/keyboard-shortcuts/global.js.map +1 -1
  450. package/build-module/components/keyboard-shortcuts/register.js +0 -67
  451. package/build-module/components/keyboard-shortcuts/register.js.map +1 -1
  452. package/build-module/components/layout/animation.js +4 -3
  453. package/build-module/components/layout/animation.js.map +1 -1
  454. package/build-module/components/layout/hooks.js.map +1 -1
  455. package/build-module/components/layout/index.js +20 -52
  456. package/build-module/components/layout/index.js.map +1 -1
  457. package/build-module/components/layout/router.js +70 -33
  458. package/build-module/components/layout/router.js.map +1 -1
  459. package/build-module/components/media/index.js.map +1 -1
  460. package/build-module/components/page/header.js.map +1 -1
  461. package/build-module/components/page/index.js +5 -2
  462. package/build-module/components/page/index.js.map +1 -1
  463. package/build-module/components/page-pages/index.js +18 -19
  464. package/build-module/components/page-pages/index.js.map +1 -1
  465. package/build-module/components/page-patterns/dataviews-pattern-actions.js +16 -11
  466. package/build-module/components/page-patterns/dataviews-pattern-actions.js.map +1 -1
  467. package/build-module/components/page-patterns/delete-category-menu-item.js.map +1 -1
  468. package/build-module/components/page-patterns/header.js +5 -3
  469. package/build-module/components/page-patterns/header.js.map +1 -1
  470. package/build-module/components/page-patterns/index.js +143 -65
  471. package/build-module/components/page-patterns/index.js.map +1 -1
  472. package/build-module/components/page-patterns/rename-category-menu-item.js.map +1 -1
  473. package/build-module/components/page-patterns/search-items.js +3 -2
  474. package/build-module/components/page-patterns/search-items.js.map +1 -1
  475. package/build-module/components/page-patterns/use-pattern-settings.js.map +1 -1
  476. package/build-module/components/page-patterns/use-patterns.js +3 -6
  477. package/build-module/components/page-patterns/use-patterns.js.map +1 -1
  478. package/build-module/components/page-patterns/utils.js.map +1 -1
  479. package/build-module/components/page-templates/hooks.js.map +1 -0
  480. package/build-module/components/{page-templates-template-parts → page-templates}/index.js +77 -102
  481. package/build-module/components/page-templates/index.js.map +1 -0
  482. package/build-module/components/pagination/index.js.map +1 -1
  483. package/build-module/components/pattern-modal/duplicate.js +11 -6
  484. package/build-module/components/pattern-modal/duplicate.js.map +1 -1
  485. package/build-module/components/pattern-modal/index.js.map +1 -1
  486. package/build-module/components/pattern-modal/rename.js +4 -1
  487. package/build-module/components/pattern-modal/rename.js.map +1 -1
  488. package/build-module/components/plugin-template-setting-panel/index.js +8 -0
  489. package/build-module/components/plugin-template-setting-panel/index.js.map +1 -1
  490. package/build-module/components/{template-actions/rename-menu-item.js → rename-post-menu-item/index.js} +17 -15
  491. package/build-module/components/rename-post-menu-item/index.js.map +1 -0
  492. package/build-module/components/resizable-frame/index.js +10 -11
  493. package/build-module/components/resizable-frame/index.js.map +1 -1
  494. package/build-module/components/revisions/index.js.map +1 -1
  495. package/build-module/components/routes/link.js.map +1 -1
  496. package/build-module/components/routes/use-title.js.map +1 -1
  497. package/build-module/components/save-button/index.js.map +1 -1
  498. package/build-module/components/save-hub/index.js.map +1 -1
  499. package/build-module/components/save-panel/index.js +2 -2
  500. package/build-module/components/save-panel/index.js.map +1 -1
  501. package/build-module/components/sidebar/index.js +42 -75
  502. package/build-module/components/sidebar/index.js.map +1 -1
  503. package/build-module/components/sidebar-button/index.js.map +1 -1
  504. package/build-module/components/sidebar-dataviews/add-new-view.js.map +1 -1
  505. package/build-module/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
  506. package/build-module/components/sidebar-dataviews/dataview-item.js.map +1 -1
  507. package/build-module/components/sidebar-dataviews/default-views.js +1 -1
  508. package/build-module/components/sidebar-dataviews/default-views.js.map +1 -1
  509. package/build-module/components/sidebar-dataviews/index.js +1 -1
  510. package/build-module/components/sidebar-dataviews/index.js.map +1 -1
  511. package/build-module/components/sidebar-edit-mode/default-sidebar.js +16 -5
  512. package/build-module/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
  513. package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js +5 -3
  514. package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
  515. package/build-module/components/sidebar-edit-mode/index.js +30 -54
  516. package/build-module/components/sidebar-edit-mode/index.js.map +1 -1
  517. package/build-module/components/sidebar-edit-mode/page-panels/index.js +58 -6
  518. package/build-module/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
  519. package/build-module/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -1
  520. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js +25 -17
  521. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
  522. package/build-module/components/sidebar-edit-mode/settings-header/index.js +4 -5
  523. package/build-module/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
  524. package/build-module/components/sidebar-edit-mode/template-panel/hooks.js.map +1 -1
  525. package/build-module/components/sidebar-edit-mode/template-panel/index.js +4 -7
  526. package/build-module/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
  527. package/build-module/components/sidebar-navigation-item/index.js +31 -0
  528. package/build-module/components/sidebar-navigation-item/index.js.map +1 -1
  529. package/build-module/components/sidebar-navigation-screen/index.js +37 -10
  530. package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
  531. package/build-module/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  532. package/build-module/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
  533. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
  534. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
  535. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
  536. package/build-module/components/sidebar-navigation-screen-global-styles/index.js +2 -3
  537. package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  538. package/build-module/components/sidebar-navigation-screen-main/index.js +7 -16
  539. package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
  540. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +1 -1
  541. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
  542. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js +8 -3
  543. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  544. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
  545. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
  546. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  547. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +1 -1
  548. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  549. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +20 -15
  550. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  551. package/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
  552. package/build-module/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
  553. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
  554. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  555. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +6 -5
  556. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  557. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  558. package/build-module/components/sidebar-navigation-screen-page/index.js +56 -15
  559. package/build-module/components/sidebar-navigation-screen-page/index.js.map +1 -1
  560. package/build-module/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
  561. package/build-module/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
  562. package/build-module/components/sidebar-navigation-screen-pattern/index.js +17 -15
  563. package/build-module/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
  564. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -1
  565. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -1
  566. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
  567. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +3 -1
  568. package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
  569. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -1
  570. package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js.map +1 -1
  571. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js +1 -1
  572. package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
  573. package/build-module/components/sidebar-navigation-screen-patterns/category-item.js +3 -2
  574. package/build-module/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
  575. package/build-module/components/sidebar-navigation-screen-patterns/index.js +66 -54
  576. package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  577. package/build-module/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +1 -1
  578. package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
  579. package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
  580. package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
  581. package/build-module/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -1
  582. package/build-module/components/sidebar-navigation-screen-template/index.js +13 -9
  583. package/build-module/components/sidebar-navigation-screen-template/index.js.map +1 -1
  584. package/build-module/components/sidebar-navigation-screen-template/template-areas.js.map +1 -1
  585. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js +3 -3
  586. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
  587. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +4 -36
  588. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  589. package/build-module/components/site-hub/index.js +22 -21
  590. package/build-module/components/site-hub/index.js.map +1 -1
  591. package/build-module/components/site-icon/index.js.map +1 -1
  592. package/build-module/components/start-template-options/index.js.map +1 -1
  593. package/build-module/components/style-book/index.js.map +1 -1
  594. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +14 -13
  595. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  596. package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  597. package/build-module/components/table/index.js.map +1 -1
  598. package/build-module/components/template-actions/index.js +7 -8
  599. package/build-module/components/template-actions/index.js.map +1 -1
  600. package/build-module/components/template-part-converter/convert-to-regular.js.map +1 -1
  601. package/build-module/components/template-part-converter/convert-to-template-part.js.map +1 -1
  602. package/build-module/components/template-part-converter/index.js.map +1 -1
  603. package/build-module/components/use-edited-entity-record/index.js.map +1 -1
  604. package/build-module/components/welcome-guide/editor.js.map +1 -1
  605. package/build-module/components/welcome-guide/image.js.map +1 -1
  606. package/build-module/components/welcome-guide/index.js.map +1 -1
  607. package/build-module/components/welcome-guide/page.js.map +1 -1
  608. package/build-module/components/welcome-guide/styles.js +6 -3
  609. package/build-module/components/welcome-guide/styles.js.map +1 -1
  610. package/build-module/components/welcome-guide/template.js.map +1 -1
  611. package/build-module/deprecated.js +45 -0
  612. package/build-module/deprecated.js.map +1 -0
  613. package/build-module/hooks/commands/use-common-commands.js.map +1 -1
  614. package/build-module/hooks/commands/use-edit-mode-commands.js +11 -29
  615. package/build-module/hooks/commands/use-edit-mode-commands.js.map +1 -1
  616. package/build-module/hooks/components.js.map +1 -1
  617. package/build-module/hooks/index.js.map +1 -1
  618. package/build-module/hooks/push-changes-to-global-styles/index.js +1 -38
  619. package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
  620. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +35 -5
  621. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  622. package/build-module/index.js +1 -5
  623. package/build-module/index.js.map +1 -1
  624. package/build-module/lock-unlock.js.map +1 -1
  625. package/build-module/store/actions.js +16 -92
  626. package/build-module/store/actions.js.map +1 -1
  627. package/build-module/store/constants.js.map +1 -1
  628. package/build-module/store/index.js.map +1 -1
  629. package/build-module/store/private-actions.js +0 -83
  630. package/build-module/store/private-actions.js.map +1 -1
  631. package/build-module/store/private-selectors.js.map +1 -1
  632. package/build-module/store/reducer.js.map +1 -1
  633. package/build-module/store/selectors.js.map +1 -1
  634. package/build-module/utils/clone-deep.js.map +1 -1
  635. package/build-module/utils/constants.js +1 -1
  636. package/build-module/utils/constants.js.map +1 -1
  637. package/build-module/utils/get-is-list-page.js.map +1 -1
  638. package/build-module/utils/is-previewing-theme.js.map +1 -1
  639. package/build-module/utils/is-template-removable.js.map +1 -1
  640. package/build-module/utils/is-template-revertable.js.map +1 -1
  641. package/build-module/utils/math.js.map +1 -1
  642. package/build-module/utils/set-nested-value.js +38 -0
  643. package/build-module/utils/set-nested-value.js.map +1 -0
  644. package/build-module/utils/template-part-create.js.map +1 -1
  645. package/build-module/utils/use-activate-theme.js.map +1 -1
  646. package/build-module/utils/use-actual-current-theme.js.map +1 -1
  647. package/build-style/style-rtl.css +261 -720
  648. package/build-style/style.css +261 -720
  649. package/package.json +43 -44
  650. package/src/components/add-new-page/index.js +7 -1
  651. package/src/components/add-new-pattern/index.js +15 -12
  652. package/src/components/add-new-template/add-custom-generic-template-modal-content.js +3 -0
  653. package/src/components/add-new-template/add-custom-template-modal-content.js +3 -1
  654. package/src/components/add-new-template/index.js +412 -12
  655. package/src/components/add-new-template/style.scss +0 -22
  656. package/src/components/add-new-template/utils.js +44 -24
  657. package/src/components/async/index.js +43 -0
  658. package/src/components/block-editor/block-inspector-button.js +9 -11
  659. package/src/components/block-editor/editor-canvas.js +45 -21
  660. package/src/components/block-editor/resize-handle.js +30 -11
  661. package/src/components/block-editor/site-editor-canvas.js +6 -1
  662. package/src/components/block-editor/style.scss +10 -15
  663. package/src/components/create-template-part-modal/index.js +3 -0
  664. package/src/components/editor/index.js +91 -15
  665. package/src/components/editor/style.scss +6 -1
  666. package/src/components/global-styles/background-panel.js +16 -0
  667. package/src/components/global-styles/block-preview-panel.js +6 -1
  668. package/src/components/global-styles/font-library-modal/context.js +85 -54
  669. package/src/components/global-styles/font-library-modal/font-collection.js +265 -222
  670. package/src/components/global-styles/font-library-modal/index.js +2 -2
  671. package/src/components/global-styles/font-library-modal/installed-fonts.js +184 -147
  672. package/src/components/global-styles/font-library-modal/style.scss +48 -13
  673. package/src/components/global-styles/font-library-modal/utils/sort-font-faces.js +6 -2
  674. package/src/components/global-styles/highlighted-colors.js +1 -1
  675. package/src/components/global-styles/hooks.js +20 -3
  676. package/src/components/global-styles/root-menu.js +2 -2
  677. package/src/components/global-styles/screen-background.js +1 -1
  678. package/src/components/global-styles/screen-revisions/index.js +1 -1
  679. package/src/components/global-styles/style-variations-container.js +11 -2
  680. package/src/components/header-edit-mode/index.js +56 -78
  681. package/src/components/header-edit-mode/more-menu/index.js +9 -157
  682. package/src/components/header-edit-mode/style.scss +14 -86
  683. package/src/components/keyboard-shortcuts/register.js +0 -78
  684. package/src/components/layout/animation.js +6 -3
  685. package/src/components/layout/index.js +23 -52
  686. package/src/components/layout/router.js +73 -50
  687. package/src/components/layout/style.scss +15 -37
  688. package/src/components/page/index.js +7 -2
  689. package/src/components/page-pages/index.js +46 -26
  690. package/src/components/page-pages/style.scss +40 -22
  691. package/src/components/page-patterns/dataviews-pattern-actions.js +13 -15
  692. package/src/components/page-patterns/header.js +7 -3
  693. package/src/components/page-patterns/index.js +162 -109
  694. package/src/components/page-patterns/search-items.js +3 -0
  695. package/src/components/page-patterns/style.scss +21 -7
  696. package/src/components/page-patterns/use-patterns.js +3 -6
  697. package/src/components/{page-templates-template-parts → page-templates}/index.js +46 -84
  698. package/src/components/{page-templates-template-parts → page-templates}/style.scss +2 -2
  699. package/src/components/pattern-modal/duplicate.js +6 -4
  700. package/src/components/pattern-modal/rename.js +2 -1
  701. package/src/components/plugin-template-setting-panel/index.js +8 -0
  702. package/src/components/{template-actions/rename-menu-item.js → rename-post-menu-item/index.js} +20 -24
  703. package/src/components/resizable-frame/index.js +6 -9
  704. package/src/components/save-panel/index.js +2 -2
  705. package/src/components/sidebar/index.js +52 -100
  706. package/src/components/sidebar/style.scss +41 -6
  707. package/src/components/sidebar-dataviews/default-views.js +1 -1
  708. package/src/components/sidebar-dataviews/index.js +1 -1
  709. package/src/components/sidebar-edit-mode/default-sidebar.js +13 -6
  710. package/src/components/sidebar-edit-mode/global-styles-sidebar.js +7 -3
  711. package/src/components/sidebar-edit-mode/index.js +50 -75
  712. package/src/components/sidebar-edit-mode/page-panels/index.js +65 -14
  713. package/src/components/sidebar-edit-mode/page-panels/page-summary.js +40 -20
  714. package/src/components/sidebar-edit-mode/settings-header/index.js +4 -5
  715. package/src/components/sidebar-edit-mode/style.scss +1 -1
  716. package/src/components/sidebar-edit-mode/template-panel/index.js +3 -13
  717. package/src/components/sidebar-navigation-item/index.js +29 -0
  718. package/src/components/sidebar-navigation-screen/index.js +29 -12
  719. package/src/components/sidebar-navigation-screen/style.scss +1 -21
  720. package/src/components/sidebar-navigation-screen-global-styles/index.js +2 -11
  721. package/src/components/sidebar-navigation-screen-main/index.js +11 -23
  722. package/src/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +1 -1
  723. package/src/components/sidebar-navigation-screen-navigation-menu/index.js +7 -6
  724. package/src/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +1 -1
  725. package/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +14 -14
  726. package/src/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
  727. package/src/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +4 -5
  728. package/src/components/sidebar-navigation-screen-page/index.js +63 -14
  729. package/src/components/sidebar-navigation-screen-page/style.scss +8 -2
  730. package/src/components/sidebar-navigation-screen-pattern/index.js +13 -15
  731. package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +3 -1
  732. package/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js +1 -1
  733. package/src/components/sidebar-navigation-screen-patterns/category-item.js +2 -1
  734. package/src/components/sidebar-navigation-screen-patterns/index.js +97 -95
  735. package/src/components/sidebar-navigation-screen-patterns/style.scss +5 -0
  736. package/src/components/sidebar-navigation-screen-template/index.js +9 -13
  737. package/src/components/sidebar-navigation-screen-templates-browse/content.js +3 -3
  738. package/src/components/sidebar-navigation-screen-templates-browse/index.js +6 -43
  739. package/src/components/site-hub/index.js +80 -90
  740. package/src/components/site-hub/style.scss +14 -34
  741. package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +50 -39
  742. package/src/components/template-actions/index.js +8 -11
  743. package/src/components/welcome-guide/style.scss +1 -1
  744. package/src/components/welcome-guide/styles.js +6 -5
  745. package/src/deprecated.js +42 -0
  746. package/src/hooks/commands/use-edit-mode-commands.js +12 -33
  747. package/src/hooks/push-changes-to-global-styles/index.js +1 -40
  748. package/src/hooks/use-theme-style-variations/test/use-theme-style-variations-by-property.js +4 -0
  749. package/src/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +74 -17
  750. package/src/index.js +1 -9
  751. package/src/store/actions.js +25 -141
  752. package/src/store/private-actions.js +0 -133
  753. package/src/store/test/actions.js +7 -2
  754. package/src/style.scss +1 -7
  755. package/src/utils/constants.js +2 -1
  756. package/src/utils/set-nested-value.js +39 -0
  757. package/build/components/add-new-template/new-template.js +0 -298
  758. package/build/components/add-new-template/new-template.js.map +0 -1
  759. package/build/components/add-new-template/template-actions-loading-screen.js +0 -27
  760. package/build/components/add-new-template/template-actions-loading-screen.js.map +0 -1
  761. package/build/components/header-edit-mode/more-menu/copy-content-menu-item.js +0 -59
  762. package/build/components/header-edit-mode/more-menu/copy-content-menu-item.js.map +0 -1
  763. package/build/components/header-edit-mode/plugin-more-menu-item/index.js +0 -78
  764. package/build/components/header-edit-mode/plugin-more-menu-item/index.js.map +0 -1
  765. package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +0 -71
  766. package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +0 -1
  767. package/build/components/header-edit-mode/tools-more-menu-group/index.js +0 -23
  768. package/build/components/header-edit-mode/tools-more-menu-group/index.js.map +0 -1
  769. package/build/components/keyboard-shortcut-help-modal/config.js +0 -78
  770. package/build/components/keyboard-shortcut-help-modal/config.js.map +0 -1
  771. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -48
  772. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +0 -1
  773. package/build/components/keyboard-shortcut-help-modal/index.js +0 -119
  774. package/build/components/keyboard-shortcut-help-modal/index.js.map +0 -1
  775. package/build/components/keyboard-shortcut-help-modal/shortcut.js +0 -54
  776. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +0 -1
  777. package/build/components/keyboard-shortcuts/edit-mode.js +0 -79
  778. package/build/components/keyboard-shortcuts/edit-mode.js.map +0 -1
  779. package/build/components/page-actions/index.js +0 -35
  780. package/build/components/page-actions/index.js.map +0 -1
  781. package/build/components/page-actions/trash-page-menu-item.js +0 -54
  782. package/build/components/page-actions/trash-page-menu-item.js.map +0 -1
  783. package/build/components/page-templates-template-parts/actions.js +0 -207
  784. package/build/components/page-templates-template-parts/actions.js.map +0 -1
  785. package/build/components/page-templates-template-parts/add-new-template-part.js +0 -64
  786. package/build/components/page-templates-template-parts/add-new-template-part.js.map +0 -1
  787. package/build/components/page-templates-template-parts/hooks.js.map +0 -1
  788. package/build/components/page-templates-template-parts/index.js.map +0 -1
  789. package/build/components/preferences-modal/index.js +0 -38
  790. package/build/components/preferences-modal/index.js.map +0 -1
  791. package/build/components/sidebar-edit-mode/constants.js +0 -9
  792. package/build/components/sidebar-edit-mode/constants.js.map +0 -1
  793. package/build/components/sidebar-edit-mode/page-panels/page-status.js +0 -188
  794. package/build/components/sidebar-edit-mode/page-panels/page-status.js.map +0 -1
  795. package/build/components/sidebar-edit-mode/plugin-sidebar/index.js +0 -89
  796. package/build/components/sidebar-edit-mode/plugin-sidebar/index.js.map +0 -1
  797. package/build/components/sidebar-navigation-screen-navigation-item/index.js +0 -54
  798. package/build/components/sidebar-navigation-screen-navigation-item/index.js.map +0 -1
  799. package/build/components/sync-state-with-url/use-sync-path-with-url.js +0 -132
  800. package/build/components/sync-state-with-url/use-sync-path-with-url.js.map +0 -1
  801. package/build/components/template-actions/rename-menu-item.js.map +0 -1
  802. package/build-module/components/add-new-template/new-template.js +0 -290
  803. package/build-module/components/add-new-template/new-template.js.map +0 -1
  804. package/build-module/components/add-new-template/template-actions-loading-screen.js +0 -20
  805. package/build-module/components/add-new-template/template-actions-loading-screen.js.map +0 -1
  806. package/build-module/components/header-edit-mode/more-menu/copy-content-menu-item.js +0 -52
  807. package/build-module/components/header-edit-mode/more-menu/copy-content-menu-item.js.map +0 -1
  808. package/build-module/components/header-edit-mode/plugin-more-menu-item/index.js +0 -73
  809. package/build-module/components/header-edit-mode/plugin-more-menu-item/index.js.map +0 -1
  810. package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +0 -65
  811. package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +0 -1
  812. package/build-module/components/header-edit-mode/tools-more-menu-group/index.js +0 -16
  813. package/build-module/components/header-edit-mode/tools-more-menu-group/index.js.map +0 -1
  814. package/build-module/components/keyboard-shortcut-help-modal/config.js +0 -71
  815. package/build-module/components/keyboard-shortcut-help-modal/config.js.map +0 -1
  816. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -40
  817. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +0 -1
  818. package/build-module/components/keyboard-shortcut-help-modal/index.js +0 -110
  819. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +0 -1
  820. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +0 -47
  821. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +0 -1
  822. package/build-module/components/keyboard-shortcuts/edit-mode.js +0 -72
  823. package/build-module/components/keyboard-shortcuts/edit-mode.js.map +0 -1
  824. package/build-module/components/page-actions/index.js +0 -27
  825. package/build-module/components/page-actions/index.js.map +0 -1
  826. package/build-module/components/page-actions/trash-page-menu-item.js +0 -47
  827. package/build-module/components/page-actions/trash-page-menu-item.js.map +0 -1
  828. package/build-module/components/page-templates-template-parts/actions.js +0 -199
  829. package/build-module/components/page-templates-template-parts/actions.js.map +0 -1
  830. package/build-module/components/page-templates-template-parts/add-new-template-part.js +0 -56
  831. package/build-module/components/page-templates-template-parts/add-new-template-part.js.map +0 -1
  832. package/build-module/components/page-templates-template-parts/hooks.js.map +0 -1
  833. package/build-module/components/page-templates-template-parts/index.js.map +0 -1
  834. package/build-module/components/preferences-modal/index.js +0 -30
  835. package/build-module/components/preferences-modal/index.js.map +0 -1
  836. package/build-module/components/sidebar-edit-mode/constants.js +0 -3
  837. package/build-module/components/sidebar-edit-mode/constants.js.map +0 -1
  838. package/build-module/components/sidebar-edit-mode/page-panels/page-status.js +0 -180
  839. package/build-module/components/sidebar-edit-mode/page-panels/page-status.js.map +0 -1
  840. package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js +0 -83
  841. package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js.map +0 -1
  842. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js +0 -46
  843. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js.map +0 -1
  844. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js +0 -124
  845. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js.map +0 -1
  846. package/build-module/components/template-actions/rename-menu-item.js.map +0 -1
  847. package/src/components/add-new-template/new-template.js +0 -429
  848. package/src/components/add-new-template/template-actions-loading-screen.js +0 -23
  849. package/src/components/header-edit-mode/more-menu/copy-content-menu-item.js +0 -51
  850. package/src/components/header-edit-mode/plugin-more-menu-item/index.js +0 -73
  851. package/src/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +0 -64
  852. package/src/components/header-edit-mode/tools-more-menu-group/index.js +0 -16
  853. package/src/components/keyboard-shortcut-help-modal/config.js +0 -53
  854. package/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -41
  855. package/src/components/keyboard-shortcut-help-modal/index.js +0 -151
  856. package/src/components/keyboard-shortcut-help-modal/shortcut.js +0 -70
  857. package/src/components/keyboard-shortcut-help-modal/style.scss +0 -61
  858. package/src/components/keyboard-shortcuts/edit-mode.js +0 -88
  859. package/src/components/page-actions/index.js +0 -30
  860. package/src/components/page-actions/trash-page-menu-item.js +0 -63
  861. package/src/components/page-templates-template-parts/actions.js +0 -277
  862. package/src/components/page-templates-template-parts/add-new-template-part.js +0 -60
  863. package/src/components/preferences-modal/index.js +0 -29
  864. package/src/components/sidebar-edit-mode/constants.js +0 -2
  865. package/src/components/sidebar-edit-mode/page-panels/page-status.js +0 -249
  866. package/src/components/sidebar-edit-mode/page-panels/style.scss +0 -40
  867. package/src/components/sidebar-edit-mode/plugin-sidebar/index.js +0 -80
  868. package/src/components/sidebar-navigation-screen-navigation-item/index.js +0 -59
  869. package/src/components/sync-state-with-url/use-sync-path-with-url.js +0 -147
  870. /package/build/components/{page-templates-template-parts → page-templates}/hooks.js +0 -0
  871. /package/build-module/components/{page-templates-template-parts → page-templates}/hooks.js +0 -0
  872. /package/src/components/{page-templates-template-parts → page-templates}/hooks.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"names":["_coreData","require","_components","_i18n","_data","_htmlEntities","_sidebarNavigationScreenNavigationMenus","_moreMenu","_interopRequireDefault","_singleNavigationMenu","_useNavigationMenuHandlers","_buildNavigationLabel","postType","exports","SidebarNavigationScreenNavigationMenu","params","postId","useNavigator","record","navigationMenu","isResolving","useEntityRecord","isSaving","isDeleting","useSelect","select","isSavingEntityRecord","isDeletingEntityRecord","coreStore","isLoading","menuTitle","title","rendered","slug","handleSave","handleDelete","handleDuplicate","useNavigationMenuHandlers","_handleDelete","_handleSave","edits","_handleDuplicate","_react","createElement","SidebarNavigationScreenWrapper","description","__","Spinner","className","content","raw","actions","default","decodeEntities","onDelete","onSave","onDuplicate","buildNavigationLabel","id","status"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menu/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEntityRecord, store as coreStore } from '@wordpress/core-data';\nimport {\n\t__experimentalUseNavigator as useNavigator,\n\tSpinner,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { SidebarNavigationScreenWrapper } from '../sidebar-navigation-screen-navigation-menus';\nimport ScreenNavigationMoreMenu from './more-menu';\nimport SingleNavigationMenu from './single-navigation-menu';\nimport useNavigationMenuHandlers from './use-navigation-menu-handlers';\nimport buildNavigationLabel from '../sidebar-navigation-screen-navigation-menus/build-navigation-label';\n\nexport const postType = `wp_navigation`;\n\nexport default function SidebarNavigationScreenNavigationMenu() {\n\tconst {\n\t\tparams: { postId },\n\t} = useNavigator();\n\n\tconst { record: navigationMenu, isResolving } = useEntityRecord(\n\t\t'postType',\n\t\tpostType,\n\t\tpostId\n\t);\n\n\tconst { isSaving, isDeleting } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { isSavingEntityRecord, isDeletingEntityRecord } =\n\t\t\t\tselect( coreStore );\n\n\t\t\treturn {\n\t\t\t\tisSaving: isSavingEntityRecord( 'postType', postType, postId ),\n\t\t\t\tisDeleting: isDeletingEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\tpostId\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ postId ]\n\t);\n\n\tconst isLoading = isResolving || isSaving || isDeleting;\n\n\tconst menuTitle = navigationMenu?.title?.rendered || navigationMenu?.slug;\n\n\tconst { handleSave, handleDelete, handleDuplicate } =\n\t\tuseNavigationMenuHandlers();\n\n\tconst _handleDelete = () => handleDelete( navigationMenu );\n\tconst _handleSave = ( edits ) => handleSave( navigationMenu, edits );\n\tconst _handleDuplicate = () => handleDuplicate( navigationMenu );\n\n\tif ( isLoading ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Navigation menus are a curated collection of blocks that allow visitors to get around your site.'\n\t\t\t\t) }\n\t\t\t>\n\t\t\t\t<Spinner className=\"edit-site-sidebar-navigation-screen-navigation-menus__loading\" />\n\t\t\t</SidebarNavigationScreenWrapper>\n\t\t);\n\t}\n\n\tif ( ! isLoading && ! navigationMenu ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper\n\t\t\t\tdescription={ __( 'Navigation Menu missing.' ) }\n\t\t\t/>\n\t\t);\n\t}\n\n\tif ( ! navigationMenu?.content?.raw ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper\n\t\t\t\tactions={\n\t\t\t\t\t<ScreenNavigationMoreMenu\n\t\t\t\t\t\tmenuTitle={ decodeEntities( menuTitle ) }\n\t\t\t\t\t\tonDelete={ _handleDelete }\n\t\t\t\t\t\tonSave={ _handleSave }\n\t\t\t\t\t\tonDuplicate={ _handleDuplicate }\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\ttitle={ buildNavigationLabel(\n\t\t\t\t\tnavigationMenu?.title,\n\t\t\t\t\tnavigationMenu?.id,\n\t\t\t\t\tnavigationMenu?.status\n\t\t\t\t) }\n\t\t\t\tdescription={ __( 'This Navigation Menu is empty.' ) }\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn (\n\t\t<SingleNavigationMenu\n\t\t\tnavigationMenu={ navigationMenu }\n\t\t\thandleDelete={ _handleDelete }\n\t\t\thandleSave={ _handleSave }\n\t\t\thandleDuplicate={ _handleDuplicate }\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;;;;AAGA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAIA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAA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;IACpBjC,cAAc,EAAGA,cAAgB;IACjCgB,YAAY,EAAGG,aAAe;IAC9BJ,UAAU,EAAGK,WAAa;IAC1BH,eAAe,EAAGK;EAAkB,CACpC,CAAC;AAEJ"}
1
+ {"version":3,"names":["_coreData","require","_components","_i18n","_data","_htmlEntities","_router","_sidebarNavigationScreenNavigationMenus","_moreMenu","_interopRequireDefault","_singleNavigationMenu","_useNavigationMenuHandlers","_buildNavigationLabel","_lockUnlock","useLocation","unlock","routerPrivateApis","postType","exports","SidebarNavigationScreenNavigationMenu","params","postId","record","navigationMenu","isResolving","useEntityRecord","isSaving","isDeleting","useSelect","select","isSavingEntityRecord","isDeletingEntityRecord","coreStore","isLoading","menuTitle","title","rendered","slug","handleSave","handleDelete","handleDuplicate","useNavigationMenuHandlers","_handleDelete","_handleSave","edits","_handleDuplicate","_react","createElement","SidebarNavigationScreenWrapper","description","__","Spinner","className","content","raw","actions","default","decodeEntities","onDelete","onSave","onDuplicate","buildNavigationLabel","id","status"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menu/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEntityRecord, store as coreStore } from '@wordpress/core-data';\nimport { Spinner } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport { SidebarNavigationScreenWrapper } from '../sidebar-navigation-screen-navigation-menus';\nimport ScreenNavigationMoreMenu from './more-menu';\nimport SingleNavigationMenu from './single-navigation-menu';\nimport useNavigationMenuHandlers from './use-navigation-menu-handlers';\nimport buildNavigationLabel from '../sidebar-navigation-screen-navigation-menus/build-navigation-label';\nimport { unlock } from '../../lock-unlock';\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nexport const postType = `wp_navigation`;\n\nexport default function SidebarNavigationScreenNavigationMenu() {\n\tconst {\n\t\tparams: { postId },\n\t} = useLocation();\n\n\tconst { record: navigationMenu, isResolving } = useEntityRecord(\n\t\t'postType',\n\t\tpostType,\n\t\tpostId\n\t);\n\n\tconst { isSaving, isDeleting } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { isSavingEntityRecord, isDeletingEntityRecord } =\n\t\t\t\tselect( coreStore );\n\n\t\t\treturn {\n\t\t\t\tisSaving: isSavingEntityRecord( 'postType', postType, postId ),\n\t\t\t\tisDeleting: isDeletingEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\tpostId\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ postId ]\n\t);\n\n\tconst isLoading = isResolving || isSaving || isDeleting;\n\n\tconst menuTitle = navigationMenu?.title?.rendered || navigationMenu?.slug;\n\n\tconst { handleSave, handleDelete, handleDuplicate } =\n\t\tuseNavigationMenuHandlers();\n\n\tconst _handleDelete = () => handleDelete( navigationMenu );\n\tconst _handleSave = ( edits ) => handleSave( navigationMenu, edits );\n\tconst _handleDuplicate = () => handleDuplicate( navigationMenu );\n\n\tif ( isLoading ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Navigation Menus are a curated collection of blocks that allow visitors to get around your site.'\n\t\t\t\t) }\n\t\t\t>\n\t\t\t\t<Spinner className=\"edit-site-sidebar-navigation-screen-navigation-menus__loading\" />\n\t\t\t</SidebarNavigationScreenWrapper>\n\t\t);\n\t}\n\n\tif ( ! isLoading && ! navigationMenu ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper\n\t\t\t\tdescription={ __( 'Navigation Menu missing.' ) }\n\t\t\t/>\n\t\t);\n\t}\n\n\tif ( ! navigationMenu?.content?.raw ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper\n\t\t\t\tactions={\n\t\t\t\t\t<ScreenNavigationMoreMenu\n\t\t\t\t\t\tmenuTitle={ decodeEntities( menuTitle ) }\n\t\t\t\t\t\tonDelete={ _handleDelete }\n\t\t\t\t\t\tonSave={ _handleSave }\n\t\t\t\t\t\tonDuplicate={ _handleDuplicate }\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\ttitle={ buildNavigationLabel(\n\t\t\t\t\tnavigationMenu?.title,\n\t\t\t\t\tnavigationMenu?.id,\n\t\t\t\t\tnavigationMenu?.status\n\t\t\t\t) }\n\t\t\t\tdescription={ __( 'This Navigation Menu is empty.' ) }\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn (\n\t\t<SingleNavigationMenu\n\t\t\tnavigationMenu={ navigationMenu }\n\t\t\thandleDelete={ _handleDelete }\n\t\t\thandleSave={ _handleSave }\n\t\t\thandleDuplicate={ _handleDuplicate }\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;;;;AAGA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AAKA,IAAAM,uCAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAC,sBAAA,CAAAR,OAAA;AACA,IAAAS,qBAAA,GAAAD,sBAAA,CAAAR,OAAA;AACA,IAAAU,0BAAA,GAAAF,sBAAA,CAAAR,OAAA;AACA,IAAAW,qBAAA,GAAAH,sBAAA,CAAAR,OAAA;AACA,IAAAY,WAAA,GAAAZ,OAAA;AAlBA;AACA;AACA;;AAQA;AACA;AACA;;AAQA,MAAM;EAAEa;AAAY,CAAC,GAAG,IAAAC,kBAAM,EAAEC,mBAAkB,CAAC;AAE5C,MAAMC,QAAQ,GAAAC,OAAA,CAAAD,QAAA,GAAI,eAAc;AAExB,SAASE,qCAAqCA,CAAA,EAAG;EAC/D,MAAM;IACLC,MAAM,EAAE;MAAEC;IAAO;EAClB,CAAC,GAAGP,WAAW,CAAC,CAAC;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,IAAI,CAAEV,cAAc,EAAG;IACtC,OACC,IAAAuB,MAAA,CAAAC,aAAA,EAACxC,uCAAA,CAAAyC,8BAA8B;MAC9BC,WAAW,EAAG,IAAAC,QAAE,EAAE,0BAA2B;IAAG,CAChD,CAAC;EAEJ;EAEA,IAAK,CAAE3B,cAAc,EAAE8B,OAAO,EAAEC,GAAG,EAAG;IACrC,OACC,IAAAR,MAAA,CAAAC,aAAA,EAACxC,uCAAA,CAAAyC,8BAA8B;MAC9BO,OAAO,EACN,IAAAT,MAAA,CAAAC,aAAA,EAACvC,SAAA,CAAAgD,OAAwB;QACxBtB,SAAS,EAAG,IAAAuB,4BAAc,EAAEvB,SAAU,CAAG;QACzCwB,QAAQ,EAAGhB,aAAe;QAC1BiB,MAAM,EAAGhB,WAAa;QACtBiB,WAAW,EAAGf;MAAkB,CAChC,CACD;MACDV,KAAK,EAAG,IAAA0B,6BAAoB,EAC3BtC,cAAc,EAAEY,KAAK,EACrBZ,cAAc,EAAEuC,EAAE,EAClBvC,cAAc,EAAEwC,MACjB,CAAG;MACHd,WAAW,EAAG,IAAAC,QAAE,EAAE,gCAAiC;IAAG,CACtD,CAAC;EAEJ;EAEA,OACC,IAAAJ,MAAA,CAAAC,aAAA,EAACrC,qBAAA,CAAA8C,OAAoB;IACpBjC,cAAc,EAAGA,cAAgB;IACjCgB,YAAY,EAAGG,aAAe;IAC9BJ,UAAU,EAAGK,WAAa;IAC1BH,eAAe,EAAGK;EAAkB,CACpC,CAAC;AAEJ","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_icons","_i18n","_element","_renameModal","_interopRequireDefault","_deleteConfirmDialog","POPOVER_PROPS","position","ScreenNavigationMoreMenu","props","onDelete","onSave","onDuplicate","menuTitle","renameModalOpen","setRenameModalOpen","useState","deleteConfirmDialogOpen","setDeleteConfirmDialogOpen","closeModals","openRenameModal","openDeleteConfirmDialog","_react","createElement","Fragment","DropdownMenu","className","label","__","icon","moreVertical","popoverProps","onClose","MenuGroup","MenuItem","onClick","isDestructive","default","onConfirm"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menu/more-menu.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { DropdownMenu, MenuItem, MenuGroup } from '@wordpress/components';\nimport { moreVertical } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport RenameModal from './rename-modal';\nimport DeleteConfirmDialog from './delete-confirm-dialog';\n\nconst POPOVER_PROPS = {\n\tposition: 'bottom right',\n};\n\nexport default function ScreenNavigationMoreMenu( props ) {\n\tconst { onDelete, onSave, onDuplicate, menuTitle } = props;\n\n\tconst [ renameModalOpen, setRenameModalOpen ] = useState( false );\n\tconst [ deleteConfirmDialogOpen, setDeleteConfirmDialogOpen ] =\n\t\tuseState( false );\n\n\tconst closeModals = () => {\n\t\tsetRenameModalOpen( false );\n\t\tsetDeleteConfirmDialogOpen( false );\n\t};\n\tconst openRenameModal = () => setRenameModalOpen( true );\n\tconst openDeleteConfirmDialog = () => setDeleteConfirmDialogOpen( true );\n\n\treturn (\n\t\t<>\n\t\t\t<DropdownMenu\n\t\t\t\tclassName=\"sidebar-navigation__more-menu\"\n\t\t\t\tlabel={ __( 'Actions' ) }\n\t\t\t\ticon={ moreVertical }\n\t\t\t\tpopoverProps={ POPOVER_PROPS }\n\t\t\t>\n\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\topenRenameModal();\n\t\t\t\t\t\t\t\t\t// Close the dropdown after opening the modal.\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Rename' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tonDuplicate();\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Duplicate' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tisDestructive\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\topenDeleteConfirmDialog();\n\n\t\t\t\t\t\t\t\t\t// Close the dropdown after opening the modal.\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Delete' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</DropdownMenu>\n\t\t\t{ deleteConfirmDialogOpen && (\n\t\t\t\t<DeleteConfirmDialog\n\t\t\t\t\tonClose={ closeModals }\n\t\t\t\t\tonConfirm={ onDelete }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ renameModalOpen && (\n\t\t\t\t<RenameModal\n\t\t\t\t\tonClose={ closeModals }\n\t\t\t\t\tmenuTitle={ menuTitle }\n\t\t\t\t\tonSave={ onSave }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAKA,IAAAI,YAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,oBAAA,GAAAD,sBAAA,CAAAL,OAAA;AAZA;AACA;AACA;;AAMA;AACA;AACA;;AAIA,MAAMO,aAAa,GAAG;EACrBC,QAAQ,EAAE;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AAM;MACfvB,WAAW,CAAC,CAAC;MACboB,OAAO,CAAC,CAAC;IACV;EAAG,GAED,IAAAJ,QAAE,EAAE,WAAY,CACT,CAAC,EACX,IAAAN,MAAA,CAAAC,aAAA,EAACzB,WAAA,CAAAoC,QAAQ;IACRE,aAAa;IACbD,OAAO,EAAGA,CAAA,KAAM;MACfd,uBAAuB,CAAC,CAAC;;MAEzB;MACAW,OAAO,CAAC,CAAC;IACV;EAAG,GAED,IAAAJ,QAAE,EAAE,QAAS,CACN,CACA,CACP,CAEO,CAAC,EACbX,uBAAuB,IACxB,IAAAK,MAAA,CAAAC,aAAA,EAAClB,oBAAA,CAAAgC,OAAmB;IACnBL,OAAO,EAAGb,WAAa;IACvBmB,SAAS,EAAG5B;EAAU,CACtB,CACD,EACCI,eAAe,IAChB,IAAAQ,MAAA,CAAAC,aAAA,EAACpB,YAAA,CAAAkC,OAAW;IACXL,OAAO,EAAGb,WAAa;IACvBN,SAAS,EAAGA,SAAW;IACvBF,MAAM,EAAGA;EAAQ,CACjB,CAED,CAAC;AAEL"}
1
+ {"version":3,"names":["_components","require","_icons","_i18n","_element","_renameModal","_interopRequireDefault","_deleteConfirmDialog","POPOVER_PROPS","position","ScreenNavigationMoreMenu","props","onDelete","onSave","onDuplicate","menuTitle","renameModalOpen","setRenameModalOpen","useState","deleteConfirmDialogOpen","setDeleteConfirmDialogOpen","closeModals","openRenameModal","openDeleteConfirmDialog","_react","createElement","Fragment","DropdownMenu","className","label","__","icon","moreVertical","popoverProps","onClose","MenuGroup","MenuItem","onClick","isDestructive","default","onConfirm"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menu/more-menu.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { DropdownMenu, MenuItem, MenuGroup } from '@wordpress/components';\nimport { moreVertical } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport RenameModal from './rename-modal';\nimport DeleteConfirmDialog from './delete-confirm-dialog';\n\nconst POPOVER_PROPS = {\n\tposition: 'bottom right',\n};\n\nexport default function ScreenNavigationMoreMenu( props ) {\n\tconst { onDelete, onSave, onDuplicate, menuTitle } = props;\n\n\tconst [ renameModalOpen, setRenameModalOpen ] = useState( false );\n\tconst [ deleteConfirmDialogOpen, setDeleteConfirmDialogOpen ] =\n\t\tuseState( false );\n\n\tconst closeModals = () => {\n\t\tsetRenameModalOpen( false );\n\t\tsetDeleteConfirmDialogOpen( false );\n\t};\n\tconst openRenameModal = () => setRenameModalOpen( true );\n\tconst openDeleteConfirmDialog = () => setDeleteConfirmDialogOpen( true );\n\n\treturn (\n\t\t<>\n\t\t\t<DropdownMenu\n\t\t\t\tclassName=\"sidebar-navigation__more-menu\"\n\t\t\t\tlabel={ __( 'Actions' ) }\n\t\t\t\ticon={ moreVertical }\n\t\t\t\tpopoverProps={ POPOVER_PROPS }\n\t\t\t>\n\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\topenRenameModal();\n\t\t\t\t\t\t\t\t\t// Close the dropdown after opening the modal.\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Rename' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tonDuplicate();\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Duplicate' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tisDestructive\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\topenDeleteConfirmDialog();\n\n\t\t\t\t\t\t\t\t\t// Close the dropdown after opening the modal.\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Delete' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</DropdownMenu>\n\t\t\t{ deleteConfirmDialogOpen && (\n\t\t\t\t<DeleteConfirmDialog\n\t\t\t\t\tonClose={ closeModals }\n\t\t\t\t\tonConfirm={ onDelete }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ renameModalOpen && (\n\t\t\t\t<RenameModal\n\t\t\t\t\tonClose={ closeModals }\n\t\t\t\t\tmenuTitle={ menuTitle }\n\t\t\t\t\tonSave={ onSave }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAKA,IAAAI,YAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,oBAAA,GAAAD,sBAAA,CAAAL,OAAA;AAZA;AACA;AACA;;AAMA;AACA;AACA;;AAIA,MAAMO,aAAa,GAAG;EACrBC,QAAQ,EAAE;AACX,CAAC;AAEc,SAASC,wBAAwBA,CAAEC,KAAK,EAAG;EACzD,MAAM;IAAEC,QAAQ;IAAEC,MAAM;IAAEC,WAAW;IAAEC;EAAU,CAAC,GAAGJ,KAAK;EAE1D,MAAM,CAAEK,eAAe,EAAEC,kBAAkB,CAAE,GAAG,IAAAC,iBAAQ,EAAE,KAAM,CAAC;EACjE,MAAM,CAAEC,uBAAuB,EAAEC,0BAA0B,CAAE,GAC5D,IAAAF,iBAAQ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AE,EAAE,QAAS,CACN,CACA,CACP,CAEO,CAAC,EACbX,uBAAuB,IACxB,IAAAK,MAAA,CAAAC,aAAA,EAAClB,oBAAA,CAAAgC,OAAmB;IACnBL,OAAO,EAAGb,WAAa;IACvBmB,SAAS,EAAG5B;EAAU,CACtB,CACD,EACCI,eAAe,IAChB,IAAAQ,MAAA,CAAAC,aAAA,EAACpB,YAAA,CAAAkC,OAAW;IACXL,OAAO,EAAGb,WAAa;IACvBN,SAAS,EAAGA,SAAW;IACvBF,MAAM,EAAGA;EAAQ,CACjB,CAED,CAAC;AAEL","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_data","_blockEditor","_blocks","_lockUnlock","_store","_navigationMenuContent","_interopRequireDefault","noop","NavigationMenuEditor","navigationMenuId","storedSettings","useSelect","select","getSettings","unlock","editSiteStore","blocks","useMemo","createBlock","ref","length","_react","createElement","BlockEditorProvider","settings","value","onChange","onInput","className","default","rootClientId","clientId"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { BlockEditorProvider } from '@wordpress/block-editor';\nimport { createBlock } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport NavigationMenuContent from '../sidebar-navigation-screen-navigation-menus/navigation-menu-content';\n\nconst noop = () => {};\n\nexport default function NavigationMenuEditor( { navigationMenuId } ) {\n\tconst { storedSettings } = useSelect( ( select ) => {\n\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\n\t\treturn {\n\t\t\tstoredSettings: getSettings(),\n\t\t};\n\t}, [] );\n\n\tconst blocks = useMemo( () => {\n\t\tif ( ! navigationMenuId ) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [ createBlock( 'core/navigation', { ref: navigationMenuId } ) ];\n\t}, [ navigationMenuId ] );\n\n\tif ( ! navigationMenuId || ! blocks?.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<BlockEditorProvider\n\t\t\tsettings={ storedSettings }\n\t\t\tvalue={ blocks }\n\t\t\tonChange={ noop }\n\t\t\tonInput={ noop }\n\t\t>\n\t\t\t<div className=\"edit-site-sidebar-navigation-screen-navigation-menus__content\">\n\t\t\t\t<NavigationMenuContent rootClientId={ blocks[ 0 ].clientId } />\n\t\t\t</div>\n\t\t</BlockEditorProvider>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAKA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,sBAAA,GAAAC,sBAAA,CAAAP,OAAA;AAbA;AACA;AACA;;AAMA;AACA;AACA;;AAKA,MAAMQ,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;AAEN,SAASC,oBAAoBA,CAAE;EAAEC;AAAiB,CAAC,EAAG;EACpE,MAAM;IAAEC;EAAe,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IACnD,MAAM;MAAEC;IAAY,CAAC,GAAG,IAAAC,kBAAM,EAAEF,MAAM,CAAEG,YAAc,CAAE,CAAC;IAEzD,OAAO;MACNL,cAAc,EAAEG,WAAW,CAAC;IAC7B,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,MAAMG,MAAM,GAAG,IAAAC,gBAAO,EAAE,MAAM;IAC7B,IAAK,CAAER,gBAAgB,EAAG;MACzB,OAAO,EAAE;IACV;IAEA,OAAO,CAAE,IAAAS,mBAAW,EAAE,iBAAiB,EAAE;MAAEC,GAAG,EAAEV;IAAiB,CAAE,CAAC,CAAE;EACvE,CAAC,EAAE,CAAEA,gBAAgB,CAAG,CAAC;EAEzB,IAAK,CAAEA,gBAAgB,IAAI,CAAEO,MAAM,EAAEI,MAAM,EAAG;IAC7C,OAAO,IAAI;EACZ;EAEA,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACrB,YAAA,CAAAsB,mBAAmB;IACnBC,QAAQ,EAAGd,cAAgB;IAC3Be,KAAK,EAAGT,MAAQ;IAChBU,QAAQ,EAAGnB,IAAM;IACjBoB,OAAO,EAAGpB;EAAM,GAEhB,IAAAc,MAAA,CAAAC,aAAA;IAAKM,SAAS,EAAC;EAA+D,GAC7E,IAAAP,MAAA,CAAAC,aAAA,EAACjB,sBAAA,CAAAwB,OAAqB;IAACC,YAAY,EAAGd,MAAM,CAAE,CAAC,CAAE,CAACe;EAAU,CAAE,CAC1D,CACe,CAAC;AAExB"}
1
+ {"version":3,"names":["_element","require","_data","_blockEditor","_blocks","_lockUnlock","_store","_navigationMenuContent","_interopRequireDefault","noop","NavigationMenuEditor","navigationMenuId","storedSettings","useSelect","select","getSettings","unlock","editSiteStore","blocks","useMemo","createBlock","ref","length","_react","createElement","BlockEditorProvider","settings","value","onChange","onInput","className","default","rootClientId","clientId"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { BlockEditorProvider } from '@wordpress/block-editor';\nimport { createBlock } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport NavigationMenuContent from '../sidebar-navigation-screen-navigation-menus/navigation-menu-content';\n\nconst noop = () => {};\n\nexport default function NavigationMenuEditor( { navigationMenuId } ) {\n\tconst { storedSettings } = useSelect( ( select ) => {\n\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\n\t\treturn {\n\t\t\tstoredSettings: getSettings(),\n\t\t};\n\t}, [] );\n\n\tconst blocks = useMemo( () => {\n\t\tif ( ! navigationMenuId ) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [ createBlock( 'core/navigation', { ref: navigationMenuId } ) ];\n\t}, [ navigationMenuId ] );\n\n\tif ( ! navigationMenuId || ! blocks?.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<BlockEditorProvider\n\t\t\tsettings={ storedSettings }\n\t\t\tvalue={ blocks }\n\t\t\tonChange={ noop }\n\t\t\tonInput={ noop }\n\t\t>\n\t\t\t<div className=\"edit-site-sidebar-navigation-screen-navigation-menus__content\">\n\t\t\t\t<NavigationMenuContent rootClientId={ blocks[ 0 ].clientId } />\n\t\t\t</div>\n\t\t</BlockEditorProvider>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAKA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,sBAAA,GAAAC,sBAAA,CAAAP,OAAA;AAbA;AACA;AACA;;AAMA;AACA;AACA;;AAKA,MAAMQ,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;AAEN,SAASC,oBAAoBA,CAAE;EAAEC;AAAiB,CAAC,EAAG;EACpE,MAAM;IAAEC;EAAe,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IACnD,MAAM;MAAEC;IAAY,CAAC,GAAG,IAAAC,kBAAM,EAAEF,MAAM,CAAEG,YAAc,CAAE,CAAC;IAEzD,OAAO;MACNL,cAAc,EAAEG,WAAW,CAAC;IAC7B,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,MAAMG,MAAM,GAAG,IAAAC,gBAAO,EAAE,MAAM;IAC7B,IAAK,CAAER,gBAAgB,EAAG;MACzB,OAAO,EAAE;IACV;IAEA,OAAO,CAAE,IAAAS,mBAAW,EAAE,iBAAiB,EAAE;MAAEC,GAAG,EAAEV;IAAiB,CAAE,CAAC,CAAE;EACvE,CAAC,EAAE,CAAEA,gBAAgB,CAAG,CAAC;EAEzB,IAAK,CAAEA,gBAAgB,IAAI,CAAEO,MAAM,EAAEI,MAAM,EAAG;IAC7C,OAAO,IAAI;EACZ;EAEA,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACrB,YAAA,CAAAsB,mBAAmB;IACnBC,QAAQ,EAAGd,cAAgB;IAC3Be,KAAK,EAAGT,MAAQ;IAChBU,QAAQ,EAAGnB,IAAM;IACjBoB,OAAO,EAAGpB;EAAM,GAEhB,IAAAc,MAAA,CAAAC,aAAA;IAAKM,SAAS,EAAC;EAA+D,GAC7E,IAAAP,MAAA,CAAAC,aAAA,EAACjB,sBAAA,CAAAwB,OAAqB;IAACC,YAAY,EAAGd,MAAM,CAAE,CAAC,CAAE,CAACe;EAAU,CAAE,CAC1D,CACe,CAAC;AAExB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_i18n","_element","notEmptyString","testString","trim","length","RenameModal","menuTitle","onClose","onSave","editedMenuTitle","setEditedMenuTitle","useState","titleHasChanged","isEditedMenuTitleValid","_react","createElement","Modal","title","__","onRequestClose","className","__experimentalVStack","spacing","TextControl","__nextHasNoMarginBottom","__next40pxDefaultSize","value","placeholder","onChange","__experimentalHStack","justify","Button","variant","onClick","disabled","type","e","preventDefault"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menu/rename-modal.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\tButton,\n\tTextControl,\n\tModal,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\n\nconst notEmptyString = ( testString ) => testString?.trim()?.length > 0;\n\nexport default function RenameModal( { menuTitle, onClose, onSave } ) {\n\tconst [ editedMenuTitle, setEditedMenuTitle ] = useState( menuTitle );\n\n\tconst titleHasChanged = editedMenuTitle !== menuTitle;\n\n\tconst isEditedMenuTitleValid =\n\t\ttitleHasChanged && notEmptyString( editedMenuTitle );\n\n\treturn (\n\t\t<Modal title={ __( 'Rename' ) } onRequestClose={ onClose }>\n\t\t\t<form className=\"sidebar-navigation__rename-modal-form\">\n\t\t\t\t<VStack spacing=\"3\">\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvalue={ editedMenuTitle }\n\t\t\t\t\t\tplaceholder={ __( 'Navigation title' ) }\n\t\t\t\t\t\tonChange={ setEditedMenuTitle }\n\t\t\t\t\t/>\n\t\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t\t</Button>\n\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tdisabled={ ! isEditedMenuTitleValid }\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\tonClick={ ( e ) => {\n\t\t\t\t\t\t\t\te.preventDefault();\n\n\t\t\t\t\t\t\t\tif ( ! isEditedMenuTitleValid ) {\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonSave( { title: editedMenuTitle } );\n\n\t\t\t\t\t\t\t\t// Immediate close avoids ability to hit save multiple times.\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{ __( 'Save' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</HStack>\n\t\t\t\t</VStack>\n\t\t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,OAAO,EAAG1B;EAAS,GAEjB,IAAAW,QAAE,EAAE,QAAS,CACR,CAAC,EAET,IAAAJ,MAAA,CAAAC,aAAA,EAAClB,WAAA,CAAAkC,MAAM;IACNN,qBAAqB;IACrBS,QAAQ,EAAG,CAAErB,sBAAwB;IACrCmB,OAAO,EAAC,SAAS;IACjBG,IAAI,EAAC,QAAQ;IACbF,OAAO,EAAKG,CAAC,IAAM;MAClBA,CAAC,CAACC,cAAc,CAAC,CAAC;MAElB,IAAK,CAAExB,sBAAsB,EAAG;QAC/B;MACD;MACAL,MAAM,CAAE;QAAES,KAAK,EAAER;MAAgB,CAAE,CAAC;;MAEpC;MACAF,OAAO,CAAC,CAAC;IACV;EAAG,GAED,IAAAW,QAAE,EAAE,MAAO,CACN,CACD,CACD,CACH,CACA,CAAC;AAEV"}
1
+ {"version":3,"names":["_components","require","_i18n","_element","notEmptyString","testString","trim","length","RenameModal","menuTitle","onClose","onSave","editedMenuTitle","setEditedMenuTitle","useState","titleHasChanged","isEditedMenuTitleValid","_react","createElement","Modal","title","__","onRequestClose","className","__experimentalVStack","spacing","TextControl","__nextHasNoMarginBottom","__next40pxDefaultSize","value","placeholder","onChange","__experimentalHStack","justify","Button","variant","onClick","disabled","type","e","preventDefault"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menu/rename-modal.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\tButton,\n\tTextControl,\n\tModal,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\n\nconst notEmptyString = ( testString ) => testString?.trim()?.length > 0;\n\nexport default function RenameModal( { menuTitle, onClose, onSave } ) {\n\tconst [ editedMenuTitle, setEditedMenuTitle ] = useState( menuTitle );\n\n\tconst titleHasChanged = editedMenuTitle !== menuTitle;\n\n\tconst isEditedMenuTitleValid =\n\t\ttitleHasChanged && notEmptyString( editedMenuTitle );\n\n\treturn (\n\t\t<Modal title={ __( 'Rename' ) } onRequestClose={ onClose }>\n\t\t\t<form className=\"sidebar-navigation__rename-modal-form\">\n\t\t\t\t<VStack spacing=\"3\">\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvalue={ editedMenuTitle }\n\t\t\t\t\t\tplaceholder={ __( 'Navigation title' ) }\n\t\t\t\t\t\tonChange={ setEditedMenuTitle }\n\t\t\t\t\t/>\n\t\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t\t</Button>\n\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tdisabled={ ! isEditedMenuTitleValid }\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\tonClick={ ( e ) => {\n\t\t\t\t\t\t\t\te.preventDefault();\n\n\t\t\t\t\t\t\t\tif ( ! isEditedMenuTitleValid ) {\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonSave( { title: editedMenuTitle } );\n\n\t\t\t\t\t\t\t\t// Immediate close avoids ability to hit save multiple times.\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{ __( 'Save' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</HStack>\n\t\t\t\t</VStack>\n\t\t\t</form>\n\t\t</Modal>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAOA,IAAAC,KAAA,G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ClB,WAAA,CAAAkC,MAAM;IACNN,qBAAqB;IACrBS,QAAQ,EAAG,CAAErB,sBAAwB;IACrCmB,OAAO,EAAC,SAAS;IACjBG,IAAI,EAAC,QAAQ;IACbF,OAAO,EAAKG,CAAC,IAAM;MAClBA,CAAC,CAACC,cAAc,CAAC,CAAC;MAElB,IAAK,CAAExB,sBAAsB,EAAG;QAC/B;MACD;MACAL,MAAM,CAAE;QAAES,KAAK,EAAER;MAAgB,CAAE,CAAC;;MAEpC;MACAF,OAAO,CAAC,CAAC;IACV;EAAG,GAED,IAAAW,QAAE,EAAE,MAAO,CACN,CACD,CACD,CACH,CACA,CAAC;AAEV","ignoreList":[]}
@@ -35,7 +35,7 @@ function SingleNavigationMenu({
35
35
  onDuplicate: handleDuplicate
36
36
  })),
37
37
  title: (0, _buildNavigationLabel.default)(navigationMenu?.title, navigationMenu?.id, navigationMenu?.status),
38
- description: (0, _i18n.__)('Navigation menus are a curated collection of blocks that allow visitors to get around your site.')
38
+ description: (0, _i18n.__)('Navigation Menus are a curated collection of blocks that allow visitors to get around your site.')
39
39
  }, (0, _react.createElement)(_navigationMenuEditor.default, {
40
40
  navigationMenuId: navigationMenu?.id
41
41
  }));
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_htmlEntities","_sidebarNavigationScreenNavigationMenus","_moreMenu","_interopRequireDefault","_navigationMenuEditor","_buildNavigationLabel","SingleNavigationMenu","navigationMenu","handleDelete","handleDuplicate","handleSave","menuTitle","title","rendered","_react","createElement","SidebarNavigationScreenWrapper","actions","Fragment","default","decodeEntities","onDelete","onSave","onDuplicate","buildNavigationLabel","id","status","description","__","navigationMenuId"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { decodeEntities } from '@wordpress/html-entities';\n/**\n * Internal dependencies\n */\nimport { SidebarNavigationScreenWrapper } from '../sidebar-navigation-screen-navigation-menus';\nimport ScreenNavigationMoreMenu from './more-menu';\nimport NavigationMenuEditor from './navigation-menu-editor';\nimport buildNavigationLabel from '../sidebar-navigation-screen-navigation-menus/build-navigation-label';\n\nexport default function SingleNavigationMenu( {\n\tnavigationMenu,\n\thandleDelete,\n\thandleDuplicate,\n\thandleSave,\n} ) {\n\tconst menuTitle = navigationMenu?.title?.rendered;\n\n\treturn (\n\t\t<SidebarNavigationScreenWrapper\n\t\t\tactions={\n\t\t\t\t<>\n\t\t\t\t\t<ScreenNavigationMoreMenu\n\t\t\t\t\t\tmenuTitle={ decodeEntities( menuTitle ) }\n\t\t\t\t\t\tonDelete={ handleDelete }\n\t\t\t\t\t\tonSave={ handleSave }\n\t\t\t\t\t\tonDuplicate={ handleDuplicate }\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t}\n\t\t\ttitle={ buildNavigationLabel(\n\t\t\t\tnavigationMenu?.title,\n\t\t\t\tnavigationMenu?.id,\n\t\t\t\tnavigationMenu?.status\n\t\t\t) }\n\t\t\tdescription={ __(\n\t\t\t\t'Navigation menus are a curated collection of blocks that allow visitors to get around your site.'\n\t\t\t) }\n\t\t>\n\t\t\t<NavigationMenuEditor navigationMenuId={ navigationMenu?.id } />\n\t\t</SidebarNavigationScreenWrapper>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAIA,IAAAE,uCAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,qBAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,qBAAA,GAAAF,sBAAA,CAAAJ,OAAA;AAXA;AACA;AACA;;AAGA;AACA;AACA;;AAMe,SAASO,oBAAoBA,CAAE;EAC7CC,cAAc;EACdC,YAAY;EACZC,eAAe;EACfC;AACD,CAAC,EAAG;EACH,MAAMC,SAAS,GAAGJ,cAAc,EAAEK,KAAK,EAAEC,QAAQ;EAEjD,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACd,uCAAA,CAAAe,8BAA8B;IAC9BC,OAAO,EACN,IAAAH,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAI,QAAA,QACC,IAAAJ,MAAA,CAAAC,aAAA,EAACb,SAAA,CAAAiB,OAAwB;MACxBR,SAAS,EAAG,IAAAS,4BAAc,EAAET,SAAU,CAAG;MACzCU,QAAQ,EAAGb,YAAc;MACzBc,MAAM,EAAGZ,UAAY;MACrBa,WAAW,EAAGd;IAAiB,CAC/B,CACA,CACF;IACDG,KAAK,EAAG,IAAAY,6BAAoB,EAC3BjB,cAAc,EAAEK,KAAK,EACrBL,cAAc,EAAEkB,EAAE,EAClBlB,cAAc,EAAEmB,MACjB,CAAG;IACHC,WAAW,EAAG,IAAAC,QAAE,EACf,kGACD;EAAG,GAEH,IAAAd,MAAA,CAAAC,aAAA,EAACX,qBAAA,CAAAe,OAAoB;IAACU,gBAAgB,EAAGtB,cAAc,EAAEkB;EAAI,CAAE,CAChC,CAAC;AAEnC"}
1
+ {"version":3,"names":["_i18n","require","_htmlEntities","_sidebarNavigationScreenNavigationMenus","_moreMenu","_interopRequireDefault","_navigationMenuEditor","_buildNavigationLabel","SingleNavigationMenu","navigationMenu","handleDelete","handleDuplicate","handleSave","menuTitle","title","rendered","_react","createElement","SidebarNavigationScreenWrapper","actions","Fragment","default","decodeEntities","onDelete","onSave","onDuplicate","buildNavigationLabel","id","status","description","__","navigationMenuId"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { decodeEntities } from '@wordpress/html-entities';\n/**\n * Internal dependencies\n */\nimport { SidebarNavigationScreenWrapper } from '../sidebar-navigation-screen-navigation-menus';\nimport ScreenNavigationMoreMenu from './more-menu';\nimport NavigationMenuEditor from './navigation-menu-editor';\nimport buildNavigationLabel from '../sidebar-navigation-screen-navigation-menus/build-navigation-label';\n\nexport default function SingleNavigationMenu( {\n\tnavigationMenu,\n\thandleDelete,\n\thandleDuplicate,\n\thandleSave,\n} ) {\n\tconst menuTitle = navigationMenu?.title?.rendered;\n\n\treturn (\n\t\t<SidebarNavigationScreenWrapper\n\t\t\tactions={\n\t\t\t\t<>\n\t\t\t\t\t<ScreenNavigationMoreMenu\n\t\t\t\t\t\tmenuTitle={ decodeEntities( menuTitle ) }\n\t\t\t\t\t\tonDelete={ handleDelete }\n\t\t\t\t\t\tonSave={ handleSave }\n\t\t\t\t\t\tonDuplicate={ handleDuplicate }\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t}\n\t\t\ttitle={ buildNavigationLabel(\n\t\t\t\tnavigationMenu?.title,\n\t\t\t\tnavigationMenu?.id,\n\t\t\t\tnavigationMenu?.status\n\t\t\t) }\n\t\t\tdescription={ __(\n\t\t\t\t'Navigation Menus are a curated collection of blocks that allow visitors to get around your site.'\n\t\t\t) }\n\t\t>\n\t\t\t<NavigationMenuEditor navigationMenuId={ navigationMenu?.id } />\n\t\t</SidebarNavigationScreenWrapper>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAIA,IAAAE,uCAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,qBAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,qBAAA,GAAAF,sBAAA,CAAAJ,OAAA;AAXA;AACA;AACA;;AAGA;AACA;AACA;;AAMe,SAASO,oBAAoBA,CAAE;EAC7CC,cAAc;EACdC,YAAY;EACZC,eAAe;EACfC;AACD,CAAC,EAAG;EACH,MAAMC,SAAS,GAAGJ,cAAc,EAAEK,KAAK,EAAEC,QAAQ;EAEjD,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACd,uCAAA,CAAAe,8BAA8B;IAC9BC,OAAO,EACN,IAAAH,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAI,QAAA,QACC,IAAAJ,MAAA,CAAAC,aAAA,EAACb,SAAA,CAAAiB,OAAwB;MACxBR,SAAS,EAAG,IAAAS,4BAAc,EAAET,SAAU,CAAG;MACzCU,QAAQ,EAAGb,YAAc;MACzBc,MAAM,EAAGZ,UAAY;MACrBa,WAAW,EAAGd;IAAiB,CAC/B,CACA,CACF;IACDG,KAAK,EAAG,IAAAY,6BAAoB,EAC3BjB,cAAc,EAAEK,KAAK,EACrBL,cAAc,EAAEkB,EAAE,EAClBlB,cAAc,EAAEmB,MACjB,CAAG;IACHC,WAAW,EAAG,IAAAC,QAAE,EACf,kGACD;EAAG,GAEH,IAAAd,MAAA,CAAAC,aAAA,EAACX,qBAAA,CAAAe,OAAoB;IAACU,gBAAgB,EAAGtB,cAAc,EAAEkB;EAAI,CAAE,CAChC,CAAC;AAEnC","ignoreList":[]}
@@ -5,12 +5,13 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = useNavigationMenuHandlers;
7
7
  var _coreData = require("@wordpress/core-data");
8
- var _components = require("@wordpress/components");
9
8
  var _i18n = require("@wordpress/i18n");
10
9
  var _data = require("@wordpress/data");
11
10
  var _notices = require("@wordpress/notices");
11
+ var _router = require("@wordpress/router");
12
12
  var _ = require(".");
13
13
  var _constants = require("../../utils/constants");
14
+ var _lockUnlock = require("../../lock-unlock");
14
15
  /**
15
16
  * WordPress dependencies
16
17
  */
@@ -19,10 +20,10 @@ var _constants = require("../../utils/constants");
19
20
  * Internal dependencies
20
21
  */
21
22
 
23
+ const {
24
+ useHistory
25
+ } = (0, _lockUnlock.unlock)(_router.privateApis);
22
26
  function useDeleteNavigationMenu() {
23
- const {
24
- goTo
25
- } = (0, _components.__experimentalUseNavigator)();
26
27
  const {
27
28
  deleteEntityRecord
28
29
  } = (0, _data.useDispatch)(_coreData.store);
@@ -30,6 +31,7 @@ function useDeleteNavigationMenu() {
30
31
  createSuccessNotice,
31
32
  createErrorNotice
32
33
  } = (0, _data.useDispatch)(_notices.store);
34
+ const history = useHistory();
33
35
  const handleDelete = async navigationMenu => {
34
36
  const postId = navigationMenu?.id;
35
37
  try {
@@ -38,13 +40,15 @@ function useDeleteNavigationMenu() {
38
40
  }, {
39
41
  throwOnError: true
40
42
  });
41
- createSuccessNotice((0, _i18n.__)('Navigation menu successfully deleted.'), {
43
+ createSuccessNotice((0, _i18n.__)('Navigation Menu successfully deleted.'), {
42
44
  type: 'snackbar'
43
45
  });
44
- goTo('/navigation');
46
+ history.push({
47
+ path: '/navigation'
48
+ });
45
49
  } catch (error) {
46
50
  createErrorNotice((0, _i18n.sprintf)( /* translators: %s: error message describing why the navigation menu could not be deleted. */
47
- (0, _i18n.__)(`Unable to delete Navigation menu (%s).`), error?.message), {
51
+ (0, _i18n.__)(`Unable to delete Navigation Menu (%s).`), error?.message), {
48
52
  type: 'snackbar'
49
53
  });
50
54
  }
@@ -87,14 +91,14 @@ function useSaveNavigationMenu() {
87
91
  await saveSpecifiedEntityEdits('postType', _.postType, postId, recordPropertiesToSave, {
88
92
  throwOnError: true
89
93
  });
90
- createSuccessNotice((0, _i18n.__)('Renamed Navigation menu'), {
94
+ createSuccessNotice((0, _i18n.__)('Renamed Navigation Menu'), {
91
95
  type: 'snackbar'
92
96
  });
93
97
  } catch (error) {
94
98
  // Revert to original in case of error.
95
99
  editEntityRecord('postType', _.postType, postId, originalRecord);
96
100
  createErrorNotice((0, _i18n.sprintf)( /* translators: %s: error message describing why the navigation menu could not be renamed. */
97
- (0, _i18n.__)(`Unable to rename Navigation menu (%s).`), error?.message), {
101
+ (0, _i18n.__)(`Unable to rename Navigation Menu (%s).`), error?.message), {
98
102
  type: 'snackbar'
99
103
  });
100
104
  }
@@ -102,9 +106,7 @@ function useSaveNavigationMenu() {
102
106
  return handleSave;
103
107
  }
104
108
  function useDuplicateNavigationMenu() {
105
- const {
106
- goTo
107
- } = (0, _components.__experimentalUseNavigator)();
109
+ const history = useHistory();
108
110
  const {
109
111
  saveEntityRecord
110
112
  } = (0, _data.useDispatch)(_coreData.store);
@@ -124,14 +126,17 @@ function useDuplicateNavigationMenu() {
124
126
  throwOnError: true
125
127
  });
126
128
  if (savedRecord) {
127
- createSuccessNotice((0, _i18n.__)('Duplicated Navigation menu'), {
129
+ createSuccessNotice((0, _i18n.__)('Duplicated Navigation Menu'), {
128
130
  type: 'snackbar'
129
131
  });
130
- goTo(`/navigation/${_.postType}/${savedRecord.id}`);
132
+ history.push({
133
+ postType: _.postType,
134
+ postId: savedRecord.id
135
+ });
131
136
  }
132
137
  } catch (error) {
133
138
  createErrorNotice((0, _i18n.sprintf)( /* translators: %s: error message describing why the navigation menu could not be deleted. */
134
- (0, _i18n.__)(`Unable to duplicate Navigation menu (%s).`), error?.message), {
139
+ (0, _i18n.__)(`Unable to duplicate Navigation Menu (%s).`), error?.message), {
135
140
  type: 'snackbar'
136
141
  });
137
142
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_coreData","require","_components","_i18n","_data","_notices","_","_constants","useDeleteNavigationMenu","goTo","useNavigator","deleteEntityRecord","useDispatch","coreStore","createSuccessNotice","createErrorNotice","noticesStore","handleDelete","navigationMenu","postId","id","postType","force","throwOnError","__","type","error","sprintf","message","useSaveNavigationMenu","getEditedEntityRecord","useSelect","select","getEditedEntityRecordSelector","editEntityRecord","__experimentalSaveSpecifiedEntityEdits","saveSpecifiedEntityEdits","handleSave","edits","originalRecord","NAVIGATION_POST_TYPE","recordPropertiesToSave","Object","keys","useDuplicateNavigationMenu","saveEntityRecord","handleDuplicate","menuTitle","title","rendered","slug","savedRecord","content","raw","status","useNavigationMenuHandlers"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __experimentalUseNavigator as useNavigator } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport { postType } from '.';\nimport { NAVIGATION_POST_TYPE } from '../../utils/constants';\n\nfunction useDeleteNavigationMenu() {\n\tconst { goTo } = useNavigator();\n\n\tconst { deleteEntityRecord } = useDispatch( coreStore );\n\n\tconst { createSuccessNotice, createErrorNotice } =\n\t\tuseDispatch( noticesStore );\n\n\tconst handleDelete = async ( navigationMenu ) => {\n\t\tconst postId = navigationMenu?.id;\n\t\ttry {\n\t\t\tawait deleteEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\tpostId,\n\t\t\t\t{\n\t\t\t\t\tforce: true,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tthrowOnError: true,\n\t\t\t\t}\n\t\t\t);\n\t\t\tcreateSuccessNotice(\n\t\t\t\t__( 'Navigation menu successfully deleted.' ),\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t}\n\t\t\t);\n\t\t\tgoTo( '/navigation' );\n\t\t} catch ( error ) {\n\t\t\tcreateErrorNotice(\n\t\t\t\tsprintf(\n\t\t\t\t\t/* translators: %s: error message describing why the navigation menu could not be deleted. */\n\t\t\t\t\t__( `Unable to delete Navigation menu (%s).` ),\n\t\t\t\t\terror?.message\n\t\t\t\t),\n\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t};\n\n\treturn handleDelete;\n}\n\nfunction useSaveNavigationMenu() {\n\tconst { getEditedEntityRecord } = useSelect( ( select ) => {\n\t\tconst { getEditedEntityRecord: getEditedEntityRecordSelector } =\n\t\t\tselect( coreStore );\n\n\t\treturn {\n\t\t\tgetEditedEntityRecord: getEditedEntityRecordSelector,\n\t\t};\n\t}, [] );\n\n\tconst {\n\t\teditEntityRecord,\n\t\t__experimentalSaveSpecifiedEntityEdits: saveSpecifiedEntityEdits,\n\t} = useDispatch( coreStore );\n\n\tconst { createSuccessNotice, createErrorNotice } =\n\t\tuseDispatch( noticesStore );\n\n\tconst handleSave = async ( navigationMenu, edits ) => {\n\t\tif ( ! edits ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst postId = navigationMenu?.id;\n\t\t// Prepare for revert in case of error.\n\t\tconst originalRecord = getEditedEntityRecord(\n\t\t\t'postType',\n\t\t\tNAVIGATION_POST_TYPE,\n\t\t\tpostId\n\t\t);\n\n\t\t// Apply the edits.\n\t\teditEntityRecord( 'postType', postType, postId, edits );\n\n\t\tconst recordPropertiesToSave = Object.keys( edits );\n\n\t\t// Attempt to persist.\n\t\ttry {\n\t\t\tawait saveSpecifiedEntityEdits(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\tpostId,\n\t\t\t\trecordPropertiesToSave,\n\t\t\t\t{\n\t\t\t\t\tthrowOnError: true,\n\t\t\t\t}\n\t\t\t);\n\t\t\tcreateSuccessNotice( __( 'Renamed Navigation menu' ), {\n\t\t\t\ttype: 'snackbar',\n\t\t\t} );\n\t\t} catch ( error ) {\n\t\t\t// Revert to original in case of error.\n\t\t\teditEntityRecord( 'postType', postType, postId, originalRecord );\n\n\t\t\tcreateErrorNotice(\n\t\t\t\tsprintf(\n\t\t\t\t\t/* translators: %s: error message describing why the navigation menu could not be renamed. */\n\t\t\t\t\t__( `Unable to rename Navigation menu (%s).` ),\n\t\t\t\t\terror?.message\n\t\t\t\t),\n\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t};\n\n\treturn handleSave;\n}\n\nfunction useDuplicateNavigationMenu() {\n\tconst { goTo } = useNavigator();\n\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\n\tconst { createSuccessNotice, createErrorNotice } =\n\t\tuseDispatch( noticesStore );\n\n\tconst handleDuplicate = async ( navigationMenu ) => {\n\t\tconst menuTitle =\n\t\t\tnavigationMenu?.title?.rendered || navigationMenu?.slug;\n\n\t\ttry {\n\t\t\tconst savedRecord = await saveEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\t{\n\t\t\t\t\ttitle: sprintf(\n\t\t\t\t\t\t/* translators: %s: Navigation menu title */\n\t\t\t\t\t\t__( '%s (Copy)' ),\n\t\t\t\t\t\tmenuTitle\n\t\t\t\t\t),\n\t\t\t\t\tcontent: navigationMenu?.content?.raw,\n\t\t\t\t\tstatus: 'publish',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tthrowOnError: true,\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tif ( savedRecord ) {\n\t\t\t\tcreateSuccessNotice( __( 'Duplicated Navigation menu' ), {\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t} );\n\t\t\t\tgoTo( `/navigation/${ postType }/${ savedRecord.id }` );\n\t\t\t}\n\t\t} catch ( error ) {\n\t\t\tcreateErrorNotice(\n\t\t\t\tsprintf(\n\t\t\t\t\t/* translators: %s: error message describing why the navigation menu could not be deleted. */\n\t\t\t\t\t__( `Unable to duplicate Navigation menu (%s).` ),\n\t\t\t\t\terror?.message\n\t\t\t\t),\n\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t};\n\n\treturn handleDuplicate;\n}\n\nexport default function useNavigationMenuHandlers() {\n\treturn {\n\t\thandleDelete: useDeleteNavigationMenu(),\n\t\thandleSave: useSaveNavigationMenu(),\n\t\thandleDuplicate: useDuplicateNavigationMenu(),\n\t};\n}\n"],"mappings":";;;;;;AAGA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAKA,IAAAK,CAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AAbA;AACA;AACA;;AAOA;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B,CAAC,GAC/C,IAAAH,iBAAW,EAAEI,cAAa,CAAC;EAE5B,MAAM8B,eAAe,GAAG,MAAQ5B,cAAc,IAAM;IACnD,MAAM6B,SAAS,GACd7B,cAAc,EAAE8B,KAAK,EAAEC,QAAQ,IAAI/B,cAAc,EAAEgC,IAAI;IAExD,IAAI;MACH,MAAMC,WAAW,GAAG,MAAMN,gBAAgB,CACzC,UAAU,EACVxB,UAAQ,EACR;QACC2B,KAAK,EAAE,IAAArB,aAAO,GACb;QACA,IAAAH,QAAE,EAAE,WAAY,CAAC,EACjBuB,SACD,CAAC;QACDK,OAAO,EAAElC,cAAc,EAAEkC,OAAO,EAAEC,GAAG;QACrCC,MAAM,EAAE;MACT,CAAC,EACD;QACC/B,YAAY,EAAE;MACf,CACD,CAAC;MAED,IAAK4B,WAAW,EAAG;QAClBrC,mBAAmB,CAAE,IAAAU,QAAE,EAAE,4BAA6B,CAAC,EAAE;UACxDC,IAAI,EAAE;QACP,CAAE,CAAC;QACHhB,IAAI,CAAG,eAAeY,UAAU,IAAI8B,WAAW,CAAC/B,EAAI,EAAE,CAAC;MACxD;IACD,CAAC,CAAC,OAAQM,KAAK,EAAG;MACjBX,iBAAiB,CAChB,IAAAY,aAAO,GACN;MACA,IAAAH,QAAE,EAAG,2CAA2C,CAAC,EACjDE,KAAK,EAAEE,OACR,CAAC,EAED;QACCH,IAAI,EAAE;MACP,CACD,CAAC;IACF;EACD,CAAC;EAED,OAAOqB,eAAe;AACvB;AAEe,SAASS,yBAAyBA,CAAA,EAAG;EACnD,OAAO;IACNtC,YAAY,EAAET,uBAAuB,CAAC,CAAC;IACvC6B,UAAU,EAAER,qBAAqB,CAAC,CAAC;IACnCiB,eAAe,EAAEF,0BAA0B,CAAC;EAC7C,CAAC;AACF"}
1
+ {"version":3,"names":["_coreData","require","_i18n","_data","_notices","_router","_","_constants","_lockUnlock","useHistory","unlock","routerPrivateApis","useDeleteNavigationMenu","deleteEntityRecord","useDispatch","coreStore","createSuccessNotice","createErrorNotice","noticesStore","history","handleDelete","navigationMenu","postId","id","postType","force","throwOnError","__","type","push","path","error","sprintf","message","useSaveNavigationMenu","getEditedEntityRecord","useSelect","select","getEditedEntityRecordSelector","editEntityRecord","__experimentalSaveSpecifiedEntityEdits","saveSpecifiedEntityEdits","handleSave","edits","originalRecord","NAVIGATION_POST_TYPE","recordPropertiesToSave","Object","keys","useDuplicateNavigationMenu","saveEntityRecord","handleDuplicate","menuTitle","title","rendered","slug","savedRecord","content","raw","status","useNavigationMenuHandlers"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport { postType } from '.';\nimport { NAVIGATION_POST_TYPE } from '../../utils/constants';\nimport { unlock } from '../../lock-unlock';\n\nconst { useHistory } = unlock( routerPrivateApis );\n\nfunction useDeleteNavigationMenu() {\n\tconst { deleteEntityRecord } = useDispatch( coreStore );\n\tconst { createSuccessNotice, createErrorNotice } =\n\t\tuseDispatch( noticesStore );\n\tconst history = useHistory();\n\n\tconst handleDelete = async ( navigationMenu ) => {\n\t\tconst postId = navigationMenu?.id;\n\t\ttry {\n\t\t\tawait deleteEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\tpostId,\n\t\t\t\t{\n\t\t\t\t\tforce: true,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tthrowOnError: true,\n\t\t\t\t}\n\t\t\t);\n\t\t\tcreateSuccessNotice(\n\t\t\t\t__( 'Navigation Menu successfully deleted.' ),\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t}\n\t\t\t);\n\t\t\thistory.push( { path: '/navigation' } );\n\t\t} catch ( error ) {\n\t\t\tcreateErrorNotice(\n\t\t\t\tsprintf(\n\t\t\t\t\t/* translators: %s: error message describing why the navigation menu could not be deleted. */\n\t\t\t\t\t__( `Unable to delete Navigation Menu (%s).` ),\n\t\t\t\t\terror?.message\n\t\t\t\t),\n\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t};\n\n\treturn handleDelete;\n}\n\nfunction useSaveNavigationMenu() {\n\tconst { getEditedEntityRecord } = useSelect( ( select ) => {\n\t\tconst { getEditedEntityRecord: getEditedEntityRecordSelector } =\n\t\t\tselect( coreStore );\n\n\t\treturn {\n\t\t\tgetEditedEntityRecord: getEditedEntityRecordSelector,\n\t\t};\n\t}, [] );\n\n\tconst {\n\t\teditEntityRecord,\n\t\t__experimentalSaveSpecifiedEntityEdits: saveSpecifiedEntityEdits,\n\t} = useDispatch( coreStore );\n\n\tconst { createSuccessNotice, createErrorNotice } =\n\t\tuseDispatch( noticesStore );\n\n\tconst handleSave = async ( navigationMenu, edits ) => {\n\t\tif ( ! edits ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst postId = navigationMenu?.id;\n\t\t// Prepare for revert in case of error.\n\t\tconst originalRecord = getEditedEntityRecord(\n\t\t\t'postType',\n\t\t\tNAVIGATION_POST_TYPE,\n\t\t\tpostId\n\t\t);\n\n\t\t// Apply the edits.\n\t\teditEntityRecord( 'postType', postType, postId, edits );\n\n\t\tconst recordPropertiesToSave = Object.keys( edits );\n\n\t\t// Attempt to persist.\n\t\ttry {\n\t\t\tawait saveSpecifiedEntityEdits(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\tpostId,\n\t\t\t\trecordPropertiesToSave,\n\t\t\t\t{\n\t\t\t\t\tthrowOnError: true,\n\t\t\t\t}\n\t\t\t);\n\t\t\tcreateSuccessNotice( __( 'Renamed Navigation Menu' ), {\n\t\t\t\ttype: 'snackbar',\n\t\t\t} );\n\t\t} catch ( error ) {\n\t\t\t// Revert to original in case of error.\n\t\t\teditEntityRecord( 'postType', postType, postId, originalRecord );\n\n\t\t\tcreateErrorNotice(\n\t\t\t\tsprintf(\n\t\t\t\t\t/* translators: %s: error message describing why the navigation menu could not be renamed. */\n\t\t\t\t\t__( `Unable to rename Navigation Menu (%s).` ),\n\t\t\t\t\terror?.message\n\t\t\t\t),\n\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t};\n\n\treturn handleSave;\n}\n\nfunction useDuplicateNavigationMenu() {\n\tconst history = useHistory();\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\n\tconst { createSuccessNotice, createErrorNotice } =\n\t\tuseDispatch( noticesStore );\n\n\tconst handleDuplicate = async ( navigationMenu ) => {\n\t\tconst menuTitle =\n\t\t\tnavigationMenu?.title?.rendered || navigationMenu?.slug;\n\n\t\ttry {\n\t\t\tconst savedRecord = await saveEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\t{\n\t\t\t\t\ttitle: sprintf(\n\t\t\t\t\t\t/* translators: %s: Navigation menu title */\n\t\t\t\t\t\t__( '%s (Copy)' ),\n\t\t\t\t\t\tmenuTitle\n\t\t\t\t\t),\n\t\t\t\t\tcontent: navigationMenu?.content?.raw,\n\t\t\t\t\tstatus: 'publish',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tthrowOnError: true,\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tif ( savedRecord ) {\n\t\t\t\tcreateSuccessNotice( __( 'Duplicated Navigation Menu' ), {\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t} );\n\t\t\t\thistory.push( { postType, postId: savedRecord.id } );\n\t\t\t}\n\t\t} catch ( error ) {\n\t\t\tcreateErrorNotice(\n\t\t\t\tsprintf(\n\t\t\t\t\t/* translators: %s: error message describing why the navigation menu could not be deleted. */\n\t\t\t\t\t__( `Unable to duplicate Navigation Menu (%s).` ),\n\t\t\t\t\terror?.message\n\t\t\t\t),\n\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t};\n\n\treturn handleDuplicate;\n}\n\nexport default function useNavigationMenuHandlers() {\n\treturn {\n\t\thandleDelete: useDeleteNavigationMenu(),\n\t\thandleSave: useSaveNavigationMenu(),\n\t\thandleDuplicate: useDuplicateNavigationMenu(),\n\t};\n}\n"],"mappings":";;;;;;AAGA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAKA,IAAAK,CAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AAdA;AACA;AACA;;AAOA;AACA;AACA;;AAKA,MAAM;EAAEQ;AAAW,CAAC,GAAG,IAAAC,kBAAM,EAAEC,mBAAkB,CAAC;AAElD,SAASC,uBAAuBA,CAAA,EAAG;EAClC,MAAM;IAAEC;EAAmB,CAAC,GAAG,IAAAC,iBAAW,EAAEC,eAAU,CAAC;EACvD,MAAM;IAAEC,mBAAmB;IAAEC;EAAkB,CAAC,GAC/C,IAAAH,iBAAW,EAAEI,cAAa,CAAC;EAC5B,MAAMC,OAAO,GAAGV,UAAU,CAAC,CAAC;EAE5B,MAAMW,YAAY,GAAG,MAAQC,cAAc,IAAM;IAChD,MAAMC,MAAM,GAAGD,cAAc,EAAEE,EAAE;IACjC,IAAI;MACH,MAAMV,kBAAkB,CACvB,UAAU,EACVW,UAAQ,EACRF,MAAM,EACN;QACCG,KAAK,EAAE;MACR,CAAC,EACD;QACCC,YAAY,EAAE;MACf,CACD,CAAC;MACDV,mBAAmB,CAClB,IAAAW,QAAE,EAAE,uCAAwC,CAAC,EAC7C;QACCC,IAAI,EAAE;MACP,CACD,CAA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xDC,IAAI,EAAE;QACP,CAAE,CAAC;QACHT,OAAO,CAACU,IAAI,CAAE;UAAEL,QAAQ,EAARA,UAAQ;UAAEF,MAAM,EAAEkC,WAAW,CAACjC;QAAG,CAAE,CAAC;MACrD;IACD,CAAC,CAAC,OAAQQ,KAAK,EAAG;MACjBd,iBAAiB,CAChB,IAAAe,aAAO,GACN;MACA,IAAAL,QAAE,EAAG,2CAA2C,CAAC,EACjDI,KAAK,EAAEE,OACR,CAAC,EAED;QACCL,IAAI,EAAE;MACP,CACD,CAAC;IACF;EACD,CAAC;EAED,OAAOuB,eAAe;AACvB;AAEe,SAASS,yBAAyBA,CAAA,EAAG;EACnD,OAAO;IACNxC,YAAY,EAAER,uBAAuB,CAAC,CAAC;IACvC8B,UAAU,EAAER,qBAAqB,CAAC,CAAC;IACnCiB,eAAe,EAAEF,0BAA0B,CAAC;EAC7C,CAAC;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_htmlEntities","buildNavigationLabel","title","id","status","rendered","sprintf","__","decodeEntities"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n// Copied from packages/block-library/src/navigation/edit/navigation-menu-selector.js.\nexport default function buildNavigationLabel( title, id, status ) {\n\tif ( ! title?.rendered ) {\n\t\t/* translators: %s is the index of the menu in the list of menus. */\n\t\treturn sprintf( __( '(no title %s)' ), id );\n\t}\n\n\tif ( status === 'publish' ) {\n\t\treturn decodeEntities( title?.rendered );\n\t}\n\n\treturn sprintf(\n\t\t// translators: %1s: title of the menu; %2s: status of the menu (draft, pending, etc.).\n\t\t__( '%1$s (%2$s)' ),\n\t\tdecodeEntities( title?.rendered ),\n\t\tstatus\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAIA;AACe,SAASE,oBAAoBA,CAAEC,KAAK,EAAEC,EAAE,EAAEC,MAAM,EAAG;EACjE,IAAK,CAAEF,KAAK,EAAEG,QAAQ,EAAG;IACxB;IACA,OAAO,IAAAC,aAAO,EAAE,IAAAC,QAAE,EAAE,eAAgB,CAAC,EAAEJ,EAAG,CAAC;EAC5C;EAEA,IAAKC,MAAM,KAAK,SAAS,EAAG;IAC3B,OAAO,IAAAI,4BAAc,EAAEN,KAAK,EAAEG,QAAS,CAAC;EACzC;EAEA,OAAO,IAAAC,aAAO;EACb;EACA,IAAAC,QAAE,EAAE,aAAc,CAAC,EACnB,IAAAC,4BAAc,EAAEN,KAAK,EAAEG,QAAS,CAAC,EACjCD,MACD,CAAC;AACF"}
1
+ {"version":3,"names":["_i18n","require","_htmlEntities","buildNavigationLabel","title","id","status","rendered","sprintf","__","decodeEntities"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n// Copied from packages/block-library/src/navigation/edit/navigation-menu-selector.js.\nexport default function buildNavigationLabel( title, id, status ) {\n\tif ( ! title?.rendered ) {\n\t\t/* translators: %s is the index of the menu in the list of menus. */\n\t\treturn sprintf( __( '(no title %s)' ), id );\n\t}\n\n\tif ( status === 'publish' ) {\n\t\treturn decodeEntities( title?.rendered );\n\t}\n\n\treturn sprintf(\n\t\t// translators: %1s: title of the menu; %2s: status of the menu (draft, pending, etc.).\n\t\t__( '%1$s (%2$s)' ),\n\t\tdecodeEntities( title?.rendered ),\n\t\tstatus\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAIA;AACe,SAASE,oBAAoBA,CAAEC,KAAK,EAAEC,EAAE,EAAEC,MAAM,EAAG;EACjE,IAAK,CAAEF,KAAK,EAAEG,QAAQ,EAAG;IACxB;IACA,OAAO,IAAAC,aAAO,EAAE,IAAAC,QAAE,EAAE,eAAgB,CAAC,EAAEJ,EAAG,CAAC;EAC5C;EAEA,IAAKC,MAAM,KAAK,SAAS,EAAG;IAC3B,OAAO,IAAAI,4BAAc,EAAEN,KAAK,EAAEG,QAAS,CAAC;EACzC;EAEA,OAAO,IAAAC,aAAO;EACb;EACA,IAAAC,QAAE,EAAE,aAAc,CAAC,EACnB,IAAAC,4BAAc,EAAEN,KAAK,EAAEG,QAAS,CAAC,EACjCD,MACD,CAAC;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["PRELOADED_NAVIGATION_MENUS_QUERY","exports","per_page","status","order","orderby"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menus/constants.js"],"sourcesContent":["// This requested is preloaded in `gutenberg_preload_navigation_posts`.\n// As unbounded queries are limited to 100 by `fetchAllMiddleware`\n// on apiFetch this query is limited to 100.\n// These parameters must be kept aligned with those in\n// lib/compat/wordpress-6.3/navigation-block-preloading.php\n// and\n// block-library/src/navigation/constants.js\nexport const PRELOADED_NAVIGATION_MENUS_QUERY = {\n\tper_page: 100,\n\tstatus: [ 'publish', 'draft' ],\n\torder: 'desc',\n\torderby: 'date',\n};\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,gCAAgC,GAAAC,OAAA,CAAAD,gCAAA,GAAG;EAC/CE,QAAQ,EAAE,GAAG;EACbC,MAAM,EAAE,CAAE,SAAS,EAAE,OAAO,CAAE;EAC9BC,KAAK,EAAE,MAAM;EACbC,OAAO,EAAE;AACV,CAAC"}
1
+ {"version":3,"names":["PRELOADED_NAVIGATION_MENUS_QUERY","exports","per_page","status","order","orderby"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menus/constants.js"],"sourcesContent":["// This requested is preloaded in `gutenberg_preload_navigation_posts`.\n// As unbounded queries are limited to 100 by `fetchAllMiddleware`\n// on apiFetch this query is limited to 100.\n// These parameters must be kept aligned with those in\n// lib/compat/wordpress-6.3/navigation-block-preloading.php\n// and\n// block-library/src/navigation/constants.js\nexport const PRELOADED_NAVIGATION_MENUS_QUERY = {\n\tper_page: 100,\n\tstatus: [ 'publish', 'draft' ],\n\torder: 'desc',\n\torderby: 'date',\n};\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,gCAAgC,GAAAC,OAAA,CAAAD,gCAAA,GAAG;EAC/CE,QAAQ,EAAE,GAAG;EACbC,MAAM,EAAE,CAAE,SAAS,EAAE,OAAO,CAAE;EAC9BC,KAAK,EAAE,MAAM;EACbC,OAAO,EAAE;AACV,CAAC","ignoreList":[]}
@@ -113,7 +113,7 @@ function SidebarNavigationScreenWrapper({
113
113
  return (0, _react.createElement)(_sidebarNavigationScreen.default, {
114
114
  title: title || (0, _i18n.__)('Navigation'),
115
115
  actions: actions,
116
- description: description || (0, _i18n.__)('Manage your Navigation menus.'),
116
+ description: description || (0, _i18n.__)('Manage your Navigation Menus.'),
117
117
  content: children
118
118
  });
119
119
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_coreData","_data","_htmlEntities","_components","_icons","_sidebarNavigationScreen","_interopRequireDefault","_sidebarNavigationItem","_constants","_link","_singleNavigationMenu","_useNavigationMenuHandlers","_lockUnlock","_constants2","buildMenuLabel","title","id","status","sprintf","__","decodeEntities","hasCreatedFallback","SidebarNavigationScreenNavigationMenus","records","navigationMenus","isResolving","isResolvingNavigationMenus","hasResolved","hasResolvedNavigationMenus","useEntityRecords","NAVIGATION_POST_TYPE","PRELOADED_NAVIGATION_MENUS_QUERY","isLoading","getNavigationFallbackId","unlock","useSelect","coreStore","firstNavigationMenu","handleSave","handleDelete","handleDuplicate","useNavigationMenuHandlers","hasNavigationMenus","length","_react","createElement","SidebarNavigationScreenWrapper","Spinner","className","description","default","navigationMenu","edits","__experimentalItemGroup","map","index","NavMenuItem","postId","key","withChevron","icon","navigation","rendered","children","actions","content","props","linkInfo","useLink","postType"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menus/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useEntityRecords, store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\n\nimport { decodeEntities } from '@wordpress/html-entities';\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\tSpinner,\n} from '@wordpress/components';\nimport { navigation } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport { PRELOADED_NAVIGATION_MENUS_QUERY } from './constants';\nimport { useLink } from '../routes/link';\nimport SingleNavigationMenu from '../sidebar-navigation-screen-navigation-menu/single-navigation-menu';\nimport useNavigationMenuHandlers from '../sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers';\nimport { unlock } from '../../lock-unlock';\nimport { NAVIGATION_POST_TYPE } from '../../utils/constants';\n\n// Copied from packages/block-library/src/navigation/edit/navigation-menu-selector.js.\nfunction buildMenuLabel( title, id, status ) {\n\tif ( ! title ) {\n\t\t/* translators: %s is the index of the menu in the list of menus. */\n\t\treturn sprintf( __( '(no title %s)' ), id );\n\t}\n\n\tif ( status === 'publish' ) {\n\t\treturn decodeEntities( title );\n\t}\n\n\treturn sprintf(\n\t\t// translators: %1s: title of the menu; %2s: status of the menu (draft, pending, etc.).\n\t\t__( '%1$s (%2$s)' ),\n\t\tdecodeEntities( title ),\n\t\tstatus\n\t);\n}\n\n// Save a boolean to prevent us creating a fallback more than once per session.\nlet hasCreatedFallback = false;\n\nexport default function SidebarNavigationScreenNavigationMenus() {\n\tconst {\n\t\trecords: navigationMenus,\n\t\tisResolving: isResolvingNavigationMenus,\n\t\thasResolved: hasResolvedNavigationMenus,\n\t} = useEntityRecords(\n\t\t'postType',\n\t\tNAVIGATION_POST_TYPE,\n\t\tPRELOADED_NAVIGATION_MENUS_QUERY\n\t);\n\n\tconst isLoading =\n\t\tisResolvingNavigationMenus && ! hasResolvedNavigationMenus;\n\n\tconst { getNavigationFallbackId } = unlock( useSelect( coreStore ) );\n\n\tconst firstNavigationMenu = navigationMenus?.[ 0 ];\n\n\t// Save a boolean to prevent us creating a fallback more than once per session.\n\tif ( firstNavigationMenu ) {\n\t\thasCreatedFallback = true;\n\t}\n\n\t// If there is no navigation menu found\n\t// then trigger fallback algorithm to create one.\n\tif (\n\t\t! firstNavigationMenu &&\n\t\t! isResolvingNavigationMenus &&\n\t\thasResolvedNavigationMenus &&\n\t\t! hasCreatedFallback\n\t) {\n\t\tgetNavigationFallbackId();\n\t}\n\n\tconst { handleSave, handleDelete, handleDuplicate } =\n\t\tuseNavigationMenuHandlers();\n\n\tconst hasNavigationMenus = !! navigationMenus?.length;\n\n\tif ( isLoading ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper>\n\t\t\t\t<Spinner className=\"edit-site-sidebar-navigation-screen-navigation-menus__loading\" />\n\t\t\t</SidebarNavigationScreenWrapper>\n\t\t);\n\t}\n\n\tif ( ! isLoading && ! hasNavigationMenus ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper\n\t\t\t\tdescription={ __( 'No Navigation Menus found.' ) }\n\t\t\t/>\n\t\t);\n\t}\n\n\t// if single menu then render it\n\tif ( navigationMenus?.length === 1 ) {\n\t\treturn (\n\t\t\t<SingleNavigationMenu\n\t\t\t\tnavigationMenu={ firstNavigationMenu }\n\t\t\t\thandleDelete={ () => handleDelete( firstNavigationMenu ) }\n\t\t\t\thandleDuplicate={ () => handleDuplicate( firstNavigationMenu ) }\n\t\t\t\thandleSave={ ( edits ) =>\n\t\t\t\t\thandleSave( firstNavigationMenu, edits )\n\t\t\t\t}\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn (\n\t\t<SidebarNavigationScreenWrapper>\n\t\t\t<ItemGroup>\n\t\t\t\t{ navigationMenus?.map( ( { id, title, status }, index ) => (\n\t\t\t\t\t<NavMenuItem\n\t\t\t\t\t\tpostId={ id }\n\t\t\t\t\t\tkey={ id }\n\t\t\t\t\t\twithChevron\n\t\t\t\t\t\ticon={ navigation }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ buildMenuLabel( title?.rendered, index + 1, status ) }\n\t\t\t\t\t</NavMenuItem>\n\t\t\t\t) ) }\n\t\t\t</ItemGroup>\n\t\t</SidebarNavigationScreenWrapper>\n\t);\n}\n\nexport function SidebarNavigationScreenWrapper( {\n\tchildren,\n\tactions,\n\ttitle,\n\tdescription,\n} ) {\n\treturn (\n\t\t<SidebarNavigationScreen\n\t\t\ttitle={ title || __( 'Navigation' ) }\n\t\t\tactions={ actions }\n\t\t\tdescription={ description || __( 'Manage your Navigation menus.' ) }\n\t\t\tcontent={ children }\n\t\t/>\n\t);\n}\n\nconst NavMenuItem = ( { postId, ...props } ) => {\n\tconst linkInfo = useLink( {\n\t\tpostId,\n\t\tpostType: NAVIGATION_POST_TYPE,\n\t} );\n\treturn <SidebarNavigationItem { ...linkInfo } { ...props } />;\n};\n"],"mappings":";;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAEA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AAIA,IAAAK,MAAA,GAAAL,OAAA;AAKA,IAAAM,wBAAA,GAAAC,sBAAA,CAAAP,OAAA;AACA,IAAAQ,sBAAA,GAAAD,sBAAA,CAAAP,OAAA;AACA,IAAAS,UAAA,GAAAT,OAAA;AACA,IAAAU,KAAA,GAAAV,OAAA;AACA,IAAAW,qBAAA,GAAAJ,sBAAA,CAAAP,OAAA;AACA,IAAAY,0BAAA,GAAAL,sBAAA,CAAAP,OAAA;AACA,IAAAa,W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AG,CAAC,EAAEtC,MAAO,CACzC,CACZ,CACQ,CACoB,CAAC;AAEnC;AAEO,SAAS6B,8BAA8BA,CAAE;EAC/CiB,QAAQ;EACRC,OAAO;EACPjD,KAAK;EACLkC;AACD,CAAC,EAAG;EACH,OACC,IAAAL,MAAA,CAAAC,aAAA,EAACxC,wBAAA,CAAA6C,OAAuB;IACvBnC,KAAK,EAAGA,KAAK,IAAI,IAAAI,QAAE,EAAE,YAAa,CAAG;IACrC6C,OAAO,EAAGA,OAAS;IACnBf,WAAW,EAAGA,WAAW,IAAI,IAAA9B,QAAE,EAAE,+BAAgC,CAAG;IACpE8C,OAAO,EAAGF;EAAU,CACpB,CAAC;AAEJ;AAEA,MAAMP,WAAW,GAAGA,CAAE;EAAEC,MAAM;EAAE,GAAGS;AAAM,CAAC,KAAM;EAC/C,MAAMC,QAAQ,GAAG,IAAAC,aAAO,EAAE;IACzBX,MAAM;IACNY,QAAQ,EAAEvC;EACX,CAAE,CAAC;EACH,OAAO,IAAAc,MAAA,CAAAC,aAAA,EAACtC,sBAAA,CAAA2C,OAAqB;IAAA,GAAMiB,QAAQ;IAAA,GAAQD;EAAK,CAAI,CAAC;AAC9D,CAAC"}
1
+ {"version":3,"names":["_i18n","require","_coreData","_data","_htmlEntities","_components","_icons","_sidebarNavigationScreen","_interopRequireDefault","_sidebarNavigationItem","_constants","_link","_singleNavigationMenu","_useNavigationMenuHandlers","_lockUnlock","_constants2","buildMenuLabel","title","id","status","sprintf","__","decodeEntities","hasCreatedFallback","SidebarNavigationScreenNavigationMenus","records","navigationMenus","isResolving","isResolvingNavigationMenus","hasResolved","hasResolvedNavigationMenus","useEntityRecords","NAVIGATION_POST_TYPE","PRELOADED_NAVIGATION_MENUS_QUERY","isLoading","getNavigationFallbackId","unlock","useSelect","coreStore","firstNavigationMenu","handleSave","handleDelete","handleDuplicate","useNavigationMenuHandlers","hasNavigationMenus","length","_react","createElement","SidebarNavigationScreenWrapper","Spinner","className","description","default","navigationMenu","edits","__experimentalItemGroup","map","index","NavMenuItem","postId","key","withChevron","icon","navigation","rendered","children","actions","content","props","linkInfo","useLink","postType"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menus/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useEntityRecords, store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\n\nimport { decodeEntities } from '@wordpress/html-entities';\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\tSpinner,\n} from '@wordpress/components';\nimport { navigation } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport { PRELOADED_NAVIGATION_MENUS_QUERY } from './constants';\nimport { useLink } from '../routes/link';\nimport SingleNavigationMenu from '../sidebar-navigation-screen-navigation-menu/single-navigation-menu';\nimport useNavigationMenuHandlers from '../sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers';\nimport { unlock } from '../../lock-unlock';\nimport { NAVIGATION_POST_TYPE } from '../../utils/constants';\n\n// Copied from packages/block-library/src/navigation/edit/navigation-menu-selector.js.\nfunction buildMenuLabel( title, id, status ) {\n\tif ( ! title ) {\n\t\t/* translators: %s is the index of the menu in the list of menus. */\n\t\treturn sprintf( __( '(no title %s)' ), id );\n\t}\n\n\tif ( status === 'publish' ) {\n\t\treturn decodeEntities( title );\n\t}\n\n\treturn sprintf(\n\t\t// translators: %1s: title of the menu; %2s: status of the menu (draft, pending, etc.).\n\t\t__( '%1$s (%2$s)' ),\n\t\tdecodeEntities( title ),\n\t\tstatus\n\t);\n}\n\n// Save a boolean to prevent us creating a fallback more than once per session.\nlet hasCreatedFallback = false;\n\nexport default function SidebarNavigationScreenNavigationMenus() {\n\tconst {\n\t\trecords: navigationMenus,\n\t\tisResolving: isResolvingNavigationMenus,\n\t\thasResolved: hasResolvedNavigationMenus,\n\t} = useEntityRecords(\n\t\t'postType',\n\t\tNAVIGATION_POST_TYPE,\n\t\tPRELOADED_NAVIGATION_MENUS_QUERY\n\t);\n\n\tconst isLoading =\n\t\tisResolvingNavigationMenus && ! hasResolvedNavigationMenus;\n\n\tconst { getNavigationFallbackId } = unlock( useSelect( coreStore ) );\n\n\tconst firstNavigationMenu = navigationMenus?.[ 0 ];\n\n\t// Save a boolean to prevent us creating a fallback more than once per session.\n\tif ( firstNavigationMenu ) {\n\t\thasCreatedFallback = true;\n\t}\n\n\t// If there is no navigation menu found\n\t// then trigger fallback algorithm to create one.\n\tif (\n\t\t! firstNavigationMenu &&\n\t\t! isResolvingNavigationMenus &&\n\t\thasResolvedNavigationMenus &&\n\t\t! hasCreatedFallback\n\t) {\n\t\tgetNavigationFallbackId();\n\t}\n\n\tconst { handleSave, handleDelete, handleDuplicate } =\n\t\tuseNavigationMenuHandlers();\n\n\tconst hasNavigationMenus = !! navigationMenus?.length;\n\n\tif ( isLoading ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper>\n\t\t\t\t<Spinner className=\"edit-site-sidebar-navigation-screen-navigation-menus__loading\" />\n\t\t\t</SidebarNavigationScreenWrapper>\n\t\t);\n\t}\n\n\tif ( ! isLoading && ! hasNavigationMenus ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper\n\t\t\t\tdescription={ __( 'No Navigation Menus found.' ) }\n\t\t\t/>\n\t\t);\n\t}\n\n\t// if single menu then render it\n\tif ( navigationMenus?.length === 1 ) {\n\t\treturn (\n\t\t\t<SingleNavigationMenu\n\t\t\t\tnavigationMenu={ firstNavigationMenu }\n\t\t\t\thandleDelete={ () => handleDelete( firstNavigationMenu ) }\n\t\t\t\thandleDuplicate={ () => handleDuplicate( firstNavigationMenu ) }\n\t\t\t\thandleSave={ ( edits ) =>\n\t\t\t\t\thandleSave( firstNavigationMenu, edits )\n\t\t\t\t}\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn (\n\t\t<SidebarNavigationScreenWrapper>\n\t\t\t<ItemGroup>\n\t\t\t\t{ navigationMenus?.map( ( { id, title, status }, index ) => (\n\t\t\t\t\t<NavMenuItem\n\t\t\t\t\t\tpostId={ id }\n\t\t\t\t\t\tkey={ id }\n\t\t\t\t\t\twithChevron\n\t\t\t\t\t\ticon={ navigation }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ buildMenuLabel( title?.rendered, index + 1, status ) }\n\t\t\t\t\t</NavMenuItem>\n\t\t\t\t) ) }\n\t\t\t</ItemGroup>\n\t\t</SidebarNavigationScreenWrapper>\n\t);\n}\n\nexport function SidebarNavigationScreenWrapper( {\n\tchildren,\n\tactions,\n\ttitle,\n\tdescription,\n} ) {\n\treturn (\n\t\t<SidebarNavigationScreen\n\t\t\ttitle={ title || __( 'Navigation' ) }\n\t\t\tactions={ actions }\n\t\t\tdescription={ description || __( 'Manage your Navigation Menus.' ) }\n\t\t\tcontent={ children }\n\t\t/>\n\t);\n}\n\nconst NavMenuItem = ( { postId, ...props } ) => {\n\tconst linkInfo = useLink( {\n\t\tpostId,\n\t\tpostType: NAVIGATION_POST_TYPE,\n\t} );\n\treturn <SidebarNavigationItem { ...linkInfo } { ...props } />;\n};\n"],"mappings":";;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAEA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AAIA,IAAAK,MAAA,GAAAL,OAAA;AAKA,IAAAM,wBAAA,GAAAC,sBAAA,CAAAP,OAAA;AACA,IAAAQ,sBAAA,GAAAD,sBAAA,CAAAP,OAAA;AACA,IAAAS,UAAA,GAAAT,OAAA;AACA,IAAAU,KAAA,GAAAV,OAAA;AACA,IAAAW,qBAAA,GAAAJ,sBAAA,CAAAP,OAAA;AACA,IAAAY,0BAAA,GAAAL,sBAAA,CAAAP,OAAA;AACA,IAAAa,WAAA,GAAAb,OAAA;A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AAO,CACzC,CACZ,CACQ,CACoB,CAAC;AAEnC;AAEO,SAAS6B,8BAA8BA,CAAE;EAC/CiB,QAAQ;EACRC,OAAO;EACPjD,KAAK;EACLkC;AACD,CAAC,EAAG;EACH,OACC,IAAAL,MAAA,CAAAC,aAAA,EAACxC,wBAAA,CAAA6C,OAAuB;IACvBnC,KAAK,EAAGA,KAAK,IAAI,IAAAI,QAAE,EAAE,YAAa,CAAG;IACrC6C,OAAO,EAAGA,OAAS;IACnBf,WAAW,EAAGA,WAAW,IAAI,IAAA9B,QAAE,EAAE,+BAAgC,CAAG;IACpE8C,OAAO,EAAGF;EAAU,CACpB,CAAC;AAEJ;AAEA,MAAMP,WAAW,GAAGA,CAAE;EAAEC,MAAM;EAAE,GAAGS;AAAM,CAAC,KAAM;EAC/C,MAAMC,QAAQ,GAAG,IAAAC,aAAO,EAAE;IACzBX,MAAM;IACNY,QAAQ,EAAEvC;EACX,CAAE,CAAC;EACH,OAAO,IAAAc,MAAA,CAAAC,aAAA,EAACtC,sBAAA,CAAA2C,OAAqB;IAAA,GAAMiB,QAAQ;IAAA,GAAQD;EAAK,CAAI,CAAC;AAC9D,CAAC","ignoreList":[]}
@@ -14,7 +14,6 @@ var _blockEditor = require("@wordpress/block-editor");
14
14
  var _router = require("@wordpress/router");
15
15
  var _isPreviewingTheme = require("../../utils/is-previewing-theme");
16
16
  var _lockUnlock = require("../../lock-unlock");
17
- var _useSyncPathWithUrl = require("../sync-state-with-url/use-sync-path-with-url");
18
17
  /**
19
18
  * WordPress dependencies
20
19
  */
@@ -33,7 +32,9 @@ const {
33
32
  useHistory
34
33
  } = (0, _lockUnlock.unlock)(_router.privateApis);
35
34
  function LeafMoreMenu(props) {
36
- const location = useLocation();
35
+ const {
36
+ params
37
+ } = useLocation();
37
38
  const history = useHistory();
38
39
  const {
39
40
  block
@@ -75,7 +76,7 @@ function LeafMoreMenu(props) {
75
76
  wp_theme_preview: (0, _isPreviewingTheme.currentlyPreviewingTheme)()
76
77
  })
77
78
  }, {
78
- backPath: (0, _useSyncPathWithUrl.getPathFromURL)(location.params)
79
+ backPath: params
79
80
  });
80
81
  }
81
82
  if (name === 'core/page-list-item' && attributes.id && history) {
@@ -86,10 +87,10 @@ function LeafMoreMenu(props) {
86
87
  wp_theme_preview: (0, _isPreviewingTheme.currentlyPreviewingTheme)()
87
88
  })
88
89
  }, {
89
- backPath: (0, _useSyncPathWithUrl.getPathFromURL)(location.params)
90
+ backPath: params
90
91
  });
91
92
  }
92
- }, [history]);
93
+ }, [history, params]);
93
94
  return (0, _react.createElement)(_components.DropdownMenu, {
94
95
  icon: _icons.moreVertical,
95
96
  label: (0, _i18n.__)('Options'),
@@ -1 +1 @@
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,GAAG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R,IAAI,EAAGW,kBAAa;IACpBD,OAAO,EAAGA,CAAA,KAAM;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"}
1
+ {"version":3,"names":["_icons","require","_components","_data","_element","_i18n","_blockEditor","_router","_isPreviewingTheme","_lockUnlock","POPOVER_PROPS","className","placement","useLocation","useHistory","unlock","routerPrivateApis","LeafMoreMenu","props","params","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","_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';\n\nconst { useLocation, useHistory } = unlock( routerPrivateApis );\n\nexport default function LeafMoreMenu( props ) {\n\tconst { params } = 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: 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: params,\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[ history, params ]\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;AAxBA;AACA;AACA;;AAUA,MAAMS,aAAa,GAAG;EACrBC,SAAS,EAAE,2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;MAC1C2B,OAAO,CAAC,CAAC;IACV;EAAG,GAED,IAAA/B,QAAE,EAAE,SAAU,CACP,CAAC,EACX,IAAAuB,MAAA,CAAAC,aAAA,EAACpD,WAAA,CAAA8D,QAAQ;IACRR,IAAI,EAAGW,kBAAa;IACpBD,OAAO,EAAGA,CAAA,KAAM;MACf3C,cAAc,CAAE,CAAED,QAAQ,CAAE,EAAEY,YAAa,CAAC;MAC5C2B,OAAO,CAAC,CAAC;IACV;EAAG,GAED,IAAA/B,QAAE,EAAE,WAAY,CACT,CAAC,EACTT,KAAK,CAACoB,UAAU,EAAEI,IAAI,KAAK,MAAM,IAClCxB,KAAK,CAACoB,UAAU,EAAEG,EAAE,IACnB,IAAAS,MAAA,CAAAC,aAAA,EAACpD,WAAA,CAAA8D,QAAQ;IACRE,OAAO,EAAGA,CAAA,KAAM;MACf5B,UAAU,CAAEjB,KAAM,CAAC;MACnBwC,OAAO,CAAC,CAAC;IACV;EAAG,GAED5B,SACO,CAEF,CAAC,EACZ,IAAAoB,MAAA,CAAAC,aAAA,EAACpD,WAAA,CAAA6D,SAAS,QACT,IAAAV,MAAA,CAAAC,aAAA,EAACpD,WAAA,CAAA8D,QAAQ;IACRE,OAAO,EAAGA,CAAA,KAAM;MACfzC,YAAY,CAAE,CAAEH,QAAQ,CAAE,EAAE,KAAM,CAAC;MACnCuC,OAAO,CAAC,CAAC;IACV;EAAG,GAEDjC,WACO,CACA,CACV,CAEU,CAAC;AAEjB","ignoreList":[]}
@@ -1 +1 @@
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-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"}
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,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;EACCC,QAAQ,EAAEF,cAAc;EACxBG,OAAO,EAAE,CAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAE;EAClE;EACA;EACA;EACAC,OAAO,EAAE,YAAY;EACrBC,KAAK,EAAE;AACR,CAAC,CACD;AAEc,SAASC,qBAAqBA,CAAE;EAAEC;AAAa,CAAC,EAAG;EACjE,MAAM;IAAEC,oBAAoB;IAAEC;EAAU,CAAC,GAAG,IAAAC,eAAS,EAClDC,MAAM,IAAM;IACb,MAAM;MACLC,wBAAwB;MACxBC,YAAY;MACZC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