@wordpress/editor 13.27.1 → 13.28.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 (360) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/bindings/post-meta.js +3 -4
  3. package/build/bindings/post-meta.js.map +1 -1
  4. package/build/components/autocompleters/user.js +1 -2
  5. package/build/components/autocompleters/user.js.map +1 -1
  6. package/build/components/autosave-monitor/index.js +1 -2
  7. package/build/components/autosave-monitor/index.js.map +1 -1
  8. package/build/components/block-manager/category.js +1 -2
  9. package/build/components/block-manager/category.js.map +1 -1
  10. package/build/components/block-manager/checklist.js +1 -2
  11. package/build/components/block-manager/checklist.js.map +1 -1
  12. package/build/components/block-manager/index.js +1 -2
  13. package/build/components/block-manager/index.js.map +1 -1
  14. package/build/components/deprecated.js +52 -104
  15. package/build/components/deprecated.js.map +1 -1
  16. package/build/components/document-bar/index.js +7 -23
  17. package/build/components/document-bar/index.js.map +1 -1
  18. package/build/components/document-outline/check.js +1 -2
  19. package/build/components/document-outline/check.js.map +1 -1
  20. package/build/components/document-outline/index.js +1 -2
  21. package/build/components/document-outline/index.js.map +1 -1
  22. package/build/components/document-outline/item.js +1 -2
  23. package/build/components/document-outline/item.js.map +1 -1
  24. package/build/components/document-tools/index.js +1 -2
  25. package/build/components/document-tools/index.js.map +1 -1
  26. package/build/components/editor-canvas/edit-template-blocks-notification.js +22 -13
  27. package/build/components/editor-canvas/edit-template-blocks-notification.js.map +1 -1
  28. package/build/components/editor-canvas/index.js +16 -12
  29. package/build/components/editor-canvas/index.js.map +1 -1
  30. package/build/components/editor-help/add-blocks.native.js +1 -2
  31. package/build/components/editor-help/add-blocks.native.js.map +1 -1
  32. package/build/components/editor-help/customize-blocks.native.js +1 -2
  33. package/build/components/editor-help/customize-blocks.native.js.map +1 -1
  34. package/build/components/editor-help/help-detail-navigation-screen.native.js +1 -2
  35. package/build/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
  36. package/build/components/editor-help/help-get-support-button.native.js +1 -2
  37. package/build/components/editor-help/help-get-support-button.native.js.map +1 -1
  38. package/build/components/editor-help/help-section-title.native.js +1 -2
  39. package/build/components/editor-help/help-section-title.native.js.map +1 -1
  40. package/build/components/editor-help/help-topic-row.native.js +1 -2
  41. package/build/components/editor-help/help-topic-row.native.js.map +1 -1
  42. package/build/components/editor-help/icon-move-blocks.native.js +1 -2
  43. package/build/components/editor-help/icon-move-blocks.native.js.map +1 -1
  44. package/build/components/editor-help/index.native.js +1 -2
  45. package/build/components/editor-help/index.native.js.map +1 -1
  46. package/build/components/editor-help/intro-to-blocks.native.js +1 -2
  47. package/build/components/editor-help/intro-to-blocks.native.js.map +1 -1
  48. package/build/components/editor-help/move-blocks.native.js +1 -2
  49. package/build/components/editor-help/move-blocks.native.js.map +1 -1
  50. package/build/components/editor-help/remove-blocks.native.js +1 -2
  51. package/build/components/editor-help/remove-blocks.native.js.map +1 -1
  52. package/build/components/editor-history/redo.js +1 -2
  53. package/build/components/editor-history/redo.js.map +1 -1
  54. package/build/components/editor-history/undo.js +1 -2
  55. package/build/components/editor-history/undo.js.map +1 -1
  56. package/build/components/editor-notices/index.js +1 -2
  57. package/build/components/editor-notices/index.js.map +1 -1
  58. package/build/components/editor-snackbars/index.js +3 -1
  59. package/build/components/editor-snackbars/index.js.map +1 -1
  60. package/build/components/entities-saved-states/entity-record-item.js +1 -1
  61. package/build/components/entities-saved-states/entity-record-item.js.map +1 -1
  62. package/build/components/entities-saved-states/entity-type-list.js +7 -7
  63. package/build/components/entities-saved-states/entity-type-list.js.map +1 -1
  64. package/build/components/entities-saved-states/index.js +4 -1
  65. package/build/components/entities-saved-states/index.js.map +1 -1
  66. package/build/components/error-boundary/index.js +1 -2
  67. package/build/components/error-boundary/index.js.map +1 -1
  68. package/build/components/global-keyboard-shortcuts/register-shortcuts.js +1 -2
  69. package/build/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
  70. package/build/components/index.js +4 -6
  71. package/build/components/index.js.map +1 -1
  72. package/build/components/list-view-sidebar/index.js +43 -36
  73. package/build/components/list-view-sidebar/index.js.map +1 -1
  74. package/build/components/local-autosave-monitor/index.js +1 -2
  75. package/build/components/local-autosave-monitor/index.js.map +1 -1
  76. package/build/components/media-categories/index.js +1 -2
  77. package/build/components/media-categories/index.js.map +1 -1
  78. package/build/components/offline-status/index.native.js +1 -2
  79. package/build/components/offline-status/index.native.js.map +1 -1
  80. package/build/components/page-attributes/check.js +1 -2
  81. package/build/components/page-attributes/check.js.map +1 -1
  82. package/build/components/page-attributes/panel.js +1 -2
  83. package/build/components/page-attributes/panel.js.map +1 -1
  84. package/build/components/page-attributes/parent.js +1 -2
  85. package/build/components/page-attributes/parent.js.map +1 -1
  86. package/build/components/post-author/combobox.js +6 -60
  87. package/build/components/post-author/combobox.js.map +1 -1
  88. package/build/components/post-author/constants.js +7 -5
  89. package/build/components/post-author/constants.js.map +1 -1
  90. package/build/components/post-author/hook.js +72 -0
  91. package/build/components/post-author/hook.js.map +1 -0
  92. package/build/components/post-author/index.js +1 -2
  93. package/build/components/post-author/index.js.map +1 -1
  94. package/build/components/post-author/panel.js +1 -2
  95. package/build/components/post-author/panel.js.map +1 -1
  96. package/build/components/post-author/select.js +6 -24
  97. package/build/components/post-author/select.js.map +1 -1
  98. package/build/components/post-comments/index.js +1 -2
  99. package/build/components/post-comments/index.js.map +1 -1
  100. package/build/components/post-discussion/panel.js +1 -2
  101. package/build/components/post-discussion/panel.js.map +1 -1
  102. package/build/components/post-excerpt/check.js +1 -2
  103. package/build/components/post-excerpt/check.js.map +1 -1
  104. package/build/components/post-excerpt/index.js +1 -2
  105. package/build/components/post-excerpt/index.js.map +1 -1
  106. package/build/components/post-excerpt/plugin.js +1 -2
  107. package/build/components/post-excerpt/plugin.js.map +1 -1
  108. package/build/components/post-featured-image/check.js +1 -2
  109. package/build/components/post-featured-image/check.js.map +1 -1
  110. package/build/components/post-featured-image/index.js +1 -2
  111. package/build/components/post-featured-image/index.js.map +1 -1
  112. package/build/components/post-featured-image/panel.js +1 -2
  113. package/build/components/post-featured-image/panel.js.map +1 -1
  114. package/build/components/post-format/check.js +1 -2
  115. package/build/components/post-format/check.js.map +1 -1
  116. package/build/components/post-format/index.js +1 -2
  117. package/build/components/post-format/index.js.map +1 -1
  118. package/build/components/post-last-revision/check.js +1 -2
  119. package/build/components/post-last-revision/check.js.map +1 -1
  120. package/build/components/post-last-revision/index.js +6 -5
  121. package/build/components/post-last-revision/index.js.map +1 -1
  122. package/build/components/post-last-revision/panel.js +1 -2
  123. package/build/components/post-last-revision/panel.js.map +1 -1
  124. package/build/components/post-panel-row/index.js +1 -2
  125. package/build/components/post-panel-row/index.js.map +1 -1
  126. package/build/components/post-pending-status/check.js +1 -2
  127. package/build/components/post-pending-status/check.js.map +1 -1
  128. package/build/components/post-pending-status/index.js +1 -2
  129. package/build/components/post-pending-status/index.js.map +1 -1
  130. package/build/components/post-pingbacks/index.js +1 -2
  131. package/build/components/post-pingbacks/index.js.map +1 -1
  132. package/build/components/post-publish-button/index.js +1 -2
  133. package/build/components/post-publish-button/index.js.map +1 -1
  134. package/build/components/post-publish-button/label.js +1 -2
  135. package/build/components/post-publish-button/label.js.map +1 -1
  136. package/build/components/post-publish-panel/index.js +1 -2
  137. package/build/components/post-publish-panel/index.js.map +1 -1
  138. package/build/components/post-publish-panel/maybe-category-panel.js +1 -2
  139. package/build/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  140. package/build/components/post-publish-panel/maybe-tags-panel.js +22 -26
  141. package/build/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  142. package/build/components/post-publish-panel/postpublish.js +1 -2
  143. package/build/components/post-publish-panel/postpublish.js.map +1 -1
  144. package/build/components/post-publish-panel/prepublish.js +1 -2
  145. package/build/components/post-publish-panel/prepublish.js.map +1 -1
  146. package/build/components/post-schedule/index.js +0 -1
  147. package/build/components/post-schedule/index.js.map +1 -1
  148. package/build/components/post-schedule/label.js +1 -1
  149. package/build/components/post-schedule/label.js.map +1 -1
  150. package/build/components/post-schedule/panel.js +1 -0
  151. package/build/components/post-schedule/panel.js.map +1 -1
  152. package/build/components/post-slug/index.js +1 -2
  153. package/build/components/post-slug/index.js.map +1 -1
  154. package/build/components/post-switch-to-draft-button/index.js +1 -0
  155. package/build/components/post-switch-to-draft-button/index.js.map +1 -1
  156. package/build/components/post-sync-status/index.js +1 -1
  157. package/build/components/post-sync-status/index.js.map +1 -1
  158. package/build/components/post-taxonomies/check.js +8 -15
  159. package/build/components/post-taxonomies/check.js.map +1 -1
  160. package/build/components/post-taxonomies/flat-term-selector.js +1 -2
  161. package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
  162. package/build/components/post-taxonomies/hierarchical-term-selector.js +1 -2
  163. package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  164. package/build/components/post-taxonomies/index.js +14 -15
  165. package/build/components/post-taxonomies/index.js.map +1 -1
  166. package/build/components/post-taxonomies/panel.js +1 -2
  167. package/build/components/post-taxonomies/panel.js.map +1 -1
  168. package/build/components/post-template/block-theme.js +24 -11
  169. package/build/components/post-template/block-theme.js.map +1 -1
  170. package/build/components/post-template/classic-theme.js +17 -13
  171. package/build/components/post-template/classic-theme.js.map +1 -1
  172. package/build/components/post-template/create-new-template-modal.js +20 -5
  173. package/build/components/post-template/create-new-template-modal.js.map +1 -1
  174. package/build/components/post-template/panel.js +5 -1
  175. package/build/components/post-template/panel.js.map +1 -1
  176. package/build/components/post-title/constants.js +2 -4
  177. package/build/components/post-title/constants.js.map +1 -1
  178. package/build/components/post-title/index.js +2 -3
  179. package/build/components/post-title/index.js.map +1 -1
  180. package/build/components/post-title/index.native.js +1 -2
  181. package/build/components/post-title/index.native.js.map +1 -1
  182. package/build/components/post-title/post-title-raw.js +1 -2
  183. package/build/components/post-title/post-title-raw.js.map +1 -1
  184. package/build/components/post-trash/check.js +1 -2
  185. package/build/components/post-trash/check.js.map +1 -1
  186. package/build/components/post-trash/index.js +1 -0
  187. package/build/components/post-trash/index.js.map +1 -1
  188. package/build/components/post-type-support-check/index.js +1 -2
  189. package/build/components/post-type-support-check/index.js.map +1 -1
  190. package/build/components/post-url/panel.js +1 -0
  191. package/build/components/post-url/panel.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/preferences-modal/enable-panel.js +1 -2
  195. package/build/components/preferences-modal/enable-panel.js.map +1 -1
  196. package/build/components/preferences-modal/enable-plugin-document-setting-panel.js +1 -2
  197. package/build/components/preferences-modal/enable-plugin-document-setting-panel.js.map +1 -1
  198. package/build/components/preferences-modal/index.js +0 -1
  199. package/build/components/preferences-modal/index.js.map +1 -1
  200. package/build/components/provider/constants.js +1 -2
  201. package/build/components/provider/constants.js.map +1 -1
  202. package/build/components/provider/index.js +13 -7
  203. package/build/components/provider/index.js.map +1 -1
  204. package/build/components/provider/index.native.js +4 -6
  205. package/build/components/provider/index.native.js.map +1 -1
  206. package/build/components/provider/use-block-editor-settings.js +2 -3
  207. package/build/components/provider/use-block-editor-settings.js.map +1 -1
  208. package/build/components/provider/use-block-editor-settings.native.js +1 -2
  209. package/build/components/provider/use-block-editor-settings.native.js.map +1 -1
  210. package/build/components/provider/with-registry-provider.js +1 -2
  211. package/build/components/provider/with-registry-provider.js.map +1 -1
  212. package/build/components/table-of-contents/index.js +1 -2
  213. package/build/components/table-of-contents/index.js.map +1 -1
  214. package/build/components/table-of-contents/panel.js +1 -2
  215. package/build/components/table-of-contents/panel.js.map +1 -1
  216. package/build/components/template-validation-notice/index.js +1 -2
  217. package/build/components/template-validation-notice/index.js.map +1 -1
  218. package/build/components/theme-support-check/index.js +1 -2
  219. package/build/components/theme-support-check/index.js.map +1 -1
  220. package/build/hooks/pattern-partial-syncing.js +9 -2
  221. package/build/hooks/pattern-partial-syncing.js.map +1 -1
  222. package/build/private-apis.js +1 -2
  223. package/build/private-apis.js.map +1 -1
  224. package/build/store/actions.js +38 -65
  225. package/build/store/actions.js.map +1 -1
  226. package/build/store/constants.js +7 -14
  227. package/build/store/constants.js.map +1 -1
  228. package/build/store/defaults.js +1 -2
  229. package/build/store/defaults.js.map +1 -1
  230. package/build/store/index.js +4 -6
  231. package/build/store/index.js.map +1 -1
  232. package/build/store/private-actions.js +1 -0
  233. package/build/store/private-actions.js.map +1 -1
  234. package/build/store/private-selectors.js +1 -2
  235. package/build/store/private-selectors.js.map +1 -1
  236. package/build/store/reducer.js +1 -2
  237. package/build/store/reducer.js.map +1 -1
  238. package/build/store/reducer.native.js +2 -4
  239. package/build/store/reducer.native.js.map +1 -1
  240. package/build/store/selectors.js +82 -144
  241. package/build/store/selectors.js.map +1 -1
  242. package/build/store/selectors.native.js +1 -2
  243. package/build/store/selectors.native.js.map +1 -1
  244. package/build-module/bindings/post-meta.js +2 -2
  245. package/build-module/bindings/post-meta.js.map +1 -1
  246. package/build-module/components/document-bar/index.js +7 -23
  247. package/build-module/components/document-bar/index.js.map +1 -1
  248. package/build-module/components/editor-canvas/edit-template-blocks-notification.js +22 -13
  249. package/build-module/components/editor-canvas/edit-template-blocks-notification.js.map +1 -1
  250. package/build-module/components/editor-canvas/index.js +15 -10
  251. package/build-module/components/editor-canvas/index.js.map +1 -1
  252. package/build-module/components/editor-snackbars/index.js +4 -1
  253. package/build-module/components/editor-snackbars/index.js.map +1 -1
  254. package/build-module/components/entities-saved-states/entity-record-item.js +1 -1
  255. package/build-module/components/entities-saved-states/entity-record-item.js.map +1 -1
  256. package/build-module/components/entities-saved-states/entity-type-list.js +8 -8
  257. package/build-module/components/entities-saved-states/entity-type-list.js.map +1 -1
  258. package/build-module/components/entities-saved-states/index.js +6 -3
  259. package/build-module/components/entities-saved-states/index.js.map +1 -1
  260. package/build-module/components/list-view-sidebar/index.js +44 -37
  261. package/build-module/components/list-view-sidebar/index.js.map +1 -1
  262. package/build-module/components/post-author/combobox.js +8 -61
  263. package/build-module/components/post-author/combobox.js.map +1 -1
  264. package/build-module/components/post-author/constants.js +5 -2
  265. package/build-module/components/post-author/constants.js.map +1 -1
  266. package/build-module/components/post-author/hook.js +65 -0
  267. package/build-module/components/post-author/hook.js.map +1 -0
  268. package/build-module/components/post-author/select.js +7 -24
  269. package/build-module/components/post-author/select.js.map +1 -1
  270. package/build-module/components/post-last-revision/index.js +6 -4
  271. package/build-module/components/post-last-revision/index.js.map +1 -1
  272. package/build-module/components/post-publish-panel/maybe-tags-panel.js +24 -27
  273. package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  274. package/build-module/components/post-schedule/index.js +0 -1
  275. package/build-module/components/post-schedule/index.js.map +1 -1
  276. package/build-module/components/post-schedule/label.js +1 -1
  277. package/build-module/components/post-schedule/label.js.map +1 -1
  278. package/build-module/components/post-schedule/panel.js +1 -0
  279. package/build-module/components/post-schedule/panel.js.map +1 -1
  280. package/build-module/components/post-switch-to-draft-button/index.js +1 -0
  281. package/build-module/components/post-switch-to-draft-button/index.js.map +1 -1
  282. package/build-module/components/post-sync-status/index.js +1 -1
  283. package/build-module/components/post-sync-status/index.js.map +1 -1
  284. package/build-module/components/post-taxonomies/check.js +9 -14
  285. package/build-module/components/post-taxonomies/check.js.map +1 -1
  286. package/build-module/components/post-taxonomies/index.js +15 -15
  287. package/build-module/components/post-taxonomies/index.js.map +1 -1
  288. package/build-module/components/post-template/block-theme.js +24 -11
  289. package/build-module/components/post-template/block-theme.js.map +1 -1
  290. package/build-module/components/post-template/classic-theme.js +16 -11
  291. package/build-module/components/post-template/classic-theme.js.map +1 -1
  292. package/build-module/components/post-template/create-new-template-modal.js +20 -5
  293. package/build-module/components/post-template/create-new-template-modal.js.map +1 -1
  294. package/build-module/components/post-template/panel.js +5 -1
  295. package/build-module/components/post-template/panel.js.map +1 -1
  296. package/build-module/components/post-title/index.js +1 -2
  297. package/build-module/components/post-title/index.js.map +1 -1
  298. package/build-module/components/post-trash/index.js +1 -0
  299. package/build-module/components/post-trash/index.js.map +1 -1
  300. package/build-module/components/post-url/panel.js +1 -0
  301. package/build-module/components/post-url/panel.js.map +1 -1
  302. package/build-module/components/preferences-modal/index.js +0 -1
  303. package/build-module/components/preferences-modal/index.js.map +1 -1
  304. package/build-module/components/provider/index.js +11 -3
  305. package/build-module/components/provider/index.js.map +1 -1
  306. package/build-module/components/provider/use-block-editor-settings.js +1 -1
  307. package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
  308. package/build-module/components/table-of-contents/panel.js +0 -1
  309. package/build-module/components/table-of-contents/panel.js.map +1 -1
  310. package/build-module/hooks/pattern-partial-syncing.js +9 -2
  311. package/build-module/hooks/pattern-partial-syncing.js.map +1 -1
  312. package/build-module/store/actions.js +7 -3
  313. package/build-module/store/actions.js.map +1 -1
  314. package/build-module/store/private-actions.js +1 -0
  315. package/build-module/store/private-actions.js.map +1 -1
  316. package/build-module/store/selectors.js +10 -0
  317. package/build-module/store/selectors.js.map +1 -1
  318. package/build-style/style-rtl.css +28 -22
  319. package/build-style/style.css +28 -22
  320. package/package.json +32 -32
  321. package/src/bindings/post-meta.js +2 -2
  322. package/src/components/document-bar/index.js +24 -38
  323. package/src/components/editor-canvas/edit-template-blocks-notification.js +31 -14
  324. package/src/components/editor-canvas/index.js +16 -6
  325. package/src/components/editor-snackbars/index.js +6 -3
  326. package/src/components/entities-saved-states/entity-record-item.js +1 -4
  327. package/src/components/entities-saved-states/entity-type-list.js +8 -8
  328. package/src/components/entities-saved-states/index.js +17 -4
  329. package/src/components/entities-saved-states/style.scss +5 -0
  330. package/src/components/list-view-sidebar/index.js +60 -47
  331. package/src/components/list-view-sidebar/style.scss +20 -20
  332. package/src/components/post-author/combobox.js +5 -61
  333. package/src/components/post-author/constants.js +6 -2
  334. package/src/components/post-author/hook.js +63 -0
  335. package/src/components/post-author/select.js +5 -25
  336. package/src/components/post-last-revision/index.js +6 -6
  337. package/src/components/post-last-revision/style.scss +3 -6
  338. package/src/components/post-panel-row/style.scss +3 -3
  339. package/src/components/post-publish-panel/maybe-tags-panel.js +27 -37
  340. package/src/components/post-publish-panel/style.scss +3 -1
  341. package/src/components/post-schedule/label.js +1 -1
  342. package/src/components/post-schedule/panel.js +1 -0
  343. package/src/components/post-schedule/test/label.js +19 -7
  344. package/src/components/post-switch-to-draft-button/index.js +1 -0
  345. package/src/components/post-sync-status/index.js +8 -2
  346. package/src/components/post-taxonomies/check.js +11 -15
  347. package/src/components/post-taxonomies/index.js +15 -22
  348. package/src/components/post-taxonomies/test/index.js +37 -51
  349. package/src/components/post-template/block-theme.js +33 -14
  350. package/src/components/post-template/classic-theme.js +17 -10
  351. package/src/components/post-template/create-new-template-modal.js +17 -9
  352. package/src/components/post-template/panel.js +5 -1
  353. package/src/components/post-trash/index.js +1 -0
  354. package/src/components/post-url/panel.js +1 -0
  355. package/src/components/provider/index.js +18 -6
  356. package/src/components/provider/use-block-editor-settings.js +1 -1
  357. package/src/hooks/pattern-partial-syncing.js +23 -4
  358. package/src/store/actions.js +8 -3
  359. package/src/store/private-actions.js +1 -0
  360. package/src/store/selectors.js +12 -0
