@wordpress/editor 13.16.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 (549) hide show
  1. package/CHANGELOG.md +2 -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 +1 -10
  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 +1 -7
  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 +1 -10
  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 +0 -9
  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 +7 -18
  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 +60 -129
  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 +169 -295
  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 +1 -7
  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 +1 -4
  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 +1 -7
  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 +3 -6
  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 +9 -15
  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 +62 -84
  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 +172 -222
  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-excerpt/check.js +6 -2
  536. package/src/components/post-featured-image/check.js +4 -2
  537. package/src/components/post-format/check.js +16 -11
  538. package/src/components/post-last-revision/check.js +12 -14
  539. package/src/components/post-last-revision/index.js +12 -10
  540. package/src/components/post-last-revision/test/check.js +28 -16
  541. package/src/components/post-pending-status/check.js +13 -19
  542. package/src/components/post-pending-status/index.js +9 -14
  543. package/src/components/post-pending-status/test/check.js +32 -10
  544. package/src/components/post-publish-panel/style.scss +12 -25
  545. package/src/components/post-sync-status/style.scss +4 -1
  546. package/src/components/post-type-support-check/index.js +1 -1
  547. package/src/components/post-type-support-check/test/index.js +1 -1
  548. package/src/components/provider/index.js +3 -2
  549. package/src/components/unsaved-changes-warning/index.js +22 -27
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
@@ -24,29 +23,17 @@ exports.updateBlockListSettings = exports.updateBlockAttributes = exports.update
24
23
  exports.updateEditorSettings = updateEditorSettings;
25
24
  exports.updatePost = updatePost;
26
25
  exports.updatePostLock = updatePostLock;
27
-
28
26
  var _apiFetch = _interopRequireDefault(require("@wordpress/api-fetch"));
29
-
30
27
  var _deprecated = _interopRequireDefault(require("@wordpress/deprecated"));
31
-
32
28
  var _blocks = require("@wordpress/blocks");
33
-
34
29
  var _notices = require("@wordpress/notices");
35
-
36
30
  var _coreData = require("@wordpress/core-data");
37
-
38
31
  var _blockEditor = require("@wordpress/block-editor");
39
-
40
32
  var _hooks = require("@wordpress/hooks");
41
-
42
33
  var _preferences = require("@wordpress/preferences");
43
-
44
34
  var _constants = require("./constants");
45
-
46
35
  var _localAutosave = require("./local-autosave");
47
-
48
36
  var _noticeBuilder = require("./utils/notice-builder");
49
-
50
37
  /**
51
38
  * WordPress dependencies
52
39
  */
@@ -66,60 +53,52 @@ var _noticeBuilder = require("./utils/notice-builder");
66
53
  const setupEditor = (post, edits, template) => ({
67
54
  dispatch
68
55
  }) => {
69
- dispatch.setupEditorState(post); // Apply a template for new posts only, if exists.
70
-
56
+ dispatch.setupEditorState(post);
57
+ // Apply a template for new posts only, if exists.
71
58
  const isNewPost = post.status === 'auto-draft';
72
-
73
59
  if (isNewPost && template) {
74
60
  // In order to ensure maximum of a single parse during setup, edits are
75
61
  // included as part of editor setup action. Assume edited content as
76
62
  // canonical if provided, falling back to post.
77
63
  let content;
78
-
79
64
  if ('content' in edits) {
80
65
  content = edits.content;
81
66
  } else {
82
67
  content = post.content.raw;
83
68
  }
84
-
85
69
  let blocks = (0, _blocks.parse)(content);
86
70
  blocks = (0, _blocks.synchronizeBlocksWithTemplate)(blocks, template);
87
71
  dispatch.resetEditorBlocks(blocks, {
88
72
  __unstableShouldCreateUndoLevel: false
89
73
  });
90
74
  }
91
-
92
75
  if (edits && Object.values(edits).some(([key, edit]) => {
93
76
  var _post$key$raw;
94
-
95
77
  return edit !== ((_post$key$raw = post[key]?.raw) !== null && _post$key$raw !== void 0 ? _post$key$raw : post[key]);
96
78
  })) {
97
79
  dispatch.editPost(edits);
98
80
  }
99
81
  };
