@wordpress/edit-site 6.34.0 → 6.35.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 (523) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/components/add-new-pattern/index.js +6 -4
  3. package/build/components/add-new-pattern/index.js.map +1 -1
  4. package/build/components/add-new-post/index.js +3 -1
  5. package/build/components/add-new-post/index.js.map +1 -1
  6. package/build/components/add-new-template/add-custom-generic-template-modal-content.js +3 -1
  7. package/build/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
  8. package/build/components/add-new-template/add-custom-template-modal-content.js +4 -2
  9. package/build/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  10. package/build/components/add-new-template/index.js +7 -5
  11. package/build/components/add-new-template/index.js.map +1 -1
  12. package/build/components/add-new-template/utils.js +14 -12
  13. package/build/components/add-new-template/utils.js.map +1 -1
  14. package/build/components/app/index.js +4 -2
  15. package/build/components/app/index.js.map +1 -1
  16. package/build/components/block-editor/use-editor-iframe-props.js +3 -1
  17. package/build/components/block-editor/use-editor-iframe-props.js.map +1 -1
  18. package/build/components/block-editor/use-navigate-to-entity-record.js +3 -1
  19. package/build/components/block-editor/use-navigate-to-entity-record.js.map +1 -1
  20. package/build/components/block-editor/use-site-editor-settings.js +3 -1
  21. package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
  22. package/build/components/canvas-loader/index.js +5 -3
  23. package/build/components/canvas-loader/index.js.map +1 -1
  24. package/build/components/dataviews-actions/index.js +5 -3
  25. package/build/components/dataviews-actions/index.js.map +1 -1
  26. package/build/components/editor/index.js +17 -24
  27. package/build/components/editor/index.js.map +2 -2
  28. package/build/components/editor/site-preview.js +3 -1
  29. package/build/components/editor/site-preview.js.map +1 -1
  30. package/build/components/editor/use-adapt-editor-to-canvas.js +2 -0
  31. package/build/components/editor/use-adapt-editor-to-canvas.js.map +1 -1
  32. package/build/components/editor/use-editor-title.js +3 -1
  33. package/build/components/editor/use-editor-title.js.map +1 -1
  34. package/build/components/editor/use-resolve-edited-entity.js +5 -3
  35. package/build/components/editor/use-resolve-edited-entity.js.map +1 -1
  36. package/build/components/layout/animation.js +3 -1
  37. package/build/components/layout/animation.js.map +1 -1
  38. package/build/components/layout/hooks.js +3 -1
  39. package/build/components/layout/hooks.js.map +1 -1
  40. package/build/components/layout/index.js +6 -4
  41. package/build/components/layout/index.js.map +1 -1
  42. package/build/components/media/index.js +3 -1
  43. package/build/components/media/index.js.map +1 -1
  44. package/build/components/more-menu/index.js +4 -2
  45. package/build/components/more-menu/index.js.map +1 -1
  46. package/build/components/more-menu/site-export.js +3 -1
  47. package/build/components/more-menu/site-export.js.map +1 -1
  48. package/build/components/more-menu/welcome-guide-menu-item.js +3 -1
  49. package/build/components/more-menu/welcome-guide-menu-item.js.map +1 -1
  50. package/build/components/page-patterns/actions.js +3 -1
  51. package/build/components/page-patterns/actions.js.map +1 -1
  52. package/build/components/page-patterns/delete-category-menu-item.js +4 -2
  53. package/build/components/page-patterns/delete-category-menu-item.js.map +1 -1
  54. package/build/components/page-patterns/fields.js +8 -6
  55. package/build/components/page-patterns/fields.js.map +1 -1
  56. package/build/components/page-patterns/index.js +10 -8
  57. package/build/components/page-patterns/index.js.map +2 -2
  58. package/build/components/page-patterns/rename-category-menu-item.js +4 -2
  59. package/build/components/page-patterns/rename-category-menu-item.js.map +1 -1
  60. package/build/components/page-patterns/search-items.js +10 -8
  61. package/build/components/page-patterns/search-items.js.map +1 -1
  62. package/build/components/page-patterns/use-pattern-settings.js +2 -0
  63. package/build/components/page-patterns/use-pattern-settings.js.map +1 -1
  64. package/build/components/page-patterns/use-patterns.js +8 -6
  65. package/build/components/page-patterns/use-patterns.js.map +1 -1
  66. package/build/components/page-patterns/utils.js +3 -1
  67. package/build/components/page-patterns/utils.js.map +1 -1
  68. package/build/components/page-templates/fields.js +14 -12
  69. package/build/components/page-templates/fields.js.map +2 -2
  70. package/build/components/page-templates/hooks.js +2 -0
  71. package/build/components/page-templates/hooks.js.map +1 -1
  72. package/build/components/page-templates/index.js +16 -11
  73. package/build/components/page-templates/index.js.map +2 -2
  74. package/build/components/page-templates/view-utils.js +8 -2
  75. package/build/components/page-templates/view-utils.js.map +2 -2
  76. package/build/components/pagination/index.js +3 -1
  77. package/build/components/pagination/index.js.map +1 -1
  78. package/build/components/plugin-template-setting-panel/index.js +5 -3
  79. package/build/components/plugin-template-setting-panel/index.js.map +1 -1
  80. package/build/components/post-edit/index.js +5 -3
  81. package/build/components/post-edit/index.js.map +1 -1
  82. package/build/components/post-list/index.js +8 -6
  83. package/build/components/post-list/index.js.map +1 -1
  84. package/build/components/post-list/view-utils.js +5 -3
  85. package/build/components/post-list/view-utils.js.map +1 -1
  86. package/build/components/resizable-frame/index.js +10 -8
  87. package/build/components/resizable-frame/index.js.map +1 -1
  88. package/build/components/routes/use-title.js +3 -1
  89. package/build/components/routes/use-title.js.map +1 -1
  90. package/build/components/save-button/index.js +4 -2
  91. package/build/components/save-button/index.js.map +1 -1
  92. package/build/components/save-hub/index.js +3 -1
  93. package/build/components/save-hub/index.js.map +1 -1
  94. package/build/components/save-keyboard-shortcut/index.js +3 -1
  95. package/build/components/save-keyboard-shortcut/index.js.map +1 -1
  96. package/build/components/save-panel/index.js +7 -5
  97. package/build/components/save-panel/index.js.map +1 -1
  98. package/build/components/sidebar/index.js +4 -2
  99. package/build/components/sidebar/index.js.map +1 -1
  100. package/build/components/sidebar-button/index.js +3 -1
  101. package/build/components/sidebar-button/index.js.map +1 -1
  102. package/build/components/sidebar-dataviews/dataview-item.js +4 -2
  103. package/build/components/sidebar-dataviews/dataview-item.js.map +1 -1
  104. package/build/components/sidebar-dataviews/index.js +4 -2
  105. package/build/components/sidebar-dataviews/index.js.map +1 -1
  106. package/build/components/sidebar-global-styles/index.js +7 -5
  107. package/build/components/sidebar-global-styles/index.js.map +1 -1
  108. package/build/components/sidebar-navigation-item/index.js +4 -2
  109. package/build/components/sidebar-navigation-item/index.js.map +1 -1
  110. package/build/components/sidebar-navigation-screen/index.js +4 -2
  111. package/build/components/sidebar-navigation-screen/index.js.map +1 -1
  112. package/build/components/sidebar-navigation-screen-details-footer/index.js +3 -1
  113. package/build/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  114. package/build/components/sidebar-navigation-screen-global-styles/content.js +4 -2
  115. package/build/components/sidebar-navigation-screen-global-styles/content.js.map +1 -1
  116. package/build/components/sidebar-navigation-screen-global-styles/index.js +4 -2
  117. package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  118. package/build/components/sidebar-navigation-screen-main/index.js +3 -1
  119. package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
  120. package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +3 -1
  121. package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
  122. package/build/components/sidebar-navigation-screen-navigation-menu/index.js +5 -3
  123. package/build/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  124. package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js +5 -3
  125. package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
  126. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +4 -2
  127. package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
  128. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +4 -2
  129. package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  130. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +3 -1
  131. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  132. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +3 -1
  133. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  134. package/build/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js +2 -0
  135. package/build/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
  136. package/build/components/sidebar-navigation-screen-navigation-menus/constants.js +3 -1
  137. package/build/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
  138. package/build/components/sidebar-navigation-screen-navigation-menus/index.js +4 -2
  139. package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  140. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +5 -3
  141. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  142. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +6 -4
  143. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  144. package/build/components/sidebar-navigation-screen-patterns/category-item.js +3 -1
  145. package/build/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
  146. package/build/components/sidebar-navigation-screen-patterns/index.js +4 -2
  147. package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  148. package/build/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js +2 -0
  149. package/build/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +1 -1
  150. package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +2 -0
  151. package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
  152. package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +3 -1
  153. package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
  154. package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js +2 -0
  155. package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
  156. package/build/components/sidebar-navigation-screen-templates-browse/content.js +5 -3
  157. package/build/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
  158. package/build/components/sidebar-navigation-screen-templates-browse/index.js +3 -1
  159. package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  160. package/build/components/sidebar-navigation-screen-unsupported/index.js +3 -1
  161. package/build/components/sidebar-navigation-screen-unsupported/index.js.map +1 -1
  162. package/build/components/site-editor-routes/home.js +4 -2
  163. package/build/components/site-editor-routes/home.js.map +1 -1
  164. package/build/components/site-editor-routes/index.js +3 -1
  165. package/build/components/site-editor-routes/index.js.map +1 -1
  166. package/build/components/site-editor-routes/navigation-item.js +5 -3
  167. package/build/components/site-editor-routes/navigation-item.js.map +1 -1
  168. package/build/components/site-editor-routes/navigation.js +5 -3
  169. package/build/components/site-editor-routes/navigation.js.map +1 -1
  170. package/build/components/site-editor-routes/notfound.js +4 -2
  171. package/build/components/site-editor-routes/notfound.js.map +1 -1
  172. package/build/components/site-editor-routes/page-item.js +4 -2
  173. package/build/components/site-editor-routes/page-item.js.map +1 -1
  174. package/build/components/site-editor-routes/pages.js +5 -3
  175. package/build/components/site-editor-routes/pages.js.map +1 -1
  176. package/build/components/site-editor-routes/pattern-item.js +4 -2
  177. package/build/components/site-editor-routes/pattern-item.js.map +1 -1
  178. package/build/components/site-editor-routes/patterns.js +4 -2
  179. package/build/components/site-editor-routes/patterns.js.map +1 -1
  180. package/build/components/site-editor-routes/stylebook.js +5 -3
  181. package/build/components/site-editor-routes/stylebook.js.map +1 -1
  182. package/build/components/site-editor-routes/styles.js +6 -4
  183. package/build/components/site-editor-routes/styles.js.map +1 -1
  184. package/build/components/site-editor-routes/template-item.js +5 -3
  185. package/build/components/site-editor-routes/template-item.js.map +1 -1
  186. package/build/components/site-editor-routes/template-part-item.js +4 -2
  187. package/build/components/site-editor-routes/template-part-item.js.map +1 -1
  188. package/build/components/site-editor-routes/templates.js +4 -2
  189. package/build/components/site-editor-routes/templates.js.map +1 -1
  190. package/build/components/site-editor-routes/utils.js +2 -0
  191. package/build/components/site-editor-routes/utils.js.map +1 -1
  192. package/build/components/site-hub/index.js +6 -4
  193. package/build/components/site-hub/index.js.map +1 -1
  194. package/build/components/site-icon/index.js +3 -1
  195. package/build/components/site-icon/index.js.map +1 -1
  196. package/build/components/welcome-guide/editor.js +3 -1
  197. package/build/components/welcome-guide/editor.js.map +1 -1
  198. package/build/components/welcome-guide/image.js +2 -0
  199. package/build/components/welcome-guide/image.js.map +1 -1
  200. package/build/components/welcome-guide/index.js +3 -1
  201. package/build/components/welcome-guide/index.js.map +1 -1
  202. package/build/components/welcome-guide/page.js +3 -1
  203. package/build/components/welcome-guide/page.js.map +1 -1
  204. package/build/components/welcome-guide/template.js +3 -1
  205. package/build/components/welcome-guide/template.js.map +1 -1
  206. package/build/deprecated.js +5 -3
  207. package/build/deprecated.js.map +1 -1
  208. package/build/hooks/commands/use-common-commands.js +7 -5
  209. package/build/hooks/commands/use-common-commands.js.map +1 -1
  210. package/build/hooks/commands/use-set-command-context.js +4 -2
  211. package/build/hooks/commands/use-set-command-context.js.map +1 -1
  212. package/build/index.js +4 -5
  213. package/build/index.js.map +2 -2
  214. package/build/lock-unlock.js +3 -1
  215. package/build/lock-unlock.js.map +1 -1
  216. package/build/store/actions.js +14 -12
  217. package/build/store/actions.js.map +1 -1
  218. package/build/store/constants.js +3 -1
  219. package/build/store/constants.js.map +1 -1
  220. package/build/store/index.js +4 -2
  221. package/build/store/index.js.map +1 -1
  222. package/build/store/private-actions.js +2 -0
  223. package/build/store/private-actions.js.map +1 -1
  224. package/build/store/private-selectors.js +2 -0
  225. package/build/store/private-selectors.js.map +1 -1
  226. package/build/store/reducer.js +2 -0
  227. package/build/store/reducer.js.map +1 -1
  228. package/build/store/selectors.js +11 -9
  229. package/build/store/selectors.js.map +1 -1
  230. package/build/utils/constants.js +18 -16
  231. package/build/utils/constants.js.map +1 -1
  232. package/build/utils/get-filtered-template-parts.js +3 -1
  233. package/build/utils/get-filtered-template-parts.js.map +1 -1
  234. package/build/utils/is-previewing-theme.js +2 -0
  235. package/build/utils/is-previewing-theme.js.map +1 -1
  236. package/build/utils/is-template-removable.js +2 -0
  237. package/build/utils/is-template-removable.js.map +1 -1
  238. package/build/utils/is-template-revertable.js +2 -0
  239. package/build/utils/is-template-revertable.js.map +2 -2
  240. package/build/utils/use-activate-theme.js +3 -1
  241. package/build/utils/use-activate-theme.js.map +1 -1
  242. package/build/utils/use-actual-current-theme.js +3 -1
  243. package/build/utils/use-actual-current-theme.js.map +1 -1
  244. package/build-module/components/add-new-pattern/index.js +5 -4
  245. package/build-module/components/add-new-pattern/index.js.map +1 -1
  246. package/build-module/components/add-new-post/index.js +2 -1
  247. package/build-module/components/add-new-post/index.js.map +1 -1
  248. package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js +2 -1
  249. package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
  250. package/build-module/components/add-new-template/add-custom-template-modal-content.js +3 -2
  251. package/build-module/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
  252. package/build-module/components/add-new-template/index.js +6 -5
  253. package/build-module/components/add-new-template/index.js.map +1 -1
  254. package/build-module/components/add-new-template/utils.js +13 -12
  255. package/build-module/components/add-new-template/utils.js.map +1 -1
  256. package/build-module/components/app/index.js +3 -2
  257. package/build-module/components/app/index.js.map +1 -1
  258. package/build-module/components/block-editor/use-editor-iframe-props.js +2 -1
  259. package/build-module/components/block-editor/use-editor-iframe-props.js.map +1 -1
  260. package/build-module/components/block-editor/use-navigate-to-entity-record.js +2 -1
  261. package/build-module/components/block-editor/use-navigate-to-entity-record.js.map +1 -1
  262. package/build-module/components/block-editor/use-site-editor-settings.js +2 -1
  263. package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
  264. package/build-module/components/canvas-loader/index.js +4 -3
  265. package/build-module/components/canvas-loader/index.js.map +1 -1
  266. package/build-module/components/dataviews-actions/index.js +4 -3
  267. package/build-module/components/dataviews-actions/index.js.map +1 -1
  268. package/build-module/components/editor/index.js +16 -24
  269. package/build-module/components/editor/index.js.map +2 -2
  270. package/build-module/components/editor/site-preview.js +2 -1
  271. package/build-module/components/editor/site-preview.js.map +1 -1
  272. package/build-module/components/editor/use-adapt-editor-to-canvas.js +1 -0
  273. package/build-module/components/editor/use-adapt-editor-to-canvas.js.map +1 -1
  274. package/build-module/components/editor/use-editor-title.js +2 -1
  275. package/build-module/components/editor/use-editor-title.js.map +1 -1
  276. package/build-module/components/editor/use-resolve-edited-entity.js +4 -3
  277. package/build-module/components/editor/use-resolve-edited-entity.js.map +1 -1
  278. package/build-module/components/layout/animation.js +2 -1
  279. package/build-module/components/layout/animation.js.map +1 -1
  280. package/build-module/components/layout/hooks.js +2 -1
  281. package/build-module/components/layout/hooks.js.map +1 -1
  282. package/build-module/components/layout/index.js +5 -4
  283. package/build-module/components/layout/index.js.map +1 -1
  284. package/build-module/components/media/index.js +2 -1
  285. package/build-module/components/media/index.js.map +1 -1
  286. package/build-module/components/more-menu/index.js +3 -2
  287. package/build-module/components/more-menu/index.js.map +1 -1
  288. package/build-module/components/more-menu/site-export.js +2 -1
  289. package/build-module/components/more-menu/site-export.js.map +1 -1
  290. package/build-module/components/more-menu/welcome-guide-menu-item.js +2 -1
  291. package/build-module/components/more-menu/welcome-guide-menu-item.js.map +1 -1
  292. package/build-module/components/page-patterns/actions.js +2 -1
  293. package/build-module/components/page-patterns/actions.js.map +1 -1
  294. package/build-module/components/page-patterns/delete-category-menu-item.js +3 -2
  295. package/build-module/components/page-patterns/delete-category-menu-item.js.map +1 -1
  296. package/build-module/components/page-patterns/fields.js +7 -6
  297. package/build-module/components/page-patterns/fields.js.map +1 -1
  298. package/build-module/components/page-patterns/index.js +9 -8
  299. package/build-module/components/page-patterns/index.js.map +2 -2
  300. package/build-module/components/page-patterns/rename-category-menu-item.js +3 -2
  301. package/build-module/components/page-patterns/rename-category-menu-item.js.map +1 -1
  302. package/build-module/components/page-patterns/search-items.js +11 -10
  303. package/build-module/components/page-patterns/search-items.js.map +1 -1
  304. package/build-module/components/page-patterns/use-pattern-settings.js +1 -0
  305. package/build-module/components/page-patterns/use-pattern-settings.js.map +1 -1
  306. package/build-module/components/page-patterns/use-patterns.js +7 -6
  307. package/build-module/components/page-patterns/use-patterns.js.map +1 -1
  308. package/build-module/components/page-patterns/utils.js +2 -1
  309. package/build-module/components/page-patterns/utils.js.map +1 -1
  310. package/build-module/components/page-templates/fields.js +13 -12
  311. package/build-module/components/page-templates/fields.js.map +2 -2
  312. package/build-module/components/page-templates/hooks.js +1 -0
  313. package/build-module/components/page-templates/hooks.js.map +1 -1
  314. package/build-module/components/page-templates/index.js +15 -11
  315. package/build-module/components/page-templates/index.js.map +2 -2
  316. package/build-module/components/page-templates/view-utils.js +7 -2
  317. package/build-module/components/page-templates/view-utils.js.map +2 -2
  318. package/build-module/components/pagination/index.js +2 -1
  319. package/build-module/components/pagination/index.js.map +1 -1
  320. package/build-module/components/plugin-template-setting-panel/index.js +4 -3
  321. package/build-module/components/plugin-template-setting-panel/index.js.map +1 -1
  322. package/build-module/components/post-edit/index.js +4 -3
  323. package/build-module/components/post-edit/index.js.map +1 -1
  324. package/build-module/components/post-list/index.js +7 -6
  325. package/build-module/components/post-list/index.js.map +1 -1
  326. package/build-module/components/post-list/view-utils.js +4 -3
  327. package/build-module/components/post-list/view-utils.js.map +1 -1
  328. package/build-module/components/resizable-frame/index.js +9 -8
  329. package/build-module/components/resizable-frame/index.js.map +1 -1
  330. package/build-module/components/routes/use-title.js +2 -1
  331. package/build-module/components/routes/use-title.js.map +1 -1
  332. package/build-module/components/save-button/index.js +3 -2
  333. package/build-module/components/save-button/index.js.map +1 -1
  334. package/build-module/components/save-hub/index.js +2 -1
  335. package/build-module/components/save-hub/index.js.map +1 -1
  336. package/build-module/components/save-keyboard-shortcut/index.js +2 -1
  337. package/build-module/components/save-keyboard-shortcut/index.js.map +1 -1
  338. package/build-module/components/save-panel/index.js +6 -5
  339. package/build-module/components/save-panel/index.js.map +1 -1
  340. package/build-module/components/sidebar/index.js +3 -2
  341. package/build-module/components/sidebar/index.js.map +1 -1
  342. package/build-module/components/sidebar-button/index.js +2 -1
  343. package/build-module/components/sidebar-button/index.js.map +1 -1
  344. package/build-module/components/sidebar-dataviews/dataview-item.js +3 -2
  345. package/build-module/components/sidebar-dataviews/dataview-item.js.map +1 -1
  346. package/build-module/components/sidebar-dataviews/index.js +3 -2
  347. package/build-module/components/sidebar-dataviews/index.js.map +1 -1
  348. package/build-module/components/sidebar-global-styles/index.js +6 -5
  349. package/build-module/components/sidebar-global-styles/index.js.map +1 -1
  350. package/build-module/components/sidebar-navigation-item/index.js +3 -2
  351. package/build-module/components/sidebar-navigation-item/index.js.map +1 -1
  352. package/build-module/components/sidebar-navigation-screen/index.js +3 -2
  353. package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
  354. package/build-module/components/sidebar-navigation-screen-details-footer/index.js +2 -1
  355. package/build-module/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
  356. package/build-module/components/sidebar-navigation-screen-global-styles/content.js +3 -2
  357. package/build-module/components/sidebar-navigation-screen-global-styles/content.js.map +1 -1
  358. package/build-module/components/sidebar-navigation-screen-global-styles/index.js +3 -2
  359. package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  360. package/build-module/components/sidebar-navigation-screen-main/index.js +2 -1
  361. package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
  362. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +2 -1
  363. package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
  364. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js +4 -3
  365. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  366. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js +4 -3
  367. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
  368. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +3 -2
  369. package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
  370. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +3 -2
  371. package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
  372. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +2 -1
  373. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  374. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +2 -1
  375. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  376. package/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js +1 -0
  377. package/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
  378. package/build-module/components/sidebar-navigation-screen-navigation-menus/constants.js +2 -1
  379. package/build-module/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
  380. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +3 -2
  381. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  382. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +5 -4
  383. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  384. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +5 -4
  385. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
  386. package/build-module/components/sidebar-navigation-screen-patterns/category-item.js +2 -1
  387. package/build-module/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
  388. package/build-module/components/sidebar-navigation-screen-patterns/index.js +3 -2
  389. package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  390. package/build-module/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js +1 -0
  391. package/build-module/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +1 -1
  392. package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +1 -0
  393. package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
  394. package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +2 -1
  395. package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
  396. package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js +1 -0
  397. package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
  398. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js +4 -3
  399. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
  400. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +2 -1
  401. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  402. package/build-module/components/sidebar-navigation-screen-unsupported/index.js +2 -1
  403. package/build-module/components/sidebar-navigation-screen-unsupported/index.js.map +1 -1
  404. package/build-module/components/site-editor-routes/home.js +3 -2
  405. package/build-module/components/site-editor-routes/home.js.map +1 -1
  406. package/build-module/components/site-editor-routes/index.js +2 -1
  407. package/build-module/components/site-editor-routes/index.js.map +1 -1
  408. package/build-module/components/site-editor-routes/navigation-item.js +4 -3
  409. package/build-module/components/site-editor-routes/navigation-item.js.map +1 -1
  410. package/build-module/components/site-editor-routes/navigation.js +4 -3
  411. package/build-module/components/site-editor-routes/navigation.js.map +1 -1
  412. package/build-module/components/site-editor-routes/notfound.js +3 -2
  413. package/build-module/components/site-editor-routes/notfound.js.map +1 -1
  414. package/build-module/components/site-editor-routes/page-item.js +3 -2
  415. package/build-module/components/site-editor-routes/page-item.js.map +1 -1
  416. package/build-module/components/site-editor-routes/pages.js +4 -3
  417. package/build-module/components/site-editor-routes/pages.js.map +1 -1
  418. package/build-module/components/site-editor-routes/pattern-item.js +3 -2
  419. package/build-module/components/site-editor-routes/pattern-item.js.map +1 -1
  420. package/build-module/components/site-editor-routes/patterns.js +3 -2
  421. package/build-module/components/site-editor-routes/patterns.js.map +1 -1
  422. package/build-module/components/site-editor-routes/stylebook.js +4 -3
  423. package/build-module/components/site-editor-routes/stylebook.js.map +1 -1
  424. package/build-module/components/site-editor-routes/styles.js +5 -4
  425. package/build-module/components/site-editor-routes/styles.js.map +1 -1
  426. package/build-module/components/site-editor-routes/template-item.js +4 -3
  427. package/build-module/components/site-editor-routes/template-item.js.map +1 -1
  428. package/build-module/components/site-editor-routes/template-part-item.js +3 -2
  429. package/build-module/components/site-editor-routes/template-part-item.js.map +1 -1
  430. package/build-module/components/site-editor-routes/templates.js +3 -2
  431. package/build-module/components/site-editor-routes/templates.js.map +1 -1
  432. package/build-module/components/site-editor-routes/utils.js +1 -0
  433. package/build-module/components/site-editor-routes/utils.js.map +1 -1
  434. package/build-module/components/site-hub/index.js +5 -4
  435. package/build-module/components/site-hub/index.js.map +1 -1
  436. package/build-module/components/site-icon/index.js +2 -1
  437. package/build-module/components/site-icon/index.js.map +1 -1
  438. package/build-module/components/welcome-guide/editor.js +2 -1
  439. package/build-module/components/welcome-guide/editor.js.map +1 -1
  440. package/build-module/components/welcome-guide/image.js +1 -0
  441. package/build-module/components/welcome-guide/image.js.map +1 -1
  442. package/build-module/components/welcome-guide/index.js +2 -1
  443. package/build-module/components/welcome-guide/index.js.map +1 -1
  444. package/build-module/components/welcome-guide/page.js +2 -1
  445. package/build-module/components/welcome-guide/page.js.map +1 -1
  446. package/build-module/components/welcome-guide/template.js +2 -1
  447. package/build-module/components/welcome-guide/template.js.map +1 -1
  448. package/build-module/deprecated.js +4 -3
  449. package/build-module/deprecated.js.map +1 -1
  450. package/build-module/hooks/commands/use-common-commands.js +6 -5
  451. package/build-module/hooks/commands/use-common-commands.js.map +1 -1
  452. package/build-module/hooks/commands/use-set-command-context.js +3 -2
  453. package/build-module/hooks/commands/use-set-command-context.js.map +1 -1
  454. package/build-module/index.js +6 -7
  455. package/build-module/index.js.map +2 -2
  456. package/build-module/lock-unlock.js +2 -1
  457. package/build-module/lock-unlock.js.map +1 -1
  458. package/build-module/store/actions.js +13 -12
  459. package/build-module/store/actions.js.map +1 -1
  460. package/build-module/store/constants.js +2 -1
  461. package/build-module/store/constants.js.map +1 -1
  462. package/build-module/store/index.js +3 -2
  463. package/build-module/store/index.js.map +1 -1
  464. package/build-module/store/private-actions.js +1 -0
  465. package/build-module/store/private-actions.js.map +1 -1
  466. package/build-module/store/private-selectors.js +1 -0
  467. package/build-module/store/private-selectors.js.map +1 -1
  468. package/build-module/store/reducer.js +1 -0
  469. package/build-module/store/reducer.js.map +1 -1
  470. package/build-module/store/selectors.js +10 -9
  471. package/build-module/store/selectors.js.map +1 -1
  472. package/build-module/utils/constants.js +17 -16
  473. package/build-module/utils/constants.js.map +1 -1
  474. package/build-module/utils/get-filtered-template-parts.js +2 -1
  475. package/build-module/utils/get-filtered-template-parts.js.map +1 -1
  476. package/build-module/utils/is-previewing-theme.js +1 -0
  477. package/build-module/utils/is-previewing-theme.js.map +1 -1
  478. package/build-module/utils/is-template-removable.js +1 -0
  479. package/build-module/utils/is-template-removable.js.map +1 -1
  480. package/build-module/utils/is-template-revertable.js +1 -0
  481. package/build-module/utils/is-template-revertable.js.map +2 -2
  482. package/build-module/utils/use-activate-theme.js +2 -1
  483. package/build-module/utils/use-activate-theme.js.map +1 -1
  484. package/build-module/utils/use-actual-current-theme.js +2 -1
  485. package/build-module/utils/use-actual-current-theme.js.map +1 -1
  486. package/build-style/style-rtl.css +41 -40
  487. package/build-style/style.css +41 -40
  488. package/package.json +46 -46
  489. package/src/components/editor/index.js +11 -27
  490. package/src/components/page-patterns/index.js +1 -1
  491. package/src/components/page-templates/fields.js +3 -3
  492. package/src/components/page-templates/index.js +11 -7
  493. package/src/components/page-templates/view-utils.js +7 -0
  494. package/src/index.js +0 -4
  495. package/src/utils/is-template-revertable.js +1 -2
  496. package/build/components/posts-app/index.js +0 -49
  497. package/build/components/posts-app/index.js.map +0 -7
  498. package/build/components/posts-app-routes/index.js +0 -44
  499. package/build/components/posts-app-routes/index.js.map +0 -7
  500. package/build/components/posts-app-routes/post-item.js +0 -59
  501. package/build/components/posts-app-routes/post-item.js.map +0 -7
  502. package/build/components/posts-app-routes/posts.js +0 -104
  503. package/build/components/posts-app-routes/posts.js.map +0 -7
  504. package/build/posts.js +0 -94
  505. package/build/posts.js.map +0 -7
  506. package/build-module/components/posts-app/index.js +0 -19
  507. package/build-module/components/posts-app/index.js.map +0 -7
  508. package/build-module/components/posts-app-routes/index.js +0 -20
  509. package/build-module/components/posts-app-routes/index.js.map +0 -7
  510. package/build-module/components/posts-app-routes/post-item.js +0 -25
  511. package/build-module/components/posts-app-routes/post-item.js.map +0 -7
  512. package/build-module/components/posts-app-routes/posts.js +0 -70
  513. package/build-module/components/posts-app-routes/posts.js.map +0 -7
  514. package/build-module/posts.js +0 -67
  515. package/build-module/posts.js.map +0 -7
  516. package/build-style/posts-rtl.css +0 -3105
  517. package/build-style/posts.css +0 -3105
  518. package/src/components/posts-app/index.js +0 -27
  519. package/src/components/posts-app-routes/index.js +0 -25
  520. package/src/components/posts-app-routes/post-item.js +0 -27
  521. package/src/components/posts-app-routes/posts.js +0 -79
  522. package/src/posts.js +0 -91
  523. package/src/posts.scss +0 -57
