@wordpress/editor 13.27.2 → 13.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (346) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/bindings/post-meta.js +1 -2
  3. package/build/bindings/post-meta.js.map +1 -1
  4. package/build/components/autocompleters/user.js +1 -2
  5. package/build/components/autocompleters/user.js.map +1 -1
  6. package/build/components/autosave-monitor/index.js +1 -2
  7. package/build/components/autosave-monitor/index.js.map +1 -1
  8. package/build/components/block-manager/category.js +1 -2
  9. package/build/components/block-manager/category.js.map +1 -1
  10. package/build/components/block-manager/checklist.js +1 -2
  11. package/build/components/block-manager/checklist.js.map +1 -1
  12. package/build/components/block-manager/index.js +1 -2
  13. package/build/components/block-manager/index.js.map +1 -1
  14. package/build/components/deprecated.js +52 -104
  15. package/build/components/deprecated.js.map +1 -1
  16. package/build/components/document-bar/index.js +5 -6
  17. package/build/components/document-bar/index.js.map +1 -1
  18. package/build/components/document-outline/check.js +1 -2
  19. package/build/components/document-outline/check.js.map +1 -1
  20. package/build/components/document-outline/index.js +1 -2
  21. package/build/components/document-outline/index.js.map +1 -1
  22. package/build/components/document-outline/item.js +1 -2
  23. package/build/components/document-outline/item.js.map +1 -1
  24. package/build/components/document-tools/index.js +1 -2
  25. package/build/components/document-tools/index.js.map +1 -1
  26. package/build/components/editor-canvas/edit-template-blocks-notification.js +11 -18
  27. package/build/components/editor-canvas/edit-template-blocks-notification.js.map +1 -1
  28. package/build/components/editor-canvas/index.js +14 -10
  29. package/build/components/editor-canvas/index.js.map +1 -1
  30. package/build/components/editor-help/add-blocks.native.js +1 -2
  31. package/build/components/editor-help/add-blocks.native.js.map +1 -1
  32. package/build/components/editor-help/customize-blocks.native.js +1 -2
  33. package/build/components/editor-help/customize-blocks.native.js.map +1 -1
  34. package/build/components/editor-help/help-detail-navigation-screen.native.js +1 -2
  35. package/build/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
  36. package/build/components/editor-help/help-get-support-button.native.js +1 -2
  37. package/build/components/editor-help/help-get-support-button.native.js.map +1 -1
  38. package/build/components/editor-help/help-section-title.native.js +1 -2
  39. package/build/components/editor-help/help-section-title.native.js.map +1 -1
  40. package/build/components/editor-help/help-topic-row.native.js +1 -2
  41. package/build/components/editor-help/help-topic-row.native.js.map +1 -1
  42. package/build/components/editor-help/icon-move-blocks.native.js +1 -2
  43. package/build/components/editor-help/icon-move-blocks.native.js.map +1 -1
  44. package/build/components/editor-help/index.native.js +1 -2
  45. package/build/components/editor-help/index.native.js.map +1 -1
  46. package/build/components/editor-help/intro-to-blocks.native.js +1 -2
  47. package/build/components/editor-help/intro-to-blocks.native.js.map +1 -1
  48. package/build/components/editor-help/move-blocks.native.js +1 -2
  49. package/build/components/editor-help/move-blocks.native.js.map +1 -1
  50. package/build/components/editor-help/remove-blocks.native.js +1 -2
  51. package/build/components/editor-help/remove-blocks.native.js.map +1 -1
  52. package/build/components/editor-history/redo.js +1 -2
  53. package/build/components/editor-history/redo.js.map +1 -1
  54. package/build/components/editor-history/undo.js +1 -2
  55. package/build/components/editor-history/undo.js.map +1 -1
  56. package/build/components/editor-notices/index.js +1 -2
  57. package/build/components/editor-notices/index.js.map +1 -1
  58. package/build/components/editor-snackbars/index.js +3 -1
  59. package/build/components/editor-snackbars/index.js.map +1 -1
  60. package/build/components/entities-saved-states/entity-record-item.js +1 -1
  61. package/build/components/entities-saved-states/entity-record-item.js.map +1 -1
  62. package/build/components/entities-saved-states/entity-type-list.js +7 -7
  63. package/build/components/entities-saved-states/entity-type-list.js.map +1 -1
  64. package/build/components/entities-saved-states/index.js +4 -1
  65. package/build/components/entities-saved-states/index.js.map +1 -1
  66. package/build/components/error-boundary/index.js +1 -2
  67. package/build/components/error-boundary/index.js.map +1 -1
  68. package/build/components/global-keyboard-shortcuts/register-shortcuts.js +1 -2
  69. package/build/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
  70. package/build/components/index.js +4 -6
  71. package/build/components/index.js.map +1 -1
  72. package/build/components/list-view-sidebar/index.js +43 -36
  73. package/build/components/list-view-sidebar/index.js.map +1 -1
  74. package/build/components/local-autosave-monitor/index.js +1 -2
  75. package/build/components/local-autosave-monitor/index.js.map +1 -1
  76. package/build/components/media-categories/index.js +1 -2
  77. package/build/components/media-categories/index.js.map +1 -1
  78. package/build/components/offline-status/index.native.js +1 -2
  79. package/build/components/offline-status/index.native.js.map +1 -1
  80. package/build/components/page-attributes/check.js +1 -2
  81. package/build/components/page-attributes/check.js.map +1 -1
  82. package/build/components/page-attributes/panel.js +1 -2
  83. package/build/components/page-attributes/panel.js.map +1 -1
  84. package/build/components/page-attributes/parent.js +1 -2
  85. package/build/components/page-attributes/parent.js.map +1 -1
  86. package/build/components/post-author/combobox.js +6 -60
  87. package/build/components/post-author/combobox.js.map +1 -1
  88. package/build/components/post-author/constants.js +7 -5
  89. package/build/components/post-author/constants.js.map +1 -1
  90. package/build/components/post-author/hook.js +72 -0
  91. package/build/components/post-author/hook.js.map +1 -0
  92. package/build/components/post-author/index.js +1 -2
  93. package/build/components/post-author/index.js.map +1 -1
  94. package/build/components/post-author/panel.js +1 -2
  95. package/build/components/post-author/panel.js.map +1 -1
  96. package/build/components/post-author/select.js +6 -24
  97. package/build/components/post-author/select.js.map +1 -1
  98. package/build/components/post-comments/index.js +1 -2
  99. package/build/components/post-comments/index.js.map +1 -1
  100. package/build/components/post-discussion/panel.js +1 -2
  101. package/build/components/post-discussion/panel.js.map +1 -1
  102. package/build/components/post-excerpt/check.js +1 -2
  103. package/build/components/post-excerpt/check.js.map +1 -1
  104. package/build/components/post-excerpt/index.js +1 -2
  105. package/build/components/post-excerpt/index.js.map +1 -1
  106. package/build/components/post-excerpt/plugin.js +1 -2
  107. package/build/components/post-excerpt/plugin.js.map +1 -1
  108. package/build/components/post-featured-image/check.js +1 -2
  109. package/build/components/post-featured-image/check.js.map +1 -1
  110. package/build/components/post-featured-image/index.js +1 -2
  111. package/build/components/post-featured-image/index.js.map +1 -1
  112. package/build/components/post-featured-image/panel.js +1 -2
  113. package/build/components/post-featured-image/panel.js.map +1 -1
  114. package/build/components/post-format/check.js +1 -2
  115. package/build/components/post-format/check.js.map +1 -1
  116. package/build/components/post-format/index.js +1 -2
  117. package/build/components/post-format/index.js.map +1 -1
  118. package/build/components/post-last-revision/check.js +1 -2
  119. package/build/components/post-last-revision/check.js.map +1 -1
  120. package/build/components/post-last-revision/index.js +6 -5
  121. package/build/components/post-last-revision/index.js.map +1 -1
  122. package/build/components/post-last-revision/panel.js +1 -2
  123. package/build/components/post-last-revision/panel.js.map +1 -1
  124. package/build/components/post-panel-row/index.js +1 -2
  125. package/build/components/post-panel-row/index.js.map +1 -1
  126. package/build/components/post-pending-status/check.js +1 -2
  127. package/build/components/post-pending-status/check.js.map +1 -1
  128. package/build/components/post-pending-status/index.js +1 -2
  129. package/build/components/post-pending-status/index.js.map +1 -1
  130. package/build/components/post-pingbacks/index.js +1 -2
  131. package/build/components/post-pingbacks/index.js.map +1 -1
  132. package/build/components/post-publish-button/index.js +1 -2
  133. package/build/components/post-publish-button/index.js.map +1 -1
  134. package/build/components/post-publish-button/label.js +1 -2
  135. package/build/components/post-publish-button/label.js.map +1 -1
  136. package/build/components/post-publish-panel/index.js +1 -2
  137. package/build/components/post-publish-panel/index.js.map +1 -1
  138. package/build/components/post-publish-panel/maybe-category-panel.js +1 -2
  139. package/build/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  140. package/build/components/post-publish-panel/maybe-tags-panel.js +22 -26
  141. package/build/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  142. package/build/components/post-publish-panel/postpublish.js +1 -2
  143. package/build/components/post-publish-panel/postpublish.js.map +1 -1
  144. package/build/components/post-publish-panel/prepublish.js +1 -2
  145. package/build/components/post-publish-panel/prepublish.js.map +1 -1
  146. package/build/components/post-schedule/index.js +0 -1
  147. package/build/components/post-schedule/index.js.map +1 -1
  148. package/build/components/post-schedule/label.js +1 -1
  149. package/build/components/post-schedule/label.js.map +1 -1
  150. package/build/components/post-schedule/panel.js +1 -0
  151. package/build/components/post-schedule/panel.js.map +1 -1
  152. package/build/components/post-slug/index.js +1 -2
  153. package/build/components/post-slug/index.js.map +1 -1
  154. package/build/components/post-switch-to-draft-button/index.js +1 -0
  155. package/build/components/post-switch-to-draft-button/index.js.map +1 -1
  156. package/build/components/post-sync-status/index.js +1 -1
  157. package/build/components/post-sync-status/index.js.map +1 -1
  158. package/build/components/post-taxonomies/check.js +8 -15
  159. package/build/components/post-taxonomies/check.js.map +1 -1
  160. package/build/components/post-taxonomies/flat-term-selector.js +1 -2
  161. package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
  162. package/build/components/post-taxonomies/hierarchical-term-selector.js +1 -2
  163. package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  164. package/build/components/post-taxonomies/index.js +14 -15
  165. package/build/components/post-taxonomies/index.js.map +1 -1
  166. package/build/components/post-taxonomies/panel.js +1 -2
  167. package/build/components/post-taxonomies/panel.js.map +1 -1
  168. package/build/components/post-template/block-theme.js +12 -11
  169. package/build/components/post-template/block-theme.js.map +1 -1
  170. package/build/components/post-template/classic-theme.js +10 -11
  171. package/build/components/post-template/classic-theme.js.map +1 -1
  172. package/build/components/post-template/create-new-template-modal.js +4 -5
  173. package/build/components/post-template/create-new-template-modal.js.map +1 -1
  174. package/build/components/post-template/panel.js +5 -1
  175. package/build/components/post-template/panel.js.map +1 -1
  176. package/build/components/post-title/constants.js +2 -4
  177. package/build/components/post-title/constants.js.map +1 -1
  178. package/build/components/post-title/index.js +2 -3
  179. package/build/components/post-title/index.js.map +1 -1
  180. package/build/components/post-title/index.native.js +1 -2
  181. package/build/components/post-title/index.native.js.map +1 -1
  182. package/build/components/post-title/post-title-raw.js +1 -2
  183. package/build/components/post-title/post-title-raw.js.map +1 -1
  184. package/build/components/post-trash/check.js +1 -2
  185. package/build/components/post-trash/check.js.map +1 -1
  186. package/build/components/post-trash/index.js +1 -0
  187. package/build/components/post-trash/index.js.map +1 -1
  188. package/build/components/post-type-support-check/index.js +1 -2
  189. package/build/components/post-type-support-check/index.js.map +1 -1
  190. package/build/components/post-url/panel.js +1 -0
  191. package/build/components/post-url/panel.js.map +1 -1
  192. package/build/components/post-visibility/utils.js +1 -2
  193. package/build/components/post-visibility/utils.js.map +1 -1
  194. package/build/components/preferences-modal/enable-panel.js +1 -2
  195. package/build/components/preferences-modal/enable-panel.js.map +1 -1
  196. package/build/components/preferences-modal/enable-plugin-document-setting-panel.js +1 -2
  197. package/build/components/preferences-modal/enable-plugin-document-setting-panel.js.map +1 -1
  198. package/build/components/preferences-modal/index.js +0 -1
  199. package/build/components/preferences-modal/index.js.map +1 -1
  200. package/build/components/provider/constants.js +1 -2
  201. package/build/components/provider/constants.js.map +1 -1
  202. package/build/components/provider/index.js +12 -6
  203. package/build/components/provider/index.js.map +1 -1
  204. package/build/components/provider/index.native.js +4 -6
  205. package/build/components/provider/index.native.js.map +1 -1
  206. package/build/components/provider/use-block-editor-settings.js +2 -3
  207. package/build/components/provider/use-block-editor-settings.js.map +1 -1
  208. package/build/components/provider/use-block-editor-settings.native.js +1 -2
  209. package/build/components/provider/use-block-editor-settings.native.js.map +1 -1
  210. package/build/components/provider/with-registry-provider.js +1 -2
  211. package/build/components/provider/with-registry-provider.js.map +1 -1
  212. package/build/components/table-of-contents/index.js +1 -2
  213. package/build/components/table-of-contents/index.js.map +1 -1
  214. package/build/components/table-of-contents/panel.js +1 -2
  215. package/build/components/table-of-contents/panel.js.map +1 -1
  216. package/build/components/template-validation-notice/index.js +1 -2
  217. package/build/components/template-validation-notice/index.js.map +1 -1
  218. package/build/components/theme-support-check/index.js +1 -2
  219. package/build/components/theme-support-check/index.js.map +1 -1
  220. package/build/hooks/pattern-partial-syncing.js +9 -2
  221. package/build/hooks/pattern-partial-syncing.js.map +1 -1
  222. package/build/private-apis.js +1 -2
  223. package/build/private-apis.js.map +1 -1
  224. package/build/store/actions.js +31 -62
  225. package/build/store/actions.js.map +1 -1
  226. package/build/store/constants.js +7 -14
  227. package/build/store/constants.js.map +1 -1
  228. package/build/store/defaults.js +1 -2
  229. package/build/store/defaults.js.map +1 -1
  230. package/build/store/index.js +4 -6
  231. package/build/store/index.js.map +1 -1
  232. package/build/store/private-selectors.js +1 -2
  233. package/build/store/private-selectors.js.map +1 -1
  234. package/build/store/reducer.js +1 -2
  235. package/build/store/reducer.js.map +1 -1
  236. package/build/store/reducer.native.js +2 -4
  237. package/build/store/reducer.native.js.map +1 -1
  238. package/build/store/selectors.js +72 -144
  239. package/build/store/selectors.js.map +1 -1
  240. package/build/store/selectors.native.js +1 -2
  241. package/build/store/selectors.native.js.map +1 -1
  242. package/build-module/components/document-bar/index.js +5 -6
  243. package/build-module/components/document-bar/index.js.map +1 -1
  244. package/build-module/components/editor-canvas/edit-template-blocks-notification.js +11 -18
  245. package/build-module/components/editor-canvas/edit-template-blocks-notification.js.map +1 -1
  246. package/build-module/components/editor-canvas/index.js +13 -8
  247. package/build-module/components/editor-canvas/index.js.map +1 -1
  248. package/build-module/components/editor-snackbars/index.js +4 -1
  249. package/build-module/components/editor-snackbars/index.js.map +1 -1
  250. package/build-module/components/entities-saved-states/entity-record-item.js +1 -1
  251. package/build-module/components/entities-saved-states/entity-record-item.js.map +1 -1
  252. package/build-module/components/entities-saved-states/entity-type-list.js +8 -8
  253. package/build-module/components/entities-saved-states/entity-type-list.js.map +1 -1
  254. package/build-module/components/entities-saved-states/index.js +6 -3
  255. package/build-module/components/entities-saved-states/index.js.map +1 -1
  256. package/build-module/components/list-view-sidebar/index.js +44 -37
  257. package/build-module/components/list-view-sidebar/index.js.map +1 -1
  258. package/build-module/components/post-author/combobox.js +8 -61
  259. package/build-module/components/post-author/combobox.js.map +1 -1
  260. package/build-module/components/post-author/constants.js +5 -2
  261. package/build-module/components/post-author/constants.js.map +1 -1
  262. package/build-module/components/post-author/hook.js +65 -0
  263. package/build-module/components/post-author/hook.js.map +1 -0
  264. package/build-module/components/post-author/select.js +7 -24
  265. package/build-module/components/post-author/select.js.map +1 -1
  266. package/build-module/components/post-last-revision/index.js +6 -4
  267. package/build-module/components/post-last-revision/index.js.map +1 -1
  268. package/build-module/components/post-publish-panel/maybe-tags-panel.js +24 -27
  269. package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  270. package/build-module/components/post-schedule/index.js +0 -1
  271. package/build-module/components/post-schedule/index.js.map +1 -1
  272. package/build-module/components/post-schedule/label.js +1 -1
  273. package/build-module/components/post-schedule/label.js.map +1 -1
  274. package/build-module/components/post-schedule/panel.js +1 -0
  275. package/build-module/components/post-schedule/panel.js.map +1 -1
  276. package/build-module/components/post-switch-to-draft-button/index.js +1 -0
  277. package/build-module/components/post-switch-to-draft-button/index.js.map +1 -1
  278. package/build-module/components/post-sync-status/index.js +1 -1
  279. package/build-module/components/post-sync-status/index.js.map +1 -1
  280. package/build-module/components/post-taxonomies/check.js +9 -14
  281. package/build-module/components/post-taxonomies/check.js.map +1 -1
  282. package/build-module/components/post-taxonomies/index.js +15 -15
  283. package/build-module/components/post-taxonomies/index.js.map +1 -1
  284. package/build-module/components/post-template/block-theme.js +12 -11
  285. package/build-module/components/post-template/block-theme.js.map +1 -1
  286. package/build-module/components/post-template/classic-theme.js +9 -9
  287. package/build-module/components/post-template/classic-theme.js.map +1 -1
  288. package/build-module/components/post-template/create-new-template-modal.js +4 -5
  289. package/build-module/components/post-template/create-new-template-modal.js.map +1 -1
  290. package/build-module/components/post-template/panel.js +5 -1
  291. package/build-module/components/post-template/panel.js.map +1 -1
  292. package/build-module/components/post-title/index.js +1 -2
  293. package/build-module/components/post-title/index.js.map +1 -1
  294. package/build-module/components/post-trash/index.js +1 -0
  295. package/build-module/components/post-trash/index.js.map +1 -1
  296. package/build-module/components/post-url/panel.js +1 -0
  297. package/build-module/components/post-url/panel.js.map +1 -1
  298. package/build-module/components/preferences-modal/index.js +0 -1
  299. package/build-module/components/preferences-modal/index.js.map +1 -1
  300. package/build-module/components/provider/index.js +10 -2
  301. package/build-module/components/provider/index.js.map +1 -1
  302. package/build-module/components/provider/use-block-editor-settings.js +1 -1
  303. package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
  304. package/build-module/components/table-of-contents/panel.js +0 -1
  305. package/build-module/components/table-of-contents/panel.js.map +1 -1
  306. package/build-module/hooks/pattern-partial-syncing.js +9 -2
  307. package/build-module/hooks/pattern-partial-syncing.js.map +1 -1
  308. package/build-style/style-rtl.css +28 -22
  309. package/build-style/style.css +28 -22
  310. package/package.json +32 -32
  311. package/src/components/document-bar/index.js +22 -17
  312. package/src/components/editor-canvas/edit-template-blocks-notification.js +31 -30
  313. package/src/components/editor-canvas/index.js +14 -4
  314. package/src/components/editor-snackbars/index.js +6 -3
  315. package/src/components/entities-saved-states/entity-record-item.js +1 -4
  316. package/src/components/entities-saved-states/entity-type-list.js +8 -8
  317. package/src/components/entities-saved-states/index.js +17 -4
  318. package/src/components/entities-saved-states/style.scss +5 -0
  319. package/src/components/list-view-sidebar/index.js +60 -47
  320. package/src/components/list-view-sidebar/style.scss +20 -20
  321. package/src/components/post-author/combobox.js +5 -61
  322. package/src/components/post-author/constants.js +6 -2
  323. package/src/components/post-author/hook.js +63 -0
  324. package/src/components/post-author/select.js +5 -25
  325. package/src/components/post-last-revision/index.js +6 -6
  326. package/src/components/post-last-revision/style.scss +3 -6
  327. package/src/components/post-panel-row/style.scss +3 -3
  328. package/src/components/post-publish-panel/maybe-tags-panel.js +27 -37
  329. package/src/components/post-publish-panel/style.scss +3 -1
  330. package/src/components/post-schedule/label.js +1 -1
  331. package/src/components/post-schedule/panel.js +1 -0
  332. package/src/components/post-schedule/test/label.js +19 -7
  333. package/src/components/post-switch-to-draft-button/index.js +1 -0
  334. package/src/components/post-sync-status/index.js +8 -2
  335. package/src/components/post-taxonomies/check.js +11 -15
  336. package/src/components/post-taxonomies/index.js +15 -22
  337. package/src/components/post-taxonomies/test/index.js +37 -51
  338. package/src/components/post-template/block-theme.js +29 -22
  339. package/src/components/post-template/classic-theme.js +10 -13
  340. package/src/components/post-template/create-new-template-modal.js +7 -9
  341. package/src/components/post-template/panel.js +5 -1
  342. package/src/components/post-trash/index.js +1 -0
  343. package/src/components/post-url/panel.js +1 -0
  344. package/src/components/provider/index.js +22 -2
  345. package/src/components/provider/use-block-editor-settings.js +1 -1
  346. package/src/hooks/pattern-partial-syncing.js +23 -4
