@wordpress/editor 12.0.1 → 12.0.5

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 (331) hide show
  1. package/build/components/autocompleters/user.js +1 -1
  2. package/build/components/autosave-monitor/index.js +7 -1
  3. package/build/components/autosave-monitor/index.js.map +1 -1
  4. package/build/components/deprecated.js +6 -4
  5. package/build/components/deprecated.js.map +1 -1
  6. package/build/components/deprecated.native.js +26 -26
  7. package/build/components/document-outline/check.js +5 -4
  8. package/build/components/document-outline/check.js.map +1 -1
  9. package/build/components/document-outline/index.js +13 -9
  10. package/build/components/document-outline/index.js.map +1 -1
  11. package/build/components/document-outline/item.js +25 -22
  12. package/build/components/document-outline/item.js.map +1 -1
  13. package/build/components/editor-help/help-detail-navigation-screen.native.js +5 -4
  14. package/build/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
  15. package/build/components/editor-help/help-get-support-button.native.js +5 -4
  16. package/build/components/editor-help/help-get-support-button.native.js.map +1 -1
  17. package/build/components/editor-help/help-topic-row.native.js +6 -5
  18. package/build/components/editor-help/help-topic-row.native.js.map +1 -1
  19. package/build/components/editor-help/index.native.js +23 -18
  20. package/build/components/editor-help/index.native.js.map +1 -1
  21. package/build/components/editor-help/view-sections.native.js +16 -13
  22. package/build/components/editor-help/view-sections.native.js.map +1 -1
  23. package/build/components/editor-notices/index.js +5 -4
  24. package/build/components/editor-notices/index.js.map +1 -1
  25. package/build/components/entities-saved-states/entity-record-item.js +7 -6
  26. package/build/components/entities-saved-states/entity-record-item.js.map +1 -1
  27. package/build/components/entities-saved-states/entity-type-list.js +30 -20
  28. package/build/components/entities-saved-states/entity-type-list.js.map +1 -1
  29. package/build/components/entities-saved-states/index.js +51 -26
  30. package/build/components/entities-saved-states/index.js.map +1 -1
  31. package/build/components/error-boundary/index.js +5 -4
  32. package/build/components/error-boundary/index.js.map +1 -1
  33. package/build/components/global-keyboard-shortcuts/save-shortcut.js +4 -3
  34. package/build/components/global-keyboard-shortcuts/save-shortcut.js.map +1 -1
  35. package/build/components/index.js +22 -22
  36. package/build/components/index.native.js +4 -4
  37. package/build/components/page-attributes/check.js +4 -3
  38. package/build/components/page-attributes/check.js.map +1 -1
  39. package/build/components/page-attributes/order.js +5 -4
  40. package/build/components/page-attributes/order.js.map +1 -1
  41. package/build/components/page-attributes/parent.js +6 -3
  42. package/build/components/page-attributes/parent.js.map +1 -1
  43. package/build/components/post-author/check.js +4 -3
  44. package/build/components/post-author/check.js.map +1 -1
  45. package/build/components/post-author/combobox.js +6 -3
  46. package/build/components/post-author/combobox.js.map +1 -1
  47. package/build/components/post-comments/index.js +6 -4
  48. package/build/components/post-comments/index.js.map +1 -1
  49. package/build/components/post-excerpt/index.js +5 -4
  50. package/build/components/post-excerpt/index.js.map +1 -1
  51. package/build/components/post-featured-image/index.js +51 -41
  52. package/build/components/post-featured-image/index.js.map +1 -1
  53. package/build/components/post-format/check.js +5 -4
  54. package/build/components/post-format/check.js.map +1 -1
  55. package/build/components/post-format/index.js +1 -1
  56. package/build/components/post-last-revision/check.js +7 -5
  57. package/build/components/post-last-revision/check.js.map +1 -1
  58. package/build/components/post-last-revision/index.js +5 -4
  59. package/build/components/post-last-revision/index.js.map +1 -1
  60. package/build/components/post-pending-status/check.js +7 -5
  61. package/build/components/post-pending-status/check.js.map +1 -1
  62. package/build/components/post-pending-status/index.js +6 -4
  63. package/build/components/post-pending-status/index.js.map +1 -1
  64. package/build/components/post-pingbacks/index.js +6 -4
  65. package/build/components/post-pingbacks/index.js.map +1 -1
  66. package/build/components/post-preview-button/index.js +11 -7
  67. package/build/components/post-preview-button/index.js.map +1 -1
  68. package/build/components/post-publish-button/index.js +12 -4
  69. package/build/components/post-publish-button/index.js.map +1 -1
  70. package/build/components/post-publish-button/label.js +15 -12
  71. package/build/components/post-publish-button/label.js.map +1 -1
  72. package/build/components/post-publish-panel/index.js +4 -3
  73. package/build/components/post-publish-panel/index.js.map +1 -1
  74. package/build/components/post-publish-panel/maybe-post-format-panel.js +11 -8
  75. package/build/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  76. package/build/components/post-publish-panel/maybe-tags-panel.js +7 -4
  77. package/build/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  78. package/build/components/post-publish-panel/postpublish.js +6 -5
  79. package/build/components/post-publish-panel/postpublish.js.map +1 -1
  80. package/build/components/post-publish-panel/prepublish.js +4 -3
  81. package/build/components/post-publish-panel/prepublish.js.map +1 -1
  82. package/build/components/post-saved-state/index.js +6 -5
  83. package/build/components/post-saved-state/index.js.map +1 -1
  84. package/build/components/post-schedule/check.js +6 -4
  85. package/build/components/post-schedule/check.js.map +1 -1
  86. package/build/components/post-schedule/index.js +15 -10
  87. package/build/components/post-schedule/index.js.map +1 -1
  88. package/build/components/post-schedule/label.js +5 -4
  89. package/build/components/post-schedule/label.js.map +1 -1
  90. package/build/components/post-slug/check.js +4 -3
  91. package/build/components/post-slug/check.js.map +1 -1
  92. package/build/components/post-slug/index.js +6 -5
  93. package/build/components/post-slug/index.js.map +1 -1
  94. package/build/components/post-sticky/check.js +7 -5
  95. package/build/components/post-sticky/check.js.map +1 -1
  96. package/build/components/post-sticky/index.js +5 -4
  97. package/build/components/post-sticky/index.js.map +1 -1
  98. package/build/components/post-switch-to-draft-button/index.js +7 -6
  99. package/build/components/post-switch-to-draft-button/index.js.map +1 -1
  100. package/build/components/post-taxonomies/check.js +6 -5
  101. package/build/components/post-taxonomies/check.js.map +1 -1
  102. package/build/components/post-taxonomies/flat-term-selector.js +155 -211
  103. package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
  104. package/build/components/post-taxonomies/hierarchical-term-selector.js +6 -5
  105. package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  106. package/build/components/post-taxonomies/index.js +6 -5
  107. package/build/components/post-taxonomies/index.js.map +1 -1
  108. package/build/components/post-taxonomies/most-used-terms.js +5 -4
  109. package/build/components/post-taxonomies/most-used-terms.js.map +1 -1
  110. package/build/components/post-template/index.js +2 -1
  111. package/build/components/post-template/index.js.map +1 -1
  112. package/build/components/post-title/index.js +4 -2
  113. package/build/components/post-title/index.js.map +1 -1
  114. package/build/components/post-title/index.native.js +6 -5
  115. package/build/components/post-title/index.native.js.map +1 -1
  116. package/build/components/post-trash/check.js +8 -6
  117. package/build/components/post-trash/check.js.map +1 -1
  118. package/build/components/post-trash/index.js +8 -6
  119. package/build/components/post-trash/index.js.map +1 -1
  120. package/build/components/post-type-support-check/index.js +6 -5
  121. package/build/components/post-type-support-check/index.js.map +1 -1
  122. package/build/components/post-visibility/check.js +5 -4
  123. package/build/components/post-visibility/check.js.map +1 -1
  124. package/build/components/post-visibility/index.js +28 -24
  125. package/build/components/post-visibility/index.js.map +1 -1
  126. package/build/components/post-visibility/label.js +5 -3
  127. package/build/components/post-visibility/label.js.map +1 -1
  128. package/build/components/provider/index.js +9 -8
  129. package/build/components/provider/index.js.map +1 -1
  130. package/build/components/provider/index.native.js +17 -11
  131. package/build/components/provider/index.native.js.map +1 -1
  132. package/build/components/provider/use-block-editor-settings.js +1 -1
  133. package/build/components/provider/use-block-editor-settings.js.map +1 -1
  134. package/build/components/table-of-contents/index.js +33 -26
  135. package/build/components/table-of-contents/index.js.map +1 -1
  136. package/build/components/table-of-contents/panel.js +5 -4
  137. package/build/components/table-of-contents/panel.js.map +1 -1
  138. package/build/components/template-validation-notice/index.js +6 -4
  139. package/build/components/template-validation-notice/index.js.map +1 -1
  140. package/build/components/theme-support-check/index.js +7 -6
  141. package/build/components/theme-support-check/index.js.map +1 -1
  142. package/build/hooks/custom-sources-backwards-compatibility.js +12 -8
  143. package/build/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  144. package/build/hooks/default-autocompleters.js +2 -1
  145. package/build/hooks/default-autocompleters.js.map +1 -1
  146. package/build/index.js +4 -4
  147. package/build/store/actions.js +51 -30
  148. package/build/store/actions.js.map +1 -1
  149. package/build/store/actions.native.js +3 -2
  150. package/build/store/actions.native.js.map +1 -1
  151. package/build/store/constants.js +1 -1
  152. package/build/store/controls.js +10 -9
  153. package/build/store/controls.js.map +1 -1
  154. package/build/store/defaults.js +1 -1
  155. package/build/store/index.js +5 -3
  156. package/build/store/index.js.map +1 -1
  157. package/build/store/reducer.js +52 -22
  158. package/build/store/reducer.js.map +1 -1
  159. package/build/store/reducer.native.js +14 -4
  160. package/build/store/reducer.native.js.map +1 -1
  161. package/build/store/selectors.js +56 -37
  162. package/build/store/selectors.js.map +1 -1
  163. package/build/store/selectors.native.js +1 -1
  164. package/build/store/utils/notice-builder.js +1 -1
  165. package/build/utils/index.js +6 -6
  166. package/build/utils/media-upload/index.js +15 -11
  167. package/build/utils/media-upload/index.js.map +1 -1
  168. package/build/utils/url.js +1 -1
  169. package/build-module/components/autosave-monitor/index.js +7 -1
  170. package/build-module/components/autosave-monitor/index.js.map +1 -1
  171. package/build-module/components/deprecated.js +4 -3
  172. package/build-module/components/deprecated.js.map +1 -1
  173. package/build-module/components/document-outline/check.js +5 -4
  174. package/build-module/components/document-outline/check.js.map +1 -1
  175. package/build-module/components/document-outline/index.js +13 -9
  176. package/build-module/components/document-outline/index.js.map +1 -1
  177. package/build-module/components/document-outline/item.js +25 -22
  178. package/build-module/components/document-outline/item.js.map +1 -1
  179. package/build-module/components/editor-help/help-detail-navigation-screen.native.js +5 -4
  180. package/build-module/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
  181. package/build-module/components/editor-help/help-get-support-button.native.js +5 -4
  182. package/build-module/components/editor-help/help-get-support-button.native.js.map +1 -1
  183. package/build-module/components/editor-help/help-topic-row.native.js +6 -5
  184. package/build-module/components/editor-help/help-topic-row.native.js.map +1 -1
  185. package/build-module/components/editor-help/index.native.js +23 -19
  186. package/build-module/components/editor-help/index.native.js.map +1 -1
  187. package/build-module/components/editor-help/view-sections.native.js +15 -12
  188. package/build-module/components/editor-help/view-sections.native.js.map +1 -1
  189. package/build-module/components/editor-notices/index.js +5 -4
  190. package/build-module/components/editor-notices/index.js.map +1 -1
  191. package/build-module/components/entities-saved-states/entity-record-item.js +7 -6
  192. package/build-module/components/entities-saved-states/entity-record-item.js.map +1 -1
  193. package/build-module/components/entities-saved-states/entity-type-list.js +31 -19
  194. package/build-module/components/entities-saved-states/entity-type-list.js.map +1 -1
  195. package/build-module/components/entities-saved-states/index.js +50 -25
  196. package/build-module/components/entities-saved-states/index.js.map +1 -1
  197. package/build-module/components/error-boundary/index.js +5 -4
  198. package/build-module/components/error-boundary/index.js.map +1 -1
  199. package/build-module/components/global-keyboard-shortcuts/save-shortcut.js +4 -3
  200. package/build-module/components/global-keyboard-shortcuts/save-shortcut.js.map +1 -1
  201. package/build-module/components/page-attributes/check.js +4 -3
  202. package/build-module/components/page-attributes/check.js.map +1 -1
  203. package/build-module/components/page-attributes/order.js +5 -4
  204. package/build-module/components/page-attributes/order.js.map +1 -1
  205. package/build-module/components/page-attributes/parent.js +5 -2
  206. package/build-module/components/page-attributes/parent.js.map +1 -1
  207. package/build-module/components/post-author/check.js +4 -3
  208. package/build-module/components/post-author/check.js.map +1 -1
  209. package/build-module/components/post-author/combobox.js +6 -3
  210. package/build-module/components/post-author/combobox.js.map +1 -1
  211. package/build-module/components/post-comments/index.js +6 -4
  212. package/build-module/components/post-comments/index.js.map +1 -1
  213. package/build-module/components/post-excerpt/index.js +5 -4
  214. package/build-module/components/post-excerpt/index.js.map +1 -1
  215. package/build-module/components/post-featured-image/index.js +51 -41
  216. package/build-module/components/post-featured-image/index.js.map +1 -1
  217. package/build-module/components/post-format/check.js +5 -4
  218. package/build-module/components/post-format/check.js.map +1 -1
  219. package/build-module/components/post-last-revision/check.js +7 -5
  220. package/build-module/components/post-last-revision/check.js.map +1 -1
  221. package/build-module/components/post-last-revision/index.js +5 -4
  222. package/build-module/components/post-last-revision/index.js.map +1 -1
  223. package/build-module/components/post-pending-status/check.js +7 -5
  224. package/build-module/components/post-pending-status/check.js.map +1 -1
  225. package/build-module/components/post-pending-status/index.js +6 -4
  226. package/build-module/components/post-pending-status/index.js.map +1 -1
  227. package/build-module/components/post-pingbacks/index.js +6 -4
  228. package/build-module/components/post-pingbacks/index.js.map +1 -1
  229. package/build-module/components/post-preview-button/index.js +11 -7
  230. package/build-module/components/post-preview-button/index.js.map +1 -1
  231. package/build-module/components/post-publish-button/index.js +12 -4
  232. package/build-module/components/post-publish-button/index.js.map +1 -1
  233. package/build-module/components/post-publish-button/label.js +15 -12
  234. package/build-module/components/post-publish-button/label.js.map +1 -1
  235. package/build-module/components/post-publish-panel/index.js +4 -3
  236. package/build-module/components/post-publish-panel/index.js.map +1 -1
  237. package/build-module/components/post-publish-panel/maybe-post-format-panel.js +11 -8
  238. package/build-module/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  239. package/build-module/components/post-publish-panel/maybe-tags-panel.js +7 -4
  240. package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  241. package/build-module/components/post-publish-panel/postpublish.js +6 -5
  242. package/build-module/components/post-publish-panel/postpublish.js.map +1 -1
  243. package/build-module/components/post-publish-panel/prepublish.js +4 -3
  244. package/build-module/components/post-publish-panel/prepublish.js.map +1 -1
  245. package/build-module/components/post-saved-state/index.js +6 -5
  246. package/build-module/components/post-saved-state/index.js.map +1 -1
  247. package/build-module/components/post-schedule/check.js +6 -4
  248. package/build-module/components/post-schedule/check.js.map +1 -1
  249. package/build-module/components/post-schedule/index.js +15 -10
  250. package/build-module/components/post-schedule/index.js.map +1 -1
  251. package/build-module/components/post-schedule/label.js +6 -4
  252. package/build-module/components/post-schedule/label.js.map +1 -1
  253. package/build-module/components/post-slug/check.js +4 -3
  254. package/build-module/components/post-slug/check.js.map +1 -1
  255. package/build-module/components/post-slug/index.js +6 -5
  256. package/build-module/components/post-slug/index.js.map +1 -1
  257. package/build-module/components/post-sticky/check.js +7 -5
  258. package/build-module/components/post-sticky/check.js.map +1 -1
  259. package/build-module/components/post-sticky/index.js +5 -4
  260. package/build-module/components/post-sticky/index.js.map +1 -1
  261. package/build-module/components/post-switch-to-draft-button/index.js +7 -6
  262. package/build-module/components/post-switch-to-draft-button/index.js.map +1 -1
  263. package/build-module/components/post-taxonomies/check.js +6 -5
  264. package/build-module/components/post-taxonomies/check.js.map +1 -1
  265. package/build-module/components/post-taxonomies/flat-term-selector.js +157 -214
  266. package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
  267. package/build-module/components/post-taxonomies/hierarchical-term-selector.js +4 -3
  268. package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  269. package/build-module/components/post-taxonomies/index.js +6 -5
  270. package/build-module/components/post-taxonomies/index.js.map +1 -1
  271. package/build-module/components/post-taxonomies/most-used-terms.js +5 -4
  272. package/build-module/components/post-taxonomies/most-used-terms.js.map +1 -1
  273. package/build-module/components/post-template/index.js +2 -1
  274. package/build-module/components/post-template/index.js.map +1 -1
  275. package/build-module/components/post-title/index.js +4 -2
  276. package/build-module/components/post-title/index.js.map +1 -1
  277. package/build-module/components/post-title/index.native.js +6 -5
  278. package/build-module/components/post-title/index.native.js.map +1 -1
  279. package/build-module/components/post-trash/check.js +8 -6
  280. package/build-module/components/post-trash/check.js.map +1 -1
  281. package/build-module/components/post-trash/index.js +8 -6
  282. package/build-module/components/post-trash/index.js.map +1 -1
  283. package/build-module/components/post-type-support-check/index.js +6 -5
  284. package/build-module/components/post-type-support-check/index.js.map +1 -1
  285. package/build-module/components/post-visibility/check.js +5 -4
  286. package/build-module/components/post-visibility/check.js.map +1 -1
  287. package/build-module/components/post-visibility/index.js +28 -24
  288. package/build-module/components/post-visibility/index.js.map +1 -1
  289. package/build-module/components/post-visibility/label.js +5 -3
  290. package/build-module/components/post-visibility/label.js.map +1 -1
  291. package/build-module/components/provider/index.js +9 -8
  292. package/build-module/components/provider/index.js.map +1 -1
  293. package/build-module/components/provider/index.native.js +13 -9
  294. package/build-module/components/provider/index.native.js.map +1 -1
  295. package/build-module/components/provider/use-block-editor-settings.js +1 -1
  296. package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
  297. package/build-module/components/table-of-contents/index.js +33 -26
  298. package/build-module/components/table-of-contents/index.js.map +1 -1
  299. package/build-module/components/table-of-contents/panel.js +5 -4
  300. package/build-module/components/table-of-contents/panel.js.map +1 -1
  301. package/build-module/components/template-validation-notice/index.js +6 -4
  302. package/build-module/components/template-validation-notice/index.js.map +1 -1
  303. package/build-module/components/theme-support-check/index.js +7 -6
  304. package/build-module/components/theme-support-check/index.js.map +1 -1
  305. package/build-module/hooks/custom-sources-backwards-compatibility.js +12 -8
  306. package/build-module/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  307. package/build-module/hooks/default-autocompleters.js +2 -1
  308. package/build-module/hooks/default-autocompleters.js.map +1 -1
  309. package/build-module/store/actions.js +27 -12
  310. package/build-module/store/actions.js.map +1 -1
  311. package/build-module/store/actions.native.js +2 -1
  312. package/build-module/store/actions.native.js.map +1 -1
  313. package/build-module/store/controls.js +8 -7
  314. package/build-module/store/controls.js.map +1 -1
  315. package/build-module/store/reducer.js +44 -14
  316. package/build-module/store/reducer.js.map +1 -1
  317. package/build-module/store/reducer.native.js +12 -3
  318. package/build-module/store/reducer.native.js.map +1 -1
  319. package/build-module/store/selectors.js +7 -4
  320. package/build-module/store/selectors.js.map +1 -1
  321. package/build-module/utils/media-upload/index.js +15 -11
  322. package/build-module/utils/media-upload/index.js.map +1 -1
  323. package/package.json +31 -31
  324. package/src/components/autosave-monitor/index.js +5 -0
  325. package/src/components/autosave-monitor/test/index.js +10 -4
  326. package/src/components/editor-help/index.native.js +116 -110
  327. package/src/components/entities-saved-states/entity-type-list.js +29 -10
  328. package/src/components/entities-saved-states/index.js +38 -8
  329. package/src/components/post-taxonomies/flat-term-selector.js +220 -254
  330. package/src/components/post-title/index.js +4 -2
  331. package/src/components/provider/use-block-editor-settings.js +0 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/editor",
