@wordpress/editor 14.9.0 → 14.11.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 (518) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +2 -2
  3. package/build/bindings/api.js +0 -29
  4. package/build/bindings/api.js.map +1 -1
  5. package/build/bindings/post-meta.js +2 -1
  6. package/build/bindings/post-meta.js.map +1 -1
  7. package/build/components/autocompleters/user.js.map +1 -1
  8. package/build/components/block-manager/index.js +2 -2
  9. package/build/components/block-manager/index.js.map +1 -1
  10. package/build/components/collab-sidebar/add-comment.js +120 -0
  11. package/build/components/collab-sidebar/add-comment.js.map +1 -0
  12. package/build/components/collab-sidebar/comment-button-toolbar.js +37 -0
  13. package/build/components/collab-sidebar/comment-button-toolbar.js.map +1 -0
  14. package/build/components/collab-sidebar/comment-button.js +37 -0
  15. package/build/components/collab-sidebar/comment-button.js.map +1 -0
  16. package/build/components/collab-sidebar/comments.js +321 -0
  17. package/build/components/collab-sidebar/comments.js.map +1 -0
  18. package/build/components/collab-sidebar/constants.js +8 -0
  19. package/build/components/collab-sidebar/constants.js.map +1 -0
  20. package/build/components/collab-sidebar/index.js +272 -0
  21. package/build/components/collab-sidebar/index.js.map +1 -0
  22. package/build/components/collab-sidebar/utils.js +16 -0
  23. package/build/components/collab-sidebar/utils.js.map +1 -0
  24. package/build/components/commands/index.js +6 -6
  25. package/build/components/commands/index.js.map +1 -1
  26. package/build/components/create-template-part-modal/index.js.map +1 -1
  27. package/build/components/create-template-part-modal/utils.js.map +1 -1
  28. package/build/components/document-bar/index.js +8 -7
  29. package/build/components/document-bar/index.js.map +1 -1
  30. package/build/components/document-outline/index.js.map +1 -1
  31. package/build/components/document-outline/item.js.map +1 -1
  32. package/build/components/document-tools/index.js +2 -6
  33. package/build/components/document-tools/index.js.map +1 -1
  34. package/build/components/editor-interface/index.js +4 -14
  35. package/build/components/editor-interface/index.js.map +1 -1
  36. package/build/components/entities-saved-states/index.js +2 -2
  37. package/build/components/entities-saved-states/index.js.map +1 -1
  38. package/build/components/global-keyboard-shortcuts/register-shortcuts.js +3 -3
  39. package/build/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
  40. package/build/components/global-styles-provider/index.js +13 -3
  41. package/build/components/global-styles-provider/index.js.map +1 -1
  42. package/build/components/header/index.js +5 -2
  43. package/build/components/header/index.js.map +1 -1
  44. package/build/components/inserter-sidebar/index.js +2 -2
  45. package/build/components/inserter-sidebar/index.js.map +1 -1
  46. package/build/components/media-categories/index.js.map +1 -1
  47. package/build/components/page-attributes/parent.js +5 -5
  48. package/build/components/page-attributes/parent.js.map +1 -1
  49. package/build/components/plugin-document-setting-panel/index.js.map +1 -1
  50. package/build/components/plugin-more-menu-item/index.js +13 -11
  51. package/build/components/plugin-more-menu-item/index.js.map +1 -1
  52. package/build/components/plugin-preview-menu-item/index.js +15 -13
  53. package/build/components/plugin-preview-menu-item/index.js.map +1 -1
  54. package/build/components/plugin-sidebar/index.js +0 -15
  55. package/build/components/plugin-sidebar/index.js.map +1 -1
  56. package/build/components/post-actions/index.js +5 -5
  57. package/build/components/post-actions/index.js.map +1 -1
  58. package/build/components/post-author/panel.js +4 -4
  59. package/build/components/post-author/panel.js.map +1 -1
  60. package/build/components/post-card-panel/index.js +7 -36
  61. package/build/components/post-card-panel/index.js.map +1 -1
  62. package/build/components/post-content-information/index.js +2 -3
  63. package/build/components/post-content-information/index.js.map +1 -1
  64. package/build/components/post-featured-image/index.js +26 -7
  65. package/build/components/post-featured-image/index.js.map +1 -1
  66. package/build/components/post-format/index.js +1 -1
  67. package/build/components/post-format/index.js.map +1 -1
  68. package/build/components/post-last-revision/index.js +1 -1
  69. package/build/components/post-last-revision/index.js.map +1 -1
  70. package/build/components/post-locked-modal/index.js +2 -2
  71. package/build/components/post-locked-modal/index.js.map +1 -1
  72. package/build/components/post-preview-button/index.js +1 -1
  73. package/build/components/post-preview-button/index.js.map +1 -1
  74. package/build/components/post-publish-button/index.js.map +1 -1
  75. package/build/components/post-publish-panel/maybe-post-format-panel.js +1 -1
  76. package/build/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  77. package/build/components/post-publish-panel/maybe-upload-media.js +1 -0
  78. package/build/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  79. package/build/components/post-publish-panel/media-util.js +1 -0
  80. package/build/components/post-publish-panel/media-util.js.map +1 -1
  81. package/build/components/post-publish-panel/postpublish.js +1 -1
  82. package/build/components/post-publish-panel/postpublish.js.map +1 -1
  83. package/build/components/post-schedule/label.js +1 -1
  84. package/build/components/post-schedule/label.js.map +1 -1
  85. package/build/components/post-taxonomies/flat-term-selector.js +13 -5
  86. package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
  87. package/build/components/post-taxonomies/hierarchical-term-selector.js +3 -2
  88. package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  89. package/build/components/post-taxonomies/index.js +1 -1
  90. package/build/components/post-taxonomies/index.js.map +1 -1
  91. package/build/components/post-taxonomies/panel.js.map +1 -1
  92. package/build/components/post-template/classic-theme.js +2 -4
  93. package/build/components/post-template/classic-theme.js.map +1 -1
  94. package/build/components/post-text-editor/index.js.map +1 -1
  95. package/build/components/post-title/index.js +15 -19
  96. package/build/components/post-title/index.js.map +1 -1
  97. package/build/components/post-title/index.native.js +2 -2
  98. package/build/components/post-title/index.native.js.map +1 -1
  99. package/build/components/post-url/index.js +76 -63
  100. package/build/components/post-url/index.js.map +1 -1
  101. package/build/components/post-url/panel.js +49 -29
  102. package/build/components/post-url/panel.js.map +1 -1
  103. package/build/components/post-visibility/index.js.map +1 -1
  104. package/build/components/preferences-modal/index.js.map +1 -1
  105. package/build/components/preview-dropdown/index.js +0 -4
  106. package/build/components/preview-dropdown/index.js.map +1 -1
  107. package/build/components/provider/index.js +10 -12
  108. package/build/components/provider/index.js.map +1 -1
  109. package/build/components/provider/use-block-editor-settings.js +1 -1
  110. package/build/components/provider/use-block-editor-settings.js.map +1 -1
  111. package/build/components/resizable-editor/resize-handle.js.map +1 -1
  112. package/build/components/sidebar/header.js +2 -1
  113. package/build/components/sidebar/header.js.map +1 -1
  114. package/build/components/sidebar/index.js +3 -3
  115. package/build/components/sidebar/index.js.map +1 -1
  116. package/build/components/time-to-read/index.js +2 -2
  117. package/build/components/time-to-read/index.js.map +1 -1
  118. package/build/components/visual-editor/edit-template-blocks-notification.js +4 -1
  119. package/build/components/visual-editor/edit-template-blocks-notification.js.map +1 -1
  120. package/build/components/visual-editor/index.js +24 -25
  121. package/build/components/visual-editor/index.js.map +1 -1
  122. package/build/components/visual-editor/use-select-nearest-editable-block.js.map +1 -1
  123. package/build/components/visual-editor/use-zoom-out-mode-exit.js +52 -0
  124. package/build/components/visual-editor/use-zoom-out-mode-exit.js.map +1 -0
  125. package/build/components/zoom-out-toggle/index.js +37 -5
  126. package/build/components/zoom-out-toggle/index.js.map +1 -1
  127. package/build/dataviews/actions/duplicate-template-part.js +3 -3
  128. package/build/dataviews/actions/duplicate-template-part.js.map +1 -1
  129. package/build/private-apis.js +0 -1
  130. package/build/private-apis.js.map +1 -1
  131. package/build/store/actions.js +30 -4
  132. package/build/store/actions.js.map +1 -1
  133. package/build/store/constants.js +1 -0
  134. package/build/store/constants.js.map +1 -1
  135. package/build/store/local-autosave.js.map +1 -1
  136. package/build/store/private-actions.js +8 -7
  137. package/build/store/private-actions.js.map +1 -1
  138. package/build/store/selectors.js +24 -2
  139. package/build/store/selectors.js.map +1 -1
  140. package/build/utils/media-upload/index.js.map +1 -1
  141. package/build/utils/pageTypeBadge.js +51 -0
  142. package/build/utils/pageTypeBadge.js.map +1 -0
  143. package/build/utils/terms.js +2 -2
  144. package/build/utils/terms.js.map +1 -1
  145. package/build-module/bindings/api.js +1 -29
  146. package/build-module/bindings/api.js.map +1 -1
  147. package/build-module/bindings/post-meta.js +2 -1
  148. package/build-module/bindings/post-meta.js.map +1 -1
  149. package/build-module/components/autocompleters/user.js +1 -3
  150. package/build-module/components/autocompleters/user.js.map +1 -1
  151. package/build-module/components/block-manager/category.js +1 -2
  152. package/build-module/components/block-manager/category.js.map +1 -1
  153. package/build-module/components/block-manager/checklist.js +1 -2
  154. package/build-module/components/block-manager/checklist.js.map +1 -1
  155. package/build-module/components/block-manager/index.js +3 -4
  156. package/build-module/components/block-manager/index.js.map +1 -1
  157. package/build-module/components/block-settings-menu/content-only-settings-menu.js +1 -3
  158. package/build-module/components/block-settings-menu/content-only-settings-menu.js.map +1 -1
  159. package/build-module/components/blog-title/index.js +1 -3
  160. package/build-module/components/blog-title/index.js.map +1 -1
  161. package/build-module/components/collab-sidebar/add-comment.js +114 -0
  162. package/build-module/components/collab-sidebar/add-comment.js.map +1 -0
  163. package/build-module/components/collab-sidebar/comment-button-toolbar.js +30 -0
  164. package/build-module/components/collab-sidebar/comment-button-toolbar.js.map +1 -0
  165. package/build-module/components/collab-sidebar/comment-button.js +30 -0
  166. package/build-module/components/collab-sidebar/comment-button.js.map +1 -0
  167. package/build-module/components/collab-sidebar/comments.js +314 -0
  168. package/build-module/components/collab-sidebar/comments.js.map +1 -0
  169. package/build-module/components/collab-sidebar/constants.js +2 -0
  170. package/build-module/components/collab-sidebar/constants.js.map +1 -0
  171. package/build-module/components/collab-sidebar/index.js +264 -0
  172. package/build-module/components/collab-sidebar/index.js.map +1 -0
  173. package/build-module/components/collab-sidebar/utils.js +10 -0
  174. package/build-module/components/collab-sidebar/utils.js.map +1 -0
  175. package/build-module/components/collapsible-block-toolbar/index.js +1 -3
  176. package/build-module/components/collapsible-block-toolbar/index.js.map +1 -1
  177. package/build-module/components/commands/index.js +6 -6
  178. package/build-module/components/commands/index.js.map +1 -1
  179. package/build-module/components/create-template-part-modal/index.js +1 -2
  180. package/build-module/components/create-template-part-modal/index.js.map +1 -1
  181. package/build-module/components/create-template-part-modal/utils.js.map +1 -1
  182. package/build-module/components/document-bar/index.js +10 -10
  183. package/build-module/components/document-bar/index.js.map +1 -1
  184. package/build-module/components/document-outline/index.js +1 -2
  185. package/build-module/components/document-outline/index.js.map +1 -1
  186. package/build-module/components/document-outline/item.js +1 -2
  187. package/build-module/components/document-outline/item.js.map +1 -1
  188. package/build-module/components/document-tools/index.js +4 -10
  189. package/build-module/components/document-tools/index.js.map +1 -1
  190. package/build-module/components/editor/index.js +1 -3
  191. package/build-module/components/editor/index.js.map +1 -1
  192. package/build-module/components/editor-help/add-blocks.native.js +1 -3
  193. package/build-module/components/editor-help/add-blocks.native.js.map +1 -1
  194. package/build-module/components/editor-help/customize-blocks.native.js +1 -3
  195. package/build-module/components/editor-help/customize-blocks.native.js.map +1 -1
  196. package/build-module/components/editor-help/help-detail-navigation-screen.native.js +1 -2
  197. package/build-module/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
  198. package/build-module/components/editor-help/index.native.js +1 -3
  199. package/build-module/components/editor-help/index.native.js.map +1 -1
  200. package/build-module/components/editor-help/intro-to-blocks.native.js +1 -3
  201. package/build-module/components/editor-help/intro-to-blocks.native.js.map +1 -1
  202. package/build-module/components/editor-help/move-blocks.native.js +1 -3
  203. package/build-module/components/editor-help/move-blocks.native.js.map +1 -1
  204. package/build-module/components/editor-help/remove-blocks.native.js +1 -3
  205. package/build-module/components/editor-help/remove-blocks.native.js.map +1 -1
  206. package/build-module/components/editor-help/view-sections.native.js +1 -2
  207. package/build-module/components/editor-help/view-sections.native.js.map +1 -1
  208. package/build-module/components/editor-interface/index.js +5 -17
  209. package/build-module/components/editor-interface/index.js.map +1 -1
  210. package/build-module/components/editor-notices/index.js +1 -3
  211. package/build-module/components/editor-notices/index.js.map +1 -1
  212. package/build-module/components/entities-saved-states/entity-record-item.js +1 -3
  213. package/build-module/components/entities-saved-states/entity-record-item.js.map +1 -1
  214. package/build-module/components/entities-saved-states/entity-type-list.js +1 -2
  215. package/build-module/components/entities-saved-states/entity-type-list.js.map +1 -1
  216. package/build-module/components/entities-saved-states/index.js +3 -4
  217. package/build-module/components/entities-saved-states/index.js.map +1 -1
  218. package/build-module/components/error-boundary/index.native.js +1 -2
  219. package/build-module/components/error-boundary/index.native.js.map +1 -1
  220. package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js +3 -3
  221. package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
  222. package/build-module/components/global-styles-provider/index.js +13 -3
  223. package/build-module/components/global-styles-provider/index.js.map +1 -1
  224. package/build-module/components/header/index.js +6 -4
  225. package/build-module/components/header/index.js.map +1 -1
  226. package/build-module/components/inserter-sidebar/index.js +2 -2
  227. package/build-module/components/inserter-sidebar/index.js.map +1 -1
  228. package/build-module/components/keyboard-shortcut-help-modal/index.js +1 -2
  229. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  230. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +1 -3
  231. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  232. package/build-module/components/list-view-sidebar/list-view-outline.js +1 -3
  233. package/build-module/components/list-view-sidebar/list-view-outline.js.map +1 -1
  234. package/build-module/components/media-categories/index.js.map +1 -1
  235. package/build-module/components/more-menu/index.js +1 -3
  236. package/build-module/components/more-menu/index.js.map +1 -1
  237. package/build-module/components/offline-status/index.native.js +1 -2
  238. package/build-module/components/offline-status/index.native.js.map +1 -1
  239. package/build-module/components/page-attributes/parent.js +6 -7
  240. package/build-module/components/page-attributes/parent.js.map +1 -1
  241. package/build-module/components/plugin-document-setting-panel/index.js +1 -3
  242. package/build-module/components/plugin-document-setting-panel/index.js.map +1 -1
  243. package/build-module/components/plugin-more-menu-item/index.js +12 -10
  244. package/build-module/components/plugin-more-menu-item/index.js.map +1 -1
  245. package/build-module/components/plugin-preview-menu-item/index.js +14 -12
  246. package/build-module/components/plugin-preview-menu-item/index.js.map +1 -1
  247. package/build-module/components/plugin-sidebar/index.js +0 -15
  248. package/build-module/components/plugin-sidebar/index.js.map +1 -1
  249. package/build-module/components/post-actions/index.js +6 -8
  250. package/build-module/components/post-actions/index.js.map +1 -1
  251. package/build-module/components/post-author/panel.js +5 -6
  252. package/build-module/components/post-author/panel.js.map +1 -1
  253. package/build-module/components/post-card-panel/index.js +9 -38
  254. package/build-module/components/post-card-panel/index.js.map +1 -1
  255. package/build-module/components/post-content-information/index.js +2 -3
  256. package/build-module/components/post-content-information/index.js.map +1 -1
  257. package/build-module/components/post-discussion/panel.js +1 -2
  258. package/build-module/components/post-discussion/panel.js.map +1 -1
  259. package/build-module/components/post-excerpt/panel.js +1 -3
  260. package/build-module/components/post-excerpt/panel.js.map +1 -1
  261. package/build-module/components/post-featured-image/index.js +27 -9
  262. package/build-module/components/post-featured-image/index.js.map +1 -1
  263. package/build-module/components/post-format/index.js +2 -3
  264. package/build-module/components/post-format/index.js.map +1 -1
  265. package/build-module/components/post-format/panel.js +1 -2
  266. package/build-module/components/post-format/panel.js.map +1 -1
  267. package/build-module/components/post-last-revision/index.js +1 -1
  268. package/build-module/components/post-last-revision/index.js.map +1 -1
  269. package/build-module/components/post-locked-modal/index.js +3 -5
  270. package/build-module/components/post-locked-modal/index.js.map +1 -1
  271. package/build-module/components/post-panel-row/index.js +1 -2
  272. package/build-module/components/post-panel-row/index.js.map +1 -1
  273. package/build-module/components/post-preview-button/index.js +2 -4
  274. package/build-module/components/post-preview-button/index.js.map +1 -1
  275. package/build-module/components/post-publish-button/index.js +1 -2
  276. package/build-module/components/post-publish-button/index.js.map +1 -1
  277. package/build-module/components/post-publish-panel/index.js +1 -3
  278. package/build-module/components/post-publish-panel/index.js.map +1 -1
  279. package/build-module/components/post-publish-panel/maybe-category-panel.js +1 -2
  280. package/build-module/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  281. package/build-module/components/post-publish-panel/maybe-post-format-panel.js +2 -3
  282. package/build-module/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  283. package/build-module/components/post-publish-panel/maybe-tags-panel.js +1 -2
  284. package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  285. package/build-module/components/post-publish-panel/maybe-upload-media.js +2 -2
  286. package/build-module/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  287. package/build-module/components/post-publish-panel/media-util.js +1 -0
  288. package/build-module/components/post-publish-panel/media-util.js.map +1 -1
  289. package/build-module/components/post-publish-panel/postpublish.js +2 -4
  290. package/build-module/components/post-publish-panel/postpublish.js.map +1 -1
  291. package/build-module/components/post-publish-panel/prepublish.js +1 -3
  292. package/build-module/components/post-publish-panel/prepublish.js.map +1 -1
  293. package/build-module/components/post-saved-state/index.js +1 -2
  294. package/build-module/components/post-saved-state/index.js.map +1 -1
  295. package/build-module/components/post-schedule/label.js +1 -1
  296. package/build-module/components/post-schedule/label.js.map +1 -1
  297. package/build-module/components/post-status/index.js +1 -3
  298. package/build-module/components/post-status/index.js.map +1 -1
  299. package/build-module/components/post-switch-to-draft-button/index.js +1 -3
  300. package/build-module/components/post-switch-to-draft-button/index.js.map +1 -1
  301. package/build-module/components/post-taxonomies/flat-term-selector.js +16 -10
  302. package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
  303. package/build-module/components/post-taxonomies/hierarchical-term-selector.js +4 -4
  304. package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  305. package/build-module/components/post-taxonomies/index.js +1 -1
  306. package/build-module/components/post-taxonomies/index.js.map +1 -1
  307. package/build-module/components/post-taxonomies/most-used-terms.js +1 -2
  308. package/build-module/components/post-taxonomies/most-used-terms.js.map +1 -1
  309. package/build-module/components/post-taxonomies/panel.js.map +1 -1
  310. package/build-module/components/post-template/block-theme.js +1 -3
  311. package/build-module/components/post-template/block-theme.js.map +1 -1
  312. package/build-module/components/post-template/classic-theme.js +3 -6
  313. package/build-module/components/post-template/classic-theme.js.map +1 -1
  314. package/build-module/components/post-template/create-new-template-modal.js +1 -2
  315. package/build-module/components/post-template/create-new-template-modal.js.map +1 -1
  316. package/build-module/components/post-template/create-new-template.js +1 -3
  317. package/build-module/components/post-template/create-new-template.js.map +1 -1
  318. package/build-module/components/post-template/swap-template-button.js +1 -3
  319. package/build-module/components/post-template/swap-template-button.js.map +1 -1
  320. package/build-module/components/post-text-editor/index.js +1 -3
  321. package/build-module/components/post-text-editor/index.js.map +1 -1
  322. package/build-module/components/post-title/index.js +15 -19
  323. package/build-module/components/post-title/index.js.map +1 -1
  324. package/build-module/components/post-title/index.native.js +2 -2
  325. package/build-module/components/post-title/index.native.js.map +1 -1
  326. package/build-module/components/post-trash/index.js +1 -2
  327. package/build-module/components/post-trash/index.js.map +1 -1
  328. package/build-module/components/post-url/index.js +78 -66
  329. package/build-module/components/post-url/index.js.map +1 -1
  330. package/build-module/components/post-url/panel.js +51 -31
  331. package/build-module/components/post-url/panel.js.map +1 -1
  332. package/build-module/components/post-visibility/index.js +1 -2
  333. package/build-module/components/post-visibility/index.js.map +1 -1
  334. package/build-module/components/posts-per-page/index.js +1 -3
  335. package/build-module/components/posts-per-page/index.js.map +1 -1
  336. package/build-module/components/preferences-modal/index.js +1 -3
  337. package/build-module/components/preferences-modal/index.js.map +1 -1
  338. package/build-module/components/preview-dropdown/index.js +1 -7
  339. package/build-module/components/preview-dropdown/index.js.map +1 -1
  340. package/build-module/components/provider/index.js +11 -15
  341. package/build-module/components/provider/index.js.map +1 -1
  342. package/build-module/components/provider/index.native.js +1 -3
  343. package/build-module/components/provider/index.native.js.map +1 -1
  344. package/build-module/components/provider/use-block-editor-settings.js +1 -1
  345. package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
  346. package/build-module/components/resizable-editor/resize-handle.js +1 -3
  347. package/build-module/components/resizable-editor/resize-handle.js.map +1 -1
  348. package/build-module/components/save-publish-panels/index.js +1 -3
  349. package/build-module/components/save-publish-panels/index.js.map +1 -1
  350. package/build-module/components/sidebar/header.js +3 -3
  351. package/build-module/components/sidebar/header.js.map +1 -1
  352. package/build-module/components/sidebar/index.js +5 -6
  353. package/build-module/components/sidebar/index.js.map +1 -1
  354. package/build-module/components/sidebar/post-summary.js +1 -3
  355. package/build-module/components/sidebar/post-summary.js.map +1 -1
  356. package/build-module/components/site-discussion/index.js +1 -3
  357. package/build-module/components/site-discussion/index.js.map +1 -1
  358. package/build-module/components/start-template-options/index.js +1 -2
  359. package/build-module/components/start-template-options/index.js.map +1 -1
  360. package/build-module/components/table-of-contents/panel.js +1 -3
  361. package/build-module/components/table-of-contents/panel.js.map +1 -1
  362. package/build-module/components/template-part-menu-items/convert-to-template-part.js +1 -3
  363. package/build-module/components/template-part-menu-items/convert-to-template-part.js.map +1 -1
  364. package/build-module/components/template-validation-notice/index.js +1 -3
  365. package/build-module/components/template-validation-notice/index.js.map +1 -1
  366. package/build-module/components/text-editor/index.js +1 -2
  367. package/build-module/components/text-editor/index.js.map +1 -1
  368. package/build-module/components/time-to-read/index.js +2 -2
  369. package/build-module/components/time-to-read/index.js.map +1 -1
  370. package/build-module/components/visual-editor/edit-template-blocks-notification.js +4 -1
  371. package/build-module/components/visual-editor/edit-template-blocks-notification.js.map +1 -1
  372. package/build-module/components/visual-editor/index.js +26 -29
  373. package/build-module/components/visual-editor/index.js.map +1 -1
  374. package/build-module/components/visual-editor/use-select-nearest-editable-block.js.map +1 -1
  375. package/build-module/components/visual-editor/use-zoom-out-mode-exit.js +46 -0
  376. package/build-module/components/visual-editor/use-zoom-out-mode-exit.js.map +1 -0
  377. package/build-module/components/zoom-out-toggle/index.js +37 -5
  378. package/build-module/components/zoom-out-toggle/index.js.map +1 -1
  379. package/build-module/dataviews/actions/duplicate-template-part.js +4 -4
  380. package/build-module/dataviews/actions/duplicate-template-part.js.map +1 -1
  381. package/build-module/hooks/pattern-overrides.js +1 -3
  382. package/build-module/hooks/pattern-overrides.js.map +1 -1
  383. package/build-module/private-apis.js +1 -2
  384. package/build-module/private-apis.js.map +1 -1
  385. package/build-module/store/actions.js +30 -4
  386. package/build-module/store/actions.js.map +1 -1
  387. package/build-module/store/constants.js +1 -0
  388. package/build-module/store/constants.js.map +1 -1
  389. package/build-module/store/local-autosave.js.map +1 -1
  390. package/build-module/store/private-actions.js +9 -8
  391. package/build-module/store/private-actions.js.map +1 -1
  392. package/build-module/store/selectors.js +24 -2
  393. package/build-module/store/selectors.js.map +1 -1
  394. package/build-module/utils/media-upload/index.js.map +1 -1
  395. package/build-module/utils/pageTypeBadge.js +45 -0
  396. package/build-module/utils/pageTypeBadge.js.map +1 -0
  397. package/build-module/utils/terms.js +2 -2
  398. package/build-module/utils/terms.js.map +1 -1
  399. package/build-style/style-rtl.css +116 -59
  400. package/build-style/style.css +116 -59
  401. package/build-types/bindings/api.d.ts +0 -13
  402. package/build-types/bindings/api.d.ts.map +1 -1
  403. package/build-types/bindings/post-meta.d.ts.map +1 -1
  404. package/build-types/components/collab-sidebar/add-comment.d.ts +15 -0
  405. package/build-types/components/collab-sidebar/add-comment.d.ts.map +1 -0
  406. package/build-types/components/collab-sidebar/comment-button-toolbar.d.ts +5 -0
  407. package/build-types/components/collab-sidebar/comment-button-toolbar.d.ts.map +1 -0
  408. package/build-types/components/collab-sidebar/comment-button.d.ts +5 -0
  409. package/build-types/components/collab-sidebar/comment-button.d.ts.map +1 -0
  410. package/build-types/components/collab-sidebar/comments.d.ts +19 -0
  411. package/build-types/components/collab-sidebar/comments.d.ts.map +1 -0
  412. package/build-types/components/collab-sidebar/constants.d.ts +2 -0
  413. package/build-types/components/collab-sidebar/constants.d.ts.map +1 -0
  414. package/build-types/components/collab-sidebar/index.d.ts +5 -0
  415. package/build-types/components/collab-sidebar/index.d.ts.map +1 -0
  416. package/build-types/components/collab-sidebar/utils.d.ts +8 -0
  417. package/build-types/components/collab-sidebar/utils.d.ts.map +1 -0
  418. package/build-types/components/commands/index.d.ts.map +1 -1
  419. package/build-types/components/document-bar/index.d.ts.map +1 -1
  420. package/build-types/components/document-tools/index.d.ts.map +1 -1
  421. package/build-types/components/editor-interface/index.d.ts +1 -2
  422. package/build-types/components/editor-interface/index.d.ts.map +1 -1
  423. package/build-types/components/global-styles-provider/index.d.ts.map +1 -1
  424. package/build-types/components/header/index.d.ts.map +1 -1
  425. package/build-types/components/inserter-sidebar/index.d.ts.map +1 -1
  426. package/build-types/components/page-attributes/parent.d.ts.map +1 -1
  427. package/build-types/components/plugin-more-menu-item/index.d.ts +62 -2
  428. package/build-types/components/plugin-more-menu-item/index.d.ts.map +1 -1
  429. package/build-types/components/plugin-preview-menu-item/index.d.ts +41 -2
  430. package/build-types/components/plugin-preview-menu-item/index.d.ts.map +1 -1
  431. package/build-types/components/plugin-sidebar/index.d.ts.map +1 -1
  432. package/build-types/components/post-author/panel.d.ts.map +1 -1
  433. package/build-types/components/post-card-panel/index.d.ts.map +1 -1
  434. package/build-types/components/post-taxonomies/flat-term-selector.d.ts.map +1 -1
  435. package/build-types/components/post-taxonomies/hierarchical-term-selector.d.ts.map +1 -1
  436. package/build-types/components/post-template/classic-theme.d.ts.map +1 -1
  437. package/build-types/components/post-url/index.d.ts.map +1 -1
  438. package/build-types/components/post-url/panel.d.ts.map +1 -1
  439. package/build-types/components/preview-dropdown/index.d.ts.map +1 -1
  440. package/build-types/components/provider/index.d.ts.map +1 -1
  441. package/build-types/components/sidebar/index.d.ts.map +1 -1
  442. package/build-types/components/visual-editor/edit-template-blocks-notification.d.ts.map +1 -1
  443. package/build-types/components/visual-editor/index.d.ts.map +1 -1
  444. package/build-types/components/visual-editor/use-zoom-out-mode-exit.d.ts +5 -0
  445. package/build-types/components/visual-editor/use-zoom-out-mode-exit.d.ts.map +1 -0
  446. package/build-types/components/zoom-out-toggle/index.d.ts +3 -1
  447. package/build-types/components/zoom-out-toggle/index.d.ts.map +1 -1
  448. package/build-types/private-apis.d.ts.map +1 -1
  449. package/build-types/store/actions.d.ts +1 -4
  450. package/build-types/store/actions.d.ts.map +1 -1
  451. package/build-types/store/selectors.d.ts +21 -0
  452. package/build-types/store/selectors.d.ts.map +1 -1
  453. package/build-types/utils/pageTypeBadge.d.ts +5 -0
  454. package/build-types/utils/pageTypeBadge.d.ts.map +1 -0
  455. package/build-types/utils/terms.d.ts.map +1 -1
  456. package/package.json +39 -38
  457. package/src/bindings/api.js +1 -32
  458. package/src/bindings/post-meta.js +1 -0
  459. package/src/components/collab-sidebar/add-comment.js +124 -0
  460. package/src/components/collab-sidebar/comment-button-toolbar.js +29 -0
  461. package/src/components/collab-sidebar/comment-button.js +31 -0
  462. package/src/components/collab-sidebar/comments.js +404 -0
  463. package/src/components/collab-sidebar/constants.js +1 -0
  464. package/src/components/collab-sidebar/index.js +307 -0
  465. package/src/components/collab-sidebar/style.scss +111 -0
  466. package/src/components/collab-sidebar/utils.js +9 -0
  467. package/src/components/commands/index.js +9 -7
  468. package/src/components/document-bar/index.js +15 -7
  469. package/src/components/document-bar/style.scss +0 -4
  470. package/src/components/document-tools/index.js +2 -8
  471. package/src/components/editor-interface/index.js +4 -18
  472. package/src/components/entities-saved-states/index.js +2 -2
  473. package/src/components/global-keyboard-shortcuts/register-shortcuts.js +3 -3
  474. package/src/components/global-styles-provider/index.js +20 -6
  475. package/src/components/header/index.js +3 -1
  476. package/src/components/header/style.scss +1 -0
  477. package/src/components/inserter-sidebar/index.js +3 -6
  478. package/src/components/page-attributes/parent.js +6 -4
  479. package/src/components/plugin-more-menu-item/index.js +12 -11
  480. package/src/components/plugin-preview-menu-item/index.js +14 -13
  481. package/src/components/plugin-sidebar/index.js +0 -13
  482. package/src/components/post-actions/index.js +8 -11
  483. package/src/components/post-author/panel.js +4 -2
  484. package/src/components/post-card-panel/index.js +9 -43
  485. package/src/components/post-card-panel/style.scss +1 -9
  486. package/src/components/post-content-information/index.js +1 -1
  487. package/src/components/post-featured-image/index.js +31 -16
  488. package/src/components/post-featured-image/style.scss +5 -2
  489. package/src/components/post-last-revision/index.js +1 -1
  490. package/src/components/post-saved-state/test/__snapshots__/index.js.snap +1 -1
  491. package/src/components/post-schedule/label.js +1 -1
  492. package/src/components/post-sticky/test/index.js +6 -6
  493. package/src/components/post-taxonomies/flat-term-selector.js +15 -4
  494. package/src/components/post-taxonomies/hierarchical-term-selector.js +3 -2
  495. package/src/components/post-template/classic-theme.js +1 -2
  496. package/src/components/post-url/index.js +67 -55
  497. package/src/components/post-url/panel.js +61 -35
  498. package/src/components/post-url/style.scss +21 -3
  499. package/src/components/preview-dropdown/index.js +0 -2
  500. package/src/components/provider/index.js +32 -24
  501. package/src/components/provider/use-block-editor-settings.js +1 -1
  502. package/src/components/sidebar/header.js +3 -2
  503. package/src/components/sidebar/index.js +5 -3
  504. package/src/components/time-to-read/index.js +3 -3
  505. package/src/components/visual-editor/edit-template-blocks-notification.js +5 -1
  506. package/src/components/visual-editor/index.js +32 -39
  507. package/src/components/visual-editor/use-zoom-out-mode-exit.js +49 -0
  508. package/src/components/zoom-out-toggle/index.js +39 -5
  509. package/src/dataviews/actions/duplicate-template-part.tsx +3 -3
  510. package/src/private-apis.js +1 -5
  511. package/src/store/actions.js +33 -4
  512. package/src/store/private-actions.js +3 -3
  513. package/src/store/selectors.js +24 -2
  514. package/src/style.scss +1 -0
  515. package/src/utils/pageTypeBadge.js +41 -0
  516. package/src/utils/terms.js +4 -2
  517. package/src/utils/test/terms.js +3 -3
  518. package/tsconfig.tsbuildinfo +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["AccessibilityInfo","Text","View","usePreferredColorSchemeStyle","useNetworkConnectivity","usePrevious","Icon","offline","offlineIcon","__","useEffect","styles","jsx","_jsx","jsxs","_jsxs","useAccessibilityLiveRegion","message","isActive","inactiveMessage","announceForAccessibility","prevIsActive","unconditionalMessage","initialRender","OfflineStatus","isConnected","containerStyle","offline__dark","textStyle","iconStyle","accessible","accessibilityRole","accessibilityLabel","style","children","fill","icon"],"sources":["@wordpress/editor/src/components/offline-status/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { AccessibilityInfo, Text, View } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tusePreferredColorSchemeStyle,\n\tuseNetworkConnectivity,\n\tusePrevious,\n} from '@wordpress/compose';\nimport { Icon } from '@wordpress/components';\nimport { offline as offlineIcon } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.native.scss';\n\n/**\n * Conditionally announces messages for screen reader users. This Hook provides\n * two benefits over React Native's `accessibilityLiveRegion`:\n *\n * 1. It works on both iOS and Android.\n * 2. It allows announcing a secondary message when the component is inactive.\n *\n * @param {string} message The message to announce.\n * @param {Object} options Options for the Hook.\n * @param {boolean} [options.isActive] Whether the message should be announced.\n * @param {string} [options.inactiveMessage] The message to announce when inactive.\n */\nfunction useAccessibilityLiveRegion( message, { isActive, inactiveMessage } ) {\n\tconst { announceForAccessibility } = AccessibilityInfo;\n\tconst prevIsActive = usePrevious( isActive );\n\n\tuseEffect( () => {\n\t\tconst unconditionalMessage = typeof isActive === 'undefined';\n\t\tconst initialRender = typeof prevIsActive === 'undefined';\n\n\t\tif (\n\t\t\tunconditionalMessage ||\n\t\t\t( isActive && ! prevIsActive && ! initialRender )\n\t\t) {\n\t\t\tannounceForAccessibility( message );\n\t\t} else if ( ! isActive && prevIsActive && inactiveMessage ) {\n\t\t\tannounceForAccessibility( inactiveMessage );\n\t\t}\n\t}, [\n\t\tmessage,\n\t\tisActive,\n\t\tprevIsActive,\n\t\tinactiveMessage,\n\t\tannounceForAccessibility,\n\t] );\n}\n\nconst OfflineStatus = () => {\n\tconst { isConnected } = useNetworkConnectivity();\n\n\tuseAccessibilityLiveRegion( __( 'Network connection re-established' ), {\n\t\tisActive: isConnected,\n\t\tinactiveMessage: __( 'Network connection lost, working offline' ),\n\t} );\n\n\tconst containerStyle = usePreferredColorSchemeStyle(\n\t\tstyles.offline,\n\t\tstyles.offline__dark\n\t);\n\n\tconst textStyle = usePreferredColorSchemeStyle(\n\t\tstyles[ 'offline--text' ],\n\t\tstyles[ 'offline--text__dark' ]\n\t);\n\n\tconst iconStyle = usePreferredColorSchemeStyle(\n\t\tstyles[ 'offline--icon' ],\n\t\tstyles[ 'offline--icon__dark' ]\n\t);\n\n\treturn ! isConnected ? (\n\t\t<View\n\t\t\taccessible\n\t\t\taccessibilityRole=\"alert\"\n\t\t\taccessibilityLabel={ __(\n\t\t\t\t'Network connection lost, working offline'\n\t\t\t) }\n\t\t\tstyle={ containerStyle }\n\t\t>\n\t\t\t<Icon fill={ iconStyle.fill } icon={ offlineIcon } />\n\t\t\t<Text style={ textStyle }>{ __( 'Working Offline' ) } </Text>\n\t\t</View>\n\t) : null;\n};\n\nexport default OfflineStatus;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,iBAAiB,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;;AAE5D;AACA;AACA;AACA,SACCC,4BAA4B,EAC5BC,sBAAsB,EACtBC,WAAW,QACL,oBAAoB;AAC3B,SAASC,IAAI,QAAQ,uBAAuB;AAC5C,SAASC,OAAO,IAAIC,WAAW,QAAQ,kBAAkB;AACzD,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,SAAS,QAAQ,oBAAoB;;AAE9C;AACA;AACA;AACA,OAAOC,MAAM,MAAM,qBAAqB;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAXA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAYA,SAASC,0BAA0BA,CAAEC,OAAO,EAAE;EAAEC,QAAQ;EAAEC;AAAgB,CAAC,EAAG;EAC7E,MAAM;IAAEC;EAAyB,CAAC,GAAGpB,iBAAiB;EACtD,MAAMqB,YAAY,GAAGhB,WAAW,CAAEa,QAAS,CAAC;EAE5CR,SAAS,CAAE,MAAM;IAChB,MAAMY,oBAAoB,GAAG,OAAOJ,QAAQ,KAAK,WAAW;IAC5D,MAAMK,aAAa,GAAG,OAAOF,YAAY,KAAK,WAAW;IAEzD,IACCC,oBAAoB,IAClBJ,QAAQ,IAAI,CAAEG,YAAY,IAAI,CAAEE,aAAe,EAChD;MACDH,wBAAwB,CAAEH,OAAQ,CAAC;IACpC,CAAC,MAAM,IAAK,CAAEC,QAAQ,IAAIG,YAAY,IAAIF,eAAe,EAAG;MAC3DC,wBAAwB,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ivity","usePrevious","Icon","offline","offlineIcon","__","useEffect","styles","jsx","_jsx","jsxs","_jsxs","useAccessibilityLiveRegion","message","isActive","inactiveMessage","announceForAccessibility","prevIsActive","unconditionalMessage","initialRender","OfflineStatus","isConnected","containerStyle","offline__dark","textStyle","iconStyle","accessible","accessibilityRole","accessibilityLabel","style","children","fill","icon"],"sources":["@wordpress/editor/src/components/offline-status/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { AccessibilityInfo, Text, View } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tusePreferredColorSchemeStyle,\n\tuseNetworkConnectivity,\n\tusePrevious,\n} from '@wordpress/compose';\nimport { Icon } from '@wordpress/components';\nimport { offline as offlineIcon } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.native.scss';\n\n/**\n * Conditionally announces messages for screen reader users. This Hook provides\n * two benefits over React Native's `accessibilityLiveRegion`:\n *\n * 1. It works on both iOS and Android.\n * 2. It allows announcing a secondary message when the component is inactive.\n *\n * @param {string} message The message to announce.\n * @param {Object} options Options for the Hook.\n * @param {boolean} [options.isActive] Whether the message should be announced.\n * @param {string} [options.inactiveMessage] The message to announce when inactive.\n */\nfunction useAccessibilityLiveRegion( message, { isActive, inactiveMessage } ) {\n\tconst { announceForAccessibility } = AccessibilityInfo;\n\tconst prevIsActive = usePrevious( isActive );\n\n\tuseEffect( () => {\n\t\tconst unconditionalMessage = typeof isActive === 'undefined';\n\t\tconst initialRender = typeof prevIsActive === 'undefined';\n\n\t\tif (\n\t\t\tunconditionalMessage ||\n\t\t\t( isActive && ! prevIsActive && ! initialRender )\n\t\t) {\n\t\t\tannounceForAccessibility( message );\n\t\t} else if ( ! isActive && prevIsActive && inactiveMessage ) {\n\t\t\tannounceForAccessibility( inactiveMessage );\n\t\t}\n\t}, [\n\t\tmessage,\n\t\tisActive,\n\t\tprevIsActive,\n\t\tinactiveMessage,\n\t\tannounceForAccessibility,\n\t] );\n}\n\nconst OfflineStatus = () => {\n\tconst { isConnected } = useNetworkConnectivity();\n\n\tuseAccessibilityLiveRegion( __( 'Network connection re-established' ), {\n\t\tisActive: isConnected,\n\t\tinactiveMessage: __( 'Network connection lost, working offline' ),\n\t} );\n\n\tconst containerStyle = usePreferredColorSchemeStyle(\n\t\tstyles.offline,\n\t\tstyles.offline__dark\n\t);\n\n\tconst textStyle = usePreferredColorSchemeStyle(\n\t\tstyles[ 'offline--text' ],\n\t\tstyles[ 'offline--text__dark' ]\n\t);\n\n\tconst iconStyle = usePreferredColorSchemeStyle(\n\t\tstyles[ 'offline--icon' ],\n\t\tstyles[ 'offline--icon__dark' ]\n\t);\n\n\treturn ! isConnected ? (\n\t\t<View\n\t\t\taccessible\n\t\t\taccessibilityRole=\"alert\"\n\t\t\taccessibilityLabel={ __(\n\t\t\t\t'Network connection lost, working offline'\n\t\t\t) }\n\t\t\tstyle={ containerStyle }\n\t\t>\n\t\t\t<Icon fill={ iconStyle.fill } icon={ offlineIcon } />\n\t\t\t<Text style={ textStyle }>{ __( 'Working Offline' ) } </Text>\n\t\t</View>\n\t) : null;\n};\n\nexport default OfflineStatus;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,iBAAiB,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;;AAE5D;AACA;AACA;AACA,SACCC,4BAA4B,EAC5BC,sBAAsB,EACtBC,WAAW,QACL,oBAAoB;AAC3B,SAASC,IAAI,QAAQ,uBAAuB;AAC5C,SAASC,OAAO,IAAIC,WAAW,QAAQ,kBAAkB;AACzD,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,SAAS,QAAQ,oBAAoB;;AAE9C;AACA;AACA;AACA,OAAOC,MAAM,MAAM,qBAAqB;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAXA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;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BACnBV,KAAA,CAACb,IAAI;IACJ4B,UAAU;IACVC,iBAAiB,EAAC,OAAO;IACzBC,kBAAkB,EAAGvB,EAAE,CACtB,0CACD,CAAG;IACHwB,KAAK,EAAGP,cAAgB;IAAAQ,QAAA,gBAExBrB,IAAA,CAACP,IAAI;MAAC6B,IAAI,EAAGN,SAAS,CAACM,IAAM;MAACC,IAAI,EAAG5B;IAAa,CAAE,CAAC,eACrDO,KAAA,CAACd,IAAI;MAACgC,KAAK,EAAGL,SAAW;MAAAM,QAAA,GAAGzB,EAAE,CAAE,iBAAkB,CAAC,EAAE,GAAC;IAAA,CAAM,CAAC;EAAA,CACxD,CAAC,GACJ,IAAI;AACT,CAAC;AAED,eAAee,aAAa","ignoreList":[]}
