@wordpress/edit-site 6.1.0 → 6.3.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 (290) hide show
  1. package/CHANGELOG.md +10 -6
  2. package/build/components/add-new-pattern/index.js +31 -16
  3. package/build/components/add-new-pattern/index.js.map +1 -1
  4. package/build/components/{add-new-page → add-new-post}/index.js +28 -16
  5. package/build/components/add-new-post/index.js.map +1 -0
  6. package/build/components/block-editor/use-site-editor-settings.js +5 -3
  7. package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
  8. package/build/components/editor/index.js +32 -7
  9. package/build/components/editor/index.js.map +1 -1
  10. package/build/components/editor-canvas-container/index.js +18 -7
  11. package/build/components/editor-canvas-container/index.js.map +1 -1
  12. package/build/components/global-styles/background-panel.js +0 -5
  13. package/build/components/global-styles/background-panel.js.map +1 -1
  14. package/build/components/global-styles/font-families.js +17 -17
  15. package/build/components/global-styles/font-families.js.map +1 -1
  16. package/build/components/global-styles/font-library-modal/context.js +2 -2
  17. package/build/components/global-styles/font-library-modal/context.js.map +1 -1
  18. package/build/components/global-styles/font-library-modal/font-collection.js +13 -30
  19. package/build/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  20. package/build/components/global-styles/font-library-modal/installed-fonts.js +2 -2
  21. package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  22. package/build/components/global-styles/hooks.js +0 -40
  23. package/build/components/global-styles/hooks.js.map +1 -1
  24. package/build/components/global-styles/preview-typography.js +47 -0
  25. package/build/components/global-styles/preview-typography.js.map +1 -0
  26. package/build/components/global-styles/screen-block.js +14 -0
  27. package/build/components/global-styles/screen-block.js.map +1 -1
  28. package/build/components/global-styles/screen-layout.js +5 -1
  29. package/build/components/global-styles/screen-layout.js.map +1 -1
  30. package/build/components/global-styles/screen-revisions/revisions-buttons.js +1 -1
  31. package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  32. package/build/components/global-styles/shadows-edit-panel.js +1 -2
  33. package/build/components/global-styles/shadows-edit-panel.js.map +1 -1
  34. package/build/components/global-styles/style-variations-container.js +5 -5
  35. package/build/components/global-styles/style-variations-container.js.map +1 -1
  36. package/build/components/global-styles/typography-elements.js +0 -2
  37. package/build/components/global-styles/typography-elements.js.map +1 -1
  38. package/build/components/global-styles/variations/variation.js +28 -22
  39. package/build/components/global-styles/variations/variation.js.map +1 -1
  40. package/build/components/global-styles/variations/variations-color.js +5 -3
  41. package/build/components/global-styles/variations/variations-color.js.map +1 -1
  42. package/build/components/global-styles/variations/variations-typography.js +14 -27
  43. package/build/components/global-styles/variations/variations-typography.js.map +1 -1
  44. package/build/components/global-styles-sidebar/index.js +2 -2
  45. package/build/components/global-styles-sidebar/index.js.map +1 -1
  46. package/build/components/layout/index.js +16 -8
  47. package/build/components/layout/index.js.map +1 -1
  48. package/build/components/layout/router.js +20 -41
  49. package/build/components/layout/router.js.map +1 -1
  50. package/build/components/page-patterns/index.js +51 -41
  51. package/build/components/page-patterns/index.js.map +1 -1
  52. package/build/components/page-patterns/rename-category-menu-item.js +3 -1
  53. package/build/components/page-patterns/rename-category-menu-item.js.map +1 -1
  54. package/build/components/page-patterns/search-items.js +29 -4
  55. package/build/components/page-patterns/search-items.js.map +1 -1
  56. package/build/components/page-patterns/use-patterns.js +22 -55
  57. package/build/components/page-patterns/use-patterns.js.map +1 -1
  58. package/build/components/page-templates/index.js +27 -21
  59. package/build/components/page-templates/index.js.map +1 -1
  60. package/build/components/pagination/index.js +4 -4
  61. package/build/components/pagination/index.js.map +1 -1
  62. package/build/components/posts-app/index.js +11 -17
  63. package/build/components/posts-app/index.js.map +1 -1
  64. package/build/components/{page-pages/index.js → posts-app/posts-list.js} +165 -38
  65. package/build/components/posts-app/posts-list.js.map +1 -0
  66. package/build/components/posts-app/router.js +85 -0
  67. package/build/components/posts-app/router.js.map +1 -0
  68. package/build/components/revisions/index.js +10 -7
  69. package/build/components/revisions/index.js.map +1 -1
  70. package/build/components/save-panel/index.js +1 -1
  71. package/build/components/save-panel/index.js.map +1 -1
  72. package/build/components/sidebar-dataviews/add-new-view.js +4 -1
  73. package/build/components/sidebar-dataviews/add-new-view.js.map +1 -1
  74. package/build/components/sidebar-dataviews/custom-dataviews-list.js +6 -2
  75. package/build/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
  76. package/build/components/sidebar-dataviews/default-views.js +98 -84
  77. package/build/components/sidebar-dataviews/default-views.js.map +1 -1
  78. package/build/components/sidebar-dataviews/index.js +4 -1
  79. package/build/components/sidebar-dataviews/index.js.map +1 -1
  80. package/build/components/sidebar-navigation-screen-global-styles/index.js +3 -3
  81. package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  82. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +5 -2
  83. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  84. package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +3 -2
  85. package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
  86. package/build/components/site-hub/index.js +81 -1
  87. package/build/components/site-hub/index.js.map +1 -1
  88. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +3 -1
  89. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  90. package/build/deprecated.js +11 -0
  91. package/build/deprecated.js.map +1 -1
  92. package/build/hooks/commands/use-set-command-context.js +11 -0
  93. package/build/hooks/commands/use-set-command-context.js.map +1 -1
  94. package/build/hooks/push-changes-to-global-styles/index.js +1 -1
  95. package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
  96. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +65 -42
  97. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  98. package/build/index.js +6 -0
  99. package/build/index.js.map +1 -1
  100. package/build/lock-unlock.js +1 -1
  101. package/build/lock-unlock.js.map +1 -1
  102. package/build/posts.js +57 -2
  103. package/build/posts.js.map +1 -1
  104. package/build/store/private-actions.js +7 -2
  105. package/build/store/private-actions.js.map +1 -1
  106. package/build-module/components/add-new-pattern/index.js +31 -16
  107. package/build-module/components/add-new-pattern/index.js.map +1 -1
  108. package/build-module/components/{add-new-page → add-new-post}/index.js +28 -16
  109. package/build-module/components/add-new-post/index.js.map +1 -0
  110. package/build-module/components/block-editor/use-site-editor-settings.js +5 -3
  111. package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
  112. package/build-module/components/editor/index.js +33 -8
  113. package/build-module/components/editor/index.js.map +1 -1
  114. package/build-module/components/editor-canvas-container/index.js +19 -8
  115. package/build-module/components/editor-canvas-container/index.js.map +1 -1
  116. package/build-module/components/global-styles/background-panel.js +0 -5
  117. package/build-module/components/global-styles/background-panel.js.map +1 -1
  118. package/build-module/components/global-styles/font-families.js +18 -18
  119. package/build-module/components/global-styles/font-families.js.map +1 -1
  120. package/build-module/components/global-styles/font-library-modal/context.js +2 -2
  121. package/build-module/components/global-styles/font-library-modal/context.js.map +1 -1
  122. package/build-module/components/global-styles/font-library-modal/font-collection.js +14 -31
  123. package/build-module/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  124. package/build-module/components/global-styles/font-library-modal/installed-fonts.js +2 -2
  125. package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  126. package/build-module/components/global-styles/hooks.js +0 -38
  127. package/build-module/components/global-styles/hooks.js.map +1 -1
  128. package/build-module/components/global-styles/preview-typography.js +39 -0
  129. package/build-module/components/global-styles/preview-typography.js.map +1 -0
  130. package/build-module/components/global-styles/screen-block.js +15 -0
  131. package/build-module/components/global-styles/screen-block.js.map +1 -1
  132. package/build-module/components/global-styles/screen-layout.js +5 -1
  133. package/build-module/components/global-styles/screen-layout.js.map +1 -1
  134. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +1 -1
  135. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  136. package/build-module/components/global-styles/shadows-edit-panel.js +1 -2
  137. package/build-module/components/global-styles/shadows-edit-panel.js.map +1 -1
  138. package/build-module/components/global-styles/style-variations-container.js +6 -6
  139. package/build-module/components/global-styles/style-variations-container.js.map +1 -1
  140. package/build-module/components/global-styles/typography-elements.js +0 -2
  141. package/build-module/components/global-styles/typography-elements.js.map +1 -1
  142. package/build-module/components/global-styles/variations/variation.js +29 -23
  143. package/build-module/components/global-styles/variations/variation.js.map +1 -1
  144. package/build-module/components/global-styles/variations/variations-color.js +5 -3
  145. package/build-module/components/global-styles/variations/variations-color.js.map +1 -1
  146. package/build-module/components/global-styles/variations/variations-typography.js +16 -28
  147. package/build-module/components/global-styles/variations/variations-typography.js.map +1 -1
  148. package/build-module/components/global-styles-sidebar/index.js +2 -2
  149. package/build-module/components/global-styles-sidebar/index.js.map +1 -1
  150. package/build-module/components/layout/index.js +14 -8
  151. package/build-module/components/layout/index.js.map +1 -1
  152. package/build-module/components/layout/router.js +20 -41
  153. package/build-module/components/layout/router.js.map +1 -1
  154. package/build-module/components/page-patterns/index.js +52 -42
  155. package/build-module/components/page-patterns/index.js.map +1 -1
  156. package/build-module/components/page-patterns/rename-category-menu-item.js +3 -1
  157. package/build-module/components/page-patterns/rename-category-menu-item.js.map +1 -1
  158. package/build-module/components/page-patterns/search-items.js +28 -4
  159. package/build-module/components/page-patterns/search-items.js.map +1 -1
  160. package/build-module/components/page-patterns/use-patterns.js +23 -56
  161. package/build-module/components/page-patterns/use-patterns.js.map +1 -1
  162. package/build-module/components/page-templates/index.js +27 -21
  163. package/build-module/components/page-templates/index.js.map +1 -1
  164. package/build-module/components/pagination/index.js +4 -4
  165. package/build-module/components/pagination/index.js.map +1 -1
  166. package/build-module/components/posts-app/index.js +11 -17
  167. package/build-module/components/posts-app/index.js.map +1 -1
  168. package/build-module/components/{page-pages/index.js → posts-app/posts-list.js} +164 -37
  169. package/build-module/components/posts-app/posts-list.js.map +1 -0
  170. package/build-module/components/posts-app/router.js +77 -0
  171. package/build-module/components/posts-app/router.js.map +1 -0
  172. package/build-module/components/revisions/index.js +10 -7
  173. package/build-module/components/revisions/index.js.map +1 -1
  174. package/build-module/components/save-panel/index.js +1 -1
  175. package/build-module/components/save-panel/index.js.map +1 -1
  176. package/build-module/components/sidebar-dataviews/add-new-view.js +4 -1
  177. package/build-module/components/sidebar-dataviews/add-new-view.js.map +1 -1
  178. package/build-module/components/sidebar-dataviews/custom-dataviews-list.js +6 -2
  179. package/build-module/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
  180. package/build-module/components/sidebar-dataviews/default-views.js +97 -84
  181. package/build-module/components/sidebar-dataviews/default-views.js.map +1 -1
  182. package/build-module/components/sidebar-dataviews/index.js +5 -2
  183. package/build-module/components/sidebar-dataviews/index.js.map +1 -1
  184. package/build-module/components/sidebar-navigation-screen-global-styles/index.js +3 -3
  185. package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  186. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +5 -2
  187. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  188. package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +3 -2
  189. package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
  190. package/build-module/components/site-hub/index.js +81 -1
  191. package/build-module/components/site-hub/index.js.map +1 -1
  192. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +3 -1
  193. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  194. package/build-module/deprecated.js +11 -0
  195. package/build-module/deprecated.js.map +1 -1
  196. package/build-module/hooks/commands/use-set-command-context.js +11 -0
  197. package/build-module/hooks/commands/use-set-command-context.js.map +1 -1
  198. package/build-module/hooks/push-changes-to-global-styles/index.js +1 -1
  199. package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
  200. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +61 -38
  201. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  202. package/build-module/index.js +7 -2
  203. package/build-module/index.js.map +1 -1
  204. package/build-module/lock-unlock.js +1 -1
  205. package/build-module/lock-unlock.js.map +1 -1
  206. package/build-module/posts.js +57 -2
  207. package/build-module/posts.js.map +1 -1
  208. package/build-module/store/private-actions.js +7 -2
  209. package/build-module/store/private-actions.js.map +1 -1
  210. package/build-style/posts-rtl.css +108 -28
  211. package/build-style/posts.css +108 -28
  212. package/build-style/style-rtl.css +127 -157
  213. package/build-style/style.css +127 -157
  214. package/lib/inflate.js +3188 -3937
  215. package/lib/lib-font.browser.js +32 -2
  216. package/lib/unbrotli.js +1818 -2458
  217. package/package.json +41 -41
  218. package/src/components/add-new-pattern/index.js +38 -23
  219. package/src/components/{add-new-page → add-new-post}/index.js +42 -18
  220. package/src/components/block-editor/style.scss +0 -11
  221. package/src/components/block-editor/use-site-editor-settings.js +33 -28
  222. package/src/components/editor/index.js +34 -20
  223. package/src/components/editor-canvas-container/index.js +20 -8
  224. package/src/components/global-styles/background-panel.js +0 -8
  225. package/src/components/global-styles/font-families.js +28 -19
  226. package/src/components/global-styles/font-library-modal/context.js +2 -2
  227. package/src/components/global-styles/font-library-modal/font-collection.js +17 -32
  228. package/src/components/global-styles/font-library-modal/installed-fonts.js +2 -2
  229. package/src/components/global-styles/font-library-modal/style.scss +17 -10
  230. package/src/components/global-styles/hooks.js +0 -41
  231. package/src/components/global-styles/preview-typography.js +39 -0
  232. package/src/components/global-styles/screen-block.js +22 -0
  233. package/src/components/global-styles/screen-layout.js +5 -1
  234. package/src/components/global-styles/screen-revisions/revisions-buttons.js +1 -1
  235. package/src/components/global-styles/shadows-edit-panel.js +1 -2
  236. package/src/components/global-styles/style-variations-container.js +10 -7
  237. package/src/components/global-styles/style.scss +2 -1
  238. package/src/components/global-styles/typography-elements.js +0 -4
  239. package/src/components/global-styles/variations/variation.js +41 -26
  240. package/src/components/global-styles/variations/variations-color.js +6 -3
  241. package/src/components/global-styles/variations/variations-typography.js +16 -32
  242. package/src/components/global-styles-sidebar/index.js +2 -2
  243. package/src/components/layout/index.js +13 -4
  244. package/src/components/layout/router.js +20 -36
  245. package/src/components/layout/style.scss +12 -0
  246. package/src/components/page-patterns/index.js +55 -58
  247. package/src/components/page-patterns/rename-category-menu-item.js +2 -0
  248. package/src/components/page-patterns/search-items.js +37 -3
  249. package/src/components/page-patterns/style.scss +1 -8
  250. package/src/components/page-patterns/use-patterns.js +43 -82
  251. package/src/components/page-templates/index.js +26 -21
  252. package/src/components/page-templates/style.scss +1 -6
  253. package/src/components/pagination/index.js +4 -4
  254. package/src/components/posts-app/index.js +9 -11
  255. package/src/components/{page-pages/index.js → posts-app/posts-list.js} +163 -42
  256. package/src/components/posts-app/router.js +69 -0
  257. package/src/components/{page-pages → posts-app}/style.scss +22 -8
  258. package/src/components/revisions/index.js +9 -1
  259. package/src/components/save-panel/index.js +1 -1
  260. package/src/components/sidebar/style.scss +6 -0
  261. package/src/components/sidebar-dataviews/add-new-view.js +2 -1
  262. package/src/components/sidebar-dataviews/custom-dataviews-list.js +6 -2
  263. package/src/components/sidebar-dataviews/default-views.js +119 -98
  264. package/src/components/sidebar-dataviews/index.js +3 -3
  265. package/src/components/sidebar-navigation-screen-global-styles/index.js +7 -6
  266. package/src/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +8 -2
  267. package/src/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +10 -2
  268. package/src/components/site-hub/index.js +84 -1
  269. package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +3 -2
  270. package/src/deprecated.js +14 -0
  271. package/src/hooks/commands/use-set-command-context.js +12 -0
  272. package/src/hooks/push-changes-to-global-styles/index.js +1 -1
  273. package/src/hooks/use-theme-style-variations/test/use-theme-style-variations-by-property.js +28 -24
  274. package/src/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +72 -47
  275. package/src/index.js +8 -1
  276. package/src/lock-unlock.js +1 -1
  277. package/src/posts.js +63 -2
  278. package/src/posts.scss +9 -0
  279. package/src/store/private-actions.js +7 -3
  280. package/src/style.scss +14 -2
  281. package/build/components/add-new-page/index.js.map +0 -1
  282. package/build/components/page-pages/index.js.map +0 -1
  283. package/build/components/table/index.js +0 -35
  284. package/build/components/table/index.js.map +0 -1
  285. package/build-module/components/add-new-page/index.js.map +0 -1
  286. package/build-module/components/page-pages/index.js.map +0 -1
  287. package/build-module/components/table/index.js +0 -30
  288. package/build-module/components/table/index.js.map +0 -1
  289. package/src/components/table/index.js +0 -33
  290. package/src/components/table/style.scss +0 -38
