@wordpress/editor 14.1.0 → 14.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 (772) hide show
  1. package/CHANGELOG.md +16 -12
  2. package/README.md +28 -7
  3. package/build/bindings/pattern-overrides.js +8 -5
  4. package/build/bindings/pattern-overrides.js.map +1 -1
  5. package/build/bindings/post-meta.js +4 -0
  6. package/build/bindings/post-meta.js.map +1 -1
  7. package/build/components/create-template-part-modal/index.js +2 -0
  8. package/build/components/create-template-part-modal/index.js.map +1 -1
  9. package/build/components/document-bar/index.js +11 -4
  10. package/build/components/document-bar/index.js.map +1 -1
  11. package/build/components/editor-interface/index.js +6 -3
  12. package/build/components/editor-interface/index.js.map +1 -1
  13. package/build/components/entities-saved-states/entity-record-item.js +4 -12
  14. package/build/components/entities-saved-states/entity-record-item.js.map +1 -1
  15. package/build/components/entities-saved-states/index.js +1 -1
  16. package/build/components/entities-saved-states/index.js.map +1 -1
  17. package/build/components/global-keyboard-shortcuts/index.js +1 -1
  18. package/build/components/global-keyboard-shortcuts/index.js.map +1 -1
  19. package/build/components/global-styles-provider/index.js +6 -65
  20. package/build/components/global-styles-provider/index.js.map +1 -1
  21. package/build/components/header/index.js +6 -2
  22. package/build/components/header/index.js.map +1 -1
  23. package/build/components/index.js +10 -2
  24. package/build/components/index.js.map +1 -1
  25. package/build/components/inserter-sidebar/index.js +10 -21
  26. package/build/components/inserter-sidebar/index.js.map +1 -1
  27. package/build/components/list-view-sidebar/index.js +19 -47
  28. package/build/components/list-view-sidebar/index.js.map +1 -1
  29. package/build/components/page-attributes/parent.js +2 -1
  30. package/build/components/page-attributes/parent.js.map +1 -1
  31. package/build/components/post-actions/actions.js +371 -452
  32. package/build/components/post-actions/actions.js.map +1 -1
  33. package/build/components/post-actions/index.js +7 -2
  34. package/build/components/post-actions/index.js.map +1 -1
  35. package/build/components/post-excerpt/index.js +2 -1
  36. package/build/components/post-excerpt/index.js.map +1 -1
  37. package/build/components/post-excerpt/panel.js +3 -2
  38. package/build/components/post-excerpt/panel.js.map +1 -1
  39. package/build/components/post-preview-button/index.js +1 -1
  40. package/build/components/post-preview-button/index.js.map +1 -1
  41. package/build/components/post-publish-panel/index.js +1 -1
  42. package/build/components/post-publish-panel/index.js.map +1 -1
  43. package/build/components/post-saved-state/index.js +11 -1
  44. package/build/components/post-saved-state/index.js.map +1 -1
  45. package/build/components/post-schedule/index.js +3 -0
  46. package/build/components/post-schedule/index.js.map +1 -1
  47. package/build/components/post-slug/check.js +8 -1
  48. package/build/components/post-slug/check.js.map +1 -1
  49. package/build/components/post-slug/index.js +6 -0
  50. package/build/components/post-slug/index.js.map +1 -1
  51. package/build/components/post-status/index.js +4 -2
  52. package/build/components/post-status/index.js.map +1 -1
  53. package/build/components/post-sticky/index.js +9 -13
  54. package/build/components/post-sticky/index.js.map +1 -1
  55. package/build/components/post-template/create-new-template-modal.js +2 -0
  56. package/build/components/post-template/create-new-template-modal.js.map +1 -1
  57. package/build/components/post-title/index.js +5 -13
  58. package/build/components/post-title/index.js.map +1 -1
  59. package/build/components/preview-dropdown/index.js +1 -1
  60. package/build/components/preview-dropdown/index.js.map +1 -1
  61. package/build/components/provider/index.native.js +0 -4
  62. package/build/components/provider/index.native.js.map +1 -1
  63. package/build/components/provider/use-block-editor-settings.js +7 -4
  64. package/build/components/provider/use-block-editor-settings.js.map +1 -1
  65. package/build/components/save-publish-panels/index.js +30 -16
  66. package/build/components/save-publish-panels/index.js.map +1 -1
  67. package/build/components/sidebar/index.js +4 -1
  68. package/build/components/sidebar/index.js.map +1 -1
  69. package/build/components/sidebar/post-summary.js +2 -4
  70. package/build/components/sidebar/post-summary.js.map +1 -1
  71. package/build/components/template-content-panel/index.js +29 -4
  72. package/build/components/template-content-panel/index.js.map +1 -1
  73. package/build/components/template-part-content-panel/index.js +70 -0
  74. package/build/components/template-part-content-panel/index.js.map +1 -0
  75. package/build/components/visual-editor/index.js +1 -1
  76. package/build/components/visual-editor/index.js.map +1 -1
  77. package/build/dataviews/actions/delete-post.js +96 -0
  78. package/build/dataviews/actions/delete-post.js.map +1 -0
  79. package/build/{components/post-actions/export-pattern-action.js → dataviews/actions/export-pattern.js} +11 -20
  80. package/build/dataviews/actions/export-pattern.js.map +1 -0
  81. package/build/dataviews/actions/index.js +32 -0
  82. package/build/dataviews/actions/index.js.map +1 -0
  83. package/build/dataviews/actions/reset-post.js +111 -0
  84. package/build/dataviews/actions/reset-post.js.map +1 -0
  85. package/build/dataviews/actions/utils.js +50 -0
  86. package/build/dataviews/actions/utils.js.map +1 -0
  87. package/build/dataviews/store/private-actions.js.map +1 -1
  88. package/build/dataviews/store/private-selectors.js +6 -6
  89. package/build/dataviews/store/private-selectors.js.map +1 -1
  90. package/build/dataviews/store/reducer.js +6 -2
  91. package/build/dataviews/store/reducer.js.map +1 -1
  92. package/build/dataviews/types.js +6 -0
  93. package/build/dataviews/types.js.map +1 -0
  94. package/build/hooks/pattern-overrides.js +3 -3
  95. package/build/hooks/pattern-overrides.js.map +1 -1
  96. package/build/lock-unlock.js +1 -1
  97. package/build/lock-unlock.js.map +1 -1
  98. package/build/private-apis.js +2 -0
  99. package/build/private-apis.js.map +1 -1
  100. package/build/private-apis.native.js +0 -2
  101. package/build/private-apis.native.js.map +1 -1
  102. package/build/store/constants.js.map +1 -1
  103. package/build/store/private-actions.js +9 -5
  104. package/build/store/private-actions.js.map +1 -1
  105. package/build/store/private-selectors.js +0 -18
  106. package/build/store/private-selectors.js.map +1 -1
  107. package/build/store/utils/is-template-revertable.js +6 -8
  108. package/build/store/utils/is-template-revertable.js.map +1 -1
  109. package/build-module/bindings/pattern-overrides.js +8 -5
  110. package/build-module/bindings/pattern-overrides.js.map +1 -1
  111. package/build-module/bindings/post-meta.js +4 -0
  112. package/build-module/bindings/post-meta.js.map +1 -1
  113. package/build-module/components/create-template-part-modal/index.js +2 -0
  114. package/build-module/components/create-template-part-modal/index.js.map +1 -1
  115. package/build-module/components/document-bar/index.js +11 -4
  116. package/build-module/components/document-bar/index.js.map +1 -1
  117. package/build-module/components/editor-interface/index.js +6 -3
  118. package/build-module/components/editor-interface/index.js.map +1 -1
  119. package/build-module/components/entities-saved-states/entity-record-item.js +6 -14
  120. package/build-module/components/entities-saved-states/entity-record-item.js.map +1 -1
  121. package/build-module/components/entities-saved-states/index.js +1 -1
  122. package/build-module/components/entities-saved-states/index.js.map +1 -1
  123. package/build-module/components/global-keyboard-shortcuts/index.js +1 -1
  124. package/build-module/components/global-keyboard-shortcuts/index.js.map +1 -1
  125. package/build-module/components/global-styles-provider/index.js +7 -66
  126. package/build-module/components/global-styles-provider/index.js.map +1 -1
  127. package/build-module/components/header/index.js +6 -2
  128. package/build-module/components/header/index.js.map +1 -1
  129. package/build-module/components/index.js +11 -2
  130. package/build-module/components/index.js.map +1 -1
  131. package/build-module/components/inserter-sidebar/index.js +11 -22
  132. package/build-module/components/inserter-sidebar/index.js.map +1 -1
  133. package/build-module/components/list-view-sidebar/index.js +20 -49
  134. package/build-module/components/list-view-sidebar/index.js.map +1 -1
  135. package/build-module/components/page-attributes/parent.js +2 -1
  136. package/build-module/components/page-attributes/parent.js.map +1 -1
  137. package/build-module/components/post-actions/actions.js +370 -450
  138. package/build-module/components/post-actions/actions.js.map +1 -1
  139. package/build-module/components/post-actions/index.js +7 -2
  140. package/build-module/components/post-actions/index.js.map +1 -1
  141. package/build-module/components/post-excerpt/index.js +2 -1
  142. package/build-module/components/post-excerpt/index.js.map +1 -1
  143. package/build-module/components/post-excerpt/panel.js +3 -2
  144. package/build-module/components/post-excerpt/panel.js.map +1 -1
  145. package/build-module/components/post-preview-button/index.js +1 -1
  146. package/build-module/components/post-preview-button/index.js.map +1 -1
  147. package/build-module/components/post-publish-panel/index.js +1 -1
  148. package/build-module/components/post-publish-panel/index.js.map +1 -1
  149. package/build-module/components/post-saved-state/index.js +11 -1
  150. package/build-module/components/post-saved-state/index.js.map +1 -1
  151. package/build-module/components/post-schedule/index.js +3 -0
  152. package/build-module/components/post-schedule/index.js.map +1 -1
  153. package/build-module/components/post-slug/check.js +9 -0
  154. package/build-module/components/post-slug/check.js.map +1 -1
  155. package/build-module/components/post-slug/index.js +6 -0
  156. package/build-module/components/post-slug/index.js.map +1 -1
  157. package/build-module/components/post-status/index.js +3 -2
  158. package/build-module/components/post-status/index.js.map +1 -1
  159. package/build-module/components/post-sticky/index.js +10 -14
  160. package/build-module/components/post-sticky/index.js.map +1 -1
  161. package/build-module/components/post-template/create-new-template-modal.js +2 -0
  162. package/build-module/components/post-template/create-new-template-modal.js.map +1 -1
  163. package/build-module/components/post-title/index.js +5 -13
  164. package/build-module/components/post-title/index.js.map +1 -1
  165. package/build-module/components/preview-dropdown/index.js +1 -1
  166. package/build-module/components/preview-dropdown/index.js.map +1 -1
  167. package/build-module/components/provider/index.native.js +0 -4
  168. package/build-module/components/provider/index.native.js.map +1 -1
  169. package/build-module/components/provider/use-block-editor-settings.js +7 -4
  170. package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
  171. package/build-module/components/save-publish-panels/index.js +30 -16
  172. package/build-module/components/save-publish-panels/index.js.map +1 -1
  173. package/build-module/components/sidebar/index.js +4 -1
  174. package/build-module/components/sidebar/index.js.map +1 -1
  175. package/build-module/components/sidebar/post-summary.js +2 -4
  176. package/build-module/components/sidebar/post-summary.js.map +1 -1
  177. package/build-module/components/template-content-panel/index.js +30 -5
  178. package/build-module/components/template-content-panel/index.js.map +1 -1
  179. package/build-module/components/template-part-content-panel/index.js +63 -0
  180. package/build-module/components/template-part-content-panel/index.js.map +1 -0
  181. package/build-module/components/visual-editor/index.js +1 -1
  182. package/build-module/components/visual-editor/index.js.map +1 -1
  183. package/build-module/dataviews/actions/delete-post.js +87 -0
  184. package/build-module/dataviews/actions/delete-post.js.map +1 -0
  185. package/build-module/{components/post-actions/export-pattern-action.js → dataviews/actions/export-pattern.js} +10 -19
  186. package/build-module/dataviews/actions/export-pattern.js.map +1 -0
  187. package/build-module/dataviews/actions/index.js +24 -0
  188. package/build-module/dataviews/actions/index.js.map +1 -0
  189. package/build-module/dataviews/actions/reset-post.js +104 -0
  190. package/build-module/dataviews/actions/reset-post.js.map +1 -0
  191. package/build-module/dataviews/actions/utils.js +41 -0
  192. package/build-module/dataviews/actions/utils.js.map +1 -0
  193. package/build-module/dataviews/store/private-actions.js.map +1 -1
  194. package/build-module/dataviews/store/private-selectors.js +5 -5
  195. package/build-module/dataviews/store/private-selectors.js.map +1 -1
  196. package/build-module/dataviews/store/reducer.js +6 -2
  197. package/build-module/dataviews/store/reducer.js.map +1 -1
  198. package/build-module/dataviews/types.js +2 -0
  199. package/build-module/dataviews/types.js.map +1 -0
  200. package/build-module/hooks/pattern-overrides.js +4 -2
  201. package/build-module/hooks/pattern-overrides.js.map +1 -1
  202. package/build-module/lock-unlock.js +1 -1
  203. package/build-module/lock-unlock.js.map +1 -1
  204. package/build-module/private-apis.js +2 -0
  205. package/build-module/private-apis.js.map +1 -1
  206. package/build-module/private-apis.native.js +0 -2
  207. package/build-module/private-apis.native.js.map +1 -1
  208. package/build-module/store/constants.js.map +1 -1
  209. package/build-module/store/private-actions.js +9 -5
  210. package/build-module/store/private-actions.js.map +1 -1
  211. package/build-module/store/private-selectors.js +0 -17
  212. package/build-module/store/private-selectors.js.map +1 -1
  213. package/build-module/store/utils/is-template-revertable.js +6 -8
  214. package/build-module/store/utils/is-template-revertable.js.map +1 -1
  215. package/build-style/style-rtl.css +26 -76
  216. package/build-style/style.css +26 -76
  217. package/build-types/bindings/index.d.ts +2 -0
  218. package/build-types/bindings/index.d.ts.map +1 -0
  219. package/build-types/bindings/pattern-overrides.d.ts +18 -0
  220. package/build-types/bindings/pattern-overrides.d.ts.map +1 -0
  221. package/build-types/bindings/post-meta.d.ts +25 -0
  222. package/build-types/bindings/post-meta.d.ts.map +1 -0
  223. package/build-types/components/autocompleters/index.d.ts +2 -0
  224. package/build-types/components/autocompleters/index.d.ts.map +1 -0
  225. package/build-types/components/autocompleters/user.d.ts +6 -0
  226. package/build-types/components/autocompleters/user.d.ts.map +1 -0
  227. package/build-types/components/autosave-monitor/index.d.ts +15 -0
  228. package/build-types/components/autosave-monitor/index.d.ts.map +1 -0
  229. package/build-types/components/block-manager/category.d.ts +6 -0
  230. package/build-types/components/block-manager/category.d.ts.map +1 -0
  231. package/build-types/components/block-manager/checklist.d.ts +7 -0
  232. package/build-types/components/block-manager/checklist.d.ts.map +1 -0
  233. package/build-types/components/block-manager/index.d.ts +3 -0
  234. package/build-types/components/block-manager/index.d.ts.map +1 -0
  235. package/build-types/components/block-removal-warnings/index.d.ts +2 -0
  236. package/build-types/components/block-removal-warnings/index.d.ts.map +1 -0
  237. package/build-types/components/block-settings-menu/content-only-settings-menu.d.ts +2 -0
  238. package/build-types/components/block-settings-menu/content-only-settings-menu.d.ts.map +1 -0
  239. package/build-types/components/block-settings-menu/plugin-block-settings-menu-item.d.ts +65 -0
  240. package/build-types/components/block-settings-menu/plugin-block-settings-menu-item.d.ts.map +1 -0
  241. package/build-types/components/blog-title/index.d.ts +2 -0
  242. package/build-types/components/blog-title/index.d.ts.map +1 -0
  243. package/build-types/components/character-count/index.d.ts +7 -0
  244. package/build-types/components/character-count/index.d.ts.map +1 -0
  245. package/build-types/components/collapsible-block-toolbar/index.d.ts +6 -0
  246. package/build-types/components/collapsible-block-toolbar/index.d.ts.map +1 -0
  247. package/build-types/components/commands/index.d.ts +2 -0
  248. package/build-types/components/commands/index.d.ts.map +1 -0
  249. package/build-types/components/create-template-part-modal/index.d.ts +14 -0
  250. package/build-types/components/create-template-part-modal/index.d.ts.map +1 -0
  251. package/build-types/components/create-template-part-modal/utils.d.ts +4 -0
  252. package/build-types/components/create-template-part-modal/utils.d.ts.map +1 -0
  253. package/build-types/components/deprecated.d.ts +182 -0
  254. package/build-types/components/deprecated.d.ts.map +1 -0
  255. package/build-types/components/document-bar/index.d.ts +22 -0
  256. package/build-types/components/document-bar/index.d.ts.map +1 -0
  257. package/build-types/components/document-outline/check.d.ts +12 -0
  258. package/build-types/components/document-outline/check.d.ts.map +1 -0
  259. package/build-types/components/document-outline/index.d.ts +16 -0
  260. package/build-types/components/document-outline/index.d.ts.map +1 -0
  261. package/build-types/components/document-outline/item.d.ts +9 -0
  262. package/build-types/components/document-outline/item.d.ts.map +1 -0
  263. package/build-types/components/document-tools/index.d.ts +6 -0
  264. package/build-types/components/document-tools/index.d.ts.map +1 -0
  265. package/build-types/components/editor/index.d.ts +14 -0
  266. package/build-types/components/editor/index.d.ts.map +1 -0
  267. package/build-types/components/editor-history/redo.d.ts +4 -0
  268. package/build-types/components/editor-history/redo.d.ts.map +1 -0
  269. package/build-types/components/editor-history/undo.d.ts +4 -0
  270. package/build-types/components/editor-history/undo.d.ts.map +1 -0
  271. package/build-types/components/editor-interface/content-slot-fill.d.ts +3 -0
  272. package/build-types/components/editor-interface/content-slot-fill.d.ts.map +1 -0
  273. package/build-types/components/editor-interface/index.d.ts +17 -0
  274. package/build-types/components/editor-interface/index.d.ts.map +1 -0
  275. package/build-types/components/editor-notices/index.d.ts +13 -0
  276. package/build-types/components/editor-notices/index.d.ts.map +1 -0
  277. package/build-types/components/editor-snackbars/index.d.ts +7 -0
  278. package/build-types/components/editor-snackbars/index.d.ts.map +1 -0
  279. package/build-types/components/entities-saved-states/entity-record-item.d.ts +6 -0
  280. package/build-types/components/entities-saved-states/entity-record-item.d.ts.map +1 -0
  281. package/build-types/components/entities-saved-states/entity-type-list.d.ts +6 -0
  282. package/build-types/components/entities-saved-states/entity-type-list.d.ts.map +1 -0
  283. package/build-types/components/entities-saved-states/hooks/use-is-dirty.d.ts +2 -0
  284. package/build-types/components/entities-saved-states/hooks/use-is-dirty.d.ts.map +1 -0
  285. package/build-types/components/entities-saved-states/index.d.ts +43 -0
  286. package/build-types/components/entities-saved-states/index.d.ts.map +1 -0
  287. package/build-types/components/error-boundary/index.d.ts +14 -0
  288. package/build-types/components/error-boundary/index.d.ts.map +1 -0
  289. package/build-types/components/global-keyboard-shortcuts/index.d.ts +9 -0
  290. package/build-types/components/global-keyboard-shortcuts/index.d.ts.map +1 -0
  291. package/build-types/components/global-keyboard-shortcuts/register-shortcuts.d.ts +8 -0
  292. package/build-types/components/global-keyboard-shortcuts/register-shortcuts.d.ts.map +1 -0
  293. package/build-types/components/global-styles-provider/index.d.ts +20 -0
  294. package/build-types/components/global-styles-provider/index.d.ts.map +1 -0
  295. package/build-types/components/header/back-button.d.ts +6 -0
  296. package/build-types/components/header/back-button.d.ts.map +1 -0
  297. package/build-types/components/header/index.d.ts +10 -0
  298. package/build-types/components/header/index.d.ts.map +1 -0
  299. package/build-types/components/index.d.ts +108 -0
  300. package/build-types/components/index.d.ts.map +1 -0
  301. package/build-types/components/inserter-sidebar/index.d.ts +2 -0
  302. package/build-types/components/inserter-sidebar/index.d.ts.map +1 -0
  303. package/build-types/components/keyboard-shortcut-help-modal/config.d.ts +26 -0
  304. package/build-types/components/keyboard-shortcut-help-modal/config.d.ts.map +1 -0
  305. package/build-types/components/keyboard-shortcut-help-modal/dynamic-shortcut.d.ts +5 -0
  306. package/build-types/components/keyboard-shortcut-help-modal/dynamic-shortcut.d.ts.map +1 -0
  307. package/build-types/components/keyboard-shortcut-help-modal/index.d.ts +3 -0
  308. package/build-types/components/keyboard-shortcut-help-modal/index.d.ts.map +1 -0
  309. package/build-types/components/keyboard-shortcut-help-modal/shortcut.d.ts +8 -0
  310. package/build-types/components/keyboard-shortcut-help-modal/shortcut.d.ts.map +1 -0
  311. package/build-types/components/list-view-sidebar/index.d.ts +2 -0
  312. package/build-types/components/list-view-sidebar/index.d.ts.map +1 -0
  313. package/build-types/components/list-view-sidebar/list-view-outline.d.ts +2 -0
  314. package/build-types/components/list-view-sidebar/list-view-outline.d.ts.map +1 -0
  315. package/build-types/components/local-autosave-monitor/index.d.ts +3 -0
  316. package/build-types/components/local-autosave-monitor/index.d.ts.map +1 -0
  317. package/build-types/components/media-categories/index.d.ts +7 -0
  318. package/build-types/components/media-categories/index.d.ts.map +1 -0
  319. package/build-types/components/mode-switcher/index.d.ts +3 -0
  320. package/build-types/components/mode-switcher/index.d.ts.map +1 -0
  321. package/build-types/components/more-menu/copy-content-menu-item.d.ts +2 -0
  322. package/build-types/components/more-menu/copy-content-menu-item.d.ts.map +1 -0
  323. package/build-types/components/more-menu/index.d.ts +2 -0
  324. package/build-types/components/more-menu/index.d.ts.map +1 -0
  325. package/build-types/components/more-menu/tools-more-menu-group.d.ts +6 -0
  326. package/build-types/components/more-menu/tools-more-menu-group.d.ts.map +1 -0
  327. package/build-types/components/more-menu/view-more-menu-group.d.ts +6 -0
  328. package/build-types/components/more-menu/view-more-menu-group.d.ts.map +1 -0
  329. package/build-types/components/page-attributes/check.d.ts +13 -0
  330. package/build-types/components/page-attributes/check.d.ts.map +1 -0
  331. package/build-types/components/page-attributes/order.d.ts +9 -0
  332. package/build-types/components/page-attributes/order.d.ts.map +1 -0
  333. package/build-types/components/page-attributes/panel.d.ts +7 -0
  334. package/build-types/components/page-attributes/panel.d.ts.map +1 -0
  335. package/build-types/components/page-attributes/parent.d.ts +11 -0
  336. package/build-types/components/page-attributes/parent.d.ts.map +1 -0
  337. package/build-types/components/pattern-duplicate-modal/index.d.ts +3 -0
  338. package/build-types/components/pattern-duplicate-modal/index.d.ts.map +1 -0
  339. package/build-types/components/pattern-overrides-panel/index.d.ts +2 -0
  340. package/build-types/components/pattern-overrides-panel/index.d.ts.map +1 -0
  341. package/build-types/components/pattern-rename-modal/index.d.ts +3 -0
  342. package/build-types/components/pattern-rename-modal/index.d.ts.map +1 -0
  343. package/build-types/components/plugin-document-setting-panel/index.d.ts +69 -0
  344. package/build-types/components/plugin-document-setting-panel/index.d.ts.map +1 -0
  345. package/build-types/components/plugin-more-menu-item/index.d.ts +3 -0
  346. package/build-types/components/plugin-more-menu-item/index.d.ts.map +1 -0
  347. package/build-types/components/plugin-post-publish-panel/index.d.ts +47 -0
  348. package/build-types/components/plugin-post-publish-panel/index.d.ts.map +1 -0
  349. package/build-types/components/plugin-post-status-info/index.d.ts +57 -0
  350. package/build-types/components/plugin-post-status-info/index.d.ts.map +1 -0
  351. package/build-types/components/plugin-pre-publish-panel/index.d.ts +50 -0
  352. package/build-types/components/plugin-pre-publish-panel/index.d.ts.map +1 -0
  353. package/build-types/components/plugin-sidebar/index.d.ts +73 -0
  354. package/build-types/components/plugin-sidebar/index.d.ts.map +1 -0
  355. package/build-types/components/plugin-sidebar-more-menu-item/index.d.ts +52 -0
  356. package/build-types/components/plugin-sidebar-more-menu-item/index.d.ts.map +1 -0
  357. package/build-types/components/post-actions/actions.d.ts +31 -0
  358. package/build-types/components/post-actions/actions.d.ts.map +1 -0
  359. package/build-types/components/post-actions/index.d.ts +5 -0
  360. package/build-types/components/post-actions/index.d.ts.map +1 -0
  361. package/build-types/components/post-author/check.d.ts +13 -0
  362. package/build-types/components/post-author/check.d.ts.map +1 -0
  363. package/build-types/components/post-author/combobox.d.ts +2 -0
  364. package/build-types/components/post-author/combobox.d.ts.map +1 -0
  365. package/build-types/components/post-author/constants.d.ts +9 -0
  366. package/build-types/components/post-author/constants.d.ts.map +1 -0
  367. package/build-types/components/post-author/hook.d.ts +6 -0
  368. package/build-types/components/post-author/hook.d.ts.map +1 -0
  369. package/build-types/components/post-author/index.d.ts +8 -0
  370. package/build-types/components/post-author/index.d.ts.map +1 -0
  371. package/build-types/components/post-author/panel.d.ts +8 -0
  372. package/build-types/components/post-author/panel.d.ts.map +1 -0
  373. package/build-types/components/post-author/select.d.ts +2 -0
  374. package/build-types/components/post-author/select.d.ts.map +1 -0
  375. package/build-types/components/post-card-panel/index.d.ts +4 -0
  376. package/build-types/components/post-card-panel/index.d.ts.map +1 -0
  377. package/build-types/components/post-comments/index.d.ts +3 -0
  378. package/build-types/components/post-comments/index.d.ts.map +1 -0
  379. package/build-types/components/post-content-information/index.d.ts +2 -0
  380. package/build-types/components/post-content-information/index.d.ts.map +1 -0
  381. package/build-types/components/post-discussion/panel.d.ts +10 -0
  382. package/build-types/components/post-discussion/panel.d.ts.map +1 -0
  383. package/build-types/components/post-excerpt/check.d.ts +13 -0
  384. package/build-types/components/post-excerpt/check.d.ts.map +1 -0
  385. package/build-types/components/post-excerpt/index.d.ts +15 -0
  386. package/build-types/components/post-excerpt/index.d.ts.map +1 -0
  387. package/build-types/components/post-excerpt/panel.d.ts +8 -0
  388. package/build-types/components/post-excerpt/panel.d.ts.map +1 -0
  389. package/build-types/components/post-excerpt/plugin.d.ts +53 -0
  390. package/build-types/components/post-excerpt/plugin.d.ts.map +1 -0
  391. package/build-types/components/post-featured-image/check.d.ts +14 -0
  392. package/build-types/components/post-featured-image/check.d.ts.map +1 -0
  393. package/build-types/components/post-featured-image/index.d.ts +3 -0
  394. package/build-types/components/post-featured-image/index.d.ts.map +1 -0
  395. package/build-types/components/post-featured-image/panel.d.ts +13 -0
  396. package/build-types/components/post-featured-image/panel.d.ts.map +1 -0
  397. package/build-types/components/post-format/check.d.ts +5 -0
  398. package/build-types/components/post-format/check.d.ts.map +1 -0
  399. package/build-types/components/post-format/index.d.ts +16 -0
  400. package/build-types/components/post-format/index.d.ts.map +1 -0
  401. package/build-types/components/post-format/panel.d.ts +8 -0
  402. package/build-types/components/post-format/panel.d.ts.map +1 -0
  403. package/build-types/components/post-last-edited-panel/index.d.ts +2 -0
  404. package/build-types/components/post-last-edited-panel/index.d.ts.map +1 -0
  405. package/build-types/components/post-last-revision/check.d.ts +13 -0
  406. package/build-types/components/post-last-revision/check.d.ts.map +1 -0
  407. package/build-types/components/post-last-revision/index.d.ts +9 -0
  408. package/build-types/components/post-last-revision/index.d.ts.map +1 -0
  409. package/build-types/components/post-last-revision/panel.d.ts +8 -0
  410. package/build-types/components/post-last-revision/panel.d.ts.map +1 -0
  411. package/build-types/components/post-locked-modal/index.d.ts +8 -0
  412. package/build-types/components/post-locked-modal/index.d.ts.map +1 -0
  413. package/build-types/components/post-panel-row/index.d.ts +3 -0
  414. package/build-types/components/post-panel-row/index.d.ts.map +1 -0
  415. package/build-types/components/post-panel-section/index.d.ts +6 -0
  416. package/build-types/components/post-panel-section/index.d.ts.map +1 -0
  417. package/build-types/components/post-pending-status/check.d.ts +15 -0
  418. package/build-types/components/post-pending-status/check.d.ts.map +1 -0
  419. package/build-types/components/post-pending-status/index.d.ts +8 -0
  420. package/build-types/components/post-pending-status/index.d.ts.map +1 -0
  421. package/build-types/components/post-pingbacks/index.d.ts +3 -0
  422. package/build-types/components/post-pingbacks/index.d.ts.map +1 -0
  423. package/build-types/components/post-preview-button/index.d.ts +23 -0
  424. package/build-types/components/post-preview-button/index.d.ts.map +1 -0
  425. package/build-types/components/post-publish-button/index.d.ts +17 -0
  426. package/build-types/components/post-publish-button/index.d.ts.map +1 -0
  427. package/build-types/components/post-publish-button/label.d.ts +7 -0
  428. package/build-types/components/post-publish-button/label.d.ts.map +1 -0
  429. package/build-types/components/post-publish-button/post-publish-button-or-toggle.d.ts +17 -0
  430. package/build-types/components/post-publish-button/post-publish-button-or-toggle.d.ts.map +1 -0
  431. package/build-types/components/post-publish-panel/index.d.ts +10 -0
  432. package/build-types/components/post-publish-panel/index.d.ts.map +1 -0
  433. package/build-types/components/post-publish-panel/maybe-category-panel.d.ts +3 -0
  434. package/build-types/components/post-publish-panel/maybe-category-panel.d.ts.map +1 -0
  435. package/build-types/components/post-publish-panel/maybe-post-format-panel.d.ts +2 -0
  436. package/build-types/components/post-publish-panel/maybe-post-format-panel.d.ts.map +1 -0
  437. package/build-types/components/post-publish-panel/maybe-tags-panel.d.ts +3 -0
  438. package/build-types/components/post-publish-panel/maybe-tags-panel.d.ts.map +1 -0
  439. package/build-types/components/post-publish-panel/maybe-upload-media.d.ts +2 -0
  440. package/build-types/components/post-publish-panel/maybe-upload-media.d.ts.map +1 -0
  441. package/build-types/components/post-publish-panel/postpublish.d.ts +3 -0
  442. package/build-types/components/post-publish-panel/postpublish.d.ts.map +1 -0
  443. package/build-types/components/post-publish-panel/prepublish.d.ts +5 -0
  444. package/build-types/components/post-publish-panel/prepublish.d.ts.map +1 -0
  445. package/build-types/components/post-saved-state/index.d.ts +13 -0
  446. package/build-types/components/post-saved-state/index.d.ts.map +1 -0
  447. package/build-types/components/post-schedule/check.d.ts +12 -0
  448. package/build-types/components/post-schedule/check.d.ts.map +1 -0
  449. package/build-types/components/post-schedule/index.d.ts +17 -0
  450. package/build-types/components/post-schedule/index.d.ts.map +1 -0
  451. package/build-types/components/post-schedule/label.d.ts +25 -0
  452. package/build-types/components/post-schedule/label.d.ts.map +1 -0
  453. package/build-types/components/post-schedule/panel.d.ts +7 -0
  454. package/build-types/components/post-schedule/panel.d.ts.map +1 -0
  455. package/build-types/components/post-slug/check.d.ts +12 -0
  456. package/build-types/components/post-slug/check.d.ts.map +1 -0
  457. package/build-types/components/post-slug/index.d.ts +7 -0
  458. package/build-types/components/post-slug/index.d.ts.map +1 -0
  459. package/build-types/components/post-slug/panel.d.ts +3 -0
  460. package/build-types/components/post-slug/panel.d.ts.map +1 -0
  461. package/build-types/components/post-status/index.d.ts +6 -0
  462. package/build-types/components/post-status/index.d.ts.map +1 -0
  463. package/build-types/components/post-sticky/check.d.ts +12 -0
  464. package/build-types/components/post-sticky/check.d.ts.map +1 -0
  465. package/build-types/components/post-sticky/index.d.ts +7 -0
  466. package/build-types/components/post-sticky/index.d.ts.map +1 -0
  467. package/build-types/components/post-sticky/panel.d.ts +3 -0
  468. package/build-types/components/post-sticky/panel.d.ts.map +1 -0
  469. package/build-types/components/post-switch-to-draft-button/index.d.ts +7 -0
  470. package/build-types/components/post-switch-to-draft-button/index.d.ts.map +1 -0
  471. package/build-types/components/post-sync-status/index.d.ts +7 -0
  472. package/build-types/components/post-sync-status/index.d.ts.map +1 -0
  473. package/build-types/components/post-taxonomies/check.d.ts +12 -0
  474. package/build-types/components/post-taxonomies/check.d.ts.map +1 -0
  475. package/build-types/components/post-taxonomies/flat-term-selector.d.ts +64 -0
  476. package/build-types/components/post-taxonomies/flat-term-selector.d.ts.map +1 -0
  477. package/build-types/components/post-taxonomies/hierarchical-term-selector.d.ts +102 -0
  478. package/build-types/components/post-taxonomies/hierarchical-term-selector.d.ts.map +1 -0
  479. package/build-types/components/post-taxonomies/index.d.ts +5 -0
  480. package/build-types/components/post-taxonomies/index.d.ts.map +1 -0
  481. package/build-types/components/post-taxonomies/most-used-terms.d.ts +5 -0
  482. package/build-types/components/post-taxonomies/most-used-terms.d.ts.map +1 -0
  483. package/build-types/components/post-taxonomies/panel.d.ts +3 -0
  484. package/build-types/components/post-taxonomies/panel.d.ts.map +1 -0
  485. package/build-types/components/post-template/block-theme.d.ts +4 -0
  486. package/build-types/components/post-template/block-theme.d.ts.map +1 -0
  487. package/build-types/components/post-template/classic-theme.d.ts +3 -0
  488. package/build-types/components/post-template/classic-theme.d.ts.map +1 -0
  489. package/build-types/components/post-template/create-new-template-modal.d.ts +4 -0
  490. package/build-types/components/post-template/create-new-template-modal.d.ts.map +1 -0
  491. package/build-types/components/post-template/create-new-template.d.ts +4 -0
  492. package/build-types/components/post-template/create-new-template.d.ts.map +1 -0
  493. package/build-types/components/post-template/hooks.d.ts +8 -0
  494. package/build-types/components/post-template/hooks.d.ts.map +1 -0
  495. package/build-types/components/post-template/panel.d.ts +7 -0
  496. package/build-types/components/post-template/panel.d.ts.map +1 -0
  497. package/build-types/components/post-template/reset-default-template.d.ts +4 -0
  498. package/build-types/components/post-template/reset-default-template.d.ts.map +1 -0
  499. package/build-types/components/post-template/swap-template-button.d.ts +4 -0
  500. package/build-types/components/post-template/swap-template-button.d.ts.map +1 -0
  501. package/build-types/components/post-text-editor/index.d.ts +7 -0
  502. package/build-types/components/post-text-editor/index.d.ts.map +1 -0
  503. package/build-types/components/post-title/constants.d.ts +3 -0
  504. package/build-types/components/post-title/constants.d.ts.map +1 -0
  505. package/build-types/components/post-title/index.d.ts +3 -0
  506. package/build-types/components/post-title/index.d.ts.map +1 -0
  507. package/build-types/components/post-title/post-title-raw.d.ts +3 -0
  508. package/build-types/components/post-title/post-title-raw.d.ts.map +1 -0
  509. package/build-types/components/post-title/use-post-title-focus.d.ts +9 -0
  510. package/build-types/components/post-title/use-post-title-focus.d.ts.map +1 -0
  511. package/build-types/components/post-title/use-post-title.d.ts +7 -0
  512. package/build-types/components/post-title/use-post-title.d.ts.map +1 -0
  513. package/build-types/components/post-transform-panel/hooks.d.ts +2 -0
  514. package/build-types/components/post-transform-panel/hooks.d.ts.map +1 -0
  515. package/build-types/components/post-transform-panel/index.d.ts +2 -0
  516. package/build-types/components/post-transform-panel/index.d.ts.map +1 -0
  517. package/build-types/components/post-trash/check.d.ts +12 -0
  518. package/build-types/components/post-trash/check.d.ts.map +1 -0
  519. package/build-types/components/post-trash/index.d.ts +7 -0
  520. package/build-types/components/post-trash/index.d.ts.map +1 -0
  521. package/build-types/components/post-type-support-check/index.d.ts +18 -0
  522. package/build-types/components/post-type-support-check/index.d.ts.map +1 -0
  523. package/build-types/components/post-url/check.d.ts +12 -0
  524. package/build-types/components/post-url/check.d.ts.map +1 -0
  525. package/build-types/components/post-url/index.d.ts +14 -0
  526. package/build-types/components/post-url/index.d.ts.map +1 -0
  527. package/build-types/components/post-url/label.d.ts +13 -0
  528. package/build-types/components/post-url/label.d.ts.map +1 -0
  529. package/build-types/components/post-url/panel.d.ts +7 -0
  530. package/build-types/components/post-url/panel.d.ts.map +1 -0
  531. package/build-types/components/post-view-link/index.d.ts +2 -0
  532. package/build-types/components/post-view-link/index.d.ts.map +1 -0
  533. package/build-types/components/post-visibility/check.d.ts +13 -0
  534. package/build-types/components/post-visibility/check.d.ts.map +1 -0
  535. package/build-types/components/post-visibility/index.d.ts +11 -0
  536. package/build-types/components/post-visibility/index.d.ts.map +1 -0
  537. package/build-types/components/post-visibility/label.d.ts +13 -0
  538. package/build-types/components/post-visibility/label.d.ts.map +1 -0
  539. package/build-types/components/post-visibility/utils.d.ts +21 -0
  540. package/build-types/components/post-visibility/utils.d.ts.map +1 -0
  541. package/build-types/components/posts-per-page/index.d.ts +2 -0
  542. package/build-types/components/posts-per-page/index.d.ts.map +1 -0
  543. package/build-types/components/preferences-modal/enable-panel.d.ts +3 -0
  544. package/build-types/components/preferences-modal/enable-panel.d.ts.map +1 -0
  545. package/build-types/components/preferences-modal/enable-plugin-document-setting-panel.d.ts +14 -0
  546. package/build-types/components/preferences-modal/enable-plugin-document-setting-panel.d.ts.map +1 -0
  547. package/build-types/components/preferences-modal/enable-publish-sidebar.d.ts +3 -0
  548. package/build-types/components/preferences-modal/enable-publish-sidebar.d.ts.map +1 -0
  549. package/build-types/components/preferences-modal/index.d.ts +4 -0
  550. package/build-types/components/preferences-modal/index.d.ts.map +1 -0
  551. package/build-types/components/preview-dropdown/index.d.ts +5 -0
  552. package/build-types/components/preview-dropdown/index.d.ts.map +1 -0
  553. package/build-types/components/provider/disable-non-page-content-blocks.d.ts +6 -0
  554. package/build-types/components/provider/disable-non-page-content-blocks.d.ts.map +1 -0
  555. package/build-types/components/provider/index.d.ts +65 -0
  556. package/build-types/components/provider/index.d.ts.map +1 -0
  557. package/build-types/components/provider/navigation-block-editing-mode.d.ts +9 -0
  558. package/build-types/components/provider/navigation-block-editing-mode.d.ts.map +1 -0
  559. package/build-types/components/provider/use-auto-switch-editor-sidebars.d.ts +7 -0
  560. package/build-types/components/provider/use-auto-switch-editor-sidebars.d.ts.map +1 -0
  561. package/build-types/components/provider/use-block-editor-settings.d.ts +13 -0
  562. package/build-types/components/provider/use-block-editor-settings.d.ts.map +1 -0
  563. package/build-types/components/provider/use-hide-blocks-from-inserter.d.ts +9 -0
  564. package/build-types/components/provider/use-hide-blocks-from-inserter.d.ts.map +1 -0
  565. package/build-types/components/provider/with-registry-provider.d.ts +3 -0
  566. package/build-types/components/provider/with-registry-provider.d.ts.map +1 -0
  567. package/build-types/components/resizable-editor/index.d.ts +8 -0
  568. package/build-types/components/resizable-editor/index.d.ts.map +1 -0
  569. package/build-types/components/resizable-editor/resize-handle.d.ts +5 -0
  570. package/build-types/components/resizable-editor/resize-handle.d.ts.map +1 -0
  571. package/build-types/components/save-publish-panels/index.d.ts +11 -0
  572. package/build-types/components/save-publish-panels/index.d.ts.map +1 -0
  573. package/build-types/components/sidebar/constants.d.ts +5 -0
  574. package/build-types/components/sidebar/constants.d.ts.map +1 -0
  575. package/build-types/components/sidebar/header.d.ts +3 -0
  576. package/build-types/components/sidebar/header.d.ts.map +1 -0
  577. package/build-types/components/sidebar/index.d.ts +6 -0
  578. package/build-types/components/sidebar/index.d.ts.map +1 -0
  579. package/build-types/components/sidebar/post-summary.d.ts +4 -0
  580. package/build-types/components/sidebar/post-summary.d.ts.map +1 -0
  581. package/build-types/components/site-discussion/index.d.ts +2 -0
  582. package/build-types/components/site-discussion/index.d.ts.map +1 -0
  583. package/build-types/components/start-page-options/index.d.ts +2 -0
  584. package/build-types/components/start-page-options/index.d.ts.map +1 -0
  585. package/build-types/components/start-template-options/index.d.ts +2 -0
  586. package/build-types/components/start-template-options/index.d.ts.map +1 -0
  587. package/build-types/components/table-of-contents/index.d.ts +7 -0
  588. package/build-types/components/table-of-contents/index.d.ts.map +1 -0
  589. package/build-types/components/table-of-contents/panel.d.ts +6 -0
  590. package/build-types/components/table-of-contents/panel.d.ts.map +1 -0
  591. package/build-types/components/template-content-panel/index.d.ts +4 -0
  592. package/build-types/components/template-content-panel/index.d.ts.map +1 -0
  593. package/build-types/components/template-part-content-panel/index.d.ts +2 -0
  594. package/build-types/components/template-part-content-panel/index.d.ts.map +1 -0
  595. package/build-types/components/template-part-menu-items/convert-to-regular.d.ts +5 -0
  596. package/build-types/components/template-part-menu-items/convert-to-regular.d.ts.map +1 -0
  597. package/build-types/components/template-part-menu-items/convert-to-template-part.d.ts +5 -0
  598. package/build-types/components/template-part-menu-items/convert-to-template-part.d.ts.map +1 -0
  599. package/build-types/components/template-part-menu-items/index.d.ts +2 -0
  600. package/build-types/components/template-part-menu-items/index.d.ts.map +1 -0
  601. package/build-types/components/template-validation-notice/index.d.ts +2 -0
  602. package/build-types/components/template-validation-notice/index.d.ts.map +1 -0
  603. package/build-types/components/text-editor/index.d.ts +4 -0
  604. package/build-types/components/text-editor/index.d.ts.map +1 -0
  605. package/build-types/components/theme-support-check/index.d.ts +14 -0
  606. package/build-types/components/theme-support-check/index.d.ts.map +1 -0
  607. package/build-types/components/time-to-read/index.d.ts +7 -0
  608. package/build-types/components/time-to-read/index.d.ts.map +1 -0
  609. package/build-types/components/unsaved-changes-warning/index.d.ts +8 -0
  610. package/build-types/components/unsaved-changes-warning/index.d.ts.map +1 -0
  611. package/build-types/components/visual-editor/edit-template-blocks-notification.d.ts +18 -0
  612. package/build-types/components/visual-editor/edit-template-blocks-notification.d.ts.map +1 -0
  613. package/build-types/components/visual-editor/index.d.ts +10 -0
  614. package/build-types/components/visual-editor/index.d.ts.map +1 -0
  615. package/build-types/components/word-count/index.d.ts +7 -0
  616. package/build-types/components/word-count/index.d.ts.map +1 -0
  617. package/build-types/dataviews/actions/delete-post.d.ts +5 -0
  618. package/build-types/dataviews/actions/delete-post.d.ts.map +1 -0
  619. package/build-types/dataviews/actions/export-pattern.d.ts +8 -0
  620. package/build-types/dataviews/actions/export-pattern.d.ts.map +1 -0
  621. package/build-types/dataviews/actions/index.d.ts +2 -0
  622. package/build-types/dataviews/actions/index.d.ts.map +1 -0
  623. package/build-types/dataviews/actions/reset-post.d.ts +5 -0
  624. package/build-types/dataviews/actions/reset-post.d.ts.map +1 -0
  625. package/build-types/dataviews/actions/utils.d.ts +11 -0
  626. package/build-types/dataviews/actions/utils.d.ts.map +1 -0
  627. package/build-types/dataviews/api.d.ts +27 -0
  628. package/build-types/dataviews/api.d.ts.map +1 -0
  629. package/build-types/dataviews/store/private-actions.d.ts +2 -2
  630. package/build-types/dataviews/store/private-actions.d.ts.map +1 -1
  631. package/build-types/dataviews/store/private-selectors.d.ts +2 -5
  632. package/build-types/dataviews/store/private-selectors.d.ts.map +1 -1
  633. package/build-types/dataviews/store/reducer.d.ts +5 -1
  634. package/build-types/dataviews/store/reducer.d.ts.map +1 -1
  635. package/build-types/dataviews/types.d.ts +34 -0
  636. package/build-types/dataviews/types.d.ts.map +1 -0
  637. package/build-types/hooks/custom-sources-backwards-compatibility.d.ts +10 -0
  638. package/build-types/hooks/custom-sources-backwards-compatibility.d.ts.map +1 -0
  639. package/build-types/hooks/default-autocompleters.d.ts +2 -0
  640. package/build-types/hooks/default-autocompleters.d.ts.map +1 -0
  641. package/build-types/hooks/index.d.ts +2 -0
  642. package/build-types/hooks/index.d.ts.map +1 -0
  643. package/build-types/hooks/media-upload.d.ts +2 -0
  644. package/build-types/hooks/media-upload.d.ts.map +1 -0
  645. package/build-types/hooks/pattern-overrides.d.ts +2 -0
  646. package/build-types/hooks/pattern-overrides.d.ts.map +1 -0
  647. package/build-types/hooks/use-select-nearest-editable-block.d.ts +4 -0
  648. package/build-types/hooks/use-select-nearest-editable-block.d.ts.map +1 -0
  649. package/build-types/index.d.ts +6 -0
  650. package/build-types/index.d.ts.map +1 -0
  651. package/build-types/lock-unlock.d.ts +3 -0
  652. package/build-types/lock-unlock.d.ts.map +1 -0
  653. package/build-types/private-apis.d.ts +2 -0
  654. package/build-types/private-apis.d.ts.map +1 -0
  655. package/build-types/store/actions.d.ts +367 -0
  656. package/build-types/store/actions.d.ts.map +1 -0
  657. package/build-types/store/constants.d.ts +31 -0
  658. package/build-types/store/constants.d.ts.map +1 -0
  659. package/build-types/store/defaults.d.ts +21 -0
  660. package/build-types/store/defaults.d.ts.map +1 -0
  661. package/build-types/store/index.d.ts +17 -0
  662. package/build-types/store/index.d.ts.map +1 -0
  663. package/build-types/store/local-autosave.d.ts +4 -0
  664. package/build-types/store/local-autosave.d.ts.map +1 -0
  665. package/build-types/store/private-actions.d.ts +37 -0
  666. package/build-types/store/private-actions.d.ts.map +1 -0
  667. package/build-types/store/private-selectors.d.ts +24 -0
  668. package/build-types/store/private-selectors.d.ts.map +1 -0
  669. package/build-types/store/reducer.d.ts +228 -0
  670. package/build-types/store/reducer.d.ts.map +1 -0
  671. package/build-types/store/selectors.d.ts +854 -0
  672. package/build-types/store/selectors.d.ts.map +1 -0
  673. package/build-types/store/utils/get-filtered-template-parts.d.ts +3 -0
  674. package/build-types/store/utils/get-filtered-template-parts.d.ts.map +1 -0
  675. package/build-types/store/utils/is-template-revertable.d.ts +8 -0
  676. package/build-types/store/utils/is-template-revertable.d.ts.map +1 -0
  677. package/build-types/store/utils/notice-builder.d.ts +27 -0
  678. package/build-types/store/utils/notice-builder.d.ts.map +1 -0
  679. package/build-types/utils/get-template-part-icon.d.ts +9 -0
  680. package/build-types/utils/get-template-part-icon.d.ts.map +1 -0
  681. package/build-types/utils/index.d.ts +5 -0
  682. package/build-types/utils/index.d.ts.map +1 -0
  683. package/build-types/utils/media-upload/index.d.ts +21 -0
  684. package/build-types/utils/media-upload/index.d.ts.map +1 -0
  685. package/build-types/utils/set-nested-value.d.ts +20 -0
  686. package/build-types/utils/set-nested-value.d.ts.map +1 -0
  687. package/build-types/utils/terms.d.ts +12 -0
  688. package/build-types/utils/terms.d.ts.map +1 -0
  689. package/build-types/utils/url.d.ts +18 -0
  690. package/build-types/utils/url.d.ts.map +1 -0
  691. package/package.json +36 -35
  692. package/src/bindings/pattern-overrides.js +9 -10
  693. package/src/bindings/post-meta.js +5 -0
  694. package/src/components/create-template-part-modal/index.js +2 -0
  695. package/src/components/create-template-part-modal/style.scss +0 -6
  696. package/src/components/document-bar/index.js +11 -4
  697. package/src/components/editor-interface/index.js +19 -8
  698. package/src/components/entities-saved-states/entity-record-item.js +4 -14
  699. package/src/components/entities-saved-states/index.js +1 -1
  700. package/src/components/entities-saved-states/style.scss +0 -13
  701. package/src/components/global-keyboard-shortcuts/index.js +1 -1
  702. package/src/components/global-styles-provider/index.js +7 -90
  703. package/src/components/header/index.js +2 -1
  704. package/src/components/index.js +11 -2
  705. package/src/components/inserter-sidebar/index.js +4 -24
  706. package/src/components/list-view-sidebar/index.js +34 -62
  707. package/src/components/list-view-sidebar/style.scss +0 -34
  708. package/src/components/page-attributes/parent.js +6 -3
  709. package/src/components/post-actions/actions.js +495 -621
  710. package/src/components/post-actions/index.js +4 -2
  711. package/src/components/post-card-panel/style.scss +1 -0
  712. package/src/components/post-excerpt/index.js +4 -1
  713. package/src/components/post-excerpt/panel.js +3 -2
  714. package/src/components/post-featured-image/style.scss +15 -0
  715. package/src/components/post-panel-row/style.scss +1 -0
  716. package/src/components/post-preview-button/index.js +1 -1
  717. package/src/components/post-publish-panel/index.js +1 -1
  718. package/src/components/post-publish-panel/style.scss +1 -1
  719. package/src/components/post-saved-state/index.js +11 -1
  720. package/src/components/post-schedule/index.js +5 -0
  721. package/src/components/post-slug/check.js +8 -0
  722. package/src/components/post-slug/index.js +5 -0
  723. package/src/components/post-status/index.js +3 -1
  724. package/src/components/post-sticky/index.js +10 -13
  725. package/src/components/post-sticky/style.scss +3 -2
  726. package/src/components/post-taxonomies/README.md +1 -1
  727. package/src/components/post-template/create-new-template-modal.js +2 -0
  728. package/src/components/post-title/index.js +5 -12
  729. package/src/components/post-url/style.scss +4 -0
  730. package/src/components/preview-dropdown/index.js +1 -1
  731. package/src/components/provider/index.native.js +3 -11
  732. package/src/components/provider/use-block-editor-settings.js +10 -5
  733. package/src/components/save-publish-panels/index.js +33 -23
  734. package/src/components/sidebar/index.js +3 -3
  735. package/src/components/sidebar/post-summary.js +0 -4
  736. package/src/components/template-content-panel/index.js +29 -5
  737. package/src/components/template-part-content-panel/index.js +62 -0
  738. package/src/components/visual-editor/index.js +1 -1
  739. package/src/components/visual-editor/style.scss +3 -1
  740. package/src/dataviews/actions/delete-post.tsx +107 -0
  741. package/src/{components/post-actions/export-pattern-action.js → dataviews/actions/export-pattern.tsx} +19 -19
  742. package/src/dataviews/actions/index.ts +25 -0
  743. package/src/dataviews/actions/reset-post.tsx +144 -0
  744. package/src/dataviews/actions/utils.ts +54 -0
  745. package/src/dataviews/store/private-actions.ts +2 -2
  746. package/src/dataviews/store/private-selectors.ts +13 -6
  747. package/src/dataviews/store/reducer.ts +12 -5
  748. package/src/dataviews/types.ts +33 -0
  749. package/src/hooks/pattern-overrides.js +6 -4
  750. package/src/lock-unlock.js +1 -1
  751. package/src/private-apis.js +2 -0
  752. package/src/private-apis.native.js +0 -2
  753. package/src/store/private-actions.js +49 -21
  754. package/src/store/private-selectors.js +0 -25
  755. package/src/store/utils/is-template-revertable.js +8 -8
  756. package/src/style.scss +0 -1
  757. package/tsconfig.json +3 -2
  758. package/tsconfig.tsbuildinfo +1 -1
  759. package/build/components/post-actions/export-pattern-action.js.map +0 -1
  760. package/build/components/post-actions/export-pattern-action.native.js +0 -11
  761. package/build/components/post-actions/export-pattern-action.native.js.map +0 -1
  762. package/build/components/template-areas/index.js +0 -84
  763. package/build/components/template-areas/index.js.map +0 -1
  764. package/build-module/components/post-actions/export-pattern-action.js.map +0 -1
  765. package/build-module/components/post-actions/export-pattern-action.native.js +0 -5
  766. package/build-module/components/post-actions/export-pattern-action.native.js.map +0 -1
  767. package/build-module/components/template-areas/index.js +0 -78
  768. package/build-module/components/template-areas/index.js.map +0 -1
  769. package/src/components/post-actions/export-pattern-action.native.js +0 -4
  770. package/src/components/template-areas/index.js +0 -94
  771. package/src/components/template-areas/style.scss +0 -22
  772. /package/src/store/{constants.js → constants.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","_blockEditor","_compose","_element","_preferences","_keycodes","_interface","_lockUnlock","_store","_jsxRuntime","PrivateInserterLibrary","unlock","blockEditorPrivateApis","InserterSidebar","blockSectionRootClientId","inserterSidebarToggleRef","insertionPoint","showMostUsedBlocks","sidebarIsOpened","useSelect","select","getInserterSidebarToggleRef","getInsertionPoint","isPublishSidebarOpened","editorStore","getBlockRootClientId","__unstableGetEditorMode","getSettings","blockEditorStore","get","preferencesStore","getActiveComplementaryArea","interfaceStore","getBlockSectionRootClientId","sectionRootClientId","setIsInserterOpened","useDispatch","disableComplementaryArea","isMobileViewport","useViewportMatch","inserterDialogRef","inserterDialogProps","useDialog","onClose","focusOnMount","libraryRef","useRef","closeInserterSidebar","useCallback","current","focus","closeOnEscape","event","keyCode","ESCAPE","defaultPrevented","preventDefault","inserterContents","jsx","className","children","showInserterHelpPanel","shouldFocusBlock","rootClientId","__experimentalInsertionIndex","insertionIndex","__experimentalInitialTab","tab","__experimentalInitialCategory","category","__experimentalFilterValue","filterValue","onPatternCategorySelection","undefined","ref","window","__experimentalEnableZoomedOutPatternsTab","onKeyDown"],"sources":["@wordpress/editor/src/components/inserter-sidebar/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tstore as blockEditorStore,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport {\n\tuseViewportMatch,\n\t__experimentalUseDialog as useDialog,\n} from '@wordpress/compose';\nimport { useCallback, useRef } from '@wordpress/element';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { ESCAPE } from '@wordpress/keycodes';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\n\nconst { PrivateInserterLibrary } = unlock( blockEditorPrivateApis );\n\nexport default function InserterSidebar() {\n\tconst {\n\t\tblockSectionRootClientId,\n\t\tinserterSidebarToggleRef,\n\t\tinsertionPoint,\n\t\tshowMostUsedBlocks,\n\t\tsidebarIsOpened,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetInserterSidebarToggleRef,\n\t\t\tgetInsertionPoint,\n\t\t\tisPublishSidebarOpened,\n\t\t} = unlock( select( editorStore ) );\n\t\tconst { getBlockRootClientId, __unstableGetEditorMode, getSettings } =\n\t\t\tselect( blockEditorStore );\n\t\tconst { get } = select( preferencesStore );\n\t\tconst { getActiveComplementaryArea } = select( interfaceStore );\n\t\tconst getBlockSectionRootClientId = () => {\n\t\t\tif ( __unstableGetEditorMode() === 'zoom-out' ) {\n\t\t\t\tconst { sectionRootClientId } = unlock( getSettings() );\n\t\t\t\tif ( sectionRootClientId ) {\n\t\t\t\t\treturn sectionRootClientId;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn getBlockRootClientId();\n\t\t};\n\t\treturn {\n\t\t\tinserterSidebarToggleRef: getInserterSidebarToggleRef(),\n\t\t\tinsertionPoint: getInsertionPoint(),\n\t\t\tshowMostUsedBlocks: get( 'core', 'mostUsedBlocks' ),\n\t\t\tblockSectionRootClientId: getBlockSectionRootClientId(),\n\t\t\tsidebarIsOpened: !! (\n\t\t\t\tgetActiveComplementaryArea( 'core' ) || isPublishSidebarOpened()\n\t\t\t),\n\t\t};\n\t}, [] );\n\tconst { setIsInserterOpened } = useDispatch( editorStore );\n\tconst { disableComplementaryArea } = useDispatch( interfaceStore );\n\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst [ inserterDialogRef, inserterDialogProps ] = useDialog( {\n\t\tonClose: () => setIsInserterOpened( false ),\n\t\tfocusOnMount: true,\n\t} );\n\tconst libraryRef = useRef();\n\n\t// When closing the inserter, focus should return to the toggle button.\n\tconst closeInserterSidebar = useCallback( () => {\n\t\tsetIsInserterOpened( false );\n\t\tinserterSidebarToggleRef.current?.focus();\n\t}, [ inserterSidebarToggleRef, setIsInserterOpened ] );\n\n\tconst closeOnEscape = useCallback(\n\t\t( event ) => {\n\t\t\tif ( event.keyCode === ESCAPE && ! event.defaultPrevented ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tcloseInserterSidebar();\n\t\t\t}\n\t\t},\n\t\t[ closeInserterSidebar ]\n\t);\n\n\tconst inserterContents = (\n\t\t<div className=\"editor-inserter-sidebar__content\">\n\t\t\t<PrivateInserterLibrary\n\t\t\t\tshowMostUsedBlocks={ showMostUsedBlocks }\n\t\t\t\tshowInserterHelpPanel\n\t\t\t\tshouldFocusBlock={ isMobileViewport }\n\t\t\t\trootClientId={\n\t\t\t\t\tblockSectionRootClientId ?? insertionPoint.rootClientId\n\t\t\t\t}\n\t\t\t\t__experimentalInsertionIndex={ insertionPoint.insertionIndex }\n\t\t\t\t__experimentalInitialTab={ insertionPoint.tab }\n\t\t\t\t__experimentalInitialCategory={ insertionPoint.category }\n\t\t\t\t__experimentalFilterValue={ insertionPoint.filterValue }\n\t\t\t\tonPatternCategorySelection={\n\t\t\t\t\tsidebarIsOpened\n\t\t\t\t\t\t? () => disableComplementaryArea( 'core' )\n\t\t\t\t\t\t: undefined\n\t\t\t\t}\n\t\t\t\tref={ libraryRef }\n\t\t\t\tonClose={ closeInserterSidebar }\n\t\t\t/>\n\t\t</div>\n\t);\n\n\tif ( window.__experimentalEnableZoomedOutPatternsTab ) {\n\t\treturn (\n\t\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t\t<div\n\t\t\t\tonKeyDown={ closeOnEscape }\n\t\t\t\tclassName=\"editor-inserter-sidebar\"\n\t\t\t>\n\t\t\t\t{ inserterContents }\n\t\t\t</div>\n\t\t);\n\t}\n\treturn (\n\t\t<div\n\t\t\tref={ inserterDialogRef }\n\t\t\t{ ...inserterDialogProps }\n\t\t\tclassName=\"editor-inserter-sidebar\"\n\t\t>\n\t\t\t{ inserterContents }\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAIA,IAAAE,QAAA,GAAAF,OAAA;AAIA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AAKA,IAAAO,WAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AAAmD,IAAAS,WAAA,GAAAT,OAAA;AArBnD;AACA;AACA;;AAeA;AACA;AACA;;AAIA,MAAM;EAAEU;AAAuB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAEpD,SAASC,eAAeA,CAAA,EAAG;EACzC,MAAM;IACLC,wBAAwB;IACxBC,wBAAwB;IACxBC,cAAc;IACdC,kBAAkB;IAClBC;EACD,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,I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MAAO,CAAC,GACxCoC,SACH;MACDC,GAAG,EAAG7B,UAAY;MAClBF,OAAO,EAAGI;IAAsB,CAChC;EAAC,CACE,CACL;EAED,IAAK4B,MAAM,CAACC,wCAAwC,EAAG;IACtD;MAAA;MACC;MACA,IAAAnE,WAAA,CAAAiD,GAAA;QACCmB,SAAS,EAAG1B,aAAe;QAC3BQ,SAAS,EAAC,yBAAyB;QAAAC,QAAA,EAEjCH;MAAgB,CACd;IAAC;EAER;EACA,oBACC,IAAAhD,WAAA,CAAAiD,GAAA;IACCgB,GAAG,EAAGlC,iBAAmB;IAAA,GACpBC,mBAAmB;IACxBkB,SAAS,EAAC,yBAAyB;IAAAC,QAAA,EAEjCH;EAAgB,CACd,CAAC;AAER","ignoreList":[]}
1
+ {"version":3,"names":["_data","require","_blockEditor","_compose","_element","_preferences","_keycodes","_interface","_lockUnlock","_store","_jsxRuntime","PrivateInserterLibrary","unlock","blockEditorPrivateApis","InserterSidebar","blockSectionRootClientId","inserterSidebarToggleRef","insertionPoint","showMostUsedBlocks","sidebarIsOpened","useSelect","select","getInserterSidebarToggleRef","getInsertionPoint","isPublishSidebarOpened","editorStore","getBlockRootClientId","__unstableGetEditorMode","getSettings","blockEditorStore","get","preferencesStore","getActiveComplementaryArea","interfaceStore","getBlockSectionRootClientId","sectionRootClientId","setIsInserterOpened","useDispatch","disableComplementaryArea","isMobileViewport","useViewportMatch","libraryRef","useRef","closeInserterSidebar","useCallback","current","focus","closeOnEscape","event","keyCode","ESCAPE","defaultPrevented","preventDefault","inserterContents","jsx","className","children","showInserterHelpPanel","shouldFocusBlock","rootClientId","__experimentalInsertionIndex","insertionIndex","onSelect","__experimentalInitialTab","tab","__experimentalInitialCategory","category","__experimentalFilterValue","filterValue","onPatternCategorySelection","undefined","ref","onClose","onKeyDown"],"sources":["@wordpress/editor/src/components/inserter-sidebar/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tstore as blockEditorStore,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { useCallback, useRef } from '@wordpress/element';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { ESCAPE } from '@wordpress/keycodes';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\n\nconst { PrivateInserterLibrary } = unlock( blockEditorPrivateApis );\n\nexport default function InserterSidebar() {\n\tconst {\n\t\tblockSectionRootClientId,\n\t\tinserterSidebarToggleRef,\n\t\tinsertionPoint,\n\t\tshowMostUsedBlocks,\n\t\tsidebarIsOpened,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetInserterSidebarToggleRef,\n\t\t\tgetInsertionPoint,\n\t\t\tisPublishSidebarOpened,\n\t\t} = unlock( select( editorStore ) );\n\t\tconst { getBlockRootClientId, __unstableGetEditorMode, getSettings } =\n\t\t\tselect( blockEditorStore );\n\t\tconst { get } = select( preferencesStore );\n\t\tconst { getActiveComplementaryArea } = select( interfaceStore );\n\t\tconst getBlockSectionRootClientId = () => {\n\t\t\tif ( __unstableGetEditorMode() === 'zoom-out' ) {\n\t\t\t\tconst { sectionRootClientId } = unlock( getSettings() );\n\t\t\t\tif ( sectionRootClientId ) {\n\t\t\t\t\treturn sectionRootClientId;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn getBlockRootClientId();\n\t\t};\n\t\treturn {\n\t\t\tinserterSidebarToggleRef: getInserterSidebarToggleRef(),\n\t\t\tinsertionPoint: getInsertionPoint(),\n\t\t\tshowMostUsedBlocks: get( 'core', 'mostUsedBlocks' ),\n\t\t\tblockSectionRootClientId: getBlockSectionRootClientId(),\n\t\t\tsidebarIsOpened: !! (\n\t\t\t\tgetActiveComplementaryArea( 'core' ) || isPublishSidebarOpened()\n\t\t\t),\n\t\t};\n\t}, [] );\n\tconst { setIsInserterOpened } = useDispatch( editorStore );\n\tconst { disableComplementaryArea } = useDispatch( interfaceStore );\n\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst libraryRef = useRef();\n\n\t// When closing the inserter, focus should return to the toggle button.\n\tconst closeInserterSidebar = useCallback( () => {\n\t\tsetIsInserterOpened( false );\n\t\tinserterSidebarToggleRef.current?.focus();\n\t}, [ inserterSidebarToggleRef, setIsInserterOpened ] );\n\n\tconst closeOnEscape = useCallback(\n\t\t( event ) => {\n\t\t\tif ( event.keyCode === ESCAPE && ! event.defaultPrevented ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tcloseInserterSidebar();\n\t\t\t}\n\t\t},\n\t\t[ closeInserterSidebar ]\n\t);\n\n\tconst inserterContents = (\n\t\t<div className=\"editor-inserter-sidebar__content\">\n\t\t\t<PrivateInserterLibrary\n\t\t\t\tshowMostUsedBlocks={ showMostUsedBlocks }\n\t\t\t\tshowInserterHelpPanel\n\t\t\t\tshouldFocusBlock={ isMobileViewport }\n\t\t\t\trootClientId={\n\t\t\t\t\tblockSectionRootClientId ?? insertionPoint.rootClientId\n\t\t\t\t}\n\t\t\t\t__experimentalInsertionIndex={ insertionPoint.insertionIndex }\n\t\t\t\tonSelect={ insertionPoint.onSelect }\n\t\t\t\t__experimentalInitialTab={ insertionPoint.tab }\n\t\t\t\t__experimentalInitialCategory={ insertionPoint.category }\n\t\t\t\t__experimentalFilterValue={ insertionPoint.filterValue }\n\t\t\t\tonPatternCategorySelection={\n\t\t\t\t\tsidebarIsOpened\n\t\t\t\t\t\t? () => disableComplementaryArea( 'core' )\n\t\t\t\t\t\t: undefined\n\t\t\t\t}\n\t\t\t\tref={ libraryRef }\n\t\t\t\tonClose={ closeInserterSidebar }\n\t\t\t/>\n\t\t</div>\n\t);\n\n\treturn (\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<div onKeyDown={ closeOnEscape } className=\"editor-inserter-sidebar\">\n\t\t\t{ inserterContents }\n\t\t</div>\n\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AA4C,GAAA,EAAC3C,sBAAsB;MACtBO,kBAAkB,EAAGA,kBAAoB;MACzCuC,qBAAqB;MACrBC,gBAAgB,EAAGnB,gBAAkB;MACrCoB,YAAY,EACX5C,wBAAwB,aAAxBA,wBAAwB,cAAxBA,wBAAwB,GAAIE,cAAc,CAAC0C,YAC3C;MACDC,4BAA4B,EAAG3C,cAAc,CAAC4C,cAAgB;MAC9DC,QAAQ,EAAG7C,cAAc,CAAC6C,QAAU;MACpCC,wBAAwB,EAAG9C,cAAc,CAAC+C,GAAK;MAC/CC,6BAA6B,EAAGhD,cAAc,CAACiD,QAAU;MACzDC,yBAAyB,EAAGlD,cAAc,CAACmD,WAAa;MACxDC,0BAA0B,EACzBlD,eAAe,GACZ,MAAMmB,wBAAwB,CAAE,MAAO,CAAC,GACxCgC,SACH;MACDC,GAAG,EAAG9B,UAAY;MAClB+B,OAAO,EAAG7B;IAAsB,CAChC;EAAC,CACE,CACL;EAED;IAAA;IACC;IACA,IAAAjC,WAAA,CAAA4C,GAAA;MAAKmB,SAAS,EAAG1B,aAAe;MAACQ,SAAS,EAAC,yBAAyB;MAAAC,QAAA,EACjEH;IAAgB,CACd;EAAC;AAER","ignoreList":[]}
@@ -6,13 +6,11 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.default = ListViewSidebar;
8
8
  var _blockEditor = require("@wordpress/block-editor");
9
- var _components = require("@wordpress/components");
10
9
  var _compose = require("@wordpress/compose");
11
10
  var _data = require("@wordpress/data");
12
11
  var _dom = require("@wordpress/dom");
13
12
  var _element = require("@wordpress/element");
14
13
  var _i18n = require("@wordpress/i18n");
15
- var _icons = require("@wordpress/icons");
16
14
  var _keyboardShortcuts = require("@wordpress/keyboard-shortcuts");
17
15
  var _keycodes = require("@wordpress/keycodes");
18
16
  var _listViewOutline = _interopRequireDefault(require("./list-view-outline"));
@@ -28,8 +26,8 @@ var _jsxRuntime = require("react/jsx-runtime");
28
26
  */
29
27
 
30
28
  const {
31
- Tabs
32
- } = (0, _lockUnlock.unlock)(_components.privateApis);
29
+ TabbedSidebar
30
+ } = (0, _lockUnlock.unlock)(_blockEditor.privateApis);
33
31
  function ListViewSidebar() {
34
32
  const {
35
33
  setIsListViewOpened
@@ -110,42 +108,11 @@ function ListViewSidebar() {
110
108
  className: "editor-list-view-sidebar",
111
109
  onKeyDown: closeOnEscape,
112
110
  ref: sidebarRef,
113
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(Tabs, {
114
- onSelect: tabName => setTab(tabName),
115
- selectOnMove: false
116
- // The initial tab value is set explicitly to avoid an initial
117
- // render where no tab is selected. This ensures that the
118
- // tabpanel height is correct so the relevant scroll container
119
- // can be rendered internally.
120
- ,
121
- defaultTabId: "list-view",
122
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
123
- className: "editor-list-view-sidebar__header",
124
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
125
- className: "editor-list-view-sidebar__close-button",
126
- icon: _icons.closeSmall,
127
- label: (0, _i18n.__)('Close'),
128
- onClick: closeListView,
129
- size: "small"
130
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(Tabs.TabList, {
131
- className: "editor-list-view-sidebar__tabs-tablist",
132
- ref: tabsRef,
133
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Tabs.Tab, {
134
- className: "editor-list-view-sidebar__tabs-tab",
135
- tabId: "list-view",
136
- children: (0, _i18n._x)('List View', 'Post overview')
137
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(Tabs.Tab, {
138
- className: "editor-list-view-sidebar__tabs-tab",
139
- tabId: "outline",
140
- children: (0, _i18n._x)('Outline', 'Post overview')
141
- })]
142
- })]
143
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(Tabs.TabPanel, {
144
- ref: listViewContainerRef,
145
- className: "editor-list-view-sidebar__tabs-tabpanel",
146
- tabId: "list-view",
147
- focusable: false,
148
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
111
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(TabbedSidebar, {
112
+ tabs: [{
113
+ name: 'list-view',
114
+ title: (0, _i18n._x)('List View', 'Post overview'),
115
+ panel: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
149
116
  className: "editor-list-view-sidebar__list-view-container",
150
117
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
151
118
  className: "editor-list-view-sidebar__list-view-panel-content",
@@ -153,16 +120,21 @@ function ListViewSidebar() {
153
120
  dropZoneElement: dropZoneElement
154
121
  })
155
122
  })
156
- })
157
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(Tabs.TabPanel, {
158
- className: "editor-list-view-sidebar__tabs-tabpanel",
159
- tabId: "outline",
160
- focusable: false,
161
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
123
+ }),
124
+ panelRef: listViewContainerRef
125
+ }, {
126
+ name: 'outline',
127
+ title: (0, _i18n._x)('Outline', 'Post overview'),
128
+ panel: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
162
129
  className: "editor-list-view-sidebar__list-view-container",
163
130
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_listViewOutline.default, {})
164
131
  })
165
- })]
132
+ }],
133
+ onClose: closeListView,
134
+ onSelect: tabName => setTab(tabName),
135
+ defaultTabId: "list-view",
136
+ ref: tabsRef,
137
+ closeButtonLabel: (0, _i18n.__)('Close')
166
138
  })