@@ -3,16 +3,13 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.default = void 0;
6
+ exports.default = PostAuthorSelect;
7
7
  var _react = require("react");
8
8
  var _i18n = require("@wordpress/i18n");
9
- var _element = require("@wordpress/element");
10
9
  var _data = require("@wordpress/data");
11
- var _htmlEntities = require("@wordpress/html-entities");
12
10
  var _components = require("@wordpress/components");
13
- var _coreData = require("@wordpress/core-data");
14
11
  var _store = require("../../store");
15
- var _constants = require("./constants");
12
+ var _hook = require("./hook");
16
13
  /**
17
14
  * WordPress dependencies
18
15
  */
@@ -26,22 +23,9 @@ function PostAuthorSelect() {
26
23
  editPost
27
24
  } = (0, _data.useDispatch)(_store.store);
28
25
  const {
29
- postAuthor,
30
- authors
31
- } = (0, _data.useSelect)(select => {
32
- return {
33
- postAuthor: select(_store.store).getEditedPostAttribute('author'),
34
- authors: select(_coreData.store).getUsers(_constants.AUTHORS_QUERY)
35
- };
36
- }, []);
37
- const authorOptions = (0, _element.useMemo)(() => {
38
- return (authors !== null && authors !== void 0 ? authors : []).map(author => {
39
- return {
40
- value: author.id,
41
- label: (0, _htmlEntities.decodeEntities)(author.name)
42
- };
43
- });
44
- }, [authors]);
26
+ authorId,
27
+ authorOptions
28
+ } = (0, _hook.useAuthorsQuery)();
45
29
  const setAuthorId = value => {
46
30
  const author = Number(value);
47
31
  editPost({
@@ -55,9 +39,7 @@ function PostAuthorSelect() {
55
39
  label: (0, _i18n.__)('Author'),
56
40
  options: authorOptions,
57
41
  onChange: setAuthorId,
58
- value: postAuthor
42
+ value: authorId
59
43
  });
60
44
  }
61
- var _default = PostAuthorSelect;
62
- exports.default = _default;
63
45
  //# sourceMappingURL=select.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_element","_data","_htmlEntities","_components","_coreData","_store","_constants","PostAuthorSelect","editPost","useDispatch","editorStore","postAuthor","authors","useSelect","select","getEditedPostAttribute","coreStore","getUsers","AUTHORS_QUERY","authorOptions","useMemo","map","author","value","id","label","decodeEntities","name","setAuthorId","Number","_react","createElement","SelectControl","__next40pxDefaultSize","__nextHasNoMarginBottom","className","__","options","onChange","_default","exports","default"],"sources":["@wordpress/editor/src/components/post-author/select.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useMemo } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { SelectControl } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { AUTHORS_QUERY } from './constants';\n\nfunction PostAuthorSelect() {\n\tconst { editPost } = useDispatch( editorStore );\n\tconst { postAuthor, authors } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tpostAuthor:\n\t\t\t\tselect( editorStore ).getEditedPostAttribute( 'author' ),\n\t\t\tauthors: select( coreStore ).getUsers( AUTHORS_QUERY ),\n\t\t};\n\t}, [] );\n\n\tconst authorOptions = useMemo( () => {\n\t\treturn ( authors ?? [] ).map( ( author ) => {\n\t\t\treturn {\n\t\t\t\tvalue: author.id,\n\t\t\t\tlabel: decodeEntities( author.name ),\n\t\t\t};\n\t\t} );\n\t}, [ authors ] );\n\n\tconst setAuthorId = ( value ) => {\n\t\tconst author = Number( value );\n\t\teditPost( { author } );\n\t};\n\n\treturn (\n\t\t<SelectControl\n\t\t\t__next40pxDefaultSize\n\t\t\t__nextHasNoMarginBottom\n\t\t\tclassName=\"post-author-selector\"\n\t\t\tlabel={ __( 'Author' ) }\n\t\t\toptions={ authorOptions }\n\t\t\tonChange={ setAuthorId }\n\t\t\tvalue={ postAuthor }\n\t\t/>\n\t);\n}\n\nexport default PostAuthorSelect;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AAKA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AAdA;AACA;AACA;;AAQA;AACA;AACA;;AAIA,SAASQ,gBAAgBA,CAAA,EAAG;EAC3B,MAAM;IAAEC;EAAS,CAAC,GAAG,IAAAC,iBAAW,EAAEC,YAAY,CAAC;EAC/C,MAAM;IAAEC,UAAU;IAAEC;EAAQ,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IACxD,OAAO;MACNH,UAAU,EACTG,MAAM,CAAEJ,YAAY,CAAC,CAACK,sBAAsB,CAAE,QAAS,CAAC;MACzDH,OAAO,EAAEE,MAAM,CAAEE,eAAU,CAAC,CAACC,QAAQ,CAAEC,wBAAc;IACtD,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,MAAMC,aAAa,GAAG,IAAAC,gBAAO,EAAE,MAAM;IACpC,OAAO,CAAER,OAAO,aAAPA,OAAO,cAAPA,OAAO,GAAI,EAAE,EAAGS,GAAG,CAAIC,MAAM,IAAM;MAC3C,OAAO;QACNC,KAAK,EAAED,MAAM,CAACE,EAAE;QAChBC,KAAK,EAAE,IAAAC,4BAAc,EAAEJ,MAAM,CAACK,IAAK;MACpC,CAAC;IACF,CAAE,CAAC;EACJ,CAAC,EAAE,CAAEf,OAAO,CAAG,CAAC;EAEhB,MAAMgB,WAAW,GAAKL,KAAK,IAAM;IAChC,MAAMD,MAAM,GAAGO,MAAM,CAAEN,KAAM,CAAC;IAC9Bf,QAAQ,CAAE;MAAEc;IAAO,CAAE,CAAC;EACvB,CAAC;EAED,OACC,IAAAQ,MAAA,CAAAC,aAAA,EAAC5B,WAAA,CAAA6B,aAAa;IACbC,qBAAqB;IACrBC,uBAAuB;IACvBC,SAAS,EAAC,sBAAsB;IAChCV,KAAK,EAAG,IAAAW,QAAE,EAAE,QAAS,CAAG;IACxBC,OAAO,EAAGlB,aAAe;IACzBmB,QAAQ,EAAGV,WAAa;IACxBL,KAAK,EAAGZ;EAAY,CACpB,CAAC;AAEJ;AAAC,IAAA4B,QAAA,GAEchC,gBAAgB;AAAAiC,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
1
+ {"version":3,"names":["_i18n","require","_data","_components","_store","_hook","PostAuthorSelect","editPost","useDispatch","editorStore","authorId","authorOptions","useAuthorsQuery","setAuthorId","value","author","Number","_react","createElement","SelectControl","__next40pxDefaultSize","__nextHasNoMarginBottom","className","label","__","options","onChange"],"sources":["@wordpress/editor/src/components/post-author/select.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch } from '@wordpress/data';\nimport { SelectControl } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { useAuthorsQuery } from './hook';\n\nexport default function PostAuthorSelect() {\n\tconst { editPost } = useDispatch( editorStore );\n\tconst { authorId, authorOptions } = useAuthorsQuery();\n\n\tconst setAuthorId = ( value ) => {\n\t\tconst author = Number( value );\n\t\teditPost( { author } );\n\t};\n\n\treturn (\n\t\t<SelectControl\n\t\t\t__next40pxDefaultSize\n\t\t\t__nextHasNoMarginBottom\n\t\t\tclassName=\"post-author-selector\"\n\t\t\tlabel={ __( 'Author' ) }\n\t\t\toptions={ authorOptions }\n\t\t\tonChange={ setAuthorId }\n\t\t\tvalue={ authorId }\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAKA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AAXA;AACA;AACA;;AAKA;AACA;AACA;;AAIe,SAASK,gBAAgBA,CAAA,EAAG;EAC1C,MAAM;IAAEC;EAAS,CAAC,GAAG,IAAAC,iBAAW,EAAEC,YAAY,CAAC;EAC/C,MAAM;IAAEC,QAAQ;IAAEC;EAAc,CAAC,GAAG,IAAAC,qBAAe,EAAC,CAAC;EAErD,MAAMC,WAAW,GAAKC,KAAK,IAAM;IAChC,MAAMC,MAAM,GAAGC,MAAM,CAAEF,KAAM,CAAC;IAC9BP,QAAQ,CAAE;MAAEQ;IAAO,CAAE,CAAC;EACvB,CAAC;EAED,OACC,IAAAE,MAAA,CAAAC,aAAA,EAACf,WAAA,CAAAgB,aAAa;IACbC,qBAAqB;IACrBC,uBAAuB;IACvBC,SAAS,EAAC,sBAAsB;IAChCC,KAAK,EAAG,IAAAC,QAAE,EAAE,QAAS,CAAG;IACxBC,OAAO,EAAGd,aAAe;IACzBe,QAAQ,EAAGb,WAAa;IACxBC,KAAK,EAAGJ;EAAU,CAClB,CAAC;AAEJ"}
@@ -35,6 +35,5 @@ function PostComments() {
35
35
  onChange: onToggleComments
36
36
  });
37
37
  }
38
- var _default = PostComments;
39
- exports.default = _default;
38
+ var _default = exports.default = PostComments;
40
39
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_components","_data","_store","PostComments","commentStatus","useSelect","select","_select$getEditedPost","editorStore","getEditedPostAttribute","editPost","useDispatch","onToggleComments","comment_status","_react","createElement","CheckboxControl","__nextHasNoMarginBottom","label","__","checked","onChange","_default","exports","default"],"sources":["@wordpress/editor/src/components/post-comments/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { CheckboxControl } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nfunction PostComments() {\n\tconst commentStatus = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).getEditedPostAttribute( 'comment_status' ) ??\n\t\t\t'open',\n\t\t[]\n\t);\n\tconst { editPost } = useDispatch( editorStore );\n\tconst onToggleComments = () =>\n\t\teditPost( {\n\t\t\tcomment_status: commentStatus === 'open' ? 'closed' : 'open',\n\t\t} );\n\n\treturn (\n\t\t<CheckboxControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\tlabel={ __( 'Allow comments' ) }\n\t\t\tchecked={ commentStatus === 'open' }\n\t\t\tonChange={ onToggleComments }\n\t\t/>\n\t);\n}\n\nexport default PostComments;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAKA,IAAAG,MAAA,GAAAH,OAAA;AAVA;AACA;AACA;;AAKA;AACA;AACA;;AAGA,SAASI,YAAYA,CAAA,EAAG;EACvB,MAAMC,aAAa,GAAG,IAAAC,eAAS,EAC5BC,MAAM;IAAA,IAAAC,qBAAA;IAAA,QAAAA,qBAAA,GACPD,MAAM,CAAEE,YAAY,CAAC,CAACC,sBAAsB,CAAE,gBAAiB,CAAC,cAAAF,qBAAA,cAAAA,qBAAA,GAChE,MAAM;EAAA,GACP,EACD,CAAC;EACD,MAAM;IAAEG;EAAS,CAAC,GAAG,IAAAC,iBAAW,EAAEH,YAAY,CAAC;EAC/C,MAAMI,gBAAgB,GAAGA,CAAA,KACxBF,QAAQ,CAAE;IACTG,cAAc,EAAET,aAAa,KAAK,MAAM,GAAG,QAAQ,GAAG;EACvD,CAAE,CAAC;EAEJ,OACC,IAAAU,MAAA,CAAAC,aAAA,EAACf,WAAA,CAAAgB,eAAe;IACfC,uBAAuB;IACvBC,KAAK,EAAG,IAAAC,QAAE,EAAE,gBAAiB,CAAG;IAChCC,OAAO,EAAGhB,aAAa,KAAK,MAAQ;IACpCiB,QAAQ,EAAGT;EAAkB,CAC7B,CAAC;AAEJ;AAAC,IAAAU,QAAA,GAEcnB,YAAY;AAAAoB,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
1
+ {"version":3,"names":["_i18n","require","_components","_data","_store","PostComments","commentStatus","useSelect","select","_select$getEditedPost","editorStore","getEditedPostAttribute","editPost","useDispatch","onToggleComments","comment_status","_react","createElement","CheckboxControl","__nextHasNoMarginBottom","label","__","checked","onChange","_default","exports","default"],"sources":["@wordpress/editor/src/components/post-comments/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { CheckboxControl } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nfunction PostComments() {\n\tconst commentStatus = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).getEditedPostAttribute( 'comment_status' ) ??\n\t\t\t'open',\n\t\t[]\n\t);\n\tconst { editPost } = useDispatch( editorStore );\n\tconst onToggleComments = () =>\n\t\teditPost( {\n\t\t\tcomment_status: commentStatus === 'open' ? 'closed' : 'open',\n\t\t} );\n\n\treturn (\n\t\t<CheckboxControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\tlabel={ __( 'Allow comments' ) }\n\t\t\tchecked={ commentStatus === 'open' }\n\t\t\tonChange={ onToggleComments }\n\t\t/>\n\t);\n}\n\nexport default PostComments;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAKA,IAAAG,MAAA,GAAAH,OAAA;AAVA;AACA;AACA;;AAKA;AACA;AACA;;AAGA,SAASI,YAAYA,CAAA,EAAG;EACvB,MAAMC,aAAa,GAAG,IAAAC,eAAS,EAC5BC,MAAM;IAAA,IAAAC,qBAAA;IAAA,QAAAA,qBAAA,GACPD,MAAM,CAAEE,YAAY,CAAC,CAACC,sBAAsB,CAAE,gBAAiB,CAAC,cAAAF,qBAAA,cAAAA,qBAAA,GAChE,MAAM;EAAA,GACP,EACD,CAAC;EACD,MAAM;IAAEG;EAAS,CAAC,GAAG,IAAAC,iBAAW,EAAEH,YAAY,CAAC;EAC/C,MAAMI,gBAAgB,GAAGA,CAAA,KACxBF,QAAQ,CAAE;IACTG,cAAc,EAAET,aAAa,KAAK,MAAM,GAAG,QAAQ,GAAG;EACvD,CAAE,CAAC;EAEJ,OACC,IAAAU,MAAA,CAAAC,aAAA,EAACf,WAAA,CAAAgB,eAAe;IACfC,uBAAuB;IACvBC,KAAK,EAAG,IAAAC,QAAE,EAAE,gBAAiB,CAAG;IAChCC,OAAO,EAAGhB,aAAa,KAAK,MAAQ;IACpCiB,QAAQ,EAAGT;EAAkB,CAC7B,CAAC;AAEJ;AAAC,IAAAU,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcrB,YAAY"}
@@ -54,6 +54,5 @@ function PostDiscussionPanel() {
54
54
  supportKeys: "trackbacks"
55
55
  }, (0, _react.createElement)(_components.PanelRow, null, (0, _react.createElement)(_postPingbacks.default, null)))));
