@wordpress/editor 13.15.0 → 13.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (557) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/components/autocompleters/index.js +0 -2
  3. package/build/components/autocompleters/index.js.map +1 -1
  4. package/build/components/autocompleters/user.js +2 -9
  5. package/build/components/autocompleters/user.js.map +1 -1
  6. package/build/components/autosave-monitor/index.js +0 -24
  7. package/build/components/autosave-monitor/index.js.map +1 -1
  8. package/build/components/character-count/index.js +1 -4
  9. package/build/components/character-count/index.js.map +1 -1
  10. package/build/components/deprecated.js +1 -11
  11. package/build/components/deprecated.js.map +1 -1
  12. package/build/components/deprecated.native.js +0 -1
  13. package/build/components/deprecated.native.js.map +1 -1
  14. package/build/components/document-outline/check.js +1 -7
  15. package/build/components/document-outline/check.js.map +1 -1
  16. package/build/components/document-outline/index.js +7 -24
  17. package/build/components/document-outline/index.js.map +1 -1
  18. package/build/components/document-outline/item.js +1 -5
  19. package/build/components/document-outline/item.js.map +1 -1
  20. package/build/components/editor-help/add-blocks.native.js +1 -8
  21. package/build/components/editor-help/add-blocks.native.js.map +1 -1
  22. package/build/components/editor-help/customize-blocks.native.js +1 -8
  23. package/build/components/editor-help/customize-blocks.native.js.map +1 -1
  24. package/build/components/editor-help/help-detail-navigation-screen.native.js +5 -13
  25. package/build/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
  26. package/build/components/editor-help/help-get-support-button.native.js +1 -7
  27. package/build/components/editor-help/help-get-support-button.native.js.map +1 -1
  28. package/build/components/editor-help/help-section-title.native.js +1 -7
  29. package/build/components/editor-help/help-section-title.native.js.map +1 -1
  30. package/build/components/editor-help/help-topic-row.native.js +1 -8
  31. package/build/components/editor-help/help-topic-row.native.js.map +1 -1
  32. package/build/components/editor-help/icon-move-blocks.native.js +0 -4
  33. package/build/components/editor-help/icon-move-blocks.native.js.map +1 -1
  34. package/build/components/editor-help/index.native.js +8 -29
  35. package/build/components/editor-help/index.native.js.map +1 -1
  36. package/build/components/editor-help/intro-to-blocks.native.js +1 -9
  37. package/build/components/editor-help/intro-to-blocks.native.js.map +1 -1
  38. package/build/components/editor-help/move-blocks.native.js +1 -8
  39. package/build/components/editor-help/move-blocks.native.js.map +1 -1
  40. package/build/components/editor-help/remove-blocks.native.js +1 -8
  41. package/build/components/editor-help/remove-blocks.native.js.map +1 -1
  42. package/build/components/editor-help/view-sections.native.js +1 -12
  43. package/build/components/editor-help/view-sections.native.js.map +1 -1
  44. package/build/components/editor-history/redo.js +6 -14
  45. package/build/components/editor-history/redo.js.map +1 -1
  46. package/build/components/editor-history/undo.js +6 -14
  47. package/build/components/editor-history/undo.js.map +1 -1
  48. package/build/components/editor-notices/index.js +1 -10
  49. package/build/components/editor-notices/index.js.map +1 -1
  50. package/build/components/editor-snackbars/index.js +1 -5
  51. package/build/components/editor-snackbars/index.js.map +1 -1
  52. package/build/components/entities-saved-states/entity-record-item.js +3 -10
  53. package/build/components/entities-saved-states/entity-record-item.js.map +1 -1
  54. package/build/components/entities-saved-states/entity-type-list.js +3 -15
  55. package/build/components/entities-saved-states/entity-type-list.js.map +1 -1
  56. package/build/components/entities-saved-states/hooks/use-is-dirty.js +5 -14
  57. package/build/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -1
  58. package/build/components/entities-saved-states/index.js +8 -27
  59. package/build/components/entities-saved-states/index.js.map +1 -1
  60. package/build/components/error-boundary/index.js +1 -18
  61. package/build/components/error-boundary/index.js.map +1 -1
  62. package/build/components/global-keyboard-shortcuts/index.js +5 -9
  63. package/build/components/global-keyboard-shortcuts/index.js.map +1 -1
  64. package/build/components/global-keyboard-shortcuts/register-shortcuts.js +1 -8
  65. package/build/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
  66. package/build/components/index.js +4 -76
  67. package/build/components/index.js.map +1 -1
  68. package/build/components/index.native.js +0 -9
  69. package/build/components/index.native.js.map +1 -1
  70. package/build/components/local-autosave-monitor/index.js +6 -31
  71. package/build/components/local-autosave-monitor/index.js.map +1 -1
  72. package/build/components/media-categories/index.js +30 -45
  73. package/build/components/media-categories/index.js.map +1 -1
  74. package/build/components/page-attributes/check.js +3 -7
  75. package/build/components/page-attributes/check.js.map +1 -1
  76. package/build/components/page-attributes/order.js +17 -42
  77. package/build/components/page-attributes/order.js.map +1 -1
  78. package/build/components/page-attributes/parent.js +8 -34
  79. package/build/components/page-attributes/parent.js.map +1 -1
  80. package/build/components/post-author/check.js +1 -11
  81. package/build/components/post-author/check.js.map +1 -1
  82. package/build/components/post-author/combobox.js +7 -23
  83. package/build/components/post-author/combobox.js.map +1 -1
  84. package/build/components/post-author/constants.js +0 -1
  85. package/build/components/post-author/constants.js.map +1 -1
  86. package/build/components/post-author/index.js +1 -12
  87. package/build/components/post-author/index.js.map +1 -1
  88. package/build/components/post-author/select.js +1 -12
  89. package/build/components/post-author/select.js.map +1 -1
  90. package/build/components/post-comments/index.js +11 -23
  91. package/build/components/post-comments/index.js.map +1 -1
  92. package/build/components/post-excerpt/check.js +6 -8
  93. package/build/components/post-excerpt/check.js.map +1 -1
  94. package/build/components/post-excerpt/index.js +10 -27
  95. package/build/components/post-excerpt/index.js.map +1 -1
  96. package/build/components/post-featured-image/check.js +6 -9
  97. package/build/components/post-featured-image/check.js.map +1 -1
  98. package/build/components/post-featured-image/index.js +13 -42
  99. package/build/components/post-featured-image/index.js.map +1 -1
  100. package/build/components/post-format/check.js +9 -18
  101. package/build/components/post-format/check.js.map +1 -1
  102. package/build/components/post-format/index.js +2 -20
  103. package/build/components/post-format/index.js.map +1 -1
  104. package/build/components/post-last-revision/check.js +15 -22
  105. package/build/components/post-last-revision/check.js.map +1 -1
  106. package/build/components/post-last-revision/index.js +17 -28
  107. package/build/components/post-last-revision/index.js.map +1 -1
  108. package/build/components/post-locked-modal/index.js +8 -28
  109. package/build/components/post-locked-modal/index.js.map +1 -1
  110. package/build/components/post-pending-status/check.js +16 -24
  111. package/build/components/post-pending-status/check.js.map +1 -1
  112. package/build/components/post-pending-status/index.js +10 -28
  113. package/build/components/post-pending-status/index.js.map +1 -1
  114. package/build/components/post-pingbacks/index.js +11 -23
  115. package/build/components/post-pingbacks/index.js.map +1 -1
  116. package/build/components/post-preview-button/index.js +11 -22
  117. package/build/components/post-preview-button/index.js.map +1 -1
  118. package/build/components/post-publish-button/index.js +6 -32
  119. package/build/components/post-publish-button/index.js.map +1 -1
  120. package/build/components/post-publish-button/label.js +1 -10
  121. package/build/components/post-publish-button/label.js.map +1 -1
  122. package/build/components/post-publish-panel/index.js +1 -22
  123. package/build/components/post-publish-panel/index.js.map +1 -1
  124. package/build/components/post-publish-panel/maybe-category-panel.js +4 -14
  125. package/build/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  126. package/build/components/post-publish-panel/maybe-post-format-panel.js +2 -18
  127. package/build/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  128. package/build/components/post-publish-panel/maybe-tags-panel.js +2 -17
  129. package/build/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  130. package/build/components/post-publish-panel/maybe-upload-media.js +1 -18
  131. package/build/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  132. package/build/components/post-publish-panel/postpublish.js +3 -27
  133. package/build/components/post-publish-panel/postpublish.js.map +1 -1
  134. package/build/components/post-publish-panel/prepublish.js +1 -26
  135. package/build/components/post-publish-panel/prepublish.js.map +1 -1
  136. package/build/components/post-saved-state/index.js +12 -29
  137. package/build/components/post-saved-state/index.js.map +1 -1
  138. package/build/components/post-schedule/check.js +1 -8
  139. package/build/components/post-schedule/check.js.map +1 -1
  140. package/build/components/post-schedule/index.js +7 -13
  141. package/build/components/post-schedule/index.js.map +1 -1
  142. package/build/components/post-schedule/label.js +18 -29
  143. package/build/components/post-schedule/label.js.map +1 -1
  144. package/build/components/post-slug/check.js +1 -4
  145. package/build/components/post-slug/check.js.map +1 -1
  146. package/build/components/post-slug/index.js +1 -19
  147. package/build/components/post-slug/index.js.map +1 -1
  148. package/build/components/post-sticky/check.js +1 -8
  149. package/build/components/post-sticky/check.js.map +1 -1
  150. package/build/components/post-sticky/index.js +1 -12
  151. package/build/components/post-sticky/index.js.map +1 -1
  152. package/build/components/post-switch-to-draft-button/index.js +1 -14
  153. package/build/components/post-switch-to-draft-button/index.js.map +1 -1
  154. package/build/components/post-sync-status/index.js +5 -18
  155. package/build/components/post-sync-status/index.js.map +1 -1
  156. package/build/components/post-taxonomies/check.js +1 -9
  157. package/build/components/post-taxonomies/check.js.map +1 -1
  158. package/build/components/post-taxonomies/flat-term-selector.js +15 -50
  159. package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
  160. package/build/components/post-taxonomies/hierarchical-term-selector.js +27 -79
  161. package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  162. package/build/components/post-taxonomies/index.js +3 -13
  163. package/build/components/post-taxonomies/index.js.map +1 -1
  164. package/build/components/post-taxonomies/most-used-terms.js +1 -9
  165. package/build/components/post-taxonomies/most-used-terms.js.map +1 -1
  166. package/build/components/post-template/index.js +1 -11
  167. package/build/components/post-template/index.js.map +1 -1
  168. package/build/components/post-text-editor/index.js +3 -17
  169. package/build/components/post-text-editor/index.js.map +1 -1
  170. package/build/components/post-title/index.js +14 -46
  171. package/build/components/post-title/index.js.map +1 -1
  172. package/build/components/post-title/index.native.js +7 -44
  173. package/build/components/post-title/index.native.js.map +1 -1
  174. package/build/components/post-trash/check.js +1 -7
  175. package/build/components/post-trash/check.js.map +1 -1
  176. package/build/components/post-trash/index.js +1 -8
  177. package/build/components/post-trash/index.js.map +1 -1
  178. package/build/components/post-type-support-check/index.js +10 -23
  179. package/build/components/post-type-support-check/index.js.map +1 -1
  180. package/build/components/post-url/check.js +1 -12
  181. package/build/components/post-url/check.js.map +1 -1
  182. package/build/components/post-url/index.js +3 -15
  183. package/build/components/post-url/index.js.map +1 -1
  184. package/build/components/post-url/label.js +1 -5
  185. package/build/components/post-url/label.js.map +1 -1
  186. package/build/components/post-visibility/check.js +1 -7
  187. package/build/components/post-visibility/check.js.map +1 -1
  188. package/build/components/post-visibility/index.js +1 -17
  189. package/build/components/post-visibility/index.js.map +1 -1
  190. package/build/components/post-visibility/label.js +1 -5
  191. package/build/components/post-visibility/label.js.map +1 -1
  192. package/build/components/post-visibility/utils.js +1 -2
  193. package/build/components/post-visibility/utils.js.map +1 -1
  194. package/build/components/provider/index.js +13 -27
  195. package/build/components/provider/index.js.map +1 -1
  196. package/build/components/provider/index.native.js +18 -70
  197. package/build/components/provider/index.native.js.map +1 -1
  198. package/build/components/provider/use-block-editor-settings.js +9 -20
  199. package/build/components/provider/use-block-editor-settings.js.map +1 -1
  200. package/build/components/provider/use-block-editor-settings.native.js +5 -11
  201. package/build/components/provider/use-block-editor-settings.native.js.map +1 -1
  202. package/build/components/provider/with-registry-provider.js +5 -12
  203. package/build/components/provider/with-registry-provider.js.map +1 -1
  204. package/build/components/table-of-contents/index.js +4 -14
  205. package/build/components/table-of-contents/index.js.map +1 -1
  206. package/build/components/table-of-contents/panel.js +1 -13
  207. package/build/components/table-of-contents/panel.js.map +1 -1
  208. package/build/components/template-validation-notice/index.js +3 -12
  209. package/build/components/template-validation-notice/index.js.map +1 -1
  210. package/build/components/theme-support-check/index.js +3 -12
  211. package/build/components/theme-support-check/index.js.map +1 -1
  212. package/build/components/time-to-read/index.js +2 -10
  213. package/build/components/time-to-read/index.js.map +1 -1
  214. package/build/components/unsaved-changes-warning/index.js +21 -35
  215. package/build/components/unsaved-changes-warning/index.js.map +1 -1
  216. package/build/components/word-count/index.js +2 -7
  217. package/build/components/word-count/index.js.map +1 -1
  218. package/build/hooks/custom-sources-backwards-compatibility.js +8 -42
  219. package/build/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  220. package/build/hooks/default-autocompleters.js +3 -4
  221. package/build/hooks/default-autocompleters.js.map +1 -1
  222. package/build/hooks/index.js +0 -1
  223. package/build/hooks/index.js.map +1 -1
  224. package/build/hooks/index.native.js.map +1 -1
  225. package/build/index.js +0 -9
  226. package/build/index.js.map +1 -1
  227. package/build/index.native.js +0 -11
  228. package/build/index.native.js.map +1 -1
  229. package/build/lock-unlock.js +1 -2
  230. package/build/lock-unlock.js.map +1 -1
  231. package/build/private-apis.js +1 -4
  232. package/build/private-apis.js.map +1 -1
  233. package/build/store/actions.js +61 -130
  234. package/build/store/actions.js.map +1 -1
  235. package/build/store/actions.native.js +1 -8
  236. package/build/store/actions.native.js.map +1 -1
  237. package/build/store/constants.js +1 -2
  238. package/build/store/constants.js.map +1 -1
  239. package/build/store/defaults.js +2 -3
  240. package/build/store/defaults.js.map +1 -1
  241. package/build/store/index.js +3 -11
  242. package/build/store/index.js.map +1 -1
  243. package/build/store/local-autosave.js +0 -4
  244. package/build/store/local-autosave.js.map +1 -1
  245. package/build/store/reducer.js +19 -49
  246. package/build/store/reducer.js.map +1 -1
  247. package/build/store/reducer.native.js +3 -17
  248. package/build/store/reducer.native.js.map +1 -1
  249. package/build/store/selectors.js +170 -296
  250. package/build/store/selectors.js.map +1 -1
  251. package/build/store/selectors.native.js +4 -11
  252. package/build/store/selectors.native.js.map +1 -1
  253. package/build/store/utils/notice-builder.js +13 -24
  254. package/build/store/utils/notice-builder.js.map +1 -1
  255. package/build/utils/get-template-part-icon.js +0 -3
  256. package/build/utils/get-template-part-icon.js.map +1 -1
  257. package/build/utils/index.js +0 -4
  258. package/build/utils/index.js.map +1 -1
  259. package/build/utils/index.native.js +0 -2
  260. package/build/utils/index.native.js.map +1 -1
  261. package/build/utils/media-upload/index.js +2 -6
  262. package/build/utils/media-upload/index.js.map +1 -1
  263. package/build/utils/media-upload/index.native.js +0 -1
  264. package/build/utils/media-upload/index.native.js.map +1 -1
  265. package/build/utils/terms.js +8 -18
  266. package/build/utils/terms.js.map +1 -1
  267. package/build/utils/url.js +0 -4
  268. package/build/utils/url.js.map +1 -1
  269. package/build-module/components/autocompleters/index.js.map +1 -1
  270. package/build-module/components/autocompleters/user.js +2 -5
  271. package/build-module/components/autocompleters/user.js.map +1 -1
  272. package/build-module/components/autosave-monitor/index.js +2 -17
  273. package/build-module/components/autosave-monitor/index.js.map +1 -1
  274. package/build-module/components/character-count/index.js +1 -1
  275. package/build-module/components/character-count/index.js.map +1 -1
  276. package/build-module/components/deprecated.js +0 -4
  277. package/build-module/components/deprecated.js.map +1 -1
  278. package/build-module/components/deprecated.native.js +0 -1
  279. package/build-module/components/deprecated.native.js.map +1 -1
  280. package/build-module/components/document-outline/check.js +0 -4
  281. package/build-module/components/document-outline/check.js.map +1 -1
  282. package/build-module/components/document-outline/index.js +9 -13
  283. package/build-module/components/document-outline/index.js.map +1 -1
  284. package/build-module/components/document-outline/item.js +0 -3
  285. package/build-module/components/document-outline/item.js.map +1 -1
  286. package/build-module/components/editor-help/add-blocks.native.js +2 -5
  287. package/build-module/components/editor-help/add-blocks.native.js.map +1 -1
  288. package/build-module/components/editor-help/customize-blocks.native.js +2 -5
  289. package/build-module/components/editor-help/customize-blocks.native.js.map +1 -1
  290. package/build-module/components/editor-help/help-detail-navigation-screen.native.js +6 -8
  291. package/build-module/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
  292. package/build-module/components/editor-help/help-get-support-button.native.js +2 -5
  293. package/build-module/components/editor-help/help-get-support-button.native.js.map +1 -1
  294. package/build-module/components/editor-help/help-section-title.native.js +2 -5
  295. package/build-module/components/editor-help/help-section-title.native.js.map +1 -1
  296. package/build-module/components/editor-help/help-topic-row.native.js +1 -6
  297. package/build-module/components/editor-help/help-topic-row.native.js.map +1 -1
  298. package/build-module/components/editor-help/icon-move-blocks.native.js +0 -1
  299. package/build-module/components/editor-help/icon-move-blocks.native.js.map +1 -1
  300. package/build-module/components/editor-help/index.native.js +9 -9
  301. package/build-module/components/editor-help/index.native.js.map +1 -1
  302. package/build-module/components/editor-help/intro-to-blocks.native.js +2 -5
  303. package/build-module/components/editor-help/intro-to-blocks.native.js.map +1 -1
  304. package/build-module/components/editor-help/move-blocks.native.js +2 -5
  305. package/build-module/components/editor-help/move-blocks.native.js.map +1 -1
  306. package/build-module/components/editor-help/remove-blocks.native.js +2 -5
  307. package/build-module/components/editor-help/remove-blocks.native.js.map +1 -1
  308. package/build-module/components/editor-help/view-sections.native.js +2 -4
  309. package/build-module/components/editor-help/view-sections.native.js.map +1 -1
  310. package/build-module/components/editor-history/redo.js +6 -8
  311. package/build-module/components/editor-history/redo.js.map +1 -1
  312. package/build-module/components/editor-history/undo.js +6 -8
  313. package/build-module/components/editor-history/undo.js.map +1 -1
  314. package/build-module/components/editor-notices/index.js +1 -2
  315. package/build-module/components/editor-notices/index.js.map +1 -1
  316. package/build-module/components/editor-snackbars/index.js +0 -1
  317. package/build-module/components/editor-snackbars/index.js.map +1 -1
  318. package/build-module/components/entities-saved-states/entity-record-item.js +3 -4
  319. package/build-module/components/entities-saved-states/entity-record-item.js.map +1 -1
  320. package/build-module/components/entities-saved-states/entity-type-list.js +3 -10
  321. package/build-module/components/entities-saved-states/entity-type-list.js.map +1 -1
  322. package/build-module/components/entities-saved-states/hooks/use-is-dirty.js +4 -7
  323. package/build-module/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -1
  324. package/build-module/components/entities-saved-states/index.js +8 -16
  325. package/build-module/components/entities-saved-states/index.js.map +1 -1
  326. package/build-module/components/error-boundary/index.js +1 -12
  327. package/build-module/components/error-boundary/index.js.map +1 -1
  328. package/build-module/components/global-keyboard-shortcuts/index.js +5 -6
  329. package/build-module/components/global-keyboard-shortcuts/index.js.map +1 -1
  330. package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js +0 -3
  331. package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
  332. package/build-module/components/index.js +6 -3
  333. package/build-module/components/index.js.map +1 -1
  334. package/build-module/components/index.native.js +4 -2
  335. package/build-module/components/index.native.js.map +1 -1
  336. package/build-module/components/local-autosave-monitor/index.js +6 -21
  337. package/build-module/components/local-autosave-monitor/index.js.map +1 -1
  338. package/build-module/components/media-categories/index.js +31 -41
  339. package/build-module/components/media-categories/index.js.map +1 -1
  340. package/build-module/components/page-attributes/check.js +3 -3
  341. package/build-module/components/page-attributes/check.js.map +1 -1
  342. package/build-module/components/page-attributes/order.js +17 -31
  343. package/build-module/components/page-attributes/order.js.map +1 -1
  344. package/build-module/components/page-attributes/parent.js +9 -23
  345. package/build-module/components/page-attributes/parent.js.map +1 -1
  346. package/build-module/components/post-author/check.js +1 -5
  347. package/build-module/components/post-author/check.js.map +1 -1
  348. package/build-module/components/post-author/combobox.js +7 -16
  349. package/build-module/components/post-author/combobox.js.map +1 -1
  350. package/build-module/components/post-author/constants.js +0 -1
  351. package/build-module/components/post-author/constants.js.map +1 -1
  352. package/build-module/components/post-author/index.js +1 -6
  353. package/build-module/components/post-author/index.js.map +1 -1
  354. package/build-module/components/post-author/select.js +1 -6
  355. package/build-module/components/post-author/select.js.map +1 -1
  356. package/build-module/components/post-comments/index.js +12 -19
  357. package/build-module/components/post-comments/index.js.map +1 -1
  358. package/build-module/components/post-excerpt/check.js +5 -6
  359. package/build-module/components/post-excerpt/check.js.map +1 -1
  360. package/build-module/components/post-excerpt/index.js +11 -23
  361. package/build-module/components/post-excerpt/index.js.map +1 -1
  362. package/build-module/components/post-featured-image/check.js +5 -6
  363. package/build-module/components/post-featured-image/check.js.map +1 -1
  364. package/build-module/components/post-featured-image/index.js +13 -31
  365. package/build-module/components/post-featured-image/index.js.map +1 -1
  366. package/build-module/components/post-format/check.js +10 -15
  367. package/build-module/components/post-format/check.js.map +1 -1
  368. package/build-module/components/post-format/index.js +4 -12
  369. package/build-module/components/post-format/index.js.map +1 -1
  370. package/build-module/components/post-last-revision/check.js +17 -17
  371. package/build-module/components/post-last-revision/check.js.map +1 -1
  372. package/build-module/components/post-last-revision/index.js +18 -21
  373. package/build-module/components/post-last-revision/index.js.map +1 -1
  374. package/build-module/components/post-locked-modal/index.js +8 -22
  375. package/build-module/components/post-locked-modal/index.js.map +1 -1
  376. package/build-module/components/post-pending-status/check.js +17 -20
  377. package/build-module/components/post-pending-status/check.js.map +1 -1
  378. package/build-module/components/post-pending-status/index.js +11 -20
  379. package/build-module/components/post-pending-status/index.js.map +1 -1
  380. package/build-module/components/post-pingbacks/index.js +12 -19
  381. package/build-module/components/post-pingbacks/index.js.map +1 -1
  382. package/build-module/components/post-preview-button/index.js +11 -17
  383. package/build-module/components/post-preview-button/index.js.map +1 -1
  384. package/build-module/components/post-publish-button/index.js +7 -23
  385. package/build-module/components/post-publish-button/index.js.map +1 -1
  386. package/build-module/components/post-publish-button/label.js +1 -4
  387. package/build-module/components/post-publish-button/label.js.map +1 -1
  388. package/build-module/components/post-publish-panel/index.js +1 -8
  389. package/build-module/components/post-publish-panel/index.js.map +1 -1
  390. package/build-module/components/post-publish-panel/maybe-category-panel.js +4 -8
  391. package/build-module/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  392. package/build-module/components/post-publish-panel/maybe-post-format-panel.js +2 -12
  393. package/build-module/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  394. package/build-module/components/post-publish-panel/maybe-tags-panel.js +2 -9
  395. package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  396. package/build-module/components/post-publish-panel/maybe-upload-media.js +1 -12
  397. package/build-module/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  398. package/build-module/components/post-publish-panel/postpublish.js +3 -16
  399. package/build-module/components/post-publish-panel/postpublish.js.map +1 -1
  400. package/build-module/components/post-publish-panel/prepublish.js +1 -10
  401. package/build-module/components/post-publish-panel/prepublish.js.map +1 -1
  402. package/build-module/components/post-saved-state/index.js +15 -23
  403. package/build-module/components/post-saved-state/index.js.map +1 -1
  404. package/build-module/components/post-schedule/check.js +1 -3
  405. package/build-module/components/post-schedule/check.js.map +1 -1
  406. package/build-module/components/post-schedule/index.js +8 -8
  407. package/build-module/components/post-schedule/index.js.map +1 -1
  408. package/build-module/components/post-schedule/label.js +18 -22
  409. package/build-module/components/post-schedule/label.js.map +1 -1
  410. package/build-module/components/post-slug/check.js +0 -1
  411. package/build-module/components/post-slug/check.js.map +1 -1
  412. package/build-module/components/post-slug/index.js +1 -8
  413. package/build-module/components/post-slug/index.js.map +1 -1
  414. package/build-module/components/post-sticky/check.js +1 -3
  415. package/build-module/components/post-sticky/check.js.map +1 -1
  416. package/build-module/components/post-sticky/index.js +1 -3
  417. package/build-module/components/post-sticky/index.js.map +1 -1
  418. package/build-module/components/post-switch-to-draft-button/index.js +1 -9
  419. package/build-module/components/post-switch-to-draft-button/index.js.map +1 -1
  420. package/build-module/components/post-sync-status/index.js +5 -11
  421. package/build-module/components/post-sync-status/index.js.map +1 -1
  422. package/build-module/components/post-taxonomies/check.js +1 -3
  423. package/build-module/components/post-taxonomies/check.js.map +1 -1
  424. package/build-module/components/post-taxonomies/flat-term-selector.js +17 -39
  425. package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
  426. package/build-module/components/post-taxonomies/hierarchical-term-selector.js +29 -66
  427. package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  428. package/build-module/components/post-taxonomies/index.js +3 -5
  429. package/build-module/components/post-taxonomies/index.js.map +1 -1
  430. package/build-module/components/post-taxonomies/most-used-terms.js +1 -4
  431. package/build-module/components/post-taxonomies/most-used-terms.js.map +1 -1
  432. package/build-module/components/post-template/index.js +1 -5
  433. package/build-module/components/post-template/index.js.map +1 -1
  434. package/build-module/components/post-text-editor/index.js +4 -9
  435. package/build-module/components/post-text-editor/index.js.map +1 -1
  436. package/build-module/components/post-title/index.js +17 -35
  437. package/build-module/components/post-title/index.js.map +1 -1
  438. package/build-module/components/post-title/index.native.js +8 -33
  439. package/build-module/components/post-title/index.native.js.map +1 -1
  440. package/build-module/components/post-trash/check.js +1 -4
  441. package/build-module/components/post-trash/check.js.map +1 -1
  442. package/build-module/components/post-trash/index.js +1 -4
  443. package/build-module/components/post-trash/index.js.map +1 -1
  444. package/build-module/components/post-type-support-check/index.js +14 -20
  445. package/build-module/components/post-type-support-check/index.js.map +1 -1
  446. package/build-module/components/post-url/check.js +1 -9
  447. package/build-module/components/post-url/check.js.map +1 -1
  448. package/build-module/components/post-url/index.js +3 -8
  449. package/build-module/components/post-url/index.js.map +1 -1
  450. package/build-module/components/post-url/label.js +1 -1
  451. package/build-module/components/post-url/label.js.map +1 -1
  452. package/build-module/components/post-visibility/check.js +1 -2
  453. package/build-module/components/post-visibility/check.js.map +1 -1
  454. package/build-module/components/post-visibility/index.js +1 -10
  455. package/build-module/components/post-visibility/index.js.map +1 -1
  456. package/build-module/components/post-visibility/label.js +1 -1
  457. package/build-module/components/post-visibility/label.js.map +1 -1
  458. package/build-module/components/post-visibility/utils.js.map +1 -1
  459. package/build-module/components/provider/index.js +13 -14
  460. package/build-module/components/provider/index.js.map +1 -1
  461. package/build-module/components/provider/index.native.js +21 -52
  462. package/build-module/components/provider/index.native.js.map +1 -1
  463. package/build-module/components/provider/use-block-editor-settings.js +9 -12
  464. package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
  465. package/build-module/components/provider/use-block-editor-settings.native.js +5 -5
  466. package/build-module/components/provider/use-block-editor-settings.native.js.map +1 -1
  467. package/build-module/components/provider/with-registry-provider.js +5 -8
  468. package/build-module/components/provider/with-registry-provider.js.map +1 -1
  469. package/build-module/components/table-of-contents/index.js +4 -7
  470. package/build-module/components/table-of-contents/index.js.map +1 -1
  471. package/build-module/components/table-of-contents/panel.js +1 -5
  472. package/build-module/components/table-of-contents/panel.js.map +1 -1
  473. package/build-module/components/template-validation-notice/index.js +2 -6
  474. package/build-module/components/template-validation-notice/index.js.map +1 -1
  475. package/build-module/components/theme-support-check/index.js +3 -7
  476. package/build-module/components/theme-support-check/index.js.map +1 -1
  477. package/build-module/components/time-to-read/index.js +4 -7
  478. package/build-module/components/time-to-read/index.js.map +1 -1
  479. package/build-module/components/unsaved-changes-warning/index.js +22 -31
  480. package/build-module/components/unsaved-changes-warning/index.js.map +1 -1
  481. package/build-module/components/word-count/index.js +2 -4
  482. package/build-module/components/word-count/index.js.map +1 -1
  483. package/build-module/hooks/custom-sources-backwards-compatibility.js +11 -39
  484. package/build-module/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  485. package/build-module/hooks/default-autocompleters.js +3 -4
  486. package/build-module/hooks/default-autocompleters.js.map +1 -1
  487. package/build-module/hooks/index.js.map +1 -1
  488. package/build-module/hooks/index.native.js.map +1 -1
  489. package/build-module/index.js +1 -1
  490. package/build-module/index.js.map +1 -1
  491. package/build-module/index.native.js +1 -1
  492. package/build-module/index.native.js.map +1 -1
  493. package/build-module/lock-unlock.js.map +1 -1
  494. package/build-module/private-apis.js.map +1 -1
  495. package/build-module/store/actions.js +63 -85
  496. package/build-module/store/actions.js.map +1 -1
  497. package/build-module/store/actions.native.js +2 -2
  498. package/build-module/store/actions.native.js.map +1 -1
  499. package/build-module/store/constants.js +1 -1
  500. package/build-module/store/constants.js.map +1 -1
  501. package/build-module/store/defaults.js +3 -2
  502. package/build-module/store/defaults.js.map +1 -1
  503. package/build-module/store/index.js +5 -4
  504. package/build-module/store/index.js.map +1 -1
  505. package/build-module/store/local-autosave.js +0 -1
  506. package/build-module/store/local-autosave.js.map +1 -1
  507. package/build-module/store/reducer.js +21 -33
  508. package/build-module/store/reducer.js.map +1 -1
  509. package/build-module/store/reducer.native.js +4 -10
  510. package/build-module/store/reducer.native.js.map +1 -1
  511. package/build-module/store/selectors.js +173 -223
  512. package/build-module/store/selectors.js.map +1 -1
  513. package/build-module/store/selectors.native.js +6 -8
  514. package/build-module/store/selectors.native.js.map +1 -1
  515. package/build-module/store/utils/notice-builder.js +15 -21
  516. package/build-module/store/utils/notice-builder.js.map +1 -1
  517. package/build-module/utils/get-template-part-icon.js +0 -2
  518. package/build-module/utils/get-template-part-icon.js.map +1 -1
  519. package/build-module/utils/index.js.map +1 -1
  520. package/build-module/utils/index.native.js.map +1 -1
  521. package/build-module/utils/media-upload/index.js +2 -4
  522. package/build-module/utils/media-upload/index.js.map +1 -1
  523. package/build-module/utils/media-upload/index.native.js.map +1 -1
  524. package/build-module/utils/terms.js +9 -11
  525. package/build-module/utils/terms.js.map +1 -1
  526. package/build-module/utils/url.js +1 -1
  527. package/build-module/utils/url.js.map +1 -1
  528. package/build-style/style-rtl.css +10 -17
  529. package/build-style/style.css +10 -17
  530. package/package.json +32 -31
  531. package/src/components/editor-help/index.native.js +1 -1
  532. package/src/components/editor-help/style.scss +5 -0
  533. package/src/components/page-attributes/order.js +15 -23
  534. package/src/components/page-attributes/test/order.js +46 -15
  535. package/src/components/post-author/test/check.js +18 -12
  536. package/src/components/post-comments/index.js +11 -17
  537. package/src/components/post-excerpt/check.js +6 -2
  538. package/src/components/post-excerpt/index.js +10 -16
  539. package/src/components/post-featured-image/check.js +4 -2
  540. package/src/components/post-format/check.js +16 -11
  541. package/src/components/post-last-revision/check.js +12 -14
  542. package/src/components/post-last-revision/index.js +12 -10
  543. package/src/components/post-last-revision/test/check.js +28 -16
  544. package/src/components/post-pending-status/check.js +13 -19
  545. package/src/components/post-pending-status/index.js +9 -14
  546. package/src/components/post-pending-status/test/check.js +32 -10
  547. package/src/components/post-pingbacks/index.js +11 -15
  548. package/src/components/post-publish-panel/style.scss +12 -25
  549. package/src/components/post-sync-status/style.scss +4 -1
  550. package/src/components/post-type-support-check/index.js +8 -10
  551. package/src/components/post-type-support-check/test/index.js +36 -20
  552. package/src/components/provider/index.js +3 -2
  553. package/src/components/unsaved-changes-warning/index.js +22 -27
  554. package/src/hooks/custom-sources-backwards-compatibility.js +1 -25
  555. package/src/store/actions.js +1 -1
  556. package/src/store/selectors.js +2 -2
  557. package/src/store/test/selectors.js +13 -13
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/components/post-publish-panel/maybe-post-format-panel.js"],"names":["getSuggestion","supportedFormats","suggestedPostFormat","formats","POST_FORMATS","filter","format","includes","id","find","PostFormatSuggestion","suggestionText","onUpdatePostFormat","PostFormatPanel","currentPostFormat","suggestion","select","getEditedPostAttribute","getSuggestedPostFormat","editorStore","coreStore","getThemeSupports","editPost","panelBodyTitle","caption"],"mappings":";;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AAAF,GAAF,CAAjD;;AAEA,QAAMiB,cAAc,GAAG,CACtB,cAAI,aAAJ,CADsB,EAEtB;AAAM,IAAA,SAAS,EAAC,iCAAhB;AAAkD,IAAA,GAAG,EAAC;AAAtD,KACG,cAAI,mBAAJ,CADH,CAFsB,CAAvB;;AAOA,MAAK,CAAER,UAAF,IAAgBA,UAAU,CAACP,EAAX,KAAkBM,iBAAvC,EAA2D;AAC1D,WAAO,IAAP;AACA;;AAED,SACC,4BAAC,qBAAD;AAAW,IAAA,WAAW,EAAG,KAAzB;AAAiC,IAAA,KAAK,EAAGS;AAAzC,KACC,uCACG,cACD,+IADC,CADH,CADD,EAMC,uCACC,4BAAC,oBAAD;AACC,IAAA,kBAAkB,EAAGX,kBADtB;AAEC,IAAA,mBAAmB,EAAGG,UAAU,CAACP,EAFlC;AAGC,IAAA,cAAc,EAAG;AAChB;AACA,kBAAI,0BAAJ,CAFgB,EAGhBO,UAAU,CAACS,OAHK;AAHlB,IADD,CAND,CADD;AAoBA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Button, PanelBody } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { POST_FORMATS } from '../post-format';\nimport { store as editorStore } from '../../store';\n\nconst getSuggestion = ( supportedFormats, suggestedPostFormat ) => {\n\tconst formats = POST_FORMATS.filter( ( format ) =>\n\t\tsupportedFormats?.includes( format.id )\n\t);\n\treturn formats.find( ( format ) => format.id === suggestedPostFormat );\n};\n\nconst PostFormatSuggestion = ( {\n\tsuggestedPostFormat,\n\tsuggestionText,\n\tonUpdatePostFormat,\n} ) => (\n\t<Button\n\t\tvariant=\"link\"\n\t\tonClick={ () => onUpdatePostFormat( suggestedPostFormat ) }\n\t>\n\t\t{ suggestionText }\n\t</Button>\n);\n\nexport default function PostFormatPanel() {\n\tconst { currentPostFormat, suggestion } = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute, getSuggestedPostFormat } =\n\t\t\tselect( editorStore );\n\t\tconst supportedFormats =\n\t\t\tselect( coreStore ).getThemeSupports().formats ?? [];\n\t\treturn {\n\t\t\tcurrentPostFormat: getEditedPostAttribute( 'format' ),\n\t\t\tsuggestion: getSuggestion(\n\t\t\t\tsupportedFormats,\n\t\t\t\tgetSuggestedPostFormat()\n\t\t\t),\n\t\t};\n\t}, [] );\n\n\tconst { editPost } = useDispatch( editorStore );\n\n\tconst onUpdatePostFormat = ( format ) => editPost( { format } );\n\n\tconst panelBodyTitle = [\n\t\t__( 'Suggestion:' ),\n\t\t<span className=\"editor-post-publish-panel__link\" key=\"label\">\n\t\t\t{ __( 'Use a post format' ) }\n\t\t</span>,\n\t];\n\n\tif ( ! suggestion || suggestion.id === currentPostFormat ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PanelBody initialOpen={ false } title={ panelBodyTitle }>\n\t\t\t<p>\n\t\t\t\t{ __(\n\t\t\t\t\t'Your theme uses post formats to highlight different kinds of content, like images or videos. Apply a post format to see this special styling.'\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<PostFormatSuggestion\n\t\t\t\t\tonUpdatePostFormat={ onUpdatePostFormat }\n\t\t\t\t\tsuggestedPostFormat={ suggestion.id }\n\t\t\t\t\tsuggestionText={ sprintf(\n\t\t\t\t\t\t/* translators: %s: post format */\n\t\t\t\t\t\t__( 'Apply the \"%1$s\" format.' ),\n\t\t\t\t\t\tsuggestion.caption\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</p>\n\t\t</PanelBody>\n\t);\n}\n"]}
1
+ {"version":3,"names":["_components","require","_data","_i18n","_coreData","_postFormat","_store","getSuggestion","supportedFormats","suggestedPostFormat","formats","POST_FORMATS","filter","format","includes","id","find","PostFormatSuggestion","suggestionText","onUpdatePostFormat","_element","createElement","Button","variant","onClick","PostFormatPanel","currentPostFormat","suggestion","useSelect","select","_select$getThemeSuppo","getEditedPostAttribute","getSuggestedPostFormat","editorStore","coreStore","getThemeSupports","editPost","useDispatch","panelBodyTitle","__","className","key","PanelBody","initialOpen","title","sprintf","caption"],"sources":["@wordpress/editor/src/components/post-publish-panel/maybe-post-format-panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Button, PanelBody } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { POST_FORMATS } from '../post-format';\nimport { store as editorStore } from '../../store';\n\nconst getSuggestion = ( supportedFormats, suggestedPostFormat ) => {\n\tconst formats = POST_FORMATS.filter( ( format ) =>\n\t\tsupportedFormats?.includes( format.id )\n\t);\n\treturn formats.find( ( format ) => format.id === suggestedPostFormat );\n};\n\nconst PostFormatSuggestion = ( {\n\tsuggestedPostFormat,\n\tsuggestionText,\n\tonUpdatePostFormat,\n} ) => (\n\t<Button\n\t\tvariant=\"link\"\n\t\tonClick={ () => onUpdatePostFormat( suggestedPostFormat ) }\n\t>\n\t\t{ suggestionText }\n\t</Button>\n);\n\nexport default function PostFormatPanel() {\n\tconst { currentPostFormat, suggestion } = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute, getSuggestedPostFormat } =\n\t\t\tselect( editorStore );\n\t\tconst supportedFormats =\n\t\t\tselect( coreStore ).getThemeSupports().formats ?? [];\n\t\treturn {\n\t\t\tcurrentPostFormat: getEditedPostAttribute( 'format' ),\n\t\t\tsuggestion: getSuggestion(\n\t\t\t\tsupportedFormats,\n\t\t\t\tgetSuggestedPostFormat()\n\t\t\t),\n\t\t};\n\t}, [] );\n\n\tconst { editPost } = useDispatch( editorStore );\n\n\tconst onUpdatePostFormat = ( format ) => editPost( { format } );\n\n\tconst panelBodyTitle = [\n\t\t__( 'Suggestion:' ),\n\t\t<span className=\"editor-post-publish-panel__link\" key=\"label\">\n\t\t\t{ __( 'Use a post format' ) }\n\t\t</span>,\n\t];\n\n\tif ( ! suggestion || suggestion.id === currentPostFormat ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PanelBody initialOpen={ false } title={ panelBodyTitle }>\n\t\t\t<p>\n\t\t\t\t{ __(\n\t\t\t\t\t'Your theme uses post formats to highlight different kinds of content, like images or videos. Apply a post format to see this special styling.'\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<PostFormatSuggestion\n\t\t\t\t\tonUpdatePostFormat={ onUpdatePostFormat }\n\t\t\t\t\tsuggestedPostFormat={ suggestion.id }\n\t\t\t\t\tsuggestionText={ sprintf(\n\t\t\t\t\t\t/* translators: %s: post format */\n\t\t\t\t\t\t__( 'Apply the \"%1$s\" format.' ),\n\t\t\t\t\t\tsuggestion.caption\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</p>\n\t\t</PanelBody>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AAKA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAZA;AACA;AACA;;AAMA;AACA;AACA;;AAIA,MAAMM,aAAa,GAAGA,CAAEC,gBAAgB,EAAEC,mBAAmB,KAAM;EAClE,MAAMC,OAAO,GAAGC,wBAAY,CAACC,MAAM,CAAIC,MAAM,IAC5CL,gBAAgB,EAAEM,QAAQ,CAAED,MAAM,CAACE,EAAG,CACvC,CAAC;EACD,OAAOL,OAAO,CAACM,IAAI,CAAIH,MAAM,IAAMA,MAAM,CAACE,EAAE,KAAKN,mBAAoB,CAAC;AACvE,CAAC;AAED,MAAMQ,oBAAoB,GAAGA,CAAE;EAC9BR,mBAAmB;EACnBS,cAAc;EACdC;AACD,CAAC,KACA,IAAAC,QAAA,CAAAC,aAAA,EAACrB,WA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;EAAgB,GACxD,IAAAlB,QAAA,CAAAC,aAAA,aACG,IAAAkB,QAAE,EACH,+IACD,CACE,CAAC,EACJ,IAAAnB,QAAA,CAAAC,aAAA,aACC,IAAAD,QAAA,CAAAC,aAAA,EAACJ,oBAAoB;IACpBE,kBAAkB,EAAGA,kBAAoB;IACzCV,mBAAmB,EAAGkB,UAAU,CAACZ,EAAI;IACrCG,cAAc,EAAG,IAAA2B,aAAO,GACvB;IACA,IAAAN,QAAE,EAAE,0BAA2B,CAAC,EAChCZ,UAAU,CAACmB,OACZ;EAAG,CACH,CACC,CACO,CAAC;AAEd"}
@@ -1,28 +1,18 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = void 0;
9
-
10
8
  var _element = require("@wordpress/element");
11
-
12
9
  var _i18n = require("@wordpress/i18n");
13
-
14
10
  var _compose = require("@wordpress/compose");
15
-
16
11
  var _data = require("@wordpress/data");
17
-
18
12
  var _components = require("@wordpress/components");
19
-
20
13
  var _coreData = require("@wordpress/core-data");
21
-
22
14
  var _flatTermSelector = _interopRequireDefault(require("../post-taxonomies/flat-term-selector"));
23
-
24
15
  var _store = require("../../store");
25
-
26
16
  /**
27
17
  * WordPress dependencies
28
18
  */
@@ -30,6 +20,7 @@ var _store = require("../../store");
30
20
  /**
31
21
  * Internal dependencies
32
22
  */
23
+
33
24
  const TagsPanel = () => {
34
25
  const panelBodyTitle = [(0, _i18n.__)('Suggestion:'), (0, _element.createElement)("span", {
35
26
  className: "editor-post-publish-panel__link",
@@ -42,7 +33,6 @@ const TagsPanel = () => {
42
33
  slug: 'post_tag'
43
34
  }));
44
35
  };
45
-
46
36
  class MaybeTagsPanel extends _element.Component {
47
37
  constructor(props) {
48
38
  super(props);
@@ -50,6 +40,7 @@ class MaybeTagsPanel extends _element.Component {
50
40
  hadTagsWhenOpeningThePanel: props.hasTags
51
41
  };
52
42
  }
43
+
53
44
  /*
54
45
  * We only want to show the tag panel if the post didn't have
55
46
  * any tags when the user hit the Publish button.
@@ -60,18 +51,13 @@ class MaybeTagsPanel extends _element.Component {
60
51
  * hiding this panel and keeping the user from adding
61
52
  * more than one tag.
62
53
  */
63
-
64
-
65
54
  render() {
66
55
  if (!this.state.hadTagsWhenOpeningThePanel) {
67
56
  return (0, _element.createElement)(TagsPanel, null);
68
57
  }
69
-
70
58
  return null;
71
59
  }
72
-
73
60
  }
74
-
75
61
  var _default = (0, _compose.compose)((0, _data.withSelect)(select => {
76
62
  const postType = select(_store.store).getCurrentPostType();
77
63
  const tagsTaxonomy = select(_coreData.store).getTaxonomy('post_tag');
@@ -85,6 +71,5 @@ var _default = (0, _compose.compose)((0, _data.withSelect)(select => {
85
71
  areTagsFetched,
86
72
  isPostTypeSupported
87
73
  }) => isPostTypeSupported && areTagsFetched))(MaybeTagsPanel);
88
-
89
74
  exports.default = _default;
90
75
  //# sourceMappingURL=maybe-tags-panel.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/components/post-publish-panel/maybe-tags-panel.js"],"names":["TagsPanel","panelBodyTitle","MaybeTagsPanel","Component","constructor","props","state","hadTagsWhenOpeningThePanel","hasTags","render","select","postType","editorStore","getCurrentPostType","tagsTaxonomy","coreStore","getTaxonomy","tags","getEditedPostAttribute","rest_base","areTagsFetched","undefined","isPostTypeSupported","types","some","type","length"],"mappings":";;;;;;;;;AAIA;;AADA;;AAEA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AAdA;AACA;AACA;;AAQA;AACA;AACA;AAIA,MAAMA,SAAS,GAAG,MAAM;AACvB,QAAMC,cAAc,GAAG,CACtB,cAAI,aAAJ,CADsB,EAEtB;AAAM,IAAA,SAAS,EAAC,iCAAhB;AAAkD,IAAA,GAAG,EAAC;AAAtD,KACG,cAAI,UAAJ,CADH,CAFsB,CAAvB;AAOA,SACC,4BAAC,qBAAD;AAAW,IA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lB,cArBY,C","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Component } from '@wordpress/element';\nimport { compose, ifCondition } from '@wordpress/compose';\nimport { withSelect } from '@wordpress/data';\nimport { PanelBody } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport FlatTermSelector from '../post-taxonomies/flat-term-selector';\nimport { store as editorStore } from '../../store';\n\nconst TagsPanel = () => {\n\tconst panelBodyTitle = [\n\t\t__( 'Suggestion:' ),\n\t\t<span className=\"editor-post-publish-panel__link\" key=\"label\">\n\t\t\t{ __( 'Add tags' ) }\n\t\t</span>,\n\t];\n\n\treturn (\n\t\t<PanelBody initialOpen={ false } title={ panelBodyTitle }>\n\t\t\t<p>\n\t\t\t\t{ __(\n\t\t\t\t\t'Tags help users and search engines navigate your site and find your content. Add a few keywords to describe your post.'\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<FlatTermSelector slug={ 'post_tag' } />\n\t\t</PanelBody>\n\t);\n};\n\nclass MaybeTagsPanel extends Component {\n\tconstructor( props ) {\n\t\tsuper( props );\n\t\tthis.state = {\n\t\t\thadTagsWhenOpeningThePanel: props.hasTags,\n\t\t};\n\t}\n\n\t/*\n\t * We only want to show the tag panel if the post didn't have\n\t * any tags when the user hit the Publish button.\n\t *\n\t * We can't use the prop.hasTags because it'll change to true\n\t * if the user adds a new tag within the pre-publish panel.\n\t * This would force a re-render and a new prop.hasTags check,\n\t * hiding this panel and keeping the user from adding\n\t * more than one tag.\n\t */\n\trender() {\n\t\tif ( ! this.state.hadTagsWhenOpeningThePanel ) {\n\t\t\treturn <TagsPanel />;\n\t\t}\n\n\t\treturn null;\n\t}\n}\n\nexport default compose(\n\twithSelect( ( select ) => {\n\t\tconst postType = select( editorStore ).getCurrentPostType();\n\t\tconst tagsTaxonomy = select( coreStore ).getTaxonomy( 'post_tag' );\n\t\tconst tags =\n\t\t\ttagsTaxonomy &&\n\t\t\tselect( editorStore ).getEditedPostAttribute(\n\t\t\t\ttagsTaxonomy.rest_base\n\t\t\t);\n\t\treturn {\n\t\t\tareTagsFetched: tagsTaxonomy !== undefined,\n\t\t\tisPostTypeSupported:\n\t\t\t\ttagsTaxonomy &&\n\t\t\t\ttagsTaxonomy.types.some( ( type ) => type === postType ),\n\t\t\thasTags: tags && tags.length,\n\t\t};\n\t} ),\n\tifCondition(\n\t\t( { areTagsFetched, isPostTypeSupported } ) =>\n\t\t\tisPostTypeSupported && areTagsFetched\n\t)\n)( MaybeTagsPanel );\n"]}
1
+ {"version":3,"names":["_element","require","_i18n","_compose","_data","_components","_coreData","_flatTermSelector","_interopRequireDefault","_store","TagsPanel","panelBodyTitle","__","createElement","className","key","PanelBody","initialOpen","title","default","slug","MaybeTagsPanel","Component","constructor","props","state","hadTagsWhenOpeningThePanel","hasTags","render","_default","compose","withSelect","select","postType","editorStore","getCurrentPostType","tagsTaxonomy","coreStore","getTaxonomy","tags","getEditedPostAttribute","rest_base","areTagsFetched","undefined","isPostTypeSupported","types","some","type","length","ifCondition","exports"],"sources":["@wordpress/editor/src/components/post-publish-panel/maybe-tags-panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Component } from '@wordpress/element';\nimport { compose, ifCondition } from '@wordpress/compose';\nimport { withSelect } from '@wordpress/data';\nimport { PanelBody } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport FlatTermSelector from '../post-taxonomies/flat-term-selector';\nimport { store as editorStore } from '../../store';\n\nconst TagsPanel = () => {\n\tconst panelBodyTitle = [\n\t\t__( 'Suggestion:' ),\n\t\t<span className=\"editor-post-publish-panel__link\" key=\"label\">\n\t\t\t{ __( 'Add tags' ) }\n\t\t</span>,\n\t];\n\n\treturn (\n\t\t<PanelBody initialOpen={ false } title={ panelBodyTitle }>\n\t\t\t<p>\n\t\t\t\t{ __(\n\t\t\t\t\t'Tags help users and search engines navigate your site and find your content. Add a few keywords to describe your post.'\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<FlatTermSelector slug={ 'post_tag' } />\n\t\t</PanelBody>\n\t);\n};\n\nclass MaybeTagsPanel extends Component {\n\tconstructor( props ) {\n\t\tsuper( props );\n\t\tthis.state = {\n\t\t\thadTagsWhenOpeningThePanel: props.hasTags,\n\t\t};\n\t}\n\n\t/*\n\t * We only want to show the tag panel if the post didn't have\n\t * any tags when the user hit the Publish button.\n\t *\n\t * We can't use the prop.hasTags because it'll change to true\n\t * if the user adds a new tag within the pre-publish panel.\n\t * This would force a re-render and a new prop.hasTags check,\n\t * hiding this panel and keeping the user from adding\n\t * more than one tag.\n\t */\n\trender() {\n\t\tif ( ! this.state.hadTagsWhenOpeningThePanel ) {\n\t\t\treturn <TagsPanel />;\n\t\t}\n\n\t\treturn null;\n\t}\n}\n\nexport default compose(\n\twithSelect( ( select ) => {\n\t\tconst postType = select( editorStore ).getCurrentPostType();\n\t\tconst tagsTaxonomy = select( coreStore ).getTaxonomy( 'post_tag' );\n\t\tconst tags =\n\t\t\ttagsTaxonomy &&\n\t\t\tselect( editorStore ).getEditedPostAttribute(\n\t\t\t\ttagsTaxonomy.rest_base\n\t\t\t);\n\t\treturn {\n\t\t\tareTagsFetched: tagsTaxonomy !== undefined,\n\t\t\tisPostTypeSupported:\n\t\t\t\ttagsTaxonomy &&\n\t\t\t\ttagsTaxonomy.types.some( ( type ) => type === postType ),\n\t\t\thasTags: tags && tags.length,\n\t\t};\n\t} ),\n\tifCondition(\n\t\t( { areTagsFetched, isPostTypeSupported } ) =>\n\t\t\tisPostTypeSupported && areTagsFetched\n\t)\n)( MaybeTagsPanel );\n"],"mappings":";;;;;;;AAIA,IAAAA,QAAA,GAAAC,OAAA;AADA,IAAAC,KAAA,GAAAD,OAAA;AAEA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AACA,I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AAkB,CAAC,CAAC;EAC3D,MAAMC,YAAY,GAAGJ,MAAM,CAAEK,eAAU,CAAC,CAACC,WAAW,CAAE,UAAW,CAAC;EAClE,MAAMC,IAAI,GACTH,YAAY,IACZJ,MAAM,CAAEE,YAAY,CAAC,CAACM,sBAAsB,CAC3CJ,YAAY,CAACK,SACd,CAAC;EACF,OAAO;IACNC,cAAc,EAAEN,YAAY,KAAKO,SAAS;IAC1CC,mBAAmB,EAClBR,YAAY,IACZA,YAAY,CAACS,KAAK,CAACC,IAAI,CAAIC,IAAI,IAAMA,IAAI,KAAKd,QAAS,CAAC;IACzDN,OAAO,EAAEY,IAAI,IAAIA,IAAI,CAACS;EACvB,CAAC;AACF,CAAE,CAAC,EACH,IAAAC,oBAAW,EACV,CAAE;EAAEP,cAAc;EAAEE;AAAoB,CAAC,KACxCA,mBAAmB,IAAIF,cACzB,CACD,CAAC,CAAErB,cAAe,CAAC;AAAA6B,OAAA,CAAA/B,OAAA,GAAAU,QAAA"}
@@ -4,23 +4,14 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = PostFormatPanel;
7
-
8
7
  var _element = require("@wordpress/element");
9
-
10
8
  var _components = require("@wordpress/components");
11
-
12
9
  var _data = require("@wordpress/data");
13
-
14
10
  var _i18n = require("@wordpress/i18n");
15
-
16
11
  var _icons = require("@wordpress/icons");
17
-
18
12
  var _blockEditor = require("@wordpress/block-editor");
19
-
20
13
  var _blob = require("@wordpress/blob");
21
-
22
14
  var _store = require("../../store");
23
-
24
15
  /**
25
16
  * WordPress dependencies
26
17
  */
@@ -28,6 +19,7 @@ var _store = require("../../store");
28
19
  /**
29
20
  * Internal dependencies
30
21
  */
22
+
31
23
  function flattenBlocks(blocks) {
32
24
  const result = [];
33
25
  blocks.forEach(block => {
@@ -36,7 +28,6 @@ function flattenBlocks(blocks) {
36
28
  });
37
29
  return result;
38
30
  }
39
-
40
31
  function Image(block) {
41
32
  const {
42
33
  selectBlock
@@ -76,7 +67,6 @@ function Image(block) {
76
67
  }
77
68
  });
78
69
  }
79
-
80
70
  function PostFormatPanel() {
81
71
  const [isUploading, setIsUploading] = (0, _element.useState)(false);
82
72
  const {
@@ -90,16 +80,13 @@ function PostFormatPanel() {
90
80
  const {
91
81
  updateBlockAttributes
92
82
  } = (0, _data.useDispatch)(_blockEditor.store);
93
-
94
83
  if (!mediaUpload || !externalImages.length) {
95
84
  return null;
96
85
  }
97
-
98
86
  const panelBodyTitle = [(0, _i18n.__)('Suggestion:'), (0, _element.createElement)("span", {
99
87
  className: "editor-post-publish-panel__link",
100
88
  key: "label"
101
89
  }, (0, _i18n.__)('External media'))];
102
-
103
90
  function uploadImages() {
104
91
  setIsUploading(true);
105
92
  Promise.all(externalImages.map(image => window.fetch(image.attributes.url.includes('?') ? image.attributes.url : image.attributes.url + '?').then(response => response.blob()).then(blob => new Promise((resolve, reject) => {
@@ -109,24 +96,20 @@ function PostFormatPanel() {
109
96
  if ((0, _blob.isBlobURL)(media.url)) {
110
97
  return;
111
98
  }
112
-
113
99
  updateBlockAttributes(image.clientId, {
114
100
  id: media.id,
115
101
  url: media.url
116
102
  });
117
103
  resolve();
118
104
  },
119
-
120
105
  onError() {
121
106
  reject();
122
107
  }
123
-
124
108
  });
125
109
  })))).finally(() => {
126
110
  setIsUploading(false);
127
111
  });
128
112
  }
129
-
130
113
  return (0, _element.createElement)(_components.PanelBody, {
131
114
  initialOpen: true,
132
115
  title: panelBodyTitle
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/components/post-publish-panel/maybe-upload-media.js"],"names":["flattenBlocks","blocks","result","forEach","block","push","innerBlocks","Image","selectBlock","blockEditorStore","clientId","event","key","preventDefault","attributes","alt","url","opacity","scale","width","height","objectFit","borderRadius","cursor","PostFormatPanel","isUploading","setIsUploading","editorBlocks","mediaUpload","select","editorStore","getEditorBlocks","getSettings","externalImages","filter","name","id","updateBlockAttributes","length","panelBodyTitle","uploadImages","Promise","all","map","image","window","fetch","includes","then","response","blob","resolve","reject","filesList","onFileChange","media","onError","finally","display","flexWrap","gap","upload"],"mappings":";;;;;;;AAcA;;AAXA;;AAOA;;AACA;;AACA;;AACA;;AAEA;;AAKA;;AApBA;AACA;AACA;;AAeA;AACA;AACA;AAGA,SAASA,aAAT,CAAwBC,MAAxB,EAAiC;AAChC,QAAMC,MAAM,GAAG,EAAf;AAEAD,EAAAA,MAAM,CAACE,OAAP,CAAkBC,KAAF,IAAa;AAC5BF,IAAAA,MAAM,CAACG,IAAP,CAAaD,KAAb;AACAF,IAAAA,MAAM,CAACG,IAAP,CAAa,GAAGL,aAAa,CAAEI,KAAK,CAACE,WAAR,CAA7B;AACA,GAHD;AAKA,SAAOJ,MAAP;AACA;;AAED,SAASK,KAAT,CAAgBH,KAAhB,EAAwB;AACvB,QAAM;AAAEI,IAAAA;AAAF,MAAkB,uBAAaC,kBAAb,CAAxB;AACA,SACC,4BAAC,4BAAD,CAAQ,GAAR;AACC,IAAA,QAAQ,EAAG,CADZ;AAEC,IAAA,IAAI,EAAC,QAFN;AAGC,kBAAa,cAAI,qBAAJ,CAHd;AAIC,IAAA,OAAO,EAAG,MAAM;AACfD,MAAAA,WAAW,CAAEJ,KAAK,CAACM,QAAR,CAAX;AACA,KANF;AAOC,IAAA,SAAS,EAAKC,KAAF,IAAa;AACxB,UAAKA,KAAK,CAACC,GAAN,KAAc,OAAd,IAAyBD,KAAK,CAACC,GAAN,KAAc,GAA5C,EAAkD;AACjDJ,QAAAA,WAAW,CAAEJ,KAAK,CAACM,QAAR,CAAX;AACAC,QAAAA,KAAK,CAACE,cAAN;AACA;AACD,KAZF;AAaC,IAAA,GAAG,EAAGT,KAAK,CAACM,QAbb;AAcC,IAAA,GAAG,EAAGN,KAAK,CAACU,UAAN,CAAiBC,GAdxB;AAeC,IAAA,GAAG,EAAGX,KAAK,CAACU,UAAN,CAAiBE,GAfxB;AAgBC,IAAA,OAAO,EAAG;AAAEC,MAAAA,OAAO,EAAE;AAAX,KAhBX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CADD,EAMC;AACC,IAAA,KAAK,EAAG;AACPmB,MAAAA,OAAO,EAAE,aADF;AAEPC,MAAAA,QAAQ,EAAE,MAFH;AAGPC,MAAAA,GAAG,EAAE;AAHE;AADT,KAOC,4BAAC,qCAAD,QACG3B,cAAc,CAACU,GAAf,CAAsBC,KAAF,IAAa;AAClC,WAAO,4BAAC,KAAD;AAAO,MAAA,GAAG,EAAGA,KAAK,CAAClC,QAAnB;AAAA,SAAmCkC;AAAnC,MAAP;AACA,GAFC,CADH,CAPD,EAYGnB,WAAW,GACZ,4BAAC,mBAAD,OADY,GAGZ,4BAAC,kBAAD;AACC,IAAA,IAAI,EAAGoC,aADR;AAEC,IAAA,OAAO,EAAC,SAFT;AAGC,IAAA,OAAO,EAAGrB;AAHX,KAKG,cAAI,YAAJ,CALH,CAfF,CAND,CADD;AAiCA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tPanelBody,\n\tButton,\n\tSpinner,\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { upload } from '@wordpress/icons';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { useState } from '@wordpress/element';\nimport { isBlobURL } from '@wordpress/blob';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nfunction flattenBlocks( blocks ) {\n\tconst result = [];\n\n\tblocks.forEach( ( block ) => {\n\t\tresult.push( block );\n\t\tresult.push( ...flattenBlocks( block.innerBlocks ) );\n\t} );\n\n\treturn result;\n}\n\nfunction Image( block ) {\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\treturn (\n\t\t<motion.img\n\t\t\ttabIndex={ 0 }\n\t\t\trole=\"button\"\n\t\t\taria-label={ __( 'Select image block.' ) }\n\t\t\tonClick={ () => {\n\t\t\t\tselectBlock( block.clientId );\n\t\t\t} }\n\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\tif ( event.key === 'Enter' || event.key === ' ' ) {\n\t\t\t\t\tselectBlock( block.clientId );\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t} }\n\t\t\tkey={ block.clientId }\n\t\t\talt={ block.attributes.alt }\n\t\t\tsrc={ block.attributes.url }\n\t\t\tanimate={ { opacity: 1 } }\n\t\t\texit={ { opacity: 0, scale: 0 } }\n\t\t\tstyle={ {\n\t\t\t\twidth: '36px',\n\t\t\t\theight: '36px',\n\t\t\t\tobjectFit: 'cover',\n\t\t\t\tborderRadius: '2px',\n\t\t\t\tcursor: 'pointer',\n\t\t\t} }\n\t\t\twhileHover={ { scale: 1.08 } }\n\t\t/>\n\t);\n}\n\nexport default function PostFormatPanel() {\n\tconst [ isUploading, setIsUploading ] = useState( false );\n\tconst { editorBlocks, mediaUpload } = useSelect(\n\t\t( select ) => ( {\n\t\t\teditorBlocks: select( editorStore ).getEditorBlocks(),\n\t\t\tmediaUpload: select( blockEditorStore ).getSettings().mediaUpload,\n\t\t} ),\n\t\t[]\n\t);\n\tconst externalImages = flattenBlocks( editorBlocks ).filter(\n\t\t( block ) =>\n\t\t\tblock.name === 'core/image' &&\n\t\t\tblock.attributes.url &&\n\t\t\t! block.attributes.id\n\t);\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\n\tif ( ! mediaUpload || ! externalImages.length ) {\n\t\treturn null;\n\t}\n\n\tconst panelBodyTitle = [\n\t\t__( 'Suggestion:' ),\n\t\t<span className=\"editor-post-publish-panel__link\" key=\"label\">\n\t\t\t{ __( 'External media' ) }\n\t\t</span>,\n\t];\n\n\tfunction uploadImages() {\n\t\tsetIsUploading( true );\n\t\tPromise.all(\n\t\t\texternalImages.map( ( image ) =>\n\t\t\t\twindow\n\t\t\t\t\t.fetch(\n\t\t\t\t\t\timage.attributes.url.includes( '?' )\n\t\t\t\t\t\t\t? image.attributes.url\n\t\t\t\t\t\t\t: image.attributes.url + '?'\n\t\t\t\t\t)\n\t\t\t\t\t.then( ( response ) => response.blob() )\n\t\t\t\t\t.then(\n\t\t\t\t\t\t( blob ) =>\n\t\t\t\t\t\t\tnew Promise( ( resolve, reject ) => {\n\t\t\t\t\t\t\t\tmediaUpload( {\n\t\t\t\t\t\t\t\t\tfilesList: [ blob ],\n\t\t\t\t\t\t\t\t\tonFileChange: ( [ media ] ) => {\n\t\t\t\t\t\t\t\t\t\tif ( isBlobURL( media.url ) ) {\n\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tupdateBlockAttributes( image.clientId, {\n\t\t\t\t\t\t\t\t\t\t\tid: media.id,\n\t\t\t\t\t\t\t\t\t\t\turl: media.url,\n\t\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\t\tresolve();\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tonError() {\n\t\t\t\t\t\t\t\t\t\treject();\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} )\n\t\t\t\t\t)\n\t\t\t)\n\t\t).finally( () => {\n\t\t\tsetIsUploading( false );\n\t\t} );\n\t}\n\n\treturn (\n\t\t<PanelBody initialOpen={ true } title={ panelBodyTitle }>\n\t\t\t<p>\n\t\t\t\t{ __(\n\t\t\t\t\t'There are some external images in the post which can be uploaded to the media library. Images coming from different domains may not always display correctly, load slowly for visitors, or be removed unexpectedly.'\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<div\n\t\t\t\tstyle={ {\n\t\t\t\t\tdisplay: 'inline-flex',\n\t\t\t\t\tflexWrap: 'wrap',\n\t\t\t\t\tgap: '8px',\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<AnimatePresence>\n\t\t\t\t\t{ externalImages.map( ( image ) => {\n\t\t\t\t\t\treturn <Image key={ image.clientId } { ...image } />;\n\t\t\t\t\t} ) }\n\t\t\t\t</AnimatePresence>\n\t\t\t\t{ isUploading ? (\n\t\t\t\t\t<Spinner />\n\t\t\t\t) : (\n\t\t\t\t\t<Button\n\t\t\t\t\t\ticon={ upload }\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tonClick={ uploadImages }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Upload all' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</PanelBody>\n\t);\n}\n"]}
1
+ {"version":3,"names":["_element","require","_components","_data","_i18n","_icons","_blockEditor","_blob","_store","flattenBlocks","blocks","result","forEach","block","push","innerBlocks","Image","selectBlock","useDispatch","blockEditorStore","createElement","__unstableMotion","img","tabIndex","role","__","onClick","clientId","onKeyDown","event","key","preventDefault","alt","attributes","src","url","animate","opacity","exit","scale","style","width","height","objectFit","borderRadius","cursor","whileHover","PostFormatPanel","isUploading","setIsUploading","useState","editorBlocks","mediaUpload","useSelect","select","editorStore","getEditorBlocks","getSettings","externalImages","filter","name","id","updateBlockAttributes","length","panelBodyTitle","className","uploadImages","Promise","all","map","image","window","fetch","includes","then","response","blob","resolve","reject","filesList","onFileChange","media","isBlobURL","onError","finally","PanelBody","initialOpen","title","display","flexWrap","gap","__unstableAnimatePresence","Spinner","Button","icon","upload","variant"],"sources":["@wordpress/editor/src/components/post-publish-panel/maybe-upload-media.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tPanelBody,\n\tButton,\n\tSpinner,\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { upload } from '@wordpress/icons';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { useState } from '@wordpress/element';\nimport { isBlobURL } from '@wordpress/blob';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nfunction flattenBlocks( blocks ) {\n\tconst result = [];\n\n\tblocks.forEach( ( block ) => {\n\t\tresult.push( block );\n\t\tresult.push( ...flattenBlocks( block.innerBlocks ) );\n\t} );\n\n\treturn result;\n}\n\nfunction Image( block ) {\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\treturn (\n\t\t<motion.img\n\t\t\ttabIndex={ 0 }\n\t\t\trole=\"button\"\n\t\t\taria-label={ __( 'Select image block.' ) }\n\t\t\tonClick={ () => {\n\t\t\t\tselectBlock( block.clientId );\n\t\t\t} }\n\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\tif ( event.key === 'Enter' || event.key === ' ' ) {\n\t\t\t\t\tselectBlock( block.clientId );\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t} }\n\t\t\tkey={ block.clientId }\n\t\t\talt={ block.attributes.alt }\n\t\t\tsrc={ block.attributes.url }\n\t\t\tanimate={ { opacity: 1 } }\n\t\t\texit={ { opacity: 0, scale: 0 } }\n\t\t\tstyle={ {\n\t\t\t\twidth: '36px',\n\t\t\t\theight: '36px',\n\t\t\t\tobjectFit: 'cover',\n\t\t\t\tborderRadius: '2px',\n\t\t\t\tcursor: 'pointer',\n\t\t\t} }\n\t\t\twhileHover={ { scale: 1.08 } }\n\t\t/>\n\t);\n}\n\nexport default function PostFormatPanel() {\n\tconst [ isUploading, setIsUploading ] = useState( false );\n\tconst { editorBlocks, mediaUpload } = useSelect(\n\t\t( select ) => ( {\n\t\t\teditorBlocks: select( editorStore ).getEditorBlocks(),\n\t\t\tmediaUpload: select( blockEditorStore ).getSettings().mediaUpload,\n\t\t} ),\n\t\t[]\n\t);\n\tconst externalImages = flattenBlocks( editorBlocks ).filter(\n\t\t( block ) =>\n\t\t\tblock.name === 'core/image' &&\n\t\t\tblock.attributes.url &&\n\t\t\t! block.attributes.id\n\t);\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\n\tif ( ! mediaUpload || ! externalImages.length ) {\n\t\treturn null;\n\t}\n\n\tconst panelBodyTitle = [\n\t\t__( 'Suggestion:' ),\n\t\t<span className=\"editor-post-publish-panel__link\" key=\"label\">\n\t\t\t{ __( 'External media' ) }\n\t\t</span>,\n\t];\n\n\tfunction uploadImages() {\n\t\tsetIsUploading( true );\n\t\tPromise.all(\n\t\t\texternalImages.map( ( image ) =>\n\t\t\t\twindow\n\t\t\t\t\t.fetch(\n\t\t\t\t\t\timage.attributes.url.includes( '?' )\n\t\t\t\t\t\t\t? image.attributes.url\n\t\t\t\t\t\t\t: image.attributes.url + '?'\n\t\t\t\t\t)\n\t\t\t\t\t.then( ( response ) => response.blob() )\n\t\t\t\t\t.then(\n\t\t\t\t\t\t( blob ) =>\n\t\t\t\t\t\t\tnew Promise( ( resolve, reject ) => {\n\t\t\t\t\t\t\t\tmediaUpload( {\n\t\t\t\t\t\t\t\t\tfilesList: [ blob ],\n\t\t\t\t\t\t\t\t\tonFileChange: ( [ media ] ) => {\n\t\t\t\t\t\t\t\t\t\tif ( isBlobURL( media.url ) ) {\n\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tupdateBlockAttributes( image.clientId, {\n\t\t\t\t\t\t\t\t\t\t\tid: media.id,\n\t\t\t\t\t\t\t\t\t\t\turl: media.url,\n\t\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\t\tresolve();\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tonError() {\n\t\t\t\t\t\t\t\t\t\treject();\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} )\n\t\t\t\t\t)\n\t\t\t)\n\t\t).finally( () => {\n\t\t\tsetIsUploading( false );\n\t\t} );\n\t}\n\n\treturn (\n\t\t<PanelBody initialOpen={ true } title={ panelBodyTitle }>\n\t\t\t<p>\n\t\t\t\t{ __(\n\t\t\t\t\t'There are some external images in the post which can be uploaded to the media library. Images coming from different domains may not always display correctly, load slowly for visitors, or be removed unexpectedly.'\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<div\n\t\t\t\tstyle={ {\n\t\t\t\t\tdisplay: 'inline-flex',\n\t\t\t\t\tflexWrap: 'wrap',\n\t\t\t\t\tgap: '8px',\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<AnimatePresence>\n\t\t\t\t\t{ externalImages.map( ( image ) => {\n\t\t\t\t\t\treturn <Image key={ image.clientId } { ...image } />;\n\t\t\t\t\t} ) }\n\t\t\t\t</AnimatePresence>\n\t\t\t\t{ isUploading ? (\n\t\t\t\t\t<Spinner />\n\t\t\t\t) : (\n\t\t\t\t\t<Button\n\t\t\t\t\t\ticon={ upload }\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tonClick={ uploadImages }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Upload all' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</PanelBody>\n\t);\n}\n"],"mappings":";;;;;;AAcA,IAAAA,QAAA,GAAAC,OAAA;AAXA,IAAAC,WAAA,GAAAD,OAAA;AAOA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AAEA,IAAAM,KAAA,GAAAN,OAAA;AAKA,IAAAO,MAAA,GAAAP,OAAA;AApBA;AACA;AACA;;AAeA;AACA;AACA;;AAGA,SAASQ,aAAaA,CAAEC,MAAM,EAAG;EAChC,MAAMC,MAAM,GAAG,EAAE;EAEjBD,MAAM,CAACE,OAAO,CAAIC,KAAK,IAAM;IAC5BF,MAAM,CAACG,IAAI,CAAED,KAAM,CAAC;IACpBF,MAAM,CAACG,IAAI,CAAE,GAAGL,aAAa,CAAEI,KAAK,CAACE,WAAY,CAAE,CAAC;EACrD,CAAE,CAAC;EAEH,OAAOJ,MAAM;AACd;AAEA,SAASK,KAAKA,CAAEH,KAAK,EAAG;EACvB,MAAM;IAAEI;EAAY,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AE,CAAC,GAEX,IAAA5F,QAAA,CAAAoB,aAAA,EAAClB,WAAA,CAAA2F,MAAM;IACNC,IAAI,EAAGC,aAAQ;IACfC,OAAO,EAAC,SAAS;IACjBtE,OAAO,EAAGwC;EAAc,GAEtB,IAAAzC,QAAE,EAAE,YAAa,CACZ,CAEL,CACK,CAAC;AAEd"}
@@ -1,32 +1,20 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = void 0;
9
-
10
8
  var _element = require("@wordpress/element");
11
-
12
9
  var _components = require("@wordpress/components");
13
-
14
10
  var _i18n = require("@wordpress/i18n");
15
-
16
11
  var _data = require("@wordpress/data");
17
-
18
12
  var _url = require("@wordpress/url");
19
-
20
13
  var _htmlEntities = require("@wordpress/html-entities");
21
-
22
14
  var _compose = require("@wordpress/compose");
23
-
24
15
  var _coreData = require("@wordpress/core-data");
25
-
26
16
  var _label = _interopRequireDefault(require("../post-schedule/label"));
27
-
28
17
  var _store = require("../../store");
29
-
30
18
  /**
31
19
  * WordPress dependencies
32
20
  */
@@ -34,8 +22,10 @@ var _store = require("../../store");
34
22
  /**
35
23
  * Internal dependencies
36
24
  */
25
+
37
26
  const POSTNAME = '%postname%';
38
27
  const PAGENAME = '%pagename%';
28
+
39
29
  /**
40
30
  * Returns URL for a future post.
41
31
  *
@@ -48,18 +38,14 @@ const getFuturePostUrl = post => {
48
38
  const {
49
39
  slug
50
40
  } = post;
51
-
52
41
  if (post.permalink_template.includes(POSTNAME)) {
53
42
  return post.permalink_template.replace(POSTNAME, slug);
54
43
  }
55
-
56
44
  if (post.permalink_template.includes(PAGENAME)) {
57
45
  return post.permalink_template.replace(PAGENAME, slug);
58
46
  }
59
-
60
47
  return post.permalink_template;
61
48
  };
62
-
63
49
  function CopyButton({
64
50
  text,
65
51
  onCopy,
@@ -71,7 +57,6 @@ function CopyButton({
71
57
  ref: ref
72
58
  }, children);
73
59
  }
74
-
75
60
  class PostPublishPanelPostpublish extends _element.Component {
76
61
  constructor() {
77
62
  super(...arguments);
@@ -82,17 +67,14 @@ class PostPublishPanelPostpublish extends _element.Component {
82
67
  this.onSelectInput = this.onSelectInput.bind(this);
83
68
  this.postLink = (0, _element.createRef)();
84
69
  }
85
-
86
70
  componentDidMount() {
87
71
  if (this.props.focusOnMount) {
88
72
  this.postLink.current.focus();
89
73
  }
90
74
  }
91
-
92
75
  componentWillUnmount() {
93
76
  clearTimeout(this.dismissCopyConfirmation);
94
77
  }
95
-
96
78
  onCopy() {
97
79
  this.setState({
98
80
  showCopyConfirmation: true
@@ -104,11 +86,9 @@ class PostPublishPanelPostpublish extends _element.Component {
104
86
  });
105
87
  }, 4000);
106
88
  }
107
-
108
89
  onSelectInput(event) {
109
90
  event.target.select();
110
91
  }
111
-
112
92
  render() {
113
93
  const {
114
94
  children,
@@ -139,8 +119,7 @@ class PostPublishPanelPostpublish extends _element.Component {
139
119
  __nextHasNoMarginBottom: true,
140
120
  className: "post-publish-panel__postpublish-post-address",
141
121
  readOnly: true,
142
- label: (0, _i18n.sprintf)(
143
- /* translators: %s: post type singular name */
122
+ label: (0, _i18n.sprintf)( /* translators: %s: post type singular name */
144
123
  (0, _i18n.__)('%s address'), postLabel),
145
124
  value: (0, _url.safeDecodeURIComponent)(link),
146
125
  onFocus: this.onSelectInput
@@ -159,9 +138,7 @@ class PostPublishPanelPostpublish extends _element.Component {
159
138
  href: addLink
160
139
  }, addNewPostLabel))), children);
161
140
  }
162
-
163
141
  }
164
-
165
142
  var _default = (0, _data.withSelect)(select => {
166
143
  const {
167
144
  getEditedPostAttribute,
@@ -177,6 +154,5 @@ var _default = (0, _data.withSelect)(select => {
177
154
  isScheduled: isCurrentPostScheduled()
178
155
  };
179
156
  })(PostPublishPanelPostpublish);
180
-
181
157
  exports.default = _default;
182
158
  //# sourceMappingURL=postpublish.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/components/post-publish-panel/postpublish.js"],"names":["POSTNAME","PAGENAME","getFuturePostUrl","post","slug","permalink_template","includes","replace","CopyButton","text","onCopy","children","ref","PostPublishPanelPostpublish","Component","constructor","arguments","state","showCopyConfirmation","bind","onSelectInput","postLink","componentDidMount","props","focusOnMount","current","focus","componentWillUnmount","clearTimeout","dismissCopyConfirmation","setState","setTimeout","event","target","select","render","isScheduled","postType","postLabel","labels","singular_name","viewPostLabel","view_item","addNewPostLabel","add_new_item","link","status","addLink","post_type","type","postPublishNonLinkHeader","title","getEditedPostAttribute","getCurrentPost","isCurrentPostScheduled","editorStore","getPostType","coreStore"],"mappings":";;;;;;;;;AAKA;;AAFA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AAhBA;AACA;AACA;;AAUA;AACA;AACA;AAIA,MAAMA,QAAQ,GAAG,YAAjB;AACA,MAAMC,QAAQ,GAAG,YAAjB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMC,gBAAgB,GAAKC,IAAF,IAAY;AACpC,QAAM;AAAEC,IAAAA;AAAF,MAAWD,IAAjB;;AAEA,MAAKA,IAAI,CAACE,kBAAL,CAAwBC,QAAxB,CAAkCN,QAAlC,CAAL,EAAoD;AACnD,WAAOG,IAAI,CAACE,kBAAL,CAAwBE,OAAxB,CAAiCP,QAAjC,EAA2CI,IAA3C,CAAP;AACA;;AAED,MAAKD,IAAI,CAACE,kBAAL,CAAwBC,QAAxB,CAAkCL,QAAlC,CAAL,EAAoD;AACnD,WAAOE,IAAI,CAACE,kBAAL,CAAwBE,OAAxB,CAAiCN,QAAjC,EAA2CG,IAA3C,CAAP;AACA;;AAED,SAAOD,IAAI,CAACE,kBAAZ;AACA,CAZD;;AAcA,SAASG,UAAT,CAAqB;AAAEC,EAAAA,IAAF;AAAQC,EAAAA,MAAR;AAAgBC,EAAAA;AAAhB,CAArB,EAAkD;AACjD,QAAMC,GAAG,GAAG,iCAA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EAcC;AAAK,MAAA,SAAS,EAAC;AAAf,OACC,4BAAC,UAAD;AAAY,MAAA,IAAI,EAAGyB,IAAnB;AAA0B,MAAA,MAAM,EAAG,KAAKnC;AAAxC,OACG,KAAKO,KAAL,CAAWC,oBAAX,GACC,cAAI,SAAJ,CADD,GAEC,cAAI,MAAJ,CAHJ,CADD,CAdD,CAJD,EA2BC;AAAK,MAAA,SAAS,EAAC;AAAf,OACG,CAAEkB,WAAF,IACD,4BAAC,kBAAD;AAAQ,MAAA,OAAO,EAAC,SAAhB;AAA0B,MAAA,IAAI,EAAGS;AAAjC,OACGJ,aADH,CAFF,EAMC,4BAAC,kBAAD;AACC,MAAA,OAAO,EAAGL,WAAW,GAAG,SAAH,GAAe,WADrC;AAEC,MAAA,IAAI,EAAGW;AAFR,OAIGJ,eAJH,CAND,CA3BD,CAPD,EAgDGhC,QAhDH,CADD;AAoDA;;AA9GkD;;eAiHrC,sBAAcuB,MAAF,IAAc;AACxC,QAAM;AAAEkB,IAAAA,sBAAF;AAA0BC,IAAAA,cAA1B;AAA0CC,IAAAA;AAA1C,MACLpB,MAAM,CAAEqB,YAAF,CADP;AAEA,QAAM;AAAEC,IAAAA;AAAF,MAAkBtB,MAAM,CAAEuB,eAAF,CAA9B;AAEA,SAAO;AACNtD,IAAAA,IAAI,EAAEkD,cAAc,EADd;AAENhB,IAAAA,QAAQ,EAAEmB,WAAW,CAAEJ,sBAAsB,CAAE,MAAF,CAAxB,CAFf;AAGNhB,IAAAA,WAAW,EAAEkB,sBAAsB;AAH7B,GAAP;AAKA,CAVc,EAUVzC,2BAVU,C","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { PanelBody, Button, TextControl } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Component, createRef } from '@wordpress/element';\nimport { withSelect } from '@wordpress/data';\nimport { addQueryArgs, safeDecodeURIComponent } from '@wordpress/url';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport PostScheduleLabel from '../post-schedule/label';\nimport { store as editorStore } from '../../store';\n\nconst POSTNAME = '%postname%';\nconst PAGENAME = '%pagename%';\n\n/**\n * Returns URL for a future post.\n *\n * @param {Object} post Post object.\n *\n * @return {string} PostPublish URL.\n */\n\nconst getFuturePostUrl = ( post ) => {\n\tconst { slug } = post;\n\n\tif ( post.permalink_template.includes( POSTNAME ) ) {\n\t\treturn post.permalink_template.replace( POSTNAME, slug );\n\t}\n\n\tif ( post.permalink_template.includes( PAGENAME ) ) {\n\t\treturn post.permalink_template.replace( PAGENAME, slug );\n\t}\n\n\treturn post.permalink_template;\n};\n\nfunction CopyButton( { text, onCopy, children } ) {\n\tconst ref = useCopyToClipboard( text, onCopy );\n\treturn (\n\t\t<Button variant=\"secondary\" ref={ ref }>\n\t\t\t{ children }\n\t\t</Button>\n\t);\n}\n\nclass PostPublishPanelPostpublish extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.state = {\n\t\t\tshowCopyConfirmation: false,\n\t\t};\n\t\tthis.onCopy = this.onCopy.bind( this );\n\t\tthis.onSelectInput = this.onSelectInput.bind( this );\n\t\tthis.postLink = createRef();\n\t}\n\n\tcomponentDidMount() {\n\t\tif ( this.props.focusOnMount ) {\n\t\t\tthis.postLink.current.focus();\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tclearTimeout( this.dismissCopyConfirmation );\n\t}\n\n\tonCopy() {\n\t\tthis.setState( {\n\t\t\tshowCopyConfirmation: true,\n\t\t} );\n\n\t\tclearTimeout( this.dismissCopyConfirmation );\n\t\tthis.dismissCopyConfirmation = setTimeout( () => {\n\t\t\tthis.setState( {\n\t\t\t\tshowCopyConfirmation: false,\n\t\t\t} );\n\t\t}, 4000 );\n\t}\n\n\tonSelectInput( event ) {\n\t\tevent.target.select();\n\t}\n\n\trender() {\n\t\tconst { children, isScheduled, post, postType } = this.props;\n\t\tconst postLabel = postType?.labels?.singular_name;\n\t\tconst viewPostLabel = postType?.labels?.view_item;\n\t\tconst addNewPostLabel = postType?.labels?.add_new_item;\n\t\tconst link =\n\t\t\tpost.status === 'future' ? getFuturePostUrl( post ) : post.link;\n\t\tconst addLink = addQueryArgs( 'post-new.php', {\n\t\t\tpost_type: post.type,\n\t\t} );\n\n\t\tconst postPublishNonLinkHeader = isScheduled ? (\n\t\t\t<>\n\t\t\t\t{ __( 'is now scheduled. It will go live on' ) }{ ' ' }\n\t\t\t\t<PostScheduleLabel />.\n\t\t\t</>\n\t\t) : (\n\t\t\t__( 'is now live.' )\n\t\t);\n\n\t\treturn (\n\t\t\t<div className=\"post-publish-panel__postpublish\">\n\t\t\t\t<PanelBody className=\"post-publish-panel__postpublish-header\">\n\t\t\t\t\t<a ref={ this.postLink } href={ link }>\n\t\t\t\t\t\t{ decodeEntities( post.title ) || __( '(no title)' ) }\n\t\t\t\t\t</a>{ ' ' }\n\t\t\t\t\t{ postPublishNonLinkHeader }\n\t\t\t\t</PanelBody>\n\t\t\t\t<PanelBody>\n\t\t\t\t\t<p className=\"post-publish-panel__postpublish-subheader\">\n\t\t\t\t\t\t<strong>{ __( 'What’s next?' ) }</strong>\n\t\t\t\t\t</p>\n\t\t\t\t\t<div className=\"post-publish-panel__postpublish-post-address-container\">\n\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tclassName=\"post-publish-panel__postpublish-post-address\"\n\t\t\t\t\t\t\treadOnly\n\t\t\t\t\t\t\tlabel={ sprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: post type singular name */\n\t\t\t\t\t\t\t\t__( '%s address' ),\n\t\t\t\t\t\t\t\tpostLabel\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tvalue={ safeDecodeURIComponent( link ) }\n\t\t\t\t\t\t\tonFocus={ this.onSelectInput }\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<div className=\"post-publish-panel__postpublish-post-address__copy-button-wrap\">\n\t\t\t\t\t\t\t<CopyButton text={ link } onCopy={ this.onCopy }>\n\t\t\t\t\t\t\t\t{ this.state.showCopyConfirmation\n\t\t\t\t\t\t\t\t\t? __( 'Copied!' )\n\t\t\t\t\t\t\t\t\t: __( 'Copy' ) }\n\t\t\t\t\t\t\t</CopyButton>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div className=\"post-publish-panel__postpublish-buttons\">\n\t\t\t\t\t\t{ ! isScheduled && (\n\t\t\t\t\t\t\t<Button variant=\"primary\" href={ link }>\n\t\t\t\t\t\t\t\t{ viewPostLabel }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant={ isScheduled ? 'primary' : 'secondary' }\n\t\t\t\t\t\t\thref={ addLink }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ addNewPostLabel }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t</PanelBody>\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nexport default withSelect( ( select ) => {\n\tconst { getEditedPostAttribute, getCurrentPost, isCurrentPostScheduled } =\n\t\tselect( editorStore );\n\tconst { getPostType } = select( coreStore );\n\n\treturn {\n\t\tpost: getCurrentPost(),\n\t\tpostType: getPostType( getEditedPostAttribute( 'type' ) ),\n\t\tisScheduled: isCurrentPostScheduled(),\n\t};\n} )( PostPublishPanelPostpublish );\n"]}
1
+ {"version":3,"names":["_element","require","_components","_i18n","_data","_url","_htmlEntities","_compose","_coreData","_label","_interopRequireDefault","_store","POSTNAME","PAGENAME","getFuturePostUrl","post","slug","permalink_template","includes","replace","CopyButton","text","onCopy","children","ref","useCopyToClipboard","createElement","Button","variant","PostPublishPanelPostpublish","Component","constructor","arguments","state","showCopyConfirmation","bind","onSelectInput","postLink","createRef","componentDidMount","props","focusOnMount","current","focus","componentWillUnmount","clearTimeout","dismissCopyConfirmation","setState","setTimeout","event","target","select","render","isScheduled","postType","postLabel","labels","singular_name","viewPostLabel","view_item","addNewPostLabel","add_new_item","link","status","addLink","addQueryArgs","post_type","type","postPublishNonLinkHeader","Fragment","__","default","className","PanelBody","href","decodeEntities","title","TextControl","__nextHasNoMarginBottom","readOnly","label","sprintf","value","safeDecodeURIComponent","onFocus","_default","withSelect","getEditedPostAttribute","getCurrentPost","isCurrentPostScheduled","editorStore","getPostType","coreStore","exports"],"sources":["@wordpress/editor/src/components/post-publish-panel/postpublish.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { PanelBody, Button, TextControl } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Component, createRef } from '@wordpress/element';\nimport { withSelect } from '@wordpress/data';\nimport { addQueryArgs, safeDecodeURIComponent } from '@wordpress/url';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport PostScheduleLabel from '../post-schedule/label';\nimport { store as editorStore } from '../../store';\n\nconst POSTNAME = '%postname%';\nconst PAGENAME = '%pagename%';\n\n/**\n * Returns URL for a future post.\n *\n * @param {Object} post Post object.\n *\n * @return {string} PostPublish URL.\n */\n\nconst getFuturePostUrl = ( post ) => {\n\tconst { slug } = post;\n\n\tif ( post.permalink_template.includes( POSTNAME ) ) {\n\t\treturn post.permalink_template.replace( POSTNAME, slug );\n\t}\n\n\tif ( post.permalink_template.includes( PAGENAME ) ) {\n\t\treturn post.permalink_template.replace( PAGENAME, slug );\n\t}\n\n\treturn post.permalink_template;\n};\n\nfunction CopyButton( { text, onCopy, children } ) {\n\tconst ref = useCopyToClipboard( text, onCopy );\n\treturn (\n\t\t<Button variant=\"secondary\" ref={ ref }>\n\t\t\t{ children }\n\t\t</Button>\n\t);\n}\n\nclass PostPublishPanelPostpublish extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.state = {\n\t\t\tshowCopyConfirmation: false,\n\t\t};\n\t\tthis.onCopy = this.onCopy.bind( this );\n\t\tthis.onSelectInput = this.onSelectInput.bind( this );\n\t\tthis.postLink = createRef();\n\t}\n\n\tcomponentDidMount() {\n\t\tif ( this.props.focusOnMount ) {\n\t\t\tthis.postLink.current.focus();\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tclearTimeout( this.dismissCopyConfirmation );\n\t}\n\n\tonCopy() {\n\t\tthis.setState( {\n\t\t\tshowCopyConfirmation: true,\n\t\t} );\n\n\t\tclearTimeout( this.dismissCopyConfirmation );\n\t\tthis.dismissCopyConfirmation = setTimeout( () => {\n\t\t\tthis.setState( {\n\t\t\t\tshowCopyConfirmation: false,\n\t\t\t} );\n\t\t}, 4000 );\n\t}\n\n\tonSelectInput( event ) {\n\t\tevent.target.select();\n\t}\n\n\trender() {\n\t\tconst { children, isScheduled, post, postType } = this.props;\n\t\tconst postLabel = postType?.labels?.singular_name;\n\t\tconst viewPostLabel = postType?.labels?.view_item;\n\t\tconst addNewPostLabel = postType?.labels?.add_new_item;\n\t\tconst link =\n\t\t\tpost.status === 'future' ? getFuturePostUrl( post ) : post.link;\n\t\tconst addLink = addQueryArgs( 'post-new.php', {\n\t\t\tpost_type: post.type,\n\t\t} );\n\n\t\tconst postPublishNonLinkHeader = isScheduled ? (\n\t\t\t<>\n\t\t\t\t{ __( 'is now scheduled. It will go live on' ) }{ ' ' }\n\t\t\t\t<PostScheduleLabel />.\n\t\t\t</>\n\t\t) : (\n\t\t\t__( 'is now live.' )\n\t\t);\n\n\t\treturn (\n\t\t\t<div className=\"post-publish-panel__postpublish\">\n\t\t\t\t<PanelBody className=\"post-publish-panel__postpublish-header\">\n\t\t\t\t\t<a ref={ this.postLink } href={ link }>\n\t\t\t\t\t\t{ decodeEntities( post.title ) || __( '(no title)' ) }\n\t\t\t\t\t</a>{ ' ' }\n\t\t\t\t\t{ postPublishNonLinkHeader }\n\t\t\t\t</PanelBody>\n\t\t\t\t<PanelBody>\n\t\t\t\t\t<p className=\"post-publish-panel__postpublish-subheader\">\n\t\t\t\t\t\t<strong>{ __( 'What’s next?' ) }</strong>\n\t\t\t\t\t</p>\n\t\t\t\t\t<div className=\"post-publish-panel__postpublish-post-address-container\">\n\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tclassName=\"post-publish-panel__postpublish-post-address\"\n\t\t\t\t\t\t\treadOnly\n\t\t\t\t\t\t\tlabel={ sprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: post type singular name */\n\t\t\t\t\t\t\t\t__( '%s address' ),\n\t\t\t\t\t\t\t\tpostLabel\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tvalue={ safeDecodeURIComponent( link ) }\n\t\t\t\t\t\t\tonFocus={ this.onSelectInput }\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<div className=\"post-publish-panel__postpublish-post-address__copy-button-wrap\">\n\t\t\t\t\t\t\t<CopyButton text={ link } onCopy={ this.onCopy }>\n\t\t\t\t\t\t\t\t{ this.state.showCopyConfirmation\n\t\t\t\t\t\t\t\t\t? __( 'Copied!' )\n\t\t\t\t\t\t\t\t\t: __( 'Copy' ) }\n\t\t\t\t\t\t\t</CopyButton>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div className=\"post-publish-panel__postpublish-buttons\">\n\t\t\t\t\t\t{ ! isScheduled && (\n\t\t\t\t\t\t\t<Button variant=\"primary\" href={ link }>\n\t\t\t\t\t\t\t\t{ viewPostLabel }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant={ isScheduled ? 'primary' : 'secondary' }\n\t\t\t\t\t\t\thref={ addLink }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ addNewPostLabel }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t</PanelBody>\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nexport default withSelect( ( select ) => {\n\tconst { getEditedPostAttribute, getCurrentPost, isCurrentPostScheduled } =\n\t\tselect( editorStore );\n\tconst { getPostType } = select( coreStore );\n\n\treturn {\n\t\tpost: getCurrentPost(),\n\t\tpostType: getPostType( getEditedPostAttribute( 'type' ) ),\n\t\tisScheduled: isCurrentPostScheduled(),\n\t};\n} )( PostPublishPanelPostpublish );\n"],"mappings":";;;;;;;AAKA,IAAAA,QAAA,GAAAC,OAAA;AAFA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAEA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,IAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AAKA,IAAAQ,MAAA,GAAAC,sBAAA,CAAAT,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AAhBA;AACA;AACA;;AAUA;AACA;AACA;;AAIA,MAAMW,QAAQ,GAAG,YAAY;AAC7B,MAAMC,QAAQ,GAAG,YAAY;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMC,gBAAgB,GAAKC,IAAI,IAAM;EACpC,MAAM;IAAEC;EAAK,CAAC,GAAGD,IAAI;EAErB,IAAKA,IAAI,CAACE,kBAAkB,CAACC,QAAQ,CAAEN,QAAS,CAAC,EAAG;IACnD,OAAOG,IAAI,CAACE,kBAAkB,CAACE,OAAO,CAAEP,QAAQ,EAAEI,IAAK,CAAC;EACzD;EAEA,IAAKD,IAAI,CAACE,kBAAkB,CAACC,QAAQ,CAAEL,QAAS,CAAC,EAAG;IACnD,OAAOE,IAAI,CAACE,kBAAkB,CAACE,OAAO,CAAEN,QAAQ,EAAEG,IAAK,CAAC;EACzD;EAEA,OAAO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A,CAAAyB,MAAM;MACNC,OAAO,EAAGyB,WAAW,GAAG,SAAS,GAAG,WAAa;MACjDqB,IAAI,EAAGV;IAAS,GAEdJ,eACK,CACJ,CACK,CAAC,EACVrC,QACE,CAAC;EAER;AACD;AAAC,IAAA8D,QAAA,GAEc,IAAAC,gBAAU,EAAInC,MAAM,IAAM;EACxC,MAAM;IAAEoC,sBAAsB;IAAEC,cAAc;IAAEC;EAAuB,CAAC,GACvEtC,MAAM,CAAEuC,YAAY,CAAC;EACtB,MAAM;IAAEC;EAAY,CAAC,GAAGxC,MAAM,CAAEyC,eAAU,CAAC;EAE3C,OAAO;IACN7E,IAAI,EAAEyE,cAAc,CAAC,CAAC;IACtBlC,QAAQ,EAAEqC,WAAW,CAAEJ,sBAAsB,CAAE,MAAO,CAAE,CAAC;IACzDlC,WAAW,EAAEoC,sBAAsB,CAAC;EACrC,CAAC;AACF,CAAE,CAAC,CAAE5D,2BAA4B,CAAC;AAAAgE,OAAA,CAAAtB,OAAA,GAAAc,QAAA"}
@@ -1,46 +1,27 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = void 0;
9
-
10
8
  var _element = require("@wordpress/element");
11
-
12
9
  var _i18n = require("@wordpress/i18n");
13
-
14
10
  var _components = require("@wordpress/components");
15
-
16
11
  var _data = require("@wordpress/data");
17
-
18
12
  var _icons = require("@wordpress/icons");
19
-
20
13
  var _url = require("@wordpress/url");
21
-
22
14
  var _coreData = require("@wordpress/core-data");
23
-
24
15
  var _htmlEntities = require("@wordpress/html-entities");
25
-
26
16
  var _postVisibility = _interopRequireDefault(require("../post-visibility"));
27
-
28
17
  var _label = _interopRequireDefault(require("../post-visibility/label"));
29
-
30
18
  var _postSchedule = _interopRequireDefault(require("../post-schedule"));
31
-
32
19
  var _label2 = _interopRequireDefault(require("../post-schedule/label"));
33
-
34
20
  var _maybeTagsPanel = _interopRequireDefault(require("./maybe-tags-panel"));
35
-
36
21
  var _maybePostFormatPanel = _interopRequireDefault(require("./maybe-post-format-panel"));
37
-
38
22
  var _store = require("../../store");
39
-
40
23
  var _maybeCategoryPanel = _interopRequireDefault(require("./maybe-category-panel"));
41
-
42
24
  var _maybeUploadMedia = _interopRequireDefault(require("./maybe-upload-media"));
43
-
44
25
  /**
45
26
  * WordPress dependencies
46
27
  */
@@ -48,6 +29,7 @@ var _maybeUploadMedia = _interopRequireDefault(require("./maybe-upload-media"));
48
29
  /**
49
30
  * Internal dependencies
50
31
  */
32
+
51
33
  function PostPublishPanelPrepublish({
52
34
  children
53
35
  }) {
@@ -60,7 +42,6 @@ function PostPublishPanelPrepublish({
60
42
  siteHome
61
43
  } = (0, _data.useSelect)(select => {
62
44
  var _getCurrentPost$_link;
63
-
64
45
  const {
65
46
  getCurrentPost,
66
47
  isEditedPostBeingScheduled
@@ -84,7 +65,6 @@ function PostPublishPanelPrepublish({
84
65
  size: "36px",
85
66
  icon: _icons.wordpress
86
67
  });
87
-
88
68
  if (siteIconUrl) {
89
69
  siteIcon = (0, _element.createElement)("img", {
90
70
  alt: (0, _i18n.__)('Site Icon'),
@@ -92,13 +72,10 @@ function PostPublishPanelPrepublish({
92
72
  src: siteIconUrl
93
73
  });
94
74
  }
95
-
96
75
  if (isRequestingSiteIcon) {
97
76
  siteIcon = null;
98
77
  }
99
-
100
78
  let prePublishTitle, prePublishBodyText;
101
-
102
79
  if (!hasPublishAction) {
103
80
  prePublishTitle = (0, _i18n.__)('Are you ready to submit for review?');
104
81
  prePublishBodyText = (0, _i18n.__)('When you’re ready, submit your work for review, and an Editor will be able to approve it for you.');
@@ -109,7 +86,6 @@ function PostPublishPanelPrepublish({
109
86
  prePublishTitle = (0, _i18n.__)('Are you ready to publish?');
110
87
  prePublishBodyText = (0, _i18n.__)('Double-check your settings before publishing.');
111
88
  }
112
-
113
89
  return (0, _element.createElement)("div", {
114
90
  className: "editor-post-publish-panel__prepublish"
115
91
  }, (0, _element.createElement)("div", null, (0, _element.createElement)("strong", null, prePublishTitle)), (0, _element.createElement)("p", null, prePublishBodyText), (0, _element.createElement)("div", {
@@ -134,7 +110,6 @@ function PostPublishPanelPrepublish({
134
110
  }, (0, _element.createElement)(_label2.default, null))]
135
111
  }, (0, _element.createElement)(_postSchedule.default, null))), (0, _element.createElement)(_maybePostFormatPanel.default, null), (0, _element.createElement)(_maybeTagsPanel.default, null), (0, _element.createElement)(_maybeCategoryPanel.default, null), children);
136
112
  }
137
-
138
113
  var _default = PostPublishPanelPrepublish;
139
114
  exports.default = _default;
140
115
  //# sourceMappingURL=prepublish.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/components/post-publish-panel/prepublish.js"],"names":["PostPublishPanelPrepublish","children","isBeingScheduled","isRequestingSiteIcon","hasPublishAction","siteIconUrl","siteTitle","siteHome","select","getCurrentPost","isEditedPostBeingScheduled","editorStore","getEntityRecord","isResolving","coreStore","siteData","undefined","_links","site_icon_url","name","home","siteIcon","wordpress","prePublishTitle","prePublishBodyText"],"mappings":";;;;;;;;;;;AAGA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAtBA;AACA;AACA;;AASA;AACA;AACA;AAWA,SAASA,0BAAT,CAAqC;AAAEC,EAAAA;AAAF,CAArC,EAAoD;AACnD,QAAM;AACLC,IAAAA,gBADK;AAELC,IAAAA,oBAFK;AAGLC,IAAAA,gBAHK;AAILC,IAAAA,WAJK;AAKLC,IAAAA,SALK;AAMLC,IAAAA;AANK,MAOF,qBAAaC,MAAF,IAAc;AAAA;;AAC5B,UAAM;AAAEC,MAAAA,cAAF;AAAkBC,MAAAA;AAAlB,QACLF,MAAM,CAAEG,YAAF,CADP;AAEA,UAAM;AAAEC,MAAAA,eAAF;AAAmBC,MAAAA;AAAnB,QAAmCL,MAAM,CAAEM,eAAF,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,IAAAA,kBAAkB,GAAG,cACpB,6DADoB,CAArB;AAGA,GALM,MAKA;AACND,IAAAA,eAAe,GAAG,cAAI,2BAAJ,CAAlB;AACAC,IAAAA,kBAAkB,GAAG,cACpB,+CADoB,CAArB;AAGA;;AAED,SACC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC,yCACC,4CAAUD,eAAV,CADD,CADD,EAIC,uCAAKC,kBAAL,CAJD,EAKC;AAAK,IAAA,SAAS,EAAC;AAAf,KACGH,QADH,EAEC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC;AAAM,IAAA,SAAS,EAAC;AAAhB,KACG,kCAAgBf,SAAhB,KAA+B,cAAI,YAAJ,CADlC,CADD,EAIC;AAAM,IAAA,SAAS,EAAC;AAAhB,KAAyCC,QAAzC,CAJD,CAFD,CALD,EAcC,4BAAC,yBAAD,OAdD,EAeGH,gBAAgB,IACjB,qDACC,4BAAC,qBAAD;AACC,IAAA,WAAW,EAAG,KADf;AAEC,IAAA,KAAK,EAAG,CACP,cAAI,aAAJ,CADO,EAEP;AACC,MAAA,SAAS,EAAC,iCADX;AAEC,MAAA,GAAG,EAAC;AAFL,OAIC,4BAAC,cAAD,OAJD,CAFO;AAFT,KAYC,4BAAC,uBAAD,OAZD,CADD,EAeC,4BAAC,qBAAD;AACC,IAAA,WAAW,EAAG,KADf;AAEC,IAAA,KAAK,EAAG,CACP,cAAI,UAAJ,CADO,EAEP;AACC,MAAA,SAAS,EAAC,iCADX;AAEC,MAAA,GAAG,EAAC;AAFL,OAIC,4BAAC,eAAD,OAJD,CAFO;AAFT,KAYC,4BAAC,qBAAD,OAZD,CAfD,CAhBF,EA+CC,4BAAC,6BAAD,OA/CD,EAgDC,4BAAC,uBAAD,OAhDD,EAiDC,4BAAC,2BAAD,OAjDD,EAkDGH,QAlDH,CADD;AAsDA;;eAEcD,0B","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Icon, PanelBody } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { wordpress } from '@wordpress/icons';\nimport { filterURLForDisplay } from '@wordpress/url';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport PostVisibility from '../post-visibility';\nimport PostVisibilityLabel from '../post-visibility/label';\nimport PostSchedule from '../post-schedule';\nimport PostScheduleLabel from '../post-schedule/label';\nimport MaybeTagsPanel from './maybe-tags-panel';\nimport MaybePostFormatPanel from './maybe-post-format-panel';\nimport { store as editorStore } from '../../store';\nimport MaybeCategoryPanel from './maybe-category-panel';\nimport MaybeUploadMedia from './maybe-upload-media';\n\nfunction PostPublishPanelPrepublish( { children } ) {\n\tconst {\n\t\tisBeingScheduled,\n\t\tisRequestingSiteIcon,\n\t\thasPublishAction,\n\t\tsiteIconUrl,\n\t\tsiteTitle,\n\t\tsiteHome,\n\t} = useSelect( ( select ) => {\n\t\tconst { getCurrentPost, isEditedPostBeingScheduled } =\n\t\t\tselect( editorStore );\n\t\tconst { getEntityRecord, isResolving } = select( coreStore );\n\t\tconst siteData =\n\t\t\tgetEntityRecord( 'root', '__unstableBase', undefined ) || {};\n\n\t\treturn {\n\t\t\thasPublishAction:\n\t\t\t\tgetCurrentPost()._links?.[ 'wp:action-publish' ] ?? false,\n\t\t\tisBeingScheduled: isEditedPostBeingScheduled(),\n\t\t\tisRequestingSiteIcon: isResolving( 'getEntityRecord', [\n\t\t\t\t'root',\n\t\t\t\t'__unstableBase',\n\t\t\t\tundefined,\n\t\t\t] ),\n\t\t\tsiteIconUrl: siteData.site_icon_url,\n\t\t\tsiteTitle: siteData.name,\n\t\t\tsiteHome: siteData.home && filterURLForDisplay( siteData.home ),\n\t\t};\n\t}, [] );\n\n\tlet siteIcon = (\n\t\t<Icon className=\"components-site-icon\" size=\"36px\" icon={ wordpress } />\n\t);\n\n\tif ( siteIconUrl ) {\n\t\tsiteIcon = (\n\t\t\t<img\n\t\t\t\talt={ __( 'Site Icon' ) }\n\t\t\t\tclassName=\"components-site-icon\"\n\t\t\t\tsrc={ siteIconUrl }\n\t\t\t/>\n\t\t);\n\t}\n\n\tif ( isRequestingSiteIcon ) {\n\t\tsiteIcon = null;\n\t}\n\n\tlet prePublishTitle, prePublishBodyText;\n\n\tif ( ! hasPublishAction ) {\n\t\tprePublishTitle = __( 'Are you ready to submit for review?' );\n\t\tprePublishBodyText = __(\n\t\t\t'When you’re ready, submit your work for review, and an Editor will be able to approve it for you.'\n\t\t);\n\t} else if ( isBeingScheduled ) {\n\t\tprePublishTitle = __( 'Are you ready to schedule?' );\n\t\tprePublishBodyText = __(\n\t\t\t'Your work will be published at the specified date and time.'\n\t\t);\n\t} else {\n\t\tprePublishTitle = __( 'Are you ready to publish?' );\n\t\tprePublishBodyText = __(\n\t\t\t'Double-check your settings before publishing.'\n\t\t);\n\t}\n\n\treturn (\n\t\t<div className=\"editor-post-publish-panel__prepublish\">\n\t\t\t<div>\n\t\t\t\t<strong>{ prePublishTitle }</strong>\n\t\t\t</div>\n\t\t\t<p>{ prePublishBodyText }</p>\n\t\t\t<div className=\"components-site-card\">\n\t\t\t\t{ siteIcon }\n\t\t\t\t<div className=\"components-site-info\">\n\t\t\t\t\t<span className=\"components-site-name\">\n\t\t\t\t\t\t{ decodeEntities( siteTitle ) || __( '(Untitled)' ) }\n\t\t\t\t\t</span>\n\t\t\t\t\t<span className=\"components-site-home\">{ siteHome }</span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<MaybeUploadMedia />\n\t\t\t{ hasPublishAction && (\n\t\t\t\t<>\n\t\t\t\t\t<PanelBody\n\t\t\t\t\t\tinitialOpen={ false }\n\t\t\t\t\t\ttitle={ [\n\t\t\t\t\t\t\t__( 'Visibility:' ),\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclassName=\"editor-post-publish-panel__link\"\n\t\t\t\t\t\t\t\tkey=\"label\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<PostVisibilityLabel />\n\t\t\t\t\t\t\t</span>,\n\t\t\t\t\t\t] }\n\t\t\t\t\t>\n\t\t\t\t\t\t<PostVisibility />\n\t\t\t\t\t</PanelBody>\n\t\t\t\t\t<PanelBody\n\t\t\t\t\t\tinitialOpen={ false }\n\t\t\t\t\t\ttitle={ [\n\t\t\t\t\t\t\t__( 'Publish:' ),\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclassName=\"editor-post-publish-panel__link\"\n\t\t\t\t\t\t\t\tkey=\"label\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<PostScheduleLabel />\n\t\t\t\t\t\t\t</span>,\n\t\t\t\t\t\t] }\n\t\t\t\t\t>\n\t\t\t\t\t\t<PostSchedule />\n\t\t\t\t\t</PanelBody>\n\t\t\t\t</>\n\t\t\t) }\n\t\t\t<MaybePostFormatPanel />\n\t\t\t<MaybeTagsPanel />\n\t\t\t<MaybeCategoryPanel />\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\nexport default PostPublishPanelPrepublish;\n"]}
1
+ {"version":3,"names":["_i18n","require","_components","_data","_icons","_url","_coreData","_htmlEntities","_postVisibility","_interopRequireDefault","_label","_postSchedule","_label2","_maybeTagsPanel","_maybePostFormatPanel","_store","_maybeCategoryPanel","_maybeUploadMedia","PostPublishPanelPrepublish","children","isBeingScheduled","isRequestingSiteIcon","hasPublishAction","siteIconUrl","siteTitle","siteHome","useSelect","select","_getCurrentPost$_link","getCurrentPost","isEditedPostBeingScheduled","editorStore","getEntityRecord","isResolving","coreStore","siteData","undefined","_links","site_icon_url","name","home","filterURLForDisplay","siteIcon","_element","createElement","Icon","className","size","icon","wordpress","alt","__","src","prePublishTitle","prePublishBodyText","decodeEntities","default","Fragment","PanelBody","initialOpen","title","key","_default","exports"],"sources":["@wordpress/editor/src/components/post-publish-panel/prepublish.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Icon, PanelBody } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { wordpress } from '@wordpress/icons';\nimport { filterURLForDisplay } from '@wordpress/url';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport PostVisibility from '../post-visibility';\nimport PostVisibilityLabel from '../post-visibility/label';\nimport PostSchedule from '../post-schedule';\nimport PostScheduleLabel from '../post-schedule/label';\nimport MaybeTagsPanel from './maybe-tags-panel';\nimport MaybePostFormatPanel from './maybe-post-format-panel';\nimport { store as editorStore } from '../../store';\nimport MaybeCategoryPanel from './maybe-category-panel';\nimport MaybeUploadMedia from './maybe-upload-media';\n\nfunction PostPublishPanelPrepublish( { children } ) {\n\tconst {\n\t\tisBeingScheduled,\n\t\tisRequestingSiteIcon,\n\t\thasPublishAction,\n\t\tsiteIconUrl,\n\t\tsiteTitle,\n\t\tsiteHome,\n\t} = useSelect( ( select ) => {\n\t\tconst { getCurrentPost, isEditedPostBeingScheduled } =\n\t\t\tselect( editorStore );\n\t\tconst { getEntityRecord, isResolving } = select( coreStore );\n\t\tconst siteData =\n\t\t\tgetEntityRecord( 'root', '__unstableBase', undefined ) || {};\n\n\t\treturn {\n\t\t\thasPublishAction:\n\t\t\t\tgetCurrentPost()._links?.[ 'wp:action-publish' ] ?? false,\n\t\t\tisBeingScheduled: isEditedPostBeingScheduled(),\n\t\t\tisRequestingSiteIcon: isResolving( 'getEntityRecord', [\n\t\t\t\t'root',\n\t\t\t\t'__unstableBase',\n\t\t\t\tundefined,\n\t\t\t] ),\n\t\t\tsiteIconUrl: siteData.site_icon_url,\n\t\t\tsiteTitle: siteData.name,\n\t\t\tsiteHome: siteData.home && filterURLForDisplay( siteData.home ),\n\t\t};\n\t}, [] );\n\n\tlet siteIcon = (\n\t\t<Icon className=\"components-site-icon\" size=\"36px\" icon={ wordpress } />\n\t);\n\n\tif ( siteIconUrl ) {\n\t\tsiteIcon = (\n\t\t\t<img\n\t\t\t\talt={ __( 'Site Icon' ) }\n\t\t\t\tclassName=\"components-site-icon\"\n\t\t\t\tsrc={ siteIconUrl }\n\t\t\t/>\n\t\t);\n\t}\n\n\tif ( isRequestingSiteIcon ) {\n\t\tsiteIcon = null;\n\t}\n\n\tlet prePublishTitle, prePublishBodyText;\n\n\tif ( ! hasPublishAction ) {\n\t\tprePublishTitle = __( 'Are you ready to submit for review?' );\n\t\tprePublishBodyText = __(\n\t\t\t'When you’re ready, submit your work for review, and an Editor will be able to approve it for you.'\n\t\t);\n\t} else if ( isBeingScheduled ) {\n\t\tprePublishTitle = __( 'Are you ready to schedule?' );\n\t\tprePublishBodyText = __(\n\t\t\t'Your work will be published at the specified date and time.'\n\t\t);\n\t} else {\n\t\tprePublishTitle = __( 'Are you ready to publish?' );\n\t\tprePublishBodyText = __(\n\t\t\t'Double-check your settings before publishing.'\n\t\t);\n\t}\n\n\treturn (\n\t\t<div className=\"editor-post-publish-panel__prepublish\">\n\t\t\t<div>\n\t\t\t\t<strong>{ prePublishTitle }</strong>\n\t\t\t</div>\n\t\t\t<p>{ prePublishBodyText }</p>\n\t\t\t<div className=\"components-site-card\">\n\t\t\t\t{ siteIcon }\n\t\t\t\t<div className=\"components-site-info\">\n\t\t\t\t\t<span className=\"components-site-name\">\n\t\t\t\t\t\t{ decodeEntities( siteTitle ) || __( '(Untitled)' ) }\n\t\t\t\t\t</span>\n\t\t\t\t\t<span className=\"components-site-home\">{ siteHome }</span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<MaybeUploadMedia />\n\t\t\t{ hasPublishAction && (\n\t\t\t\t<>\n\t\t\t\t\t<PanelBody\n\t\t\t\t\t\tinitialOpen={ false }\n\t\t\t\t\t\ttitle={ [\n\t\t\t\t\t\t\t__( 'Visibility:' ),\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclassName=\"editor-post-publish-panel__link\"\n\t\t\t\t\t\t\t\tkey=\"label\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<PostVisibilityLabel />\n\t\t\t\t\t\t\t</span>,\n\t\t\t\t\t\t] }\n\t\t\t\t\t>\n\t\t\t\t\t\t<PostVisibility />\n\t\t\t\t\t</PanelBody>\n\t\t\t\t\t<PanelBody\n\t\t\t\t\t\tinitialOpen={ false }\n\t\t\t\t\t\ttitle={ [\n\t\t\t\t\t\t\t__( 'Publish:' ),\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclassName=\"editor-post-publish-panel__link\"\n\t\t\t\t\t\t\t\tkey=\"label\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<PostScheduleLabel />\n\t\t\t\t\t\t\t</span>,\n\t\t\t\t\t\t] }\n\t\t\t\t\t>\n\t\t\t\t\t\t<PostSchedule />\n\t\t\t\t\t</PanelBody>\n\t\t\t\t</>\n\t\t\t) }\n\t\t\t<MaybePostFormatPanel />\n\t\t\t<MaybeTagsPanel />\n\t\t\t<MaybeCategoryPanel />\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\nexport default PostPublishPanelPrepublish;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,IAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,aAAA,GAAAN,OAAA;AAKA,IAAAO,eAAA,GAAAC,sBAAA,CAAAR,OAAA;AACA,IAAAS,MAAA,GAAAD,sBAAA,CAAAR,OAAA;AACA,IAAAU,aAAA,GAAAF,sBAAA,CAAAR,OAAA;AACA,IAAAW,OAAA,GAAAH,sBAAA,CAAAR,OAAA;AACA,IAAAY,eAAA,GAAAJ,sBAAA,CAAAR,OAAA;AACA,IAAAa,qBAAA,GAAAL,sBAAA,CAAAR,OAAA;AACA,IAAAc,MAAA,GAAAd,OAAA;AACA,IAAAe,mBAAA,GAAAP,sBAAA,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