82
+
100
83
  /**
101
84
  * Returns an action object signalling that the editor is being destroyed and
102
85
  * that any necessary state or side-effect cleanup should occur.
103
86
  *
104
87
  * @return {Object} Action object.
105
88
  */
106
-
107
-
108
89
  exports.setupEditor = setupEditor;
109
-
110
90
  function __experimentalTearDownEditor() {
111
91
  return {
112
92
  type: 'TEAR_DOWN_EDITOR'
113
93
  };
114
94
  }
95
+
115
96
  /**
116
97
  * Returns an action object used in signalling that the latest version of the
117
98
  * post has been received, either by initialization or save.
118
99
  *
119
100
  * @deprecated Since WordPress 6.0.
120
101
  */
121
-
122
-
123
102
  function resetPost() {
124
103
  (0, _deprecated.default)("wp.data.dispatch( 'core/editor' ).resetPost", {
125
104
  since: '6.0',
@@ -130,6 +109,7 @@ function resetPost() {
130
109
  type: 'DO_NOTHING'
131
110
  };
132
111
  }
112
+
133
113
  /**
134
114
  * Returns an action object used in signalling that a patch of updates for the
135
115
  * latest version of the post have been received.
@@ -137,8 +117,6 @@ function resetPost() {
137
117
  * @return {Object} Action object.
138
118
  * @deprecated since Gutenberg 9.7.0.
139
119
  */
140
-
141
-
142
120
  function updatePost() {
143
121
  (0, _deprecated.default)("wp.data.dispatch( 'core/editor' ).updatePost", {
144
122
  since: '5.7',
@@ -148,6 +126,7 @@ function updatePost() {
148
126
  type: 'DO_NOTHING'
149
127
  };
150
128
  }
129
+
151
130
  /**
152
131
  * Returns an action object used to setup the editor state when first opening
153
132
  * an editor.
@@ -156,14 +135,13 @@ function updatePost() {
156
135
  *
157
136
  * @return {Object} Action object.
158
137
  */
159
-
160
-
161
138
  function setupEditorState(post) {
162
139
  return {
163
140
  type: 'SETUP_EDITOR_STATE',
164
141
  post
165
142
  };
166
143
  }
144
+
167
145
  /**
168
146
  * Returns an action object used in signalling that attributes of the post have
169
147
  * been edited.
@@ -171,8 +149,6 @@ function setupEditorState(post) {
171
149
  * @param {Object} edits Post attributes to edit.
172
150
  * @param {Object} options Options for the edit.
173
151
  */
174
-
175
-
176
152
  const editPost = (edits, options) => ({
177
153
  select,
178
154
  registry
@@ -183,15 +159,13 @@ const editPost = (edits, options) => ({
183
159
  } = select.getCurrentPost();
184
160
  registry.dispatch(_coreData.store).editEntityRecord('postType', type, id, edits, options);
185
161
  };
162
+
186
163
  /**
187
164
  * Action for saving the current post in the editor.
188
165
  *
189
166
  * @param {Object} options
190
167
  */
191
-
192
-
193
168
  exports.editPost = editPost;
194
-
195
169
  const savePost = (options = {}) => async ({
196
170
  select,
197
171
  dispatch,
@@ -200,9 +174,7 @@ const savePost = (options = {}) => async ({
200
174
  if (!select.isEditedPostSaveable()) {
201
175
  return;
202
176
  }
203
-
204
177
  const content = select.getEditedPostContent();
205
-
206
178
  if (!options.isAutosave) {
207
179
  dispatch.editPost({
208
180
  content
@@ -210,7 +182,6 @@ const savePost = (options = {}) => async ({
210
182
  undoIgnore: true
211
183
  });
212
184
  }
213
-
214
185
  const previousRecord = select.getCurrentPost();
215
186
  const edits = {
216
187
  id: previousRecord.id,
@@ -223,25 +194,21 @@ const savePost = (options = {}) => async ({
223
194
  });
224
195
  await registry.dispatch(_coreData.store).saveEntityRecord('postType', previousRecord.type, edits, options);
225
196
  let error = registry.select(_coreData.store).getLastEntitySaveError('postType', previousRecord.type, previousRecord.id);
226
-
227
197
  if (!error) {
228
198
  await (0, _hooks.applyFilters)('editor.__unstableSavePost', Promise.resolve(), options).catch(err => {
229
199
  error = err;
230
200
  });
231
201
  }
232
-
233
202
  dispatch({
234
203
  type: 'REQUEST_POST_UPDATE_FINISH',
235
204
  options
236
205
  });
237
-
238
206
  if (error) {
239
207
  const args = (0, _noticeBuilder.getNotificationArgumentsForSaveFail)({
240
208
  post: previousRecord,
241
209
  edits,
242
210
  error
243
211
  });
244
-
245
212
  if (args.length) {
246
213
  registry.dispatch(_notices.store).createErrorNotice(...args);
247
214
  }
@@ -253,27 +220,23 @@ const savePost = (options = {}) => async ({
253
220
  postType: await registry.resolveSelect(_coreData.store).getPostType(updatedRecord.type),
254
221
  options
255
222
  });
256
-
257
223
  if (args.length) {
258
224
  registry.dispatch(_notices.store).createSuccessNotice(...args);
259
- } // Make sure that any edits after saving create an undo level and are
225
+ }
226
+ // Make sure that any edits after saving create an undo level and are
260
227
  // considered for change detection.
261
-
262
-
263
228
  if (!options.isAutosave) {
264
229
  registry.dispatch(_blockEditor.store).__unstableMarkLastChangeAsPersistent();
265
230
  }
266
231
  }
267
232
  };
233
+
268
234
  /**
269
235
  * Action for refreshing the current post.
270
236
  *
271
237
  * @deprecated Since WordPress 6.0.
272
238
  */
273
-
274
-
275
239
  exports.savePost = savePost;
276
-
277
240
  function refreshPost() {
278
241
  (0, _deprecated.default)("wp.data.dispatch( 'core/editor' ).refreshPost", {
279
242
  since: '6.0',
@@ -284,11 +247,10 @@ function refreshPost() {
284
247
  type: 'DO_NOTHING'
285
248
  };
286
249
  }
250
+
287
251
  /**
288
252
  * Action for trashing the current post in the editor.
289
253
  */
290
-
291
-
292
254
  const trashPost = () => async ({
293
255
  select,
294
256
  dispatch,
@@ -304,7 +266,6 @@ const trashPost = () => async ({
304
266
  dispatch({
305
267
  type: 'REQUEST_POST_DELETE_START'
306
268
  });
307
-
308
269
  try {
309
270
  const post = select.getCurrentPost();
310
271
  await (0, _apiFetch.default)({
@@ -317,11 +278,11 @@ const trashPost = () => async ({
317
278
  error
318
279
  }));
319
280
  }
320
-
321
281
  dispatch({
322
282
  type: 'REQUEST_POST_DELETE_FINISH'
323
283
  });
324
284
  };
285
+
325
286
  /**
326
287
  * Action that autosaves the current post. This
327
288
  * includes server-side autosaving (default) and client-side (a.k.a. local)
@@ -330,10 +291,7 @@ const trashPost = () => async ({
330
291
  *
331
292
  * @param {Object?} options Extra flags to identify the autosave.
332
293
  */
333
-
334
-
335
294
  exports.trashPost = trashPost;
336
-
337
295
  const autosave = ({
338
296
  local = false,
339
297
  ...options
@@ -355,9 +313,7 @@ const autosave = ({
355
313
  });
356
314
  }
357
315
  };
358
-
359
316
  exports.autosave = autosave;
360
-
361
317
  const __unstableSaveForPreview = ({
362
318
  forceIsAutosaveable
363
319
  } = {}) => async ({
@@ -366,7 +322,6 @@ const __unstableSaveForPreview = ({
366
322
  }) => {
367
323
  if ((forceIsAutosaveable || select.isEditedPostAutosaveable()) && !select.isPostLocked()) {
368
324
  const isDraft = ['draft', 'auto-draft'].includes(select.getEditedPostAttribute('status'));
369
-
370
325
  if (isDraft) {
371
326
  await dispatch.savePost({
372
327
  isPreview: true
@@ -377,42 +332,35 @@ const __unstableSaveForPreview = ({
377
332
  });
378
333
  }
379
334
  }
380
-
381
335
  return select.getEditedPostPreviewLink();
382
336
  };
337
+
383
338
  /**
384
339
  * Action that restores last popped state in undo history.
385
340
  */
386
-
387
-
388
341
  exports.__unstableSaveForPreview = __unstableSaveForPreview;
389
-
390
342
  const redo = () => ({
391
343
  registry
392
344
  }) => {
393
345
  registry.dispatch(_coreData.store).redo();
394
346
  };
347
+
395
348
  /**
396
349
  * Action that pops a record from undo history and undoes the edit.
397
350
  */
398
-
399
-
400
351
  exports.redo = redo;
401
-
402
352
  const undo = () => ({
403
353
  registry
404
354
  }) => {
405
355
  registry.dispatch(_coreData.store).undo();
406
356
  };
357
+
407
358
  /**
408
359
  * Action that creates an undo history record.
409
360
  *
410
361
  * @deprecated Since WordPress 6.0
411
362
  */
412
-
413
-
414
363
  exports.undo = undo;
415
-
416
364
  function createUndoLevel() {
417
365
  (0, _deprecated.default)("wp.data.dispatch( 'core/editor' ).createUndoLevel", {
418
366
  since: '6.0',
@@ -423,42 +371,39 @@ function createUndoLevel() {
423
371
  type: 'DO_NOTHING'
424
372
  };
425
373
  }
374
+
426
375
  /**
427
376
  * Action that locks the editor.
428
377
  *
429
378
  * @param {Object} lock Details about the post lock status, user, and nonce.
430
379
  * @return {Object} Action object.
431
380
  */
432
-
433
-
434
381
  function updatePostLock(lock) {
435
382
  return {
436
383
  type: 'UPDATE_POST_LOCK',
437
384
  lock
438
385
  };
439
386
  }
387
+
440
388
  /**
441
389
  * Enable the publish sidebar.
442
390
  */
443
-
444
-
445
391
  const enablePublishSidebar = () => ({
446
392
  registry
447
393
  }) => {
448
394
  registry.dispatch(_preferences.store).set('core/edit-post', 'isPublishSidebarEnabled', true);
449
395
  };
396
+
450
397
  /**
451
398
  * Disables the publish sidebar.
452
399
  */
453
-
454
-
455
400
  exports.enablePublishSidebar = enablePublishSidebar;
456
-
457
401
  const disablePublishSidebar = () => ({
458
402
  registry
459
403
  }) => {
460
404
  registry.dispatch(_preferences.store).set('core/edit-post', 'isPublishSidebarEnabled', false);
461
405
  };
406
+
462
407
  /**
463
408
  * Action that locks post saving.
464
409
  *
@@ -502,16 +447,14 @@ const disablePublishSidebar = () => ({
502
447
  *
503
448
  * @return {Object} Action object
504
449
  */
505
-
506
-
507
450
  exports.disablePublishSidebar = disablePublishSidebar;
508
-
509
451
  function lockPostSaving(lockName) {
510
452
  return {
511
453
  type: 'LOCK_POST_SAVING',
512
454
  lockName
513
455
  };
514
456
  }
457
+
515
458
  /**
516
459
  * Action that unlocks post saving.
517
460
  *
@@ -525,14 +468,13 @@ function lockPostSaving(lockName) {
525
468
  *
526
469
  * @return {Object} Action object
527
470
  */
528
-
529
-
530
471
  function unlockPostSaving(lockName) {
531
472
  return {
532
473
  type: 'UNLOCK_POST_SAVING',
533
474
  lockName
534
475
  };
535
476
  }
477
+
536
478
  /**
537
479
  * Action that locks post autosaving.
538
480
  *
@@ -546,14 +488,13 @@ function unlockPostSaving(lockName) {
546
488
  *
547
489
  * @return {Object} Action object
548
490
  */
549
-
550
-
551
491
  function lockPostAutosaving(lockName) {
552
492
  return {
553
493
  type: 'LOCK_POST_AUTOSAVING',
554
494
  lockName
555
495
  };
556
496
  }
497
+
557
498
  /**
558
499
  * Action that unlocks post autosaving.
559
500
  *
@@ -567,22 +508,19 @@ function lockPostAutosaving(lockName) {
567
508
  *
568
509
  * @return {Object} Action object
569
510
  */
570
-
571
-
572
511
  function unlockPostAutosaving(lockName) {
573
512
  return {
574
513
  type: 'UNLOCK_POST_AUTOSAVING',
575
514
  lockName
576
515
  };
577
516
  }
517
+
578
518
  /**
579
519
  * Returns an action object used to signal that the blocks have been updated.
580
520
  *
581
521
  * @param {Array} blocks Block Array.
582
522
  * @param {?Object} options Optional options.
583
523
  */
584
-
585
-
586
524
  const resetEditorBlocks = (blocks, options = {}) => ({
587
525
  select,
588
526
  dispatch,
@@ -596,30 +534,27 @@ const resetEditorBlocks = (blocks, options = {}) => ({
596
534
  blocks,
597
535
  selection
598
536
  };
599
-
600
537
  if (__unstableShouldCreateUndoLevel !== false) {
601
538
  const {
602
539
  id,
603
540
  type
604
541
  } = select.getCurrentPost();
605
542
  const noChange = registry.select(_coreData.store).getEditedEntityRecord('postType', type, id).blocks === edits.blocks;
606
-
607
543
  if (noChange) {
608
544
  registry.dispatch(_coreData.store).__unstableCreateUndoLevel('postType', type, id);
609
-
610
545
  return;
611
- } // We create a new function here on every persistent edit
546
+ }
547
+
548
+ // We create a new function here on every persistent edit
612
549
  // to make sure the edit makes the post dirty and creates
613
550
  // a new undo level.
614
-
615
-
616
551
  edits.content = ({
617
552
  blocks: blocksForSerialization = []
618
553
  }) => (0, _blocks.__unstableSerializeAndClean)(blocksForSerialization);
619
554
  }
620
-
621
555
  dispatch.editPost(edits);
622
556
  };
557
+
623
558
  /*
624
559
  * Returns an action object used in signalling that the post editor settings have been updated.
625
560
  *
@@ -627,21 +562,18 @@ const resetEditorBlocks = (blocks, options = {}) => ({
627
562
  *
628
563
  * @return {Object} Action object
629
564
  */
630
-
631
-
632
565
  exports.resetEditorBlocks = resetEditorBlocks;
633
-
634
566
  function updateEditorSettings(settings) {
635
567
  return {
636
568
  type: 'UPDATE_EDITOR_SETTINGS',
637
569
  settings
638
570
  };
639
571
  }
572
+
640
573
  /**
641
574
  * Backward compatibility
642
575
  */
643
576
 
644
-
645
577
  const getBlockEditorAction = name => (...args) => ({
646
578
  registry
647
579
  }) => {
@@ -652,190 +584,189 @@ const getBlockEditorAction = name => (...args) => ({
652
584
  });
653
585
  registry.dispatch(_blockEditor.store)[name](...args);
654
586
  };
587
+
655
588
  /**
656
589
  * @see resetBlocks in core/block-editor store.
657
590
  */
658
-
659
-
660
591
  const resetBlocks = getBlockEditorAction('resetBlocks');
592
+
661
593
  /**
662
594
  * @see receiveBlocks in core/block-editor store.
663
595
  */
664
-
665
596
  exports.resetBlocks = resetBlocks;
666
597
  const receiveBlocks = getBlockEditorAction('receiveBlocks');
598
+
667
599
  /**
668
600
  * @see updateBlock in core/block-editor store.
669
601
  */
670
-
671
602
  exports.receiveBlocks = receiveBlocks;
672
603
  const updateBlock = getBlockEditorAction('updateBlock');
604
+
673
605
  /**
674
606
  * @see updateBlockAttributes in core/block-editor store.
675
607
  */
676
-
677
608
  exports.updateBlock = updateBlock;
678
609
  const updateBlockAttributes = getBlockEditorAction('updateBlockAttributes');
610
+
679
611
  /**
680
612
  * @see selectBlock in core/block-editor store.
681
613
  */
682
-
683
614
  exports.updateBlockAttributes = updateBlockAttributes;
684
615
  const selectBlock = getBlockEditorAction('selectBlock');
616
+
685
617
  /**
686
618
  * @see startMultiSelect in core/block-editor store.
687
619
  */
688
-
689
620
  exports.selectBlock = selectBlock;
690
621
  const startMultiSelect = getBlockEditorAction('startMultiSelect');
622
+
691
623
  /**
692
624
  * @see stopMultiSelect in core/block-editor store.
693
625
  */
694
-
695
626
  exports.startMultiSelect = startMultiSelect;
696
627
  const stopMultiSelect = getBlockEditorAction('stopMultiSelect');
628
+
697
629
  /**
698
630
  * @see multiSelect in core/block-editor store.
699
631
  */
700
-
701
632
  exports.stopMultiSelect = stopMultiSelect;
702
633
  const multiSelect = getBlockEditorAction('multiSelect');
634
+
703
635
  /**
704
636
  * @see clearSelectedBlock in core/block-editor store.
705
637
  */
706
-
707
638
  exports.multiSelect = multiSelect;
708
639
  const clearSelectedBlock = getBlockEditorAction('clearSelectedBlock');
640
+
709
641
  /**
710
642
  * @see toggleSelection in core/block-editor store.
711
643
  */
712
-
713
644
  exports.clearSelectedBlock = clearSelectedBlock;
714
645
  const toggleSelection = getBlockEditorAction('toggleSelection');
646
+
715
647
  /**
716
648
  * @see replaceBlocks in core/block-editor store.
717
649
  */
718
-
719
650
  exports.toggleSelection = toggleSelection;
720
651
  const replaceBlocks = getBlockEditorAction('replaceBlocks');
652
+
721
653
  /**
722
654
  * @see replaceBlock in core/block-editor store.
723
655
  */
724
-
725
656
  exports.replaceBlocks = replaceBlocks;
726
657
  const replaceBlock = getBlockEditorAction('replaceBlock');
658
+
727
659
  /**
728
660
  * @see moveBlocksDown in core/block-editor store.
729
661
  */
730
-
731
662
  exports.replaceBlock = replaceBlock;
732
663
  const moveBlocksDown = getBlockEditorAction('moveBlocksDown');
664
+
733
665
  /**
734
666
  * @see moveBlocksUp in core/block-editor store.
735
667
  */
736
-
737
668
  exports.moveBlocksDown = moveBlocksDown;
738
669
  const moveBlocksUp = getBlockEditorAction('moveBlocksUp');
670
+
739
671
  /**
740
672
  * @see moveBlockToPosition in core/block-editor store.
741
673
  */
742
-
743
674
  exports.moveBlocksUp = moveBlocksUp;
744
675
  const moveBlockToPosition = getBlockEditorAction('moveBlockToPosition');
676
+
745
677
  /**
746
678
  * @see insertBlock in core/block-editor store.
747
679
  */
748
-
749
680
  exports.moveBlockToPosition = moveBlockToPosition;
750
681
  const insertBlock = getBlockEditorAction('insertBlock');
682
+
751
683
  /**
752
684
  * @see insertBlocks in core/block-editor store.
753
685
  */
754
-
755
686
  exports.insertBlock = insertBlock;
756
687
  const insertBlocks = getBlockEditorAction('insertBlocks');
688
+
757
689
  /**
758
690
  * @see showInsertionPoint in core/block-editor store.
759
691
  */
760
-
761
692
  exports.insertBlocks = insertBlocks;
762
693
  const showInsertionPoint = getBlockEditorAction('showInsertionPoint');
694
+
763
695
  /**
764
696
  * @see hideInsertionPoint in core/block-editor store.
765
697
  */
766
-
767
698
  exports.showInsertionPoint = showInsertionPoint;
768
699
  const hideInsertionPoint = getBlockEditorAction('hideInsertionPoint');
700
+
769
701
  /**
770
702
  * @see setTemplateValidity in core/block-editor store.
771
703
  */
772
-
773
704
  exports.hideInsertionPoint = hideInsertionPoint;
774
705
  const setTemplateValidity = getBlockEditorAction('setTemplateValidity');
706
+
775
707
  /**
776
708
  * @see synchronizeTemplate in core/block-editor store.
777
709
  */
778
-
779
710
  exports.setTemplateValidity = setTemplateValidity;
780
711
  const synchronizeTemplate = getBlockEditorAction('synchronizeTemplate');
712
+
781
713
  /**
782
714
  * @see mergeBlocks in core/block-editor store.
783
715
  */
784
-
785
716
  exports.synchronizeTemplate = synchronizeTemplate;
786
717
  const mergeBlocks = getBlockEditorAction('mergeBlocks');
718
+
787
719
  /**
788
720
  * @see removeBlocks in core/block-editor store.
789
721
  */
790
-
791
722
  exports.mergeBlocks = mergeBlocks;
792
723
  const removeBlocks = getBlockEditorAction('removeBlocks');
724
+
793
725
  /**
794
726
  * @see removeBlock in core/block-editor store.
795
727
  */
796
-
797
728
  exports.removeBlocks = removeBlocks;
798
729
  const removeBlock = getBlockEditorAction('removeBlock');
730
+
799
731
  /**
800
732
  * @see toggleBlockMode in core/block-editor store.
801
733
  */
802
-
803
734
  exports.removeBlock = removeBlock;
804
735
  const toggleBlockMode = getBlockEditorAction('toggleBlockMode');
736
+
805
737
  /**
806
738
  * @see startTyping in core/block-editor store.
807
739
  */
808
-
809
740
  exports.toggleBlockMode = toggleBlockMode;
810
741
  const startTyping = getBlockEditorAction('startTyping');
742
+
811
743
  /**
812
744
  * @see stopTyping in core/block-editor store.
813
745
  */
814
-
815
746
  exports.startTyping = startTyping;
816
747
  const stopTyping = getBlockEditorAction('stopTyping');
748
+
817
749
  /**
818
750
  * @see enterFormattedText in core/block-editor store.
819
751
  */
820
-
821
752
  exports.stopTyping = stopTyping;
822
753
  const enterFormattedText = getBlockEditorAction('enterFormattedText');
754
+
823
755
  /**
824
756
  * @see exitFormattedText in core/block-editor store.
825
757
  */
826
-
827
758
  exports.enterFormattedText = enterFormattedText;
828
759
  const exitFormattedText = getBlockEditorAction('exitFormattedText');
760
+
829
761
  /**
830
762
  * @see insertDefaultBlock in core/block-editor store.
831
763
  */
832
-
833
764
  exports.exitFormattedText = exitFormattedText;
834
765
  const insertDefaultBlock = getBlockEditorAction('insertDefaultBlock');
766
+
835
767
  /**
836
768
  * @see updateBlockListSettings in core/block-editor store.
837
769
  */
838
-
839
770
  exports.insertDefaultBlock = insertDefaultBlock;
840
771
  const updateBlockListSettings = getBlockEditorAction('updateBlockListSettings');
841
772
  exports.updateBlockListSettings = updateBlockListSettings;