167
139
  })
168
140
  );
@@ -1 +1 @@
1
- {"version":3,"names":["_blockEditor","require","_components","_compose","_data","_dom","_element","_i18n","_icons","_keyboardShortcuts","_keycodes","_listViewOutline","_interopRequireDefault","_lockUnlock","_store","_jsxRuntime","Tabs","unlock","componentsPrivateApis","ListViewSidebar","setIsListViewOpened","useDispatch","editorStore","getListViewToggleRef","useSelect","focusOnMountRef","useFocusOnMount","closeListView","useCallback","current","focus","closeOnEscape","event","keyCode","ESCAPE","defaultPrevented","preventDefault","dropZoneElement","setDropZoneElement","useState","tab","setTab","sidebarRef","useRef","tabsRef","listViewRef","listViewContainerRef","useMergeRefs","handleSidebarFocus","currentTab","tabPanelFocus","tabbable","find","listViewApplicationFocus","listViewFocusArea","contains","handleToggleListViewShortcut","ownerDocument","activeElement","useShortcut","jsx","className","onKeyDown","ref","children","jsxs","onSelect","tabName","selectOnMove","defaultTabId","Button","icon","closeSmall","label","__","onClick","size","TabList","Tab","tabId","_x","TabPanel","focusable","__experimentalListView","default"],"sources":["@wordpress/editor/src/components/list-view-sidebar/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalListView as ListView } from '@wordpress/block-editor';\nimport {\n\tButton,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { useFocusOnMount, useMergeRefs } from '@wordpress/compose';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { focus } from '@wordpress/dom';\nimport { useCallback, useRef, useState } from '@wordpress/element';\nimport { __, _x } from '@wordpress/i18n';\nimport { closeSmall } from '@wordpress/icons';\nimport { useShortcut } from '@wordpress/keyboard-shortcuts';\nimport { ESCAPE } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport ListViewOutline from './list-view-outline';\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nexport default function ListViewSidebar() {\n\tconst { setIsListViewOpened } = useDispatch( editorStore );\n\tconst { getListViewToggleRef } = unlock( useSelect( editorStore ) );\n\n\t// This hook handles focus when the sidebar first renders.\n\tconst focusOnMountRef = useFocusOnMount( 'firstElement' );\n\n\t// When closing the list view, focus should return to the toggle button.\n\tconst closeListView = useCallback( () => {\n\t\tsetIsListViewOpened( false );\n\t\tgetListViewToggleRef().current?.focus();\n\t}, [ getListViewToggleRef, setIsListViewOpened ] );\n\n\tconst closeOnEscape = useCallback(\n\t\t( event ) => {\n\t\t\tif ( event.keyCode === ESCAPE && ! event.defaultPrevented ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tcloseListView();\n\t\t\t}\n\t\t},\n\t\t[ closeListView ]\n\t);\n\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the dropZoneElement updates.\n\tconst [ dropZoneElement, setDropZoneElement ] = useState( null );\n\t// Tracks our current tab.\n\tconst [ tab, setTab ] = useState( 'list-view' );\n\n\t// This ref refers to the sidebar as a whole.\n\tconst sidebarRef = useRef();\n\t// This ref refers to the tab panel.\n\tconst tabsRef = useRef();\n\t// This ref refers to the list view application area.\n\tconst listViewRef = useRef();\n\n\t// Must merge the refs together so focus can be handled properly in the next function.\n\tconst listViewContainerRef = useMergeRefs( [\n\t\tfocusOnMountRef,\n\t\tlistViewRef,\n\t\tsetDropZoneElement,\n\t] );\n\n\t/*\n\t * Callback function to handle list view or outline focus.\n\t *\n\t * @param {string} currentTab The current tab. Either list view or outline.\n\t *\n\t * @return void\n\t */\n\tfunction handleSidebarFocus( currentTab ) {\n\t\t// Tab panel focus.\n\t\tconst tabPanelFocus = focus.tabbable.find( tabsRef.current )[ 0 ];\n\t\t// List view tab is selected.\n\t\tif ( currentTab === 'list-view' ) {\n\t\t\t// Either focus the list view or the tab panel. Must have a fallback because the list view does not render when there are no blocks.\n\t\t\tconst listViewApplicationFocus = focus.tabbable.find(\n\t\t\t\tlistViewRef.current\n\t\t\t)[ 0 ];\n\t\t\tconst listViewFocusArea = sidebarRef.current.contains(\n\t\t\t\tlistViewApplicationFocus\n\t\t\t)\n\t\t\t\t? listViewApplicationFocus\n\t\t\t\t: tabPanelFocus;\n\t\t\tlistViewFocusArea.focus();\n\t\t\t// Outline tab is selected.\n\t\t} else {\n\t\t\ttabPanelFocus.focus();\n\t\t}\n\t}\n\n\tconst handleToggleListViewShortcut = useCallback( () => {\n\t\t// If the sidebar has focus, it is safe to close.\n\t\tif (\n\t\t\tsidebarRef.current.contains(\n\t\t\t\tsidebarRef.current.ownerDocument.activeElement\n\t\t\t)\n\t\t) {\n\t\t\tcloseListView();\n\t\t} else {\n\t\t\t// If the list view or outline does not have focus, focus should be moved to it.\n\t\t\thandleSidebarFocus( tab );\n\t\t}\n\t}, [ closeListView, tab ] );\n\n\t// This only fires when the sidebar is open because of the conditional rendering.\n\t// It is the same shortcut to open but that is defined as a global shortcut and only fires when the sidebar is closed.\n\tuseShortcut( 'core/editor/toggle-list-view', handleToggleListViewShortcut );\n\n\treturn (\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<div\n\t\t\tclassName=\"editor-list-view-sidebar\"\n\t\t\tonKeyDown={ closeOnEscape }\n\t\t\tref={ sidebarRef }\n\t\t>\n\t\t\t<Tabs\n\t\t\t\tonSelect={ ( tabName ) => setTab( tabName ) }\n\t\t\t\tselectOnMove={ false }\n\t\t\t\t// The initial tab value is set explicitly to avoid an initial\n\t\t\t\t// render where no tab is selected. This ensures that the\n\t\t\t\t// tabpanel height is correct so the relevant scroll container\n\t\t\t\t// can be rendered internally.\n\t\t\t\tdefaultTabId=\"list-view\"\n\t\t\t>\n\t\t\t\t<div className=\"editor-list-view-sidebar__header\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName=\"editor-list-view-sidebar__close-button\"\n\t\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\t\tlabel={ __( 'Close' ) }\n\t\t\t\t\t\tonClick={ closeListView }\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t/>\n\t\t\t\t\t<Tabs.TabList\n\t\t\t\t\t\tclassName=\"editor-list-view-sidebar__tabs-tablist\"\n\t\t\t\t\t\tref={ tabsRef }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Tabs.Tab\n\t\t\t\t\t\t\tclassName=\"editor-list-view-sidebar__tabs-tab\"\n\t\t\t\t\t\t\ttabId=\"list-view\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ _x( 'List View', 'Post overview' ) }\n\t\t\t\t\t\t</Tabs.Tab>\n\t\t\t\t\t\t<Tabs.Tab\n\t\t\t\t\t\t\tclassName=\"editor-list-view-sidebar__tabs-tab\"\n\t\t\t\t\t\t\ttabId=\"outline\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ _x( 'Outline', 'Post overview' ) }\n\t\t\t\t\t\t</Tabs.Tab>\n\t\t\t\t\t</Tabs.TabList>\n\t\t\t\t</div>\n\n\t\t\t\t<Tabs.TabPanel\n\t\t\t\t\tref={ listViewContainerRef }\n\t\t\t\t\tclassName=\"editor-list-view-sidebar__tabs-tabpanel\"\n\t\t\t\t\ttabId=\"list-view\"\n\t\t\t\t\tfocusable={ false }\n\t\t\t\t>\n\t\t\t\t\t<div className=\"editor-list-view-sidebar__list-view-container\">\n\t\t\t\t\t\t<div className=\"editor-list-view-sidebar__list-view-panel-content\">\n\t\t\t\t\t\t\t<ListView dropZoneElement={ dropZoneElement } />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t<Tabs.TabPanel\n\t\t\t\t\tclassName=\"editor-list-view-sidebar__tabs-tabpanel\"\n\t\t\t\t\ttabId=\"outline\"\n\t\t\t\t\tfocusable={ false }\n\t\t\t\t>\n\t\t\t\t\t<div className=\"editor-list-view-sidebar__list-view-container\">\n\t\t\t\t\t\t<ListViewOutline />\n\t\t\t\t\t</div>\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t</Tabs>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAIA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,IAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,kBAAA,GAAAR,OAAA;AACA,IAAAS,SAAA,GAAAT,OAAA;AAKA,IAAAU,gBAAA,GAAAC,sBAAA,CAAAX,OAAA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,SAAS,EAAC,yCAAyC;UACnDkB,KAAK,EAAC,WAAW;UACjBG,SAAS,EAAG,KAAO;UAAAlB,QAAA,eAEnB,IAAAjD,WAAA,CAAA6C,GAAA;YAAKC,SAAS,EAAC,+CAA+C;YAAAG,QAAA,eAC7D,IAAAjD,WAAA,CAAA6C,GAAA;cAAKC,SAAS,EAAC,mDAAmD;cAAAG,QAAA,eACjE,IAAAjD,WAAA,CAAA6C,GAAA,EAAC5D,YAAA,CAAAmF,sBAAQ;gBAAC9C,eAAe,EAAGA;cAAiB,CAAE;YAAC,CAC5C;UAAC,CACF;QAAC,CACQ,CAAC,eAChB,IAAAtB,WAAA,CAAA6C,GAAA,EAAC5C,IAAI,CAACiE,QAAQ;UACbpB,SAAS,EAAC,yCAAyC;UACnDkB,KAAK,EAAC,SAAS;UACfG,SAAS,EAAG,KAAO;UAAAlB,QAAA,eAEnB,IAAAjD,WAAA,CAAA6C,GAAA;YAAKC,SAAS,EAAC,+CAA+C;YAAAG,QAAA,eAC7D,IAAAjD,WAAA,CAAA6C,GAAA,EAACjD,gBAAA,CAAAyE,OAAe,IAAE;UAAC,CACf;QAAC,CACQ,CAAC;MAAA,CACX;IAAC,CACH;EAAC;AAER","ignoreList":[]}
1
+ {"version":3,"names":["_blockEditor","require","_compose","_data","_dom","_element","_i18n","_keyboardShortcuts","_keycodes","_listViewOutline","_interopRequireDefault","_lockUnlock","_store","_jsxRuntime","TabbedSidebar","unlock","blockEditorPrivateApis","ListViewSidebar","setIsListViewOpened","useDispatch","editorStore","getListViewToggleRef","useSelect","focusOnMountRef","useFocusOnMount","closeListView","useCallback","current","focus","closeOnEscape","event","keyCode","ESCAPE","defaultPrevented","preventDefault","dropZoneElement","setDropZoneElement","useState","tab","setTab","sidebarRef","useRef","tabsRef","listViewRef","listViewContainerRef","useMergeRefs","handleSidebarFocus","currentTab","tabPanelFocus","tabbable","find","listViewApplicationFocus","listViewFocusArea","contains","handleToggleListViewShortcut","ownerDocument","activeElement","useShortcut","jsx","className","onKeyDown","ref","children","tabs","name","title","_x","panel","__experimentalListView","panelRef","default","onClose","onSelect","tabName","defaultTabId","closeButtonLabel","__"],"sources":["@wordpress/editor/src/components/list-view-sidebar/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalListView as ListView,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { useFocusOnMount, useMergeRefs } from '@wordpress/compose';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { focus } from '@wordpress/dom';\nimport { useCallback, useRef, useState } from '@wordpress/element';\nimport { __, _x } from '@wordpress/i18n';\nimport { useShortcut } from '@wordpress/keyboard-shortcuts';\nimport { ESCAPE } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport ListViewOutline from './list-view-outline';\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\n\nconst { TabbedSidebar } = unlock( blockEditorPrivateApis );\n\nexport default function ListViewSidebar() {\n\tconst { setIsListViewOpened } = useDispatch( editorStore );\n\tconst { getListViewToggleRef } = unlock( useSelect( editorStore ) );\n\n\t// This hook handles focus when the sidebar first renders.\n\tconst focusOnMountRef = useFocusOnMount( 'firstElement' );\n\n\t// When closing the list view, focus should return to the toggle button.\n\tconst closeListView = useCallback( () => {\n\t\tsetIsListViewOpened( false );\n\t\tgetListViewToggleRef().current?.focus();\n\t}, [ getListViewToggleRef, setIsListViewOpened ] );\n\n\tconst closeOnEscape = useCallback(\n\t\t( event ) => {\n\t\t\tif ( event.keyCode === ESCAPE && ! event.defaultPrevented ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tcloseListView();\n\t\t\t}\n\t\t},\n\t\t[ closeListView ]\n\t);\n\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the dropZoneElement updates.\n\tconst [ dropZoneElement, setDropZoneElement ] = useState( null );\n\t// Tracks our current tab.\n\tconst [ tab, setTab ] = useState( 'list-view' );\n\n\t// This ref refers to the sidebar as a whole.\n\tconst sidebarRef = useRef();\n\t// This ref refers to the tab panel.\n\tconst tabsRef = useRef();\n\t// This ref refers to the list view application area.\n\tconst listViewRef = useRef();\n\n\t// Must merge the refs together so focus can be handled properly in the next function.\n\tconst listViewContainerRef = useMergeRefs( [\n\t\tfocusOnMountRef,\n\t\tlistViewRef,\n\t\tsetDropZoneElement,\n\t] );\n\n\t/*\n\t * Callback function to handle list view or outline focus.\n\t *\n\t * @param {string} currentTab The current tab. Either list view or outline.\n\t *\n\t * @return void\n\t */\n\tfunction handleSidebarFocus( currentTab ) {\n\t\t// Tab panel focus.\n\t\tconst tabPanelFocus = focus.tabbable.find( tabsRef.current )[ 0 ];\n\t\t// List view tab is selected.\n\t\tif ( currentTab === 'list-view' ) {\n\t\t\t// Either focus the list view or the tab panel. Must have a fallback because the list view does not render when there are no blocks.\n\t\t\tconst listViewApplicationFocus = focus.tabbable.find(\n\t\t\t\tlistViewRef.current\n\t\t\t)[ 0 ];\n\t\t\tconst listViewFocusArea = sidebarRef.current.contains(\n\t\t\t\tlistViewApplicationFocus\n\t\t\t)\n\t\t\t\t? listViewApplicationFocus\n\t\t\t\t: tabPanelFocus;\n\t\t\tlistViewFocusArea.focus();\n\t\t\t// Outline tab is selected.\n\t\t} else {\n\t\t\ttabPanelFocus.focus();\n\t\t}\n\t}\n\n\tconst handleToggleListViewShortcut = useCallback( () => {\n\t\t// If the sidebar has focus, it is safe to close.\n\t\tif (\n\t\t\tsidebarRef.current.contains(\n\t\t\t\tsidebarRef.current.ownerDocument.activeElement\n\t\t\t)\n\t\t) {\n\t\t\tcloseListView();\n\t\t} else {\n\t\t\t// If the list view or outline does not have focus, focus should be moved to it.\n\t\t\thandleSidebarFocus( tab );\n\t\t}\n\t}, [ closeListView, tab ] );\n\n\t// This only fires when the sidebar is open because of the conditional rendering.\n\t// It is the same shortcut to open but that is defined as a global shortcut and only fires when the sidebar is closed.\n\tuseShortcut( 'core/editor/toggle-list-view', handleToggleListViewShortcut );\n\n\treturn (\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<div\n\t\t\tclassName=\"editor-list-view-sidebar\"\n\t\t\tonKeyDown={ closeOnEscape }\n\t\t\tref={ sidebarRef }\n\t\t>\n\t\t\t<TabbedSidebar\n\t\t\t\ttabs={ [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'list-view',\n\t\t\t\t\t\ttitle: _x( 'List View', 'Post overview' ),\n\t\t\t\t\t\tpanel: (\n\t\t\t\t\t\t\t<div className=\"editor-list-view-sidebar__list-view-container\">\n\t\t\t\t\t\t\t\t<div className=\"editor-list-view-sidebar__list-view-panel-content\">\n\t\t\t\t\t\t\t\t\t<ListView\n\t\t\t\t\t\t\t\t\t\tdropZoneElement={ dropZoneElement }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t),\n\t\t\t\t\t\tpanelRef: listViewContainerRef,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'outline',\n\t\t\t\t\t\ttitle: _x( 'Outline', 'Post overview' ),\n\t\t\t\t\t\tpanel: (\n\t\t\t\t\t\t\t<div className=\"editor-list-view-sidebar__list-view-container\">\n\t\t\t\t\t\t\t\t<ListViewOutline />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t),\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t\tonClose={ closeListView }\n\t\t\t\tonSelect={ ( tabName ) => setTab( tabName ) }\n\t\t\t\tdefaultTabId=\"list-view\"\n\t\t\t\tref={ tabsRef }\n\t\t\t\tcloseButtonLabel={ __( 'Close' ) }\n\t\t\t/>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAIA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,IAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OA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 @@ function ParentRow() {
242
242
  title: (0, _i18n.__)('Parent'),
243
243
  onClose: onClose
244
244
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
245
- children: [(0, _i18n.__)("Child pages inherit characteristics from their parent, such as URL structure. For instance, if 'Web Design' is a child of 'Services,' its URL would be mysite.com/services/web-design."), /*#__PURE__*/(0, _jsxRuntime.jsxs)("p", {
245
+ children: [/* translators: The domain name should be a reserved domain name to prevent linking to third party sites outside the WordPress project's control. You may also wish to use wordpress.org or a wordpress.org sub-domain. */
246
+ (0, _i18n.__)("Child pages inherit characteristics from their parent, such as URL structure. For instance, if 'Web Design' is a child of 'Services', its URL would be example.org/services/web-design."), /*#__PURE__*/(0, _jsxRuntime.jsxs)("p", {
246
247
  children: [(0, _i18n.__)('They also show up as sub-items in the default navigation menu. '), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.ExternalLink, {
247
248
  href: (0, _i18n.__)('https://wordpress.org/documentation/article/page-post-settings-sidebar/#page-attributes'),
248
249
  children: (0, _i18n.__)('Learn more')
@@ -1 +1 @@
1
- {"version":3,"names":["_removeAccents","_interopRequireDefault","require","_i18n","_components","_compose","_element","_data","_htmlEntities","_coreData","_blockEditor","_postPanelRow","_terms","_store","_jsxRuntime","getTitle","post","title","rendered","decodeEntities","id","__","getItemPriority","name","searchValue","normalizedName","removeAccents","toLowerCase","normalizedSearch","startsWith","length","Infinity","exports","PageAttributesParent","editPost","useDispatch","editorStore","fieldValue","setFieldValue","useState","isHierarchical","parentPostId","parentPostTitle","pageItems","useSelect","select","_pType$hierarchical","getPostType","getEntityRecords","getEntityRecord","coreStore","getCurrentPostId","getEditedPostAttribute","postTypeSlug","pageId","pType","postId","postIsHierarchical","hierarchical","query","per_page","exclude","parent_exclude","orderby","order","_fields","search","parentPost","parentOptions","useMemo","getOptionsFromTree","tree","level","mappedNodes","map","treeNode","value","label","repeat","rawName","children","sortedNodes","sort","a","b","priorityA","priorityB","flat","item","parent","buildTermsTree","opts","optsHasParent","find","unshift","handleKeydown","inputValue","handleChange","selectedPostId","jsx","ComboboxControl","__nextHasNoMarginBottom","__next40pxDefaultSize","className","help","options","onFilterValueChange","debounce","onChange","hideLabelFromVision","PostParentToggle","isOpen","onClick","parentTitle","Button","size","variant","sprintf","ParentRow","popoverAnchor","setPopoverAnchor","popoverProps","anchor","placement","offset","shift","default","ref","Dropdown","contentClassName","focusOnMount","renderToggle","onToggle","renderContent","onClose","jsxs","__experimentalInspectorPopoverHeader","ExternalLink","href","_default"],"sources":["@wordpress/editor/src/components/page-attributes/parent.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport removeAccents from 'remove-accents';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tButton,\n\tDropdown,\n\tComboboxControl,\n\tExternalLink,\n} from '@wordpress/components';\nimport { debounce } from '@wordpress/compose';\nimport { useState, useMemo } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport PostPanelRow from '../post-panel-row';\nimport { buildTermsTree } from '../../utils/terms';\nimport { store as editorStore } from '../../store';\n\nfunction getTitle( post ) {\n\treturn post?.title?.rendered\n\t\t? decodeEntities( post.title.rendered )\n\t\t: `#${ post.id } (${ __( 'no title' ) })`;\n}\n\nexport const getItemPriority = ( name, searchValue ) => {\n\tconst normalizedName = removeAccents( name || '' ).toLowerCase();\n\tconst normalizedSearch = removeAccents( searchValue || '' ).toLowerCase();\n\tif ( normalizedName === normalizedSearch ) {\n\t\treturn 0;\n\t}\n\n\tif ( normalizedName.startsWith( normalizedSearch ) ) {\n\t\treturn normalizedName.length;\n\t}\n\n\treturn Infinity;\n};\n\n/**\n * Renders the Page Attributes Parent component. A dropdown menu in an editor interface\n * for selecting the parent page of a given page.\n *\n * @return {Component|null} The component to be rendered. Return null if post type is not hierarchical.\n */\nexport function PageAttributesParent() {\n\tconst { editPost } = useDispatch( editorStore );\n\tconst [ fieldValue, setFieldValue ] = useState( false );\n\tconst { isHierarchical, parentPostId, parentPostTitle, pageItems } =\n\t\tuseSelect(\n\t\t\t( select ) => {\n\t\t\t\tconst { getPostType, getEntityRecords, getEntityRecord } =\n\t\t\t\t\tselect( coreStore );\n\t\t\t\tconst { getCurrentPostId, getEditedPostAttribute } =\n\t\t\t\t\tselect( editorStore );\n\t\t\t\tconst postTypeSlug = getEditedPostAttribute( 'type' );\n\t\t\t\tconst pageId = getEditedPostAttribute( 'parent' );\n\t\t\t\tconst pType = getPostType( postTypeSlug );\n\t\t\t\tconst postId = getCurrentPostId();\n\t\t\t\tconst postIsHierarchical = pType?.hierarchical ?? false;\n\t\t\t\tconst query = {\n\t\t\t\t\tper_page: 100,\n\t\t\t\t\texclude: postId,\n\t\t\t\t\tparent_exclude: postId,\n\t\t\t\t\torderby: 'menu_order',\n\t\t\t\t\torder: 'asc',\n\t\t\t\t\t_fields: 'id,title,parent',\n\t\t\t\t};\n\n\t\t\t\t// Perform a search when the field is changed.\n\t\t\t\tif ( !! fieldValue ) {\n\t\t\t\t\tquery.search = fieldValue;\n\t\t\t\t}\n\n\t\t\t\tconst parentPost = pageId\n\t\t\t\t\t? getEntityRecord( 'postType', postTypeSlug, pageId )\n\t\t\t\t\t: null;\n\n\t\t\t\treturn {\n\t\t\t\t\tisHierarchical: postIsHierarchical,\n\t\t\t\t\tparentPostId: pageId,\n\t\t\t\t\tparentPostTitle: parentPost ? getTitle( parentPost ) : '',\n\t\t\t\t\tpageItems: postIsHierarchical\n\t\t\t\t\t\t? getEntityRecords( 'postType', postTypeSlug, query )\n\t\t\t\t\t\t: null,\n\t\t\t\t};\n\t\t\t},\n\t\t\t[ fieldValue ]\n\t\t);\n\n\tconst parentOptions = useMemo( () => {\n\t\tconst getOptionsFromTree = ( tree, level = 0 ) => {\n\t\t\tconst mappedNodes = tree.map( ( treeNode ) => [\n\t\t\t\t{\n\t\t\t\t\tvalue: treeNode.id,\n\t\t\t\t\tlabel:\n\t\t\t\t\t\t'— '.repeat( level ) + decodeEntities( treeNode.name ),\n\t\t\t\t\trawName: treeNode.name,\n\t\t\t\t},\n\t\t\t\t...getOptionsFromTree( treeNode.children || [], level + 1 ),\n\t\t\t] );\n\n\t\t\tconst sortedNodes = mappedNodes.sort( ( [ a ], [ b ] ) => {\n\t\t\t\tconst priorityA = getItemPriority( a.rawName, fieldValue );\n\t\t\t\tconst priorityB = getItemPriority( b.rawName, fieldValue );\n\t\t\t\treturn priorityA >= priorityB ? 1 : -1;\n\t\t\t} );\n\n\t\t\treturn sortedNodes.flat();\n\t\t};\n\n\t\tif ( ! pageItems ) {\n\t\t\treturn [];\n\t\t}\n\n\t\tlet tree = pageItems.map( ( item ) => ( {\n\t\t\tid: item.id,\n\t\t\tparent: item.parent,\n\t\t\tname: getTitle( item ),\n\t\t} ) );\n\n\t\t// Only build a hierarchical tree when not searching.\n\t\tif ( ! fieldValue ) {\n\t\t\ttree = buildTermsTree( tree );\n\t\t}\n\n\t\tconst opts = getOptionsFromTree( tree );\n\n\t\t// Ensure the current parent is in the options list.\n\t\tconst optsHasParent = opts.find(\n\t\t\t( item ) => item.value === parentPostId\n\t\t);\n\t\tif ( parentPostTitle && ! optsHasParent ) {\n\t\t\topts.unshift( {\n\t\t\t\tvalue: parentPostId,\n\t\t\t\tlabel: parentPostTitle,\n\t\t\t} );\n\t\t}\n\t\treturn opts;\n\t}, [ pageItems, fieldValue, parentPostTitle, parentPostId ] );\n\n\tif ( ! isHierarchical ) {\n\t\treturn null;\n\t}\n\t/**\n\t * Handle user input.\n\t *\n\t * @param {string} inputValue The current value of the input field.\n\t */\n\tconst handleKeydown = ( inputValue ) => {\n\t\tsetFieldValue( inputValue );\n\t};\n\n\t/**\n\t * Handle author selection.\n\t *\n\t * @param {Object} selectedPostId The selected Author.\n\t */\n\tconst handleChange = ( selectedPostId ) => {\n\t\teditPost( { parent: selectedPostId } );\n\t};\n\n\treturn (\n\t\t<ComboboxControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\t__next40pxDefaultSize\n\t\t\tclassName=\"editor-page-attributes__parent\"\n\t\t\tlabel={ __( 'Parent' ) }\n\t\t\thelp={ __( 'Choose a parent page.' ) }\n\t\t\tvalue={ parentPostId }\n\t\t\toptions={ parentOptions }\n\t\t\tonFilterValueChange={ debounce( handleKeydown, 300 ) }\n\t\t\tonChange={ handleChange }\n\t\t\thideLabelFromVision\n\t\t/>\n\t);\n}\n\nfunction PostParentToggle( { isOpen, onClick } ) {\n\tconst parentPost = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute } = select( editorStore );\n\t\tconst parentPostId = getEditedPostAttribute( 'parent' );\n\t\tif ( ! parentPostId ) {\n\t\t\treturn null;\n\t\t}\n\t\tconst { getEntityRecord } = select( coreStore );\n\t\tconst postTypeSlug = getEditedPostAttribute( 'type' );\n\t\treturn getEntityRecord( 'postType', postTypeSlug, parentPostId );\n\t}, [] );\n\tconst parentTitle = useMemo(\n\t\t() => ( ! parentPost ? __( 'None' ) : getTitle( parentPost ) ),\n\t\t[ parentPost ]\n\t);\n\treturn (\n\t\t<Button\n\t\t\tsize=\"compact\"\n\t\t\tclassName=\"editor-post-parent__panel-toggle\"\n\t\t\tvariant=\"tertiary\"\n\t\t\taria-expanded={ isOpen }\n\t\t\t// translators: %s: Current post parent.\n\t\t\taria-label={ sprintf( __( 'Change parent: %s' ), parentTitle ) }\n\t\t\tonClick={ onClick }\n\t\t>\n\t\t\t{ parentTitle }\n\t\t</Button>\n\t);\n}\n\nexport function ParentRow() {\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\tplacement: 'left-start',\n\t\t\toffset: 36,\n\t\t\tshift: true,\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\treturn (\n\t\t<PostPanelRow label={ __( 'Parent' ) } ref={ setPopoverAnchor }>\n\t\t\t<Dropdown\n\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\tclassName=\"editor-post-parent__panel-dropdown\"\n\t\t\t\tcontentClassName=\"editor-post-parent__panel-dialog\"\n\t\t\t\tfocusOnMount\n\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t<PostParentToggle isOpen={ isOpen } onClick={ onToggle } />\n\t\t\t\t) }\n\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t<div className=\"editor-post-parent\">\n\t\t\t\t\t\t<InspectorPopoverHeader\n\t\t\t\t\t\t\ttitle={ __( 'Parent' ) }\n\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\"Child pages inherit characteristics from their parent, such as URL structure. For instance, if 'Web Design' is a child of 'Services,' its URL would be mysite.com/services/web-design.\"\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'They also show up as sub-items in the default navigation menu. '\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/page-post-settings-sidebar/#page-attributes'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( 'Learn more' ) }\n\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<P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G;UACxBiH,OAAO,EAAGA;QAAS,CACnB,CAAC,eACF,IAAAxH,WAAA,CAAAyH,IAAA;UAAAvD,QAAA,GACG,IAAA3D,QAAE,EACH,wLACD,CAAC,eACD,IAAAP,WAAA,CAAAyH,IAAA;YAAAvD,QAAA,GACG,IAAA3D,QAAE,EACH,iEACD,CAAC,eACD,IAAAP,WAAA,CAAAqF,GAAA,EAAC/F,WAAA,CAAAqI,YAAY;cACZC,IAAI,EAAG,IAAArH,QAAE,EACR,yFACD,CAAG;cAAA2D,QAAA,EAED,IAAA3D,QAAE,EAAE,YAAa;YAAC,CACP,CAAC;UAAA,CACb,CAAC;QAAA,CACA,CAAC,eACN,IAAAP,WAAA,CAAAqF,GAAA,EAAClE,oBAAoB,IAAE,CAAC;MAAA,CACpB;IACH,CACH;EAAC,CACW,CAAC;AAEjB;AAAC,IAAA0G,QAAA,GAAA3G,OAAA,CAAA8F,OAAA,GAEc7F,oBAAoB","ignoreList":[]}
1
+ {"version":3,"names":["_removeAccents","_interopRequireDefault","require","_i18n","_components","_compose","_element","_data","_htmlEntities","_coreData","_blockEditor","_postPanelRow","_terms","_store","_jsxRuntime","getTitle","post","title","rendered","decodeEntities","id","__","getItemPriority","name","searchValue","normalizedName","removeAccents","toLowerCase","normalizedSearch","startsWith","length","Infinity","exports","PageAttributesParent","editPost","useDispatch","editorStore","fieldValue","setFieldValue","useState","isHierarchical","parentPostId","parentPostTitle","pageItems","useSelect","select","_pType$hierarchical","getPostType","getEntityRecords","getEntityRecord","coreStore","getCurrentPostId","getEditedPostAttribute","postTypeSlug","pageId","pType","postId","postIsHierarchical","hierarchical","query","per_page","exclude","parent_exclude","orderby","order","_fields","search","parentPost","parentOptions","useMemo","getOptionsFromTree","tree","level","mappedNodes","map","treeNode","value","label","repeat","rawName","children","sortedNodes","sort","a","b","priorityA","priorityB","flat","item","parent","buildTermsTree","opts","optsHasParent","find","unshift","handleKeydown","inputValue","handleChange","selectedPostId","jsx","ComboboxControl","__nextHasNoMarginBottom","__next40pxDefaultSize","className","help","options","onFilterValueChange","debounce","onChange","hideLabelFromVision","PostParentToggle","isOpen","onClick","parentTitle","Button","size","variant","sprintf","ParentRow","popoverAnchor","setPopoverAnchor","popoverProps","anchor","placement","offset","shift","default","ref","Dropdown","contentClassName","focusOnMount","renderToggle","onToggle","renderContent","onClose","jsxs","__experimentalInspectorPopoverHeader","ExternalLink","href","_default"],"sources":["@wordpress/editor/src/components/page-attributes/parent.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport removeAccents from 'remove-accents';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tButton,\n\tDropdown,\n\tComboboxControl,\n\tExternalLink,\n} from '@wordpress/components';\nimport { debounce } from '@wordpress/compose';\nimport { useState, useMemo } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport PostPanelRow from '../post-panel-row';\nimport { buildTermsTree } from '../../utils/terms';\nimport { store as editorStore } from '../../store';\n\nfunction getTitle( post ) {\n\treturn post?.title?.rendered\n\t\t? decodeEntities( post.title.rendered )\n\t\t: `#${ post.id } (${ __( 'no title' ) })`;\n}\n\nexport const getItemPriority = ( name, searchValue ) => {\n\tconst normalizedName = removeAccents( name || '' ).toLowerCase();\n\tconst normalizedSearch = removeAccents( searchValue || '' ).toLowerCase();\n\tif ( normalizedName === normalizedSearch ) {\n\t\treturn 0;\n\t}\n\n\tif ( normalizedName.startsWith( normalizedSearch ) ) {\n\t\treturn normalizedName.length;\n\t}\n\n\treturn Infinity;\n};\n\n/**\n * Renders the Page Attributes Parent component. A dropdown menu in an editor interface\n * for selecting the parent page of a given page.\n *\n * @return {Component|null} The component to be rendered. Return null if post type is not hierarchical.\n */\nexport function PageAttributesParent() {\n\tconst { editPost } = useDispatch( editorStore );\n\tconst [ fieldValue, setFieldValue ] = useState( false );\n\tconst { isHierarchical, parentPostId, parentPostTitle, pageItems } =\n\t\tuseSelect(\n\t\t\t( select ) => {\n\t\t\t\tconst { getPostType, getEntityRecords, getEntityRecord } =\n\t\t\t\t\tselect( coreStore );\n\t\t\t\tconst { getCurrentPostId, getEditedPostAttribute } =\n\t\t\t\t\tselect( editorStore );\n\t\t\t\tconst postTypeSlug = getEditedPostAttribute( 'type' );\n\t\t\t\tconst pageId = getEditedPostAttribute( 'parent' );\n\t\t\t\tconst pType = getPostType( postTypeSlug );\n\t\t\t\tconst postId = getCurrentPostId();\n\t\t\t\tconst postIsHierarchical = pType?.hierarchical ?? false;\n\t\t\t\tconst query = {\n\t\t\t\t\tper_page: 100,\n\t\t\t\t\texclude: postId,\n\t\t\t\t\tparent_exclude: postId,\n\t\t\t\t\torderby: 'menu_order',\n\t\t\t\t\torder: 'asc',\n\t\t\t\t\t_fields: 'id,title,parent',\n\t\t\t\t};\n\n\t\t\t\t// Perform a search when the field is changed.\n\t\t\t\tif ( !! fieldValue ) {\n\t\t\t\t\tquery.search = fieldValue;\n\t\t\t\t}\n\n\t\t\t\tconst parentPost = pageId\n\t\t\t\t\t? getEntityRecord( 'postType', postTypeSlug, pageId )\n\t\t\t\t\t: null;\n\n\t\t\t\treturn {\n\t\t\t\t\tisHierarchical: postIsHierarchical,\n\t\t\t\t\tparentPostId: pageId,\n\t\t\t\t\tparentPostTitle: parentPost ? getTitle( parentPost ) : '',\n\t\t\t\t\tpageItems: postIsHierarchical\n\t\t\t\t\t\t? getEntityRecords( 'postType', postTypeSlug, query )\n\t\t\t\t\t\t: null,\n\t\t\t\t};\n\t\t\t},\n\t\t\t[ fieldValue ]\n\t\t);\n\n\tconst parentOptions = useMemo( () => {\n\t\tconst getOptionsFromTree = ( tree, level = 0 ) => {\n\t\t\tconst mappedNodes = tree.map( ( treeNode ) => [\n\t\t\t\t{\n\t\t\t\t\tvalue: treeNode.id,\n\t\t\t\t\tlabel:\n\t\t\t\t\t\t'— '.repeat( level ) + decodeEntities( treeNode.name ),\n\t\t\t\t\trawName: treeNode.name,\n\t\t\t\t},\n\t\t\t\t...getOptionsFromTree( treeNode.children || [], level + 1 ),\n\t\t\t] );\n\n\t\t\tconst sortedNodes = mappedNodes.sort( ( [ a ], [ b ] ) => {\n\t\t\t\tconst priorityA = getItemPriority( a.rawName, fieldValue );\n\t\t\t\tconst priorityB = getItemPriority( b.rawName, fieldValue );\n\t\t\t\treturn priorityA >= priorityB ? 1 : -1;\n\t\t\t} );\n\n\t\t\treturn sortedNodes.flat();\n\t\t};\n\n\t\tif ( ! pageItems ) {\n\t\t\treturn [];\n\t\t}\n\n\t\tlet tree = pageItems.map( ( item ) => ( {\n\t\t\tid: item.id,\n\t\t\tparent: item.parent,\n\t\t\tname: getTitle( item ),\n\t\t} ) );\n\n\t\t// Only build a hierarchical tree when not searching.\n\t\tif ( ! fieldValue ) {\n\t\t\ttree = buildTermsTree( tree );\n\t\t}\n\n\t\tconst opts = getOptionsFromTree( tree );\n\n\t\t// Ensure the current parent is in the options list.\n\t\tconst optsHasParent = opts.find(\n\t\t\t( item ) => item.value === parentPostId\n\t\t);\n\t\tif ( parentPostTitle && ! optsHasParent ) {\n\t\t\topts.unshift( {\n\t\t\t\tvalue: parentPostId,\n\t\t\t\tlabel: parentPostTitle,\n\t\t\t} );\n\t\t}\n\t\treturn opts;\n\t}, [ pageItems, fieldValue, parentPostTitle, parentPostId ] );\n\n\tif ( ! isHierarchical ) {\n\t\treturn null;\n\t}\n\t/**\n\t * Handle user input.\n\t *\n\t * @param {string} inputValue The current value of the input field.\n\t */\n\tconst handleKeydown = ( inputValue ) => {\n\t\tsetFieldValue( inputValue );\n\t};\n\n\t/**\n\t * Handle author selection.\n\t *\n\t * @param {Object} selectedPostId The selected Author.\n\t */\n\tconst handleChange = ( selectedPostId ) => {\n\t\teditPost( { parent: selectedPostId } );\n\t};\n\n\treturn (\n\t\t<ComboboxControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\t__next40pxDefaultSize\n\t\t\tclassName=\"editor-page-attributes__parent\"\n\t\t\tlabel={ __( 'Parent' ) }\n\t\t\thelp={ __( 'Choose a parent page.' ) }\n\t\t\tvalue={ parentPostId }\n\t\t\toptions={ parentOptions }\n\t\t\tonFilterValueChange={ debounce( handleKeydown, 300 ) }\n\t\t\tonChange={ handleChange }\n\t\t\thideLabelFromVision\n\t\t/>\n\t);\n}\n\nfunction PostParentToggle( { isOpen, onClick } ) {\n\tconst parentPost = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute } = select( editorStore );\n\t\tconst parentPostId = getEditedPostAttribute( 'parent' );\n\t\tif ( ! parentPostId ) {\n\t\t\treturn null;\n\t\t}\n\t\tconst { getEntityRecord } = select( coreStore );\n\t\tconst postTypeSlug = getEditedPostAttribute( 'type' );\n\t\treturn getEntityRecord( 'postType', postTypeSlug, parentPostId );\n\t}, [] );\n\tconst parentTitle = useMemo(\n\t\t() => ( ! parentPost ? __( 'None' ) : getTitle( parentPost ) ),\n\t\t[ parentPost ]\n\t);\n\treturn (\n\t\t<Button\n\t\t\tsize=\"compact\"\n\t\t\tclassName=\"editor-post-parent__panel-toggle\"\n\t\t\tvariant=\"tertiary\"\n\t\t\taria-expanded={ isOpen }\n\t\t\t// translators: %s: Current post parent.\n\t\t\taria-label={ sprintf( __( 'Change parent: %s' ), parentTitle ) }\n\t\t\tonClick={ onClick }\n\t\t>\n\t\t\t{ parentTitle }\n\t\t</Button>\n\t);\n}\n\nexport function ParentRow() {\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\tplacement: 'left-start',\n\t\t\toffset: 36,\n\t\t\tshift: true,\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\treturn (\n\t\t<PostPanelRow label={ __( 'Parent' ) } ref={ setPopoverAnchor }>\n\t\t\t<Dropdown\n\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\tclassName=\"editor-post-parent__panel-dropdown\"\n\t\t\t\tcontentClassName=\"editor-post-parent__panel-dialog\"\n\t\t\t\tfocusOnMount\n\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t<PostParentToggle isOpen={ isOpen } onClick={ onToggle } />\n\t\t\t\t) }\n\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t<div className=\"editor-post-parent\">\n\t\t\t\t\t\t<InspectorPopoverHeader\n\t\t\t\t\t\t\ttitle={ __( 'Parent' ) }\n\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t/* translators: The domain name should be a reserved domain name to prevent linking to third party sites outside the WordPress project's control. You may also wish to use wordpress.org or a wordpress.org sub-domain. */\n\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\"Child pages inherit characteristics from their parent, such as URL structure. For instance, if 'Web Design' is a child of 'Services', its URL would be example.org/services/web-design.\"\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'They also show up as sub-items in the default navigation menu. '\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/page-post-settings-sidebar/#page-attributes'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( 'Learn more' ) }\n\t\t\t\t\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