@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
@@ -9,13 +9,14 @@ import { store as coreStore } from '@wordpress/core-data';
9
9
  import { store as blockEditorStore } from '@wordpress/block-editor';
10
10
  import { applyFilters } from '@wordpress/hooks';
11
11
  import { store as preferencesStore } from '@wordpress/preferences';
12
+
12
13
  /**
13
14
  * Internal dependencies
14
15
  */
15
-
16
16
  import { TRASH_POST_NOTICE_ID } from './constants';
17
17
  import { localAutosaveSet } from './local-autosave';
18
18
  import { getNotificationArgumentsForSaveSuccess, getNotificationArgumentsForSaveFail, getNotificationArgumentsForTrashFail } from './utils/notice-builder';
19
+
19
20
  /**
20
21
  * Returns an action generator used in signalling that editor has initialized with
21
22
  * the specified post object and editor settings.
@@ -24,60 +25,54 @@ import { getNotificationArgumentsForSaveSuccess, getNotificationArgumentsForSave
24
25
  * @param {Object} edits Initial edited attributes object.
25
26
  * @param {Array?} template Block Template.
26
27
  */
27
-
28
28
  export const setupEditor = (post, edits, template) => ({
29
29
  dispatch
30
30
  }) => {
31
- dispatch.setupEditorState(post); // Apply a template for new posts only, if exists.
32
-
31
+ dispatch.setupEditorState(post);
32
+ // Apply a template for new posts only, if exists.
33
33
  const isNewPost = post.status === 'auto-draft';
34
-
35
34
  if (isNewPost && template) {
36
35
  // In order to ensure maximum of a single parse during setup, edits are
37
36
  // included as part of editor setup action. Assume edited content as
38
37
  // canonical if provided, falling back to post.
39
38
  let content;
40
-
41
39
  if ('content' in edits) {
42
40
  content = edits.content;
43
41
  } else {
44
42
  content = post.content.raw;
45
43
  }
46
-
47
44
  let blocks = parse(content);
48
45
  blocks = synchronizeBlocksWithTemplate(blocks, template);
49
46
  dispatch.resetEditorBlocks(blocks, {
50
47
  __unstableShouldCreateUndoLevel: false
51
48
  });
52
49
  }
53
-
54
50
  if (edits && Object.values(edits).some(([key, edit]) => {
55
51
  var _post$key$raw;
56
-
57
52
  return edit !== ((_post$key$raw = post[key]?.raw) !== null && _post$key$raw !== void 0 ? _post$key$raw : post[key]);
58
53
  })) {
59
54
  dispatch.editPost(edits);
60
55
  }
61
56
  };
57
+
62
58
  /**
63
59
  * Returns an action object signalling that the editor is being destroyed and
64
60
  * that any necessary state or side-effect cleanup should occur.
65
61
  *
66
62
  * @return {Object} Action object.
67
63
  */
68
-
69
64
  export function __experimentalTearDownEditor() {
70
65
  return {
71
66
  type: 'TEAR_DOWN_EDITOR'
72
67
  };
73
68
  }
69
+
74
70
  /**
75
71
  * Returns an action object used in signalling that the latest version of the
76
72
  * post has been received, either by initialization or save.
77
73
  *
78
74
  * @deprecated Since WordPress 6.0.
79
75
  */
