@wordpress/editor 13.15.0 → 13.17.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 (557) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/components/autocompleters/index.js +0 -2
  3. package/build/components/autocompleters/index.js.map +1 -1
  4. package/build/components/autocompleters/user.js +2 -9
  5. package/build/components/autocompleters/user.js.map +1 -1
  6. package/build/components/autosave-monitor/index.js +0 -24
  7. package/build/components/autosave-monitor/index.js.map +1 -1
  8. package/build/components/character-count/index.js +1 -4
  9. package/build/components/character-count/index.js.map +1 -1
  10. package/build/components/deprecated.js +1 -11
  11. package/build/components/deprecated.js.map +1 -1
  12. package/build/components/deprecated.native.js +0 -1
  13. package/build/components/deprecated.native.js.map +1 -1
  14. package/build/components/document-outline/check.js +1 -7
  15. package/build/components/document-outline/check.js.map +1 -1
  16. package/build/components/document-outline/index.js +7 -24
  17. package/build/components/document-outline/index.js.map +1 -1
  18. package/build/components/document-outline/item.js +1 -5
  19. package/build/components/document-outline/item.js.map +1 -1
  20. package/build/components/editor-help/add-blocks.native.js +1 -8
  21. package/build/components/editor-help/add-blocks.native.js.map +1 -1
  22. package/build/components/editor-help/customize-blocks.native.js +1 -8
  23. package/build/components/editor-help/customize-blocks.native.js.map +1 -1
  24. package/build/components/editor-help/help-detail-navigation-screen.native.js +5 -13
  25. package/build/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
  26. package/build/components/editor-help/help-get-support-button.native.js +1 -7
  27. package/build/components/editor-help/help-get-support-button.native.js.map +1 -1
  28. package/build/components/editor-help/help-section-title.native.js +1 -7
  29. package/build/components/editor-help/help-section-title.native.js.map +1 -1
  30. package/build/components/editor-help/help-topic-row.native.js +1 -8
  31. package/build/components/editor-help/help-topic-row.native.js.map +1 -1
  32. package/build/components/editor-help/icon-move-blocks.native.js +0 -4
  33. package/build/components/editor-help/icon-move-blocks.native.js.map +1 -1
  34. package/build/components/editor-help/index.native.js +8 -29
  35. package/build/components/editor-help/index.native.js.map +1 -1
  36. package/build/components/editor-help/intro-to-blocks.native.js +1 -9
  37. package/build/components/editor-help/intro-to-blocks.native.js.map +1 -1
  38. package/build/components/editor-help/move-blocks.native.js +1 -8
  39. package/build/components/editor-help/move-blocks.native.js.map +1 -1
  40. package/build/components/editor-help/remove-blocks.native.js +1 -8
  41. package/build/components/editor-help/remove-blocks.native.js.map +1 -1
  42. package/build/components/editor-help/view-sections.native.js +1 -12
  43. package/build/components/editor-help/view-sections.native.js.map +1 -1
  44. package/build/components/editor-history/redo.js +6 -14
  45. package/build/components/editor-history/redo.js.map +1 -1
  46. package/build/components/editor-history/undo.js +6 -14
  47. package/build/components/editor-history/undo.js.map +1 -1
  48. package/build/components/editor-notices/index.js +1 -10
  49. package/build/components/editor-notices/index.js.map +1 -1
  50. package/build/components/editor-snackbars/index.js +1 -5
  51. package/build/components/editor-snackbars/index.js.map +1 -1
  52. package/build/components/entities-saved-states/entity-record-item.js +3 -10
  53. package/build/components/entities-saved-states/entity-record-item.js.map +1 -1
  54. package/build/components/entities-saved-states/entity-type-list.js +3 -15
  55. package/build/components/entities-saved-states/entity-type-list.js.map +1 -1
  56. package/build/components/entities-saved-states/hooks/use-is-dirty.js +5 -14
  57. package/build/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -1
  58. package/build/components/entities-saved-states/index.js +8 -27
  59. package/build/components/entities-saved-states/index.js.map +1 -1
  60. package/build/components/error-boundary/index.js +1 -18
  61. package/build/components/error-boundary/index.js.map +1 -1
  62. package/build/components/global-keyboard-shortcuts/index.js +5 -9
  63. package/build/components/global-keyboard-shortcuts/index.js.map +1 -1
  64. package/build/components/global-keyboard-shortcuts/register-shortcuts.js +1 -8
  65. package/build/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
  66. package/build/components/index.js +4 -76
  67. package/build/components/index.js.map +1 -1
  68. package/build/components/index.native.js +0 -9
  69. package/build/components/index.native.js.map +1 -1
  70. package/build/components/local-autosave-monitor/index.js +6 -31
  71. package/build/components/local-autosave-monitor/index.js.map +1 -1
  72. package/build/components/media-categories/index.js +30 -45
  73. package/build/components/media-categories/index.js.map +1 -1
  74. package/build/components/page-attributes/check.js +3 -7
  75. package/build/components/page-attributes/check.js.map +1 -1
  76. package/build/components/page-attributes/order.js +17 -42
  77. package/build/components/page-attributes/order.js.map +1 -1
  78. package/build/components/page-attributes/parent.js +8 -34
  79. package/build/components/page-attributes/parent.js.map +1 -1
  80. package/build/components/post-author/check.js +1 -11
  81. package/build/components/post-author/check.js.map +1 -1
  82. package/build/components/post-author/combobox.js +7 -23
  83. package/build/components/post-author/combobox.js.map +1 -1
  84. package/build/components/post-author/constants.js +0 -1
  85. package/build/components/post-author/constants.js.map +1 -1
  86. package/build/components/post-author/index.js +1 -12
  87. package/build/components/post-author/index.js.map +1 -1
  88. package/build/components/post-author/select.js +1 -12
  89. package/build/components/post-author/select.js.map +1 -1
  90. package/build/components/post-comments/index.js +11 -23
  91. package/build/components/post-comments/index.js.map +1 -1
  92. package/build/components/post-excerpt/check.js +6 -8
  93. package/build/components/post-excerpt/check.js.map +1 -1
  94. package/build/components/post-excerpt/index.js +10 -27
  95. package/build/components/post-excerpt/index.js.map +1 -1
  96. package/build/components/post-featured-image/check.js +6 -9
  97. package/build/components/post-featured-image/check.js.map +1 -1
  98. package/build/components/post-featured-image/index.js +13 -42
  99. package/build/components/post-featured-image/index.js.map +1 -1
  100. package/build/components/post-format/check.js +9 -18
  101. package/build/components/post-format/check.js.map +1 -1
  102. package/build/components/post-format/index.js +2 -20
  103. package/build/components/post-format/index.js.map +1 -1
  104. package/build/components/post-last-revision/check.js +15 -22
  105. package/build/components/post-last-revision/check.js.map +1 -1
  106. package/build/components/post-last-revision/index.js +17 -28
  107. package/build/components/post-last-revision/index.js.map +1 -1
  108. package/build/components/post-locked-modal/index.js +8 -28
  109. package/build/components/post-locked-modal/index.js.map +1 -1
  110. package/build/components/post-pending-status/check.js +16 -24
  111. package/build/components/post-pending-status/check.js.map +1 -1
  112. package/build/components/post-pending-status/index.js +10 -28
  113. package/build/components/post-pending-status/index.js.map +1 -1
  114. package/build/components/post-pingbacks/index.js +11 -23
  115. package/build/components/post-pingbacks/index.js.map +1 -1
  116. package/build/components/post-preview-button/index.js +11 -22
  117. package/build/components/post-preview-button/index.js.map +1 -1
  118. package/build/components/post-publish-button/index.js +6 -32
  119. package/build/components/post-publish-button/index.js.map +1 -1
  120. package/build/components/post-publish-button/label.js +1 -10
  121. package/build/components/post-publish-button/label.js.map +1 -1
  122. package/build/components/post-publish-panel/index.js +1 -22
  123. package/build/components/post-publish-panel/index.js.map +1 -1
  124. package/build/components/post-publish-panel/maybe-category-panel.js +4 -14
  125. package/build/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  126. package/build/components/post-publish-panel/maybe-post-format-panel.js +2 -18
  127. package/build/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  128. package/build/components/post-publish-panel/maybe-tags-panel.js +2 -17
  129. package/build/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  130. package/build/components/post-publish-panel/maybe-upload-media.js +1 -18
  131. package/build/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  132. package/build/components/post-publish-panel/postpublish.js +3 -27
  133. package/build/components/post-publish-panel/postpublish.js.map +1 -1
  134. package/build/components/post-publish-panel/prepublish.js +1 -26
  135. package/build/components/post-publish-panel/prepublish.js.map +1 -1
  136. package/build/components/post-saved-state/index.js +12 -29
  137. package/build/components/post-saved-state/index.js.map +1 -1
  138. package/build/components/post-schedule/check.js +1 -8
  139. package/build/components/post-schedule/check.js.map +1 -1
  140. package/build/components/post-schedule/index.js +7 -13
  141. package/build/components/post-schedule/index.js.map +1 -1
  142. package/build/components/post-schedule/label.js +18 -29
  143. package/build/components/post-schedule/label.js.map +1 -1
  144. package/build/components/post-slug/check.js +1 -4
  145. package/build/components/post-slug/check.js.map +1 -1
  146. package/build/components/post-slug/index.js +1 -19
  147. package/build/components/post-slug/index.js.map +1 -1
  148. package/build/components/post-sticky/check.js +1 -8
  149. package/build/components/post-sticky/check.js.map +1 -1
  150. package/build/components/post-sticky/index.js +1 -12
  151. package/build/components/post-sticky/index.js.map +1 -1
  152. package/build/components/post-switch-to-draft-button/index.js +1 -14
  153. package/build/components/post-switch-to-draft-button/index.js.map +1 -1
  154. package/build/components/post-sync-status/index.js +5 -18
  155. package/build/components/post-sync-status/index.js.map +1 -1
  156. package/build/components/post-taxonomies/check.js +1 -9
  157. package/build/components/post-taxonomies/check.js.map +1 -1
  158. package/build/components/post-taxonomies/flat-term-selector.js +15 -50
  159. package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
  160. package/build/components/post-taxonomies/hierarchical-term-selector.js +27 -79
  161. package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  162. package/build/components/post-taxonomies/index.js +3 -13
  163. package/build/components/post-taxonomies/index.js.map +1 -1
  164. package/build/components/post-taxonomies/most-used-terms.js +1 -9
  165. package/build/components/post-taxonomies/most-used-terms.js.map +1 -1
  166. package/build/components/post-template/index.js +1 -11
  167. package/build/components/post-template/index.js.map +1 -1
  168. package/build/components/post-text-editor/index.js +3 -17
  169. package/build/components/post-text-editor/index.js.map +1 -1
  170. package/build/components/post-title/index.js +14 -46
  171. package/build/components/post-title/index.js.map +1 -1
  172. package/build/components/post-title/index.native.js +7 -44
  173. package/build/components/post-title/index.native.js.map +1 -1
  174. package/build/components/post-trash/check.js +1 -7
  175. package/build/components/post-trash/check.js.map +1 -1
  176. package/build/components/post-trash/index.js +1 -8
  177. package/build/components/post-trash/index.js.map +1 -1
  178. package/build/components/post-type-support-check/index.js +10 -23
  179. package/build/components/post-type-support-check/index.js.map +1 -1
  180. package/build/components/post-url/check.js +1 -12
  181. package/build/components/post-url/check.js.map +1 -1
  182. package/build/components/post-url/index.js +3 -15
  183. package/build/components/post-url/index.js.map +1 -1
  184. package/build/components/post-url/label.js +1 -5
  185. package/build/components/post-url/label.js.map +1 -1
  186. package/build/components/post-visibility/check.js +1 -7
  187. package/build/components/post-visibility/check.js.map +1 -1
  188. package/build/components/post-visibility/index.js +1 -17
  189. package/build/components/post-visibility/index.js.map +1 -1
  190. package/build/components/post-visibility/label.js +1 -5
  191. package/build/components/post-visibility/label.js.map +1 -1
  192. package/build/components/post-visibility/utils.js +1 -2
  193. package/build/components/post-visibility/utils.js.map +1 -1
  194. package/build/components/provider/index.js +13 -27
  195. package/build/components/provider/index.js.map +1 -1
  196. package/build/components/provider/index.native.js +18 -70
  197. package/build/components/provider/index.native.js.map +1 -1
  198. package/build/components/provider/use-block-editor-settings.js +9 -20
  199. package/build/components/provider/use-block-editor-settings.js.map +1 -1
  200. package/build/components/provider/use-block-editor-settings.native.js +5 -11
  201. package/build/components/provider/use-block-editor-settings.native.js.map +1 -1
  202. package/build/components/provider/with-registry-provider.js +5 -12
  203. package/build/components/provider/with-registry-provider.js.map +1 -1
  204. package/build/components/table-of-contents/index.js +4 -14
  205. package/build/components/table-of-contents/index.js.map +1 -1
  206. package/build/components/table-of-contents/panel.js +1 -13
  207. package/build/components/table-of-contents/panel.js.map +1 -1
  208. package/build/components/template-validation-notice/index.js +3 -12
  209. package/build/components/template-validation-notice/index.js.map +1 -1
  210. package/build/components/theme-support-check/index.js +3 -12
  211. package/build/components/theme-support-check/index.js.map +1 -1
  212. package/build/components/time-to-read/index.js +2 -10
  213. package/build/components/time-to-read/index.js.map +1 -1
  214. package/build/components/unsaved-changes-warning/index.js +21 -35
  215. package/build/components/unsaved-changes-warning/index.js.map +1 -1
  216. package/build/components/word-count/index.js +2 -7
  217. package/build/components/word-count/index.js.map +1 -1
  218. package/build/hooks/custom-sources-backwards-compatibility.js +8 -42
  219. package/build/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  220. package/build/hooks/default-autocompleters.js +3 -4
  221. package/build/hooks/default-autocompleters.js.map +1 -1
  222. package/build/hooks/index.js +0 -1
  223. package/build/hooks/index.js.map +1 -1
  224. package/build/hooks/index.native.js.map +1 -1
  225. package/build/index.js +0 -9
  226. package/build/index.js.map +1 -1
  227. package/build/index.native.js +0 -11
  228. package/build/index.native.js.map +1 -1
  229. package/build/lock-unlock.js +1 -2
  230. package/build/lock-unlock.js.map +1 -1
  231. package/build/private-apis.js +1 -4
  232. package/build/private-apis.js.map +1 -1
  233. package/build/store/actions.js +61 -130
  234. package/build/store/actions.js.map +1 -1
  235. package/build/store/actions.native.js +1 -8
  236. package/build/store/actions.native.js.map +1 -1
  237. package/build/store/constants.js +1 -2
  238. package/build/store/constants.js.map +1 -1
  239. package/build/store/defaults.js +2 -3
  240. package/build/store/defaults.js.map +1 -1
  241. package/build/store/index.js +3 -11
  242. package/build/store/index.js.map +1 -1
  243. package/build/store/local-autosave.js +0 -4
  244. package/build/store/local-autosave.js.map +1 -1
  245. package/build/store/reducer.js +19 -49
  246. package/build/store/reducer.js.map +1 -1
  247. package/build/store/reducer.native.js +3 -17
  248. package/build/store/reducer.native.js.map +1 -1
  249. package/build/store/selectors.js +170 -296
  250. package/build/store/selectors.js.map +1 -1
  251. package/build/store/selectors.native.js +4 -11
  252. package/build/store/selectors.native.js.map +1 -1
  253. package/build/store/utils/notice-builder.js +13 -24
  254. package/build/store/utils/notice-builder.js.map +1 -1
  255. package/build/utils/get-template-part-icon.js +0 -3
  256. package/build/utils/get-template-part-icon.js.map +1 -1
  257. package/build/utils/index.js +0 -4
  258. package/build/utils/index.js.map +1 -1
  259. package/build/utils/index.native.js +0 -2
  260. package/build/utils/index.native.js.map +1 -1
  261. package/build/utils/media-upload/index.js +2 -6
  262. package/build/utils/media-upload/index.js.map +1 -1
  263. package/build/utils/media-upload/index.native.js +0 -1
  264. package/build/utils/media-upload/index.native.js.map +1 -1
  265. package/build/utils/terms.js +8 -18
  266. package/build/utils/terms.js.map +1 -1
  267. package/build/utils/url.js +0 -4
  268. package/build/utils/url.js.map +1 -1
  269. package/build-module/components/autocompleters/index.js.map +1 -1
  270. package/build-module/components/autocompleters/user.js +2 -5
  271. package/build-module/components/autocompleters/user.js.map +1 -1
  272. package/build-module/components/autosave-monitor/index.js +2 -17
  273. package/build-module/components/autosave-monitor/index.js.map +1 -1
  274. package/build-module/components/character-count/index.js +1 -1
  275. package/build-module/components/character-count/index.js.map +1 -1
  276. package/build-module/components/deprecated.js +0 -4
  277. package/build-module/components/deprecated.js.map +1 -1
  278. package/build-module/components/deprecated.native.js +0 -1
  279. package/build-module/components/deprecated.native.js.map +1 -1
  280. package/build-module/components/document-outline/check.js +0 -4
  281. package/build-module/components/document-outline/check.js.map +1 -1
  282. package/build-module/components/document-outline/index.js +9 -13
  283. package/build-module/components/document-outline/index.js.map +1 -1
  284. package/build-module/components/document-outline/item.js +0 -3
  285. package/build-module/components/document-outline/item.js.map +1 -1
  286. package/build-module/components/editor-help/add-blocks.native.js +2 -5
  287. package/build-module/components/editor-help/add-blocks.native.js.map +1 -1
  288. package/build-module/components/editor-help/customize-blocks.native.js +2 -5
  289. package/build-module/components/editor-help/customize-blocks.native.js.map +1 -1
  290. package/build-module/components/editor-help/help-detail-navigation-screen.native.js +6 -8
  291. package/build-module/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
  292. package/build-module/components/editor-help/help-get-support-button.native.js +2 -5
  293. package/build-module/components/editor-help/help-get-support-button.native.js.map +1 -1
  294. package/build-module/components/editor-help/help-section-title.native.js +2 -5
  295. package/build-module/components/editor-help/help-section-title.native.js.map +1 -1
  296. package/build-module/components/editor-help/help-topic-row.native.js +1 -6
  297. package/build-module/components/editor-help/help-topic-row.native.js.map +1 -1
  298. package/build-module/components/editor-help/icon-move-blocks.native.js +0 -1
  299. package/build-module/components/editor-help/icon-move-blocks.native.js.map +1 -1
  300. package/build-module/components/editor-help/index.native.js +9 -9
  301. package/build-module/components/editor-help/index.native.js.map +1 -1
  302. package/build-module/components/editor-help/intro-to-blocks.native.js +2 -5
  303. package/build-module/components/editor-help/intro-to-blocks.native.js.map +1 -1
  304. package/build-module/components/editor-help/move-blocks.native.js +2 -5
  305. package/build-module/components/editor-help/move-blocks.native.js.map +1 -1
  306. package/build-module/components/editor-help/remove-blocks.native.js +2 -5
  307. package/build-module/components/editor-help/remove-blocks.native.js.map +1 -1
  308. package/build-module/components/editor-help/view-sections.native.js +2 -4
  309. package/build-module/components/editor-help/view-sections.native.js.map +1 -1
  310. package/build-module/components/editor-history/redo.js +6 -8
  311. package/build-module/components/editor-history/redo.js.map +1 -1
  312. package/build-module/components/editor-history/undo.js +6 -8
  313. package/build-module/components/editor-history/undo.js.map +1 -1
  314. package/build-module/components/editor-notices/index.js +1 -2
  315. package/build-module/components/editor-notices/index.js.map +1 -1
  316. package/build-module/components/editor-snackbars/index.js +0 -1
  317. package/build-module/components/editor-snackbars/index.js.map +1 -1
  318. package/build-module/components/entities-saved-states/entity-record-item.js +3 -4
  319. package/build-module/components/entities-saved-states/entity-record-item.js.map +1 -1
  320. package/build-module/components/entities-saved-states/entity-type-list.js +3 -10
  321. package/build-module/components/entities-saved-states/entity-type-list.js.map +1 -1
  322. package/build-module/components/entities-saved-states/hooks/use-is-dirty.js +4 -7
  323. package/build-module/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -1
  324. package/build-module/components/entities-saved-states/index.js +8 -16
  325. package/build-module/components/entities-saved-states/index.js.map +1 -1
  326. package/build-module/components/error-boundary/index.js +1 -12
  327. package/build-module/components/error-boundary/index.js.map +1 -1
  328. package/build-module/components/global-keyboard-shortcuts/index.js +5 -6
  329. package/build-module/components/global-keyboard-shortcuts/index.js.map +1 -1
  330. package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js +0 -3
  331. package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
  332. package/build-module/components/index.js +6 -3
  333. package/build-module/components/index.js.map +1 -1
  334. package/build-module/components/index.native.js +4 -2
  335. package/build-module/components/index.native.js.map +1 -1
  336. package/build-module/components/local-autosave-monitor/index.js +6 -21
  337. package/build-module/components/local-autosave-monitor/index.js.map +1 -1
  338. package/build-module/components/media-categories/index.js +31 -41
  339. package/build-module/components/media-categories/index.js.map +1 -1
  340. package/build-module/components/page-attributes/check.js +3 -3
  341. package/build-module/components/page-attributes/check.js.map +1 -1
  342. package/build-module/components/page-attributes/order.js +17 -31
  343. package/build-module/components/page-attributes/order.js.map +1 -1
  344. package/build-module/components/page-attributes/parent.js +9 -23
  345. package/build-module/components/page-attributes/parent.js.map +1 -1
  346. package/build-module/components/post-author/check.js +1 -5
  347. package/build-module/components/post-author/check.js.map +1 -1
  348. package/build-module/components/post-author/combobox.js +7 -16
  349. package/build-module/components/post-author/combobox.js.map +1 -1
  350. package/build-module/components/post-author/constants.js +0 -1
  351. package/build-module/components/post-author/constants.js.map +1 -1
  352. package/build-module/components/post-author/index.js +1 -6
  353. package/build-module/components/post-author/index.js.map +1 -1
  354. package/build-module/components/post-author/select.js +1 -6
  355. package/build-module/components/post-author/select.js.map +1 -1
  356. package/build-module/components/post-comments/index.js +12 -19
  357. package/build-module/components/post-comments/index.js.map +1 -1
  358. package/build-module/components/post-excerpt/check.js +5 -6
  359. package/build-module/components/post-excerpt/check.js.map +1 -1
  360. package/build-module/components/post-excerpt/index.js +11 -23
  361. package/build-module/components/post-excerpt/index.js.map +1 -1
  362. package/build-module/components/post-featured-image/check.js +5 -6
  363. package/build-module/components/post-featured-image/check.js.map +1 -1
  364. package/build-module/components/post-featured-image/index.js +13 -31
  365. package/build-module/components/post-featured-image/index.js.map +1 -1
  366. package/build-module/components/post-format/check.js +10 -15
  367. package/build-module/components/post-format/check.js.map +1 -1
  368. package/build-module/components/post-format/index.js +4 -12
  369. package/build-module/components/post-format/index.js.map +1 -1
  370. package/build-module/components/post-last-revision/check.js +17 -17
  371. package/build-module/components/post-last-revision/check.js.map +1 -1
  372. package/build-module/components/post-last-revision/index.js +18 -21
  373. package/build-module/components/post-last-revision/index.js.map +1 -1
  374. package/build-module/components/post-locked-modal/index.js +8 -22
  375. package/build-module/components/post-locked-modal/index.js.map +1 -1
  376. package/build-module/components/post-pending-status/check.js +17 -20
  377. package/build-module/components/post-pending-status/check.js.map +1 -1
  378. package/build-module/components/post-pending-status/index.js +11 -20
  379. package/build-module/components/post-pending-status/index.js.map +1 -1
  380. package/build-module/components/post-pingbacks/index.js +12 -19
  381. package/build-module/components/post-pingbacks/index.js.map +1 -1
  382. package/build-module/components/post-preview-button/index.js +11 -17
  383. package/build-module/components/post-preview-button/index.js.map +1 -1
  384. package/build-module/components/post-publish-button/index.js +7 -23
  385. package/build-module/components/post-publish-button/index.js.map +1 -1
  386. package/build-module/components/post-publish-button/label.js +1 -4
  387. package/build-module/components/post-publish-button/label.js.map +1 -1
  388. package/build-module/components/post-publish-panel/index.js +1 -8
  389. package/build-module/components/post-publish-panel/index.js.map +1 -1
  390. package/build-module/components/post-publish-panel/maybe-category-panel.js +4 -8
  391. package/build-module/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  392. package/build-module/components/post-publish-panel/maybe-post-format-panel.js +2 -12
  393. package/build-module/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  394. package/build-module/components/post-publish-panel/maybe-tags-panel.js +2 -9
  395. package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  396. package/build-module/components/post-publish-panel/maybe-upload-media.js +1 -12
  397. package/build-module/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  398. package/build-module/components/post-publish-panel/postpublish.js +3 -16
  399. package/build-module/components/post-publish-panel/postpublish.js.map +1 -1
  400. package/build-module/components/post-publish-panel/prepublish.js +1 -10
  401. package/build-module/components/post-publish-panel/prepublish.js.map +1 -1
  402. package/build-module/components/post-saved-state/index.js +15 -23
  403. package/build-module/components/post-saved-state/index.js.map +1 -1
  404. package/build-module/components/post-schedule/check.js +1 -3
  405. package/build-module/components/post-schedule/check.js.map +1 -1
  406. package/build-module/components/post-schedule/index.js +8 -8
  407. package/build-module/components/post-schedule/index.js.map +1 -1
  408. package/build-module/components/post-schedule/label.js +18 -22
  409. package/build-module/components/post-schedule/label.js.map +1 -1
  410. package/build-module/components/post-slug/check.js +0 -1
  411. package/build-module/components/post-slug/check.js.map +1 -1
  412. package/build-module/components/post-slug/index.js +1 -8
  413. package/build-module/components/post-slug/index.js.map +1 -1
  414. package/build-module/components/post-sticky/check.js +1 -3
  415. package/build-module/components/post-sticky/check.js.map +1 -1
  416. package/build-module/components/post-sticky/index.js +1 -3
  417. package/build-module/components/post-sticky/index.js.map +1 -1
  418. package/build-module/components/post-switch-to-draft-button/index.js +1 -9
  419. package/build-module/components/post-switch-to-draft-button/index.js.map +1 -1
  420. package/build-module/components/post-sync-status/index.js +5 -11
  421. package/build-module/components/post-sync-status/index.js.map +1 -1
  422. package/build-module/components/post-taxonomies/check.js +1 -3
  423. package/build-module/components/post-taxonomies/check.js.map +1 -1
  424. package/build-module/components/post-taxonomies/flat-term-selector.js +17 -39
  425. package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
  426. package/build-module/components/post-taxonomies/hierarchical-term-selector.js +29 -66
  427. package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  428. package/build-module/components/post-taxonomies/index.js +3 -5
  429. package/build-module/components/post-taxonomies/index.js.map +1 -1
  430. package/build-module/components/post-taxonomies/most-used-terms.js +1 -4
  431. package/build-module/components/post-taxonomies/most-used-terms.js.map +1 -1
  432. package/build-module/components/post-template/index.js +1 -5
  433. package/build-module/components/post-template/index.js.map +1 -1
  434. package/build-module/components/post-text-editor/index.js +4 -9
  435. package/build-module/components/post-text-editor/index.js.map +1 -1
  436. package/build-module/components/post-title/index.js +17 -35
  437. package/build-module/components/post-title/index.js.map +1 -1
  438. package/build-module/components/post-title/index.native.js +8 -33
  439. package/build-module/components/post-title/index.native.js.map +1 -1
  440. package/build-module/components/post-trash/check.js +1 -4
  441. package/build-module/components/post-trash/check.js.map +1 -1
  442. package/build-module/components/post-trash/index.js +1 -4
  443. package/build-module/components/post-trash/index.js.map +1 -1
  444. package/build-module/components/post-type-support-check/index.js +14 -20
  445. package/build-module/components/post-type-support-check/index.js.map +1 -1
  446. package/build-module/components/post-url/check.js +1 -9
  447. package/build-module/components/post-url/check.js.map +1 -1
  448. package/build-module/components/post-url/index.js +3 -8
  449. package/build-module/components/post-url/index.js.map +1 -1
  450. package/build-module/components/post-url/label.js +1 -1
  451. package/build-module/components/post-url/label.js.map +1 -1
  452. package/build-module/components/post-visibility/check.js +1 -2
  453. package/build-module/components/post-visibility/check.js.map +1 -1
  454. package/build-module/components/post-visibility/index.js +1 -10
  455. package/build-module/components/post-visibility/index.js.map +1 -1
  456. package/build-module/components/post-visibility/label.js +1 -1
  457. package/build-module/components/post-visibility/label.js.map +1 -1
  458. package/build-module/components/post-visibility/utils.js.map +1 -1
  459. package/build-module/components/provider/index.js +13 -14
  460. package/build-module/components/provider/index.js.map +1 -1
  461. package/build-module/components/provider/index.native.js +21 -52
  462. package/build-module/components/provider/index.native.js.map +1 -1
  463. package/build-module/components/provider/use-block-editor-settings.js +9 -12
  464. package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
  465. package/build-module/components/provider/use-block-editor-settings.native.js +5 -5
  466. package/build-module/components/provider/use-block-editor-settings.native.js.map +1 -1
  467. package/build-module/components/provider/with-registry-provider.js +5 -8
  468. package/build-module/components/provider/with-registry-provider.js.map +1 -1
  469. package/build-module/components/table-of-contents/index.js +4 -7
  470. package/build-module/components/table-of-contents/index.js.map +1 -1
  471. package/build-module/components/table-of-contents/panel.js +1 -5
  472. package/build-module/components/table-of-contents/panel.js.map +1 -1
  473. package/build-module/components/template-validation-notice/index.js +2 -6
  474. package/build-module/components/template-validation-notice/index.js.map +1 -1
  475. package/build-module/components/theme-support-check/index.js +3 -7
  476. package/build-module/components/theme-support-check/index.js.map +1 -1
  477. package/build-module/components/time-to-read/index.js +4 -7
  478. package/build-module/components/time-to-read/index.js.map +1 -1
  479. package/build-module/components/unsaved-changes-warning/index.js +22 -31
  480. package/build-module/components/unsaved-changes-warning/index.js.map +1 -1
  481. package/build-module/components/word-count/index.js +2 -4
  482. package/build-module/components/word-count/index.js.map +1 -1
  483. package/build-module/hooks/custom-sources-backwards-compatibility.js +11 -39
  484. package/build-module/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  485. package/build-module/hooks/default-autocompleters.js +3 -4
  486. package/build-module/hooks/default-autocompleters.js.map +1 -1
  487. package/build-module/hooks/index.js.map +1 -1
  488. package/build-module/hooks/index.native.js.map +1 -1
  489. package/build-module/index.js +1 -1
  490. package/build-module/index.js.map +1 -1
  491. package/build-module/index.native.js +1 -1
  492. package/build-module/index.native.js.map +1 -1
  493. package/build-module/lock-unlock.js.map +1 -1
  494. package/build-module/private-apis.js.map +1 -1
  495. package/build-module/store/actions.js +63 -85
  496. package/build-module/store/actions.js.map +1 -1
  497. package/build-module/store/actions.native.js +2 -2
  498. package/build-module/store/actions.native.js.map +1 -1
  499. package/build-module/store/constants.js +1 -1
  500. package/build-module/store/constants.js.map +1 -1
  501. package/build-module/store/defaults.js +3 -2
  502. package/build-module/store/defaults.js.map +1 -1
  503. package/build-module/store/index.js +5 -4
  504. package/build-module/store/index.js.map +1 -1
  505. package/build-module/store/local-autosave.js +0 -1
  506. package/build-module/store/local-autosave.js.map +1 -1
  507. package/build-module/store/reducer.js +21 -33
  508. package/build-module/store/reducer.js.map +1 -1
  509. package/build-module/store/reducer.native.js +4 -10
  510. package/build-module/store/reducer.native.js.map +1 -1
  511. package/build-module/store/selectors.js +173 -223
  512. package/build-module/store/selectors.js.map +1 -1
  513. package/build-module/store/selectors.native.js +6 -8
  514. package/build-module/store/selectors.native.js.map +1 -1
  515. package/build-module/store/utils/notice-builder.js +15 -21
  516. package/build-module/store/utils/notice-builder.js.map +1 -1
  517. package/build-module/utils/get-template-part-icon.js +0 -2
  518. package/build-module/utils/get-template-part-icon.js.map +1 -1
  519. package/build-module/utils/index.js.map +1 -1
  520. package/build-module/utils/index.native.js.map +1 -1
  521. package/build-module/utils/media-upload/index.js +2 -4
  522. package/build-module/utils/media-upload/index.js.map +1 -1
  523. package/build-module/utils/media-upload/index.native.js.map +1 -1
  524. package/build-module/utils/terms.js +9 -11
  525. package/build-module/utils/terms.js.map +1 -1
  526. package/build-module/utils/url.js +1 -1
  527. package/build-module/utils/url.js.map +1 -1
  528. package/build-style/style-rtl.css +10 -17
  529. package/build-style/style.css +10 -17
  530. package/package.json +32 -31
  531. package/src/components/editor-help/index.native.js +1 -1
  532. package/src/components/editor-help/style.scss +5 -0
  533. package/src/components/page-attributes/order.js +15 -23
  534. package/src/components/page-attributes/test/order.js +46 -15
  535. package/src/components/post-author/test/check.js +18 -12
  536. package/src/components/post-comments/index.js +11 -17
  537. package/src/components/post-excerpt/check.js +6 -2
  538. package/src/components/post-excerpt/index.js +10 -16
  539. package/src/components/post-featured-image/check.js +4 -2
  540. package/src/components/post-format/check.js +16 -11
  541. package/src/components/post-last-revision/check.js +12 -14
  542. package/src/components/post-last-revision/index.js +12 -10
  543. package/src/components/post-last-revision/test/check.js +28 -16
  544. package/src/components/post-pending-status/check.js +13 -19
  545. package/src/components/post-pending-status/index.js +9 -14
  546. package/src/components/post-pending-status/test/check.js +32 -10
  547. package/src/components/post-pingbacks/index.js +11 -15
  548. package/src/components/post-publish-panel/style.scss +12 -25
  549. package/src/components/post-sync-status/style.scss +4 -1
  550. package/src/components/post-type-support-check/index.js +8 -10
  551. package/src/components/post-type-support-check/test/index.js +36 -20
  552. package/src/components/provider/index.js +3 -2
  553. package/src/components/unsaved-changes-warning/index.js +22 -27
  554. package/src/hooks/custom-sources-backwards-compatibility.js +1 -25
  555. package/src/store/actions.js +1 -1
  556. package/src/store/selectors.js +2 -2
  557. package/src/store/test/selectors.js +13 -13
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/store/utils/notice-builder.js"],"names":["__","SAVE_POST_NOTICE_ID","TRASH_POST_NOTICE_ID","getNotificationArgumentsForSaveSuccess","data","previousPost","post","postType","options","isAutosave","status","publishStatus","isPublished","includes","willPublish","noticeMessage","shouldShowLink","viewable","isDraft","labels","item_reverted_to_draft","publish","item_published","private","item_published_privately","future","item_scheduled","item_updated","actions","push","label","view_item","url","link","id","type","getNotificationArgumentsForSaveFail","edits","error","code","indexOf","messages","message","test","join","getNotificationArgumentsForTrashFail"],"mappings":"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","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { SAVE_POST_NOTICE_ID, TRASH_POST_NOTICE_ID } from '../constants';\n\n/**\n * Builds the arguments for a success notification dispatch.\n *\n * @param {Object} data Incoming data to build the arguments from.\n *\n * @return {Array} Arguments for dispatch. An empty array signals no\n * notification should be sent.\n */\nexport function getNotificationArgumentsForSaveSuccess( data ) {\n\tconst { previousPost, post, postType } = data;\n\t// Autosaves are neither shown a notice nor redirected.\n\tif ( data.options?.isAutosave ) {\n\t\treturn [];\n\t}\n\n\t// No notice is shown after trashing a post\n\tif ( post.status === 'trash' && previousPost.status !== 'trash' ) {\n\t\treturn [];\n\t}\n\n\tconst publishStatus = [ 'publish', 'private', 'future' ];\n\tconst isPublished = publishStatus.includes( previousPost.status );\n\tconst willPublish = publishStatus.includes( post.status );\n\n\tlet noticeMessage;\n\tlet shouldShowLink = postType?.viewable ?? false;\n\tlet isDraft;\n\n\t// Always should a notice, which will be spoken for accessibility.\n\tif ( ! isPublished && ! willPublish ) {\n\t\t// If saving a non-published post, don't show notice.\n\t\tnoticeMessage = __( 'Draft saved.' );\n\t\tisDraft = true;\n\t} else if ( isPublished && ! willPublish ) {\n\t\t// If undoing publish status, show specific notice.\n\t\tnoticeMessage = postType.labels.item_reverted_to_draft;\n\t\tshouldShowLink = false;\n\t} else if ( ! isPublished && willPublish ) {\n\t\t// If publishing or scheduling a post, show the corresponding\n\t\t// publish message.\n\t\tnoticeMessage = {\n\t\t\tpublish: postType.labels.item_published,\n\t\t\tprivate: postType.labels.item_published_privately,\n\t\t\tfuture: postType.labels.item_scheduled,\n\t\t}[ post.status ];\n\t} else {\n\t\t// Generic fallback notice.\n\t\tnoticeMessage = postType.labels.item_updated;\n\t}\n\n\tconst actions = [];\n\tif ( shouldShowLink ) {\n\t\tactions.push( {\n\t\t\tlabel: isDraft ? __( 'View Preview' ) : postType.labels.view_item,\n\t\t\turl: post.link,\n\t\t} );\n\t}\n\treturn [\n\t\tnoticeMessage,\n\t\t{\n\t\t\tid: SAVE_POST_NOTICE_ID,\n\t\t\ttype: 'snackbar',\n\t\t\tactions,\n\t\t},\n\t];\n}\n\n/**\n * Builds the fail notification arguments for dispatch.\n *\n * @param {Object} data Incoming data to build the arguments with.\n *\n * @return {Array} Arguments for dispatch. An empty array signals no\n * notification should be sent.\n */\nexport function getNotificationArgumentsForSaveFail( data ) {\n\tconst { post, edits, error } = data;\n\tif ( error && 'rest_autosave_no_changes' === error.code ) {\n\t\t// Autosave requested a new autosave, but there were no changes. This shouldn't\n\t\t// result in an error notice for the user.\n\t\treturn [];\n\t}\n\n\tconst publishStatus = [ 'publish', 'private', 'future' ];\n\tconst isPublished = publishStatus.indexOf( post.status ) !== -1;\n\t// If the post was being published, we show the corresponding publish error message\n\t// Unless we publish an \"updating failed\" message.\n\tconst messages = {\n\t\tpublish: __( 'Publishing failed.' ),\n\t\tprivate: __( 'Publishing failed.' ),\n\t\tfuture: __( 'Scheduling failed.' ),\n\t};\n\tlet noticeMessage =\n\t\t! isPublished && publishStatus.indexOf( edits.status ) !== -1\n\t\t\t? messages[ edits.status ]\n\t\t\t: __( 'Updating failed.' );\n\n\t// Check if message string contains HTML. Notice text is currently only\n\t// supported as plaintext, and stripping the tags may muddle the meaning.\n\tif ( error.message && ! /<\\/?[^>]*>/.test( error.message ) ) {\n\t\tnoticeMessage = [ noticeMessage, error.message ].join( ' ' );\n\t}\n\treturn [\n\t\tnoticeMessage,\n\t\t{\n\t\t\tid: SAVE_POST_NOTICE_ID,\n\t\t},\n\t];\n}\n\n/**\n * Builds the trash fail notification arguments for dispatch.\n *\n * @param {Object} data\n *\n * @return {Array} Arguments for dispatch.\n */\nexport function getNotificationArgumentsForTrashFail( data ) {\n\treturn [\n\t\tdata.error.message && data.error.code !== 'unknown_error'\n\t\t\t? data.error.message\n\t\t\t: __( 'Trashing failed' ),\n\t\t{\n\t\t\tid: TRASH_POST_NOTICE_ID,\n\t\t},\n\t];\n}\n"]}
1
+ {"version":3,"names":["__","SAVE_POST_NOTICE_ID","TRASH_POST_NOTICE_ID","getNotificationArgumentsForSaveSuccess","data","_postType$viewable","previousPost","post","postType","options","isAutosave","status","publishStatus","isPublished","includes","willPublish","noticeMessage","shouldShowLink","viewable","isDraft","labels","item_reverted_to_draft","publish","item_published","private","item_published_privately","future","item_scheduled","item_updated","actions","push","label","view_item","url","link","id","type","getNotificationArgumentsForSaveFail","edits","error","code","indexOf","messages","message","test","join","getNotificationArgumentsForTrashFail"],"sources":["@wordpress/editor/src/store/utils/notice-builder.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { SAVE_POST_NOTICE_ID, TRASH_POST_NOTICE_ID } from '../constants';\n\n/**\n * Builds the arguments for a success notification dispatch.\n *\n * @param {Object} data Incoming data to build the arguments from.\n *\n * @return {Array} Arguments for dispatch. An empty array signals no\n * notification should be sent.\n */\nexport function getNotificationArgumentsForSaveSuccess( data ) {\n\tconst { previousPost, post, postType } = data;\n\t// Autosaves are neither shown a notice nor redirected.\n\tif ( data.options?.isAutosave ) {\n\t\treturn [];\n\t}\n\n\t// No notice is shown after trashing a post\n\tif ( post.status === 'trash' && previousPost.status !== 'trash' ) {\n\t\treturn [];\n\t}\n\n\tconst publishStatus = [ 'publish', 'private', 'future' ];\n\tconst isPublished = publishStatus.includes( previousPost.status );\n\tconst willPublish = publishStatus.includes( post.status );\n\n\tlet noticeMessage;\n\tlet shouldShowLink = postType?.viewable ?? false;\n\tlet isDraft;\n\n\t// Always should a notice, which will be spoken for accessibility.\n\tif ( ! isPublished && ! willPublish ) {\n\t\t// If saving a non-published post, don't show notice.\n\t\tnoticeMessage = __( 'Draft saved.' );\n\t\tisDraft = true;\n\t} else if ( isPublished && ! willPublish ) {\n\t\t// If undoing publish status, show specific notice.\n\t\tnoticeMessage = postType.labels.item_reverted_to_draft;\n\t\tshouldShowLink = false;\n\t} else if ( ! isPublished && willPublish ) {\n\t\t// If publishing or scheduling a post, show the corresponding\n\t\t// publish message.\n\t\tnoticeMessage = {\n\t\t\tpublish: postType.labels.item_published,\n\t\t\tprivate: postType.labels.item_published_privately,\n\t\t\tfuture: postType.labels.item_scheduled,\n\t\t}[ post.status ];\n\t} else {\n\t\t// Generic fallback notice.\n\t\tnoticeMessage = postType.labels.item_updated;\n\t}\n\n\tconst actions = [];\n\tif ( shouldShowLink ) {\n\t\tactions.push( {\n\t\t\tlabel: isDraft ? __( 'View Preview' ) : postType.labels.view_item,\n\t\t\turl: post.link,\n\t\t} );\n\t}\n\treturn [\n\t\tnoticeMessage,\n\t\t{\n\t\t\tid: SAVE_POST_NOTICE_ID,\n\t\t\ttype: 'snackbar',\n\t\t\tactions,\n\t\t},\n\t];\n}\n\n/**\n * Builds the fail notification arguments for dispatch.\n *\n * @param {Object} data Incoming data to build the arguments with.\n *\n * @return {Array} Arguments for dispatch. An empty array signals no\n * notification should be sent.\n */\nexport function getNotificationArgumentsForSaveFail( data ) {\n\tconst { post, edits, error } = data;\n\tif ( error && 'rest_autosave_no_changes' === error.code ) {\n\t\t// Autosave requested a new autosave, but there were no changes. This shouldn't\n\t\t// result in an error notice for the user.\n\t\treturn [];\n\t}\n\n\tconst publishStatus = [ 'publish', 'private', 'future' ];\n\tconst isPublished = publishStatus.indexOf( post.status ) !== -1;\n\t// If the post was being published, we show the corresponding publish error message\n\t// Unless we publish an \"updating failed\" message.\n\tconst messages = {\n\t\tpublish: __( 'Publishing failed.' ),\n\t\tprivate: __( 'Publishing failed.' ),\n\t\tfuture: __( 'Scheduling failed.' ),\n\t};\n\tlet noticeMessage =\n\t\t! isPublished && publishStatus.indexOf( edits.status ) !== -1\n\t\t\t? messages[ edits.status ]\n\t\t\t: __( 'Updating failed.' );\n\n\t// Check if message string contains HTML. Notice text is currently only\n\t// supported as plaintext, and stripping the tags may muddle the meaning.\n\tif ( error.message && ! /<\\/?[^>]*>/.test( error.message ) ) {\n\t\tnoticeMessage = [ noticeMessage, error.message ].join( ' ' );\n\t}\n\treturn [\n\t\tnoticeMessage,\n\t\t{\n\t\t\tid: SAVE_POST_NOTICE_ID,\n\t\t},\n\t];\n}\n\n/**\n * Builds the trash fail notification arguments for dispatch.\n *\n * @param {Object} data\n *\n * @return {Array} Arguments for dispatch.\n */\nexport function getNotificationArgumentsForTrashFail( data ) {\n\treturn [\n\t\tdata.error.message && data.error.code !== 'unknown_error'\n\t\t\t? data.error.message\n\t\t\t: __( 'Trashing failed' ),\n\t\t{\n\t\t\tid: TRASH_POST_NOTICE_ID,\n\t\t},\n\t];\n}\n"],"mappings":"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"}
@@ -9,7 +9,6 @@ import { header as headerIcon, footer as footerIcon, sidebar as sidebarIcon, sym
9
9
  *
10
10
  * @return {Object} The corresponding icon.
11
11
  */
12
-
13
12
  export function getTemplatePartIcon(iconName) {
14
13
  if ('header' === iconName) {
15
14
  return headerIcon;
@@ -18,7 +17,6 @@ export function getTemplatePartIcon(iconName) {
18
17
  } else if ('sidebar' === iconName) {
19
18
  return sidebarIcon;
20
19
  }
21
-
22
20
  return symbolFilledIcon;
23
21
  }
24
22
  //# sourceMappingURL=get-template-part-icon.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/utils/get-template-part-icon.js"],"names":["header","headerIcon","footer","footerIcon","sidebar","sidebarIcon","symbolFilled","symbolFilledIcon","getTemplatePartIcon","iconName"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,MAAM,IAAIC,UADX,EAECC,MAAM,IAAIC,UAFX,EAGCC,OAAO,IAAIC,WAHZ,EAICC,YAAY,IAAIC,gBAJjB,QAKO,kBALP;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,mBAAT,CAA8BC,QAA9B,EAAyC;AAC/C,MAAK,aAAaA,QAAlB,EAA6B;AAC5B,WAAOR,UAAP;AACA,GAFD,MAEO,IAAK,aAAaQ,QAAlB,EAA6B;AACnC,WAAON,UAAP;AACA,GAFM,MAEA,IAAK,cAAcM,QAAnB,EAA8B;AACpC,WAAOJ,WAAP;AACA;;AACD,SAAOE,gBAAP;AACA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\theader as headerIcon,\n\tfooter as footerIcon,\n\tsidebar as sidebarIcon,\n\tsymbolFilled as symbolFilledIcon,\n} from '@wordpress/icons';\n/**\n * Helper function to retrieve the corresponding icon by name.\n *\n * @param {string} iconName The name of the icon.\n *\n * @return {Object} The corresponding icon.\n */\nexport function getTemplatePartIcon( iconName ) {\n\tif ( 'header' === iconName ) {\n\t\treturn headerIcon;\n\t} else if ( 'footer' === iconName ) {\n\t\treturn footerIcon;\n\t} else if ( 'sidebar' === iconName ) {\n\t\treturn sidebarIcon;\n\t}\n\treturn symbolFilledIcon;\n}\n"]}
1
+ {"version":3,"names":["header","headerIcon","footer","footerIcon","sidebar","sidebarIcon","symbolFilled","symbolFilledIcon","getTemplatePartIcon","iconName"],"sources":["@wordpress/editor/src/utils/get-template-part-icon.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\theader as headerIcon,\n\tfooter as footerIcon,\n\tsidebar as sidebarIcon,\n\tsymbolFilled as symbolFilledIcon,\n} from '@wordpress/icons';\n/**\n * Helper function to retrieve the corresponding icon by name.\n *\n * @param {string} iconName The name of the icon.\n *\n * @return {Object} The corresponding icon.\n */\nexport function getTemplatePartIcon( iconName ) {\n\tif ( 'header' === iconName ) {\n\t\treturn headerIcon;\n\t} else if ( 'footer' === iconName ) {\n\t\treturn footerIcon;\n\t} else if ( 'sidebar' === iconName ) {\n\t\treturn sidebarIcon;\n\t}\n\treturn symbolFilledIcon;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,MAAM,IAAIC,UAAU,EACpBC,MAAM,IAAIC,UAAU,EACpBC,OAAO,IAAIC,WAAW,EACtBC,YAAY,IAAIC,gBAAgB,QAC1B,kBAAkB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,mBAAmBA,CAAEC,QAAQ,EAAG;EAC/C,IAAK,QAAQ,KAAKA,QAAQ,EAAG;IAC5B,OAAOR,UAAU;EAClB,CAAC,MAAM,IAAK,QAAQ,KAAKQ,QAAQ,EAAG;IACnC,OAAON,UAAU;EAClB,CAAC,MAAM,IAAK,SAAS,KAAKM,QAAQ,EAAG;IACpC,OAAOJ,WAAW;EACnB;EACA,OAAOE,gBAAgB;AACxB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/utils/index.js"],"names":["mediaUpload","cleanForSlug","getTemplatePartIcon"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,WAAP,MAAwB,gBAAxB;AAEA,SAASA,WAAT;AACA,SAASC,YAAT,QAA6B,UAA7B;AACA,SAASC,mBAAT,QAAoC,0BAApC","sourcesContent":["/**\n * Internal dependencies\n */\nimport mediaUpload from './media-upload';\n\nexport { mediaUpload };\nexport { cleanForSlug } from './url.js';\nexport { getTemplatePartIcon } from './get-template-part-icon';\n"]}
1
+ {"version":3,"names":["mediaUpload","cleanForSlug","getTemplatePartIcon"],"sources":["@wordpress/editor/src/utils/index.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport mediaUpload from './media-upload';\n\nexport { mediaUpload };\nexport { cleanForSlug } from './url.js';\nexport { getTemplatePartIcon } from './get-template-part-icon';\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,WAAW,MAAM,gBAAgB;AAExC,SAASA,WAAW;AACpB,SAASC,YAAY,QAAQ,UAAU;AACvC,SAASC,mBAAmB,QAAQ,0BAA0B"}
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/utils/index.native.js"],"names":["mediaUpload"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,WAAP,MAAwB,gBAAxB;AAEA,SAASA,WAAT","sourcesContent":["/**\n * Internal dependencies\n */\nimport mediaUpload from './media-upload';\n\nexport { mediaUpload };\n"]}
1
+ {"version":3,"names":["mediaUpload"],"sources":["@wordpress/editor/src/utils/index.native.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport mediaUpload from './media-upload';\n\nexport { mediaUpload };\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,WAAW,MAAM,gBAAgB;AAExC,SAASA,WAAW"}
@@ -3,13 +3,13 @@
3
3
  */
4
4
  import { select } from '@wordpress/data';
5
5
  import { uploadMedia } from '@wordpress/media-utils';
6
+
6
7
  /**
7
8
  * Internal dependencies
8
9
  */
9
-
10
10
  import { store as editorStore } from '../../store';
11
-
12
11
  const noop = () => {};
12
+
13
13
  /**
14
14
  * Upload a media file when the file upload button is activated.
15
15
  * Wrapper around mediaUpload() that injects the current post ID.
@@ -22,8 +22,6 @@ const noop = () => {};
22
22
  * @param {Function} $0.onError Function called when an error happens.
23
23
  * @param {Function} $0.onFileChange Function called each time a file or a temporary representation of the file is available.
24
24
  */
25
-
26
-
27
25
  export default function mediaUpload({
28
26
  additionalData = {},
29
27
  allowedTypes,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/utils/media-upload/index.js"],"names":["select","uploadMedia","store","editorStore","noop","mediaUpload","additionalData","allowedTypes","filesList","maxUploadFileSize","onError","onFileChange","getCurrentPostId","getEditorSettings","wpAllowedMimeTypes","allowedMimeTypes","post","message"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,MAAT,QAAuB,iBAAvB;AACA,SAASC,WAAT,QAA4B,wBAA5B;AAEA;AACA;AACA;;AACA,SAASC,KAAK,IAAIC,WAAlB,QAAqC,aAArC;;AAEA,MAAMC,IAAI,GAAG,MAAM,CAAE,CAArB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,eAAe,SAASC,WAAT,CAAsB;AACpCC,EAAAA,cAAc,GAAG,EADmB;AAEpCC,EAAAA,YAFoC;AAGpCC,EAAAA,SAHoC;AAIpCC,EAAAA,iBAJoC;AAKpCC,EAAAA,OAAO,GAAGN,IAL0B;AAMpCO,EAAAA;AANoC,CAAtB,EAOX;AACH,QAAM;AAAEC,IAAAA,gBAAF;AAAoBC,IAAAA;AAApB,MAA0Cb,MAAM,CAAEG,WAAF,CAAtD;AACA,QAAMW,kBAAkB,GAAGD,iBAAiB,GAAGE,gBAA/C;AACAN,EAAAA,iBAAiB,GAChBA,iBAAiB,IAAII,iBAAiB,GAAGJ,iBAD1C;AAGAR,EAAAA,WAAW,CAAE;AACZM,IAAAA,YADY;AAEZC,IAAAA,SAFY;AAGZG,IAAAA,YAHY;AAIZL,IAAAA,cAAc,EAAE;AACfU,MAAAA,IAAI,EAAEJ,gBAAgB,EADP;AAEf,SAAGN;AAFY,KAJJ;AAQZG,IAAAA,iBARY;AASZC,IAAAA,OAAO,EAAE,CAAE;AAAEO,MAAAA;AAAF,KAAF,KAAmBP,OAAO,CAAEO,OAAF,CATvB;AAUZH,IAAAA;AAVY,GAAF,CAAX;AAYA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { select } from '@wordpress/data';\nimport { uploadMedia } from '@wordpress/media-utils';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nconst noop = () => {};\n\n/**\n * Upload a media file when the file upload button is activated.\n * Wrapper around mediaUpload() that injects the current post ID.\n *\n * @param {Object} $0 Parameters object passed to the function.\n * @param {?Object} $0.additionalData Additional data to include in the request.\n * @param {string} $0.allowedTypes Array with the types of media that can be uploaded, if unset all types are allowed.\n * @param {Array} $0.filesList List of files.\n * @param {?number} $0.maxUploadFileSize Maximum upload size in bytes allowed for the site.\n * @param {Function} $0.onError Function called when an error happens.\n * @param {Function} $0.onFileChange Function called each time a file or a temporary representation of the file is available.\n */\nexport default function mediaUpload( {\n\tadditionalData = {},\n\tallowedTypes,\n\tfilesList,\n\tmaxUploadFileSize,\n\tonError = noop,\n\tonFileChange,\n} ) {\n\tconst { getCurrentPostId, getEditorSettings } = select( editorStore );\n\tconst wpAllowedMimeTypes = getEditorSettings().allowedMimeTypes;\n\tmaxUploadFileSize =\n\t\tmaxUploadFileSize || getEditorSettings().maxUploadFileSize;\n\n\tuploadMedia( {\n\t\tallowedTypes,\n\t\tfilesList,\n\t\tonFileChange,\n\t\tadditionalData: {\n\t\t\tpost: getCurrentPostId(),\n\t\t\t...additionalData,\n\t\t},\n\t\tmaxUploadFileSize,\n\t\tonError: ( { message } ) => onError( message ),\n\t\twpAllowedMimeTypes,\n\t} );\n}\n"]}
1
+ {"version":3,"names":["select","uploadMedia","store","editorStore","noop","mediaUpload","additionalData","allowedTypes","filesList","maxUploadFileSize","onError","onFileChange","getCurrentPostId","getEditorSettings","wpAllowedMimeTypes","allowedMimeTypes","post","message"],"sources":["@wordpress/editor/src/utils/media-upload/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { select } from '@wordpress/data';\nimport { uploadMedia } from '@wordpress/media-utils';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nconst noop = () => {};\n\n/**\n * Upload a media file when the file upload button is activated.\n * Wrapper around mediaUpload() that injects the current post ID.\n *\n * @param {Object} $0 Parameters object passed to the function.\n * @param {?Object} $0.additionalData Additional data to include in the request.\n * @param {string} $0.allowedTypes Array with the types of media that can be uploaded, if unset all types are allowed.\n * @param {Array} $0.filesList List of files.\n * @param {?number} $0.maxUploadFileSize Maximum upload size in bytes allowed for the site.\n * @param {Function} $0.onError Function called when an error happens.\n * @param {Function} $0.onFileChange Function called each time a file or a temporary representation of the file is available.\n */\nexport default function mediaUpload( {\n\tadditionalData = {},\n\tallowedTypes,\n\tfilesList,\n\tmaxUploadFileSize,\n\tonError = noop,\n\tonFileChange,\n} ) {\n\tconst { getCurrentPostId, getEditorSettings } = select( editorStore );\n\tconst wpAllowedMimeTypes = getEditorSettings().allowedMimeTypes;\n\tmaxUploadFileSize =\n\t\tmaxUploadFileSize || getEditorSettings().maxUploadFileSize;\n\n\tuploadMedia( {\n\t\tallowedTypes,\n\t\tfilesList,\n\t\tonFileChange,\n\t\tadditionalData: {\n\t\t\tpost: getCurrentPostId(),\n\t\t\t...additionalData,\n\t\t},\n\t\tmaxUploadFileSize,\n\t\tonError: ( { message } ) => onError( message ),\n\t\twpAllowedMimeTypes,\n\t} );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,MAAM,QAAQ,iBAAiB;AACxC,SAASC,WAAW,QAAQ,wBAAwB;;AAEpD;AACA;AACA;AACA,SAASC,KAAK,IAAIC,WAAW,QAAQ,aAAa;AAElD,MAAMC,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,WAAWA,CAAE;EACpCC,cAAc,GAAG,CAAC,CAAC;EACnBC,YAAY;EACZC,SAAS;EACTC,iBAAiB;EACjBC,OAAO,GAAGN,IAAI;EACdO;AACD,CAAC,EAAG;EACH,MAAM;IAAEC,gBAAgB;IAAEC;EAAkB,CAAC,GAAGb,MAAM,CAAEG,WAAY,CAAC;EACrE,MAAMW,kBAAkB,GAAGD,iBAAiB,CAAC,CAAC,CAACE,gBAAgB;EAC/DN,iBAAiB,GAChBA,iBAAiB,IAAII,iBAAiB,CAAC,CAAC,CAACJ,iBAAiB;EAE3DR,WAAW,CAAE;IACZM,YAAY;IACZC,SAAS;IACTG,YAAY;IACZL,cAAc,EAAE;MACfU,IAAI,EAAEJ,gBAAgB,CAAC,CAAC;MACxB,GAAGN;IACJ,CAAC;IACDG,iBAAiB;IACjBC,OAAO,EAAEA,CAAE;MAAEO;IAAQ,CAAC,KAAMP,OAAO,CAAEO,OAAQ,CAAC;IAC9CH;EACD,CAAE,CAAC;AACJ"}
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/utils/media-upload/index.native.js"],"names":["mediaUpload"],"mappings":"AAAA,eAAe,SAASA,WAAT,GAAuB,CAAE","sourcesContent":["export default function mediaUpload() {}\n"]}
1
+ {"version":3,"names":["mediaUpload"],"sources":["@wordpress/editor/src/utils/media-upload/index.native.js"],"sourcesContent":["export default function mediaUpload() {}\n"],"mappings":"AAAA,eAAe,SAASA,WAAWA,CAAA,EAAG,CAAC"}
@@ -2,6 +2,7 @@
2
2
  * WordPress dependencies
3
3
  */
4
4
  import { decodeEntities } from '@wordpress/html-entities';
5
+
5
6
  /**
6
7
  * Returns terms in a tree form.
7
8
  *
@@ -9,7 +10,6 @@ import { decodeEntities } from '@wordpress/html-entities';
9
10
  *
10
11
  * @return {Array} Array of terms in tree format.
11
12
  */
12
-
13
13
  export function buildTermsTree(flatTerms) {
14
14
  const flatTermsWithParentAndChildren = flatTerms.map(term => {
15
15
  return {
@@ -17,41 +17,39 @@ export function buildTermsTree(flatTerms) {
17
17
  parent: null,
18
18
  ...term
19
19
  };
20
- }); // All terms should have a `parent` because we're about to index them by it.
20
+ });
21
21
 
22
+ // All terms should have a `parent` because we're about to index them by it.
22
23
  if (flatTermsWithParentAndChildren.some(({
23
24
  parent
24
25
  }) => parent === null)) {
25
26
  return flatTermsWithParentAndChildren;
26
27
  }
27
-
28
28
  const termsByParent = flatTermsWithParentAndChildren.reduce((acc, term) => {
29
29
  const {
30
30
  parent
31
31
  } = term;
32
-
33
32
  if (!acc[parent]) {
34
33
  acc[parent] = [];
35
34
  }
36
-
37
35
  acc[parent].push(term);
38
36
  return acc;
39
37
  }, {});
40
-
41
38
  const fillWithChildren = terms => {
42
39
  return terms.map(term => {
43
40
  const children = termsByParent[term.id];
44
- return { ...term,
41
+ return {
42
+ ...term,
45
43
  children: children && children.length ? fillWithChildren(children) : []
46
44
  };
47
45
  });
48
46
  };
49
-
50
47
  return fillWithChildren(termsByParent['0'] || []);
51
48
  }
52
49
  export const unescapeString = arg => {
53
50
  return decodeEntities(arg);
54
51
  };
52
+
55
53
  /**
56
54
  * Returns a term object with name unescaped.
57
55
  *
@@ -59,12 +57,13 @@ export const unescapeString = arg => {
59
57
  *
60
58
  * @return {Object} Term object with name property unescaped.
61
59
  */
62
-
63
60
  export const unescapeTerm = term => {
64
- return { ...term,
61
+ return {
62
+ ...term,
65
63
  name: unescapeString(term.name)
66
64
  };
67
65
  };
66
+
68
67
  /**
69
68
  * Returns an array of term objects with names unescaped.
70
69
  * The unescape of each term is performed using the unescapeTerm function.
@@ -73,7 +72,6 @@ export const unescapeTerm = term => {
73
72
  *
74
73
  * @return {Object[]} Array of term objects unescaped.
75
74
  */
76
-
77
75
  export const unescapeTerms = terms => {
78
76
  return (terms !== null && terms !== void 0 ? terms : []).map(unescapeTerm);
79
77
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/utils/terms.js"],"names":["decodeEntities","buildTermsTree","flatTerms","flatTermsWithParentAndChildren","map","term","children","parent","some","termsByParent","reduce","acc","push","fillWithChildren","terms","id","length","unescapeString","arg","unescapeTerm","name","unescapeTerms"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,cAAT,QAA+B,0BAA/B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,cAAT,CAAyBC,SAAzB,EAAqC;AAC3C,QAAMC,8BAA8B,GAAGD,SAAS,CAACE,GAAV,CAAiBC,IAAF,IAAY;AACjE,WAAO;AACNC,MAAAA,QAAQ,EAAE,EADJ;AAENC,MAAAA,MAAM,EAAE,IAFF;AAGN,SAAGF;AAHG,KAAP;AAKA,GANsC,CAAvC,CAD2C,CAS3C;;AACA,MACCF,8BAA8B,CAACK,IAA/B,CAAqC,CAAE;AAAED,IAAAA;AAAF,GAAF,KAAkBA,MAAM,KAAK,IAAlE,CADD,EAEE;AACD,WAAOJ,8BAAP;AACA;;AAED,QAAMM,aAAa,GAAGN,8BAA8B,CAACO,MAA/B,CACrB,CAAEC,GAAF,EAAON,IAAP,KAAiB;AAChB,UAAM;AAAEE,MAAAA;AAAF,QAAaF,IAAnB;;AACA,QAAK,CAAEM,GAAG,CAAEJ,MAAF,CAAV,EAAuB;AACtBI,MAAAA,GAAG,CAAEJ,MAAF,CAAH,GAAgB,EAAhB;AACA;;AACDI,IAAAA,GAAG,CAAEJ,MAAF,CAAH,CAAcK,IAAd,CAAoBP,IAApB;AACA,WAAOM,GAAP;AACA,GARoB,EASrB,EATqB,CAAtB;;AAYA,QAAME,gBAAgB,GAAKC,KAAF,IAAa;AACrC,WAAOA,KAAK,CAACV,GAAN,CAAaC,IAAF,IAAY;AAC7B,YAAMC,QAAQ,GAAGG,aAAa,CAAEJ,IAAI,CAACU,EAAP,CAA9B;AACA,aAAO,EACN,GAAGV,IADG;AAENC,QAAAA,QAAQ,EACPA,QAAQ,IAAIA,QAAQ,CAACU,MAArB,GACGH,gBAAgB,CAAEP,QAAF,CADnB,GAEG;AALE,OAAP;AAOA,KATM,CAAP;AAUA,GAXD;;AAaA,SAAOO,gBAAgB,CAAEJ,aAAa,CAAE,GAAF,CAAb,IAAwB,EAA1B,CAAvB;AACA;AAED,OAAO,MAAMQ,cAAc,GAAKC,GAAF,IAAW;AACxC,SAAOlB,cAAc,CAAEkB,GAAF,CAArB;AACA,CAFM;AAIP;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMC,YAAY,GAAKd,IAAF,IAAY;AACvC,SAAO,EACN,GAAGA,IADG;AAENe,IAAAA,IAAI,EAAEH,cAAc,CAAEZ,IAAI,CAACe,IAAP;AAFd,GAAP;AAIA,CALM;AAOP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMC,aAAa,GAAKP,KAAF,IAAa;AACzC,SAAO,CAAEA,KAAF,aAAEA,KAAF,cAAEA,KAAF,GAAW,EAAX,EAAgBV,GAAhB,CAAqBe,YAArB,CAAP;AACA,CAFM","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Returns terms in a tree form.\n *\n * @param {Array} flatTerms Array of terms in flat format.\n *\n * @return {Array} Array of terms in tree format.\n */\nexport function buildTermsTree( flatTerms ) {\n\tconst flatTermsWithParentAndChildren = flatTerms.map( ( term ) => {\n\t\treturn {\n\t\t\tchildren: [],\n\t\t\tparent: null,\n\t\t\t...term,\n\t\t};\n\t} );\n\n\t// All terms should have a `parent` because we're about to index them by it.\n\tif (\n\t\tflatTermsWithParentAndChildren.some( ( { parent } ) => parent === null )\n\t) {\n\t\treturn flatTermsWithParentAndChildren;\n\t}\n\n\tconst termsByParent = flatTermsWithParentAndChildren.reduce(\n\t\t( acc, term ) => {\n\t\t\tconst { parent } = term;\n\t\t\tif ( ! acc[ parent ] ) {\n\t\t\t\tacc[ parent ] = [];\n\t\t\t}\n\t\t\tacc[ parent ].push( term );\n\t\t\treturn acc;\n\t\t},\n\t\t{}\n\t);\n\n\tconst fillWithChildren = ( terms ) => {\n\t\treturn terms.map( ( term ) => {\n\t\t\tconst children = termsByParent[ term.id ];\n\t\t\treturn {\n\t\t\t\t...term,\n\t\t\t\tchildren:\n\t\t\t\t\tchildren && children.length\n\t\t\t\t\t\t? fillWithChildren( children )\n\t\t\t\t\t\t: [],\n\t\t\t};\n\t\t} );\n\t};\n\n\treturn fillWithChildren( termsByParent[ '0' ] || [] );\n}\n\nexport const unescapeString = ( arg ) => {\n\treturn decodeEntities( arg );\n};\n\n/**\n * Returns a term object with name unescaped.\n *\n * @param {Object} term The term object to unescape.\n *\n * @return {Object} Term object with name property unescaped.\n */\nexport const unescapeTerm = ( term ) => {\n\treturn {\n\t\t...term,\n\t\tname: unescapeString( term.name ),\n\t};\n};\n\n/**\n * Returns an array of term objects with names unescaped.\n * The unescape of each term is performed using the unescapeTerm function.\n *\n * @param {Object[]} terms Array of term objects to unescape.\n *\n * @return {Object[]} Array of term objects unescaped.\n */\nexport const unescapeTerms = ( terms ) => {\n\treturn ( terms ?? [] ).map( unescapeTerm );\n};\n"]}
1
+ {"version":3,"names":["decodeEntities","buildTermsTree","flatTerms","flatTermsWithParentAndChildren","map","term","children","parent","some","termsByParent","reduce","acc","push","fillWithChildren","terms","id","length","unescapeString","arg","unescapeTerm","name","unescapeTerms"],"sources":["@wordpress/editor/src/utils/terms.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Returns terms in a tree form.\n *\n * @param {Array} flatTerms Array of terms in flat format.\n *\n * @return {Array} Array of terms in tree format.\n */\nexport function buildTermsTree( flatTerms ) {\n\tconst flatTermsWithParentAndChildren = flatTerms.map( ( term ) => {\n\t\treturn {\n\t\t\tchildren: [],\n\t\t\tparent: null,\n\t\t\t...term,\n\t\t};\n\t} );\n\n\t// All terms should have a `parent` because we're about to index them by it.\n\tif (\n\t\tflatTermsWithParentAndChildren.some( ( { parent } ) => parent === null )\n\t) {\n\t\treturn flatTermsWithParentAndChildren;\n\t}\n\n\tconst termsByParent = flatTermsWithParentAndChildren.reduce(\n\t\t( acc, term ) => {\n\t\t\tconst { parent } = term;\n\t\t\tif ( ! acc[ parent ] ) {\n\t\t\t\tacc[ parent ] = [];\n\t\t\t}\n\t\t\tacc[ parent ].push( term );\n\t\t\treturn acc;\n\t\t},\n\t\t{}\n\t);\n\n\tconst fillWithChildren = ( terms ) => {\n\t\treturn terms.map( ( term ) => {\n\t\t\tconst children = termsByParent[ term.id ];\n\t\t\treturn {\n\t\t\t\t...term,\n\t\t\t\tchildren:\n\t\t\t\t\tchildren && children.length\n\t\t\t\t\t\t? fillWithChildren( children )\n\t\t\t\t\t\t: [],\n\t\t\t};\n\t\t} );\n\t};\n\n\treturn fillWithChildren( termsByParent[ '0' ] || [] );\n}\n\nexport const unescapeString = ( arg ) => {\n\treturn decodeEntities( arg );\n};\n\n/**\n * Returns a term object with name unescaped.\n *\n * @param {Object} term The term object to unescape.\n *\n * @return {Object} Term object with name property unescaped.\n */\nexport const unescapeTerm = ( term ) => {\n\treturn {\n\t\t...term,\n\t\tname: unescapeString( term.name ),\n\t};\n};\n\n/**\n * Returns an array of term objects with names unescaped.\n * The unescape of each term is performed using the unescapeTerm function.\n *\n * @param {Object[]} terms Array of term objects to unescape.\n *\n * @return {Object[]} Array of term objects unescaped.\n */\nexport const unescapeTerms = ( terms ) => {\n\treturn ( terms ?? [] ).map( unescapeTerm );\n};\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,cAAc,QAAQ,0BAA0B;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,cAAcA,CAAEC,SAAS,EAAG;EAC3C,MAAMC,8BAA8B,GAAGD,SAAS,CAACE,GAAG,CAAIC,IAAI,IAAM;IACjE,OAAO;MACNC,QAAQ,EAAE,EAAE;MACZC,MAAM,EAAE,IAAI;MACZ,GAAGF;IACJ,CAAC;EACF,CAAE,CAAC;;EAEH;EACA,IACCF,8BAA8B,CAACK,IAAI,CAAE,CAAE;IAAED;EAAO,CAAC,KAAMA,MAAM,KAAK,IAAK,CAAC,EACvE;IACD,OAAOJ,8BAA8B;EACtC;EAEA,MAAMM,aAAa,GAAGN,8BAA8B,CAACO,MAAM,CAC1D,CAAEC,GAAG,EAAEN,IAAI,KAAM;IAChB,MAAM;MAAEE;IAAO,CAAC,GAAGF,IAAI;IACvB,IAAK,CAAEM,GAAG,CAAEJ,MAAM,CAAE,EAAG;MACtBI,GAAG,CAAEJ,MAAM,CAAE,GAAG,EAAE;IACnB;IACAI,GAAG,CAAEJ,MAAM,CAAE,CAACK,IAAI,CAAEP,IAAK,CAAC;IAC1B,OAAOM,GAAG;EACX,CAAC,EACD,CAAC,CACF,CAAC;EAED,MAAME,gBAAgB,GAAKC,KAAK,IAAM;IACrC,OAAOA,KAAK,CAACV,GAAG,CAAIC,IAAI,IAAM;MAC7B,MAAMC,QAAQ,GAAGG,aAAa,CAAEJ,IAAI,CAACU,EAAE,CAAE;MACzC,OAAO;QACN,GAAGV,IAAI;QACPC,QAAQ,EACPA,QAAQ,IAAIA,QAAQ,CAACU,MAAM,GACxBH,gBAAgB,CAAEP,QAAS,CAAC,GAC5B;MACL,CAAC;IACF,CAAE,CAAC;EACJ,CAAC;EAED,OAAOO,gBAAgB,CAAEJ,aAAa,CAAE,GAAG,CAAE,IAAI,EAAG,CAAC;AACtD;AAEA,OAAO,MAAMQ,cAAc,GAAKC,GAAG,IAAM;EACxC,OAAOlB,cAAc,CAAEkB,GAAI,CAAC;AAC7B,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,YAAY,GAAKd,IAAI,IAAM;EACvC,OAAO;IACN,GAAGA,IAAI;IACPe,IAAI,EAAEH,cAAc,CAAEZ,IAAI,CAACe,IAAK;EACjC,CAAC;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,aAAa,GAAKP,KAAK,IAAM;EACzC,OAAO,CAAEA,KAAK,aAALA,KAAK,cAALA,KAAK,GAAI,EAAE,EAAGV,GAAG,CAAEe,YAAa,CAAC;AAC3C,CAAC"}
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import { cleanForSlug as urlCleanForSlug } from '@wordpress/url';
5
5
  import deprecated from '@wordpress/deprecated';
6
+
6
7
  /**
7
8
  * Performs some basic cleanup of a string for use as a post slug
8
9
  *
@@ -19,7 +20,6 @@ import deprecated from '@wordpress/deprecated';
19
20
  *
20
21
  * @return {string} Processed string
21
22
  */
22
-
23
23
  export function cleanForSlug(string) {
24
24
  deprecated('wp.editor.cleanForSlug', {
25
25
  since: '12.7',
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/utils/url.js"],"names":["cleanForSlug","urlCleanForSlug","deprecated","string","since","plugin","alternative"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,YAAY,IAAIC,eAAzB,QAAgD,gBAAhD;AACA,OAAOC,UAAP,MAAuB,uBAAvB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASF,YAAT,CAAuBG,MAAvB,EAAgC;AACtCD,EAAAA,UAAU,CAAE,wBAAF,EAA4B;AACrCE,IAAAA,KAAK,EAAE,MAD8B;AAErCC,IAAAA,MAAM,EAAE,WAF6B;AAGrCC,IAAAA,WAAW,EAAE;AAHwB,GAA5B,CAAV;AAKA,SAAOL,eAAe,CAAEE,MAAF,CAAtB;AACA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { cleanForSlug as urlCleanForSlug } from '@wordpress/url';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Performs some basic cleanup of a string for use as a post slug\n *\n * This replicates some of what sanitize_title() does in WordPress core, but\n * is only designed to approximate what the slug will be.\n *\n * Converts Latin-1 Supplement and Latin Extended-A letters to basic Latin letters.\n * Removes combining diacritical marks. Converts whitespace, periods,\n * and forward slashes to hyphens. Removes any remaining non-word characters\n * except hyphens and underscores. Converts remaining string to lowercase.\n * It does not account for octets, HTML entities, or other encoded characters.\n *\n * @param {string} string Title or slug to be processed\n *\n * @return {string} Processed string\n */\nexport function cleanForSlug( string ) {\n\tdeprecated( 'wp.editor.cleanForSlug', {\n\t\tsince: '12.7',\n\t\tplugin: 'Gutenberg',\n\t\talternative: 'wp.url.cleanForSlug',\n\t} );\n\treturn urlCleanForSlug( string );\n}\n"]}
1
+ {"version":3,"names":["cleanForSlug","urlCleanForSlug","deprecated","string","since","plugin","alternative"],"sources":["@wordpress/editor/src/utils/url.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { cleanForSlug as urlCleanForSlug } from '@wordpress/url';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Performs some basic cleanup of a string for use as a post slug\n *\n * This replicates some of what sanitize_title() does in WordPress core, but\n * is only designed to approximate what the slug will be.\n *\n * Converts Latin-1 Supplement and Latin Extended-A letters to basic Latin letters.\n * Removes combining diacritical marks. Converts whitespace, periods,\n * and forward slashes to hyphens. Removes any remaining non-word characters\n * except hyphens and underscores. Converts remaining string to lowercase.\n * It does not account for octets, HTML entities, or other encoded characters.\n *\n * @param {string} string Title or slug to be processed\n *\n * @return {string} Processed string\n */\nexport function cleanForSlug( string ) {\n\tdeprecated( 'wp.editor.cleanForSlug', {\n\t\tsince: '12.7',\n\t\tplugin: 'Gutenberg',\n\t\talternative: 'wp.url.cleanForSlug',\n\t} );\n\treturn urlCleanForSlug( string );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,YAAY,IAAIC,eAAe,QAAQ,gBAAgB;AAChE,OAAOC,UAAU,MAAM,uBAAuB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASF,YAAYA,CAAEG,MAAM,EAAG;EACtCD,UAAU,CAAE,wBAAwB,EAAE;IACrCE,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE,WAAW;IACnBC,WAAW,EAAE;EACd,CAAE,CAAC;EACH,OAAOL,eAAe,CAAEE,MAAO,CAAC;AACjC"}
@@ -516,20 +516,11 @@
516
516
  display: flex;
517
517
  align-content: space-between;
518
518
  flex-wrap: wrap;
519
- margin: -5px;
520
- }
521
- .post-publish-panel__postpublish-buttons > * {
522
- flex-grow: 1;
523
- margin: 5px;
519
+ gap: 16px;
524
520
  }
525
521
  .post-publish-panel__postpublish-buttons .components-button {
526
- height: auto;
527
522
  justify-content: center;
528
- padding: 3px 10px 4px;
529
523
  flex: 1;
530
- line-height: 1.6;
531
- text-align: center;
532
- white-space: normal;
533
524
  }
534
525
  .post-publish-panel__postpublish-buttons .components-clipboard-button {
535
526
  width: 100%;
@@ -544,18 +535,17 @@
544
535
  flex: 1;
545
536
  }
546
537
  .post-publish-panel__postpublish-post-address-container input[readonly] {
547
- padding: 10px;
548
- background: #ddd;
538
+ padding: 16px;
539
+ background: #f0f0f0;
540
+ border-color: #ccc;
549
541
  overflow: hidden;
550
542
  text-overflow: ellipsis;
543
+ height: 36px;
551
544
  }
552
545
 
553
546
  .post-publish-panel__postpublish-post-address__copy-button-wrap {
554
547
  flex-shrink: 0;
555
- margin-right: 8px;
556
- }
557
- .post-publish-panel__postpublish-post-address__copy-button-wrap .components-button {
558
- height: 38px;
548
+ margin-right: 16px;
559
549
  }
560
550
 
561
551
  .post-publish-panel__postpublish-header {
@@ -613,14 +603,17 @@
613
603
  width: 100%;
614
604
  position: relative;
615
605
  justify-content: flex-start;
606
+ align-items: flex-start;
616
607
  }
617
608
  .edit-post-sync-status > span {
618
609
  display: block;
619
610
  width: 45%;
620
611
  flex-shrink: 0;
612
+ padding: 6px 0;
613
+ word-break: break-word;
621
614
  }
622
615
  .edit-post-sync-status > div {
623
- padding-right: 12px;
616
+ padding: 6px 12px 6px 0;
624
617
  }
625
618
 
626
619
  .editor-post-taxonomies__hierarchical-terms-list {
@@ -516,20 +516,11 @@
516
516
  display: flex;
517
517
  align-content: space-between;
518
518
  flex-wrap: wrap;
519
- margin: -5px;
520
- }
521
- .post-publish-panel__postpublish-buttons > * {
522
- flex-grow: 1;
523
- margin: 5px;
519
+ gap: 16px;
524
520
  }
525
521
  .post-publish-panel__postpublish-buttons .components-button {
526
- height: auto;
527
522
  justify-content: center;
528
- padding: 3px 10px 4px;
529
523
  flex: 1;
530
- line-height: 1.6;
531
- text-align: center;
532
- white-space: normal;
533
524
  }
534
525
  .post-publish-panel__postpublish-buttons .components-clipboard-button {
535
526
  width: 100%;
@@ -544,18 +535,17 @@
544
535
  flex: 1;
545
536
  }
546
537
  .post-publish-panel__postpublish-post-address-container input[readonly] {
547
- padding: 10px;
548
- background: #ddd;
538
+ padding: 16px;
539
+ background: #f0f0f0;
540
+ border-color: #ccc;
549
541
  overflow: hidden;
550
542
  text-overflow: ellipsis;
543
+ height: 36px;
551
544
  }
552
545
 
553
546
  .post-publish-panel__postpublish-post-address__copy-button-wrap {
554
547
  flex-shrink: 0;
555
- margin-left: 8px;
556
- }
557
- .post-publish-panel__postpublish-post-address__copy-button-wrap .components-button {
558
- height: 38px;
548
+ margin-left: 16px;
559
549
  }
560
550
 
561
551
  .post-publish-panel__postpublish-header {
@@ -613,14 +603,17 @@
613
603
  width: 100%;
614
604
  position: relative;
615
605
  justify-content: flex-start;
606
+ align-items: flex-start;
616
607
  }
617
608
  .edit-post-sync-status > span {
618
609
  display: block;
619
610
  width: 45%;
620
611
  flex-shrink: 0;
612
+ padding: 6px 0;
613
+ word-break: break-word;
621
614
  }
622
615
  .edit-post-sync-status > div {
623
- padding-left: 12px;
616
+ padding: 6px 0 6px 12px;
624
617
  }
625
618
 
626
619
  .editor-post-taxonomies__hierarchical-terms-list {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/editor",
3
- "version": "13.15.0",
3
+ "version": "13.17.0",
4
4
  "description": "Enhanced block editor for WordPress posts.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -31,40 +31,41 @@
31
31
  ],
32
32
  "dependencies": {
33
33
  "@babel/runtime": "^7.16.0",
34
- "@wordpress/a11y": "^3.38.0",
35
- "@wordpress/api-fetch": "^6.35.0",
36
- "@wordpress/blob": "^3.38.0",
37
- "@wordpress/block-editor": "^12.6.0",
38
- "@wordpress/blocks": "^12.15.0",
39
- "@wordpress/components": "^25.4.0",
40
- "@wordpress/compose": "^6.15.0",
41
- "@wordpress/core-data": "^6.15.0",
42
- "@wordpress/data": "^9.8.0",
43
- "@wordpress/date": "^4.38.0",
44
- "@wordpress/deprecated": "^3.38.0",
45
- "@wordpress/dom": "^3.38.0",
46
- "@wordpress/element": "^5.15.0",
47
- "@wordpress/hooks": "^3.38.0",
48
- "@wordpress/html-entities": "^3.38.0",
49
- "@wordpress/i18n": "^4.38.0",
50
- "@wordpress/icons": "^9.29.0",
51
- "@wordpress/keyboard-shortcuts": "^4.15.0",
52
- "@wordpress/keycodes": "^3.38.0",
53
- "@wordpress/media-utils": "^4.29.0",
54
- "@wordpress/notices": "^4.6.0",
55
- "@wordpress/preferences": "^3.15.0",
56
- "@wordpress/private-apis": "^0.20.0",
57
- "@wordpress/reusable-blocks": "^4.15.0",
58
- "@wordpress/rich-text": "^6.15.0",
59
- "@wordpress/server-side-render": "^4.15.0",
60
- "@wordpress/url": "^3.39.0",
61
- "@wordpress/wordcount": "^3.38.0",
34
+ "@wordpress/a11y": "^3.40.0",
35
+ "@wordpress/api-fetch": "^6.37.0",
36
+ "@wordpress/blob": "^3.40.0",
37
+ "@wordpress/block-editor": "^12.8.0",
38
+ "@wordpress/blocks": "^12.17.0",
39
+ "@wordpress/components": "^25.6.0",
40
+ "@wordpress/compose": "^6.17.0",
41
+ "@wordpress/core-data": "^6.17.0",
42
+ "@wordpress/data": "^9.10.0",
43
+ "@wordpress/date": "^4.40.0",
44
+ "@wordpress/deprecated": "^3.40.0",
45
+ "@wordpress/dom": "^3.40.0",
46
+ "@wordpress/element": "^5.17.0",
47
+ "@wordpress/hooks": "^3.40.0",
48
+ "@wordpress/html-entities": "^3.40.0",
49
+ "@wordpress/i18n": "^4.40.0",
50
+ "@wordpress/icons": "^9.31.0",
51
+ "@wordpress/keyboard-shortcuts": "^4.17.0",
52
+ "@wordpress/keycodes": "^3.40.0",
53
+ "@wordpress/media-utils": "^4.31.0",
54
+ "@wordpress/notices": "^4.8.0",
55
+ "@wordpress/patterns": "^1.1.0",
56
+ "@wordpress/preferences": "^3.17.0",
57
+ "@wordpress/private-apis": "^0.22.0",
58
+ "@wordpress/reusable-blocks": "^4.17.0",
59
+ "@wordpress/rich-text": "^6.17.0",
60
+ "@wordpress/server-side-render": "^4.17.0",
61
+ "@wordpress/url": "^3.41.0",
62
+ "@wordpress/wordcount": "^3.40.0",
62
63
  "classnames": "^2.3.1",
63
64
  "date-fns": "^2.28.0",
64
65
  "memize": "^2.1.0",
65
66
  "react-autosize-textarea": "^7.1.0",
66
67
  "rememo": "^4.0.2",
67
- "remove-accents": "^0.4.2"
68
+ "remove-accents": "^0.5.0"
68
69
  },
69
70
  "peerDependencies": {
70
71
  "react": "^18.0.0",
@@ -73,5 +74,5 @@
73
74
  "publishConfig": {
74
75
  "access": "public"
75
76
  },
76
- "gitHead": "6f14d11ed4cb59df110a28ebaa23ecba95eb673a"
77
+ "gitHead": "78a288d55b83a713b2f7d98d5a855c0771a2afc6"
77
78
  }
@@ -102,7 +102,7 @@ function EditorHelpTopics( { close, isVisible, onClose, showSupport } ) {
102
102
  contentStyle={ styles.contentContainer }
103
103
  testID="editor-help-modal"
104
104
  >
105
- <SafeAreaView>
105
+ <SafeAreaView style={ styles.safeAreaContainer }>
106
106
  <BottomSheet.NavigationContainer
107
107
  animate
108
108
  main
@@ -19,7 +19,12 @@
19
19
  color: $dark-primary;
20
20
  }
21
21
 
22
+ .safeAreaContainer {
23
+ flex: 1;
24
+ }
25
+
22
26
  .navigationContainer {
27
+ flex: 1;
23
28
  overflow: hidden;
24
29
  }
25
30
 
@@ -7,8 +7,7 @@ import {
7
7
  FlexBlock,
8
8
  __experimentalNumberControl as NumberControl,
9
9
  } from '@wordpress/components';
10
- import { withSelect, withDispatch } from '@wordpress/data';
11
- import { compose } from '@wordpress/compose';
10
+ import { useSelect, useDispatch } from '@wordpress/data';
12
11
  import { useState } from '@wordpress/element';
13
12
 
14
13
  /**
@@ -17,17 +16,25 @@ import { useState } from '@wordpress/element';
17
16
  import PostTypeSupportCheck from '../post-type-support-check';
18
17
  import { store as editorStore } from '../../store';
19
18
 
20
- export const PageAttributesOrder = ( { onUpdateOrder, order = 0 } ) => {
19
+ function PageAttributesOrder() {
20
+ const order = useSelect(
21
+ ( select ) =>
22
+ select( editorStore ).getEditedPostAttribute( 'menu_order' ) ?? 0,
23
+ []
24
+ );
25
+ const { editPost } = useDispatch( editorStore );
21
26
  const [ orderInput, setOrderInput ] = useState( null );
22
27
 
23
28
  const setUpdatedOrder = ( value ) => {
24
29
  setOrderInput( value );
25
30
  const newOrder = Number( value );
26
31
  if ( Number.isInteger( newOrder ) && value.trim?.() !== '' ) {
27
- onUpdateOrder( Number( value ) );
32
+ editPost( { menu_order: newOrder } );
28
33
  }
29
34
  };
30
- const value = orderInput === null ? order : orderInput;
35
+
36
+ const value = orderInput ?? order;
37
+
31
38
  return (
32
39
  <Flex>
33
40
  <FlexBlock>
@@ -43,27 +50,12 @@ export const PageAttributesOrder = ( { onUpdateOrder, order = 0 } ) => {
43
50
  </FlexBlock>
44
51
  </Flex>
45
52
  );
46
- };
53
+ }
47
54
 
48
- function PageAttributesOrderWithChecks( props ) {
55
+ export default function PageAttributesOrderWithChecks() {
49
56
  return (
50
57
  <PostTypeSupportCheck supportKeys="page-attributes">
51
- <PageAttributesOrder { ...props } />
58
+ <PageAttributesOrder />
52
59
  </PostTypeSupportCheck>
53
60
  );
54
61
  }
55
-
56
- export default compose( [
57
- withSelect( ( select ) => {
58
- return {
59
- order: select( editorStore ).getEditedPostAttribute( 'menu_order' ),
60
- };
61
- } ),
62
- withDispatch( ( dispatch ) => ( {
63
- onUpdateOrder( order ) {
64
- dispatch( editorStore ).editPost( {
65
- menu_order: order,
66
- } );
67
- },
68
- } ) ),
69
- ] )( PageAttributesOrderWithChecks );