3
- "version": "12.0.1",
3
+ "version": "12.0.5",
4
4
  "description": "Enhanced block editor for WordPress posts.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -30,35 +30,35 @@
30
30
  "{src,build,build-module}/{index.js,store/index.js,hooks/**}"
31
31
  ],
32
32
  "dependencies": {
33
- "@babel/runtime": "^7.13.10",
34
- "@wordpress/a11y": "^3.2.3",
35
- "@wordpress/api-fetch": "^5.2.4",
36
- "@wordpress/autop": "^3.2.2",
37
- "@wordpress/blob": "^3.2.1",
38
- "@wordpress/block-editor": "^7.0.4",
39
- "@wordpress/blocks": "^11.1.2",
40
- "@wordpress/components": "^19.0.0",
41
- "@wordpress/compose": "^5.0.4",
42
- "@wordpress/core-data": "^4.0.4",
43
- "@wordpress/data": "^6.1.2",
44
- "@wordpress/data-controls": "^2.2.5",
45
- "@wordpress/date": "^4.2.2",
46
- "@wordpress/deprecated": "^3.2.2",
47
- "@wordpress/element": "^4.0.3",
48
- "@wordpress/hooks": "^3.2.1",
49
- "@wordpress/html-entities": "^3.2.2",
50
- "@wordpress/i18n": "^4.2.3",
51
- "@wordpress/icons": "^6.0.1",
52
- "@wordpress/is-shallow-equal": "^4.2.0",
53
- "@wordpress/keyboard-shortcuts": "^3.0.4",
54
- "@wordpress/keycodes": "^3.2.3",
55
- "@wordpress/media-utils": "^3.0.3",
56
- "@wordpress/notices": "^3.2.5",
57
- "@wordpress/reusable-blocks": "^3.0.4",
58
- "@wordpress/rich-text": "^5.0.4",
59
- "@wordpress/server-side-render": "^3.0.4",
60
- "@wordpress/url": "^3.2.3",
61
- "@wordpress/wordcount": "^3.2.2",
33
+ "@babel/runtime": "^7.16.0",
34
+ "@wordpress/a11y": "^3.2.4",
35
+ "@wordpress/api-fetch": "^5.2.6",
36
+ "@wordpress/autop": "^3.2.3",
37
+ "@wordpress/blob": "^3.2.2",
38
+ "@wordpress/block-editor": "^8.0.2",
39
+ "@wordpress/blocks": "^11.1.4",
40
+ "@wordpress/components": "^19.0.2",
41
+ "@wordpress/compose": "^5.0.6",
42
+ "@wordpress/core-data": "^4.0.7",
43
+ "@wordpress/data": "^6.1.4",
44
+ "@wordpress/data-controls": "^2.2.7",
45
+ "@wordpress/date": "^4.2.3",
46
+ "@wordpress/deprecated": "^3.2.3",
47
+ "@wordpress/element": "^4.0.4",
48
+ "@wordpress/hooks": "^3.2.2",
49
+ "@wordpress/html-entities": "^3.2.3",
50
+ "@wordpress/i18n": "^4.2.4",
51
+ "@wordpress/icons": "^6.1.1",
52
+ "@wordpress/is-shallow-equal": "^4.2.1",
53
+ "@wordpress/keyboard-shortcuts": "^3.0.6",
54
+ "@wordpress/keycodes": "^3.2.4",
55
+ "@wordpress/media-utils": "^3.0.5",
56
+ "@wordpress/notices": "^3.2.7",
57
+ "@wordpress/reusable-blocks": "^3.0.8",
58
+ "@wordpress/rich-text": "^5.0.6",
59
+ "@wordpress/server-side-render": "^3.0.6",
60
+ "@wordpress/url": "^3.3.1",
61
+ "@wordpress/wordcount": "^3.2.3",
62
62
  "classnames": "^2.3.1",
63
63
  "lodash": "^4.17.21",
64
64
  "memize": "^1.1.0",
@@ -68,5 +68,5 @@
68
68
  "publishConfig": {
69
69
  "access": "public"
70
70
  },
71
- "gitHead": "157f4ae53ab98e574af01f72213ae5a9613159ff"
71
+ "gitHead": "9a1dd3474d937468e4cf9caf9886ad61ef0a8f50"
72
72
  }