@@ -1 +1 @@
1
- {"version":3,"names":["_blockEditor","require","_data","_selectors","EMPTY_INSERTION_POINT","rootClientId","undefined","insertionIndex","filterValue","getInsertionPoint","createRegistrySelector","select","state","blockInserterPanel","getRenderingMode","postContentClientId","blockEditorStore","getBlocksByName","exports","getListViewToggleRef","listViewToggleRef"],"sources":["@wordpress/editor/src/store/private-selectors.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { createRegistrySelector } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { getRenderingMode } from './selectors';\n\nconst EMPTY_INSERTION_POINT = {\n\trootClientId: undefined,\n\tinsertionIndex: undefined,\n\tfilterValue: undefined,\n};\n\n/**\n * Get the insertion point for the inserter.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} The root client ID, index to insert at and starting filter value.\n */\nexport const getInsertionPoint = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tif ( typeof state.blockInserterPanel === 'object' ) {\n\t\t\treturn state.blockInserterPanel;\n\t\t}\n\n\t\tif ( getRenderingMode( state ) === 'template-locked' ) {\n\t\t\tconst [ postContentClientId ] =\n\t\t\t\tselect( blockEditorStore ).getBlocksByName(\n\t\t\t\t\t'core/post-content'\n\t\t\t\t);\n\t\t\tif ( postContentClientId ) {\n\t\t\t\treturn {\n\t\t\t\t\trootClientId: postContentClientId,\n\t\t\t\t\tinsertionIndex: undefined,\n\t\t\t\t\tfilterValue: undefined,\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\treturn EMPTY_INSERTION_POINT;\n\t}\n);\n\nexport function getListViewToggleRef( state ) {\n\treturn state.listViewToggleRef;\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAKA,IAAAE,UAAA,GAAAF,OAAA;AATA;AACA;AACA;;AAIA;AACA;AACA;;AAGA,MAAMG,qBAAqB,GAAG;EAC7BC,YAAY,EAAEC,SAAS;EACvBC,cAAc,EAAED,SAAS;EACzBE,WAAW,EAAEF;AACd,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMG,iBAAiB,GAAG,IAAAC,4BAAsB,EACpDC,MAAM,IAAQC,KAAK,IAAM;EAC1B,IAAK,OAAOA,KAAK,CAACC,kBAAkB,KAAK,QAAQ,EAAG;IACnD,OAAOD,KAAK,CAACC,kBAAkB;EAChC;EAEA,IAAK,IAAAC,2BAAgB,EAAEF,KAAM,CAAC,KAAK,iBAAiB,EAAG;IACtD,MAAM,CAAEG,mBAAmB,CAAE,GAC5BJ,MAAM,CAAEK,kBAAiB,CAAC,CAACC,eAAe,CACzC,mBACD,CAAC;IACF,IAAKF,mBAAmB,EAAG;MAC1B,OAAO;QACNV,YAAY,EAAEU,mBAAmB;QACjCR,cAAc,EAAED,SAAS;QACzBE,WAAW,EAAEF;MACd,CAAC;IACF;EACD;EAEA,OAAOF,qBAAqB;AAC7B,CACD,CAAC;AAACc,OAAA,CAAAT,iBAAA,GAAAA,iBAAA;AAEK,SAASU,oBAAoBA,CAAEP,KAAK,EAAG;EAC7C,OAAOA,KAAK,CAACQ,iBAAiB;AAC/B"}
1
+ {"version":3,"names":["_blockEditor","require","_data","_selectors","EMPTY_INSERTION_POINT","rootClientId","undefined","insertionIndex","filterValue","getInsertionPoint","exports","createRegistrySelector","select","state","blockInserterPanel","getRenderingMode","postContentClientId","blockEditorStore","getBlocksByName","getListViewToggleRef","listViewToggleRef"],"sources":["@wordpress/editor/src/store/private-selectors.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { createRegistrySelector } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { getRenderingMode } from './selectors';\n\nconst EMPTY_INSERTION_POINT = {\n\trootClientId: undefined,\n\tinsertionIndex: undefined,\n\tfilterValue: undefined,\n};\n\n/**\n * Get the insertion point for the inserter.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} The root client ID, index to insert at and starting filter value.\n */\nexport const getInsertionPoint = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tif ( typeof state.blockInserterPanel === 'object' ) {\n\t\t\treturn state.blockInserterPanel;\n\t\t}\n\n\t\tif ( getRenderingMode( state ) === 'template-locked' ) {\n\t\t\tconst [ postContentClientId ] =\n\t\t\t\tselect( blockEditorStore ).getBlocksByName(\n\t\t\t\t\t'core/post-content'\n\t\t\t\t);\n\t\t\tif ( postContentClientId ) {\n\t\t\t\treturn {\n\t\t\t\t\trootClientId: postContentClientId,\n\t\t\t\t\tinsertionIndex: undefined,\n\t\t\t\t\tfilterValue: undefined,\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\treturn EMPTY_INSERTION_POINT;\n\t}\n);\n\nexport function getListViewToggleRef( state ) {\n\treturn state.listViewToggleRef;\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAKA,IAAAE,UAAA,GAAAF,OAAA;AATA;AACA;AACA;;AAIA;AACA;AACA;;AAGA,MAAMG,qBAAqB,GAAG;EAC7BC,YAAY,EAAEC,SAAS;EACvBC,cAAc,EAAED,SAAS;EACzBE,WAAW,EAAEF;AACd,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMG,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG,IAAAE,4BAAsB,EACpDC,MAAM,IAAQC,KAAK,IAAM;EAC1B,IAAK,OAAOA,KAAK,CAACC,kBAAkB,KAAK,QAAQ,EAAG;IACnD,OAAOD,KAAK,CAACC,kBAAkB;EAChC;EAEA,IAAK,IAAAC,2BAAgB,EAAEF,KAAM,CAAC,KAAK,iBAAiB,EAAG;IACtD,MAAM,CAAEG,mBAAmB,CAAE,GAC5BJ,MAAM,CAAEK,kBAAiB,CAAC,CAACC,eAAe,CACzC,mBACD,CAAC;IACF,IAAKF,mBAAmB,EAAG;MAC1B,OAAO;QACNX,YAAY,EAAEW,mBAAmB;QACjCT,cAAc,EAAED,SAAS;QACzBE,WAAW,EAAEF;MACd,CAAC;IACF;EACD;EAEA,OAAOF,qBAAqB;AAC7B,CACD,CAAC;AAEM,SAASe,oBAAoBA,CAAEN,KAAK,EAAG;EAC7C,OAAOA,KAAK,CAACO,iBAAiB;AAC/B"}
@@ -377,7 +377,7 @@ function listViewToggleRef(state = {
377
377
  }) {
378
378
  return state;
379
379
  }
380
- var _default = (0, _data.combineReducers)({
380
+ var _default = exports.default = (0, _data.combineReducers)({
381
381
  postId,
382
382
  postType,
383
383
  templateId,
@@ -395,5 +395,4 @@ var _default = (0, _data.combineReducers)({
395
395
  listViewPanel,
396
396
  listViewToggleRef
397
397
  });
398
- exports.default = _default;
399
398
  //# sourceMappingURL=reducer.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","_defaults","getPostRawValue","value","raw","hasSameKeys","a","b","keysA","Object","keys","sort","keysB","length","every","key","index","isUpdatingSamePostProperty","action","previousAction","type","edits","shouldOverwriteState","shouldCreateUndoLevel","postId","state","templateId","id","postType","template","isValid","saving","pending","options","deleting","postLock","isLocked","lock","postSavingLock","lockName","removedLockName","restState","postAutosavingLock","editorSettings","EDITOR_SETTINGS_DEFAULTS","settings","renderingMode","mode","deviceType","removedPanels","includes","panelName","blockInserterPanel","isOpen","listViewPanel","listViewToggleRef","current","_default","combineReducers","exports","default"],"sources":["@wordpress/editor/src/store/reducer.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { combineReducers } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { EDITOR_SETTINGS_DEFAULTS } from './defaults';\n\n/**\n * Returns a post attribute value, flattening nested rendered content using its\n * raw value in place of its original object form.\n *\n * @param {*} value Original value.\n *\n * @return {*} Raw value.\n */\nexport function getPostRawValue( value ) {\n\tif ( value && 'object' === typeof value && 'raw' in value ) {\n\t\treturn value.raw;\n\t}\n\n\treturn value;\n}\n\n/**\n * Returns true if the two object arguments have the same keys, or false\n * otherwise.\n *\n * @param {Object} a First object.\n * @param {Object} b Second object.\n *\n * @return {boolean} Whether the two objects have the same keys.\n */\nexport function hasSameKeys( a, b ) {\n\tconst keysA = Object.keys( a ).sort();\n\tconst keysB = Object.keys( b ).sort();\n\treturn (\n\t\tkeysA.length === keysB.length &&\n\t\tkeysA.every( ( key, index ) => keysB[ index ] === key )\n\t);\n}\n\n/**\n * Returns true if, given the currently dispatching action and the previously\n * dispatched action, the two actions are editing the same post property, or\n * false otherwise.\n *\n * @param {Object} action Currently dispatching action.\n * @param {Object} previousAction Previously dispatched action.\n *\n * @return {boolean} Whether actions are updating the same post property.\n */\nexport function isUpdatingSamePostProperty( action, previousAction ) {\n\treturn (\n\t\taction.type === 'EDIT_POST' &&\n\t\thasSameKeys( action.edits, previousAction.edits )\n\t);\n}\n\n/**\n * Returns true if, given the currently dispatching action and the previously\n * dispatched action, the two actions are modifying the same property such that\n * undo history should be batched.\n *\n * @param {Object} action Currently dispatching action.\n * @param {Object} previousAction Previously dispatched action.\n *\n * @return {boolean} Whether to overwrite present state.\n */\nexport function shouldOverwriteState( action, previousAction ) {\n\tif ( action.type === 'RESET_EDITOR_BLOCKS' ) {\n\t\treturn ! action.shouldCreateUndoLevel;\n\t}\n\n\tif ( ! previousAction || action.type !== previousAction.type ) {\n\t\treturn false;\n\t}\n\n\treturn isUpdatingSamePostProperty( action, previousAction );\n}\n\nexport function postId( state = null, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_EDITED_POST':\n\t\t\treturn action.postId;\n\t}\n\n\treturn state;\n}\n\nexport function templateId( state = null, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_CURRENT_TEMPLATE_ID':\n\t\t\treturn action.id;\n\t}\n\n\treturn state;\n}\n\nexport function postType( state = null, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_EDITED_POST':\n\t\t\treturn action.postType;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning whether the post blocks match the defined template or not.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {boolean} Updated state.\n */\nexport function template( state = { isValid: true }, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_TEMPLATE_VALIDITY':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tisValid: action.isValid,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning current network request state (whether a request to\n * the WP REST API is in progress, successful, or failed).\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function saving( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'REQUEST_POST_UPDATE_START':\n\t\tcase 'REQUEST_POST_UPDATE_FINISH':\n\t\t\treturn {\n\t\t\t\tpending: action.type === 'REQUEST_POST_UPDATE_START',\n\t\t\t\toptions: action.options || {},\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning deleting post request state.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function deleting( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'REQUEST_POST_DELETE_START':\n\t\tcase 'REQUEST_POST_DELETE_FINISH':\n\t\t\treturn {\n\t\t\t\tpending: action.type === 'REQUEST_POST_DELETE_START',\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Post Lock State.\n *\n * @typedef {Object} PostLockState\n *\n * @property {boolean} isLocked Whether the post is locked.\n * @property {?boolean} isTakeover Whether the post editing has been taken over.\n * @property {?boolean} activePostLock Active post lock value.\n * @property {?Object} user User that took over the post.\n */\n\n/**\n * Reducer returning the post lock status.\n *\n * @param {PostLockState} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {PostLockState} Updated state.\n */\nexport function postLock( state = { isLocked: false }, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'UPDATE_POST_LOCK':\n\t\t\treturn action.lock;\n\t}\n\n\treturn state;\n}\n\n/**\n * Post saving lock.\n *\n * When post saving is locked, the post cannot be published or updated.\n *\n * @param {PostLockState} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {PostLockState} Updated state.\n */\nexport function postSavingLock( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'LOCK_POST_SAVING':\n\t\t\treturn { ...state, [ action.lockName ]: true };\n\n\t\tcase 'UNLOCK_POST_SAVING': {\n\t\t\tconst { [ action.lockName ]: removedLockName, ...restState } =\n\t\t\t\tstate;\n\t\t\treturn restState;\n\t\t}\n\t}\n\treturn state;\n}\n\n/**\n * Post autosaving lock.\n *\n * When post autosaving is locked, the post will not autosave.\n *\n * @param {PostLockState} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {PostLockState} Updated state.\n */\nexport function postAutosavingLock( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'LOCK_POST_AUTOSAVING':\n\t\t\treturn { ...state, [ action.lockName ]: true };\n\n\t\tcase 'UNLOCK_POST_AUTOSAVING': {\n\t\t\tconst { [ action.lockName ]: removedLockName, ...restState } =\n\t\t\t\tstate;\n\t\t\treturn restState;\n\t\t}\n\t}\n\treturn state;\n}\n\n/**\n * Reducer returning the post editor setting.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function editorSettings( state = EDITOR_SETTINGS_DEFAULTS, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'UPDATE_EDITOR_SETTINGS':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t...action.settings,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\nexport function renderingMode( state = 'all', action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_RENDERING_MODE':\n\t\t\treturn action.mode;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning the editing canvas device type.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function deviceType( state = 'Desktop', action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_DEVICE_TYPE':\n\t\t\treturn action.deviceType;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer storing the list of all programmatically removed panels.\n *\n * @param {Array} state Current state.\n * @param {Object} action Action object.\n *\n * @return {Array} Updated state.\n */\nexport function removedPanels( state = [], action ) {\n\tswitch ( action.type ) {\n\t\tcase 'REMOVE_PANEL':\n\t\t\tif ( ! state.includes( action.panelName ) ) {\n\t\t\t\treturn [ ...state, action.panelName ];\n\t\t\t}\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer to set the block inserter panel open or closed.\n *\n * Note: this reducer interacts with the list view panel reducer\n * to make sure that only one of the two panels is open at the same time.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n */\nexport function blockInserterPanel( state = false, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_IS_LIST_VIEW_OPENED':\n\t\t\treturn action.isOpen ? false : state;\n\t\tcase 'SET_IS_INSERTER_OPENED':\n\t\t\treturn action.value;\n\t}\n\treturn state;\n}\n\n/**\n * Reducer to set the list view panel open or closed.\n *\n * Note: this reducer interacts with the inserter panel reducer\n * to make sure that only one of the two panels is open at the same time.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n */\nexport function listViewPanel( state = false, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_IS_INSERTER_OPENED':\n\t\t\treturn action.value ? false : state;\n\t\tcase 'SET_IS_LIST_VIEW_OPENED':\n\t\t\treturn action.isOpen;\n\t}\n\treturn state;\n}\n\n/**\n * This reducer does nothing aside initializing a ref to the list view toggle.\n * We will have a unique ref per \"editor\" instance.\n *\n * @param {Object} state\n * @return {Object} Reference to the list view toggle button.\n */\nexport function listViewToggleRef( state = { current: null } ) {\n\treturn state;\n}\n\nexport default combineReducers( {\n\tpostId,\n\tpostType,\n\ttemplateId,\n\tsaving,\n\tdeleting,\n\tpostLock,\n\ttemplate,\n\tpostSavingLock,\n\teditorSettings,\n\tpostAutosavingLock,\n\trenderingMode,\n\tdeviceType,\n\tremovedPanels,\n\tblockInserterPanel,\n\tlistViewPanel,\n\tlistViewToggleRef,\n} );\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,SAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,eAAeA,CAAEC,KAAK,EAAG;EACxC,IAAKA,KAAK,IAAI,QAAQ,KAAK,OAAOA,KAAK,IAAI,KAAK,IAAIA,KAAK,EAAG;IAC3D,OAAOA,KAAK,CAACC,GAAG;EACjB;EAEA,OAAOD,KAAK;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,WAAWA,CAAEC,CAAC,EAAEC,CAAC,EAAG;EACnC,MAAMC,KAAK,GAAGC,MAAM,CAACC,IAAI,CAAEJ,CAAE,CAAC,CAACK,IAAI,CAAC,CAAC;EACrC,MAAMC,KAAK,GAAGH,MAAM,CAACC,IAAI,CAAEH,CAAE,CAAC,CAACI,IAAI,CAAC,CAAC;EACrC,OACCH,KAAK,CAACK,MAAM,KAAKD,KAAK,CAACC,MAAM,IAC7BL,KAAK,CAACM,KAAK,CAAE,CAAEC,GAAG,EAAEC,KAAK,KAAMJ,KAAK,CAAEI,KAAK,CAAE,KAAKD,GAAI,CAAC;AAEzD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,0BAA0BA,CA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AAe,EAAE;EAC/BlC,MAAM;EACNI,QAAQ;EACRF,UAAU;EACVK,MAAM;EACNG,QAAQ;EACRC,QAAQ;EACRN,QAAQ;EACRS,cAAc;EACdK,cAAc;EACdD,kBAAkB;EAClBI,aAAa;EACbE,UAAU;EACVC,aAAa;EACbG,kBAAkB;EAClBE,aAAa;EACbC;AACD,CAAE,CAAC;AAAAI,OAAA,CAAAC,OAAA,GAAAH,QAAA"}
1
+ {"version":3,"names":["_data","require","_defaults","getPostRawValue","value","raw","hasSameKeys","a","b","keysA","Object","keys","sort","keysB","length","every","key","index","isUpdatingSamePostProperty","action","previousAction","type","edits","shouldOverwriteState","shouldCreateUndoLevel","postId","state","templateId","id","postType","template","isValid","saving","pending","options","deleting","postLock","isLocked","lock","postSavingLock","lockName","removedLockName","restState","postAutosavingLock","editorSettings","EDITOR_SETTINGS_DEFAULTS","settings","renderingMode","mode","deviceType","removedPanels","includes","panelName","blockInserterPanel","isOpen","listViewPanel","listViewToggleRef","current","_default","exports","default","combineReducers"],"sources":["@wordpress/editor/src/store/reducer.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { combineReducers } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { EDITOR_SETTINGS_DEFAULTS } from './defaults';\n\n/**\n * Returns a post attribute value, flattening nested rendered content using its\n * raw value in place of its original object form.\n *\n * @param {*} value Original value.\n *\n * @return {*} Raw value.\n */\nexport function getPostRawValue( value ) {\n\tif ( value && 'object' === typeof value && 'raw' in value ) {\n\t\treturn value.raw;\n\t}\n\n\treturn value;\n}\n\n/**\n * Returns true if the two object arguments have the same keys, or false\n * otherwise.\n *\n * @param {Object} a First object.\n * @param {Object} b Second object.\n *\n * @return {boolean} Whether the two objects have the same keys.\n */\nexport function hasSameKeys( a, b ) {\n\tconst keysA = Object.keys( a ).sort();\n\tconst keysB = Object.keys( b ).sort();\n\treturn (\n\t\tkeysA.length === keysB.length &&\n\t\tkeysA.every( ( key, index ) => keysB[ index ] === key )\n\t);\n}\n\n/**\n * Returns true if, given the currently dispatching action and the previously\n * dispatched action, the two actions are editing the same post property, or\n * false otherwise.\n *\n * @param {Object} action Currently dispatching action.\n * @param {Object} previousAction Previously dispatched action.\n *\n * @return {boolean} Whether actions are updating the same post property.\n */\nexport function isUpdatingSamePostProperty( action, previousAction ) {\n\treturn (\n\t\taction.type === 'EDIT_POST' &&\n\t\thasSameKeys( action.edits, previousAction.edits )\n\t);\n}\n\n/**\n * Returns true if, given the currently dispatching action and the previously\n * dispatched action, the two actions are modifying the same property such that\n * undo history should be batched.\n *\n * @param {Object} action Currently dispatching action.\n * @param {Object} previousAction Previously dispatched action.\n *\n * @return {boolean} Whether to overwrite present state.\n */\nexport function shouldOverwriteState( action, previousAction ) {\n\tif ( action.type === 'RESET_EDITOR_BLOCKS' ) {\n\t\treturn ! action.shouldCreateUndoLevel;\n\t}\n\n\tif ( ! previousAction || action.type !== previousAction.type ) {\n\t\treturn false;\n\t}\n\n\treturn isUpdatingSamePostProperty( action, previousAction );\n}\n\nexport function postId( state = null, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_EDITED_POST':\n\t\t\treturn action.postId;\n\t}\n\n\treturn state;\n}\n\nexport function templateId( state = null, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_CURRENT_TEMPLATE_ID':\n\t\t\treturn action.id;\n\t}\n\n\treturn state;\n}\n\nexport function postType( state = null, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_EDITED_POST':\n\t\t\treturn action.postType;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning whether the post blocks match the defined template or not.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {boolean} Updated state.\n */\nexport function template( state = { isValid: true }, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_TEMPLATE_VALIDITY':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tisValid: action.isValid,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning current network request state (whether a request to\n * the WP REST API is in progress, successful, or failed).\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function saving( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'REQUEST_POST_UPDATE_START':\n\t\tcase 'REQUEST_POST_UPDATE_FINISH':\n\t\t\treturn {\n\t\t\t\tpending: action.type === 'REQUEST_POST_UPDATE_START',\n\t\t\t\toptions: action.options || {},\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning deleting post request state.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function deleting( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'REQUEST_POST_DELETE_START':\n\t\tcase 'REQUEST_POST_DELETE_FINISH':\n\t\t\treturn {\n\t\t\t\tpending: action.type === 'REQUEST_POST_DELETE_START',\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Post Lock State.\n *\n * @typedef {Object} PostLockState\n *\n * @property {boolean} isLocked Whether the post is locked.\n * @property {?boolean} isTakeover Whether the post editing has been taken over.\n * @property {?boolean} activePostLock Active post lock value.\n * @property {?Object} user User that took over the post.\n */\n\n/**\n * Reducer returning the post lock status.\n *\n * @param {PostLockState} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {PostLockState} Updated state.\n */\nexport function postLock( state = { isLocked: false }, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'UPDATE_POST_LOCK':\n\t\t\treturn action.lock;\n\t}\n\n\treturn state;\n}\n\n/**\n * Post saving lock.\n *\n * When post saving is locked, the post cannot be published or updated.\n *\n * @param {PostLockState} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {PostLockState} Updated state.\n */\nexport function postSavingLock( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'LOCK_POST_SAVING':\n\t\t\treturn { ...state, [ action.lockName ]: true };\n\n\t\tcase 'UNLOCK_POST_SAVING': {\n\t\t\tconst { [ action.lockName ]: removedLockName, ...restState } =\n\t\t\t\tstate;\n\t\t\treturn restState;\n\t\t}\n\t}\n\treturn state;\n}\n\n/**\n * Post autosaving lock.\n *\n * When post autosaving is locked, the post will not autosave.\n *\n * @param {PostLockState} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {PostLockState} Updated state.\n */\nexport function postAutosavingLock( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'LOCK_POST_AUTOSAVING':\n\t\t\treturn { ...state, [ action.lockName ]: true };\n\n\t\tcase 'UNLOCK_POST_AUTOSAVING': {\n\t\t\tconst { [ action.lockName ]: removedLockName, ...restState } =\n\t\t\t\tstate;\n\t\t\treturn restState;\n\t\t}\n\t}\n\treturn state;\n}\n\n/**\n * Reducer returning the post editor setting.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function editorSettings( state = EDITOR_SETTINGS_DEFAULTS, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'UPDATE_EDITOR_SETTINGS':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t...action.settings,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\nexport function renderingMode( state = 'all', action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_RENDERING_MODE':\n\t\t\treturn action.mode;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning the editing canvas device type.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function deviceType( state = 'Desktop', action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_DEVICE_TYPE':\n\t\t\treturn action.deviceType;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer storing the list of all programmatically removed panels.\n *\n * @param {Array} state Current state.\n * @param {Object} action Action object.\n *\n * @return {Array} Updated state.\n */\nexport function removedPanels( state = [], action ) {\n\tswitch ( action.type ) {\n\t\tcase 'REMOVE_PANEL':\n\t\t\tif ( ! state.includes( action.panelName ) ) {\n\t\t\t\treturn [ ...state, action.panelName ];\n\t\t\t}\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer to set the block inserter panel open or closed.\n *\n * Note: this reducer interacts with the list view panel reducer\n * to make sure that only one of the two panels is open at the same time.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n */\nexport function blockInserterPanel( state = false, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_IS_LIST_VIEW_OPENED':\n\t\t\treturn action.isOpen ? false : state;\n\t\tcase 'SET_IS_INSERTER_OPENED':\n\t\t\treturn action.value;\n\t}\n\treturn state;\n}\n\n/**\n * Reducer to set the list view panel open or closed.\n *\n * Note: this reducer interacts with the inserter panel reducer\n * to make sure that only one of the two panels is open at the same time.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n */\nexport function listViewPanel( state = false, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_IS_INSERTER_OPENED':\n\t\t\treturn action.value ? false : state;\n\t\tcase 'SET_IS_LIST_VIEW_OPENED':\n\t\t\treturn action.isOpen;\n\t}\n\treturn state;\n}\n\n/**\n * This reducer does nothing aside initializing a ref to the list view toggle.\n * We will have a unique ref per \"editor\" instance.\n *\n * @param {Object} state\n * @return {Object} Reference to the list view toggle button.\n */\nexport function listViewToggleRef( state = { current: null } ) {\n\treturn state;\n}\n\nexport default combineReducers( {\n\tpostId,\n\tpostType,\n\ttemplateId,\n\tsaving,\n\tdeleting,\n\tpostLock,\n\ttemplate,\n\tpostSavingLock,\n\teditorSettings,\n\tpostAutosavingLock,\n\trenderingMode,\n\tdeviceType,\n\tremovedPanels,\n\tblockInserterPanel,\n\tlistViewPanel,\n\tlistViewToggleRef,\n} );\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,SAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;A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AS2B,kBAAkBA,CAAE3B,KAAK,GAAG,KAAK,EAAEP,MAAM,EAAG;EAC3D,QAASA,MAAM,CAACE,IAAI;IACnB,KAAK,yBAAyB;MAC7B,OAAOF,MAAM,CAACmC,MAAM,GAAG,KAAK,GAAG5B,KAAK;IACrC,KAAK,wBAAwB;MAC5B,OAAOP,MAAM,CAACf,KAAK;EACrB;EACA,OAAOsB,KAAK;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS6B,aAAaA,CAAE7B,KAAK,GAAG,KAAK,EAAEP,MAAM,EAAG;EACtD,QAASA,MAAM,CAACE,IAAI;IACnB,KAAK,wBAAwB;MAC5B,OAAOF,MAAM,CAACf,KAAK,GAAG,KAAK,GAAGsB,KAAK;IACpC,KAAK,yBAAyB;MAC7B,OAAOP,MAAM,CAACmC,MAAM;EACtB;EACA,OAAO5B,KAAK;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS8B,iBAAiBA,CAAE9B,KAAK,GAAG;EAAE+B,OAAO,EAAE;AAAK,CAAC,EAAG;EAC9D,OAAO/B,KAAK;AACb;AAAC,IAAAgC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc,IAAAC,qBAAe,EAAE;EAC/BpC,MAAM;EACNI,QAAQ;EACRF,UAAU;EACVK,MAAM;EACNG,QAAQ;EACRC,QAAQ;EACRN,QAAQ;EACRS,cAAc;EACdK,cAAc;EACdD,kBAAkB;EAClBI,aAAa;EACbE,UAAU;EACVC,aAAa;EACbG,kBAAkB;EAClBE,aAAa;EACbC;AACD,CAAE,CAAC"}
@@ -44,7 +44,7 @@ _defaults.EDITOR_SETTINGS_DEFAULTS.autosaveInterval = 1; // This is a way to ove
44
44
  *
45
45
  * @return {Object} Updated state.
46
46
  */
47
- const postTitle = (0, _data.combineReducers)({
47
+ const postTitle = exports.postTitle = (0, _data.combineReducers)({
48
48
  isSelected(state = false, action) {
49
49
  switch (action.type) {
50
50
  case 'TOGGLE_POST_TITLE_SELECTION':
@@ -62,7 +62,6 @@ const postTitle = (0, _data.combineReducers)({
62
62
  *
63
63
  * @return {Object} Updated state.
64
64
  */
65
- exports.postTitle = postTitle;
66
65
  function clipboard(state = null, action) {
67
66
  switch (action.type) {
68
67
  case 'UPDATE_CLIPBOARD':
@@ -90,7 +89,7 @@ function notices(state = [], action) {
90
89
  }
91
90
  return state;
92
91
  }
93
- var _default = (0, _data.combineReducers)({
92
+ var _default = exports.default = (0, _data.combineReducers)({
94
93
  postId: _reducer.postId,
95
94
  postType: _reducer.postType,
96
95
  postTitle,
@@ -102,5 +101,4 @@ var _default = (0, _data.combineReducers)({
102
101
  clipboard,
103
102
  notices
104
103
  });
105
- exports.default = _default;
106
104
  //# sourceMappingURL=reducer.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","_reducer","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_defaults","EDITOR_SETTINGS_DEFAULTS","autosaveInterval","postTitle","combineReducers","isSelected","state","action","type","clipboard","notices","notice","filter","id","_default","postId","postType","saving","postLock","postSavingLock","template","editorSettings","default"],"sources":["@wordpress/editor/src/store/reducer.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { combineReducers } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport {\n\tpostId,\n\tpostType,\n\tsaving,\n\tpostLock,\n\tpostSavingLock,\n\ttemplate,\n\teditorSettings,\n} from './reducer.js';\n\nimport { EDITOR_SETTINGS_DEFAULTS } from './defaults.js';\n\nEDITOR_SETTINGS_DEFAULTS.autosaveInterval = 1; // This is a way to override default behavior on mobile, and make it ping the native save every second as long as something changed\n\nexport * from './reducer.js';\n\n/**\n * Reducer returning the post title state.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport const postTitle = combineReducers( {\n\tisSelected( state = false, action ) {\n\t\tswitch ( action.type ) {\n\t\t\tcase 'TOGGLE_POST_TITLE_SELECTION':\n\t\t\t\treturn action.isSelected;\n\t\t}\n\n\t\treturn state;\n\t},\n} );\n\n/**\n * Reducer returning the clipboard state.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function clipboard( state = null, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'UPDATE_CLIPBOARD':\n\t\t\treturn action.clipboard;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning the notices state.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function notices( state = [], action ) {\n\tswitch ( action.type ) {\n\t\tcase 'CREATE_NOTICE':\n\t\t\treturn [ ...state, action.notice ];\n\t\tcase 'REMOVE_ALL_NOTICES':\n\t\t\treturn [];\n\t\tcase 'REMOVE_NOTICE':\n\t\t\treturn state.filter( ( notice ) => notice.id !== action.id );\n\t}\n\treturn state;\n}\n\nexport default combineReducers( {\n\tpostId,\n\tpostType,\n\tpostTitle,\n\tsaving,\n\tpostLock,\n\tpostSavingLock,\n\ttemplate,\n\teditorSettings,\n\tclipboard,\n\tnotices,\n} );\n"],"mappings":";;;;;;;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AAcAE,MAAA,CAAAC,IAAA,CAAAF,QAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,QAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,QAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;A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AdA,uBAAc;EACdC,QAAQ,EAARA,iBAAQ;EACRC,cAAc,EAAdA,uBAAc;EACdZ,SAAS;EACTC;AACD,CAAE,CAAC;AAAAd,OAAA,CAAA0B,OAAA,GAAAR,QAAA"}
1
+ {"version":3,"names":["_data","require","_reducer","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_defaults","EDITOR_SETTINGS_DEFAULTS","autosaveInterval","postTitle","combineReducers","isSelected","state","action","type","clipboard","notices","notice","filter","id","_default","default","postId","postType","saving","postLock","postSavingLock","template","editorSettings"],"sources":["@wordpress/editor/src/store/reducer.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { combineReducers } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport {\n\tpostId,\n\tpostType,\n\tsaving,\n\tpostLock,\n\tpostSavingLock,\n\ttemplate,\n\teditorSettings,\n} from './reducer.js';\n\nimport { EDITOR_SETTINGS_DEFAULTS } from './defaults.js';\n\nEDITOR_SETTINGS_DEFAULTS.autosaveInterval = 1; // This is a way to override default behavior on mobile, and make it ping the native save every second as long as something changed\n\nexport * from './reducer.js';\n\n/**\n * Reducer returning the post title state.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport const postTitle = combineReducers( {\n\tisSelected( state = false, action ) {\n\t\tswitch ( action.type ) {\n\t\t\tcase 'TOGGLE_POST_TITLE_SELECTION':\n\t\t\t\treturn action.isSelected;\n\t\t}\n\n\t\treturn state;\n\t},\n} );\n\n/**\n * Reducer returning the clipboard state.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function clipboard( state = null, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'UPDATE_CLIPBOARD':\n\t\t\treturn action.clipboard;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning the notices state.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function notices( state = [], action ) {\n\tswitch ( action.type ) {\n\t\tcase 'CREATE_NOTICE':\n\t\t\treturn [ ...state, action.notice ];\n\t\tcase 'REMOVE_ALL_NOTICES':\n\t\t\treturn [];\n\t\tcase 'REMOVE_NOTICE':\n\t\t\treturn state.filter( ( notice ) => notice.id !== action.id );\n\t}\n\treturn state;\n}\n\nexport default combineReducers( {\n\tpostId,\n\tpostType,\n\tpostTitle,\n\tsaving,\n\tpostLock,\n\tpostSavingLock,\n\ttemplate,\n\teditorSettings,\n\tclipboard,\n\tnotices,\n} );\n"],"mappings":";;;;;;;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AAcAE,MAAA,CAAAC,IAAA,CAAAF,QAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,QAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,QAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AAJA,IAAAS,SAAA,GAAAd,OAAA;AAlBA;AACA;AACA;;AAGA;AACA;AACA;;AAaAe,kCAAwB,CAACC,gBAAgB,GAAG,CAAC,CAAC,CAAC;;AAI/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,SAAS,GAAAP,OAAA,CAAAO,SAAA,GAAG,IAAAC,qBAAe,EAAE;EACzCC,UAAUA,CAAEC,KAAK,GAAG,KAAK,EAAEC,MAAM,EAAG;IACnC,QAASA,MAAM,CAACC,IAAI;MACnB,KAAK,6BAA6B;QACjC,OAA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