@wordpress/editor 13.11.0 → 13.12.1

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 (416) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/components/autosave-monitor/index.js +1 -2
  3. package/build/components/autosave-monitor/index.js.map +1 -1
  4. package/build/components/deprecated.js +7 -9
  5. package/build/components/deprecated.js.map +1 -1
  6. package/build/components/document-outline/check.js +4 -5
  7. package/build/components/document-outline/check.js.map +1 -1
  8. package/build/components/document-outline/index.js +12 -16
  9. package/build/components/document-outline/index.js.map +1 -1
  10. package/build/components/document-outline/item.js +22 -25
  11. package/build/components/document-outline/item.js.map +1 -1
  12. package/build/components/editor-help/help-detail-navigation-screen.native.js +6 -9
  13. package/build/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
  14. package/build/components/editor-help/help-get-support-button.native.js +4 -5
  15. package/build/components/editor-help/help-get-support-button.native.js.map +1 -1
  16. package/build/components/editor-help/help-section-title.native.js +3 -4
  17. package/build/components/editor-help/help-section-title.native.js.map +1 -1
  18. package/build/components/editor-help/help-topic-row.native.js +6 -7
  19. package/build/components/editor-help/help-topic-row.native.js.map +1 -1
  20. package/build/components/editor-help/index.native.js +20 -27
  21. package/build/components/editor-help/index.native.js.map +1 -1
  22. package/build/components/editor-help/view-sections.native.js +16 -20
  23. package/build/components/editor-help/view-sections.native.js.map +1 -1
  24. package/build/components/editor-history/redo.js +2 -6
  25. package/build/components/editor-history/redo.js.map +1 -1
  26. package/build/components/editor-history/undo.js +2 -6
  27. package/build/components/editor-history/undo.js.map +1 -1
  28. package/build/components/editor-notices/index.js +12 -19
  29. package/build/components/editor-notices/index.js.map +1 -1
  30. package/build/components/editor-snackbars/index.js +3 -6
  31. package/build/components/editor-snackbars/index.js.map +1 -1
  32. package/build/components/entities-saved-states/entity-record-item.js +7 -10
  33. package/build/components/entities-saved-states/entity-record-item.js.map +1 -1
  34. package/build/components/entities-saved-states/entity-type-list.js +6 -7
  35. package/build/components/entities-saved-states/entity-type-list.js.map +1 -1
  36. package/build/components/entities-saved-states/hooks/use-is-dirty.js +86 -0
  37. package/build/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -0
  38. package/build/components/entities-saved-states/index.js +43 -116
  39. package/build/components/entities-saved-states/index.js.map +1 -1
  40. package/build/components/error-boundary/index.js +4 -5
  41. package/build/components/error-boundary/index.js.map +1 -1
  42. package/build/components/global-keyboard-shortcuts/save-shortcut.js +3 -4
  43. package/build/components/global-keyboard-shortcuts/save-shortcut.js.map +1 -1
  44. package/build/components/index.js +18 -0
  45. package/build/components/index.js.map +1 -1
  46. package/build/components/media-categories/index.js +25 -42
  47. package/build/components/media-categories/index.js.map +1 -1
  48. package/build/components/page-attributes/check.js +4 -7
  49. package/build/components/page-attributes/check.js.map +1 -1
  50. package/build/components/page-attributes/order.js +7 -9
  51. package/build/components/page-attributes/order.js.map +1 -1
  52. package/build/components/page-attributes/parent.js +5 -12
  53. package/build/components/page-attributes/parent.js.map +1 -1
  54. package/build/components/post-author/check.js +6 -7
  55. package/build/components/post-author/check.js.map +1 -1
  56. package/build/components/post-author/combobox.js +3 -6
  57. package/build/components/post-author/combobox.js.map +1 -1
  58. package/build/components/post-author/index.js +1 -1
  59. package/build/components/post-author/index.js.map +1 -1
  60. package/build/components/post-comments/index.js +4 -6
  61. package/build/components/post-comments/index.js.map +1 -1
  62. package/build/components/post-excerpt/check.js +2 -4
  63. package/build/components/post-excerpt/check.js.map +1 -1
  64. package/build/components/post-excerpt/index.js +4 -5
  65. package/build/components/post-excerpt/index.js.map +1 -1
  66. package/build/components/post-featured-image/check.js +2 -4
  67. package/build/components/post-featured-image/check.js.map +1 -1
  68. package/build/components/post-featured-image/index.js +56 -69
  69. package/build/components/post-featured-image/index.js.map +1 -1
  70. package/build/components/post-format/check.js +6 -9
  71. package/build/components/post-format/check.js.map +1 -1
  72. package/build/components/post-format/index.js +1 -1
  73. package/build/components/post-format/index.js.map +1 -1
  74. package/build/components/post-last-revision/check.js +5 -7
  75. package/build/components/post-last-revision/check.js.map +1 -1
  76. package/build/components/post-last-revision/index.js +4 -5
  77. package/build/components/post-last-revision/index.js.map +1 -1
  78. package/build/components/post-locked-modal/index.js +1 -1
  79. package/build/components/post-locked-modal/index.js.map +1 -1
  80. package/build/components/post-pending-status/check.js +7 -9
  81. package/build/components/post-pending-status/check.js.map +1 -1
  82. package/build/components/post-pending-status/index.js +4 -6
  83. package/build/components/post-pending-status/index.js.map +1 -1
  84. package/build/components/post-pingbacks/index.js +4 -6
  85. package/build/components/post-pingbacks/index.js.map +1 -1
  86. package/build/components/post-preview-button/index.js +8 -12
  87. package/build/components/post-preview-button/index.js.map +1 -1
  88. package/build/components/post-publish-button/index.js +10 -19
  89. package/build/components/post-publish-button/index.js.map +1 -1
  90. package/build/components/post-publish-button/label.js +14 -17
  91. package/build/components/post-publish-button/label.js.map +1 -1
  92. package/build/components/post-publish-panel/index.js +10 -12
  93. package/build/components/post-publish-panel/index.js.map +1 -1
  94. package/build/components/post-publish-panel/maybe-category-panel.js +2 -4
  95. package/build/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  96. package/build/components/post-publish-panel/maybe-post-format-panel.js +9 -12
  97. package/build/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  98. package/build/components/post-publish-panel/maybe-tags-panel.js +4 -7
  99. package/build/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  100. package/build/components/post-publish-panel/maybe-upload-media.js +150 -0
  101. package/build/components/post-publish-panel/maybe-upload-media.js.map +1 -0
  102. package/build/components/post-publish-panel/postpublish.js +8 -11
  103. package/build/components/post-publish-panel/postpublish.js.map +1 -1
  104. package/build/components/post-publish-panel/prepublish.js +8 -7
  105. package/build/components/post-publish-panel/prepublish.js.map +1 -1
  106. package/build/components/post-saved-state/index.js +13 -8
  107. package/build/components/post-saved-state/index.js.map +1 -1
  108. package/build/components/post-schedule/check.js +6 -8
  109. package/build/components/post-schedule/check.js.map +1 -1
  110. package/build/components/post-schedule/index.js +8 -12
  111. package/build/components/post-schedule/index.js.map +1 -1
  112. package/build/components/post-schedule/label.js +7 -10
  113. package/build/components/post-schedule/label.js.map +1 -1
  114. package/build/components/post-slug/check.js +3 -4
  115. package/build/components/post-slug/check.js.map +1 -1
  116. package/build/components/post-slug/index.js +5 -6
  117. package/build/components/post-slug/index.js.map +1 -1
  118. package/build/components/post-sticky/check.js +7 -9
  119. package/build/components/post-sticky/check.js.map +1 -1
  120. package/build/components/post-sticky/index.js +4 -5
  121. package/build/components/post-sticky/index.js.map +1 -1
  122. package/build/components/post-switch-to-draft-button/index.js +6 -7
  123. package/build/components/post-switch-to-draft-button/index.js.map +1 -1
  124. package/build/components/post-sync-status/index.js +67 -0
  125. package/build/components/post-sync-status/index.js.map +1 -0
  126. package/build/components/post-taxonomies/check.js +6 -7
  127. package/build/components/post-taxonomies/check.js.map +1 -1
  128. package/build/components/post-taxonomies/flat-term-selector.js +36 -46
  129. package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
  130. package/build/components/post-taxonomies/hierarchical-term-selector.js +13 -14
  131. package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  132. package/build/components/post-taxonomies/index.js +6 -11
  133. package/build/components/post-taxonomies/index.js.map +1 -1
  134. package/build/components/post-taxonomies/most-used-terms.js +5 -6
  135. package/build/components/post-taxonomies/most-used-terms.js.map +1 -1
  136. package/build/components/post-template/index.js +6 -9
  137. package/build/components/post-template/index.js.map +1 -1
  138. package/build/components/post-title/index.js +8 -5
  139. package/build/components/post-title/index.js.map +1 -1
  140. package/build/components/post-title/index.native.js +8 -11
  141. package/build/components/post-title/index.native.js.map +1 -1
  142. package/build/components/post-trash/check.js +7 -9
  143. package/build/components/post-trash/check.js.map +1 -1
  144. package/build/components/post-type-support-check/index.js +5 -6
  145. package/build/components/post-type-support-check/index.js.map +1 -1
  146. package/build/components/post-url/check.js +4 -5
  147. package/build/components/post-url/check.js.map +1 -1
  148. package/build/components/post-url/index.js +8 -9
  149. package/build/components/post-url/index.js.map +1 -1
  150. package/build/components/post-visibility/check.js +6 -7
  151. package/build/components/post-visibility/check.js.map +1 -1
  152. package/build/components/post-visibility/index.js +14 -19
  153. package/build/components/post-visibility/index.js.map +1 -1
  154. package/build/components/post-visibility/label.js +1 -3
  155. package/build/components/post-visibility/label.js.map +1 -1
  156. package/build/components/provider/index.js +12 -15
  157. package/build/components/provider/index.js.map +1 -1
  158. package/build/components/provider/index.native.js +19 -30
  159. package/build/components/provider/index.native.js.map +1 -1
  160. package/build/components/provider/use-block-editor-settings.js +5 -9
  161. package/build/components/provider/use-block-editor-settings.js.map +1 -1
  162. package/build/components/provider/use-block-editor-settings.native.js +1 -3
  163. package/build/components/provider/use-block-editor-settings.native.js.map +1 -1
  164. package/build/components/provider/with-registry-provider.js +4 -2
  165. package/build/components/provider/with-registry-provider.js.map +1 -1
  166. package/build/components/table-of-contents/index.js +26 -35
  167. package/build/components/table-of-contents/index.js.map +1 -1
  168. package/build/components/table-of-contents/panel.js +4 -5
  169. package/build/components/table-of-contents/panel.js.map +1 -1
  170. package/build/components/template-validation-notice/index.js +4 -6
  171. package/build/components/template-validation-notice/index.js.map +1 -1
  172. package/build/components/theme-support-check/index.js +7 -8
  173. package/build/components/theme-support-check/index.js.map +1 -1
  174. package/build/hooks/custom-sources-backwards-compatibility.js +20 -42
  175. package/build/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  176. package/build/hooks/default-autocompleters.js +1 -2
  177. package/build/hooks/default-autocompleters.js.map +1 -1
  178. package/build/{lockUnlock.js → lock-unlock.js} +1 -1
  179. package/build/lock-unlock.js.map +1 -0
  180. package/build/private-apis.js +5 -2
  181. package/build/private-apis.js.map +1 -1
  182. package/build/store/actions.js +147 -179
  183. package/build/store/actions.js.map +1 -1
  184. package/build/store/actions.native.js +1 -2
  185. package/build/store/actions.native.js.map +1 -1
  186. package/build/store/reducer.js +14 -44
  187. package/build/store/reducer.js.map +1 -1
  188. package/build/store/reducer.native.js +3 -12
  189. package/build/store/reducer.native.js.map +1 -1
  190. package/build/store/selectors.js +23 -54
  191. package/build/store/selectors.js.map +1 -1
  192. package/build/store/utils/notice-builder.js +3 -3
  193. package/build/store/utils/notice-builder.js.map +1 -1
  194. package/build/utils/media-upload/index.js +11 -15
  195. package/build/utils/media-upload/index.js.map +1 -1
  196. package/build/utils/terms.js +3 -6
  197. package/build/utils/terms.js.map +1 -1
  198. package/build-module/components/autosave-monitor/index.js +1 -2
  199. package/build-module/components/autosave-monitor/index.js.map +1 -1
  200. package/build-module/components/deprecated.js +7 -8
  201. package/build-module/components/deprecated.js.map +1 -1
  202. package/build-module/components/document-outline/check.js +4 -5
  203. package/build-module/components/document-outline/check.js.map +1 -1
  204. package/build-module/components/document-outline/index.js +12 -16
  205. package/build-module/components/document-outline/index.js.map +1 -1
  206. package/build-module/components/document-outline/item.js +22 -25
  207. package/build-module/components/document-outline/item.js.map +1 -1
  208. package/build-module/components/editor-help/help-detail-navigation-screen.native.js +6 -8
  209. package/build-module/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
  210. package/build-module/components/editor-help/help-get-support-button.native.js +4 -5
  211. package/build-module/components/editor-help/help-get-support-button.native.js.map +1 -1
  212. package/build-module/components/editor-help/help-section-title.native.js +3 -4
  213. package/build-module/components/editor-help/help-section-title.native.js.map +1 -1
  214. package/build-module/components/editor-help/help-topic-row.native.js +6 -7
  215. package/build-module/components/editor-help/help-topic-row.native.js.map +1 -1
  216. package/build-module/components/editor-help/index.native.js +20 -25
  217. package/build-module/components/editor-help/index.native.js.map +1 -1
  218. package/build-module/components/editor-help/view-sections.native.js +16 -20
  219. package/build-module/components/editor-help/view-sections.native.js.map +1 -1
  220. package/build-module/components/editor-history/redo.js +2 -3
  221. package/build-module/components/editor-history/redo.js.map +1 -1
  222. package/build-module/components/editor-history/undo.js +2 -3
  223. package/build-module/components/editor-history/undo.js.map +1 -1
  224. package/build-module/components/editor-notices/index.js +12 -19
  225. package/build-module/components/editor-notices/index.js.map +1 -1
  226. package/build-module/components/editor-snackbars/index.js +3 -6
  227. package/build-module/components/editor-snackbars/index.js.map +1 -1
  228. package/build-module/components/entities-saved-states/entity-record-item.js +7 -10
  229. package/build-module/components/entities-saved-states/entity-record-item.js.map +1 -1
  230. package/build-module/components/entities-saved-states/entity-type-list.js +6 -7
  231. package/build-module/components/entities-saved-states/entity-type-list.js.map +1 -1
  232. package/build-module/components/entities-saved-states/hooks/use-is-dirty.js +72 -0
  233. package/build-module/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -0
  234. package/build-module/components/entities-saved-states/index.js +44 -118
  235. package/build-module/components/entities-saved-states/index.js.map +1 -1
  236. package/build-module/components/error-boundary/index.js +4 -5
  237. package/build-module/components/error-boundary/index.js.map +1 -1
  238. package/build-module/components/global-keyboard-shortcuts/save-shortcut.js +3 -4
  239. package/build-module/components/global-keyboard-shortcuts/save-shortcut.js.map +1 -1
  240. package/build-module/components/index.js +2 -0
  241. package/build-module/components/index.js.map +1 -1
  242. package/build-module/components/media-categories/index.js +25 -42
  243. package/build-module/components/media-categories/index.js.map +1 -1
  244. package/build-module/components/page-attributes/check.js +4 -7
  245. package/build-module/components/page-attributes/check.js.map +1 -1
  246. package/build-module/components/page-attributes/order.js +7 -9
  247. package/build-module/components/page-attributes/order.js.map +1 -1
  248. package/build-module/components/page-attributes/parent.js +5 -12
  249. package/build-module/components/page-attributes/parent.js.map +1 -1
  250. package/build-module/components/post-author/check.js +6 -7
  251. package/build-module/components/post-author/check.js.map +1 -1
  252. package/build-module/components/post-author/combobox.js +3 -6
  253. package/build-module/components/post-author/combobox.js.map +1 -1
  254. package/build-module/components/post-author/index.js +1 -1
  255. package/build-module/components/post-author/index.js.map +1 -1
  256. package/build-module/components/post-comments/index.js +4 -6
  257. package/build-module/components/post-comments/index.js.map +1 -1
  258. package/build-module/components/post-excerpt/check.js +2 -3
  259. package/build-module/components/post-excerpt/check.js.map +1 -1
  260. package/build-module/components/post-excerpt/index.js +4 -5
  261. package/build-module/components/post-excerpt/index.js.map +1 -1
  262. package/build-module/components/post-featured-image/check.js +2 -3
  263. package/build-module/components/post-featured-image/check.js.map +1 -1
  264. package/build-module/components/post-featured-image/index.js +56 -69
  265. package/build-module/components/post-featured-image/index.js.map +1 -1
  266. package/build-module/components/post-format/check.js +6 -8
  267. package/build-module/components/post-format/check.js.map +1 -1
  268. package/build-module/components/post-format/index.js +1 -1
  269. package/build-module/components/post-format/index.js.map +1 -1
  270. package/build-module/components/post-last-revision/check.js +5 -7
  271. package/build-module/components/post-last-revision/check.js.map +1 -1
  272. package/build-module/components/post-last-revision/index.js +4 -5
  273. package/build-module/components/post-last-revision/index.js.map +1 -1
  274. package/build-module/components/post-locked-modal/index.js +1 -1
  275. package/build-module/components/post-locked-modal/index.js.map +1 -1
  276. package/build-module/components/post-pending-status/check.js +7 -9
  277. package/build-module/components/post-pending-status/check.js.map +1 -1
  278. package/build-module/components/post-pending-status/index.js +4 -6
  279. package/build-module/components/post-pending-status/index.js.map +1 -1
  280. package/build-module/components/post-pingbacks/index.js +4 -6
  281. package/build-module/components/post-pingbacks/index.js.map +1 -1
  282. package/build-module/components/post-preview-button/index.js +8 -12
  283. package/build-module/components/post-preview-button/index.js.map +1 -1
  284. package/build-module/components/post-publish-button/index.js +10 -18
  285. package/build-module/components/post-publish-button/index.js.map +1 -1
  286. package/build-module/components/post-publish-button/label.js +14 -17
  287. package/build-module/components/post-publish-button/label.js.map +1 -1
  288. package/build-module/components/post-publish-panel/index.js +10 -11
  289. package/build-module/components/post-publish-panel/index.js.map +1 -1
  290. package/build-module/components/post-publish-panel/maybe-category-panel.js +2 -4
  291. package/build-module/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  292. package/build-module/components/post-publish-panel/maybe-post-format-panel.js +9 -12
  293. package/build-module/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  294. package/build-module/components/post-publish-panel/maybe-tags-panel.js +4 -7
  295. package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  296. package/build-module/components/post-publish-panel/maybe-upload-media.js +138 -0
  297. package/build-module/components/post-publish-panel/maybe-upload-media.js.map +1 -0
  298. package/build-module/components/post-publish-panel/postpublish.js +8 -11
  299. package/build-module/components/post-publish-panel/postpublish.js.map +1 -1
  300. package/build-module/components/post-publish-panel/prepublish.js +7 -7
  301. package/build-module/components/post-publish-panel/prepublish.js.map +1 -1
  302. package/build-module/components/post-saved-state/index.js +13 -8
  303. package/build-module/components/post-saved-state/index.js.map +1 -1
  304. package/build-module/components/post-schedule/check.js +6 -8
  305. package/build-module/components/post-schedule/check.js.map +1 -1
  306. package/build-module/components/post-schedule/index.js +8 -12
  307. package/build-module/components/post-schedule/index.js.map +1 -1
  308. package/build-module/components/post-schedule/label.js +7 -10
  309. package/build-module/components/post-schedule/label.js.map +1 -1
  310. package/build-module/components/post-slug/check.js +3 -4
  311. package/build-module/components/post-slug/check.js.map +1 -1
  312. package/build-module/components/post-slug/index.js +5 -6
  313. package/build-module/components/post-slug/index.js.map +1 -1
  314. package/build-module/components/post-sticky/check.js +7 -9
  315. package/build-module/components/post-sticky/check.js.map +1 -1
  316. package/build-module/components/post-sticky/index.js +4 -5
  317. package/build-module/components/post-sticky/index.js.map +1 -1
  318. package/build-module/components/post-switch-to-draft-button/index.js +6 -7
  319. package/build-module/components/post-switch-to-draft-button/index.js.map +1 -1
  320. package/build-module/components/post-sync-status/index.js +56 -0
  321. package/build-module/components/post-sync-status/index.js.map +1 -0
  322. package/build-module/components/post-taxonomies/check.js +6 -7
  323. package/build-module/components/post-taxonomies/check.js.map +1 -1
  324. package/build-module/components/post-taxonomies/flat-term-selector.js +36 -44
  325. package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
  326. package/build-module/components/post-taxonomies/hierarchical-term-selector.js +13 -14
  327. package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  328. package/build-module/components/post-taxonomies/index.js +6 -11
  329. package/build-module/components/post-taxonomies/index.js.map +1 -1
  330. package/build-module/components/post-taxonomies/most-used-terms.js +5 -6
  331. package/build-module/components/post-taxonomies/most-used-terms.js.map +1 -1
  332. package/build-module/components/post-template/index.js +6 -9
  333. package/build-module/components/post-template/index.js.map +1 -1
  334. package/build-module/components/post-title/index.js +8 -5
  335. package/build-module/components/post-title/index.js.map +1 -1
  336. package/build-module/components/post-title/index.native.js +8 -11
  337. package/build-module/components/post-title/index.native.js.map +1 -1
  338. package/build-module/components/post-trash/check.js +7 -9
  339. package/build-module/components/post-trash/check.js.map +1 -1
  340. package/build-module/components/post-type-support-check/index.js +5 -6
  341. package/build-module/components/post-type-support-check/index.js.map +1 -1
  342. package/build-module/components/post-url/check.js +4 -5
  343. package/build-module/components/post-url/check.js.map +1 -1
  344. package/build-module/components/post-url/index.js +8 -9
  345. package/build-module/components/post-url/index.js.map +1 -1
  346. package/build-module/components/post-visibility/check.js +6 -7
  347. package/build-module/components/post-visibility/check.js.map +1 -1
  348. package/build-module/components/post-visibility/index.js +14 -16
  349. package/build-module/components/post-visibility/index.js.map +1 -1
  350. package/build-module/components/post-visibility/label.js +1 -3
  351. package/build-module/components/post-visibility/label.js.map +1 -1
  352. package/build-module/components/provider/index.js +12 -14
  353. package/build-module/components/provider/index.js.map +1 -1
  354. package/build-module/components/provider/index.native.js +19 -29
  355. package/build-module/components/provider/index.native.js.map +1 -1
  356. package/build-module/components/provider/use-block-editor-settings.js +5 -9
  357. package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
  358. package/build-module/components/provider/use-block-editor-settings.native.js +1 -3
  359. package/build-module/components/provider/use-block-editor-settings.native.js.map +1 -1
  360. package/build-module/components/provider/with-registry-provider.js +4 -2
  361. package/build-module/components/provider/with-registry-provider.js.map +1 -1
  362. package/build-module/components/table-of-contents/index.js +26 -34
  363. package/build-module/components/table-of-contents/index.js.map +1 -1
  364. package/build-module/components/table-of-contents/panel.js +4 -5
  365. package/build-module/components/table-of-contents/panel.js.map +1 -1
  366. package/build-module/components/template-validation-notice/index.js +4 -6
  367. package/build-module/components/template-validation-notice/index.js.map +1 -1
  368. package/build-module/components/theme-support-check/index.js +7 -8
  369. package/build-module/components/theme-support-check/index.js.map +1 -1
  370. package/build-module/hooks/custom-sources-backwards-compatibility.js +20 -39
  371. package/build-module/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  372. package/build-module/hooks/default-autocompleters.js +1 -2
  373. package/build-module/hooks/default-autocompleters.js.map +1 -1
  374. package/build-module/{lockUnlock.js → lock-unlock.js} +1 -1
  375. package/build-module/lock-unlock.js.map +1 -0
  376. package/build-module/private-apis.js +4 -2
  377. package/build-module/private-apis.js.map +1 -1
  378. package/build-module/store/actions.js +147 -179
  379. package/build-module/store/actions.js.map +1 -1
  380. package/build-module/store/actions.native.js +1 -2
  381. package/build-module/store/actions.native.js.map +1 -1
  382. package/build-module/store/reducer.js +14 -44
  383. package/build-module/store/reducer.js.map +1 -1
  384. package/build-module/store/reducer.native.js +3 -12
  385. package/build-module/store/reducer.native.js.map +1 -1
  386. package/build-module/store/selectors.js +21 -54
  387. package/build-module/store/selectors.js.map +1 -1
  388. package/build-module/store/utils/notice-builder.js +3 -3
  389. package/build-module/store/utils/notice-builder.js.map +1 -1
  390. package/build-module/utils/media-upload/index.js +11 -15
  391. package/build-module/utils/media-upload/index.js.map +1 -1
  392. package/build-module/utils/terms.js +3 -6
  393. package/build-module/utils/terms.js.map +1 -1
  394. package/build-style/style-rtl.css +15 -1
  395. package/build-style/style.css +15 -1
  396. package/package.json +30 -31
  397. package/src/components/editor-help/test/index.native.js +3 -2
  398. package/src/components/entities-saved-states/hooks/use-is-dirty.js +87 -0
  399. package/src/components/entities-saved-states/index.js +25 -106
  400. package/src/components/entities-saved-states/test/use-is-dirty.js +94 -0
  401. package/src/components/index.js +2 -0
  402. package/src/components/post-publish-panel/maybe-upload-media.js +167 -0
  403. package/src/components/post-publish-panel/prepublish.js +2 -0
  404. package/src/components/post-publish-panel/style.scss +1 -1
  405. package/src/components/post-saved-state/index.js +6 -0
  406. package/src/components/post-sync-status/index.js +55 -0
  407. package/src/components/post-sync-status/style.scss +16 -0
  408. package/src/components/post-taxonomies/flat-term-selector.js +20 -30
  409. package/src/components/post-title/index.js +4 -1
  410. package/src/components/provider/index.js +1 -1
  411. package/src/components/provider/index.native.js +2 -9
  412. package/src/private-apis.js +3 -1
  413. package/src/style.scss +1 -0
  414. package/build/lockUnlock.js.map +0 -1
  415. package/build-module/lockUnlock.js.map +0 -1
  416. /package/src/{lockUnlock.js → lock-unlock.js} +0 -0
