@wordpress/editor 13.15.0 → 13.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (557) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/components/autocompleters/index.js +0 -2
  3. package/build/components/autocompleters/index.js.map +1 -1
  4. package/build/components/autocompleters/user.js +2 -9
  5. package/build/components/autocompleters/user.js.map +1 -1
  6. package/build/components/autosave-monitor/index.js +0 -24
  7. package/build/components/autosave-monitor/index.js.map +1 -1
  8. package/build/components/character-count/index.js +1 -4
  9. package/build/components/character-count/index.js.map +1 -1
  10. package/build/components/deprecated.js +1 -11
  11. package/build/components/deprecated.js.map +1 -1
  12. package/build/components/deprecated.native.js +0 -1
  13. package/build/components/deprecated.native.js.map +1 -1
  14. package/build/components/document-outline/check.js +1 -7
  15. package/build/components/document-outline/check.js.map +1 -1
  16. package/build/components/document-outline/index.js +7 -24
  17. package/build/components/document-outline/index.js.map +1 -1
  18. package/build/components/document-outline/item.js +1 -5
  19. package/build/components/document-outline/item.js.map +1 -1
  20. package/build/components/editor-help/add-blocks.native.js +1 -8
  21. package/build/components/editor-help/add-blocks.native.js.map +1 -1
  22. package/build/components/editor-help/customize-blocks.native.js +1 -8
  23. package/build/components/editor-help/customize-blocks.native.js.map +1 -1
  24. package/build/components/editor-help/help-detail-navigation-screen.native.js +5 -13
  25. package/build/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
  26. package/build/components/editor-help/help-get-support-button.native.js +1 -7
  27. package/build/components/editor-help/help-get-support-button.native.js.map +1 -1
  28. package/build/components/editor-help/help-section-title.native.js +1 -7
  29. package/build/components/editor-help/help-section-title.native.js.map +1 -1
  30. package/build/components/editor-help/help-topic-row.native.js +1 -8
  31. package/build/components/editor-help/help-topic-row.native.js.map +1 -1
  32. package/build/components/editor-help/icon-move-blocks.native.js +0 -4
  33. package/build/components/editor-help/icon-move-blocks.native.js.map +1 -1
  34. package/build/components/editor-help/index.native.js +8 -29
  35. package/build/components/editor-help/index.native.js.map +1 -1
  36. package/build/components/editor-help/intro-to-blocks.native.js +1 -9
  37. package/build/components/editor-help/intro-to-blocks.native.js.map +1 -1
  38. package/build/components/editor-help/move-blocks.native.js +1 -8
  39. package/build/components/editor-help/move-blocks.native.js.map +1 -1
  40. package/build/components/editor-help/remove-blocks.native.js +1 -8
  41. package/build/components/editor-help/remove-blocks.native.js.map +1 -1
  42. package/build/components/editor-help/view-sections.native.js +1 -12
  43. package/build/components/editor-help/view-sections.native.js.map +1 -1
  44. package/build/components/editor-history/redo.js +6 -14
  45. package/build/components/editor-history/redo.js.map +1 -1
  46. package/build/components/editor-history/undo.js +6 -14
  47. package/build/components/editor-history/undo.js.map +1 -1
  48. package/build/components/editor-notices/index.js +1 -10
  49. package/build/components/editor-notices/index.js.map +1 -1
  50. package/build/components/editor-snackbars/index.js +1 -5
  51. package/build/components/editor-snackbars/index.js.map +1 -1
  52. package/build/components/entities-saved-states/entity-record-item.js +3 -10
  53. package/build/components/entities-saved-states/entity-record-item.js.map +1 -1
  54. package/build/components/entities-saved-states/entity-type-list.js +3 -15
  55. package/build/components/entities-saved-states/entity-type-list.js.map +1 -1
  56. package/build/components/entities-saved-states/hooks/use-is-dirty.js +5 -14
  57. package/build/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -1
  58. package/build/components/entities-saved-states/index.js +8 -27
  59. package/build/components/entities-saved-states/index.js.map +1 -1
  60. package/build/components/error-boundary/index.js +1 -18
  61. package/build/components/error-boundary/index.js.map +1 -1
  62. package/build/components/global-keyboard-shortcuts/index.js +5 -9
  63. package/build/components/global-keyboard-shortcuts/index.js.map +1 -1
  64. package/build/components/global-keyboard-shortcuts/register-shortcuts.js +1 -8
  65. package/build/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
  66. package/build/components/index.js +4 -76
  67. package/build/components/index.js.map +1 -1
  68. package/build/components/index.native.js +0 -9
  69. package/build/components/index.native.js.map +1 -1
  70. package/build/components/local-autosave-monitor/index.js +6 -31
  71. package/build/components/local-autosave-monitor/index.js.map +1 -1
  72. package/build/components/media-categories/index.js +30 -45
  73. package/build/components/media-categories/index.js.map +1 -1
  74. package/build/components/page-attributes/check.js +3 -7
  75. package/build/components/page-attributes/check.js.map +1 -1
  76. package/build/components/page-attributes/order.js +17 -42
  77. package/build/components/page-attributes/order.js.map +1 -1
  78. package/build/components/page-attributes/parent.js +8 -34
  79. package/build/components/page-attributes/parent.js.map +1 -1
  80. package/build/components/post-author/check.js +1 -11
  81. package/build/components/post-author/check.js.map +1 -1
  82. package/build/components/post-author/combobox.js +7 -23
  83. package/build/components/post-author/combobox.js.map +1 -1
  84. package/build/components/post-author/constants.js +0 -1
  85. package/build/components/post-author/constants.js.map +1 -1
  86. package/build/components/post-author/index.js +1 -12
  87. package/build/components/post-author/index.js.map +1 -1
  88. package/build/components/post-author/select.js +1 -12
  89. package/build/components/post-author/select.js.map +1 -1
  90. package/build/components/post-comments/index.js +11 -23
  91. package/build/components/post-comments/index.js.map +1 -1
  92. package/build/components/post-excerpt/check.js +6 -8
  93. package/build/components/post-excerpt/check.js.map +1 -1
  94. package/build/components/post-excerpt/index.js +10 -27
  95. package/build/components/post-excerpt/index.js.map +1 -1
  96. package/build/components/post-featured-image/check.js +6 -9
  97. package/build/components/post-featured-image/check.js.map +1 -1
  98. package/build/components/post-featured-image/index.js +13 -42
  99. package/build/components/post-featured-image/index.js.map +1 -1
  100. package/build/components/post-format/check.js +9 -18
  101. package/build/components/post-format/check.js.map +1 -1
  102. package/build/components/post-format/index.js +2 -20
  103. package/build/components/post-format/index.js.map +1 -1
  104. package/build/components/post-last-revision/check.js +15 -22
  105. package/build/components/post-last-revision/check.js.map +1 -1
  106. package/build/components/post-last-revision/index.js +17 -28
  107. package/build/components/post-last-revision/index.js.map +1 -1
  108. package/build/components/post-locked-modal/index.js +8 -28
  109. package/build/components/post-locked-modal/index.js.map +1 -1
  110. package/build/components/post-pending-status/check.js +16 -24
  111. package/build/components/post-pending-status/check.js.map +1 -1
  112. package/build/components/post-pending-status/index.js +10 -28
  113. package/build/components/post-pending-status/index.js.map +1 -1
  114. package/build/components/post-pingbacks/index.js +11 -23
  115. package/build/components/post-pingbacks/index.js.map +1 -1
  116. package/build/components/post-preview-button/index.js +11 -22
  117. package/build/components/post-preview-button/index.js.map +1 -1
  118. package/build/components/post-publish-button/index.js +6 -32
  119. package/build/components/post-publish-button/index.js.map +1 -1
  120. package/build/components/post-publish-button/label.js +1 -10
  121. package/build/components/post-publish-button/label.js.map +1 -1
  122. package/build/components/post-publish-panel/index.js +1 -22
  123. package/build/components/post-publish-panel/index.js.map +1 -1
  124. package/build/components/post-publish-panel/maybe-category-panel.js +4 -14
  125. package/build/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  126. package/build/components/post-publish-panel/maybe-post-format-panel.js +2 -18
  127. package/build/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  128. package/build/components/post-publish-panel/maybe-tags-panel.js +2 -17
  129. package/build/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  130. package/build/components/post-publish-panel/maybe-upload-media.js +1 -18
  131. package/build/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  132. package/build/components/post-publish-panel/postpublish.js +3 -27
  133. package/build/components/post-publish-panel/postpublish.js.map +1 -1
  134. package/build/components/post-publish-panel/prepublish.js +1 -26
  135. package/build/components/post-publish-panel/prepublish.js.map +1 -1
  136. package/build/components/post-saved-state/index.js +12 -29
  137. package/build/components/post-saved-state/index.js.map +1 -1
  138. package/build/components/post-schedule/check.js +1 -8
  139. package/build/components/post-schedule/check.js.map +1 -1
  140. package/build/components/post-schedule/index.js +7 -13
  141. package/build/components/post-schedule/index.js.map +1 -1
  142. package/build/components/post-schedule/label.js +18 -29
  143. package/build/components/post-schedule/label.js.map +1 -1
  144. package/build/components/post-slug/check.js +1 -4
  145. package/build/components/post-slug/check.js.map +1 -1
  146. package/build/components/post-slug/index.js +1 -19
  147. package/build/components/post-slug/index.js.map +1 -1
  148. package/build/components/post-sticky/check.js +1 -8
  149. package/build/components/post-sticky/check.js.map +1 -1
  150. package/build/components/post-sticky/index.js +1 -12
  151. package/build/components/post-sticky/index.js.map +1 -1
  152. package/build/components/post-switch-to-draft-button/index.js +1 -14
  153. package/build/components/post-switch-to-draft-button/index.js.map +1 -1
  154. package/build/components/post-sync-status/index.js +5 -18
  155. package/build/components/post-sync-status/index.js.map +1 -1
  156. package/build/components/post-taxonomies/check.js +1 -9
  157. package/build/components/post-taxonomies/check.js.map +1 -1
  158. package/build/components/post-taxonomies/flat-term-selector.js +15 -50
  159. package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
  160. package/build/components/post-taxonomies/hierarchical-term-selector.js +27 -79
  161. package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  162. package/build/components/post-taxonomies/index.js +3 -13
  163. package/build/components/post-taxonomies/index.js.map +1 -1
  164. package/build/components/post-taxonomies/most-used-terms.js +1 -9
  165. package/build/components/post-taxonomies/most-used-terms.js.map +1 -1
  166. package/build/components/post-template/index.js +1 -11
  167. package/build/components/post-template/index.js.map +1 -1
  168. package/build/components/post-text-editor/index.js +3 -17
  169. package/build/components/post-text-editor/index.js.map +1 -1
  170. package/build/components/post-title/index.js +14 -46
  171. package/build/components/post-title/index.js.map +1 -1
  172. package/build/components/post-title/index.native.js +7 -44
  173. package/build/components/post-title/index.native.js.map +1 -1
  174. package/build/components/post-trash/check.js +1 -7
  175. package/build/components/post-trash/check.js.map +1 -1
  176. package/build/components/post-trash/index.js +1 -8
  177. package/build/components/post-trash/index.js.map +1 -1
  178. package/build/components/post-type-support-check/index.js +10 -23
  179. package/build/components/post-type-support-check/index.js.map +1 -1
  180. package/build/components/post-url/check.js +1 -12
  181. package/build/components/post-url/check.js.map +1 -1
  182. package/build/components/post-url/index.js +3 -15
  183. package/build/components/post-url/index.js.map +1 -1
  184. package/build/components/post-url/label.js +1 -5
  185. package/build/components/post-url/label.js.map +1 -1
  186. package/build/components/post-visibility/check.js +1 -7
  187. package/build/components/post-visibility/check.js.map +1 -1
  188. package/build/components/post-visibility/index.js +1 -17
  189. package/build/components/post-visibility/index.js.map +1 -1
  190. package/build/components/post-visibility/label.js +1 -5
  191. package/build/components/post-visibility/label.js.map +1 -1
  192. package/build/components/post-visibility/utils.js +1 -2
  193. package/build/components/post-visibility/utils.js.map +1 -1
  194. package/build/components/provider/index.js +13 -27
  195. package/build/components/provider/index.js.map +1 -1
  196. package/build/components/provider/index.native.js +18 -70
  197. package/build/components/provider/index.native.js.map +1 -1
  198. package/build/components/provider/use-block-editor-settings.js +9 -20
  199. package/build/components/provider/use-block-editor-settings.js.map +1 -1
  200. package/build/components/provider/use-block-editor-settings.native.js +5 -11
  201. package/build/components/provider/use-block-editor-settings.native.js.map +1 -1
  202. package/build/components/provider/with-registry-provider.js +5 -12
  203. package/build/components/provider/with-registry-provider.js.map +1 -1
  204. package/build/components/table-of-contents/index.js +4 -14
  205. package/build/components/table-of-contents/index.js.map +1 -1
  206. package/build/components/table-of-contents/panel.js +1 -13
  207. package/build/components/table-of-contents/panel.js.map +1 -1
  208. package/build/components/template-validation-notice/index.js +3 -12
  209. package/build/components/template-validation-notice/index.js.map +1 -1
  210. package/build/components/theme-support-check/index.js +3 -12
  211. package/build/components/theme-support-check/index.js.map +1 -1
  212. package/build/components/time-to-read/index.js +2 -10
  213. package/build/components/time-to-read/index.js.map +1 -1
  214. package/build/components/unsaved-changes-warning/index.js +21 -35
  215. package/build/components/unsaved-changes-warning/index.js.map +1 -1
  216. package/build/components/word-count/index.js +2 -7
  217. package/build/components/word-count/index.js.map +1 -1
  218. package/build/hooks/custom-sources-backwards-compatibility.js +8 -42
  219. package/build/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  220. package/build/hooks/default-autocompleters.js +3 -4
  221. package/build/hooks/default-autocompleters.js.map +1 -1
  222. package/build/hooks/index.js +0 -1
  223. package/build/hooks/index.js.map +1 -1
  224. package/build/hooks/index.native.js.map +1 -1
  225. package/build/index.js +0 -9
  226. package/build/index.js.map +1 -1
  227. package/build/index.native.js +0 -11
  228. package/build/index.native.js.map +1 -1
  229. package/build/lock-unlock.js +1 -2
  230. package/build/lock-unlock.js.map +1 -1
  231. package/build/private-apis.js +1 -4
  232. package/build/private-apis.js.map +1 -1
  233. package/build/store/actions.js +61 -130
  234. package/build/store/actions.js.map +1 -1
  235. package/build/store/actions.native.js +1 -8
  236. package/build/store/actions.native.js.map +1 -1
  237. package/build/store/constants.js +1 -2
  238. package/build/store/constants.js.map +1 -1
  239. package/build/store/defaults.js +2 -3
  240. package/build/store/defaults.js.map +1 -1
  241. package/build/store/index.js +3 -11
  242. package/build/store/index.js.map +1 -1
  243. package/build/store/local-autosave.js +0 -4
  244. package/build/store/local-autosave.js.map +1 -1
  245. package/build/store/reducer.js +19 -49
  246. package/build/store/reducer.js.map +1 -1
  247. package/build/store/reducer.native.js +3 -17
  248. package/build/store/reducer.native.js.map +1 -1
  249. package/build/store/selectors.js +170 -296
  250. package/build/store/selectors.js.map +1 -1
  251. package/build/store/selectors.native.js +4 -11
  252. package/build/store/selectors.native.js.map +1 -1
  253. package/build/store/utils/notice-builder.js +13 -24
  254. package/build/store/utils/notice-builder.js.map +1 -1
  255. package/build/utils/get-template-part-icon.js +0 -3
  256. package/build/utils/get-template-part-icon.js.map +1 -1
  257. package/build/utils/index.js +0 -4
  258. package/build/utils/index.js.map +1 -1
  259. package/build/utils/index.native.js +0 -2
  260. package/build/utils/index.native.js.map +1 -1
  261. package/build/utils/media-upload/index.js +2 -6
  262. package/build/utils/media-upload/index.js.map +1 -1
  263. package/build/utils/media-upload/index.native.js +0 -1
  264. package/build/utils/media-upload/index.native.js.map +1 -1
  265. package/build/utils/terms.js +8 -18
  266. package/build/utils/terms.js.map +1 -1
  267. package/build/utils/url.js +0 -4
  268. package/build/utils/url.js.map +1 -1
  269. package/build-module/components/autocompleters/index.js.map +1 -1
  270. package/build-module/components/autocompleters/user.js +2 -5
  271. package/build-module/components/autocompleters/user.js.map +1 -1
  272. package/build-module/components/autosave-monitor/index.js +2 -17
  273. package/build-module/components/autosave-monitor/index.js.map +1 -1
  274. package/build-module/components/character-count/index.js +1 -1
  275. package/build-module/components/character-count/index.js.map +1 -1
  276. package/build-module/components/deprecated.js +0 -4
  277. package/build-module/components/deprecated.js.map +1 -1
  278. package/build-module/components/deprecated.native.js +0 -1
  279. package/build-module/components/deprecated.native.js.map +1 -1
  280. package/build-module/components/document-outline/check.js +0 -4
  281. package/build-module/components/document-outline/check.js.map +1 -1
  282. package/build-module/components/document-outline/index.js +9 -13
  283. package/build-module/components/document-outline/index.js.map +1 -1
  284. package/build-module/components/document-outline/item.js +0 -3
  285. package/build-module/components/document-outline/item.js.map +1 -1
  286. package/build-module/components/editor-help/add-blocks.native.js +2 -5
  287. package/build-module/components/editor-help/add-blocks.native.js.map +1 -1
  288. package/build-module/components/editor-help/customize-blocks.native.js +2 -5
  289. package/build-module/components/editor-help/customize-blocks.native.js.map +1 -1
  290. package/build-module/components/editor-help/help-detail-navigation-screen.native.js +6 -8
  291. package/build-module/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
  292. package/build-module/components/editor-help/help-get-support-button.native.js +2 -5
  293. package/build-module/components/editor-help/help-get-support-button.native.js.map +1 -1
  294. package/build-module/components/editor-help/help-section-title.native.js +2 -5
  295. package/build-module/components/editor-help/help-section-title.native.js.map +1 -1
  296. package/build-module/components/editor-help/help-topic-row.native.js +1 -6
  297. package/build-module/components/editor-help/help-topic-row.native.js.map +1 -1
  298. package/build-module/components/editor-help/icon-move-blocks.native.js +0 -1
  299. package/build-module/components/editor-help/icon-move-blocks.native.js.map +1 -1
  300. package/build-module/components/editor-help/index.native.js +9 -9
  301. package/build-module/components/editor-help/index.native.js.map +1 -1
  302. package/build-module/components/editor-help/intro-to-blocks.native.js +2 -5
  303. package/build-module/components/editor-help/intro-to-blocks.native.js.map +1 -1
  304. package/build-module/components/editor-help/move-blocks.native.js +2 -5
  305. package/build-module/components/editor-help/move-blocks.native.js.map +1 -1
  306. package/build-module/components/editor-help/remove-blocks.native.js +2 -5
  307. package/build-module/components/editor-help/remove-blocks.native.js.map +1 -1
  308. package/build-module/components/editor-help/view-sections.native.js +2 -4
  309. package/build-module/components/editor-help/view-sections.native.js.map +1 -1
  310. package/build-module/components/editor-history/redo.js +6 -8
  311. package/build-module/components/editor-history/redo.js.map +1 -1
  312. package/build-module/components/editor-history/undo.js +6 -8
  313. package/build-module/components/editor-history/undo.js.map +1 -1
  314. package/build-module/components/editor-notices/index.js +1 -2
  315. package/build-module/components/editor-notices/index.js.map +1 -1
  316. package/build-module/components/editor-snackbars/index.js +0 -1
  317. package/build-module/components/editor-snackbars/index.js.map +1 -1
  318. package/build-module/components/entities-saved-states/entity-record-item.js +3 -4
  319. package/build-module/components/entities-saved-states/entity-record-item.js.map +1 -1
  320. package/build-module/components/entities-saved-states/entity-type-list.js +3 -10
  321. package/build-module/components/entities-saved-states/entity-type-list.js.map +1 -1
  322. package/build-module/components/entities-saved-states/hooks/use-is-dirty.js +4 -7
  323. package/build-module/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -1
  324. package/build-module/components/entities-saved-states/index.js +8 -16
  325. package/build-module/components/entities-saved-states/index.js.map +1 -1
  326. package/build-module/components/error-boundary/index.js +1 -12
  327. package/build-module/components/error-boundary/index.js.map +1 -1
  328. package/build-module/components/global-keyboard-shortcuts/index.js +5 -6
  329. package/build-module/components/global-keyboard-shortcuts/index.js.map +1 -1
  330. package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js +0 -3
  331. package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
  332. package/build-module/components/index.js +6 -3
  333. package/build-module/components/index.js.map +1 -1
  334. package/build-module/components/index.native.js +4 -2
  335. package/build-module/components/index.native.js.map +1 -1
  336. package/build-module/components/local-autosave-monitor/index.js +6 -21
  337. package/build-module/components/local-autosave-monitor/index.js.map +1 -1
  338. package/build-module/components/media-categories/index.js +31 -41
  339. package/build-module/components/media-categories/index.js.map +1 -1
  340. package/build-module/components/page-attributes/check.js +3 -3
  341. package/build-module/components/page-attributes/check.js.map +1 -1
  342. package/build-module/components/page-attributes/order.js +17 -31
  343. package/build-module/components/page-attributes/order.js.map +1 -1
  344. package/build-module/components/page-attributes/parent.js +9 -23
  345. package/build-module/components/page-attributes/parent.js.map +1 -1
  346. package/build-module/components/post-author/check.js +1 -5
  347. package/build-module/components/post-author/check.js.map +1 -1
  348. package/build-module/components/post-author/combobox.js +7 -16
  349. package/build-module/components/post-author/combobox.js.map +1 -1
  350. package/build-module/components/post-author/constants.js +0 -1
  351. package/build-module/components/post-author/constants.js.map +1 -1
  352. package/build-module/components/post-author/index.js +1 -6
  353. package/build-module/components/post-author/index.js.map +1 -1
  354. package/build-module/components/post-author/select.js +1 -6
  355. package/build-module/components/post-author/select.js.map +1 -1
  356. package/build-module/components/post-comments/index.js +12 -19
  357. package/build-module/components/post-comments/index.js.map +1 -1
  358. package/build-module/components/post-excerpt/check.js +5 -6
  359. package/build-module/components/post-excerpt/check.js.map +1 -1
  360. package/build-module/components/post-excerpt/index.js +11 -23
  361. package/build-module/components/post-excerpt/index.js.map +1 -1
  362. package/build-module/components/post-featured-image/check.js +5 -6
  363. package/build-module/components/post-featured-image/check.js.map +1 -1
  364. package/build-module/components/post-featured-image/index.js +13 -31
  365. package/build-module/components/post-featured-image/index.js.map +1 -1
  366. package/build-module/components/post-format/check.js +10 -15
  367. package/build-module/components/post-format/check.js.map +1 -1
  368. package/build-module/components/post-format/index.js +4 -12
  369. package/build-module/components/post-format/index.js.map +1 -1
  370. package/build-module/components/post-last-revision/check.js +17 -17
  371. package/build-module/components/post-last-revision/check.js.map +1 -1
  372. package/build-module/components/post-last-revision/index.js +18 -21
  373. package/build-module/components/post-last-revision/index.js.map +1 -1
  374. package/build-module/components/post-locked-modal/index.js +8 -22
  375. package/build-module/components/post-locked-modal/index.js.map +1 -1
  376. package/build-module/components/post-pending-status/check.js +17 -20
  377. package/build-module/components/post-pending-status/check.js.map +1 -1
  378. package/build-module/components/post-pending-status/index.js +11 -20
  379. package/build-module/components/post-pending-status/index.js.map +1 -1
  380. package/build-module/components/post-pingbacks/index.js +12 -19
  381. package/build-module/components/post-pingbacks/index.js.map +1 -1
  382. package/build-module/components/post-preview-button/index.js +11 -17
  383. package/build-module/components/post-preview-button/index.js.map +1 -1
  384. package/build-module/components/post-publish-button/index.js +7 -23
  385. package/build-module/components/post-publish-button/index.js.map +1 -1
  386. package/build-module/components/post-publish-button/label.js +1 -4
  387. package/build-module/components/post-publish-button/label.js.map +1 -1
  388. package/build-module/components/post-publish-panel/index.js +1 -8
  389. package/build-module/components/post-publish-panel/index.js.map +1 -1
  390. package/build-module/components/post-publish-panel/maybe-category-panel.js +4 -8
  391. package/build-module/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  392. package/build-module/components/post-publish-panel/maybe-post-format-panel.js +2 -12
  393. package/build-module/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  394. package/build-module/components/post-publish-panel/maybe-tags-panel.js +2 -9
  395. package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  396. package/build-module/components/post-publish-panel/maybe-upload-media.js +1 -12
  397. package/build-module/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  398. package/build-module/components/post-publish-panel/postpublish.js +3 -16
  399. package/build-module/components/post-publish-panel/postpublish.js.map +1 -1
  400. package/build-module/components/post-publish-panel/prepublish.js +1 -10
  401. package/build-module/components/post-publish-panel/prepublish.js.map +1 -1
  402. package/build-module/components/post-saved-state/index.js +15 -23
  403. package/build-module/components/post-saved-state/index.js.map +1 -1
  404. package/build-module/components/post-schedule/check.js +1 -3
  405. package/build-module/components/post-schedule/check.js.map +1 -1
  406. package/build-module/components/post-schedule/index.js +8 -8
  407. package/build-module/components/post-schedule/index.js.map +1 -1
  408. package/build-module/components/post-schedule/label.js +18 -22
  409. package/build-module/components/post-schedule/label.js.map +1 -1
  410. package/build-module/components/post-slug/check.js +0 -1
  411. package/build-module/components/post-slug/check.js.map +1 -1
  412. package/build-module/components/post-slug/index.js +1 -8
  413. package/build-module/components/post-slug/index.js.map +1 -1
  414. package/build-module/components/post-sticky/check.js +1 -3
  415. package/build-module/components/post-sticky/check.js.map +1 -1
  416. package/build-module/components/post-sticky/index.js +1 -3
  417. package/build-module/components/post-sticky/index.js.map +1 -1
  418. package/build-module/components/post-switch-to-draft-button/index.js +1 -9
  419. package/build-module/components/post-switch-to-draft-button/index.js.map +1 -1
  420. package/build-module/components/post-sync-status/index.js +5 -11
  421. package/build-module/components/post-sync-status/index.js.map +1 -1
  422. package/build-module/components/post-taxonomies/check.js +1 -3
  423. package/build-module/components/post-taxonomies/check.js.map +1 -1
  424. package/build-module/components/post-taxonomies/flat-term-selector.js +17 -39
  425. package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
  426. package/build-module/components/post-taxonomies/hierarchical-term-selector.js +29 -66
  427. package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  428. package/build-module/components/post-taxonomies/index.js +3 -5
  429. package/build-module/components/post-taxonomies/index.js.map +1 -1
  430. package/build-module/components/post-taxonomies/most-used-terms.js +1 -4
  431. package/build-module/components/post-taxonomies/most-used-terms.js.map +1 -1
  432. package/build-module/components/post-template/index.js +1 -5
  433. package/build-module/components/post-template/index.js.map +1 -1
  434. package/build-module/components/post-text-editor/index.js +4 -9
  435. package/build-module/components/post-text-editor/index.js.map +1 -1
  436. package/build-module/components/post-title/index.js +17 -35
  437. package/build-module/components/post-title/index.js.map +1 -1
  438. package/build-module/components/post-title/index.native.js +8 -33
  439. package/build-module/components/post-title/index.native.js.map +1 -1
  440. package/build-module/components/post-trash/check.js +1 -4
  441. package/build-module/components/post-trash/check.js.map +1 -1
  442. package/build-module/components/post-trash/index.js +1 -4
  443. package/build-module/components/post-trash/index.js.map +1 -1
  444. package/build-module/components/post-type-support-check/index.js +14 -20
  445. package/build-module/components/post-type-support-check/index.js.map +1 -1
  446. package/build-module/components/post-url/check.js +1 -9
  447. package/build-module/components/post-url/check.js.map +1 -1
  448. package/build-module/components/post-url/index.js +3 -8
  449. package/build-module/components/post-url/index.js.map +1 -1
  450. package/build-module/components/post-url/label.js +1 -1
  451. package/build-module/components/post-url/label.js.map +1 -1
  452. package/build-module/components/post-visibility/check.js +1 -2
  453. package/build-module/components/post-visibility/check.js.map +1 -1
  454. package/build-module/components/post-visibility/index.js +1 -10
  455. package/build-module/components/post-visibility/index.js.map +1 -1
  456. package/build-module/components/post-visibility/label.js +1 -1
  457. package/build-module/components/post-visibility/label.js.map +1 -1
  458. package/build-module/components/post-visibility/utils.js.map +1 -1
  459. package/build-module/components/provider/index.js +13 -14
  460. package/build-module/components/provider/index.js.map +1 -1
  461. package/build-module/components/provider/index.native.js +21 -52
  462. package/build-module/components/provider/index.native.js.map +1 -1
  463. package/build-module/components/provider/use-block-editor-settings.js +9 -12
  464. package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
  465. package/build-module/components/provider/use-block-editor-settings.native.js +5 -5
  466. package/build-module/components/provider/use-block-editor-settings.native.js.map +1 -1
  467. package/build-module/components/provider/with-registry-provider.js +5 -8
  468. package/build-module/components/provider/with-registry-provider.js.map +1 -1
  469. package/build-module/components/table-of-contents/index.js +4 -7
  470. package/build-module/components/table-of-contents/index.js.map +1 -1
  471. package/build-module/components/table-of-contents/panel.js +1 -5
  472. package/build-module/components/table-of-contents/panel.js.map +1 -1
  473. package/build-module/components/template-validation-notice/index.js +2 -6
  474. package/build-module/components/template-validation-notice/index.js.map +1 -1
  475. package/build-module/components/theme-support-check/index.js +3 -7
  476. package/build-module/components/theme-support-check/index.js.map +1 -1
  477. package/build-module/components/time-to-read/index.js +4 -7
  478. package/build-module/components/time-to-read/index.js.map +1 -1
  479. package/build-module/components/unsaved-changes-warning/index.js +22 -31
  480. package/build-module/components/unsaved-changes-warning/index.js.map +1 -1
  481. package/build-module/components/word-count/index.js +2 -4
  482. package/build-module/components/word-count/index.js.map +1 -1
  483. package/build-module/hooks/custom-sources-backwards-compatibility.js +11 -39
  484. package/build-module/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  485. package/build-module/hooks/default-autocompleters.js +3 -4
  486. package/build-module/hooks/default-autocompleters.js.map +1 -1
  487. package/build-module/hooks/index.js.map +1 -1
  488. package/build-module/hooks/index.native.js.map +1 -1
  489. package/build-module/index.js +1 -1
  490. package/build-module/index.js.map +1 -1
  491. package/build-module/index.native.js +1 -1
  492. package/build-module/index.native.js.map +1 -1
  493. package/build-module/lock-unlock.js.map +1 -1
  494. package/build-module/private-apis.js.map +1 -1
  495. package/build-module/store/actions.js +63 -85
  496. package/build-module/store/actions.js.map +1 -1
  497. package/build-module/store/actions.native.js +2 -2
  498. package/build-module/store/actions.native.js.map +1 -1
  499. package/build-module/store/constants.js +1 -1
  500. package/build-module/store/constants.js.map +1 -1
  501. package/build-module/store/defaults.js +3 -2
  502. package/build-module/store/defaults.js.map +1 -1
  503. package/build-module/store/index.js +5 -4
  504. package/build-module/store/index.js.map +1 -1
  505. package/build-module/store/local-autosave.js +0 -1
  506. package/build-module/store/local-autosave.js.map +1 -1
  507. package/build-module/store/reducer.js +21 -33
  508. package/build-module/store/reducer.js.map +1 -1
  509. package/build-module/store/reducer.native.js +4 -10
  510. package/build-module/store/reducer.native.js.map +1 -1
  511. package/build-module/store/selectors.js +173 -223
  512. package/build-module/store/selectors.js.map +1 -1
  513. package/build-module/store/selectors.native.js +6 -8
  514. package/build-module/store/selectors.native.js.map +1 -1
  515. package/build-module/store/utils/notice-builder.js +15 -21
  516. package/build-module/store/utils/notice-builder.js.map +1 -1
  517. package/build-module/utils/get-template-part-icon.js +0 -2
  518. package/build-module/utils/get-template-part-icon.js.map +1 -1
  519. package/build-module/utils/index.js.map +1 -1
  520. package/build-module/utils/index.native.js.map +1 -1
  521. package/build-module/utils/media-upload/index.js +2 -4
  522. package/build-module/utils/media-upload/index.js.map +1 -1
  523. package/build-module/utils/media-upload/index.native.js.map +1 -1
  524. package/build-module/utils/terms.js +9 -11
  525. package/build-module/utils/terms.js.map +1 -1
  526. package/build-module/utils/url.js +1 -1
  527. package/build-module/utils/url.js.map +1 -1
  528. package/build-style/style-rtl.css +10 -17
  529. package/build-style/style.css +10 -17
  530. package/package.json +32 -31
  531. package/src/components/editor-help/index.native.js +1 -1
  532. package/src/components/editor-help/style.scss +5 -0
  533. package/src/components/page-attributes/order.js +15 -23
  534. package/src/components/page-attributes/test/order.js +46 -15
  535. package/src/components/post-author/test/check.js +18 -12
  536. package/src/components/post-comments/index.js +11 -17
  537. package/src/components/post-excerpt/check.js +6 -2
  538. package/src/components/post-excerpt/index.js +10 -16
  539. package/src/components/post-featured-image/check.js +4 -2
  540. package/src/components/post-format/check.js +16 -11
  541. package/src/components/post-last-revision/check.js +12 -14
  542. package/src/components/post-last-revision/index.js +12 -10
  543. package/src/components/post-last-revision/test/check.js +28 -16
  544. package/src/components/post-pending-status/check.js +13 -19
  545. package/src/components/post-pending-status/index.js +9 -14
  546. package/src/components/post-pending-status/test/check.js +32 -10
  547. package/src/components/post-pingbacks/index.js +11 -15
  548. package/src/components/post-publish-panel/style.scss +12 -25
  549. package/src/components/post-sync-status/style.scss +4 -1
  550. package/src/components/post-type-support-check/index.js +8 -10
  551. package/src/components/post-type-support-check/test/index.js +36 -20
  552. package/src/components/provider/index.js +3 -2
  553. package/src/components/unsaved-changes-warning/index.js +22 -27
  554. package/src/hooks/custom-sources-backwards-compatibility.js +1 -25
  555. package/src/store/actions.js +1 -1
  556. package/src/store/selectors.js +2 -2
  557. package/src/store/test/selectors.js +13 -13
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/components/post-title/index.js"],"names":["classnames","__","forwardRef","useEffect","useImperativeHandle","useRef","useState","decodeEntities","ENTER","useSelect","useDispatch","pasteHandler","store","blockEditorStore","__unstableUseRichText","useRichText","create","toHTMLString","insert","useMergeRefs","__unstableStripHTML","stripHTML","PostTypeSupportCheck","editorStore","REGEXP_NEWLINES","PostTitle","_","forwardedRef","ref","isSelected","setIsSelected","editPost","insertDefaultBlock","clearSelectedBlock","insertBlocks","isCleanNewPost","title","placeholder","hasFixedToolbar","select","getEditedPostAttribute","_isCleanNewPost","getSettings","titlePlaceholder","_hasFixedToolbar","focus","current","defaultView","ownerDocument","name","parent","document","activeElement","body","onEnterPress","undefined","onInsertBlockAfter","blocks","onUpdate","newTitle","selection","setSelection","onSelect","onUnselect","onChange","value","replace","onKeyDown","event","keyCode","preventDefault","onPaste","clipboardData","plainText","html","getData","error1","error2","window","console","log","content","HTML","length","firstBlock","attributes","slice","newValue","start","end","className","decodedPlaceholder","richTextRef","selectionStart","selectionEnd","onSelectionChange","newStart","newEnd","sel","__unstableDisableFormats","preserveWhiteSpace"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SACCC,UADD,EAECC,SAFD,EAGCC,mBAHD,EAICC,MAJD,EAKCC,QALD,QAMO,oBANP;AAOA,SAASC,cAAT,QAA+B,0BAA/B;AACA,SAASC,KAAT,QAAsB,qBAAtB;AACA,SAASC,SAAT,EAAoBC,WAApB,QAAuC,iBAAvC;AACA,SAASC,YAAT,QAA6B,mBAA7B;AACA,SAASC,KAAK,IAAIC,gBAAlB,QAA0C,yBAA1C;AACA,SACCC,qBAAqB,IAAIC,WAD1B,EAECC,MAFD,EAGCC,YAHD,EAICC,MAJD,QAKO,sBALP;AAMA,SAASC,YAAT,QAA6B,oBAA7B;AACA,SAASC,mBAAmB,IAAIC,SAAhC,QAAiD,gBAAjD;AAEA;AACA;AACA;;AACA,OAAOC,oBAAP,MAAiC,4BAAjC;AACA,SAASV,KAAK,IAAIW,WAAlB,QAAqC,aAArC;AAEA;AACA;AACA;;AACA,MAAMC,eAAe,GAAG,UAAxB;;AAEA,SAASC,SAAT,CAAoBC,CAApB,EAAuBC,YAAvB,EAAsC;AACrC,QAAMC,GAAG,GAAGvB,MAAM,EAAlB;AACA,QAAM,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,MAAZ,EAAqB;AACrCpC,MAAAA,YAAY,CAAIqC,GAAF,IAAW;AACxB,cAAM;AAAEV,UAAAA,KAAF;AAASC,UAAAA;AAAT,YAAiBS,GAAvB;;AACA,YAAKV,KAAK,KAAKQ,QAAV,IAAsBP,GAAG,KAAKQ,MAAnC,EAA4C;AAC3C,iBAAOC,GAAP;AACA;;AACD,eAAO;AACNV,UAAAA,KAAK,EAAEQ,QADD;AAENP,UAAAA,GAAG,EAAEQ;AAFC,SAAP;AAIA,OATW,CAAZ;AAUA,KAjBwC;;AAkBzCE,IAAAA,wBAAwB,EAAE,IAlBe;AAmBzCC,IAAAA,kBAAkB,EAAE;AAnBqB,GAAF,CAAxC;AAsBA;;AACA,SACC,cAAC,oBAAD;AAAsB,IAAA,WAAW,EAAC;AAAlC,KACC;AACC,IAAA,GAAG,EAAGjF,YAAY,CAAE,CAAEyE,WAAF,EAAehE,GAAf,CAAF,CADnB;AAEC,IAAA,eAAe,MAFhB;AAGC,IAAA,SAAS,EAAG8D,SAHb;AAIC,kBAAaC,kBAJd;AAKC,IAAA,IAAI,EAAC,SALN;AAMC,sBAAe,MANhB;AAOC,IAAA,OAAO,EAAG7B,QAPX;AAQC,IAAA,MAAM,EAAGC,UARV;AASC,IAAA,SAAS,EAAGI,SATb;AAUC,IAAA,UAAU,EAAGJ,UAVd;AAWC,IAAA,OAAO,EAAGQ;AAXX,IADD,CADD;AAiBA;AACA;;AAED,eAAerE,UAAU,CAAEuB,SAAF,CAAzB","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tforwardRef,\n\tuseEffect,\n\tuseImperativeHandle,\n\tuseRef,\n\tuseState,\n} from '@wordpress/element';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { ENTER } from '@wordpress/keycodes';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { pasteHandler } from '@wordpress/blocks';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport {\n\t__unstableUseRichText as useRichText,\n\tcreate,\n\ttoHTMLString,\n\tinsert,\n} from '@wordpress/rich-text';\nimport { useMergeRefs } from '@wordpress/compose';\nimport { __unstableStripHTML as stripHTML } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport PostTypeSupportCheck from '../post-type-support-check';\nimport { store as editorStore } from '../../store';\n\n/**\n * Constants\n */\nconst REGEXP_NEWLINES = /[\\r\\n]+/g;\n\nfunction PostTitle( _, forwardedRef ) {\n\tconst ref = useRef();\n\tconst [ isSelected, setIsSelected ] = useState( false );\n\tconst { editPost } = useDispatch( editorStore );\n\tconst { insertDefaultBlock, clearSelectedBlock, insertBlocks } =\n\t\tuseDispatch( blockEditorStore );\n\tconst { isCleanNewPost, title, placeholder, hasFixedToolbar } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedPostAttribute, isCleanNewPost: _isCleanNewPost } =\n\t\t\t\tselect( editorStore );\n\t\t\tconst { getSettings } = select( blockEditorStore );\n\t\t\tconst { titlePlaceholder, hasFixedToolbar: _hasFixedToolbar } =\n\t\t\t\tgetSettings();\n\n\t\t\treturn {\n\t\t\t\tisCleanNewPost: _isCleanNewPost(),\n\t\t\t\ttitle: getEditedPostAttribute( 'title' ),\n\t\t\t\tplaceholder: titlePlaceholder,\n\t\t\t\thasFixedToolbar: _hasFixedToolbar,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tuseImperativeHandle( forwardedRef, () => ( {\n\t\tfocus: () => {\n\t\t\tref?.current?.focus();\n\t\t},\n\t} ) );\n\n\tuseEffect( () => {\n\t\tif ( ! ref.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { defaultView } = ref.current.ownerDocument;\n\t\tconst { name, parent } = defaultView;\n\t\tconst ownerDocument =\n\t\t\tname === 'editor-canvas' ? parent.document : defaultView.document;\n\t\tconst { activeElement, body } = ownerDocument;\n\n\t\t// Only autofocus the title when the post is entirely empty. This should\n\t\t// only happen for a new post, which means we focus the title on new\n\t\t// post so the author can start typing right away, without needing to\n\t\t// click anything.\n\t\tif ( isCleanNewPost && ( ! activeElement || body === activeElement ) ) {\n\t\t\tref.current.focus();\n\t\t}\n\t}, [ isCleanNewPost ] );\n\n\tfunction onEnterPress() {\n\t\tinsertDefaultBlock( undefined, undefined, 0 );\n\t}\n\n\tfunction onInsertBlockAfter( blocks ) {\n\t\tinsertBlocks( blocks, 0 );\n\t}\n\n\tfunction onUpdate( newTitle ) {\n\t\teditPost( { title: newTitle } );\n\t}\n\n\tconst [ selection, setSelection ] = useState( {} );\n\n\tfunction onSelect() {\n\t\tsetIsSelected( true );\n\t\tclearSelectedBlock();\n\t}\n\n\tfunction onUnselect() {\n\t\tsetIsSelected( false );\n\t\tsetSelection( {} );\n\t}\n\n\tfunction onChange( value ) {\n\t\tonUpdate( value.replace( REGEXP_NEWLINES, ' ' ) );\n\t}\n\n\tfunction onKeyDown( event ) {\n\t\tif ( event.keyCode === ENTER ) {\n\t\t\tevent.preventDefault();\n\t\t\tonEnterPress();\n\t\t}\n\t}\n\n\tfunction onPaste( event ) {\n\t\tconst clipboardData = event.clipboardData;\n\n\t\tlet plainText = '';\n\t\tlet html = '';\n\n\t\t// IE11 only supports `Text` as an argument for `getData` and will\n\t\t// otherwise throw an invalid argument error, so we try the standard\n\t\t// arguments first, then fallback to `Text` if they fail.\n\t\ttry {\n\t\t\tplainText = clipboardData.getData( 'text/plain' );\n\t\t\thtml = clipboardData.getData( 'text/html' );\n\t\t} catch ( error1 ) {\n\t\t\ttry {\n\t\t\t\thtml = clipboardData.getData( 'Text' );\n\t\t\t} catch ( error2 ) {\n\t\t\t\t// Some browsers like UC Browser paste plain text by default and\n\t\t\t\t// don't support clipboardData at all, so allow default\n\t\t\t\t// behaviour.\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// Allows us to ask for this information when we get a report.\n\t\twindow.console.log( 'Received HTML:\\n\\n', html );\n\t\twindow.console.log( 'Received plain text:\\n\\n', plainText );\n\n\t\tconst content = pasteHandler( {\n\t\t\tHTML: html,\n\t\t\tplainText,\n\t\t} );\n\n\t\tevent.preventDefault();\n\n\t\tif ( ! content.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( typeof content !== 'string' ) {\n\t\t\tconst [ firstBlock ] = content;\n\n\t\t\tif (\n\t\t\t\t! title &&\n\t\t\t\t( firstBlock.name === 'core/heading' ||\n\t\t\t\t\tfirstBlock.name === 'core/paragraph' )\n\t\t\t) {\n\t\t\t\tonUpdate( stripHTML( firstBlock.attributes.content ) );\n\t\t\t\tonInsertBlockAfter( content.slice( 1 ) );\n\t\t\t} else {\n\t\t\t\tonInsertBlockAfter( content );\n\t\t\t}\n\t\t} else {\n\t\t\tconst value = {\n\t\t\t\t...create( { html: title } ),\n\t\t\t\t...selection,\n\t\t\t};\n\t\t\tconst newValue = insert(\n\t\t\t\tvalue,\n\t\t\t\tcreate( { html: stripHTML( content ) } )\n\t\t\t);\n\t\t\tonUpdate( toHTMLString( { value: newValue } ) );\n\t\t\tsetSelection( {\n\t\t\t\tstart: newValue.start,\n\t\t\t\tend: newValue.end,\n\t\t\t} );\n\t\t}\n\t}\n\n\t// The wp-block className is important for editor styles.\n\t// This same block is used in both the visual and the code editor.\n\tconst className = classnames(\n\t\t'wp-block wp-block-post-title block-editor-block-list__block editor-post-title editor-post-title__input rich-text',\n\t\t{\n\t\t\t'is-selected': isSelected,\n\t\t\t'has-fixed-toolbar': hasFixedToolbar,\n\t\t}\n\t);\n\tconst decodedPlaceholder =\n\t\tdecodeEntities( placeholder ) || __( 'Add title' );\n\tconst { ref: richTextRef } = useRichText( {\n\t\tvalue: title,\n\t\tonChange,\n\t\tplaceholder: decodedPlaceholder,\n\t\tselectionStart: selection.start,\n\t\tselectionEnd: selection.end,\n\t\tonSelectionChange( newStart, newEnd ) {\n\t\t\tsetSelection( ( sel ) => {\n\t\t\t\tconst { start, end } = sel;\n\t\t\t\tif ( start === newStart && end === newEnd ) {\n\t\t\t\t\treturn sel;\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tstart: newStart,\n\t\t\t\t\tend: newEnd,\n\t\t\t\t};\n\t\t\t} );\n\t\t},\n\t\t__unstableDisableFormats: true,\n\t\tpreserveWhiteSpace: true,\n\t} );\n\n\t/* eslint-disable jsx-a11y/heading-has-content, jsx-a11y/no-noninteractive-element-to-interactive-role */\n\treturn (\n\t\t<PostTypeSupportCheck supportKeys=\"title\">\n\t\t\t<h1\n\t\t\t\tref={ useMergeRefs( [ richTextRef, ref ] ) }\n\t\t\t\tcontentEditable\n\t\t\t\tclassName={ className }\n\t\t\t\taria-label={ decodedPlaceholder }\n\t\t\t\trole=\"textbox\"\n\t\t\t\taria-multiline=\"true\"\n\t\t\t\tonFocus={ onSelect }\n\t\t\t\tonBlur={ onUnselect }\n\t\t\t\tonKeyDown={ onKeyDown }\n\t\t\t\tonKeyPress={ onUnselect }\n\t\t\t\tonPaste={ onPaste }\n\t\t\t/>\n\t\t</PostTypeSupportCheck>\n\t);\n\t/* eslint-enable jsx-a11y/heading-has-content, jsx-a11y/no-noninteractive-element-to-interactive-role */\n}\n\nexport default forwardRef( PostTitle );\n"]}
1
+ {"version":3,"names":["classnames","__","forwardRef","useEffect","useImperativeHandle","useRef","useState","decodeEntities","ENTER","useSelect","useDispatch","pasteHandler","store","blockEditorStore","__unstableUseRichText","useRichText","create","toHTMLString","insert","useMergeRefs","__unstableStripHTML","stripHTML","PostTypeSupportCheck","editorStore","REGEXP_NEWLINES","PostTitle","_","forwardedRef","ref","isSelected","setIsSelected","editPost","insertDefaultBlock","clearSelectedBlock","insertBlocks","isCleanNewPost","title","placeholder","hasFixedToolbar","select","getEditedPostAttribute","_isCleanNewPost","getSettings","titlePlaceholder","_hasFixedToolbar","focus","current","defaultView","ownerDocument","name","parent","document","activeElement","body","onEnterPress","undefined","onInsertBlockAfter","blocks","onUpdate","newTitle","selection","setSelection","onSelect","onUnselect","onChange","value","replace","onKeyDown","event","keyCode","preventDefault","onPaste","clipboardData","plainText","html","getData","error1","error2","window","console","log","content","HTML","length","firstBlock","attributes","slice","newValue","start","end","className","decodedPlaceholder","richTextRef","selectionStart","selectionEnd","onSelectionChange","newStart","newEnd","sel","__unstableDisableFormats","preserveWhiteSpace","createElement","supportKeys","contentEditable","role","onFocus","onBlur","onKeyPress"],"sources":["@wordpress/editor/src/components/post-title/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tforwardRef,\n\tuseEffect,\n\tuseImperativeHandle,\n\tuseRef,\n\tuseState,\n} from '@wordpress/element';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { ENTER } from '@wordpress/keycodes';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { pasteHandler } from '@wordpress/blocks';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport {\n\t__unstableUseRichText as useRichText,\n\tcreate,\n\ttoHTMLString,\n\tinsert,\n} from '@wordpress/rich-text';\nimport { useMergeRefs } from '@wordpress/compose';\nimport { __unstableStripHTML as stripHTML } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport PostTypeSupportCheck from '../post-type-support-check';\nimport { store as editorStore } from '../../store';\n\n/**\n * Constants\n */\nconst REGEXP_NEWLINES = /[\\r\\n]+/g;\n\nfunction PostTitle( _, forwardedRef ) {\n\tconst ref = useRef();\n\tconst [ isSelected, setIsSelected ] = useState( false );\n\tconst { editPost } = useDispatch( editorStore );\n\tconst { insertDefaultBlock, clearSelectedBlock, insertBlocks } =\n\t\tuseDispatch( blockEditorStore );\n\tconst { isCleanNewPost, title, placeholder, hasFixedToolbar } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedPostAttribute, isCleanNewPost: _isCleanNewPost } =\n\t\t\t\tselect( editorStore );\n\t\t\tconst { getSettings } = select( blockEditorStore );\n\t\t\tconst { titlePlaceholder, hasFixedToolbar: _hasFixedToolbar } =\n\t\t\t\tgetSettings();\n\n\t\t\treturn {\n\t\t\t\tisCleanNewPost: _isCleanNewPost(),\n\t\t\t\ttitle: getEditedPostAttribute( 'title' ),\n\t\t\t\tplaceholder: titlePlaceholder,\n\t\t\t\thasFixedToolbar: _hasFixedToolbar,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tuseImperativeHandle( forwardedRef, () => ( {\n\t\tfocus: () => {\n\t\t\tref?.current?.focus();\n\t\t},\n\t} ) );\n\n\tuseEffect( () => {\n\t\tif ( ! ref.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { defaultView } = ref.current.ownerDocument;\n\t\tconst { name, parent } = defaultView;\n\t\tconst ownerDocument =\n\t\t\tname === 'editor-canvas' ? parent.document : defaultView.document;\n\t\tconst { activeElement, body } = ownerDocument;\n\n\t\t// Only autofocus the title when the post is entirely empty. This should\n\t\t// only happen for a new post, which means we focus the title on new\n\t\t// post so the author can start typing right away, without needing to\n\t\t// click anything.\n\t\tif ( isCleanNewPost && ( ! activeElement || body === activeElement ) ) {\n\t\t\tref.current.focus();\n\t\t}\n\t}, [ isCleanNewPost ] );\n\n\tfunction onEnterPress() {\n\t\tinsertDefaultBlock( undefined, undefined, 0 );\n\t}\n\n\tfunction onInsertBlockAfter( blocks ) {\n\t\tinsertBlocks( blocks, 0 );\n\t}\n\n\tfunction onUpdate( newTitle ) {\n\t\teditPost( { title: newTitle } );\n\t}\n\n\tconst [ selection, setSelection ] = useState( {} );\n\n\tfunction onSelect() {\n\t\tsetIsSelected( true );\n\t\tclearSelectedBlock();\n\t}\n\n\tfunction onUnselect() {\n\t\tsetIsSelected( false );\n\t\tsetSelection( {} );\n\t}\n\n\tfunction onChange( value ) {\n\t\tonUpdate( value.replace( REGEXP_NEWLINES, ' ' ) );\n\t}\n\n\tfunction onKeyDown( event ) {\n\t\tif ( event.keyCode === ENTER ) {\n\t\t\tevent.preventDefault();\n\t\t\tonEnterPress();\n\t\t}\n\t}\n\n\tfunction onPaste( event ) {\n\t\tconst clipboardData = event.clipboardData;\n\n\t\tlet plainText = '';\n\t\tlet html = '';\n\n\t\t// IE11 only supports `Text` as an argument for `getData` and will\n\t\t// otherwise throw an invalid argument error, so we try the standard\n\t\t// arguments first, then fallback to `Text` if they fail.\n\t\ttry {\n\t\t\tplainText = clipboardData.getData( 'text/plain' );\n\t\t\thtml = clipboardData.getData( 'text/html' );\n\t\t} catch ( error1 ) {\n\t\t\ttry {\n\t\t\t\thtml = clipboardData.getData( 'Text' );\n\t\t\t} catch ( error2 ) {\n\t\t\t\t// Some browsers like UC Browser paste plain text by default and\n\t\t\t\t// don't support clipboardData at all, so allow default\n\t\t\t\t// behaviour.\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// Allows us to ask for this information when we get a report.\n\t\twindow.console.log( 'Received HTML:\\n\\n', html );\n\t\twindow.console.log( 'Received plain text:\\n\\n', plainText );\n\n\t\tconst content = pasteHandler( {\n\t\t\tHTML: html,\n\t\t\tplainText,\n\t\t} );\n\n\t\tevent.preventDefault();\n\n\t\tif ( ! content.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( typeof content !== 'string' ) {\n\t\t\tconst [ firstBlock ] = content;\n\n\t\t\tif (\n\t\t\t\t! title &&\n\t\t\t\t( firstBlock.name === 'core/heading' ||\n\t\t\t\t\tfirstBlock.name === 'core/paragraph' )\n\t\t\t) {\n\t\t\t\tonUpdate( stripHTML( firstBlock.attributes.content ) );\n\t\t\t\tonInsertBlockAfter( content.slice( 1 ) );\n\t\t\t} else {\n\t\t\t\tonInsertBlockAfter( content );\n\t\t\t}\n\t\t} else {\n\t\t\tconst value = {\n\t\t\t\t...create( { html: title } ),\n\t\t\t\t...selection,\n\t\t\t};\n\t\t\tconst newValue = insert(\n\t\t\t\tvalue,\n\t\t\t\tcreate( { html: stripHTML( content ) } )\n\t\t\t);\n\t\t\tonUpdate( toHTMLString( { value: newValue } ) );\n\t\t\tsetSelection( {\n\t\t\t\tstart: newValue.start,\n\t\t\t\tend: newValue.end,\n\t\t\t} );\n\t\t}\n\t}\n\n\t// The wp-block className is important for editor styles.\n\t// This same block is used in both the visual and the code editor.\n\tconst className = classnames(\n\t\t'wp-block wp-block-post-title block-editor-block-list__block editor-post-title editor-post-title__input rich-text',\n\t\t{\n\t\t\t'is-selected': isSelected,\n\t\t\t'has-fixed-toolbar': hasFixedToolbar,\n\t\t}\n\t);\n\tconst decodedPlaceholder =\n\t\tdecodeEntities( placeholder ) || __( 'Add title' );\n\tconst { ref: richTextRef } = useRichText( {\n\t\tvalue: title,\n\t\tonChange,\n\t\tplaceholder: decodedPlaceholder,\n\t\tselectionStart: selection.start,\n\t\tselectionEnd: selection.end,\n\t\tonSelectionChange( newStart, newEnd ) {\n\t\t\tsetSelection( ( sel ) => {\n\t\t\t\tconst { start, end } = sel;\n\t\t\t\tif ( start === newStart && end === newEnd ) {\n\t\t\t\t\treturn sel;\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tstart: newStart,\n\t\t\t\t\tend: newEnd,\n\t\t\t\t};\n\t\t\t} );\n\t\t},\n\t\t__unstableDisableFormats: true,\n\t\tpreserveWhiteSpace: true,\n\t} );\n\n\t/* eslint-disable jsx-a11y/heading-has-content, jsx-a11y/no-noninteractive-element-to-interactive-role */\n\treturn (\n\t\t<PostTypeSupportCheck supportKeys=\"title\">\n\t\t\t<h1\n\t\t\t\tref={ useMergeRefs( [ richTextRef, ref ] ) }\n\t\t\t\tcontentEditable\n\t\t\t\tclassName={ className }\n\t\t\t\taria-label={ decodedPlaceholder }\n\t\t\t\trole=\"textbox\"\n\t\t\t\taria-multiline=\"true\"\n\t\t\t\tonFocus={ onSelect }\n\t\t\t\tonBlur={ onUnselect }\n\t\t\t\tonKeyDown={ onKeyDown }\n\t\t\t\tonKeyPress={ onUnselect }\n\t\t\t\tonPaste={ onPaste }\n\t\t\t/>\n\t\t</PostTypeSupportCheck>\n\t);\n\t/* eslint-enable jsx-a11y/heading-has-content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,UAAU,EAAG5C,UAAY;IACzBQ,OAAO,EAAGA;EAAS,CACnB,CACoB,CAAC;EAExB;AACD;;AAEA,eAAerE,UAAU,CAAEuB,SAAU,CAAC"}
@@ -1,13 +1,12 @@
1
1
  import { createElement } from "@wordpress/element";
2
-
3
2
  /**
4
3
  * External dependencies
5
4
  */
6
5
  import { View } from 'react-native';
6
+
7
7
  /**
8
8
  * WordPress dependencies
9
9
  */
10
-
11
10
  import { Component } from '@wordpress/element';
12
11
  import { __experimentalRichText as RichText, create, insert } from '@wordpress/rich-text';
13
12
  import { decodeEntities } from '@wordpress/html-entities';
@@ -18,44 +17,37 @@ import { __, sprintf } from '@wordpress/i18n';
18
17
  import { pasteHandler } from '@wordpress/blocks';
19
18
  import { store as blockEditorStore } from '@wordpress/block-editor';
20
19
  import { store as editorStore } from '@wordpress/editor';
20
+
21
21
  /**
22
22
  * Internal dependencies
23
23
  */
24
-
25
24
  import styles from './style.scss';
26
-
27
25
  class PostTitle extends Component {
28
26
  constructor(props) {
29
27
  super(props);
30
28
  this.setRef = this.setRef.bind(this);
31
29
  this.onPaste = this.onPaste.bind(this);
32
30
  }
33
-
34
31
  componentDidUpdate(prevProps) {
35
32
  // Unselect if any other block is selected and blur the RichText.
36
33
  if (this.props.isSelected && !prevProps.isAnyBlockSelected && this.props.isAnyBlockSelected) {
37
34
  if (this.richTextRef) {
38
35
  this.richTextRef.blur();
39
36
  }
40
-
41
37
  this.props.onUnselect();
42
38
  }
43
39
  }
44
-
45
40
  componentDidMount() {
46
41
  if (this.props.innerRef) {
47
42
  this.props.innerRef(this);
48
43
  }
49
44
  }
50
-
51
45
  handleFocusOutside() {
52
46
  this.props.onUnselect();
53
47
  }
54
-
55
48
  focus() {
56
49
  this.props.onSelect();
57
50
  }
58
-
59
51
  onPaste({
60
52
  value,
61
53
  onChange,
@@ -71,7 +63,6 @@ class PostTitle extends Component {
71
63
  HTML: html,
72
64
  plainText
73
65
  });
74
-
75
66
  if (content.length) {
76
67
  if (typeof content === 'string') {
77
68
  const valueToInsert = create({
@@ -80,7 +71,6 @@ class PostTitle extends Component {
80
71
  onChange(insert(value, valueToInsert));
81
72
  } else {
82
73
  const [firstBlock] = content;
83
-
84
74
  if (!title && (firstBlock.name === 'core/heading' || firstBlock.name === 'core/paragraph')) {
85
75
  onUpdate(firstBlock.attributes.content);
86
76
  onInsertBlockAfter(content.slice(1));
@@ -90,27 +80,19 @@ class PostTitle extends Component {
90
80
  }
91
81
  }
92
82
  }
93
-
94
83
  setRef(richText) {
95
84
  this.richTextRef = richText;
96
85
  }
97
-
98
86
  getTitle(title, postType) {
99
87
  if ('page' === postType) {
100
- return !title ?
101
- /* translators: accessibility text. empty page title. */
102
- __('Page title. Empty') : sprintf(
103
- /* translators: accessibility text. %s: text content of the page title. */
88
+ return !title ? /* translators: accessibility text. empty page title. */
89
+ __('Page title. Empty') : sprintf( /* translators: accessibility text. %s: text content of the page title. */
104
90
  __('Page title. %s'), title);
105
91
  }
106
-
107
- return !title ?
108
- /* translators: accessibility text. empty post title. */
109
- __('Post title. Empty') : sprintf(
110
- /* translators: accessibility text. %s: text content of the post title. */
92
+ return !title ? /* translators: accessibility text. empty post title. */
93
+ __('Post title. Empty') : sprintf( /* translators: accessibility text. %s: text content of the post title. */
111
94
  __('Post title. %s'), title);
112
95
  }
113
-
114
96
  render() {
115
97
  const {
116
98
  placeholder,
@@ -124,7 +106,8 @@ class PostTitle extends Component {
124
106
  } = this.props;
125
107
  const decodedPlaceholder = decodeEntities(placeholder);
126
108
  const borderColor = this.props.isSelected ? focusedBorderColor : 'transparent';
127
- const titleStyles = { ...style,
109
+ const titleStyles = {
110
+ ...style,
128
111
  ...(globalStyles?.text && {
129
112
  color: globalStyles.text,
130
113
  placeholderColor: globalStyles.text
@@ -166,9 +149,7 @@ class PostTitle extends Component {
166
149
  __unstableOnCreateUndoLevel: () => {}
167
150
  }));
168
151
  }
169
-
170
152
  }
171
-
172
153
  export default compose(withSelect(select => {
173
154
  const {
174
155
  isPostTitleSelected,
@@ -206,29 +187,23 @@ export default compose(withSelect(select => {
206
187
  onEnterPress() {
207
188
  insertDefaultBlock(undefined, undefined, 0);
208
189
  },
209
-
210
190
  onUndo: undo,
211
191
  onRedo: redo,
212
-
213
192
  onSelect() {
214
193
  togglePostTitleSelection(true);
215
194
  clearSelectedBlock();
216
195
  },
217
-
218
196
  onUnselect() {
219
197
  togglePostTitleSelection(false);
220
198
  },
221
-
222
199
  onUpdate(title) {
223
200
  editPost({
224
201
  title
225
202
  });
226
203
  },
227
-
228
204
  onInsertBlockAfter(blocks) {
229
205
  insertBlocks(blocks, 0);
230
206
  }
231
-
232
207
  };
233
208
  }), withInstanceId, withFocusOutside)(PostTitle);
234
209
  //# sourceMappingURL=index.native.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/components/post-title/index.native.js"],"names":["View","Component","__experimentalRichText","RichText","create","insert","decodeEntities","withDispatch","withSelect","withFocusOutside","withInstanceId","compose","__","sprintf","pasteHandler","store","blockEditorStore","editorStore","styles","PostTitle","constructor","props","setRef","bind","onPaste","componentDidUpdate","prevProps","isSelected","isAnyBlockSelected","richTextRef","blur","onUnselect","componentDidMount","innerRef","handleFocusOutside","focus","onSelect","value","onChange","plainText","html","title","onInsertBlockAfter","onUpdate","content","HTML","length","valueToInsert","firstBlock","name","attributes","slice","richText","getTitle","postType","render","placeholder","style","focusedBorderColor","borderStyle","isDimmed","globalStyles","decodedPlaceholder","borderColor","titleStyles","text","color","placeholderColor","titleContainer","dimmed","onBlur","onEnterPress","select","isPostTitleSelected","getEditedPostAttribute","getSelectedBlockClientId","getBlockRootClientId","getSettings","selectedId","selectionIsNested","__experimentalGlobalStylesBaseStyles","dispatch","undo","redo","togglePostTitleSelection","editPost","clearSelectedBlock","insertDefaultBlock","insertBlocks","undefined","onUndo","onRedo","blocks"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,IAAT,QAAqB,cAArB;AAEA;AACA;AACA;;AACA,SAASC,SAAT,QAA0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AAAF,OAAF,CAAR;AACA,KAfK;;AAgBNC,IAAAA,kBAAkB,CAAEkD,MAAF,EAAW;AAC5BJ,MAAAA,YAAY,CAAEI,MAAF,EAAU,CAAV,CAAZ;AACA;;AAlBK,GAAP;AAoBA,CA3BW,CArBS,EAiDrBlF,cAjDqB,EAkDrBD,gBAlDqB,CAAP,CAmDZU,SAnDY,CAAf","sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport {\n\t__experimentalRichText as RichText,\n\tcreate,\n\tinsert,\n} from '@wordpress/rich-text';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { withDispatch, withSelect } from '@wordpress/data';\nimport { withFocusOutside } from '@wordpress/components';\nimport { withInstanceId, compose } from '@wordpress/compose';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { pasteHandler } from '@wordpress/blocks';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\n\nclass PostTitle extends Component {\n\tconstructor( props ) {\n\t\tsuper( props );\n\n\t\tthis.setRef = this.setRef.bind( this );\n\t\tthis.onPaste = this.onPaste.bind( this );\n\t}\n\tcomponentDidUpdate( prevProps ) {\n\t\t// Unselect if any other block is selected and blur the RichText.\n\t\tif (\n\t\t\tthis.props.isSelected &&\n\t\t\t! prevProps.isAnyBlockSelected &&\n\t\t\tthis.props.isAnyBlockSelected\n\t\t) {\n\t\t\tif ( this.richTextRef ) {\n\t\t\t\tthis.richTextRef.blur();\n\t\t\t}\n\t\t\tthis.props.onUnselect();\n\t\t}\n\t}\n\n\tcomponentDidMount() {\n\t\tif ( this.props.innerRef ) {\n\t\t\tthis.props.innerRef( this );\n\t\t}\n\t}\n\n\thandleFocusOutside() {\n\t\tthis.props.onUnselect();\n\t}\n\n\tfocus() {\n\t\tthis.props.onSelect();\n\t}\n\n\tonPaste( { value, onChange, plainText, html } ) {\n\t\tconst { title, onInsertBlockAfter, onUpdate } = this.props;\n\n\t\tconst content = pasteHandler( {\n\t\t\tHTML: html,\n\t\t\tplainText,\n\t\t} );\n\n\t\tif ( content.length ) {\n\t\t\tif ( typeof content === 'string' ) {\n\t\t\t\tconst valueToInsert = create( { html: content } );\n\t\t\t\tonChange( insert( value, valueToInsert ) );\n\t\t\t} else {\n\t\t\t\tconst [ firstBlock ] = content;\n\t\t\t\tif (\n\t\t\t\t\t! title &&\n\t\t\t\t\t( firstBlock.name === 'core/heading' ||\n\t\t\t\t\t\tfirstBlock.name === 'core/paragraph' )\n\t\t\t\t) {\n\t\t\t\t\tonUpdate( firstBlock.attributes.content );\n\t\t\t\t\tonInsertBlockAfter( content.slice( 1 ) );\n\t\t\t\t} else {\n\t\t\t\t\tonInsertBlockAfter( content );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tsetRef( richText ) {\n\t\tthis.richTextRef = richText;\n\t}\n\n\tgetTitle( title, postType ) {\n\t\tif ( 'page' === postType ) {\n\t\t\treturn ! title\n\t\t\t\t? /* translators: accessibility text. empty page title. */\n\t\t\t\t __( 'Page title. Empty' )\n\t\t\t\t: sprintf(\n\t\t\t\t\t\t/* translators: accessibility text. %s: text content of the page title. */\n\t\t\t\t\t\t__( 'Page title. %s' ),\n\t\t\t\t\t\ttitle\n\t\t\t\t );\n\t\t}\n\n\t\treturn ! title\n\t\t\t? /* translators: accessibility text. empty post title. */\n\t\t\t __( 'Post title. Empty' )\n\t\t\t: sprintf(\n\t\t\t\t\t/* translators: accessibility text. %s: text content of the post title. */\n\t\t\t\t\t__( 'Post title. %s' ),\n\t\t\t\t\ttitle\n\t\t\t );\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tplaceholder,\n\t\t\tstyle,\n\t\t\ttitle,\n\t\t\tfocusedBorderColor,\n\t\t\tborderStyle,\n\t\t\tisDimmed,\n\t\t\tpostType,\n\t\t\tglobalStyles,\n\t\t} = this.props;\n\n\t\tconst decodedPlaceholder = decodeEntities( placeholder );\n\t\tconst borderColor = this.props.isSelected\n\t\t\t? focusedBorderColor\n\t\t\t: 'transparent';\n\t\tconst titleStyles = {\n\t\t\t...style,\n\t\t\t...( globalStyles?.text && {\n\t\t\t\tcolor: globalStyles.text,\n\t\t\t\tplaceholderColor: globalStyles.text,\n\t\t\t} ),\n\t\t};\n\n\t\treturn (\n\t\t\t<View\n\t\t\t\ttestID=\"post-title\"\n\t\t\t\tstyle={ [\n\t\t\t\t\tstyles.titleContainer,\n\t\t\t\t\tborderStyle,\n\t\t\t\t\t{ borderColor },\n\t\t\t\t\tisDimmed && styles.dimmed,\n\t\t\t\t] }\n\t\t\t\taccessible={ ! this.props.isSelected }\n\t\t\t\taccessibilityLabel={ this.getTitle( title, postType ) }\n\t\t\t\taccessibilityHint={ __( 'Updates the title.' ) }\n\t\t\t>\n\t\t\t\t<RichText\n\t\t\t\t\tsetRef={ this.setRef }\n\t\t\t\t\taccessibilityLabel={ this.getTitle( title, postType ) }\n\t\t\t\t\ttagName={ 'p' }\n\t\t\t\t\ttagsToEliminate={ [ 'strong' ] }\n\t\t\t\t\tunstableOnFocus={ this.props.onSelect }\n\t\t\t\t\tonBlur={ this.props.onBlur } // Always assign onBlur as a props.\n\t\t\t\t\tmultiline={ false }\n\t\t\t\t\tstyle={ titleStyles }\n\t\t\t\t\tstyles={ styles }\n\t\t\t\t\tfontSize={ 24 }\n\t\t\t\t\tlineHeight={ 1 }\n\t\t\t\t\tfontWeight={ 'bold' }\n\t\t\t\t\tdeleteEnter={ true }\n\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\tthis.props.onUpdate( value );\n\t\t\t\t\t} }\n\t\t\t\t\tonPaste={ this.onPaste }\n\t\t\t\t\tplaceholder={ decodedPlaceholder }\n\t\t\t\t\tvalue={ title }\n\t\t\t\t\tonSelectionChange={ () => {} }\n\t\t\t\t\tonEnter={ this.props.onEnterPress }\n\t\t\t\t\tdisableEditingMenu={ true }\n\t\t\t\t\t__unstableIsSelected={ this.props.isSelected }\n\t\t\t\t\t__unstableOnCreateUndoLevel={ () => {} }\n\t\t\t\t></RichText>\n\t\t\t</View>\n\t\t);\n\t}\n}\n\nexport default compose(\n\twithSelect( ( select ) => {\n\t\tconst { isPostTitleSelected, getEditedPostAttribute } =\n\t\t\tselect( editorStore );\n\t\tconst { getSelectedBlockClientId, getBlockRootClientId, getSettings } =\n\t\t\tselect( blockEditorStore );\n\n\t\tconst selectedId = getSelectedBlockClientId();\n\t\tconst selectionIsNested = !! getBlockRootClientId( selectedId );\n\t\tconst globalStyles =\n\t\t\tgetSettings()?.__experimentalGlobalStylesBaseStyles?.color;\n\n\t\treturn {\n\t\t\tpostType: getEditedPostAttribute( 'type' ),\n\t\t\ttitle: getEditedPostAttribute( 'title' ),\n\t\t\tisAnyBlockSelected: !! selectedId,\n\t\t\tisSelected: isPostTitleSelected(),\n\t\t\tisDimmed: selectionIsNested,\n\t\t\tglobalStyles,\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst { undo, redo, togglePostTitleSelection, editPost } =\n\t\t\tdispatch( editorStore );\n\n\t\tconst { clearSelectedBlock, insertDefaultBlock, insertBlocks } =\n\t\t\tdispatch( blockEditorStore );\n\n\t\treturn {\n\t\t\tonEnterPress() {\n\t\t\t\tinsertDefaultBlock( undefined, undefined, 0 );\n\t\t\t},\n\t\t\tonUndo: undo,\n\t\t\tonRedo: redo,\n\t\t\tonSelect() {\n\t\t\t\ttogglePostTitleSelection( true );\n\t\t\t\tclearSelectedBlock();\n\t\t\t},\n\t\t\tonUnselect() {\n\t\t\t\ttogglePostTitleSelection( false );\n\t\t\t},\n\t\t\tonUpdate( title ) {\n\t\t\t\teditPost( { title } );\n\t\t\t},\n\t\t\tonInsertBlockAfter( blocks ) {\n\t\t\t\tinsertBlocks( blocks, 0 );\n\t\t\t},\n\t\t};\n\t} ),\n\twithInstanceId,\n\twithFocusOutside\n)( PostTitle );\n"]}
1
+ {"version":3,"names":["View","Component","__experimentalRichText","RichText","create","insert","decodeEntities","withDispatch","withSelect","withFocusOutside","withInstanceId","compose","__","sprintf","pasteHandler","store","blockEditorStore","editorStore","styles","PostTitle","constructor","props","setRef","bind","onPaste","componentDidUpdate","prevProps","isSelected","isAnyBlockSelected","richTextRef","blur","onUnselect","componentDidMount","innerRef","handleFocusOutside","focus","onSelect","value","onChange","plainText","html","title","onInsertBlockAfter","onUpdate","content","HTML","length","valueToInsert","firstBlock","name","attributes","slice","richText","getTitle","postType","render","placeholder","style","focusedBorderColor","borderStyle","isDimmed","globalStyles","decodedPlaceholder","borderColor","titleStyles","text","color","placeholderColor","createElement","testID","titleContainer","dimmed","accessible","accessibilityLabel","accessibilityHint","tagName","tagsToEliminate","unstableOnFocus","onBlur","multiline","fontSize","lineHeight","fontWeight","deleteEnter","onSelectionChange","onEnter","onEnterPress","disableEditingMenu","__unstableIsSelected","__unstableOnCreateUndoLevel","select","isPostTitleSelected","getEditedPostAttribute","getSelectedBlockClientId","getBlockRootClientId","getSettings","selectedId","selectionIsNested","__experimentalGlobalStylesBaseStyles","dispatch","undo","redo","togglePostTitleSelection","editPost","clearSelectedBlock","insertDefaultBlock","insertBlocks","undefined","onUndo","onRedo","blocks"],"sources":["@wordpress/editor/src/components/post-title/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport {\n\t__experimentalRichText as RichText,\n\tcreate,\n\tinsert,\n} from '@wordpress/rich-text';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { withDispatch, withSelect } from '@wordpress/data';\nimport { withFocusOutside } from '@wordpress/components';\nimport { withInstanceId, compose } from '@wordpress/compose';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { pasteHandler } from '@wordpress/blocks';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\n\nclass PostTitle extends Component {\n\tconstructor( props ) {\n\t\tsuper( props );\n\n\t\tthis.setRef = this.setRef.bind( this );\n\t\tthis.onPaste = this.onPaste.bind( this );\n\t}\n\tcomponentDidUpdate( prevProps ) {\n\t\t// Unselect if any other block is selected and blur the RichText.\n\t\tif (\n\t\t\tthis.props.isSelected &&\n\t\t\t! prevProps.isAnyBlockSelected &&\n\t\t\tthis.props.isAnyBlockSelected\n\t\t) {\n\t\t\tif ( this.richTextRef ) {\n\t\t\t\tthis.richTextRef.blur();\n\t\t\t}\n\t\t\tthis.props.onUnselect();\n\t\t}\n\t}\n\n\tcomponentDidMount() {\n\t\tif ( this.props.innerRef ) {\n\t\t\tthis.props.innerRef( this );\n\t\t}\n\t}\n\n\thandleFocusOutside() {\n\t\tthis.props.onUnselect();\n\t}\n\n\tfocus() {\n\t\tthis.props.onSelect();\n\t}\n\n\tonPaste( { value, onChange, plainText, html } ) {\n\t\tconst { title, onInsertBlockAfter, onUpdate } = this.props;\n\n\t\tconst content = pasteHandler( {\n\t\t\tHTML: html,\n\t\t\tplainText,\n\t\t} );\n\n\t\tif ( content.length ) {\n\t\t\tif ( typeof content === 'string' ) {\n\t\t\t\tconst valueToInsert = create( { html: content } );\n\t\t\t\tonChange( insert( value, valueToInsert ) );\n\t\t\t} else {\n\t\t\t\tconst [ firstBlock ] = content;\n\t\t\t\tif (\n\t\t\t\t\t! title &&\n\t\t\t\t\t( firstBlock.name === 'core/heading' ||\n\t\t\t\t\t\tfirstBlock.name === 'core/paragraph' )\n\t\t\t\t) {\n\t\t\t\t\tonUpdate( firstBlock.attributes.content );\n\t\t\t\t\tonInsertBlockAfter( content.slice( 1 ) );\n\t\t\t\t} else {\n\t\t\t\t\tonInsertBlockAfter( content );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tsetRef( richText ) {\n\t\tthis.richTextRef = richText;\n\t}\n\n\tgetTitle( title, postType ) {\n\t\tif ( 'page' === postType ) {\n\t\t\treturn ! title\n\t\t\t\t? /* translators: accessibility text. empty page title. */\n\t\t\t\t __( 'Page title. Empty' )\n\t\t\t\t: sprintf(\n\t\t\t\t\t\t/* translators: accessibility text. %s: text content of the page title. */\n\t\t\t\t\t\t__( 'Page title. %s' ),\n\t\t\t\t\t\ttitle\n\t\t\t\t );\n\t\t}\n\n\t\treturn ! title\n\t\t\t? /* translators: accessibility text. empty post title. */\n\t\t\t __( 'Post title. Empty' )\n\t\t\t: sprintf(\n\t\t\t\t\t/* translators: accessibility text. %s: text content of the post title. */\n\t\t\t\t\t__( 'Post title. %s' ),\n\t\t\t\t\ttitle\n\t\t\t );\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tplaceholder,\n\t\t\tstyle,\n\t\t\ttitle,\n\t\t\tfocusedBorderColor,\n\t\t\tborderStyle,\n\t\t\tisDimmed,\n\t\t\tpostType,\n\t\t\tglobalStyles,\n\t\t} = this.props;\n\n\t\tconst decodedPlaceholder = decodeEntities( placeholder );\n\t\tconst borderColor = this.props.isSelected\n\t\t\t? focusedBorderColor\n\t\t\t: 'transparent';\n\t\tconst titleStyles = {\n\t\t\t...style,\n\t\t\t...( globalStyles?.text && {\n\t\t\t\tcolor: globalStyles.text,\n\t\t\t\tplaceholderColor: globalStyles.text,\n\t\t\t} ),\n\t\t};\n\n\t\treturn (\n\t\t\t<View\n\t\t\t\ttestID=\"post-title\"\n\t\t\t\tstyle={ [\n\t\t\t\t\tstyles.titleContainer,\n\t\t\t\t\tborderStyle,\n\t\t\t\t\t{ borderColor },\n\t\t\t\t\tisDimmed && styles.dimmed,\n\t\t\t\t] }\n\t\t\t\taccessible={ ! this.props.isSelected }\n\t\t\t\taccessibilityLabel={ this.getTitle( title, postType ) }\n\t\t\t\taccessibilityHint={ __( 'Updates the title.' ) }\n\t\t\t>\n\t\t\t\t<RichText\n\t\t\t\t\tsetRef={ this.setRef }\n\t\t\t\t\taccessibilityLabel={ this.getTitle( title, postType ) }\n\t\t\t\t\ttagName={ 'p' }\n\t\t\t\t\ttagsToEliminate={ [ 'strong' ] }\n\t\t\t\t\tunstableOnFocus={ this.props.onSelect }\n\t\t\t\t\tonBlur={ this.props.onBlur } // Always assign onBlur as a props.\n\t\t\t\t\tmultiline={ false }\n\t\t\t\t\tstyle={ titleStyles }\n\t\t\t\t\tstyles={ styles }\n\t\t\t\t\tfontSize={ 24 }\n\t\t\t\t\tlineHeight={ 1 }\n\t\t\t\t\tfontWeight={ 'bold' }\n\t\t\t\t\tdeleteEnter={ true }\n\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\tthis.props.onUpdate( value );\n\t\t\t\t\t} }\n\t\t\t\t\tonPaste={ this.onPaste }\n\t\t\t\t\tplaceholder={ decodedPlaceholder }\n\t\t\t\t\tvalue={ title }\n\t\t\t\t\tonSelectionChange={ () => {} }\n\t\t\t\t\tonEnter={ this.props.onEnterPress }\n\t\t\t\t\tdisableEditingMenu={ true }\n\t\t\t\t\t__unstableIsSelected={ this.props.isSelected }\n\t\t\t\t\t__unstableOnCreateUndoLevel={ () => {} }\n\t\t\t\t></RichText>\n\t\t\t</View>\n\t\t);\n\t}\n}\n\nexport default compose(\n\twithSelect( ( select ) => {\n\t\tconst { isPostTitleSelected, getEditedPostAttribute } =\n\t\t\tselect( editorStore );\n\t\tconst { getSelectedBlockClientId, getBlockRootClientId, getSettings } =\n\t\t\tselect( blockEditorStore );\n\n\t\tconst selectedId = getSelectedBlockClientId();\n\t\tconst selectionIsNested = !! getBlockRootClientId( selectedId );\n\t\tconst globalStyles =\n\t\t\tgetSettings()?.__experimentalGlobalStylesBaseStyles?.color;\n\n\t\treturn {\n\t\t\tpostType: getEditedPostAttribute( 'type' ),\n\t\t\ttitle: getEditedPostAttribute( 'title' ),\n\t\t\tisAnyBlockSelected: !! selectedId,\n\t\t\tisSelected: isPostTitleSelected(),\n\t\t\tisDimmed: selectionIsNested,\n\t\t\tglobalStyles,\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst { undo, redo, togglePostTitleSelection, editPost } =\n\t\t\tdispatch( editorStore );\n\n\t\tconst { clearSelectedBlock, insertDefaultBlock, insertBlocks } =\n\t\t\tdispatch( blockEditorStore );\n\n\t\treturn {\n\t\t\tonEnterPress() {\n\t\t\t\tinsertDefaultBlock( undefined, undefined, 0 );\n\t\t\t},\n\t\t\tonUndo: undo,\n\t\t\tonRedo: redo,\n\t\t\tonSelect() {\n\t\t\t\ttogglePostTitleSelection( true );\n\t\t\t\tclearSelectedBlock();\n\t\t\t},\n\t\t\tonUnselect() {\n\t\t\t\ttogglePostTitleSelection( false );\n\t\t\t},\n\t\t\tonUpdate( title ) {\n\t\t\t\teditPost( { title } );\n\t\t\t},\n\t\t\tonInsertBlockAfter( blocks ) {\n\t\t\t\tinsertBlocks( blocks, 0 );\n\t\t\t},\n\t\t};\n\t} ),\n\twithInstanceId,\n\twithFocusOutside\n)( PostTitle );\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,IAAI,QAAQ,cAAc;;AAEnC;AACA;AACA;AACA,SAASC,SAAS,QAAQ,oBAAoB;AAC9C,SACCC,sBAAsB,IAAIC,QAAQ,EAClCC,MAAM,EACNC,MAAM,QACA,sBAAsB;AAC7B,SAASC,cAAc,QAAQ,0BAA0B;AACzD,SAASC,YAAY,EAAEC,UAAU,QAAQ,iBAAiB;AAC1D,SAASC,gBAAgB,QAAQ,uBAAuB;AACxD,SAASC,cAAc,EAAEC,OAAO,QAAQ,oBAAoB;AAC5D,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,YAAY,QAAQ,mBAAmB;AAChD,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,yBAAyB;AACnE,SAASD,KAAK,IAAIE,WAAW,QAAQ,mBAAmB;;AAExD;AACA;AACA;AACA,OAAOC,MAAM,MAAM,cAAc;AAEjC,MAAMC,SAAS,SAASlB,SAAS,CAAC;EACjCmB,WAAWA,CAAEC,KAAK,EAAG;IACpB,KAAK,CAAEA,KAAM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A,CAAA,EAAG;MACdmB,kBAAkB,CAAEE,SAAS,EAAEA,SAAS,EAAE,CAAE,CAAC;IAC9C,CAAC;IACDC,MAAM,EAAER,IAAI;IACZS,MAAM,EAAER,IAAI;IACZjE,QAAQA,CAAA,EAAG;MACVkE,wBAAwB,CAAE,IAAK,CAAC;MAChCE,kBAAkB,CAAC,CAAC;IACrB,CAAC;IACDzE,UAAUA,CAAA,EAAG;MACZuE,wBAAwB,CAAE,KAAM,CAAC;IAClC,CAAC;IACD3D,QAAQA,CAAEF,KAAK,EAAG;MACjB8D,QAAQ,CAAE;QAAE9D;MAAM,CAAE,CAAC;IACtB,CAAC;IACDC,kBAAkBA,CAAEoE,MAAM,EAAG;MAC5BJ,YAAY,CAAEI,MAAM,EAAE,CAAE,CAAC;IAC1B;EACD,CAAC;AACF,CAAE,CAAC,EACHpG,cAAc,EACdD,gBACD,CAAC,CAAEU,SAAU,CAAC"}
@@ -3,12 +3,11 @@
3
3
  */
4
4
  import { withSelect } from '@wordpress/data';
5
5
  import { store as coreStore } from '@wordpress/core-data';
6
+
6
7
  /**
7
8
  * Internal dependencies
8
9
  */
9
-
10
10
  import { store as editorStore } from '../../store';
11
-
12
11
  function PostTrashCheck({
13
12
  isNew,
14
13
  postId,
@@ -18,10 +17,8 @@ function PostTrashCheck({
18
17
  if (isNew || !postId || !canUserDelete) {
19
18
  return null;
20
19
  }
21
-
22
20
  return children;
23
21
  }
24
-
25
22
  export default withSelect(select => {
26
23
  const {
27
24
  isEditedPostNew,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/components/post-trash/check.js"],"names":["withSelect","store","coreStore","editorStore","PostTrashCheck","isNew","postId","canUserDelete","children","select","isEditedPostNew","getCurrentPostId","getCurrentPostType","getPostType","canUser","postType","resource","rest_base"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,UAAT,QAA2B,iBAA3B;AACA,SAASC,KAAK,IAAIC,SAAlB,QAAmC,sBAAnC;AAEA;AACA;AACA;;AACA,SAASD,KAAK,IAAIE,WAAlB,QAAqC,aAArC;;AAEA,SAASC,cAAT,CAAyB;AAAEC,EAAAA,KAAF;AAASC,EAAAA,MAAT;AAAiBC,EAAAA,aAAjB;AAAgCC,EAAAA;AAAhC,CAAzB,EAAsE;AACrE,MAAKH,KAAK,IAAI,CAAEC,MAAX,IAAqB,CAAEC,aAA5B,EAA4C;AAC3C,WAAO,IAAP;AACA;;AAED,SAAOC,QAAP;AACA;;AAED,eAAeR,UAAU,CAAIS,MAAF,IAAc;AACxC,QAAM;AAAEC,IAAAA,eAAF;AAAmBC,IAAAA,gBAAnB;AAAqCC,IAAAA;AAArC,MACLH,MAAM,CAAEN,WAAF,CADP;AAEA,QAAM;AAAEU,IAAAA,WAAF;AAAeC,IAAAA;AAAf,MAA2BL,MAAM,CAAEP,SAAF,CAAvC;AACA,QAAMI,MAAM,GAAGK,gBAAgB,EAA/B;AACA,QAAMI,QAAQ,GAAGF,WAAW,CAAED,kBAAkB,EAApB,CAA5B;AACA,QAAMI,QAAQ,GAAGD,QAAQ,EAAEE,SAAV,IAAuB,EAAxC,CANwC,CAMI;;AAE5C,SAAO;AACNZ,IAAAA,KAAK,EAAEK,eAAe,EADhB;AAENJ,IAAAA,MAFM;AAGNC,IAAAA,aAAa,EACZD,MAAM,IAAIU,QAAV,GAAqBF,OAAO,CAAE,QAAF,EAAYE,QAAZ,EAAsBV,MAAtB,CAA5B,GAA6D;AAJxD,GAAP;AAMA,CAdwB,CAAV,CAcVF,cAdU,CAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { withSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nfunction PostTrashCheck( { isNew, postId, canUserDelete, children } ) {\n\tif ( isNew || ! postId || ! canUserDelete ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n\nexport default withSelect( ( select ) => {\n\tconst { isEditedPostNew, getCurrentPostId, getCurrentPostType } =\n\t\tselect( editorStore );\n\tconst { getPostType, canUser } = select( coreStore );\n\tconst postId = getCurrentPostId();\n\tconst postType = getPostType( getCurrentPostType() );\n\tconst resource = postType?.rest_base || ''; // eslint-disable-line camelcase\n\n\treturn {\n\t\tisNew: isEditedPostNew(),\n\t\tpostId,\n\t\tcanUserDelete:\n\t\t\tpostId && resource ? canUser( 'delete', resource, postId ) : false,\n\t};\n} )( PostTrashCheck );\n"]}
1
+ {"version":3,"names":["withSelect","store","coreStore","editorStore","PostTrashCheck","isNew","postId","canUserDelete","children","select","isEditedPostNew","getCurrentPostId","getCurrentPostType","getPostType","canUser","postType","resource","rest_base"],"sources":["@wordpress/editor/src/components/post-trash/check.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { withSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nfunction PostTrashCheck( { isNew, postId, canUserDelete, children } ) {\n\tif ( isNew || ! postId || ! canUserDelete ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n\nexport default withSelect( ( select ) => {\n\tconst { isEditedPostNew, getCurrentPostId, getCurrentPostType } =\n\t\tselect( editorStore );\n\tconst { getPostType, canUser } = select( coreStore );\n\tconst postId = getCurrentPostId();\n\tconst postType = getPostType( getCurrentPostType() );\n\tconst resource = postType?.rest_base || ''; // eslint-disable-line camelcase\n\n\treturn {\n\t\tisNew: isEditedPostNew(),\n\t\tpostId,\n\t\tcanUserDelete:\n\t\t\tpostId && resource ? canUser( 'delete', resource, postId ) : false,\n\t};\n} )( PostTrashCheck );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,UAAU,QAAQ,iBAAiB;AAC5C,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;;AAEzD;AACA;AACA;AACA,SAASD,KAAK,IAAIE,WAAW,QAAQ,aAAa;AAElD,SAASC,cAAcA,CAAE;EAAEC,KAAK;EAAEC,MAAM;EAAEC,aAAa;EAAEC;AAAS,CAAC,EAAG;EACrE,IAAKH,KAAK,IAAI,CAAEC,MAAM,IAAI,CAAEC,aAAa,EAAG;IAC3C,OAAO,IAAI;EACZ;EAEA,OAAOC,QAAQ;AAChB;AAEA,eAAeR,UAAU,CAAIS,MAAM,IAAM;EACxC,MAAM;IAAEC,eAAe;IAAEC,gBAAgB;IAAEC;EAAmB,CAAC,GAC9DH,MAAM,CAAEN,WAAY,CAAC;EACtB,MAAM;IAAEU,WAAW;IAAEC;EAAQ,CAAC,GAAGL,MAAM,CAAEP,SAAU,CAAC;EACpD,MAAMI,MAAM,GAAGK,gBAAgB,CAAC,CAAC;EACjC,MAAMI,QAAQ,GAAGF,WAAW,CAAED,kBAAkB,CAAC,CAAE,CAAC;EACpD,MAAMI,QAAQ,GAAGD,QAAQ,EAAEE,SAAS,IAAI,EAAE,CAAC,CAAC;;EAE5C,OAAO;IACNZ,KAAK,EAAEK,eAAe,CAAC,CAAC;IACxBJ,MAAM;IACNC,aAAa,EACZD,MAAM,IAAIU,QAAQ,GAAGF,OAAO,CAAE,QAAQ,EAAEE,QAAQ,EAAEV,MAAO,CAAC,GAAG;EAC/D,CAAC;AACF,CAAE,CAAC,CAAEF,cAAe,CAAC"}
@@ -1,15 +1,14 @@
1
1
  import { createElement } from "@wordpress/element";
2
-
3
2
  /**
4
3
  * WordPress dependencies
5
4
  */
6
5
  import { __ } from '@wordpress/i18n';
7
6
  import { Button } from '@wordpress/components';
8
7
  import { useSelect, useDispatch } from '@wordpress/data';
8
+
9
9
  /**
10
10
  * Internal dependencies
11
11
  */
12
-
13
12
  import { store as editorStore } from '../../store';
14
13
  export default function PostTrash() {
15
14
  const {
@@ -27,11 +26,9 @@ export default function PostTrash() {
27
26
  const {
28
27
  trashPost
29
28
  } = useDispatch(editorStore);
30
-
31
29
  if (isNew || !postId) {
32
30
  return null;
33
31
  }
34
-
35
32
  return createElement(Button, {
36
33
  className: "editor-post-trash",
37
34
  isDestructive: true,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/components/post-trash/index.js"],"names":["__","Button","useSelect","useDispatch","store","editorStore","PostTrash","isNew","isDeleting","postId","select","isEditedPostNew","isDeletingPost","getCurrentPostId","trashPost","undefined"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,MAAT,QAAuB,uBAAvB;AACA,SAASC,SAAT,EAAoBC,WAApB,QAAuC,iBAAvC;AAEA;AACA;AACA;;AACA,SAASC,KAAK,IAAIC,WAAlB,QAAqC,aAArC;AAEA,eAAe,SAASC,SAAT,GAAqB;AACnC,QAAM;AAAEC,IAAAA,KAAF;AAASC,IAAAA,UAAT;AAAqBC,IAAAA;AAArB,MAAgCP,SAAS,CAAIQ,MAAF,IAAc;AAC9D,UAAMN,KAAK,GAAGM,MAAM,CAAEL,WAAF,CAApB;AACA,WAAO;AACNE,MAAAA,KAAK,EAAEH,KAAK,CAACO,eAAN,EADD;AAENH,MAAAA,UAAU,EAAEJ,KAAK,CAACQ,cAAN,EAFN;AAGNH,MAAAA,MAAM,EAAEL,KAAK,CAACS,gBAAN;AAHF,KAAP;AAKA,GAP8C,EAO5C,EAP4C,CAA/C;AAQA,QAAM;AAAEC,IAAAA;AAAF,MAAgBX,WAAW,CAAEE,WAAF,CAAjC;;AAEA,MAAKE,KAAK,IAAI,CAAEE,MAAhB,EAAyB;AACxB,WAAO,IAAP;AACA;;AAED,SACC,cAAC,MAAD;AACC,IAAA,SAAS,EAAC,mBADX;AAEC,IAAA,aAAa,MAFd;AAGC,IAAA,OAAO,EAAC,WAHT;AAIC,IAAA,MAAM,EAAGD,UAJV;AAKC,qBAAgBA,UALjB;AAMC,IAAA,OAAO,EAAGA,UAAU,GAAGO,SAAH,GAAe,MAAMD,SAAS;AANnD,KAQGd,EAAE,CAAE,eAAF,CARL,CADD;AAYA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nexport default function PostTrash() {\n\tconst { isNew, isDeleting, postId } = useSelect( ( select ) => {\n\t\tconst store = select( editorStore );\n\t\treturn {\n\t\t\tisNew: store.isEditedPostNew(),\n\t\t\tisDeleting: store.isDeletingPost(),\n\t\t\tpostId: store.getCurrentPostId(),\n\t\t};\n\t}, [] );\n\tconst { trashPost } = useDispatch( editorStore );\n\n\tif ( isNew || ! postId ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Button\n\t\t\tclassName=\"editor-post-trash\"\n\t\t\tisDestructive\n\t\t\tvariant=\"secondary\"\n\t\t\tisBusy={ isDeleting }\n\t\t\taria-disabled={ isDeleting }\n\t\t\tonClick={ isDeleting ? undefined : () => trashPost() }\n\t\t>\n\t\t\t{ __( 'Move to trash' ) }\n\t\t</Button>\n\t);\n}\n"]}
1
+ {"version":3,"names":["__","Button","useSelect","useDispatch","store","editorStore","PostTrash","isNew","isDeleting","postId","select","isEditedPostNew","isDeletingPost","getCurrentPostId","trashPost","createElement","className","isDestructive","variant","isBusy","onClick","undefined"],"sources":["@wordpress/editor/src/components/post-trash/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nexport default function PostTrash() {\n\tconst { isNew, isDeleting, postId } = useSelect( ( select ) => {\n\t\tconst store = select( editorStore );\n\t\treturn {\n\t\t\tisNew: store.isEditedPostNew(),\n\t\t\tisDeleting: store.isDeletingPost(),\n\t\t\tpostId: store.getCurrentPostId(),\n\t\t};\n\t}, [] );\n\tconst { trashPost } = useDispatch( editorStore );\n\n\tif ( isNew || ! postId ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Button\n\t\t\tclassName=\"editor-post-trash\"\n\t\t\tisDestructive\n\t\t\tvariant=\"secondary\"\n\t\t\tisBusy={ isDeleting }\n\t\t\taria-disabled={ isDeleting }\n\t\t\tonClick={ isDeleting ? undefined : () => trashPost() }\n\t\t>\n\t\t\t{ __( 'Move to trash' ) }\n\t\t</Button>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;;AAExD;AACA;AACA;AACA,SAASC,KAAK,IAAIC,WAAW,QAAQ,aAAa;AAElD,eAAe,SAASC,SAASA,CAAA,EAAG;EACnC,MAAM;IAAEC,KAAK;IAAEC,UAAU;IAAEC;EAAO,CAAC,GAAGP,SAAS,CAAIQ,MAAM,IAAM;IAC9D,MAAMN,KAAK,GAAGM,MAAM,CAAEL,WAAY,CAAC;IACnC,OAAO;MACNE,KAAK,EAAEH,KAAK,CAACO,eAAe,CAAC,CAAC;MAC9BH,UAAU,EAAEJ,KAAK,CAACQ,cAAc,CAAC,CAAC;MAClCH,MAAM,EAAEL,KAAK,CAACS,gBAAgB,CAAC;IAChC,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EACP,MAAM;IAAEC;EAAU,CAAC,GAAGX,WAAW,CAAEE,WAAY,CAAC;EAEhD,IAAKE,KAAK,IAAI,CAAEE,MAAM,EAAG;IACxB,OAAO,IAAI;EACZ;EAEA,OACCM,aAAA,CAACd,MAAM;IACNe,SAAS,EAAC,mBAAmB;IAC7BC,aAAa;IACbC,OAAO,EAAC,WAAW;IACnBC,MAAM,EAAGX,UAAY;IACrB,iBAAgBA,UAAY;IAC5BY,OAAO,EAAGZ,UAAU,GAAGa,SAAS,GAAG,MAAMP,SAAS,CAAC;EAAG,GAEpDd,EAAE,CAAE,eAAgB,CACf,CAAC;AAEX"}
@@ -1,19 +1,19 @@
1
1
  /**
2
2
  * WordPress dependencies
3
3
  */
4
- import { withSelect } from '@wordpress/data';
4
+ import { useSelect } from '@wordpress/data';
5
5
  import { store as coreStore } from '@wordpress/core-data';
6
+
6
7
  /**
7
8
  * Internal dependencies
8
9
  */
9
-
10
10
  import { store as editorStore } from '../../store';
11
+
11
12
  /**
12
13
  * A component which renders its own children only if the current editor post
13
14
  * type supports one of the given `supportKeys` prop.
14
15
  *
15
16
  * @param {Object} props Props.
16
- * @param {string} [props.postType] Current post type.
17
17
  * @param {WPElement} props.children Children to be rendered if post
18
18
  * type supports.
19
19
  * @param {(string|string[])} props.supportKeys String or string array of keys
@@ -21,33 +21,27 @@ import { store as editorStore } from '../../store';
21
21
  *
22
22
  * @return {WPComponent} The component to be rendered.
23
23
  */
24
-
25
- export function PostTypeSupportCheck({
26
- postType,
24
+ function PostTypeSupportCheck({
27
25
  children,
28
26
  supportKeys
29
27
  }) {
28
+ const postType = useSelect(select => {
29
+ const {
30
+ getEditedPostAttribute
31
+ } = select(editorStore);
32
+ const {
33
+ getPostType
34
+ } = select(coreStore);
35
+ return getPostType(getEditedPostAttribute('type'));
36
+ }, []);
30
37
  let isSupported = true;
31
-
32
38
  if (postType) {
33
39
  isSupported = (Array.isArray(supportKeys) ? supportKeys : [supportKeys]).some(key => !!postType.supports[key]);
34
40
  }
35
-
36
41
  if (!isSupported) {
37
42
  return null;
38
43
  }
39
-
40
44
  return children;
41
45
  }
42
- export default withSelect(select => {
43
- const {
44
- getEditedPostAttribute
45
- } = select(editorStore);
46
- const {
47
- getPostType
48
- } = select(coreStore);
49
- return {
50
- postType: getPostType(getEditedPostAttribute('type'))
51
- };
52
- })(PostTypeSupportCheck);
46
+ export default PostTypeSupportCheck;
53
47
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/components/post-type-support-check/index.js"],"names":["withSelect","store","coreStore","editorStore","PostTypeSupportCheck","postType","children","supportKeys","isSupported","Array","isArray","some","key","supports","select","getEditedPostAttribute","getPostType"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,UAAT,QAA2B,iBAA3B;AACA,SAASC,KAAK,IAAIC,SAAlB,QAAmC,sBAAnC;AAEA;AACA;AACA;;AACA,SAASD,KAAK,IAAIE,WAAlB,QAAqC,aAArC;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,oBAAT,CAA+B;AAAEC,EAAAA,QAAF;AAAYC,EAAAA,QAAZ;AAAsBC,EAAAA;AAAtB,CAA/B,EAAqE;AAC3E,MAAIC,WAAW,GAAG,IAAlB;;AACA,MAAKH,QAAL,EAAgB;AACfG,IAAAA,WAAW,GAAG,CACbC,KAAK,CAACC,OAAN,CAAeH,WAAf,IAA+BA,WAA/B,GAA6C,CAAEA,WAAF,CADhC,EAEZI,IAFY,CAEJC,GAAF,IAAW,CAAC,CAAEP,QAAQ,CAACQ,QAAT,CAAmBD,GAAnB,CAFR,CAAd;AAGA;;AAED,MAAK,CAAEJ,WAAP,EAAqB;AACpB,WAAO,IAAP;AACA;;AAED,SAAOF,QAAP;AACA;AAED,eAAeN,UAAU,CAAIc,MAAF,IAAc;AACxC,QAAM;AAAEC,IAAAA;AAAF,MAA6BD,MAAM,CAAEX,WAAF,CAAzC;AACA,QAAM;AAAEa,IAAAA;AAAF,MAAkBF,MAAM,CAAEZ,SAAF,CAA9B;AACA,SAAO;AACNG,IAAAA,QAAQ,EAAEW,WAAW,CAAED,sBAAsB,CAAE,MAAF,CAAxB;AADf,GAAP;AAGA,CANwB,CAAV,CAMVX,oBANU,CAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { withSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * A component which renders its own children only if the current editor post\n * type supports one of the given `supportKeys` prop.\n *\n * @param {Object} props Props.\n * @param {string} [props.postType] Current post type.\n * @param {WPElement} props.children Children to be rendered if post\n * type supports.\n * @param {(string|string[])} props.supportKeys String or string array of keys\n * to test.\n *\n * @return {WPComponent} The component to be rendered.\n */\nexport function PostTypeSupportCheck( { postType, children, supportKeys } ) {\n\tlet isSupported = true;\n\tif ( postType ) {\n\t\tisSupported = (\n\t\t\tArray.isArray( supportKeys ) ? supportKeys : [ supportKeys ]\n\t\t).some( ( key ) => !! postType.supports[ key ] );\n\t}\n\n\tif ( ! isSupported ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n\nexport default withSelect( ( select ) => {\n\tconst { getEditedPostAttribute } = select( editorStore );\n\tconst { getPostType } = select( coreStore );\n\treturn {\n\t\tpostType: getPostType( getEditedPostAttribute( 'type' ) ),\n\t};\n} )( PostTypeSupportCheck );\n"]}
1
+ {"version":3,"names":["useSelect","store","coreStore","editorStore","PostTypeSupportCheck","children","supportKeys","postType","select","getEditedPostAttribute","getPostType","isSupported","Array","isArray","some","key","supports"],"sources":["@wordpress/editor/src/components/post-type-support-check/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * A component which renders its own children only if the current editor post\n * type supports one of the given `supportKeys` prop.\n *\n * @param {Object} props Props.\n * @param {WPElement} props.children Children to be rendered if post\n * type supports.\n * @param {(string|string[])} props.supportKeys String or string array of keys\n * to test.\n *\n * @return {WPComponent} The component to be rendered.\n */\nfunction PostTypeSupportCheck( { children, supportKeys } ) {\n\tconst postType = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute } = select( editorStore );\n\t\tconst { getPostType } = select( coreStore );\n\t\treturn getPostType( getEditedPostAttribute( 'type' ) );\n\t}, [] );\n\tlet isSupported = true;\n\tif ( postType ) {\n\t\tisSupported = (\n\t\t\tArray.isArray( supportKeys ) ? supportKeys : [ supportKeys ]\n\t\t).some( ( key ) => !! postType.supports[ key ] );\n\t}\n\n\tif ( ! isSupported ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n\nexport default PostTypeSupportCheck;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;;AAEzD;AACA;AACA;AACA,SAASD,KAAK,IAAIE,WAAW,QAAQ,aAAa;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,oBAAoBA,CAAE;EAAEC,QAAQ;EAAEC;AAAY,CAAC,EAAG;EAC1D,MAAMC,QAAQ,GAAGP,SAAS,CAAIQ,MAAM,IAAM;IACzC,MAAM;MAAEC;IAAuB,CAAC,GAAGD,MAAM,CAAEL,WAAY,CAAC;IACxD,MAAM;MAAEO;IAAY,CAAC,GAAGF,MAAM,CAAEN,SAAU,CAAC;IAC3C,OAAOQ,WAAW,CAAED,sBAAsB,CAAE,MAAO,CAAE,CAAC;EACvD,CAAC,EAAE,EAAG,CAAC;EACP,IAAIE,WAAW,GAAG,IAAI;EACtB,IAAKJ,QAAQ,EAAG;IACfI,WAAW,GAAG,CACbC,KAAK,CAACC,OAAO,CAAEP,WAAY,CAAC,GAAGA,WAAW,GAAG,CAAEA,WAAW,CAAE,EAC3DQ,IAAI,CAAIC,GAAG,IAAM,CAAC,CAAER,QAAQ,CAACS,QAAQ,CAAED,GAAG,CAAG,CAAC;EACjD;EAEA,IAAK,CAAEJ,WAAW,EAAG;IACpB,OAAO,IAAI;EACZ;EAEA,OAAON,QAAQ;AAChB;AAEA,eAAeD,oBAAoB"}
@@ -3,10 +3,10 @@
3
3
  */
4
4
  import { useSelect } from '@wordpress/data';
5
5
  import { store as coreStore } from '@wordpress/core-data';
6
+
6
7
  /**
7
8
  * Internal dependencies
8
9
  */
9
-
10
10
  import { store as editorStore } from '../../store';
11
11
  export default function PostURLCheck({
12
12
  children
@@ -14,30 +14,22 @@ export default function PostURLCheck({
14
14
  const isVisible = useSelect(select => {
15
15
  const postTypeSlug = select(editorStore).getCurrentPostType();
16
16
  const postType = select(coreStore).getPostType(postTypeSlug);
17
-
18
17
  if (!postType?.viewable) {
19
18
  return false;
20
19
  }
21
-
22
20
  const post = select(editorStore).getCurrentPost();
23
-
24
21
  if (!post.link) {
25
22
  return false;
26
23
  }
27
-
28
24
  const permalinkParts = select(editorStore).getPermalinkParts();
29
-
30
25
  if (!permalinkParts) {
31
26
  return false;
32
27
  }
33
-
34
28
  return true;
35
29
  }, []);
36
-
37
30
  if (!isVisible) {
38
31
  return null;
39
32
  }
40
-
41
33
  return children;
42
34
  }
43
35
  //# sourceMappingURL=check.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/components/post-url/check.js"],"names":["useSelect","store","coreStore","editorStore","PostURLCheck","children","isVisible","select","postTypeSlug","getCurrentPostType","postType","getPostType","viewable","post","getCurrentPost","link","permalinkParts","getPermalinkParts"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,iBAA1B;AACA,SAASC,KAAK,IAAIC,SAAlB,QAAmC,sBAAnC;AAEA;AACA;AACA;;AACA,SAASD,KAAK,IAAIE,WAAlB,QAAqC,aAArC;AAEA,eAAe,SAASC,YAAT,CAAuB;AAAEC,EAAAA;AAAF,CAAvB,EAAsC;AACpD,QAAMC,SAAS,GAAGN,SAAS,CAAIO,MAAF,IAAc;AAC1C,UAAMC,YAAY,GAAGD,MAAM,CAAEJ,WAAF,CAAN,CAAsBM,kBAAtB,EAArB;AACA,UAAMC,QAAQ,GAAGH,MAAM,CAAEL,SAAF,CAAN,CAAoBS,WAApB,CAAiCH,YAAjC,CAAjB;;AACA,QAAK,CAAEE,QAAQ,EAAEE,QAAjB,EAA4B;AAC3B,aAAO,KAAP;AACA;;AAED,UAAMC,IAAI,GAAGN,MAAM,CAAEJ,WAAF,CAAN,CAAsBW,cAAtB,EAAb;;AACA,QAAK,CAAED,IAAI,CAACE,IAAZ,EAAmB;AAClB,aAAO,KAAP;AACA;;AAED,UAAMC,cAAc,GAAGT,MAAM,CAAEJ,WAAF,CAAN,CAAsBc,iBAAtB,EAAvB;;AACA,QAAK,CAAED,cAAP,EAAwB;AACvB,aAAO,KAAP;AACA;;AAED,WAAO,IAAP;AACA,GAlB0B,EAkBxB,EAlBwB,CAA3B;;AAoBA,MAAK,CAAEV,SAAP,EAAmB;AAClB,WAAO,IAAP;AACA;;AAED,SAAOD,QAAP;AACA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nexport default function PostURLCheck( { children } ) {\n\tconst isVisible = useSelect( ( select ) => {\n\t\tconst postTypeSlug = select( editorStore ).getCurrentPostType();\n\t\tconst postType = select( coreStore ).getPostType( postTypeSlug );\n\t\tif ( ! postType?.viewable ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst post = select( editorStore ).getCurrentPost();\n\t\tif ( ! post.link ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst permalinkParts = select( editorStore ).getPermalinkParts();\n\t\tif ( ! permalinkParts ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}, [] );\n\n\tif ( ! isVisible ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n"]}
1
+ {"version":3,"names":["useSelect","store","coreStore","editorStore","PostURLCheck","children","isVisible","select","postTypeSlug","getCurrentPostType","postType","getPostType","viewable","post","getCurrentPost","link","permalinkParts","getPermalinkParts"],"sources":["@wordpress/editor/src/components/post-url/check.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nexport default function PostURLCheck( { children } ) {\n\tconst isVisible = useSelect( ( select ) => {\n\t\tconst postTypeSlug = select( editorStore ).getCurrentPostType();\n\t\tconst postType = select( coreStore ).getPostType( postTypeSlug );\n\t\tif ( ! postType?.viewable ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst post = select( editorStore ).getCurrentPost();\n\t\tif ( ! post.link ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst permalinkParts = select( editorStore ).getPermalinkParts();\n\t\tif ( ! permalinkParts ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}, [] );\n\n\tif ( ! isVisible ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;;AAEzD;AACA;AACA;AACA,SAASD,KAAK,IAAIE,WAAW,QAAQ,aAAa;AAElD,eAAe,SAASC,YAAYA,CAAE;EAAEC;AAAS,CAAC,EAAG;EACpD,MAAMC,SAAS,GAAGN,SAAS,CAAIO,MAAM,IAAM;IAC1C,MAAMC,YAAY,GAAGD,MAAM,CAAEJ,WAAY,CAAC,CAACM,kBAAkB,CAAC,CAAC;IAC/D,MAAMC,QAAQ,GAAGH,MAAM,CAAEL,SAAU,CAAC,CAACS,WAAW,CAAEH,YAAa,CAAC;IAChE,IAAK,CAAEE,QAAQ,EAAEE,QAAQ,EAAG;MAC3B,OAAO,KAAK;IACb;IAEA,MAAMC,IAAI,GAAGN,MAAM,CAAEJ,WAAY,CAAC,CAACW,cAAc,CAAC,CAAC;IACnD,IAAK,CAAED,IAAI,CAACE,IAAI,EAAG;MAClB,OAAO,KAAK;IACb;IAEA,MAAMC,cAAc,GAAGT,MAAM,CAAEJ,WAAY,CAAC,CAACc,iBAAiB,CAAC,CAAC;IAChE,IAAK,CAAED,cAAc,EAAG;MACvB,OAAO,KAAK;IACb;IAEA,OAAO,IAAI;EACZ,CAAC,EAAE,EAAG,CAAC;EAEP,IAAK,CAAEV,SAAS,EAAG;IAClB,OAAO,IAAI;EACZ;EAEA,OAAOD,QAAQ;AAChB"}
@@ -1,5 +1,4 @@
1
1
  import { createElement, Fragment } from "@wordpress/element";
2
-
3
2
  /**
4
3
  * WordPress dependencies
5
4
  */
@@ -10,10 +9,10 @@ import { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '
10
9
  import { __ } from '@wordpress/i18n';
11
10
  import { TextControl, ExternalLink } from '@wordpress/components';
12
11
  import { store as coreStore } from '@wordpress/core-data';
12
+
13
13
  /**
14
14
  * Internal dependencies
15
15
  */
16
-
17
16
  import { store as editorStore } from '../../store';
18
17
  export default function PostURL({
19
18
  onClose
@@ -27,7 +26,6 @@ export default function PostURL({
27
26
  permalinkSuffix
28
27
  } = useSelect(select => {
29
28
  var _post$_links$wpActio;
30
-
31
29
  const post = select(editorStore).getCurrentPost();
32
30
  const postTypeSlug = select(editorStore).getCurrentPostType();
33
31
  const postType = select(coreStore).getPostType(postTypeSlug);
@@ -63,19 +61,17 @@ export default function PostURL({
63
61
  onChange: newValue => {
64
62
  editPost({
65
63
  slug: newValue
66
- }); // When we delete the field the permalink gets
64
+ });
65
+ // When we delete the field the permalink gets
67
66
  // reverted to the original value.
68
67
  // The forceEmptyField logic allows the user to have
69
68
  // the field temporarily empty while typing.
70
-
71
69
  if (!newValue) {
72
70
  if (!forceEmptyField) {
73
71
  setForceEmptyField(true);
74
72
  }
75
-
76
73
  return;
77
74
  }
78
-
79
75
  if (forceEmptyField) {
80
76
  setForceEmptyField(false);
81
77
  }
@@ -84,7 +80,6 @@ export default function PostURL({
84
80
  editPost({
85
81
  slug: cleanForSlug(event.target.value)
86
82
  });
87
-
88
83
  if (forceEmptyField) {
89
84
  setForceEmptyField(false);
90
85
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/editor/src/components/post-url/index.js"],"names":["useSelect","useDispatch","safeDecodeURIComponent","cleanForSlug","useState","__experimentalInspectorPopoverHeader","InspectorPopoverHeader","__","TextControl","ExternalLink","store","coreStore","editorStore","PostURL","onClose","isEditable","postSlug","viewPostLabel","postLink","permalinkPrefix","permalinkSuffix","select","post","getCurrentPost","postTypeSlug","getCurrentPostType","postType","getPostType","permalinkParts","getPermalinkParts","hasPublishAction","_links","isPermalinkEditable","getEditedPostSlug","labels","view_item","link","prefix","suffix","editPost","forceEmptyField","setForceEmptyField","newValue","slug","event","target","value"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,SAAT,EAAoBC,WAApB,QAAuC,iBAAvC;AACA,SAASC,sBAAT,EAAiCC,YAAjC,QAAqD,gBAArD;AACA,SAASC,QAAT,QAAyB,oBAAzB;AACA,SAASC,oCAAoC,IAAIC,sBAAjD,QAA+E,yBAA/E;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,WAAT,EAAsBC,YAAtB,QAA0C,uBAA1C;AACA,SAASC,KAAK,IAAIC,SAAlB,QAAmC,sBAAnC;AAEA;AACA;AACA;;AACA,SAASD,KAAK,IAAIE,WAAlB,QAAqC,aAArC;AAEA,eAAe,SAASC,OAAT,CAAkB;AAAEC,EAAAA;AAAF,CAAlB,EAAgC;AAC9C,QAAM;AACLC,IAAAA,UADK;AAELC,IAAAA,QAFK;AAGLC,IAAAA,aAHK;AAILC,IAAAA,QAJK;AAKLC,IAAAA,eALK;AAMLC,IAAAA;AANK,MAOFpB,SAAS,CAAIqB,MAAF,IAAc;AAAA;;AAC5B,UAAMC,IAAI,GAAGD,MAAM,CAAET,WAAF,CAAN,CAAsBW,cAAtB,EAAb;AACA,UAAMC,YAAY,GAAGH,MAAM,CAAET,WAAF,CAAN,CAAsBa,kBAAtB,EAArB;AACA,UAAMC,QAAQ,GAAGL,MAAM,CAAEV,SAAF,CAAN,CAAoBgB,WAApB,CAAiCH,YAAjC,CAAjB;AACA,UAAMI,cAAc,GAAGP,MAAM,CAAET,WAAF,CAAN,CAAsBiB,iBAAtB,EAAvB;AACA,UAAMC,gBAAgB,2BAAGR,IAAI,EAAES,MAAN,GAAgB,mBAAhB,CAAH,uEAA4C,KAAlE;AAEA,WAAO;AACNhB,MAAAA,UAAU,EACTM,MAAM,CAA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A;AACA;;AACA,UAAK,CAAEA,QAAP,EAAkB;AACjB,YAAK,CAAEF,eAAP,EAAyB;AACxBC,UAAAA,kBAAkB,CAAE,IAAF,CAAlB;AACA;;AACD;AACA;;AACD,UAAKD,eAAL,EAAuB;AACtBC,QAAAA,kBAAkB,CAAE,KAAF,CAAlB;AACA;AACD,KAjCF;AAkCC,IAAA,MAAM,EAAKG,KAAF,IAAa;AACrBL,MAAAA,QAAQ,CAAE;AACTI,QAAAA,IAAI,EAAExC,YAAY,CAAEyC,KAAK,CAACC,MAAN,CAAaC,KAAf;AADT,OAAF,CAAR;;AAGA,UAAKN,eAAL,EAAuB;AACtBC,QAAAA,kBAAkB,CAAE,KAAF,CAAlB;AACA;AACD;AAzCF,IAHF,EA+CG1B,UAAU,IACX;AAAI,IAAA,SAAS,EAAC;AAAd,KACGE,aADH,aACGA,aADH,cACGA,aADH,GACoBV,EAAE,CAAE,WAAF,CADtB,CAhDF,EAoDC,yBACC,cAAC,YAAD;AACC,IAAA,SAAS,EAAC,uBADX;AAEC,IAAA,IAAI,EAAGW,QAFR;AAGC,IAAA,MAAM,EAAC;AAHR,KAKGH,UAAU,GACX,8BACC;AAAM,IAAA,SAAS,EAAC;AAAhB,KACGI,eADH,CADD,EAIC;AAAM,IAAA,SAAS,EAAC;AAAhB,KACGH,QADH,CAJD,EAOC;AAAM,IAAA,SAAS,EAAC;AAAhB,KACGI,eADH,CAPD,CADW,GAaXF,QAlBF,CADD,CApDD,CADD;AA8EA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { safeDecodeURIComponent, cleanForSlug } from '@wordpress/url';\nimport { useState } from '@wordpress/element';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\nimport { TextControl, ExternalLink } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nexport default function PostURL( { onClose } ) {\n\tconst {\n\t\tisEditable,\n\t\tpostSlug,\n\t\tviewPostLabel,\n\t\tpostLink,\n\t\tpermalinkPrefix,\n\t\tpermalinkSuffix,\n\t} = useSelect( ( select ) => {\n\t\tconst post = select( editorStore ).getCurrentPost();\n\t\tconst postTypeSlug = select( editorStore ).getCurrentPostType();\n\t\tconst postType = select( coreStore ).getPostType( postTypeSlug );\n\t\tconst permalinkParts = select( editorStore ).getPermalinkParts();\n\t\tconst hasPublishAction = post?._links?.[ 'wp:action-publish' ] ?? false;\n\n\t\treturn {\n\t\t\tisEditable:\n\t\t\t\tselect( editorStore ).isPermalinkEditable() && hasPublishAction,\n\t\t\tpostSlug: safeDecodeURIComponent(\n\t\t\t\tselect( editorStore ).getEditedPostSlug()\n\t\t\t),\n\t\t\tviewPostLabel: postType?.labels.view_item,\n\t\t\tpostLink: post.link,\n\t\t\tpermalinkPrefix: permalinkParts?.prefix,\n\t\t\tpermalinkSuffix: permalinkParts?.suffix,\n\t\t};\n\t}, [] );\n\n\tconst { editPost } = useDispatch( editorStore );\n\n\tconst [ forceEmptyField, setForceEmptyField ] = useState( false );\n\n\treturn (\n\t\t<div className=\"editor-post-url\">\n\t\t\t<InspectorPopoverHeader title={ __( 'URL' ) } onClose={ onClose } />\n\t\t\t{ isEditable && (\n\t\t\t\t<TextControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Permalink' ) }\n\t\t\t\t\tvalue={ forceEmptyField ? '' : postSlug }\n\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\tspellCheck=\"false\"\n\t\t\t\t\thelp={\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{ __( 'The last part of the URL.' ) }{ ' ' }\n\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Learn more.' ) }\n\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t</>\n\t\t\t\t\t}\n\t\t\t\t\tonChange={ ( newValue ) => {\n\t\t\t\t\t\teditPost( { slug: newValue } );\n\t\t\t\t\t\t// When we delete the field the permalink gets\n\t\t\t\t\t\t// reverted to the original value.\n\t\t\t\t\t\t// The forceEmptyField logic allows the user to have\n\t\t\t\t\t\t// the field temporarily empty while typing.\n\t\t\t\t\t\tif ( ! newValue ) {\n\t\t\t\t\t\t\tif ( ! forceEmptyField ) {\n\t\t\t\t\t\t\t\tsetForceEmptyField( true );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( forceEmptyField ) {\n\t\t\t\t\t\t\tsetForceEmptyField( false );\n\t\t\t\t\t\t}\n\t\t\t\t\t} }\n\t\t\t\t\tonBlur={ ( event ) => {\n\t\t\t\t\t\teditPost( {\n\t\t\t\t\t\t\tslug: cleanForSlug( event.target.value ),\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tif ( forceEmptyField ) {\n\t\t\t\t\t\t\tsetForceEmptyField( false );\n\t\t\t\t\t\t}\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ isEditable && (\n\t\t\t\t<h3 className=\"editor-post-url__link-label\">\n\t\t\t\t\t{ viewPostLabel ?? __( 'View post' ) }\n\t\t\t\t</h3>\n\t\t\t) }\n\t\t\t<p>\n\t\t\t\t<ExternalLink\n\t\t\t\t\tclassName=\"editor-post-url__link\"\n\t\t\t\t\thref={ postLink }\n\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t>\n\t\t\t\t\t{ isEditable ? (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<span className=\"editor-post-url__link-prefix\">\n\t\t\t\t\t\t\t\t{ permalinkPrefix }\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span className=\"editor-post-url__link-slug\">\n\t\t\t\t\t\t\t\t{ postSlug }\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span className=\"editor-post-url__link-suffix\">\n\t\t\t\t\t\t\t\t{ permalinkSuffix }\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) : (\n\t\t\t\t\t\tpostLink\n\t\t\t\t\t) }\n\t\t\t\t</ExternalLink>\n\t\t\t</p>\n\t\t</div>\n\t);\n}\n"]}
1
+ {"version":3,"names":["useSelect","useDispatch","safeDecodeURIComponent","cleanForSlug","useState","__experimentalInspectorPopoverHeader","InspectorPopoverHeader","__","TextControl","ExternalLink","store","coreStore","editorStore","PostURL","onClose","isEditable","postSlug","viewPostLabel","postLink","permalinkPrefix","permalinkSuffix","select","_post$_links$wpActio","post","getCurrentPost","postTypeSlug","getCurrentPostType","postType","getPostType","permalinkParts","getPermalinkParts","hasPublishAction","_links","isPermalinkEditable","getEditedPostSlug","labels","view_item","link","prefix","suffix","editPost","forceEmptyField","setForceEmptyField","createElement","className","title","__nextHasNoMarginBottom","label","value","autoComplete","spellCheck","help","Fragment","href","onChange","newValue","slug","onBlur","event","target"],"sources":["@wordpress/editor/src/components/post-url/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { safeDecodeURIComponent, cleanForSlug } from '@wordpress/url';\nimport { useState } from '@wordpress/element';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\nimport { TextControl, ExternalLink } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nexport default function PostURL( { onClose } ) {\n\tconst {\n\t\tisEditable,\n\t\tpostSlug,\n\t\tviewPostLabel,\n\t\tpostLink,\n\t\tpermalinkPrefix,\n\t\tpermalinkSuffix,\n\t} = useSelect( ( select ) => {\n\t\tconst post = select( editorStore ).getCurrentPost();\n\t\tconst postTypeSlug = select( editorStore ).getCurrentPostType();\n\t\tconst postType = select( coreStore ).getPostType( postTypeSlug );\n\t\tconst permalinkParts = select( editorStore ).getPermalinkParts();\n\t\tconst hasPublishAction = post?._links?.[ 'wp:action-publish' ] ?? false;\n\n\t\treturn {\n\t\t\tisEditable:\n\t\t\t\tselect( editorStore ).isPermalinkEditable() && hasPublishAction,\n\t\t\tpostSlug: safeDecodeURIComponent(\n\t\t\t\tselect( editorStore ).getEditedPostSlug()\n\t\t\t),\n\t\t\tviewPostLabel: postType?.labels.view_item,\n\t\t\tpostLink: post.link,\n\t\t\tpermalinkPrefix: permalinkParts?.prefix,\n\t\t\tpermalinkSuffix: permalinkParts?.suffix,\n\t\t};\n\t}, [] );\n\n\tconst { editPost } = useDispatch( editorStore );\n\n\tconst [ forceEmptyField, setForceEmptyField ] = useState( false );\n\n\treturn (\n\t\t<div className=\"editor-post-url\">\n\t\t\t<InspectorPopoverHeader title={ __( 'URL' ) } onClose={ onClose } />\n\t\t\t{ isEditable && (\n\t\t\t\t<TextControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Permalink' ) }\n\t\t\t\t\tvalue={ forceEmptyField ? '' : postSlug }\n\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\tspellCheck=\"false\"\n\t\t\t\t\thelp={\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{ __( 'The last part of the URL.' ) }{ ' ' }\n\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Learn more.' ) }\n\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t</>\n\t\t\t\t\t}\n\t\t\t\t\tonChange={ ( newValue ) => {\n\t\t\t\t\t\teditPost( { slug: newValue } );\n\t\t\t\t\t\t// When we delete the field the permalink gets\n\t\t\t\t\t\t// reverted to the original value.\n\t\t\t\t\t\t// The forceEmptyField logic allows the user to have\n\t\t\t\t\t\t// the field temporarily empty while typing.\n\t\t\t\t\t\tif ( ! newValue ) {\n\t\t\t\t\t\t\tif ( ! forceEmptyField ) {\n\t\t\t\t\t\t\t\tsetForceEmptyField( true );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( forceEmptyField ) {\n\t\t\t\t\t\t\tsetForceEmptyField( false );\n\t\t\t\t\t\t}\n\t\t\t\t\t} }\n\t\t\t\t\tonBlur={ ( event ) => {\n\t\t\t\t\t\teditPost( {\n\t\t\t\t\t\t\tslug: cleanForSlug( event.target.value ),\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tif ( forceEmptyField ) {\n\t\t\t\t\t\t\tsetForceEmptyField( false );\n\t\t\t\t\t\t}\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ isEditable && (\n\t\t\t\t<h3 className=\"editor-post-url__link-label\">\n\t\t\t\t\t{ viewPostLabel ?? __( 'View post' ) }\n\t\t\t\t</h3>\n\t\t\t) }\n\t\t\t<p>\n\t\t\t\t<ExternalLink\n\t\t\t\t\tclassName=\"editor-post-url__link\"\n\t\t\t\t\thref={ postLink }\n\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t>\n\t\t\t\t\t{ isEditable ? (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<span className=\"editor-post-url__link-prefix\">\n\t\t\t\t\t\t\t\t{ permalinkPrefix }\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span className=\"editor-post-url__link-slug\">\n\t\t\t\t\t\t\t\t{ postSlug }\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span className=\"editor-post-url__link-suffix\">\n\t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A;MACA,IAAK,CAAEA,QAAQ,EAAG;QACjB,IAAK,CAAEd,eAAe,EAAG;UACxBC,kBAAkB,CAAE,IAAK,CAAC;QAC3B;QACA;MACD;MACA,IAAKD,eAAe,EAAG;QACtBC,kBAAkB,CAAE,KAAM,CAAC;MAC5B;IACD,CAAG;IACHe,MAAM,EAAKC,KAAK,IAAM;MACrBlB,QAAQ,CAAE;QACTgB,IAAI,EAAErD,YAAY,CAAEuD,KAAK,CAACC,MAAM,CAACX,KAAM;MACxC,CAAE,CAAC;MACH,IAAKP,eAAe,EAAG;QACtBC,kBAAkB,CAAE,KAAM,CAAC;MAC5B;IACD;EAAG,CACH,CACD,EACC3B,UAAU,IACX4B,aAAA;IAAIC,SAAS,EAAC;EAA6B,GACxC3B,aAAa,aAAbA,aAAa,cAAbA,aAAa,GAAIV,EAAE,CAAE,WAAY,CAChC,CACJ,EACDoC,aAAA,YACCA,aAAA,CAAClC,YAAY;IACZmC,SAAS,EAAC,uBAAuB;IACjCS,IAAI,EAAGnC,QAAU;IACjByC,MAAM,EAAC;EAAQ,GAEb5C,UAAU,GACX4B,aAAA,CAAAS,QAAA,QACCT,aAAA;IAAMC,SAAS,EAAC;EAA8B,GAC3CzB,eACG,CAAC,EACPwB,aAAA;IAAMC,SAAS,EAAC;EAA4B,GACzC5B,QACG,CAAC,EACP2B,aAAA;IAAMC,SAAS,EAAC;EAA8B,GAC3CxB,eACG,CACL,CAAC,GAEHF,QAEY,CACZ,CACC,CAAC;AAER"}
@@ -3,10 +3,10 @@
3
3
  */
4
4
  import { useSelect } from '@wordpress/data';
5
5
  import { filterURLForDisplay, safeDecodeURIComponent } from '@wordpress/url';
6
+
6
7
  /**
7
8
  * Internal dependencies
8
9
  */
9
-
10
10
  import { store as editorStore } from '../../store';
11
11
  export default function PostURLLabel() {
12
12
  return usePostURLLabel();