56
56
  }
57
- var _default = PostDiscussionPanel;
58
- exports.default = _default;
57
+ var _default = exports.default = PostDiscussionPanel;
59
58
  //# sourceMappingURL=panel.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_components","_data","_store","_postTypeSupportCheck","_interopRequireDefault","_postComments","_postPingbacks","PANEL_NAME","PostDiscussionPanel","isEnabled","isOpened","useSelect","select","isEditorPanelEnabled","isEditorPanelOpened","editorStore","toggleEditorPanelOpened","useDispatch","_react","createElement","default","supportKeys","PanelBody","title","__","opened","onToggle","PanelRow","_default","exports"],"sources":["@wordpress/editor/src/components/post-discussion/panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { PanelBody, PanelRow } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport PostTypeSupportCheck from '../post-type-support-check';\nimport PostComments from '../post-comments';\nimport PostPingbacks from '../post-pingbacks';\n\nconst PANEL_NAME = 'discussion-panel';\n\nfunction PostDiscussionPanel() {\n\tconst { isEnabled, isOpened } = useSelect( ( select ) => {\n\t\tconst { isEditorPanelEnabled, isEditorPanelOpened } =\n\t\t\tselect( editorStore );\n\t\treturn {\n\t\t\tisEnabled: isEditorPanelEnabled( PANEL_NAME ),\n\t\t\tisOpened: isEditorPanelOpened( PANEL_NAME ),\n\t\t};\n\t}, [] );\n\n\tconst { toggleEditorPanelOpened } = useDispatch( editorStore );\n\n\tif ( ! isEnabled ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PostTypeSupportCheck supportKeys={ [ 'comments', 'trackbacks' ] }>\n\t\t\t<PanelBody\n\t\t\t\ttitle={ __( 'Discussion' ) }\n\t\t\t\topened={ isOpened }\n\t\t\t\tonToggle={ () => toggleEditorPanelOpened( PANEL_NAME ) }\n\t\t\t>\n\t\t\t\t<PostTypeSupportCheck supportKeys=\"comments\">\n\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t<PostComments />\n\t\t\t\t\t</PanelRow>\n\t\t\t\t</PostTypeSupportCheck>\n\n\t\t\t\t<PostTypeSupportCheck supportKeys=\"tr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IAC5BC,MAAM,EAAGf,QAAU;IACnBgB,QAAQ,EAAGA,CAAA,KAAMV,uBAAuB,CAAET,UAAW;EAAG,GAExD,IAAAW,MAAA,CAAAC,aAAA,EAAChB,qBAAA,CAAAiB,OAAoB;IAACC,WAAW,EAAC;EAAU,GAC3C,IAAAH,MAAA,CAAAC,aAAA,EAACnB,WAAA,CAAA2B,QAAQ,QACR,IAAAT,MAAA,CAAAC,aAAA,EAACd,aAAA,CAAAe,OAAY,MAAE,CACN,CACW,CAAC,EAEvB,IAAAF,MAAA,CAAAC,aAAA,EAAChB,qBAAA,CAAAiB,OAAoB;IAACC,WAAW,EAAC;EAAY,GAC7C,IAAAH,MAAA,CAAAC,aAAA,EAACnB,WAAA,CAAA2B,QAAQ,QACR,IAAAT,MAAA,CAAAC,aAAA,EAACb,cAAA,CAAAc,OAAa,MAAE,CACP,CACW,CACZ,CACU,CAAC;AAEzB;AAAC,IAAAQ,QAAA,GAEcpB,mBAAmB;AAAAqB,OAAA,CAAAT,OAAA,GAAAQ,QAAA"}
1
+ {"version":3,"names":["_i18n","require","_components","_data","_store","_postTypeSupportCheck","_interopRequireDefault","_postComments","_postPingbacks","PANEL_NAME","PostDiscussionPanel","isEnabled","isOpened","useSelect","select","isEditorPanelEnabled","isEditorPanelOpened","editorStore","toggleEditorPanelOpened","useDispatch","_react","createElement","default","supportKeys","PanelBody","title","__","opened","onToggle","PanelRow","_default","exports"],"sources":["@wordpress/editor/src/components/post-discussion/panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { PanelBody, PanelRow } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport PostTypeSupportCheck from '../post-type-support-check';\nimport PostComments from '../post-comments';\nimport PostPingbacks from '../post-pingbacks';\n\nconst PANEL_NAME = 'discussion-panel';\n\nfunction PostDiscussionPanel() {\n\tconst { isEnabled, isOpened } = useSelect( ( select ) => {\n\t\tconst { isEditorPanelEnabled, isEditorPanelOpened } =\n\t\t\tselect( editorStore );\n\t\treturn {\n\t\t\tisEnabled: isEditorPanelEnabled( PANEL_NAME ),\n\t\t\tisOpened: isEditorPanelOpened( PANEL_NAME ),\n\t\t};\n\t}, [] );\n\n\tconst { toggleEditorPanelOpened } = useDispatch( editorStore );\n\n\tif ( ! isEnabled ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PostTypeSupportCheck supportKeys={ [ 'comments', 'trackbacks' ] }>\n\t\t\t<PanelBody\n\t\t\t\ttitle={ __( 'Discussion' ) }\n\t\t\t\topened={ isOpened }\n\t\t\t\tonToggle={ () => toggleEditorPanelOpened( PANEL_NAME ) }\n\t\t\t>\n\t\t\t\t<PostTypeSupportCheck supportKeys=\"comments\">\n\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t<PostComments />\n\t\t\t\t\t</PanelRow>\n\t\t\t\t</PostTypeSupportCheck>\n\n\t\t\t\t<PostTypeSupportCheck supportKeys=\"trackbacks\">\n\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t<PostPingbacks />\n\t\t\t\t\t</PanelRow>\n\t\t\t\t</PostTypeSupportCheck>\n\t\t\t</PanelBody>\n\t\t</PostTypeSupportCheck>\n\t);\n}\n\nexport default PostDiscussionPanel;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAKA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,qBAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,aAAA,GAAAD,sBAAA,CAAAL,OAAA;AACA,IAAAO,cAAA,GAAAF,sBAAA,CAAAL,OAAA;AAbA;AACA;AACA;;AAKA;AACA;AACA;;AAMA,MAAMQ,UAAU,GAAG,kBAAkB;AAErC,SAASC,mBAAmBA,CAAA,EAAG;EAC9B,MAAM;IAAEC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AC,OAAA,CAAAT,OAAA,GAEcZ,mBAAmB"}
@@ -37,6 +37,5 @@ function PostExcerptCheck({
37
37
  supportKeys: "excerpt"
38
38
  }, children);
39
39
  }
40
- var _default = PostExcerptCheck;
41
- exports.default = _default;
40
+ var _default = exports.default = PostExcerptCheck;
42
41
  //# sourceMappingURL=check.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","_postTypeSupportCheck","_interopRequireDefault","_store","PostExcerptCheck","children","postType","useSelect","select","getEditedPostAttribute","editorStore","includes","_react","createElement","default","supportKeys","_default","exports"],"sources":["@wordpress/editor/src/components/post-excerpt/check.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport PostTypeSupportCheck from '../post-type-support-check';\nimport { store as editorStore } from '../../store';\n\nfunction PostExcerptCheck( { children } ) {\n\tconst postType = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute } = select( editorStore );\n\t\treturn getEditedPostAttribute( 'type' );\n\t}, [] );\n\n\t// This special case is unfortunate, but the REST API of wp_template and wp_template_part\n\t// support the excerpt field throught the \"description\" field rather than \"excerpt\" which means\n\t// the default ExcerptPanel won't work for these.\n\tif ( [ 'wp_template', 'wp_template_part' ].includes( postType ) ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PostTypeSupportCheck supportKeys=\"excerpt\">\n\t\t\t{ children }\n\t\t</PostTypeSupportCheck>\n\t);\n}\n\nexport default PostExcerptCheck;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,qBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AATA;AACA;AACA;;AAGA;AACA;AACA;;AAIA,SAASI,gBAAgBA,CAAE;EAAEC;AAAS,CAAC,EAAG;EACzC,MAAMC,QAAQ,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IACzC,MAAM;MAAEC;IAAuB,CAAC,GAAGD,MAAM,CAAEE,YAAY,CAAC;IACxD,OAAOD,sBAAsB,CAAE,MAAO,CAAC;EACxC,CAAC,EAAE,EAAG,CAAC;;EAEP;EACA;EACA;EACA,IAAK,CAAE,aAAa,EAAE,kBAAkB,CAAE,CAACE,QAAQ,CAAEL,QAAS,CAAC,EAAG;IACjE,OAAO,IAAI;EACZ;EAEA,OACC,IAAAM,MAAA,CAAAC,aAAA,EAACZ,qBAAA,CAAAa,OAAoB;IAACC,WAAW,EAAC;EAAS,GACxCV,QACmB,CAAC;AAEzB;AAAC,IAAAW,QAAA,GAEcZ,gBAAgB;AAAAa,OAAA,CAAAH,OAAA,GAAAE,QAAA"}
1
+ {"version":3,"names":["_data","require","_postTypeSupportCheck","_interopRequireDefault","_store","PostExcerptCheck","children","postType","useSelect","select","getEditedPostAttribute","editorStore","includes","_react","createElement","default","supportKeys","_default","exports"],"sources":["@wordpress/editor/src/components/post-excerpt/check.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport PostTypeSupportCheck from '../post-type-support-check';\nimport { store as editorStore } from '../../store';\n\nfunction PostExcerptCheck( { children } ) {\n\tconst postType = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute } = select( editorStore );\n\t\treturn getEditedPostAttribute( 'type' );\n\t}, [] );\n\n\t// This special case is unfortunate, but the REST API of wp_template and wp_template_part\n\t// support the excerpt field throught the \"description\" field rather than \"excerpt\" which means\n\t// the default ExcerptPanel won't work for these.\n\tif ( [ 'wp_template', 'wp_template_part' ].includes( postType ) ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PostTypeSupportCheck supportKeys=\"excerpt\">\n\t\t\t{ children }\n\t\t</PostTypeSupportCheck>\n\t);\n}\n\nexport default PostExcerptCheck;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,qBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AATA;AACA;AACA;;AAGA;AACA;AACA;;AAIA,SAASI,gBAAgBA,CAAE;EAAEC;AAAS,CAAC,EAAG;EACzC,MAAMC,QAAQ,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IACzC,MAAM;MAAEC;IAAuB,CAAC,GAAGD,MAAM,CAAEE,YAAY,CAAC;IACxD,OAAOD,sBAAsB,CAAE,MAAO,CAAC;EACxC,CAAC,EAAE,EAAG,CAAC;;EAEP;EACA;EACA;EACA,IAAK,CAAE,aAAa,EAAE,kBAAkB,CAAE,CAACE,QAAQ,CAAEL,QAAS,CAAC,EAAG;IACjE,OAAO,IAAI;EACZ;EAEA,OACC,IAAAM,MAAA,CAAAC,aAAA,EAACZ,qBAAA,CAAAa,OAAoB;IAACC,WAAW,EAAC;EAAS,GACxCV,QACmB,CAAC;AAEzB;AAAC,IAAAW,QAAA,GAAAC,OAAA,CAAAH,OAAA,GAEcV,gBAAgB"}
@@ -36,6 +36,5 @@ function PostExcerpt() {
36
36
  href: (0, _i18n.__)('https://wordpress.org/documentation/article/page-post-settings-sidebar/#excerpt')
37
37
  }, (0, _i18n.__)('Learn more about manual excerpts')));
38
38
  }
39
- var _default = PostExcerpt;
40
- exports.default = _default;
39
+ var _default = exports.default = PostExcerpt;
41
40
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_components","_data","_store","PostExcerpt","excerpt","useSelect","select","editorStore","getEditedPostAttribute","editPost","useDispatch","_react","createElement","className","TextareaControl","__nextHasNoMarginBottom","label","__","onChange","value","ExternalLink","href","_default","exports","default"],"sources":["@wordpress/editor/src/components/post-excerpt/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { ExternalLink, TextareaControl } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nfunction PostExcerpt() {\n\tconst excerpt = useSelect(\n\t\t( select ) => select( editorStore ).getEditedPostAttribute( 'excerpt' ),\n\t\t[]\n\t);\n\tconst { editPost } = useDispatch( editorStore );\n\n\treturn (\n\t\t<div className=\"editor-post-excerpt\">\n\t\t\t<TextareaControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tlabel={ __( 'Write an excerpt (optional)' ) }\n\t\t\t\tclassName=\"editor-post-excerpt__textarea\"\n\t\t\t\tonChange={ ( value ) => editPost( { excerpt: value } ) }\n\t\t\t\tvalue={ excerpt }\n\t\t\t/>\n\t\t\t<ExternalLink\n\t\t\t\thref={ __(\n\t\t\t\t\t'https://wordpress.org/documentation/article/page-post-settings-sidebar/#excerpt'\n\t\t\t\t) }\n\t\t\t>\n\t\t\t\t{ __( 'Learn more about manual excerpts' ) }\n\t\t\t</ExternalLink>\n\t\t</div>\n\t);\n}\n\nexport default PostExcerpt;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAKA,IAAAG,MAAA,GAAAH,OAAA;AAVA;AACA;AACA;;AAKA;AACA;AACA;;AAGA,SAASI,WAAWA,CAAA,EAAG;EACtB,MAAMC,OAAO,GAAG,IAAAC,eAAS,EACtBC,MAAM,IAAMA,MAAM,CAAEC,YAAY,CAAC,CAACC,sBAAsB,CAAE,SAAU,CAAC,EACvE,EACD,CAAC;EACD,MAAM;IAAEC;EAAS,CAAC,GAAG,IAAAC,iBAAW,EAAEH,YAAY,CAAC;EAE/C,OACC,IAAAI,MAAA,CAAAC,aAAA;IAAKC,SAAS,EAAC;EAAqB,GACnC,IAAAF,MAAA,CAAAC,aAAA,EAACZ,WAAA,CAAAc,eAAe;IACfC,uBAAuB;IACvBC,KAAK,EAAG,IAAAC,QAAE,EAAE,6BAA8B,CAAG;IAC7CJ,SAAS,EAAC,+BAA+B;IACzCK,QAAQ,EAAKC,KAAK,IAAMV,QAAQ,CAAE;MAAEL,OAAO,EAAEe;IAAM,CAAE,CAAG;IACxDA,KAAK,EAAGf;EAAS,CACjB,CAAC,EACF,IAAAO,MAAA,CAAAC,aAAA,EAACZ,WAAA,CAAAoB,YAAY;IACZC,IAAI,EAAG,IAAAJ,QAAE,EACR,iFACD;EAAG,GAED,IAAAA,QAAE,EAAE,kCAAmC,CAC5B,CACV,CAAC;AAER;AAAC,IAAAK,QAAA,GAEcnB,WAAW;AAAAoB,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
1
+ {"version":3,"names":["_i18n","require","_components","_data","_store","PostExcerpt","excerpt","useSelect","select","editorStore","getEditedPostAttribute","editPost","useDispatch","_react","createElement","className","TextareaControl","__nextHasNoMarginBottom","label","__","onChange","value","ExternalLink","href","_default","exports","default"],"sources":["@wordpress/editor/src/components/post-excerpt/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { ExternalLink, TextareaControl } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nfunction PostExcerpt() {\n\tconst excerpt = useSelect(\n\t\t( select ) => select( editorStore ).getEditedPostAttribute( 'excerpt' ),\n\t\t[]\n\t);\n\tconst { editPost } = useDispatch( editorStore );\n\n\treturn (\n\t\t<div className=\"editor-post-excerpt\">\n\t\t\t<TextareaControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tlabel={ __( 'Write an excerpt (optional)' ) }\n\t\t\t\tclassName=\"editor-post-excerpt__textarea\"\n\t\t\t\tonChange={ ( value ) => editPost( { excerpt: value } ) }\n\t\t\t\tvalue={ excerpt }\n\t\t\t/>\n\t\t\t<ExternalLink\n\t\t\t\thref={ __(\n\t\t\t\t\t'https://wordpress.org/documentation/article/page-post-settings-sidebar/#excerpt'\n\t\t\t\t) }\n\t\t\t>\n\t\t\t\t{ __( 'Learn more about manual excerpts' ) }\n\t\t\t</ExternalLink>\n\t\t</div>\n\t);\n}\n\nexport default PostExcerpt;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAKA,IAAAG,MAAA,GAAAH,OAAA;AAVA;AACA;AACA;;AAKA;AACA;AACA;;AAGA,SAASI,WAAWA,CAAA,EAAG;EACtB,MAAMC,OAAO,GAAG,IAAAC,eAAS,EACtBC,MAAM,IAAMA,MAAM,CAAEC,YAAY,CAAC,CAACC,sBAAsB,CAAE,SAAU,CAAC,EACvE,EACD,CAAC;EACD,MAAM;IAAEC;EAAS,CAAC,GAAG,IAAAC,iBAAW,EAAEH,YAAY,CAAC;EAE/C,OACC,IAAAI,MAAA,CAAAC,aAAA;IAAKC,SAAS,EAAC;EAAqB,GACnC,IAAAF,MAAA,CAAAC,aAAA,EAACZ,WAAA,CAAAc,eAAe;IACfC,uBAAuB;IACvBC,KAAK,EAAG,IAAAC,QAAE,EAAE,6BAA8B,CAAG;IAC7CJ,SAAS,EAAC,+BAA+B;IACzCK,QAAQ,EAAKC,KAAK,IAAMV,QAAQ,CAAE;MAAEL,OAAO,EAAEe;IAAM,CAAE,CAAG;IACxDA,KAAK,EAAGf;EAAS,CACjB,CAAC,EACF,IAAAO,MAAA,CAAAC,aAAA,EAACZ,WAAA,CAAAoB,YAAY;IACZC,IAAI,EAAG,IAAAJ,QAAE,EACR,iFACD;EAAG,GAED,IAAAA,QAAE,EAAE,kCAAmC,CAC5B,CACV,CAAC;AAER;AAAC,IAAAK,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcrB,WAAW"}
@@ -67,6 +67,5 @@ const PluginPostExcerpt = ({
67
67
  }, children));
68
68
  };
69
69
  PluginPostExcerpt.Slot = Slot;
70
- var _default = PluginPostExcerpt;
71
- exports.default = _default;
70
+ var _default = exports.default = PluginPostExcerpt;
72
71
  //# sourceMappingURL=plugin.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","Fill","Slot","createSlotFill","PluginPostExcerpt","children","className","_react","createElement","PanelRow","_default","exports","default"],"sources":["@wordpress/editor/src/components/post-excerpt/plugin.js"],"sourcesContent":["/**\n * Defines as extensibility slot for the Excerpt panel.\n */\n\n/**\n * WordPress dependencies\n */\nimport { createSlotFill, PanelRow } from '@wordpress/components';\n\nconst { Fill, Slot } = createSlotFill( 'PluginPostExcerpt' );\n\n/**\n * Renders a post excerpt panel in the post sidebar.\n *\n * @param {Object} props Component properties.\n * @param {string} [props.className] An optional class name added to the row.\n * @param {Element} props.children Children to be rendered.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var PluginPostExcerpt = wp.editPost.PluginPostExcerpt;\n *\n * function MyPluginPostExcerpt() {\n * \treturn React.createElement(\n * \t\tPluginPostExcerpt,\n * \t\t{\n * \t\t\tclassName: 'my-plugin-post-excerpt',\n * \t\t},\n * \t\t__( 'Post excerpt custom content' )\n * \t)\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PluginPostExcerpt } from '@wordpress/edit-post';\n *\n * const MyPluginPostExcerpt = () => (\n * \t<PluginPostExcerpt className=\"my-plugin-post-excerpt\">\n * \t\t{ __( 'Post excerpt custom content' ) }\n * \t</PluginPostExcerpt>\n * );\n * ```\n *\n * @return {Component} The component to be rendered.\n */\nconst PluginPostExcerpt = ( { children, className } ) => {\n\treturn (\n\t\t<Fill>\n\t\t\t<PanelRow className={ className }>{ children }</PanelRow>\n\t\t</Fill>\n\t);\n};\n\nPluginPostExcerpt.Slot = Slot;\n\nexport default PluginPostExcerpt;\n"],"mappings":";;;;;;;AAOA,IAAAA,WAAA,GAAAC,OAAA;AAPA;AACA;AACA;;AAEA;AACA;AACA;;AAGA,MAAM;EAAEC,IAAI;EAAEC;AAAK,CAAC,GAAG,IAAAC,0BAAc,EAAE,mBAAoB,CAAC;;AAE5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,iBAAiB,GAAGA,CAAE;EAAEC,QAAQ;EAAEC;AAAU,CAAC,KAAM;EACxD,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACP,IAAI,QACJ,IAAAM,MAAA,CAAAC,aAAA,EAACT,WAAA,CAAAU,QAAQ;IAACH,SAAS,EAAGA;EAAW,GAAGD,QAAoB,CACnD,CAAC;AAET,CAAC;AAEDD,iBAAiB,CAACF,IAAI,GAAGA,IAAI;AAAC,IAAAQ,QAAA,GAEfN,iBAAiB;AAAAO,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
1
+ {"version":3,"names":["_components","require","Fill","Slot","createSlotFill","PluginPostExcerpt","children","className","_react","createElement","PanelRow","_default","exports","default"],"sources":["@wordpress/editor/src/components/post-excerpt/plugin.js"],"sourcesContent":["/**\n * Defines as extensibility slot for the Excerpt panel.\n */\n\n/**\n * WordPress dependencies\n */\nimport { createSlotFill, PanelRow } from '@wordpress/components';\n\nconst { Fill, Slot } = createSlotFill( 'PluginPostExcerpt' );\n\n/**\n * Renders a post excerpt panel in the post sidebar.\n *\n * @param {Object} props Component properties.\n * @param {string} [props.className] An optional class name added to the row.\n * @param {Element} props.children Children to be rendered.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var PluginPostExcerpt = wp.editPost.PluginPostExcerpt;\n *\n * function MyPluginPostExcerpt() {\n * \treturn React.createElement(\n * \t\tPluginPostExcerpt,\n * \t\t{\n * \t\t\tclassName: 'my-plugin-post-excerpt',\n * \t\t},\n * \t\t__( 'Post excerpt custom content' )\n * \t)\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PluginPostExcerpt } from '@wordpress/edit-post';\n *\n * const MyPluginPostExcerpt = () => (\n * \t<PluginPostExcerpt className=\"my-plugin-post-excerpt\">\n * \t\t{ __( 'Post excerpt custom content' ) }\n * \t</PluginPostExcerpt>\n * );\n * ```\n *\n * @return {Component} The component to be rendered.\n */\nconst PluginPostExcerpt = ( { children, className } ) => {\n\treturn (\n\t\t<Fill>\n\t\t\t<PanelRow className={ className }>{ children }</PanelRow>\n\t\t</Fill>\n\t);\n};\n\nPluginPostExcerpt.Slot = Slot;\n\nexport default PluginPostExcerpt;\n"],"mappings":";;;;;;;AAOA,IAAAA,WAAA,GAAAC,OAAA;AAPA;AACA;AACA;;AAEA;AACA;AACA;;AAGA,MAAM;EAAEC,IAAI;EAAEC;AAAK,CAAC,GAAG,IAAAC,0BAAc,EAAE,mBAAoB,CAAC;;AAE5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,iBAAiB,GAAGA,CAAE;EAAEC,QAAQ;EAAEC;AAAU,CAAC,KAAM;EACxD,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACP,IAAI,QACJ,IAAAM,MAAA,CAAAC,aAAA,EAACT,WAAA,CAAAU,QAAQ;IAACH,SAAS,EAAGA;EAAW,GAAGD,QAAoB,CACnD,CAAC;AAET,CAAC;AAEDD,iBAAiB,CAACF,IAAI,GAAGA,IAAI;AAAC,IAAAQ,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEfR,iBAAiB"}
@@ -21,6 +21,5 @@ function PostFeaturedImageCheck({
21
21
  supportKeys: "thumbnail"
22
22
  }, children));