@@ -9,8 +9,6 @@ exports.default = void 0;
9
9
 
10
10
  var _element = require("@wordpress/element");
11
11
 
12
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
-
14
12
  var _reactNative = require("react-native");
15
13
 
16
14
  var _stack = require("@react-navigation/stack");
@@ -87,13 +85,12 @@ const HELP_TOPICS = [{
87
85
  view: (0, _element.createElement)(_customizeBlocks.default, null)
88
86
  }];
89
87
 
90
- function EditorHelpTopics(_ref) {
91
- let {
92
- close,
93
- isVisible,
94
- onClose,
95
- showSupport
96
- } = _ref;
88
+ function EditorHelpTopics({
89
+ close,
90
+ isVisible,
91
+ onClose,
92
+ showSupport
93
+ }) {
97
94
  const {
98
95
  postType
99
96
  } = (0, _data.useSelect)(select => ({
@@ -127,14 +124,12 @@ function EditorHelpTopics(_ref) {
127
124
  }, (0, _element.createElement)(_components.BottomSheet.NavBar, null, (0, _element.createElement)(_components.BottomSheet.NavBar.DismissButton, {
128
125
  onPress: close,
129
126
  iosText: (0, _i18n.__)('Close')
130
- }), (0, _element.createElement)(_components.BottomSheet.NavBar.Heading, null, title)), (0, _element.createElement)(_components.BottomSheetConsumer, null, _ref2 => {
131
- let {
132
- listProps
133
- } = _ref2;
134
-
127
+ }), (0, _element.createElement)(_components.BottomSheet.NavBar.Heading, null, title)), (0, _element.createElement)(_components.BottomSheetConsumer, null, ({
128
+ listProps
129
+ }) => {
135
130
  const contentContainerStyle = _reactNative.StyleSheet.flatten(listProps.contentContainerStyle);
136
131
 
137
- return (0, _element.createElement)(_reactNative.ScrollView, (0, _extends2.default)({}, listProps, {
132
+ return (0, _element.createElement)(_reactNative.ScrollView, { ...listProps,
138
133
  contentContainerStyle: { ...contentContainerStyle,
139
134
  paddingBottom: Math.max(listProps.safeAreaBottomInset, contentContainerStyle.paddingBottom),
140
135
 
@@ -145,12 +140,11 @@ function EditorHelpTopics(_ref) {
145
140
  */
146
141
  marginTop: 0
147
142
  }
148
- }), (0, _element.createElement)(_components.PanelBody, null, (0, _element.createElement)(_helpSectionTitle.default, null, (0, _i18n.__)('The basics')), HELP_TOPICS.map((_ref3, index) => {
149
- let {
150
- label,
151
- icon,
152
- slug
153
- } = _ref3;
143
+ }, (0, _element.createElement)(_components.PanelBody, null, (0, _element.createElement)(_helpSectionTitle.default, null, (0, _i18n.__)('The basics')), HELP_TOPICS.map(({
144
+ label,
145
+ icon,
146
+ slug
147
+ }, index) => {
154
148
  const isLastItem = index === HELP_TOPICS.length - 1;
155
149
  return (0, _element.createElement)(_helpTopicRow.default, {
156
150
  key: slug,
@@ -160,12 +154,11 @@ function EditorHelpTopics(_ref) {
160
154
  isLastItem: isLastItem
161
155
  });
162
156
  }), showSupport && supportSection));
163
- }))), HELP_TOPICS.map(_ref4 => {
164
- let {
165
- view,
166
- label,
167
- slug
168
- } = _ref4;
157
+ }))), HELP_TOPICS.map(({
158
+ view,
159
+ label,
160
+ slug
161
+ }) => {
169
162
  return (0, _element.createElement)(_helpDetailNavigationScreen.default, {
170
163
  key: slug,
171
164
  name: slug,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/components/editor-help/index.native.js"],"names":["HELP_TOPICS","label","slug","icon","helpFilled","view","plusCircleFilled","moveBlocksIcon","trash","cog","EditorHelpTopics","close","isVisible","onClose","showSupport","postType","select","editorStore","getEditedPostAttribute","title","supportSection","requestContactCustomerSupport","requestGotoCustomerSupportOptions","styles","contentContainer","navigationContainer","container","listProps","contentContainerStyle","StyleSheet","flatten","paddingBottom","Math","max","safeAreaBottomInset","marginTop","map","index","isLastItem","length","gestureEnabled","TransitionPresets","DefaultTransition"],"mappings":";;;;;;;;;;;;;AAGA;;AACA;;AAKA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AAQA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AApCA;AACA;AACA;;AAIA;AACA;AACA;;AAeA;AACA;AACA;AAaA,MAAMA,WAAW,GAAG,CACnB;AACCC,EAAAA,KAAK,EAAE,cAAI,kBAAJ,CADR;AAECC,EAAAA,IAAI,EAAE,iBAFP;AAGCC,EAAAA,IAAI,EAAEC,iBAHP;AAICC,EAAAA,IAAI,EAAE,4BAAC,sBAAD;AAJP,CADmB,EAOnB;AACCJ,EAAAA,KAAK,EAAE,cAAI,YAAJ,CADR;AAECC,EAAAA,IAAI,EAAE,YAFP;AAGCC,EAAAA,IAAI,EAAEG,uBAHP;AAICD,EAAAA,IAAI,EAAE,4BAAC,kBAAD;AAJP,CAPmB,EAanB;AACCJ,EAAAA,KAAK,EAAE,cAAI,aAAJ,CADR;AAECC,EAAAA,IAAI,EAAE,aAFP;AAGCC,EAAAA,IAAI,EAAEI,uBAHP;AAICF,EAAAA,IAAI,EAAE,4BAAC,mBAAD;AAJP,CAbmB,EAmBnB;AACCJ,EAAAA,KAAK,EAAE,cAAI,eAAJ,CADR;AAECC,EAAAA,IAAI,EAAE,eAFP;AAGCC,EAAAA,IAAI,EAAEK,YAHP;AAICH,EAAAA,IAAI,EAAE,4BAAC,qBAAD;AAJP,CAnBmB,EAyBnB;AACCJ,EAAAA,KAAK,EAAE,cAAI,kBAAJ,CADR;AAECC,EAAAA,IAAI,EAAE,kBAFP;AAGCC,EAAAA,IAAI,EAAEM,UAHP;AAICJ,EAAAA,IAAI,EAAE,4BAAC,wBAAD;AAJP,CAzBmB,CAApB;;AAiCA,SAASK,gBAAT,OAAwE;AAAA,MAA7C;AAAEC,IAAAA,KAAF;AAASC,IAAAA,SAAT;AAAoBC,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AA,IAAI,EAAGA,IAFR;AAGC,MAAA,OAAO,EAAGG,IAHX;AAIC,MAAA,KAAK,EAAGJ,KAJT;AAKC,MAAA,OAAO,EAAG;AACTuC,QAAAA,cAAc,EAAE,KADP;AAET,WAAGC,yBAAkBC;AAFZ;AALX,MADD;AAYA,GAbC,CAlFH,CADD,CARD,CADD;AA8GA;;eAEchC,gB","sourcesContent":["/**\n * External dependencies\n */\nimport { SafeAreaView, ScrollView, StyleSheet, View } from 'react-native';\nimport { TransitionPresets } from '@react-navigation/stack';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tBottomSheet,\n\tBottomSheetConsumer,\n\tPanelBody,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { helpFilled, plusCircleFilled, trash, cog } from '@wordpress/icons';\nimport { useSelect } from '@wordpress/data';\nimport { store as editorStore } from '@wordpress/editor';\nimport {\n\trequestContactCustomerSupport,\n\trequestGotoCustomerSupportOptions,\n} from '@wordpress/react-native-bridge';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport HelpDetailNavigationScreen from './help-detail-navigation-screen';\nimport HelpTopicRow from './help-topic-row';\nimport HelpGetSupportButton from './help-get-support-button';\nimport IntroToBlocks from './intro-to-blocks';\nimport AddBlocks from './add-blocks';\nimport MoveBlocks from './move-blocks';\nimport RemoveBlocks from './remove-blocks';\nimport CustomizeBlocks from './customize-blocks';\nimport moveBlocksIcon from './icon-move-blocks';\nimport HelpSectionTitle from './help-section-title';\n\nconst HELP_TOPICS = [\n\t{\n\t\tlabel: __( 'What is a block?' ),\n\t\tslug: 'what-is-a-block',\n\t\ticon: helpFilled,\n\t\tview: <IntroToBlocks />,\n\t},\n\t{\n\t\tlabel: __( 'Add blocks' ),\n\t\tslug: 'add-blocks',\n\t\ticon: plusCircleFilled,\n\t\tview: <AddBlocks />,\n\t},\n\t{\n\t\tlabel: __( 'Move blocks' ),\n\t\tslug: 'move-blocks',\n\t\ticon: moveBlocksIcon,\n\t\tview: <MoveBlocks />,\n\t},\n\t{\n\t\tlabel: __( 'Remove blocks' ),\n\t\tslug: 'remove-blocks',\n\t\ticon: trash,\n\t\tview: <RemoveBlocks />,\n\t},\n\t{\n\t\tlabel: __( 'Customize blocks' ),\n\t\tslug: 'customize-blocks',\n\t\ticon: cog,\n\t\tview: <CustomizeBlocks />,\n\t},\n];\n\nfunction EditorHelpTopics( { close, isVisible, onClose, showSupport } ) {\n\tconst { postType } = useSelect( ( select ) => ( {\n\t\tpostType: select( editorStore ).getEditedPostAttribute( 'type' ),\n\t} ) );\n\n\tconst title =\n\t\tpostType === 'page'\n\t\t\t? __( 'How to edit your page' )\n\t\t\t: __( 'How to edit your post' );\n\n\tconst supportSection = (\n\t\t<>\n\t\t\t<HelpSectionTitle>{ __( 'Get support' ) }</HelpSectionTitle>\n\t\t\t<HelpGetSupportButton\n\t\t\t\ttitle={ __( 'Contact support' ) }\n\t\t\t\tonPress={ requestContactCustomerSupport }\n\t\t\t/>\n\t\t\t<HelpGetSupportButton\n\t\t\t\ttitle={ __( 'More support options' ) }\n\t\t\t\tonPress={ requestGotoCustomerSupportOptions }\n\t\t\t/>\n\t\t</>\n\t);\n\n\treturn (\n\t\t<BottomSheet\n\t\t\tisVisible={ isVisible }\n\t\t\tonClose={ onClose }\n\t\t\thideHeader\n\t\t\thasNavigation\n\t\t\tcontentStyle={ styles.contentContainer }\n\t\t\ttestID=\"editor-help-modal\"\n\t\t>\n\t\t\t<SafeAreaView>\n\t\t\t\t<BottomSheet.NavigationContainer\n\t\t\t\t\tanimate\n\t\t\t\t\tmain\n\t\t\t\t\tstyle={ styles.navigationContainer }\n\t\t\t\t>\n\t\t\t\t\t<BottomSheet.NavigationScreen\n\t\t\t\t\t\tisScrollable\n\t\t\t\t\t\tfullScreen\n\t\t\t\t\t\tname=\"help-topics\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<View style={ styles.container }>\n\t\t\t\t\t\t\t<BottomSheet.NavBar>\n\t\t\t\t\t\t\t\t<BottomSheet.NavBar.DismissButton\n\t\t\t\t\t\t\t\t\tonPress={ close }\n\t\t\t\t\t\t\t\t\tiosText={ __( 'Close' ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<BottomSheet.NavBar.Heading>\n\t\t\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\t\t</BottomSheet.NavBar.Heading>\n\t\t\t\t\t\t\t</BottomSheet.NavBar>\n\t\t\t\t\t\t\t<BottomSheetConsumer>\n\t\t\t\t\t\t\t\t{ ( { listProps } ) => {\n\t\t\t\t\t\t\t\t\tconst contentContainerStyle =\n\t\t\t\t\t\t\t\t\t\tStyleSheet.flatten(\n\t\t\t\t\t\t\t\t\t\t\tlistProps.contentContainerStyle\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<ScrollView\n\t\t\t\t\t\t\t\t\t\t\t{ ...listProps }\n\t\t\t\t\t\t\t\t\t\t\tcontentContainerStyle={ {\n\t\t\t\t\t\t\t\t\t\t\t\t...contentContainerStyle,\n\t\t\t\t\t\t\t\t\t\t\t\tpaddingBottom: Math.max(\n\t\t\t\t\t\t\t\t\t\t\t\t\tlistProps.safeAreaBottomInset,\n\t\t\t\t\t\t\t\t\t\t\t\t\tcontentContainerStyle.paddingBottom\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t\t\t\t\t\t * Remove margin set via `hideHeader`. Combining a header\n\t\t\t\t\t\t\t\t\t\t\t\t * and navigation in this bottom sheet is at odds with the\n\t\t\t\t\t\t\t\t\t\t\t\t * current `BottomSheet` implementation.\n\t\t\t\t\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\t\t\t\t\tmarginTop: 0,\n\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<PanelBody>\n\t\t\t\t\t\t\t\t\t\t\t\t<HelpSectionTitle>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{ __( 'The basics' ) }\n\t\t\t\t\t\t\t\t\t\t\t\t</HelpSectionTitle>\n\t\t\t\t\t\t\t\t\t\t\t\t{ /* Print out help topics. */ }\n\t\t\t\t\t\t\t\t\t\t\t\t{ HELP_TOPICS.map(\n\t\t\t\t\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ label, icon, slug },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tindex\n\t\t\t\t\t\t\t\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst isLastItem =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tindex ===\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tHELP_TOPICS.length -\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<HelpTopicRow\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={ slug }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tscreenName={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tslug\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLastItem={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLastItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t\t{ showSupport &&\n\t\t\t\t\t\t\t\t\t\t\t\t\tsupportSection }\n\t\t\t\t\t\t\t\t\t\t\t</PanelBody>\n\t\t\t\t\t\t\t\t\t\t</ScrollView>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t</BottomSheetConsumer>\n\t\t\t\t\t\t</View>\n\t\t\t\t\t</BottomSheet.NavigationScreen>\n\t\t\t\t\t{ /* Print out help detail screens. */ }\n\t\t\t\t\t{ HELP_TOPICS.map( ( { view, label, slug } ) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<HelpDetailNavigationScreen\n\t\t\t\t\t\t\t\tkey={ slug }\n\t\t\t\t\t\t\t\tname={ slug }\n\t\t\t\t\t\t\t\tcontent={ view }\n\t\t\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\t\t\toptions={ {\n\t\t\t\t\t\t\t\t\tgestureEnabled: false,\n\t\t\t\t\t\t\t\t\t...TransitionPresets.DefaultTransition,\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t);\n\t\t\t\t\t} ) }\n\t\t\t\t</BottomSheet.NavigationContainer>\n\t\t\t</SafeAreaView>\n\t\t</BottomSheet>\n\t);\n}\n\nexport default EditorHelpTopics;\n"]}
1
+ {"version":3,"sources":["@wordpress/editor/src/components/editor-help/index.native.js"],"names":["HELP_TOPICS","label","slug","icon","helpFilled","view","plusCircleFilled","moveBlocksIcon","trash","cog","EditorHelpTopics","close","isVisible","onClose","showSupport","postType","select","editorStore","getEditedPostAttribute","title","supportSection","requestContactCustomerSupport","requestGotoCustomerSupportOptions","styles","contentContainer","navigationContainer","container","listProps","contentContainerStyle","StyleSheet","flatten","paddingBottom","Math","max","safeAreaBottomInset","marginTop","map","index","isLastItem","length","gestureEnabled","TransitionPresets","DefaultTransition"],"mappings":";;;;;;;;;;;AAGA;;AACA;;AAKA;;AAKA;;AACA;;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,yBAAkBC;AAFZ;AALX,MADD;AAYA,GAbC,CAlFH,CADD,CARD,CADD;AA8GA;;eAEchC,gB","sourcesContent":["/**\n * External dependencies\n */\nimport { SafeAreaView, ScrollView, StyleSheet, View } from 'react-native';\nimport { TransitionPresets } from '@react-navigation/stack';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tBottomSheet,\n\tBottomSheetConsumer,\n\tPanelBody,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { helpFilled, plusCircleFilled, trash, cog } from '@wordpress/icons';\nimport { useSelect } from '@wordpress/data';\nimport { store as editorStore } from '@wordpress/editor';\nimport {\n\trequestContactCustomerSupport,\n\trequestGotoCustomerSupportOptions,\n} from '@wordpress/react-native-bridge';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport HelpDetailNavigationScreen from './help-detail-navigation-screen';\nimport HelpTopicRow from './help-topic-row';\nimport HelpGetSupportButton from './help-get-support-button';\nimport IntroToBlocks from './intro-to-blocks';\nimport AddBlocks from './add-blocks';\nimport MoveBlocks from './move-blocks';\nimport RemoveBlocks from './remove-blocks';\nimport CustomizeBlocks from './customize-blocks';\nimport moveBlocksIcon from './icon-move-blocks';\nimport HelpSectionTitle from './help-section-title';\n\nconst HELP_TOPICS = [\n\t{\n\t\tlabel: __( 'What is a block?' ),\n\t\tslug: 'what-is-a-block',\n\t\ticon: helpFilled,\n\t\tview: <IntroToBlocks />,\n\t},\n\t{\n\t\tlabel: __( 'Add blocks' ),\n\t\tslug: 'add-blocks',\n\t\ticon: plusCircleFilled,\n\t\tview: <AddBlocks />,\n\t},\n\t{\n\t\tlabel: __( 'Move blocks' ),\n\t\tslug: 'move-blocks',\n\t\ticon: moveBlocksIcon,\n\t\tview: <MoveBlocks />,\n\t},\n\t{\n\t\tlabel: __( 'Remove blocks' ),\n\t\tslug: 'remove-blocks',\n\t\ticon: trash,\n\t\tview: <RemoveBlocks />,\n\t},\n\t{\n\t\tlabel: __( 'Customize blocks' ),\n\t\tslug: 'customize-blocks',\n\t\ticon: cog,\n\t\tview: <CustomizeBlocks />,\n\t},\n];\n\nfunction EditorHelpTopics( { close, isVisible, onClose, showSupport } ) {\n\tconst { postType } = useSelect( ( select ) => ( {\n\t\tpostType: select( editorStore ).getEditedPostAttribute( 'type' ),\n\t} ) );\n\n\tconst title =\n\t\tpostType === 'page'\n\t\t\t? __( 'How to edit your page' )\n\t\t\t: __( 'How to edit your post' );\n\n\tconst supportSection = (\n\t\t<>\n\t\t\t<HelpSectionTitle>{ __( 'Get support' ) }</HelpSectionTitle>\n\t\t\t<HelpGetSupportButton\n\t\t\t\ttitle={ __( 'Contact support' ) }\n\t\t\t\tonPress={ requestContactCustomerSupport }\n\t\t\t/>\n\t\t\t<HelpGetSupportButton\n\t\t\t\ttitle={ __( 'More support options' ) }\n\t\t\t\tonPress={ requestGotoCustomerSupportOptions }\n\t\t\t/>\n\t\t</>\n\t);\n\n\treturn (\n\t\t<BottomSheet\n\t\t\tisVisible={ isVisible }\n\t\t\tonClose={ onClose }\n\t\t\thideHeader\n\t\t\thasNavigation\n\t\t\tcontentStyle={ styles.contentContainer }\n\t\t\ttestID=\"editor-help-modal\"\n\t\t>\n\t\t\t<SafeAreaView>\n\t\t\t\t<BottomSheet.NavigationContainer\n\t\t\t\t\tanimate\n\t\t\t\t\tmain\n\t\t\t\t\tstyle={ styles.navigationContainer }\n\t\t\t\t>\n\t\t\t\t\t<BottomSheet.NavigationScreen\n\t\t\t\t\t\tisScrollable\n\t\t\t\t\t\tfullScreen\n\t\t\t\t\t\tname=\"help-topics\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<View style={ styles.container }>\n\t\t\t\t\t\t\t<BottomSheet.NavBar>\n\t\t\t\t\t\t\t\t<BottomSheet.NavBar.DismissButton\n\t\t\t\t\t\t\t\t\tonPress={ close }\n\t\t\t\t\t\t\t\t\tiosText={ __( 'Close' ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<BottomSheet.NavBar.Heading>\n\t\t\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\t\t</BottomSheet.NavBar.Heading>\n\t\t\t\t\t\t\t</BottomSheet.NavBar>\n\t\t\t\t\t\t\t<BottomSheetConsumer>\n\t\t\t\t\t\t\t\t{ ( { listProps } ) => {\n\t\t\t\t\t\t\t\t\tconst contentContainerStyle =\n\t\t\t\t\t\t\t\t\t\tStyleSheet.flatten(\n\t\t\t\t\t\t\t\t\t\t\tlistProps.contentContainerStyle\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<ScrollView\n\t\t\t\t\t\t\t\t\t\t\t{ ...listProps }\n\t\t\t\t\t\t\t\t\t\t\tcontentContainerStyle={ {\n\t\t\t\t\t\t\t\t\t\t\t\t...contentContainerStyle,\n\t\t\t\t\t\t\t\t\t\t\t\tpaddingBottom: Math.max(\n\t\t\t\t\t\t\t\t\t\t\t\t\tlistProps.safeAreaBottomInset,\n\t\t\t\t\t\t\t\t\t\t\t\t\tcontentContainerStyle.paddingBottom\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t\t\t\t\t\t * Remove margin set via `hideHeader`. Combining a header\n\t\t\t\t\t\t\t\t\t\t\t\t * and navigation in this bottom sheet is at odds with the\n\t\t\t\t\t\t\t\t\t\t\t\t * current `BottomSheet` implementation.\n\t\t\t\t\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\t\t\t\t\tmarginTop: 0,\n\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<PanelBody>\n\t\t\t\t\t\t\t\t\t\t\t\t<HelpSectionTitle>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{ __( 'The basics' ) }\n\t\t\t\t\t\t\t\t\t\t\t\t</HelpSectionTitle>\n\t\t\t\t\t\t\t\t\t\t\t\t{ /* Print out help topics. */ }\n\t\t\t\t\t\t\t\t\t\t\t\t{ HELP_TOPICS.map(\n\t\t\t\t\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ label, icon, slug },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tindex\n\t\t\t\t\t\t\t\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst isLastItem =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tindex ===\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tHELP_TOPICS.length -\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<HelpTopicRow\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={ slug }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tscreenName={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tslug\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLastItem={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLastItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t\t{ showSupport &&\n\t\t\t\t\t\t\t\t\t\t\t\t\tsupportSection }\n\t\t\t\t\t\t\t\t\t\t\t</PanelBody>\n\t\t\t\t\t\t\t\t\t\t</ScrollView>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t</BottomSheetConsumer>\n\t\t\t\t\t\t</View>\n\t\t\t\t\t</BottomSheet.NavigationScreen>\n\t\t\t\t\t{ /* Print out help detail screens. */ }\n\t\t\t\t\t{ HELP_TOPICS.map( ( { view, label, slug } ) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<HelpDetailNavigationScreen\n\t\t\t\t\t\t\t\tkey={ slug }\n\t\t\t\t\t\t\t\tname={ slug }\n\t\t\t\t\t\t\t\tcontent={ view }\n\t\t\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\t\t\toptions={ {\n\t\t\t\t\t\t\t\t\tgestureEnabled: false,\n\t\t\t\t\t\t\t\t\t...TransitionPresets.DefaultTransition,\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t);\n\t\t\t\t\t} ) }\n\t\t\t\t</BottomSheet.NavigationContainer>\n\t\t\t</SafeAreaView>\n\t\t</BottomSheet>\n\t);\n}\n\nexport default EditorHelpTopics;\n"]}
@@ -26,10 +26,9 @@ var _style = _interopRequireDefault(require("./style.scss"));
26
26
  /**
27
27
  * Internal dependencies
28
28
  */
29
- const HelpDetailBodyText = _ref => {
30
- let {
31
- text
32
- } = _ref;
29
+ const HelpDetailBodyText = ({
30
+ text
31
+ }) => {
33
32
  const bodyStyle = (0, _compose.usePreferredColorSchemeStyle)(_style.default.helpDetailBody, _style.default.helpDetailBodyDark);
34
33
  return (0, _element.createElement)(_reactNative.Text, {
35
34
  selectable: true,
@@ -39,11 +38,10 @@ const HelpDetailBodyText = _ref => {
39
38
 
40
39
  exports.HelpDetailBodyText = HelpDetailBodyText;
41
40
 
42
- const HelpDetailSectionHeadingText = _ref2 => {
43
- let {
44
- text,
45
- badge
46
- } = _ref2;
41
+ const HelpDetailSectionHeadingText = ({
42
+ text,
43
+ badge
44
+ }) => {
47
45
  const headingTextStyle = (0, _compose.usePreferredColorSchemeStyle)(_style.default.helpDetailSectionHeadingText, _style.default.helpDetailSectionHeadingTextDark);
48
46
  return (0, _element.createElement)(_reactNative.View, {
49
47
  style: _style.default.helpDetailSectionHeading
@@ -58,13 +56,12 @@ const HelpDetailSectionHeadingText = _ref2 => {
58
56
 
59
57
  exports.HelpDetailSectionHeadingText = HelpDetailSectionHeadingText;
60
58
 
61
- const HelpDetailImage = _ref3 => {
62
- let {
63
- accessible,
64
- accessibilityLabel,
65
- source,
66
- sourceDarkMode
67
- } = _ref3;
59
+ const HelpDetailImage = ({
60
+ accessible,
61
+ accessibilityLabel,
62
+ source,
63
+ sourceDarkMode
64
+ }) => {
68
65
  const imageStyle = (0, _compose.usePreferredColorSchemeStyle)(_style.default.helpDetailImage, _style.default.helpDetailImageDark);
69
66
  const darkModeEnabled = (0, _compose.usePreferredColorScheme)() === 'dark';
70
67
  return (0, _element.createElement)(_reactNative.Image, {
@@ -77,10 +74,9 @@ const HelpDetailImage = _ref3 => {
77
74
 
78
75
  exports.HelpDetailImage = HelpDetailImage;
79
76
 
80
- const HelpDetailBadge = _ref4 => {
81
- let {
82
- text
83
- } = _ref4;
77
+ const HelpDetailBadge = ({
78
+ text
79
+ }) => {
84
80
  return (0, _element.createElement)(_reactNative.View, {
85
81
  style: _style.default.helpDetailBadgeContainer
86
82
  }, (0, _element.createElement)(_reactNative.Text, {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/components/editor-help/view-sections.native.js"],"names":["HelpDetailBodyText","text","bodyStyle","styles","helpDetailBody","helpDetailBodyDark","HelpDetailSectionHeadingText","badge","headingTextStyle","helpDetailSectionHeadingText","helpDetailSectionHeadingTextDark","helpDetailSectionHeading","HelpDetailImage","accessible","accessibilityLabel","source","sourceDarkMode","imageStyle","helpDetailImage","helpDetailImageDark","darkModeEnabled","HelpDetailBadge","helpDetailBadgeContainer","helpDetailBadgeText"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AAQA;;AAhBA;AACA;AACA;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;AAuBP,MAAMI,eAAe,GAAG,SAAgB;AAAA,MAAd;AAAEpB,IAAAA;AAAF,GAAc;AACvC,SACC,4BAAC,iBAAD;AAAM,IAAA,KAAK,EAAGE,eAAOmB;AAArB,KACC,4BAAC,iBAAD;AAAM,IAAA,KAAK,EAAGnB,eAAOoB;AAArB,KAA6CtB,IAA7C,CADD,CADD;AAKA,CAND","sourcesContent":["/**\n * External dependencies\n */\nimport { Text, Image, View } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tusePreferredColorScheme,\n\tusePreferredColorSchemeStyle,\n} from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\n\nexport const HelpDetailBodyText = ( { text } ) => {\n\tconst bodyStyle = usePreferredColorSchemeStyle(\n\t\tstyles.helpDetailBody,\n\t\tstyles.helpDetailBodyDark\n\t);\n\treturn (\n\t\t<Text selectable style={ bodyStyle }>\n\t\t\t{ text }\n\t\t</Text>\n\t);\n};\n\nexport const HelpDetailSectionHeadingText = ( { text, badge } ) => {\n\tconst headingTextStyle = usePreferredColorSchemeStyle(\n\t\tstyles.helpDetailSectionHeadingText,\n\t\tstyles.helpDetailSectionHeadingTextDark\n\t);\n\treturn (\n\t\t<View style={ styles.helpDetailSectionHeading }>\n\t\t\t{ badge && <HelpDetailBadge text={ badge } /> }\n\t\t\t<Text\n\t\t\t\taccessibilityRole=\"header\"\n\t\t\t\tselectable\n\t\t\t\tstyle={ headingTextStyle }\n\t\t\t>\n\t\t\t\t{ text }\n\t\t\t</Text>\n\t\t</View>\n\t);\n};\n\nexport const HelpDetailImage = ( {\n\taccessible,\n\taccessibilityLabel,\n\tsource,\n\tsourceDarkMode,\n} ) => {\n\tconst imageStyle = usePreferredColorSchemeStyle(\n\t\tstyles.helpDetailImage,\n\t\tstyles.helpDetailImageDark\n\t);\n\tconst darkModeEnabled = usePreferredColorScheme() === 'dark';\n\treturn (\n\t\t<Image\n\t\t\taccessible={ accessible }\n\t\t\taccessibilityLabel={ accessibilityLabel }\n\t\t\tsource={\n\t\t\t\tdarkModeEnabled && sourceDarkMode ? sourceDarkMode : source\n\t\t\t}\n\t\t\tstyle={ imageStyle }\n\t\t/>\n\t);\n};\n\nconst HelpDetailBadge = ( { text } ) => {\n\treturn (\n\t\t<View style={ styles.helpDetailBadgeContainer }>\n\t\t\t<Text style={ styles.helpDetailBadgeText }>{ text }</Text>\n\t\t</View>\n\t);\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/editor/src/components/editor-help/view-sections.native.js"],"names":["HelpDetailBodyText","text","bodyStyle","styles","helpDetailBody","helpDetailBodyDark","HelpDetailSectionHeadingText","badge","headingTextStyle","helpDetailSectionHeadingText","helpDetailSectionHeadingTextDark","helpDetailSectionHeading","HelpDetailImage","accessible","accessibilityLabel","source","sourceDarkMode","imageStyle","helpDetailImage","helpDetailImageDark","darkModeEnabled","HelpDetailBadge","helpDetailBadgeContainer","helpDetailBadgeText"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AAQA;;AAhBA;AACA;AACA;;AAGA;AACA;AACA;;AAMA;AACA;AACA;AAGO,MAAMA,kBAAkB,GAAG,CAAE;AAAEC,EAAAA;AAAF,CAAF,KAAgB;AACjD,QAAMC,SAAS,GAAG,2CACjBC,eAAOC,cADU,EAEjBD,eAAOE,kBAFU,CAAlB;AAIA,SACC,4BAAC,iBAAD;AAAM,IAAA,UAAU,MAAhB;AAAiB,IAAA,KAAK,EAAGH;AAAzB,KACGD,IADH,CADD;AAKA,CAVM;;;;AAYA,MAAMK,4BAA4B,GAAG,CAAE;AAAEL,EAAAA,IAAF;AAAQM,EAAAA;AAAR,CAAF,KAAuB;AAClE,QAAMC,gBAAgB,GAAG,2CACxBL,eAAOM,4BADiB,EAExBN,eAAOO,gCAFiB,CAAzB;AAIA,SACC,4BAAC,iBAAD;AAAM,IAAA,KAAK,EAAGP,eAAOQ;AAArB,KACGJ,KAAK,IAAI,4BAAC,eAAD;AAAiB,IAAA,IAAI,EAAGA;AAAxB,IADZ,EAEC,4BAAC,iBAAD;AACC,IAAA,iBAAiB,EAAC,QADnB;AAEC,IAAA,UAAU,MAFX;AAGC,IAAA,KAAK,EAAGC;AAHT,KAKGP,IALH,CAFD,CADD;AAYA,CAjBM;;;;AAmBA,MAAMW,eAAe,GAAG,CAAE;AAChCC,EAAAA,UADgC;AAEhCC,EAAAA,kBAFgC;AAGhCC,EAAAA,MAHgC;AAIhCC,EAAAA;AAJgC,CAAF,KAKxB;AACN,QAAMC,UAAU,GAAG,2CAClBd,eAAOe,eADW,EAElBf,eAAOgB,mBAFW,CAAnB;AAIA,QAAMC,eAAe,GAAG,4CAA8B,MAAtD;AACA,SACC,4BAAC,kBAAD;AACC,IAAA,UAAU,EAAGP,UADd;AAEC,IAAA,kBAAkB,EAAGC,kBAFtB;AAGC,IAAA,MAAM,EACLM,eAAe,IAAIJ,cAAnB,GAAoCA,cAApC,GAAqDD,MAJvD;AAMC,IAAA,KAAK,EAAGE;AANT,IADD;AAUA,CArBM;;;;AAuBP,MAAMI,eAAe,GAAG,CAAE;AAAEpB,EAAAA;AAAF,CAAF,KAAgB;AACvC,SACC,4BAAC,iBAAD;AAAM,IAAA,KAAK,EAAGE,eAAOmB;AAArB,KACC,4BAAC,iBAAD;AAAM,IAAA,KAAK,EAAGnB,eAAOoB;AAArB,KAA6CtB,IAA7C,CADD,CADD;AAKA,CAND","sourcesContent":["/**\n * External dependencies\n */\nimport { Text, Image, View } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tusePreferredColorScheme,\n\tusePreferredColorSchemeStyle,\n} from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\n\nexport const HelpDetailBodyText = ( { text } ) => {\n\tconst bodyStyle = usePreferredColorSchemeStyle(\n\t\tstyles.helpDetailBody,\n\t\tstyles.helpDetailBodyDark\n\t);\n\treturn (\n\t\t<Text selectable style={ bodyStyle }>\n\t\t\t{ text }\n\t\t</Text>\n\t);\n};\n\nexport const HelpDetailSectionHeadingText = ( { text, badge } ) => {\n\tconst headingTextStyle = usePreferredColorSchemeStyle(\n\t\tstyles.helpDetailSectionHeadingText,\n\t\tstyles.helpDetailSectionHeadingTextDark\n\t);\n\treturn (\n\t\t<View style={ styles.helpDetailSectionHeading }>\n\t\t\t{ badge && <HelpDetailBadge text={ badge } /> }\n\t\t\t<Text\n\t\t\t\taccessibilityRole=\"header\"\n\t\t\t\tselectable\n\t\t\t\tstyle={ headingTextStyle }\n\t\t\t>\n\t\t\t\t{ text }\n\t\t\t</Text>\n\t\t</View>\n\t);\n};\n\nexport const HelpDetailImage = ( {\n\taccessible,\n\taccessibilityLabel,\n\tsource,\n\tsourceDarkMode,\n} ) => {\n\tconst imageStyle = usePreferredColorSchemeStyle(\n\t\tstyles.helpDetailImage,\n\t\tstyles.helpDetailImageDark\n\t);\n\tconst darkModeEnabled = usePreferredColorScheme() === 'dark';\n\treturn (\n\t\t<Image\n\t\t\taccessible={ accessible }\n\t\t\taccessibilityLabel={ accessibilityLabel }\n\t\t\tsource={\n\t\t\t\tdarkModeEnabled && sourceDarkMode ? sourceDarkMode : source\n\t\t\t}\n\t\t\tstyle={ imageStyle }\n\t\t/>\n\t);\n};\n\nconst HelpDetailBadge = ( { text } ) => {\n\treturn (\n\t\t<View style={ styles.helpDetailBadgeContainer }>\n\t\t\t<Text style={ styles.helpDetailBadgeText }>{ text }</Text>\n\t\t</View>\n\t);\n};\n"]}
@@ -1,7 +1,5 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
@@ -9,8 +7,6 @@ exports.default = void 0;
9
7
 
10
8
  var _element = require("@wordpress/element");
11
9
 
12
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
-
14
10
  var _i18n = require("@wordpress/i18n");
15
11
 
16
12
  var _components = require("@wordpress/components");
@@ -36,7 +32,7 @@ function EditorHistoryRedo(props, ref) {
36
32
  const {
37
33
  redo
38
34
  } = (0, _data.useDispatch)(_store.store);
39
- return (0, _element.createElement)(_components.Button, (0, _extends2.default)({}, props, {
35
+ return (0, _element.createElement)(_components.Button, { ...props,
40
36
  ref: ref,
41
37
  icon: !(0, _i18n.isRTL)() ? _icons.redo : _icons.undo
42
38
  /* translators: button label text should, if possible, be under 16 characters. */
@@ -49,7 +45,7 @@ function EditorHistoryRedo(props, ref) {
49
45
  "aria-disabled": !hasRedo,
50
46
  onClick: hasRedo ? redo : undefined,
51
47
  className: "editor-history__redo"
52
- }));
48
+ });
53
49
  }
54
50
 
55
51
  var _default = (0, _element.forwardRef)(EditorHistoryRedo);
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/components/editor-history/redo.js"],"names":["EditorHistoryRedo","props","ref","shortcut","displayShortcut","primaryShift","primary","hasRedo","select","editorStore","hasEditorRedo","redo","redoIcon","undoIcon","undefined"],"mappings":";;;;;;;;;AAQA;;;;AALA;;AACA;;AACA;;AACA;;AACA;;AAMA;;AAbA;AACA;AACA;;AAQA;AACA;AACA;AAGA,SAASA,iBAAT,CAA4BC,KAA5B,EAAmCC,GAAnC,EAAyC;AACxC,QAAMC,QAAQ,GAAG,6BACdC,0BAAgBC,YAAhB,CAA8B,GAA9B,CADc,GAEdD,0BAAgBE,OAAhB,CAAyB,GAAzB,CAFH;AAIA,QAAMC,OAAO,GAAG,qBACbC,MAAF,IAAcA,MAAM,CAAEC,YAAF,CAAN,CAAsBC,aAAtB,EADC,EAEf,EAFe,CAAhB;AAIA,QAAM;AAAEC,IAAAA;AAAF,MAAW,uBAAaF,YAAb,CAAjB;AACA,SACC,4BAAC,kBAAD,6BACMR,KADN;AAEC,IAAA,GAAG,EAAGC,GAFP;AAGC,IAAA,IAAI,EAAG,CAAE,kBAAF,GAAYU,WAAZ,GAAuBC;AAC9B;AAJD;AAKC,IAAA,KAAK,EAAG,cAAI,MAAJ,CALT;AAMC,IAAA,QAAQ,EAAGV,QANZ,CAOC;AACA;AACA;AATD;AAUC,qBAAgB,CAAEI,OAVnB;AAWC,IAAA,OAAO,EAAGA,OAAO,GAAGI,IAAH,GAAUG,SAX5B;AAYC,IAAA,SAAS,EAAC;AAZX,KADD;AAgBA;;eAEc,yBAAYd,iBAAZ,C","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { displayShortcut, isAppleOS } from '@wordpress/keycodes';\nimport { redo as redoIcon, undo as undoIcon } from '@wordpress/icons';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nfunction EditorHistoryRedo( props, ref ) {\n\tconst shortcut = isAppleOS()\n\t\t? displayShortcut.primaryShift( 'z' )\n\t\t: displayShortcut.primary( 'y' );\n\n\tconst hasRedo = useSelect(\n\t\t( select ) => select( editorStore ).hasEditorRedo(),\n\t\t[]\n\t);\n\tconst { redo } = useDispatch( editorStore );\n\treturn (\n\t\t<Button\n\t\t\t{ ...props }\n\t\t\tref={ ref }\n\t\t\ticon={ ! isRTL() ? redoIcon : undoIcon }\n\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\tlabel={ __( 'Redo' ) }\n\t\t\tshortcut={ shortcut }\n\t\t\t// If there are no redo levels we don't want to actually disable this\n\t\t\t// button, because it will remove focus for keyboard users.\n\t\t\t// See: https://github.com/WordPress/gutenberg/issues/3486\n\t\t\taria-disabled={ ! hasRedo }\n\t\t\tonClick={ hasRedo ? redo : undefined }\n\t\t\tclassName=\"editor-history__redo\"\n\t\t/>\n\t);\n}\n\nexport default forwardRef( EditorHistoryRedo );\n"]}
1
+ {"version":3,"sources":["@wordpress/editor/src/components/editor-history/redo.js"],"names":["EditorHistoryRedo","props","ref","shortcut","displayShortcut","primaryShift","primary","hasRedo","select","editorStore","hasEditorRedo","redo","redoIcon","undoIcon","undefined"],"mappings":";;;;;;;AAQA;;AALA;;AACA;;AACA;;AACA;;AACA;;AAMA;;AAbA;AACA;AACA;;AAQA;AACA;AACA;AAGA,SAASA,iBAAT,CAA4BC,KAA5B,EAAmCC,GAAnC,EAAyC;AACxC,QAAMC,QAAQ,GAAG,6BACdC,0BAAgBC,YAAhB,CAA8B,GAA9B,CADc,GAEdD,0BAAgBE,OAAhB,CAAyB,GAAzB,CAFH;AAIA,QAAMC,OAAO,GAAG,qBACbC,MAAF,IAAcA,MAAM,CAAEC,YAAF,CAAN,CAAsBC,aAAtB,EADC,EAEf,EAFe,CAAhB;AAIA,QAAM;AAAEC,IAAAA;AAAF,MAAW,uBAAaF,YAAb,CAAjB;AACA,SACC,4BAAC,kBAAD,OACMR,KADN;AAEC,IAAA,GAAG,EAAGC,GAFP;AAGC,IAAA,IAAI,EAAG,CAAE,kBAAF,GAAYU,WAAZ,GAAuBC;AAC9B;AAJD;AAKC,IAAA,KAAK,EAAG,cAAI,MAAJ,CALT;AAMC,IAAA,QAAQ,EAAGV,QANZ,CAOC;AACA;AACA;AATD;AAUC,qBAAgB,CAAEI,OAVnB;AAWC,IAAA,OAAO,EAAGA,OAAO,GAAGI,IAAH,GAAUG,SAX5B;AAYC,IAAA,SAAS,EAAC;AAZX,IADD;AAgBA;;eAEc,yBAAYd,iBAAZ,C","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { displayShortcut, isAppleOS } from '@wordpress/keycodes';\nimport { redo as redoIcon, undo as undoIcon } from '@wordpress/icons';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nfunction EditorHistoryRedo( props, ref ) {\n\tconst shortcut = isAppleOS()\n\t\t? displayShortcut.primaryShift( 'z' )\n\t\t: displayShortcut.primary( 'y' );\n\n\tconst hasRedo = useSelect(\n\t\t( select ) => select( editorStore ).hasEditorRedo(),\n\t\t[]\n\t);\n\tconst { redo } = useDispatch( editorStore );\n\treturn (\n\t\t<Button\n\t\t\t{ ...props }\n\t\t\tref={ ref }\n\t\t\ticon={ ! isRTL() ? redoIcon : undoIcon }\n\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\tlabel={ __( 'Redo' ) }\n\t\t\tshortcut={ shortcut }\n\t\t\t// If there are no redo levels we don't want to actually disable this\n\t\t\t// button, because it will remove focus for keyboard users.\n\t\t\t// See: https://github.com/WordPress/gutenberg/issues/3486\n\t\t\taria-disabled={ ! hasRedo }\n\t\t\tonClick={ hasRedo ? redo : undefined }\n\t\t\tclassName=\"editor-history__redo\"\n\t\t/>\n\t);\n}\n\nexport default forwardRef( EditorHistoryRedo );\n"]}
@@ -1,7 +1,5 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
@@ -9,8 +7,6 @@ exports.default = void 0;
9
7
 
10
8
  var _element = require("@wordpress/element");
11
9
 
12
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
-
14
10
  var _i18n = require("@wordpress/i18n");
15
11
 
16
12
  var _components = require("@wordpress/components");
@@ -35,7 +31,7 @@ function EditorHistoryUndo(props, ref) {
35
31
  const {
36
32
  undo
37
33
  } = (0, _data.useDispatch)(_store.store);
38
- return (0, _element.createElement)(_components.Button, (0, _extends2.default)({}, props, {
34
+ return (0, _element.createElement)(_components.Button, { ...props,
39
35
  ref: ref,
40
36
  icon: !(0, _i18n.isRTL)() ? _icons.undo : _icons.redo
41
37
  /* translators: button label text should, if possible, be under 16 characters. */
@@ -48,7 +44,7 @@ function EditorHistoryUndo(props, ref) {
48
44
  "aria-disabled": !hasUndo,
49
45
  onClick: hasUndo ? undo : undefined,
50
46
  className: "editor-history__undo"
51
- }));
47
+ });
52
48
  }
53
49
 
54
50
  var _default = (0, _element.forwardRef)(EditorHistoryUndo);
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/components/editor-history/undo.js"],"names":["EditorHistoryUndo","props","ref","hasUndo","select","editorStore","hasEditorUndo","undo","undoIcon","redoIcon","displayShortcut","primary","undefined"],"mappings":";;;;;;;;;AAQA;;;;AALA;;AACA;;AACA;;AACA;;AACA;;AAMA;;AAbA;AACA;AACA;;AAQA;AACA;AACA;AAGA,SAASA,iBAAT,CAA4BC,KAA5B,EAAmCC,GAAnC,EAAyC;AACxC,QAAMC,OAAO,GAAG,qBACbC,MAAF,IAAcA,MAAM,CAAEC,YAAF,CAAN,CAAsBC,aAAtB,EADC,EAEf,EAFe,CAAhB;AAIA,QAAM;AAAEC,IAAAA;AAAF,MAAW,uBAAaF,YAAb,CAAjB;AACA,SACC,4BAAC,kBAAD,6BACMJ,KADN;AAEC,IAAA,GAAG,EAAGC,GAFP;AAGC,IAAA,IAAI,EAAG,CAAE,kBAAF,GAAYM,WAAZ,GAAuBC;AAC9B;AAJD;AAKC,IAAA,KAAK,EAAG,cAAI,MAAJ,CALT;AAMC,IAAA,QAAQ,EAAGC,0BAAgBC,OAAhB,CAAyB,GAAzB,CANZ,CAOC;AACA;AACA;AATD;AAUC,qBAAgB,CAAER,OAVnB;AAWC,IAAA,OAAO,EAAGA,OAAO,GAAGI,IAAH,GAAUK,SAX5B;AAYC,IAAA,SAAS,EAAC;AAZX,KADD;AAgBA;;eAEc,yBAAYZ,iBAAZ,C","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { undo as undoIcon, redo as redoIcon } from '@wordpress/icons';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nfunction EditorHistoryUndo( props, ref ) {\n\tconst hasUndo = useSelect(\n\t\t( select ) => select( editorStore ).hasEditorUndo(),\n\t\t[]\n\t);\n\tconst { undo } = useDispatch( editorStore );\n\treturn (\n\t\t<Button\n\t\t\t{ ...props }\n\t\t\tref={ ref }\n\t\t\ticon={ ! isRTL() ? undoIcon : redoIcon }\n\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\tlabel={ __( 'Undo' ) }\n\t\t\tshortcut={ displayShortcut.primary( 'z' ) }\n\t\t\t// If there are no undo levels we don't want to actually disable this\n\t\t\t// button, because it will remove focus for keyboard users.\n\t\t\t// See: https://github.com/WordPress/gutenberg/issues/3486\n\t\t\taria-disabled={ ! hasUndo }\n\t\t\tonClick={ hasUndo ? undo : undefined }\n\t\t\tclassName=\"editor-history__undo\"\n\t\t/>\n\t);\n}\n\nexport default forwardRef( EditorHistoryUndo );\n"]}
1
+ {"version":3,"sources":["@wordpress/editor/src/components/editor-history/undo.js"],"names":["EditorHistoryUndo","props","ref","hasUndo","select","editorStore","hasEditorUndo","undo","undoIcon","redoIcon","displayShortcut","primary","undefined"],"mappings":";;;;;;;AAQA;;AALA;;AACA;;AACA;;AACA;;AACA;;AAMA;;AAbA;AACA;AACA;;AAQA;AACA;AACA;AAGA,SAASA,iBAAT,CAA4BC,KAA5B,EAAmCC,GAAnC,EAAyC;AACxC,QAAMC,OAAO,GAAG,qBACbC,MAAF,IAAcA,MAAM,CAAEC,YAAF,CAAN,CAAsBC,aAAtB,EADC,EAEf,EAFe,CAAhB;AAIA,QAAM;AAAEC,IAAAA;AAAF,MAAW,uBAAaF,YAAb,CAAjB;AACA,SACC,4BAAC,kBAAD,OACMJ,KADN;AAEC,IAAA,GAAG,EAAGC,GAFP;AAGC,IAAA,IAAI,EAAG,CAAE,kBAAF,GAAYM,WAAZ,GAAuBC;AAC9B;AAJD;AAKC,IAAA,KAAK,EAAG,cAAI,MAAJ,CALT;AAMC,IAAA,QAAQ,EAAGC,0BAAgBC,OAAhB,CAAyB,GAAzB,CANZ,CAOC;AACA;AACA;AATD;AAUC,qBAAgB,CAAER,OAVnB;AAWC,IAAA,OAAO,EAAGA,OAAO,GAAGI,IAAH,GAAUK,SAX5B;AAYC,IAAA,SAAS,EAAC;AAZX,IADD;AAgBA;;eAEc,yBAAYZ,iBAAZ,C","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { undo as undoIcon, redo as redoIcon } from '@wordpress/icons';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nfunction EditorHistoryUndo( props, ref ) {\n\tconst hasUndo = useSelect(\n\t\t( select ) => select( editorStore ).hasEditorUndo(),\n\t\t[]\n\t);\n\tconst { undo } = useDispatch( editorStore );\n\treturn (\n\t\t<Button\n\t\t\t{ ...props }\n\t\t\tref={ ref }\n\t\t\ticon={ ! isRTL() ? undoIcon : redoIcon }\n\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\tlabel={ __( 'Undo' ) }\n\t\t\tshortcut={ displayShortcut.primary( 'z' ) }\n\t\t\t// If there are no undo levels we don't want to actually disable this\n\t\t\t// button, because it will remove focus for keyboard users.\n\t\t\t// See: https://github.com/WordPress/gutenberg/issues/3486\n\t\t\taria-disabled={ ! hasUndo }\n\t\t\tonClick={ hasUndo ? undo : undefined }\n\t\t\tclassName=\"editor-history__undo\"\n\t\t/>\n\t);\n}\n\nexport default forwardRef( EditorHistoryUndo );\n"]}
@@ -27,25 +27,18 @@ var _templateValidationNotice = _interopRequireDefault(require("../template-vali
27
27
  /**
28
28
  * Internal dependencies
29
29
  */
30
- function EditorNotices(_ref) {
31
- let {
32
- notices,
33
- onRemove
34
- } = _ref;
35
- const dismissibleNotices = notices.filter(_ref2 => {
36
- let {
37
- isDismissible,
38
- type
39
- } = _ref2;
40
- return isDismissible && type === 'default';
41
- });
42
- const nonDismissibleNotices = notices.filter(_ref3 => {
43
- let {
44
- isDismissible,
45
- type
46
- } = _ref3;
47
- return !isDismissible && type === 'default';
48
- });
30
+ function EditorNotices({
31
+ notices,
32
+ onRemove
33
+ }) {
34
+ const dismissibleNotices = notices.filter(({
35
+ isDismissible,
36
+ type
37
+ }) => isDismissible && type === 'default');
38
+ const nonDismissibleNotices = notices.filter(({
39
+ isDismissible,
40
+ type
41
+ }) => !isDismissible && type === 'default');
49
42
  return (0, _element.createElement)(_element.Fragment, null, (0, _element.createElement)(_components.NoticeList, {
50
43
  notices: nonDismissibleNotices,
51
44
  className: "components-editor-notices__pinned"
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/components/editor-notices/index.js"],"names":["EditorNotices","notices","onRemove","dismissibleNotices","filter","isDismissible","type","nonDismissibleNotices","select","noticesStore","getNotices","dispatch","removeNotice"],"mappings":";;;;;;;;;;;;AAGA;;AACA;;AACA;;AACA;;AAKA;;AAXA;AACA;AACA;;AAMA;AACA;AACA;AAGO,SAASA,aAAT,OAAgD;AAAA,MAAxB;AAAEC,IAAAA,OAAF;AAAWC,IAAAA;AAAX,GAAwB;AACtD,QAAMC,kBAAkB,GAAGF,OAAO,CAACG,MAAR,CAC1B;AAAA,QAAE;AAAEC,MAAAA,aAAF;AAAiBC,MAAAA;AAAjB,KAAF;AAAA,WAA+BD,aAAa,IAAIC,IAAI,KAAK,SAAzD;AAAA,GAD0B,CAA3B;AAGA,QAAMC,qBAAqB,GAAGN,OAAO,CAACG,MAAR,CAC7B;AAAA,QAAE;AAAEC,MAAAA,aAAF;AAAiBC,MAAAA;AAAjB,KAAF;AAAA,WAA+B,CAAED,aAAF,IAAmBC,IAAI,KAAK,SAA3D;AAAA,GAD6B,CAA9B;AAIA,SACC,qDACC,4BAAC,sBAAD;AACC,IAAA,OAAO,EAAGC,qBADX;AAEC,IAAA,SAAS,EAAC;AAFX,IADD,EAKC,4BAAC,sBAAD;AACC,IAAA,OAAO,EAAGJ,kBADX;AAEC,IAAA,SAAS,EAAC,wCAFX;AAGC,IAAA,QAAQ,EAAGD;AAHZ,KAKC,4BAAC,iCAAD,OALD,CALD,CADD;AAeA;;eAEc,sBAAS,CACvB,sBAAcM,MAAF,KAAgB;AAC3BP,EAAAA,OAAO,EAAEO,MAAM,CAAEC,cAAF,CAAN,CAAuBC,UAAvB;AADkB,CAAhB,CAAZ,CADuB,EAIvB,wBAAgBC,QAAF,KAAkB;AAC/BT,EAAAA,QAAQ,EAAES,QAAQ,CAAEF,cAAF,CAAR,CAAyBG;AADJ,CAAlB,CAAd,CAJuB,CAAT,EAOVZ,aAPU,C","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { NoticeList } from '@wordpress/components';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport TemplateValidationNotice from '../template-validation-notice';\n\nexport function EditorNotices( { notices, onRemove } ) {\n\tconst dismissibleNotices = notices.filter(\n\t\t( { isDismissible, type } ) => isDismissible && type === 'default'\n\t);\n\tconst nonDismissibleNotices = notices.filter(\n\t\t( { isDismissible, type } ) => ! isDismissible && type === 'default'\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<NoticeList\n\t\t\t\tnotices={ nonDismissibleNotices }\n\t\t\t\tclassName=\"components-editor-notices__pinned\"\n\t\t\t/>\n\t\t\t<NoticeList\n\t\t\t\tnotices={ dismissibleNotices }\n\t\t\t\tclassName=\"components-editor-notices__dismissible\"\n\t\t\t\tonRemove={ onRemove }\n\t\t\t>\n\t\t\t\t<TemplateValidationNotice />\n\t\t\t</NoticeList>\n\t\t</>\n\t);\n}\n\nexport default compose( [\n\twithSelect( ( select ) => ( {\n\t\tnotices: select( noticesStore ).getNotices(),\n\t} ) ),\n\twithDispatch( ( dispatch ) => ( {\n\t\tonRemove: dispatch( noticesStore ).removeNotice,\n\t} ) ),\n] )( EditorNotices );\n"]}
1
+ {"version":3,"sources":["@wordpress/editor/src/components/editor-notices/index.js"],"names":["EditorNotices","notices","onRemove","dismissibleNotices","filter","isDismissible","type","nonDismissibleNotices","select","noticesStore","getNotices","dispatch","removeNotice"],"mappings":";;;;;;;;;;;;AAGA;;AACA;;AACA;;AACA;;AAKA;;AAXA;AACA;AACA;;AAMA;AACA;AACA;AAGO,SAASA,aAAT,CAAwB;AAAEC,EAAAA,OAAF;AAAWC,EAAAA;AAAX,CAAxB,EAAgD;AACtD,QAAMC,kBAAkB,GAAGF,OAAO,CAACG,MAAR,CAC1B,CAAE;AAAEC,IAAAA,aAAF;AAAiBC,IAAAA;AAAjB,GAAF,KAA+BD,aAAa,IAAIC,IAAI,KAAK,SAD/B,CAA3B;AAGA,QAAMC,qBAAqB,GAAGN,OAAO,CAACG,MAAR,CAC7B,CAAE;AAAEC,IAAAA,aAAF;AAAiBC,IAAAA;AAAjB,GAAF,KAA+B,CAAED,aAAF,IAAmBC,IAAI,KAAK,SAD9B,CAA9B;AAIA,SACC,qDACC,4BAAC,sBAAD;AACC,IAAA,OAAO,EAAGC,qBADX;AAEC,IAAA,SAAS,EAAC;AAFX,IADD,EAKC,4BAAC,sBAAD;AACC,IAAA,OAAO,EAAGJ,kBADX;AAEC,IAAA,SAAS,EAAC,wCAFX;AAGC,IAAA,QAAQ,EAAGD;AAHZ,KAKC,4BAAC,iCAAD,OALD,CALD,CADD;AAeA;;eAEc,sBAAS,CACvB,sBAAcM,MAAF,KAAgB;AAC3BP,EAAAA,OAAO,EAAEO,MAAM,CAAEC,cAAF,CAAN,CAAuBC,UAAvB;AADkB,CAAhB,CAAZ,CADuB,EAIvB,wBAAgBC,QAAF,KAAkB;AAC/BT,EAAAA,QAAQ,EAAES,QAAQ,CAAEF,cAAF,CAAR,CAAyBG;AADJ,CAAlB,CAAd,CAJuB,CAAT,EAOVZ,aAPU,C","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { NoticeList } from '@wordpress/components';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport TemplateValidationNotice from '../template-validation-notice';\n\nexport function EditorNotices( { notices, onRemove } ) {\n\tconst dismissibleNotices = notices.filter(\n\t\t( { isDismissible, type } ) => isDismissible && type === 'default'\n\t);\n\tconst nonDismissibleNotices = notices.filter(\n\t\t( { isDismissible, type } ) => ! isDismissible && type === 'default'\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<NoticeList\n\t\t\t\tnotices={ nonDismissibleNotices }\n\t\t\t\tclassName=\"components-editor-notices__pinned\"\n\t\t\t/>\n\t\t\t<NoticeList\n\t\t\t\tnotices={ dismissibleNotices }\n\t\t\t\tclassName=\"components-editor-notices__dismissible\"\n\t\t\t\tonRemove={ onRemove }\n\t\t\t>\n\t\t\t\t<TemplateValidationNotice />\n\t\t\t</NoticeList>\n\t\t</>\n\t);\n}\n\nexport default compose( [\n\twithSelect( ( select ) => ( {\n\t\tnotices: select( noticesStore ).getNotices(),\n\t} ) ),\n\twithDispatch( ( dispatch ) => ( {\n\t\tonRemove: dispatch( noticesStore ).removeNotice,\n\t} ) ),\n] )( EditorNotices );\n"]}
@@ -21,12 +21,9 @@ function EditorSnackbars() {
21
21
  const {
22
22
  removeNotice
23
23
  } = (0, _data.useDispatch)(_notices.store);
24
- const snackbarNotices = notices.filter(_ref => {
25
- let {
26
- type
27
- } = _ref;
28
- return type === 'snackbar';
29
- });
24
+ const snackbarNotices = notices.filter(({
25
+ type
26
+ }) => type === 'snackbar');
30
27
  return (0, _element.createElement)(_components.SnackbarList, {
31
28
  notices: snackbarNotices,
32
29
  className: "components-editor-notices__snackbar",
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/components/editor-snackbars/index.js"],"names":["EditorSnackbars","notices","select","noticesStore","getNotices","removeNotice","snackbarNotices","filter","type"],"mappings":";;;;;;;;;AAGA;;AACA;;AACA;;AALA;AACA;AACA;AAKe,SAASA,eAAT,GAA2B;AACzC,QAAMC,OAAO,GAAG,qBACbC,MAAF,IAAcA,MAAM,CAAEC,cAAF,CAAN,CAAuBC,UAAvB,EADC,EAEf,EAFe,CAAhB;AAIA,QAAM;AAAEC,IAAAA;AAAF,MAAmB,uBAAaF,cAAb,CAAzB;AACA,QAAMG,eAAe,GAAGL,OAAO,CAACM,MAAR,CACvB;AAAA,QAAE;AAAEC,MAAAA;AAAF,KAAF;AAAA,WAAgBA,IAAI,KAAK,UAAzB;AAAA,GADuB,CAAxB;AAIA,SACC,4BAAC,wBAAD;AACC,IAAA,OAAO,EAAGF,eADX;AAEC,IAAA,SAAS,EAAC,qCAFX;AAGC,IAAA,QAAQ,EAAGD;AAHZ,IADD;AAOA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { SnackbarList } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as noticesStore } from '@wordpress/notices';\n\nexport default function EditorSnackbars() {\n\tconst notices = useSelect(\n\t\t( select ) => select( noticesStore ).getNotices(),\n\t\t[]\n\t);\n\tconst { removeNotice } = useDispatch( noticesStore );\n\tconst snackbarNotices = notices.filter(\n\t\t( { type } ) => type === 'snackbar'\n\t);\n\n\treturn (\n\t\t<SnackbarList\n\t\t\tnotices={ snackbarNotices }\n\t\t\tclassName=\"components-editor-notices__snackbar\"\n\t\t\tonRemove={ removeNotice }\n\t\t/>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/editor/src/components/editor-snackbars/index.js"],"names":["EditorSnackbars","notices","select","noticesStore","getNotices","removeNotice","snackbarNotices","filter","type"],"mappings":";;;;;;;;;AAGA;;AACA;;AACA;;AALA;AACA;AACA;AAKe,SAASA,eAAT,GAA2B;AACzC,QAAMC,OAAO,GAAG,qBACbC,MAAF,IAAcA,MAAM,CAAEC,cAAF,CAAN,CAAuBC,UAAvB,EADC,EAEf,EAFe,CAAhB;AAIA,QAAM;AAAEC,IAAAA;AAAF,MAAmB,uBAAaF,cAAb,CAAzB;AACA,QAAMG,eAAe,GAAGL,OAAO,CAACM,MAAR,CACvB,CAAE;AAAEC,IAAAA;AAAF,GAAF,KAAgBA,IAAI,KAAK,UADF,CAAxB;AAIA,SACC,4BAAC,wBAAD;AACC,IAAA,OAAO,EAAGF,eADX;AAEC,IAAA,SAAS,EAAC,qCAFX;AAGC,IAAA,QAAQ,EAAGD;AAHZ,IADD;AAOA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { SnackbarList } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as noticesStore } from '@wordpress/notices';\n\nexport default function EditorSnackbars() {\n\tconst notices = useSelect(\n\t\t( select ) => select( noticesStore ).getNotices(),\n\t\t[]\n\t);\n\tconst { removeNotice } = useDispatch( noticesStore );\n\tconst snackbarNotices = notices.filter(\n\t\t( { type } ) => type === 'snackbar'\n\t);\n\n\treturn (\n\t\t<SnackbarList\n\t\t\tnotices={ snackbarNotices }\n\t\t\tclassName=\"components-editor-notices__snackbar\"\n\t\t\tonRemove={ removeNotice }\n\t\t/>\n\t);\n}\n"]}
@@ -28,13 +28,12 @@ var _store = require("../../store");
28
28
  /**
29
29
  * Internal dependencies
30
30
  */
31
- function EntityRecordItem(_ref) {
32
- let {
33
- record,
34
- checked,
35
- onChange,
36
- closePanel
37
- } = _ref;
31
+ function EntityRecordItem({
32
+ record,
33
+ checked,
34
+ onChange,
35
+ closePanel
36
+ }) {
38
37
  const {
39
38
  name,
40
39
  kind,
@@ -42,14 +41,12 @@ function EntityRecordItem(_ref) {
42
41
  key
43
42
  } = record;
44
43
  const parentBlockId = (0, _data.useSelect)(select => {
45
- var _blocks$;
46
-
47
44
  // Get entity's blocks.
48
45
  const {
49
46
  blocks = []
50
47
  } = select(_coreData.store).getEditedEntityRecord(kind, name, key); // Get parents of the entity's first block.
51
48
 
52
- const parents = select(_blockEditor.store).getBlockParents((_blocks$ = blocks[0]) === null || _blocks$ === void 0 ? void 0 : _blocks$.clientId); // Return closest parent block's clientId.
49
+ const parents = select(_blockEditor.store).getBlockParents(blocks[0]?.clientId); // Return closest parent block's clientId.
53
50
 
54
51
  return parents[parents.length - 1];
55
52
  }, []); // Handle templates that might use default descriptive titles.
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/components/entities-saved-states/entity-record-item.js"],"names":["EntityRecordItem","record","checked","onChange","closePanel","name","kind","title","key","parentBlockId","select","blocks","coreStore","getEditedEntityRecord","parents","blockEditorStore","getBlockParents","clientId","length","entityRecordTitle","template","editorStore","__experimentalGetTemplateInfo","isSelected","selectedBlockId","getSelectedBlockClientId","isSelectedText","selectBlock","selectParentBlock","selectAndDismiss"],"mappings":";;;;;;;AAMA;;AAHA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AAKA;;AAdA;AACA;AACA;;AASA;AACA;AACA;AAGe,SAASA,gBAAT,OAKX;AAAA,MALsC;AACzCC,IAAAA,MADyC;AAEzCC,IAAAA,OAFyC;AAGzCC,IAAAA,QAHyC;AAIzCC,IAAAA;AAJyC,GAKtC;AACH,QAAM;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,IAAR;AAAcC,IAAAA,KAAd;AAAqBC,IAAAA;AAArB,MAA6BP,MAAnC;AACA,QAAMQ,aAAa,GAAG,qBAAaC,MAAF,IAAc;AAAA;;AAC9C;AACA,UAAM;AAAEC,MAAAA,MAAM,GAAG;AAAX,QAAkBD,MAAM,CAAEE,eAAF,CAAN,CAAoBC,qBAApB,CACvBP,IADuB,EAEvBD,IAFuB,EAGvBG,GAHuB,CAAxB,CAF8C,CAO9C;;AACA,UAAMM,OAAO,GAAGJ,MAAM,CAAEK,kBAAF,CAAN,CAA2BC,eAA3B,aACfL,MAAM,CAAE,CAAF,CADS,6CACf,SAAaM,QADE,CAAhB,CAR8C,CAW9C;;AACA,WAAOH,OAAO,CAAEA,OAAO,CAACI,MAAR,GAAiB,CAAnB,CAAd;AACA,GAbqB,EAanB,EAbmB,CAAtB,CAFG,CAiBH;;AACA,QAAM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ACd,qDACC,4BAAC,kBAAD;AACC,IAAA,OAAO,EAAGmB,iBADX;AAEC,IAAA,SAAS,EAAC,oCAFX;AAGC,IAAA,QAAQ,EAAGL;AAHZ,KAKGG,cALH,CADD,EAQC,4BAAC,kBAAD;AACC,IAAA,OAAO,EAAGG,gBADX;AAEC,IAAA,SAAS,EAAC,0CAFX;AAGC,IAAA,QAAQ,EAAGN;AAHZ,KAKGG,cALH,CARD,CADc,GAiBX,IA7BL,CADD;AAiCA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { CheckboxControl, Button, PanelRow } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useCallback } from '@wordpress/element';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nexport default function EntityRecordItem( {\n\trecord,\n\tchecked,\n\tonChange,\n\tclosePanel,\n} ) {\n\tconst { name, kind, title, key } = record;\n\tconst parentBlockId = useSelect( ( select ) => {\n\t\t// Get entity's blocks.\n\t\tconst { blocks = [] } = select( coreStore ).getEditedEntityRecord(\n\t\t\tkind,\n\t\t\tname,\n\t\t\tkey\n\t\t);\n\t\t// Get parents of the entity's first block.\n\t\tconst parents = select( blockEditorStore ).getBlockParents(\n\t\t\tblocks[ 0 ]?.clientId\n\t\t);\n\t\t// Return closest parent block's clientId.\n\t\treturn parents[ parents.length - 1 ];\n\t}, [] );\n\n\t// Handle templates that might use default descriptive titles.\n\tconst entityRecordTitle = useSelect(\n\t\t( select ) => {\n\t\t\tif ( 'postType' !== kind || 'wp_template' !== name ) {\n\t\t\t\treturn title;\n\t\t\t}\n\n\t\t\tconst template = select( coreStore ).getEditedEntityRecord(\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\tkey\n\t\t\t);\n\t\t\treturn select( editorStore ).__experimentalGetTemplateInfo(\n\t\t\t\ttemplate\n\t\t\t).title;\n\t\t},\n\t\t[ name, kind, title, key ]\n\t);\n\n\tconst isSelected = useSelect(\n\t\t( select ) => {\n\t\t\tconst selectedBlockId =\n\t\t\t\tselect( blockEditorStore ).getSelectedBlockClientId();\n\t\t\treturn selectedBlockId === parentBlockId;\n\t\t},\n\t\t[ parentBlockId ]\n\t);\n\tconst isSelectedText = isSelected ? __( 'Selected' ) : __( 'Select' );\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\tconst selectParentBlock = useCallback(\n\t\t() => selectBlock( parentBlockId ),\n\t\t[ parentBlockId ]\n\t);\n\tconst selectAndDismiss = useCallback( () => {\n\t\tselectBlock( parentBlockId );\n\t\tclosePanel();\n\t}, [ parentBlockId ] );\n\n\treturn (\n\t\t<PanelRow>\n\t\t\t<CheckboxControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tlabel={\n\t\t\t\t\t<strong>\n\t\t\t\t\t\t{ decodeEntities( entityRecordTitle ) ||\n\t\t\t\t\t\t\t__( 'Untitled' ) }\n\t\t\t\t\t</strong>\n\t\t\t\t}\n\t\t\t\tchecked={ checked }\n\t\t\t\tonChange={ onChange }\n\t\t\t/>\n\t\t\t{ parentBlockId ? (\n\t\t\t\t<>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tonClick={ selectParentBlock }\n\t\t\t\t\t\tclassName=\"entities-saved-states__find-entity\"\n\t\t\t\t\t\tdisabled={ isSelected }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ isSelectedText }\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tonClick={ selectAndDismiss }\n\t\t\t\t\t\tclassName=\"entities-saved-states__find-entity-small\"\n\t\t\t\t\t\tdisabled={ isSelected }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ isSelectedText }\n\t\t\t\t\t</Button>\n\t\t\t\t</>\n\t\t\t) : null }\n\t\t</PanelRow>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/editor/src/components/entities-saved-states/entity-record-item.js"],"names":["EntityRecordItem","record","checked","onChange","closePanel","name","kind","title","key","parentBlockId","select","blocks","coreStore","getEditedEntityRecord","parents","blockEditorStore","getBlockParents","clientId","length","entityRecordTitle","template","editorStore","__experimentalGetTemplateInfo","isSelected","selectedBlockId","getSelectedBlockClientId","isSelectedText","selectBlock","selectParentBlock","selectAndDismiss"],"mappings":";;;;;;;AAMA;;AAHA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AAKA;;AAdA;AACA;AACA;;AASA;AACA;AACA;AAGe,SAASA,gBAAT,CAA2B;AACzCC,EAAAA,MADyC;AAEzCC,EAAAA,OAFyC;AAGzCC,EAAAA,QAHyC;AAIzCC,EAAAA;AAJyC,CAA3B,EAKX;AACH,QAAM;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,IAAR;AAAcC,IAAAA,KAAd;AAAqBC,IAAAA;AAArB,MAA6BP,MAAnC;AACA,QAAMQ,aAAa,GAAG,qBAAaC,MAAF,IAAc;AAC9C;AACA,UAAM;AAAEC,MAAAA,MAAM,GAAG;AAAX,QAAkBD,MAAM,CAAEE,eAAF,CAAN,CAAoBC,qBAApB,CACvBP,IADuB,EAEvBD,IAFuB,EAGvBG,GAHuB,CAAxB,CAF8C,CAO9C;;AACA,UAAMM,OAAO,GAAGJ,MAAM,CAAEK,kBAAF,CAAN,CAA2BC,eAA3B,CACfL,MAAM,CAAE,CAAF,CAAN,EAAaM,QADE,CAAhB,CAR8C,CAW9C;;AACA,WAAOH,OAAO,CAAEA,OAAO,CAACI,MAAR,GAAiB,CAAnB,CAAd;AACA,GAbqB,EAanB,EAbmB,CAAtB,CAFG,CAiBH;;AACA,QAAMC,iBAAiB,GAAG,qBACvBT,MAAF,IAAc;AACb,QAAK,eAAeJ,IAAf,IAAuB,kBAAkBD,IAA9C,EAAqD;AACpD,aAAOE,KAAP;AACA;;AAED,UAAMa,QAAQ,GAAGV,MAAM,CAAEE,eAAF,CAAN,CAA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EAAGG,gBADX;AAEC,IAAA,SAAS,EAAC,0CAFX;AAGC,IAAA,QAAQ,EAAGN;AAHZ,KAKGG,cALH,CARD,CADc,GAiBX,IA7BL,CADD;AAiCA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { CheckboxControl, Button, PanelRow } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useCallback } from '@wordpress/element';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nexport default function EntityRecordItem( {\n\trecord,\n\tchecked,\n\tonChange,\n\tclosePanel,\n} ) {\n\tconst { name, kind, title, key } = record;\n\tconst parentBlockId = useSelect( ( select ) => {\n\t\t// Get entity's blocks.\n\t\tconst { blocks = [] } = select( coreStore ).getEditedEntityRecord(\n\t\t\tkind,\n\t\t\tname,\n\t\t\tkey\n\t\t);\n\t\t// Get parents of the entity's first block.\n\t\tconst parents = select( blockEditorStore ).getBlockParents(\n\t\t\tblocks[ 0 ]?.clientId\n\t\t);\n\t\t// Return closest parent block's clientId.\n\t\treturn parents[ parents.length - 1 ];\n\t}, [] );\n\n\t// Handle templates that might use default descriptive titles.\n\tconst entityRecordTitle = useSelect(\n\t\t( select ) => {\n\t\t\tif ( 'postType' !== kind || 'wp_template' !== name ) {\n\t\t\t\treturn title;\n\t\t\t}\n\n\t\t\tconst template = select( coreStore ).getEditedEntityRecord(\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\tkey\n\t\t\t);\n\t\t\treturn select( editorStore ).__experimentalGetTemplateInfo(\n\t\t\t\ttemplate\n\t\t\t).title;\n\t\t},\n\t\t[ name, kind, title, key ]\n\t);\n\n\tconst isSelected = useSelect(\n\t\t( select ) => {\n\t\t\tconst selectedBlockId =\n\t\t\t\tselect( blockEditorStore ).getSelectedBlockClientId();\n\t\t\treturn selectedBlockId === parentBlockId;\n\t\t},\n\t\t[ parentBlockId ]\n\t);\n\tconst isSelectedText = isSelected ? __( 'Selected' ) : __( 'Select' );\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\tconst selectParentBlock = useCallback(\n\t\t() => selectBlock( parentBlockId ),\n\t\t[ parentBlockId ]\n\t);\n\tconst selectAndDismiss = useCallback( () => {\n\t\tselectBlock( parentBlockId );\n\t\tclosePanel();\n\t}, [ parentBlockId ] );\n\n\treturn (\n\t\t<PanelRow>\n\t\t\t<CheckboxControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tlabel={\n\t\t\t\t\t<strong>\n\t\t\t\t\t\t{ decodeEntities( entityRecordTitle ) ||\n\t\t\t\t\t\t\t__( 'Untitled' ) }\n\t\t\t\t\t</strong>\n\t\t\t\t}\n\t\t\t\tchecked={ checked }\n\t\t\t\tonChange={ onChange }\n\t\t\t/>\n\t\t\t{ parentBlockId ? (\n\t\t\t\t<>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tonClick={ selectParentBlock }\n\t\t\t\t\t\tclassName=\"entities-saved-states__find-entity\"\n\t\t\t\t\t\tdisabled={ isSelected }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ isSelectedText }\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tonClick={ selectAndDismiss }\n\t\t\t\t\t\tclassName=\"entities-saved-states__find-entity-small\"\n\t\t\t\t\t\tdisabled={ isSelected }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ isSelectedText }\n\t\t\t\t\t</Button>\n\t\t\t\t</>\n\t\t\t) : null }\n\t\t</PanelRow>\n\t);\n}\n"]}
@@ -40,13 +40,12 @@ function getEntityDescription(entity, count) {
40
40
  }
41
41
  }
42
42
 
43
- function EntityTypeList(_ref) {
44
- let {
45
- list,
46
- unselectedEntities,
47
- setUnselectedEntities,
48
- closePanel
49
- } = _ref;
43
+ function EntityTypeList({
44
+ list,
45
+ unselectedEntities,
46
+ setUnselectedEntities,
47
+ closePanel
48
+ }) {
50
49
  const count = list.length;
51
50
  const firstRecord = list[0];
52
51
  const entityConfig = (0, _data.useSelect)(select => select(_coreData.store).getEntityConfig(firstRecord.kind, firstRecord.name), [firstRecord.kind, firstRecord.name]);
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/components/entities-saved-states/entity-type-list.js"],"names":["getEntityDescription","entity","count","EntityTypeList","list","unselectedEntities","setUnselectedEntities","closePanel","length","firstRecord","entityConfig","select","coreStore","getEntityConfig","kind","name","entityLabel","label","description","map","record","key","property","some","elt","value"],"mappings":";;;;;;;;;;;AAGA;;AACA;;AACA;;AACA;;AAKA;;AAXA;AACA;AACA;;AAMA;AACA;AACA;AAGA,SAASA,oBAAT,CAA+BC,MAA/B,EAAuCC,KAAvC,EAA+C;AAC9C,UAASD,MAAT;AACC,SAAK,MAAL;AACC,aAAO,MAAMC,KAAN,GACJ,cAAI,0CAAJ,CADI,GAEJ,cAAI,4CAAJ,CAFH;;AAGD,SAAK,aAAL;AACC,aAAO,cACN,iEADM,CAAP;;AAGD,SAAK,MAAL;AACA,SAAK,MAAL;AACC,aAAO,cAAI,0CAAJ,CAAP;AAXF;AAaA;;AAEc,SAASC,cAAT,OAKX;AAAA,MALoC;AACvCC,IAAAA,IADuC;AAEvCC,IAAAA,kBAFuC;AAGvCC,IAAAA,qBAHuC;AAIvCC,IAAAA;AAJuC,GAKpC;AACH,QAAML,KAAK,GAAGE,IAAI,CAACI,MAAnB;AACA,QAAMC,WAAW,GAAGL,IAAI,CAAE,CAAF,CAAxB;AACA,QAAMM,YAAY,GAAG,qBAClBC,MAAF,IACCA,MAAM,CAAEC,eAAF,CAAN,CAAoBC,eAApB,CACCJ,WAAW,CAACK,IADb,EAECL,WAAW,CAACM,IAFb,CAFmB,EAMpB,CAAEN,WAAW,CAACK,IAAd,EAAoBL,WAAW,CAACM,IAAhC,CANoB,CAArB;AAQA,QAAM;AAAEA,IAAAA;AAAF,MAAWN,WAAjB;AAEA,MAAIO,WAAW,GAAGN,YAAY,CAACO,KAA/B;;AACA,MAAKF,IAAI,KAAK,kBAAd,EAAmC;AAClCC,IAAAA,WAAW,GACV,MAAMd,KAAN,GAAc,cAAI,eAAJ,CAAd,GAAsC,cAAI,gBAAJ,CADvC;AAEA,GAjBE,CAkBH;;;AACA,QAAMgB,WAAW,GAAGlB,oBAAoB,CAAEe,IAAF,EAAQb,KAAR,CAAxC;AAEA,SACC,4BAAC,qBAAD;AAAW,IAAA,KAAK,EAAGc,WAAnB;AAAiC,IAAA,WAAW,EAAG;AAA/C,KACGE,WAAW,IAAI,4BAAC,oBAAD,QAAYA,WAAZ,CADlB,EAEGd,IAAI,CAACe,GAAL,CAAYC,MAAF,IAAc;AACzB,WACC,4BAAC,yBAAD;AACC,MAAA,GAAG,EAAGA,MAAM,CAACC,GAAP,IAAcD,MAAM,CAACE,QAD5B;AAEC,MAAA,MAAM,EAAGF,MAFV;AAGC,MAAA,OAAO,EACN,CAAEf,kBAAkB,CAACkB,IAAnB,CACCC,GAAF,IACCA,GAAG,CAACV,IAAJ,KAAaM,MAAM,CAACN,IAApB,IACAU,GAAG,CAACT,IAAJ,KAAaK,MAAM,CAACL,IADpB,IAEAS,GAAG,CAACH,GAAJ,KAAYD,MAAM,CAACC,GAFnB,IAGAG,GAAG,CAACF,QAAJ,KAAiBF,MAAM,CAACE,QALxB,CAJJ;AAYC,MAAA,QAAQ,EAAKG,KAAF,IACVnB,qBAAqB,CAAEc,MAAF,EAAUK,KAAV,CAbvB;AAeC,MAAA,UAAU,EAAGlB;AAfd,MADD;AAmBA,GApBC,CAFH,CADD;AA0BA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { PanelBody, PanelRow } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport EntityRecordItem from './entity-record-item';\n\nfunction getEntityDescription( entity, count ) {\n\tswitch ( entity ) {\n\t\tcase 'site':\n\t\t\treturn 1 === count\n\t\t\t\t? __( 'This change will affect your whole site.' )\n\t\t\t\t: __( 'These changes will affect your whole site.' );\n\t\tcase 'wp_template':\n\t\t\treturn __(\n\t\t\t\t'This change will affect pages and posts that use this template.'\n\t\t\t);\n\t\tcase 'page':\n\t\tcase 'post':\n\t\t\treturn __( 'The following content has been modified.' );\n\t}\n}\n\nexport default function EntityTypeList( {\n\tlist,\n\tunselectedEntities,\n\tsetUnselectedEntities,\n\tclosePanel,\n} ) {\n\tconst count = list.length;\n\tconst firstRecord = list[ 0 ];\n\tconst entityConfig = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).getEntityConfig(\n\t\t\t\tfirstRecord.kind,\n\t\t\t\tfirstRecord.name\n\t\t\t),\n\t\t[ firstRecord.kind, firstRecord.name ]\n\t);\n\tconst { name } = firstRecord;\n\n\tlet entityLabel = entityConfig.label;\n\tif ( name === 'wp_template_part' ) {\n\t\tentityLabel =\n\t\t\t1 === count ? __( 'Template Part' ) : __( 'Template Parts' );\n\t}\n\t// Set description based on type of entity.\n\tconst description = getEntityDescription( name, count );\n\n\treturn (\n\t\t<PanelBody title={ entityLabel } initialOpen={ true }>\n\t\t\t{ description && <PanelRow>{ description }</PanelRow> }\n\t\t\t{ list.map( ( record ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<EntityRecordItem\n\t\t\t\t\t\tkey={ record.key || record.property }\n\t\t\t\t\t\trecord={ record }\n\t\t\t\t\t\tchecked={\n\t\t\t\t\t\t\t! unselectedEntities.some(\n\t\t\t\t\t\t\t\t( elt ) =>\n\t\t\t\t\t\t\t\t\telt.kind === record.kind &&\n\t\t\t\t\t\t\t\t\telt.name === record.name &&\n\t\t\t\t\t\t\t\t\telt.key === record.key &&\n\t\t\t\t\t\t\t\t\telt.property === record.property\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tsetUnselectedEntities( record, value )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tclosePanel={ closePanel }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</PanelBody>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/editor/src/components/entities-saved-states/entity-type-list.js"],"names":["getEntityDescription","entity","count","EntityTypeList","list","unselectedEntities","setUnselectedEntities","closePanel","length","firstRecord","entityConfig","select","coreStore","getEntityConfig","kind","name","entityLabel","label","description","map","record","key","property","some","elt","value"],"mappings":";;;;;;;;;;;AAGA;;AACA;;AACA;;AACA;;AAKA;;AAXA;AACA;AACA;;AAMA;AACA;AACA;AAGA,SAASA,oBAAT,CAA+BC,MAA/B,EAAuCC,KAAvC,EAA+C;AAC9C,UAASD,MAAT;AACC,SAAK,MAAL;AACC,aAAO,MAAMC,KAAN,GACJ,cAAI,0CAAJ,CADI,GAEJ,cAAI,4CAAJ,CAFH;;AAGD,SAAK,aAAL;AACC,aAAO,cACN,iEADM,CAAP;;AAGD,SAAK,MAAL;AACA,SAAK,MAAL;AACC,aAAO,cAAI,0CAAJ,CAAP;AAXF;AAaA;;AAEc,SAASC,cAAT,CAAyB;AACvCC,EAAAA,IADuC;AAEvCC,EAAAA,kBAFuC;AAGvCC,EAAAA,qBAHuC;AAIvCC,EAAAA;AAJuC,CAAzB,EAKX;AACH,QAAML,KAAK,GAAGE,IAAI,CAACI,MAAnB;AACA,QAAMC,WAAW,GAAGL,IAAI,CAAE,CAAF,CAAxB;AACA,QAAMM,YAAY,GAAG,qBAClBC,MAAF,IACCA,MAAM,CAAEC,eAAF,CAAN,CAAoBC,eAApB,CACCJ,WAAW,CAACK,IADb,EAECL,WAAW,CAACM,IAFb,CAFmB,EAMpB,CAAEN,WAAW,CAACK,IAAd,EAAoBL,WAAW,CAACM,IAAhC,CANoB,CAArB;AAQA,QAAM;AAAEA,IAAAA;AAAF,MAAWN,WAAjB;AAEA,MAAIO,WAAW,GAAGN,YAAY,CAACO,KAA/B;;AACA,MAAKF,IAAI,KAAK,kBAAd,EAAmC;AAClCC,IAAAA,WAAW,GACV,MAAMd,KAAN,GAAc,cAAI,eAAJ,CAAd,GAAsC,cAAI,gBAAJ,CADvC;AAEA,GAjBE,CAkBH;;;AACA,QAAMgB,WAAW,GAAGlB,oBAAoB,CAAEe,IAAF,EAAQb,KAAR,CAAxC;AAEA,SACC,4BAAC,qBAAD;AAAW,IAAA,KAAK,EAAGc,WAAnB;AAAiC,IAAA,WAAW,EAAG;AAA/C,KACGE,WAAW,IAAI,4BAAC,oBAAD,QAAYA,WAAZ,CADlB,EAEGd,IAAI,CAACe,GAAL,CAAYC,MAAF,IAAc;AACzB,WACC,4BAAC,yBAAD;AACC,MAAA,GAAG,EAAGA,MAAM,CAACC,GAAP,IAAcD,MAAM,CAACE,QAD5B;AAEC,MAAA,MAAM,EAAGF,MAFV;AAGC,MAAA,OAAO,EACN,CAAEf,kBAAkB,CAACkB,IAAnB,CACCC,GAAF,IACCA,GAAG,CAACV,IAAJ,KAAaM,MAAM,CAACN,IAApB,IACAU,GAAG,CAACT,IAAJ,KAAaK,MAAM,CAACL,IADpB,IAEAS,GAAG,CAACH,GAAJ,KAAYD,MAAM,CAACC,GAFnB,IAGAG,GAAG,CAACF,QAAJ,KAAiBF,MAAM,CAACE,QALxB,CAJJ;AAYC,MAAA,QAAQ,EAAKG,KAAF,IACVnB,qBAAqB,CAAEc,MAAF,EAAUK,KAAV,CAbvB;AAeC,MAAA,UAAU,EAAGlB;AAfd,MADD;AAmBA,GApBC,CAFH,CADD;AA0BA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { PanelBody, PanelRow } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport EntityRecordItem from './entity-record-item';\n\nfunction getEntityDescription( entity, count ) {\n\tswitch ( entity ) {\n\t\tcase 'site':\n\t\t\treturn 1 === count\n\t\t\t\t? __( 'This change will affect your whole site.' )\n\t\t\t\t: __( 'These changes will affect your whole site.' );\n\t\tcase 'wp_template':\n\t\t\treturn __(\n\t\t\t\t'This change will affect pages and posts that use this template.'\n\t\t\t);\n\t\tcase 'page':\n\t\tcase 'post':\n\t\t\treturn __( 'The following content has been modified.' );\n\t}\n}\n\nexport default function EntityTypeList( {\n\tlist,\n\tunselectedEntities,\n\tsetUnselectedEntities,\n\tclosePanel,\n} ) {\n\tconst count = list.length;\n\tconst firstRecord = list[ 0 ];\n\tconst entityConfig = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).getEntityConfig(\n\t\t\t\tfirstRecord.kind,\n\t\t\t\tfirstRecord.name\n\t\t\t),\n\t\t[ firstRecord.kind, firstRecord.name ]\n\t);\n\tconst { name } = firstRecord;\n\n\tlet entityLabel = entityConfig.label;\n\tif ( name === 'wp_template_part' ) {\n\t\tentityLabel =\n\t\t\t1 === count ? __( 'Template Part' ) : __( 'Template Parts' );\n\t}\n\t// Set description based on type of entity.\n\tconst description = getEntityDescription( name, count );\n\n\treturn (\n\t\t<PanelBody title={ entityLabel } initialOpen={ true }>\n\t\t\t{ description && <PanelRow>{ description }</PanelRow> }\n\t\t\t{ list.map( ( record ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<EntityRecordItem\n\t\t\t\t\t\tkey={ record.key || record.property }\n\t\t\t\t\t\trecord={ record }\n\t\t\t\t\t\tchecked={\n\t\t\t\t\t\t\t! unselectedEntities.some(\n\t\t\t\t\t\t\t\t( elt ) =>\n\t\t\t\t\t\t\t\t\telt.kind === record.kind &&\n\t\t\t\t\t\t\t\t\telt.name === record.name &&\n\t\t\t\t\t\t\t\t\telt.key === record.key &&\n\t\t\t\t\t\t\t\t\telt.property === record.property\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tsetUnselectedEntities( record, value )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tclosePanel={ closePanel }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</PanelBody>\n\t);\n}\n"]}
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useIsDirty = void 0;
7
+
8
+ var _data = require("@wordpress/data");
9
+
10
+ var _coreData = require("@wordpress/core-data");
11
+
12
+ var _element = require("@wordpress/element");
13
+
14
+ var _i18n = require("@wordpress/i18n");
15
+
16
+ /**
17
+ * WordPress dependencies
18
+ */
19
+ const TRANSLATED_SITE_PROPERTIES = {
20
+ title: (0, _i18n.__)('Title'),
21
+ description: (0, _i18n.__)('Tagline'),
22
+ site_logo: (0, _i18n.__)('Logo'),
23
+ site_icon: (0, _i18n.__)('Icon'),
24
+ show_on_front: (0, _i18n.__)('Show on front'),
25
+ page_on_front: (0, _i18n.__)('Page on front'),
26
+ posts_per_page: (0, _i18n.__)('Maximum posts per page'),
27
+ default_comment_status: (0, _i18n.__)('Allow comments on new posts')
28
+ };
29
+
30
+ const useIsDirty = () => {
31
+ const {
32
+ dirtyEntityRecords
33
+ } = (0, _data.useSelect)(select => {
34
+ const dirtyRecords = select(_coreData.store).__experimentalGetDirtyEntityRecords(); // Remove site object and decouple into its edited pieces.
35
+
36
+
37
+ const dirtyRecordsWithoutSite = dirtyRecords.filter(record => !(record.kind === 'root' && record.name === 'site'));
38
+ const siteEdits = select(_coreData.store).getEntityRecordEdits('root', 'site');
39
+ const siteEditsAsEntities = [];
40
+
41
+ for (const property in siteEdits) {
42
+ siteEditsAsEntities.push({
43
+ kind: 'root',
44
+ name: 'site',
45
+ title: TRANSLATED_SITE_PROPERTIES[property] || property,
46
+ property
47
+ });
48
+ }
49
+
50
+ const dirtyRecordsWithSiteItems = [...dirtyRecordsWithoutSite, ...siteEditsAsEntities];
51
+ return {
52
+ dirtyEntityRecords: dirtyRecordsWithSiteItems
53
+ };
54
+ }, []); // Unchecked entities to be ignored by save function.
55
+
56
+ const [unselectedEntities, _setUnselectedEntities] = (0, _element.useState)([]);
57
+
58
+ const setUnselectedEntities = ({
59
+ kind,
60
+ name,
61
+ key,
62
+ property
63
+ }, checked) => {
64
+ if (checked) {
65
+ _setUnselectedEntities(unselectedEntities.filter(elt => elt.kind !== kind || elt.name !== name || elt.key !== key || elt.property !== property));
66
+ } else {
67
+ _setUnselectedEntities([...unselectedEntities, {
68
+ kind,
69
+ name,
70
+ key,
71
+ property
72
+ }]);
73
+ }
74
+ };
75
+
76
+ const isDirty = dirtyEntityRecords.length - unselectedEntities.length > 0;
77
+ return {
78
+ dirtyEntityRecords,
79
+ isDirty,
80
+ setUnselectedEntities,
81
+ unselectedEntities
82
+ };
83
+ };
84
+
85
+ exports.useIsDirty = useIsDirty;
86
+ //# sourceMappingURL=use-is-dirty.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/editor/src/components/entities-saved-states/hooks/use-is-dirty.js"],"names":["TRANSLATED_SITE_PROPERTIES","title","description","site_logo","site_icon","show_on_front","page_on_front","posts_per_page","default_comment_status","useIsDirty","dirtyEntityRecords","select","dirtyRecords","coreStore","__experimentalGetDirtyEntityRecords","dirtyRecordsWithoutSite","filter","record","kind","name","siteEdits","getEntityRecordEdits","siteEditsAsEntities","property","push","dirtyRecordsWithSiteItems","unselectedEntities","_setUnselectedEntities","setUnselectedEntities","key","checked","elt","isDirty","length"],"mappings":";;;;;;;AAGA;;AACA;;AACA;;AACA;;AANA;AACA;AACA;AAMA,MAAMA,0BAA0B,GAAG;AAClCC,EAAAA,KAAK,EAAE,cAAI,OAAJ,CAD2B;AAElCC,EAAAA,WAAW,EAAE,cAAI,SAAJ,CAFqB;AAGlCC,EAAAA,SAAS,EAAE,cAAI,MAAJ,CAHuB;AAIlCC,EAAAA,SAAS,EAAE,cAAI,MAAJ,CAJuB;AAKlCC,EAAAA,aAAa,EAAE,cAAI,eAAJ,CALmB;AAMlCC,EA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AAAA,GAAd;AAAmBN,IAAAA;AAAnB,GAD6B,EAE7BO,OAF6B,KAGzB;AACJ,QAAKA,OAAL,EAAe;AACdH,MAAAA,sBAAsB,CACrBD,kBAAkB,CAACV,MAAnB,CACGe,GAAF,IACCA,GAAG,CAACb,IAAJ,KAAaA,IAAb,IACAa,GAAG,CAACZ,IAAJ,KAAaA,IADb,IAEAY,GAAG,CAACF,GAAJ,KAAYA,GAFZ,IAGAE,GAAG,CAACR,QAAJ,KAAiBA,QALnB,CADqB,CAAtB;AASA,KAVD,MAUO;AACNI,MAAAA,sBAAsB,CAAE,CACvB,GAAGD,kBADoB,EAEvB;AAAER,QAAAA,IAAF;AAAQC,QAAAA,IAAR;AAAcU,QAAAA,GAAd;AAAmBN,QAAAA;AAAnB,OAFuB,CAAF,CAAtB;AAIA;AACD,GApBD;;AAsBA,QAAMS,OAAO,GAAGtB,kBAAkB,CAACuB,MAAnB,GAA4BP,kBAAkB,CAACO,MAA/C,GAAwD,CAAxE;AAEA,SAAO;AACNvB,IAAAA,kBADM;AAENsB,IAAAA,OAFM;AAGNJ,IAAAA,qBAHM;AAINF,IAAAA;AAJM,GAAP;AAMA,CAnEM","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\nconst TRANSLATED_SITE_PROPERTIES = {\n\ttitle: __( 'Title' ),\n\tdescription: __( 'Tagline' ),\n\tsite_logo: __( 'Logo' ),\n\tsite_icon: __( 'Icon' ),\n\tshow_on_front: __( 'Show on front' ),\n\tpage_on_front: __( 'Page on front' ),\n\tposts_per_page: __( 'Maximum posts per page' ),\n\tdefault_comment_status: __( 'Allow comments on new posts' ),\n};\n\nexport const useIsDirty = () => {\n\tconst { dirtyEntityRecords } = useSelect( ( select ) => {\n\t\tconst dirtyRecords =\n\t\t\tselect( coreStore ).__experimentalGetDirtyEntityRecords();\n\n\t\t// Remove site object and decouple into its edited pieces.\n\t\tconst dirtyRecordsWithoutSite = dirtyRecords.filter(\n\t\t\t( record ) => ! ( record.kind === 'root' && record.name === 'site' )\n\t\t);\n\n\t\tconst siteEdits = select( coreStore ).getEntityRecordEdits(\n\t\t\t'root',\n\t\t\t'site'\n\t\t);\n\n\t\tconst siteEditsAsEntities = [];\n\t\tfor ( const property in siteEdits ) {\n\t\t\tsiteEditsAsEntities.push( {\n\t\t\t\tkind: 'root',\n\t\t\t\tname: 'site',\n\t\t\t\ttitle: TRANSLATED_SITE_PROPERTIES[ property ] || property,\n\t\t\t\tproperty,\n\t\t\t} );\n\t\t}\n\t\tconst dirtyRecordsWithSiteItems = [\n\t\t\t...dirtyRecordsWithoutSite,\n\t\t\t...siteEditsAsEntities,\n\t\t];\n\n\t\treturn {\n\t\t\tdirtyEntityRecords: dirtyRecordsWithSiteItems,\n\t\t};\n\t}, [] );\n\n\t// Unchecked entities to be ignored by save function.\n\tconst [ unselectedEntities, _setUnselectedEntities ] = useState( [] );\n\n\tconst setUnselectedEntities = (\n\t\t{ kind, name, key, property },\n\t\tchecked\n\t) => {\n\t\tif ( checked ) {\n\t\t\t_setUnselectedEntities(\n\t\t\t\tunselectedEntities.filter(\n\t\t\t\t\t( elt ) =>\n\t\t\t\t\t\telt.kind !== kind ||\n\t\t\t\t\t\telt.name !== name ||\n\t\t\t\t\t\telt.key !== key ||\n\t\t\t\t\t\telt.property !== property\n\t\t\t\t)\n\t\t\t);\n\t\t} else {\n\t\t\t_setUnselectedEntities( [\n\t\t\t\t...unselectedEntities,\n\t\t\t\t{ kind, name, key, property },\n\t\t\t] );\n\t\t}\n\t};\n\n\tconst isDirty = dirtyEntityRecords.length - unselectedEntities.length > 0;\n\n\treturn {\n\t\tdirtyEntityRecords,\n\t\tisDirty,\n\t\tsetUnselectedEntities,\n\t\tunselectedEntities,\n\t};\n};\n"]}