@wordpress/editor 14.17.1 → 14.18.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 (316) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/bindings/pattern-overrides.js +0 -1
  3. package/build/bindings/pattern-overrides.js.map +1 -1
  4. package/build/bindings/post-meta.js +0 -1
  5. package/build/bindings/post-meta.js.map +1 -1
  6. package/build/components/autocompleters/user.js +0 -1
  7. package/build/components/autocompleters/user.js.map +1 -1
  8. package/build/components/block-removal-warnings/index.js +0 -1
  9. package/build/components/block-removal-warnings/index.js.map +1 -1
  10. package/build/components/block-settings-menu/content-only-settings-menu.js +0 -1
  11. package/build/components/block-settings-menu/content-only-settings-menu.js.map +1 -1
  12. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js +0 -1
  13. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
  14. package/build/components/collab-sidebar/comments.js +0 -1
  15. package/build/components/collab-sidebar/comments.js.map +1 -1
  16. package/build/components/collab-sidebar/index.js +0 -1
  17. package/build/components/collab-sidebar/index.js.map +1 -1
  18. package/build/components/collab-sidebar/utils.js +0 -1
  19. package/build/components/collab-sidebar/utils.js.map +1 -1
  20. package/build/components/deprecated.js +0 -1
  21. package/build/components/deprecated.js.map +1 -1
  22. package/build/components/document-outline/index.js +0 -1
  23. package/build/components/document-outline/index.js.map +1 -1
  24. package/build/components/editor/index.js +9 -5
  25. package/build/components/editor/index.js.map +1 -1
  26. package/build/components/editor-help/index.native.js +0 -1
  27. package/build/components/editor-help/index.native.js.map +1 -1
  28. package/build/components/editor-notices/index.js +0 -1
  29. package/build/components/editor-notices/index.js.map +1 -1
  30. package/build/components/editor-snackbars/index.js +0 -1
  31. package/build/components/editor-snackbars/index.js.map +1 -1
  32. package/build/components/entities-saved-states/entity-type-list.js +0 -1
  33. package/build/components/entities-saved-states/entity-type-list.js.map +1 -1
  34. package/build/components/entities-saved-states/hooks/use-is-dirty.js +0 -1
  35. package/build/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -1
  36. package/build/components/entities-saved-states/index.js +0 -1
  37. package/build/components/entities-saved-states/index.js.map +1 -1
  38. package/build/components/keyboard-shortcut-help-modal/index.js +0 -1
  39. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  40. package/build/components/keyboard-shortcut-help-modal/shortcut.js +0 -1
  41. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  42. package/build/components/list-view-sidebar/index.js +0 -1
  43. package/build/components/list-view-sidebar/index.js.map +1 -1
  44. package/build/components/local-autosave-monitor/index.js +0 -1
  45. package/build/components/local-autosave-monitor/index.js.map +1 -1
  46. package/build/components/mode-switcher/index.js +0 -1
  47. package/build/components/mode-switcher/index.js.map +1 -1
  48. package/build/components/page-attributes/parent.js +8 -5
  49. package/build/components/page-attributes/parent.js.map +1 -1
  50. package/build/components/post-actions/actions.js +0 -1
  51. package/build/components/post-actions/actions.js.map +1 -1
  52. package/build/components/post-actions/index.js +0 -1
  53. package/build/components/post-actions/index.js.map +1 -1
  54. package/build/components/post-author/check.js +3 -4
  55. package/build/components/post-author/check.js.map +1 -1
  56. package/build/components/post-author/combobox.js +4 -2
  57. package/build/components/post-author/combobox.js.map +1 -1
  58. package/build/components/post-author/hook.js +8 -5
  59. package/build/components/post-author/hook.js.map +1 -1
  60. package/build/components/post-fields/index.js +0 -1
  61. package/build/components/post-fields/index.js.map +1 -1
  62. package/build/components/post-format/index.js +0 -1
  63. package/build/components/post-format/index.js.map +1 -1
  64. package/build/components/post-format/panel.js +0 -1
  65. package/build/components/post-format/panel.js.map +1 -1
  66. package/build/components/post-publish-button/index.js +0 -1
  67. package/build/components/post-publish-button/index.js.map +1 -1
  68. package/build/components/post-publish-panel/maybe-category-panel.js +2 -4
  69. package/build/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  70. package/build/components/post-publish-panel/maybe-post-format-panel.js +0 -1
  71. package/build/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  72. package/build/components/post-publish-panel/maybe-tags-panel.js +1 -1
  73. package/build/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  74. package/build/components/post-publish-panel/maybe-upload-media.js +0 -1
  75. package/build/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  76. package/build/components/post-publish-panel/media-util.js +0 -1
  77. package/build/components/post-publish-panel/media-util.js.map +1 -1
  78. package/build/components/post-saved-state/index.js +0 -1
  79. package/build/components/post-saved-state/index.js.map +1 -1
  80. package/build/components/post-schedule/index.js +0 -1
  81. package/build/components/post-schedule/index.js.map +1 -1
  82. package/build/components/post-taxonomies/check.js +1 -1
  83. package/build/components/post-taxonomies/check.js.map +1 -1
  84. package/build/components/post-taxonomies/flat-term-selector.js +2 -3
  85. package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
  86. package/build/components/post-taxonomies/hierarchical-term-selector.js +2 -3
  87. package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  88. package/build/components/post-taxonomies/index.js +1 -2
  89. package/build/components/post-taxonomies/index.js.map +1 -1
  90. package/build/components/post-taxonomies/most-used-terms.js +0 -1
  91. package/build/components/post-taxonomies/most-used-terms.js.map +1 -1
  92. package/build/components/post-template/classic-theme.js +0 -1
  93. package/build/components/post-template/classic-theme.js.map +1 -1
  94. package/build/components/post-template/swap-template-button.js +0 -1
  95. package/build/components/post-template/swap-template-button.js.map +1 -1
  96. package/build/components/post-transform-panel/hooks.js +0 -1
  97. package/build/components/post-transform-panel/hooks.js.map +1 -1
  98. package/build/components/post-type-support-check/index.js +0 -1
  99. package/build/components/post-type-support-check/index.js.map +1 -1
  100. package/build/components/preferences-modal/block-visibility.js +0 -1
  101. package/build/components/preferences-modal/block-visibility.js.map +1 -1
  102. package/build/components/preferences-modal/index.js +0 -1
  103. package/build/components/preferences-modal/index.js.map +1 -1
  104. package/build/components/provider/disable-non-page-content-blocks.js +0 -1
  105. package/build/components/provider/disable-non-page-content-blocks.js.map +1 -1
  106. package/build/components/provider/index.js +0 -1
  107. package/build/components/provider/index.js.map +1 -1
  108. package/build/components/provider/index.native.js +0 -1
  109. package/build/components/provider/index.native.js.map +1 -1
  110. package/build/components/provider/use-block-editor-settings.js +0 -1
  111. package/build/components/provider/use-block-editor-settings.js.map +1 -1
  112. package/build/components/sidebar/index.js +0 -1
  113. package/build/components/sidebar/index.js.map +1 -1
  114. package/build/components/start-template-options/index.js +0 -1
  115. package/build/components/start-template-options/index.js.map +1 -1
  116. package/build/components/template-part-content-panel/index.js +0 -1
  117. package/build/components/template-part-content-panel/index.js.map +1 -1
  118. package/build/components/theme-support-check/index.js +0 -1
  119. package/build/components/theme-support-check/index.js.map +1 -1
  120. package/build/components/visual-editor/use-select-nearest-editable-block.js +0 -1
  121. package/build/components/visual-editor/use-select-nearest-editable-block.js.map +1 -1
  122. package/build/dataviews/store/private-actions.js +0 -1
  123. package/build/dataviews/store/private-actions.js.map +1 -1
  124. package/build/dataviews/store/reducer.js +0 -1
  125. package/build/dataviews/store/reducer.js.map +1 -1
  126. package/build/hooks/custom-sources-backwards-compatibility.js +0 -1
  127. package/build/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  128. package/build/hooks/pattern-overrides.js +0 -1
  129. package/build/hooks/pattern-overrides.js.map +1 -1
  130. package/build/store/actions.js +0 -1
  131. package/build/store/actions.js.map +1 -1
  132. package/build/store/private-actions.js +0 -1
  133. package/build/store/private-actions.js.map +1 -1
  134. package/build/store/private-selectors.js +0 -1
  135. package/build/store/private-selectors.js.map +1 -1
  136. package/build/store/reducer.js +0 -1
  137. package/build/store/reducer.js.map +1 -1
  138. package/build/store/reducer.native.js +0 -1
  139. package/build/store/reducer.native.js.map +1 -1
  140. package/build/store/selectors.js +0 -1
  141. package/build/store/selectors.js.map +1 -1
  142. package/build/utils/get-template-info.js +0 -1
  143. package/build/utils/get-template-info.js.map +1 -1
  144. package/build/utils/terms.js +0 -1
  145. package/build/utils/terms.js.map +1 -1
  146. package/build-module/bindings/pattern-overrides.js +0 -1
  147. package/build-module/bindings/pattern-overrides.js.map +1 -1
  148. package/build-module/bindings/post-meta.js +0 -1
  149. package/build-module/bindings/post-meta.js.map +1 -1
  150. package/build-module/components/autocompleters/user.js +0 -1
  151. package/build-module/components/autocompleters/user.js.map +1 -1
  152. package/build-module/components/block-removal-warnings/index.js +0 -1
  153. package/build-module/components/block-removal-warnings/index.js.map +1 -1
  154. package/build-module/components/block-settings-menu/content-only-settings-menu.js +0 -1
  155. package/build-module/components/block-settings-menu/content-only-settings-menu.js.map +1 -1
  156. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js +0 -1
  157. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
  158. package/build-module/components/collab-sidebar/comments.js +0 -1
  159. package/build-module/components/collab-sidebar/comments.js.map +1 -1
  160. package/build-module/components/collab-sidebar/index.js +0 -1
  161. package/build-module/components/collab-sidebar/index.js.map +1 -1
  162. package/build-module/components/collab-sidebar/utils.js +0 -1
  163. package/build-module/components/collab-sidebar/utils.js.map +1 -1
  164. package/build-module/components/deprecated.js +0 -1
  165. package/build-module/components/deprecated.js.map +1 -1
  166. package/build-module/components/document-outline/index.js +0 -1
  167. package/build-module/components/document-outline/index.js.map +1 -1
  168. package/build-module/components/editor/index.js +9 -5
  169. package/build-module/components/editor/index.js.map +1 -1
  170. package/build-module/components/editor-help/index.native.js +0 -1
  171. package/build-module/components/editor-help/index.native.js.map +1 -1
  172. package/build-module/components/editor-notices/index.js +0 -1
  173. package/build-module/components/editor-notices/index.js.map +1 -1
  174. package/build-module/components/editor-snackbars/index.js +0 -1
  175. package/build-module/components/editor-snackbars/index.js.map +1 -1
  176. package/build-module/components/entities-saved-states/entity-type-list.js +0 -1
  177. package/build-module/components/entities-saved-states/entity-type-list.js.map +1 -1
  178. package/build-module/components/entities-saved-states/hooks/use-is-dirty.js +0 -1
  179. package/build-module/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -1
  180. package/build-module/components/entities-saved-states/index.js +0 -1
  181. package/build-module/components/entities-saved-states/index.js.map +1 -1
  182. package/build-module/components/keyboard-shortcut-help-modal/index.js +0 -1
  183. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  184. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +0 -1
  185. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  186. package/build-module/components/list-view-sidebar/index.js +0 -1
  187. package/build-module/components/list-view-sidebar/index.js.map +1 -1
  188. package/build-module/components/local-autosave-monitor/index.js +0 -1
  189. package/build-module/components/local-autosave-monitor/index.js.map +1 -1
  190. package/build-module/components/mode-switcher/index.js +0 -1
  191. package/build-module/components/mode-switcher/index.js.map +1 -1
  192. package/build-module/components/page-attributes/parent.js +8 -5
  193. package/build-module/components/page-attributes/parent.js.map +1 -1
  194. package/build-module/components/post-actions/actions.js +0 -1
  195. package/build-module/components/post-actions/actions.js.map +1 -1
  196. package/build-module/components/post-actions/index.js +0 -1
  197. package/build-module/components/post-actions/index.js.map +1 -1
  198. package/build-module/components/post-author/check.js +3 -4
  199. package/build-module/components/post-author/check.js.map +1 -1
  200. package/build-module/components/post-author/combobox.js +4 -2
  201. package/build-module/components/post-author/combobox.js.map +1 -1
  202. package/build-module/components/post-author/hook.js +8 -5
  203. package/build-module/components/post-author/hook.js.map +1 -1
  204. package/build-module/components/post-fields/index.js +0 -1
  205. package/build-module/components/post-fields/index.js.map +1 -1
  206. package/build-module/components/post-format/index.js +0 -1
  207. package/build-module/components/post-format/index.js.map +1 -1
  208. package/build-module/components/post-format/panel.js +0 -1
  209. package/build-module/components/post-format/panel.js.map +1 -1
  210. package/build-module/components/post-publish-button/index.js +0 -1
  211. package/build-module/components/post-publish-button/index.js.map +1 -1
  212. package/build-module/components/post-publish-panel/maybe-category-panel.js +2 -4
  213. package/build-module/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  214. package/build-module/components/post-publish-panel/maybe-post-format-panel.js +0 -1
  215. package/build-module/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  216. package/build-module/components/post-publish-panel/maybe-tags-panel.js +1 -1
  217. package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  218. package/build-module/components/post-publish-panel/maybe-upload-media.js +0 -1
  219. package/build-module/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  220. package/build-module/components/post-publish-panel/media-util.js +0 -1
  221. package/build-module/components/post-publish-panel/media-util.js.map +1 -1
  222. package/build-module/components/post-saved-state/index.js +0 -1
  223. package/build-module/components/post-saved-state/index.js.map +1 -1
  224. package/build-module/components/post-schedule/index.js +0 -1
  225. package/build-module/components/post-schedule/index.js.map +1 -1
  226. package/build-module/components/post-taxonomies/check.js +1 -1
  227. package/build-module/components/post-taxonomies/check.js.map +1 -1
  228. package/build-module/components/post-taxonomies/flat-term-selector.js +2 -3
  229. package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
  230. package/build-module/components/post-taxonomies/hierarchical-term-selector.js +2 -3
  231. package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  232. package/build-module/components/post-taxonomies/index.js +1 -2
  233. package/build-module/components/post-taxonomies/index.js.map +1 -1
  234. package/build-module/components/post-taxonomies/most-used-terms.js +0 -1
  235. package/build-module/components/post-taxonomies/most-used-terms.js.map +1 -1
  236. package/build-module/components/post-template/classic-theme.js +0 -1
  237. package/build-module/components/post-template/classic-theme.js.map +1 -1
  238. package/build-module/components/post-template/swap-template-button.js +0 -1
  239. package/build-module/components/post-template/swap-template-button.js.map +1 -1
  240. package/build-module/components/post-transform-panel/hooks.js +0 -1
  241. package/build-module/components/post-transform-panel/hooks.js.map +1 -1
  242. package/build-module/components/post-type-support-check/index.js +0 -1
  243. package/build-module/components/post-type-support-check/index.js.map +1 -1
  244. package/build-module/components/preferences-modal/block-visibility.js +0 -1
  245. package/build-module/components/preferences-modal/block-visibility.js.map +1 -1
  246. package/build-module/components/preferences-modal/index.js +0 -1
  247. package/build-module/components/preferences-modal/index.js.map +1 -1
  248. package/build-module/components/provider/disable-non-page-content-blocks.js +0 -1
  249. package/build-module/components/provider/disable-non-page-content-blocks.js.map +1 -1
  250. package/build-module/components/provider/index.js +0 -1
  251. package/build-module/components/provider/index.js.map +1 -1
  252. package/build-module/components/provider/index.native.js +0 -1
  253. package/build-module/components/provider/index.native.js.map +1 -1
  254. package/build-module/components/provider/use-block-editor-settings.js +0 -1
  255. package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
  256. package/build-module/components/sidebar/index.js +0 -1
  257. package/build-module/components/sidebar/index.js.map +1 -1
  258. package/build-module/components/start-template-options/index.js +0 -1
  259. package/build-module/components/start-template-options/index.js.map +1 -1
  260. package/build-module/components/template-part-content-panel/index.js +0 -1
  261. package/build-module/components/template-part-content-panel/index.js.map +1 -1
  262. package/build-module/components/theme-support-check/index.js +0 -1
  263. package/build-module/components/theme-support-check/index.js.map +1 -1
  264. package/build-module/components/visual-editor/use-select-nearest-editable-block.js +0 -1
  265. package/build-module/components/visual-editor/use-select-nearest-editable-block.js.map +1 -1
  266. package/build-module/dataviews/store/private-actions.js +0 -1
  267. package/build-module/dataviews/store/private-actions.js.map +1 -1
  268. package/build-module/dataviews/store/reducer.js +0 -1
  269. package/build-module/dataviews/store/reducer.js.map +1 -1
  270. package/build-module/hooks/custom-sources-backwards-compatibility.js +0 -1
  271. package/build-module/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  272. package/build-module/hooks/pattern-overrides.js +0 -1
  273. package/build-module/hooks/pattern-overrides.js.map +1 -1
  274. package/build-module/store/actions.js +0 -1
  275. package/build-module/store/actions.js.map +1 -1
  276. package/build-module/store/private-actions.js +0 -1
  277. package/build-module/store/private-actions.js.map +1 -1
  278. package/build-module/store/private-selectors.js +0 -1
  279. package/build-module/store/private-selectors.js.map +1 -1
  280. package/build-module/store/reducer.js +0 -1
  281. package/build-module/store/reducer.js.map +1 -1
  282. package/build-module/store/reducer.native.js +0 -1
  283. package/build-module/store/reducer.native.js.map +1 -1
  284. package/build-module/store/selectors.js +0 -1
  285. package/build-module/store/selectors.js.map +1 -1
  286. package/build-module/utils/get-template-info.js +0 -1
  287. package/build-module/utils/get-template-info.js.map +1 -1
  288. package/build-module/utils/terms.js +0 -1
  289. package/build-module/utils/terms.js.map +1 -1
  290. package/build-types/components/editor/index.d.ts.map +1 -1
  291. package/build-types/components/page-attributes/parent.d.ts.map +1 -1
  292. package/build-types/components/post-author/check.d.ts.map +1 -1
  293. package/build-types/components/post-author/combobox.d.ts.map +1 -1
  294. package/build-types/components/post-author/hook.d.ts +1 -0
  295. package/build-types/components/post-author/hook.d.ts.map +1 -1
  296. package/build-types/components/post-publish-panel/maybe-category-panel.d.ts.map +1 -1
  297. package/build-types/components/post-publish-panel/maybe-tags-panel.d.ts.map +1 -1
  298. package/build-types/components/post-taxonomies/check.d.ts.map +1 -1
  299. package/build-types/components/post-taxonomies/flat-term-selector.d.ts.map +1 -1
  300. package/build-types/components/post-taxonomies/index.d.ts.map +1 -1
  301. package/build-types/components/post-template/hooks.d.ts +1 -1
  302. package/build-types/components/post-template/hooks.d.ts.map +1 -1
  303. package/package.json +37 -37
  304. package/src/components/editor/index.js +24 -13
  305. package/src/components/page-attributes/parent.js +55 -38
  306. package/src/components/post-author/check.js +7 -4
  307. package/src/components/post-author/combobox.js +3 -1
  308. package/src/components/post-author/hook.js +4 -3
  309. package/src/components/post-publish-panel/maybe-category-panel.js +6 -2
  310. package/src/components/post-publish-panel/maybe-tags-panel.js +5 -1
  311. package/src/components/post-taxonomies/check.js +5 -3
  312. package/src/components/post-taxonomies/flat-term-selector.js +2 -2
  313. package/src/components/post-taxonomies/hierarchical-term-selector.js +2 -2
  314. package/src/components/post-taxonomies/index.js +5 -1
  315. package/src/components/post-taxonomies/test/index.js +32 -18
  316. package/tsconfig.tsbuildinfo +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["_deprecated","_interopRequireDefault","require","_element","_blockEditor","_jsxRuntime","_serverSideRender","deprecateComponent","name","Wrapped","staticsToHoist","Component","forwardRef","props","ref","deprecated","since","alternative","version","jsx","forEach","staticName","deprecateFunction","func","args","RichText","exports","RootRichText","isEmpty","Autocomplete","RootAutocomplete","AlignmentToolbar","RootAlignmentToolbar","BlockAlignmentToolbar","RootBlockAlignmentToolbar","BlockControls","RootBlockControls","BlockEdit","RootBlockEdit","BlockEditorKeyboardShortcuts","RootBlockEditorKeyboardShortcuts","BlockFormatControls","RootBlockFormatControls","BlockIcon","RootBlockIcon","BlockInspector","RootBlockInspector","BlockList","RootBlockList","BlockMover","RootBlockMover","BlockNavigationDropdown","RootBlockNavigationDropdown","BlockSelectionClearer","RootBlockSelectionClearer","BlockSettingsMenu","RootBlockSettingsMenu","BlockTitle","RootBlockTitle","BlockToolbar","RootBlockToolbar","ColorPalette","RootColorPalette","ContrastChecker","RootContrastChecker","CopyHandler","RootCopyHandler","DefaultBlockAppender","RootDefaultBlockAppender","FontSizePicker","RootFontSizePicker","Inserter","RootInserter","InnerBlocks","RootInnerBlocks","InspectorAdvancedControls","RootInspectorAdvancedControls","InspectorControls","RootInspectorControls","PanelColorSettings","RootPanelColorSettings","PlainText","RootPlainText","RichTextShortcut","RootRichTextShortcut","RichTextToolbarButton","RootRichTextToolbarButton","__unstableRichTextInputEvent","__unstableRootRichTextInputEvent","MediaPlaceholder","RootMediaPlaceholder","MediaUpload","RootMediaUpload","MediaUploadCheck","RootMediaUploadCheck","MultiSelectScrollIntoView","RootMultiSelectScrollIntoView","NavigableToolbar","RootNavigableToolbar","ObserveTyping","RootObserveTyping","SkipToSelectedBlock","RootSkipToSelectedBlock","URLInput","RootURLInput","URLInputButton","RootURLInputButton","URLPopover","RootURLPopover","Warning","RootWarning","WritingFlow","RootWritingFlow","createCustomColorsHOC","rootCreateCustomColorsHOC","getColorClassName","rootGetColorClassName","getColorObjectByAttributeValues","rootGetColorObjectByAttributeValues","getColorObjectByColorValue","rootGetColorObjectByColorValue","getFontSize","rootGetFontSize","getFontSizeClass","rootGetFontSizeClass","withColorContext","rootWithColorContext","withColors","rootWithColors","withFontSizes","rootWithFontSizes"],"sources":["@wordpress/editor/src/components/deprecated.js"],"sourcesContent":["// Block Creation Components.\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { forwardRef } from '@wordpress/element';\nimport {\n\tAutocomplete as RootAutocomplete,\n\tAlignmentToolbar as RootAlignmentToolbar,\n\tBlockAlignmentToolbar as RootBlockAlignmentToolbar,\n\tBlockControls as RootBlockControls,\n\tBlockEdit as RootBlockEdit,\n\tBlockEditorKeyboardShortcuts as RootBlockEditorKeyboardShortcuts,\n\tBlockFormatControls as RootBlockFormatControls,\n\tBlockIcon as RootBlockIcon,\n\tBlockInspector as RootBlockInspector,\n\tBlockList as RootBlockList,\n\tBlockMover as RootBlockMover,\n\tBlockNavigationDropdown as RootBlockNavigationDropdown,\n\tBlockSelectionClearer as RootBlockSelectionClearer,\n\tBlockSettingsMenu as RootBlockSettingsMenu,\n\tBlockTitle as RootBlockTitle,\n\tBlockToolbar as RootBlockToolbar,\n\tColorPalette as RootColorPalette,\n\tContrastChecker as RootContrastChecker,\n\tCopyHandler as RootCopyHandler,\n\tcreateCustomColorsHOC as rootCreateCustomColorsHOC,\n\tDefaultBlockAppender as RootDefaultBlockAppender,\n\tFontSizePicker as RootFontSizePicker,\n\tgetColorClassName as rootGetColorClassName,\n\tgetColorObjectByAttributeValues as rootGetColorObjectByAttributeValues,\n\tgetColorObjectByColorValue as rootGetColorObjectByColorValue,\n\tgetFontSize as rootGetFontSize,\n\tgetFontSizeClass as rootGetFontSizeClass,\n\tInserter as RootInserter,\n\tInnerBlocks as RootInnerBlocks,\n\tInspectorAdvancedControls as RootInspectorAdvancedControls,\n\tInspectorControls as RootInspectorControls,\n\tPanelColorSettings as RootPanelColorSettings,\n\tPlainText as RootPlainText,\n\tRichText as RootRichText,\n\tRichTextShortcut as RootRichTextShortcut,\n\tRichTextToolbarButton as RootRichTextToolbarButton,\n\t__unstableRichTextInputEvent as __unstableRootRichTextInputEvent,\n\tMediaPlaceholder as RootMediaPlaceholder,\n\tMediaUpload as RootMediaUpload,\n\tMediaUploadCheck as RootMediaUploadCheck,\n\tMultiSelectScrollIntoView as RootMultiSelectScrollIntoView,\n\tNavigableToolbar as RootNavigableToolbar,\n\tObserveTyping as RootObserveTyping,\n\tSkipToSelectedBlock as RootSkipToSelectedBlock,\n\tURLInput as RootURLInput,\n\tURLInputButton as RootURLInputButton,\n\tURLPopover as RootURLPopover,\n\tWarning as RootWarning,\n\tWritingFlow as RootWritingFlow,\n\twithColorContext as rootWithColorContext,\n\twithColors as rootWithColors,\n\twithFontSizes as rootWithFontSizes,\n} from '@wordpress/block-editor';\n\nexport { default as ServerSideRender } from '@wordpress/server-side-render';\n\nfunction deprecateComponent( name, Wrapped, staticsToHoist = [] ) {\n\tconst Component = forwardRef( ( props, ref ) => {\n\t\tdeprecated( 'wp.editor.' + name, {\n\t\t\tsince: '5.3',\n\t\t\talternative: 'wp.blockEditor.' + name,\n\t\t\tversion: '6.2',\n\t\t} );\n\n\t\treturn <Wrapped ref={ ref } { ...props } />;\n\t} );\n\n\tstaticsToHoist.forEach( ( staticName ) => {\n\t\tComponent[ staticName ] = deprecateComponent(\n\t\t\tname + '.' + staticName,\n\t\t\tWrapped[ staticName ]\n\t\t);\n\t} );\n\n\treturn Component;\n}\n\nfunction deprecateFunction( name, func ) {\n\treturn ( ...args ) => {\n\t\tdeprecated( 'wp.editor.' + name, {\n\t\t\tsince: '5.3',\n\t\t\talternative: 'wp.blockEditor.' + name,\n\t\t\tversion: '6.2',\n\t\t} );\n\n\t\treturn func( ...args );\n\t};\n}\n\n/**\n * @deprecated since 5.3, use `wp.blockEditor.RichText` instead.\n */\nconst RichText = deprecateComponent( 'RichText', RootRichText, [ 'Content' ] );\nRichText.isEmpty = deprecateFunction(\n\t'RichText.isEmpty',\n\tRootRichText.isEmpty\n);\n\nexport { RichText };\n\n/**\n * @deprecated since 5.3, use `wp.blockEditor.Autocomplete` instead.\n */\nexport const Autocomplete = deprecateComponent(\n\t'Autocomplete',\n\tRootAutocomplete\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.AlignmentToolbar` instead.\n */\nexport const AlignmentToolbar = deprecateComponent(\n\t'AlignmentToolbar',\n\tRootAlignmentToolbar\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockAlignmentToolbar` instead.\n */\nexport const BlockAlignmentToolbar = deprecateComponent(\n\t'BlockAlignmentToolbar',\n\tRootBlockAlignmentToolbar\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockControls` instead.\n */\nexport const BlockControls = deprecateComponent(\n\t'BlockControls',\n\tRootBlockControls,\n\t[ 'Slot' ]\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockEdit` instead.\n */\nexport const BlockEdit = deprecateComponent( 'BlockEdit', RootBlockEdit );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockEditorKeyboardShortcuts` instead.\n */\nexport const BlockEditorKeyboardShortcuts = deprecateComponent(\n\t'BlockEditorKeyboardShortcuts',\n\tRootBlockEditorKeyboardShortcuts\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockFormatControls` instead.\n */\nexport const BlockFormatControls = deprecateComponent(\n\t'BlockFormatControls',\n\tRootBlockFormatControls,\n\t[ 'Slot' ]\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockIcon` instead.\n */\nexport const BlockIcon = deprecateComponent( 'BlockIcon', RootBlockIcon );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockInspector` instead.\n */\nexport const BlockInspector = deprecateComponent(\n\t'BlockInspector',\n\tRootBlockInspector\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockList` instead.\n */\nexport const BlockList = deprecateComponent( 'BlockList', RootBlockList );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockMover` instead.\n */\nexport const BlockMover = deprecateComponent( 'BlockMover', RootBlockMover );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockNavigationDropdown` instead.\n */\nexport const BlockNavigationDropdown = deprecateComponent(\n\t'BlockNavigationDropdown',\n\tRootBlockNavigationDropdown\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockSelectionClearer` instead.\n */\nexport const BlockSelectionClearer = deprecateComponent(\n\t'BlockSelectionClearer',\n\tRootBlockSelectionClearer\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockSettingsMenu` instead.\n */\nexport const BlockSettingsMenu = deprecateComponent(\n\t'BlockSettingsMenu',\n\tRootBlockSettingsMenu\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockTitle` instead.\n */\nexport const BlockTitle = deprecateComponent( 'BlockTitle', RootBlockTitle );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockToolbar` instead.\n */\nexport const BlockToolbar = deprecateComponent(\n\t'BlockToolbar',\n\tRootBlockToolbar\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.ColorPalette` instead.\n */\nexport const ColorPalette = deprecateComponent(\n\t'ColorPalette',\n\tRootColorPalette\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.ContrastChecker` instead.\n */\nexport const ContrastChecker = deprecateComponent(\n\t'ContrastChecker',\n\tRootContrastChecker\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.CopyHandler` instead.\n */\nexport const CopyHandler = deprecateComponent( 'CopyHandler', RootCopyHandler );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.DefaultBlockAppender` instead.\n */\nexport const DefaultBlockAppender = deprecateComponent(\n\t'DefaultBlockAppender',\n\tRootDefaultBlockAppender\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.FontSizePicker` instead.\n */\nexport const FontSizePicker = deprecateComponent(\n\t'FontSizePicker',\n\tRootFontSizePicker\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.Inserter` instead.\n */\nexport const Inserter = deprecateComponent( 'Inserter', RootInserter );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.InnerBlocks` instead.\n */\nexport const InnerBlocks = deprecateComponent( 'InnerBlocks', RootInnerBlocks, [\n\t'ButtonBlockAppender',\n\t'DefaultBlockAppender',\n\t'Content',\n] );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.InspectorAdvancedControls` instead.\n */\nexport const InspectorAdvancedControls = deprecateComponent(\n\t'InspectorAdvancedControls',\n\tRootInspectorAdvancedControls,\n\t[ 'Slot' ]\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.InspectorControls` instead.\n */\nexport const InspectorControls = deprecateComponent(\n\t'InspectorControls',\n\tRootInspectorControls,\n\t[ 'Slot' ]\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.PanelColorSettings` instead.\n */\nexport const PanelColorSettings = deprecateComponent(\n\t'PanelColorSettings',\n\tRootPanelColorSettings\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.PlainText` instead.\n */\nexport const PlainText = deprecateComponent( 'PlainText', RootPlainText );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.RichTextShortcut` instead.\n */\nexport const RichTextShortcut = deprecateComponent(\n\t'RichTextShortcut',\n\tRootRichTextShortcut\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.RichTextToolbarButton` instead.\n */\nexport const RichTextToolbarButton = deprecateComponent(\n\t'RichTextToolbarButton',\n\tRootRichTextToolbarButton\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.__unstableRichTextInputEvent` instead.\n */\nexport const __unstableRichTextInputEvent = deprecateComponent(\n\t'__unstableRichTextInputEvent',\n\t__unstableRootRichTextInputEvent\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.MediaPlaceholder` instead.\n */\nexport const MediaPlaceholder = deprecateComponent(\n\t'MediaPlaceholder',\n\tRootMediaPlaceholder\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.MediaUpload` instead.\n */\nexport const MediaUpload = deprecateComponent( 'MediaUpload', RootMediaUpload );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.MediaUploadCheck` instead.\n */\nexport const MediaUploadCheck = deprecateComponent(\n\t'MediaUploadCheck',\n\tRootMediaUploadCheck\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.MultiSelectScrollIntoView` instead.\n */\nexport const MultiSelectScrollIntoView = deprecateComponent(\n\t'MultiSelectScrollIntoView',\n\tRootMultiSelectScrollIntoView\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.NavigableToolbar` instead.\n */\nexport const NavigableToolbar = deprecateComponent(\n\t'NavigableToolbar',\n\tRootNavigableToolbar\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.ObserveTyping` instead.\n */\nexport const ObserveTyping = deprecateComponent(\n\t'ObserveTyping',\n\tRootObserveTyping\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.SkipToSelectedBlock` instead.\n */\nexport const SkipToSelectedBlock = deprecateComponent(\n\t'SkipToSelectedBlock',\n\tRootSkipToSelectedBlock\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.URLInput` instead.\n */\nexport const URLInput = deprecateComponent( 'URLInput', RootURLInput );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.URLInputButton` instead.\n */\nexport const URLInputButton = deprecateComponent(\n\t'URLInputButton',\n\tRootURLInputButton\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.URLPopover` instead.\n */\nexport const URLPopover = deprecateComponent( 'URLPopover', RootURLPopover );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.Warning` instead.\n */\nexport const Warning = deprecateComponent( 'Warning', RootWarning );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.WritingFlow` instead.\n */\nexport const WritingFlow = deprecateComponent( 'WritingFlow', RootWritingFlow );\n\n/**\n * @deprecated since 5.3, use `wp.blockEditor.createCustomColorsHOC` instead.\n */\nexport const createCustomColorsHOC = deprecateFunction(\n\t'createCustomColorsHOC',\n\trootCreateCustomColorsHOC\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.getColorClassName` instead.\n */\nexport const getColorClassName = deprecateFunction(\n\t'getColorClassName',\n\trootGetColorClassName\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.getColorObjectByAttributeValues` instead.\n */\nexport const getColorObjectByAttributeValues = deprecateFunction(\n\t'getColorObjectByAttributeValues',\n\trootGetColorObjectByAttributeValues\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.getColorObjectByColorValue` instead.\n */\nexport const getColorObjectByColorValue = deprecateFunction(\n\t'getColorObjectByColorValue',\n\trootGetColorObjectByColorValue\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.getFontSize` instead.\n */\nexport const getFontSize = deprecateFunction( 'getFontSize', rootGetFontSize );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.getFontSizeClass` instead.\n */\nexport const getFontSizeClass = deprecateFunction(\n\t'getFontSizeClass',\n\trootGetFontSizeClass\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.createCustomColorsHOC` instead.\n */\nexport const withColorContext = deprecateFunction(\n\t'withColorContext',\n\trootWithColorContext\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.withColors` instead.\n */\nexport const withColors = deprecateFunction( 'withColors', rootWithColors );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.withFontSizes` instead.\n */\nexport const withFontSizes = deprecateFunction(\n\t'withFontSizes',\n\trootWithFontSizes\n);\n"],"mappings":";;;;;;;;;;;;;;;AAIA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAqDiC,IAAAG,WAAA,GAAAH,OAAA;AAEjC,IAAAI,iBAAA,GAAAL,sBAAA,CAAAC,OAAA;AA7DA;AACA;AACA;AACA;;AA4DA,SAASK,kBAAkBA,CAAEC,IAAI,EAAEC,OAAO,EAAEC,cAAc,GAAG,EAAE,EAAG;EACjE,MAAMC,SAAS,GAAG,IAAAC,mBAAU,EAAE,CAAEC,KAAK,EAAEC,GAAG,KAAM;IAC/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BAAA,GAAG7F,iBAAiB,CACjD,mBAAmB,EACnB8F,8BACD,CAAC;AACD;AACA;AACA;AACO,MAAMC,+BAA+B,GAAA3F,OAAA,CAAA2F,+BAAA,GAAG/F,iBAAiB,CAC/D,iCAAiC,EACjCgG,4CACD,CAAC;AACD;AACA;AACA;AACO,MAAMC,0BAA0B,GAAA7F,OAAA,CAAA6F,0BAAA,GAAGjG,iBAAiB,CAC1D,4BAA4B,EAC5BkG,uCACD,CAAC;AACD;AACA;AACA;AACO,MAAMC,WAAW,GAAA/F,OAAA,CAAA+F,WAAA,GAAGnG,iBAAiB,CAAE,aAAa,EAAEoG,wBAAgB,CAAC;AAC9E;AACA;AACA;AACO,MAAMC,gBAAgB,GAAAjG,OAAA,CAAAiG,gBAAA,GAAGrG,iBAAiB,CAChD,kBAAkB,EAClBsG,6BACD,CAAC;AACD;AACA;AACA;AACO,MAAMC,gBAAgB,GAAAnG,OAAA,CAAAmG,gBAAA,GAAGvG,iBAAiB,CAChD,kBAAkB,EAClBwG,6BACD,CAAC;AACD;AACA;AACA;AACO,MAAMC,UAAU,GAAArG,OAAA,CAAAqG,UAAA,GAAGzG,iBAAiB,CAAE,YAAY,EAAE0G,uBAAe,CAAC;AAC3E;AACA;AACA;AACO,MAAMC,aAAa,GAAAvG,OAAA,CAAAuG,aAAA,GAAG3G,iBAAiB,CAC7C,eAAe,EACf4G,0BACD,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_deprecated","_interopRequireDefault","require","_element","_blockEditor","_jsxRuntime","_serverSideRender","deprecateComponent","name","Wrapped","staticsToHoist","Component","forwardRef","props","ref","deprecated","since","alternative","version","jsx","forEach","staticName","deprecateFunction","func","args","RichText","exports","RootRichText","isEmpty","Autocomplete","RootAutocomplete","AlignmentToolbar","RootAlignmentToolbar","BlockAlignmentToolbar","RootBlockAlignmentToolbar","BlockControls","RootBlockControls","BlockEdit","RootBlockEdit","BlockEditorKeyboardShortcuts","RootBlockEditorKeyboardShortcuts","BlockFormatControls","RootBlockFormatControls","BlockIcon","RootBlockIcon","BlockInspector","RootBlockInspector","BlockList","RootBlockList","BlockMover","RootBlockMover","BlockNavigationDropdown","RootBlockNavigationDropdown","BlockSelectionClearer","RootBlockSelectionClearer","BlockSettingsMenu","RootBlockSettingsMenu","BlockTitle","RootBlockTitle","BlockToolbar","RootBlockToolbar","ColorPalette","RootColorPalette","ContrastChecker","RootContrastChecker","CopyHandler","RootCopyHandler","DefaultBlockAppender","RootDefaultBlockAppender","FontSizePicker","RootFontSizePicker","Inserter","RootInserter","InnerBlocks","RootInnerBlocks","InspectorAdvancedControls","RootInspectorAdvancedControls","InspectorControls","RootInspectorControls","PanelColorSettings","RootPanelColorSettings","PlainText","RootPlainText","RichTextShortcut","RootRichTextShortcut","RichTextToolbarButton","RootRichTextToolbarButton","__unstableRichTextInputEvent","__unstableRootRichTextInputEvent","MediaPlaceholder","RootMediaPlaceholder","MediaUpload","RootMediaUpload","MediaUploadCheck","RootMediaUploadCheck","MultiSelectScrollIntoView","RootMultiSelectScrollIntoView","NavigableToolbar","RootNavigableToolbar","ObserveTyping","RootObserveTyping","SkipToSelectedBlock","RootSkipToSelectedBlock","URLInput","RootURLInput","URLInputButton","RootURLInputButton","URLPopover","RootURLPopover","Warning","RootWarning","WritingFlow","RootWritingFlow","createCustomColorsHOC","rootCreateCustomColorsHOC","getColorClassName","rootGetColorClassName","getColorObjectByAttributeValues","rootGetColorObjectByAttributeValues","getColorObjectByColorValue","rootGetColorObjectByColorValue","getFontSize","rootGetFontSize","getFontSizeClass","rootGetFontSizeClass","withColorContext","rootWithColorContext","withColors","rootWithColors","withFontSizes","rootWithFontSizes"],"sources":["@wordpress/editor/src/components/deprecated.js"],"sourcesContent":["// Block Creation Components.\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { forwardRef } from '@wordpress/element';\nimport {\n\tAutocomplete as RootAutocomplete,\n\tAlignmentToolbar as RootAlignmentToolbar,\n\tBlockAlignmentToolbar as RootBlockAlignmentToolbar,\n\tBlockControls as RootBlockControls,\n\tBlockEdit as RootBlockEdit,\n\tBlockEditorKeyboardShortcuts as RootBlockEditorKeyboardShortcuts,\n\tBlockFormatControls as RootBlockFormatControls,\n\tBlockIcon as RootBlockIcon,\n\tBlockInspector as RootBlockInspector,\n\tBlockList as RootBlockList,\n\tBlockMover as RootBlockMover,\n\tBlockNavigationDropdown as RootBlockNavigationDropdown,\n\tBlockSelectionClearer as RootBlockSelectionClearer,\n\tBlockSettingsMenu as RootBlockSettingsMenu,\n\tBlockTitle as RootBlockTitle,\n\tBlockToolbar as RootBlockToolbar,\n\tColorPalette as RootColorPalette,\n\tContrastChecker as RootContrastChecker,\n\tCopyHandler as RootCopyHandler,\n\tcreateCustomColorsHOC as rootCreateCustomColorsHOC,\n\tDefaultBlockAppender as RootDefaultBlockAppender,\n\tFontSizePicker as RootFontSizePicker,\n\tgetColorClassName as rootGetColorClassName,\n\tgetColorObjectByAttributeValues as rootGetColorObjectByAttributeValues,\n\tgetColorObjectByColorValue as rootGetColorObjectByColorValue,\n\tgetFontSize as rootGetFontSize,\n\tgetFontSizeClass as rootGetFontSizeClass,\n\tInserter as RootInserter,\n\tInnerBlocks as RootInnerBlocks,\n\tInspectorAdvancedControls as RootInspectorAdvancedControls,\n\tInspectorControls as RootInspectorControls,\n\tPanelColorSettings as RootPanelColorSettings,\n\tPlainText as RootPlainText,\n\tRichText as RootRichText,\n\tRichTextShortcut as RootRichTextShortcut,\n\tRichTextToolbarButton as RootRichTextToolbarButton,\n\t__unstableRichTextInputEvent as __unstableRootRichTextInputEvent,\n\tMediaPlaceholder as RootMediaPlaceholder,\n\tMediaUpload as RootMediaUpload,\n\tMediaUploadCheck as RootMediaUploadCheck,\n\tMultiSelectScrollIntoView as RootMultiSelectScrollIntoView,\n\tNavigableToolbar as RootNavigableToolbar,\n\tObserveTyping as RootObserveTyping,\n\tSkipToSelectedBlock as RootSkipToSelectedBlock,\n\tURLInput as RootURLInput,\n\tURLInputButton as RootURLInputButton,\n\tURLPopover as RootURLPopover,\n\tWarning as RootWarning,\n\tWritingFlow as RootWritingFlow,\n\twithColorContext as rootWithColorContext,\n\twithColors as rootWithColors,\n\twithFontSizes as rootWithFontSizes,\n} from '@wordpress/block-editor';\n\nexport { default as ServerSideRender } from '@wordpress/server-side-render';\n\nfunction deprecateComponent( name, Wrapped, staticsToHoist = [] ) {\n\tconst Component = forwardRef( ( props, ref ) => {\n\t\tdeprecated( 'wp.editor.' + name, {\n\t\t\tsince: '5.3',\n\t\t\talternative: 'wp.blockEditor.' + name,\n\t\t\tversion: '6.2',\n\t\t} );\n\n\t\treturn <Wrapped ref={ ref } { ...props } />;\n\t} );\n\n\tstaticsToHoist.forEach( ( staticName ) => {\n\t\tComponent[ staticName ] = deprecateComponent(\n\t\t\tname + '.' + staticName,\n\t\t\tWrapped[ staticName ]\n\t\t);\n\t} );\n\n\treturn Component;\n}\n\nfunction deprecateFunction( name, func ) {\n\treturn ( ...args ) => {\n\t\tdeprecated( 'wp.editor.' + name, {\n\t\t\tsince: '5.3',\n\t\t\talternative: 'wp.blockEditor.' + name,\n\t\t\tversion: '6.2',\n\t\t} );\n\n\t\treturn func( ...args );\n\t};\n}\n\n/**\n * @deprecated since 5.3, use `wp.blockEditor.RichText` instead.\n */\nconst RichText = deprecateComponent( 'RichText', RootRichText, [ 'Content' ] );\nRichText.isEmpty = deprecateFunction(\n\t'RichText.isEmpty',\n\tRootRichText.isEmpty\n);\n\nexport { RichText };\n\n/**\n * @deprecated since 5.3, use `wp.blockEditor.Autocomplete` instead.\n */\nexport const Autocomplete = deprecateComponent(\n\t'Autocomplete',\n\tRootAutocomplete\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.AlignmentToolbar` instead.\n */\nexport const AlignmentToolbar = deprecateComponent(\n\t'AlignmentToolbar',\n\tRootAlignmentToolbar\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockAlignmentToolbar` instead.\n */\nexport const BlockAlignmentToolbar = deprecateComponent(\n\t'BlockAlignmentToolbar',\n\tRootBlockAlignmentToolbar\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockControls` instead.\n */\nexport const BlockControls = deprecateComponent(\n\t'BlockControls',\n\tRootBlockControls,\n\t[ 'Slot' ]\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockEdit` instead.\n */\nexport const BlockEdit = deprecateComponent( 'BlockEdit', RootBlockEdit );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockEditorKeyboardShortcuts` instead.\n */\nexport const BlockEditorKeyboardShortcuts = deprecateComponent(\n\t'BlockEditorKeyboardShortcuts',\n\tRootBlockEditorKeyboardShortcuts\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockFormatControls` instead.\n */\nexport const BlockFormatControls = deprecateComponent(\n\t'BlockFormatControls',\n\tRootBlockFormatControls,\n\t[ 'Slot' ]\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockIcon` instead.\n */\nexport const BlockIcon = deprecateComponent( 'BlockIcon', RootBlockIcon );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockInspector` instead.\n */\nexport const BlockInspector = deprecateComponent(\n\t'BlockInspector',\n\tRootBlockInspector\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockList` instead.\n */\nexport const BlockList = deprecateComponent( 'BlockList', RootBlockList );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockMover` instead.\n */\nexport const BlockMover = deprecateComponent( 'BlockMover', RootBlockMover );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockNavigationDropdown` instead.\n */\nexport const BlockNavigationDropdown = deprecateComponent(\n\t'BlockNavigationDropdown',\n\tRootBlockNavigationDropdown\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockSelectionClearer` instead.\n */\nexport const BlockSelectionClearer = deprecateComponent(\n\t'BlockSelectionClearer',\n\tRootBlockSelectionClearer\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockSettingsMenu` instead.\n */\nexport const BlockSettingsMenu = deprecateComponent(\n\t'BlockSettingsMenu',\n\tRootBlockSettingsMenu\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockTitle` instead.\n */\nexport const BlockTitle = deprecateComponent( 'BlockTitle', RootBlockTitle );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockToolbar` instead.\n */\nexport const BlockToolbar = deprecateComponent(\n\t'BlockToolbar',\n\tRootBlockToolbar\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.ColorPalette` instead.\n */\nexport const ColorPalette = deprecateComponent(\n\t'ColorPalette',\n\tRootColorPalette\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.ContrastChecker` instead.\n */\nexport const ContrastChecker = deprecateComponent(\n\t'ContrastChecker',\n\tRootContrastChecker\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.CopyHandler` instead.\n */\nexport const CopyHandler = deprecateComponent( 'CopyHandler', RootCopyHandler );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.DefaultBlockAppender` instead.\n */\nexport const DefaultBlockAppender = deprecateComponent(\n\t'DefaultBlockAppender',\n\tRootDefaultBlockAppender\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.FontSizePicker` instead.\n */\nexport const FontSizePicker = deprecateComponent(\n\t'FontSizePicker',\n\tRootFontSizePicker\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.Inserter` instead.\n */\nexport const Inserter = deprecateComponent( 'Inserter', RootInserter );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.InnerBlocks` instead.\n */\nexport const InnerBlocks = deprecateComponent( 'InnerBlocks', RootInnerBlocks, [\n\t'ButtonBlockAppender',\n\t'DefaultBlockAppender',\n\t'Content',\n] );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.InspectorAdvancedControls` instead.\n */\nexport const InspectorAdvancedControls = deprecateComponent(\n\t'InspectorAdvancedControls',\n\tRootInspectorAdvancedControls,\n\t[ 'Slot' ]\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.InspectorControls` instead.\n */\nexport const InspectorControls = deprecateComponent(\n\t'InspectorControls',\n\tRootInspectorControls,\n\t[ 'Slot' ]\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.PanelColorSettings` instead.\n */\nexport const PanelColorSettings = deprecateComponent(\n\t'PanelColorSettings',\n\tRootPanelColorSettings\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.PlainText` instead.\n */\nexport const PlainText = deprecateComponent( 'PlainText', RootPlainText );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.RichTextShortcut` instead.\n */\nexport const RichTextShortcut = deprecateComponent(\n\t'RichTextShortcut',\n\tRootRichTextShortcut\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.RichTextToolbarButton` instead.\n */\nexport const RichTextToolbarButton = deprecateComponent(\n\t'RichTextToolbarButton',\n\tRootRichTextToolbarButton\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.__unstableRichTextInputEvent` instead.\n */\nexport const __unstableRichTextInputEvent = deprecateComponent(\n\t'__unstableRichTextInputEvent',\n\t__unstableRootRichTextInputEvent\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.MediaPlaceholder` instead.\n */\nexport const MediaPlaceholder = deprecateComponent(\n\t'MediaPlaceholder',\n\tRootMediaPlaceholder\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.MediaUpload` instead.\n */\nexport const MediaUpload = deprecateComponent( 'MediaUpload', RootMediaUpload );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.MediaUploadCheck` instead.\n */\nexport const MediaUploadCheck = deprecateComponent(\n\t'MediaUploadCheck',\n\tRootMediaUploadCheck\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.MultiSelectScrollIntoView` instead.\n */\nexport const MultiSelectScrollIntoView = deprecateComponent(\n\t'MultiSelectScrollIntoView',\n\tRootMultiSelectScrollIntoView\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.NavigableToolbar` instead.\n */\nexport const NavigableToolbar = deprecateComponent(\n\t'NavigableToolbar',\n\tRootNavigableToolbar\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.ObserveTyping` instead.\n */\nexport const ObserveTyping = deprecateComponent(\n\t'ObserveTyping',\n\tRootObserveTyping\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.SkipToSelectedBlock` instead.\n */\nexport const SkipToSelectedBlock = deprecateComponent(\n\t'SkipToSelectedBlock',\n\tRootSkipToSelectedBlock\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.URLInput` instead.\n */\nexport const URLInput = deprecateComponent( 'URLInput', RootURLInput );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.URLInputButton` instead.\n */\nexport const URLInputButton = deprecateComponent(\n\t'URLInputButton',\n\tRootURLInputButton\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.URLPopover` instead.\n */\nexport const URLPopover = deprecateComponent( 'URLPopover', RootURLPopover );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.Warning` instead.\n */\nexport const Warning = deprecateComponent( 'Warning', RootWarning );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.WritingFlow` instead.\n */\nexport const WritingFlow = deprecateComponent( 'WritingFlow', RootWritingFlow );\n\n/**\n * @deprecated since 5.3, use `wp.blockEditor.createCustomColorsHOC` instead.\n */\nexport const createCustomColorsHOC = deprecateFunction(\n\t'createCustomColorsHOC',\n\trootCreateCustomColorsHOC\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.getColorClassName` instead.\n */\nexport const getColorClassName = deprecateFunction(\n\t'getColorClassName',\n\trootGetColorClassName\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.getColorObjectByAttributeValues` instead.\n */\nexport const getColorObjectByAttributeValues = deprecateFunction(\n\t'getColorObjectByAttributeValues',\n\trootGetColorObjectByAttributeValues\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.getColorObjectByColorValue` instead.\n */\nexport const getColorObjectByColorValue = deprecateFunction(\n\t'getColorObjectByColorValue',\n\trootGetColorObjectByColorValue\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.getFontSize` instead.\n */\nexport const getFontSize = deprecateFunction( 'getFontSize', rootGetFontSize );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.getFontSizeClass` instead.\n */\nexport const getFontSizeClass = deprecateFunction(\n\t'getFontSizeClass',\n\trootGetFontSizeClass\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.createCustomColorsHOC` instead.\n */\nexport const withColorContext = deprecateFunction(\n\t'withColorContext',\n\trootWithColorContext\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.withColors` instead.\n */\nexport const withColors = deprecateFunction( 'withColors', rootWithColors );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.withFontSizes` instead.\n */\nexport const withFontSizes = deprecateFunction(\n\t'withFontSizes',\n\trootWithFontSizes\n);\n"],"mappings":";;;;;;;;;;;;;;AAIA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAqDiC,IAAAG,WAAA,GAAAH,OAAA;AAEjC,IAAAI,iBAAA,GAAAL,sBAAA,CAAAC,OAAA;AA7DA;AACA;AACA;AACA;;AA4DA,SAASK,kBAAkBA,CAAEC,IAAI,EAAEC,OAAO,EAAEC,cAAc,GAAG,EAAE,EAAG;EACjE,MAAMC,SAAS,GAAG,IAAAC,mBAAU,EAAE,CAAEC,KAAK,EAAEC,GAAG,KAAM;IAC/C,IAAAC,mBAAU,EAAE,YAAY,GAAGP,IAAI,EAAE;MAChCQ,KAAK,EAAE,KAAK;MACZC,WAAW,EAAE,iBAAiB,GAAGT,IAAI;MACrCU,OAAO,EAAE;IACV,CAAE,CAAC;IAEH,oBAAO,IAAAb,WAAA,CAAAc,GAAA,EAACV,OAAO;MAACK,GAAG,EAAGA,GAAK;MAAA,GAAMD;IAAK,CAA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BAAiB,CAC1D,4BAA4B,EAC5BkG,uCACD,CAAC;AACD;AACA;AACA;AACO,MAAMC,WAAW,GAAA/F,OAAA,CAAA+F,WAAA,GAAGnG,iBAAiB,CAAE,aAAa,EAAEoG,wBAAgB,CAAC;AAC9E;AACA;AACA;AACO,MAAMC,gBAAgB,GAAAjG,OAAA,CAAAiG,gBAAA,GAAGrG,iBAAiB,CAChD,kBAAkB,EAClBsG,6BACD,CAAC;AACD;AACA;AACA;AACO,MAAMC,gBAAgB,GAAAnG,OAAA,CAAAmG,gBAAA,GAAGvG,iBAAiB,CAChD,kBAAkB,EAClBwG,6BACD,CAAC;AACD;AACA;AACA;AACO,MAAMC,UAAU,GAAArG,OAAA,CAAAqG,UAAA,GAAGzG,iBAAiB,CAAE,YAAY,EAAE0G,uBAAe,CAAC;AAC3E;AACA;AACA;AACO,MAAMC,aAAa,GAAAvG,OAAA,CAAAuG,aAAA,GAAG3G,iBAAiB,CAC7C,eAAe,EACf4G,0BACD,CAAC","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- /* wp:polyfill */
