@wordpress/editor 13.10.0 → 13.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (373) hide show
  1. package/CHANGELOG.md +4 -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 +3 -4
  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 +4 -5
  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 +19 -24
  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-notices/index.js +12 -19
  25. package/build/components/editor-notices/index.js.map +1 -1
  26. package/build/components/editor-snackbars/index.js +3 -6
  27. package/build/components/editor-snackbars/index.js.map +1 -1
  28. package/build/components/entities-saved-states/entity-record-item.js +7 -10
  29. package/build/components/entities-saved-states/entity-record-item.js.map +1 -1
  30. package/build/components/entities-saved-states/entity-type-list.js +6 -7
  31. package/build/components/entities-saved-states/entity-type-list.js.map +1 -1
  32. package/build/components/entities-saved-states/hooks/use-is-dirty.js +84 -0
  33. package/build/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -0
  34. package/build/components/entities-saved-states/index.js +42 -110
  35. package/build/components/entities-saved-states/index.js.map +1 -1
  36. package/build/components/error-boundary/index.js +4 -5
  37. package/build/components/error-boundary/index.js.map +1 -1
  38. package/build/components/global-keyboard-shortcuts/save-shortcut.js +3 -4
  39. package/build/components/global-keyboard-shortcuts/save-shortcut.js.map +1 -1
  40. package/build/components/index.js +9 -0
  41. package/build/components/index.js.map +1 -1
  42. package/build/components/media-categories/index.js +25 -42
  43. package/build/components/media-categories/index.js.map +1 -1
  44. package/build/components/page-attributes/check.js +4 -7
  45. package/build/components/page-attributes/check.js.map +1 -1
  46. package/build/components/page-attributes/order.js +5 -8
  47. package/build/components/page-attributes/order.js.map +1 -1
  48. package/build/components/page-attributes/parent.js +5 -12
  49. package/build/components/page-attributes/parent.js.map +1 -1
  50. package/build/components/post-author/check.js +6 -7
  51. package/build/components/post-author/check.js.map +1 -1
  52. package/build/components/post-author/combobox.js +3 -6
  53. package/build/components/post-author/combobox.js.map +1 -1
  54. package/build/components/post-author/index.js +1 -1
  55. package/build/components/post-author/index.js.map +1 -1
  56. package/build/components/post-comments/index.js +4 -6
  57. package/build/components/post-comments/index.js.map +1 -1
  58. package/build/components/post-excerpt/index.js +4 -5
  59. package/build/components/post-excerpt/index.js.map +1 -1
  60. package/build/components/post-featured-image/index.js +56 -69
  61. package/build/components/post-featured-image/index.js.map +1 -1
  62. package/build/components/post-format/check.js +4 -5
  63. package/build/components/post-format/check.js.map +1 -1
  64. package/build/components/post-format/index.js +1 -1
  65. package/build/components/post-format/index.js.map +1 -1
  66. package/build/components/post-last-revision/check.js +5 -7
  67. package/build/components/post-last-revision/check.js.map +1 -1
  68. package/build/components/post-last-revision/index.js +4 -5
  69. package/build/components/post-last-revision/index.js.map +1 -1
  70. package/build/components/post-locked-modal/index.js +1 -1
  71. package/build/components/post-locked-modal/index.js.map +1 -1
  72. package/build/components/post-pending-status/check.js +7 -9
  73. package/build/components/post-pending-status/check.js.map +1 -1
  74. package/build/components/post-pending-status/index.js +4 -6
  75. package/build/components/post-pending-status/index.js.map +1 -1
  76. package/build/components/post-pingbacks/index.js +4 -6
  77. package/build/components/post-pingbacks/index.js.map +1 -1
  78. package/build/components/post-preview-button/index.js +8 -12
  79. package/build/components/post-preview-button/index.js.map +1 -1
  80. package/build/components/post-publish-button/index.js +6 -13
  81. package/build/components/post-publish-button/index.js.map +1 -1
  82. package/build/components/post-publish-button/label.js +14 -17
  83. package/build/components/post-publish-button/label.js.map +1 -1
  84. package/build/components/post-publish-panel/index.js +6 -7
  85. package/build/components/post-publish-panel/index.js.map +1 -1
  86. package/build/components/post-publish-panel/maybe-category-panel.js +2 -4
  87. package/build/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  88. package/build/components/post-publish-panel/maybe-post-format-panel.js +9 -12
  89. package/build/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  90. package/build/components/post-publish-panel/maybe-tags-panel.js +4 -7
  91. package/build/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  92. package/build/components/post-publish-panel/postpublish.js +8 -11
  93. package/build/components/post-publish-panel/postpublish.js.map +1 -1
  94. package/build/components/post-publish-panel/prepublish.js +5 -6
  95. package/build/components/post-publish-panel/prepublish.js.map +1 -1
  96. package/build/components/post-saved-state/index.js +13 -8
  97. package/build/components/post-saved-state/index.js.map +1 -1
  98. package/build/components/post-schedule/check.js +6 -8
  99. package/build/components/post-schedule/check.js.map +1 -1
  100. package/build/components/post-schedule/index.js +8 -12
  101. package/build/components/post-schedule/index.js.map +1 -1
  102. package/build/components/post-schedule/label.js +7 -10
  103. package/build/components/post-schedule/label.js.map +1 -1
  104. package/build/components/post-slug/check.js +3 -4
  105. package/build/components/post-slug/check.js.map +1 -1
  106. package/build/components/post-slug/index.js +5 -6
  107. package/build/components/post-slug/index.js.map +1 -1
  108. package/build/components/post-sticky/check.js +7 -9
  109. package/build/components/post-sticky/check.js.map +1 -1
  110. package/build/components/post-sticky/index.js +4 -5
  111. package/build/components/post-sticky/index.js.map +1 -1
  112. package/build/components/post-switch-to-draft-button/index.js +6 -7
  113. package/build/components/post-switch-to-draft-button/index.js.map +1 -1
  114. package/build/components/post-taxonomies/check.js +6 -7
  115. package/build/components/post-taxonomies/check.js.map +1 -1
  116. package/build/components/post-taxonomies/flat-term-selector.js +13 -14
  117. package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
  118. package/build/components/post-taxonomies/hierarchical-term-selector.js +13 -14
  119. package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  120. package/build/components/post-taxonomies/index.js +6 -11
  121. package/build/components/post-taxonomies/index.js.map +1 -1
  122. package/build/components/post-taxonomies/most-used-terms.js +5 -6
  123. package/build/components/post-taxonomies/most-used-terms.js.map +1 -1
  124. package/build/components/post-template/index.js +6 -9
  125. package/build/components/post-template/index.js.map +1 -1
  126. package/build/components/post-title/index.js +2 -6
  127. package/build/components/post-title/index.js.map +1 -1
  128. package/build/components/post-title/index.native.js +8 -11
  129. package/build/components/post-title/index.native.js.map +1 -1
  130. package/build/components/post-trash/check.js +7 -9
  131. package/build/components/post-trash/check.js.map +1 -1
  132. package/build/components/post-type-support-check/index.js +5 -6
  133. package/build/components/post-type-support-check/index.js.map +1 -1
  134. package/build/components/post-url/check.js +4 -5
  135. package/build/components/post-url/check.js.map +1 -1
  136. package/build/components/post-url/index.js +8 -9
  137. package/build/components/post-url/index.js.map +1 -1
  138. package/build/components/post-visibility/check.js +6 -7
  139. package/build/components/post-visibility/check.js.map +1 -1
  140. package/build/components/post-visibility/index.js +10 -12
  141. package/build/components/post-visibility/index.js.map +1 -1
  142. package/build/components/post-visibility/label.js +1 -3
  143. package/build/components/post-visibility/label.js.map +1 -1
  144. package/build/components/provider/index.js +9 -10
  145. package/build/components/provider/index.js.map +1 -1
  146. package/build/components/provider/index.native.js +14 -20
  147. package/build/components/provider/index.native.js.map +1 -1
  148. package/build/components/provider/use-block-editor-settings.js +6 -10
  149. package/build/components/provider/use-block-editor-settings.js.map +1 -1
  150. package/build/components/provider/use-block-editor-settings.native.js +1 -3
  151. package/build/components/provider/use-block-editor-settings.native.js.map +1 -1
  152. package/build/components/table-of-contents/index.js +26 -33
  153. package/build/components/table-of-contents/index.js.map +1 -1
  154. package/build/components/table-of-contents/panel.js +4 -5
  155. package/build/components/table-of-contents/panel.js.map +1 -1
  156. package/build/components/template-validation-notice/index.js +4 -6
  157. package/build/components/template-validation-notice/index.js.map +1 -1
  158. package/build/components/theme-support-check/index.js +7 -8
  159. package/build/components/theme-support-check/index.js.map +1 -1
  160. package/build/hooks/custom-sources-backwards-compatibility.js +16 -35
  161. package/build/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  162. package/build/hooks/default-autocompleters.js +1 -2
  163. package/build/hooks/default-autocompleters.js.map +1 -1
  164. package/build/private-apis.js +4 -1
  165. package/build/private-apis.js.map +1 -1
  166. package/build/store/actions.js +147 -179
  167. package/build/store/actions.js.map +1 -1
  168. package/build/store/actions.native.js +1 -2
  169. package/build/store/actions.native.js.map +1 -1
  170. package/build/store/reducer.js +14 -44
  171. package/build/store/reducer.js.map +1 -1
  172. package/build/store/reducer.native.js +3 -12
  173. package/build/store/reducer.native.js.map +1 -1
  174. package/build/store/selectors.js +23 -54
  175. package/build/store/selectors.js.map +1 -1
  176. package/build/store/utils/notice-builder.js +3 -3
  177. package/build/store/utils/notice-builder.js.map +1 -1
  178. package/build/utils/media-upload/index.js +11 -15
  179. package/build/utils/media-upload/index.js.map +1 -1
  180. package/build/utils/terms.js +3 -6
  181. package/build/utils/terms.js.map +1 -1
  182. package/build-module/components/autosave-monitor/index.js +1 -2
  183. package/build-module/components/autosave-monitor/index.js.map +1 -1
  184. package/build-module/components/deprecated.js +3 -4
  185. package/build-module/components/deprecated.js.map +1 -1
  186. package/build-module/components/document-outline/check.js +4 -5
  187. package/build-module/components/document-outline/check.js.map +1 -1
  188. package/build-module/components/document-outline/index.js +12 -16
  189. package/build-module/components/document-outline/index.js.map +1 -1
  190. package/build-module/components/document-outline/item.js +22 -25
  191. package/build-module/components/document-outline/item.js.map +1 -1
  192. package/build-module/components/editor-help/help-detail-navigation-screen.native.js +4 -5
  193. package/build-module/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
  194. package/build-module/components/editor-help/help-get-support-button.native.js +4 -5
  195. package/build-module/components/editor-help/help-get-support-button.native.js.map +1 -1
  196. package/build-module/components/editor-help/help-section-title.native.js +3 -4
  197. package/build-module/components/editor-help/help-section-title.native.js.map +1 -1
  198. package/build-module/components/editor-help/help-topic-row.native.js +6 -7
  199. package/build-module/components/editor-help/help-topic-row.native.js.map +1 -1
  200. package/build-module/components/editor-help/index.native.js +19 -23
  201. package/build-module/components/editor-help/index.native.js.map +1 -1
  202. package/build-module/components/editor-help/view-sections.native.js +16 -20
  203. package/build-module/components/editor-help/view-sections.native.js.map +1 -1
  204. package/build-module/components/editor-notices/index.js +12 -19
  205. package/build-module/components/editor-notices/index.js.map +1 -1
  206. package/build-module/components/editor-snackbars/index.js +3 -6
  207. package/build-module/components/editor-snackbars/index.js.map +1 -1
  208. package/build-module/components/entities-saved-states/entity-record-item.js +7 -10
  209. package/build-module/components/entities-saved-states/entity-record-item.js.map +1 -1
  210. package/build-module/components/entities-saved-states/entity-type-list.js +6 -7
  211. package/build-module/components/entities-saved-states/entity-type-list.js.map +1 -1
  212. package/build-module/components/entities-saved-states/hooks/use-is-dirty.js +70 -0
  213. package/build-module/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -0
  214. package/build-module/components/entities-saved-states/index.js +43 -113
  215. package/build-module/components/entities-saved-states/index.js.map +1 -1
  216. package/build-module/components/error-boundary/index.js +4 -5
  217. package/build-module/components/error-boundary/index.js.map +1 -1
  218. package/build-module/components/global-keyboard-shortcuts/save-shortcut.js +3 -4
  219. package/build-module/components/global-keyboard-shortcuts/save-shortcut.js.map +1 -1
  220. package/build-module/components/index.js +1 -0
  221. package/build-module/components/index.js.map +1 -1
  222. package/build-module/components/media-categories/index.js +25 -42
  223. package/build-module/components/media-categories/index.js.map +1 -1
  224. package/build-module/components/page-attributes/check.js +4 -7
  225. package/build-module/components/page-attributes/check.js.map +1 -1
  226. package/build-module/components/page-attributes/order.js +5 -8
  227. package/build-module/components/page-attributes/order.js.map +1 -1
  228. package/build-module/components/page-attributes/parent.js +5 -12
  229. package/build-module/components/page-attributes/parent.js.map +1 -1
  230. package/build-module/components/post-author/check.js +6 -7
  231. package/build-module/components/post-author/check.js.map +1 -1
  232. package/build-module/components/post-author/combobox.js +3 -6
  233. package/build-module/components/post-author/combobox.js.map +1 -1
  234. package/build-module/components/post-author/index.js +1 -1
  235. package/build-module/components/post-author/index.js.map +1 -1
  236. package/build-module/components/post-comments/index.js +4 -6
  237. package/build-module/components/post-comments/index.js.map +1 -1
  238. package/build-module/components/post-excerpt/index.js +4 -5
  239. package/build-module/components/post-excerpt/index.js.map +1 -1
  240. package/build-module/components/post-featured-image/index.js +56 -69
  241. package/build-module/components/post-featured-image/index.js.map +1 -1
  242. package/build-module/components/post-format/check.js +4 -5
  243. package/build-module/components/post-format/check.js.map +1 -1
  244. package/build-module/components/post-format/index.js +1 -1
  245. package/build-module/components/post-format/index.js.map +1 -1
  246. package/build-module/components/post-last-revision/check.js +5 -7
  247. package/build-module/components/post-last-revision/check.js.map +1 -1
  248. package/build-module/components/post-last-revision/index.js +4 -5
  249. package/build-module/components/post-last-revision/index.js.map +1 -1
  250. package/build-module/components/post-locked-modal/index.js +1 -1
  251. package/build-module/components/post-locked-modal/index.js.map +1 -1
  252. package/build-module/components/post-pending-status/check.js +7 -9
  253. package/build-module/components/post-pending-status/check.js.map +1 -1
  254. package/build-module/components/post-pending-status/index.js +4 -6
  255. package/build-module/components/post-pending-status/index.js.map +1 -1
  256. package/build-module/components/post-pingbacks/index.js +4 -6
  257. package/build-module/components/post-pingbacks/index.js.map +1 -1
  258. package/build-module/components/post-preview-button/index.js +8 -12
  259. package/build-module/components/post-preview-button/index.js.map +1 -1
  260. package/build-module/components/post-publish-button/index.js +6 -13
  261. package/build-module/components/post-publish-button/index.js.map +1 -1
  262. package/build-module/components/post-publish-button/label.js +14 -17
  263. package/build-module/components/post-publish-button/label.js.map +1 -1
  264. package/build-module/components/post-publish-panel/index.js +6 -7
  265. package/build-module/components/post-publish-panel/index.js.map +1 -1
  266. package/build-module/components/post-publish-panel/maybe-category-panel.js +2 -4
  267. package/build-module/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  268. package/build-module/components/post-publish-panel/maybe-post-format-panel.js +9 -12
  269. package/build-module/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  270. package/build-module/components/post-publish-panel/maybe-tags-panel.js +4 -7
  271. package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  272. package/build-module/components/post-publish-panel/postpublish.js +8 -11
  273. package/build-module/components/post-publish-panel/postpublish.js.map +1 -1
  274. package/build-module/components/post-publish-panel/prepublish.js +5 -6
  275. package/build-module/components/post-publish-panel/prepublish.js.map +1 -1
  276. package/build-module/components/post-saved-state/index.js +13 -8
  277. package/build-module/components/post-saved-state/index.js.map +1 -1
  278. package/build-module/components/post-schedule/check.js +6 -8
  279. package/build-module/components/post-schedule/check.js.map +1 -1
  280. package/build-module/components/post-schedule/index.js +8 -12
  281. package/build-module/components/post-schedule/index.js.map +1 -1
  282. package/build-module/components/post-schedule/label.js +7 -10
  283. package/build-module/components/post-schedule/label.js.map +1 -1
  284. package/build-module/components/post-slug/check.js +3 -4
  285. package/build-module/components/post-slug/check.js.map +1 -1
  286. package/build-module/components/post-slug/index.js +5 -6
  287. package/build-module/components/post-slug/index.js.map +1 -1
  288. package/build-module/components/post-sticky/check.js +7 -9
  289. package/build-module/components/post-sticky/check.js.map +1 -1
  290. package/build-module/components/post-sticky/index.js +4 -5
  291. package/build-module/components/post-sticky/index.js.map +1 -1
  292. package/build-module/components/post-switch-to-draft-button/index.js +6 -7
  293. package/build-module/components/post-switch-to-draft-button/index.js.map +1 -1
  294. package/build-module/components/post-taxonomies/check.js +6 -7
  295. package/build-module/components/post-taxonomies/check.js.map +1 -1
  296. package/build-module/components/post-taxonomies/flat-term-selector.js +13 -14
  297. package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
  298. package/build-module/components/post-taxonomies/hierarchical-term-selector.js +13 -14
  299. package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  300. package/build-module/components/post-taxonomies/index.js +6 -11
  301. package/build-module/components/post-taxonomies/index.js.map +1 -1
  302. package/build-module/components/post-taxonomies/most-used-terms.js +5 -6
  303. package/build-module/components/post-taxonomies/most-used-terms.js.map +1 -1
  304. package/build-module/components/post-template/index.js +6 -9
  305. package/build-module/components/post-template/index.js.map +1 -1
  306. package/build-module/components/post-title/index.js +2 -6
  307. package/build-module/components/post-title/index.js.map +1 -1
  308. package/build-module/components/post-title/index.native.js +8 -11
  309. package/build-module/components/post-title/index.native.js.map +1 -1
  310. package/build-module/components/post-trash/check.js +7 -9
  311. package/build-module/components/post-trash/check.js.map +1 -1
  312. package/build-module/components/post-type-support-check/index.js +5 -6
  313. package/build-module/components/post-type-support-check/index.js.map +1 -1
  314. package/build-module/components/post-url/check.js +4 -5
  315. package/build-module/components/post-url/check.js.map +1 -1
  316. package/build-module/components/post-url/index.js +8 -9
  317. package/build-module/components/post-url/index.js.map +1 -1
  318. package/build-module/components/post-visibility/check.js +6 -7
  319. package/build-module/components/post-visibility/check.js.map +1 -1
  320. package/build-module/components/post-visibility/index.js +10 -12
  321. package/build-module/components/post-visibility/index.js.map +1 -1
  322. package/build-module/components/post-visibility/label.js +1 -3
  323. package/build-module/components/post-visibility/label.js.map +1 -1
  324. package/build-module/components/provider/index.js +9 -10
  325. package/build-module/components/provider/index.js.map +1 -1
  326. package/build-module/components/provider/index.native.js +14 -20
  327. package/build-module/components/provider/index.native.js.map +1 -1
  328. package/build-module/components/provider/use-block-editor-settings.js +6 -10
  329. package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
  330. package/build-module/components/provider/use-block-editor-settings.native.js +1 -3
  331. package/build-module/components/provider/use-block-editor-settings.native.js.map +1 -1
  332. package/build-module/components/table-of-contents/index.js +26 -33
  333. package/build-module/components/table-of-contents/index.js.map +1 -1
  334. package/build-module/components/table-of-contents/panel.js +4 -5
  335. package/build-module/components/table-of-contents/panel.js.map +1 -1
  336. package/build-module/components/template-validation-notice/index.js +4 -6
  337. package/build-module/components/template-validation-notice/index.js.map +1 -1
  338. package/build-module/components/theme-support-check/index.js +7 -8
  339. package/build-module/components/theme-support-check/index.js.map +1 -1
  340. package/build-module/hooks/custom-sources-backwards-compatibility.js +16 -35
  341. package/build-module/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  342. package/build-module/hooks/default-autocompleters.js +1 -2
  343. package/build-module/hooks/default-autocompleters.js.map +1 -1
  344. package/build-module/private-apis.js +3 -1
  345. package/build-module/private-apis.js.map +1 -1
  346. package/build-module/store/actions.js +147 -179
  347. package/build-module/store/actions.js.map +1 -1
  348. package/build-module/store/actions.native.js +1 -2
  349. package/build-module/store/actions.native.js.map +1 -1
  350. package/build-module/store/reducer.js +14 -44
  351. package/build-module/store/reducer.js.map +1 -1
  352. package/build-module/store/reducer.native.js +3 -12
  353. package/build-module/store/reducer.native.js.map +1 -1
  354. package/build-module/store/selectors.js +21 -54
  355. package/build-module/store/selectors.js.map +1 -1
  356. package/build-module/store/utils/notice-builder.js +3 -3
  357. package/build-module/store/utils/notice-builder.js.map +1 -1
  358. package/build-module/utils/media-upload/index.js +11 -15
  359. package/build-module/utils/media-upload/index.js.map +1 -1
  360. package/build-module/utils/terms.js +3 -6
  361. package/build-module/utils/terms.js.map +1 -1
  362. package/build-style/style-rtl.css +1 -1
  363. package/build-style/style.css +1 -1
  364. package/package.json +31 -31
  365. package/src/components/entities-saved-states/hooks/use-is-dirty.js +85 -0
  366. package/src/components/entities-saved-states/index.js +29 -107
  367. package/src/components/entities-saved-states/test/use-is-dirty.js +94 -0
  368. package/src/components/index.js +1 -0
  369. package/src/components/post-saved-state/index.js +6 -0
  370. package/src/components/post-taxonomies/flat-term-selector.js +1 -1
  371. package/src/components/post-title/index.js +2 -1
  372. package/src/components/provider/use-block-editor-settings.js +1 -0
  373. package/src/private-apis.js +2 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/components/editor-help/help-get-support-button.native.js"],"names":["Pressable","Text","usePreferredColorSchemeStyle","styles","HelpGetSupportButton","onPress","title","buttonStyle","button","buttonDark","textStyle","buttonText","buttonTextDark"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,SAAT,EAAoBC,IAApB,QAAgC,cAAhC;AAEA;AACA;AACA;;AACA,SAASC,4BAAT,QAA6C,oBAA7C;AAEA;AACA;AACA;;AACA,OAAOC,MAAP,MAAmB,cAAnB;;AAEA,MAAMC,oBAAoB,GAAG,QAA0B;AAAA,MAAxB;AAAEC,IAAAA,OAAF;AAAWC,IAAAA;AAAX,GAAwB;AACtD,QAAMC,WAAW,GAAGL,4BAA4B,CAC/CC,MAAM,CAACK,MADwC,EAE/CL,MAAM,CAACM,UAFwC,CAAhD;AAKA,QAAMC,SAAS,GAAGR,4BAA4B,CAC7CC,MAAM,CAACQ,UADsC,EAE7CR,MAAM,CAACS,cAFsC,CAA9C;AAKA,SACC,cAAC,SAAD;AACC,IAAA,KAAK,EAAGL,WADT;AAEC,IAAA,OAAO,EAAGF,OAFX;AAGC,IAAA,iBAAiB,EAAG;AAHrB,KAKC,cAAC,IAAD;AAAM,IAAA,KAAK,EAAGK;AAAd,KAA4BJ,KAA5B,CALD,CADD;AASA,CApBD;;AAsBA,eAAeF,oBAAf","sourcesContent":["/**\n * External dependencies\n */\nimport { Pressable, Text } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\n\nconst HelpGetSupportButton = ( { onPress, title } ) => {\n\tconst buttonStyle = usePreferredColorSchemeStyle(\n\t\tstyles.button,\n\t\tstyles.buttonDark\n\t);\n\n\tconst textStyle = usePreferredColorSchemeStyle(\n\t\tstyles.buttonText,\n\t\tstyles.buttonTextDark\n\t);\n\n\treturn (\n\t\t<Pressable\n\t\t\tstyle={ buttonStyle }\n\t\t\tonPress={ onPress }\n\t\t\taccessibilityRole={ 'button' }\n\t\t>\n\t\t\t<Text style={ textStyle }>{ title }</Text>\n\t\t</Pressable>\n\t);\n};\n\nexport default HelpGetSupportButton;\n"]}