23
23
  }
24
- var _default = PostFeaturedImageCheck;
25
- exports.default = _default;
24
+ var _default = exports.default = PostFeaturedImageCheck;
26
25
  //# sourceMappingURL=check.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_postTypeSupportCheck","_interopRequireDefault","require","_themeSupportCheck","PostFeaturedImageCheck","children","_react","createElement","default","supportKeys","_default","exports"],"sources":["@wordpress/editor/src/components/post-featured-image/check.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport PostTypeSupportCheck from '../post-type-support-check';\nimport ThemeSupportCheck from '../theme-support-check';\n\nfunction PostFeaturedImageCheck( { children } ) {\n\treturn (\n\t\t<ThemeSupportCheck supportKeys=\"post-thumbnails\">\n\t\t\t<PostTypeSupportCheck supportKeys=\"thumbnail\">\n\t\t\t\t{ children }\n\t\t\t</PostTypeSupportCheck>\n\t\t</ThemeSupportCheck>\n\t);\n}\n\nexport default PostFeaturedImageCheck;\n"],"mappings":";;;;;;;;AAGA,IAAAA,qBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,kBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAJA;AACA;AACA;;AAIA,SAASE,sBAAsBA,CAAE;EAAEC;AAAS,CAAC,EAAG;EAC/C,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACJ,kBAAA,CAAAK,OAAiB;IAACC,WAAW,EAAC;EAAiB,GAC/C,IAAAH,MAAA,CAAAC,aAAA,EAACP,qBAAA,CAAAQ,OAAoB;IAACC,WAAW,EAAC;EAAW,GAC1CJ,QACmB,CACJ,CAAC;AAEtB;AAAC,IAAAK,QAAA,GAEcN,sBAAsB;AAAAO,OAAA,CAAAH,OAAA,GAAAE,QAAA"}
1
+ {"version":3,"names":["_postTypeSupportCheck","_interopRequireDefault","require","_themeSupportCheck","PostFeaturedImageCheck","children","_react","createElement","default","supportKeys","_default","exports"],"sources":["@wordpress/editor/src/components/post-featured-image/check.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport PostTypeSupportCheck from '../post-type-support-check';\nimport ThemeSupportCheck from '../theme-support-check';\n\nfunction PostFeaturedImageCheck( { children } ) {\n\treturn (\n\t\t<ThemeSupportCheck supportKeys=\"post-thumbnails\">\n\t\t\t<PostTypeSupportCheck supportKeys=\"thumbnail\">\n\t\t\t\t{ children }\n\t\t\t</PostTypeSupportCheck>\n\t\t</ThemeSupportCheck>\n\t);\n}\n\nexport default PostFeaturedImageCheck;\n"],"mappings":";;;;;;;;AAGA,IAAAA,qBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,kBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAJA;AACA;AACA;;AAIA,SAASE,sBAAsBA,CAAE;EAAEC;AAAS,CAAC,EAAG;EAC/C,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACJ,kBAAA,CAAAK,OAAiB;IAACC,WAAW,EAAC;EAAiB,GAC/C,IAAAH,MAAA,CAAAC,aAAA,EAACP,qBAAA,CAAAQ,OAAoB;IAACC,WAAW,EAAC;EAAW,GAC1CJ,QACmB,CACJ,CAAC;AAEtB;AAAC,IAAAK,QAAA,GAAAC,OAAA,CAAAH,OAAA,GAEcJ,sBAAsB"}
@@ -208,6 +208,5 @@ const applyWithDispatch = (0, _data.withDispatch)((dispatch, {
208
208
  }
209
209
  };
210
210
  });
