@wordpress/edit-site 6.10.0 → 6.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (516) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/components/add-new-post/index.js +1 -1
  3. package/build/components/add-new-post/index.js.map +1 -1
  4. package/build/components/add-new-template/index.js +1 -1
  5. package/build/components/add-new-template/index.js.map +1 -1
  6. package/build/components/add-new-template/utils.js +8 -8
  7. package/build/components/add-new-template/utils.js.map +1 -1
  8. package/build/components/app/index.js +2 -2
  9. package/build/components/app/index.js.map +1 -1
  10. package/build/components/block-editor/use-editor-iframe-props.js +29 -22
  11. package/build/components/block-editor/use-editor-iframe-props.js.map +1 -1
  12. package/build/components/block-editor/use-site-editor-settings.js +10 -8
  13. package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
  14. package/build/components/editor/index.js +32 -14
  15. package/build/components/editor/index.js.map +1 -1
  16. package/build/components/editor/use-adapt-editor-to-canvas.js +49 -0
  17. package/build/components/editor/use-adapt-editor-to-canvas.js.map +1 -0
  18. package/build/components/editor/use-editor-title.js +30 -13
  19. package/build/components/editor/use-editor-title.js.map +1 -1
  20. package/build/components/global-styles/font-sizes/font-size.js +6 -6
  21. package/build/components/global-styles/font-sizes/font-size.js.map +1 -1
  22. package/build/components/global-styles/font-sizes/font-sizes-count.js +0 -1
  23. package/build/components/global-styles/font-sizes/font-sizes-count.js.map +1 -1
  24. package/build/components/global-styles/font-sizes/font-sizes.js +4 -4
  25. package/build/components/global-styles/font-sizes/font-sizes.js.map +1 -1
  26. package/build/components/global-styles/palette.js +16 -13
  27. package/build/components/global-styles/palette.js.map +1 -1
  28. package/build/components/global-styles/root-menu.js +0 -4
  29. package/build/components/global-styles/root-menu.js.map +1 -1
  30. package/build/components/global-styles/screen-block-list.js +0 -4
  31. package/build/components/global-styles/screen-block-list.js.map +1 -1
  32. package/build/components/global-styles/screen-css.js +1 -1
  33. package/build/components/global-styles/screen-css.js.map +1 -1
  34. package/build/components/global-styles/screen-revisions/revisions-buttons.js +26 -24
  35. package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  36. package/build/components/global-styles/screen-root.js +0 -3
  37. package/build/components/global-styles/screen-root.js.map +1 -1
  38. package/build/components/global-styles/screen-style-variations.js +5 -1
  39. package/build/components/global-styles/screen-style-variations.js.map +1 -1
  40. package/build/components/global-styles/shadows-edit-panel.js +11 -13
  41. package/build/components/global-styles/shadows-edit-panel.js.map +1 -1
  42. package/build/components/global-styles/shadows-panel.js +0 -3
  43. package/build/components/global-styles/shadows-panel.js.map +1 -1
  44. package/build/components/global-styles/typography-elements.js +1 -4
  45. package/build/components/global-styles/typography-elements.js.map +1 -1
  46. package/build/components/global-styles/ui.js +49 -2
  47. package/build/components/global-styles/ui.js.map +1 -1
  48. package/build/components/global-styles/variations/variation.js +2 -2
  49. package/build/components/global-styles/variations/variation.js.map +1 -1
  50. package/build/components/global-styles/variations/variations-panel.js +0 -1
  51. package/build/components/global-styles/variations/variations-panel.js.map +1 -1
  52. package/build/components/global-styles-renderer/index.js +6 -8
  53. package/build/components/global-styles-renderer/index.js.map +1 -1
  54. package/build/components/global-styles-sidebar/default-sidebar.js +0 -1
  55. package/build/components/global-styles-sidebar/default-sidebar.js.map +1 -1
  56. package/build/components/global-styles-sidebar/index.js +43 -30
  57. package/build/components/global-styles-sidebar/index.js.map +1 -1
  58. package/build/components/layout/animation.js +1 -3
  59. package/build/components/layout/animation.js.map +1 -1
  60. package/build/components/layout/hooks.js +1 -10
  61. package/build/components/layout/hooks.js.map +1 -1
  62. package/build/components/layout/index.js +23 -35
  63. package/build/components/layout/index.js.map +1 -1
  64. package/build/components/layout/router.js +17 -140
  65. package/build/components/layout/router.js.map +1 -1
  66. package/build/components/page-patterns/delete-category-menu-item.js +3 -3
  67. package/build/components/page-patterns/delete-category-menu-item.js.map +1 -1
  68. package/build/components/page-patterns/fields.js +3 -7
  69. package/build/components/page-patterns/fields.js.map +1 -1
  70. package/build/components/page-patterns/use-pattern-settings.js +1 -1
  71. package/build/components/page-patterns/use-pattern-settings.js.map +1 -1
  72. package/build/components/page-templates/fields.js +1 -2
  73. package/build/components/page-templates/fields.js.map +1 -1
  74. package/build/components/page-templates/index.js +1 -2
  75. package/build/components/page-templates/index.js.map +1 -1
  76. package/build/components/pagination/index.js +1 -1
  77. package/build/components/pagination/index.js.map +1 -1
  78. package/build/components/post-edit/index.js +15 -5
  79. package/build/components/post-edit/index.js.map +1 -1
  80. package/build/components/post-fields/index.js +4 -244
  81. package/build/components/post-fields/index.js.map +1 -1
  82. package/build/components/post-list/index.js +12 -2
  83. package/build/components/post-list/index.js.map +1 -1
  84. package/build/components/posts-app/index.js.map +1 -1
  85. package/build/components/posts-app/router.js +4 -4
  86. package/build/components/posts-app/router.js.map +1 -1
  87. package/build/components/resizable-frame/index.js +21 -9
  88. package/build/components/resizable-frame/index.js.map +1 -1
  89. package/build/components/revisions/index.js +1 -1
  90. package/build/components/revisions/index.js.map +1 -1
  91. package/build/components/save-keyboard-shortcut/index.js +78 -0
  92. package/build/components/save-keyboard-shortcut/index.js.map +1 -0
  93. package/build/components/save-panel/index.js +17 -6
  94. package/build/components/save-panel/index.js.map +1 -1
  95. package/build/components/sidebar/index.js +11 -3
  96. package/build/components/sidebar/index.js.map +1 -1
  97. package/build/components/sidebar-dataviews/default-views.js +2 -5
  98. package/build/components/sidebar-dataviews/default-views.js.map +1 -1
  99. package/build/components/sidebar-global-styles-wrapper/index.js +129 -0
  100. package/build/components/sidebar-global-styles-wrapper/index.js.map +1 -0
  101. package/build/components/sidebar-navigation-screen/index.js +2 -1
  102. package/build/components/sidebar-navigation-screen/index.js.map +1 -1
  103. package/build/components/sidebar-navigation-screen-global-styles/index.js +33 -71
  104. package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  105. package/build/components/sidebar-navigation-screen-main/index.js +43 -42
  106. package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
  107. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +1 -1
  108. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  109. package/build/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js +3 -3
  110. package/build/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
  111. package/build/components/sidebar-navigation-screen-navigation-menus/index.js +7 -12
  112. package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  113. package/build/components/site-editor-routes/home-edit.js +26 -0
  114. package/build/components/site-editor-routes/home-edit.js.map +1 -0
  115. package/build/components/site-editor-routes/home-view.js +25 -0
  116. package/build/components/site-editor-routes/home-view.js.map +1 -0
  117. package/build/components/site-editor-routes/index.js +49 -0
  118. package/build/components/site-editor-routes/index.js.map +1 -0
  119. package/build/components/site-editor-routes/navigation-edit.js +29 -0
  120. package/build/components/site-editor-routes/navigation-edit.js.map +1 -0
  121. package/build/components/site-editor-routes/navigation-item-edit.js +31 -0
  122. package/build/components/site-editor-routes/navigation-item-edit.js.map +1 -0
  123. package/build/components/site-editor-routes/navigation-item-view.js +30 -0
  124. package/build/components/site-editor-routes/navigation-item-view.js.map +1 -0
  125. package/build/components/site-editor-routes/navigation-view.js +28 -0
  126. package/build/components/site-editor-routes/navigation-view.js.map +1 -0
  127. package/build/components/site-editor-routes/pages-edit.js +43 -0
  128. package/build/components/site-editor-routes/pages-edit.js.map +1 -0
  129. package/build/components/site-editor-routes/pages-list-view-quick-edit.js +64 -0
  130. package/build/components/site-editor-routes/pages-list-view-quick-edit.js.map +1 -0
  131. package/build/components/site-editor-routes/pages-list-view.js +47 -0
  132. package/build/components/site-editor-routes/pages-list-view.js.map +1 -0
  133. package/build/components/site-editor-routes/pages-view-quick-edit.js +61 -0
  134. package/build/components/site-editor-routes/pages-view-quick-edit.js.map +1 -0
  135. package/build/components/site-editor-routes/pages-view.js +42 -0
  136. package/build/components/site-editor-routes/pages-view.js.map +1 -0
  137. package/build/components/site-editor-routes/patterns-edit.js +31 -0
  138. package/build/components/site-editor-routes/patterns-edit.js.map +1 -0
  139. package/build/components/site-editor-routes/patterns-view.js +29 -0
  140. package/build/components/site-editor-routes/patterns-view.js.map +1 -0
  141. package/build/components/site-editor-routes/styles-edit.js +33 -0
  142. package/build/components/site-editor-routes/styles-edit.js.map +1 -0
  143. package/build/components/site-editor-routes/styles-view.js +33 -0
  144. package/build/components/site-editor-routes/styles-view.js.map +1 -0
  145. package/build/components/site-editor-routes/templates-edit.js +31 -0
  146. package/build/components/site-editor-routes/templates-edit.js.map +1 -0
  147. package/build/components/site-editor-routes/templates-list-view.js +34 -0
  148. package/build/components/site-editor-routes/templates-list-view.js.map +1 -0
  149. package/build/components/site-editor-routes/templates-view.js +29 -0
  150. package/build/components/site-editor-routes/templates-view.js.map +1 -0
  151. package/build/components/site-hub/index.js +22 -8
  152. package/build/components/site-hub/index.js.map +1 -1
  153. package/build/components/style-book/color-examples.js +46 -0
  154. package/build/components/style-book/color-examples.js.map +1 -0
  155. package/build/components/style-book/constants.js +85 -13
  156. package/build/components/style-book/constants.js.map +1 -1
  157. package/build/components/style-book/duotone-examples.js +55 -0
  158. package/build/components/style-book/duotone-examples.js.map +1 -0
  159. package/build/components/style-book/examples.js +116 -3
  160. package/build/components/style-book/examples.js.map +1 -1
  161. package/build/components/style-book/index.js +161 -46
  162. package/build/components/style-book/index.js.map +1 -1
  163. package/build/components/style-book/types.js.map +1 -1
  164. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +38 -33
  165. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  166. package/build/components/welcome-guide/index.js +4 -2
  167. package/build/components/welcome-guide/index.js.map +1 -1
  168. package/build/components/welcome-guide/page.js +1 -9
  169. package/build/components/welcome-guide/page.js.map +1 -1
  170. package/build/components/welcome-guide/template.js +1 -12
  171. package/build/components/welcome-guide/template.js.map +1 -1
  172. package/build/hooks/commands/use-common-commands.js +61 -45
  173. package/build/hooks/commands/use-common-commands.js.map +1 -1
  174. package/build/hooks/commands/use-set-command-context.js +12 -15
  175. package/build/hooks/commands/use-set-command-context.js.map +1 -1
  176. package/build/index.js +1 -0
  177. package/build/index.js.map +1 -1
  178. package/build/posts.js +1 -0
  179. package/build/posts.js.map +1 -1
  180. package/build/store/private-actions.js +8 -60
  181. package/build/store/private-actions.js.map +1 -1
  182. package/build/store/private-selectors.js +4 -12
  183. package/build/store/private-selectors.js.map +1 -1
  184. package/build/store/reducer.js +9 -18
  185. package/build/store/reducer.js.map +1 -1
  186. package/build-module/components/add-new-post/index.js +1 -1
  187. package/build-module/components/add-new-post/index.js.map +1 -1
  188. package/build-module/components/add-new-template/index.js +1 -1
  189. package/build-module/components/add-new-template/index.js.map +1 -1
  190. package/build-module/components/add-new-template/utils.js +9 -9
  191. package/build-module/components/add-new-template/utils.js.map +1 -1
  192. package/build-module/components/app/index.js +4 -4
  193. package/build-module/components/app/index.js.map +1 -1
  194. package/build-module/components/block-editor/use-editor-iframe-props.js +30 -23
  195. package/build-module/components/block-editor/use-editor-iframe-props.js.map +1 -1
  196. package/build-module/components/block-editor/use-site-editor-settings.js +10 -8
  197. package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
  198. package/build-module/components/editor/index.js +32 -14
  199. package/build-module/components/editor/index.js.map +1 -1
  200. package/build-module/components/editor/use-adapt-editor-to-canvas.js +42 -0
  201. package/build-module/components/editor/use-adapt-editor-to-canvas.js.map +1 -0
  202. package/build-module/components/editor/use-editor-title.js +31 -14
  203. package/build-module/components/editor/use-editor-title.js.map +1 -1
  204. package/build-module/components/global-styles/font-sizes/font-size.js +6 -6
  205. package/build-module/components/global-styles/font-sizes/font-size.js.map +1 -1
  206. package/build-module/components/global-styles/font-sizes/font-sizes-count.js +0 -1
  207. package/build-module/components/global-styles/font-sizes/font-sizes-count.js.map +1 -1
  208. package/build-module/components/global-styles/font-sizes/font-sizes.js +4 -4
  209. package/build-module/components/global-styles/font-sizes/font-sizes.js.map +1 -1
  210. package/build-module/components/global-styles/palette.js +17 -14
  211. package/build-module/components/global-styles/palette.js.map +1 -1
  212. package/build-module/components/global-styles/root-menu.js +0 -4
  213. package/build-module/components/global-styles/root-menu.js.map +1 -1
  214. package/build-module/components/global-styles/screen-block-list.js +0 -4
  215. package/build-module/components/global-styles/screen-block-list.js.map +1 -1
  216. package/build-module/components/global-styles/screen-css.js +1 -1
  217. package/build-module/components/global-styles/screen-css.js.map +1 -1
  218. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +27 -25
  219. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  220. package/build-module/components/global-styles/screen-root.js +0 -3
  221. package/build-module/components/global-styles/screen-root.js.map +1 -1
  222. package/build-module/components/global-styles/screen-style-variations.js +5 -1
  223. package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
  224. package/build-module/components/global-styles/shadows-edit-panel.js +11 -13
  225. package/build-module/components/global-styles/shadows-edit-panel.js.map +1 -1
  226. package/build-module/components/global-styles/shadows-panel.js +0 -3
  227. package/build-module/components/global-styles/shadows-panel.js.map +1 -1
  228. package/build-module/components/global-styles/typography-elements.js +2 -5
  229. package/build-module/components/global-styles/typography-elements.js.map +1 -1
  230. package/build-module/components/global-styles/ui.js +50 -3
  231. package/build-module/components/global-styles/ui.js.map +1 -1
  232. package/build-module/components/global-styles/variations/variation.js +3 -3
  233. package/build-module/components/global-styles/variations/variation.js.map +1 -1
  234. package/build-module/components/global-styles/variations/variations-panel.js +0 -1
  235. package/build-module/components/global-styles/variations/variations-panel.js.map +1 -1
  236. package/build-module/components/global-styles-renderer/index.js +6 -8
  237. package/build-module/components/global-styles-renderer/index.js.map +1 -1
  238. package/build-module/components/global-styles-sidebar/default-sidebar.js +0 -1
  239. package/build-module/components/global-styles-sidebar/default-sidebar.js.map +1 -1
  240. package/build-module/components/global-styles-sidebar/index.js +44 -31
  241. package/build-module/components/global-styles-sidebar/index.js.map +1 -1
  242. package/build-module/components/layout/animation.js +1 -3
  243. package/build-module/components/layout/animation.js.map +1 -1
  244. package/build-module/components/layout/hooks.js +1 -9
  245. package/build-module/components/layout/hooks.js.map +1 -1
  246. package/build-module/components/layout/index.js +23 -35
  247. package/build-module/components/layout/index.js.map +1 -1
  248. package/build-module/components/layout/router.js +17 -139
  249. package/build-module/components/layout/router.js.map +1 -1
  250. package/build-module/components/page-patterns/delete-category-menu-item.js +4 -4
  251. package/build-module/components/page-patterns/delete-category-menu-item.js.map +1 -1
  252. package/build-module/components/page-patterns/fields.js +4 -8
  253. package/build-module/components/page-patterns/fields.js.map +1 -1
  254. package/build-module/components/page-patterns/use-pattern-settings.js +1 -1
  255. package/build-module/components/page-patterns/use-pattern-settings.js.map +1 -1
  256. package/build-module/components/page-templates/fields.js +1 -2
  257. package/build-module/components/page-templates/fields.js.map +1 -1
  258. package/build-module/components/page-templates/index.js +1 -2
  259. package/build-module/components/page-templates/index.js.map +1 -1
  260. package/build-module/components/pagination/index.js +1 -1
  261. package/build-module/components/pagination/index.js.map +1 -1
  262. package/build-module/components/post-edit/index.js +15 -5
  263. package/build-module/components/post-edit/index.js.map +1 -1
  264. package/build-module/components/post-fields/index.js +7 -246
  265. package/build-module/components/post-fields/index.js.map +1 -1
  266. package/build-module/components/post-list/index.js +12 -2
  267. package/build-module/components/post-list/index.js.map +1 -1
  268. package/build-module/components/posts-app/index.js +2 -2
  269. package/build-module/components/posts-app/index.js.map +1 -1
  270. package/build-module/components/posts-app/router.js +3 -3
  271. package/build-module/components/posts-app/router.js.map +1 -1
  272. package/build-module/components/resizable-frame/index.js +21 -10
  273. package/build-module/components/resizable-frame/index.js.map +1 -1
  274. package/build-module/components/revisions/index.js +1 -1
  275. package/build-module/components/revisions/index.js.map +1 -1
  276. package/build-module/components/save-keyboard-shortcut/index.js +71 -0
  277. package/build-module/components/save-keyboard-shortcut/index.js.map +1 -0
  278. package/build-module/components/save-panel/index.js +17 -6
  279. package/build-module/components/save-panel/index.js.map +1 -1
  280. package/build-module/components/sidebar/index.js +11 -3
  281. package/build-module/components/sidebar/index.js.map +1 -1
  282. package/build-module/components/sidebar-dataviews/default-views.js +2 -5
  283. package/build-module/components/sidebar-dataviews/default-views.js.map +1 -1
  284. package/build-module/components/sidebar-global-styles-wrapper/index.js +121 -0
  285. package/build-module/components/sidebar-global-styles-wrapper/index.js.map +1 -0
  286. package/build-module/components/sidebar-navigation-screen/index.js +2 -1
  287. package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
  288. package/build-module/components/sidebar-navigation-screen-global-styles/index.js +34 -72
  289. package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  290. package/build-module/components/sidebar-navigation-screen-main/index.js +43 -43
  291. package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
  292. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +2 -2
  293. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  294. package/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js +4 -4
  295. package/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
  296. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +8 -13
  297. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  298. package/build-module/components/site-editor-routes/home-edit.js +18 -0
  299. package/build-module/components/site-editor-routes/home-edit.js.map +1 -0
  300. package/build-module/components/site-editor-routes/home-view.js +17 -0
  301. package/build-module/components/site-editor-routes/home-view.js.map +1 -0
  302. package/build-module/components/site-editor-routes/index.js +42 -0
  303. package/build-module/components/site-editor-routes/index.js.map +1 -0
  304. package/build-module/components/site-editor-routes/navigation-edit.js +21 -0
  305. package/build-module/components/site-editor-routes/navigation-edit.js.map +1 -0
  306. package/build-module/components/site-editor-routes/navigation-item-edit.js +23 -0
  307. package/build-module/components/site-editor-routes/navigation-item-edit.js.map +1 -0
  308. package/build-module/components/site-editor-routes/navigation-item-view.js +22 -0
  309. package/build-module/components/site-editor-routes/navigation-item-view.js.map +1 -0
  310. package/build-module/components/site-editor-routes/navigation-view.js +20 -0
  311. package/build-module/components/site-editor-routes/navigation-view.js.map +1 -0
  312. package/build-module/components/site-editor-routes/pages-edit.js +35 -0
  313. package/build-module/components/site-editor-routes/pages-edit.js.map +1 -0
  314. package/build-module/components/site-editor-routes/pages-list-view-quick-edit.js +56 -0
  315. package/build-module/components/site-editor-routes/pages-list-view-quick-edit.js.map +1 -0
  316. package/build-module/components/site-editor-routes/pages-list-view.js +39 -0
  317. package/build-module/components/site-editor-routes/pages-list-view.js.map +1 -0
  318. package/build-module/components/site-editor-routes/pages-view-quick-edit.js +53 -0
  319. package/build-module/components/site-editor-routes/pages-view-quick-edit.js.map +1 -0
  320. package/build-module/components/site-editor-routes/pages-view.js +34 -0
  321. package/build-module/components/site-editor-routes/pages-view.js.map +1 -0
  322. package/build-module/components/site-editor-routes/patterns-edit.js +23 -0
  323. package/build-module/components/site-editor-routes/patterns-edit.js.map +1 -0
  324. package/build-module/components/site-editor-routes/patterns-view.js +21 -0
  325. package/build-module/components/site-editor-routes/patterns-view.js.map +1 -0
  326. package/build-module/components/site-editor-routes/styles-edit.js +25 -0
  327. package/build-module/components/site-editor-routes/styles-edit.js.map +1 -0
  328. package/build-module/components/site-editor-routes/styles-view.js +25 -0
  329. package/build-module/components/site-editor-routes/styles-view.js.map +1 -0
  330. package/build-module/components/site-editor-routes/templates-edit.js +23 -0
  331. package/build-module/components/site-editor-routes/templates-edit.js.map +1 -0
  332. package/build-module/components/site-editor-routes/templates-list-view.js +26 -0
  333. package/build-module/components/site-editor-routes/templates-list-view.js.map +1 -0
  334. package/build-module/components/site-editor-routes/templates-view.js +21 -0
  335. package/build-module/components/site-editor-routes/templates-view.js.map +1 -0
  336. package/build-module/components/site-hub/index.js +22 -8
  337. package/build-module/components/site-hub/index.js.map +1 -1
  338. package/build-module/components/style-book/color-examples.js +38 -0
  339. package/build-module/components/style-book/color-examples.js.map +1 -0
  340. package/build-module/components/style-book/constants.js +84 -12
  341. package/build-module/components/style-book/constants.js.map +1 -1
  342. package/build-module/components/style-book/duotone-examples.js +48 -0
  343. package/build-module/components/style-book/duotone-examples.js.map +1 -0
  344. package/build-module/components/style-book/examples.js +117 -3
  345. package/build-module/components/style-book/examples.js.map +1 -1
  346. package/build-module/components/style-book/index.js +164 -49
  347. package/build-module/components/style-book/index.js.map +1 -1
  348. package/build-module/components/style-book/types.js.map +1 -1
  349. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +38 -33
  350. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  351. package/build-module/components/welcome-guide/index.js +4 -2
  352. package/build-module/components/welcome-guide/index.js.map +1 -1
  353. package/build-module/components/welcome-guide/page.js +1 -9
  354. package/build-module/components/welcome-guide/page.js.map +1 -1
  355. package/build-module/components/welcome-guide/template.js +1 -11
  356. package/build-module/components/welcome-guide/template.js.map +1 -1
  357. package/build-module/hooks/commands/use-common-commands.js +61 -45
  358. package/build-module/hooks/commands/use-common-commands.js.map +1 -1
  359. package/build-module/hooks/commands/use-set-command-context.js +12 -15
  360. package/build-module/hooks/commands/use-set-command-context.js.map +1 -1
  361. package/build-module/index.js +1 -0
  362. package/build-module/index.js.map +1 -1
  363. package/build-module/posts.js +1 -0
  364. package/build-module/posts.js.map +1 -1
  365. package/build-module/store/private-actions.js +6 -58
  366. package/build-module/store/private-actions.js.map +1 -1
  367. package/build-module/store/private-selectors.js +3 -11
  368. package/build-module/store/private-selectors.js.map +1 -1
  369. package/build-module/store/reducer.js +9 -18
  370. package/build-module/store/reducer.js.map +1 -1
  371. package/build-style/posts-rtl.css +60 -14
  372. package/build-style/posts.css +60 -14
  373. package/build-style/style-rtl.css +232 -50
  374. package/build-style/style.css +232 -50
  375. package/package.json +42 -41
  376. package/src/components/add-new-post/index.js +1 -1
  377. package/src/components/add-new-template/index.js +1 -1
  378. package/src/components/add-new-template/utils.js +12 -9
  379. package/src/components/app/index.js +4 -4
  380. package/src/components/block-editor/use-editor-iframe-props.js +23 -20
  381. package/src/components/block-editor/use-site-editor-settings.js +12 -10
  382. package/src/components/editor/index.js +50 -17
  383. package/src/components/editor/use-adapt-editor-to-canvas.js +53 -0
  384. package/src/components/editor/use-editor-title.js +40 -16
  385. package/src/components/editor-canvas-container/style.scss +0 -1
  386. package/src/components/global-styles/font-sizes/font-size.js +11 -15
  387. package/src/components/global-styles/font-sizes/font-sizes-count.js +1 -4
  388. package/src/components/global-styles/font-sizes/font-sizes.js +7 -9
  389. package/src/components/global-styles/palette.js +21 -18
  390. package/src/components/global-styles/root-menu.js +3 -16
  391. package/src/components/global-styles/screen-block-list.js +0 -7
  392. package/src/components/global-styles/screen-css.js +1 -0
  393. package/src/components/global-styles/screen-revisions/revisions-buttons.js +30 -33
  394. package/src/components/global-styles/screen-revisions/style.scss +11 -17
  395. package/src/components/global-styles/screen-root.js +3 -12
  396. package/src/components/global-styles/screen-style-variations.js +4 -1
  397. package/src/components/global-styles/shadows-edit-panel.js +16 -15
  398. package/src/components/global-styles/shadows-panel.js +0 -4
  399. package/src/components/global-styles/typography-elements.js +3 -11
  400. package/src/components/global-styles/ui.js +53 -2
  401. package/src/components/global-styles/variations/variation.js +3 -3
  402. package/src/components/global-styles/variations/variations-panel.js +0 -1
  403. package/src/components/global-styles-renderer/index.js +4 -10
  404. package/src/components/global-styles-sidebar/default-sidebar.js +0 -1
  405. package/src/components/global-styles-sidebar/index.js +86 -65
  406. package/src/components/global-styles-sidebar/style.scss +6 -0
  407. package/src/components/layout/animation.js +0 -1
  408. package/src/components/layout/hooks.js +1 -7
  409. package/src/components/layout/index.js +22 -35
  410. package/src/components/layout/router.js +18 -133
  411. package/src/components/layout/style.scss +2 -2
  412. package/src/components/page-patterns/delete-category-menu-item.js +4 -4
  413. package/src/components/page-patterns/fields.js +6 -12
  414. package/src/components/page-patterns/style.scss +0 -5
  415. package/src/components/page-patterns/use-pattern-settings.js +1 -1
  416. package/src/components/page-templates/fields.js +2 -3
  417. package/src/components/page-templates/index.js +0 -1
  418. package/src/components/pagination/index.js +1 -1
  419. package/src/components/post-edit/index.js +45 -6
  420. package/src/components/post-edit/style.scss +7 -0
  421. package/src/components/post-fields/index.js +22 -323
  422. package/src/components/post-fields/style.scss +3 -0
  423. package/src/components/post-list/index.js +10 -4
  424. package/src/components/post-list/style.scss +30 -4
  425. package/src/components/posts-app/index.js +2 -2
  426. package/src/components/posts-app/router.js +3 -3
  427. package/src/components/resizable-frame/index.js +19 -10
  428. package/src/components/revisions/index.js +4 -1
  429. package/src/components/save-keyboard-shortcut/index.js +69 -0
  430. package/src/components/save-panel/index.js +30 -32
  431. package/src/components/sidebar/index.js +23 -7
  432. package/src/components/sidebar-dataviews/default-views.js +2 -5
  433. package/src/components/sidebar-global-styles-wrapper/index.js +150 -0
  434. package/src/components/sidebar-global-styles-wrapper/style.scss +35 -0
  435. package/src/components/sidebar-navigation-item/style.scss +2 -2
  436. package/src/components/sidebar-navigation-screen/index.js +2 -1
  437. package/src/components/sidebar-navigation-screen-global-styles/index.js +42 -99
  438. package/src/components/sidebar-navigation-screen-main/index.js +46 -45
  439. package/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +2 -2
  440. package/src/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js +4 -4
  441. package/src/components/sidebar-navigation-screen-navigation-menus/index.js +11 -13
  442. package/src/components/sidebar-navigation-screen-navigation-menus/style.scss +1 -1
  443. package/src/components/site-editor-routes/README.md +20 -0
  444. package/src/components/site-editor-routes/home-edit.js +17 -0
  445. package/src/components/site-editor-routes/home-view.js +16 -0
  446. package/src/components/site-editor-routes/index.js +60 -0
  447. package/src/components/site-editor-routes/navigation-edit.js +22 -0
  448. package/src/components/site-editor-routes/navigation-item-edit.js +26 -0
  449. package/src/components/site-editor-routes/navigation-item-view.js +25 -0
  450. package/src/components/site-editor-routes/navigation-view.js +21 -0
  451. package/src/components/site-editor-routes/pages-edit.js +35 -0
  452. package/src/components/site-editor-routes/pages-list-view-quick-edit.js +56 -0
  453. package/src/components/site-editor-routes/pages-list-view.js +44 -0
  454. package/src/components/site-editor-routes/pages-view-quick-edit.js +53 -0
  455. package/src/components/site-editor-routes/pages-view.js +39 -0
  456. package/src/components/site-editor-routes/patterns-edit.js +24 -0
  457. package/src/components/site-editor-routes/patterns-view.js +22 -0
  458. package/src/components/site-editor-routes/styles-edit.js +26 -0
  459. package/src/components/site-editor-routes/styles-view.js +26 -0
  460. package/src/components/site-editor-routes/templates-edit.js +22 -0
  461. package/src/components/site-editor-routes/templates-list-view.js +28 -0
  462. package/src/components/site-editor-routes/templates-view.js +22 -0
  463. package/src/components/site-hub/index.js +35 -18
  464. package/src/components/site-hub/style.scss +4 -0
  465. package/src/components/site-icon/style.scss +16 -0
  466. package/src/components/style-book/color-examples.tsx +44 -0
  467. package/src/components/style-book/constants.ts +94 -13
  468. package/src/components/style-book/duotone-examples.tsx +53 -0
  469. package/src/components/style-book/examples.tsx +217 -0
  470. package/src/components/style-book/index.js +235 -60
  471. package/src/components/style-book/style.scss +12 -14
  472. package/src/components/style-book/test/categories.js +0 -5
  473. package/src/components/style-book/types.ts +34 -1
  474. package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +65 -65
  475. package/src/components/welcome-guide/index.js +3 -3
  476. package/src/components/welcome-guide/page.js +1 -7
  477. package/src/components/welcome-guide/template.js +1 -8
  478. package/src/hooks/commands/use-common-commands.js +257 -230
  479. package/src/hooks/commands/use-set-command-context.js +7 -9
  480. package/src/index.js +1 -0
  481. package/src/posts.js +1 -0
  482. package/src/store/private-actions.js +7 -79
  483. package/src/store/private-selectors.js +4 -11
  484. package/src/store/reducer.js +10 -18
  485. package/src/style.scss +3 -1
  486. package/build/components/async/index.js +0 -51
  487. package/build/components/async/index.js.map +0 -1
  488. package/build/components/keyboard-shortcuts/global.js +0 -53
  489. package/build/components/keyboard-shortcuts/global.js.map +0 -1
  490. package/build/components/keyboard-shortcuts/register.js +0 -34
  491. package/build/components/keyboard-shortcuts/register.js.map +0 -1
  492. package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +0 -69
  493. package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +0 -1
  494. package/build/components/use-edited-entity-record/index.js +0 -60
  495. package/build/components/use-edited-entity-record/index.js.map +0 -1
  496. package/build/hooks/commands/use-edit-mode-commands.js +0 -175
  497. package/build/hooks/commands/use-edit-mode-commands.js.map +0 -1
  498. package/build-module/components/async/index.js +0 -44
  499. package/build-module/components/async/index.js.map +0 -1
  500. package/build-module/components/keyboard-shortcuts/global.js +0 -46
  501. package/build-module/components/keyboard-shortcuts/global.js.map +0 -1
  502. package/build-module/components/keyboard-shortcuts/register.js +0 -27
  503. package/build-module/components/keyboard-shortcuts/register.js.map +0 -1
  504. package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +0 -62
  505. package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +0 -1
  506. package/build-module/components/use-edited-entity-record/index.js +0 -53
  507. package/build-module/components/use-edited-entity-record/index.js.map +0 -1
  508. package/build-module/hooks/commands/use-edit-mode-commands.js +0 -167
  509. package/build-module/hooks/commands/use-edit-mode-commands.js.map +0 -1
  510. package/src/components/async/index.js +0 -43
  511. package/src/components/keyboard-shortcuts/global.js +0 -47
  512. package/src/components/keyboard-shortcuts/register.js +0 -27
  513. package/src/components/style-book/examples.ts +0 -63
  514. package/src/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +0 -73
  515. package/src/components/use-edited-entity-record/index.js +0 -58
  516. package/src/hooks/commands/use-edit-mode-commands.js +0 -172