1
+ {"version":3,"sources":["@wordpress/editor/src/components/editor-help/help-get-support-button.native.js"],"names":["Pressable","Text","usePreferredColorSchemeStyle","styles","HelpGetSupportButton","onPress","title","buttonStyle","button","buttonDark","textStyle","buttonText","buttonTextDark"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,SAAT,EAAoBC,IAApB,QAAgC,cAAhC;AAEA;AACA;AACA;;AACA,SAASC,4BAAT,QAA6C,oBAA7C;AAEA;AACA;AACA;;AACA,OAAOC,MAAP,MAAmB,cAAnB;;AAEA,MAAMC,oBAAoB,GAAG,CAAE;AAAEC,EAAAA,OAAF;AAAWC,EAAAA;AAAX,CAAF,KAA0B;AACtD,QAAMC,WAAW,GAAGL,4BAA4B,CAC/CC,MAAM,CAACK,MADwC,EAE/CL,MAAM,CAACM,UAFwC,CAAhD;AAKA,QAAMC,SAAS,GAAGR,4BAA4B,CAC7CC,MAAM,CAACQ,UADsC,EAE7CR,MAAM,CAACS,cAFsC,CAA9C;AAKA,SACC,cAAC,SAAD;AACC,IAAA,KAAK,EAAGL,WADT;AAEC,IAAA,OAAO,EAAGF,OAFX;AAGC,IAAA,iBAAiB,EAAG;AAHrB,KAKC,cAAC,IAAD;AAAM,IAAA,KAAK,EAAGK;AAAd,KAA4BJ,KAA5B,CALD,CADD;AASA,CApBD;;AAsBA,eAAeF,oBAAf","sourcesContent":["/**\n * External dependencies\n */\nimport { Pressable, Text } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\n\nconst HelpGetSupportButton = ( { onPress, title } ) => {\n\tconst buttonStyle = usePreferredColorSchemeStyle(\n\t\tstyles.button,\n\t\tstyles.buttonDark\n\t);\n\n\tconst textStyle = usePreferredColorSchemeStyle(\n\t\tstyles.buttonText,\n\t\tstyles.buttonTextDark\n\t);\n\n\treturn (\n\t\t<Pressable\n\t\t\tstyle={ buttonStyle }\n\t\t\tonPress={ onPress }\n\t\t\taccessibilityRole={ 'button' }\n\t\t>\n\t\t\t<Text style={ textStyle }>{ title }</Text>\n\t\t</Pressable>\n\t);\n};\n\nexport default HelpGetSupportButton;\n"]}
@@ -15,10 +15,9 @@ import { usePreferredColorSchemeStyle } from '@wordpress/compose';
15
15
 
16
16
  import styles from './style.scss';
17
17
 
18
- const HelpSectionTitle = _ref => {
19
- let {
20
- children
21
- } = _ref;
18
+ const HelpSectionTitle = ({
19
+ children
20
+ }) => {
22
21
  const helpSectionTitle = usePreferredColorSchemeStyle(styles.helpSectionTitle, styles.helpSectionTitleDark);
23
22
  return createElement(View, {
24
23
  style: styles.helpSectionTitleContainer
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/components/editor-help/help-section-title.native.js"],"names":["Text","View","usePreferredColorSchemeStyle","styles","HelpSectionTitle","children","helpSectionTitle","helpSectionTitleDark","helpSectionTitleContainer"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,IAAT,EAAeC,IAAf,QAA2B,cAA3B;AAEA;AACA;AACA;;AACA,SAASC,4BAAT,QAA6C,oBAA7C;AAEA;AACA;AACA;;AACA,OAAOC,MAAP,MAAmB,cAAnB;;AAEA,MAAMC,gBAAgB,GAAG,QAAoB;AAAA,MAAlB;AAAEC,IAAAA;AAAF,GAAkB;AAC5C,QAAMC,gBAAgB,GAAGJ,4BAA4B,CACpDC,MAAM,CAACG,gBAD6C,EAEpDH,MAAM,CAACI,oBAF6C,CAArD;AAKA,SACC,cAAC,IAAD;AAAM,IAAA,KAAK,EAAGJ,MAAM,CAACK;AAArB,KACC,cAAC,IAAD;AAAM,IAAA,KAAK,EAAGF;AAAd,KAAmCD,QAAnC,CADD,CADD;AAKA,CAXD;;AAaA,eAAeD,gBAAf","sourcesContent":["/**\n * External dependencies\n */\nimport { Text, View } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\n\nconst HelpSectionTitle = ( { children } ) => {\n\tconst helpSectionTitle = usePreferredColorSchemeStyle(\n\t\tstyles.helpSectionTitle,\n\t\tstyles.helpSectionTitleDark\n\t);\n\n\treturn (\n\t\t<View style={ styles.helpSectionTitleContainer }>\n\t\t\t<Text style={ helpSectionTitle }>{ children }</Text>\n\t\t</View>\n\t);\n};\n\nexport default HelpSectionTitle;\n"]}
1
+ {"version":3,"sources":["@wordpress/editor/src/components/editor-help/help-section-title.native.js"],"names":["Text","View","usePreferredColorSchemeStyle","styles","HelpSectionTitle","children","helpSectionTitle","helpSectionTitleDark","helpSectionTitleContainer"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,IAAT,EAAeC,IAAf,QAA2B,cAA3B;AAEA;AACA;AACA;;AACA,SAASC,4BAAT,QAA6C,oBAA7C;AAEA;AACA;AACA;;AACA,OAAOC,MAAP,MAAmB,cAAnB;;AAEA,MAAMC,gBAAgB,GAAG,CAAE;AAAEC,EAAAA;AAAF,CAAF,KAAoB;AAC5C,QAAMC,gBAAgB,GAAGJ,4BAA4B,CACpDC,MAAM,CAACG,gBAD6C,EAEpDH,MAAM,CAACI,oBAF6C,CAArD;AAKA,SACC,cAAC,IAAD;AAAM,IAAA,KAAK,EAAGJ,MAAM,CAACK;AAArB,KACC,cAAC,IAAD;AAAM,IAAA,KAAK,EAAGF;AAAd,KAAmCD,QAAnC,CADD,CADD;AAKA,CAXD;;AAaA,eAAeD,gBAAf","sourcesContent":["/**\n * External dependencies\n */\nimport { Text, View } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\n\nconst HelpSectionTitle = ( { children } ) => {\n\tconst helpSectionTitle = usePreferredColorSchemeStyle(\n\t\tstyles.helpSectionTitle,\n\t\tstyles.helpSectionTitleDark\n\t);\n\n\treturn (\n\t\t<View style={ styles.helpSectionTitleContainer }>\n\t\t\t<Text style={ helpSectionTitle }>{ children }</Text>\n\t\t</View>\n\t);\n};\n\nexport default HelpSectionTitle;\n"]}
@@ -11,13 +11,12 @@ import { useNavigation } from '@react-navigation/native';
11
11
  import { TextControl, Icon } from '@wordpress/components';
12
12
  import { chevronRight } from '@wordpress/icons';
13
13
 
14
- const HelpTopicRow = _ref => {
15
- let {
16
- label,
17
- icon,
18
- screenName,
19
- isLastItem
20
- } = _ref;
14
+ const HelpTopicRow = ({
15
+ label,
16
+ icon,
17
+ screenName,
18
+ isLastItem
19
+ }) => {
21
20
  const navigation = useNavigation();
22
21
 
23
22
  const openSubSheet = () => {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/components/editor-help/help-topic-row.native.js"],"names":["useNavigation","TextControl","Icon","chevronRight","HelpTopicRow","label","icon","screenName","isLastItem","navigation","openSubSheet","navigate"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,aAAT,QAA8B,0BAA9B;AAEA;AACA;AACA;;AACA,SAASC,WAAT,EAAsBC,IAAtB,QAAkC,uBAAlC;AACA,SAASC,YAAT,QAA6B,kBAA7B;;AAEA,MAAMC,YAAY,GAAG,QAA+C;AAAA,MAA7C;AAAEC,IAAAA,KAAF;AAASC,IAAAA,IAAT;AAAeC,IAAAA,UAAf;AAA2BC,IAAAA;AAA3B,GAA6C;AACnE,QAAMC,UAAU,GAAGT,aAAa,EAAhC;;AAEA,QAAMU,YAAY,GAAG,MAAM;AAC1BD,IAAAA,UAAU,CAACE,QAAX,CAAqBJ,UAArB;AACA,GAFD;;AAIA,SACC,cAAC,WAAD;AACC,IAAA,aAAa,EAAGC,UAAU,GAAG,MAAH,GAAY,YADvC;AAEC,IAAA,kBAAkB,MAFnB;AAGC,IAAA,SAAS,MAHV;AAIC,IAAA,OAAO,EAAGE,YAJX;AAKC,IAAA,KAAK,EAAGL,KALT;AAMC,IAAA,IAAI,EAAGC;AANR,KAQC,cAAC,IAAD;AAAM,IAAA,IAAI,EAAGH;AAAb,IARD,CADD;AAYA,CAnBD;;AAqBA,eAAeC,YAAf","sourcesContent":["/**\n * External dependencies\n */\nimport { useNavigation } from '@react-navigation/native';\n\n/**\n * WordPress dependencies\n */\nimport { TextControl, Icon } from '@wordpress/components';\nimport { chevronRight } from '@wordpress/icons';\n\nconst HelpTopicRow = ( { label, icon, screenName, isLastItem } ) => {\n\tconst navigation = useNavigation();\n\n\tconst openSubSheet = () => {\n\t\tnavigation.navigate( screenName );\n\t};\n\n\treturn (\n\t\t<TextControl\n\t\t\tseparatorType={ isLastItem ? 'none' : 'leftMargin' }\n\t\t\tcustomActionButton\n\t\t\tleftAlign\n\t\t\tonPress={ openSubSheet }\n\t\t\tlabel={ label }\n\t\t\ticon={ icon }\n\t\t>\n\t\t\t<Icon icon={ chevronRight } />\n\t\t</TextControl>\n\t);\n};\n\nexport default HelpTopicRow;\n"]}
1
+ {"version":3,"sources":["@wordpress/editor/src/components/editor-help/help-topic-row.native.js"],"names":["useNavigation","TextControl","Icon","chevronRight","HelpTopicRow","label","icon","screenName","isLastItem","navigation","openSubSheet","navigate"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,aAAT,QAA8B,0BAA9B;AAEA;AACA;AACA;;AACA,SAASC,WAAT,EAAsBC,IAAtB,QAAkC,uBAAlC;AACA,SAASC,YAAT,QAA6B,kBAA7B;;AAEA,MAAMC,YAAY,GAAG,CAAE;AAAEC,EAAAA,KAAF;AAASC,EAAAA,IAAT;AAAeC,EAAAA,UAAf;AAA2BC,EAAAA;AAA3B,CAAF,KAA+C;AACnE,QAAMC,UAAU,GAAGT,aAAa,EAAhC;;AAEA,QAAMU,YAAY,GAAG,MAAM;AAC1BD,IAAAA,UAAU,CAACE,QAAX,CAAqBJ,UAArB;AACA,GAFD;;AAIA,SACC,cAAC,WAAD;AACC,IAAA,aAAa,EAAGC,UAAU,GAAG,MAAH,GAAY,YADvC;AAEC,IAAA,kBAAkB,MAFnB;AAGC,IAAA,SAAS,MAHV;AAIC,IAAA,OAAO,EAAGE,YAJX;AAKC,IAAA,KAAK,EAAGL,KALT;AAMC,IAAA,IAAI,EAAGC;AANR,KAQC,cAAC,IAAD;AAAM,IAAA,IAAI,EAAGH;AAAb,IARD,CADD;AAYA,CAnBD;;AAqBA,eAAeC,YAAf","sourcesContent":["/**\n * External dependencies\n */\nimport { useNavigation } from '@react-navigation/native';\n\n/**\n * WordPress dependencies\n */\nimport { TextControl, Icon } from '@wordpress/components';\nimport { chevronRight } from '@wordpress/icons';\n\nconst HelpTopicRow = ( { label, icon, screenName, isLastItem } ) => {\n\tconst navigation = useNavigation();\n\n\tconst openSubSheet = () => {\n\t\tnavigation.navigate( screenName );\n\t};\n\n\treturn (\n\t\t<TextControl\n\t\t\tseparatorType={ isLastItem ? 'none' : 'leftMargin' }\n\t\t\tcustomActionButton\n\t\t\tleftAlign\n\t\t\tonPress={ openSubSheet }\n\t\t\tlabel={ label }\n\t\t\ticon={ icon }\n\t\t>\n\t\t\t<Icon icon={ chevronRight } />\n\t\t</TextControl>\n\t);\n};\n\nexport default HelpTopicRow;\n"]}
@@ -58,13 +58,12 @@ const HELP_TOPICS = [{
58
58
  view: createElement(CustomizeBlocks, null)
59
59
  }];
60
60
 
61
- function EditorHelpTopics(_ref) {
62
- let {
63
- close,
64
- isVisible,
65
- onClose,
66
- showSupport
67
- } = _ref;
61
+ function EditorHelpTopics({
62
+ close,
63
+ isVisible,
64
+ onClose,
65
+ showSupport
66
+ }) {
68
67
  const {
69
68
  postType
70
69
  } = useSelect(select => ({
@@ -98,10 +97,9 @@ function EditorHelpTopics(_ref) {
98
97
  }, createElement(BottomSheet.NavBar, null, createElement(BottomSheet.NavBar.DismissButton, {
99
98
  onPress: close,
100
99
  iosText: __('Close')
101
- }), createElement(BottomSheet.NavBar.Heading, null, title)), createElement(BottomSheetConsumer, null, _ref2 => {
102
- let {
103
- listProps
104
- } = _ref2;
100
+ }), createElement(BottomSheet.NavBar.Heading, null, title)), createElement(BottomSheetConsumer, null, ({
101
+ listProps
102
+ }) => {
105
103
  const contentContainerStyle = StyleSheet.flatten(listProps.contentContainerStyle);
106
104
  return createElement(ScrollView, _extends({}, listProps, {
107
105
  contentContainerStyle: { ...contentContainerStyle,
@@ -114,12 +112,11 @@ function EditorHelpTopics(_ref) {
114
112
  */
115
113
  marginTop: 0
116
114
  }
117
- }), createElement(PanelBody, null, createElement(HelpSectionTitle, null, __('The basics')), HELP_TOPICS.map((_ref3, index) => {
118
- let {
119
- label,
120
- icon,
121
- slug
122
- } = _ref3;
115
+ }), createElement(PanelBody, null, createElement(HelpSectionTitle, null, __('The basics')), HELP_TOPICS.map(({
116
+ label,
117
+ icon,
118
+ slug
119
+ }, index) => {
123
120
  const isLastItem = index === HELP_TOPICS.length - 1;
124
121
  return createElement(HelpTopicRow, {
125
122
  key: slug,
@@ -129,12 +126,11 @@ function EditorHelpTopics(_ref) {
129
126
  isLastItem: isLastItem
130
127
  });
131
128
  }), showSupport && supportSection));
132
- }))), HELP_TOPICS.map(_ref4 => {
133
- let {
134
- view,
135
- label,
136
- slug
137
- } = _ref4;
129
+ }))), HELP_TOPICS.map(({
130
+ view,
131
+ label,
132
+ slug
133
+ }) => {
138
134
  return createElement(HelpDetailNavigationScreen, {
139
135
  key: slug,
140
136
  name: slug,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/components/editor-help/index.native.js"],"names":["SafeAreaView","ScrollView","StyleSheet","View","TransitionPresets","BottomSheet","BottomSheetConsumer","PanelBody","__","helpFilled","plusCircleFilled","trash","cog","useSelect","store","editorStore","requestContactCustomerSupport","requestGotoCustomerSupportOptions","styles","HelpDetailNavigationScreen","HelpTopicRow","HelpGetSupportButton","IntroToBlocks","AddBlocks","MoveBlocks","RemoveBlocks","CustomizeBlocks","moveBlocksIcon","HelpSectionTitle","HELP_TOPICS","label","slug","icon","view","EditorHelpTopics","close","isVisible","onClose","showSupport","postType","select","getEditedPostAttribute","title","supportSection","contentContainer","navigationContainer","container","listProps","contentContainerStyle","flatten","paddingBottom","Math","max","safeAreaBottomInset","marginTop","map","index","isLastItem","length","gestureEnabled","DefaultTransition"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,YAAT,EAAuBC,UAAvB,EAAmCC,UAAnC,EAA+CC,IAA/C,QAA2D,cAA3D;AACA,SAASC,iBAAT,QAAkC,yBAAlC;AAEA;AACA;AACA;;AACA,SACCC,WADD,EAECC,mBAFD,EAGCC,SAHD,QAIO,uBAJP;AAKA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,UAAT,EAAqBC,gBAArB,EAAuCC,KAAvC,EAA8CC,GAA9C,QAAyD,kBAAzD;AACA,SAASC,SAAT,QAA0B,iBAA1B;AACA,SAASC,KAAK,IAAIC,WAAlB,QAAqC,mBAArC;AACA,SACCC,6BADD,EAECC,iCAFD,QAGO,gCAHP;AAKA;AACA;AACA;;AACA,OAAOC,MAAP,MAAmB,cAAnB;AACA,OAAOC,0BAAP,MAAuC,iCAAvC;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,oBAAP,MAAiC,2BAAjC;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,SAAP,MAAsB,cAAtB;AACA,OAAOC,UAAP,MAAuB,eAAvB;AACA,OAAOC,YAAP,MAAyB,iBAAzB;AACA,OAAOC,eAAP,MAA4B,oBAA5B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,gBAAP,MAA6B,sBAA7B;AAEA,MAAMC,WAAW,GAAG,CACnB;AACCC,EAAAA,KAAK,EAAEtB,EAAE,CAAE,kBAAF,CADV;AAECuB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Content":["/**\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":["SafeAreaView","ScrollView","StyleSheet","View","TransitionPresets","BottomSheet","BottomSheetConsumer","PanelBody","__","helpFilled","plusCircleFilled","trash","cog","useSelect","store","editorStore","requestContactCustomerSupport","requestGotoCustomerSupportOptions","styles","HelpDetailNavigationScreen","HelpTopicRow","HelpGetSupportButton","IntroToBlocks","AddBlocks","MoveBlocks","RemoveBlocks","CustomizeBlocks","moveBlocksIcon","HelpSectionTitle","HELP_TOPICS","label","slug","icon","view","EditorHelpTopics","close","isVisible","onClose","showSupport","postType","select","getEditedPostAttribute","title","supportSection","contentContainer","navigationContainer","container","listProps","contentContainerStyle","flatten","paddingBottom","Math","max","safeAreaBottomInset","marginTop","map","index","isLastItem","length","gestureEnabled","DefaultTransition"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,YAAT,EAAuBC,UAAvB,EAAmCC,UAAnC,EAA+CC,IAA/C,QAA2D,cAA3D;AACA,SAASC,iBAAT,QAAkC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AAU,GACfD,KAAK,KACL3B,WAAW,CAAC6B,MAAZ,GACC,CAHF;AAIA,aACC,cAAC,YAAD;AACC,QAAA,GAAG,EAAG3B,IADP;AAEC,QAAA,KAAK,EAAGD,KAFT;AAGC,QAAA,IAAI,EAAGE,IAHR;AAIC,QAAA,UAAU,EACTD,IALF;AAOC,QAAA,UAAU,EACT0B;AARF,QADD;AAaA,KAtBA,CALH,EA6BGnB,WAAW,IACZK,cA9BF,CAhBD,CADD;AAmDA,GAzDF,CAVD,CALD,CALD,EAkFGd,WAAW,CAAC0B,GAAZ,CAAiB,CAAE;AAAEtB,IAAAA,IAAF;AAAQH,IAAAA,KAAR;AAAeC,IAAAA;AAAf,GAAF,KAA6B;AAC/C,WACC,cAAC,0BAAD;AACC,MAAA,GAAG,EAAGA,IADP;AAEC,MAAA,IAAI,EAAGA,IAFR;AAGC,MAAA,OAAO,EAAGE,IAHX;AAIC,MAAA,KAAK,EAAGH,KAJT;AAKC,MAAA,OAAO,EAAG;AACT6B,QAAAA,cAAc,EAAE,KADP;AAET,WAAGvD,iBAAiB,CAACwD;AAFZ;AALX,MADD;AAYA,GAbC,CAlFH,CADD,CARD,CADD;AA8GA;;AAED,eAAe1B,gBAAf","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"]}
@@ -14,21 +14,19 @@ import { usePreferredColorScheme, usePreferredColorSchemeStyle } from '@wordpres
14
14
  */
15
15
 
16
16
  import styles from './style.scss';
17
- export const HelpDetailBodyText = _ref => {
18
- let {
19
- text
20
- } = _ref;
17
+ export const HelpDetailBodyText = ({
18
+ text
19
+ }) => {
21
20
  const bodyStyle = usePreferredColorSchemeStyle(styles.helpDetailBody, styles.helpDetailBodyDark);
22
21
  return createElement(Text, {
23
22
  selectable: true,
24
23
  style: bodyStyle
25
24
  }, text);
26
25
  };
27
- export const HelpDetailSectionHeadingText = _ref2 => {
28
- let {
29
- text,
30
- badge
31
- } = _ref2;
26
+ export const HelpDetailSectionHeadingText = ({
27
+ text,
28
+ badge
29
+ }) => {
32
30
  const headingTextStyle = usePreferredColorSchemeStyle(styles.helpDetailSectionHeadingText, styles.helpDetailSectionHeadingTextDark);
33
31
  return createElement(View, {
34
32
  style: styles.helpDetailSectionHeading
@@ -40,13 +38,12 @@ export const HelpDetailSectionHeadingText = _ref2 => {
40
38
  style: headingTextStyle
41
39
  }, text));
42
40
  };
43
- export const HelpDetailImage = _ref3 => {
44
- let {
45
- accessible,
46
- accessibilityLabel,
47
- source,
48
- sourceDarkMode
49
- } = _ref3;
41
+ export const HelpDetailImage = ({
42
+ accessible,
43
+ accessibilityLabel,
44
+ source,
45
+ sourceDarkMode
46
+ }) => {
50
47
  const imageStyle = usePreferredColorSchemeStyle(styles.helpDetailImage, styles.helpDetailImageDark);
51
48
  const darkModeEnabled = usePreferredColorScheme() === 'dark';
52
49
  return createElement(Image, {
@@ -57,10 +54,9 @@ export const HelpDetailImage = _ref3 => {
57
54
  });
58
55
  };
59
56
 
60
- const HelpDetailBadge = _ref4 => {
61
- let {
62
- text
63
- } = _ref4;
57
+ const HelpDetailBadge = ({
58
+ text
59
+ }) => {
64
60
  return createElement(View, {
65
61
  style: styles.helpDetailBadgeContainer
66
62
  }, createElement(Text, {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/components/editor-help/view-sections.native.js"],"names":["Text","Image","View","usePreferredColorScheme","usePreferredColorSchemeStyle","styles","HelpDetailBodyText","text","bodyStyle","helpDetailBody","helpDetailBodyDark","HelpDetailSectionHeadingText","badge","headingTextStyle","helpDetailSectionHeadingText","helpDetailSectionHeadingTextDark","helpDetailSectionHeading","HelpDetailImage","accessible","accessibilityLabel","source","sourceDarkMode","imageStyle","helpDetailImage","helpDetailImageDark","darkModeEnabled","HelpDetailBadge","helpDetailBadgeContainer","helpDetailBadgeText"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,IAAT,EAAeC,KAAf,EAAsBC,IAAtB,QAAkC,cAAlC;AAEA;AACA;AACA;;AACA,SACCC,uBADD,EAECC,4BAFD,QAGO,oBAHP;AAKA;AACA;AACA;;AACA,OAAOC,MAAP,MAAmB,cAAnB;AAEA,OAAO,MAAMC,kBAAkB,GAAG,QAAgB;AAAA,MAAd;AAAEC,IAAAA;AAAF,GAAc;AACjD,QAAMC,SAAS,GAAGJ,4BAA4B,CAC7CC,MAAM,CAACI,cADsC,EAE7CJ,MAAM,CAACK,kBAFsC,CAA9C;AAIA,SACC,cAAC,IAAD;AAAM,IAAA,UAAU,MAAhB;AAAiB,IAAA,KAAK,EAAGF;AAAzB,KACGD,IADH,CADD;AAKA,CAVM;AAYP,OAAO,MAAMI,4BAA4B,GAAG,SAAuB;AAAA,MAArB;AAAEJ,IAAAA,IAAF;AAAQK,IAAAA;AAAR,GAAqB;AAClE,QAAMC,gBAAgB,GAAGT,4BAA4B,CACpDC,MAAM,CAACS,4BAD6C,EAEpDT,MAAM,CAACU,gCAF6C,CAArD;AAIA,SACC,cAAC,IAAD;AAAM,IAAA,KAAK,EAAGV,MAAM,CAACW;AAArB,KACGJ,KAAK,IAAI,cAAC,eAAD;AAAiB,IAAA,IAAI,EAAGA;AAAxB,IADZ,EAEC,cAAC,IAAD;AACC,IAAA,iBAAiB,EAAC,QADnB;AAEC,IAAA,UAAU,MAFX;AAGC,IAAA,KAAK,EAAGC;AAHT,KAKGN,IALH,CAFD,CADD;AAYA,CAjBM;AAmBP,OAAO,MAAMU,eAAe,GAAG,SAKxB;AAAA,MAL0B;AAChCC,IAAAA,UADgC;AAEhCC,IAAAA,kBAFgC;AAGhCC,IAAAA,MAHgC;AAIhCC,IAAAA;AAJgC,GAK1B;AACN,QAAMC,UAAU,GAAGlB,4BAA4B,CAC9CC,MAAM,CAACkB,eADuC,EAE9ClB,MAAM,CAACmB,mBAFuC,CAA/C;AAIA,QAAMC,eAAe,GAAGtB,uBAAuB,OAAO,MAAtD;AACA,SACC,cAAC,KAAD;AACC,IAAA,UAAU,EAAGe,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,SAAgB;AAAA,MAAd;AAAEnB,IAAAA;AAAF,GAAc;AACvC,SACC,cAAC,IAAD;AAAM,IAAA,KAAK,EAAGF,MAAM,CAACsB;AAArB,KACC,cAAC,IAAD;AAAM,IAAA,KAAK,EAAGtB,MAAM,CAACuB;AAArB,KAA6CrB,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":["Text","Image","View","usePreferredColorScheme","usePreferredColorSchemeStyle","styles","HelpDetailBodyText","text","bodyStyle","helpDetailBody","helpDetailBodyDark","HelpDetailSectionHeadingText","badge","headingTextStyle","helpDetailSectionHeadingText","helpDetailSectionHeadingTextDark","helpDetailSectionHeading","HelpDetailImage","accessible","accessibilityLabel","source","sourceDarkMode","imageStyle","helpDetailImage","helpDetailImageDark","darkModeEnabled","HelpDetailBadge","helpDetailBadgeContainer","helpDetailBadgeText"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,IAAT,EAAeC,KAAf,EAAsBC,IAAtB,QAAkC,cAAlC;AAEA;AACA;AACA;;AACA,SACCC,uBADD,EAECC,4BAFD,QAGO,oBAHP;AAKA;AACA;AACA;;AACA,OAAOC,MAAP,MAAmB,cAAnB;AAEA,OAAO,MAAMC,kBAAkB,GAAG,CAAE;AAAEC,EAAAA;AAAF,CAAF,KAAgB;AACjD,QAAMC,SAAS,GAAGJ,4BAA4B,CAC7CC,MAAM,CAACI,cADsC,EAE7CJ,MAAM,CAACK,kBAFsC,CAA9C;AAIA,SACC,cAAC,IAAD;AAAM,IAAA,UAAU,MAAhB;AAAiB,IAAA,KAAK,EAAGF;AAAzB,KACGD,IADH,CADD;AAKA,CAVM;AAYP,OAAO,MAAMI,4BAA4B,GAAG,CAAE;AAAEJ,EAAAA,IAAF;AAAQK,EAAAA;AAAR,CAAF,KAAuB;AAClE,QAAMC,gBAAgB,GAAGT,4BAA4B,CACpDC,MAAM,CAACS,4BAD6C,EAEpDT,MAAM,CAACU,gCAF6C,CAArD;AAIA,SACC,cAAC,IAAD;AAAM,IAAA,KAAK,EAAGV,MAAM,CAACW;AAArB,KACGJ,KAAK,IAAI,cAAC,eAAD;AAAiB,IAAA,IAAI,EAAGA;AAAxB,IADZ,EAEC,cAAC,IAAD;AACC,IAAA,iBAAiB,EAAC,QADnB;AAEC,IAAA,UAAU,MAFX;AAGC,IAAA,KAAK,EAAGC;AAHT,KAKGN,IALH,CAFD,CADD;AAYA,CAjBM;AAmBP,OAAO,MAAMU,eAAe,GAAG,CAAE;AAChCC,EAAAA,UADgC;AAEhCC,EAAAA,kBAFgC;AAGhCC,EAAAA,MAHgC;AAIhCC,EAAAA;AAJgC,CAAF,KAKxB;AACN,QAAMC,UAAU,GAAGlB,4BAA4B,CAC9CC,MAAM,CAACkB,eADuC,EAE9ClB,MAAM,CAACmB,mBAFuC,CAA/C;AAIA,QAAMC,eAAe,GAAGtB,uBAAuB,OAAO,MAAtD;AACA,SACC,cAAC,KAAD;AACC,IAAA,UAAU,EAAGe,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;AAAEnB,EAAAA;AAAF,CAAF,KAAgB;AACvC,SACC,cAAC,IAAD;AAAM,IAAA,KAAK,EAAGF,MAAM,CAACsB;AAArB,KACC,cAAC,IAAD;AAAM,IAAA,KAAK,EAAGtB,MAAM,CAACuB;AAArB,KAA6CrB,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"]}
@@ -12,25 +12,18 @@ import { store as noticesStore } from '@wordpress/notices';
12
12
  */
13
13
 
14
14
  import TemplateValidationNotice from '../template-validation-notice';
15
- export function EditorNotices(_ref) {
16
- let {
17
- notices,
18
- onRemove
19
- } = _ref;
20
- const dismissibleNotices = notices.filter(_ref2 => {
21
- let {
22
- isDismissible,
23
- type
24
- } = _ref2;
25
- return isDismissible && type === 'default';
26
- });
27
- const nonDismissibleNotices = notices.filter(_ref3 => {
28
- let {
29
- isDismissible,
30
- type
31
- } = _ref3;
32
- return !isDismissible && type === 'default';
33
- });
15
+ export function EditorNotices({
16
+ notices,
17
+ onRemove
18
+ }) {
19
+ const dismissibleNotices = notices.filter(({
20
+ isDismissible,
21
+ type
22
+ }) => isDismissible && type === 'default');
23
+ const nonDismissibleNotices = notices.filter(({
24
+ isDismissible,
25
+ type
26
+ }) => !isDismissible && type === 'default');
34
27
  return createElement(Fragment, null, createElement(NoticeList, {
35
28
  notices: nonDismissibleNotices,
36
29
  className: "components-editor-notices__pinned"
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/components/editor-notices/index.js"],"names":["NoticeList","withSelect","withDispatch","compose","store","noticesStore","TemplateValidationNotice","EditorNotices","notices","onRemove","dismissibleNotices","filter","isDismissible","type","nonDismissibleNotices","select","getNotices","dispatch","removeNotice"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,UAAT,QAA2B,uBAA3B;AACA,SAASC,UAAT,EAAqBC,YAArB,QAAyC,iBAAzC;AACA,SAASC,OAAT,QAAwB,oBAAxB;AACA,SAASC,KAAK,IAAIC,YAAlB,QAAsC,oBAAtC;AAEA;AACA;AACA;;AACA,OAAOC,wBAAP,MAAqC,+BAArC;AAEA,OAAO,SAASC,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,8BACC,cAAC,UAAD;AACC,IAAA,OAAO,EAAGC,qBADX;AAEC,IAAA,SAAS,EAAC;AAFX,IADD,EAKC,cAAC,UAAD;AACC,IAAA,OAAO,EAAGJ,kBADX;AAEC,IAAA,SAAS,EAAC,wCAFX;AAGC,IAAA,QAAQ,EAAGD;AAHZ,KAKC,cAAC,wBAAD,OALD,CALD,CADD;AAeA;AAED,eAAeN,OAAO,CAAE,CACvBF,UAAU,CAAIc,MAAF,KAAgB;AAC3BP,EAAAA,OAAO,EAAEO,MAAM,CAAEV,YAAF,CAAN,CAAuBW,UAAvB;AADkB,CAAhB,CAAF,CADa,EAIvBd,YAAY,CAAIe,QAAF,KAAkB;AAC/BR,EAAAA,QAAQ,EAAEQ,QAAQ,CAAEZ,YAAF,CAAR,CAAyBa;AADJ,CAAlB,CAAF,CAJW,CAAF,CAAP,CAOVX,aAPU,CAAf","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":["NoticeList","withSelect","withDispatch","compose","store","noticesStore","TemplateValidationNotice","EditorNotices","notices","onRemove","dismissibleNotices","filter","isDismissible","type","nonDismissibleNotices","select","getNotices","dispatch","removeNotice"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,UAAT,QAA2B,uBAA3B;AACA,SAASC,UAAT,EAAqBC,YAArB,QAAyC,iBAAzC;AACA,SAASC,OAAT,QAAwB,oBAAxB;AACA,SAASC,KAAK,IAAIC,YAAlB,QAAsC,oBAAtC;AAEA;AACA;AACA;;AACA,OAAOC,wBAAP,MAAqC,+BAArC;AAEA,OAAO,SAASC,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,8BACC,cAAC,UAAD;AACC,IAAA,OAAO,EAAGC,qBADX;AAEC,IAAA,SAAS,EAAC;AAFX,IADD,EAKC,cAAC,UAAD;AACC,IAAA,OAAO,EAAGJ,kBADX;AAEC,IAAA,SAAS,EAAC,wCAFX;AAGC,IAAA,QAAQ,EAAGD;AAHZ,KAKC,cAAC,wBAAD,OALD,CALD,CADD;AAeA;AAED,eAAeN,OAAO,CAAE,CACvBF,UAAU,CAAIc,MAAF,KAAgB;AAC3BP,EAAAA,OAAO,EAAEO,MAAM,CAAEV,YAAF,CAAN,CAAuBW,UAAvB;AADkB,CAAhB,CAAF,CADa,EAIvBd,YAAY,CAAIe,QAAF,KAAkB;AAC/BR,EAAAA,QAAQ,EAAEQ,QAAQ,CAAEZ,YAAF,CAAR,CAAyBa;AADJ,CAAlB,CAAF,CAJW,CAAF,CAAP,CAOVX,aAPU,CAAf","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"]}
@@ -11,12 +11,9 @@ export default function EditorSnackbars() {
11
11
  const {
12
12
  removeNotice
13
13
  } = useDispatch(noticesStore);
14
- const snackbarNotices = notices.filter(_ref => {
15
- let {
16
- type
17
- } = _ref;
18
- return type === 'snackbar';
19
- });
14
+ const snackbarNotices = notices.filter(({
15
+ type
16
+ }) => type === 'snackbar');
20
17
  return createElement(SnackbarList, {
21
18
  notices: snackbarNotices,
22
19
  className: "components-editor-notices__snackbar",
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/components/editor-snackbars/index.js"],"names":["SnackbarList","useSelect","useDispatch","store","noticesStore","EditorSnackbars","notices","select","getNotices","removeNotice","snackbarNotices","filter","type"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,YAAT,QAA6B,uBAA7B;AACA,SAASC,SAAT,EAAoBC,WAApB,QAAuC,iBAAvC;AACA,SAASC,KAAK,IAAIC,YAAlB,QAAsC,oBAAtC;AAEA,eAAe,SAASC,eAAT,GAA2B;AACzC,QAAMC,OAAO,GAAGL,SAAS,CACtBM,MAAF,IAAcA,MAAM,CAAEH,YAAF,CAAN,CAAuBI,UAAvB,EADU,EAExB,EAFwB,CAAzB;AAIA,QAAM;AAAEC,IAAAA;AAAF,MAAmBP,WAAW,CAAEE,YAAF,CAApC;AACA,QAAMM,eAAe,GAAGJ,OAAO,CAACK,MAAR,CACvB;AAAA,QAAE;AAAEC,MAAAA;AAAF,KAAF;AAAA,WAAgBA,IAAI,KAAK,UAAzB;AAAA,GADuB,CAAxB;AAIA,SACC,cAAC,YAAD;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":["SnackbarList","useSelect","useDispatch","store","noticesStore","EditorSnackbars","notices","select","getNotices","removeNotice","snackbarNotices","filter","type"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,YAAT,QAA6B,uBAA7B;AACA,SAASC,SAAT,EAAoBC,WAApB,QAAuC,iBAAvC;AACA,SAASC,KAAK,IAAIC,YAAlB,QAAsC,oBAAtC;AAEA,eAAe,SAASC,eAAT,GAA2B;AACzC,QAAMC,OAAO,GAAGL,SAAS,CACtBM,MAAF,IAAcA,MAAM,CAAEH,YAAF,CAAN,CAAuBI,UAAvB,EADU,EAExB,EAFwB,CAAzB;AAIA,QAAM;AAAEC,IAAAA;AAAF,MAAmBP,WAAW,CAAEE,YAAF,CAApC;AACA,QAAMM,eAAe,GAAGJ,OAAO,CAACK,MAAR,CACvB,CAAE;AAAEC,IAAAA;AAAF,GAAF,KAAgBA,IAAI,KAAK,UADF,CAAxB;AAIA,SACC,cAAC,YAAD;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"]}
@@ -15,13 +15,12 @@ import { decodeEntities } from '@wordpress/html-entities';
15
15
  */
16
16
 
17
17
  import { store as editorStore } from '../../store';
18
- export default function EntityRecordItem(_ref) {
19
- let {
20
- record,
21
- checked,
22
- onChange,
23
- closePanel
24
- } = _ref;
18
+ export default function EntityRecordItem({
19
+ record,
20
+ checked,
21
+ onChange,
22
+ closePanel
23
+ }) {
25
24
  const {
26
25
  name,
27
26
  kind,
@@ -29,14 +28,12 @@ export default function EntityRecordItem(_ref) {
29
28
  key
30
29
  } = record;
31
30
  const parentBlockId = useSelect(select => {
32
- var _blocks$;
33
-
34
31
  // Get entity's blocks.
35
32
  const {
36
33
  blocks = []
37
34
  } = select(coreStore).getEditedEntityRecord(kind, name, key); // Get parents of the entity's first block.
38
35
 
39
- const parents = select(blockEditorStore).getBlockParents((_blocks$ = blocks[0]) === null || _blocks$ === void 0 ? void 0 : _blocks$.clientId); // Return closest parent block's clientId.
36
+ const parents = select(blockEditorStore).getBlockParents(blocks[0]?.clientId); // Return closest parent block's clientId.
40
37
 
41
38
  return parents[parents.length - 1];
42
39
  }, []); // 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":["CheckboxControl","Button","PanelRow","__","useSelect","useDispatch","useCallback","store","blockEditorStore","coreStore","decodeEntities","editorStore","EntityRecordItem","record","checked","onChange","closePanel","name","kind","title","key","parentBlockId","select","blocks","getEditedEntityRecord","parents","getBlockParents","clientId","length","entityRecordTitle","template","__experimentalGetTemplateInfo","isSelected","selectedBlockId","getSelectedBlockClientId","isSelectedText","selectBlock","selectParentBlock","selectAndDismiss"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,eAAT,EAA0BC,MAA1B,EAAkCC,QAAlC,QAAkD,uBAAlD;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,SAAT,EAAoBC,WAApB,QAAuC,iBAAvC;AACA,SAASC,WAAT,QAA4B,oBAA5B;AACA,SAASC,KAAK,IAAIC,gBAAlB,QAA0C,yBAA1C;AACA,SAASD,KAAK,IAAIE,SAAlB,QAAmC,sBAAnC;AACA,SAASC,cAAT,QAA+B,0BAA/B;AAEA;AACA;AACA;;AACA,SAASH,KAAK,IAAII,WAAlB,QAAqC,aAArC;AAEA,eAAe,SAASC,gBAAT,OAKX;AAAA,MALsC;AACzCC,IAAAA,MADyC;AAEzCC,IAAAA,OAFyC;AAGzCC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,EAM3B,CAAEA,aAAF,CAN2B,CAA5B;AAQA,QAAMc,cAAc,GAAGH,UAAU,GAAG7B,EAAE,CAAE,UAAF,CAAL,GAAsBA,EAAE,CAAE,QAAF,CAAzD;AACA,QAAM;AAAEiC,IAAAA;AAAF,MAAkB/B,WAAW,CAAEG,gBAAF,CAAnC;AACA,QAAM6B,iBAAiB,GAAG/B,WAAW,CACpC,MAAM8B,WAAW,CAAEf,aAAF,CADmB,EAEpC,CAAEA,aAAF,CAFoC,CAArC;AAIA,QAAMiB,gBAAgB,GAAGhC,WAAW,CAAE,MAAM;AAC3C8B,IAAAA,WAAW,CAAEf,aAAF,CAAX;AACAL,IAAAA,UAAU;AACV,GAHmC,EAGjC,CAAEK,aAAF,CAHiC,CAApC;AAKA,SACC,cAAC,QAAD,QACC,cAAC,eAAD;AACC,IAAA,uBAAuB,MADxB;AAEC,IAAA,KAAK,EACJ,8BACGX,cAAc,CAAEmB,iBAAF,CAAd,IACD1B,EAAE,CAAE,UAAF,CAFJ,CAHF;AAQC,IAAA,OAAO,EAAGW,OARX;AASC,IAAA,QAAQ,EAAGC;AATZ,IADD,EAYGM,aAAa,GACd,8BACC,cAAC,MAAD;AACC,IAAA,OAAO,EAAGgB,iBADX;AAEC,IAAA,SAAS,EAAC,oCAFX;AAGC,IAAA,QAAQ,EAAGL;AAHZ,KAKGG,cALH,CADD,EAQC,cAAC,MAAD;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":["CheckboxControl","Button","PanelRow","__","useSelect","useDispatch","useCallback","store","blockEditorStore","coreStore","decodeEntities","editorStore","EntityRecordItem","record","checked","onChange","closePanel","name","kind","title","key","parentBlockId","select","blocks","getEditedEntityRecord","parents","getBlockParents","clientId","length","entityRecordTitle","template","__experimentalGetTemplateInfo","isSelected","selectedBlockId","getSelectedBlockClientId","isSelectedText","selectBlock","selectParentBlock","selectAndDismiss"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,eAAT,EAA0BC,MAA1B,EAAkCC,QAAlC,QAAkD,uBAAlD;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,SAAT,EAAoBC,WAApB,QAAuC,iBAAvC;AACA,SAASC,WAAT,QAA4B,oBAA5B;AACA,SAASC,KAAK,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AiBX,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"]}
@@ -27,13 +27,12 @@ function getEntityDescription(entity, count) {
27
27
  }
28
28
  }
29
29
 
30
- export default function EntityTypeList(_ref) {
31
- let {
32
- list,
33
- unselectedEntities,
34
- setUnselectedEntities,
35
- closePanel
36
- } = _ref;
30
+ export default function EntityTypeList({
31
+ list,
32
+ unselectedEntities,
33
+ setUnselectedEntities,
34
+ closePanel
35
+ }) {
37
36
  const count = list.length;
38
37
  const firstRecord = list[0];
39
38
  const entityConfig = useSelect(select => select(coreStore).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":["__","useSelect","PanelBody","PanelRow","store","coreStore","EntityRecordItem","getEntityDescription","entity","count","EntityTypeList","list","unselectedEntities","setUnselectedEntities","closePanel","length","firstRecord","entityConfig","select","getEntityConfig","kind","name","entityLabel","label","description","map","record","key","property","some","elt","value"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,SAAT,QAA0B,iBAA1B;AACA,SAASC,SAAT,EAAoBC,QAApB,QAAoC,uBAApC;AACA,SAASC,KAAK,IAAIC,SAAlB,QAAmC,sBAAnC;AAEA;AACA;AACA;;AACA,OAAOC,gBAAP,MAA6B,sBAA7B;;AAEA,SAASC,oBAAT,CAA+BC,MAA/B,EAAuCC,KAAvC,EAA+C;AAC9C,UAASD,MAAT;AACC,SAAK,MAAL;AACC,aAAO,MAAMC,KAAN,GACJT,EAAE,CAAE,0CAAF,CADE,GAEJA,EAAE,CAAE,4CAAF,CAFL;;AAGD,SAAK,aAAL;AACC,aAAOA,EAAE,CACR,iEADQ,CAAT;;AAGD,SAAK,MAAL;AACA,SAAK,MAAL;AACC,aAAOA,EAAE,CAAE,0CAAF,CAAT;AAXF;AAaA;;AAED,eAAe,SAASU,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,GAAGhB,SAAS,CAC3BiB,MAAF,IACCA,MAAM,CAAEb,SAAF,CAAN,CAAoBc,eAApB,CACCH,WAAW,CAACI,IADb,EAECJ,WAAW,CAACK,IAFb,CAF4B,EAM7B,CAAEL,WAAW,CAACI,IAAd,EAAoBJ,WAAW,CAACK,IAAhC,CAN6B,CAA9B;AAQA,QAAM;AAAEA,IAAAA;AAAF,MAAWL,WAAjB;AAEA,MAAIM,WAAW,GAAGL,YAAY,CAACM,KAA/B;;AACA,MAAKF,IAAI,KAAK,kBAAd,EAAmC;AAClCC,IAAAA,WAAW,GACV,MAAMb,KAAN,GAAcT,EAAE,CAAE,eAAF,CAAhB,GAAsCA,EAAE,CAAE,gBAAF,CADzC;AAEA,GAjBE,CAkBH;;;AACA,QAAMwB,WAAW,GAAGjB,oBAAoB,CAAEc,IAAF,EAAQZ,KAAR,CAAxC;AAEA,SACC,cAAC,SAAD;AAAW,IAAA,KAAK,EAAGa,WAAnB;AAAiC,IAAA,WAAW,EAAG;AAA/C,KACGE,WAAW,IAAI,cAAC,QAAD,QAAYA,WAAZ,CADlB,EAEGb,IAAI,CAACc,GAAL,CAAYC,MAAF,IAAc;AACzB,WACC,cAAC,gBAAD;AACC,MAAA,GAAG,EAAGA,MAAM,CAACC,GAAP,IAAcD,MAAM,CAACE,QAD5B;AAEC,MAAA,MAAM,EAAGF,MAFV;AAGC,MAAA,OAAO,EACN,CAAEd,kBAAkB,CAACiB,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,IACVlB,qBAAqB,CAAEa,MAAF,EAAUK,KAAV,CAbvB;AAeC,MAAA,UAAU,EAAGjB;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":["__","useSelect","PanelBody","PanelRow","store","coreStore","EntityRecordItem","getEntityDescription","entity","count","EntityTypeList","list","unselectedEntities","setUnselectedEntities","closePanel","length","firstRecord","entityConfig","select","getEntityConfig","kind","name","entityLabel","label","description","map","record","key","property","some","elt","value"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,SAAT,QAA0B,iBAA1B;AACA,SAASC,SAAT,EAAoBC,QAApB,QAAoC,uBAApC;AACA,SAASC,KAAK,IAAIC,SAAlB,QAAmC,sBAAnC;AAEA;AACA;AACA;;AACA,OAAOC,gBAAP,MAA6B,sBAA7B;;AAEA,SAASC,oBAAT,CAA+BC,MAA/B,EAAuCC,KAAvC,EAA+C;AAC9C,UAASD,MAAT;AACC,SAAK,MAAL;AACC,aAAO,MAAMC,KAAN,GACJT,EAAE,CAAE,0CAAF,CADE,GAEJA,EAAE,CAAE,4CAAF,CAFL;;AAGD,SAAK,aAAL;AACC,aAAOA,EAAE,CACR,iEADQ,CAAT;;AAGD,SAAK,MAAL;AACA,SAAK,MAAL;AACC,aAAOA,EAAE,CAAE,0CAAF,CAAT;AAXF;AAaA;;AAED,eAAe,SAASU,cAAT,CAAyB;AACvCC,EAAAA,IADuC;AAEvCC,EAAAA,kBAFuC;AAGvCC,EAAAA,qBAHuC;AAIvCC,EAAAA;AAJuC,CAAzB,EAKX;AACH,QAAML,KAAK,GAAGE,IAAI,CA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AF,IACVlB,qBAAqB,CAAEa,MAAF,EAAUK,KAAV,CAbvB;AAeC,MAAA,UAAU,EAAGjB;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,70 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { useSelect } from '@wordpress/data';
5
+ import { store as coreStore } from '@wordpress/core-data';
6
+ import { useState } from '@wordpress/element';
7
+ import { __ } from '@wordpress/i18n';
8
+ const TRANSLATED_SITE_PROPERTIES = {
9
+ title: __('Title'),
10
+ description: __('Tagline'),
11
+ site_logo: __('Logo'),
12
+ site_icon: __('Icon'),
13
+ show_on_front: __('Show on front'),
14
+ page_on_front: __('Page on front')
15
+ };
16
+ export const useIsDirty = () => {
17
+ const {
18
+ dirtyEntityRecords
19
+ } = useSelect(select => {
20
+ const dirtyRecords = select(coreStore).__experimentalGetDirtyEntityRecords(); // Remove site object and decouple into its edited pieces.
21
+
22
+
23
+ const dirtyRecordsWithoutSite = dirtyRecords.filter(record => !(record.kind === 'root' && record.name === 'site'));
24
+ const siteEdits = select(coreStore).getEntityRecordEdits('root', 'site');
25
+ const siteEditsAsEntities = [];
26
+
27
+ for (const property in siteEdits) {
28
+ siteEditsAsEntities.push({
29
+ kind: 'root',
30
+ name: 'site',
31
+ title: TRANSLATED_SITE_PROPERTIES[property] || property,
32
+ property
33
+ });
34
+ }
35
+
36
+ const dirtyRecordsWithSiteItems = [...dirtyRecordsWithoutSite, ...siteEditsAsEntities];
37
+ return {
38
+ dirtyEntityRecords: dirtyRecordsWithSiteItems
39
+ };
40
+ }, []); // Unchecked entities to be ignored by save function.
41
+
42
+ const [unselectedEntities, _setUnselectedEntities] = useState([]);
43
+
44
+ const setUnselectedEntities = ({
45
+ kind,
46
+ name,
47
+ key,
48
+ property
49
+ }, checked) => {
50
+ if (checked) {
51
+ _setUnselectedEntities(unselectedEntities.filter(elt => elt.kind !== kind || elt.name !== name || elt.key !== key || elt.property !== property));
52
+ } else {
53
+ _setUnselectedEntities([...unselectedEntities, {
54
+ kind,
55
+ name,
56
+ key,
57
+ property
58
+ }]);
59
+ }
60
+ };
61
+
62
+ const isDirty = dirtyEntityRecords.length - unselectedEntities.length > 0;
63
+ return {
64
+ dirtyEntityRecords,
65
+ isDirty,
66
+ setUnselectedEntities,
67
+ unselectedEntities
68
+ };
69
+ };
70
+ //# 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":["useSelect","store","coreStore","useState","__","TRANSLATED_SITE_PROPERTIES","title","description","site_logo","site_icon","show_on_front","page_on_front","useIsDirty","dirtyEntityRecords","select","dirtyRecords","__experimentalGetDirtyEntityRecords","dirtyRecordsWithoutSite","filter","record","kind","name","siteEdits","getEntityRecordEdits","siteEditsAsEntities","property","push","dirtyRecordsWithSiteItems","unselectedEntities","_setUnselectedEntities","setUnselectedEntities","key","checked","elt","isDirty","length"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,iBAA1B;AACA,SAASC,KAAK,IAAIC,SAAlB,QAAmC,sBAAnC;AACA,SAASC,QAAT,QAAyB,oBAAzB;AACA,SAASC,EAAT,QAAmB,iBAAnB;AAEA,MAAMC,0BAA0B,GAAG;AAClCC,EAAAA,KAAK,EAAEF,EAAE,CAAE,OAAF,CADyB;AAElCG,EAAAA,WAAW,EA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sBAAtB,IAAiD1B,QAAQ,CAAE,EAAF,CAA/D;;AAEA,QAAM2B,qBAAqB,GAAG,CAC7B;AAAEV,IAAAA,IAAF;AAAQC,IAAAA,IAAR;AAAcU,IAAAA,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,GAAGrB,kBAAkB,CAACsB,MAAnB,GAA4BP,kBAAkB,CAACO,MAA/C,GAAwD,CAAxE;AAEA,SAAO;AACNtB,IAAAA,kBADM;AAENqB,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};\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"]}