211
- var _default = (0, _compose.compose)(_components.withNotices, applyWithSelect, applyWithDispatch, (0, _components.withFilters)('editor.PostFeaturedImage'))(PostFeaturedImage);
212
- exports.default = _default;
211
+ var _default = exports.default = (0, _compose.compose)(_components.withNotices, applyWithSelect, applyWithDispatch, (0, _components.withFilters)('editor.PostFeaturedImage'))(PostFeaturedImage);
213
212
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_hooks","_components","_blob","_element","_compose","_data","_blockEditor","_coreData","_check","_interopRequireDefault","_store","ALLOWED_MEDIA_TYPES","DEFAULT_FEATURE_IMAGE_LABEL","__","DEFAULT_SET_FEATURE_IMAGE_LABEL","instructions","_react","createElement","getMediaDetails","media","postId","_media$media_details$","_media$media_details$2","defaultSize","applyFilters","id","media_details","sizes","mediaWidth","width","mediaHeight","height","mediaSourceUrl","source_url","fallbackSize","PostFeaturedImage","currentPostId","featuredImageId","onUpdateImage","onRemoveImage","postType","noticeUI","noticeOperations","toggleRef","useRef","isLoading","setIsLoading","useState","getSettings","useSelect","blockEditorStore","onDropFiles","filesList","mediaUpload","allowedTypes","onFileChange","image","isBlobURL","url","onError","message","removeAllNotices","createErrorNotice","default","className","alt_text","sprintf","full","file","slug","MediaUploadCheck","fallback","MediaUpload","title","labels","featured_image","onSelect","unstableFeaturedImageFlow","modalClass","render","open","Button","ref","onClick","ResponsiveWrapper","naturalWidth","naturalHeight","isInline","src","alt","Spinner","set_featured_image","__experimentalHStack","current","focus","DropZone","onFilesDrop","value","applyWithSelect","withSelect","select","getMedia","getPostType","coreStore","getCurrentPostId","getEditedPostAttribute","editorStore","context","applyWithDispatch","withDispatch","dispatch","editPost","featured_media","onDropImage","_default","compose","withNotices","withFilters","exports"],"sources":["@wordpress/editor/src/components/post-featured-image/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { applyFilters } from '@wordpress/hooks';\nimport {\n\tDropZone,\n\tButton,\n\tSpinner,\n\tResponsiveWrapper,\n\twithNotices,\n\twithFilters,\n\t__experimentalHStack as HStack,\n} from '@wordpress/components';\nimport { isBlobURL } from '@wordpress/blob';\nimport { useState, useRef } from '@wordpress/element';\nimport { compose } from '@wordpress/compose';\nimport { useSelect, withDispatch, withSelect } from '@wordpress/data';\nimport {\n\tMediaUpload,\n\tMediaUploadCheck,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport PostFeaturedImageCheck from './check';\nimport { store as editorStore } from '../../store';\n\nconst ALLOWED_MEDIA_TYPES = [ 'image' ];\n\n// Used when labels from post type were not yet loaded or when they are not present.\nconst DEFAULT_FEATURE_IMAGE_LABEL = __( 'Featured image' );\nconst DEFAULT_SET_FEATURE_IMAGE_LABEL = __( 'Set featured image' );\n\nconst instructions = (\n\t<p>\n\t\t{ __(\n\t\t\t'To edit the featured image, you need permission to upload media.'\n\t\t) }\n\t</p>\n);\n\nfunction getMediaDetails( media, postId ) {\n\tif ( ! media ) {\n\t\treturn {};\n\t}\n\n\tconst defaultSize = applyFilters(\n\t\t'editor.PostFeaturedImage.imageSize',\n\t\t'large',\n\t\tmedia.id,\n\t\tpostId\n\t);\n\tif ( defaultSize in ( media?.media_details?.sizes ?? {} ) ) {\n\t\treturn {\n\t\t\tmediaWidth: media.media_details.sizes[ defaultSize ].width,\n\t\t\tmediaHeight: media.media_details.sizes[ defaultSize ].height,\n\t\t\tmediaSourceUrl: media.media_details.sizes[ defaultSize ].source_url,\n\t\t};\n\t}\n\n\t// Use fallbackSize when defaultSize is not available.\n\tconst fallbackSize = applyFilters(\n\t\t'editor.PostFeaturedImage.imageSize',\n\t\t'thumbnail',\n\t\tmedia.id,\n\t\tpostId\n\t);\n\tif ( fallbackSize in ( media?.media_details?.sizes ?? {} ) ) {\n\t\treturn {\n\t\t\tmediaWidth: media.media_details.sizes[ fallbackSize ].width,\n\t\t\tmediaHeight: media.media_details.sizes[ fallbackSize ].height,\n\t\t\tmediaSourceUrl:\n\t\t\t\tmedia.media_details.sizes[ fallbackSize ].source_url,\n\t\t};\n\t}\n\n\t// Use full image size when fallbackSize and defaultSize are not available.\n\treturn {\n\t\tmediaWidth: media.media_details.width,\n\t\tmediaHeight: media.media_details.height,\n\t\tmediaSourceUrl: media.source_url,\n\t};\n}\n\nfunction PostFeaturedImage( {\n\tcurrentPostId,\n\tfeaturedImageId,\n\tonUpdateImage,\n\tonRemoveImage,\n\tmedia,\n\tpostType,\n\tnoticeUI,\n\tnoticeOperations,\n} ) {\n\tconst toggleRef = useRef();\n\tconst [ isLoading, setIsLoading ] = useState( false );\n\tconst { getSettings } = useSelect( blockEditorStore );\n\tconst { mediaWidth, mediaHeight, mediaSourceUrl } = getMediaDetails(\n\t\tmedia,\n\t\tcurrentPostId\n\t);\n\n\tfunction onDropFiles( filesList ) {\n\t\tgetSettings().mediaUpload( {\n\t\t\tallowedTypes: ALLOWED_MEDIA_TYPES,\n\t\t\tfilesList,\n\t\t\tonFileChange( [ image ] ) {\n\t\t\t\tif ( isBlobURL( image?.url ) ) {\n\t\t\t\t\tsetIsLoading( true );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif ( image ) {\n\t\t\t\t\tonUpdateImage( image );\n\t\t\t\t}\n\t\t\t\tsetIsLoading( false );\n\t\t\t},\n\t\t\tonError( message ) {\n\t\t\t\tnoticeOperations.removeAllNotices();\n\t\t\t\tnoticeOperations.createErrorNotice( message );\n\t\t\t},\n\t\t} );\n\t}\n\n\treturn (\n\t\t<PostFeaturedImageCheck>\n\t\t\t{ noticeUI }\n\t\t\t<div className=\"editor-post-featured-image\">\n\t\t\t\t{ media && (\n\t\t\t\t\t<div\n\t\t\t\t\t\tid={ `editor-post-featured-image-${ featuredImageId }-describedby` }\n\t\t\t\t\t\tclassName=\"hidden\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ media.alt_text &&\n\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t// Translators: %s: The selected image alt text.\n\t\t\t\t\t\t\t\t__( 'Current image: %s' ),\n\t\t\t\t\t\t\t\tmedia.alt_text\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ ! media.alt_text &&\n\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t// Translators: %s: The selected image filename.\n\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t'The current image has no alternative text. The file name is: %s'\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tmedia.media_details.sizes?.full?.file ||\n\t\t\t\t\t\t\t\t\tmedia.slug\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t\t<MediaUploadCheck fallback={ instructions }>\n\t\t\t\t\t<MediaUpload\n\t\t\t\t\t\ttitle={\n\t\t\t\t\t\t\tpostType?.labels?.featured_image ||\n\t\t\t\t\t\t\tDEFAULT_FEATURE_IMAGE_LABEL\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonSelect={ onUpdateImage }\n\t\t\t\t\t\tunstableFeaturedImageFlow\n\t\t\t\t\t\tallowedTypes={ ALLOWED_MEDIA_TYPES }\n\t\t\t\t\t\tmodalClass=\"editor-post-featured-image__media-modal\"\n\t\t\t\t\t\trender={ ( { open } ) => (\n\t\t\t\t\t\t\t<div className=\"editor-post-featured-image__container\">\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tref={ toggleRef }\n\t\t\t\t\t\t\t\t\tclassName={\n\t\t\t\t\t\t\t\t\t\t! featuredImageId\n\t\t\t\t\t\t\t\t\t\t\t? 'editor-post-featured-image__toggle'\n\t\t\t\t\t\t\t\t\t\t\t: 'editor-post-featured-image__preview'\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tonClick={ open }\n\t\t\t\t\t\t\t\t\taria-label={\n\t\t\t\t\t\t\t\t\t\t! featuredImageId\n\t\t\t\t\t\t\t\t\t\t\t? null\n\t\t\t\t\t\t\t\t\t\t\t: __( 'Edit or replace the image' )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\taria-describedby={\n\t\t\t\t\t\t\t\t\t\t! featuredImageId\n\t\t\t\t\t\t\t\t\t\t\t? null\n\t\t\t\t\t\t\t\t\t\t\t: `editor-post-featured-image-${ featuredImageId }-describedby`\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\t\t{ !! featuredImageId && media && (\n\t\t\t\t\t\t\t\t\t\t<ResponsiveWrapper\n\t\t\t\t\t\t\t\t\t\t\tnaturalWidth={ mediaWidth }\n\t\t\t\t\t\t\t\t\t\t\tnaturalHeight={ mediaHeight }\n\t\t\t\t\t\t\t\t\t\t\tisInline\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\t\t\tsrc={ mediaSourceUrl }\n\t\t\t\t\t\t\t\t\t\t\t\talt=\"\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</ResponsiveWrapper>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t{ isLoading && <Spinner /> }\n\t\t\t\t\t\t\t\t\t{ ! featuredImageId &&\n\t\t\t\t\t\t\t\t\t\t! isLoading &&\n\t\t\t\t\t\t\t\t\t\t( postType?.labels\n\t\t\t\t\t\t\t\t\t\t\t?.set_featured_image ||\n\t\t\t\t\t\t\t\t\t\t\tDEFAULT_SET_FEATURE_IMAGE_LABEL ) }\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t{ !! featuredImageId && (\n\t\t\t\t\t\t\t\t\t<HStack className=\"editor-post-featured-image__actions\">\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"editor-post-featured-image__action\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={ open }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ __( 'Replace' ) }\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"editor-post-featured-image__action\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\t\t\tonRemoveImage();\n\t\t\t\t\t\t\t\t\t\t\t\ttoggleRef.current.focus();\n\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ __( 'Remove' ) }\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t<DropZone onFilesDrop={ onDropFiles } />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tvalue={ featuredImageId }\n\t\t\t\t\t/>\n\t\t\t\t</MediaUploadCheck>\n\t\t\t</div>\n\t\t</PostFeaturedImageCheck>\n\t);\n}\n\nconst applyWithSelect = withSelect( ( select ) => {\n\tconst { getMedia, getPostType } = select( coreStore );\n\tconst { getCurrentPostId, getEditedPostAttribute } = select( editorStore );\n\tconst featuredImageId = getEditedPostAttribute( 'featured_media' );\n\n\treturn {\n\t\tmedia: featuredImageId\n\t\t\t? getMedia( featuredImageId, { context: 'view' } )\n\t\t\t: null,\n\t\tcurrentPostId: getCurrentPostId(),\n\t\tpostType: getPostType( getEditedPostAttribute( 'type' ) ),\n\t\tfeaturedImageId,\n\t};\n} );\n\nconst applyWithDispatch = withDispatch(\n\t( dispatch, { noticeOperations }, { select } ) => {\n\t\tconst { editPost } = dispatch( editorStore );\n\t\treturn {\n\t\t\tonUpdateImage( image ) {\n\t\t\t\teditPost( { featured_media: image.id } );\n\t\t\t},\n\t\t\tonDropImage( filesList ) {\n\t\t\t\tselect( blockEditorStore )\n\t\t\t\t\t.getSettings()\n\t\t\t\t\t.mediaUpload( {\n\t\t\t\t\t\tallowedTypes: [ 'image' ],\n\t\t\t\t\t\tfilesList,\n\t\t\t\t\t\tonFileChange( [ image ] ) {\n\t\t\t\t\t\t\teditPost( { featured_media: image.id } );\n\t\t\t\t\t\t},\n\t\t\t\t\t\tonError( message ) {\n\t\t\t\t\t\t\tnoticeOperations.removeAllNotices();\n\t\t\t\t\t\t\tnoticeOperations.createErrorNotice( message );\n\t\t\t\t\t\t},\n\t\t\t\t\t} );\n\t\t\t},\n\t\t\tonRemoveImage() {\n\t\t\t\teditPost( { featured_media: 0 } );\n\t\t\t},\n\t\t};\n\t}\n);\n\nexport default compose(\n\twithNotices,\n\tapplyWithSelect,\n\tapplyWithDispatch,\n\twithFilters( 'editor.PostFeaturedImage' )\n)( PostFea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EAAEpE;AAAiB,CAAC,EAAE;EAAE0D;AAAO,CAAC,KAAM;EACjD,MAAM;IAAEW;EAAS,CAAC,GAAGD,QAAQ,CAAEJ,YAAY,CAAC;EAC5C,OAAO;IACNpE,aAAaA,CAAEkB,KAAK,EAAG;MACtBuD,QAAQ,CAAE;QAAEC,cAAc,EAAExD,KAAK,CAAC/B;MAAG,CAAE,CAAC;IACzC,CAAC;IACDwF,WAAWA,CAAE7D,SAAS,EAAG;MACxBgD,MAAM,CAAElD,kBAAiB,CAAC,CACxBF,WAAW,CAAC,CAAC,CACbK,WAAW,CAAE;QACbC,YAAY,EAAE,CAAE,OAAO,CAAE;QACzBF,SAAS;QACTG,YAAYA,CAAE,CAAEC,KAAK,CAAE,EAAG;UACzBuD,QAAQ,CAAE;YAAEC,cAAc,EAAExD,KAAK,CAAC/B;UAAG,CAAE,CAAC;QACzC,CAAC;QACDkC,OAAOA,CAAEC,OAAO,EAAG;UAClBlB,gBAAgB,CAACmB,gBAAgB,CAAC,CAAC;UACnCnB,gBAAgB,CAACoB,iBAAiB,CAAEF,OAAQ,CAAC;QAC9C;MACD,CAAE,CAAC;IACL,CAAC;IACDrB,aAAaA,CAAA,EAAG;MACfwE,QAAQ,CAAE;QAAEC,cAAc,EAAE;MAAE,CAAE,CAAC;IAClC;EACD,CAAC;AACF,CACD,CAAC;AAAC,IAAAE,QAAA,GAEa,IAAAC,gBAAO,EACrBC,uBAAW,EACXlB,eAAe,EACfU,iBAAiB,EACjB,IAAAS,uBAAW,EAAE,0BAA2B,CACzC,CAAC,CAAElF,iBAAkB,CAAC;AAAAmF,OAAA,CAAAvD,OAAA,GAAAmD,QAAA"}
1
+ {"version":3,"names":["_i18n","require","_hooks","_components","_blob","_element","_compose","_data","_blockEditor","_coreData","_check","_interopRequireDefault","_store","ALLOWED_MEDIA_TYPES","DEFAULT_FEATURE_IMAGE_LABEL","__","DEFAULT_SET_FEATURE_IMAGE_LABEL","instructions","_react","createElement","getMediaDetails","media","postId","_media$media_details$","_media$media_details$2","defaultSize","applyFilters","id","media_details","sizes","mediaWidth","width","mediaHeight","height","mediaSourceUrl","source_url","fallbackSize","PostFeaturedImage","currentPostId","featuredImageId","onUpdateImage","onRemoveImage","postType","noticeUI","noticeOperations","toggleRef","useRef","isLoading","setIsLoading","useState","getSettings","useSelect","blockEditorStore","onDropFiles","filesList","mediaUpload","allowedTypes","onFileChange","image","isBlobURL","url","onError","message","removeAllNotices","createErrorNotice","default","className","alt_text","sprintf","full","file","slug","MediaUploadCheck","fallback","MediaUpload","title","labels","featured_image","onSelect","unstableFeaturedImageFlow","modalClass","render","open","Button","ref","onClick","ResponsiveWrapper","naturalWidth","naturalHeight","isInline","src","alt","Spinner","set_featured_image","__experimentalHStack","current","focus","DropZone","onFilesDrop","value","applyWithSelect","withSelect","select","getMedia","getPostType","coreStore","getCurrentPostId","getEditedPostAttribute","editorStore","context","applyWithDispatch","withDispatch","dispatch","editPost","featured_media","onDropImage","_default","exports","compose","withNotices","withFilters"],"sources":["@wordpress/editor/src/components/post-featured-image/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { applyFilters } from '@wordpress/hooks';\nimport {\n\tDropZone,\n\tButton,\n\tSpinner,\n\tResponsiveWrapper,\n\twithNotices,\n\twithFilters,\n\t__experimentalHStack as HStack,\n} from '@wordpress/components';\nimport { isBlobURL } from '@wordpress/blob';\nimport { useState, useRef } from '@wordpress/element';\nimport { compose } from '@wordpress/compose';\nimport { useSelect, withDispatch, withSelect } from '@wordpress/data';\nimport {\n\tMediaUpload,\n\tMediaUploadCheck,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport PostFeaturedImageCheck from './check';\nimport { store as editorStore } from '../../store';\n\nconst ALLOWED_MEDIA_TYPES = [ 'image' ];\n\n// Used when labels from post type were not yet loaded or when they are not present.\nconst DEFAULT_FEATURE_IMAGE_LABEL = __( 'Featured image' );\nconst DEFAULT_SET_FEATURE_IMAGE_LABEL = __( 'Set featured image' );\n\nconst instructions = (\n\t<p>\n\t\t{ __(\n\t\t\t'To edit the featured image, you need permission to upload media.'\n\t\t) }\n\t</p>\n);\n\nfunction getMediaDetails( media, postId ) {\n\tif ( ! media ) {\n\t\treturn {};\n\t}\n\n\tconst defaultSize = applyFilters(\n\t\t'editor.PostFeaturedImage.imageSize',\n\t\t'large',\n\t\tmedia.id,\n\t\tpostId\n\t);\n\tif ( defaultSize in ( media?.media_details?.sizes ?? {} ) ) {\n\t\treturn {\n\t\t\tmediaWidth: media.media_details.sizes[ defaultSize ].width,\n\t\t\tmediaHeight: media.media_details.sizes[ defaultSize ].height,\n\t\t\tmediaSourceUrl: media.media_details.sizes[ defaultSize ].source_url,\n\t\t};\n\t}\n\n\t// Use fallbackSize when defaultSize is not available.\n\tconst fallbackSize = applyFilters(\n\t\t'editor.PostFeaturedImage.imageSize',\n\t\t'thumbnail',\n\t\tmedia.id,\n\t\tpostId\n\t);\n\tif ( fallbackSize in ( media?.media_details?.sizes ?? {} ) ) {\n\t\treturn {\n\t\t\tmediaWidth: media.media_details.sizes[ fallbackSize ].width,\n\t\t\tmediaHeight: media.media_details.sizes[ fallbackSize ].height,\n\t\t\tmediaSourceUrl:\n\t\t\t\tmedia.media_details.sizes[ fallbackSize ].source_url,\n\t\t};\n\t}\n\n\t// Use full image size when fallbackSize and defaultSize are not available.\n\treturn {\n\t\tmediaWidth: media.media_details.width,\n\t\tmediaHeight: media.media_details.height,\n\t\tmediaSourceUrl: media.source_url,\n\t};\n}\n\nfunction PostFeaturedImage( {\n\tcurrentPostId,\n\tfeaturedImageId,\n\tonUpdateImage,\n\tonRemoveImage,\n\tmedia,\n\tpostType,\n\tnoticeUI,\n\tnoticeOperations,\n} ) {\n\tconst toggleRef = useRef();\n\tconst [ isLoading, setIsLoading ] = useState( false );\n\tconst { getSettings } = useSelect( blockEditorStore );\n\tconst { mediaWidth, mediaHeight, mediaSourceUrl } = getMediaDetails(\n\t\tmedia,\n\t\tcurrentPostId\n\t);\n\n\tfunction onDropFiles( filesList ) {\n\t\tgetSettings().mediaUpload( {\n\t\t\tallowedTypes: ALLOWED_MEDIA_TYPES,\n\t\t\tfilesList,\n\t\t\tonFileChange( [ image ] ) {\n\t\t\t\tif ( isBlobURL( image?.url ) ) {\n\t\t\t\t\tsetIsLoading( true );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif ( image ) {\n\t\t\t\t\tonUpdateImage( image );\n\t\t\t\t}\n\t\t\t\tsetIsLoading( false );\n\t\t\t},\n\t\t\tonError( message ) {\n\t\t\t\tnoticeOperations.removeAllNotices();\n\t\t\t\tnoticeOperations.createErrorNotice( message );\n\t\t\t},\n\t\t} );\n\t}\n\n\treturn (\n\t\t<PostFeaturedImageCheck>\n\t\t\t{ noticeUI }\n\t\t\t<div className=\"editor-post-featured-image\">\n\t\t\t\t{ media && (\n\t\t\t\t\t<div\n\t\t\t\t\t\tid={ `editor-post-featured-image-${ featuredImageId }-describedby` }\n\t\t\t\t\t\tclassName=\"hidden\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ media.alt_text &&\n\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t// Translators: %s: The selected image alt text.\n\t\t\t\t\t\t\t\t__( 'Current image: %s' ),\n\t\t\t\t\t\t\t\tmedia.alt_text\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ ! media.alt_text &&\n\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t// Translators: %s: The selected image filename.\n\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t'The current image has no alternative text. The file name is: %s'\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tmedia.media_details.sizes?.full?.file ||\n\t\t\t\t\t\t\t\t\tmedia.slug\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t\t<MediaUploadCheck fallback={ instructions }>\n\t\t\t\t\t<MediaUpload\n\t\t\t\t\t\ttitle={\n\t\t\t\t\t\t\tpostType?.labels?.featured_image ||\n\t\t\t\t\t\t\tDEFAULT_FEATURE_IMAGE_LABEL\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonSelect={ onUpdateImage }\n\t\t\t\t\t\tunstableFeaturedImageFlow\n\t\t\t\t\t\tallowedTypes={ ALLOWED_MEDIA_TYPES }\n\t\t\t\t\t\tmodalClass=\"editor-post-featured-image__media-modal\"\n\t\t\t\t\t\trender={ ( { open } ) => (\n\t\t\t\t\t\t\t<div className=\"editor-post-featured-image__container\">\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tref={ toggleRef }\n\t\t\t\t\t\t\t\t\tclassName={\n\t\t\t\t\t\t\t\t\t\t! featuredImageId\n\t\t\t\t\t\t\t\t\t\t\t? 'editor-post-featured-image__toggle'\n\t\t\t\t\t\t\t\t\t\t\t: 'editor-post-featured-image__preview'\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tonClick={ open }\n\t\t\t\t\t\t\t\t\taria-label={\n\t\t\t\t\t\t\t\t\t\t! featuredImageId\n\t\t\t\t\t\t\t\t\t\t\t? null\n\t\t\t\t\t\t\t\t\t\t\t: __( 'Edit or replace the image' )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\taria-describedby={\n\t\t\t\t\t\t\t\t\t\t! featuredImageId\n\t\t\t\t\t\t\t\t\t\t\t? null\n\t\t\t\t\t\t\t\t\t\t\t: `editor-post-featured-image-${ featuredImageId }-describedby`\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\t\t{ !! featuredImageId && media && (\n\t\t\t\t\t\t\t\t\t\t<ResponsiveWrapper\n\t\t\t\t\t\t\t\t\t\t\tnaturalWidth={ mediaWidth }\n\t\t\t\t\t\t\t\t\t\t\tnaturalHeight={ mediaHeight }\n\t\t\t\t\t\t\t\t\t\t\tisInline\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\t\t\tsrc={ mediaSourceUrl }\n\t\t\t\t\t\t\t\t\t\t\t\talt=\"\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</ResponsiveWrapper>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t{ isLoading && <Spinner /> }\n\t\t\t\t\t\t\t\t\t{ ! featuredImageId &&\n\t\t\t\t\t\t\t\t\t\t! isLoading &&\n\t\t\t\t\t\t\t\t\t\t( postType?.labels\n\t\t\t\t\t\t\t\t\t\t\t?.set_featured_image ||\n\t\t\t\t\t\t\t\t\t\t\tDEFAULT_SET_FEATURE_IMAGE_LABEL ) }\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t{ !! featuredImageId && (\n\t\t\t\t\t\t\t\t\t<HStack className=\"editor-post-featured-image__actions\">\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"editor-post-featured-image__action\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={ open }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ __( 'Replace' ) }\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"editor-post-featured-image__action\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\t\t\tonRemoveImage();\n\t\t\t\t\t\t\t\t\t\t\t\ttoggleRef.current.focus();\n\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ __( 'Remove' ) }\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t<DropZone onFilesDrop={ onDropFiles } />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tvalue={ featuredImageId }\n\t\t\t\t\t/>\n\t\t\t\t</MediaUploadCheck>\n\t\t\t</div>\n\t\t</PostFeaturedImageCheck>\n\t);\n}\n\nconst applyWithSelect = withSelect( ( select ) => {\n\tconst { getMedia, getPostType } = select( coreStore );\n\tconst { getCurrentPostId, getEditedPostAttribute } = select( editorStore );\n\tconst featuredImageId = getEditedPostAttribute( 'featured_media' );\n\n\treturn {\n\t\tmedia: featuredImageId\n\t\t\t? getMedia( featuredImageId, { context: 'view' } )\n\t\t\t: null,\n\t\tcurrentPostId: getCurrentPostId(),\n\t\tpostType: getPostType( getEditedPostAttribute( 'type' ) ),\n\t\tfeaturedImageId,\n\t};\n} );\n\nconst applyWithDispatch = withDispatch(\n\t( dispatch, { noticeOperations }, { select } ) => {\n\t\tconst { editPost } = dispatch( editorStore );\n\t\treturn {\n\t\t\tonUpdateImage( image ) {\n\t\t\t\teditPost( { featured_media: image.id } );\n\t\t\t},\n\t\t\tonDropImage( filesList ) {\n\t\t\t\tselect( blockEditorStore )\n\t\t\t\t\t.getSettings()\n\t\t\t\t\t.mediaUpload( {\n\t\t\t\t\t\tallowedTypes: [ 'image' ],\n\t\t\t\t\t\tfilesList,\n\t\t\t\t\t\tonFileChange( [ image ] ) {\n\t\t\t\t\t\t\teditPost( { featured_media: image.id } );\n\t\t\t\t\t\t},\n\t\t\t\t\t\tonError( message ) {\n\t\t\t\t\t\t\tnoticeOperations.removeAllNotices();\n\t\t\t\t\t\t\tnoticeOperations.createErrorNotice( message );\n\t\t\t\t\t\t},\n\t\t\t\t\t} );\n\t\t\t},\n\t\t\tonRemoveImage() {\n\t\t\t\teditPost( { featured_media: 0 } );\n\t\t\t},\n\t\t};\n\t}\n);\n\nexport default compose(\n\twithNotices,\n\tapplyWithSelect,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E,iBAAiB,GAAG,IAAAC,kBAAY,EACrC,CAAEC,QAAQ,EAAE;EAAEpE;AAAiB,CAAC,EAAE;EAAE0D;AAAO,CAAC,KAAM;EACjD,MAAM;IAAEW;EAAS,CAAC,GAAGD,QAAQ,CAAEJ,YAAY,CAAC;EAC5C,OAAO;IACNpE,aAAaA,CAAEkB,KAAK,EAAG;MACtBuD,QAAQ,CAAE;QAAEC,cAAc,EAAExD,KAAK,CAAC/B;MAAG,CAAE,CAAC;IACzC,CAAC;IACDwF,WAAWA,CAAE7D,SAAS,EAAG;MACxBgD,MAAM,CAAElD,kBAAiB,CAAC,CACxBF,WAAW,CAAC,CAAC,CACbK,WAAW,CAAE;QACbC,YAAY,EAAE,CAAE,OAAO,CAAE;QACzBF,SAAS;QACTG,YAAYA,CAAE,CAAEC,KAAK,CAAE,EAAG;UACzBuD,QAAQ,CAAE;YAAEC,cAAc,EAAExD,KAAK,CAAC/B;UAAG,CAAE,CAAC;QACzC,CAAC;QACDkC,OAAOA,CAAEC,OAAO,EAAG;UAClBlB,gBAAgB,CAACmB,gBAAgB,CAAC,CAAC;UACnCnB,gBAAgB,CAACoB,iBAAiB,CAAEF,OAAQ,CAAC;QAC9C;MACD,CAAE,CAAC;IACL,CAAC;IACDrB,aAAaA,CAAA,EAAG;MACfwE,QAAQ,CAAE;QAAEC,cAAc,EAAE;MAAE,CAAE,CAAC;IAClC;EACD,CAAC;AACF,CACD,CAAC;AAAC,IAAAE,QAAA,GAAAC,OAAA,CAAApD,OAAA,GAEa,IAAAqD,gBAAO,EACrBC,uBAAW,EACXnB,eAAe,EACfU,iBAAiB,EACjB,IAAAU,uBAAW,EAAE,0BAA2B,CACzC,CAAC,CAAEnF,iBAAkB,CAAC"}
@@ -55,6 +55,5 @@ function FeaturedImage() {
55
55
  onToggle: () => toggleEditorPanelOpened(PANEL_NAME)
56
56
  }, (0, _react.createElement)(_index.default, null)));