@@ -1,3 +1,4 @@
1
+ // packages/edit-site/src/store/index.js
1
2
  import { createReduxStore, register } from "@wordpress/data";
2
3
  import reducer from "./reducer";
3
4
  import * as actions from "./actions";
@@ -6,12 +7,12 @@ import * as selectors from "./selectors";
6
7
  import * as privateSelectors from "./private-selectors";
7
8
  import { STORE_NAME } from "./constants";
8
9
  import { unlock } from "../lock-unlock";
9
- const storeConfig = {
10
+ var storeConfig = {
10
11
  reducer,
11
12
  actions,
12
13
  selectors
13
14
  };
14
- const store = createReduxStore(STORE_NAME, storeConfig);
15
+ var store = createReduxStore(STORE_NAME, storeConfig);
15
16
  register(store);
16
17
  unlock(store).registerPrivateSelectors(privateSelectors);
17
18
  unlock(store).registerPrivateActions(privateActions);
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/store/index.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { createReduxStore, register } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport reducer from './reducer';\nimport * as actions from './actions';\nimport * as privateActions from './private-actions';\nimport * as selectors from './selectors';\nimport * as privateSelectors from './private-selectors';\nimport { STORE_NAME } from './constants';\nimport { unlock } from '../lock-unlock';\n\nexport const storeConfig = {\n\treducer,\n\tactions,\n\tselectors,\n};\n\nexport const store = createReduxStore( STORE_NAME, storeConfig );\nregister( store );\nunlock( store ).registerPrivateSelectors( privateSelectors );\nunlock( store ).registerPrivateActions( privateActions );\n"],
5
- "mappings": "AAGA,SAAS,kBAAkB,gBAAgB;AAK3C,OAAO,aAAa;AACpB,YAAY,aAAa;AACzB,YAAY,oBAAoB;AAChC,YAAY,eAAe;AAC3B,YAAY,sBAAsB;AAClC,SAAS,kBAAkB;AAC3B,SAAS,cAAc;AAEhB,MAAM,cAAc;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AACD;AAEO,MAAM,QAAQ,iBAAkB,YAAY,WAAY;AAC/D,SAAU,KAAM;AAChB,OAAQ,KAAM,EAAE,yBAA0B,gBAAiB;AAC3D,OAAQ,KAAM,EAAE,uBAAwB,cAAe;",
5
+ "mappings": ";AAGA,SAAS,kBAAkB,gBAAgB;AAK3C,OAAO,aAAa;AACpB,YAAY,aAAa;AACzB,YAAY,oBAAoB;AAChC,YAAY,eAAe;AAC3B,YAAY,sBAAsB;AAClC,SAAS,kBAAkB;AAC3B,SAAS,cAAc;AAEhB,IAAM,cAAc;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AACD;AAEO,IAAM,QAAQ,iBAAkB,YAAY,WAAY;AAC/D,SAAU,KAAM;AAChB,OAAQ,KAAM,EAAE,yBAA0B,gBAAiB;AAC3D,OAAQ,KAAM,EAAE,uBAAwB,cAAe;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,4 @@
1
+ // packages/edit-site/src/store/private-actions.js
1
2
  function registerRoute(route) {
2
3
  return {
3
4
  type: "REGISTER_ROUTE",
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/store/private-actions.js"],
4
4
  "sourcesContent": ["export function registerRoute( route ) {\n\treturn {\n\t\ttype: 'REGISTER_ROUTE',\n\t\troute,\n\t};\n}\n\nexport function unregisterRoute( name ) {\n\treturn {\n\t\ttype: 'UNREGISTER_ROUTE',\n\t\tname,\n\t};\n}\n"],
5
- "mappings": "AAAO,SAAS,cAAe,OAAQ;AACtC,SAAO;AAAA,IACN,MAAM;AAAA,IACN;AAAA,EACD;AACD;AAEO,SAAS,gBAAiB,MAAO;AACvC,SAAO;AAAA,IACN,MAAM;AAAA,IACN;AAAA,EACD;AACD;",
5
+ "mappings": ";AAAO,SAAS,cAAe,OAAQ;AACtC,SAAO;AAAA,IACN,MAAM;AAAA,IACN;AAAA,EACD;AACD;AAEO,SAAS,gBAAiB,MAAO;AACvC,SAAO;AAAA,IACN,MAAM;AAAA,IACN;AAAA,EACD;AACD;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,4 @@
1
+ // packages/edit-site/src/store/private-selectors.js
1
2
  function getRoutes(state) {
2
3
  return state.routes;
3
4
  }
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/store/private-selectors.js"],
4
4
  "sourcesContent": ["export function getRoutes( state ) {\n\treturn state.routes;\n}\n"],
5
- "mappings": "AAAO,SAAS,UAAW,OAAQ;AAClC,SAAO,MAAM;AACd;",
5
+ "mappings": ";AAAO,SAAS,UAAW,OAAQ;AAClC,SAAO,MAAM;AACd;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,4 @@
1
+ // packages/edit-site/src/store/reducer.js
1
2
  import { combineReducers } from "@wordpress/data";
2
3
  function settings(state = {}, action) {
3
4
  switch (action.type) {
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/store/reducer.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { combineReducers } from '@wordpress/data';\n\n/**\n * Reducer returning the settings.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function settings( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'UPDATE_SETTINGS':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t...action.settings,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer keeping track of the currently edited Post Type,\n * Post Id and the context provided to fill the content of the block editor.\n *\n * @param {Object} state Current edited post.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function editedPost( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_EDITED_POST':\n\t\t\treturn {\n\t\t\t\tpostType: action.postType,\n\t\t\t\tid: action.id,\n\t\t\t\tcontext: action.context,\n\t\t\t};\n\t\tcase 'SET_EDITED_POST_CONTEXT':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tcontext: action.context,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer to set the save view panel open or closed.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n */\nexport function saveViewPanel( state = false, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_IS_SAVE_VIEW_OPENED':\n\t\t\treturn action.isOpen;\n\t}\n\treturn state;\n}\n\nfunction routes( state = [], action ) {\n\tswitch ( action.type ) {\n\t\tcase 'REGISTER_ROUTE':\n\t\t\treturn [ ...state, action.route ];\n\t\tcase 'UNREGISTER_ROUTE':\n\t\t\treturn state.filter( ( route ) => route.name !== action.name );\n\t}\n\n\treturn state;\n}\n\nexport default combineReducers( {\n\tsettings,\n\teditedPost,\n\tsaveViewPanel,\n\troutes,\n} );\n"],
5
- "mappings": "AAGA,SAAS,uBAAuB;AAUzB,SAAS,SAAU,QAAQ,CAAC,GAAG,QAAS;AAC9C,UAAS,OAAO,MAAO;AAAA,IACtB,KAAK;AACJ,aAAO;AAAA,QACN,GAAG;AAAA,QACH,GAAG,OAAO;AAAA,MACX;AAAA,EACF;AAEA,SAAO;AACR;AAWO,SAAS,WAAY,QAAQ,CAAC,GAAG,QAAS;AAChD,UAAS,OAAO,MAAO;AA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AA,IACtB,KAAK;AACJ,aAAO,OAAO;AAAA,EAChB;AACA,SAAO;AACR;AAEA,SAAS,OAAQ,QAAQ,CAAC,GAAG,QAAS;AACrC,UAAS,OAAO,MAAO;AAAA,IACtB,KAAK;AACJ,aAAO,CAAE,GAAG,OAAO,OAAO,KAAM;AAAA,IACjC,KAAK;AACJ,aAAO,MAAM,OAAQ,CAAE,UAAW,MAAM,SAAS,OAAO,IAAK;AAAA,EAC/D;AAEA,SAAO;AACR;AAEA,IAAO,kBAAQ,gBAAiB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,CAAE;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,4 @@
1
+ // packages/edit-site/src/store/selectors.js
1
2
  import { store as coreDataStore } from "@wordpress/core-data";
2
3
  import { createRegistrySelector, createSelector } from "@wordpress/data";
3
4
  import deprecated from "@wordpress/deprecated";
@@ -8,7 +9,7 @@ import { store as blockEditorStore } from "@wordpress/block-editor";
8
9
  import { unlock } from "../lock-unlock";
9
10
  import { TEMPLATE_PART_POST_TYPE } from "../utils/constants";
10
11
  import getFilteredTemplatePartBlocks from "../utils/get-filtered-template-parts";
11
- const isFeatureActive = createRegistrySelector(
12
+ var isFeatureActive = createRegistrySelector(
12
13
  (select) => (_, featureName) => {
13
14
  deprecated(`select( 'core/edit-site' ).isFeatureActive`, {
14
15
  since: "6.0",
@@ -20,7 +21,7 @@ const isFeatureActive = createRegistrySelector(
20
21
  );
21
22
  }
22
23
  );
23
- const __experimentalGetPreviewDeviceType = createRegistrySelector(
24
+ var __experimentalGetPreviewDeviceType = createRegistrySelector(
24
25
  (select) => () => {
25
26
  deprecated(
26
27
  `select( 'core/edit-site' ).__experimentalGetPreviewDeviceType`,
@@ -33,7 +34,7 @@ const __experimentalGetPreviewDeviceType = createRegistrySelector(
33
34
  return select(editorStore).getDeviceType();
34
35
  }
35
36
  );
36
- const getCanUserCreateMedia = createRegistrySelector(
37
+ var getCanUserCreateMedia = createRegistrySelector(
37
38
  (select) => () => {
38
39
  deprecated(
39
40
  `wp.data.select( 'core/edit-site' ).getCanUserCreateMedia()`,
@@ -45,7 +46,7 @@ const getCanUserCreateMedia = createRegistrySelector(
45
46
  return select(coreDataStore).canUser("create", "media");
46
47
  }
47
48
  );
48
- const getReusableBlocks = createRegistrySelector((select) => () => {
49
+ var getReusableBlocks = createRegistrySelector((select) => () => {
49
50
  deprecated(`select( 'core/edit-site' ).getReusableBlocks()`, {
50
51
  since: "6.5",
51
52
  version: "6.8",
@@ -91,14 +92,14 @@ function getPage(state) {
91
92
  });
92
93
  return { context: state.editedPost.context };
93
94
  }
94
- const isInserterOpened = createRegistrySelector((select) => () => {
95
+ var isInserterOpened = createRegistrySelector((select) => () => {
95
96
  deprecated(`select( 'core/edit-site' ).isInserterOpened`, {
96
97
  since: "6.5",
97
98
  alternative: `select( 'core/editor' ).isInserterOpened`
98
99
  });
99
100
  return select(editorStore).isInserterOpened();
100
101
  });
101
- const __experimentalGetInsertionPoint = createRegistrySelector(
102
+ var __experimentalGetInsertionPoint = createRegistrySelector(
102
103
  (select) => () => {
103
104
  deprecated(
104
105
  `select( 'core/edit-site' ).__experimentalGetInsertionPoint`,
@@ -110,7 +111,7 @@ const __experimentalGetInsertionPoint = createRegistrySelector(
110
111
  return unlock(select(editorStore)).getInserter();
111
112
  }
112
113
  );
113
- const isListViewOpened = createRegistrySelector((select) => () => {
114
+ var isListViewOpened = createRegistrySelector((select) => () => {
114
115
  deprecated(`select( 'core/edit-site' ).isListViewOpened`, {
115
116
  since: "6.5",
116
117
  alternative: `select( 'core/editor' ).isListViewOpened`
@@ -131,7 +132,7 @@ function getBlocksAndTemplateParts(select) {
131
132
  const blocks = getBlocksByClientId(clientIds);
132
133
  return [blocks, templateParts];
133
134
  }
134
- const getCurrentTemplateTemplateParts = createRegistrySelector(
135
+ var getCurrentTemplateTemplateParts = createRegistrySelector(
135
136
  (select) => createSelector(
136
137
  () => {
137
138
  deprecated(
@@ -149,7 +150,7 @@ const getCurrentTemplateTemplateParts = createRegistrySelector(
149
150
  () => getBlocksAndTemplateParts(select)
150
151
  )
151
152
  );
152
- const getEditorMode = createRegistrySelector((select) => () => {
153
+ var getEditorMode = createRegistrySelector((select) => () => {
153
154
  return select(preferencesStore).get("core", "editorMode");
154
155
  });
155
156
  function getCurrentTemplateNavigationPanelSubMenu() {
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/store/selectors.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport { createRegistrySelector, createSelector } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { Platform } from '@wordpress/element';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as editorStore } from '@wordpress/editor';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../lock-unlock';\nimport { TEMPLATE_PART_POST_TYPE } from '../utils/constants';\nimport getFilteredTemplatePartBlocks from '../utils/get-filtered-template-parts';\n\n/**\n * @typedef {'template'|'template_type'} TemplateType Template type.\n */\n\n/**\n * Returns whether the given feature is enabled or not.\n *\n * @deprecated\n * @param {Object} state Global application state.\n * @param {string} featureName Feature slug.\n *\n * @return {boolean} Is active.\n */\nexport const isFeatureActive = createRegistrySelector(\n\t( select ) => ( _, featureName ) => {\n\t\tdeprecated( `select( 'core/edit-site' ).isFeatureActive`, {\n\t\t\tsince: '6.0',\n\t\t\talternative: `select( 'core/preferences' ).get`,\n\t\t} );\n\n\t\treturn !! select( preferencesStore ).get(\n\t\t\t'core/edit-site',\n\t\t\tfeatureName\n\t\t);\n\t}\n);\n\n/**\n * Returns the current editing canvas device type.\n *\n * @deprecated\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Device type.\n */\nexport const __experimentalGetPreviewDeviceType = createRegistrySelector(\n\t( select ) => () => {\n\t\tdeprecated(\n\t\t\t`select( 'core/edit-site' ).__experimentalGetPreviewDeviceType`,\n\t\t\t{\n\t\t\t\tsince: '6.5',\n\t\t\t\tversion: '6.7',\n\t\t\t\talternative: `select( 'core/editor' ).getDeviceType`,\n\t\t\t}\n\t\t);\n\t\treturn select( editorStore ).getDeviceType();\n\t}\n);\n\n/**\n * Returns whether the current user can create media or not.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} Whether the current user can create media or not.\n */\nexport const getCanUserCreateMedia = createRegistrySelector(\n\t( select ) => () => {\n\t\tdeprecated(\n\t\t\t`wp.data.select( 'core/edit-site' ).getCanUserCreateMedia()`,\n\t\t\t{\n\t\t\t\tsince: '6.7',\n\t\t\t\talternative: `wp.data.select( 'core' ).canUser( 'create', { kind: 'postType', type: 'attachment' } )`,\n\t\t\t}\n\t\t);\n\n\t\treturn select( coreDataStore ).canUser( 'create', 'media' );\n\t}\n);\n\n/**\n * Returns any available Reusable blocks.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} The available reusable blocks.\n */\nexport const getReusableBlocks = createRegistrySelector( ( select ) => () => {\n\tdeprecated( `select( 'core/edit-site' ).getReusableBlocks()`, {\n\t\tsince: '6.5',\n\t\tversion: '6.8',\n\t\talternative: `select( 'core/core' ).getEntityRecords( 'postType', 'wp_block' )`,\n\t} );\n\tconst isWeb = Platform.OS === 'web';\n\treturn isWeb\n\t\t? select( coreDataStore ).getEntityRecords( 'postType', 'wp_block', {\n\t\t\t\tper_page: -1,\n\t\t } )\n\t\t: [];\n} );\n\n/**\n * Returns the site editor settings.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} Settings.\n */\nexport function getSettings( state ) {\n\t// It is important that we don't inject anything into these settings locally.\n\t// The reason for this is that we have an effect in place that calls setSettings based on the previous value of getSettings.\n\t// If we add computed settings here, we'll be adding these computed settings to the state which is very unexpected.\n\treturn state.settings;\n}\n\n/**\n * @deprecated\n */\nexport function getHomeTemplateId() {\n\tdeprecated( \"select( 'core/edit-site' ).getHomeTemplateId\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n}\n\n/**\n * Returns the current edited post type (wp_template or wp_template_part).\n *\n * @deprecated\n * @param {Object} state Global application state.\n *\n * @return {?TemplateType} Template type.\n */\nexport function getEditedPostType( state ) {\n\tdeprecated( \"select( 'core/edit-site' ).getEditedPostType\", {\n\t\tsince: '6.8',\n\t\talternative: \"select( 'core/editor' ).getCurrentPostType\",\n\t} );\n\treturn state.editedPost.postType;\n}\n\n/**\n * Returns the ID of the currently edited template or template part.\n *\n * @deprecated\n * @param {Object} state Global application state.\n *\n * @return {?string} Post ID.\n */\nexport function getEditedPostId( state ) {\n\tdeprecated( \"select( 'core/edit-site' ).getEditedPostId\", {\n\t\tsince: '6.8',\n\t\talternative: \"select( 'core/editor' ).getCurrentPostId\",\n\t} );\n\treturn state.editedPost.id;\n}\n\n/**\n * Returns the edited post's context object.\n *\n * @deprecated\n * @param {Object} state Global application state.\n *\n * @return {Object} Page.\n */\nexport function getEditedPostContext( state ) {\n\tdeprecated( \"select( 'core/edit-site' ).getEditedPostContext\", {\n\t\tsince: '6.8',\n\t} );\n\n\treturn state.editedPost.context;\n}\n\n/**\n * Returns the current page object.\n *\n * @deprecated\n * @param {Object} state Global application state.\n *\n * @return {Object} Page.\n */\nexport function getPage( state ) {\n\tdeprecated( \"select( 'core/edit-site' ).getPage\", {\n\t\tsince: '6.8',\n\t} );\n\n\treturn { context: state.editedPost.context };\n}\n\n/**\n * Returns true if the inserter is opened.\n *\n * @deprecated\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the inserter is opened.\n */\nexport const isInserterOpened = createRegistrySelector( ( select ) => () => {\n\tdeprecated( `select( 'core/edit-site' ).isInserterOpened`, {\n\t\tsince: '6.5',\n\t\talternative: `select( 'core/editor' ).isInserterOpened`,\n\t} );\n\treturn select( editorStore ).isInserterOpened();\n} );\n\n/**\n * Get the insertion point for the inserter.\n *\n * @deprecated\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} The root client ID, index to insert at and starting filter value.\n */\nexport const __experimentalGetInsertionPoint = createRegistrySelector(\n\t( select ) => () => {\n\t\tdeprecated(\n\t\t\t`select( 'core/edit-site' ).__experimentalGetInsertionPoint`,\n\t\t\t{\n\t\t\t\tsince: '6.5',\n\t\t\t\tversion: '6.7',\n\t\t\t}\n\t\t);\n\t\treturn unlock( select( editorStore ) ).getInserter();\n\t}\n);\n\n/**\n * Returns true if the list view is opened.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the list view is opened.\n */\nexport const isListViewOpened = createRegistrySelector( ( select ) => () => {\n\tdeprecated( `select( 'core/edit-site' ).isListViewOpened`, {\n\t\tsince: '6.5',\n\t\talternative: `select( 'core/editor' ).isListViewOpened`,\n\t} );\n\treturn select( editorStore ).isListViewOpened();\n} );\n\n/**\n * Returns the current opened/closed state of the save panel.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} True if the save panel should be open; false if closed.\n */\nexport function isSaveViewOpened( state ) {\n\treturn state.saveViewPanel;\n}\n\nfunction getBlocksAndTemplateParts( select ) {\n\tconst templateParts = select( coreDataStore ).getEntityRecords(\n\t\t'postType',\n\t\tTEMPLATE_PART_POST_TYPE,\n\t\t{ per_page: -1 }\n\t);\n\n\tconst { getBlocksByName, getBlocksByClientId } = select( blockEditorStore );\n\n\tconst clientIds = getBlocksByName( 'core/template-part' );\n\tconst blocks = getBlocksByClientId( clientIds );\n\treturn [ blocks, templateParts ];\n}\n\n/**\n * Returns the template parts and their blocks for the current edited template.\n *\n * @deprecated\n * @param {Object} state Global application state.\n * @return {Array} Template parts and their blocks in an array.\n */\nexport const getCurrentTemplateTemplateParts = createRegistrySelector(\n\t( select ) =>\n\t\tcreateSelector(\n\t\t\t() => {\n\t\t\t\tdeprecated(\n\t\t\t\t\t`select( 'core/edit-site' ).getCurrentTemplateTemplateParts()`,\n\t\t\t\t\t{\n\t\t\t\t\t\tsince: '6.7',\n\t\t\t\t\t\tversion: '6.9',\n\t\t\t\t\t\talternative: `select( 'core/block-editor' ).getBlocksByName( 'core/template-part' )`,\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\treturn getFilteredTemplatePartBlocks(\n\t\t\t\t\t...getBlocksAndTemplateParts( select )\n\t\t\t\t);\n\t\t\t},\n\t\t\t() => getBlocksAndTemplateParts( select )\n\t\t)\n);\n\n/**\n * Returns the current editing mode.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Editing mode.\n */\nexport const getEditorMode = createRegistrySelector( ( select ) => () => {\n\treturn select( preferencesStore ).get( 'core', 'editorMode' );\n} );\n\n/**\n * @deprecated\n */\nexport function getCurrentTemplateNavigationPanelSubMenu() {\n\tdeprecated(\n\t\t\"dispatch( 'core/edit-site' ).getCurrentTemplateNavigationPanelSubMenu\",\n\t\t{\n\t\t\tsince: '6.2',\n\t\t\tversion: '6.4',\n\t\t}\n\t);\n}\n\n/**\n * @deprecated\n */\nexport function getNavigationPanelActiveMenu() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).getNavigationPanelActiveMenu\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n}\n\n/**\n * @deprecated\n */\nexport function isNavigationOpened() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).isNavigationOpened\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n}\n\n/**\n * Whether or not the editor has a page loaded into it.\n *\n * @see setPage\n * @deprecated\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether or not the editor has a page loaded into it.\n */\nexport function isPage( state ) {\n\tdeprecated( \"select( 'core/edit-site' ).isPage\", {\n\t\tsince: '6.8',\n\t\talternative: \"select( 'core/editor' ).getCurrentPostType\",\n\t} );\n\n\treturn !! state.editedPost.context?.postId;\n}\n\n/**\n * Whether or not the editor allows only page content to be edited.\n *\n * @deprecated\n *\n * @return {boolean} Whether or not focus is on editing page content.\n */\nexport function hasPageContentFocus() {\n\tdeprecated( `select( 'core/edit-site' ).hasPageContentFocus`, {\n\t\tsince: '6.5',\n\t} );\n\n\treturn false;\n}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press/i18n";
2
3
  import { privateApis as patternPrivateApis } from "@wordpress/patterns";
3
4
  import { unlock } from "../lock-unlock";
4
- const NAVIGATION_POST_TYPE = "wp_navigation";
5
- const TEMPLATE_POST_TYPE = "wp_template";
6
- const TEMPLATE_PART_POST_TYPE = "wp_template_part";
7
- const TEMPLATE_ORIGINS = {
5
+ var NAVIGATION_POST_TYPE = "wp_navigation";
6
+ var TEMPLATE_POST_TYPE = "wp_template";
7
+ var TEMPLATE_PART_POST_TYPE = "wp_template_part";
8
+ var TEMPLATE_ORIGINS = {
8
9
  custom: "custom",
9
10
  theme: "theme",
10
11
  plugin: "plugin"
11
12
  };
12
- const TEMPLATE_PART_AREA_DEFAULT_CATEGORY = "uncategorized";
13
- const TEMPLATE_PART_ALL_AREAS_CATEGORY = "all-parts";
14
- const {
13
+ var TEMPLATE_PART_AREA_DEFAULT_CATEGORY = "uncategorized";
14
+ var TEMPLATE_PART_ALL_AREAS_CATEGORY = "all-parts";
15
+ var {
15
16
  PATTERN_TYPES,
16
17
  PATTERN_DEFAULT_CATEGORY,
17
18
  PATTERN_USER_CATEGORY,
18
19
  EXCLUDED_PATTERN_SOURCES,
19
20
  PATTERN_SYNC_TYPES
20
21
  } = unlock(patternPrivateApis);
21
- const FOCUSABLE_ENTITIES = [
22
+ var FOCUSABLE_ENTITIES = [
22
23
  TEMPLATE_PART_POST_TYPE,
23
24
  NAVIGATION_POST_TYPE,
24
25
  PATTERN_TYPES.user
25
26
  ];
26
- const POST_TYPE_LABELS = {
27
+ var POST_TYPE_LABELS = {
27
28
  [TEMPLATE_POST_TYPE]: __("Template"),
28
29
  [TEMPLATE_PART_POST_TYPE]: __("Template part"),
29
30
  [PATTERN_TYPES.user]: __("Pattern"),
30
31
  [NAVIGATION_POST_TYPE]: __("Navigation")
31
32
  };
32
- const LAYOUT_GRID = "grid";
33
- const LAYOUT_TABLE = "table";
34
- const LAYOUT_LIST = "list";
35
- const OPERATOR_IS = "is";
36
- const OPERATOR_IS_NOT = "isNot";
37
- const OPERATOR_IS_ANY = "isAny";
38
- const OPERATOR_IS_NONE = "isNone";
33
+ var LAYOUT_GRID = "grid";
34
+ var LAYOUT_TABLE = "table";
35
+ var LAYOUT_LIST = "list";
36
+ var OPERATOR_IS = "is";
37
+ var OPERATOR_IS_NOT = "isNot";
38
+ var OPERATOR_IS_ANY = "isAny";
39
+ var OPERATOR_IS_NONE = "isNone";
39
40
  export {
40
41
  EXCLUDED_PATTERN_SOURCES,
41
42
  FOCUSABLE_ENTITIES,
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/utils/constants.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as patternPrivateApis } from '@wordpress/patterns';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../lock-unlock';\n\n// Navigation\nexport const NAVIGATION_POST_TYPE = 'wp_navigation';\n\n// Templates.\nexport const TEMPLATE_POST_TYPE = 'wp_template';\nexport const TEMPLATE_PART_POST_TYPE = 'wp_template_part';\nexport const TEMPLATE_ORIGINS = {\n\tcustom: 'custom',\n\ttheme: 'theme',\n\tplugin: 'plugin',\n};\nexport const TEMPLATE_PART_AREA_DEFAULT_CATEGORY = 'uncategorized';\nexport const TEMPLATE_PART_ALL_AREAS_CATEGORY = 'all-parts';\n\n// Patterns.\nexport const {\n\tPATTERN_TYPES,\n\tPATTERN_DEFAULT_CATEGORY,\n\tPATTERN_USER_CATEGORY,\n\tEXCLUDED_PATTERN_SOURCES,\n\tPATTERN_SYNC_TYPES,\n} = unlock( patternPrivateApis );\n\n// Entities that are editable in focus mode.\nexport const FOCUSABLE_ENTITIES = [\n\tTEMPLATE_PART_POST_TYPE,\n\tNAVIGATION_POST_TYPE,\n\tPATTERN_TYPES.user,\n];\n\nexport const POST_TYPE_LABELS = {\n\t[ TEMPLATE_POST_TYPE ]: __( 'Template' ),\n\t[ TEMPLATE_PART_POST_TYPE ]: __( 'Template part' ),\n\t[ PATTERN_TYPES.user ]: __( 'Pattern' ),\n\t[ NAVIGATION_POST_TYPE ]: __( 'Navigation' ),\n};\n\n// DataViews constants\nexport const LAYOUT_GRID = 'grid';\nexport const LAYOUT_TABLE = 'table';\nexport const LAYOUT_LIST = 'list';\n\nexport const OPERATOR_IS = 'is';\nexport const OPERATOR_IS_NOT = 'isNot';\nexport const OPERATOR_IS_ANY = 'isAny';\nexport const OPERATOR_IS_NONE = 'isNone';\n"],
5
- "mappings": "AAGA,SAAS,UAAU;AACnB,SAAS,eAAe,0BAA0B;AAKlD,SAAS,cAAc;AAGhB,MAAM,uBAAuB;AAG7B,MAAM,qBAAqB;AAC3B,MAAM,0BAA0B;AAChC,MAAM,mBAAmB;AAAA,EAC/B,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,QAAQ;AACT;AACO,MAAM,sCAAsC;AAC5C,MAAM,mCAAmC;AAGzC,MAAM;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,IAAI,OAAQ,kBAAmB;AAGxB,MAAM,qBAAqB;AAAA,EACjC;AAAA,EACA;AAAA,EACA,cAAc;AACf;AAEO,MAAM,mBAAmB;AAAA,EAC/B,CAAE,kBAAmB,GAAG,GAAI,UAAW;AAAA,EACvC,CAAE,uBAAwB,GAAG,GAAI,eAAgB;AAAA,EACjD,CAAE,cAAc,IAAK,GAAG,GAAI,SAAU;AAAA,EACtC,CAAE,oBAAqB,GAAG,GAAI,YAAa;AAC5C;AAGO,MAAM,cAAc;AACpB,MAAM,eAAe;AACrB,MAAM,cAAc;AAEpB,MAAM,cAAc;AACpB,MAAM,kBAAkB;AACxB,MAAM,kBAAkB;AACxB,MAAM,mBAAmB;",
5
+ "mappings": ";AAGA,SAAS,UAAU;AACnB,SAAS,eAAe,0BAA0B;AAKlD,SAAS,cAAc;AAGhB,IAAM,uBAAuB;AAG7B,IAAM,qBAAqB;AAC3B,IAAM,0BAA0B;AAChC,IAAM,mBAAmB;AAAA,EAC/B,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,QAAQ;AACT;AACO,IAAM,sCAAsC;AAC5C,IAAM,mCAAmC;AAGzC,IAAM;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,IAAI,OAAQ,kBAAmB;AAGxB,IAAM,qBAAqB;AAAA,EACjC;AAAA,EACA;AAAA,EACA,cAAc;AACf;AAEO,IAAM,mBAAmB;AAAA,EAC/B,CAAE,kBAAmB,GAAG,GAAI,UAAW;AAAA,EACvC,CAAE,uBAAwB,GAAG,GAAI,eAAgB;AAAA,EACjD,CAAE,cAAc,IAAK,GAAG,GAAI,SAAU;AAAA,EACtC,CAAE,oBAAqB,GAAG,GAAI,YAAa;AAC5C;AAGO,IAAM,cAAc;AACpB,IAAM,eAAe;AACrB,IAAM,cAAc;AAEpB,IAAM,cAAc;AACpB,IAAM,kBAAkB;AACxB,IAAM,kBAAkB;AACxB,IAAM,mBAAmB;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,6 @@
1
+ // packages/edit-site/src/utils/get-filtered-template-parts.js
1
2
  import { isTemplatePart } from "@wordpress/blocks";
2
- const EMPTY_ARRAY = [];
3
+ var EMPTY_ARRAY = [];
3
4
  function getFilteredTemplatePartBlocks(blocks = EMPTY_ARRAY, templateParts) {
4
5
  const templatePartsById = templateParts ? (
5
6
  // Key template parts by their ID.
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/utils/get-filtered-template-parts.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { isTemplatePart } from '@wordpress/blocks';\n\nconst EMPTY_ARRAY = [];\n\n/**\n * Get a flattened and filtered list of template parts and the matching block for that template part.\n *\n * Takes a list of blocks defined within a template, and a list of template parts, and returns a\n * flattened list of template parts and the matching block for that template part.\n *\n * @param {Array} blocks Blocks to flatten.\n * @param {?Array} templateParts Available template parts.\n * @return {Array} An array of template parts and their blocks.\n */\nexport default function getFilteredTemplatePartBlocks(\n\tblocks = EMPTY_ARRAY,\n\ttemplateParts\n) {\n\tconst templatePartsById = templateParts\n\t\t? // Key template parts by their ID.\n\t\t templateParts.reduce(\n\t\t\t\t( newTemplateParts, part ) => ( {\n\t\t\t\t\t...newTemplateParts,\n\t\t\t\t\t[ part.id ]: part,\n\t\t\t\t} ),\n\t\t\t\t{}\n\t\t )\n\t\t: {};\n\n\tconst result = [];\n\n\t// Iterate over all blocks, recursing into inner blocks.\n\t// Output will be based on a depth-first traversal.\n\tconst stack = [ ...blocks ];\n\twhile ( stack.length ) {\n\t\tconst { innerBlocks, ...block } = stack.shift();\n\t\t// Place inner blocks at the beginning of the stack to preserve order.\n\t\tstack.unshift( ...innerBlocks );\n\n\t\tif ( isTemplatePart( block ) ) {\n\t\t\tconst {\n\t\t\t\tattributes: { theme, slug },\n\t\t\t} = block;\n\t\t\tconst templatePartId = `${ theme }//${ slug }`;\n\t\t\tconst templatePart = templatePartsById[ templatePartId ];\n\n\t\t\t// Only add to output if the found template part block is in the list of available template parts.\n\t\t\tif ( templatePart ) {\n\t\t\t\tresult.push( {\n\t\t\t\t\ttemplatePart,\n\t\t\t\t\tblock,\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn result;\n}\n"],
5
- "mappings": "AAGA,SAAS,sBAAsB;AAE/B,MAAM,cAAc,CAAC;AAYN,SAAR,8BACN,SAAS,aACT,eACC;AACD,QAAM,oBAAoB;AAAA;AAAA,IAEvB,cAAc;AAAA,MACd,CAAE,kBAAkB,UAAY;AAAA,QAC/B,GAAG;AAAA,QACH,CAAE,KAAK,EAAG,GAAG;AAAA,MACd;AAAA,MACA,CAAC;AAAA,IACD;AAAA,MACA,CAAC;AAEJ,QAAM,SAAS,CAAC;AAIhB,QAAM,QAAQ,CAAE,GAAG,MAAO;AAC1B,SAAQ,MAAM,QAAS;AACtB,UAAM,EAAE,aAAa,GAAG,MAAM,IAAI,MAAM,MAAM;AAE9C,UAAM,QAAS,GAAG,WAAY;AAE9B,QAAK,eAAgB,KAAM,GAAI;AAC9B,YAAM;AAAA,QACL,YAAY,EAAE,OAAO,KAAK;AAAA,MAC3B,IAAI;AACJ,YAAM,iBAAiB,GAAI,KAAM,KAAM,IAAK;AAC5C,YAAM,eAAe,kBAAmB,cAAe;AAGvD,UAAK,cAAe;AACnB,eAAO,KAAM;AAAA,UACZ;AAAA,UACA;AAAA,QACD,CAAE;AAAA,MACH;AAAA,IACD;AAAA,EACD;AAEA,SAAO;AACR;",
5
+ "mappings": ";AAGA,SAAS,sBAAsB;AAE/B,IAAM,cAAc,CAAC;AAYN,SAAR,8BACN,SAAS,aACT,eACC;AACD,QAAM,oBAAoB;AAAA;AAAA,IAEvB,cAAc;AAAA,MACd,CAAE,kBAAkB,UAAY;AAAA,QAC/B,GAAG;AAAA,QACH,CAAE,KAAK,EAAG,GAAG;AAAA,MACd;AAAA,MACA,CAAC;AAAA,IACD;AAAA,MACA,CAAC;AAEJ,QAAM,SAAS,CAAC;AAIhB,QAAM,QAAQ,CAAE,GAAG,MAAO;AAC1B,SAAQ,MAAM,QAAS;AACtB,UAAM,EAAE,aAAa,GAAG,MAAM,IAAI,MAAM,MAAM;AAE9C,UAAM,QAAS,GAAG,WAAY;AAE9B,QAAK,eAAgB,KAAM,GAAI;AAC9B,YAAM;AAAA,QACL,YAAY,EAAE,OAAO,KAAK;AAAA,MAC3B,IAAI;AACJ,YAAM,iBAAiB,GAAI,KAAM,KAAM,IAAK;AAC5C,YAAM,eAAe,kBAAmB,cAAe;AAGvD,UAAK,cAAe;AACnB,eAAO,KAAM;AAAA,UACZ;AAAA,UACA;AAAA,QACD,CAAE;AAAA,MACH;AAAA,IACD;AAAA,EACD;AAEA,SAAO;AACR;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,4 @@
1
+ // packages/edit-site/src/utils/is-previewing-theme.js
1
2
  import { getQueryArg } from "@wordpress/url";
2
3
  function isPreviewingTheme() {
3
4
  return !!getQueryArg(window.location.href, "wp_theme_preview");
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/utils/is-previewing-theme.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { getQueryArg } from '@wordpress/url';\n\nexport function isPreviewingTheme() {\n\treturn !! getQueryArg( window.location.href, 'wp_theme_preview' );\n}\n\nexport function currentlyPreviewingTheme() {\n\tif ( isPreviewingTheme() ) {\n\t\treturn getQueryArg( window.location.href, 'wp_theme_preview' );\n\t}\n\treturn null;\n}\n"],
5
- "mappings": "AAGA,SAAS,mBAAmB;AAErB,SAAS,oBAAoB;AACnC,SAAO,CAAC,CAAE,YAAa,OAAO,SAAS,MAAM,kBAAmB;AACjE;AAEO,SAAS,2BAA2B;AAC1C,MAAK,kBAAkB,GAAI;AAC1B,WAAO,YAAa,OAAO,SAAS,MAAM,kBAAmB;AAAA,EAC9D;AACA,SAAO;AACR;",
5
+ "mappings": ";AAGA,SAAS,mBAAmB;AAErB,SAAS,oBAAoB;AACnC,SAAO,CAAC,CAAE,YAAa,OAAO,SAAS,MAAM,kBAAmB;AACjE;AAEO,SAAS,2BAA2B;AAC1C,MAAK,kBAAkB,GAAI;AAC1B,WAAO,YAAa,OAAO,SAAS,MAAM,kBAAmB;AAAA,EAC9D;AACA,SAAO;AACR;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,4 @@
1
+ // packages/edit-site/src/utils/is-template-removable.js
1
2
  import { TEMPLATE_ORIGINS } from "./constants";
2
3
  function isTemplateRemovable(template) {
3
4
  if (!template) {
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/utils/is-template-removable.js"],
4
4
  "sourcesContent": ["/**\n * Internal dependencies\n */\nimport { TEMPLATE_ORIGINS } from './constants';\n\n/**\n * Check if a template is removable.\n *\n * @param {Object} template The template entity to check.\n * @return {boolean} Whether the template is removable.\n */\nexport default function isTemplateRemovable( template ) {\n\tif ( ! template ) {\n\t\treturn false;\n\t}\n\n\treturn (\n\t\ttemplate.source === TEMPLATE_ORIGINS.custom &&\n\t\t! Boolean( template.plugin ) &&\n\t\t! template.has_theme_file\n\t);\n}\n"],
5
- "mappings": "AAGA,SAAS,wBAAwB;AAQlB,SAAR,oBAAsC,UAAW;AACvD,MAAK,CAAE,UAAW;AACjB,WAAO;AAAA,EACR;AAEA,SACC,SAAS,WAAW,iBAAiB,UACrC,CAAE,QAAS,SAAS,MAAO,KAC3B,CAAE,SAAS;AAEb;",
5
+ "mappings": ";AAGA,SAAS,wBAAwB;AAQlB,SAAR,oBAAsC,UAAW;AACvD,MAAK,CAAE,UAAW;AACjB,WAAO;AAAA,EACR;AAEA,SACC,SAAS,WAAW,iBAAiB,UACrC,CAAE,QAAS,SAAS,MAAO,KAC3B,CAAE,SAAS;AAEb;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,4 @@
1
+ // packages/edit-site/src/utils/is-template-revertable.js
1
2
  import { TEMPLATE_ORIGINS } from "./constants";
2
3
  function isTemplateRevertable(template) {
3
4
  if (!template) {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/utils/is-template-revertable.js"],
4
- "sourcesContent": ["/**\n * Internal dependencies\n */\nimport { TEMPLATE_ORIGINS } from './constants';\n\n/**\n * Check if a template is revertable to its original theme-provided template file.\n *\n * @param {Object} template The template entity to check.\n * @return {boolean} Whether the template is revertable.\n */\nexport default function isTemplateRevertable( template ) {\n\tif ( ! template ) {\n\t\treturn false;\n\t}\n\t/* eslint-disable camelcase */\n\treturn (\n\t\ttemplate?.source === TEMPLATE_ORIGINS.custom &&\n\t\t( Boolean( template?.plugin ) || template?.has_theme_file )\n\t);\n\t/* eslint-enable camelcase */\n}\n"],
5
- "mappings": "AAGA,SAAS,wBAAwB;AAQlB,SAAR,qBAAuC,UAAW;AACxD,MAAK,CAAE,UAAW;AACjB,WAAO;AAAA,EACR;AAEA,SACC,UAAU,WAAW,iBAAiB,WACpC,QAAS,UAAU,MAAO,KAAK,UAAU;AAG7C;",
4
+ "sourcesContent": ["/**\n * Internal dependencies\n */\nimport { TEMPLATE_ORIGINS } from './constants';\n\n/**\n * Check if a template is revertable to its original theme-provided template file.\n *\n * @param {Object} template The template entity to check.\n * @return {boolean} Whether the template is revertable.\n */\nexport default function isTemplateRevertable( template ) {\n\tif ( ! template ) {\n\t\treturn false;\n\t}\n\n\treturn (\n\t\ttemplate?.source === TEMPLATE_ORIGINS.custom &&\n\t\t( Boolean( template?.plugin ) || template?.has_theme_file )\n\t);\n}\n"],
5
+ "mappings": ";AAGA,SAAS,wBAAwB;AAQlB,SAAR,qBAAuC,UAAW;AACxD,MAAK,CAAE,UAAW;AACjB,WAAO;AAAA,EACR;AAEA,SACC,UAAU,WAAW,iBAAiB,WACpC,QAAS,UAAU,MAAO,KAAK,UAAU;AAE7C;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,4 @@
1
+ // packages/edit-site/src/utils/use-activate-theme.js
1
2
  import { store as coreStore } from "@wordpress/core-data";
2
3
  import { useDispatch } from "@wordpress/data";
3
4
  import { privateApis as routerPrivateApis } from "@wordpress/router";
@@ -7,7 +8,7 @@ import {
7
8
  isPreviewingTheme,
8
9
  currentlyPreviewingTheme
9
10
  } from "./is-previewing-theme";
10
- const { useHistory, useLocation } = unlock(routerPrivateApis);
11
+ var { useHistory, useLocation } = unlock(routerPrivateApis);
11
12
  function useActivateTheme() {
12
13
  const history = useHistory();
13
14
  const { path } = useLocation();
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/utils/use-activate-theme.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useDispatch } from '@wordpress/data';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { addQueryArgs } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../lock-unlock';\nimport {\n\tisPreviewingTheme,\n\tcurrentlyPreviewingTheme,\n} from './is-previewing-theme';\n\nconst { useHistory, useLocation } = unlock( routerPrivateApis );\n\n/**\n * This should be refactored to use the REST API, once the REST API can activate themes.\n *\n * @return {Function} A function that activates the theme.\n */\nexport function useActivateTheme() {\n\tconst history = useHistory();\n\tconst { path } = useLocation();\n\tconst { startResolution, finishResolution } = useDispatch( coreStore );\n\n\treturn async () => {\n\t\tif ( isPreviewingTheme() ) {\n\t\t\tconst activationURL =\n\t\t\t\t'themes.php?action=activate&stylesheet=' +\n\t\t\t\tcurrentlyPreviewingTheme() +\n\t\t\t\t'&_wpnonce=' +\n\t\t\t\twindow.WP_BLOCK_THEME_ACTIVATE_NONCE;\n\t\t\tstartResolution( 'activateTheme' );\n\t\t\tawait window.fetch( activationURL );\n\t\t\tfinishResolution( 'activateTheme' );\n\t\t\t// Remove the wp_theme_preview query param: we've finished activating\n\t\t\t// the queue and are switching to normal Site Editor.\n\t\t\thistory.navigate( addQueryArgs( path, { wp_theme_preview: '' } ) );\n\t\t}\n\t};\n}\n"],
5
- "mappings": "AAGA,SAAS,SAAS,iBAAiB;AACnC,SAAS,mBAAmB;AAC5B,SAAS,eAAe,yBAAyB;AACjD,SAAS,oBAAoB;AAK7B,SAAS,cAAc;AACvB;AAAA,EACC;AAAA,EACA;AAAA,OACM;AAEP,MAAM,EAAE,YAAY,YAAY,IAAI,OAAQ,iBAAkB;AAOvD,SAAS,mBAAmB;AAClC,QAAM,UAAU,WAAW;AAC3B,QAAM,EAAE,KAAK,IAAI,YAAY;AAC7B,QAAM,EAAE,iBAAiB,iBAAiB,IAAI,YAAa,SAAU;AAErE,SAAO,YAAY;AAClB,QAAK,kBAAkB,GAAI;AAC1B,YAAM,gBACL,2CACA,yBAAyB,IACzB,eACA,OAAO;AACR,sBAAiB,eAAgB;AACjC,YAAM,OAAO,MAAO,aAAc;AAClC,uBAAkB,eAAgB;AAGlC,cAAQ,SAAU,aAAc,MAAM,EAAE,kBAAkB,GAAG,CAAE,CAAE;AAAA,IAClE;AAAA,EACD;AACD;",
5
+ "mappings": ";AAGA,SAAS,SAAS,iBAAiB;AACnC,SAAS,mBAAmB;AAC5B,SAAS,eAAe,yBAAyB;AACjD,SAAS,oBAAoB;AAK7B,SAAS,cAAc;AACvB;AAAA,EACC;AAAA,EACA;AAAA,OACM;AAEP,IAAM,EAAE,YAAY,YAAY,IAAI,OAAQ,iBAAkB;AAOvD,SAAS,mBAAmB;AAClC,QAAM,UAAU,WAAW;AAC3B,QAAM,EAAE,KAAK,IAAI,YAAY;AAC7B,QAAM,EAAE,iBAAiB,iBAAiB,IAAI,YAAa,SAAU;AAErE,SAAO,YAAY;AAClB,QAAK,kBAAkB,GAAI;AAC1B,YAAM,gBACL,2CACA,yBAAyB,IACzB,eACA,OAAO;AACR,sBAAiB,eAAgB;AACjC,YAAM,OAAO,MAAO,aAAc;AAClC,uBAAkB,eAAgB;AAGlC,cAAQ,SAAU,aAAc,MAAM,EAAE,kBAAkB,GAAG,CAAE,CAAE;AAAA,IAClE;AAAA,EACD;AACD;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,8 @@
1
+ // packages/edit-site/src/utils/use-actual-current-theme.js
1
2
  import apiFetch from "@wordpress/api-fetch";
2
3
  import { useState, useEffect } from "@wordpress/element";
3
4
  import { addQueryArgs } from "@wordpress/url";
4
- const ACTIVE_THEMES_URL = "/wp/v2/themes?status=active";
5
+ var ACTIVE_THEMES_URL = "/wp/v2/themes?status=active";
5
6
  function useActualCurrentTheme() {
6
7
  const [currentTheme, setCurrentTheme] = useState();
7
8
  useEffect(() => {
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/utils/use-actual-current-theme.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\nimport { useState, useEffect } from '@wordpress/element';\nimport { addQueryArgs } from '@wordpress/url';\n\nconst ACTIVE_THEMES_URL = '/wp/v2/themes?status=active';\n\nexport function useActualCurrentTheme() {\n\tconst [ currentTheme, setCurrentTheme ] = useState();\n\n\tuseEffect( () => {\n\t\t// Set the `wp_theme_preview` to empty string to bypass the createThemePreviewMiddleware.\n\t\tconst path = addQueryArgs( ACTIVE_THEMES_URL, {\n\t\t\tcontext: 'edit',\n\t\t\twp_theme_preview: '',\n\t\t} );\n\n\t\tapiFetch( { path } )\n\t\t\t.then( ( activeThemes ) => setCurrentTheme( activeThemes[ 0 ] ) )\n\t\t\t// Do nothing\n\t\t\t.catch( () => {} );\n\t}, [] );\n\n\treturn currentTheme;\n}\n"],
5
- "mappings": "AAGA,OAAO,cAAc;AACrB,SAAS,UAAU,iBAAiB;AACpC,SAAS,oBAAoB;AAE7B,MAAM,oBAAoB;AAEnB,SAAS,wBAAwB;AACvC,QAAM,CAAE,cAAc,eAAgB,IAAI,SAAS;AAEnD,YAAW,MAAM;AAEhB,UAAM,OAAO,aAAc,mBAAmB;AAAA,MAC7C,SAAS;AAAA,MACT,kBAAkB;AAAA,IACnB,CAAE;AAEF,aAAU,EAAE,KAAK,CAAE,EACjB,KAAM,CAAE,iBAAkB,gBAAiB,aAAc,CAAE,CAAE,CAAE,EAE/D,MAAO,MAAM;AAAA,IAAC,CAAE;AAAA,EACnB,GAAG,CAAC,CAAE;AAEN,SAAO;AACR;",
5
+ "mappings": ";AAGA,OAAO,cAAc;AACrB,SAAS,UAAU,iBAAiB;AACpC,SAAS,oBAAoB;AAE7B,IAAM,oBAAoB;AAEnB,SAAS,wBAAwB;AACvC,QAAM,CAAE,cAAc,eAAgB,IAAI,SAAS;AAEnD,YAAW,MAAM;AAEhB,UAAM,OAAO,aAAc,mBAAmB;AAAA,MAC7C,SAAS;AAAA,MACT,kBAAkB;AAAA,IACnB,CAAE;AAEF,aAAU,EAAE,KAAK,CAAE,EACjB,KAAM,CAAE,iBAAkB,gBAAiB,aAAc,CAAE,CAAE,CAAE,EAE/D,MAAO,MAAM;AAAA,IAAC,CAAE;AAAA,EACnB,GAAG,CAAC,CAAE;AAEN,SAAO;AACR;",
6
6
  "names": []
7
7
  }
@@ -1234,45 +1234,8 @@
1234
1234
  grid-column: span 2;
1235
1235
  }
1236
1236
  }
1237
- .dataviews-field-control__field {
1238
- height: 32px;
1239
- }
1240
-
1241
- .dataviews-field-control__actions {
1242
- position: absolute;
1243
- top: -9999em;
1244
- }
1245
-
1246
- .dataviews-field-control__actions.dataviews-field-control__actions {
1247
- gap: 4px;
1248
- }
1249
-
1250
- .dataviews-field-control__field:hover .dataviews-field-control__actions,
1251
- .dataviews-field-control__field:focus-within .dataviews-field-control__actions,
1252
- .dataviews-field-control__field.is-interacting .dataviews-field-control__actions {
1253
- position: unset;
1254
- top: unset;
1255
- }
1256
-
1257
- .dataviews-field-control__icon {
1258
- display: flex;
1259
- width: 24px;
1260
- }
1261
-
1262
- .dataviews-field-control__label-sub-label-container {
1263
- flex-grow: 1;
1264
- }
1265
-
1266
- .dataviews-field-control__label {
1267
- display: block;
1268
- }
1269
-
1270
- .dataviews-field-control__sub-label {
1271
- margin-top: 8px;
1272
- margin-bottom: 0;
1273
- font-size: 11px;
1274
- font-style: normal;
1275
- color: #757575;
1237
+ .dataviews-view-config__label {
1238
+ text-wrap: nowrap;
1276
1239
  }
1277
1240
 
1278
1241
  .dataviews-view-grid-items {
@@ -1758,7 +1721,6 @@ div.dataviews-view-list {
1758
1721
  .dataviews-view-table td.dataviews-view-table__checkbox-column,
1759
1722
  .dataviews-view-table th.dataviews-view-table__checkbox-column {
1760
1723
  padding-left: 0;
1761
- width: 1%;
1762
1724
  }
1763
1725
 
1764
1726
  .dataviews-view-table td.dataviews-view-table__checkbox-column .dataviews-view-table__cell-content-wrapper,
@@ -1880,6 +1842,7 @@ div.dataviews-view-list {
1880
1842
  min-height: 32px;
1881
1843
  display: flex;
1882
1844
  align-items: center;
1845
+ white-space: nowrap;
1883
1846
  }
1884
1847
 
1885
1848
  .dataviews-view-table tbody .dataviews-view-table__cell-content-wrapper.dataviews-view-table__cell-align-end {
@@ -2003,6 +1966,11 @@ div.dataviews-view-list {
2003
1966
  color: #1e1e1e;
2004
1967
  }
2005
1968
 
1969
+ /* Column width intents via colgroup: make non-primary columns shrink-to-fit */
1970
+ .dataviews-view-table col[class^=dataviews-view-table__col-]:not(.dataviews-view-table__col-primary) {
1971
+ width: 1%;
1972
+ }
1973
+
2006
1974
  .dataviews-view-picker-grid .dataviews-view-picker-grid__card {
2007
1975
  height: 100%;
2008
1976
  justify-content: flex-start;
@@ -2162,6 +2130,35 @@ div.dataviews-view-list {
2162
2130
  padding: 0 48px;
2163
2131
  }
2164
2132
 
2133
+ .dataviews-view-picker-table tbody:focus-visible[aria-activedescendant] {
2134
+ outline: none;
2135
+ }
2136
+
2137
+ .dataviews-view-picker-table tbody:focus-visible [data-active-item=true] {
2138
+ outline: 2px solid var(--wp-admin-theme-color);
2139
+ }
2140
+
2141
+ .dataviews-view-picker-table .dataviews-selection-checkbox .components-checkbox-control__input.components-checkbox-control__input {
2142
+ pointer-events: none;
2143
+ opacity: 1;
2144
+ }
2145
+
2146
+ .dataviews-view-picker-table .dataviews-view-table__row {
2147
+ cursor: pointer;
2148
+ }
2149
+
2150
+ .dataviews-view-picker-table .dataviews-view-table__row.is-selected {
2151
+ background-color: rgba(var(--wp-admin-theme-color--rgb), 0.04);
2152
+ }
2153
+
2154
+ .dataviews-view-picker-table .dataviews-view-table__row.is-hovered {
2155
+ background-color: rgba(var(--wp-admin-theme-color--rgb), 0.08);
2156
+ }
2157
+
2158
+ .dataviews-view-picker-table .dataviews-view-table__row.is-selected.is-hovered {
2159
+ background-color: rgba(var(--wp-admin-theme-color--rgb), 0.12);
2160
+ }
2161
+
2165
2162
  .dataviews-controls__datetime {
2166
2163
  border: none;
2167
2164
  padding: 0;
@@ -2300,6 +2297,10 @@ div.dataviews-view-list {
2300
2297
  gap: 16px;
2301
2298
  }
2302
2299
 
2300
+ .dataforms-layouts-details__content {
2301
+ padding-top: 12px;
2302
+ }
2303
+
2303
2304
  .dataforms-layouts-row__field-control {
2304
2305
  width: 100%;
2305
2306
  }