@@ -1 +1 @@
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","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( { postType: 'wp_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,CAAC;MACDT,OAAO,CAACU,IAAI,CAAE;QAAEL,QAAQ,EAAE;MAAgB,CAAE,CAAC;IAC9C,CAAC,CAAC,OAA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AAQ;UAAEF,MAAM,EAAEiC,WAAW,CAAChC;QAAG,CAAE,CAAC;MACrD;IACD,CAAC,CAAC,OAAQO,KAAK,EAAG;MACjBb,iBAAiB,CAChB,IAAAc,aAAO,EACN;MACA,IAAAJ,QAAE,EAAE,2CAA4C,CAAC,EACjDG,KAAK,EAAEE,OACR,CAAC,EAED;QACCJ,IAAI,EAAE;MACP,CACD,CAAC;IACF;EACD,CAAC;EAED,OAAOsB,eAAe;AACvB;AAEe,SAASS,yBAAyBA,CAAA,EAAG;EACnD,OAAO;IACNvC,YAAY,EAAER,uBAAuB,CAAC,CAAC;IACvC6B,UAAU,EAAER,qBAAqB,CAAC,CAAC;IACnCiB,eAAe,EAAEF,0BAA0B,CAAC;EAC7C,CAAC;AACF","ignoreList":[]}
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","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","_x","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 { __, _x, 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( { postType: 'wp_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_x( '%s (Copy)', 'navigation menu' ),\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;;AAK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@@ -13,14 +13,14 @@ var _htmlEntities = require("@wordpress/html-entities");
13
13
  // Copied from packages/block-library/src/navigation/edit/navigation-menu-selector.js.
14
14
  function buildNavigationLabel(title, id, status) {
15
15
  if (!title?.rendered) {
16
- /* translators: %s is the index of the menu in the list of menus. */
16
+ /* translators: %s: the index of the menu in the list of menus. */
17
17
  return (0, _i18n.sprintf)((0, _i18n.__)('(no title %s)'), id);
18
18
  }
19
19
  if (status === 'publish') {
20
20
  return (0, _htmlEntities.decodeEntities)(title?.rendered);
21
21
  }
22
22
  return (0, _i18n.sprintf)(
23
- // translators: %1s: title of the menu; %2s: status of the menu (draft, pending, etc.).
24
- (0, _i18n.__)('%1$s (%2$s)'), (0, _htmlEntities.decodeEntities)(title?.rendered), status);
23
+ // translators: 1: title of the menu. 2: status of the menu (draft, pending, etc.).
24
+ (0, _i18n._x)('%1$s (%2$s)', 'menu label'), (0, _htmlEntities.decodeEntities)(title?.rendered), status);
25
25
  }
26
26
  //# sourceMappingURL=build-navigation-label.js.map
@@ -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","ignoreList":[]}
1
+ {"version":3,"names":["_i18n","require","_htmlEntities","buildNavigationLabel","title","id","status","rendered","sprintf","__","decodeEntities","_x"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x, 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: 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: 1: title of the menu. 2: status of the menu (draft, pending, etc.).\n\t\t_x( '%1$s (%2$s)', 'menu label' ),\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,IAAAG,QAAE,EAAE,aAAa,EAAE,YAAa,CAAC,EACjC,IAAAD,4BAAc,EAAEN,KAAK,EAAEG,QAAS,CAAC,EACjCD,MACD,CAAC;AACF","ignoreList":[]}
@@ -32,19 +32,16 @@ var _jsxRuntime = require("react/jsx-runtime");
32
32
  // Copied from packages/block-library/src/navigation/edit/navigation-menu-selector.js.
33
33
  function buildMenuLabel(title, id, status) {
34
34
  if (!title) {
35
- /* translators: %s is the index of the menu in the list of menus. */
35
+ /* translators: %s: the index of the menu in the list of menus. */
36
36
  return (0, _i18n.sprintf)((0, _i18n.__)('(no title %s)'), id);
37
37
  }
38
38
  if (status === 'publish') {
39
39
  return (0, _htmlEntities.decodeEntities)(title);
40
40
  }
41
41
  return (0, _i18n.sprintf)(
42
- // translators: %1s: title of the menu; %2s: status of the menu (draft, pending, etc.).
43
- (0, _i18n.__)('%1$s (%2$s)'), (0, _htmlEntities.decodeEntities)(title), status);
42
+ // translators: 1: title of the menu. 2: status of the menu (draft, pending, etc.).
43
+ (0, _i18n._x)('%1$s (%2$s)', 'menu label'), (0, _htmlEntities.decodeEntities)(title), status);
44
44
  }
45
-
46
- // Save a boolean to prevent us creating a fallback more than once per session.
47
- let hasCreatedFallback = false;
48
45
  function SidebarNavigationScreenNavigationMenus({
49
46
  backPath
50
47
  }) {
@@ -57,16 +54,14 @@ function SidebarNavigationScreenNavigationMenus({
57
54
  const {
58
55
  getNavigationFallbackId
59
56
  } = (0, _lockUnlock.unlock)((0, _data.useSelect)(_coreData.store));
57
+ const isCreatingNavigationFallback = (0, _data.useSelect)(select => select(_coreData.store).isResolving('getNavigationFallbackId'), []);
60
58
  const firstNavigationMenu = navigationMenus?.[0];
61
59
 
62
- // Save a boolean to prevent us creating a fallback more than once per session.
63
- if (firstNavigationMenu) {
64
- hasCreatedFallback = true;
65
- }
66
-
67
60
  // If there is no navigation menu found
68
61
  // then trigger fallback algorithm to create one.
69
- if (!firstNavigationMenu && !isResolvingNavigationMenus && hasResolvedNavigationMenus && !hasCreatedFallback) {
62
+ if (!firstNavigationMenu && !isResolvingNavigationMenus && hasResolvedNavigationMenus &&
63
+ // Ensure a fallback navigation is created only once
64
+ !isCreatingNavigationFallback) {
70
65
  getNavigationFallbackId();
71
66
  }
72
67
  const {
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_coreData","_data","_htmlEntities","_components","_icons","_sidebarNavigationScreen","_interopRequireDefault","_sidebarNavigationItem","_constants","_link","_singleNavigationMenu","_useNavigationMenuHandlers","_lockUnlock","_constants2","_jsxRuntime","buildMenuLabel","title","id","status","sprintf","__","decodeEntities","hasCreatedFallback","SidebarNavigationScreenNavigationMenus","backPath","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","jsx","SidebarNavigationScreenWrapper","children","Spinner","className","description","default","navigationMenu","edits","__experimentalItemGroup","map","index","NavMenuItem","postId","withChevron","icon","navigation","rendered","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( { backPath } ) {\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 backPath={ backPath }>\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\tbackPath={ backPath }\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\tbackPath={ backPath }\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 backPath={ backPath }>\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\tbackPath,\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\tbackPath={ backPath }\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: 'wp_navigation',\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;AACA,IAAAc,WAAA,GAAAd,OAAA;AAA6D,IAAAe,WAAA,GAAAf,OAAA;AAx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,MAAM,EAAG1C,EAAI;QAEb2C,WAAW;QACXC,IAAI,EAAGC,iBAAY;QAAAd,QAAA,EAEjBjC,cAAc,CAAEC,KAAK,EAAE+C,QAAQ,EAAEN,KAAK,GAAG,CAAC,EAAEvC,MAAO;MAAC,GAJhDD,EAKM,CACZ;IAAC,CACO;EAAC,CACmB,CAAC;AAEnC;AAEO,SAAS8B,8BAA8BA,CAAE;EAC/CC,QAAQ;EACRgB,OAAO;EACPhD,KAAK;EACLmC,WAAW;EACX3B;AACD,CAAC,EAAG;EACH,oBACC,IAAAV,WAAA,CAAAgC,GAAA,EAACzC,wBAAA,CAAA+C,OAAuB;IACvBpC,KAAK,EAAGA,KAAK,IAAI,IAAAI,QAAE,EAAE,YAAa,CAAG;IACrC4C,OAAO,EAAGA,OAAS;IACnBb,WAAW,EAAGA,WAAW,IAAI,IAAA/B,QAAE,EAAE,+BAAgC,CAAG;IACpEI,QAAQ,EAAGA,QAAU;IACrByC,OAAO,EAAGjB;EAAU,CACpB,CAAC;AAEJ;AAEA,MAAMU,WAAW,GAAGA,CAAE;EAAEC,MAAM;EAAE,GAAGO;AAAM,CAAC,KAAM;EAC/C,MAAMC,QAAQ,GAAG,IAAAC,aAAO,EAAE;IACzBT,MAAM;IACNU,QAAQ,EAAE;EACX,CAAE,CAAC;EACH,oBAAO,IAAAvD,WAAA,CAAAgC,GAAA,EAACvC,sBAAA,CAAA6C,OAAqB;IAAA,GAAMe,QAAQ;IAAA,GAAQD;EAAK,CAAI,CAAC;AAC9D,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_i18n","require","_coreData","_data","_htmlEntities","_components","_icons","_sidebarNavigationScreen","_interopRequireDefault","_sidebarNavigationItem","_constants","_link","_singleNavigationMenu","_useNavigationMenuHandlers","_lockUnlock","_constants2","_jsxRuntime","buildMenuLabel","title","id","status","sprintf","__","decodeEntities","_x","SidebarNavigationScreenNavigationMenus","backPath","records","navigationMenus","isResolving","isResolvingNavigationMenus","hasResolved","hasResolvedNavigationMenus","useEntityRecords","NAVIGATION_POST_TYPE","PRELOADED_NAVIGATION_MENUS_QUERY","isLoading","getNavigationFallbackId","unlock","useSelect","coreStore","isCreatingNavigationFallback","select","firstNavigationMenu","handleSave","handleDelete","handleDuplicate","useNavigationMenuHandlers","hasNavigationMenus","length","jsx","SidebarNavigationScreenWrapper","children","Spinner","className","description","default","navigationMenu","edits","__experimentalItemGroup","map","index","NavMenuItem","postId","withChevron","icon","navigation","rendered","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 { __, _x, 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: 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: 1: title of the menu. 2: status of the menu (draft, pending, etc.).\n\t\t_x( '%1$s (%2$s)', 'menu label' ),\n\t\tdecodeEntities( title ),\n\t\tstatus\n\t);\n}\n\nexport default function SidebarNavigationScreenNavigationMenus( { backPath } ) {\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\tconst isCreatingNavigationFallback = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).isResolving( 'getNavigationFallbackId' ),\n\t\t[]\n\t);\n\n\tconst firstNavigationMenu = navigationMenus?.[ 0 ];\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// Ensure a fallback navigation is created only once\n\t\t! isCreatingNavigationFallback\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 backPath={ backPath }>\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\tbackPath={ backPath }\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\tbackPath={ backPath }\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 backPath={ backPath }>\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\tbackPath,\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\tbackPath={ backPath }\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: 'wp_navigation',\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,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Q,EAAE;EACX,CAAE,CAAC;EACH,oBAAO,IAAAzD,WAAA,CAAAkC,GAAA,EAACzC,sBAAA,CAAA+C,OAAqB;IAAA,GAAMe,QAAQ;IAAA,GAAQD;EAAK,CAAI,CAAC;AAC9D,CAAC","ignoreList":[]}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.homeEditRoute = void 0;
8
+ var _editor = _interopRequireDefault(require("../editor"));
9
+ var _sidebarNavigationScreenMain = _interopRequireDefault(require("../sidebar-navigation-screen-main"));
10
+ var _jsxRuntime = require("react/jsx-runtime");
11
+ /**
12
+ * Internal dependencies
13
+ */
14
+
15
+ const homeEditRoute = exports.homeEditRoute = {
16
+ name: 'home-edit',
17
+ match: params => {
18
+ return params.canvas === 'edit';
19
+ },
20
+ areas: {
21
+ sidebar: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sidebarNavigationScreenMain.default, {}),
22
+ preview: /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.default, {}),
23
+ mobile: /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.default, {})
24
+ }
25
+ };
26
+ //# sourceMappingURL=home-edit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_editor","_interopRequireDefault","require","_sidebarNavigationScreenMain","_jsxRuntime","homeEditRoute","exports","name","match","params","canvas","areas","sidebar","jsx","default","preview","mobile"],"sources":["@wordpress/edit-site/src/components/site-editor-routes/home-edit.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport Editor from '../editor';\nimport SidebarNavigationScreenMain from '../sidebar-navigation-screen-main';\n\nexport const homeEditRoute = {\n\tname: 'home-edit',\n\tmatch: ( params ) => {\n\t\treturn params.canvas === 'edit';\n\t},\n\tareas: {\n\t\tsidebar: <SidebarNavigationScreenMain />,\n\t\tpreview: <Editor />,\n\t\tmobile: <Editor />,\n\t},\n};\n"],"mappings":";;;;;;;AAGA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,4BAAA,GAAAF,sBAAA,CAAAC,OAAA;AAA4E,IAAAE,WAAA,GAAAF,OAAA;AAJ5E;AACA;AACA;;AAIO,MAAMG,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAG;EAC5BE,IAAI,EAAE,WAAW;EACjBC,KAAK,EAAIC,MAAM,IAAM;IACpB,OAAOA,MAAM,CAACC,MAAM,KAAK,MAAM;EAChC,CAAC;EACDC,KAAK,EAAE;IACNC,OAAO,eAAE,IAAAR,WAAA,CAAAS,GAAA,EAACV,4BAAA,CAAAW,OAA2B,IAAE,CAAC;IACxCC,OAAO,eAAE,IAAAX,WAAA,CAAAS,GAAA,EAACb,OAAA,CAAAc,OAAM,IAAE,CAAC;IACnBE,MAAM,eAAE,IAAAZ,WAAA,CAAAS,GAAA,EAACb,OAAA,CAAAc,OAAM,IAAE;EAClB;AACD,CAAC","ignoreList":[]}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.homeViewRoute = void 0;
8
+ var _editor = _interopRequireDefault(require("../editor"));
9
+ var _sidebarNavigationScreenMain = _interopRequireDefault(require("../sidebar-navigation-screen-main"));
10
+ var _jsxRuntime = require("react/jsx-runtime");
11
+ /**
12
+ * Internal dependencies
13
+ */
14
+
15
+ const homeViewRoute = exports.homeViewRoute = {
16
+ name: 'home-view',
17
+ match: params => {
18
+ return params.canvas !== 'edit';
19
+ },
20
+ areas: {
21
+ sidebar: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sidebarNavigationScreenMain.default, {}),
22
+ preview: /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.default, {})
23
+ }
24
+ };
25
+ //# sourceMappingURL=home-view.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_editor","_interopRequireDefault","require","_sidebarNavigationScreenMain","_jsxRuntime","homeViewRoute","exports","name","match","params","canvas","areas","sidebar","jsx","default","preview"],"sources":["@wordpress/edit-site/src/components/site-editor-routes/home-view.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport Editor from '../editor';\nimport SidebarNavigationScreenMain from '../sidebar-navigation-screen-main';\n\nexport const homeViewRoute = {\n\tname: 'home-view',\n\tmatch: ( params ) => {\n\t\treturn params.canvas !== 'edit';\n\t},\n\tareas: {\n\t\tsidebar: <SidebarNavigationScreenMain />,\n\t\tpreview: <Editor />,\n\t},\n};\n"],"mappings":";;;;;;;AAGA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,4BAAA,GAAAF,sBAAA,CAAAC,OAAA;AAA4E,IAAAE,WAAA,GAAAF,OAAA;AAJ5E;AACA;AACA;;AAIO,MAAMG,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAG;EAC5BE,IAAI,EAAE,WAAW;EACjBC,KAAK,EAAIC,MAAM,IAAM;IACpB,OAAOA,MAAM,CAACC,MAAM,KAAK,MAAM;EAChC,CAAC;EACDC,KAAK,EAAE;IACNC,OAAO,eAAE,IAAAR,WAAA,CAAAS,GAAA,EAACV,4BAAA,CAAAW,OAA2B,IAAE,CAAC;IACxCC,OAAO,eAAE,IAAAX,WAAA,CAAAS,GAAA,EAACb,OAAA,CAAAc,OAAM,IAAE;EACnB;AACD,CAAC","ignoreList":[]}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useRegisterSiteEditorRoutes = useRegisterSiteEditorRoutes;
7
+ var _data = require("@wordpress/data");
8
+ var _element = require("@wordpress/element");
9
+ var _lockUnlock = require("../../lock-unlock");
10
+ var _store = require("../../store");
11
+ var _homeView = require("./home-view");
12
+ var _homeEdit = require("./home-edit");
13
+ var _navigationView = require("./navigation-view");
14
+ var _navigationEdit = require("./navigation-edit");
15
+ var _navigationItemEdit = require("./navigation-item-edit");
16
+ var _navigationItemView = require("./navigation-item-view");
17
+ var _stylesEdit = require("./styles-edit");
18
+ var _stylesView = require("./styles-view");
19
+ var _patternsEdit = require("./patterns-edit");
20
+ var _patternsView = require("./patterns-view");
21
+ var _templatesEdit = require("./templates-edit");
22
+ var _templatesListView = require("./templates-list-view");
23
+ var _templatesView = require("./templates-view");
24
+ var _pagesView = require("./pages-view");
25
+ var _pagesEdit = require("./pages-edit");
26
+ var _pagesListView = require("./pages-list-view");
27
+ var _pagesListViewQuickEdit = require("./pages-list-view-quick-edit");
28
+ var _pagesViewQuickEdit = require("./pages-view-quick-edit");
29
+ /**
30
+ * WordPress dependencies
31
+ */
32
+
33
+ /**
34
+ * Internal dependencies
35
+ */
36
+
37
+ const routes = [_pagesListViewQuickEdit.pagesListViewQuickEditRoute, _pagesListView.pagesListViewRoute, _pagesViewQuickEdit.pagesViewQuickEditRoute, _pagesView.pagesViewRoute, _pagesEdit.pagesEditRoute, _templatesEdit.templatesEditRoute, _templatesListView.templatesListViewRoute, _templatesView.templatesViewRoute, _patternsView.patternsViewRoute, _patternsEdit.patternsEditRoute, _stylesView.stylesViewRoute, _stylesEdit.stylesEditRoute, _navigationItemView.navigationItemViewRoute, _navigationItemEdit.navigationItemEditRoute, _navigationView.navigationViewRoute, _navigationEdit.navigationEditRoute, _homeView.homeViewRoute, _homeEdit.homeEditRoute];
38
+ function useRegisterSiteEditorRoutes() {
39
+ const registry = (0, _data.useRegistry)();
40
+ const {
41
+ registerRoute
42
+ } = (0, _lockUnlock.unlock)((0, _data.useDispatch)(_store.store));
43
+ (0, _element.useEffect)(() => {
44
+ registry.batch(() => {
45
+ routes.forEach(registerRoute);
46
+ });
47
+ }, [registry, registerRoute]);
48
+ }
49
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_data","require","_element","_lockUnlock","_store","_homeView","_homeEdit","_navigationView","_navigationEdit","_navigationItemEdit","_navigationItemView","_stylesEdit","_stylesView","_patternsEdit","_patternsView","_templatesEdit","_templatesListView","_templatesView","_pagesView","_pagesEdit","_pagesListView","_pagesListViewQuickEdit","_pagesViewQuickEdit","routes","pagesListViewQuickEditRoute","pagesListViewRoute","pagesViewQuickEditRoute","pagesViewRoute","pagesEditRoute","templatesEditRoute","templatesListViewRoute","templatesViewRoute","patternsViewRoute","patternsEditRoute","stylesViewRoute","stylesEditRoute","navigationItemViewRoute","navigationItemEditRoute","navigationViewRoute","navigationEditRoute","homeViewRoute","homeEditRoute","useRegisterSiteEditorRoutes","registry","useRegistry","registerRoute","unlock","useDispatch","siteEditorStore","useEffect","batch","forEach"],"sources":["@wordpress/edit-site/src/components/site-editor-routes/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRegistry, useDispatch } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as siteEditorStore } from '../../store';\nimport { homeViewRoute } from './home-view';\nimport { homeEditRoute } from './home-edit';\nimport { navigationViewRoute } from './navigation-view';\nimport { navigationEditRoute } from './navigation-edit';\nimport { navigationItemEditRoute } from './navigation-item-edit';\nimport { navigationItemViewRoute } from './navigation-item-view';\nimport { stylesEditRoute } from './styles-edit';\nimport { stylesViewRoute } from './styles-view';\nimport { patternsEditRoute } from './patterns-edit';\nimport { patternsViewRoute } from './patterns-view';\nimport { templatesEditRoute } from './templates-edit';\nimport { templatesListViewRoute } from './templates-list-view';\nimport { templatesViewRoute } from './templates-view';\nimport { pagesViewRoute } from './pages-view';\nimport { pagesEditRoute } from './pages-edit';\nimport { pagesListViewRoute } from './pages-list-view';\nimport { pagesListViewQuickEditRoute } from './pages-list-view-quick-edit';\nimport { pagesViewQuickEditRoute } from './pages-view-quick-edit';\n\nconst routes = [\n\tpagesListViewQuickEditRoute,\n\tpagesListViewRoute,\n\tpagesViewQuickEditRoute,\n\tpagesViewRoute,\n\tpagesEditRoute,\n\ttemplatesEditRoute,\n\ttemplatesListViewRoute,\n\ttemplatesViewRoute,\n\tpatternsViewRoute,\n\tpatternsEditRoute,\n\tstylesViewRoute,\n\tstylesEditRoute,\n\tnavigationItemViewRoute,\n\tnavigationItemEditRoute,\n\tnavigationViewRoute,\n\tnavigationEditRoute,\n\thomeViewRoute,\n\thomeEditRoute,\n];\n\nexport function useRegisterSiteEditorRoutes() {\n\tconst registry = useRegistry();\n\tconst { registerRoute } = unlock( useDispatch( siteEditorStore ) );\n\tuseEffect( () => {\n\t\tregistry.batch( () => {\n\t\t\troutes.forEach( registerRoute );\n\t\t} );\n\t}, [ registry, registerRoute ] );\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAKA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,eAAA,GAAAN,OAAA;AACA,IAAAO,eAAA,GAAAP,OAAA;AACA,IAAAQ,mBAAA,GAAAR,OAAA;AACA,IAAAS,mBAAA,GAAAT,OAAA;AACA,IAAAU,WAAA,GAAAV,OAAA;AACA,IAAAW,WAAA,GAAAX,OAAA;AACA,IAAAY,aAAA,GAAAZ,OAAA;AACA,IAAAa,aAAA,GAAAb,OAAA;AACA,IAAAc,cAAA,GAAAd,OAAA;AACA,IAAAe,kBAAA,GAAAf,OAAA;AACA,IAAAgB,cAAA,GAAAhB,OAAA;AACA,IAAAiB,UAAA,GAAAjB,OAAA;AACA,IAAAkB,UAAA,GAAAlB,OAAA;AACA,IAAAmB,cAAA,GAAAnB,OAAA;AACA,IAAAoB,uBAAA,GAAApB,OAAA;AACA,IAAAqB,mBAAA,GAAArB,OAAA;AA5BA;AACA;AACA;;AAIA;AACA;AACA;;AAsBA,MAAMsB,MAAM,GAAG,CACdC,mDAA2B,EAC3BC,iCAAkB,EAClBC,2CAAuB,EACvBC,yBAAc,EACdC,yBAAc,EACdC,iCAAkB,EAClBC,yCAAsB,EACtBC,iCAAkB,EAClBC,+BAAiB,EACjBC,+BAAiB,EACjBC,2BAAe,EACfC,2BAAe,EACfC,2CAAuB,EACvBC,2CAAuB,EACvBC,mCAAmB,EACnBC,mCAAmB,EACnBC,uBAAa,EACbC,uBAAa,CACb;AAEM,SAASC,2BAA2BA,CAAA,EAAG;EAC7C,MAAMC,QAAQ,GAAG,IAAAC,iBAAW,EAAC,CAAC;EAC9B,MAAM;IAAEC;EAAc,CAAC,GAAG,IAAAC,kBAAM,EAAE,IAAAC,iBAAW,EAAEC,YAAgB,CAAE,CAAC;EAClE,IAAAC,kBAAS,EAAE,MAAM;IAChBN,QAAQ,CAACO,KAAK,CAAE,MAAM;MACrB3B,MAAM,CAAC4B,OAAO,CAAEN,aAAc,CAAC;IAChC,CAAE,CAAC;EACJ,CAAC,EAAE,CAAEF,QAAQ,EAAEE,aAAa,CAAG,CAAC;AACjC","ignoreList":[]}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.navigationEditRoute = void 0;
8
+ var _constants = require("../../utils/constants");
9
+ var _editor = _interopRequireDefault(require("../editor"));
10
+ var _sidebarNavigationScreenNavigationMenus = _interopRequireDefault(require("../sidebar-navigation-screen-navigation-menus"));
11
+ var _jsxRuntime = require("react/jsx-runtime");
12
+ /**
13
+ * Internal dependencies
14
+ */
15
+
16
+ const navigationEditRoute = exports.navigationEditRoute = {
17
+ name: 'navigation-edit',
18
+ match: params => {
19
+ return params.postType === _constants.NAVIGATION_POST_TYPE && !params.postId && params.canvas === 'edit';
20
+ },
21
+ areas: {
22
+ sidebar: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sidebarNavigationScreenNavigationMenus.default, {
23
+ backPath: {}
24
+ }),
25
+ preview: /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.default, {}),
26
+ mobile: /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.default, {})
27
+ }
28
+ };
29
+ //# sourceMappingURL=navigation-edit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_constants","require","_editor","_interopRequireDefault","_sidebarNavigationScreenNavigationMenus","_jsxRuntime","navigationEditRoute","exports","name","match","params","postType","NAVIGATION_POST_TYPE","postId","canvas","areas","sidebar","jsx","default","backPath","preview","mobile"],"sources":["@wordpress/edit-site/src/components/site-editor-routes/navigation-edit.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { NAVIGATION_POST_TYPE } from '../../utils/constants';\nimport Editor from '../editor';\nimport SidebarNavigationScreenNavigationMenus from '../sidebar-navigation-screen-navigation-menus';\n\nexport const navigationEditRoute = {\n\tname: 'navigation-edit',\n\tmatch: ( params ) => {\n\t\treturn (\n\t\t\tparams.postType === NAVIGATION_POST_TYPE &&\n\t\t\t! params.postId &&\n\t\t\tparams.canvas === 'edit'\n\t\t);\n\t},\n\tareas: {\n\t\tsidebar: <SidebarNavigationScreenNavigationMenus backPath={ {} } />,\n\t\tpreview: <Editor />,\n\t\tmobile: <Editor />,\n\t},\n};\n"],"mappings":";;;;;;;AAGA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,uCAAA,GAAAD,sBAAA,CAAAF,OAAA;AAAmG,IAAAI,WAAA,GAAAJ,OAAA;AALnG;AACA;AACA;;AAKO,MAAMK,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAAG;EAClCE,IAAI,EAAE,iBAAiB;EACvBC,KAAK,EAAIC,MAAM,IAAM;IACpB,OACCA,MAAM,CAACC,QAAQ,KAAKC,+BAAoB,IACxC,CAAEF,MAAM,CAACG,MAAM,IACfH,MAAM,CAACI,MAAM,KAAK,MAAM;EAE1B,CAAC;EACDC,KAAK,EAAE;IACNC,OAAO,eAAE,IAAAX,WAAA,CAAAY,GAAA,EAACb,uCAAA,CAAAc,OAAsC;MAACC,QAAQ,EAAG,CAAC;IAAG,CAAE,CAAC;IACnEC,OAAO,eAAE,IAAAf,WAAA,CAAAY,GAAA,EAACf,OAAA,CAAAgB,OAAM,IAAE,CAAC;IACnBG,MAAM,eAAE,IAAAhB,WAAA,CAAAY,GAAA,EAACf,OAAA,CAAAgB,OAAM,IAAE;EAClB;AACD,CAAC","ignoreList":[]}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.navigationItemEditRoute = void 0;
8
+ var _constants = require("../../utils/constants");
9
+ var _editor = _interopRequireDefault(require("../editor"));
10
+ var _sidebarNavigationScreenNavigationMenu = _interopRequireDefault(require("../sidebar-navigation-screen-navigation-menu"));
11
+ var _jsxRuntime = require("react/jsx-runtime");
12
+ /**
13
+ * Internal dependencies
14
+ */
15
+
16
+ const navigationItemEditRoute = exports.navigationItemEditRoute = {
17
+ name: 'navigation-item-edit',
18
+ match: params => {
19
+ return params.postType === _constants.NAVIGATION_POST_TYPE && !!params.postId && params.canvas === 'edit';
20
+ },
21
+ areas: {
22
+ sidebar: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sidebarNavigationScreenNavigationMenu.default, {
23
+ backPath: {
24
+ postType: _constants.NAVIGATION_POST_TYPE
25
+ }
26
+ }),
27
+ preview: /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.default, {}),
28
+ mobile: /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.default, {})
29
+ }
30
+ };
31
+ //# sourceMappingURL=navigation-item-edit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_constants","require","_editor","_interopRequireDefault","_sidebarNavigationScreenNavigationMenu","_jsxRuntime","navigationItemEditRoute","exports","name","match","params","postType","NAVIGATION_POST_TYPE","postId","canvas","areas","sidebar","jsx","default","backPath","preview","mobile"],"sources":["@wordpress/edit-site/src/components/site-editor-routes/navigation-item-edit.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { NAVIGATION_POST_TYPE } from '../../utils/constants';\nimport Editor from '../editor';\nimport SidebarNavigationScreenNavigationMenu from '../sidebar-navigation-screen-navigation-menu';\n\nexport const navigationItemEditRoute = {\n\tname: 'navigation-item-edit',\n\tmatch: ( params ) => {\n\t\treturn (\n\t\t\tparams.postType === NAVIGATION_POST_TYPE &&\n\t\t\t!! params.postId &&\n\t\t\tparams.canvas === 'edit'\n\t\t);\n\t},\n\tareas: {\n\t\tsidebar: (\n\t\t\t<SidebarNavigationScreenNavigationMenu\n\t\t\t\tbackPath={ { postType: NAVIGATION_POST_TYPE } }\n\t\t\t/>\n\t\t),\n\t\tpreview: <Editor />,\n\t\tmobile: <Editor />,\n\t},\n};\n"],"mappings":";;;;;;;AAGA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,sCAAA,GAAAD,sBAAA,CAAAF,OAAA;AAAiG,IAAAI,WAAA,GAAAJ,OAAA;AALjG;AACA;AACA;;AAKO,MAAMK,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAG;EACtCE,IAAI,EAAE,sBAAsB;EAC5BC,KAAK,EAAIC,MAAM,IAAM;IACpB,OACCA,MAAM,CAACC,QAAQ,KAAKC,+BAAoB,IACxC,CAAC,CAAEF,MAAM,CAACG,MAAM,IAChBH,MAAM,CAACI,MAAM,KAAK,MAAM;EAE1B,CAAC;EACDC,KAAK,EAAE;IACNC,OAAO,eACN,IAAAX,WAAA,CAAAY,GAAA,EAACb,sCAAA,CAAAc,OAAqC;MACrCC,QAAQ,EAAG;QAAER,QAAQ,EAAEC;MAAqB;IAAG,CAC/C,CACD;IACDQ,OAAO,eAAE,IAAAf,WAAA,CAAAY,GAAA,EAACf,OAAA,CAAAgB,OAAM,IAAE,CAAC;IACnBG,MAAM,eAAE,IAAAhB,WAAA,CAAAY,GAAA,EAACf,OAAA,CAAAgB,OAAM,IAAE;EAClB;AACD,CAAC","ignoreList":[]}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.navigationItemViewRoute = void 0;
8
+ var _constants = require("../../utils/constants");
9
+ var _editor = _interopRequireDefault(require("../editor"));
10
+ var _sidebarNavigationScreenNavigationMenu = _interopRequireDefault(require("../sidebar-navigation-screen-navigation-menu"));
11
+ var _jsxRuntime = require("react/jsx-runtime");
12
+ /**
13
+ * Internal dependencies
14
+ */
15
+
16
+ const navigationItemViewRoute = exports.navigationItemViewRoute = {
17
+ name: 'navigation-item-view',
18
+ match: params => {
19
+ return params.postType === _constants.NAVIGATION_POST_TYPE && !!params.postId && params.canvas !== 'edit';
20
+ },
21
+ areas: {
22
+ sidebar: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sidebarNavigationScreenNavigationMenu.default, {
23
+ backPath: {
24
+ postType: _constants.NAVIGATION_POST_TYPE
25
+ }
26
+ }),
27
+ preview: /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.default, {})
28
+ }
29
+ };
30
+ //# sourceMappingURL=navigation-item-view.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_constants","require","_editor","_interopRequireDefault","_sidebarNavigationScreenNavigationMenu","_jsxRuntime","navigationItemViewRoute","exports","name","match","params","postType","NAVIGATION_POST_TYPE","postId","canvas","areas","sidebar","jsx","default","backPath","preview"],"sources":["@wordpress/edit-site/src/components/site-editor-routes/navigation-item-view.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { NAVIGATION_POST_TYPE } from '../../utils/constants';\nimport Editor from '../editor';\nimport SidebarNavigationScreenNavigationMenu from '../sidebar-navigation-screen-navigation-menu';\n\nexport const navigationItemViewRoute = {\n\tname: 'navigation-item-view',\n\tmatch: ( params ) => {\n\t\treturn (\n\t\t\tparams.postType === NAVIGATION_POST_TYPE &&\n\t\t\t!! params.postId &&\n\t\t\tparams.canvas !== 'edit'\n\t\t);\n\t},\n\tareas: {\n\t\tsidebar: (\n\t\t\t<SidebarNavigationScreenNavigationMenu\n\t\t\t\tbackPath={ { postType: NAVIGATION_POST_TYPE } }\n\t\t\t/>\n\t\t),\n\t\tpreview: <Editor />,\n\t},\n};\n"],"mappings":";;;;;;;AAGA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,sCAAA,GAAAD,sBAAA,CAAAF,OAAA;AAAiG,IAAAI,WAAA,GAAAJ,OAAA;AALjG;AACA;AACA;;AAKO,MAAMK,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAG;EACtCE,IAAI,EAAE,sBAAsB;EAC5BC,KAAK,EAAIC,MAAM,IAAM;IACpB,OACCA,MAAM,CAACC,QAAQ,KAAKC,+BAAoB,IACxC,CAAC,CAAEF,MAAM,CAACG,MAAM,IAChBH,MAAM,CAACI,MAAM,KAAK,MAAM;EAE1B,CAAC;EACDC,KAAK,EAAE;IACNC,OAAO,eACN,IAAAX,WAAA,CAAAY,GAAA,EAACb,sCAAA,CAAAc,OAAqC;MACrCC,QAAQ,EAAG;QAAER,QAAQ,EAAEC;MAAqB;IAAG,CAC/C,CACD;IACDQ,OAAO,eAAE,IAAAf,WAAA,CAAAY,GAAA,EAACf,OAAA,CAAAgB,OAAM,IAAE;EACnB;AACD,CAAC","ignoreList":[]}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.navigationViewRoute = void 0;
8
+ var _constants = require("../../utils/constants");
9
+ var _editor = _interopRequireDefault(require("../editor"));
10
+ var _sidebarNavigationScreenNavigationMenus = _interopRequireDefault(require("../sidebar-navigation-screen-navigation-menus"));
11
+ var _jsxRuntime = require("react/jsx-runtime");
12
+ /**
13
+ * Internal dependencies
14
+ */
15
+
16
+ const navigationViewRoute = exports.navigationViewRoute = {
17
+ name: 'navigation-view',
18
+ match: params => {
19
+ return params.postType === _constants.NAVIGATION_POST_TYPE && !params.postId && params.canvas !== 'edit';
20
+ },
21
+ areas: {
22
+ sidebar: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sidebarNavigationScreenNavigationMenus.default, {
23
+ backPath: {}
24
+ }),
25
+ preview: /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.default, {})
26
+ }
27
+ };
28
+ //# sourceMappingURL=navigation-view.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_constants","require","_editor","_interopRequireDefault","_sidebarNavigationScreenNavigationMenus","_jsxRuntime","navigationViewRoute","exports","name","match","params","postType","NAVIGATION_POST_TYPE","postId","canvas","areas","sidebar","jsx","default","backPath","preview"],"sources":["@wordpress/edit-site/src/components/site-editor-routes/navigation-view.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { NAVIGATION_POST_TYPE } from '../../utils/constants';\nimport Editor from '../editor';\nimport SidebarNavigationScreenNavigationMenus from '../sidebar-navigation-screen-navigation-menus';\n\nexport const navigationViewRoute = {\n\tname: 'navigation-view',\n\tmatch: ( params ) => {\n\t\treturn (\n\t\t\tparams.postType === NAVIGATION_POST_TYPE &&\n\t\t\t! params.postId &&\n\t\t\tparams.canvas !== 'edit'\n\t\t);\n\t},\n\tareas: {\n\t\tsidebar: <SidebarNavigationScreenNavigationMenus backPath={ {} } />,\n\t\tpreview: <Editor />,\n\t},\n};\n"],"mappings":";;;;;;;AAGA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,uCAAA,GAAAD,sBAAA,CAAAF,OAAA;AAAmG,IAAAI,WAAA,GAAAJ,OAAA;AALnG;AACA;AACA;;AAKO,MAAMK,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAAG;EAClCE,IAAI,EAAE,iBAAiB;EACvBC,KAAK,EAAIC,MAAM,IAAM;IACpB,OACCA,MAAM,CAACC,QAAQ,KAAKC,+BAAoB,IACxC,CAAEF,MAAM,CAACG,MAAM,IACfH,MAAM,CAACI,MAAM,KAAK,MAAM;EAE1B,CAAC;EACDC,KAAK,EAAE;IACNC,OAAO,eAAE,IAAAX,WAAA,CAAAY,GAAA,EAACb,uCAAA,CAAAc,OAAsC;MAACC,QAAQ,EAAG,CAAC;IAAG,CAAE,CAAC;IACnEC,OAAO,eAAE,IAAAf,WAAA,CAAAY,GAAA,EAACf,OAAA,CAAAgB,OAAM,IAAE;EACnB;AACD,CAAC","ignoreList":[]}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.pagesEditRoute = void 0;
8
+ var _i18n = require("@wordpress/i18n");
9
+ var _postList = _interopRequireDefault(require("../post-list"));
10
+ var _sidebarDataviews = _interopRequireDefault(require("../sidebar-dataviews"));
11
+ var _sidebarNavigationScreen = _interopRequireDefault(require("../sidebar-navigation-screen"));
12
+ var _editor = _interopRequireDefault(require("../editor"));
13
+ var _jsxRuntime = require("react/jsx-runtime");
14
+ /**
15
+ * WordPress dependencies
16
+ */
17
+
18
+ /**
19
+ * Internal dependencies
20
+ */
21
+
22
+ function PageList() {
23
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_postList.default, {
24
+ postType: "page"
25
+ });
26
+ }
27
+ const pagesEditRoute = exports.pagesEditRoute = {
28
+ name: 'pages-edit',
29
+ match: params => {
30
+ return params.postType === 'page' && params.canvas === 'edit';
31
+ },
32
+ areas: {
33
+ sidebar: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sidebarNavigationScreen.default, {
34
+ title: (0, _i18n.__)('Pages'),
35
+ backPath: {},
36
+ content: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sidebarDataviews.default, {})
37
+ }),
38
+ content: /*#__PURE__*/(0, _jsxRuntime.jsx)(PageList, {}),
39
+ mobile: /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.default, {}),
40
+ preview: /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.default, {})
41
+ }
42
+ };
43
+ //# sourceMappingURL=pages-edit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_i18n","require","_postList","_interopRequireDefault","_sidebarDataviews","_sidebarNavigationScreen","_editor","_jsxRuntime","PageList","jsx","default","postType","pagesEditRoute","exports","name","match","params","canvas","areas","sidebar","title","__","backPath","content","mobile","preview"],"sources":["@wordpress/edit-site/src/components/site-editor-routes/pages-edit.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport PostList from '../post-list';\nimport DataViewsSidebarContent from '../sidebar-dataviews';\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport Editor from '../editor';\n\nfunction PageList() {\n\treturn <PostList postType=\"page\" />;\n}\n\nexport const pagesEditRoute = {\n\tname: 'pages-edit',\n\tmatch: ( params ) => {\n\t\treturn params.postType === 'page' && params.canvas === 'edit';\n\t},\n\tareas: {\n\t\tsidebar: (\n\t\t\t<SidebarNavigationScreen\n\t\t\t\ttitle={ __( 'Pages' ) }\n\t\t\t\tbackPath={ {} }\n\t\t\t\tcontent={ <DataViewsSidebarContent /> }\n\t\t\t/>\n\t\t),\n\t\tcontent: <PageList />,\n\t\tmobile: <Editor />,\n\t\tpreview: <Editor />,\n\t},\n};\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,SAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,wBAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,OAAA,GAAAH,sBAAA,CAAAF,OAAA;AAA+B,IAAAM,WAAA,GAAAN,OAAA;AAX/B;AACA;AACA;;AAGA;AACA;AACA;;AAMA,SAASO,QAAQA,CAAA,EAAG;EACnB,oBAAO,IAAAD,WAAA,CAAAE,GAAA,EAACP,SAAA,CAAAQ,OAAQ;IAACC,QAAQ,EAAC;EAAM,CAAE,CAAC;AACpC;AAEO,MAAMC,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG;EAC7BE,IAAI,EAAE,YAAY;EAClBC,KAAK,EAAIC,MAAM,IAAM;IACpB,OAAOA,MAAM,CAACL,QAAQ,KAAK,MAAM,IAAIK,MAAM,CAACC,MAAM,KAAK,MAAM;EAC9D,CAAC;EACDC,KAAK,EAAE;IACNC,OAAO,eACN,IAAAZ,WAAA,CAAAE,GAAA,EAACJ,wBAAA,CAAAK,OAAuB;MACvBU,KAAK,EAAG,IAAAC,QAAE,EAAE,OAAQ,CAAG;MACvBC,QAAQ,EAAG,CAAC,CAAG;MACfC,OAAO,eAAG,IAAAhB,WAAA,CAAAE,GAAA,EAACL,iBAAA,CAAAM,OAAuB,IAAE;IAAG,CACvC,CACD;IACDa,OAAO,eAAE,IAAAhB,WAAA,CAAAE,GAAA,EAACD,QAAQ,IAAE,CAAC;IACrBgB,MAAM,eAAE,IAAAjB,WAAA,CAAAE,GAAA,EAACH,OAAA,CAAAI,OAAM,IAAE,CAAC;IAClBe,OAAO,eAAE,IAAAlB,WAAA,CAAAE,GAAA,EAACH,OAAA,CAAAI,OAAM,IAAE;EACnB;AACD,CAAC","ignoreList":[]}
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.pagesListViewQuickEditRoute = void 0;
8
+ var _i18n = require("@wordpress/i18n");
9
+ var _router = require("@wordpress/router");
10
+ var _postList = _interopRequireDefault(require("../post-list"));
11
+ var _sidebarDataviews = _interopRequireDefault(require("../sidebar-dataviews"));
12
+ var _sidebarNavigationScreen = _interopRequireDefault(require("../sidebar-navigation-screen"));
13
+ var _lockUnlock = require("../../lock-unlock");
14
+ var _postEdit = require("../post-edit");
15
+ var _editor = _interopRequireDefault(require("../editor"));
16
+ var _jsxRuntime = require("react/jsx-runtime");
17
+ /**
18
+ * WordPress dependencies
19
+ */
20
+
21
+ /**
22
+ * Internal dependencies
23
+ */
24
+
25
+ const {
26
+ useLocation
27
+ } = (0, _lockUnlock.unlock)(_router.privateApis);
28
+ function PageList() {
29
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_postList.default, {
30
+ postType: "page"
31
+ });
32
+ }
33
+ function PageQuickEdit() {
34
+ const {
35
+ params
36
+ } = useLocation();
37
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_postEdit.PostEdit, {
38
+ postType: "page",
39
+ postId: params.postId
40
+ });
41
+ }
42
+ const pagesListViewQuickEditRoute = exports.pagesListViewQuickEditRoute = {
43
+ name: 'pages-list-view-quick-edit',
44
+ match: params => {
45
+ var _params$layout;
46
+ return params.isCustom !== 'true' && ((_params$layout = params.layout) !== null && _params$layout !== void 0 ? _params$layout : 'list') === 'list' && !!params.quickEdit && params.postType === 'page' && params.canvas !== 'edit';
47
+ },
48
+ areas: {
49
+ sidebar: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sidebarNavigationScreen.default, {
50
+ title: (0, _i18n.__)('Pages'),
51
+ backPath: {},
52
+ content: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sidebarDataviews.default, {})
53
+ }),
54
+ content: /*#__PURE__*/(0, _jsxRuntime.jsx)(PageList, {}),
55
+ mobile: /*#__PURE__*/(0, _jsxRuntime.jsx)(PageList, {}),
56
+ preview: /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.default, {}),
57
+ edit: /*#__PURE__*/(0, _jsxRuntime.jsx)(PageQuickEdit, {})
58
+ },
59
+ widths: {
60
+ content: 380,
61
+ edit: 380
62
+ }
63
+ };
64
+ //# sourceMappingURL=pages-list-view-quick-edit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_i18n","require","_router","_postList","_interopRequireDefault","_sidebarDataviews","_sidebarNavigationScreen","_lockUnlock","_postEdit","_editor","_jsxRuntime","useLocation","unlock","routerPrivateApis","PageList","jsx","default","postType","PageQuickEdit","params","PostEdit","postId","pagesListViewQuickEditRoute","exports","name","match","_params$layout","isCustom","layout","quickEdit","canvas","areas","sidebar","title","__","backPath","content","mobile","preview","edit","widths"],"sources":["@wordpress/edit-site/src/components/site-editor-routes/pages-list-view-quick-edit.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport PostList from '../post-list';\nimport DataViewsSidebarContent from '../sidebar-dataviews';\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport { unlock } from '../../lock-unlock';\nimport { PostEdit } from '../post-edit';\nimport Editor from '../editor';\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nfunction PageList() {\n\treturn <PostList postType=\"page\" />;\n}\n\nfunction PageQuickEdit() {\n\tconst { params } = useLocation();\n\treturn <PostEdit postType=\"page\" postId={ params.postId } />;\n}\n\nexport const pagesListViewQuickEditRoute = {\n\tname: 'pages-list-view-quick-edit',\n\tmatch: ( params ) => {\n\t\treturn (\n\t\t\tparams.isCustom !== 'true' &&\n\t\t\t( params.layout ?? 'list' ) === 'list' &&\n\t\t\t!! params.quickEdit &&\n\t\t\tparams.postType === 'page' &&\n\t\t\tparams.canvas !== 'edit'\n\t\t);\n\t},\n\tareas: {\n\t\tsidebar: (\n\t\t\t<SidebarNavigationScreen\n\t\t\t\ttitle={ __( 'Pages' ) }\n\t\t\t\tbackPath={ {} }\n\t\t\t\tcontent={ <DataViewsSidebarContent /> }\n\t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