57
57
  }
58
- var _default = FeaturedImage;
59
- exports.default = _default;
58
+ var _default = exports.default = FeaturedImage;
60
59
  //# sourceMappingURL=panel.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_components","_data","_coreData","_store","_index","_interopRequireDefault","_check","PANEL_NAME","FeaturedImage","_postType$labels$feat","postType","isEnabled","isOpened","useSelect","select","getEditedPostAttribute","isEditorPanelEnabled","isEditorPanelOpened","editorStore","getPostType","coreStore","toggleEditorPanelOpened","useDispatch","_react","createElement","default","PanelBody","title","labels","featured_image","__","opened","onToggle","_default","exports"],"sources":["@wordpress/editor/src/components/post-featured-image/panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { PanelBody } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport PostFeaturedImage from './index';\nimport PostFeaturedImageCheck from './check';\n\nconst PANEL_NAME = 'featured-image';\n\nfunction FeaturedImage() {\n\tconst { postType, isEnabled, isOpened } = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetEditedPostAttribute,\n\t\t\tisEditorPanelEnabled,\n\t\t\tisEditorPanelOpened,\n\t\t} = select( editorStore );\n\t\tconst { getPostType } = select( coreStore );\n\n\t\treturn {\n\t\t\tpostType: getPostType( getEditedPostAttribute( 'type' ) ),\n\t\t\tisEnabled: isEditorPanelEnabled( PANEL_NAME ),\n\t\t\tisOpened: isEditorPanelOpened( PANEL_NAME ),\n\t\t};\n\t}, [] );\n\n\tconst { toggleEditorPanelOpened } = useDispatch( editorStore );\n\n\tif ( ! isEnabled ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PostFeaturedImageCheck>\n\t\t\t<PanelBody\n\t\t\t\ttitle={\n\t\t\t\t\tpostType?.labels?.featured_image ?? __( 'Featured image' )\n\t\t\t\t}\n\t\t\t\topened={ isOpened }\n\t\t\t\tonToggle={ () => toggleEditorPanelOpened( PANEL_NAME ) }\n\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GAAAlB,qBAAA,GACJC,QAAQ,EAAEkB,MAAM,EAAEC,cAAc,cAAApB,qBAAA,cAAAA,qBAAA,GAAI,IAAAqB,QAAE,EAAE,gBAAiB,CACzD;IACDC,MAAM,EAAGnB,QAAU;IACnBoB,QAAQ,EAAGA,CAAA,KAAMX,uBAAuB,CAAEd,UAAW;EAAG,GAExD,IAAAgB,MAAA,CAAAC,aAAA,EAACpB,MAAA,CAAAqB,OAAiB,MAAE,CACV,CACY,CAAC;AAE3B;AAAC,IAAAQ,QAAA,GAEczB,aAAa;AAAA0B,OAAA,CAAAT,OAAA,GAAAQ,QAAA"}
1
+ {"version":3,"names":["_i18n","require","_components","_data","_coreData","_store","_index","_interopRequireDefault","_check","PANEL_NAME","FeaturedImage","_postType$labels$feat","postType","isEnabled","isOpened","useSelect","select","getEditedPostAttribute","isEditorPanelEnabled","isEditorPanelOpened","editorStore","getPostType","coreStore","toggleEditorPanelOpened","useDispatch","_react","createElement","default","PanelBody","title","labels","featured_image","__","opened","onToggle","_default","exports"],"sources":["@wordpress/editor/src/components/post-featured-image/panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { PanelBody } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport PostFeaturedImage from './index';\nimport PostFeaturedImageCheck from './check';\n\nconst PANEL_NAME = 'featured-image';\n\nfunction FeaturedImage() {\n\tconst { postType, isEnabled, isOpened } = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetEditedPostAttribute,\n\t\t\tisEditorPanelEnabled,\n\t\t\tisEditorPanelOpened,\n\t\t} = select( editorStore );\n\t\tconst { getPostType } = select( coreStore );\n\n\t\treturn {\n\t\t\tpostType: getPostType( getEditedPostAttribute( 'type' ) ),\n\t\t\tisEnabled: isEditorPanelEnabled( PANEL_NAME ),\n\t\t\tisOpened: isEditorPanelOpened( PANEL_NAME ),\n\t\t};\n\t}, [] );\n\n\tconst { toggleEditorPanelOpened } = useDispatch( editorStore );\n\n\tif ( ! isEnabled ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PostFeaturedImageCheck>\n\t\t\t<PanelBody\n\t\t\t\ttitle={\n\t\t\t\t\tpostType?.labels?.featured_image ?? __( 'Featured image' )\n\t\t\t\t}\n\t\t\t\topened={ isOpened }\n\t\t\t\tonToggle={ () => toggleEditorPanelOpened( PANEL_NAME ) }\n\t\t\t>\n\t\t\t\t<PostFeaturedImage />\n\t\t\t</PanelBody>\n\t\t</PostFeaturedImageCheck>\n\t);\n}\n\nexport default FeaturedImage;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AAKA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,MAAA,GAAAD,sBAAA,CAAAN,OAAA;AAbA;AACA;AACA;;AAMA;AACA;AACA;;AAKA,MAAMQ,UAAU,GAAG,gBAAgB;AAEnC,SAASC,aAAaA,CAAA,EAAG;EAAA,IAAAC,qBAAA;EACxB,MAAM;IAAEC,QAAQ;IAAEC,SAAS;IAAEC;EAAS,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IAClE,MAAM;MACLC,sBAAsB;MACtBC,oBAAoB;MACpBC;IACD,CAAC,GAAGH,MAAM,CAAEI,YAAY,CAAC;IACzB,MAAM;MAAEC;IAAY,CAAC,GAAGL,MAAM,CAAEM,eAAU,CAAC;IAE3C,OAAO;MACNV,QAAQ,EAAES,WAAW,CAAEJ,sBAAsB,CAAE,MAAO,CAAE,CAAC;MACzDJ,SAAS,EAAEK,oBAAoB,CAAET,UAAW,CAAC;MAC7CK,QAAQ,EAAEK,mBAAmB,CAAEV,UAAW;IAC3C,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,MAAM;IAAEc;EAAwB,CAAC,GAAG,IAAAC,iBAAW,EAAEJ,YAAY,CAAC;EAE9D,IAAK,CAAEP,SAAS,EAAG;IAClB,OAAO,IAAI;EACZ;EAEA,OACC,IAAAY,MAAA,CAAAC,aAAA,EAAClB,MAAA,CAAAmB,OAAsB,QACtB,IAAAF,MAAA,CAAAC,aAAA,EAACxB,WAAA,CAAA0B,SAAS;IACTC,KAAK,GAAAlB,qBAAA,GACJC,QAAQ,EAAEkB,MAAM,EAAEC,cAAc,cAAApB,qBAAA,cAAAA,qBAAA,GAAI,IAAAqB,QAAE,EAAE,gBAAiB,CACzD;IACDC,MAAM,EAAGnB,QAAU;IACnBoB,QAAQ,EAAGA,CAAA,KAAMX,uBAAuB,CAAEd,UAAW;EAAG,GAExD,IAAAgB,MAAA,CAAAC,aAAA,EAACpB,MAAA,CAAAqB,OAAiB,MAAE,CACV,CACY,CAAC;AAE3B;AAAC,IAAAQ,QAAA,GAAAC,OAAA,CAAAT,OAAA,GAEcjB,aAAa"}
@@ -28,6 +28,5 @@ function PostFormatCheck({
28
28
  supportKeys: "post-formats"
29
29
  }, children);
30
30
  }
31
- var _default = PostFormatCheck;
32
- exports.default = _default;
31
+ var _default = exports.default = PostFormatCheck;
33
32
  //# sourceMappingURL=check.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","_postTypeSupportCheck","_interopRequireDefault","_store","PostFormatCheck","children","disablePostFormats","useSelect","select","editorStore","getEditorSettings","_react","createElement","default","supportKeys","_default","exports"],"sources":["@wordpress/editor/src/components/post-format/check.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport PostTypeSupportCheck from '../post-type-support-check';\nimport { store as editorStore } from '../../store';\n\nfunction PostFormatCheck( { children } ) {\n\tconst disablePostFormats = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).getEditorSettings().disablePostFormats,\n\t\t[]\n\t);\n\n\tif ( disablePostFormats ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PostTypeSupportCheck supportKeys=\"post-formats\">\n\t\t\t{ children }\n\t\t</PostTypeSupportCheck>\n\t);\n}\n\nexport default PostFormatCheck;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,qBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AATA;AACA;AACA;;AAGA;AACA;AACA;;AAIA,SAASI,eAAeA,CAAE;EAAEC;AAAS,CAAC,EAAG;EACxC,MAAMC,kBAAkB,GAAG,IAAAC,eAAS,EACjCC,MAAM,IACPA,MAAM,CAAEC,YAAY,CAAC,CAACC,iBAAiB,CAAC,CAAC,CAACJ,kBAAkB,EAC7D,EACD,CAAC;EAED,IAAKA,kBAAkB,EAAG;IACzB,OAAO,IAAI;EACZ;EAEA,OACC,IAAAK,MAAA,CAAAC,aAAA,EAACX,qBAAA,CAAAY,OAAoB;IAACC,WAAW,EAAC;EAAc,GAC7CT,QACmB,CAAC;AAEzB;AAAC,IAAAU,QAAA,GAEcX,eAAe;AAAAY,OAAA,CAAAH,OAAA,GAAAE,QAAA"}