@@ -22,8 +22,7 @@ import { filterURLForDisplay } from '@wordpress/url';
22
22
  import PostPanelRow from '../post-panel-row';
23
23
  import { buildTermsTree } from '../../utils/terms';
24
24
  import { store as editorStore } from '../../store';
25
- import { jsx as _jsx } from "react/jsx-runtime";
26
- import { jsxs as _jsxs } from "react/jsx-runtime";
25
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
27
26
  function getTitle(post) {
28
27
  return post?.title?.rendered ? decodeEntities(post.title.rendered) : `#${post.id} (${__('no title')})`;
29
28
  }
@@ -189,10 +188,10 @@ function PostParentToggle({
189
188
  size: "compact",
190
189
  className: "editor-post-parent__panel-toggle",
191
190
  variant: "tertiary",
192
- "aria-expanded": isOpen
191
+ "aria-expanded": isOpen,
192
+ "aria-label":
193
193
  // translators: %s: Current post parent.
194
- ,
195
- "aria-label": sprintf(__('Change parent: %s'), parentTitle),
194
+ sprintf(__('Change parent: %s'), parentTitle),
196
195
  onClick: onClick,
197
196
  children: parentTitle
198
197
  });
@@ -237,8 +236,8 @@ export function ParentRow() {
237
236
  title: __('Parent'),
238
237
  onClose: onClose
239
238
  }), /*#__PURE__*/_jsxs("div", {
240
- children: [createInterpolateElement(sprintf( /* translators: %1$s The home URL of the WordPress installation without the scheme. */
241
- __('Child pages inherit characteristics from their parent, such as URL structure. For instance, if "Pricing" is a child of "Services", its URL would be %1$s<wbr />/services<wbr />/pricing.'), filterURLForDisplay(homeUrl).replace(/([/.])/g, '<wbr />$1')), {
239
+ children: [createInterpolateElement(sprintf(/* translators: %s: The home URL of the WordPress installation without the scheme. */
240
+ __('Child pages inherit characteristics from their parent, such as URL structure. For instance, if "Pricing" is a child of "Services", its URL would be %s<wbr />/services<wbr />/pricing.'), filterURLForDisplay(homeUrl).replace(/([/.])/g, '<wbr />$1')), {
242
241
  wbr: /*#__PURE__*/_jsx("wbr", {})
243
242
  }), /*#__PURE__*/_jsx("p", {
244
243
  children: createInterpolateElement(__('They also show up as sub-items in the default navigation menu. <a>Learn more.</a>'), {
@@ -1 +1 @@
1
- {"version":3,"names":["removeAccents","__","sprintf","Button","Dropdown","ComboboxControl","ExternalLink","debounce","createInterpolateElement","useState","useMemo","useSelect","useDispatch","decodeEntities","store","coreStore","__experimentalInspectorPopoverHeader","InspectorPopoverHeader","filterURLForDisplay","PostPanelRow","buildTermsTree","editorStore","jsx","_jsx","jsxs","_jsxs","getTitle","post","title","rendered","id","getItemPriority","name","searchValue","normalizedName","toLowerCase","normalizedSearch","startsWith","length","Infinity","PageAttributesParent","editPost","fieldValue","setFieldValue","isHierarchical","parentPostId","parentPostTitle","pageItems","select","_pType$hierarchical","getPostType","getEntityRecords","getEntityRecord","getCurrentPostId","getEditedPostAttribute","postTypeSlug","pageId","pType","postId","postIsHierarchical","hierarchical","query","per_page","exclude","parent_exclude","orderby","order","_fields","search","parentPost","parentOptions","getOptionsFromTree","tree","level","mappedNodes","map","treeNode","value","label","repeat","rawName","children","sortedNodes","sort","a","b","priorityA","priorityB","flat","item","parent","opts","optsHasParent","find","unshift","handleKeydown","inputValue","handleChange","selectedPostId","__nextHasNoMarginBottom","__next40pxDefaultSize","className","help","options","onFilterValueChange","onChange","hideLabelFromVision","PostParentToggle","isOpen","onClick","parentTitle","size","variant","ParentRow","homeUrl","home","popoverAnchor","setPopoverAnchor","popoverProps","anchor","placement","offset","shift","ref","contentClassName","focusOnMount","renderToggle","onToggle","renderContent","onClose","replace","wbr","href"],"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 {\n\tcreateInterpolateElement,\n\tuseState,\n\tuseMemo,\n} 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';\nimport { filterURLForDisplay } from '@wordpress/url';\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\tconst homeUrl = useSelect( ( select ) => {\n\t\t// Site index.\n\t\treturn select( coreStore ).getEntityRecord( 'root', '__unstableBase' )\n\t\t\t?.home;\n\t}, [] );\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{ createInterpolateElement(\n\t\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t\t/* translators: %1$s The home URL of the WordPress installation without the scheme. */\n\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t'Child pages inherit characteristics from their parent, such as URL structure. For instance, if \"Pricing\" is a child of \"Services\", its URL would be %1$s<wbr />/services<wbr />/pricing.'\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\tfilterURLForDisplay( homeUrl ).replace(\n\t\t\t\t\t\t\t\t\t\t/([/.])/g,\n\t\t\t\t\t\t\t\t\t\t'<wbr />$1'\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{\n\t\t\t\t\t\t\t\t\twbr: <wbr />,\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{ createInterpolateElement(\n\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t'They also show up as sub-items in the default navigation menu. <a>Learn more.</a>'\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ta: (\n\t\t\t\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\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\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t),\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</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<PageAttributesParent />\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t/>\n\t\t</PostPanelRow>\n\t);\n}\n\nexport default PageAttributesParent;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,aAAa,MAAM,gBAAgB;;AAE1C;AACA;AACA;AACA,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SACCC,MAAM,EACNC,QAAQ,EACRC,eAAe,EACfC,YAAY,QACN,uBAAuB;AAC9B,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SACCC,wBAAwB,EACxBC,QAAQ,EACRC,OAAO,QACD,oBAAoB;AAC3B,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,cAAc,QAAQ,0BAA0B;AACzD,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASC,oCAAoC,IAAIC,sBAAsB,QAAQ,yBAAyB;AACxG,SAASC,mBAAmB,QAAQ,gBAAgB;;AAEpD;AACA;AACA;AACA,OAAOC,YAAY,MAAM,mBAAmB;AAC5C,SAASC,cAAc,QAAQ,mBAAmB;AAClD,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Y;IAAC2D,KAAK,EAAG7E,EAAE,CAAE,QAAS,CAAG;IAAC0H,GAAG,EAAGN,gBAAkB;IAAApC,QAAA,eAC9D1D,IAAA,CAACnB,QAAQ;MACRkH,YAAY,EAAGA,YAAc;MAC7BjB,SAAS,EAAC,oCAAoC;MAC9CuB,gBAAgB,EAAC,kCAAkC;MACnDC,YAAY;MACZC,YAAY,EAAGA,CAAE;QAAElB,MAAM;QAAEmB;MAAS,CAAC,kBACpCxG,IAAA,CAACoF,gBAAgB;QAACC,MAAM,EAAGA,MAAQ;QAACC,OAAO,EAAGkB;MAAU,CAAE,CACxD;MACHC,aAAa,EAAGA,CAAE;QAAEC;MAAQ,CAAC,kBAC5BxG,KAAA;QAAK4E,SAAS,EAAC,oBAAoB;QAAApB,QAAA,gBAClC1D,IAAA,CAACN,sBAAsB;UACtBW,KAAK,EAAG3B,EAAE,CAAE,QAAS,CAAG;UACxBgI,OAAO,EAAGA;QAAS,CACnB,CAAC,eACFxG,KAAA;UAAAwD,QAAA,GACGzE,wBAAwB,CACzBN,OAAO,EACN;UACAD,EAAE,CACD,0LACD,CAAC,EACDiB,mBAAmB,CAAEgG,OAAQ,CAAC,CAACgB,OAAO,CACrC,SAAS,EACT,WACD,CACD,CAAC,EACD;YACCC,GAAG,eAAE5G,IAAA,UAAM;UACZ,CACD,CAAC,eACDA,IAAA;YAAA0D,QAAA,EACGzE,wBAAwB,CACzBP,EAAE,CACD,mFACD,CAAC,EACD;cACCmF,CAAC,eACA7D,IAAA,CAACjB,YAAY;gBACZ8H,IAAI,EAAGnI,EAAE,CACR,yFACD;cAAG,CACH;YAEH,CACD;UAAC,CACC,CAAC;QAAA,CACA,CAAC,eACNsB,IAAA,CAACiB,oBAAoB,IAAE,CAAC;MAAA,CACpB;IACH,CACH;EAAC,CACW,CAAC;AAEjB;AAEA,eAAeA,oBAAoB","ignoreList":[]}
1
+ {"version":3,"names":["removeAccents","__","sprintf","Button","Dropdown","ComboboxControl","ExternalLink","debounce","createInterpolateElement","useState","useMemo","useSelect","useDispatch","decodeEntities","store","coreStore","__experimentalInspectorPopoverHeader","InspectorPopoverHeader","filterURLForDisplay","PostPanelRow","buildTermsTree","editorStore","jsx","_jsx","jsxs","_jsxs","getTitle","post","title","rendered","id","getItemPriority","name","searchValue","normalizedName","toLowerCase","normalizedSearch","startsWith","length","Infinity","PageAttributesParent","editPost","fieldValue","setFieldValue","isHierarchical","parentPostId","parentPostTitle","pageItems","select","_pType$hierarchical","getPostType","getEntityRecords","getEntityRecord","getCurrentPostId","getEditedPostAttribute","postTypeSlug","pageId","pType","postId","postIsHierarchical","hierarchical","query","per_page","exclude","parent_exclude","orderby","order","_fields","search","parentPost","parentOptions","getOptionsFromTree","tree","level","mappedNodes","map","treeNode","value","label","repeat","rawName","children","sortedNodes","sort","a","b","priorityA","priorityB","flat","item","parent","opts","optsHasParent","find","unshift","handleKeydown","inputValue","handleChange","selectedPostId","__nextHasNoMarginBottom","__next40pxDefaultSize","className","help","options","onFilterValueChange","onChange","hideLabelFromVision","PostParentToggle","isOpen","onClick","parentTitle","size","variant","ParentRow","homeUrl","home","popoverAnchor","setPopoverAnchor","popoverProps","anchor","placement","offset","shift","ref","contentClassName","focusOnMount","renderToggle","onToggle","renderContent","onClose","replace","wbr","href"],"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 {\n\tcreateInterpolateElement,\n\tuseState,\n\tuseMemo,\n} 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';\nimport { filterURLForDisplay } from '@wordpress/url';\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\taria-label={\n\t\t\t\t// translators: %s: Current post parent.\n\t\t\t\tsprintf( __( 'Change parent: %s' ), parentTitle )\n\t\t\t}\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\tconst homeUrl = useSelect( ( select ) => {\n\t\t// Site index.\n\t\treturn select( coreStore ).getEntityRecord( 'root', '__unstableBase' )\n\t\t\t?.home;\n\t}, [] );\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{ createInterpolateElement(\n\t\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t\t/* translators: %s: The home URL of the WordPress installation without the scheme. */\n\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t'Child pages inherit characteristics from their parent, such as URL structure. For instance, if \"Pricing\" is a child of \"Services\", its URL would be %s<wbr />/services<wbr />/pricing.'\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\tfilterURLForDisplay( homeUrl ).replace(\n\t\t\t\t\t\t\t\t\t\t/([/.])/g,\n\t\t\t\t\t\t\t\t\t\t'<wbr />$1'\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{\n\t\t\t\t\t\t\t\t\twbr: <wbr />,\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{ createInterpolateElement(\n\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t'They also show up as sub-items in the default navigation menu. <a>Learn more.</a>'\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ta: (\n\t\t\t\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\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\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t),\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</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<PageAttributes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AAE,QAAS,CAAG;UACxBgI,OAAO,EAAGA;QAAS,CACnB,CAAC,eACFxG,KAAA;UAAAwD,QAAA,GACGzE,wBAAwB,CACzBN,OAAO,CACN;UACAD,EAAE,CACD,wLACD,CAAC,EACDiB,mBAAmB,CAAEgG,OAAQ,CAAC,CAACgB,OAAO,CACrC,SAAS,EACT,WACD,CACD,CAAC,EACD;YACCC,GAAG,eAAE5G,IAAA,UAAM;UACZ,CACD,CAAC,eACDA,IAAA;YAAA0D,QAAA,EACGzE,wBAAwB,CACzBP,EAAE,CACD,mFACD,CAAC,EACD;cACCmF,CAAC,eACA7D,IAAA,CAACjB,YAAY;gBACZ8H,IAAI,EAAGnI,EAAE,CACR,yFACD;cAAG,CACH;YAEH,CACD;UAAC,CACC,CAAC;QAAA,CACA,CAAC,eACNsB,IAAA,CAACiB,oBAAoB,IAAE,CAAC;MAAA,CACpB;IACH,CACH;EAAC,CACW,CAAC;AAEjB;AAEA,eAAeA,oBAAoB","ignoreList":[]}
@@ -11,9 +11,7 @@ import warning from '@wordpress/warning';
11
11
  */
12
12
  import EnablePluginDocumentSettingPanelOption from '../preferences-modal/enable-plugin-document-setting-panel';
13
13
  import { store as editorStore } from '../../store';
14
- import { jsx as _jsx } from "react/jsx-runtime";
15
- import { Fragment as _Fragment } from "react/jsx-runtime";
16
- import { jsxs as _jsxs } from "react/jsx-runtime";
14
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
17
15
  const {
18
16
  Fill,
19
17
  Slot
@@ -1 +1 @@
1
- {"version":3,"names":["createSlotFill","PanelBody","usePluginContext","useDispatch","useSelect","warning","EnablePluginDocumentSettingPanelOption","store","editorStore","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","Fill","Slot","PluginDocumentSettingPanel","name","className","title","icon","children","pluginName","panelName","opened","isEnabled","select","isEditorPanelOpened","isEditorPanelEnabled","toggleEditorPanelOpened","undefined","globalThis","SCRIPT_DEBUG","label","onToggle"],"sources":["@wordpress/editor/src/components/plugin-document-setting-panel/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createSlotFill, PanelBody } from '@wordpress/components';\nimport { usePluginContext } from '@wordpress/plugins';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport EnablePluginDocumentSettingPanelOption from '../preferences-modal/enable-plugin-document-setting-panel';\nimport { store as editorStore } from '../../store';\n\nconst { Fill, Slot } = createSlotFill( 'PluginDocumentSettingPanel' );\n\n/**\n * Renders items below the Status & Availability panel in the Document Sidebar.\n *\n * @param {Object} props Component properties.\n * @param {string} props.name Required. A machine-friendly name for the panel.\n * @param {string} [props.className] An optional class name added to the row.\n * @param {string} [props.title] The title of the panel\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.\n * @param {Element} props.children Children to be rendered\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var el = React.createElement;\n * var __ = wp.i18n.__;\n * var registerPlugin = wp.plugins.registerPlugin;\n * var PluginDocumentSettingPanel = wp.editor.PluginDocumentSettingPanel;\n *\n * function MyDocumentSettingPlugin() {\n * \treturn el(\n * \t\tPluginDocumentSettingPanel,\n * \t\t{\n * \t\t\tclassName: 'my-document-setting-plugin',\n * \t\t\ttitle: 'My Panel',\n * \t\t\tname: 'my-panel',\n * \t\t},\n * \t\t__( 'My Document Setting Panel' )\n * \t);\n * }\n *\n * registerPlugin( 'my-document-setting-plugin', {\n * \t\trender: MyDocumentSettingPlugin\n * } );\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { registerPlugin } from '@wordpress/plugins';\n * import { PluginDocumentSettingPanel } from '@wordpress/editor';\n *\n * const MyDocumentSettingTest = () => (\n * \t\t<PluginDocumentSettingPanel className=\"my-document-setting-plugin\" title=\"My Panel\" name=\"my-panel\">\n *\t\t\t<p>My Document Setting Panel</p>\n *\t\t</PluginDocumentSettingPanel>\n *\t);\n *\n * registerPlugin( 'document-setting-test', { render: MyDocumentSettingTest } );\n * ```\n *\n * @return {Component} The component to be rendered.\n */\nconst PluginDocumentSettingPanel = ( {\n\tname,\n\tclassName,\n\ttitle,\n\ticon,\n\tchildren,\n} ) => {\n\tconst { name: pluginName } = usePluginContext();\n\tconst panelName = `${ pluginName }/${ name }`;\n\tconst { opened, isEnabled } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { isEditorPanelOpened, isEditorPanelEnabled } =\n\t\t\t\tselect( editorStore );\n\n\t\t\treturn {\n\t\t\t\topened: isEditorPanelOpened( panelName ),\n\t\t\t\tisEnabled: isEditorPanelEnabled( panelName ),\n\t\t\t};\n\t\t},\n\t\t[ panelName ]\n\t);\n\tconst { toggleEditorPanelOpened } = useDispatch( editorStore );\n\n\tif ( undefined === name ) {\n\t\twarning( 'PluginDocumentSettingPanel requires a name property.' );\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<EnablePluginDocumentSettingPanelOption\n\t\t\t\tlabel={ title }\n\t\t\t\tpanelName={ panelName }\n\t\t\t/>\n\t\t\t<Fill>\n\t\t\t\t{ isEnabled && (\n\t\t\t\t\t<PanelBody\n\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\topened={ opened }\n\t\t\t\t\t\tonToggle={ () => toggleEditorPanelOpened( panelName ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t</PanelBody>\n\t\t\t\t) }\n\t\t\t</Fill>\n\t\t</>\n\t);\n};\n\nPluginDocumentSettingPanel.Slot = Slot;\n\nexport default PluginDocumentSettingPanel;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,cAAc,EAAEC,SAAS,QAAQ,uBAAuB;AACjE,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,WAAW,EAAEC,SAAS,QA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AI,EAAG;IACzBc,UAAA,CAAAC,YAAA,YAAA5B,OAAO,CAAE,sDAAuD,CAAC;EAClE;EAEA,oBACCS,KAAA,CAAAF,SAAA;IAAAU,QAAA,gBACCZ,IAAA,CAACJ,sCAAsC;MACtC4B,KAAK,EAAGd,KAAO;MACfI,SAAS,EAAGA;IAAW,CACvB,CAAC,eACFd,IAAA,CAACK,IAAI;MAAAO,QAAA,EACFI,SAAS,iBACVhB,IAAA,CAACT,SAAS;QACTkB,SAAS,EAAGA,SAAW;QACvBC,KAAK,EAAGA,KAAO;QACfC,IAAI,EAAGA,IAAM;QACbI,MAAM,EAAGA,MAAQ;QACjBU,QAAQ,EAAGA,CAAA,KAAML,uBAAuB,CAAEN,SAAU,CAAG;QAAAF,QAAA,EAErDA;MAAQ,CACA;IACX,CACI,CAAC;EAAA,CACN,CAAC;AAEL,CAAC;AAEDL,0BAA0B,CAACD,IAAI,GAAGA,IAAI;AAEtC,eAAeC,0BAA0B","ignoreList":[]}
1
+ {"version":3,"names":["createSlotFill","PanelBody","usePluginContext","useDispatch","useSelect","warning","EnablePluginDocumentSettingPanelOption","store","editorStore","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","Fill","Slot","PluginDocumentSettingPanel","name","className","title","icon","children","pluginName","panelName","opened","isEnabled","select","isEditorPanelOpened","isEditorPanelEnabled","toggleEditorPanelOpened","undefined","globalThis","SCRIPT_DEBUG","label","onToggle"],"sources":["@wordpress/editor/src/components/plugin-document-setting-panel/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createSlotFill, PanelBody } from '@wordpress/components';\nimport { usePluginContext } from '@wordpress/plugins';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport EnablePluginDocumentSettingPanelOption from '../preferences-modal/enable-plugin-document-setting-panel';\nimport { store as editorStore } from '../../store';\n\nconst { Fill, Slot } = createSlotFill( 'PluginDocumentSettingPanel' );\n\n/**\n * Renders items below the Status & Availability panel in the Document Sidebar.\n *\n * @param {Object} props Component properties.\n * @param {string} props.name Required. A machine-friendly name for the panel.\n * @param {string} [props.className] An optional class name added to the row.\n * @param {string} [props.title] The title of the panel\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.\n * @param {Element} props.children Children to be rendered\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var el = React.createElement;\n * var __ = wp.i18n.__;\n * var registerPlugin = wp.plugins.registerPlugin;\n * var PluginDocumentSettingPanel = wp.editor.PluginDocumentSettingPanel;\n *\n * function MyDocumentSettingPlugin() {\n * \treturn el(\n * \t\tPluginDocumentSettingPanel,\n * \t\t{\n * \t\t\tclassName: 'my-document-setting-plugin',\n * \t\t\ttitle: 'My Panel',\n * \t\t\tname: 'my-panel',\n * \t\t},\n * \t\t__( 'My Document Setting Panel' )\n * \t);\n * }\n *\n * registerPlugin( 'my-document-setting-plugin', {\n * \t\trender: MyDocumentSettingPlugin\n * } );\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { registerPlugin } from '@wordpress/plugins';\n * import { PluginDocumentSettingPanel } from '@wordpress/editor';\n *\n * const MyDocumentSettingTest = () => (\n * \t\t<PluginDocumentSettingPanel className=\"my-document-setting-plugin\" title=\"My Panel\" name=\"my-panel\">\n *\t\t\t<p>My Document Setting Panel</p>\n *\t\t</PluginDocumentSettingPanel>\n *\t);\n *\n * registerPlugin( 'document-setting-test', { render: MyDocumentSettingTest } );\n * ```\n *\n * @return {Component} The component to be rendered.\n */\nconst PluginDocumentSettingPanel = ( {\n\tname,\n\tclassName,\n\ttitle,\n\ticon,\n\tchildren,\n} ) => {\n\tconst { name: pluginName } = usePluginContext();\n\tconst panelName = `${ pluginName }/${ name }`;\n\tconst { opened, isEnabled } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { isEditorPanelOpened, isEditorPanelEnabled } =\n\t\t\t\tselect( editorStore );\n\n\t\t\treturn {\n\t\t\t\topened: isEditorPanelOpened( panelName ),\n\t\t\t\tisEnabled: isEditorPanelEnabled( panelName ),\n\t\t\t};\n\t\t},\n\t\t[ panelName ]\n\t);\n\tconst { toggleEditorPanelOpened } = useDispatch( editorStore );\n\n\tif ( undefined === name ) {\n\t\twarning( 'PluginDocumentSettingPanel requires a name property.' );\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<EnablePluginDocumentSettingPanelOption\n\t\t\t\tlabel={ title }\n\t\t\t\tpanelName={ panelName }\n\t\t\t/>\n\t\t\t<Fill>\n\t\t\t\t{ isEnabled && (\n\t\t\t\t\t<PanelBody\n\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\topened={ opened }\n\t\t\t\t\t\tonToggle={ () => toggleEditorPanelOpened( panelName ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t</PanelBody>\n\t\t\t\t) }\n\t\t\t</Fill>\n\t\t</>\n\t);\n};\n\nPluginDocumentSettingPanel.Slot = Slot;\n\nexport default PluginDocumentSettingPanel;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,cAAc,EAAEC,SAAS,QAAQ,uBAAuB;AACjE,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,OAAOC,OAAO,MAAM,oBAAoB;;AAExC;AACA;AACA;AACA,OAAOC,sCAAsC,MAAM,2DAA2D;AAC9G,SAASC,KAAK,IAAIC,WAAW,QAAQ,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAEnD,MAAM;EAAEC,IAAI;EAAEC;AAAK,CAAC,GAAGhB,cAAc,CAAE,4BAA6B,CAAC;;AAErE;AACA;AACA;AACA;AACA;AACA;AAC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EAAGA,IAAM;QACbI,MAAM,EAAGA,MAAQ;QACjBU,QAAQ,EAAGA,CAAA,KAAML,uBAAuB,CAAEN,SAAU,CAAG;QAAAF,QAAA,EAErDA;MAAQ,CACA;IACX,CACI,CAAC;EAAA,CACN,CAAC;AAEL,CAAC;AAEDL,0BAA0B,CAACD,IAAI,GAAGA,IAAI;AAEtC,eAAeC,0BAA0B","ignoreList":[]}
@@ -1,9 +1,8 @@
1
1
  /**
2
2
  * WordPress dependencies
3
3
  */
4
- import { compose } from '@wordpress/compose';
5
4
  import { MenuItem } from '@wordpress/components';
6
- import { withPluginContext } from '@wordpress/plugins';
5
+ import { usePluginContext } from '@wordpress/plugins';
7
6
  import { ActionItem } from '@wordpress/interface';
8
7
 
9
8
  /**
@@ -62,12 +61,15 @@ import { ActionItem } from '@wordpress/interface';
62
61
  *
63
62
  * @return {Component} The component to be rendered.
64
63
  */
65
- export default compose(withPluginContext((context, ownProps) => {
66
- var _ownProps$as;
67
- return {
68
- as: (_ownProps$as = ownProps.as) !== null && _ownProps$as !== void 0 ? _ownProps$as : MenuItem,
69
- icon: ownProps.icon || context.icon,
70
- name: 'core/plugin-more-menu'
71
- };
72
- }))(ActionItem);
64
+ import { jsx as _jsx } from "react/jsx-runtime";
65
+ export default function PluginMoreMenuItem(props) {
66
+ var _props$as;
67
+ const context = usePluginContext();
68
+ return /*#__PURE__*/_jsx(ActionItem, {
69
+ name: "core/plugin-more-menu",
70
+ as: (_props$as = props.as) !== null && _props$as !== void 0 ? _props$as : MenuItem,
71
+ icon: props.icon || context.icon,
72
+ ...props
73
+ });
74
+ }
73
75
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["compose","MenuItem","withPluginContext","ActionItem","context","ownProps","_ownProps$as","as","icon","name"],"sources":["@wordpress/editor/src/components/plugin-more-menu-item/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { compose } from '@wordpress/compose';\nimport { MenuItem } from '@wordpress/components';\nimport { withPluginContext } from '@wordpress/plugins';\nimport { ActionItem } from '@wordpress/interface';\n\n/**\n * Renders a menu item in `Plugins` group in `More Menu` drop down, and can be used to as a button or link depending on the props provided.\n * The text within the component appears as the menu item label.\n *\n * @param {Object} props Component properties.\n * @param {string} [props.href] When `href` is provided then the menu item is represented as an anchor rather than button. It corresponds to the `href` attribute of the anchor.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered to the left of the menu item label.\n * @param {Function} [props.onClick=noop] The callback function to be executed when the user clicks the menu item.\n * @param {...*} [props.other] Any additional props are passed through to the underlying [Button](/packages/components/src/button/README.md) component.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var PluginMoreMenuItem = wp.editor.PluginMoreMenuItem;\n * var moreIcon = wp.element.createElement( 'svg' ); //... svg element.\n *\n * function onButtonClick() {\n * \talert( 'Button clicked.' );\n * }\n *\n * function MyButtonMoreMenuItem() {\n * \treturn wp.element.createElement(\n * \t\tPluginMoreMenuItem,\n * \t\t{\n * \t\t\ticon: moreIcon,\n * \t\t\tonClick: onButtonClick,\n * \t\t},\n * \t\t__( 'My button title' )\n * \t);\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PluginMoreMenuItem } from '@wordpress/editor';\n * import { more } from '@wordpress/icons';\n *\n * function onButtonClick() {\n * \talert( 'Button clicked.' );\n * }\n *\n * const MyButtonMoreMenuItem = () => (\n * \t<PluginMoreMenuItem\n * \t\ticon={ more }\n * \t\tonClick={ onButtonClick }\n * \t>\n * \t\t{ __( 'My button title' ) }\n * \t</PluginMoreMenuItem>\n * );\n * ```\n *\n * @return {Component} The component to be rendered.\n */\nexport default compose(\n\twithPluginContext( ( context, ownProps ) => {\n\t\treturn {\n\t\t\tas: ownProps.as ?? MenuItem,\n\t\t\ticon: ownProps.icon || context.icon,\n\t\t\tname: 'core/plugin-more-menu',\n\t\t};\n\t} )\n)( ActionItem );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,QAAQ,QAAQ,uBAAuB;AAChD,SAASC,iBAAiB,QAAQ,oBAAoB;AACtD,SAASC,UAAU,QAAQ,sBAAsB;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAeH,OAAO,CACrBE,iBAAiB,CAAE,CAAEE,OAAO,EAAEC,QAAQ,KAAM;EAAA,IAAAC,YAAA;EAC3C,OAAO;IACNC,EAAE,GAAAD,YAAA,GAAED,QAAQ,CAACE,EAAE,cAAAD,YAAA,cAAAA,YAAA,GAAIL,QAAQ;IAC3BO,IAAI,EAAEH,QAAQ,CAACG,IAAI,IAAIJ,OAAO,CAACI,IAAI;IACnCC,IAAI,EAAE;EACP,CAAC;AACF,CAAE,CACH,CAAC,CAAEN,UAAW,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["MenuItem","usePluginContext","ActionItem","jsx","_jsx","PluginMoreMenuItem","props","_props$as","context","name","as","icon"],"sources":["@wordpress/editor/src/components/plugin-more-menu-item/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { MenuItem } from '@wordpress/components';\nimport { usePluginContext } from '@wordpress/plugins';\nimport { ActionItem } from '@wordpress/interface';\n\n/**\n * Renders a menu item in `Plugins` group in `More Menu` drop down, and can be used to as a button or link depending on the props provided.\n * The text within the component appears as the menu item label.\n *\n * @param {Object} props Component properties.\n * @param {string} [props.href] When `href` is provided then the menu item is represented as an anchor rather than button. It corresponds to the `href` attribute of the anchor.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered to the left of the menu item label.\n * @param {Function} [props.onClick=noop] The callback function to be executed when the user clicks the menu item.\n * @param {...*} [props.other] Any additional props are passed through to the underlying [Button](/packages/components/src/button/README.md) component.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var PluginMoreMenuItem = wp.editor.PluginMoreMenuItem;\n * var moreIcon = wp.element.createElement( 'svg' ); //... svg element.\n *\n * function onButtonClick() {\n * \talert( 'Button clicked.' );\n * }\n *\n * function MyButtonMoreMenuItem() {\n * \treturn wp.element.createElement(\n * \t\tPluginMoreMenuItem,\n * \t\t{\n * \t\t\ticon: moreIcon,\n * \t\t\tonClick: onButtonClick,\n * \t\t},\n * \t\t__( 'My button title' )\n * \t);\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PluginMoreMenuItem } from '@wordpress/editor';\n * import { more } from '@wordpress/icons';\n *\n * function onButtonClick() {\n * \talert( 'Button clicked.' );\n * }\n *\n * const MyButtonMoreMenuItem = () => (\n * \t<PluginMoreMenuItem\n * \t\ticon={ more }\n * \t\tonClick={ onButtonClick }\n * \t>\n * \t\t{ __( 'My button title' ) }\n * \t</PluginMoreMenuItem>\n * );\n * ```\n *\n * @return {Component} The component to be rendered.\n */\nexport default function PluginMoreMenuItem( props ) {\n\tconst context = usePluginContext();\n\treturn (\n\t\t<ActionItem\n\t\t\tname=\"core/plugin-more-menu\"\n\t\t\tas={ props.as ?? MenuItem }\n\t\t\ticon={ props.icon || context.icon }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,QAAQ,QAAQ,uBAAuB;AAChD,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,UAAU,QAAQ,sBAAsB;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAvDA,SAAAC,GAAA,IAAAC,IAAA;AAwDA,eAAe,SAASC,kBAAkBA,CAAEC,KAAK,EAAG;EAAA,IAAAC,SAAA;EACnD,MAAMC,OAAO,GAAGP,gBAAgB,CAAC,CAAC;EAClC,oBACCG,IAAA,CAACF,UAAU;IACVO,IAAI,EAAC,uBAAuB;IAC5BC,EAAE,GAAAH,SAAA,GAAGD,KAAK,CAACI,EAAE,cAAAH,SAAA,cAAAA,SAAA,GAAIP,QAAU;IAC3BW,IAAI,EAAGL,KAAK,CAACK,IAAI,IAAIH,OAAO,CAACG,IAAM;IAAA,GAC9BL;EAAK,CACV,CAAC;AAEJ","ignoreList":[]}
@@ -1,9 +1,8 @@
1
1
  /**
2
2
  * WordPress dependencies
3
3
  */
4
- import { compose } from '@wordpress/compose';
5
4
  import { MenuItem } from '@wordpress/components';
6
- import { withPluginContext } from '@wordpress/plugins';
5
+ import { usePluginContext } from '@wordpress/plugins';
7
6
  import { ActionItem } from '@wordpress/interface';
8
7
 
9
8
  /**
@@ -27,12 +26,12 @@ import { ActionItem } from '@wordpress/interface';
27
26
  * }
28
27
  *
29
28
  * const ExternalPreviewMenuItem = () => (
30
- * <PreviewDropdownMenuItem
29
+ * <PluginPreviewMenuItem
31
30
  * icon={ external }
32
31
  * onClick={ onPreviewClick }
33
32
  * >
34
33
  * { __( 'Preview in new tab' ) }
35
- * </PreviewDropdownMenuItem>
34
+ * </PluginPreviewMenuItem>
36
35
  * );
37
36
  * registerPlugin( 'external-preview-menu-item', {
38
37
  * render: ExternalPreviewMenuItem,
@@ -41,12 +40,15 @@ import { ActionItem } from '@wordpress/interface';
41
40
  *
42
41
  * @return {Component} The rendered menu item component.
43
42
  */
44
- export default compose(withPluginContext((context, ownProps) => {
45
- var _ownProps$as;
46
- return {
47
- as: (_ownProps$as = ownProps.as) !== null && _ownProps$as !== void 0 ? _ownProps$as : MenuItem,
48
- icon: ownProps.icon || context.icon,
49
- name: 'core/plugin-preview-menu'
50
- };
51
- }))(ActionItem);
43
+ import { jsx as _jsx } from "react/jsx-runtime";
44
+ export default function PluginPreviewMenuItem(props) {
45
+ var _props$as;
46
+ const context = usePluginContext();
47
+ return /*#__PURE__*/_jsx(ActionItem, {
48
+ name: "core/plugin-preview-menu",
49
+ as: (_props$as = props.as) !== null && _props$as !== void 0 ? _props$as : MenuItem,
50
+ icon: props.icon || context.icon,
51
+ ...props
52
+ });
53
+ }
52
54
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["compose","MenuItem","withPluginContext","ActionItem","context","ownProps","_ownProps$as","as","icon","name"],"sources":["@wordpress/editor/src/components/plugin-preview-menu-item/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { compose } from '@wordpress/compose';\nimport { MenuItem } from '@wordpress/components';\nimport { withPluginContext } from '@wordpress/plugins';\nimport { ActionItem } from '@wordpress/interface';\n\n/**\n * Renders a menu item in the Preview dropdown, which can be used as a button or link depending on the props provided.\n * The text within the component appears as the menu item label.\n *\n * @param {Object} props Component properties.\n * @param {string} [props.href] When `href` is provided, the menu item is rendered as an anchor instead of a button. It corresponds to the `href` attribute of the anchor.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The icon to be rendered to the left of the menu item label. Can be a Dashicon slug or an SVG WP element.\n * @param {Function} [props.onClick] The callback function to be executed when the user clicks the menu item.\n * @param {...*} [props.other] Any additional props are passed through to the underlying MenuItem component.\n *\n * @example\n * ```jsx\n * import { __ } from '@wordpress/i18n';\n * import { PluginPreviewMenuItem } from '@wordpress/editor';\n * import { external } from '@wordpress/icons';\n *\n * function onPreviewClick() {\n * // Handle preview action\n * }\n *\n * const ExternalPreviewMenuItem = () => (\n * <PreviewDropdownMenuItem\n * icon={ external }\n * onClick={ onPreviewClick }\n * >\n * { __( 'Preview in new tab' ) }\n * </PreviewDropdownMenuItem>\n * );\n * registerPlugin( 'external-preview-menu-item', {\n * render: ExternalPreviewMenuItem,\n * } );\n * ```\n *\n * @return {Component} The rendered menu item component.\n */\nexport default compose(\n\twithPluginContext( ( context, ownProps ) => {\n\t\treturn {\n\t\t\tas: ownProps.as ?? MenuItem,\n\t\t\ticon: ownProps.icon || context.icon,\n\t\t\tname: 'core/plugin-preview-menu',\n\t\t};\n\t} )\n)( ActionItem );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,QAAQ,QAAQ,uBAAuB;AAChD,SAASC,iBAAiB,QAAQ,oBAAoB;AACtD,SAASC,UAAU,QAAQ,sBAAsB;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAeH,OAAO,CACrBE,iBAAiB,CAAE,CAAEE,OAAO,EAAEC,QAAQ,KAAM;EAAA,IAAAC,YAAA;EAC3C,OAAO;IACNC,EAAE,GAAAD,YAAA,GAAED,QAAQ,CAACE,EAAE,cAAAD,YAAA,cAAAA,YAAA,GAAIL,QAAQ;IAC3BO,IAAI,EAAEH,QAAQ,CAACG,IAAI,IAAIJ,OAAO,CAACI,IAAI;IACnCC,IAAI,EAAE;EACP,CAAC;AACF,CAAE,CACH,CAAC,CAAEN,UAAW,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["MenuItem","usePluginContext","ActionItem","jsx","_jsx","PluginPreviewMenuItem","props","_props$as","context","name","as","icon"],"sources":["@wordpress/editor/src/components/plugin-preview-menu-item/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { MenuItem } from '@wordpress/components';\nimport { usePluginContext } from '@wordpress/plugins';\nimport { ActionItem } from '@wordpress/interface';\n\n/**\n * Renders a menu item in the Preview dropdown, which can be used as a button or link depending on the props provided.\n * The text within the component appears as the menu item label.\n *\n * @param {Object} props Component properties.\n * @param {string} [props.href] When `href` is provided, the menu item is rendered as an anchor instead of a button. It corresponds to the `href` attribute of the anchor.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The icon to be rendered to the left of the menu item label. Can be a Dashicon slug or an SVG WP element.\n * @param {Function} [props.onClick] The callback function to be executed when the user clicks the menu item.\n * @param {...*} [props.other] Any additional props are passed through to the underlying MenuItem component.\n *\n * @example\n * ```jsx\n * import { __ } from '@wordpress/i18n';\n * import { PluginPreviewMenuItem } from '@wordpress/editor';\n * import { external } from '@wordpress/icons';\n *\n * function onPreviewClick() {\n * // Handle preview action\n * }\n *\n * const ExternalPreviewMenuItem = () => (\n * <PluginPreviewMenuItem\n * icon={ external }\n * onClick={ onPreviewClick }\n * >\n * { __( 'Preview in new tab' ) }\n * </PluginPreviewMenuItem>\n * );\n * registerPlugin( 'external-preview-menu-item', {\n * render: ExternalPreviewMenuItem,\n * } );\n * ```\n *\n * @return {Component} The rendered menu item component.\n */\nexport default function PluginPreviewMenuItem( props ) {\n\tconst context = usePluginContext();\n\treturn (\n\t\t<ActionItem\n\t\t\tname=\"core/plugin-preview-menu\"\n\t\t\tas={ props.as ?? MenuItem }\n\t\t\ticon={ props.icon || context.icon }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,QAAQ,QAAQ,uBAAuB;AAChD,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,UAAU,QAAQ,sBAAsB;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAlCA,SAAAC,GAAA,IAAAC,IAAA;AAmCA,eAAe,SAASC,qBAAqBA,CAAEC,KAAK,EAAG;EAAA,IAAAC,SAAA;EACtD,MAAMC,OAAO,GAAGP,gBAAgB,CAAC,CAAC;EAClC,oBACCG,IAAA,CAACF,UAAU;IACVO,IAAI,EAAC,0BAA0B;IAC/BC,EAAE,GAAAH,SAAA,GAAGD,KAAK,CAACI,EAAE,cAAAH,SAAA,cAAAA,SAAA,GAAIP,QAAU;IAC3BW,IAAI,EAAGL,KAAK,CAACK,IAAI,IAAIH,OAAO,CAACG,IAAM;IAAA,GAC9BL;EAAK,CACV,CAAC;AAEJ","ignoreList":[]}
@@ -1,15 +1,8 @@
1
1
  /**
2
2
  * WordPress dependencies
3
3
  */
4
- import { useSelect } from '@wordpress/data';
5
- import { __ } from '@wordpress/i18n';
6
4
  import { ComplementaryArea } from '@wordpress/interface';
7
5
 
8
- /**
9
- * Internal dependencies
10
- */
11
- import { store as editorStore } from '../../store';
12
-
13
6
  /**
14
7
  * Renders a sidebar when activated. The contents within the `PluginSidebar` will appear as content within the sidebar.
15
8
  * It also automatically renders a corresponding `PluginSidebarMenuItem` component when `isPinnable` flag is set to `true`.
@@ -80,17 +73,9 @@ export default function PluginSidebar({
80
73
  className,
81
74
  ...props
82
75
  }) {
83
- const {
84
- postTitle
85
- } = useSelect(select => {
86
- return {
87
- postTitle: select(editorStore).getEditedPostAttribute('title')
88
- };
89
- }, []);
90
76
  return /*#__PURE__*/_jsx(ComplementaryArea, {
91
77
  panelClassName: className,
92
78
  className: "editor-sidebar",
93
- smallScreenTitle: postTitle || __('(no title)'),
94
79
  scope: "core",
95
80
  ...props
96
81
  });
@@ -1 +1 @@
1
- {"version":3,"names":["useSelect","__","ComplementaryArea","store","editorStore","jsx","_jsx","PluginSidebar","className","props","postTitle","select","getEditedPostAttribute","panelClassName","smallScreenTitle","scope"],"sources":["@wordpress/editor/src/components/plugin-sidebar/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { ComplementaryArea } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Renders a sidebar when activated. The contents within the `PluginSidebar` will appear as content within the sidebar.\n * It also automatically renders a corresponding `PluginSidebarMenuItem` component when `isPinnable` flag is set to `true`.\n * If you wish to display the sidebar, you can with use the `PluginSidebarMoreMenuItem` component or the `wp.data.dispatch` API:\n *\n * ```js\n * wp.data.dispatch( 'core/edit-post' ).openGeneralSidebar( 'plugin-name/sidebar-name' );\n * ```\n *\n * @see PluginSidebarMoreMenuItem\n *\n * @param {Object} props Element props.\n * @param {string} props.name A string identifying the sidebar. Must be unique for every sidebar registered within the scope of your plugin.\n * @param {string} [props.className] An optional class name added to the sidebar body.\n * @param {string} props.title Title displayed at the top of the sidebar.\n * @param {boolean} [props.isPinnable=true] Whether to allow to pin sidebar to the toolbar. When set to `true` it also automatically renders a corresponding menu item.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var el = React.createElement;\n * var PanelBody = wp.components.PanelBody;\n * var PluginSidebar = wp.editor.PluginSidebar;\n * var moreIcon = React.createElement( 'svg' ); //... svg element.\n *\n * function MyPluginSidebar() {\n * \treturn el(\n * \t\t\tPluginSidebar,\n * \t\t\t{\n * \t\t\t\tname: 'my-sidebar',\n * \t\t\t\ttitle: 'My sidebar title',\n * \t\t\t\ticon: moreIcon,\n * \t\t\t},\n * \t\t\tel(\n * \t\t\t\tPanelBody,\n * \t\t\t\t{},\n * \t\t\t\t__( 'My sidebar content' )\n * \t\t\t)\n * \t);\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PanelBody } from '@wordpress/components';\n * import { PluginSidebar } from '@wordpress/editor';\n * import { more } from '@wordpress/icons';\n *\n * const MyPluginSidebar = () => (\n * \t<PluginSidebar\n * \t\tname=\"my-sidebar\"\n * \t\ttitle=\"My sidebar title\"\n * \t\ticon={ more }\n * \t>\n * \t\t<PanelBody>\n * \t\t\t{ __( 'My sidebar content' ) }\n * \t\t</PanelBody>\n * \t</PluginSidebar>\n * );\n * ```\n */\nexport default function PluginSidebar( { className, ...props } ) {\n\tconst { postTitle } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tpostTitle: select( editorStore ).getEditedPostAttribute( 'title' ),\n\t\t};\n\t}, [] );\n\treturn (\n\t\t<ComplementaryArea\n\t\t\tpanelClassName={ className }\n\t\t\tclassName=\"editor-sidebar\"\n\t\t\tsmallScreenTitle={ postTitle || __( '(no title)' ) }\n\t\t\tscope=\"core\"\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,iBAAiB,QAAQ,sBAAsB;;AAExD;AACA;AACA;AACA,SAASC,KAAK,IAAIC,WAAW,QAAQ,aAAa;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAhEA,SAAAC,GAAA,IAAAC,IAAA;AAiEA,eAAe,SAASC,aAAaA,CAAE;EAAEC,SAAS;EAAE,GAAGC;AAAM,CAAC,EAAG;EAChE,MAAM;IAAEC;EAAU,CAAC,GAAGV,SAAS,CAAIW,MAAM,IAAM;IAC9C,OAAO;MACND,SAAS,EAAEC,MAAM,CAAEP,WAAY,CAAC,CAACQ,sBAAsB,CAAE,OAAQ;IAClE,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EACP,oBACCN,IAAA,CAACJ,iBAAiB;IACjBW,cAAc,EAAGL,SAAW;IAC5BA,SAAS,EAAC,gBAAgB;IAC1BM,gBAAgB,EAAGJ,SAAS,IAAIT,EAAE,CAAE,YAAa,CAAG;IACpDc,KAAK,EAAC,MAAM;IAAA,GACPN;EAAK,CACV,CAAC;AAEJ","ignoreList":[]}
1
+ {"version":3,"names":["ComplementaryArea","jsx","_jsx","PluginSidebar","className","props","panelClassName","scope"],"sources":["@wordpress/editor/src/components/plugin-sidebar/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { ComplementaryArea } from '@wordpress/interface';\n\n/**\n * Renders a sidebar when activated. The contents within the `PluginSidebar` will appear as content within the sidebar.\n * It also automatically renders a corresponding `PluginSidebarMenuItem` component when `isPinnable` flag is set to `true`.\n * If you wish to display the sidebar, you can with use the `PluginSidebarMoreMenuItem` component or the `wp.data.dispatch` API:\n *\n * ```js\n * wp.data.dispatch( 'core/edit-post' ).openGeneralSidebar( 'plugin-name/sidebar-name' );\n * ```\n *\n * @see PluginSidebarMoreMenuItem\n *\n * @param {Object} props Element props.\n * @param {string} props.name A string identifying the sidebar. Must be unique for every sidebar registered within the scope of your plugin.\n * @param {string} [props.className] An optional class name added to the sidebar body.\n * @param {string} props.title Title displayed at the top of the sidebar.\n * @param {boolean} [props.isPinnable=true] Whether to allow to pin sidebar to the toolbar. When set to `true` it also automatically renders a corresponding menu item.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var el = React.createElement;\n * var PanelBody = wp.components.PanelBody;\n * var PluginSidebar = wp.editor.PluginSidebar;\n * var moreIcon = React.createElement( 'svg' ); //... svg element.\n *\n * function MyPluginSidebar() {\n * \treturn el(\n * \t\t\tPluginSidebar,\n * \t\t\t{\n * \t\t\t\tname: 'my-sidebar',\n * \t\t\t\ttitle: 'My sidebar title',\n * \t\t\t\ticon: moreIcon,\n * \t\t\t},\n * \t\t\tel(\n * \t\t\t\tPanelBody,\n * \t\t\t\t{},\n * \t\t\t\t__( 'My sidebar content' )\n * \t\t\t)\n * \t);\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PanelBody } from '@wordpress/components';\n * import { PluginSidebar } from '@wordpress/editor';\n * import { more } from '@wordpress/icons';\n *\n * const MyPluginSidebar = () => (\n * \t<PluginSidebar\n * \t\tname=\"my-sidebar\"\n * \t\ttitle=\"My sidebar title\"\n * \t\ticon={ more }\n * \t>\n * \t\t<PanelBody>\n * \t\t\t{ __( 'My sidebar content' ) }\n * \t\t</PanelBody>\n * \t</PluginSidebar>\n * );\n * ```\n */\nexport default function PluginSidebar( { className, ...props } ) {\n\treturn (\n\t\t<ComplementaryArea\n\t\t\tpanelClassName={ className }\n\t\t\tclassName=\"editor-sidebar\"\n\t\t\tscope=\"core\"\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,iBAAiB,QAAQ,sBAAsB;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAhEA,SAAAC,GAAA,IAAAC,IAAA;AAiEA,eAAe,SAASC,aAAaA,CAAE;EAAEC,SAAS;EAAE,GAAGC;AAAM,CAAC,EAAG;EAChE,oBACCH,IAAA,CAACF,iBAAiB;IACjBM,cAAc,EAAGF,SAAW;IAC5BA,SAAS,EAAC,gBAAgB;IAC1BG,KAAK,EAAC,MAAM;IAAA,GACPF;EAAK,CACV,CAAC;AAEJ","ignoreList":[]}
@@ -13,11 +13,9 @@ import { store as coreStore } from '@wordpress/core-data';
13
13
  */
14
14
  import { unlock } from '../../lock-unlock';
15
15
  import { usePostActions } from './actions';
16
- import { jsx as _jsx } from "react/jsx-runtime";
17
- import { Fragment as _Fragment } from "react/jsx-runtime";
18
- import { jsxs as _jsxs } from "react/jsx-runtime";
16
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
19
17
  const {
20
- DropdownMenuV2,
18
+ Menu,
21
19
  kebabCase
22
20
  } = unlock(componentsPrivateApis);
23
21
  export default function PostActions({
@@ -54,7 +52,7 @@ export default function PostActions({
54
52
  return !action.isEligible || action.isEligible(itemWithPermissions);
55
53
  });
56
54
  }, [allActions, itemWithPermissions]);
57
- return /*#__PURE__*/_jsx(DropdownMenuV2, {
55
+ return /*#__PURE__*/_jsx(Menu, {
58
56
  open: isActionsMenuOpen,
59
57
  trigger: /*#__PURE__*/_jsx(Button, {
60
58
  size: "small",
@@ -89,10 +87,10 @@ function DropdownMenuItemTrigger({
89
87
  items
90
88
  }) {
91
89
  const label = typeof action.label === 'string' ? action.label : action.label(items);
92
- return /*#__PURE__*/_jsx(DropdownMenuV2.Item, {
90
+ return /*#__PURE__*/_jsx(Menu.Item, {
93
91
  onClick: onClick,
94
92
  hideOnClick: !action.RenderModal,
95
- children: /*#__PURE__*/_jsx(DropdownMenuV2.ItemLabel, {
93
+ children: /*#__PURE__*/_jsx(Menu.ItemLabel, {
96
94
  children: label
97
95
  })
98
96
  });
@@ -146,7 +144,7 @@ function ActionsDropdownMenuGroup({
146
144
  item,
147
145
  onClose
148
146
  }) {
149
- return /*#__PURE__*/_jsx(DropdownMenuV2.Group, {
147
+ return /*#__PURE__*/_jsx(Menu.Group, {
150
148
  children: actions.map(action => {
151
149
  if (action.RenderModal) {
152
150
  return /*#__PURE__*/_jsx(ActionWithModal, {
@@ -1 +1 @@
1
- {"version":3,"names":["useSelect","useState","useMemo","__","privateApis","componentsPrivateApis","Button","Modal","moreVertical","store","coreStore","unlock","usePostActions","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","DropdownMenuV2","kebabCase","PostActions","postType","postId","onActionPerformed","isActionsMenuOpen","setIsActionsMenuOpen","item","permissions","select","getEditedEntityRecord","getEntityRecordPermissions","itemWithPermissions","allActions","actions","filter","action","isEligible","open","trigger","size","icon","label","disabled","length","accessibleWhenDisabled","className","onClick","onOpenChange","placement","children","ActionsDropdownMenuGroup","onClose","DropdownMenuItemTrigger","items","Item","hideOnClick","RenderModal","ItemLabel","ActionWithModal","ActionTrigger","isModalOpen","setIsModalOpen","actionTriggerProps","hideModalHeader","title","modalHeader","__experimentalHideHeader","onRequestClose","overlayClassName","id","focusOnMount","closeModal","Group","map","callback"],"sources":["@wordpress/editor/src/components/post-actions/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useState, useMemo } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tprivateApis as componentsPrivateApis,\n\tButton,\n\tModal,\n} from '@wordpress/components';\nimport { moreVertical } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { usePostActions } from './actions';\n\nconst { DropdownMenuV2, kebabCase } = unlock( componentsPrivateApis );\n\nexport default function PostActions( { postType, postId, onActionPerformed } ) {\n\tconst [ isActionsMenuOpen, setIsActionsMenuOpen ] = useState( false );\n\tconst { item, permissions } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedEntityRecord, getEntityRecordPermissions } =\n\t\t\t\tunlock( select( coreStore ) );\n\t\t\treturn {\n\t\t\t\titem: getEditedEntityRecord( 'postType', postType, postId ),\n\t\t\t\tpermissions: getEntityRecordPermissions(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\tpostId\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ postId, postType ]\n\t);\n\tconst itemWithPermissions = useMemo( () => {\n\t\treturn {\n\t\t\t...item,\n\t\t\tpermissions,\n\t\t};\n\t}, [ item, permissions ] );\n\tconst allActions = usePostActions( { postType, onActionPerformed } );\n\n\tconst actions = useMemo( () => {\n\t\treturn allActions.filter( ( action ) => {\n\t\t\treturn (\n\t\t\t\t! action.isEligible || action.isEligible( itemWithPermissions )\n\t\t\t);\n\t\t} );\n\t}, [ allActions, itemWithPermissions ] );\n\n\treturn (\n\t\t<DropdownMenuV2\n\t\t\topen={ isActionsMenuOpen }\n\t\t\ttrigger={\n\t\t\t\t<Button\n\t\t\t\t\tsize=\"small\"\n\t\t\t\t\ticon={ moreVertical }\n\t\t\t\t\tlabel={ __( 'Actions' ) }\n\t\t\t\t\tdisabled={ ! actions.length }\n\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\tclassName=\"editor-all-actions-button\"\n\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\tsetIsActionsMenuOpen( ! isActionsMenuOpen )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t}\n\t\t\tonOpenChange={ setIsActionsMenuOpen }\n\t\t\tplacement=\"bottom-end\"\n\t\t>\n\t\t\t<ActionsDropdownMenuGroup\n\t\t\t\tactions={ actions }\n\t\t\t\titem={ itemWithPermissions }\n\t\t\t\tonClose={ () => {\n\t\t\t\t\tsetIsActionsMenuOpen( false );\n\t\t\t\t} }\n\t\t\t/>\n\t\t</DropdownMenuV2>\n\t);\n}\n\n// From now on all the functions on this file are copied as from the dataviews packages,\n// The editor packages should not be using the dataviews packages directly,\n// and the dataviews package should not be using the editor packages directly,\n// so duplicating the code here seems like the least bad option.\n\n// Copied as is from packages/dataviews/src/item-actions.js\nfunction DropdownMenuItemTrigger( { action, onClick, items } ) {\n\tconst label =\n\t\ttypeof action.label === 'string' ? action.label : action.label( items );\n\treturn (\n\t\t<DropdownMenuV2.Item\n\t\t\tonClick={ onClick }\n\t\t\thideOnClick={ ! action.RenderModal }\n\t\t>\n\t\t\t<DropdownMenuV2.ItemLabel>{ label }</DropdownMenuV2.ItemLabel>\n\t\t</DropdownMenuV2.Item>\n\t);\n}\n\n// Copied as is from packages/dataviews/src/item-actions.js\n// With an added onClose prop.\nfunction ActionWithModal( { action, item, ActionTrigger, onClose } ) {\n\tconst [ isModalOpen, setIsModalOpen ] = useState( false );\n\tconst actionTriggerProps = {\n\t\taction,\n\t\tonClick: () => setIsModalOpen( true ),\n\t\titems: [ item ],\n\t};\n\tconst { RenderModal, hideModalHeader } = action;\n\treturn (\n\t\t<>\n\t\t\t<ActionTrigger { ...actionTriggerProps } />\n\t\t\t{ isModalOpen && (\n\t\t\t\t<Modal\n\t\t\t\t\ttitle={ action.modalHeader || action.label }\n\t\t\t\t\t__experimentalHideHeader={ !! hideModalHeader }\n\t\t\t\t\tonRequestClose={ () => {\n\t\t\t\t\t\tsetIsModalOpen( false );\n\t\t\t\t\t} }\n\t\t\t\t\toverlayClassName={ `editor-action-modal editor-action-modal__${ kebabCase(\n\t\t\t\t\t\taction.id\n\t\t\t\t\t) }` }\n\t\t\t\t\tfocusOnMount=\"firstContentElement\"\n\t\t\t\t\tsize=\"small\"\n\t\t\t\t>\n\t\t\t\t\t<RenderModal\n\t\t\t\t\t\titems={ [ item ] }\n\t\t\t\t\t\tcloseModal={ () => {\n\t\t\t\t\t\t\tsetIsModalOpen( false );\n\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t</Modal>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\n// Copied as is from packages/dataviews/src/item-actions.js\n// With an added onClose prop.\nfunction ActionsDropdownMenuGroup( { actions, item, onClose } ) {\n\treturn (\n\t\t<DropdownMenuV2.Group>\n\t\t\t{ actions.map( ( action ) => {\n\t\t\t\tif ( action.RenderModal ) {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<ActionWithModal\n\t\t\t\t\t\t\tkey={ action.id }\n\t\t\t\t\t\t\taction={ action }\n\t\t\t\t\t\t\titem={ item }\n\t\t\t\t\t\t\tActionTrigger={ DropdownMenuItemTrigger }\n\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn (\n\t\t\t\t\t<DropdownMenuItemTrigger\n\t\t\t\t\t\tkey={ action.id }\n\t\t\t\t\t\taction={ action }\n\t\t\t\t\t\tonClick={ () => action.callback( [ item ] ) }\n\t\t\t\t\t\titems={ [ item ] }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</DropdownMenuV2.Group>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,QAAQ,EAAEC,OAAO,QAAQ,oBAAoB;AACtD,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SACCC,WAAW,IAAIC,qBAAqB,EACpCC,MAAM,EACNC,KAAK,QACC,uBAAuB;AAC9B,SAASC,YAAY,QAAQ,kBAAkB;AAC/C,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;;AAEzD;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,cAAc,QAAQ,WAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAE3C,MAAM;EAAEC,c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GA;QAAS,GAJbhB,MAAM,CAACkC,EAKb,CAAC;MAEJ;MACA,oBACCxD,IAAA,CAACuC,uBAAuB;QAEvBjB,MAAM,EAAGA,MAAQ;QACjBW,OAAO,EAAGA,CAAA,KAAMX,MAAM,CAACuC,QAAQ,CAAE,CAAEhD,IAAI,CAAG,CAAG;QAC7C2B,KAAK,EAAG,CAAE3B,IAAI;MAAI,GAHZS,MAAM,CAACkC,EAIb,CAAC;IAEJ,CAAE;EAAC,CACkB,CAAC;AAEzB","ignoreList":[]}
1
+ {"version":3,"names":["useSelect","useState","useMemo","__","privateApis","componentsPrivateApis","Button","Modal","moreVertical","store","coreStore","unlock","usePostActions","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","Menu","kebabCase","PostActions","postType","postId","onActionPerformed","isActionsMenuOpen","setIsActionsMenuOpen","item","permissions","select","getEditedEntityRecord","getEntityRecordPermissions","itemWithPermissions","allActions","actions","filter","action","isEligible","open","trigger","size","icon","label","disabled","length","accessibleWhenDisabled","className","onClick","onOpenChange","placement","children","ActionsDropdownMenuGroup","onClose","DropdownMenuItemTrigger","items","Item","hideOnClick","RenderModal","ItemLabel","ActionWithModal","ActionTrigger","isModalOpen","setIsModalOpen","actionTriggerProps","hideModalHeader","title","modalHeader","__experimentalHideHeader","onRequestClose","overlayClassName","id","focusOnMount","closeModal","Group","map","callback"],"sources":["@wordpress/editor/src/components/post-actions/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useState, useMemo } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tprivateApis as componentsPrivateApis,\n\tButton,\n\tModal,\n} from '@wordpress/components';\nimport { moreVertical } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { usePostActions } from './actions';\n\nconst { Menu, kebabCase } = unlock( componentsPrivateApis );\n\nexport default function PostActions( { postType, postId, onActionPerformed } ) {\n\tconst [ isActionsMenuOpen, setIsActionsMenuOpen ] = useState( false );\n\tconst { item, permissions } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedEntityRecord, getEntityRecordPermissions } =\n\t\t\t\tunlock( select( coreStore ) );\n\t\t\treturn {\n\t\t\t\titem: getEditedEntityRecord( 'postType', postType, postId ),\n\t\t\t\tpermissions: getEntityRecordPermissions(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\tpostId\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ postId, postType ]\n\t);\n\tconst itemWithPermissions = useMemo( () => {\n\t\treturn {\n\t\t\t...item,\n\t\t\tpermissions,\n\t\t};\n\t}, [ item, permissions ] );\n\tconst allActions = usePostActions( { postType, onActionPerformed } );\n\n\tconst actions = useMemo( () => {\n\t\treturn allActions.filter( ( action ) => {\n\t\t\treturn (\n\t\t\t\t! action.isEligible || action.isEligible( itemWithPermissions )\n\t\t\t);\n\t\t} );\n\t}, [ allActions, itemWithPermissions ] );\n\n\treturn (\n\t\t<Menu\n\t\t\topen={ isActionsMenuOpen }\n\t\t\ttrigger={\n\t\t\t\t<Button\n\t\t\t\t\tsize=\"small\"\n\t\t\t\t\ticon={ moreVertical }\n\t\t\t\t\tlabel={ __( 'Actions' ) }\n\t\t\t\t\tdisabled={ ! actions.length }\n\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\tclassName=\"editor-all-actions-button\"\n\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\tsetIsActionsMenuOpen( ! isActionsMenuOpen )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t}\n\t\t\tonOpenChange={ setIsActionsMenuOpen }\n\t\t\tplacement=\"bottom-end\"\n\t\t>\n\t\t\t<ActionsDropdownMenuGroup\n\t\t\t\tactions={ actions }\n\t\t\t\titem={ itemWithPermissions }\n\t\t\t\tonClose={ () => {\n\t\t\t\t\tsetIsActionsMenuOpen( false );\n\t\t\t\t} }\n\t\t\t/>\n\t\t</Menu>\n\t);\n}\n\n// From now on all the functions on this file are copied as from the dataviews packages,\n// The editor packages should not be using the dataviews packages directly,\n// and the dataviews package should not be using the editor packages directly,\n// so duplicating the code here seems like the least bad option.\n\n// Copied as is from packages/dataviews/src/item-actions.js\nfunction DropdownMenuItemTrigger( { action, onClick, items } ) {\n\tconst label =\n\t\ttypeof action.label === 'string' ? action.label : action.label( items );\n\treturn (\n\t\t<Menu.Item onClick={ onClick } hideOnClick={ ! action.RenderModal }>\n\t\t\t<Menu.ItemLabel>{ label }</Menu.ItemLabel>\n\t\t</Menu.Item>\n\t);\n}\n\n// Copied as is from packages/dataviews/src/item-actions.js\n// With an added onClose prop.\nfunction ActionWithModal( { action, item, ActionTrigger, onClose } ) {\n\tconst [ isModalOpen, setIsModalOpen ] = useState( false );\n\tconst actionTriggerProps = {\n\t\taction,\n\t\tonClick: () => setIsModalOpen( true ),\n\t\titems: [ item ],\n\t};\n\tconst { RenderModal, hideModalHeader } = action;\n\treturn (\n\t\t<>\n\t\t\t<ActionTrigger { ...actionTriggerProps } />\n\t\t\t{ isModalOpen && (\n\t\t\t\t<Modal\n\t\t\t\t\ttitle={ action.modalHeader || action.label }\n\t\t\t\t\t__experimentalHideHeader={ !! hideModalHeader }\n\t\t\t\t\tonRequestClose={ () => {\n\t\t\t\t\t\tsetIsModalOpen( false );\n\t\t\t\t\t} }\n\t\t\t\t\toverlayClassName={ `editor-action-modal editor-action-modal__${ kebabCase(\n\t\t\t\t\t\taction.id\n\t\t\t\t\t) }` }\n\t\t\t\t\tfocusOnMount=\"firstContentElement\"\n\t\t\t\t\tsize=\"small\"\n\t\t\t\t>\n\t\t\t\t\t<RenderModal\n\t\t\t\t\t\titems={ [ item ] }\n\t\t\t\t\t\tcloseModal={ () => {\n\t\t\t\t\t\t\tsetIsModalOpen( false );\n\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t</Modal>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\n// Copied as is from packages/dataviews/src/item-actions.js\n// With an added onClose prop.\nfunction ActionsDropdownMenuGroup( { actions, item, onClose } ) {\n\treturn (\n\t\t<Menu.Group>\n\t\t\t{ actions.map( ( action ) => {\n\t\t\t\tif ( action.RenderModal ) {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<ActionWithModal\n\t\t\t\t\t\t\tkey={ action.id }\n\t\t\t\t\t\t\taction={ action }\n\t\t\t\t\t\t\titem={ item }\n\t\t\t\t\t\t\tActionTrigger={ DropdownMenuItemTrigger }\n\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn (\n\t\t\t\t\t<DropdownMenuItemTrigger\n\t\t\t\t\t\tkey={ action.id }\n\t\t\t\t\t\taction={ action }\n\t\t\t\t\t\tonClick={ () => action.callback( [ item ] ) }\n\t\t\t\t\t\titems={ [ item ] }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</Menu.Group>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,QAAQ,EAAEC,OAAO,QAAQ,oBAAoB;AACtD,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SACCC,WAAW,IAAIC,qBAAqB,EACpCC,MAAM,EACNC,KAAK,QACC,uBAAuB;AAC9B,SAASC,YAAY,QAAQ,kBAAkB;AAC/C,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;;AAEzD;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,cAAc,QAAQ,WAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAE3C,MAAM;EAAEC,IAAI;EAAEC;AAAU,CAAC,GAAGT,MAAM,CAAEN,qBAAsB,CAAC;AAE3D,eAAe,SAASg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;QAEvBjB,MAAM,EAAGA,MAAQ;QACjBW,OAAO,EAAGA,CAAA,KAAMX,MAAM,CAACuC,QAAQ,CAAE,CAAEhD,IAAI,CAAG,CAAG;QAC7C2B,KAAK,EAAG,CAAE3B,IAAI;MAAI,GAHZS,MAAM,CAACkC,EAIb,CAAC;IAEJ,CAAE;EAAC,CACQ,CAAC;AAEf","ignoreList":[]}
@@ -14,8 +14,7 @@ import PostAuthorCheck from './check';
14
14
  import PostAuthorForm from './index';
15
15
  import PostPanelRow from '../post-panel-row';
16
16
  import { useAuthorsQuery } from './hook';
17
- import { jsx as _jsx } from "react/jsx-runtime";
18
- import { jsxs as _jsxs } from "react/jsx-runtime";
17
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
19
18
  function PostAuthorToggle({
20
19
  isOpen,
21
20
  onClick
@@ -28,10 +27,10 @@ function PostAuthorToggle({
28
27
  size: "compact",
29
28
  className: "editor-post-author__panel-toggle",
30
29
  variant: "tertiary",
31
- "aria-expanded": isOpen
32
- // translators: %s: Current post link.
33
- ,
34
- "aria-label": sprintf(__('Change author: %s'), authorName),
30
+ "aria-expanded": isOpen,
31
+ "aria-label":
32
+ // translators: %s: Author name.
33
+ sprintf(__('Change author: %s'), authorName),
35
34
  onClick: onClick,
36
35
  children: authorName
37
36
  });
@@ -1 +1 @@
1
- {"version":3,"names":["__","sprintf","Button","Dropdown","useState","useMemo","decodeEntities","__experimentalInspectorPopoverHeader","InspectorPopoverHeader","PostAuthorCheck","PostAuthorForm","PostPanelRow","useAuthorsQuery","jsx","_jsx","jsxs","_jsxs","PostAuthorToggle","isOpen","onClick","postAuthor","authorName","name","size","className","variant","children","PostAuthor","popoverAnchor","setPopoverAnchor","popoverProps","anchor","placement","offset","shift","label","ref","contentClassName","focusOnMount","renderToggle","onToggle","renderContent","onClose","title"],"sources":["@wordpress/editor/src/components/post-author/panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Button, Dropdown } from '@wordpress/components';\nimport { useState, useMemo } from '@wordpress/element';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport PostAuthorCheck from './check';\nimport PostAuthorForm from './index';\nimport PostPanelRow from '../post-panel-row';\nimport { useAuthorsQuery } from './hook';\n\nfunction PostAuthorToggle( { isOpen, onClick } ) {\n\tconst { postAuthor } = useAuthorsQuery();\n\tconst authorName =\n\t\tdecodeEntities( postAuthor?.name ) || __( '(No author)' );\n\treturn (\n\t\t<Button\n\t\t\tsize=\"compact\"\n\t\t\tclassName=\"editor-post-author__panel-toggle\"\n\t\t\tvariant=\"tertiary\"\n\t\t\taria-expanded={ isOpen }\n\t\t\t// translators: %s: Current post link.\n\t\t\taria-label={ sprintf( __( 'Change author: %s' ), authorName ) }\n\t\t\tonClick={ onClick }\n\t\t>\n\t\t\t{ authorName }\n\t\t</Button>\n\t);\n}\n\n/**\n * Renders the Post Author Panel component.\n *\n * @return {Component} The component to be rendered.\n */\nexport function PostAuthor() {\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<PostAuthorCheck>\n\t\t\t<PostPanelRow label={ __( 'Author' ) } ref={ setPopoverAnchor }>\n\t\t\t\t<Dropdown\n\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\tcontentClassName=\"editor-post-author__panel-dialog\"\n\t\t\t\t\tfocusOnMount\n\t\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t\t<PostAuthorToggle\n\t\t\t\t\t\t\tisOpen={ isOpen }\n\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t\t<div className=\"editor-post-author\">\n\t\t\t\t\t\t\t<InspectorPopoverHeader\n\t\t\t\t\t\t\t\ttitle={ __( 'Author' ) }\n\t\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<PostAuthorForm onClose={ onClose } />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</PostPanelRow>\n\t\t</PostAuthorCheck>\n\t);\n}\n\nexport default PostAuthor;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,MAAM,EAAEC,QAAQ,QAAQ,uBAAuB;AACxD,SAASC,QAAQ,EAAEC,OAAO,QAAQ,oBAAoB;AACtD,SAASC,cAAc,QAAQ,0BAA0B;AACzD,SAASC,oCAAoC,IAAIC,sBAAsB,QAAQ,yBAAyB;;AAExG;AACA;AACA;AACA,OAAOC,eAAe,MAAM,SAAS;AACrC,OAAOC,cAAc,MAAM,SAAS;AACpC,OAAOC,YAAY,MAAM,mBAAmB;AAC5C,SAASC,eAAe,QAAQ,QAAQ;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAEzC,SAASC,gBAAgBA,CAAE;EAAEC,MAAM;EAAEC;AAAQ,CAAC,EAAG;EAChD,MAAM;IAAEC;EAAW,CAAC,GAAGR,eAAe,CAAC,CAAC;EACxC,MAAMS,UAAU,GACff,cAAc,CAAEc,UAAU,EAAEE,IAAK,CAAC,IAAItB,EAAE,CAAE,aAAc,CAAC;EAC1D,oBACCc,IAAA,CA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AGA;UAAS,CACnB,CAAC,eACF5B,IAAA,CAACJ,cAAc;YAACgC,OAAO,EAAGA;UAAS,CAAE,CAAC;QAAA,CAClC;MACH,CACH;IAAC,CACW;EAAC,CACC,CAAC;AAEpB;AAEA,eAAef,UAAU","ignoreList":[]}
1
+ {"version":3,"names":["__","sprintf","Button","Dropdown","useState","useMemo","decodeEntities","__experimentalInspectorPopoverHeader","InspectorPopoverHeader","PostAuthorCheck","PostAuthorForm","PostPanelRow","useAuthorsQuery","jsx","_jsx","jsxs","_jsxs","PostAuthorToggle","isOpen","onClick","postAuthor","authorName","name","size","className","variant","children","PostAuthor","popoverAnchor","setPopoverAnchor","popoverProps","anchor","placement","offset","shift","label","ref","contentClassName","focusOnMount","renderToggle","onToggle","renderContent","onClose","title"],"sources":["@wordpress/editor/src/components/post-author/panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Button, Dropdown } from '@wordpress/components';\nimport { useState, useMemo } from '@wordpress/element';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport PostAuthorCheck from './check';\nimport PostAuthorForm from './index';\nimport PostPanelRow from '../post-panel-row';\nimport { useAuthorsQuery } from './hook';\n\nfunction PostAuthorToggle( { isOpen, onClick } ) {\n\tconst { postAuthor } = useAuthorsQuery();\n\tconst authorName =\n\t\tdecodeEntities( postAuthor?.name ) || __( '(No author)' );\n\treturn (\n\t\t<Button\n\t\t\tsize=\"compact\"\n\t\t\tclassName=\"editor-post-author__panel-toggle\"\n\t\t\tvariant=\"tertiary\"\n\t\t\taria-expanded={ isOpen }\n\t\t\taria-label={\n\t\t\t\t// translators: %s: Author name.\n\t\t\t\tsprintf( __( 'Change author: %s' ), authorName )\n\t\t\t}\n\t\t\tonClick={ onClick }\n\t\t>\n\t\t\t{ authorName }\n\t\t</Button>\n\t);\n}\n\n/**\n * Renders the Post Author Panel component.\n *\n * @return {Component} The component to be rendered.\n */\nexport function PostAuthor() {\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<PostAuthorCheck>\n\t\t\t<PostPanelRow label={ __( 'Author' ) } ref={ setPopoverAnchor }>\n\t\t\t\t<Dropdown\n\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\tcontentClassName=\"editor-post-author__panel-dialog\"\n\t\t\t\t\tfocusOnMount\n\t\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t\t<PostAuthorToggle\n\t\t\t\t\t\t\tisOpen={ isOpen }\n\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t\t<div className=\"editor-post-author\">\n\t\t\t\t\t\t\t<InspectorPopoverHeader\n\t\t\t\t\t\t\t\ttitle={ __( 'Author' ) }\n\t\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<PostAuthorForm onClose={ onClose } />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</PostPanelRow>\n\t\t</PostAuthorCheck>\n\t);\n}\n\nexport default PostAuthor;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,MAAM,EAAEC,QAAQ,Q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