@@ -42,6 +42,11 @@ export class AutosaveMonitor extends Component {
42
42
  return;
43
43
  }
44
44
 
45
+ if ( this.props.interval !== prevProps.interval ) {
46
+ clearTimeout( this.timerId );
47
+ this.setAutosaveTimer();
48
+ }
49
+
45
50
  if ( ! this.props.isDirty ) {
46
51
  this.needsAutosave = false;
47
52
  return;
@@ -36,6 +36,12 @@ describe( 'AutosaveMonitor', () => {
36
36
  } );
37
37
 
38
38
  describe( '#componentDidUpdate()', () => {
39
+ it( 'should clear and restart autosave timer when the interval changes', () => {
40
+ wrapper.setProps( { interval: 999 } );
41
+ expect( clearTimeout ).toHaveBeenCalled();
42
+ expect( setAutosaveTimerSpy ).toHaveBeenCalledTimes( 2 );
43
+ } );
44
+
39
45
  it( 'should set needsAutosave=true when editReference changes', () => {
40
46
  expect( wrapper.instance().needsAutosave ).toBe( false );
41
47
  wrapper.setProps( {
@@ -95,9 +101,9 @@ describe( 'AutosaveMonitor', () => {
95
101
  isAutosaveable: true,
96
102
  interval: 5,
97
103
  } );
98
- expect( setAutosaveTimerSpy ).toHaveBeenCalledTimes( 1 );
99
- wrapper.instance().autosaveTimerHandler();
100
104
  expect( setAutosaveTimerSpy ).toHaveBeenCalledTimes( 2 );
105
+ wrapper.instance().autosaveTimerHandler();
106
+ expect( setAutosaveTimerSpy ).toHaveBeenCalledTimes( 3 );
101
107
  expect( setTimeout ).lastCalledWith( expect.any( Function ), 5000 );
102
108
  } );
103
109
 
@@ -106,9 +112,9 @@ describe( 'AutosaveMonitor', () => {
106
112
  isAutosaveable: false,
107
113
  interval: 5,
108
114
  } );
109
- expect( setAutosaveTimerSpy ).toHaveBeenCalledTimes( 1 );
110
- wrapper.instance().autosaveTimerHandler();
111
115
  expect( setAutosaveTimerSpy ).toHaveBeenCalledTimes( 2 );
116
+ wrapper.instance().autosaveTimerHandler();
117
+ expect( setAutosaveTimerSpy ).toHaveBeenCalledTimes( 3 );
112
118
  expect( setTimeout ).lastCalledWith( expect.any( Function ), 1000 );
113
119
  } );
114
120
 
@@ -2,7 +2,7 @@
2
2
  * External dependencies
3
3
  */
4
4
  import { kebabCase } from 'lodash';
5
- import { Text, ScrollView, StyleSheet, View } from 'react-native';
5
+ import { Text, SafeAreaView, ScrollView, StyleSheet, View } from 'react-native';
6
6
  import { TransitionPresets } from '@react-navigation/stack';
7
7
 
8
8
  /**
@@ -86,119 +86,125 @@ function EditorHelpTopics( { close, isVisible, onClose } ) {
86
86
  contentStyle={ styles.contentContainer }
87
87
  testID="editor-help-modal"
88
88
  >
89
- <BottomSheet.NavigationContainer
90
- animate
91
- main
92
- style={ styles.navigationContainer }
93
- >
94
- <BottomSheet.NavigationScreen
95
- isScrollable
96
- fullScreen
97
- name="help-topics"
89
+ <SafeAreaView>
90
+ <BottomSheet.NavigationContainer
91
+ animate
92
+ main
93
+ style={ styles.navigationContainer }
98
94
  >
99
- <View style={ styles.container }>
100
- <BottomSheet.NavBar>
101
- <BottomSheet.NavBar.DismissButton
102
- onPress={ close }
103
- iosText={ __( 'Close' ) }
104
- />
105
- <BottomSheet.NavBar.Heading>
106
- { title }
107
- </BottomSheet.NavBar.Heading>
108
- </BottomSheet.NavBar>
109
- <BottomSheetConsumer>
110
- { ( { listProps } ) => {
111
- const contentContainerStyle = StyleSheet.flatten(
112
- listProps.contentContainerStyle
113
- );
114
- return (
115
- <ScrollView
116
- { ...listProps }
117
- contentContainerStyle={ {
118
- ...contentContainerStyle,
119
- paddingBottom: Math.max(
120
- listProps.safeAreaBottomInset,
121
- contentContainerStyle.paddingBottom
122
- ),
123
- /**
124
- * Remove margin set via `hideHeader`. Combining a header
125
- * and navigation in this bottom sheet is at odds with the
126
- * current `BottomSheet` implementation.
127
- */
128
- marginTop: 0,
129
- } }
130
- >
131
- <PanelBody>
132
- <Text style={ sectionTitle }>
133
- { __( 'The basics' ) }
134
- </Text>
135
- { /* Print out help topics */ }
136
- { HELP_TOPICS.map(
137
- ( { label, icon } ) => {
138
- const labelSlug = kebabCase(
139
- label
140
- );
141
- return (
142
- <HelpTopicRow
143
- key={ labelSlug }
144
- label={ label }
145
- icon={ icon }
146
- screenName={
147
- labelSlug
148
- }
149
- />
150
- );
151
- }
152
- ) }
153
- {
95
+ <BottomSheet.NavigationScreen
96
+ isScrollable
97
+ fullScreen
98
+ name="help-topics"
99
+ >
100
+ <View style={ styles.container }>
101
+ <BottomSheet.NavBar>
102
+ <BottomSheet.NavBar.DismissButton
103
+ onPress={ close }
104
+ iosText={ __( 'Close' ) }
105
+ />
106
+ <BottomSheet.NavBar.Heading>
107
+ { title }
108
+ </BottomSheet.NavBar.Heading>
109
+ </BottomSheet.NavBar>
110
+ <BottomSheetConsumer>
111
+ { ( { listProps } ) => {
112
+ const contentContainerStyle = StyleSheet.flatten(
113
+ listProps.contentContainerStyle
114
+ );
115
+ return (
116
+ <ScrollView
117
+ { ...listProps }
118
+ contentContainerStyle={ {
119
+ ...contentContainerStyle,
120
+ paddingBottom: Math.max(
121
+ listProps.safeAreaBottomInset,
122
+ contentContainerStyle.paddingBottom
123
+ ),
124
+ /**
125
+ * Remove margin set via `hideHeader`. Combining a header
126
+ * and navigation in this bottom sheet is at odds with the
127
+ * current `BottomSheet` implementation.
128
+ */
129
+ marginTop: 0,
130
+ } }
131
+ >
132
+ <PanelBody>
154
133
  <Text style={ sectionTitle }>
155
- { __( 'Get support' ) }
134
+ { __( 'The basics' ) }
156
135
  </Text>
157
- }
158
- {
159
- <HelpGetSupportButton
160
- title={ __(
161
- 'Contact support'
162
- ) }
163
- onPress={
164
- requestContactCustomerSupport
136
+ { /* Print out help topics */ }
137
+ { HELP_TOPICS.map(
138
+ ( { label, icon } ) => {
139
+ const labelSlug = kebabCase(
140
+ label
141
+ );
142
+ return (
143
+ <HelpTopicRow
144
+ key={
145
+ labelSlug
146
+ }
147
+ label={ label }
148
+ icon={ icon }
149
+ screenName={
150
+ labelSlug
151
+ }
152
+ />
153
+ );
165
154
  }
166
- />
167
- }
168
- {
169
- <HelpGetSupportButton
170
- title={ __(
171
- 'More support options'
172
- ) }
173
- onPress={
174
- requestGotoCustomerSupportOptions
175
- }
176
- />
177
- }
178
- </PanelBody>
179
- </ScrollView>
180
- );
181
- } }
182
- </BottomSheetConsumer>
183
- </View>
184
- </BottomSheet.NavigationScreen>
185
- { /* Print out help detail screens */ }
186
- { HELP_TOPICS.map( ( { view, label } ) => {
187
- const labelSlug = kebabCase( label );
188
- return (
189
- <HelpDetailNavigationScreen
190
- key={ labelSlug }
191
- name={ labelSlug }
192
- content={ view }
193
- label={ label }
194
- options={ {
195
- gestureEnabled: true,
196
- ...TransitionPresets.DefaultTransition,
197
- } }
198
- />
199
- );
200
- } ) }
201
- </BottomSheet.NavigationContainer>
155
+ ) }
156
+ {
157
+ <Text
158
+ style={ sectionTitle }
159
+ >
160
+ { __( 'Get support' ) }
161
+ </Text>
162
+ }
163
+ {
164
+ <HelpGetSupportButton
165
+ title={ __(
166
+ 'Contact support'
167
+ ) }
168
+ onPress={
169
+ requestContactCustomerSupport
170
+ }
171
+ />
172
+ }
173
+ {
174
+ <HelpGetSupportButton
175
+ title={ __(
176
+ 'More support options'
177
+ ) }
178
+ onPress={
179
+ requestGotoCustomerSupportOptions
180
+ }
181
+ />
182
+ }
183
+ </PanelBody>
184
+ </ScrollView>
185
+ );
186
+ } }
187
+ </BottomSheetConsumer>
188
+ </View>
189
+ </BottomSheet.NavigationScreen>
190
+ { /* Print out help detail screens */ }
191
+ { HELP_TOPICS.map( ( { view, label } ) => {
192
+ const labelSlug = kebabCase( label );
193
+ return (
194
+ <HelpDetailNavigationScreen
195
+ key={ labelSlug }
196
+ name={ labelSlug }
197
+ content={ view }
198
+ label={ label }
199
+ options={ {
200
+ gestureEnabled: true,
201
+ ...TransitionPresets.DefaultTransition,
202
+ } }
203
+ />
204
+ );
205
+ } ) }
206
+ </BottomSheet.NavigationContainer>
207
+ </SafeAreaView>
202
208
  </BottomSheet>