1
+ {"version":3,"names":["_data","require","_postTypeSupportCheck","_interopRequireDefault","_store","PostFormatCheck","children","disablePostFormats","useSelect","select","editorStore","getEditorSettings","_react","createElement","default","supportKeys","_default","exports"],"sources":["@wordpress/editor/src/components/post-format/check.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport PostTypeSupportCheck from '../post-type-support-check';\nimport { store as editorStore } from '../../store';\n\nfunction PostFormatCheck( { children } ) {\n\tconst disablePostFormats = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).getEditorSettings().disablePostFormats,\n\t\t[]\n\t);\n\n\tif ( disablePostFormats ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PostTypeSupportCheck supportKeys=\"post-formats\">\n\t\t\t{ children }\n\t\t</PostTypeSupportCheck>\n\t);\n}\n\nexport default PostFormatCheck;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,qBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AATA;AACA;AACA;;AAGA;AACA;AACA;;AAIA,SAASI,eAAeA,CAAE;EAAEC;AAAS,CAAC,EAAG;EACxC,MAAMC,kBAAkB,GAAG,IAAAC,eAAS,EACjCC,MAAM,IACPA,MAAM,CAAEC,YAAY,CAAC,CAACC,iBAAiB,CAAC,CAAC,CAACJ,kBAAkB,EAC7D,EACD,CAAC;EAED,IAAKA,kBAAkB,EAAG;IACzB,OAAO,IAAI;EACZ;EAEA,OACC,IAAAK,MAAA,CAAAC,aAAA,EAACX,qBAAA,CAAAY,OAAoB;IAACC,WAAW,EAAC;EAAc,GAC7CT,QACmB,CAAC;AAEzB;AAAC,IAAAU,QAAA,GAAAC,OAAA,CAAAH,OAAA,GAEcT,eAAe"}
@@ -23,7 +23,7 @@ var _store = require("../../store");
23
23
  */
24
24
 
25
25
  // All WP post formats, sorted alphabetically by translated name.
26
- const POST_FORMATS = [{
26
+ const POST_FORMATS = exports.POST_FORMATS = [{
27
27
  id: 'aside',
28
28
  caption: (0, _i18n.__)('Aside')
29
29
  }, {
@@ -64,7 +64,6 @@ const POST_FORMATS = [{
64
64
  }
65
65
  return 0;
66
66
  });
67
- exports.POST_FORMATS = POST_FORMATS;
68
67
  function PostFormat() {
69
68
  const instanceId = (0, _compose.useInstanceId)(PostFormat);
70
69
  const postFormatSelectorId = `post-format-selector-${instanceId}`;
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_components","_data","_compose","_coreData","_check","_interopRequireDefault","_store","POST_FORMATS","id","caption","__","sort","a","b","normalizedA","toUpperCase","normalizedB","exports","PostFormat","instanceId","useInstanceId","postFormatSelectorId","postFormat","suggestedFormat","supportedFormats","useSelect","select","getEditedPostAttribute","getSuggestedPostFormat","editorStore","_postFormat","themeSupports","coreStore","getThemeSupports","formats","filter","format","includes","suggestion","find","editPost","useDispatch","onUpdatePostFormat","_react","createElement","default","className","SelectControl","__nextHasNoMarginBottom","label","value","onChange","options","map","Button","variant","onClick","sprintf"],"sources":["@wordpress/editor/src/components/post-format/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Button, SelectControl } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useInstanceId } from '@wordpress/compose';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport PostFormatCheck from './check';\nimport { store as editorStore } from '../../store';\n\n// All WP post formats, sorted alphabetically by translated name.\nexport const POST_FORMATS = [\n\t{ id: 'aside', caption: __( 'Aside' ) },\n\t{ id: 'audio', caption: __( 'Audio' ) },\n\t{ id: 'chat', caption: __( 'Chat' ) },\n\t{ id: 'gallery', caption: __( 'Gallery' ) },\n\t{ id: 'image', caption: __( 'Image' ) },\n\t{ id: 'link', caption: __( 'Link' ) },\n\t{ id: 'quote', caption: __( 'Quote' ) },\n\t{ id: 'standard', caption: __( 'Standard' ) },\n\t{ id: 'status', caption: __( 'Status' ) },\n\t{ id: 'video', caption: __( 'Video' ) },\n].sort( ( a, b ) => {\n\tconst normalizedA = a.caption.toUpperCase();\n\tconst normalizedB = b.caption.toUpperCase();\n\n\tif ( normalizedA < normalizedB ) {\n\t\treturn -1;\n\t}\n\tif ( normalizedA > normalizedB ) {\n\t\treturn 1;\n\t}\n\treturn 0;\n} );\n\nexport default function PostFormat() {\n\tconst instanceId = useInstanceId( PostFormat );\n\tconst postFormatSelectorId = `post-format-selector-${ instanceId }`;\n\n\tconst { postFormat, suggestedFormat, supportedFormats } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedPostAttribute, getSuggestedPostFormat } =\n\t\t\t\tselect( editorStore );\n\t\t\tconst _postFormat = getEditedPostAttribute( 'format' );\n\t\t\tconst themeSupports = select( coreStore ).getThemeSupports();\n\t\t\treturn {\n\t\t\t\tpostFormat: _postFormat ?? 'standard',\n\t\t\t\tsuggestedFormat: getSuggestedPostFormat(),\n\t\t\t\tsupportedFormats: themeSupports.formats,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst formats = POST_FORMATS.filter( ( format ) => {\n\t\t// Ensure current format is always in the set.\n\t\t// The current format may not be a format supported by the theme.\n\t\treturn (\n\t\t\tsupportedFormats?.includes( format.id ) || postFormat === format.id\n\t\t);\n\t} );\n\tconst suggestion = formats.find(\n\t\t( format ) => format.id === suggestedFormat\n\t);\n\n\tconst { editPost } = useDispatch( editorStore );\n\n\tconst onUpdatePostFormat = ( format ) => editPost( { format } );\n\n\treturn (\n\t\t<PostFormatCheck>\n\t\t\t<div className=\"editor-post-format\">\n\t\t\t\t<SelectControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Post Format' ) }\n\t\t\t\t\tvalue={ postFormat }\n\t\t\t\t\tonChange={ ( format ) => onUpdatePostFormat( format ) }\n\t\t\t\t\tid={ postFormatSelectorId }\n\t\t\t\t\toptions={ formats.map( ( format ) => ( {\n\t\t\t\t\t\tlabel: format.caption,\n\t\t\t\t\t\tvalue: format.id,\n\t\t\t\t\t} ) ) }\n\t\t\t\t/>\n\t\t\t\t{ suggestion && suggestion.id !== postFormat && (\n\t\t\t\t\t<p className=\"editor-post-format__suggestion\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\tonUpdatePostFormat( suggestion.id )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: post format */\n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AkB,CAAEJ,UAAU,CAAC9B,EAAG;EAClC,GAEC,IAAAiD,aAAO,GACR;EACA,IAAA/C,QAAE,EAAE,4BAA6B,CAAC,EAClC4B,UAAU,CAAC7B,OACZ,CACO,CACN,CAEA,CACW,CAAC;AAEpB"}
1
+ {"version":3,"names":["_i18n","require","_components","_data","_compose","_coreData","_check","_interopRequireDefault","_store","POST_FORMATS","exports","id","caption","__","sort","a","b","normalizedA","toUpperCase","normalizedB","PostFormat","instanceId","useInstanceId","postFormatSelectorId","postFormat","suggestedFormat","supportedFormats","useSelect","select","getEditedPostAttribute","getSuggestedPostFormat","editorStore","_postFormat","themeSupports","coreStore","getThemeSupports","formats","filter","format","includes","suggestion","find","editPost","useDispatch","onUpdatePostFormat","_react","createElement","default","className","SelectControl","__nextHasNoMarginBottom","label","value","onChange","options","map","Button","variant","onClick","sprintf"],"sources":["@wordpress/editor/src/components/post-format/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Button, SelectControl } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useInstanceId } from '@wordpress/compose';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport PostFormatCheck from './check';\nimport { store as editorStore } from '../../store';\n\n// All WP post formats, sorted alphabetically by translated name.\nexport const POST_FORMATS = [\n\t{ id: 'aside', caption: __( 'Aside' ) },\n\t{ id: 'audio', caption: __( 'Audio' ) },\n\t{ id: 'chat', caption: __( 'Chat' ) },\n\t{ id: 'gallery', caption: __( 'Gallery' ) },\n\t{ id: 'image', caption: __( 'Image' ) },\n\t{ id: 'link', caption: __( 'Link' ) },\n\t{ id: 'quote', caption: __( 'Quote' ) },\n\t{ id: 'standard', caption: __( 'Standard' ) },\n\t{ id: 'status', caption: __( 'Status' ) },\n\t{ id: 'video', caption: __( 'Video' ) },\n].sort( ( a, b ) => {\n\tconst normalizedA = a.caption.toUpperCase();\n\tconst normalizedB = b.caption.toUpperCase();\n\n\tif ( normalizedA < normalizedB ) {\n\t\treturn -1;\n\t}\n\tif ( normalizedA > normalizedB ) {\n\t\treturn 1;\n\t}\n\treturn 0;\n} );\n\nexport default function PostFormat() {\n\tconst instanceId = useInstanceId( PostFormat );\n\tconst postFormatSelectorId = `post-format-selector-${ instanceId }`;\n\n\tconst { postFormat, suggestedFormat, supportedFormats } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedPostAttribute, getSuggestedPostFormat } =\n\t\t\t\tselect( editorStore );\n\t\t\tconst _postFormat = getEditedPostAttribute( 'format' );\n\t\t\tconst themeSupports = select( coreStore ).getThemeSupports();\n\t\t\treturn {\n\t\t\t\tpostFormat: _postFormat ?? 'standard',\n\t\t\t\tsuggestedFormat: getSuggestedPostFormat(),\n\t\t\t\tsupportedFormats: themeSupports.formats,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst formats = POST_FORMATS.filter( ( format ) => {\n\t\t// Ensure current format is always in the set.\n\t\t// The current format may not be a format supported by the theme.\n\t\treturn (\n\t\t\tsupportedFormats?.includes( format.id ) || postFormat === format.id\n\t\t);\n\t} );\n\tconst suggestion = formats.find(\n\t\t( format ) => format.id === suggestedFormat\n\t);\n\n\tconst { editPost } = useDispatch( editorStore );\n\n\tconst onUpdatePostFormat = ( format ) => editPost( { format } );\n\n\treturn (\n\t\t<PostFormatCheck>\n\t\t\t<div className=\"editor-post-format\">\n\t\t\t\t<SelectControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Post Format' ) }\n\t\t\t\t\tvalue={ postFormat }\n\t\t\t\t\tonChange={ ( format ) => onUpdatePostFormat( format ) }\n\t\t\t\t\tid={ postFormatSelectorId }\n\t\t\t\t\toptions={ formats.map( ( format ) => ( {\n\t\t\t\t\t\tlabel: format.caption,\n\t\t\t\t\t\tvalue: format.id,\n\t\t\t\t\t} ) ) }\n\t\t\t\t/>\n\t\t\t\t{ suggestion && suggestion.id !== postFormat && (\n\t\t\t\t\t<p className=\"editor-post-format__suggestion\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\tonUpdatePostFormat( suggestion.id )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: post format */\n\t\t\t\t\t\t\t\t__( 'Apply suggested format: %s' ),\n\t\t\t\t\t\t\t\tsuggestion.caption\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</p>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</PostFormatCheck>\n\t);\n}\n"],"mappings":";;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AAKA,IAAAK,MAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AAbA;AACA;AACA;;AAOA;AACA;AACA;;AAIA;AACO,MAAMQ,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG,CAC3B;EAAEE,EAAE,EAAE,OAAO;EAAEC,OAAO,EAAE,IAAAC,QAAE,EAAE,OAAQ;AAAE,CAAC,EACvC;EAAEF,EAAE,EAAE,OAAO;EAAEC,OAAO,EAAE,IAAAC,QAAE,EAAE,OAAQ;AAAE,CAAC,EACvC;EAAEF,EAAE,EAAE,MAAM;EAAEC,OAAO,EAAE,IAAAC,QAAE,EAAE,MAAO;AAAE,CAAC,EACrC;EAAEF,EAAE,EAAE,SAAS;EAAEC,OAAO,EAAE,IAAAC,QAAE,EAAE,SAAU;AAAE,CAAC,EAC3C;EAAEF,EAAE,EAAE,OAAO;EAAEC,OAAO,EAAE,IAAAC,QAAE,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C,CAAG;EAAG,CACP,CAAC,EACA6B,UAAU,IAAIA,UAAU,CAAC7B,EAAE,KAAKa,UAAU,IAC3C,IAAAqB,MAAA,CAAAC,aAAA;IAAGE,SAAS,EAAC;EAAgC,GAC5C,IAAAH,MAAA,CAAAC,aAAA,EAAC5C,WAAA,CAAAsD,MAAM;IACNC,OAAO,EAAC,MAAM;IACdC,OAAO,EAAGA,CAAA,KACTd,kBAAkB,CAAEJ,UAAU,CAAC7B,EAAG;EAClC,GAEC,IAAAgD,aAAO,GACR;EACA,IAAA9C,QAAE,EAAE,4BAA6B,CAAC,EAClC2B,UAAU,CAAC5B,OACZ,CACO,CACN,CAEA,CACW,CAAC;AAEpB"}
@@ -40,6 +40,5 @@ function PostLastRevisionCheck({
40
40
  supportKeys: "revisions"
41
41
  }, children);
42
42
  }
43
- var _default = PostLastRevisionCheck;
44
- exports.default = _default;
43
+ var _default = exports.default = PostLastRevisionCheck;
45
44
  //# sourceMappingURL=check.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","_postTypeSupportCheck","_interopRequireDefault","_store","PostLastRevisionCheck","children","lastRevisionId","revisionsCount","useSelect","select","getCurrentPostLastRevisionId","getCurrentPostRevisionsCount","editorStore","_react","createElement","default","supportKeys","_default","exports"],"sources":["@wordpress/editor/src/components/post-last-revision/check.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport PostTypeSupportCheck from '../post-type-support-check';\nimport { store as editorStore } from '../../store';\n\nfunction PostLastRevisionCheck( { children } ) {\n\tconst { lastRevisionId, revisionsCount } = useSelect( ( select ) => {\n\t\tconst { getCurrentPostLastRevisionId, getCurrentPostRevisionsCount } =\n\t\t\tselect( editorStore );\n\t\treturn {\n\t\t\tlastRevisionId: getCurrentPostLastRevisionId(),\n\t\t\trevisionsCount: getCurrentPostRevisionsCount(),\n\t\t};\n\t}, [] );\n\n\tif ( ! lastRevisionId || revisionsCount < 2 ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PostTypeSupportCheck supportKeys=\"revisions\">\n\t\t\t{ children }\n\t\t</PostTypeSupportCheck>\n\t);\n}\n\nexport default PostLastRevisionCheck;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,qBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AATA;AACA;AACA;;AAGA;AACA;AACA;;AAIA,SAASI,qBAAqBA,CAAE;EAAEC;AAAS,CAAC,EAAG;EAC9C,MAAM;IAAEC,cAAc;IAAEC;EAAe,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IACnE,MAAM;MAAEC,4BAA4B;MAAEC;IAA6B,CAAC,GACnEF,MAAM,CAAEG,YAAY,CAAC;IACtB,OAAO;MACNN,cAAc,EAAEI,4BAA4B,CAAC,CAAC;MAC9CH,cAAc,EAAEI,4BAA4B,CAAC;IAC9C,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,IAAK,CAAEL,cAAc,IAAIC,cAAc,GAAG,CAAC,EAAG;IAC7C,OAAO,IAAI;EACZ;EAEA,OACC,IAAAM,MAAA,CAAAC,aAAA,EAACb,qBAAA,CAAAc,OAAoB;IAACC,WAAW,EAAC;EAAW,GAC1CX,QACmB,CAAC;AAEzB;AAAC,IAAAY,QAAA,GAEcb,qBAAqB;AAAAc,OAAA,CAAAH,OAAA,GAAAE,QAAA"}
1
+ {"version":3,"names":["_data","require","_postTypeSupportCheck","_interopRequireDefault","_store","PostLastRevisionCheck","children","lastRevisionId","revisionsCount","useSelect","select","getCurrentPostLastRevisionId","getCurrentPostRevisionsCount","editorStore","_react","createElement","default","supportKeys","_default","exports"],"sources":["@wordpress/editor/src/components/post-last-revision/check.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport PostTypeSupportCheck from '../post-type-support-check';\nimport { store as editorStore } from '../../store';\n\nfunction PostLastRevisionCheck( { children } ) {\n\tconst { lastRevisionId, revisionsCount } = useSelect( ( select ) => {\n\t\tconst { getCurrentPostLastRevisionId, getCurrentPostRevisionsCount } =\n\t\t\tselect( editorStore );\n\t\treturn {\n\t\t\tlastRevisionId: getCurrentPostLastRevisionId(),\n\t\t\trevisionsCount: getCurrentPostRevisionsCount(),\n\t\t};\n\t}, [] );\n\n\tif ( ! lastRevisionId || revisionsCount < 2 ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PostTypeSupportCheck supportKeys=\"revisions\">\n\t\t\t{ children }\n\t\t</PostTypeSupportCheck>\n\t);\n}\n\nexport default PostLastRevisionCheck;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,qBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AATA;AACA;AACA;;AAGA;AACA;AACA;;AAIA,SAASI,qBAAqBA,CAAE;EAAEC;AAAS,CAAC,EAAG;EAC9C,MAAM;IAAEC,cAAc;IAAEC;EAAe,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IACnE,MAAM;MAAEC,4BAA4B;MAAEC;IAA6B,CAAC,GACnEF,MAAM,CAAEG,YAAY,CAAC;IACtB,OAAO;MACNN,cAAc,EAAEI,4BAA4B,CAAC,CAAC;MAC9CH,cAAc,EAAEI,4BAA4B,CAAC;IAC9C,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,IAAK,CAAEL,cAAc,IAAIC,cAAc,GAAG,CAAC,EAAG;IAC7C,OAAO,IAAI;EACZ;EAEA,OACC,IAAAM,MAAA,CAAAC,aAAA,EAACb,qBAAA,CAAAc,OAAoB;IAACC,WAAW,EAAC;EAAW,GAC1CX,QACmB,CAAC;AAEzB;AAAC,IAAAY,QAAA,GAAAC,OAAA,CAAAH,OAAA,GAEcX,qBAAqB"}
@@ -40,10 +40,11 @@ function LastRevision() {
40
40
  revision: lastRevisionId
41
41
  }),
42
42
  className: "editor-post-last-revision__title",
43
- icon: _icons.backup
44
- }, (0, _i18n.sprintf)( /* translators: %d: number of revisions */
45
- (0, _i18n._n)('%d Revision', '%d Revisions', revisionsCount), revisionsCount)));
43
+ icon: _icons.backup,
44
+ iconPosition: "right",
45
+ text: (0, _i18n.sprintf)( /* translators: %s: number of revisions */
46
+ (0, _i18n.__)('Revisions (%s)'), revisionsCount)
47
+ }));
46
48
  }
47
- var _default = LastRevision;
48
- exports.default = _default;
49
+ var _default = exports.default = LastRevision;
49
50
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_components","_data","_icons","_url","_check","_interopRequireDefault","_store","LastRevision","lastRevisionId","revisionsCount","useSelect","select","getCurrentPostLastRevisionId","getCurrentPostRevisionsCount","editorStore","_react","createElement","default","Button","href","addQueryArgs","revision","className","icon","backup","sprintf","_n","_default","exports"],"sources":["@wordpress/editor/src/components/post-last-revision/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { sprintf, _n } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { backup } from '@wordpress/icons';\nimport { addQueryArgs } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport PostLastRevisionCheck from './check';\nimport { store as editorStore } from '../../store';\n\nfunction LastRevision() {\n\tconst { lastRevisionId, revisionsCount } = useSelect( ( select ) => {\n\t\tconst { getCurrentPostLastRevisionId, getCurrentPostRevisionsCount } =\n\t\t\tselect( editorStore );\n\t\treturn {\n\t\t\tlastRevisionId: getCurrentPostLastRevisionId(),\n\t\t\trevisionsCount: getCurrentPostRevisionsCount(),\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<PostLastRevisionCheck>\n\t\t\t<Button\n\t\t\t\thref={ addQueryArgs( 'revision.php', {\n\t\t\t\t\trevision: lastRevisionId,\n\t\t\t\t} ) }\n\t\t\t\tclassName=\"editor-post-last-revision__title\"\n\t\t\t\ticon={ backup }\n\t\t\t>\n\t\t\t\t{ sprintf(\n\t\t\t\t\t/* translators: %d: number of revisions */\n\t\t\t\t\t_n( '%d Revision', '%d Revisions', revisionsCount ),\n\t\t\t\t\trevisionsCount\n\t\t\t\t) }\n\t\t\t</Button>\n\t\t</PostLastRevisionCheck>\n\t);\n}\n\nexport default LastRevision;\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;AAKA,IAAAK,MAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AAbA;AACA;AACA;;AAOA;AACA;AACA;;AAIA,SAASQ,YAAYA,CAAA,EAAG;EACvB,MAAM;IAAEC,cAAc;IAAEC;EAAe,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IACnE,MAAM;MAAEC,4BAA4B;MAAEC;IAA6B,CAAC,GACnEF,MAAM,CAAEG,YAAY,CAAC;IACtB,OAAO;MACNN,cAAc,EAAEI,4BAA4B,CAAC,CAAC;MAC9CH,cAAc,EAAEI,4BAA4B,CAAC;IAC9C,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,OACC,IAAAE,MAAA,CAAAC,aAAA,EAACZ,MAAA,CAAAa,OAAqB,QACrB,IAAAF,MAAA,CAAAC,aAAA,EAAChB,WAAA,CAAAkB,MAAM;IACNC,IAAI,EAAG,IAAAC,iBAAY,EAAE,cAAc,EAAE;MACpCC,QAAQ,EAAEb;IACX,CAAE,CAAG;IACLc,SAAS,EAAC,kCAAkC;IAC5CC,IAAI,EAAGC;EAAQ,GAEb,IAAAC,aAAO,GACR;EACA,IAAAC,QAAE,EAAE,aAAa,EAAE,cAAc,EAAEjB,cAAe,CAAC,EACnDA,cACD,CACO,CACc,CAAC;AAE1B;AAAC,IAAAkB,QAAA,GAEcpB,YAAY;AAAAqB,OAAA,CAAAX,OAAA,GAAAU,QAAA"}
1
+ {"version":3,"names":["_i18n","require","_components","_data","_icons","_url","_check","_interopRequireDefault","_store","LastRevision","lastRevisionId","revisionsCount","useSelect","select","getCurrentPostLastRevisionId","getCurrentPostRevisionsCount","editorStore","_react","createElement","default","Button","href","addQueryArgs","revision","className","icon","backup","iconPosition","text","sprintf","__","_default","exports"],"sources":["@wordpress/editor/src/components/post-last-revision/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { sprintf, __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { backup } from '@wordpress/icons';\nimport { addQueryArgs } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport PostLastRevisionCheck from './check';\nimport { store as editorStore } from '../../store';\n\nfunction LastRevision() {\n\tconst { lastRevisionId, revisionsCount } = useSelect( ( select ) => {\n\t\tconst { getCurrentPostLastRevisionId, getCurrentPostRevisionsCount } =\n\t\t\tselect( editorStore );\n\t\treturn {\n\t\t\tlastRevisionId: getCurrentPostLastRevisionId(),\n\t\t\trevisionsCount: getCurrentPostRevisionsCount(),\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<PostLastRevisionCheck>\n\t\t\t<Button\n\t\t\t\thref={ addQueryArgs( 'revision.php', {\n\t\t\t\t\trevision: lastRevisionId,\n\t\t\t\t} ) }\n\t\t\t\tclassName=\"editor-post-last-revision__title\"\n\t\t\t\ticon={ backup }\n\t\t\t\ticonPosition=\"right\"\n\t\t\t\ttext={ sprintf(\n\t\t\t\t\t/* translators: %s: number of revisions */\n\t\t\t\t\t__( 'Revisions (%s)' ),\n\t\t\t\t\trevisionsCount\n\t\t\t\t) }\n\t\t\t/>\n\t\t</PostLastRevisionCheck>\n\t);\n}\n\nexport default LastRevision;\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;AAKA,IAAAK,MAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AAbA;AACA;AACA;;AAOA;AACA;AACA;;AAIA,SAASQ,YAAYA,CAAA,EAAG;EACvB,MAAM;IAAEC,cAAc;IAAEC;EAAe,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IACnE,MAAM;MAAEC,4BAA4B;MAAEC;IAA6B,CAAC,GACnEF,MAAM,CAAEG,YAAY,CAAC;IACtB,OAAO;MACNN,cAAc,EAAEI,4BAA4B,CAAC,CAAC;MAC9CH,cAAc,EAAEI,4BAA4B,CAAC;IAC9C,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,OACC,IAAAE,MAAA,CAAAC,aAAA,EAACZ,MAAA,CAAAa,OAAqB,QACrB,IAAAF,MAAA,CAAAC,aAAA,EAAChB,WAAA,CAAAkB,MAAM;IACNC,IAAI,EAAG,IAAAC,iBAAY,EAAE,cAAc,EAAE;MACpCC,QAAQ,EAAEb;IACX,CAAE,CAAG;IACLc,SAAS,EAAC,kCAAkC;IAC5CC,IAAI,EAAGC,aAAQ;IACfC,YAAY,EAAC,OAAO;IACpBC,IAAI,EAAG,IAAAC,aAAO,GACb;IACA,IAAAC,QAAE,EAAE,gBAAiB,CAAC,EACtBnB,cACD;EAAG,CACH,CACqB,CAAC;AAE1B;AAAC,IAAAoB,QAAA,GAAAC,OAAA,CAAAb,OAAA,GAEcV,YAAY"}
@@ -22,6 +22,5 @@ function PostLastRevisionPanel() {
22
22
  className: "editor-post-last-revision__panel"
23
23
  }, (0, _react.createElement)(_.default, null)));
24
24
  }
25
- var _default = PostLastRevisionPanel;
26
- exports.default = _default;
25
+ var _default = exports.default = PostLastRevisionPanel;
27
26
  //# sourceMappingURL=panel.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_","_interopRequireDefault","_check","PostLastRevisionPanel","_react","createElement","default","PanelBody","className","_default","exports"],"sources":["@wordpress/editor/src/components/post-last-revision/panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { PanelBody } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport PostLastRevision from './';\nimport PostLastRevisionCheck from './check';\n\nfunction PostLastRevisionPanel() {\n\treturn (\n\t\t<PostLastRevisionCheck>\n\t\t\t<PanelBody className=\"editor-post-last-revision__panel\">\n\t\t\t\t<PostLastRevision />\n\t\t\t</PanelBody>\n\t\t</PostLastRevisionCheck>\n\t);\n}\n\nexport default PostLastRevisionPanel;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAKA,IAAAC,CAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAD,sBAAA,CAAAF,OAAA;AATA;AACA;AACA;;AAGA;AACA;AACA;;AAIA,SAASI,qBAAqBA,CAAA,EAAG;EAChC,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACH,MAAA,CAAAI,OAAqB,QACrB,IAAAF,MAAA,CAAAC,aAAA,EAACP,WAAA,CAAAS,SAAS;IAACC,SAAS,EAAC;EAAkC,GACtD,IAAAJ,MAAA,CAAAC,aAAA,EAACL,CAAA,CAAAM,OAAgB,MAAE,CACT,CACW,CAAC;AAE1B;AAAC,IAAAG,QAAA,GAEcN,qBAAqB;AAAAO,OAAA,CAAAJ,OAAA,GAAAG,QAAA"}
1
+ {"version":3,"names":["_components","require","_","_interopRequireDefault","_check","PostLastRevisionPanel","_react","createElement","default","PanelBody","className","_default","exports"],"sources":["@wordpress/editor/src/components/post-last-revision/panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { PanelBody } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport PostLastRevision from './';\nimport PostLastRevisionCheck from './check';\n\nfunction PostLastRevisionPanel() {\n\treturn (\n\t\t<PostLastRevisionCheck>\n\t\t\t<PanelBody className=\"editor-post-last-revision__panel\">\n\t\t\t\t<PostLastRevision />\n\t\t\t</PanelBody>\n\t\t</PostLastRevisionCheck>\n\t);\n}\n\nexport default PostLastRevisionPanel;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAKA,IAAAC,CAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAD,sBAAA,CAAAF,OAAA;AATA;AACA;AACA;;AAGA;AACA;AACA;;AAIA,SAASI,qBAAqBA,CAAA,EAAG;EAChC,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACH,MAAA,CAAAI,OAAqB,QACrB,IAAAF,MAAA,CAAAC,aAAA,EAACP,WAAA,CAAAS,SAAS;IAACC,SAAS,EAAC;EAAkC,GACtD,IAAAJ,MAAA,CAAAC,aAAA,EAACL,CAAA,CAAAM,OAAgB,MAAE,CACT,CACW,CAAC;AAE1B;AAAC,IAAAG,QAAA,GAAAC,OAAA,CAAAJ,OAAA,GAEcH,qBAAqB"}
@@ -31,6 +31,5 @@ const PostPanelRow = (0, _element.forwardRef)(({
31
31
  className: "editor-post-panel__row-control"
32
32
  }, children));
33
33
  });