2
1
  "use strict";
3
2
 
4
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_data","_element","_richText","_blockEditor","_coreData","_components","_item","_interopRequireDefault","_store","_jsxRuntime","emptyHeadingContent","jsx","children","__","incorrectLevelContent","singleH1Headings","multipleH1Headings","EmptyOutlineIllustration","jsxs","SVG","width","height","viewBox","fill","xmlns","Rect","rx","Line","x1","y1","x2","y2","stroke","x","y","Path","d","computeOutlineHeadings","blocks","flatMap","block","name","level","attributes","isEmpty","isEmptyHeading","innerBlocks","heading","content","trim","length","DocumentOutline","onSelect","hasOutlineItemsDisabled","selectBlock","useDispatch","blockEditorStore","title","isTitleSupported","useSelect","select","_postType$supports$ti","getBlocks","getEditedPostAttribute","editorStore","getPostType","coreStore","postType","supports","prevHeadingLevelRef","useRef","headings","className","titleNode","document","querySelector","hasTitle","countByLevel","reduce","acc","hasMultipleH1","default","isValid","href","id","isDisabled","map","item","isIncorrectLevel","current","clientId","getTextContent","create","html"],"sources":["@wordpress/editor/src/components/document-outline/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useRef } from '@wordpress/element';\nimport { create, getTextContent } from '@wordpress/rich-text';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { Path, SVG, Line, Rect } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport DocumentOutlineItem from './item';\nimport { store as editorStore } from '../../store';\n\n/**\n * Module constants\n */\nconst emptyHeadingContent = <em>{ __( '(Empty heading)' ) }</em>;\nconst incorrectLevelContent = [\n\t<br key=\"incorrect-break\" />,\n\t<em key=\"incorrect-message\">{ __( '(Incorrect heading level)' ) }</em>,\n];\nconst singleH1Headings = [\n\t<br key=\"incorrect-break-h1\" />,\n\t<em key=\"incorrect-message-h1\">\n\t\t{ __( '(Your theme may already use a H1 for the post title)' ) }\n\t</em>,\n];\nconst multipleH1Headings = [\n\t<br key=\"incorrect-break-multiple-h1\" />,\n\t<em key=\"incorrect-message-multiple-h1\">\n\t\t{ __( '(Multiple H1 headings are not recommended)' ) }\n\t</em>,\n];\nfunction EmptyOutlineIllustration() {\n\treturn (\n\t\t<SVG\n\t\t\twidth=\"138\"\n\t\t\theight=\"148\"\n\t\t\tviewBox=\"0 0 138 148\"\n\t\t\tfill=\"none\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t>\n\t\t\t<Rect width=\"138\" height=\"148\" rx=\"4\" fill=\"#F0F6FC\" />\n\t\t\t<Line x1=\"44\" y1=\"28\" x2=\"24\" y2=\"28\" stroke=\"#DDDDDD\" />\n\t\t\t<Rect x=\"48\" y=\"16\" width=\"27\" height=\"23\" rx=\"4\" fill=\"#DDDDDD\" />\n\t\t\t<Path\n\t\t\t\td=\"M54.7585 32V23.2727H56.6037V26.8736H60.3494V23.2727H62.1903V32H60.3494V28.3949H56.6037V32H54.7585ZM67.4574 23.2727V32H65.6122V25.0241H65.5611L63.5625 26.277V24.6406L65.723 23.2727H67.4574Z\"\n\t\t\t\tfill=\"black\"\n\t\t\t/>\n\t\t\t<Line x1=\"55\" y1=\"59\" x2=\"24\" y2=\"59\" stroke=\"#DDDDDD\" />\n\t\t\t<Rect x=\"59\" y=\"47\" width=\"29\" height=\"23\" rx=\"4\" fill=\"#DDDDDD\" />\n\t\t\t<Path\n\t\t\t\td=\"M65.7585 63V54.2727H67.6037V57.8736H71.3494V54.2727H73.1903V63H71.3494V59.3949H67.6037V63H65.7585ZM74.6605 63V61.6705L77.767 58.794C78.0313 58.5384 78.2528 58.3082 78.4318 58.1037C78.6136 57.8991 78.7514 57.6989 78.8452 57.5028C78.9389 57.304 78.9858 57.0895 78.9858 56.8594C78.9858 56.6037 78.9276 56.3835 78.8111 56.1989C78.6946 56.0114 78.5355 55.8679 78.3338 55.7685C78.1321 55.6662 77.9034 55.6151 77.6477 55.6151C77.3807 55.6151 77.1477 55.669 76.9489 55.777C76.75 55.8849 76.5966 56.0398 76.4886 56.2415C76.3807 56.4432 76.3267 56.6832 76.3267 56.9616H74.5753C74.5753 56.3906 74.7045 55.8949 74.9631 55.4744C75.2216 55.054 75.5838 54.7287 76.0497 54.4986C76.5156 54.2685 77.0526 54.1534 77.6605 54.1534C78.2855 54.1534 78.8295 54.2642 79.2926 54.4858C79.7585 54.7045 80.1207 55.0085 80.3793 55.3977C80.6378 55.7869 80.767 56.233 80.767 56.7358C80.767 57.0653 80.7017 57.3906 80.571 57.7116C80.4432 58.0327 80.2145 58.3892 79.8849 58.7812C79.5554 59.1705 79.0909 59.6378 78.4915 60.1832L77.2173 61.4318V61.4915H80.8821V63H74.6605Z\"\n\t\t\t\tfill=\"black\"\n\t\t\t/>\n\t\t\t<Line x1=\"80\" y1=\"90\" x2=\"24\" y2=\"90\" stroke=\"#DDDDDD\" />\n\t\t\t<Rect x=\"84\" y=\"78\" width=\"30\" height=\"23\" rx=\"4\" fill=\"#F0B849\" />\n\t\t\t<Path\n\t\t\t\td=\"M90.7585 94V85.2727H92.6037V88.8736H96.3494V85.2727H98.1903V94H96.3494V90.3949H92.6037V94H90.7585ZM99.5284 92.4659V91.0128L103.172 85.2727H104.425V87.2841H103.683L101.386 90.919V90.9872H106.564V92.4659H99.5284ZM103.717 94V92.0227L103.751 91.3793V85.2727H105.482V94H103.717Z\"\n\t\t\t\tfill=\"black\"\n\t\t\t/>\n\t\t\t<Line x1=\"66\" y1=\"121\" x2=\"24\" y2=\"121\" stroke=\"#DDDDDD\" />\n\t\t\t<Rect x=\"70\" y=\"109\" width=\"29\" height=\"23\" rx=\"4\" fill=\"#DDDDDD\" />\n\t\t\t<Path\n\t\t\t\td=\"M76.7585 125V116.273H78.6037V119.874H82.3494V116.273H84.1903V125H82.3494V121.395H78.6037V125H76.7585ZM88.8864 125.119C88.25 125.119 87.6832 125.01 87.1861 124.791C86.6918 124.57 86.3011 124.266 86.0142 123.879C85.7301 123.49 85.5838 123.041 85.5753 122.533H87.4332C87.4446 122.746 87.5142 122.933 87.642 123.095C87.7727 123.254 87.946 123.378 88.1619 123.466C88.3778 123.554 88.6207 123.598 88.8906 123.598C89.1719 123.598 89.4205 123.548 89.6364 123.449C89.8523 123.349 90.0213 123.212 90.1435 123.036C90.2656 122.859 90.3267 122.656 90.3267 122.426C90.3267 122.193 90.2614 121.987 90.1307 121.808C90.0028 121.626 89.8182 121.484 89.5767 121.382C89.3381 121.28 89.054 121.229 88.7244 121.229H87.9105V119.874H88.7244C89.0028 119.874 89.2486 119.825 89.4616 119.729C89.6776 119.632 89.8452 119.499 89.9645 119.328C90.0838 119.155 90.1435 118.953 90.1435 118.723C90.1435 118.504 90.0909 118.312 89.9858 118.148C89.8835 117.98 89.7386 117.849 89.5511 117.756C89.3665 117.662 89.1506 117.615 88.9034 117.615C88.6534 117.615 88.4247 117.661 88.2173 117.751C88.0099 117.839 87.8438 117.966 87.7188 118.131C87.5938 118.295 87.527 118.489 87.5185 118.71H85.75C85.7585 118.207 85.902 117.764 86.1804 117.381C86.4588 116.997 86.8338 116.697 87.3054 116.482C87.7798 116.263 88.3153 116.153 88.9119 116.153C89.5142 116.153 90.0412 116.263 90.4929 116.482C90.9446 116.7 91.2955 116.996 91.5455 117.368C91.7983 117.737 91.9233 118.152 91.9205 118.612C91.9233 119.101 91.7713 119.509 91.4645 119.835C91.1605 120.162 90.7642 120.369 90.2756 120.457V120.526C90.9176 120.608 91.4063 120.831 91.7415 121.195C92.0795 121.555 92.2472 122.007 92.2443 122.55C92.2472 123.047 92.1037 123.489 91.8139 123.875C91.527 124.261 91.1307 124.565 90.625 124.787C90.1193 125.009 89.5398 125.119 88.8864 125.119Z\"\n\t\t\t\tfill=\"black\"\n\t\t\t/>\n\t\t</SVG>\n\t);\n}\n\n/**\n * Returns an array of heading blocks enhanced with the following properties:\n * level - An integer with the heading level.\n * isEmpty - Flag indicating if the heading has no content.\n *\n * @param {?Array} blocks An array of blocks.\n *\n * @return {Array} An array of heading blocks enhanced with the properties described above.\n */\nconst computeOutlineHeadings = ( blocks = [] ) => {\n\treturn blocks.flatMap( ( block = {} ) => {\n\t\tif ( block.name === 'core/heading' ) {\n\t\t\treturn {\n\t\t\t\t...block,\n\t\t\t\tlevel: block.attributes.level,\n\t\t\t\tisEmpty: isEmptyHeading( block ),\n\t\t\t};\n\t\t}\n\t\treturn computeOutlineHeadings( block.innerBlocks );\n\t} );\n};\n\nconst isEmptyHeading = ( heading ) =>\n\t! heading.attributes.content ||\n\theading.attributes.content.trim().length === 0;\n\n/**\n * Renders a document outline component.\n *\n * @param {Object} props Props.\n * @param {Function} props.onSelect Function to be called when an outline item is selected\n * @param {boolean} props.hasOutlineItemsDisabled Indicates whether the outline items are disabled.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default function DocumentOutline( {\n\tonSelect,\n\thasOutlineItemsDisabled,\n} ) {\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\tconst { blocks, title, isTitleSupported } = useSelect( ( select ) => {\n\t\tconst { getBlocks } = select( blockEditorStore );\n\t\tconst { getEditedPostAttribute } = select( editorStore );\n\t\tconst { getPostType } = select( coreStore );\n\t\tconst postType = getPostType( getEditedPostAttribute( 'type' ) );\n\n\t\treturn {\n\t\t\ttitle: getEditedPostAttribute( 'title' ),\n\t\t\tblocks: getBlocks(),\n\t\t\tisTitleSupported: postType?.supports?.title ?? false,\n\t\t};\n\t} );\n\n\tconst prevHeadingLevelRef = useRef( 1 );\n\n\tconst headings = computeOutlineHeadings( blocks );\n\tif ( headings.length < 1 ) {\n\t\treturn (\n\t\t\t<div className=\"editor-document-outline has-no-headings\">\n\t\t\t\t<EmptyOutlineIllustration />\n\t\t\t\t<p>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t'Navigate the structure of your document and address issues like empty or incorrect heading levels.'\n\t\t\t\t\t) }\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t);\n\t}\n\n\t// Not great but it's the simplest way to locate the title right now.\n\tconst titleNode = document.querySelector( '.editor-post-title__input' );\n\tconst hasTitle = isTitleSupported && title && titleNode;\n\tconst countByLevel = headings.reduce(\n\t\t( acc, heading ) => ( {\n\t\t\t...acc,\n\t\t\t[ heading.level ]: ( acc[ heading.level ] || 0 ) + 1,\n\t\t} ),\n\t\t{}\n\t);\n\tconst hasMultipleH1 = countByLevel[ 1 ] > 1;\n\n\treturn (\n\t\t<div className=\"document-outline\">\n\t\t\t<ul>\n\t\t\t\t{ hasTitle && (\n\t\t\t\t\t<DocumentOutlineItem\n\t\t\t\t\t\tlevel={ __( 'Title' ) }\n\t\t\t\t\t\tisValid\n\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\thref={ `#${ titleNode.id }` }\n\t\t\t\t\t\tisDisabled={ hasOutlineItemsDisabled }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ title }\n\t\t\t\t\t</DocumentOutlineItem>\n\t\t\t\t) }\n\t\t\t\t{ headings.map( ( item ) => {\n\t\t\t\t\t// Headings remain the same, go up by one, or down by any amount.\n\t\t\t\t\t// Otherwise there are missing levels.\n\t\t\t\t\tconst isIncorrectLevel =\n\t\t\t\t\t\titem.level > prevHeadingLevelRef.current + 1;\n\n\t\t\t\t\tconst isValid =\n\t\t\t\t\t\t! item.isEmpty &&\n\t\t\t\t\t\t! isIncorrectLevel &&\n\t\t\t\t\t\t!! item.level &&\n\t\t\t\t\t\t( item.level !== 1 ||\n\t\t\t\t\t\t\t( ! hasMultipleH1 && ! hasTitle ) );\n\t\t\t\t\tprevHeadingLevelRef.current = item.level;\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<DocumentOutlineItem\n\t\t\t\t\t\t\tkey={ item.clientId }\n\t\t\t\t\t\t\tlevel={ `H${ item.level }` }\n\t\t\t\t\t\t\tisValid={ isValid }\n\t\t\t\t\t\t\tisDisabled={ hasOutlineItemsDisabled }\n\t\t\t\t\t\t\thref={ `#block-${ item.clientId }` }\n\t\t\t\t\t\t\tonSelect={ () => {\n\t\t\t\t\t\t\t\tselectBlock( item.clientId );\n\t\t\t\t\t\t\t\tonSelect?.();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ item.isEmpty\n\t\t\t\t\t\t\t\t? emptyHeadingContent\n\t\t\t\t\t\t\t\t: getTextContent(\n\t\t\t\t\t\t\t\t\t\tcreate( {\n\t\t\t\t\t\t\t\t\t\t\thtml: item.attributes.content,\n\t\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{ isIncorrectLevel && incorrectLevelContent }\n\t\t\t\t\t\t\t{ item.level === 1 &&\n\t\t\t\t\t\t\t\thasMultipleH1 &&\n\t\t\t\t\t\t\t\tmultipleH1Headings }\n\t\t\t\t\t\t\t{ hasTitle &&\n\t\t\t\t\t\t\t\titem.level === 1 &&\n\t\t\t\t\t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M,EAAE;YACPC,IAAI,EAAEN,IAAI,CAAC5C,UAAU,CAACK;UACvB,CAAE,CACF,CAAC,EACFwC,gBAAgB,IAAI1E,qBAAqB,EACzCyE,IAAI,CAAC7C,KAAK,KAAK,CAAC,IACjBsC,aAAa,IACbhE,kBAAkB,EACjB4D,QAAQ,IACTW,IAAI,CAAC7C,KAAK,KAAK,CAAC,IAChB,CAAEsC,aAAa,IACfjE,gBAAgB;QAAA,GAxBXwE,IAAI,CAACG,QAyBS,CAAC;MAExB,CAAE,CAAC;IAAA,CACA;EAAC,CACD,CAAC;AAER","ignoreList":[]}
1
+ {"version":3,"names":["_i18n","require","_data","_element","_richText","_blockEditor","_coreData","_components","_item","_interopRequireDefault","_store","_jsxRuntime","emptyHeadingContent","jsx","children","__","incorrectLevelContent","singleH1Headings","multipleH1Headings","EmptyOutlineIllustration","jsxs","SVG","width","height","viewBox","fill","xmlns","Rect","rx","Line","x1","y1","x2","y2","stroke","x","y","Path","d","computeOutlineHeadings","blocks","flatMap","block","name","level","attributes","isEmpty","isEmptyHeading","innerBlocks","heading","content","trim","length","DocumentOutline","onSelect","hasOutlineItemsDisabled","selectBlock","useDispatch","blockEditorStore","title","isTitleSupported","useSelect","select","_postType$supports$ti","getBlocks","getEditedPostAttribute","editorStore","getPostType","coreStore","postType","supports","prevHeadingLevelRef","useRef","headings","className","titleNode","document","querySelector","hasTitle","countByLevel","reduce","acc","hasMultipleH1","default","isValid","href","id","isDisabled","map","item","isIncorrectLevel","current","clientId","getTextContent","create","html"],"sources":["@wordpress/editor/src/components/document-outline/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useRef } from '@wordpress/element';\nimport { create, getTextContent } from '@wordpress/rich-text';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { Path, SVG, Line, Rect } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport DocumentOutlineItem from './item';\nimport { store as editorStore } from '../../store';\n\n/**\n * Module constants\n */\nconst emptyHeadingContent = <em>{ __( '(Empty heading)' ) }</em>;\nconst incorrectLevelContent = [\n\t<br key=\"incorrect-break\" />,\n\t<em key=\"incorrect-message\">{ __( '(Incorrect heading level)' ) }</em>,\n];\nconst singleH1Headings = [\n\t<br key=\"incorrect-break-h1\" />,\n\t<em key=\"incorrect-message-h1\">\n\t\t{ __( '(Your theme may already use a H1 for the post title)' ) }\n\t</em>,\n];\nconst multipleH1Headings = [\n\t<br key=\"incorrect-break-multiple-h1\" />,\n\t<em key=\"incorrect-message-multiple-h1\">\n\t\t{ __( '(Multiple H1 headings are not recommended)' ) }\n\t</em>,\n];\nfunction EmptyOutlineIllustration() {\n\treturn (\n\t\t<SVG\n\t\t\twidth=\"138\"\n\t\t\theight=\"148\"\n\t\t\tviewBox=\"0 0 138 148\"\n\t\t\tfill=\"none\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t>\n\t\t\t<Rect width=\"138\" height=\"148\" rx=\"4\" fill=\"#F0F6FC\" />\n\t\t\t<Line x1=\"44\" y1=\"28\" x2=\"24\" y2=\"28\" stroke=\"#DDDDDD\" />\n\t\t\t<Rect x=\"48\" y=\"16\" width=\"27\" height=\"23\" rx=\"4\" fill=\"#DDDDDD\" />\n\t\t\t<Path\n\t\t\t\td=\"M54.7585 32V23.2727H56.6037V26.8736H60.3494V23.2727H62.1903V32H60.3494V28.3949H56.6037V32H54.7585ZM67.4574 23.2727V32H65.6122V25.0241H65.5611L63.5625 26.277V24.6406L65.723 23.2727H67.4574Z\"\n\t\t\t\tfill=\"black\"\n\t\t\t/>\n\t\t\t<Line x1=\"55\" y1=\"59\" x2=\"24\" y2=\"59\" stroke=\"#DDDDDD\" />\n\t\t\t<Rect x=\"59\" y=\"47\" width=\"29\" height=\"23\" rx=\"4\" fill=\"#DDDDDD\" />\n\t\t\t<Path\n\t\t\t\td=\"M65.7585 63V54.2727H67.6037V57.8736H71.3494V54.2727H73.1903V63H71.3494V59.3949H67.6037V63H65.7585ZM74.6605 63V61.6705L77.767 58.794C78.0313 58.5384 78.2528 58.3082 78.4318 58.1037C78.6136 57.8991 78.7514 57.6989 78.8452 57.5028C78.9389 57.304 78.9858 57.0895 78.9858 56.8594C78.9858 56.6037 78.9276 56.3835 78.8111 56.1989C78.6946 56.0114 78.5355 55.8679 78.3338 55.7685C78.1321 55.6662 77.9034 55.6151 77.6477 55.6151C77.3807 55.6151 77.1477 55.669 76.9489 55.777C76.75 55.8849 76.5966 56.0398 76.4886 56.2415C76.3807 56.4432 76.3267 56.6832 76.3267 56.9616H74.5753C74.5753 56.3906 74.7045 55.8949 74.9631 55.4744C75.2216 55.054 75.5838 54.7287 76.0497 54.4986C76.5156 54.2685 77.0526 54.1534 77.6605 54.1534C78.2855 54.1534 78.8295 54.2642 79.2926 54.4858C79.7585 54.7045 80.1207 55.0085 80.3793 55.3977C80.6378 55.7869 80.767 56.233 80.767 56.7358C80.767 57.0653 80.7017 57.3906 80.571 57.7116C80.4432 58.0327 80.2145 58.3892 79.8849 58.7812C79.5554 59.1705 79.0909 59.6378 78.4915 60.1832L77.2173 61.4318V61.4915H80.8821V63H74.6605Z\"\n\t\t\t\tfill=\"black\"\n\t\t\t/>\n\t\t\t<Line x1=\"80\" y1=\"90\" x2=\"24\" y2=\"90\" stroke=\"#DDDDDD\" />\n\t\t\t<Rect x=\"84\" y=\"78\" width=\"30\" height=\"23\" rx=\"4\" fill=\"#F0B849\" />\n\t\t\t<Path\n\t\t\t\td=\"M90.7585 94V85.2727H92.6037V88.8736H96.3494V85.2727H98.1903V94H96.3494V90.3949H92.6037V94H90.7585ZM99.5284 92.4659V91.0128L103.172 85.2727H104.425V87.2841H103.683L101.386 90.919V90.9872H106.564V92.4659H99.5284ZM103.717 94V92.0227L103.751 91.3793V85.2727H105.482V94H103.717Z\"\n\t\t\t\tfill=\"black\"\n\t\t\t/>\n\t\t\t<Line x1=\"66\" y1=\"121\" x2=\"24\" y2=\"121\" stroke=\"#DDDDDD\" />\n\t\t\t<Rect x=\"70\" y=\"109\" width=\"29\" height=\"23\" rx=\"4\" fill=\"#DDDDDD\" />\n\t\t\t<Path\n\t\t\t\td=\"M76.7585 125V116.273H78.6037V119.874H82.3494V116.273H84.1903V125H82.3494V121.395H78.6037V125H76.7585ZM88.8864 125.119C88.25 125.119 87.6832 125.01 87.1861 124.791C86.6918 124.57 86.3011 124.266 86.0142 123.879C85.7301 123.49 85.5838 123.041 85.5753 122.533H87.4332C87.4446 122.746 87.5142 122.933 87.642 123.095C87.7727 123.254 87.946 123.378 88.1619 123.466C88.3778 123.554 88.6207 123.598 88.8906 123.598C89.1719 123.598 89.4205 123.548 89.6364 123.449C89.8523 123.349 90.0213 123.212 90.1435 123.036C90.2656 122.859 90.3267 122.656 90.3267 122.426C90.3267 122.193 90.2614 121.987 90.1307 121.808C90.0028 121.626 89.8182 121.484 89.5767 121.382C89.3381 121.28 89.054 121.229 88.7244 121.229H87.9105V119.874H88.7244C89.0028 119.874 89.2486 119.825 89.4616 119.729C89.6776 119.632 89.8452 119.499 89.9645 119.328C90.0838 119.155 90.1435 118.953 90.1435 118.723C90.1435 118.504 90.0909 118.312 89.9858 118.148C89.8835 117.98 89.7386 117.849 89.5511 117.756C89.3665 117.662 89.1506 117.615 88.9034 117.615C88.6534 117.615 88.4247 117.661 88.2173 117.751C88.0099 117.839 87.8438 117.966 87.7188 118.131C87.5938 118.295 87.527 118.489 87.5185 118.71H85.75C85.7585 118.207 85.902 117.764 86.1804 117.381C86.4588 116.997 86.8338 116.697 87.3054 116.482C87.7798 116.263 88.3153 116.153 88.9119 116.153C89.5142 116.153 90.0412 116.263 90.4929 116.482C90.9446 116.7 91.2955 116.996 91.5455 117.368C91.7983 117.737 91.9233 118.152 91.9205 118.612C91.9233 119.101 91.7713 119.509 91.4645 119.835C91.1605 120.162 90.7642 120.369 90.2756 120.457V120.526C90.9176 120.608 91.4063 120.831 91.7415 121.195C92.0795 121.555 92.2472 122.007 92.2443 122.55C92.2472 123.047 92.1037 123.489 91.8139 123.875C91.527 124.261 91.1307 124.565 90.625 124.787C90.1193 125.009 89.5398 125.119 88.8864 125.119Z\"\n\t\t\t\tfill=\"black\"\n\t\t\t/>\n\t\t</SVG>\n\t);\n}\n\n/**\n * Returns an array of heading blocks enhanced with the following properties:\n * level - An integer with the heading level.\n * isEmpty - Flag indicating if the heading has no content.\n *\n * @param {?Array} blocks An array of blocks.\n *\n * @return {Array} An array of heading blocks enhanced with the properties described above.\n */\nconst computeOutlineHeadings = ( blocks = [] ) => {\n\treturn blocks.flatMap( ( block = {} ) => {\n\t\tif ( block.name === 'core/heading' ) {\n\t\t\treturn {\n\t\t\t\t...block,\n\t\t\t\tlevel: block.attributes.level,\n\t\t\t\tisEmpty: isEmptyHeading( block ),\n\t\t\t};\n\t\t}\n\t\treturn computeOutlineHeadings( block.innerBlocks );\n\t} );\n};\n\nconst isEmptyHeading = ( heading ) =>\n\t! heading.attributes.content ||\n\theading.attributes.content.trim().length === 0;\n\n/**\n * Renders a document outline component.\n *\n * @param {Object} props Props.\n * @param {Function} props.onSelect Function to be called when an outline item is selected\n * @param {boolean} props.hasOutlineItemsDisabled Indicates whether the outline items are disabled.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default function DocumentOutline( {\n\tonSelect,\n\thasOutlineItemsDisabled,\n} ) {\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\tconst { blocks, title, isTitleSupported } = useSelect( ( select ) => {\n\t\tconst { getBlocks } = select( blockEditorStore );\n\t\tconst { getEditedPostAttribute } = select( editorStore );\n\t\tconst { getPostType } = select( coreStore );\n\t\tconst postType = getPostType( getEditedPostAttribute( 'type' ) );\n\n\t\treturn {\n\t\t\ttitle: getEditedPostAttribute( 'title' ),\n\t\t\tblocks: getBlocks(),\n\t\t\tisTitleSupported: postType?.supports?.title ?? false,\n\t\t};\n\t} );\n\n\tconst prevHeadingLevelRef = useRef( 1 );\n\n\tconst headings = computeOutlineHeadings( blocks );\n\tif ( headings.length < 1 ) {\n\t\treturn (\n\t\t\t<div className=\"editor-document-outline has-no-headings\">\n\t\t\t\t<EmptyOutlineIllustration />\n\t\t\t\t<p>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t'Navigate the structure of your document and address issues like empty or incorrect heading levels.'\n\t\t\t\t\t) }\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t);\n\t}\n\n\t// Not great but it's the simplest way to locate the title right now.\n\tconst titleNode = document.querySelector( '.editor-post-title__input' );\n\tconst hasTitle = isTitleSupported && title && titleNode;\n\tconst countByLevel = headings.reduce(\n\t\t( acc, heading ) => ( {\n\t\t\t...acc,\n\t\t\t[ heading.level ]: ( acc[ heading.level ] || 0 ) + 1,\n\t\t} ),\n\t\t{}\n\t);\n\tconst hasMultipleH1 = countByLevel[ 1 ] > 1;\n\n\treturn (\n\t\t<div className=\"document-outline\">\n\t\t\t<ul>\n\t\t\t\t{ hasTitle && (\n\t\t\t\t\t<DocumentOutlineItem\n\t\t\t\t\t\tlevel={ __( 'Title' ) }\n\t\t\t\t\t\tisValid\n\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\thref={ `#${ titleNode.id }` }\n\t\t\t\t\t\tisDisabled={ hasOutlineItemsDisabled }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ title }\n\t\t\t\t\t</DocumentOutlineItem>\n\t\t\t\t) }\n\t\t\t\t{ headings.map( ( item ) => {\n\t\t\t\t\t// Headings remain the same, go up by one, or down by any amount.\n\t\t\t\t\t// Otherwise there are missing levels.\n\t\t\t\t\tconst isIncorrectLevel =\n\t\t\t\t\t\titem.level > prevHeadingLevelRef.current + 1;\n\n\t\t\t\t\tconst isValid =\n\t\t\t\t\t\t! item.isEmpty &&\n\t\t\t\t\t\t! isIncorrectLevel &&\n\t\t\t\t\t\t!! item.level &&\n\t\t\t\t\t\t( item.level !== 1 ||\n\t\t\t\t\t\t\t( ! hasMultipleH1 && ! hasTitle ) );\n\t\t\t\t\tprevHeadingLevelRef.current = item.level;\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<DocumentOutlineItem\n\t\t\t\t\t\t\tkey={ item.clientId }\n\t\t\t\t\t\t\tlevel={ `H${ item.level }` }\n\t\t\t\t\t\t\tisValid={ isValid }\n\t\t\t\t\t\t\tisDisabled={ hasOutlineItemsDisabled }\n\t\t\t\t\t\t\thref={ `#block-${ item.clientId }` }\n\t\t\t\t\t\t\tonSelect={ () => {\n\t\t\t\t\t\t\t\tselectBlock( item.clientId );\n\t\t\t\t\t\t\t\tonSelect?.();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ item.isEmpty\n\t\t\t\t\t\t\t\t? emptyHeadingContent\n\t\t\t\t\t\t\t\t: getTextContent(\n\t\t\t\t\t\t\t\t\t\tcreate( {\n\t\t\t\t\t\t\t\t\t\t\thtml: item.attributes.content,\n\t\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{ isIncorrectLevel && incorrectLevelContent }\n\t\t\t\t\t\t\t{ item.level === 1 &&\n\t\t\t\t\t\t\t\thasMultipleH1 &&\n\t\t\t\t\t\t\t\tmultipleH1Headings }\n\t\t\t\t\t\t\t{ hasTitle &&\n\t\t\t\t\t\t\t\titem.level === 1 &&\n\t\t\t\t\t\t\t\t! hasMultipleH1 &&\n\t\t\t\t\t\t\t\tsingleH1Headings }\n\t\t\t\t\t\t</DocumentOutlineItem>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</ul>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM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@@ -40,23 +40,27 @@ function Editor({
40
40
  const {
41
41
  post,
42
42
  template,
43
- hasLoadedPost
43
+ hasLoadedPost,
44
+ error
44
45
  } = (0, _data.useSelect)(select => {
45
46
  const {
46
47
  getEntityRecord,
48
+ getResolutionError,
47
49
  hasFinishedResolution
48
50
  } = select(_coreData.store);
51
+ const postArgs = ['postType', postType, postId];
49
52
  return {
50
- post: getEntityRecord('postType', postType, postId),
53
+ post: getEntityRecord(...postArgs),
51
54
  template: templateId ? getEntityRecord('postType', _constants.TEMPLATE_POST_TYPE, templateId) : undefined,
52
- hasLoadedPost: hasFinishedResolution('getEntityRecord', ['postType', postType, postId])
55
+ hasLoadedPost: hasFinishedResolution('getEntityRecord', postArgs),
56
+ error: getResolutionError('getEntityRecord', postArgs)?.message
53
57
  };
54
58
  }, [postType, postId, templateId]);
55
59
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
56
60
  children: [hasLoadedPost && !post && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Notice, {
57
- status: "warning",
61
+ status: !!error ? 'error' : 'warning',
58
62
  isDismissible: false,
59
- children: (0, _i18n.__)("You attempted to edit an item that doesn't exist. Perhaps it was deleted?")
63
+ children: !error ? (0, _i18n.__)("You attempted to edit an item that doesn't exist. Perhaps it was deleted?") : error
60
64
  }), !!post && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_provider.ExperimentalEditorProvider, {
61
65
  post: post,
62
66
  __unstableTemplate: template,
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","_coreData","_components","_i18n","_constants","_editorInterface","_interopRequireDefault","_provider","_sidebar","_jsxRuntime","Editor","postType","postId","templateId","settings","children","initialEdits","onActionPerformed","extraContent","extraSidebarPanels","props","post","template","hasLoadedPost","useSelect","select","getEntityRecord","hasFinishedResolution","coreStore","TEMPLATE_POST_TYPE","undefined","jsxs","Fragment","jsx","Notice","status","isDismissible","__","ExperimentalEditorProvider","__unstableTemplate","useSubRegistry","default","extraPanels","_default","exports"],"sources":["@wordpress/editor/src/components/editor/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { Notice } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { TEMPLATE_POST_TYPE } from '../../store/constants';\nimport EditorInterface from '../editor-interface';\nimport { ExperimentalEditorProvider } from '../provider';\nimport Sidebar from '../sidebar';\n\nfunction Editor( {\n\tpostType,\n\tpostId,\n\ttemplateId,\n\tsettings,\n\tchildren,\n\tinitialEdits,\n\n\t// This could be part of the settings.\n\tonActionPerformed,\n\n\t// The following abstractions are not ideal but necessary\n\t// to account for site editor and post editor differences for now.\n\textraContent,\n\textraSidebarPanels,\n\t...props\n} ) {\n\tconst { post, template, hasLoadedPost } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecord, hasFinishedResolution } =\n\t\t\t\tselect( coreStore );\n\t\t\treturn {\n\t\t\t\tpost: getEntityRecord( 'postType', postType, postId ),\n\t\t\t\ttemplate: templateId\n\t\t\t\t\t? getEntityRecord(\n\t\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t\tTEMPLATE_POST_TYPE,\n\t\t\t\t\t\t\ttemplateId\n\t\t\t\t\t )\n\t\t\t\t\t: undefined,\n\t\t\t\thasLoadedPost: hasFinishedResolution( 'getEntityRecord', [\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\tpostId,\n\t\t\t\t] ),\n\t\t\t};\n\t\t},\n\t\t[ postType, postId, templateId ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ hasLoadedPost && ! post && (\n\t\t\t\t<Notice status=\"warning\" isDismissible={ false }>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t\"You attempted to edit an item that doesn't exist. Perhaps it was deleted?\"\n\t\t\t\t\t) }\n\t\t\t\t</Notice>\n\t\t\t) }\n\t\t\t{ !! post && (\n\t\t\t\t<ExperimentalEditorProvider\n\t\t\t\t\tpost={ post }\n\t\t\t\t\t__unstableTemplate={ template }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tinitialEdits={ initialEdits }\n\t\t\t\t\tuseSubRegistry={ false }\n\t\t\t\t>\n\t\t\t\t\t<EditorInterface { ...props }>\n\t\t\t\t\t\t{ extraContent }\n\t\t\t\t\t</EditorInterface>\n\t\t\t\t\t{ children }\n\t\t\t\t\t<Sidebar\n\t\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\t\textraPanels={ extraSidebarPanels }\n\t\t\t\t\t/>\n\t\t\t\t</ExperimentalEditorProvider>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default Editor;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAKA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,gBAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAF,sBAAA,CAAAN,OAAA;AAAiC,IAAAS,WAAA,GAAAT,OAAA;AAdjC;AACA;AACA;;AAMA;AACA;AACA;;AAMA,SAASU,MAAMA,CAAE;EAChBC,QAAQ;EACRC,MAAM;EACNC,UAAU;EACVC,QAAQ;EACRC,QAAQ;EACRC,YAAY;EAEZ;EACAC,iBAAiB;EAEjB;EACA;EACAC,YAAY;EACZC,kBAAkB;EAClB,GAAGC;AACJ,CAAC,EAAG;EACH,MAAM;IAAEC,IAAI;IAAEC,QAAQ;IAAEC;EAAc,CAAC,GAAG,IAAAC,eAAS,EAChDC,MAAM,IAAM;IACb,MAAM;MAAEC,eAAe;MAAEC;IAAsB,CAAC,GAC/CF,MAAM,CAAEG,eAAU,CAAC;IACpB,OAAO;MACNP,IAAI,EAAEK,e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oreList":[]}
1
+ {"version":3,"names":["_data","require","_coreData","_components","_i18n","_constants","_editorInterface","_interopRequireDefault","_provider","_sidebar","_jsxRuntime","Editor","postType","postId","templateId","settings","children","initialEdits","onActionPerformed","extraContent","extraSidebarPanels","props","post","template","hasLoadedPost","error","useSelect","select","getEntityRecord","getResolutionError","hasFinishedResolution","coreStore","postArgs","TEMPLATE_POST_TYPE","undefined","message","jsxs","Fragment","jsx","Notice","status","isDismissible","__","ExperimentalEditorProvider","__unstableTemplate","useSubRegistry","default","extraPanels","_default","exports"],"sources":["@wordpress/editor/src/components/editor/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { Notice } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { TEMPLATE_POST_TYPE } from '../../store/constants';\nimport EditorInterface from '../editor-interface';\nimport { ExperimentalEditorProvider } from '../provider';\nimport Sidebar from '../sidebar';\n\nfunction Editor( {\n\tpostType,\n\tpostId,\n\ttemplateId,\n\tsettings,\n\tchildren,\n\tinitialEdits,\n\n\t// This could be part of the settings.\n\tonActionPerformed,\n\n\t// The following abstractions are not ideal but necessary\n\t// to account for site editor and post editor differences for now.\n\textraContent,\n\textraSidebarPanels,\n\t...props\n} ) {\n\tconst { post, template, hasLoadedPost, error } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetEntityRecord,\n\t\t\t\tgetResolutionError,\n\t\t\t\thasFinishedResolution,\n\t\t\t} = select( coreStore );\n\n\t\t\tconst postArgs = [ 'postType', postType, postId ];\n\t\t\treturn {\n\t\t\t\tpost: getEntityRecord( ...postArgs ),\n\t\t\t\ttemplate: templateId\n\t\t\t\t\t? getEntityRecord(\n\t\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t\tTEMPLATE_POST_TYPE,\n\t\t\t\t\t\t\ttemplateId\n\t\t\t\t\t )\n\t\t\t\t\t: undefined,\n\t\t\t\thasLoadedPost: hasFinishedResolution(\n\t\t\t\t\t'getEntityRecord',\n\t\t\t\t\tpostArgs\n\t\t\t\t),\n\t\t\t\terror: getResolutionError( 'getEntityRecord', postArgs )\n\t\t\t\t\t?.message,\n\t\t\t};\n\t\t},\n\t\t[ postType, postId, templateId ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ hasLoadedPost && ! post && (\n\t\t\t\t<Notice\n\t\t\t\t\tstatus={ !! error ? 'error' : 'warning' }\n\t\t\t\t\tisDismissible={ false }\n\t\t\t\t>\n\t\t\t\t\t{ ! error\n\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\"You attempted to edit an item that doesn't exist. Perhaps it was deleted?\"\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: error }\n\t\t\t\t</Notice>\n\t\t\t) }\n\t\t\t{ !! post && (\n\t\t\t\t<ExperimentalEditorProvider\n\t\t\t\t\tpost={ post }\n\t\t\t\t\t__unstableTemplate={ template }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tinitialEdits={ initialEdits }\n\t\t\t\t\tuseSubRegistry={ false }\n\t\t\t\t>\n\t\t\t\t\t<EditorInterface { ...props }>\n\t\t\t\t\t\t{ extraContent }\n\t\t\t\t\t</EditorInterface>\n\t\t\t\t\t{ children }\n\t\t\t\t\t<Sidebar\n\t\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\t\textraPanels={ extraSidebarPanels }\n\t\t\t\t\t/>\n\t\t\t\t</ExperimentalEditorProvider>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default Editor;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAKA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,gBAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,I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EAAG,KAAO;MAAAzB,QAAA,EAErB,CAAES,KAAK,GACN,IAAAiB,QAAE,EACF,2EACA,CAAC,GACDjB;IAAK,CACD,CACR,EACC,CAAC,CAAEH,IAAI,iBACR,IAAAZ,WAAA,CAAA0B,IAAA,EAAC5B,SAAA,CAAAmC,0BAA0B;MAC1BrB,IAAI,EAAGA,IAAM;MACbsB,kBAAkB,EAAGrB,QAAU;MAC/BR,QAAQ,EAAGA,QAAU;MACrBE,YAAY,EAAGA,YAAc;MAC7B4B,cAAc,EAAG,KAAO;MAAA7B,QAAA,gBAExB,IAAAN,WAAA,CAAA4B,GAAA,EAAChC,gBAAA,CAAAwC,OAAe;QAAA,GAAMzB,KAAK;QAAAL,QAAA,EACxBG;MAAY,CACE,CAAC,EAChBH,QAAQ,eACV,IAAAN,WAAA,CAAA4B,GAAA,EAAC7B,QAAA,CAAAqC,OAAO;QACP5B,iBAAiB,EAAGA,iBAAmB;QACvC6B,WAAW,EAAG3B;MAAoB,CAClC,CAAC;IAAA,CACyB,CAC5B;EAAA,CACA,CAAC;AAEL;AAAC,IAAA4B,QAAA,GAAAC,OAAA,CAAAH,OAAA,GAEcnC,MAAM","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- /* wp:polyfill */
2
1
  "use strict";
3
2
 
4
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_stack","_components","_i18n","_icons","_data","_editor","_reactNativeBridge","_style","_interopRequireDefault","_helpDetailNavigationScreen","_helpTopicRow","_helpGetSupportButton","_introToBlocks","_addBlocks","_moveBlocks","_removeBlocks","_customizeBlocks","_iconMoveBlocks","_helpSectionTitle","_jsxRuntime","HELP_TOPICS","label","__","slug","icon","helpFilled","view","jsx","default","plusCircleFilled","moveBlocksIcon","trash","cog","EditorHelpTopics","close","isVisible","onClose","showSupport","postType","useSelect","select","editorStore","getEditedPostAttribute","title","supportSection","jsxs","Fragment","children","onPress","requestContactCustomerSupport","requestGotoCustomerSupportOptions","BottomSheet","hideHeader","hasNavigation","contentStyle","styles","contentContainer","testID","SafeAreaView","style","safeAreaContainer","NavigationContainer","animate","main","navigationContainer","NavigationScreen","isScrollable","fullScreen","name","View","container","NavBar","DismissButton","iosText","Heading","BottomSheetConsumer","listProps","contentContainerStyle","StyleSheet","flatten","ScrollView","paddingBottom","Math","max","safeAreaBottomInset","marginTop","PanelBody","map","index","isLastItem","length","screenName","content","options","gestureEnabled","TransitionPresets","DefaultTransition","_default","exports"],"sources":["@wordpress/editor/src/components/editor-help/index.native.js"],"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 style={ styles.safeAreaContainer }>\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"],"mappings":";;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAKA,IAAAE,WAAA,GAAAF,OAAA;AAKA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,k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AW,IACZO,cAAc;kBAAA,CACL;gBAAC,CACD,CAAC;cAEf;YAAC,CACmB,CAAC;UAAA,CACjB;QAAC,CACsB,CAAC,EAE7BxB,WAAW,CAACmE,GAAG,CAAE,CAAE;UAAE7D,IAAI;UAAEL,KAAK;UAAEE;QAAK,CAAC,KAAM;UAC/C,oBACC,IAAAJ,WAAA,CAAAQ,GAAA,EAAClB,2BAAA,CAAAmB,OAA0B;YAE1BwC,IAAI,EAAG7C,IAAM;YACbqE,OAAO,EAAGlE,IAAM;YAChBL,KAAK,EAAGA,KAAO;YACfwE,OAAO,EAAG;cACTC,cAAc,EAAE,KAAK;cACrB,GAAGC,wBAAiB,CAACC;YACtB;UAAG,GAPGzE,IAQN,CAAC;QAEJ,CAAE,CAAC;MAAA,CAC6B;IAAC,CACrB;EAAC,CACH,CAAC;AAEhB;AAAC,IAAA0E,QAAA,GAAAC,OAAA,CAAAtE,OAAA,GAEcK,gBAAgB","ignoreList":[]}
1
+ {"version":3,"names":["_reactNative","require","_stack","_components","_i18n","_icons","_data","_editor","_reactNativeBridge","_style","_interopRequireDefault","_helpDetailNavigationScreen","_helpTopicRow","_helpGetSupportButton","_introToBlocks","_addBlocks","_moveBlocks","_removeBlocks","_customizeBlocks","_iconMoveBlocks","_helpSectionTitle","_jsxRuntime","HELP_TOPICS","label","__","slug","icon","helpFilled","view","jsx","default","plusCircleFilled","moveBlocksIcon","trash","cog","EditorHelpTopics","close","isVisible","onClose","showSupport","postType","useSelect","select","editorStore","getEditedPostAttribute","title","supportSection","jsxs","Fragment","children","onPress","requestContactCustomerSupport","requestGotoCustomerSupportOptions","BottomSheet","hideHeader","hasNavigation","contentStyle","styles","contentContainer","testID","SafeAreaView","style","safeAreaContainer","NavigationContainer","animate","main","navigationContainer","NavigationScreen","isScrollable","fullScreen","name","View","container","NavBar","DismissButton","iosText","Heading","BottomSheetConsumer","listProps","contentContainerStyle","StyleSheet","flatten","ScrollView","paddingBottom","Math","max","safeAreaBottomInset","marginTop","PanelBody","map","index","isLastItem","length","screenName","content","options","gestureEnabled","TransitionPresets","DefaultTransition","_default","exports"],"sources":["@wordpress/editor/src/components/editor-help/index.native.js"],"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 style={ styles.safeAreaContainer }>\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"],"mappings":";;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAKA,IAAAE,WAAA,GAAAF,OAAA;AAKA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,kBAAA,GAAAP,OAAA;AAQA,IAAAQ,MAAA,GAAAC,sBAAA,CAAAT,OAAA;AACA,IAAAU,2BAAA,GAAAD,sBAAA,CAAAT,OAAA;AACA,IAAAW,aAAA,GAAAF,sBAAA,CAAAT,OAAA;AACA,IAAAY,qBAAA,GAAAH,sBAAA,CAAAT,OAAA;AACA,IAAAa,cAAA,GAAAJ,sBAAA,CAAAT,OAAA;AACA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,OAA0B;YAE1BwC,IAAI,EAAG7C,IAAM;YACbqE,OAAO,EAAGlE,IAAM;YAChBL,KAAK,EAAGA,KAAO;YACfwE,OAAO,EAAG;cACTC,cAAc,EAAE,KAAK;cACrB,GAAGC,wBAAiB,CAACC;YACtB;UAAG,GAPGzE,IAQN,CAAC;QAEJ,CAAE,CAAC;MAAA,CAC6B;IAAC,CACrB;EAAC,CACH,CAAC;AAEhB;AAAC,IAAA0E,QAAA,GAAAC,OAAA,CAAAtE,OAAA,GAEcK,gBAAgB","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- /* wp:polyfill */
2
1
  "use strict";
3
2
 
4
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_data","_notices","_templateValidationNotice","_interopRequireDefault","_jsxRuntime","EditorNotices","notices","useSelect","select","noticesStore","getNotices","removeNotice","useDispatch","dismissibleNotices","filter","isDismissible","type","nonDismissibleNotices","jsxs","Fragment","children","jsx","NoticeList","className","onRemove","default","_default","exports"],"sources":["@wordpress/editor/src/components/editor-notices/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { NoticeList } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport TemplateValidationNotice from '../template-validation-notice';\n\n/**\n * This component renders the notices displayed in the editor. It displays pinned notices first, followed by dismissible\n *\n * @example\n * ```jsx\n * <EditorNotices />\n * ```\n *\n * @return {React.ReactNode} The rendered EditorNotices component.\n */\nexport function EditorNotices() {\n\tconst { notices } = useSelect(\n\t\t( select ) => ( {\n\t\t\tnotices: select( noticesStore ).getNotices(),\n\t\t} ),\n\t\t[]\n\t);\n\tconst { removeNotice } = useDispatch( noticesStore );\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={ removeNotice }\n\t\t\t>\n\t\t\t\t<TemplateValidationNotice />\n\t\t\t</NoticeList>\n\t\t</>\n\t);\n}\n\nexport default EditorNotices;\n"],"mappings":";;;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAKA,IAAAG,yBAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAAqE,IAAAK,WAAA,GAAAL,OAAA;AAVrE;AACA;AACA;;AAKA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASM,aAAaA,CAAA,EAAG;EAC/B,MAAM;IAAEC;EAAQ,CAAC,GAAG,IAAAC,eAAS,EAC1BC,MAAM,KAAQ;IACfF,OAAO,EAAEE,MAAM,CAAEC,cAAa,CAAC,CAACC,UAAU,CAAC;EAC5C,CAAC,CAAE,EACH,EACD,CAAC;EACD,MAAM;IAAEC;EAAa,CAAC,GAAG,IAAAC,iBAAW,EAAEH,cAAa,CAAC;EACpD,MAAMI,kBAAkB,GAAGP,OAAO,CAACQ,MAAM,CACxC,CAAE;IAAEC,aAAa;IAAEC;EAAK,CAAC,KAAMD,aAAa,IAAIC,IAAI,KAAK,SAC1D,CAAC;EACD,MAAMC,qBAAqB,GAAGX,OAAO,CAACQ,MAAM,CAC3C,CAAE;IAAEC,aAAa;IAAEC;EAAK,CAAC,KAAM,CAAED,aAAa,IAAIC,IAAI,KAAK,SAC5D,CAAC;EAED,oBACC,IAAAZ,WAAA,CAAAc,IAAA,EAAAd,WAAA,CAAAe,QAAA;IAAAC,QAAA,gBACC,IAAAhB,WAAA,CAAAiB,GAAA,EAACvB,WAAA,CAAAwB,UAAU;MACVhB,OAAO,EAAGW,qBAAuB;MACjCM,SAAS,EAAC;IAAmC,CAC7C,CAAC,eACF,IAAAnB,WAAA,CAAAiB,GAAA,EAACvB,WAAA,CAAAwB,UAAU;MACVhB,OAAO,EAAGO,kBAAoB;MAC9BU,SAAS,EAAC,wCAAwC;MAClDC,QAAQ,EAAGb,YAAc;MAAAS,QAAA,eAEzB,IAAAhB,WAAA,CAAAiB,GAAA,EAACnB,yBAAA,CAAAuB,OAAwB,IAAE;IAAC,CACjB,CAAC;EAAA,CACZ,CAAC;AAEL;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAF,OAAA,GAEcpB,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["_components","require","_data","_notices","_templateValidationNotice","_interopRequireDefault","_jsxRuntime","EditorNotices","notices","useSelect","select","noticesStore","getNotices","removeNotice","useDispatch","dismissibleNotices","filter","isDismissible","type","nonDismissibleNotices","jsxs","Fragment","children","jsx","NoticeList","className","onRemove","default","_default","exports"],"sources":["@wordpress/editor/src/components/editor-notices/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { NoticeList } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport TemplateValidationNotice from '../template-validation-notice';\n\n/**\n * This component renders the notices displayed in the editor. It displays pinned notices first, followed by dismissible\n *\n * @example\n * ```jsx\n * <EditorNotices />\n * ```\n *\n * @return {React.ReactNode} The rendered EditorNotices component.\n */\nexport function EditorNotices() {\n\tconst { notices } = useSelect(\n\t\t( select ) => ( {\n\t\t\tnotices: select( noticesStore ).getNotices(),\n\t\t} ),\n\t\t[]\n\t);\n\tconst { removeNotice } = useDispatch( noticesStore );\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={ removeNotice }\n\t\t\t>\n\t\t\t\t<TemplateValidationNotice />\n\t\t\t</NoticeList>\n\t\t</>\n\t);\n}\n\nexport default EditorNotices;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAKA,IAAAG,yBAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAAqE,IAAAK,WAAA,GAAAL,OAAA;AAVrE;AACA;AACA;;AAKA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASM,aAAaA,CAAA,EAAG;EAC/B,MAAM;IAAEC;EAAQ,CAAC,GAAG,IAAAC,eAAS,EAC1BC,MAAM,KAAQ;IACfF,OAAO,EAAEE,MAAM,CAAEC,cAAa,CAAC,CAACC,UAAU,CAAC;EAC5C,CAAC,CAAE,EACH,EACD,CAAC;EACD,MAAM;IAAEC;EAAa,CAAC,GAAG,IAAAC,iBAAW,EAAEH,cAAa,CAAC;EACpD,MAAMI,kBAAkB,GAAGP,OAAO,CAACQ,MAAM,CACxC,CAAE;IAAEC,aAAa;IAAEC;EAAK,CAAC,KAAMD,aAAa,IAAIC,IAAI,KAAK,SAC1D,CAAC;EACD,MAAMC,qBAAqB,GAAGX,OAAO,CAACQ,MAAM,CAC3C,CAAE;IAAEC,aAAa;IAAEC;EAAK,CAAC,KAAM,CAAED,aAAa,IAAIC,IAAI,KAAK,SAC5D,CAAC;EAED,oBACC,IAAAZ,WAAA,CAAAc,IAAA,EAAAd,WAAA,CAAAe,QAAA;IAAAC,QAAA,gBACC,IAAAhB,WAAA,CAAAiB,GAAA,EAACvB,WAAA,CAAAwB,UAAU;MACVhB,OAAO,EAAGW,qBAAuB;MACjCM,SAAS,EAAC;IAAmC,CAC7C,CAAC,eACF,IAAAnB,WAAA,CAAAiB,GAAA,EAACvB,WAAA,CAAAwB,UAAU;MACVhB,OAAO,EAAGO,kBAAoB;MAC9BU,SAAS,EAAC,wCAAwC;MAClDC,QAAQ,EAAGb,YAAc;MAAAS,QAAA,eAEzB,IAAAhB,WAAA,CAAAiB,GAAA,EAACnB,yBAAA,CAAAuB,OAAwB,IAAE;IAAC,CACjB,CAAC;EAAA,CACZ,CAAC;AAEL;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAF,OAAA,GAEcpB,aAAa","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- /* wp:polyfill */
2
1
  "use strict";
3
2
 
4
3
  Object.defineProperty(exports, "__esModule", {
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_data","_notices","_jsxRuntime","MAX_VISIBLE_NOTICES","EditorSnackbars","notices","useSelect","select","noticesStore","getNotices","removeNotice","useDispatch","snackbarNotices","filter","type","slice","jsx","SnackbarList","className","onRemove"],"sources":["@wordpress/editor/src/components/editor-snackbars/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { SnackbarList } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as noticesStore } from '@wordpress/notices';\n\n// Last three notices. Slices from the tail end of the list.\nconst MAX_VISIBLE_NOTICES = -3;\n\n/**\n * Renders the editor snackbars component.\n *\n * @return {React.ReactNode} The rendered component.\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\n\t\t.filter( ( { type } ) => type === 'snackbar' )\n\t\t.slice( MAX_VISIBLE_NOTICES );\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"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAA2D,IAAAG,WAAA,GAAAH,OAAA;AAL3D;AACA;AACA;;AAKA;AACA,MAAMI,mBAAmB,GAAG,CAAC,CAAC;;AAE9B;AACA;AACA;AACA;AACA;AACe,SAASC,eAAeA,CAAA,EAAG;EACzC,MAAMC,OAAO,GAAG,IAAAC,eAAS,EACtBC,MAAM,IAAMA,MAAM,CAAEC,cAAa,CAAC,CAACC,UAAU,CAAC,CAAC,EACjD,EACD,CAAC;EACD,MAAM;IAAEC;EAAa,CAAC,GAAG,IAAAC,iBAAW,EAAEH,cAAa,CAAC;EACpD,MAAMI,eAAe,GAAGP,OAAO,CAC7BQ,MAAM,CAAE,CAAE;IAAEC;EAAK,CAAC,KAAMA,IAAI,KAAK,UAAW,CAAC,CAC7CC,KAAK,CAAEZ,mBAAoB,CAAC;EAE9B,oBACC,IAAAD,WAAA,CAAAc,GAAA,EAAClB,WAAA,CAAAmB,YAAY;IACZZ,OAAO,EAAGO,eAAiB;IAC3BM,SAAS,EAAC,qCAAqC;IAC/CC,QAAQ,EAAGT;EAAc,CACzB,CAAC;AAEJ","ignoreList":[]}
1
+ {"version":3,"names":["_components","require","_data","_notices","_jsxRuntime","MAX_VISIBLE_NOTICES","EditorSnackbars","notices","useSelect","select","noticesStore","getNotices","removeNotice","useDispatch","snackbarNotices","filter","type","slice","jsx","SnackbarList","className","onRemove"],"sources":["@wordpress/editor/src/components/editor-snackbars/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { SnackbarList } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as noticesStore } from '@wordpress/notices';\n\n// Last three notices. Slices from the tail end of the list.\nconst MAX_VISIBLE_NOTICES = -3;\n\n/**\n * Renders the editor snackbars component.\n *\n * @return {React.ReactNode} The rendered component.\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\n\t\t.filter( ( { type } ) => type === 'snackbar' )\n\t\t.slice( MAX_VISIBLE_NOTICES );\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"],"mappings":";;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAA2D,IAAAG,WAAA,GAAAH,OAAA;AAL3D;AACA;AACA;;AAKA;AACA,MAAMI,mBAAmB,GAAG,CAAC,CAAC;;AAE9B;AACA;AACA;AACA;AACA;AACe,SAASC,eAAeA,CAAA,EAAG;EACzC,MAAMC,OAAO,GAAG,IAAAC,eAAS,EACtBC,MAAM,IAAMA,MAAM,CAAEC,cAAa,CAAC,CAACC,UAAU,CAAC,CAAC,EACjD,EACD,CAAC;EACD,MAAM;IAAEC;EAAa,CAAC,GAAG,IAAAC,iBAAW,EAAEH,cAAa,CAAC;EACpD,MAAMI,eAAe,GAAGP,OAAO,CAC7BQ,MAAM,CAAE,CAAE;IAAEC;EAAK,CAAC,KAAMA,IAAI,KAAK,UAAW,CAAC,CAC7CC,KAAK,CAAEZ,mBAAoB,CAAC;EAE9B,oBACC,IAAAD,WAAA,CAAAc,GAAA,EAAClB,WAAA,CAAAmB,YAAY;IACZZ,OAAO,EAAGO,eAAiB;IAC3BM,SAAS,EAAC,qCAAqC;IAC/CC,QAAQ,EAAGT;EAAc,CACzB,CAAC;AAEJ","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- /* wp:polyfill */
2
1
  "use strict";
3
2
 
4
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_data","_components","_coreData","_blockEditor","_element","_entityRecordItem","_interopRequireDefault","_lockUnlock","_jsxRuntime","getGlobalStylesChanges","GlobalStylesContext","unlock","blockEditorPrivateApis","getEntityDescription","entity","count","__","GlobalStylesDescription","record","user","currentEditorGlobalStyles","useContext","savedRecord","useSelect","select","coreStore","getEntityRecord","kind","name","key","globalStylesChanges","maxResults","length","jsx","className","children","map","change","EntityDescription","description","PanelRow","EntityTypeList","list","unselectedEntities","setUnselectedEntities","firstRecord","entityConfig","getEntityConfig","entityLabel","label","jsxs","PanelBody","title","initialOpen","default","checked","some","elt","property","onChange","value"],"sources":["@wordpress/editor/src/components/entities-saved-states/entity-type-list.js"],"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';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport EntityRecordItem from './entity-record-item';\nimport { unlock } from '../../lock-unlock';\n\nconst { getGlobalStylesChanges, GlobalStylesContext } = unlock(\n\tblockEditorPrivateApis\n);\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 has been modified.' );\n\t}\n}\n\nfunction GlobalStylesDescription( { record } ) {\n\tconst { user: currentEditorGlobalStyles } =\n\t\tuseContext( GlobalStylesContext );\n\tconst savedRecord = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).getEntityRecord(\n\t\t\t\trecord.kind,\n\t\t\t\trecord.name,\n\t\t\t\trecord.key\n\t\t\t),\n\t\t[ record.kind, record.name, record.key ]\n\t);\n\n\tconst globalStylesChanges = getGlobalStylesChanges(\n\t\tcurrentEditorGlobalStyles,\n\t\tsavedRecord,\n\t\t{\n\t\t\tmaxResults: 10,\n\t\t}\n\t);\n\treturn globalStylesChanges.length ? (\n\t\t<ul className=\"entities-saved-states__changes\">\n\t\t\t{ globalStylesChanges.map( ( change ) => (\n\t\t\t\t<li key={ change }>{ change }</li>\n\t\t\t) ) }\n\t\t</ul>\n\t) : null;\n}\n\nfunction EntityDescription( { record, count } ) {\n\tif ( 'globalStyles' === record?.name ) {\n\t\treturn null;\n\t}\n\tconst description = getEntityDescription( record?.name, count );\n\treturn description ? <PanelRow>{ description }</PanelRow> : null;\n}\n\nexport default function EntityTypeList( {\n\tlist,\n\tunselectedEntities,\n\tsetUnselectedEntities,\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\n\tlet entityLabel = entityConfig.label;\n\tif ( firstRecord?.name === 'wp_template_part' ) {\n\t\tentityLabel =\n\t\t\t1 === count ? __( 'Template Part' ) : __( 'Template Parts' );\n\t}\n\n\treturn (\n\t\t<PanelBody title={ entityLabel } initialOpen>\n\t\t\t<EntityDescription record={ firstRecord } count={ count } />\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/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t\t{ 'globalStyles' === firstRecord?.name && (\n\t\t\t\t<GlobalStylesDescription record={ firstRecord } />\n\t\t\t) }\n\t\t</PanelBody>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AAKA,IAAAM,iBAAA,GAAAC,sBAAA,CAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AAA2C,IAAAS,WAAA,GAAAT,OAAA;AAd3C;AACA;AACA;;AAQA;AACA;AACA;;AAIA,MAAM;EAAEU,sBAAsB;EAAEC;AAAoB,CAAC,GAAG,IAAAC,kBAAM,EAC7DC,wBACD,CAAC;AAED,SAASC,oBAAoBA,CAAEC,MAAM,EAAEC,KAAK,EAAG;EAC9C,QAASD,MAAM;IACd,KAAK,MAAM;MACV,OAAO,CAAC,KAAKC,KAAK,GACf,IAAAC,QAAE,EAAE,0CAA2C,CAAC,GAChD,IAAAA,QAAE,EAAE,4CAA6C,CAAC;IACtD,KAAK,aAAa;MACjB,OAAO,IAAAA,QAAE,EACR,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,KAAKX,MAAM,CAACW,GAAG,IACtB4B,GAAG,CAACC,QAAQ,KAAKxC,MAAM,CAACwC,QAC1B,CACA;QACDC,QAAQ,EAAKC,KAAK,IACjBhB,qBAAqB,CAAE1B,MAAM,EAAE0C,KAAM;MACrC,GAbK1C,MAAM,CAACW,GAAG,IAAIX,MAAM,CAACwC,QAc3B,CAAC;IAEJ,CAAE,CAAC,EACD,cAAc,KAAKb,WAAW,EAAEjB,IAAI,iBACrC,IAAApB,WAAA,CAAAyB,GAAA,EAAChB,uBAAuB;MAACC,MAAM,EAAG2B;IAAa,CAAE,CACjD;EAAA,CACS,CAAC;AAEd","ignoreList":[]}
1
+ {"version":3,"names":["_i18n","require","_data","_components","_coreData","_blockEditor","_element","_entityRecordItem","_interopRequireDefault","_lockUnlock","_jsxRuntime","getGlobalStylesChanges","GlobalStylesContext","unlock","blockEditorPrivateApis","getEntityDescription","entity","count","__","GlobalStylesDescription","record","user","currentEditorGlobalStyles","useContext","savedRecord","useSelect","select","coreStore","getEntityRecord","kind","name","key","globalStylesChanges","maxResults","length","jsx","className","children","map","change","EntityDescription","description","PanelRow","EntityTypeList","list","unselectedEntities","setUnselectedEntities","firstRecord","entityConfig","getEntityConfig","entityLabel","label","jsxs","PanelBody","title","initialOpen","default","checked","some","elt","property","onChange","value"],"sources":["@wordpress/editor/src/components/entities-saved-states/entity-type-list.js"],"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';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport EntityRecordItem from './entity-record-item';\nimport { unlock } from '../../lock-unlock';\n\nconst { getGlobalStylesChanges, GlobalStylesContext } = unlock(\n\tblockEditorPrivateApis\n);\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 has been modified.' );\n\t}\n}\n\nfunction GlobalStylesDescription( { record } ) {\n\tconst { user: currentEditorGlobalStyles } =\n\t\tuseContext( GlobalStylesContext );\n\tconst savedRecord = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).getEntityRecord(\n\t\t\t\trecord.kind,\n\t\t\t\trecord.name,\n\t\t\t\trecord.key\n\t\t\t),\n\t\t[ record.kind, record.name, record.key ]\n\t);\n\n\tconst globalStylesChanges = getGlobalStylesChanges(\n\t\tcurrentEditorGlobalStyles,\n\t\tsavedRecord,\n\t\t{\n\t\t\tmaxResults: 10,\n\t\t}\n\t);\n\treturn globalStylesChanges.length ? (\n\t\t<ul className=\"entities-saved-states__changes\">\n\t\t\t{ globalStylesChanges.map( ( change ) => (\n\t\t\t\t<li key={ change }>{ change }</li>\n\t\t\t) ) }\n\t\t</ul>\n\t) : null;\n}\n\nfunction EntityDescription( { record, count } ) {\n\tif ( 'globalStyles' === record?.name ) {\n\t\treturn null;\n\t}\n\tconst description = getEntityDescription( record?.name, count );\n\treturn description ? <PanelRow>{ description }</PanelRow> : null;\n}\n\nexport default function EntityTypeList( {\n\tlist,\n\tunselectedEntities,\n\tsetUnselectedEntities,\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\n\tlet entityLabel = entityConfig.label;\n\tif ( firstRecord?.name === 'wp_template_part' ) {\n\t\tentityLabel =\n\t\t\t1 === count ? __( 'Template Part' ) : __( 'Template Parts' );\n\t}\n\n\treturn (\n\t\t<PanelBody title={ entityLabel } initialOpen>\n\t\t\t<EntityDescription record={ firstRecord } count={ count } />\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/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t\t{ 'globalStyles' === firstRecord?.name && (\n\t\t\t\t<GlobalStylesDescription record={ firstRecord } />\n\t\t\t) }\n\t\t</PanelBody>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AAKA,IAAAM,iBAAA,GAAAC,sBAAA,CAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AAA2C,IAAAS,WAAA,GAAAT,OAAA;AAd3C;AACA;AACA;;AAQA;AACA;AACA;;AAIA,MAAM;EAAEU,sBAAsB;EAAEC;AAAoB,CAAC,GAAG,IAAAC,kBAAM,EAC7DC,wBACD,CAAC;AAED,SAASC,oBAAoBA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;QAEhBpC,MAAM,EAAGA,MAAQ;QACjBqC,OAAO,EACN,CAAEZ,kBAAkB,CAACa,IAAI,CACtBC,GAAG,IACJA,GAAG,CAAC9B,IAAI,KAAKT,MAAM,CAACS,IAAI,IACxB8B,GAAG,CAAC7B,IAAI,KAAKV,MAAM,CAACU,IAAI,IACxB6B,GAAG,CAAC5B,GAAG,KAAKX,MAAM,CAACW,GAAG,IACtB4B,GAAG,CAACC,QAAQ,KAAKxC,MAAM,CAACwC,QAC1B,CACA;QACDC,QAAQ,EAAKC,KAAK,IACjBhB,qBAAqB,CAAE1B,MAAM,EAAE0C,KAAM;MACrC,GAbK1C,MAAM,CAACW,GAAG,IAAIX,MAAM,CAACwC,QAc3B,CAAC;IAEJ,CAAE,CAAC,EACD,cAAc,KAAKb,WAAW,EAAEjB,IAAI,iBACrC,IAAApB,WAAA,CAAAyB,GAAA,EAAChB,uBAAuB;MAACC,MAAM,EAAG2B;IAAa,CAAE,CACjD;EAAA,CACS,CAAC;AAEd","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- /* wp:polyfill */
2
1
  "use strict";
3
2
 
4
3
  Object.defineProperty(exports, "__esModule", {
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","_coreData","_element","useIsDirty","editedEntities","siteEdits","siteEntityConfig","useSelect","select","__experimentalGetDirtyEntityRecords","getEntityRecordEdits","getEntityConfig","coreStore","dirtyEntityRecords","useMemo","_siteEntityConfig$met","editedEntitiesWithoutSite","filter","record","kind","name","siteEntityLabels","meta","labels","editedSiteEntities","property","push","title","unselectedEntities","_setUnselectedEntities","useState","setUnselectedEntities","key","checked","elt","isDirty","length","exports"],"sources":["@wordpress/editor/src/components/entities-saved-states/hooks/use-is-dirty.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useMemo, useState } from '@wordpress/element';\n\n/**\n * Custom hook that determines if any entities are dirty (edited) and provides a way to manage selected/unselected entities.\n *\n * @return {Object} An object containing the following properties:\n * - dirtyEntityRecords: An array of dirty entity records.\n * - isDirty: A boolean indicating if there are any dirty entity records.\n * - setUnselectedEntities: A function to set the unselected entities.\n * - unselectedEntities: An array of unselected entities.\n */\nexport const useIsDirty = () => {\n\tconst { editedEntities, siteEdits, siteEntityConfig } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\t__experimentalGetDirtyEntityRecords,\n\t\t\t\tgetEntityRecordEdits,\n\t\t\t\tgetEntityConfig,\n\t\t\t} = select( coreStore );\n\n\t\t\treturn {\n\t\t\t\teditedEntities: __experimentalGetDirtyEntityRecords(),\n\t\t\t\tsiteEdits: getEntityRecordEdits( 'root', 'site' ),\n\t\t\t\tsiteEntityConfig: getEntityConfig( 'root', 'site' ),\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst dirtyEntityRecords = useMemo( () => {\n\t\t// Remove site object and decouple into its edited pieces.\n\t\tconst editedEntitiesWithoutSite = editedEntities.filter(\n\t\t\t( record ) => ! ( record.kind === 'root' && record.name === 'site' )\n\t\t);\n\n\t\tconst siteEntityLabels = siteEntityConfig?.meta?.labels ?? {};\n\t\tconst editedSiteEntities = [];\n\t\tfor ( const property in siteEdits ) {\n\t\t\teditedSiteEntities.push( {\n\t\t\t\tkind: 'root',\n\t\t\t\tname: 'site',\n\t\t\t\ttitle: siteEntityLabels[ property ] || property,\n\t\t\t\tproperty,\n\t\t\t} );\n\t\t}\n\n\t\treturn [ ...editedEntitiesWithoutSite, ...editedSiteEntities ];\n\t}, [ editedEntities, siteEdits, siteEntityConfig ] );\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"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AALA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMG,UAAU,GAAGA,CAAA,KAAM;EAC/B,MAAM;IAAEC,cAAc;IAAEC,SAAS;IAAEC;EAAiB,CAAC,GAAG,IAAAC,eAAS,EAC9DC,MAAM,IAAM;IACb,MAAM;MACLC,mCAAmC;MACnCC,oBAAoB;MACpBC;IACD,CAAC,GAAGH,MAAM,CAAEI,eAAU,CAAC;IAEvB,OAAO;MACNR,cAAc,EAAEK,mCAAmC,CAAC,CAAC;MACrDJ,SAAS,EAAEK,oBAAoB,CAAE,MAAM,EAAE,MAAO,CAAC;MACjDJ,gBAAgB,EAAEK,eAAe,CAAE,MAAM,EAAE,MAAO;IACnD,CAAC;EACF,CAAC,EACD,EACD,CAAC;EAED,MAAME,kBAAkB,GAAG,IAAAC,gBAAO,EAAE,MAAM;IAAA,IAAAC,qBAAA;IACzC;IACA,MAAMC,yBAAyB,GAAGZ,cAAc,CAACa,MAAM,CACpDC,MAAM,IAAM,EAAIA,MAAM,CAACC,IAAI,KAAK,MAAM,IAAID,MAAM,CAACE,IAAI,KAAK,MAAM,CACnE,CAAC;IAED,MAAMC,gBAAgB,IAAAN,qBAAA,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O;IACPJ,qBAAqB;IACrBH;EACD,CAAC;AACF,CAAC;AAACS,OAAA,CAAAlC,UAAA,GAAAA,UAAA","ignoreList":[]}
1
+ {"version":3,"names":["_data","require","_coreData","_element","useIsDirty","editedEntities","siteEdits","siteEntityConfig","useSelect","select","__experimentalGetDirtyEntityRecords","getEntityRecordEdits","getEntityConfig","coreStore","dirtyEntityRecords","useMemo","_siteEntityConfig$met","editedEntitiesWithoutSite","filter","record","kind","name","siteEntityLabels","meta","labels","editedSiteEntities","property","push","title","unselectedEntities","_setUnselectedEntities","useState","setUnselectedEntities","key","checked","elt","isDirty","length","exports"],"sources":["@wordpress/editor/src/components/entities-saved-states/hooks/use-is-dirty.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useMemo, useState } from '@wordpress/element';\n\n/**\n * Custom hook that determines if any entities are dirty (edited) and provides a way to manage selected/unselected entities.\n *\n * @return {Object} An object containing the following properties:\n * - dirtyEntityRecords: An array of dirty entity records.\n * - isDirty: A boolean indicating if there are any dirty entity records.\n * - setUnselectedEntities: A function to set the unselected entities.\n * - unselectedEntities: An array of unselected entities.\n */\nexport const useIsDirty = () => {\n\tconst { editedEntities, siteEdits, siteEntityConfig } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\t__experimentalGetDirtyEntityRecords,\n\t\t\t\tgetEntityRecordEdits,\n\t\t\t\tgetEntityConfig,\n\t\t\t} = select( coreStore );\n\n\t\t\treturn {\n\t\t\t\teditedEntities: __experimentalGetDirtyEntityRecords(),\n\t\t\t\tsiteEdits: getEntityRecordEdits( 'root', 'site' ),\n\t\t\t\tsiteEntityConfig: getEntityConfig( 'root', 'site' ),\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst dirtyEntityRecords = useMemo( () => {\n\t\t// Remove site object and decouple into its edited pieces.\n\t\tconst editedEntitiesWithoutSite = editedEntities.filter(\n\t\t\t( record ) => ! ( record.kind === 'root' && record.name === 'site' )\n\t\t);\n\n\t\tconst siteEntityLabels = siteEntityConfig?.meta?.labels ?? {};\n\t\tconst editedSiteEntities = [];\n\t\tfor ( const property in siteEdits ) {\n\t\t\teditedSiteEntities.push( {\n\t\t\t\tkind: 'root',\n\t\t\t\tname: 'site',\n\t\t\t\ttitle: siteEntityLabels[ property ] || property,\n\t\t\t\tproperty,\n\t\t\t} );\n\t\t}\n\n\t\treturn [ ...editedEntitiesWithoutSite, ...editedSiteEntities ];\n\t}, [ editedEntities, siteEdits, siteEntityConfig ] );\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"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AALA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMG,UAAU,GAAGA,CAAA,KAAM;EAC/B,MAAM;IAAEC,cAAc;IAAEC,SAAS;IAAEC;EAAiB,CAAC,GAAG,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IAAEC,IAAI;IAAEY,GAAG;IAAEP;EAAS,CAAC,EAC7BQ,OAAO,KACH;IACJ,IAAKA,OAAO,EAAG;MACdJ,sBAAsB,CACrBD,kBAAkB,CAACX,MAAM,CACtBiB,GAAG,IACJA,GAAG,CAACf,IAAI,KAAKA,IAAI,IACjBe,GAAG,CAACd,IAAI,KAAKA,IAAI,IACjBc,GAAG,CAACF,GAAG,KAAKA,GAAG,IACfE,GAAG,CAACT,QAAQ,KAAKA,QACnB,CACD,CAAC;IACF,CAAC,MAAM;MACNI,sBAAsB,CAAE,CACvB,GAAGD,kBAAkB,EACrB;QAAET,IAAI;QAAEC,IAAI;QAAEY,GAAG;QAAEP;MAAS,CAAC,CAC5B,CAAC;IACJ;EACD,CAAC;EAED,MAAMU,OAAO,GAAGtB,kBAAkB,CAACuB,MAAM,GAAGR,kBAAkB,CAACQ,MAAM,GAAG,CAAC;EAEzE,OAAO;IACNvB,kBAAkB;IAClBsB,OAAO;IACPJ,qBAAqB;IACrBH;EACD,CAAC;AACF,CAAC;AAACS,OAAA,CAAAlC,UAAA,GAAAA,UAAA","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- /* wp:polyfill */
2
1
  "use strict";
3
2
 
4
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_i18n","_element","_compose","_data","_entityTypeList","_interopRequireDefault","_useIsDirty","_store","_lockUnlock","_jsxRuntime","identity","values","EntitiesSavedStates","close","renderDialog","isDirtyProps","useIsDirty","jsx","EntitiesSavedStatesExtensible","additionalPrompt","undefined","onSave","saveEnabled","saveEnabledProp","saveLabel","__","dirtyEntityRecords","isDirty","setUnselectedEntities","unselectedEntities","saveButtonRef","useRef","saveDirtyEntities","unlock","useDispatch","editorStore","partitionedSavables","reduce","acc","record","name","push","site","siteSavables","wp_template","templateSavables","wp_template_part","templatePartSavables","contentSavables","sortedPartitionedSavables","Object","filter","Array","isArray","dismissPanel","useCallback","saveDialogRef","saveDialogProps","useDialog","onClose","dialogLabel","useInstanceId","dialogDescription","selectItemsToSaveDescription","length","jsxs","ref","className","role","children","Flex","gap","FlexItem","isBlock","as","Button","variant","size","onClick","disabled","accessibleWhenDisabled","entitiesToSkip","id","createInterpolateElement","sprintf","_n","strong","map","list","default"],"sources":["@wordpress/editor/src/components/entities-saved-states/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Button, Flex, FlexItem } from '@wordpress/components';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport {\n\tuseCallback,\n\tuseRef,\n\tcreateInterpolateElement,\n} from '@wordpress/element';\nimport {\n\t__experimentalUseDialog as useDialog,\n\tuseInstanceId,\n} from '@wordpress/compose';\nimport { useDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport EntityTypeList from './entity-type-list';\nimport { useIsDirty } from './hooks/use-is-dirty';\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nfunction identity( values ) {\n\treturn values;\n}\n\n/**\n * Renders the component for managing saved states of entities.\n *\n * @param {Object} props The component props.\n * @param {Function} props.close The function to close the dialog.\n * @param {boolean} props.renderDialog Whether to render the component with modal dialog behavior.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default function EntitiesSavedStates( { close, renderDialog } ) {\n\tconst isDirtyProps = useIsDirty();\n\treturn (\n\t\t<EntitiesSavedStatesExtensible\n\t\t\tclose={ close }\n\t\t\trenderDialog={ renderDialog }\n\t\t\t{ ...isDirtyProps }\n\t\t/>\n\t);\n}\n\n/**\n * Renders a panel for saving entities with dirty records.\n *\n * @param {Object} props The component props.\n * @param {string} props.additionalPrompt Additional prompt to display.\n * @param {Function} props.close Function to close the panel.\n * @param {Function} props.onSave Function to call when saving entities.\n * @param {boolean} props.saveEnabled Flag indicating if save is enabled.\n * @param {string} props.saveLabel Label for the save button.\n * @param {boolean} props.renderDialog Whether to render the component with modal dialog behavior.\n * @param {Array} props.dirtyEntityRecords Array of dirty entity records.\n * @param {boolean} props.isDirty Flag indicating if there are dirty entities.\n * @param {Function} props.setUnselectedEntities Function to set unselected entities.\n * @param {Array} props.unselectedEntities Array of unselected entities.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport function EntitiesSavedStatesExtensible( {\n\tadditionalPrompt = undefined,\n\tclose,\n\tonSave = identity,\n\tsaveEnabled: saveEnabledProp = undefined,\n\tsaveLabel = __( 'Save' ),\n\trenderDialog,\n\tdirtyEntityRecords,\n\tisDirty,\n\tsetUnselectedEntities,\n\tunselectedEntities,\n} ) {\n\tconst saveButtonRef = useRef();\n\tconst { saveDirtyEntities } = unlock( useDispatch( editorStore ) );\n\t// To group entities by type.\n\tconst partitionedSavables = dirtyEntityRecords.reduce( ( acc, record ) => {\n\t\tconst { name } = record;\n\t\tif ( ! acc[ name ] ) {\n\t\t\tacc[ name ] = [];\n\t\t}\n\t\tacc[ name ].push( record );\n\t\treturn acc;\n\t}, {} );\n\n\t// Sort entity groups.\n\tconst {\n\t\tsite: siteSavables,\n\t\twp_template: templateSavables,\n\t\twp_template_part: templatePartSavables,\n\t\t...contentSavables\n\t} = partitionedSavables;\n\tconst sortedPartitionedSavables = [\n\t\tsiteSavables,\n\t\ttemplateSavables,\n\t\ttemplatePartSavables,\n\t\t...Object.values( contentSavables ),\n\t].filter( Array.isArray );\n\n\tconst saveEnabled = saveEnabledProp ?? isDirty;\n\t// Explicitly define this with no argument passed. Using `close` on\n\t// its own will use the event object in place of the expected saved entities.\n\tconst dismissPanel = useCallback( () => close(), [ close ] );\n\n\tconst [ saveDialogRef, saveDialogProps ] = useDialog( {\n\t\tonClose: () => dismissPanel(),\n\t} );\n\tconst dialogLabel = useInstanceId( EntitiesSavedStatesExtensible, 'label' );\n\tconst dialogDescription = useInstanceId(\n\t\tEntitiesSavedStatesExtensible,\n\t\t'description'\n\t);\n\n\tconst selectItemsToSaveDescription = !! dirtyEntityRecords.length\n\t\t? __( 'Select the items you want to save.' )\n\t\t: undefined;\n\n\treturn (\n\t\t<div\n\t\t\tref={ renderDialog ? saveDialogRef : undefined }\n\t\t\t{ ...( renderDialog && saveDialogProps ) }\n\t\t\tclassName=\"entities-saved-states__panel\"\n\t\t\trole={ renderDialog ? 'dialog' : undefined }\n\t\t\taria-labelledby={ renderDialog ? dialogLabel : undefined }\n\t\t\taria-describedby={ renderDialog ? dialogDescription : undefined }\n\t\t>\n\t\t\t<Flex className=\"entities-saved-states__panel-header\" gap={ 2 }>\n\t\t\t\t<FlexItem\n\t\t\t\t\tisBlock\n\t\t\t\t\tas={ Button }\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\tonClick={ dismissPanel }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t</FlexItem>\n\t\t\t\t<FlexItem\n\t\t\t\t\tisBlock\n\t\t\t\t\tas={ Button }\n\t\t\t\t\tref={ saveButtonRef }\n\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\tdisabled={ ! saveEnabled }\n\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\tsaveDirtyEntities( {\n\t\t\t\t\t\t\tonSave,\n\t\t\t\t\t\t\tdirtyEntityRecords,\n\t\t\t\t\t\t\tentitiesToSkip: unselectedEntities,\n\t\t\t\t\t\t\tclose,\n\t\t\t\t\t\t} )\n\t\t\t\t\t}\n\t\t\t\t\tclassName=\"editor-entities-saved-states__save-button\"\n\t\t\t\t>\n\t\t\t\t\t{ saveLabel }\n\t\t\t\t</FlexItem>\n\t\t\t</Flex>\n\n\t\t\t<div className=\"entities-saved-states__text-prompt\">\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"entities-saved-states__text-prompt--header-wrapper\"\n\t\t\t\t\tid={ renderDialog ? dialogLabel : undefined }\n\t\t\t\t>\n\t\t\t\t\t<strong className=\"entities-saved-states__text-prompt--header\">\n\t\t\t\t\t\t{ __( 'Are you ready to save?' ) }\n\t\t\t\t\t</strong>\n\t\t\t\t\t{ additionalPrompt }\n\t\t\t\t</div>\n\t\t\t\t<p id={ renderDialog ? dialogDescription : undefined }>\n\t\t\t\t\t{ isDirty\n\t\t\t\t\t\t? createInterpolateElement(\n\t\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t\t/* translators: %d: number of site changes waiting to be saved. */\n\t\t\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t\t\t'There is <strong>%d site change</strong> waiting to be saved.',\n\t\t\t\t\t\t\t\t\t\t'There are <strong>%d site changes</strong> waiting to be saved.',\n\t\t\t\t\t\t\t\t\t\tdirtyEntityRecords.length\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\tdirtyEntityRecords.length\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t{ strong: <strong /> }\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: selectItemsToSaveDescription }\n\t\t\t\t</p>\n\t\t\t</div>\n\n\t\t\t{ sortedPartitionedSavables.map( ( list ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<EntityTypeList\n\t\t\t\t\t\tkey={ list[ 0 ].name }\n\t\t\t\t\t\tlist={ list }\n\t\t\t\t\t\tunselectedEntities={ unselectedEntities }\n\t\t\t\t\t\tsetUnselectedEntities={ setUnselectedEntities }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAKA,IAAAG,QAAA,GAAAH,OAAA;AAIA,IAAAI,KAAA,GAAAJ,OAAA;AAKA,IAAAK,eAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,WAAA,GAAAT,OA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yB;QAAC,CACzB,CAAC,EACPN,gBAAgB;MAAA,CACd,CAAC,eACN,IAAAV,WAAA,CAAAQ,GAAA;QAAGiE,EAAE,EAAGpE,YAAY,GAAGgD,iBAAiB,GAAG1C,SAAW;QAAAiD,QAAA,EACnD1C,OAAO,GACN,IAAAwD,iCAAwB,EACxB,IAAAC,aAAO,EACN;QACA,IAAAC,QAAE,EACD,+DAA+D,EAC/D,iEAAiE,EACjE3D,kBAAkB,CAACsC,MACpB,CAAC,EACDtC,kBAAkB,CAACsC,MACpB,CAAC,EACD;UAAEsB,MAAM,eAAE,IAAA7E,WAAA,CAAAQ,GAAA,cAAS;QAAE,CACrB,CAAC,GACD8C;MAA4B,CAC7B,CAAC;IAAA,CACA,CAAC,EAEJd,yBAAyB,CAACsC,GAAG,CAAIC,IAAI,IAAM;MAC5C,oBACC,IAAA/E,WAAA,CAAAQ,GAAA,EAACb,eAAA,CAAAqF,OAAc;QAEdD,IAAI,EAAGA,IAAM;QACb3D,kBAAkB,EAAGA,kBAAoB;QACzCD,qBAAqB,EAAGA;MAAuB,GAHzC4D,IAAI,CAAE,CAAC,CAAE,CAAChD,IAIhB,CAAC;IAEJ,CAAE,CAAC;EAAA,CACC,CAAC;AAER","ignoreList":[]}
1
+ {"version":3,"names":["_components","require","_i18n","_element","_compose","_data","_entityTypeList","_interopRequireDefault","_useIsDirty","_store","_lockUnlock","_jsxRuntime","identity","values","EntitiesSavedStates","close","renderDialog","isDirtyProps","useIsDirty","jsx","EntitiesSavedStatesExtensible","additionalPrompt","undefined","onSave","saveEnabled","saveEnabledProp","saveLabel","__","dirtyEntityRecords","isDirty","setUnselectedEntities","unselectedEntities","saveButtonRef","useRef","saveDirtyEntities","unlock","useDispatch","editorStore","partitionedSavables","reduce","acc","record","name","push","site","siteSavables","wp_template","templateSavables","wp_template_part","templatePartSavables","contentSavables","sortedPartitionedSavables","Object","filter","Array","isArray","dismissPanel","useCallback","saveDialogRef","saveDialogProps","useDialog","onClose","dialogLabel","useInstanceId","dialogDescription","selectItemsToSaveDescription","length","jsxs","ref","className","role","children","Flex","gap","FlexItem","isBlock","as","Button","variant","size","onClick","disabled","accessibleWhenDisabled","entitiesToSkip","id","createInterpolateElement","sprintf","_n","strong","map","list","default"],"sources":["@wordpress/editor/src/components/entities-saved-states/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Button, Flex, FlexItem } from '@wordpress/components';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport {\n\tuseCallback,\n\tuseRef,\n\tcreateInterpolateElement,\n} from '@wordpress/element';\nimport {\n\t__experimentalUseDialog as useDialog,\n\tuseInstanceId,\n} from '@wordpress/compose';\nimport { useDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport EntityTypeList from './entity-type-list';\nimport { useIsDirty } from './hooks/use-is-dirty';\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nfunction identity( values ) {\n\treturn values;\n}\n\n/**\n * Renders the component for managing saved states of entities.\n *\n * @param {Object} props The component props.\n * @param {Function} props.close The function to close the dialog.\n * @param {boolean} props.renderDialog Whether to render the component with modal dialog behavior.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default function EntitiesSavedStates( { close, renderDialog } ) {\n\tconst isDirtyProps = useIsDirty();\n\treturn (\n\t\t<EntitiesSavedStatesExtensible\n\t\t\tclose={ close }\n\t\t\trenderDialog={ renderDialog }\n\t\t\t{ ...isDirtyProps }\n\t\t/>\n\t);\n}\n\n/**\n * Renders a panel for saving entities with dirty records.\n *\n * @param {Object} props The component props.\n * @param {string} props.additionalPrompt Additional prompt to display.\n * @param {Function} props.close Function to close the panel.\n * @param {Function} props.onSave Function to call when saving entities.\n * @param {boolean} props.saveEnabled Flag indicating if save is enabled.\n * @param {string} props.saveLabel Label for the save button.\n * @param {boolean} props.renderDialog Whether to render the component with modal dialog behavior.\n * @param {Array} props.dirtyEntityRecords Array of dirty entity records.\n * @param {boolean} props.isDirty Flag indicating if there are dirty entities.\n * @param {Function} props.setUnselectedEntities Function to set unselected entities.\n * @param {Array} props.unselectedEntities Array of unselected entities.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport function EntitiesSavedStatesExtensible( {\n\tadditionalPrompt = undefined,\n\tclose,\n\tonSave = identity,\n\tsaveEnabled: saveEnabledProp = undefined,\n\tsaveLabel = __( 'Save' ),\n\trenderDialog,\n\tdirtyEntityRecords,\n\tisDirty,\n\tsetUnselectedEntities,\n\tunselectedEntities,\n} ) {\n\tconst saveButtonRef = useRef();\n\tconst { saveDirtyEntities } = unlock( useDispatch( editorStore ) );\n\t// To group entities by type.\n\tconst partitionedSavables = dirtyEntityRecords.reduce( ( acc, record ) => {\n\t\tconst { name } = record;\n\t\tif ( ! acc[ name ] ) {\n\t\t\tacc[ name ] = [];\n\t\t}\n\t\tacc[ name ].push( record );\n\t\treturn acc;\n\t}, {} );\n\n\t// Sort entity groups.\n\tconst {\n\t\tsite: siteSavables,\n\t\twp_template: templateSavables,\n\t\twp_template_part: templatePartSavables,\n\t\t...contentSavables\n\t} = partitionedSavables;\n\tconst sortedPartitionedSavables = [\n\t\tsiteSavables,\n\t\ttemplateSavables,\n\t\ttemplatePartSavables,\n\t\t...Object.values( contentSavables ),\n\t].filter( Array.isArray );\n\n\tconst saveEnabled = saveEnabledProp ?? isDirty;\n\t// Explicitly define this with no argument passed. Using `close` on\n\t// its own will use the event object in place of the expected saved entities.\n\tconst dismissPanel = useCallback( () => close(), [ close ] );\n\n\tconst [ saveDialogRef, saveDialogProps ] = useDialog( {\n\t\tonClose: () => dismissPanel(),\n\t} );\n\tconst dialogLabel = useInstanceId( EntitiesSavedStatesExtensible, 'label' );\n\tconst dialogDescription = useInstanceId(\n\t\tEntitiesSavedStatesExtensible,\n\t\t'description'\n\t);\n\n\tconst selectItemsToSaveDescription = !! dirtyEntityRecords.length\n\t\t? __( 'Select the items you want to save.' )\n\t\t: undefined;\n\n\treturn (\n\t\t<div\n\t\t\tref={ renderDialog ? saveDialogRef : undefined }\n\t\t\t{ ...( renderDialog && saveDialogProps ) }\n\t\t\tclassName=\"entities-saved-states__panel\"\n\t\t\trole={ renderDialog ? 'dialog' : undefined }\n\t\t\taria-labelledby={ renderDialog ? dialogLabel : undefined }\n\t\t\taria-describedby={ renderDialog ? dialogDescription : undefined }\n\t\t>\n\t\t\t<Flex className=\"entities-saved-states__panel-header\" gap={ 2 }>\n\t\t\t\t<FlexItem\n\t\t\t\t\tisBlock\n\t\t\t\t\tas={ Button }\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\tonClick={ dismissPanel }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t</FlexItem>\n\t\t\t\t<FlexItem\n\t\t\t\t\tisBlock\n\t\t\t\t\tas={ Button }\n\t\t\t\t\tref={ saveButtonRef }\n\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\tdisabled={ ! saveEnabled }\n\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\tsaveDirtyEntities( {\n\t\t\t\t\t\t\tonSave,\n\t\t\t\t\t\t\tdirtyEntityRecords,\n\t\t\t\t\t\t\tentitiesToSkip: unselectedEntities,\n\t\t\t\t\t\t\tclose,\n\t\t\t\t\t\t} )\n\t\t\t\t\t}\n\t\t\t\t\tclassName=\"editor-entities-saved-states__save-button\"\n\t\t\t\t>\n\t\t\t\t\t{ saveLabel }\n\t\t\t\t</FlexItem>\n\t\t\t</Flex>\n\n\t\t\t<div className=\"entities-saved-states__text-prompt\">\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"entities-saved-states__text-prompt--header-wrapper\"\n\t\t\t\t\tid={ renderDialog ? dialogLabel : undefined }\n\t\t\t\t>\n\t\t\t\t\t<strong className=\"entities-saved-states__text-prompt--header\">\n\t\t\t\t\t\t{ __( 'Are you ready to save?' ) }\n\t\t\t\t\t</strong>\n\t\t\t\t\t{ additionalPrompt }\n\t\t\t\t</div>\n\t\t\t\t<p id={ renderDialog ? dialogDescription : undefined }>\n\t\t\t\t\t{ isDirty\n\t\t\t\t\t\t? createInterpolateElement(\n\t\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t\t/* translators: %d: number of site changes waiting to be saved. */\n\t\t\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t\t\t'There is <strong>%d site change</strong> waiting to be saved.',\n\t\t\t\t\t\t\t\t\t\t'There are <strong>%d site changes</strong> waiting to be saved.',\n\t\t\t\t\t\t\t\t\t\tdirtyEntityRecords.length\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\tdirtyEntityRecords.length\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t{ strong: <strong /> }\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: selectItemsToSaveDescription }\n\t\t\t\t</p>\n\t\t\t</div>\n\n\t\t\t{ sortedPartitionedSavables.map( ( list ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<EntityTypeList\n\t\t\t\t\t\tkey={ list[ 0 ].name }\n\t\t\t\t\t\tlist={ list }\n\t\t\t\t\t\tunselectedEntities={ unselectedEntities }\n\t\t\t\t\t\tsetUnselectedEntities={ setUnselectedEntities }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAKA,IAAAG,QAAA,GAAAH,OAAA;AAIA,IAAAI,KAAA,GAAAJ,OAAA;AAKA,IAAAK,eAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,WAAA,GAAAT,OAAA;AAA2C,IAAAU,WAAA,GAAAV,OAAA;AAt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,CACd,CAAC,eACN,IAAAV,WAAA,CAAAQ,GAAA;QAAGiE,EAAE,EAAGpE,YAAY,GAAGgD,iBAAiB,GAAG1C,SAAW;QAAAiD,QAAA,EACnD1C,OAAO,GACN,IAAAwD,iCAAwB,EACxB,IAAAC,aAAO,EACN;QACA,IAAAC,QAAE,EACD,+DAA+D,EAC/D,iEAAiE,EACjE3D,kBAAkB,CAACsC,MACpB,CAAC,EACDtC,kBAAkB,CAACsC,MACpB,CAAC,EACD;UAAEsB,MAAM,eAAE,IAAA7E,WAAA,CAAAQ,GAAA,cAAS;QAAE,CACrB,CAAC,GACD8C;MAA4B,CAC7B,CAAC;IAAA,CACA,CAAC,EAEJd,yBAAyB,CAACsC,GAAG,CAAIC,IAAI,IAAM;MAC5C,oBACC,IAAA/E,WAAA,CAAAQ,GAAA,EAACb,eAAA,CAAAqF,OAAc;QAEdD,IAAI,EAAGA,IAAM;QACb3D,kBAAkB,EAAGA,kBAAoB;QACzCD,qBAAqB,EAAGA;MAAuB,GAHzC4D,IAAI,CAAE,CAAC,CAAE,CAAChD,IAIhB,CAAC;IAEJ,CAAE,CAAC;EAAA,CACC,CAAC;AAER","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- /* wp:polyfill */
2
1
  "use strict";
3
2
 
4
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");