203
209
  );
204
210
  }
@@ -6,9 +6,9 @@ import { some } from 'lodash';
6
6
  /**
7
7
  * WordPress dependencies
8
8
  */
9
+ import { __, _n } from '@wordpress/i18n';
9
10
  import { useSelect } from '@wordpress/data';
10
- import { PanelBody } from '@wordpress/components';
11
- import { page, layout } from '@wordpress/icons';
11
+ import { PanelBody, PanelRow } from '@wordpress/components';
12
12
  import { store as coreStore } from '@wordpress/core-data';
13
13
 
14
14
  /**
@@ -16,10 +16,25 @@ import { store as coreStore } from '@wordpress/core-data';
16
16
  */
17
17
  import EntityRecordItem from './entity-record-item';
18
18
 
19
- const ENTITY_NAME_ICONS = {
20
- site: layout,
21
- page,
22
- };
19
+ function getEntityDescription( entity, length ) {
20
+ switch ( entity ) {
21
+ case 'site':
22
+ return _n(
23
+ 'This change will affect your whole site.',
24
+ 'These changes will affect your whole site.',
25
+ length
26
+ );
27
+ case 'wp_template':
28
+ return _n(
29
+ 'This change will affect pages and posts that use this template.',
30
+ 'These changes will affect pages and posts that use these templates.',
31
+ length
32
+ );
33
+ case 'page':
34
+ case 'post':
35
+ return __( 'The following content has been modified.' );
36
+ }
37
+ }
23
38
 