34
- var _default = PostPanelRow;
35
- exports.default = _default;
34
+ var _default = exports.default = PostPanelRow;
36
35
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_classnames","_interopRequireDefault","require","_components","_element","PostPanelRow","forwardRef","className","label","children","ref","_react","createElement","__experimentalHStack","classnames","_default","exports","default"],"sources":["@wordpress/editor/src/components/post-panel-row/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __experimentalHStack as HStack } from '@wordpress/components';\nimport { forwardRef } from '@wordpress/element';\n\nconst PostPanelRow = forwardRef( ( { className, label, children }, ref ) => {\n\treturn (\n\t\t<HStack\n\t\t\tclassName={ classnames( 'editor-post-panel__row', className ) }\n\t\t\tref={ ref }\n\t\t>\n\t\t\t{ label && (\n\t\t\t\t<div className=\"editor-post-panel__row-label\">{ label }</div>\n\t\t\t) }\n\t\t\t<div className=\"editor-post-panel__row-control\">{ children }</div>\n\t\t</HStack>\n\t);\n} );\n\nexport default PostPanelRow;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AATA;AACA;AACA;;AAGA;AACA;AACA;;AAIA,MAAMG,YAAY,GAAG,IAAAC,mBAAU,EAAE,CAAE;EAAEC,SAAS;EAAEC,KAAK;EAAEC;AAAS,CAAC,EAAEC,GAAG,KAAM;EAC3E,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACT,WAAA,CAAAU,oBAAM;IACNN,SAAS,EAAG,IAAAO,mBAAU,EAAE,wBAAwB,EAAEP,SAAU,CAAG;IAC/DG,GAAG,EAAGA;EAAK,GAETF,KAAK,IACN,IAAAG,MAAA,CAAAC,aAAA;IAAKL,SAAS,EAAC;EAA8B,GAAGC,KAAY,CAC5D,EACD,IAAAG,MAAA,CAAAC,aAAA;IAAKL,SAAS,EAAC;EAAgC,GAAGE,QAAe,CAC1D,CAAC;AAEX,CAAE,CAAC;AAAC,IAAAM,QAAA,GAEWV,YAAY;AAAAW,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
1
+ {"version":3,"names":["_classnames","_interopRequireDefault","require","_components","_element","PostPanelRow","forwardRef","className","label","children","ref","_react","createElement","__experimentalHStack","classnames","_default","exports","default"],"sources":["@wordpress/editor/src/components/post-panel-row/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __experimentalHStack as HStack } from '@wordpress/components';\nimport { forwardRef } from '@wordpress/element';\n\nconst PostPanelRow = forwardRef( ( { className, label, children }, ref ) => {\n\treturn (\n\t\t<HStack\n\t\t\tclassName={ classnames( 'editor-post-panel__row', className ) }\n\t\t\tref={ ref }\n\t\t>\n\t\t\t{ label && (\n\t\t\t\t<div className=\"editor-post-panel__row-label\">{ label }</div>\n\t\t\t) }\n\t\t\t<div className=\"editor-post-panel__row-control\">{ children }</div>\n\t\t</HStack>\n\t);\n} );\n\nexport default PostPanelRow;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AATA;AACA;AACA;;AAGA;AACA;AACA;;AAIA,MAAMG,YAAY,GAAG,IAAAC,mBAAU,EAAE,CAAE;EAAEC,SAAS;EAAEC,KAAK;EAAEC;AAAS,CAAC,EAAEC,GAAG,KAAM;EAC3E,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACT,WAAA,CAAAU,oBAAM;IACNN,SAAS,EAAG,IAAAO,mBAAU,EAAE,wBAAwB,EAAEP,SAAU,CAAG;IAC/DG,GAAG,EAAGA;EAAK,GAETF,KAAK,IACN,IAAAG,MAAA,CAAAC,aAAA;IAAKL,SAAS,EAAC;EAA8B,GAAGC,KAAY,CAC5D,EACD,IAAAG,MAAA,CAAAC,aAAA;IAAKL,SAAS,EAAC;EAAgC,GAAGE,QAAe,CAC1D,CAAC;AAEX,CAAE,CAAC;AAAC,IAAAM,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEWZ,YAAY"}
@@ -37,6 +37,5 @@ function PostPendingStatusCheck({
37
37
  }
38
38
  return children;
39
39
  }
40
- var _default = PostPendingStatusCheck;
41
- exports.default = _default;
40
+ var _default = exports.default = PostPendingStatusCheck;
42
41
  //# sourceMappingURL=check.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","_store","PostPendingStatusCheck","children","hasPublishAction","isPublished","useSelect","select","_getCurrentPost$_link","isCurrentPostPublished","getCurrentPost","editorStore","_links","_default","exports","default"],"sources":["@wordpress/editor/src/components/post-pending-status/check.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nexport function PostPendingStatusCheck( { children } ) {\n\tconst { hasPublishAction, isPublished } = useSelect( ( select ) => {\n\t\tconst { isCurrentPostPublished, getCurrentPost } =\n\t\t\tselect( editorStore );\n\t\treturn {\n\t\t\thasPublishAction:\n\t\t\t\tgetCurrentPost()._links?.[ 'wp:action-publish' ] ?? false,\n\t\t\tisPublished: isCurrentPostPublished(),\n\t\t};\n\t}, [] );\n\n\tif ( isPublished || ! hasPublishAction ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n\nexport default PostPendingStatusCheck;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,MAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGO,SAASE,sBAAsBA,CAAE;EAAEC;AAAS,CAAC,EAAG;EACtD,MAAM;IAAEC,gBAAgB;IAAEC;EAAY,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IAAA,IAAAC,qBAAA;IAClE,MAAM;MAAEC,sBAAsB;MAAEC;IAAe,CAAC,GAC/CH,MAAM,CAAEI,YAAY,CAAC;IACtB,OAAO;MACNP,gBAAgB,GAAAI,qBAAA,GACfE,cAAc,CAAC,CAAC,CAACE,MAAM,GAAI,mBAAmB,CAAE,cAAAJ,qBAAA,cAAAA,qBAAA,GAAI,KAAK;MAC1DH,WAAW,EAAEI,sBAAsB,CAAC;IACrC,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,IAAKJ,WAAW,IAAI,CAAED,gBAAgB,EAAG;IACxC,OAAO,IAAI;EACZ;EAEA,OAAOD,QAAQ;AAChB;AAAC,IAAAU,QAAA,GAEcX,sBAAsB;AAAAY,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
1
+ {"version":3,"names":["_data","require","_store","PostPendingStatusCheck","children","hasPublishAction","isPublished","useSelect","select","_getCurrentPost$_link","isCurrentPostPublished","getCurrentPost","editorStore","_links","_default","exports","default"],"sources":["@wordpress/editor/src/components/post-pending-status/check.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nexport function PostPendingStatusCheck( { children } ) {\n\tconst { hasPublishAction, isPublished } = useSelect( ( select ) => {\n\t\tconst { isCurrentPostPublished, getCurrentPost } =\n\t\t\tselect( editorStore );\n\t\treturn {\n\t\t\thasPublishAction:\n\t\t\t\tgetCurrentPost()._links?.[ 'wp:action-publish' ] ?? false,\n\t\t\tisPublished: isCurrentPostPublished(),\n\t\t};\n\t}, [] );\n\n\tif ( isPublished || ! hasPublishAction ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n\nexport default PostPendingStatusCheck;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,MAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGO,SAASE,sBAAsBA,CAAE;EAAEC;AAAS,CAAC,EAAG;EACtD,MAAM;IAAEC,gBAAgB;IAAEC;EAAY,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IAAA,IAAAC,qBAAA;IAClE,MAAM;MAAEC,sBAAsB;MAAEC;IAAe,CAAC,GAC/CH,MAAM,CAAEI,YAAY,CAAC;IACtB,OAAO;MACNP,gBAAgB,GAAAI,qBAAA,GACfE,cAAc,CAAC,CAAC,CAACE,MAAM,GAAI,mBAAmB,CAAE,cAAAJ,qBAAA,cAAAA,qBAAA,GAAI,KAAK;MAC1DH,WAAW,EAAEI,sBAAsB,CAAC;IACrC,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,IAAKJ,WAAW,IAAI,CAAED,gBAAgB,EAAG;IACxC,OAAO,IAAI;EACZ;EAEA,OAAOD,QAAQ;AAChB;AAAC,IAAAU,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcb,sBAAsB"}
@@ -38,6 +38,5 @@ function PostPendingStatus() {
38
38
  onChange: togglePendingStatus
39
39
  }));
40
40
  }
41
- var _default = PostPendingStatus;
42
- exports.default = _default;
41
+ var _default = exports.default = PostPendingStatus;
43
42
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_components","_data","_check","_interopRequireDefault","_store","PostPendingStatus","status","useSelect","select","editorStore","getEditedPostAttribute","editPost","useDispatch","togglePendingStatus","updatedStatus","_react","createElement","default","CheckboxControl","__nextHasNoMarginBottom","label","__","checked","onChange","_default","exports"],"sources":["@wordpress/editor/src/components/post-pending-status/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { CheckboxControl } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport PostPendingStatusCheck from './check';\nimport { store as editorStore } from '../../store';\n\nexport function PostPendingStatus() {\n\tconst status = useSelect(\n\t\t( select ) => select( editorStore ).getEditedPostAttribute( 'status' ),\n\t\t[]\n\t);\n\tconst { editPost } = useDispatch( editorStore );\n\tconst togglePendingStatus = () => {\n\t\tconst updatedStatus = status === 'pending' ? 'draft' : 'pending';\n\t\teditPost( { status: updatedStatus } );\n\t};\n\n\treturn (\n\t\t<PostPendingStatusCheck>\n\t\t\t<CheckboxControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tlabel={ __( 'Pending review' ) }\n\t\t\t\tchecked={ status === 'pending' }\n\t\t\t\tonChange={ togglePendingStatus }\n\t\t\t/>\n\t\t</PostPendingStatusCheck>\n\t);\n}\n\nexport default PostPendingStatus;\n"],"mappings":";;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAKA,IAAAG,MAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAXA;AACA;AACA;;AAKA;AACA;AACA;;AAIO,SAASM,iBAAiBA,CAAA,EAAG;EACnC,MAAMC,MAAM,GAAG,IAAAC,eAAS,EACrBC,MAAM,IAAMA,MAAM,CAAEC,YAAY,CAAC,CAACC,sBAAsB,CAAE,QAAS,CAAC,EACtE,EACD,CAAC;EACD,MAAM;IAAEC;EAAS,CAAC,GAAG,IAAAC,iBAAW,EAAEH,YAAY,CAAC;EAC/C,MAAMI,mBAAmB,GAAGA,CAAA,KAAM;IACjC,MAAMC,aAAa,GAAGR,MAAM,KAAK,SAAS,GAAG,OAAO,GAAG,SAAS;IAChEK,QAAQ,CAAE;MAAEL,MAAM,EAAEQ;IAAc,CAAE,CAAC;EACtC,CAAC;EAED,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACd,MAAA,CAAAe,OAAsB,QACtB,IAAAF,MAAA,CAAAC,aAAA,EAAChB,WAAA,CAAAkB,eAAe;IACfC,uBAAuB;IACvBC,KAAK,EAAG,IAAAC,QAAE,EAAE,gBAAiB,CAAG;IAChCC,OAAO,EAAGhB,MAAM,KAAK,SAAW;IAChCiB,QAAQ,EAAGV;EAAqB,CAChC,CACsB,CAAC;AAE3B;AAAC,IAAAW,QAAA,GAEcnB,iBAAiB;AAAAoB,OAAA,CAAAR,OAAA,GAAAO,QAAA"}
1
+ {"version":3,"names":["_i18n","require","_components","_data","_check","_interopRequireDefault","_store","PostPendingStatus","status","useSelect","select","editorStore","getEditedPostAttribute","editPost","useDispatch","togglePendingStatus","updatedStatus","_react","createElement","default","CheckboxControl","__nextHasNoMarginBottom","label","__","checked","onChange","_default","exports"],"sources":["@wordpress/editor/src/components/post-pending-status/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { CheckboxControl } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport PostPendingStatusCheck from './check';\nimport { store as editorStore } from '../../store';\n\nexport function PostPendingStatus() {\n\tconst status = useSelect(\n\t\t( select ) => select( editorStore ).getEditedPostAttribute( 'status' ),\n\t\t[]\n\t);\n\tconst { editPost } = useDispatch( editorStore );\n\tconst togglePendingStatus = () => {\n\t\tconst updatedStatus = status === 'pending' ? 'draft' : 'pending';\n\t\teditPost( { status: updatedStatus } );\n\t};\n\n\treturn (\n\t\t<PostPendingStatusCheck>\n\t\t\t<CheckboxControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tlabel={ __( 'Pending review' ) }\n\t\t\t\tchecked={ status === 'pending' }\n\t\t\t\tonChange={ togglePendingStatus }\n\t\t\t/>\n\t\t</PostPendingStatusCheck>\n\t);\n}\n\nexport default PostPendingStatus;\n"],"mappings":";;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAKA,IAAAG,MAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAXA;AACA;AACA;;AAKA;AACA;AACA;;AAIO,SAASM,iBAAiBA,CAAA,EAAG;EACnC,MAAMC,MAAM,GAAG,IAAAC,eAAS,EACrBC,MAAM,IAAMA,MAAM,CAAEC,YAAY,CAAC,CAACC,sBAAsB,CAAE,QAAS,CAAC,EACtE,EACD,CAAC;EACD,MAAM;IAAEC;EAAS,CAAC,GAAG,IAAAC,iBAAW,EAAEH,YAAY,CAAC;EAC/C,MAAMI,mBAAmB,GAAGA,CAAA,KAAM;IACjC,MAAMC,aAAa,GAAGR,MAAM,KAAK,SAAS,GAAG,OAAO,GAAG,SAAS;IAChEK,QAAQ,CAAE;MAAEL,MAAM,EAAEQ;IAAc,CAAE,CAAC;EACtC,CAAC;EAED,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACd,MAAA,CAAAe,OAAsB,QACtB,IAAAF,MAAA,CAAAC,aAAA,EAAChB,WAAA,CAAAkB,eAAe;IACfC,uBAAuB;IACvBC,KAAK,EAAG,IAAAC,QAAE,EAAE,gBAAiB,CAAG;IAChCC,OAAO,EAAGhB,MAAM,KAAK,SAAW;IAChCiB,QAAQ,EAAGV;EAAqB,CAChC,CACsB,CAAC;AAE3B;AAAC,IAAAW,QAAA,GAAAC,OAAA,CAAAR,OAAA,GAEcZ,iBAAiB"}