@@ -2,11 +2,11 @@
2
2
  * Internal dependencies
3
3
  */
4
4
  import {
5
- filterObjectByProperty,
6
- removePropertyFromObject,
5
+ filterObjectByProperties,
6
+ removePropertiesFromObject,
7
7
  } from '../use-theme-style-variations-by-property';
8
8
 
9
- describe( 'filterObjectByProperty', () => {
9
+ describe( 'filterObjectByProperties', () => {
10
10
  const noop = () => {};
11
11
  test.each( [
12
12
  {
@@ -14,21 +14,21 @@ describe( 'filterObjectByProperty', () => {
14
14
  foo: 'bar',
15
15
  array: [ 1, 3, 4 ],
16
16
  },
17
- property: 'array',
17
+ properties: [ 'array' ],
18
18
  expected: { array: [ 1, 3, 4 ] },
19
19
  },
20
20
  {
21
21
  object: {
22
22
  foo: 'bar',
23
23
  },
24
- property: 'does-not-exist',
24
+ properties: [ 'does-not-exist' ],
25
25
  expected: {},
26
26
  },
27
27
  {
28
28
  object: {
29
29
  foo: 'bar',
30
30
  },
31
- property: false,
31
+ properties: false,
32
32
  expected: {},
33
33
  },
34
34
  {
@@ -39,7 +39,7 @@ describe( 'filterObjectByProperty', () => {
39
39
  },
40
40
  },
41
41
  },
42
- property: 'null',
42
+ properties: [ 'null' ],
43
43
  expected: {
44
44
  dig: {
45
45
  deeper: {
@@ -52,19 +52,19 @@ describe( 'filterObjectByProperty', () => {
52
52
  object: {
53
53
  function: noop,
54
54
  },
55
- property: 'function',
55
+ properties: [ 'function' ],
56
56
  expected: {
57
57
  function: noop,
58
58
  },
59
59
  },
60
60
  {
61
61
  object: [],
62
- property: 'something',
62
+ properties: [ 'something' ],
63
63
  expected: {},
64
64
  },
65
65
  {
66
66
  object: {},
67
- property: undefined,
67
+ properties: undefined,
68
68
  expected: {},
69
69
  },
70
70
  {
@@ -74,7 +74,7 @@ describe( 'filterObjectByProperty', () => {
74
74
  array: [ 1, 3, 4 ],
75
75
  },
76
76
  },
77
- property: 'nested-object-foo',
77
+ properties: [ 'nested-object-foo' ],
78
78
  expected: {
79
79
  'nested-object': {
80
80
  'nested-object-foo': 'bar',
@@ -82,15 +82,15 @@ describe( 'filterObjectByProperty', () => {
82
82
  },
83
83
  },
84
84
  ] )(
85
- 'should filter object by $property',
86
- ( { expected, object, property } ) => {
87
- const result = filterObjectByProperty( object, property );
85
+ 'should filter object by $properties',
86
+ ( { expected, object, properties } ) => {
87
+ const result = filterObjectByProperties( object, properties );
88
88
  expect( result ).toEqual( expected );
89
89
  }
90
90
  );
91
91
  } );
92
92
 
93
- describe( 'removePropertyFromObject', () => {
93
+ describe( 'removePropertiesFromObject', () => {
94
94
  const mockBaseVariation = {
95
95
  settings: {
96
96
  typography: {
@@ -188,34 +188,38 @@ describe( 'removePropertyFromObject', () => {
188
188
  },
189
189
  };
190
190
 
191
- it( 'should return with no property', () => {
191
+ it( 'should return with no properties', () => {
192
192
  const object = { test: 'me' };
193
- expect( removePropertyFromObject( object, undefined ) ).toEqual(
193
+ expect( removePropertiesFromObject( object, undefined ) ).toEqual(
194
194
  object
195
195
  );
196
196
  } );
197
197
 
198
- it( 'should return with non-string property', () => {
198
+ it( 'should return with non-string properties', () => {
199
199
  const object = { test: 'you' };
200
- expect( removePropertyFromObject( object, true ) ).toEqual( object );
200
+ expect( removePropertiesFromObject( object, true ) ).toEqual( object );
201
201
  } );
202
202
 
203
203
  it( 'should return with empty object', () => {
204
204
  const object = {};
205
- expect( removePropertyFromObject( object, 'color' ) ).toEqual( object );
205
+ expect( removePropertiesFromObject( object, [ 'color' ] ) ).toEqual(
206
+ object
207
+ );
206
208
  } );
207
209
 
208
210
  it( 'should return with null', () => {
209
- expect( removePropertyFromObject( null, 'color' ) ).toEqual( null );
211
+ expect( removePropertiesFromObject( null, [ 'color' ] ) ).toEqual(
212
+ null
213
+ );
210
214
  } );
211
215
 
212
- it( 'should remove the specified property from the object', () => {
216
+ it( 'should remove the specified properties from the object', () => {
213
217
  expect(
214
- removePropertyFromObject(
218
+ removePropertiesFromObject(
215
219
  {
216
220
  ...mockBaseVariation,
217
221
  },
218
- 'typography'
222
+ [ 'typography' ]
219
223
  )
220
224
  ).toEqual( {
221
225
  settings: {
@@ -14,18 +14,20 @@ import { __ } from '@wordpress/i18n';
14
14
  import cloneDeep from '../../utils/clone-deep';
15
15
  import { unlock } from '../../lock-unlock';
16
16
 
17
- const { GlobalStylesContext } = unlock( blockEditorPrivateApis );
17
+ const { GlobalStylesContext, areGlobalStyleConfigsEqual } = unlock(
18
+ blockEditorPrivateApis
19
+ );
18
20
  const { mergeBaseAndUserConfigs } = unlock( editorPrivateApis );
19
21
 
20
22
  /**
21
- * Removes all instances of a property from an object.
23
+ * Removes all instances of properties from an object.
22
24
  *
23
- * @param {Object} object The object to remove the property from.
24
- * @param {string} property The property to remove.
25
+ * @param {Object} object The object to remove the properties from.
26
+ * @param {string[]} properties The properties to remove.
25
27
  * @return {Object} The modified object.
26
28
  */
27
- export function removePropertyFromObject( object, property ) {
28
- if ( ! property || typeof property !== 'string' ) {
29
+ export function removePropertiesFromObject( object, properties ) {
30
+ if ( ! properties?.length ) {
29
31
  return object;
30
32
  }
31
33
 
@@ -38,26 +40,42 @@ export function removePropertyFromObject( object, property ) {
38
40
  }
39
41
 
40
42
  for ( const key in object ) {
41
- if ( key === property ) {
43
+ if ( properties.includes( key ) ) {
42
44
  delete object[ key ];
43
45
  } else if ( typeof object[ key ] === 'object' ) {
44
- removePropertyFromObject( object[ key ], property );
46
+ removePropertiesFromObject( object[ key ], properties );
45
47
  }
46
48
  }
47
49
  return object;
48
50
  }
49
51
 
50
52
  /**
51
- * Fetches the current theme style variations that contain only the specified property
53
+ * Checks whether a style variation is empty.
54
+ *
55
+ * @param {Object} variation A style variation object.
56
+ * @param {string} variation.title The title of the variation.
57
+ * @param {Object} variation.settings The settings of the variation.
58
+ * @param {Object} variation.styles The styles of the variation.
59
+ * @return {boolean} Whether the variation is empty.
60
+ */
61
+ function hasThemeVariation( { title, settings, styles } ) {
62
+ return (
63
+ title === __( 'Default' ) || // Always preserve the default variation.
64
+ Object.keys( settings ).length > 0 ||
65
+ Object.keys( styles ).length > 0
66
+ );
67
+ }
68
+
69
+ /**
70
+ * Fetches the current theme style variations that contain only the specified properties
52
71
  * and merges them with the user config.
53
72
  *
54
- * @param {Object} props Object of hook args.
55
- * @param {string} props.property The property to filter by.
73
+ * @param {string[]} properties The properties to filter by.
56
74
  * @return {Object[]|*} The merged object.
57
75
  */
58
- export function useCurrentMergeThemeStyleVariationsWithUserConfig( {
59
- property,
60
- } ) {
76
+ export function useCurrentMergeThemeStyleVariationsWithUserConfig(
77
+ properties = []
78
+ ) {
61
79
  const { variationsFromTheme } = useSelect( ( select ) => {
62
80
  const _variationsFromTheme =
63
81
  select(
@@ -70,55 +88,67 @@ export function useCurrentMergeThemeStyleVariationsWithUserConfig( {
70
88
  }, [] );
71
89
  const { user: userVariation } = useContext( GlobalStylesContext );
72
90
 
91
+ const propertiesAsString = properties.toString();
92
+
73
93
  return useMemo( () => {
74
94
  const clonedUserVariation = cloneDeep( userVariation );
75
95
 
76
96
  // Get user variation and remove the settings for the given property.
77
- const userVariationWithoutProperty = removePropertyFromObject(
97
+ const userVariationWithoutProperties = removePropertiesFromObject(
78
98
  clonedUserVariation,
79
- property
99
+ properties
80
100
  );
81
- userVariationWithoutProperty.title = __( 'Default' );
101
+ userVariationWithoutProperties.title = __( 'Default' );
82
102
 
83
- const variationsWithSinglePropertyAndBase = variationsFromTheme
103
+ const variationsWithPropertiesAndBase = variationsFromTheme
84
104
  .filter( ( variation ) => {
85
- return isVariationWithSingleProperty( variation, property );
105
+ return isVariationWithProperties( variation, properties );
86
106
  } )
87
107
  .map( ( variation ) => {
88
108
  return mergeBaseAndUserConfigs(
89
- userVariationWithoutProperty,
109
+ userVariationWithoutProperties,
90
110
  variation
91
111
  );
92
112
  } );
93
113
 
94
- return [
95
- userVariationWithoutProperty,
96
- ...variationsWithSinglePropertyAndBase,
114
+ const variationsByProperties = [
115
+ userVariationWithoutProperties,
116
+ ...variationsWithPropertiesAndBase,
97
117
  ];
98
- }, [ property, userVariation, variationsFromTheme ] );
118
+
119
+ /*
120
+ * Filter out variations with no settings or styles.
121
+ */
122
+ return variationsByProperties?.length
123
+ ? variationsByProperties.filter( hasThemeVariation )
124
+ : [];
125
+ }, [ propertiesAsString, userVariation, variationsFromTheme ] );
99
126
  }
100
127
 
101
128
  /**
102
- * Returns a new object, with properties specified in `property`,
129
+ * Returns a new object, with properties specified in `properties` array.,
103
130
  * maintain the original object tree structure.
104
- * The function is recursive, so it will perform a deep search for the given property.
105
- * E.g., the function will return `{ a: { b: { c: { test: 1 } } } }` if the property is `test`.
131
+ * The function is recursive, so it will perform a deep search for the given properties.
132
+ * E.g., the function will return `{ a: { b: { c: { test: 1 } } } }` if the properties are `[ 'test' ]`.
106
133
  *
107
- * @param {Object} object The object to filter
108
- * @param {Object} property The property to filter by
134
+ * @param {Object} object The object to filter
135
+ * @param {string[]} properties The properties to filter by
109
136
  * @return {Object} The merged object.
110
137
  */
111
- export const filterObjectByProperty = ( object, property ) => {
112
- if ( ! object ) {
138
+ export const filterObjectByProperties = ( object, properties ) => {
139
+ if ( ! object || ! properties?.length ) {
113
140
  return {};
114
141
  }
115
142
 
116
143
  const newObject = {};
117
144
  Object.keys( object ).forEach( ( key ) => {
118
- if ( key === property ) {
145
+ if ( properties.includes( key ) ) {
119
146
  newObject[ key ] = object[ key ];
120
147
  } else if ( typeof object[ key ] === 'object' ) {
121
- const newFilter = filterObjectByProperty( object[ key ], property );
148
+ const newFilter = filterObjectByProperties(
149
+ object[ key ],
150
+ properties
151
+ );
122
152
  if ( Object.keys( newFilter ).length ) {
123
153
  newObject[ key ] = newFilter;
124
154
  }
@@ -128,23 +158,18 @@ export const filterObjectByProperty = ( object, property ) => {
128
158
  };
129
159
 
130
160
  /**
131
- * Compares a style variation to the same variation filtered by a single property.
132
- * Returns true if the variation contains only the property specified.
161
+ * Compares a style variation to the same variation filtered by the specified properties.
162
+ * Returns true if the variation contains only the properties specified.
133
163
  *
134
- * @param {Object} variation The variation to compare.
135
- * @param {string} property The property to compare.
136
- * @return {boolean} Whether the variation contains only a single property.
164
+ * @param {Object} variation The variation to compare.
165
+ * @param {string[]} properties The properties to compare.
166
+ * @return {boolean} Whether the variation contains only the specified properties.
137
167
  */
138
- export function isVariationWithSingleProperty( variation, property ) {
139
- const variationWithProperty = filterObjectByProperty(
168
+ export function isVariationWithProperties( variation, properties ) {
169
+ const variationWithProperties = filterObjectByProperties(
140
170
  cloneDeep( variation ),
141
- property
171
+ properties
142
172
  );
143
173
 
144
- return (
145
- JSON.stringify( variationWithProperty?.styles ) ===
146
- JSON.stringify( variation?.styles ) &&
147
- JSON.stringify( variationWithProperty?.settings ) ===
148
- JSON.stringify( variation?.settings )
149
- );
174
+ return areGlobalStyleConfigsEqual( variationWithProperties, variation );
150
175
  }
package/src/index.js CHANGED
@@ -10,7 +10,10 @@ import {
10
10
  import { dispatch } from '@wordpress/data';
11
11
  import deprecated from '@wordpress/deprecated';
12
12
  import { createRoot, StrictMode } from '@wordpress/element';
13
- import { store as editorStore } from '@wordpress/editor';
13
+ import {
14
+ store as editorStore,
15
+ privateApis as editorPrivateApis,
16
+ } from '@wordpress/editor';
14
17
  import { store as preferencesStore } from '@wordpress/preferences';
15
18
  import {
16
19
  registerLegacyWidgetBlock,
@@ -22,8 +25,11 @@ import {
22
25
  */
23
26
  import './hooks';
24
27
  import { store as editSiteStore } from './store';
28
+ import { unlock } from './lock-unlock';
25
29
  import App from './components/app';
26
30
 
31
+ const { registerDefaultActions } = unlock( editorPrivateApis );
32
+
27
33
  /**
28
34
  * Initializes the site editor screen.
29
35
  *
@@ -47,6 +53,7 @@ export function initializeEditor( id, settings ) {
47
53
  enableFSEBlocks: true,
48
54
  } );
49
55
  }
56
+ registerDefaultActions();
50
57
 
51
58
  // We dispatch actions and update the store synchronously before rendering
52
59
  // so that we won't trigger unnecessary re-renders with useEffect.
@@ -5,6 +5,6 @@ import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/pri
5
5
 
6
6
  export const { lock, unlock } =
7
7
  __dangerousOptInToUnstableAPIsOnlyForCoreModules(
8
- 'I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.',
8
+ 'I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.',
9
9
  '@wordpress/edit-site'
10
10
  );
package/src/posts.js CHANGED
@@ -1,7 +1,25 @@
1
1
  /**
2
2
  * WordPress dependencies
3
3
  */
4
+ import { store as blocksStore } from '@wordpress/blocks';
5
+ import {
6
+ registerCoreBlocks,
7
+ __experimentalGetCoreBlocks,
8
+ __experimentalRegisterExperimentalCoreBlocks,
9
+ } from '@wordpress/block-library';
10
+ import { dispatch } from '@wordpress/data';
4
11
  import { createRoot, StrictMode } from '@wordpress/element';
12
+ import { store as preferencesStore } from '@wordpress/preferences';
13
+ import {
14
+ registerLegacyWidgetBlock,
15
+ registerWidgetGroupBlock,
16
+ } from '@wordpress/widgets';
17
+
18
+ /**
19
+ * Internal dependencies
20
+ */
21
+ import './hooks';
22
+ import { store as editSiteStore } from './store';
5
23
 
6
24
  /**
7
25
  * Internal dependencies
@@ -10,15 +28,58 @@ import PostsApp from './components/posts-app';
10
28
 
11
29
  /**
12
30
  * Initializes the "Posts Dashboard"
13
- * @param {string} id DOM element id.
31
+ * @param {string} id ID of the root element to render the screen in.
32
+ * @param {Object} settings Editor settings.
14
33
  */
15
- export function initializePostsDashboard( id ) {
34
+ export function initializePostsDashboard( id, settings ) {
16
35
  if ( ! globalThis.IS_GUTENBERG_PLUGIN ) {
17
36
  return;
18
37
  }
19
38
  const target = document.getElementById( id );
20
39
  const root = createRoot( target );
21
40
 
41
+ dispatch( blocksStore ).reapplyBlockTypeFilters();
42
+ const coreBlocks = __experimentalGetCoreBlocks().filter(
43
+ ( { name } ) => name !== 'core/freeform'
44
+ );
45
+ registerCoreBlocks( coreBlocks );
46
+ dispatch( blocksStore ).setFreeformFallbackBlockName( 'core/html' );
47
+ registerLegacyWidgetBlock( { inserter: false } );
48
+ registerWidgetGroupBlock( { inserter: false } );
49
+ if ( globalThis.IS_GUTENBERG_PLUGIN ) {
50
+ __experimentalRegisterExperimentalCoreBlocks( {
51
+ enableFSEBlocks: true,
52
+ } );
53
+ }
54
+
55
+ // We dispatch actions and update the store synchronously before rendering
56
+ // so that we won't trigger unnecessary re-renders with useEffect.
57
+ dispatch( preferencesStore ).setDefaults( 'core/edit-site', {
58
+ welcomeGuide: true,
59
+ welcomeGuideStyles: true,
60
+ welcomeGuidePage: true,
61
+ welcomeGuideTemplate: true,
62
+ } );
63
+
64
+ dispatch( preferencesStore ).setDefaults( 'core', {
65
+ allowRightClickOverrides: true,
66
+ distractionFree: false,
67
+ editorMode: 'visual',
68
+ fixedToolbar: false,
69
+ focusMode: false,
70
+ inactivePanels: [],
71
+ keepCaretInsideBlock: false,
72
+ openPanels: [ 'post-status' ],
73
+ showBlockBreadcrumbs: true,
74
+ showListViewByDefault: false,
75
+ } );
76
+
77
+ dispatch( editSiteStore ).updateSettings( settings );
78
+
79
+ // Prevent the default browser action for files dropped outside of dropzones.
80
+ window.addEventListener( 'dragover', ( e ) => e.preventDefault(), false );
81
+ window.addEventListener( 'drop', ( e ) => e.preventDefault(), false );
82
+
22
83
  root.render(
23
84
  <StrictMode>
24
85
  <PostsApp />
package/src/posts.scss CHANGED
@@ -7,6 +7,7 @@
7
7
  @import "./components/site-hub/style.scss";
8
8
  @import "./components/site-icon/style.scss";
9
9
  @import "./components/editor-canvas-container/style.scss";
10
+ @import "./components/posts-app/style.scss";
10
11
  @import "./components/resizable-frame/style.scss";
11
12
 
12
13
  @include wordpress-admin-schemes();
@@ -43,4 +44,12 @@ body {
43
44
  min-height: 0;
44
45
  position: static;
45
46
  }
47
+
48
+ .components-editor-notices__snackbar {
49
+ position: fixed;
50
+ right: 0;
51
+ bottom: 16px;
52
+ padding-left: 16px;
53
+ padding-right: 16px;
54
+ }
46
55
  }
@@ -13,10 +13,10 @@ import { store as editorStore } from '@wordpress/editor';
13
13
  export const setCanvasMode =
14
14
  ( mode ) =>
15
15
  ( { registry, dispatch } ) => {
16
+ const isMediumOrBigger =
17
+ window.matchMedia( '(min-width: 782px)' ).matches;
16
18
  const switchCanvasMode = () => {
17
19
  registry.batch( () => {
18
- const isMediumOrBigger =
19
- window.matchMedia( '(min-width: 782px)' ).matches;
20
20
  registry.dispatch( blockEditorStore ).clearSelectedBlock();
21
21
  registry.dispatch( editorStore ).setDeviceType( 'Desktop' );
22
22
  registry
@@ -59,7 +59,11 @@ export const setCanvasMode =
59
59
  } );
60
60
  };
61
61
 
62
- if ( ! document.startViewTransition ) {
62
+ /*
63
+ * Skip transition in mobile, otherwise it crashes the browser.
64
+ * See: https://github.com/WordPress/gutenberg/pull/63002.
65
+ */
66
+ if ( ! isMediumOrBigger || ! document.startViewTransition ) {
63
67
  switchCanvasMode();
64
68
  } else {
65
69
  document.documentElement.classList.add(
package/src/style.scss CHANGED
@@ -7,10 +7,8 @@
7
7
  @import "./components/global-styles/screen-revisions/style.scss";
8
8
  @import "./components/global-styles-sidebar/style.scss";
9
9
  @import "./components/page/style.scss";
10
- @import "./components/page-pages/style.scss";
11
10
  @import "./components/page-patterns/style.scss";
12
11
  @import "./components/page-templates/style.scss";
13
- @import "./components/table/style.scss";
14
12
  @import "./components/editor/style.scss";
15
13
  @import "./components/welcome-guide/style.scss";
16
14
  @import "./components/layout/style.scss";
@@ -30,12 +28,26 @@
30
28
  @import "./components/site-icon/style.scss";
31
29
  @import "./components/style-book/style.scss";
32
30
  @import "./components/editor-canvas-container/style.scss";
31
+ @import "./components/posts-app/style.scss";
33
32
  @import "./components/resizable-frame/style.scss";
34
33
  @import "./hooks/push-changes-to-global-styles/style.scss";
35
34
  @import "./components/global-styles/font-library-modal/style.scss";
36
35
  @import "./components/pagination/style.scss";
37
36
  @import "./components/global-styles/variations/style.scss";
38
37
 
38
+ /* stylelint-disable -- Disable reason: View Transitions not supported properly by stylelint. */
39
+ ::view-transition-image-pair(root) {
40
+ isolation: auto;
41
+ }
42
+
43
+ ::view-transition-old(root),
44
+ ::view-transition-new(root) {
45
+ animation: none;
46
+ mix-blend-mode: normal;
47
+ display: block;
48
+ }
49
+ /* stylelint-enable */
50
+
39
51
  body.js #wpadminbar {
40
52
  display: none;
41
53
  }
@@ -1 +0,0 @@
1
- {"version":3,"names":["_components","require","_i18n","_data","_element","_coreData","_notices","_htmlEntities","_jsxRuntime","AddNewPageModal","onSave","onClose","isCreatingPage","setIsCreatingPage","useState","title","setTitle","saveEntityRecord","useDispatch","coreStore","createErrorNotice","createSuccessNotice","noticesStore","createPage","event","preventDefault","newPage","status","slug","__","throwOnError","sprintf","decodeEntities","rendered","type","error","errorMessage","message","code","jsx","Modal","onRequestClose","children","onSubmit","jsxs","__experimentalVStack","spacing","TextControl","__next40pxDefaultSize","label","onChange","placeholder","value","__experimentalHStack","justify","Button","variant","onClick","isBusy"],"sources":["@wordpress/edit-site/src/components/add-new-page/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\tModal,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\tTextControl,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useDispatch } from '@wordpress/data';\nimport { useState } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { decodeEntities } from '@wordpress/html-entities';\n\nexport default function AddNewPageModal( { onSave, onClose } ) {\n\tconst [ isCreatingPage, setIsCreatingPage ] = useState( false );\n\tconst [ title, setTitle ] = useState( '' );\n\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\tconst { createErrorNotice, createSuccessNotice } =\n\t\tuseDispatch( noticesStore );\n\n\tasync function createPage( event ) {\n\t\tevent.preventDefault();\n\n\t\tif ( isCreatingPage ) {\n\t\t\treturn;\n\t\t}\n\t\tsetIsCreatingPage( true );\n\t\ttry {\n\t\t\tconst newPage = await saveEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t'page',\n\t\t\t\t{\n\t\t\t\t\tstatus: 'draft',\n\t\t\t\t\ttitle,\n\t\t\t\t\tslug: title || __( 'No title' ),\n\t\t\t\t},\n\t\t\t\t{ throwOnError: true }\n\t\t\t);\n\n\t\t\tonSave( newPage );\n\n\t\t\tcreateSuccessNotice(\n\t\t\t\tsprintf(\n\t\t\t\t\t// translators: %s: Title of the created template e.g: \"Category\".\n\t\t\t\t\t__( '\"%s\" successfully created.' ),\n\t\t\t\t\tdecodeEntities( newPage.title?.rendered || title )\n\t\t\t\t),\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t}\n\t\t\t);\n\t\t} catch ( error ) {\n\t\t\tconst errorMessage =\n\t\t\t\terror.message && error.code !== 'unknown_error'\n\t\t\t\t\t? error.message\n\t\t\t\t\t: __( 'An error occurred while creating the page.' );\n\n\t\t\tcreateErrorNotice( errorMessage, {\n\t\t\t\ttype: 'snackbar',\n\t\t\t} );\n\t\t} finally {\n\t\t\tsetIsCreatingPage( false );\n\t\t}\n\t}\n\n\treturn (\n\t\t<Modal title={ __( 'Draft a new page' ) } onRequestClose={ onClose }>\n\t\t\t<form onSubmit={ createPage }>\n\t\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tlabel={ __( 'Page title' ) }\n\t\t\t\t\t\tonChange={ setTitle }\n\t\t\t\t\t\tplaceholder={ __( 'No title' ) }\n\t\t\t\t\t\tvalue={ title }\n\t\t\t\t\t/>\n\t\t\t\t\t<HStack spacing={ 2 } justify=\"end\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\tisBusy={ isCreatingPage }\n\t\t\t\t\t\t\taria-disabled={ isCreatingPage }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Create draft' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</HStack>\n\t\t\t\t</VStack>\n\t\t\t</form>\n\t\t</Modal>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAOA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,aAAA,GAAAN,OAAA;AAA0D,IAAAO,WAAA,GAAAP,OAAA;AAf1D;AACA;AACA;;AAee,SAASQ,eAAeA,CAAE;EAAEC,MAAM;EAAEC;AAAQ,CAAC,EAAG;EAC9D,MAAM,CAAEC,cAAc,EAAEC,iBAAiB,CAAE,GAAG,IAAAC,iBAAQ,EAAE,KAAM,CAAC;EAC/D,MAAM,CAAEC,KAAK,EAAEC,QAAQ,CAAE,GAAG,IAAAF,iBAAQ,EAAE,EAAG,CAAC;EAE1C,MAAM;IAAEG;EAAiB,CAAC,GAAG,IAAAC,iBAAW,EAAEC,eAAU,CAAC;EACrD,MAAM;IAAEC,iBAAiB;IAAEC;EAAoB,CAAC,GAC/C,IAAAH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AoC,IAAA,EAAC5C,WAAA,CAAA6C,oBAAM;QAACC,OAAO,EAAG,CAAG;QAAAJ,QAAA,gBACpB,IAAAlC,WAAA,CAAA+B,GAAA,EAACvC,WAAA,CAAA+C,WAAW;UACXC,qBAAqB;UACrBC,KAAK,EAAG,IAAApB,QAAE,EAAE,YAAa,CAAG;UAC5BqB,QAAQ,EAAGlC,QAAU;UACrBmC,WAAW,EAAG,IAAAtB,QAAE,EAAE,UAAW,CAAG;UAChCuB,KAAK,EAAGrC;QAAO,CACf,CAAC,eACF,IAAAP,WAAA,CAAAoC,IAAA,EAAC5C,WAAA,CAAAqD,oBAAM;UAACP,OAAO,EAAG,CAAG;UAACQ,OAAO,EAAC,KAAK;UAAAZ,QAAA,gBAClC,IAAAlC,WAAA,CAAA+B,GAAA,EAACvC,WAAA,CAAAuD,MAAM;YACNP,qBAAqB;YACrBQ,OAAO,EAAC,UAAU;YAClBC,OAAO,EAAG9C,OAAS;YAAA+B,QAAA,EAEjB,IAAAb,QAAE,EAAE,QAAS;UAAC,CACT,CAAC,eACT,IAAArB,WAAA,CAAA+B,GAAA,EAACvC,WAAA,CAAAuD,MAAM;YACNP,qBAAqB;YACrBQ,OAAO,EAAC,SAAS;YACjBtB,IAAI,EAAC,QAAQ;YACbwB,MAAM,EAAG9C,cAAgB;YACzB,iBAAgBA,cAAgB;YAAA8B,QAAA,EAE9B,IAAAb,QAAE,EAAE,cAAe;UAAC,CACf,CAAC;QAAA,CACF,CAAC;MAAA,CACF;IAAC,CACJ;EAAC,CACD,CAAC;AAEV","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["_components","require","_i18n","_coreData","_htmlEntities","_element","_date","_router","_data","_dataviews","_editor","_page","_interopRequireDefault","_link","_interopRequireWildcard","_defaultViews","_constants","_addNewPage","_media","_lockUnlock","_dataviewsActions","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","usePostActions","unlock","editorPrivateApis","useLocation","useHistory","routerPrivateApis","EMPTY_ARRAY","getFormattedDate","dateToDisplay","dateI18n","getSettings","formats","datetimeAbbreviated","getDate","useView","postType","params","activeView","isCustom","layout","history","selectedDefaultView","useMemo","defaultView","DEFAULT_VIEWS","find","slug","view","type","DEFAULT_CONFIG_PER_VIEW_TYPE","setView","useState","useEffect","editedViewRecord","useSelect","select","getEditedEntityRecord","coreStore","dataviewRecord","Number","editEntityRecord","useDispatch","customView","storedView","content","JSON","parse","setCustomView","useCallback","viewToSet","id","stringify","setDefaultViewAndUpdateUrl","getLocationWithParams","push","STATUSES","value","label","__","DEFAULT_STATUSES","FeaturedImage","item","viewType","isDisabled","status","onClick","useLink","postId","canvas","hasMedia","featured_media","size","LAYOUT_GRID","media","jsx","className","renderButton","LAYOUT_LIST","children","title","rendered","PagePages","onSelectionChange","items","_params$isCustom","length","undefined","queryArgs","filters","forEach","filter","field","operator","OPERATOR_IS_ANY","author","OPERATOR_IS_NONE","author_exclude","per_page","perPage","page","_embed","order","sort","direction","orderby","search","records","pages","isResolving","isLoadingPages","totalItems","totalPages","useEntityRecords","authors","isLoadingAuthors","paginationInfo","frontPageId","postsPageId","addNewLabel","getEntityRecord","getPostType","siteSettings","page_on_front","page_for_posts","labels","add_new_item","fields","header","getValue","render","enableSorting","width","addLink","LAYOUT_TABLE","includes","decodeEntities","suffix","jsxs","__experimentalHStack","alignment","justify","maxWidth","enableHiding","_embedded","name","elements","map","_STATUSES$find$label","filterBy","operators","isDraftOrPrivate","createInterpolateElement","sprintf","date","span","time","isScheduled","modified","isPending","isPublished","postTypeActions","editAction","useEditPostAction","actions","onChangeView","newView","showAddPageModal","setShowAddPageModal","openModal","closeModal","handleNewPage","Fragment","Button","variant","__next40pxDefaultSize","onSave","onClose","DataViews","data","isLoading"],"sources":["@wordpress/edit-site/src/components/page-pages/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Button, __experimentalHStack as HStack } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useEntityRecords, store as coreStore } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport {\n\tcreateInterpolateElement,\n\tuseState,\n\tuseMemo,\n\tuseCallback,\n\tuseEffect,\n} from '@wordpress/element';\nimport { dateI18n, getDate, getSettings } from '@wordpress/date';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { DataViews } from '@wordpress/dataviews';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport Page from '../page';\nimport { default as Link, useLink } from '../routes/link';\nimport {\n\tDEFAULT_VIEWS,\n\tDEFAULT_CONFIG_PER_VIEW_TYPE,\n} from '../sidebar-dataviews/default-views';\nimport {\n\tLAYOUT_GRID,\n\tLAYOUT_TABLE,\n\tLAYOUT_LIST,\n\tOPERATOR_IS_ANY,\n\tOPERATOR_IS_NONE,\n} from '../../utils/constants';\n\nimport AddNewPageModal from '../add-new-page';\nimport Media from '../media';\nimport { unlock } from '../../lock-unlock';\nimport { useEditPostAction } from '../dataviews-actions';\n\nconst { usePostActions } = unlock( editorPrivateApis );\nconst { useLocation, useHistory } = unlock( routerPrivateApis );\nconst EMPTY_ARRAY = [];\n\nconst getFormattedDate = ( dateToDisplay ) =>\n\tdateI18n(\n\t\tgetSettings().formats.datetimeAbbreviated,\n\t\tgetDate( dateToDisplay )\n\t);\n\nfunction useView( postType ) {\n\tconst {\n\t\tparams: { activeView = 'all', isCustom = 'false', layout },\n\t} = useLocation();\n\tconst history = useHistory();\n\tconst selectedDefaultView = useMemo( () => {\n\t\tconst defaultView =\n\t\t\tisCustom === 'false' &&\n\t\t\tDEFAULT_VIEWS[ postType ].find(\n\t\t\t\t( { slug } ) => slug === activeView\n\t\t\t)?.view;\n\t\tif ( isCustom === 'false' && layout ) {\n\t\t\treturn {\n\t\t\t\t...defaultView,\n\t\t\t\ttype: layout,\n\t\t\t\tlayout: {\n\t\t\t\t\t...( DEFAULT_CONFIG_PER_VIEW_TYPE[ layout ] || {} ),\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\treturn defaultView;\n\t}, [ isCustom, activeView, layout, postType ] );\n\tconst [ view, setView ] = useState( selectedDefaultView );\n\n\tuseEffect( () => {\n\t\tif ( selectedDefaultView ) {\n\t\t\tsetView( selectedDefaultView );\n\t\t}\n\t}, [ selectedDefaultView ] );\n\tconst editedViewRecord = useSelect(\n\t\t( select ) => {\n\t\t\tif ( isCustom !== 'true' ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst { getEditedEntityRecord } = select( coreStore );\n\t\t\tconst dataviewRecord = getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t'wp_dataviews',\n\t\t\t\tNumber( activeView )\n\t\t\t);\n\t\t\treturn dataviewRecord;\n\t\t},\n\t\t[ activeView, isCustom ]\n\t);\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\n\tconst customView = useMemo( () => {\n\t\tconst storedView =\n\t\t\teditedViewRecord?.content &&\n\t\t\tJSON.parse( editedViewRecord?.content );\n\t\tif ( ! storedView ) {\n\t\t\treturn storedView;\n\t\t}\n\n\t\treturn {\n\t\t\t...storedView,\n\t\t\tlayout: {\n\t\t\t\t...( DEFAULT_CONFIG_PER_VIEW_TYPE[ storedView?.type ] || {} ),\n\t\t\t},\n\t\t};\n\t}, [ editedViewRecord?.content ] );\n\n\tconst setCustomView = useCallback(\n\t\t( viewToSet ) => {\n\t\t\teditEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t'wp_dataviews',\n\t\t\t\teditedViewRecord?.id,\n\t\t\t\t{\n\t\t\t\t\tcontent: JSON.stringify( viewToSet ),\n\t\t\t\t}\n\t\t\t);\n\t\t},\n\t\t[ editEntityRecord, editedViewRecord?.id ]\n\t);\n\n\tconst setDefaultViewAndUpdateUrl = useCallback(\n\t\t( viewToSet ) => {\n\t\t\tif ( viewToSet.type !== view?.type ) {\n\t\t\t\tconst { params } = history.getLocationWithParams();\n\t\t\t\thistory.push( {\n\t\t\t\t\t...params,\n\t\t\t\t\tlayout: viewToSet.type,\n\t\t\t\t} );\n\t\t\t}\n\t\t\tsetView( viewToSet );\n\t\t},\n\t\t[ history, view?.type ]\n\t);\n\n\tif ( isCustom === 'false' ) {\n\t\treturn [ view, setDefaultViewAndUpdateUrl ];\n\t} else if ( isCustom === 'true' && customView ) {\n\t\treturn [ customView, setCustomView ];\n\t}\n\t// Loading state where no the view was not found on custom views or default views.\n\treturn [ DEFAULT_VIEWS[ postType ][ 0 ].view, setDefaultViewAndUpdateUrl ];\n}\n\n// See https://github.com/WordPress/gutenberg/issues/55886\n// We do not support custom statutes at the moment.\nconst STATUSES = [\n\t{ value: 'draft', label: __( 'Draft' ) },\n\t{ value: 'future', label: __( 'Scheduled' ) },\n\t{ value: 'pending', label: __( 'Pending Review' ) },\n\t{ value: 'private', label: __( 'Private' ) },\n\t{ value: 'publish', label: __( 'Published' ) },\n\t{ value: 'trash', label: __( 'Trash' ) },\n];\nconst DEFAULT_STATUSES = 'draft,future,pending,private,publish'; // All but 'trash'.\n\nfunction FeaturedImage( { item, viewType } ) {\n\tconst isDisabled = item.status === 'trash';\n\tconst { onClick } = useLink( {\n\t\tpostId: item.id,\n\t\tpostType: item.type,\n\t\tcanvas: 'edit',\n\t} );\n\tconst hasMedia = !! item.featured_media;\n\tconst size =\n\t\tviewType === LAYOUT_GRID\n\t\t\t? [ 'large', 'full', 'medium', 'thumbnail' ]\n\t\t\t: [ 'thumbnail', 'medium', 'large', 'full' ];\n\tconst media = hasMedia ? (\n\t\t<Media\n\t\t\tclassName=\"edit-site-page-pages__featured-image\"\n\t\t\tid={ item.featured_media }\n\t\t\tsize={ size }\n\t\t/>\n\t) : null;\n\tconst renderButton = viewType !== LAYOUT_LIST && ! isDisabled;\n\treturn (\n\t\t<div\n\t\t\tclassName={ `edit-site-page-pages__featured-image-wrapper is-layout-${ viewType }` }\n\t\t>\n\t\t\t{ renderButton ? (\n\t\t\t\t<button\n\t\t\t\t\tclassName=\"page-pages-preview-field__button\"\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tonClick={ onClick }\n\t\t\t\t\taria-label={ item.title?.rendered || __( '(no title)' ) }\n\t\t\t\t>\n\t\t\t\t\t{ media }\n\t\t\t\t</button>\n\t\t\t) : (\n\t\t\t\tmedia\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nexport default function PagePages() {\n\tconst postType = 'page';\n\tconst [ view, setView ] = useView( postType );\n\tconst history = useHistory();\n\n\tconst onSelectionChange = useCallback(\n\t\t( items ) => {\n\t\t\tconst { params } = history.getLocationWithParams();\n\t\t\tif (\n\t\t\t\t( params.isCustom ?? 'false' ) === 'false' &&\n\t\t\t\tview?.type === LAYOUT_LIST\n\t\t\t) {\n\t\t\t\thistory.push( {\n\t\t\t\t\t...params,\n\t\t\t\t\tpostId: items.length === 1 ? items[ 0 ].id : undefined,\n\t\t\t\t} );\n\t\t\t}\n\t\t},\n\t\t[ history, view?.type ]\n\t);\n\n\tconst queryArgs = useMemo( () => {\n\t\tconst filters = {};\n\t\tview.filters.forEach( ( filter ) => {\n\t\t\tif (\n\t\t\t\tfilter.field === 'status' &&\n\t\t\t\tfilter.operator === OPERATOR_IS_ANY\n\t\t\t) {\n\t\t\t\tfilters.status = filter.value;\n\t\t\t}\n\t\t\tif (\n\t\t\t\tfilter.field === 'author' &&\n\t\t\t\tfilter.operator === OPERATOR_IS_ANY\n\t\t\t) {\n\t\t\t\tfilters.author = filter.value;\n\t\t\t} else if (\n\t\t\t\tfilter.field === 'author' &&\n\t\t\t\tfilter.operator === OPERATOR_IS_NONE\n\t\t\t) {\n\t\t\t\tfilters.author_exclude = filter.value;\n\t\t\t}\n\t\t} );\n\t\t// We want to provide a different default item for the status filter\n\t\t// than the REST API provides.\n\t\tif ( ! filters.status || filters.status === '' ) {\n\t\t\tfilters.status = DEFAULT_STATUSES;\n\t\t}\n\n\t\treturn {\n\t\t\tper_page: view.perPage,\n\t\t\tpage: view.page,\n\t\t\t_embed: 'author',\n\t\t\torder: view.sort?.direction,\n\t\t\torderby: view.sort?.field,\n\t\t\tsearch: view.search,\n\t\t\t...filters,\n\t\t};\n\t}, [ view ] );\n\tconst {\n\t\trecords: pages,\n\t\tisResolving: isLoadingPages,\n\t\ttotalItems,\n\t\ttotalPages,\n\t} = useEntityRecords( 'postType', postType, queryArgs );\n\n\tconst { records: authors, isResolving: isLoadingAuthors } =\n\t\tuseEntityRecords( 'root', 'user', { per_page: -1 } );\n\n\tconst paginationInfo = useMemo(\n\t\t() => ( {\n\t\t\ttotalItems,\n\t\t\ttotalPages,\n\t\t} ),\n\t\t[ totalItems, totalPages ]\n\t);\n\n\tconst { frontPageId, postsPageId, addNewLabel } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, getPostType } = select( coreStore );\n\t\tconst siteSettings = getEntityRecord( 'root', 'site' );\n\t\treturn {\n\t\t\tfrontPageId: siteSettings?.page_on_front,\n\t\t\tpostsPageId: siteSettings?.page_for_posts,\n\t\t\taddNewLabel: getPostType( 'page' )?.labels?.add_new_item,\n\t\t};\n\t} );\n\n\tconst fields = useMemo(\n\t\t() => [\n\t\t\t{\n\t\t\t\tid: 'featured-image',\n\t\t\t\theader: __( 'Featured Image' ),\n\t\t\t\tgetValue: ( { item } ) => item.featured_media,\n\t\t\t\trender: ( { item } ) => (\n\t\t\t\t\t<FeaturedImage item={ item } viewType={ view.type } />\n\t\t\t\t),\n\t\t\t\tenableSorting: false,\n\t\t\t\twidth: '1%',\n\t\t\t},\n\t\t\t{\n\t\t\t\theader: __( 'Title' ),\n\t\t\t\tid: 'title',\n\t\t\t\tgetValue: ( { item } ) => item.title?.rendered,\n\t\t\t\trender: ( { item } ) => {\n\t\t\t\t\tconst addLink =\n\t\t\t\t\t\t[ LAYOUT_TABLE, LAYOUT_GRID ].includes( view.type ) &&\n\t\t\t\t\t\titem.status !== 'trash';\n\t\t\t\t\tconst title = addLink ? (\n\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\tparams={ {\n\t\t\t\t\t\t\t\tpostId: item.id,\n\t\t\t\t\t\t\t\tpostType: item.type,\n\t\t\t\t\t\t\t\tcanvas: 'edit',\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ decodeEntities( item.title?.rendered ) ||\n\t\t\t\t\t\t\t\t__( '(no title)' ) }\n\t\t\t\t\t\t</Link>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t{ decodeEntities( item.title?.rendered ) ||\n\t\t\t\t\t\t\t\t__( '(no title)' ) }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t);\n\n\t\t\t\t\tlet suffix = '';\n\t\t\t\t\tif ( item.id === frontPageId ) {\n\t\t\t\t\t\tsuffix = (\n\t\t\t\t\t\t\t<span className=\"edit-site-page-pages__title-badge\">\n\t\t\t\t\t\t\t\t{ __( 'Front Page' ) }\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t);\n\t\t\t\t\t} else if ( item.id === postsPageId ) {\n\t\t\t\t\t\tsuffix = (\n\t\t\t\t\t\t\t<span className=\"edit-site-page-pages__title-badge\">\n\t\t\t\t\t\t\t\t{ __( 'Posts Page' ) }\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\tclassName=\"edit-site-page-pages-title\"\n\t\t\t\t\t\t\talignment=\"center\"\n\t\t\t\t\t\t\tjustify=\"flex-start\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\t{ suffix }\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\tmaxWidth: 300,\n\t\t\t\tenableHiding: false,\n\t\t\t},\n\t\t\t{\n\t\t\t\theader: __( 'Author' ),\n\t\t\t\tid: 'author',\n\t\t\t\tgetValue: ( { item } ) => item._embedded?.author[ 0 ]?.name,\n\t\t\t\telements:\n\t\t\t\t\tauthors?.map( ( { id, name } ) => ( {\n\t\t\t\t\t\tvalue: id,\n\t\t\t\t\t\tlabel: name,\n\t\t\t\t\t} ) ) || [],\n\t\t\t},\n\t\t\t{\n\t\t\t\theader: __( 'Status' ),\n\t\t\t\tid: 'status',\n\t\t\t\tgetValue: ( { item } ) =>\n\t\t\t\t\tSTATUSES.find( ( { value } ) => value === item.status )\n\t\t\t\t\t\t?.label ?? item.status,\n\t\t\t\telements: STATUSES,\n\t\t\t\tenableSorting: false,\n\t\t\t\tfilterBy: {\n\t\t\t\t\toperators: [ OPERATOR_IS_ANY ],\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\theader: __( 'Date' ),\n\t\t\t\tid: 'date',\n\t\t\t\trender: ( { item } ) => {\n\t\t\t\t\tconst isDraftOrPrivate = [ 'draft', 'private' ].includes(\n\t\t\t\t\t\titem.status\n\t\t\t\t\t);\n\t\t\t\t\tif ( isDraftOrPrivate ) {\n\t\t\t\t\t\treturn createInterpolateElement(\n\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: page creation date */\n\t\t\t\t\t\t\t\t__( '<span>Modified: <time>%s</time></span>' ),\n\t\t\t\t\t\t\t\tgetFormattedDate( item.date )\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tspan: <span />,\n\t\t\t\t\t\t\t\ttime: <time />,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tconst isScheduled = item.status === 'future';\n\t\t\t\t\tif ( isScheduled ) {\n\t\t\t\t\t\treturn createInterpolateElement(\n\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: page creation date */\n\t\t\t\t\t\t\t\t__( '<span>Scheduled: <time>%s</time></span>' ),\n\t\t\t\t\t\t\t\tgetFormattedDate( item.date )\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tspan: <span />,\n\t\t\t\t\t\t\t\ttime: <time />,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Pending & Published posts show the modified date if it's newer.\n\t\t\t\t\tconst dateToDisplay =\n\t\t\t\t\t\tgetDate( item.modified ) > getDate( item.date )\n\t\t\t\t\t\t\t? item.modified\n\t\t\t\t\t\t\t: item.date;\n\n\t\t\t\t\tconst isPending = item.status === 'pending';\n\t\t\t\t\tif ( isPending ) {\n\t\t\t\t\t\treturn createInterpolateElement(\n\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: the newest of created or modified date for the page */\n\t\t\t\t\t\t\t\t__( '<span>Modified: <time>%s</time></span>' ),\n\t\t\t\t\t\t\t\tgetFormattedDate( dateToDisplay )\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tspan: <span />,\n\t\t\t\t\t\t\t\ttime: <time />,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tconst isPublished = item.status === 'publish';\n\t\t\t\t\tif ( isPublished ) {\n\t\t\t\t\t\treturn createInterpolateElement(\n\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: the newest of created or modified date for the page */\n\t\t\t\t\t\t\t\t__( '<span>Published: <time>%s</time></span>' ),\n\t\t\t\t\t\t\t\tgetFormattedDate( dateToDisplay )\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tspan: <span />,\n\t\t\t\t\t\t\t\ttime: <time />,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Unknow status.\n\t\t\t\t\treturn <time>{ getFormattedDate( item.date ) }</time>;\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t\t[ authors, view.type, frontPageId, postsPageId ]\n\t);\n\n\tconst postTypeActions = usePostActions( 'page' );\n\tconst editAction = useEditPostAction();\n\tconst actions = useMemo(\n\t\t() => [ editAction, ...postTypeActions ],\n\t\t[ postTypeActions, editAction ]\n\t);\n\n\tconst onChangeView = useCallback(\n\t\t( newView ) => {\n\t\t\tif ( newView.type !== view.type ) {\n\t\t\t\tnewView = {\n\t\t\t\t\t...newView,\n\t\t\t\t\tlayout: {\n\t\t\t\t\t\t...DEFAULT_CONFIG_PER_VIEW_TYPE[ newView.type ],\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tsetView( newView );\n\t\t},\n\t\t[ view.type, setView ]\n\t);\n\n\tconst [ showAddPageModal, setShowAddPageModal ] = useState( false );\n\n\tconst openModal = () => setShowAddPageModal( true );\n\tconst closeModal = () => setShowAddPageModal( false );\n\tconst handleNewPage = ( { type, id } ) => {\n\t\thistory.push( {\n\t\t\tpostId: id,\n\t\t\tpostType: type,\n\t\t\tcanvas: 'edit',\n\t\t} );\n\t\tcloseModal();\n\t};\n\n\treturn (\n\t\t<Page\n\t\t\ttitle={ __( 'Pages' ) }\n\t\t\tactions={\n\t\t\t\taddNewLabel && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\tonClick={ openModal }\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ addNewLabel }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t{ showAddPageModal && (\n\t\t\t\t\t\t\t<AddNewPageModal\n\t\t\t\t\t\t\t\tonSave={ handleNewPage }\n\t\t\t\t\t\t\t\tonClose={ closeModal }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</>\n\t\t\t\t)\n\t\t\t}\n\t\t>\n\t\t\t<DataViews\n\t\t\t\tpaginationInfo={ paginationInfo }\n\t\t\t\tfields={ fields }\n\t\t\t\tactions={ actions }\n\t\t\t\tdata={ pages || EMPTY_ARRAY }\n\t\t\t\tisLoading={ isLoadingPages || isLoadingAuthors }\n\t\t\t\tview={ view }\n\t\t\t\tonChangeView={ onChangeView }\n\t\t\t\tonSelectionChange={ onSelectionChange }\n\t\t\t/>\n\t\t</Page>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAOA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,KAAA,GAAAP,OAAA;AACA,IAAAQ,UAAA,GAAAR,OAAA;AACA,IAAAS,OAAA,GAAAT,OAAA;AAKA,IAAAU,KAAA,GAAAC,sBAAA,CAAAX,OAAA;AACA,IAAAY,KAAA,GAAAC,uBAAA,CAAAb,OAAA;AACA,IAAAc,aAAA,GAAAd,OAAA;AAIA,IAAAe,UAAA,GAAAf,OAAA;AAQA,IAAAgB,WAAA,GAAAL,sBAAA,CAAAX,OAAA;AACA,IAAAiB,MAAA,GAAAN,sBAAA,CAAAX,OAAA;AACA,IAAAkB,WAAA,GAAAlB,OAAA;AACA,IAAAmB,iBAAA,GAAAnB,OAAA;AAAyD,IAAAoB,WAAA,GAAApB,OAAA;AAAA,SAAAqB,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAT,wBAAAS,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,C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