24
39
  export default function EntityTypeList( {
25
40
  list,
@@ -33,13 +48,17 @@ export default function EntityTypeList( {
33
48
  select( coreStore ).getEntity( firstRecord.kind, firstRecord.name ),
34
49
  [ firstRecord.kind, firstRecord.name ]
35
50
  );
36
-
37
- // Set icon based on type of entity.
38
51
  const { name } = firstRecord;
39
- const icon = ENTITY_NAME_ICONS[ name ];
52
+ const entityLabel =
53
+ name === 'wp_template_part'
54
+ ? _n( 'Template Part', 'Template Parts', list.length )
55
+ : entity.label;
56
+ // Set description based on type of entity.
57
+ const description = getEntityDescription( name, list.length );
40
58
 
41
59
  return (
42
- <PanelBody title={ entity.label } initialOpen={ true } icon={ icon }>
60
+ <PanelBody title={ entityLabel } initialOpen={ true }>
61
+ { description && <PanelRow>{ description }</PanelRow> }
43
62
  { list.map( ( record ) => {
44
63
  return (
45
64
  <EntityRecordItem
@@ -19,7 +19,7 @@ import { close as closeIcon } from '@wordpress/icons';
19
19
  */
20
20
  import EntityTypeList from './entity-type-list';
21
21
 
22
- const TRANSLATED_SITE_PROTPERTIES = {
22
+ const TRANSLATED_SITE_PROPERTIES = {
23
23
  title: __( 'Title' ),
24
24
  description: __( 'Tagline' ),
25
25
  site_logo: __( 'Logo' ),
@@ -27,6 +27,13 @@ const TRANSLATED_SITE_PROTPERTIES = {
27
27
  page_on_front: __( 'Page on front' ),
28
28
  };
29
29
 
30
+ const PUBLISH_ON_SAVE_ENTITIES = [
31
+ {
32
+ kind: 'postType',
33
+ name: 'wp_navigation',
34
+ },
35
+ ];
36
+
30
37
  export default function EntitiesSavedStates( { close } ) {
31
38
  const saveButtonRef = useRef();
32
39
  const { dirtyEntityRecords } = useSelect( ( select ) => {
@@ -49,7 +56,7 @@ export default function EntitiesSavedStates( { close } ) {
49
56
  siteEditsAsEntities.push( {
50
57
  kind: 'root',
51
58
  name: 'site',
52
- title: TRANSLATED_SITE_PROTPERTIES[ property ] || property,
59
+ title: TRANSLATED_SITE_PROPERTIES[ property ] || property,
53
60
  property,
54
61
  } );
55
62
  }
@@ -63,14 +70,27 @@ export default function EntitiesSavedStates( { close } ) {
63
70
  };
64
71
  }, [] );
65
72
  const {
73
+ editEntityRecord,
66
74
  saveEditedEntityRecord,
67
75
  __experimentalSaveSpecifiedEntityEdits: saveSpecifiedEntityEdits,
68
76
  } = useDispatch( coreStore );
69
77
 
70
78
  // To group entities by type.
71
- const partitionedSavables = Object.values(
72
- groupBy( dirtyEntityRecords, 'name' )
73
- );
79
+ const partitionedSavables = groupBy( dirtyEntityRecords, 'name' );
80
+
81
+ // Sort entity groups.
82
+ const {
83
+ site: siteSavables,
84
+ wp_template: templateSavables,
85
+ wp_template_part: templatePartSavables,
86
+ ...contentSavables
87
+ } = partitionedSavables;
88
+ const sortedPartitionedSavables = [
89
+ siteSavables,
90
+ templateSavables,
91
+ templatePartSavables,
92
+ ...Object.values( contentSavables ),
93
+ ].filter( Array.isArray );
74
94
 
75
95
  // Unchecked entities to be ignored by save function.
76
96
  const [ unselectedEntities, _setUnselectedEntities ] = useState( [] );
@@ -118,6 +138,16 @@ export default function EntitiesSavedStates( { close } ) {
118
138
  if ( 'root' === kind && 'site' === name ) {
119
139
  siteItemsToSave.push( property );
120
140
  } else {
141
+ if (
142
+ PUBLISH_ON_SAVE_ENTITIES.some(
143
+ ( typeToPublish ) =>
144
+ typeToPublish.kind === kind &&
145
+ typeToPublish.name === name
146
+ )
147
+ ) {
148
+ editEntityRecord( kind, name, key, { status: 'publish' } );
149
+ }
150
+
121
151
  saveEditedEntityRecord( kind, name, key );
122
152
  }
123
153
  } );
@@ -160,15 +190,15 @@ export default function EntitiesSavedStates( { close } ) {
160
190
  </div>
161
191
 
162
192
  <div className="entities-saved-states__text-prompt">
163
- <strong>{ __( 'Select the changes you want to save' ) }</strong>
193
+ <strong>{ __( 'Are you ready to save?' ) }</strong>
164
194
  <p>
165
195
  { __(
166
- 'Some changes may affect other areas of your site.'
196
+ 'The following changes have been made to your site, templates, and content.'
167
197
  ) }
168
198
  </p>
169
199
  </div>
170
200
 
171
- { partitionedSavables.map( ( list ) => {
201
+ { sortedPartitionedSavables.map( ( list ) => {
172
202
  return (
173
203
  <EntityTypeList
174
204
  key={ list[ 0 ].name }