80
-
81
76
  export function resetPost() {
82
77
  deprecated("wp.data.dispatch( 'core/editor' ).resetPost", {
83
78
  since: '6.0',
@@ -88,6 +83,7 @@ export function resetPost() {
88
83
  type: 'DO_NOTHING'
89
84
  };
90
85
  }
86
+
91
87
  /**
92
88
  * Returns an action object used in signalling that a patch of updates for the
93
89
  * latest version of the post have been received.
@@ -95,7 +91,6 @@ export function resetPost() {
95
91
  * @return {Object} Action object.
96
92
  * @deprecated since Gutenberg 9.7.0.
97
93
  */
98
-
99
94
  export function updatePost() {
100
95
  deprecated("wp.data.dispatch( 'core/editor' ).updatePost", {
101
96
  since: '5.7',
@@ -105,6 +100,7 @@ export function updatePost() {
105
100
  type: 'DO_NOTHING'
106
101
  };
107
102
  }
103
+
108
104
  /**
109
105
  * Returns an action object used to setup the editor state when first opening
110
106
  * an editor.
@@ -113,13 +109,13 @@ export function updatePost() {
113
109
  *
114
110
  * @return {Object} Action object.
115
111
  */
116
-
117
112
  export function setupEditorState(post) {
118
113
  return {
119
114
  type: 'SETUP_EDITOR_STATE',
120
115
  post
121
116
  };
122
117
  }
118
+
123
119
  /**
124
120
  * Returns an action object used in signalling that attributes of the post have
125
121
  * been edited.
@@ -127,7 +123,6 @@ export function setupEditorState(post) {
127
123
  * @param {Object} edits Post attributes to edit.
128
124
  * @param {Object} options Options for the edit.
129
125
  */
130
-
131
126
  export const editPost = (edits, options) => ({
132
127
  select,
133
128
  registry
@@ -138,12 +133,12 @@ export const editPost = (edits, options) => ({
138
133
  } = select.getCurrentPost();
139
134
  registry.dispatch(coreStore).editEntityRecord('postType', type, id, edits, options);
140
135
  };
136
+
141
137
  /**
142
138
  * Action for saving the current post in the editor.
143
139
  *
144
140
  * @param {Object} options
145
141
  */
146
-
147
142
  export const savePost = (options = {}) => async ({
148
143
  select,
149
144
  dispatch,
@@ -152,9 +147,7 @@ export const savePost = (options = {}) => async ({
152
147
  if (!select.isEditedPostSaveable()) {
153
148
  return;
154
149
  }
155
-
156
150
  const content = select.getEditedPostContent();
157
-
158
151
  if (!options.isAutosave) {
159
152
  dispatch.editPost({
160
153
  content
@@ -162,7 +155,6 @@ export const savePost = (options = {}) => async ({
162
155
  undoIgnore: true
163
156
  });
164
157
  }
165
-
166
158
  const previousRecord = select.getCurrentPost();
167
159
  const edits = {
168
160
  id: previousRecord.id,
@@ -175,25 +167,21 @@ export const savePost = (options = {}) => async ({
175
167
  });
176
168
  await registry.dispatch(coreStore).saveEntityRecord('postType', previousRecord.type, edits, options);
177
169
  let error = registry.select(coreStore).getLastEntitySaveError('postType', previousRecord.type, previousRecord.id);
178
-
179
170
  if (!error) {
180
171
  await applyFilters('editor.__unstableSavePost', Promise.resolve(), options).catch(err => {
181
172
  error = err;
182
173
  });
183
174
  }
184
-
185
175
  dispatch({
186
176
  type: 'REQUEST_POST_UPDATE_FINISH',
187
177
  options
188
178
  });
189
-
190
179
  if (error) {
191
180
  const args = getNotificationArgumentsForSaveFail({
192
181
  post: previousRecord,
193
182
  edits,
194
183
  error
195
184
  });
196
-
197
185
  if (args.length) {
198
186
  registry.dispatch(noticesStore).createErrorNotice(...args);
199
187
  }
@@ -205,24 +193,22 @@ export const savePost = (options = {}) => async ({
205
193
  postType: await registry.resolveSelect(coreStore).getPostType(updatedRecord.type),
206
194
  options
207
195
  });
208
-
209
196
  if (args.length) {
210
197
  registry.dispatch(noticesStore).createSuccessNotice(...args);
211
- } // Make sure that any edits after saving create an undo level and are
198
+ }
199
+ // Make sure that any edits after saving create an undo level and are
212
200
  // considered for change detection.
213
-
214
-
215
201
  if (!options.isAutosave) {
216
202
  registry.dispatch(blockEditorStore).__unstableMarkLastChangeAsPersistent();
217
203
  }
218
204
  }
219
205
  };
206
+
220
207
  /**
221
208
  * Action for refreshing the current post.
222
209
  *
223
210
  * @deprecated Since WordPress 6.0.
224
211
  */
225
-
226
212
  export function refreshPost() {
227
213
  deprecated("wp.data.dispatch( 'core/editor' ).refreshPost", {
228
214
  since: '6.0',
@@ -233,10 +219,10 @@ export function refreshPost() {
233
219
  type: 'DO_NOTHING'
234
220
  };
235
221
  }
222
+
236
223
  /**
237
224
  * Action for trashing the current post in the editor.
238
225
  */
239
-
240
226
  export const trashPost = () => async ({
241
227
  select,
242
228
  dispatch,
@@ -252,7 +238,6 @@ export const trashPost = () => async ({
252
238
  dispatch({
253
239
  type: 'REQUEST_POST_DELETE_START'
254
240
  });
255
-
256
241
  try {
257
242
  const post = select.getCurrentPost();
258
243
  await apiFetch({
@@ -265,11 +250,11 @@ export const trashPost = () => async ({
265
250
  error
266
251
  }));
267
252
  }
268
-
269
253
  dispatch({
270
254
  type: 'REQUEST_POST_DELETE_FINISH'
271
255
  });
272
256
  };
257
+
273
258
  /**
274
259
  * Action that autosaves the current post. This
275
260
  * includes server-side autosaving (default) and client-side (a.k.a. local)
@@ -278,7 +263,6 @@ export const trashPost = () => async ({
278
263
  *
279
264
  * @param {Object?} options Extra flags to identify the autosave.
280
265
  */
281
-
282
266
  export const autosave = ({
283
267
  local = false,
284
268
  ...options
@@ -302,13 +286,12 @@ export const autosave = ({
302
286
  };
303
287
  export const __unstableSaveForPreview = ({
304
288
  forceIsAutosaveable
305
- }) => async ({
289
+ } = {}) => async ({
306
290
  select,
307
291
  dispatch
308
292
  }) => {
309
293
  if ((forceIsAutosaveable || select.isEditedPostAutosaveable()) && !select.isPostLocked()) {
310
294
  const isDraft = ['draft', 'auto-draft'].includes(select.getEditedPostAttribute('status'));
311
-
312
295
  if (isDraft) {
313
296
  await dispatch.savePost({
314
297
  isPreview: true
@@ -319,33 +302,32 @@ export const __unstableSaveForPreview = ({
319
302
  });
320
303
  }
321
304
  }
322
-
323
305
  return select.getEditedPostPreviewLink();
324
306
  };
307
+
325
308
  /**
326
309
  * Action that restores last popped state in undo history.
327
310
  */
328
-
329
311
  export const redo = () => ({
330
312
  registry
331
313
  }) => {
332
314
  registry.dispatch(coreStore).redo();
333
315
  };
316
+
334
317
  /**
335
318
  * Action that pops a record from undo history and undoes the edit.
336
319
  */
337
-
338
320
  export const undo = () => ({
339
321
  registry
340
322
  }) => {
341
323
  registry.dispatch(coreStore).undo();
342
324
  };
325
+
343
326
  /**
344
327
  * Action that creates an undo history record.
345
328
  *
346
329
  * @deprecated Since WordPress 6.0
347
330
  */
348
-
349
331
  export function createUndoLevel() {
350
332
  deprecated("wp.data.dispatch( 'core/editor' ).createUndoLevel", {
351
333
  since: '6.0',
@@ -356,37 +338,38 @@ export function createUndoLevel() {
356
338
  type: 'DO_NOTHING'
357
339
  };
358
340
  }
341
+
359
342
  /**
360
343
  * Action that locks the editor.
361
344
  *
362
345
  * @param {Object} lock Details about the post lock status, user, and nonce.
363
346
  * @return {Object} Action object.
364
347
  */
365
-
366
348
  export function updatePostLock(lock) {
367
349
  return {
368
350
  type: 'UPDATE_POST_LOCK',
369
351
  lock
370
352
  };
371
353
  }
354
+
372
355
  /**
373
356
  * Enable the publish sidebar.
374
357
  */
375
-
376
358
  export const enablePublishSidebar = () => ({
377
359
  registry
378
360
  }) => {
379
361
  registry.dispatch(preferencesStore).set('core/edit-post', 'isPublishSidebarEnabled', true);
380
362
  };
363
+
381
364
  /**
382
365
  * Disables the publish sidebar.
383
366
  */
384
-
385
367
  export const disablePublishSidebar = () => ({
386
368
  registry
387
369
  }) => {
388
370
  registry.dispatch(preferencesStore).set('core/edit-post', 'isPublishSidebarEnabled', false);
389
371
  };
372
+
390
373
  /**
391
374
  * Action that locks post saving.
392
375
  *
@@ -430,13 +413,13 @@ export const disablePublishSidebar = () => ({
430
413
  *
431
414
  * @return {Object} Action object
432
415
  */
433
-
434
416
  export function lockPostSaving(lockName) {
435
417
  return {
436
418
  type: 'LOCK_POST_SAVING',
437
419
  lockName
438
420
  };
439
421
  }
422
+
440
423
  /**
441
424
  * Action that unlocks post saving.
442
425
  *
@@ -450,13 +433,13 @@ export function lockPostSaving(lockName) {
450
433
  *
451
434
  * @return {Object} Action object
452
435
  */
453
-
454
436
  export function unlockPostSaving(lockName) {
455
437
  return {
456
438
  type: 'UNLOCK_POST_SAVING',
457
439
  lockName
458
440
  };
459
441
  }
442
+
460
443
  /**
461
444
  * Action that locks post autosaving.
462
445
  *
@@ -470,13 +453,13 @@ export function unlockPostSaving(lockName) {
470
453
  *
471
454
  * @return {Object} Action object
472
455
  */
473
-
474
456
  export function lockPostAutosaving(lockName) {
475
457
  return {
476
458
  type: 'LOCK_POST_AUTOSAVING',
477
459
  lockName
478
460
  };
479
461
  }
462
+
480
463
  /**
481
464
  * Action that unlocks post autosaving.
482
465
  *
@@ -490,20 +473,19 @@ export function lockPostAutosaving(lockName) {
490
473
  *
491
474
  * @return {Object} Action object
492
475
  */
493
-
494
476
  export function unlockPostAutosaving(lockName) {
495
477
  return {
496
478
  type: 'UNLOCK_POST_AUTOSAVING',
497
479
  lockName
498
480
  };
499
481
  }
482
+
500
483
  /**
501
484
  * Returns an action object used to signal that the blocks have been updated.
502
485
  *
503
486
  * @param {Array} blocks Block Array.
504
487
  * @param {?Object} options Optional options.
505
488
  */
506
-
507
489
  export const resetEditorBlocks = (blocks, options = {}) => ({
508
490
  select,
509
491
  dispatch,
@@ -517,30 +499,27 @@ export const resetEditorBlocks = (blocks, options = {}) => ({
517
499
  blocks,
518
500
  selection
519
501
  };
520
-
521
502
  if (__unstableShouldCreateUndoLevel !== false) {
522
503
  const {
523
504
  id,
524
505
  type
525
506
  } = select.getCurrentPost();
526
507
  const noChange = registry.select(coreStore).getEditedEntityRecord('postType', type, id).blocks === edits.blocks;
527
-
528
508
  if (noChange) {
529
509
  registry.dispatch(coreStore).__unstableCreateUndoLevel('postType', type, id);
530
-
531
510
  return;
532
- } // We create a new function here on every persistent edit
511
+ }
512
+
513
+ // We create a new function here on every persistent edit
533
514
  // to make sure the edit makes the post dirty and creates
534
515
  // a new undo level.
535
-
536
-
537
516
  edits.content = ({
538
517
  blocks: blocksForSerialization = []
539
518
  }) => __unstableSerializeAndClean(blocksForSerialization);
540
519
  }
541
-
542
520
  dispatch.editPost(edits);
543
521
  };
522
+
544
523
  /*
545
524
  * Returns an action object used in signalling that the post editor settings have been updated.
546
525
  *
@@ -548,13 +527,13 @@ export const resetEditorBlocks = (blocks, options = {}) => ({
548
527
  *
549
528
  * @return {Object} Action object
550
529
  */
551
-
552
530
  export function updateEditorSettings(settings) {
553
531
  return {
554
532
  type: 'UPDATE_EDITOR_SETTINGS',
555
533
  settings
556
534
  };
557
535
  }
536
+
558
537
  /**
559
538
  * Backward compatibility
560
539
  */
@@ -569,160 +548,159 @@ const getBlockEditorAction = name => (...args) => ({
569
548
  });
570
549
  registry.dispatch(blockEditorStore)[name](...args);
571
550
  };
551
+
572
552
  /**
573
553
  * @see resetBlocks in core/block-editor store.
574
554
  */
575
-
576
-
577
555
  export const resetBlocks = getBlockEditorAction('resetBlocks');
556
+
578
557
  /**
579
558
  * @see receiveBlocks in core/block-editor store.
580
559
  */
581
-
582
560
  export const receiveBlocks = getBlockEditorAction('receiveBlocks');
561
+
583
562
  /**
584
563
  * @see updateBlock in core/block-editor store.
585
564
  */
586
-
587
565
  export const updateBlock = getBlockEditorAction('updateBlock');
566
+
588
567
  /**
589
568
  * @see updateBlockAttributes in core/block-editor store.
590
569
  */
591
-
592
570
  export const updateBlockAttributes = getBlockEditorAction('updateBlockAttributes');
571
+
593
572
  /**
594
573
  * @see selectBlock in core/block-editor store.
595
574
  */
596
-
597
575
  export const selectBlock = getBlockEditorAction('selectBlock');
576
+
598
577
  /**
599
578
  * @see startMultiSelect in core/block-editor store.
600
579
  */
601
-
602
580
  export const startMultiSelect = getBlockEditorAction('startMultiSelect');
581
+
603
582
  /**
604
583
  * @see stopMultiSelect in core/block-editor store.
605
584
  */
606
-
607
585
  export const stopMultiSelect = getBlockEditorAction('stopMultiSelect');
586
+
608
587
  /**
609
588
  * @see multiSelect in core/block-editor store.
610
589
  */
611
-
612
590
  export const multiSelect = getBlockEditorAction('multiSelect');
591
+
613
592
  /**
614
593
  * @see clearSelectedBlock in core/block-editor store.
615
594
  */
616
-
617
595
  export const clearSelectedBlock = getBlockEditorAction('clearSelectedBlock');
596
+
618
597
  /**
619
598
  * @see toggleSelection in core/block-editor store.
620
599
  */
621
-
622
600
  export const toggleSelection = getBlockEditorAction('toggleSelection');
601
+
623
602
  /**
624
603
  * @see replaceBlocks in core/block-editor store.
625
604
  */
626
-
627
605
  export const replaceBlocks = getBlockEditorAction('replaceBlocks');
606
+
628
607
  /**
629
608
  * @see replaceBlock in core/block-editor store.
630
609
  */
631
-
632
610
  export const replaceBlock = getBlockEditorAction('replaceBlock');
611
+
633
612
  /**
634
613
  * @see moveBlocksDown in core/block-editor store.
635
614
  */
636
-
637
615
  export const moveBlocksDown = getBlockEditorAction('moveBlocksDown');
616
+
638
617
  /**
639
618
  * @see moveBlocksUp in core/block-editor store.
640
619
  */
641
-
642
620
  export const moveBlocksUp = getBlockEditorAction('moveBlocksUp');
621
+
643
622
  /**
644
623
  * @see moveBlockToPosition in core/block-editor store.
645
624
  */
646
-
647
625
  export const moveBlockToPosition = getBlockEditorAction('moveBlockToPosition');
626
+
648
627
  /**
649
628
  * @see insertBlock in core/block-editor store.
650
629
  */
651
-
652
630
  export const insertBlock = getBlockEditorAction('insertBlock');
631
+
653
632
  /**
654
633
  * @see insertBlocks in core/block-editor store.
655
634
  */
656
-
657
635
  export const insertBlocks = getBlockEditorAction('insertBlocks');
636
+
658
637
  /**
659
638
  * @see showInsertionPoint in core/block-editor store.
660
639
  */
661
-
662
640
  export const showInsertionPoint = getBlockEditorAction('showInsertionPoint');
641
+
663
642
  /**
664
643
  * @see hideInsertionPoint in core/block-editor store.
665
644
  */
666
-
667
645
  export const hideInsertionPoint = getBlockEditorAction('hideInsertionPoint');
646
+
668
647
  /**
669
648
  * @see setTemplateValidity in core/block-editor store.
670
649
  */
671
-
672
650
  export const setTemplateValidity = getBlockEditorAction('setTemplateValidity');
651
+
673
652
  /**
674
653
  * @see synchronizeTemplate in core/block-editor store.
675
654
  */
676
-
677
655
  export const synchronizeTemplate = getBlockEditorAction('synchronizeTemplate');
656
+
678
657
  /**
679
658
  * @see mergeBlocks in core/block-editor store.
680
659
  */
681
-
682
660
  export const mergeBlocks = getBlockEditorAction('mergeBlocks');
661
+
683
662
  /**
684
663
  * @see removeBlocks in core/block-editor store.
685
664
  */
686
-
687
665
  export const removeBlocks = getBlockEditorAction('removeBlocks');
666
+
688
667
  /**
689
668
  * @see removeBlock in core/block-editor store.
690
669
  */
691
-
692
670
  export const removeBlock = getBlockEditorAction('removeBlock');
671
+
693
672
  /**
694
673
  * @see toggleBlockMode in core/block-editor store.
695
674
  */
696
-
697
675
  export const toggleBlockMode = getBlockEditorAction('toggleBlockMode');
676
+
698
677
  /**
699
678
  * @see startTyping in core/block-editor store.
700
679
  */
701
-
702
680
  export const startTyping = getBlockEditorAction('startTyping');
681
+
703
682
  /**
704
683
  * @see stopTyping in core/block-editor store.
705
684
  */
706
-
707
685
  export const stopTyping = getBlockEditorAction('stopTyping');
686
+
708
687
  /**
709
688
  * @see enterFormattedText in core/block-editor store.
710
689
  */
711
-
712
690
  export const enterFormattedText = getBlockEditorAction('enterFormattedText');
691
+
713
692
  /**
714
693
  * @see exitFormattedText in core/block-editor store.
715
694
  */
716
-
717
695
  export const exitFormattedText = getBlockEditorAction('exitFormattedText');
696
+
718
697
  /**
719
698
  * @see insertDefaultBlock in core/block-editor store.
720
699
  */
721
-
722
700
  export const insertDefaultBlock = getBlockEditorAction('insertDefaultBlock');
701
+
723
702
  /**
724
703
  * @see updateBlockListSettings in core/block-editor store.
725
704
  */
726
-
727
705
  export const updateBlockListSettings = getBlockEditorAction('updateBlockListSettings');
728
706
  //# sourceMappingURL=actions.js.map