@wordpress/edit-post 5.0.4 → 5.0.8

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 (249) hide show
  1. package/build/components/block-manager/category.js +13 -11
  2. package/build/components/block-manager/category.js.map +1 -1
  3. package/build/components/block-manager/checklist.js +6 -5
  4. package/build/components/block-manager/checklist.js.map +1 -1
  5. package/build/components/block-manager/index.js +14 -10
  6. package/build/components/block-manager/index.js.map +1 -1
  7. package/build/components/block-manager/show-all.js +5 -4
  8. package/build/components/block-manager/show-all.js.map +1 -1
  9. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js +26 -21
  10. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
  11. package/build/components/browser-url/index.js +1 -1
  12. package/build/components/editor-initialization/index.js +4 -3
  13. package/build/components/editor-initialization/index.js.map +1 -1
  14. package/build/components/editor-initialization/utils.js +2 -1
  15. package/build/components/editor-initialization/utils.js.map +1 -1
  16. package/build/components/header/fullscreen-mode-close/index.js +6 -5
  17. package/build/components/header/fullscreen-mode-close/index.js.map +1 -1
  18. package/build/components/header/header-toolbar/index.native.js +12 -11
  19. package/build/components/header/header-toolbar/index.native.js.map +1 -1
  20. package/build/components/header/index.js +4 -3
  21. package/build/components/header/index.js.map +1 -1
  22. package/build/components/header/main-dashboard-button/index.js +4 -3
  23. package/build/components/header/main-dashboard-button/index.js.map +1 -1
  24. package/build/components/header/more-menu/index.js +23 -19
  25. package/build/components/header/more-menu/index.js.map +1 -1
  26. package/build/components/header/post-publish-button-or-toggle.js +14 -13
  27. package/build/components/header/post-publish-button-or-toggle.js.map +1 -1
  28. package/build/components/header/template-title/index.js +13 -10
  29. package/build/components/header/template-title/index.js.map +1 -1
  30. package/build/components/header/tools-more-menu-group/index.js +10 -7
  31. package/build/components/header/tools-more-menu-group/index.js.map +1 -1
  32. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +4 -3
  33. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  34. package/build/components/keyboard-shortcut-help-modal/index.js +54 -44
  35. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  36. package/build/components/keyboard-shortcut-help-modal/shortcut.js +12 -10
  37. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  38. package/build/components/layout/actions-panel.js +7 -6
  39. package/build/components/layout/actions-panel.js.map +1 -1
  40. package/build/components/layout/index.js +4 -3
  41. package/build/components/layout/index.js.map +1 -1
  42. package/build/components/meta-boxes/index.js +13 -12
  43. package/build/components/meta-boxes/index.js.map +1 -1
  44. package/build/components/meta-boxes/meta-box-visibility.js +8 -5
  45. package/build/components/meta-boxes/meta-box-visibility.js.map +1 -1
  46. package/build/components/meta-boxes/meta-boxes-area/index.js +4 -3
  47. package/build/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
  48. package/build/components/preferences-modal/index.js +13 -11
  49. package/build/components/preferences-modal/index.js.map +1 -1
  50. package/build/components/preferences-modal/meta-boxes-section.js +23 -16
  51. package/build/components/preferences-modal/meta-boxes-section.js.map +1 -1
  52. package/build/components/preferences-modal/options/base.js +8 -7
  53. package/build/components/preferences-modal/options/base.js.map +1 -1
  54. package/build/components/preferences-modal/options/enable-custom-fields.js +9 -7
  55. package/build/components/preferences-modal/options/enable-custom-fields.js.map +1 -1
  56. package/build/components/preferences-modal/options/enable-feature.js +12 -8
  57. package/build/components/preferences-modal/options/enable-feature.js.map +1 -1
  58. package/build/components/preferences-modal/options/enable-panel.js +17 -10
  59. package/build/components/preferences-modal/options/enable-panel.js.map +1 -1
  60. package/build/components/preferences-modal/options/enable-plugin-document-setting-panel.js +10 -7
  61. package/build/components/preferences-modal/options/enable-plugin-document-setting-panel.js.map +1 -1
  62. package/build/components/preferences-modal/options/index.js +6 -6
  63. package/build/components/preferences-modal/section.js +14 -11
  64. package/build/components/preferences-modal/section.js.map +1 -1
  65. package/build/components/sidebar/discussion-panel/index.js +7 -5
  66. package/build/components/sidebar/discussion-panel/index.js.map +1 -1
  67. package/build/components/sidebar/featured-image/index.js +8 -6
  68. package/build/components/sidebar/featured-image/index.js.map +1 -1
  69. package/build/components/sidebar/plugin-document-setting-panel/index.js +25 -20
  70. package/build/components/sidebar/plugin-document-setting-panel/index.js.map +1 -1
  71. package/build/components/sidebar/plugin-post-publish-panel/index.js +15 -12
  72. package/build/components/sidebar/plugin-post-publish-panel/index.js.map +1 -1
  73. package/build/components/sidebar/plugin-post-status-info/index.js +9 -6
  74. package/build/components/sidebar/plugin-post-status-info/index.js.map +1 -1
  75. package/build/components/sidebar/plugin-pre-publish-panel/index.js +15 -12
  76. package/build/components/sidebar/plugin-pre-publish-panel/index.js.map +1 -1
  77. package/build/components/sidebar/plugin-sidebar/index.js +5 -4
  78. package/build/components/sidebar/plugin-sidebar/index.js.map +1 -1
  79. package/build/components/sidebar/post-excerpt/index.js +7 -5
  80. package/build/components/sidebar/post-excerpt/index.js.map +1 -1
  81. package/build/components/sidebar/post-link/index.js +19 -17
  82. package/build/components/sidebar/post-link/index.js.map +1 -1
  83. package/build/components/sidebar/post-schedule/index.js +12 -9
  84. package/build/components/sidebar/post-schedule/index.js.map +1 -1
  85. package/build/components/sidebar/post-status/index.js +11 -7
  86. package/build/components/sidebar/post-status/index.js.map +1 -1
  87. package/build/components/sidebar/post-taxonomies/taxonomy-panel.js +9 -7
  88. package/build/components/sidebar/post-taxonomies/taxonomy-panel.js.map +1 -1
  89. package/build/components/sidebar/post-visibility/index.js +24 -18
  90. package/build/components/sidebar/post-visibility/index.js.map +1 -1
  91. package/build/components/sidebar/settings-header/index.js +4 -3
  92. package/build/components/sidebar/settings-header/index.js.map +1 -1
  93. package/build/components/sidebar/template/index.js +12 -6
  94. package/build/components/sidebar/template/index.js.map +1 -1
  95. package/build/components/text-editor/index.js +5 -4
  96. package/build/components/text-editor/index.js.map +1 -1
  97. package/build/components/visual-editor/block-inspector-button.js +5 -4
  98. package/build/components/visual-editor/block-inspector-button.js.map +1 -1
  99. package/build/components/visual-editor/header.native.js +7 -6
  100. package/build/components/visual-editor/header.native.js.map +1 -1
  101. package/build/components/visual-editor/index.js +20 -15
  102. package/build/components/visual-editor/index.js.map +1 -1
  103. package/build/components/welcome-guide/image.js +5 -4
  104. package/build/components/welcome-guide/image.js.map +1 -1
  105. package/build/editor.js +20 -11
  106. package/build/editor.js.map +1 -1
  107. package/build/hooks/validate-multiple-use/index.js +28 -17
  108. package/build/hooks/validate-multiple-use/index.js.map +1 -1
  109. package/build/index.js +3 -2
  110. package/build/index.js.map +1 -1
  111. package/build/plugins/index.js +23 -20
  112. package/build/plugins/index.js.map +1 -1
  113. package/build/plugins/keyboard-shortcuts-help-menu-item/index.js +4 -3
  114. package/build/plugins/keyboard-shortcuts-help-menu-item/index.js.map +1 -1
  115. package/build/store/actions.js +26 -22
  116. package/build/store/actions.js.map +1 -1
  117. package/build/store/index.js +4 -2
  118. package/build/store/index.js.map +1 -1
  119. package/build/store/reducer.js +52 -17
  120. package/build/store/reducer.js.map +1 -1
  121. package/build/store/selectors.js +20 -17
  122. package/build/store/selectors.js.map +1 -1
  123. package/build-module/components/block-manager/category.js +13 -11
  124. package/build-module/components/block-manager/category.js.map +1 -1
  125. package/build-module/components/block-manager/checklist.js +6 -5
  126. package/build-module/components/block-manager/checklist.js.map +1 -1
  127. package/build-module/components/block-manager/index.js +14 -10
  128. package/build-module/components/block-manager/index.js.map +1 -1
  129. package/build-module/components/block-manager/show-all.js +5 -4
  130. package/build-module/components/block-manager/show-all.js.map +1 -1
  131. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js +26 -21
  132. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
  133. package/build-module/components/editor-initialization/index.js +4 -3
  134. package/build-module/components/editor-initialization/index.js.map +1 -1
  135. package/build-module/components/editor-initialization/utils.js +2 -1
  136. package/build-module/components/editor-initialization/utils.js.map +1 -1
  137. package/build-module/components/header/fullscreen-mode-close/index.js +6 -5
  138. package/build-module/components/header/fullscreen-mode-close/index.js.map +1 -1
  139. package/build-module/components/header/header-toolbar/index.native.js +12 -11
  140. package/build-module/components/header/header-toolbar/index.native.js.map +1 -1
  141. package/build-module/components/header/index.js +4 -3
  142. package/build-module/components/header/index.js.map +1 -1
  143. package/build-module/components/header/main-dashboard-button/index.js +4 -3
  144. package/build-module/components/header/main-dashboard-button/index.js.map +1 -1
  145. package/build-module/components/header/more-menu/index.js +23 -19
  146. package/build-module/components/header/more-menu/index.js.map +1 -1
  147. package/build-module/components/header/post-publish-button-or-toggle.js +14 -13
  148. package/build-module/components/header/post-publish-button-or-toggle.js.map +1 -1
  149. package/build-module/components/header/template-title/index.js +13 -10
  150. package/build-module/components/header/template-title/index.js.map +1 -1
  151. package/build-module/components/header/tools-more-menu-group/index.js +10 -7
  152. package/build-module/components/header/tools-more-menu-group/index.js.map +1 -1
  153. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +4 -3
  154. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  155. package/build-module/components/keyboard-shortcut-help-modal/index.js +52 -42
  156. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  157. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +12 -10
  158. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  159. package/build-module/components/layout/actions-panel.js +6 -5
  160. package/build-module/components/layout/actions-panel.js.map +1 -1
  161. package/build-module/components/layout/index.js +4 -3
  162. package/build-module/components/layout/index.js.map +1 -1
  163. package/build-module/components/meta-boxes/index.js +13 -12
  164. package/build-module/components/meta-boxes/index.js.map +1 -1
  165. package/build-module/components/meta-boxes/meta-box-visibility.js +8 -5
  166. package/build-module/components/meta-boxes/meta-box-visibility.js.map +1 -1
  167. package/build-module/components/meta-boxes/meta-boxes-area/index.js +4 -3
  168. package/build-module/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
  169. package/build-module/components/preferences-modal/index.js +13 -11
  170. package/build-module/components/preferences-modal/index.js.map +1 -1
  171. package/build-module/components/preferences-modal/meta-boxes-section.js +23 -16
  172. package/build-module/components/preferences-modal/meta-boxes-section.js.map +1 -1
  173. package/build-module/components/preferences-modal/options/base.js +8 -7
  174. package/build-module/components/preferences-modal/options/base.js.map +1 -1
  175. package/build-module/components/preferences-modal/options/enable-custom-fields.js +9 -7
  176. package/build-module/components/preferences-modal/options/enable-custom-fields.js.map +1 -1
  177. package/build-module/components/preferences-modal/options/enable-feature.js +12 -8
  178. package/build-module/components/preferences-modal/options/enable-feature.js.map +1 -1
  179. package/build-module/components/preferences-modal/options/enable-panel.js +17 -10
  180. package/build-module/components/preferences-modal/options/enable-panel.js.map +1 -1
  181. package/build-module/components/preferences-modal/options/enable-plugin-document-setting-panel.js +10 -7
  182. package/build-module/components/preferences-modal/options/enable-plugin-document-setting-panel.js.map +1 -1
  183. package/build-module/components/preferences-modal/section.js +14 -11
  184. package/build-module/components/preferences-modal/section.js.map +1 -1
  185. package/build-module/components/sidebar/discussion-panel/index.js +7 -5
  186. package/build-module/components/sidebar/discussion-panel/index.js.map +1 -1
  187. package/build-module/components/sidebar/featured-image/index.js +8 -6
  188. package/build-module/components/sidebar/featured-image/index.js.map +1 -1
  189. package/build-module/components/sidebar/plugin-document-setting-panel/index.js +25 -20
  190. package/build-module/components/sidebar/plugin-document-setting-panel/index.js.map +1 -1
  191. package/build-module/components/sidebar/plugin-post-publish-panel/index.js +15 -12
  192. package/build-module/components/sidebar/plugin-post-publish-panel/index.js.map +1 -1
  193. package/build-module/components/sidebar/plugin-post-status-info/index.js +9 -6
  194. package/build-module/components/sidebar/plugin-post-status-info/index.js.map +1 -1
  195. package/build-module/components/sidebar/plugin-pre-publish-panel/index.js +15 -12
  196. package/build-module/components/sidebar/plugin-pre-publish-panel/index.js.map +1 -1
  197. package/build-module/components/sidebar/plugin-sidebar/index.js +5 -4
  198. package/build-module/components/sidebar/plugin-sidebar/index.js.map +1 -1
  199. package/build-module/components/sidebar/post-excerpt/index.js +7 -5
  200. package/build-module/components/sidebar/post-excerpt/index.js.map +1 -1
  201. package/build-module/components/sidebar/post-link/index.js +19 -17
  202. package/build-module/components/sidebar/post-link/index.js.map +1 -1
  203. package/build-module/components/sidebar/post-schedule/index.js +12 -9
  204. package/build-module/components/sidebar/post-schedule/index.js.map +1 -1
  205. package/build-module/components/sidebar/post-status/index.js +11 -7
  206. package/build-module/components/sidebar/post-status/index.js.map +1 -1
  207. package/build-module/components/sidebar/post-taxonomies/taxonomy-panel.js +9 -7
  208. package/build-module/components/sidebar/post-taxonomies/taxonomy-panel.js.map +1 -1
  209. package/build-module/components/sidebar/post-visibility/index.js +24 -18
  210. package/build-module/components/sidebar/post-visibility/index.js.map +1 -1
  211. package/build-module/components/sidebar/settings-header/index.js +4 -3
  212. package/build-module/components/sidebar/settings-header/index.js.map +1 -1
  213. package/build-module/components/sidebar/template/index.js +12 -6
  214. package/build-module/components/sidebar/template/index.js.map +1 -1
  215. package/build-module/components/text-editor/index.js +5 -4
  216. package/build-module/components/text-editor/index.js.map +1 -1
  217. package/build-module/components/visual-editor/block-inspector-button.js +5 -4
  218. package/build-module/components/visual-editor/block-inspector-button.js.map +1 -1
  219. package/build-module/components/visual-editor/header.native.js +7 -6
  220. package/build-module/components/visual-editor/header.native.js.map +1 -1
  221. package/build-module/components/visual-editor/index.js +20 -15
  222. package/build-module/components/visual-editor/index.js.map +1 -1
  223. package/build-module/components/welcome-guide/image.js +5 -4
  224. package/build-module/components/welcome-guide/image.js.map +1 -1
  225. package/build-module/editor.js +20 -11
  226. package/build-module/editor.js.map +1 -1
  227. package/build-module/hooks/validate-multiple-use/index.js +28 -17
  228. package/build-module/hooks/validate-multiple-use/index.js.map +1 -1
  229. package/build-module/index.js +1 -0
  230. package/build-module/index.js.map +1 -1
  231. package/build-module/plugins/index.js +23 -20
  232. package/build-module/plugins/index.js.map +1 -1
  233. package/build-module/plugins/keyboard-shortcuts-help-menu-item/index.js +4 -3
  234. package/build-module/plugins/keyboard-shortcuts-help-menu-item/index.js.map +1 -1
  235. package/build-module/store/actions.js +6 -2
  236. package/build-module/store/actions.js.map +1 -1
  237. package/build-module/store/reducer.js +45 -11
  238. package/build-module/store/reducer.js.map +1 -1
  239. package/build-module/store/selectors.js +4 -3
  240. package/build-module/store/selectors.js.map +1 -1
  241. package/build-style/style-rtl.css +6 -11
  242. package/build-style/style.css +6 -11
  243. package/package.json +27 -27
  244. package/src/components/layout/style.scss +0 -8
  245. package/src/components/meta-boxes/index.js +2 -9
  246. package/src/components/meta-boxes/meta-boxes-area/style.scss +7 -3
  247. package/src/components/sidebar/template/index.js +5 -3
  248. package/src/editor.js +15 -2
  249. package/src/index.js +1 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-post/src/store/selectors.js"],"names":["createSelector","get","includes","some","flatten","values","createRegistrySelector","store","interfaceStore","coreStore","editorStore","getEditorMode","state","getPreference","isEditorSidebarOpened","select","activeGeneralSidebar","getActiveComplementaryArea","isPluginSidebarOpened","getActiveGeneralSidebarName","getPreferences","preferences","preferenceKey","defaultValue","value","undefined","isPublishSidebarOpened","publishSidebarActive","isEditorPanelRemoved","panelName","removedPanels","isEditorPanelEnabled","panels","isEditorPanelOpened","isModalActive","modalName","activeModal","isFeatureActive","feature","isPluginItemPinned","pluginName","isItemPinned","getActiveMetaBoxLocations","Object","keys","metaBoxes","locations","filter","location","isMetaBoxLocationActive","isMetaBoxLocationVisible","getMetaBoxesPerLocation","id","length","getAllMetaBoxes","hasMetaBoxes","isSavingMetaBoxes","isSaving","__experimentalGetPreviewDeviceType","deviceType","isInserterOpened","blockInserterPanel","__experimentalGetInsertionPoint","rootClientId","insertionIndex","filterValue","isListViewOpened","listViewPanel","isEditingTemplate","areMetaBoxesInitialized","initialized","getEditedPostTemplate","currentTemplate","getEditedPostAttribute","templateWithSameSlug","getEntityRecords","find","template","slug","getEditedEntityRecord","post","getCurrentPost","link","__experimentalGetTemplateForLink"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA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AA;;AACtB,UAAME,oBAAoB,4BAAG3D,MAAM,CAAEN,SAAF,CAAN,CAC3BkE,gBAD2B,CACT,UADS,EACG,aADH,CAAH,0DAAG,sBAE1BC,IAF0B,CAElBC,QAAF,IAAgBA,QAAQ,CAACC,IAAT,KAAkBN,eAFd,CAA7B;;AAGA,QAAK,CAAEE,oBAAP,EAA8B;AAC7B,aAAOA,oBAAP;AACA;;AACD,WAAO3D,MAAM,CAAEN,SAAF,CAAN,CAAoBsE,qBAApB,CACN,UADM,EAEN,aAFM,EAGNL,oBAAoB,CAACtB,EAHf,CAAP;AAKA;;AAED,QAAM4B,IAAI,GAAGjE,MAAM,CAAEL,WAAF,CAAN,CAAsBuE,cAAtB,EAAb;;AACA,MAAKD,IAAI,CAACE,IAAV,EAAiB;AAChB,WAAOnE,MAAM,CAAEN,SAAF,CAAN,CAAoB0E,gCAApB,CACNH,IAAI,CAACE,IADC,CAAP;AAGA;;AAED,SAAO,IAAP;AACA,CA3ByD,CAApD","sourcesContent":["/**\n * External dependencies\n */\nimport createSelector from 'rememo';\nimport { get, includes, some, flatten, values } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { createRegistrySelector } from '@wordpress/data';\nimport { store as interfaceStore } from '@wordpress/interface';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as editorStore } from '@wordpress/editor';\n/**\n * Returns the current editing mode.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Editing mode.\n */\nexport function getEditorMode( state ) {\n\treturn getPreference( state, 'editorMode', 'visual' );\n}\n\n/**\n * Returns true if the editor sidebar is opened.\n *\n * @param {Object} state Global application state\n *\n * @return {boolean} Whether the editor sidebar is opened.\n */\nexport const isEditorSidebarOpened = createRegistrySelector(\n\t( select ) => () => {\n\t\tconst activeGeneralSidebar = select(\n\t\t\tinterfaceStore\n\t\t).getActiveComplementaryArea( 'core/edit-post' );\n\t\treturn includes(\n\t\t\t[ 'edit-post/document', 'edit-post/block' ],\n\t\t\tactiveGeneralSidebar\n\t\t);\n\t}\n);\n\n/**\n * Returns true if the plugin sidebar is opened.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the plugin sidebar is opened.\n */\nexport const isPluginSidebarOpened = createRegistrySelector(\n\t( select ) => () => {\n\t\tconst activeGeneralSidebar = select(\n\t\t\tinterfaceStore\n\t\t).getActiveComplementaryArea( 'core/edit-post' );\n\t\treturn (\n\t\t\t!! activeGeneralSidebar &&\n\t\t\t! includes(\n\t\t\t\t[ 'edit-post/document', 'edit-post/block' ],\n\t\t\t\tactiveGeneralSidebar\n\t\t\t)\n\t\t);\n\t}\n);\n\n/**\n * Returns the current active general sidebar name, or null if there is no\n * general sidebar active. The active general sidebar is a unique name to\n * identify either an editor or plugin sidebar.\n *\n * Examples:\n *\n * - `edit-post/document`\n * - `my-plugin/insert-image-sidebar`\n *\n * @param {Object} state Global application state.\n *\n * @return {?string} Active general sidebar name.\n */\nexport const getActiveGeneralSidebarName = createRegistrySelector(\n\t( select ) => () => {\n\t\treturn select( interfaceStore ).getActiveComplementaryArea(\n\t\t\t'core/edit-post'\n\t\t);\n\t}\n);\n\n/**\n * Returns the preferences (these preferences are persisted locally).\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} Preferences Object.\n */\nexport function getPreferences( state ) {\n\treturn state.preferences;\n}\n\n/**\n *\n * @param {Object} state Global application state.\n * @param {string} preferenceKey Preference Key.\n * @param {*} defaultValue Default Value.\n *\n * @return {*} Preference Value.\n */\nexport function getPreference( state, preferenceKey, defaultValue ) {\n\tconst preferences = getPreferences( state );\n\tconst value = preferences[ preferenceKey ];\n\treturn value === undefined ? defaultValue : value;\n}\n\n/**\n * Returns true if the publish sidebar is opened.\n *\n * @param {Object} state Global application state\n *\n * @return {boolean} Whether the publish sidebar is open.\n */\nexport function isPublishSidebarOpened( state ) {\n\treturn state.publishSidebarActive;\n}\n\n/**\n * Returns true if the given panel was programmatically removed, or false otherwise.\n * All panels are not removed by default.\n *\n * @param {Object} state Global application state.\n * @param {string} panelName A string that identifies the panel.\n *\n * @return {boolean} Whether or not the panel is removed.\n */\nexport function isEditorPanelRemoved( state, panelName ) {\n\treturn includes( state.removedPanels, panelName );\n}\n\n/**\n * Returns true if the given panel is enabled, or false otherwise. Panels are\n * enabled by default.\n *\n * @param {Object} state Global application state.\n * @param {string} panelName A string that identifies the panel.\n *\n * @return {boolean} Whether or not the panel is enabled.\n */\nexport function isEditorPanelEnabled( state, panelName ) {\n\tconst panels = getPreference( state, 'panels' );\n\n\treturn (\n\t\t! isEditorPanelRemoved( state, panelName ) &&\n\t\tget( panels, [ panelName, 'enabled' ], true )\n\t);\n}\n\n/**\n * Returns true if the given panel is open, or false otherwise. Panels are\n * closed by default.\n *\n * @param {Object} state Global application state.\n * @param {string} panelName A string that identifies the panel.\n *\n * @return {boolean} Whether or not the panel is open.\n */\nexport function isEditorPanelOpened( state, panelName ) {\n\tconst panels = getPreference( state, 'panels' );\n\treturn (\n\t\tget( panels, [ panelName ] ) === true ||\n\t\tget( panels, [ panelName, 'opened' ] ) === true\n\t);\n}\n\n/**\n * Returns true if a modal is active, or false otherwise.\n *\n * @param {Object} state Global application state.\n * @param {string} modalName A string that uniquely identifies the modal.\n *\n * @return {boolean} Whether the modal is active.\n */\nexport function isModalActive( state, modalName ) {\n\treturn state.activeModal === modalName;\n}\n\n/**\n * Returns whether the given feature is enabled or not.\n *\n * @param {Object} state Global application state.\n * @param {string} feature Feature slug.\n *\n * @return {boolean} Is active.\n */\nexport const isFeatureActive = createRegistrySelector(\n\t( select ) => ( state, feature ) => {\n\t\treturn select( interfaceStore ).isFeatureActive(\n\t\t\t'core/edit-post',\n\t\t\tfeature\n\t\t);\n\t}\n);\n\n/**\n * Returns true if the plugin item is pinned to the header.\n * When the value is not set it defaults to true.\n *\n * @param {Object} state Global application state.\n * @param {string} pluginName Plugin item name.\n *\n * @return {boolean} Whether the plugin item is pinned.\n */\nexport const isPluginItemPinned = createRegistrySelector(\n\t( select ) => ( state, pluginName ) => {\n\t\treturn select( interfaceStore ).isItemPinned(\n\t\t\t'core/edit-post',\n\t\t\tpluginName\n\t\t);\n\t}\n);\n\n/**\n * Returns an array of active meta box locations.\n *\n * @param {Object} state Post editor state.\n *\n * @return {string[]} Active meta box locations.\n */\nexport const getActiveMetaBoxLocations = createSelector(\n\t( state ) => {\n\t\treturn Object.keys( state.metaBoxes.locations ).filter( ( location ) =>\n\t\t\tisMetaBoxLocationActive( state, location )\n\t\t);\n\t},\n\t( state ) => [ state.metaBoxes.locations ]\n);\n\n/**\n * Returns true if a metabox location is active and visible\n *\n * @param {Object} state Post editor state.\n * @param {string} location Meta box location to test.\n *\n * @return {boolean} Whether the meta box location is active and visible.\n */\nexport function isMetaBoxLocationVisible( state, location ) {\n\treturn (\n\t\tisMetaBoxLocationActive( state, location ) &&\n\t\tsome( getMetaBoxesPerLocation( state, location ), ( { id } ) => {\n\t\t\treturn isEditorPanelEnabled( state, `meta-box-${ id }` );\n\t\t} )\n\t);\n}\n\n/**\n * Returns true if there is an active meta box in the given location, or false\n * otherwise.\n *\n * @param {Object} state Post editor state.\n * @param {string} location Meta box location to test.\n *\n * @return {boolean} Whether the meta box location is active.\n */\nexport function isMetaBoxLocationActive( state, location ) {\n\tconst metaBoxes = getMetaBoxesPerLocation( state, location );\n\treturn !! metaBoxes && metaBoxes.length !== 0;\n}\n\n/**\n * Returns the list of all the available meta boxes for a given location.\n *\n * @param {Object} state Global application state.\n * @param {string} location Meta box location to test.\n *\n * @return {?Array} List of meta boxes.\n */\nexport function getMetaBoxesPerLocation( state, location ) {\n\treturn state.metaBoxes.locations[ location ];\n}\n\n/**\n * Returns the list of all the available meta boxes.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} List of meta boxes.\n */\nexport const getAllMetaBoxes = createSelector(\n\t( state ) => {\n\t\treturn flatten( values( state.metaBoxes.locations ) );\n\t},\n\t( state ) => [ state.metaBoxes.locations ]\n);\n\n/**\n * Returns true if the post is using Meta Boxes\n *\n * @param {Object} state Global application state\n *\n * @return {boolean} Whether there are metaboxes or not.\n */\nexport function hasMetaBoxes( state ) {\n\treturn getActiveMetaBoxLocations( state ).length > 0;\n}\n\n/**\n * Returns true if the Meta Boxes are being saved.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the metaboxes are being saved.\n */\nexport function isSavingMetaBoxes( state ) {\n\treturn state.metaBoxes.isSaving;\n}\n\n/**\n * Returns the current editing canvas device type.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Device type.\n */\nexport function __experimentalGetPreviewDeviceType( state ) {\n\treturn state.deviceType;\n}\n\n/**\n * Returns true if the inserter is opened.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the inserter is opened.\n */\nexport function isInserterOpened( state ) {\n\treturn !! state.blockInserterPanel;\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 function __experimentalGetInsertionPoint( state ) {\n\tconst {\n\t\trootClientId,\n\t\tinsertionIndex,\n\t\tfilterValue,\n\t} = state.blockInserterPanel;\n\treturn { rootClientId, insertionIndex, filterValue };\n}\n\n/**\n * Returns true if the list view is opened.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the list view is opened.\n */\nexport function isListViewOpened( state ) {\n\treturn state.listViewPanel;\n}\n\n/**\n * Returns true if the template editing mode is enabled.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether we're editing the template.\n */\nexport function isEditingTemplate( state ) {\n\treturn state.isEditingTemplate;\n}\n\n/**\n * Returns true if meta boxes are initialized.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether meta boxes are initialized.\n */\nexport function areMetaBoxesInitialized( state ) {\n\treturn state.metaBoxes.initialized;\n}\n\n/**\n * Retrieves the template of the currently edited post.\n *\n * @return {Object?} Post Template.\n */\nexport const getEditedPostTemplate = createRegistrySelector(\n\t( select ) => () => {\n\t\tconst currentTemplate = select( editorStore ).getEditedPostAttribute(\n\t\t\t'template'\n\t\t);\n\t\tif ( currentTemplate ) {\n\t\t\tconst templateWithSameSlug = select( coreStore )\n\t\t\t\t.getEntityRecords( 'postType', 'wp_template' )\n\t\t\t\t?.find( ( template ) => template.slug === currentTemplate );\n\t\t\tif ( ! templateWithSameSlug ) {\n\t\t\t\treturn templateWithSameSlug;\n\t\t\t}\n\t\t\treturn select( coreStore ).getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t'wp_template',\n\t\t\t\ttemplateWithSameSlug.id\n\t\t\t);\n\t\t}\n\n\t\tconst post = select( editorStore ).getCurrentPost();\n\t\tif ( post.link ) {\n\t\t\treturn select( coreStore ).__experimentalGetTemplateForLink(\n\t\t\t\tpost.link\n\t\t\t);\n\t\t}\n\n\t\treturn null;\n\t}\n);\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-post/src/store/selectors.js"],"names":["createSelector","get","includes","some","flatten","values","createRegistrySelector","store","interfaceStore","coreStore","editorStore","getEditorMode","state","getPreference","isEditorSidebarOpened","select","activeGeneralSidebar","getActiveComplementaryArea","isPluginSidebarOpened","getActiveGeneralSidebarName","getPreferences","preferences","preferenceKey","defaultValue","value","undefined","isPublishSidebarOpened","publishSidebarActive","isEditorPanelRemoved","panelName","removedPanels","isEditorPanelEnabled","panels","isEditorPanelOpened","isModalActive","modalName","activeModal","isFeatureActive","feature","isPluginItemPinned","pluginName","isItemPinned","getActiveMetaBoxLocations","Object","keys","metaBoxes","locations","filter","location","isMetaBoxLocationActive","isMetaBoxLocationVisible","getMetaBoxesPerLocation","id","length","getAllMetaBoxes","hasMetaBoxes","isSavingMetaBoxes","isSaving","__experimentalGetPreviewDeviceType","deviceType","isInserterOpened","blockInserterPanel","__experimentalGetInsertionPoint","rootClientId","insertionIndex","filterValue","isListViewOpened","listViewPanel","isEditingTemplate","areMetaBoxesInitialized","initialized","getEditedPostTemplate","currentTemplate","getEditedPostAttribute","templateWithSameSlug","getEntityRecords","find","template","slug","getEditedEntityRecord","post","getCurrentPost","link","__experimentalGetTemplateForLink"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,cAAP,MAA2B,QAA3B;AACA,SAASC,GAAT,EAAcC,QAAd,EAAwBC,IAAxB,EAA8BC,OAA9B,EAAuCC,MAAvC,QAAqD,QAArD;AAEA;AACA;AACA;;AACA,SAASC,sBAAT,QAAuC,iBAAvC;AACA,SAASC,KAAK,IAAIC,cAAlB,QAAwC,sBAAxC;AACA,SAASD,KAAK,IAAIE,SAAlB,QAAmC,sBAAnC;AACA,SAASF,KAAK,IAAIG,WAAlB,QAAqC,mBAArC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,aAAT,CAAwBC,KAAxB,EAAgC;AACtC,SAAOC,aAAa,CAAED,KAAF,EAAS,YAAT,EAAuB,QAAvB,CAApB;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAME,qBAAqB,GAAGR,sBAAsB,CACxDS,MAAF,IAAc,MAAM;AACnB,QAAMC,oBAAoB,GAAGD,MAAM,CAClCP,cADkC,CAAN,CAE3BS,0BAF2B,CAEC,gBAFD,CAA7B;AAGA,SAAOf,QAAQ,CACd,CAAE,oBAAF,EAAwB,iBAAxB,CADc,EAEdc,oBAFc,CAAf;AAIA,CATyD,CAApD;AAYP;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAME,qBAAqB,GAAGZ,sBAAsB,CACxDS,MAAF,IAAc,MAAM;AACnB,QAAMC,oBAAoB,GAAGD,MAAM,CAClCP,cADkC,CAAN,CAE3BS,0BAF2B,CAEC,gBAFD,CAA7B;AAGA,SACC,CAAC,CAAED,oBAAH,IACA,CAAEd,QAAQ,CACT,CAAE,oBAAF,EAAwB,iBAAxB,CADS,EAETc,oBAFS,CAFX;AAOA,CAZyD,CAApD;AAeP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMG,2BAA2B,GAAGb,sBAAsB,C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sB+D,sBAAtB,CACvB,UADuB,CAAxB;;AAGA,MAAKD,eAAL,EAAuB;AAAA;;AACtB,UAAME,oBAAoB,4BAAG3D,MAAM,CAAEN,SAAF,CAAN,CAC3BkE,gBAD2B,CACT,UADS,EACG,aADH,CAAH,0DAAG,sBAE1BC,IAF0B,CAElBC,QAAF,IAAgBA,QAAQ,CAACC,IAAT,KAAkBN,eAFd,CAA7B;;AAGA,QAAK,CAAEE,oBAAP,EAA8B;AAC7B,aAAOA,oBAAP;AACA;;AACD,WAAO3D,MAAM,CAAEN,SAAF,CAAN,CAAoBsE,qBAApB,CACN,UADM,EAEN,aAFM,EAGNL,oBAAoB,CAACtB,EAHf,CAAP;AAKA;;AAED,QAAM4B,IAAI,GAAGjE,MAAM,CAAEL,WAAF,CAAN,CAAsBuE,cAAtB,EAAb;;AACA,MAAKD,IAAI,CAACE,IAAV,EAAiB;AAChB,WAAOnE,MAAM,CAAEN,SAAF,CAAN,CAAoB0E,gCAApB,CACNH,IAAI,CAACE,IADC,CAAP;AAGA;;AAED,SAAO,IAAP;AACA,CA3ByD,CAApD","sourcesContent":["/**\n * External dependencies\n */\nimport createSelector from 'rememo';\nimport { get, includes, some, flatten, values } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { createRegistrySelector } from '@wordpress/data';\nimport { store as interfaceStore } from '@wordpress/interface';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as editorStore } from '@wordpress/editor';\n/**\n * Returns the current editing mode.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Editing mode.\n */\nexport function getEditorMode( state ) {\n\treturn getPreference( state, 'editorMode', 'visual' );\n}\n\n/**\n * Returns true if the editor sidebar is opened.\n *\n * @param {Object} state Global application state\n *\n * @return {boolean} Whether the editor sidebar is opened.\n */\nexport const isEditorSidebarOpened = createRegistrySelector(\n\t( select ) => () => {\n\t\tconst activeGeneralSidebar = select(\n\t\t\tinterfaceStore\n\t\t).getActiveComplementaryArea( 'core/edit-post' );\n\t\treturn includes(\n\t\t\t[ 'edit-post/document', 'edit-post/block' ],\n\t\t\tactiveGeneralSidebar\n\t\t);\n\t}\n);\n\n/**\n * Returns true if the plugin sidebar is opened.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the plugin sidebar is opened.\n */\nexport const isPluginSidebarOpened = createRegistrySelector(\n\t( select ) => () => {\n\t\tconst activeGeneralSidebar = select(\n\t\t\tinterfaceStore\n\t\t).getActiveComplementaryArea( 'core/edit-post' );\n\t\treturn (\n\t\t\t!! activeGeneralSidebar &&\n\t\t\t! includes(\n\t\t\t\t[ 'edit-post/document', 'edit-post/block' ],\n\t\t\t\tactiveGeneralSidebar\n\t\t\t)\n\t\t);\n\t}\n);\n\n/**\n * Returns the current active general sidebar name, or null if there is no\n * general sidebar active. The active general sidebar is a unique name to\n * identify either an editor or plugin sidebar.\n *\n * Examples:\n *\n * - `edit-post/document`\n * - `my-plugin/insert-image-sidebar`\n *\n * @param {Object} state Global application state.\n *\n * @return {?string} Active general sidebar name.\n */\nexport const getActiveGeneralSidebarName = createRegistrySelector(\n\t( select ) => () => {\n\t\treturn select( interfaceStore ).getActiveComplementaryArea(\n\t\t\t'core/edit-post'\n\t\t);\n\t}\n);\n\n/**\n * Returns the preferences (these preferences are persisted locally).\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} Preferences Object.\n */\nexport function getPreferences( state ) {\n\treturn state.preferences;\n}\n\n/**\n *\n * @param {Object} state Global application state.\n * @param {string} preferenceKey Preference Key.\n * @param {*} defaultValue Default Value.\n *\n * @return {*} Preference Value.\n */\nexport function getPreference( state, preferenceKey, defaultValue ) {\n\tconst preferences = getPreferences( state );\n\tconst value = preferences[ preferenceKey ];\n\treturn value === undefined ? defaultValue : value;\n}\n\n/**\n * Returns true if the publish sidebar is opened.\n *\n * @param {Object} state Global application state\n *\n * @return {boolean} Whether the publish sidebar is open.\n */\nexport function isPublishSidebarOpened( state ) {\n\treturn state.publishSidebarActive;\n}\n\n/**\n * Returns true if the given panel was programmatically removed, or false otherwise.\n * All panels are not removed by default.\n *\n * @param {Object} state Global application state.\n * @param {string} panelName A string that identifies the panel.\n *\n * @return {boolean} Whether or not the panel is removed.\n */\nexport function isEditorPanelRemoved( state, panelName ) {\n\treturn includes( state.removedPanels, panelName );\n}\n\n/**\n * Returns true if the given panel is enabled, or false otherwise. Panels are\n * enabled by default.\n *\n * @param {Object} state Global application state.\n * @param {string} panelName A string that identifies the panel.\n *\n * @return {boolean} Whether or not the panel is enabled.\n */\nexport function isEditorPanelEnabled( state, panelName ) {\n\tconst panels = getPreference( state, 'panels' );\n\n\treturn (\n\t\t! isEditorPanelRemoved( state, panelName ) &&\n\t\tget( panels, [ panelName, 'enabled' ], true )\n\t);\n}\n\n/**\n * Returns true if the given panel is open, or false otherwise. Panels are\n * closed by default.\n *\n * @param {Object} state Global application state.\n * @param {string} panelName A string that identifies the panel.\n *\n * @return {boolean} Whether or not the panel is open.\n */\nexport function isEditorPanelOpened( state, panelName ) {\n\tconst panels = getPreference( state, 'panels' );\n\treturn (\n\t\tget( panels, [ panelName ] ) === true ||\n\t\tget( panels, [ panelName, 'opened' ] ) === true\n\t);\n}\n\n/**\n * Returns true if a modal is active, or false otherwise.\n *\n * @param {Object} state Global application state.\n * @param {string} modalName A string that uniquely identifies the modal.\n *\n * @return {boolean} Whether the modal is active.\n */\nexport function isModalActive( state, modalName ) {\n\treturn state.activeModal === modalName;\n}\n\n/**\n * Returns whether the given feature is enabled or not.\n *\n * @param {Object} state Global application state.\n * @param {string} feature Feature slug.\n *\n * @return {boolean} Is active.\n */\nexport const isFeatureActive = createRegistrySelector(\n\t( select ) => ( state, feature ) => {\n\t\treturn select( interfaceStore ).isFeatureActive(\n\t\t\t'core/edit-post',\n\t\t\tfeature\n\t\t);\n\t}\n);\n\n/**\n * Returns true if the plugin item is pinned to the header.\n * When the value is not set it defaults to true.\n *\n * @param {Object} state Global application state.\n * @param {string} pluginName Plugin item name.\n *\n * @return {boolean} Whether the plugin item is pinned.\n */\nexport const isPluginItemPinned = createRegistrySelector(\n\t( select ) => ( state, pluginName ) => {\n\t\treturn select( interfaceStore ).isItemPinned(\n\t\t\t'core/edit-post',\n\t\t\tpluginName\n\t\t);\n\t}\n);\n\n/**\n * Returns an array of active meta box locations.\n *\n * @param {Object} state Post editor state.\n *\n * @return {string[]} Active meta box locations.\n */\nexport const getActiveMetaBoxLocations = createSelector(\n\t( state ) => {\n\t\treturn Object.keys( state.metaBoxes.locations ).filter( ( location ) =>\n\t\t\tisMetaBoxLocationActive( state, location )\n\t\t);\n\t},\n\t( state ) => [ state.metaBoxes.locations ]\n);\n\n/**\n * Returns true if a metabox location is active and visible\n *\n * @param {Object} state Post editor state.\n * @param {string} location Meta box location to test.\n *\n * @return {boolean} Whether the meta box location is active and visible.\n */\nexport function isMetaBoxLocationVisible( state, location ) {\n\treturn (\n\t\tisMetaBoxLocationActive( state, location ) &&\n\t\tsome( getMetaBoxesPerLocation( state, location ), ( { id } ) => {\n\t\t\treturn isEditorPanelEnabled( state, `meta-box-${ id }` );\n\t\t} )\n\t);\n}\n\n/**\n * Returns true if there is an active meta box in the given location, or false\n * otherwise.\n *\n * @param {Object} state Post editor state.\n * @param {string} location Meta box location to test.\n *\n * @return {boolean} Whether the meta box location is active.\n */\nexport function isMetaBoxLocationActive( state, location ) {\n\tconst metaBoxes = getMetaBoxesPerLocation( state, location );\n\treturn !! metaBoxes && metaBoxes.length !== 0;\n}\n\n/**\n * Returns the list of all the available meta boxes for a given location.\n *\n * @param {Object} state Global application state.\n * @param {string} location Meta box location to test.\n *\n * @return {?Array} List of meta boxes.\n */\nexport function getMetaBoxesPerLocation( state, location ) {\n\treturn state.metaBoxes.locations[ location ];\n}\n\n/**\n * Returns the list of all the available meta boxes.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} List of meta boxes.\n */\nexport const getAllMetaBoxes = createSelector(\n\t( state ) => {\n\t\treturn flatten( values( state.metaBoxes.locations ) );\n\t},\n\t( state ) => [ state.metaBoxes.locations ]\n);\n\n/**\n * Returns true if the post is using Meta Boxes\n *\n * @param {Object} state Global application state\n *\n * @return {boolean} Whether there are metaboxes or not.\n */\nexport function hasMetaBoxes( state ) {\n\treturn getActiveMetaBoxLocations( state ).length > 0;\n}\n\n/**\n * Returns true if the Meta Boxes are being saved.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the metaboxes are being saved.\n */\nexport function isSavingMetaBoxes( state ) {\n\treturn state.metaBoxes.isSaving;\n}\n\n/**\n * Returns the current editing canvas device type.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Device type.\n */\nexport function __experimentalGetPreviewDeviceType( state ) {\n\treturn state.deviceType;\n}\n\n/**\n * Returns true if the inserter is opened.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the inserter is opened.\n */\nexport function isInserterOpened( state ) {\n\treturn !! state.blockInserterPanel;\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 function __experimentalGetInsertionPoint( state ) {\n\tconst {\n\t\trootClientId,\n\t\tinsertionIndex,\n\t\tfilterValue,\n\t} = state.blockInserterPanel;\n\treturn { rootClientId, insertionIndex, filterValue };\n}\n\n/**\n * Returns true if the list view is opened.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the list view is opened.\n */\nexport function isListViewOpened( state ) {\n\treturn state.listViewPanel;\n}\n\n/**\n * Returns true if the template editing mode is enabled.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether we're editing the template.\n */\nexport function isEditingTemplate( state ) {\n\treturn state.isEditingTemplate;\n}\n\n/**\n * Returns true if meta boxes are initialized.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether meta boxes are initialized.\n */\nexport function areMetaBoxesInitialized( state ) {\n\treturn state.metaBoxes.initialized;\n}\n\n/**\n * Retrieves the template of the currently edited post.\n *\n * @return {Object?} Post Template.\n */\nexport const getEditedPostTemplate = createRegistrySelector(\n\t( select ) => () => {\n\t\tconst currentTemplate = select( editorStore ).getEditedPostAttribute(\n\t\t\t'template'\n\t\t);\n\t\tif ( currentTemplate ) {\n\t\t\tconst templateWithSameSlug = select( coreStore )\n\t\t\t\t.getEntityRecords( 'postType', 'wp_template' )\n\t\t\t\t?.find( ( template ) => template.slug === currentTemplate );\n\t\t\tif ( ! templateWithSameSlug ) {\n\t\t\t\treturn templateWithSameSlug;\n\t\t\t}\n\t\t\treturn select( coreStore ).getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t'wp_template',\n\t\t\t\ttemplateWithSameSlug.id\n\t\t\t);\n\t\t}\n\n\t\tconst post = select( editorStore ).getCurrentPost();\n\t\tif ( post.link ) {\n\t\t\treturn select( coreStore ).__experimentalGetTemplateForLink(\n\t\t\t\tpost.link\n\t\t\t);\n\t\t}\n\n\t\treturn null;\n\t}\n);\n"]}
@@ -998,16 +998,8 @@ body.is-fullscreen-mode .interface-interface-skeleton {
998
998
 
999
999
  .edit-post-layout__metaboxes {
1000
1000
  flex-shrink: 0;
1001
- }
1002
-
1003
- .edit-post-layout__metaboxes:not(:empty) {
1004
- border-top: 1px solid #ddd;
1005
- padding: 10px 0 10px;
1006
1001
  clear: both;
1007
1002
  }
1008
- .edit-post-layout__metaboxes:not(:empty) .edit-post-meta-boxes-area {
1009
- margin: auto 20px;
1010
- }
1011
1003
 
1012
1004
  .edit-post-layout .components-editor-notices__snackbar {
1013
1005
  position: fixed;
@@ -1234,6 +1226,10 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1234
1226
  .edit-post-meta-boxes-area input {
1235
1227
  box-sizing: border-box;
1236
1228
  }
1229
+ .edit-post-meta-boxes-area .postbox-header {
1230
+ border-top: 1px solid #ddd;
1231
+ border-bottom: 0;
1232
+ }
1237
1233
  .edit-post-meta-boxes-area #poststuff {
1238
1234
  margin: 0 auto;
1239
1235
  padding-top: 0;
@@ -1247,7 +1243,7 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1247
1243
  color: inherit;
1248
1244
  font-weight: 600;
1249
1245
  outline: none;
1250
- padding: 15px;
1246
+ padding: 0 24px;
1251
1247
  position: relative;
1252
1248
  width: 100%;
1253
1249
  }
@@ -1257,9 +1253,8 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1257
1253
  margin-bottom: 0;
1258
1254
  }
1259
1255
  .edit-post-meta-boxes-area .postbox > .inside {
1260
- border-bottom: 1px solid #ddd;
1261
1256
  color: inherit;
1262
- padding: 0 14px 14px;
1257
+ padding: 0 24px 24px;
1263
1258
  margin: 0;
1264
1259
  }
1265
1260
  .edit-post-meta-boxes-area .postbox .handlediv {
@@ -998,16 +998,8 @@ body.is-fullscreen-mode .interface-interface-skeleton {
998
998
 
999
999
  .edit-post-layout__metaboxes {
1000
1000
  flex-shrink: 0;
1001
- }
1002
-
1003
- .edit-post-layout__metaboxes:not(:empty) {
1004
- border-top: 1px solid #ddd;
1005
- padding: 10px 0 10px;
1006
1001
  clear: both;
1007
1002
  }
1008
- .edit-post-layout__metaboxes:not(:empty) .edit-post-meta-boxes-area {
1009
- margin: auto 20px;
1010
- }
1011
1003
 
1012
1004
  .edit-post-layout .components-editor-notices__snackbar {
1013
1005
  position: fixed;
@@ -1234,6 +1226,10 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1234
1226
  .edit-post-meta-boxes-area input {
1235
1227
  box-sizing: border-box;
1236
1228
  }
1229
+ .edit-post-meta-boxes-area .postbox-header {
1230
+ border-top: 1px solid #ddd;
1231
+ border-bottom: 0;
1232
+ }
1237
1233
  .edit-post-meta-boxes-area #poststuff {
1238
1234
  margin: 0 auto;
1239
1235
  padding-top: 0;
@@ -1247,7 +1243,7 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1247
1243
  color: inherit;
1248
1244
  font-weight: 600;
1249
1245
  outline: none;
1250
- padding: 15px;
1246
+ padding: 0 24px;
1251
1247
  position: relative;
1252
1248
  width: 100%;
1253
1249
  }
@@ -1257,9 +1253,8 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1257
1253
  margin-bottom: 0;
1258
1254
  }
1259
1255
  .edit-post-meta-boxes-area .postbox > .inside {
1260
- border-bottom: 1px solid #ddd;
1261
1256
  color: inherit;
1262
- padding: 0 14px 14px;
1257
+ padding: 0 24px 24px;
1263
1258
  margin: 0;
1264
1259
  }
1265
1260
  .edit-post-meta-boxes-area .postbox .handlediv {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/edit-post",
3
- "version": "5.0.4",
3
+ "version": "5.0.8",
4
4
  "description": "Edit Post module for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -26,31 +26,31 @@
26
26
  "module": "build-module/index.js",
27
27
  "react-native": "src/index",
28
28
  "dependencies": {
29
- "@babel/runtime": "^7.13.10",
30
- "@wordpress/a11y": "^3.2.3",
31
- "@wordpress/api-fetch": "^5.2.4",
32
- "@wordpress/block-editor": "^7.0.4",
33
- "@wordpress/block-library": "^6.0.2",
34
- "@wordpress/blocks": "^11.1.2",
35
- "@wordpress/components": "^19.0.0",
36
- "@wordpress/compose": "^5.0.4",
37
- "@wordpress/core-data": "^4.0.4",
38
- "@wordpress/data": "^6.1.2",
39
- "@wordpress/data-controls": "^2.2.5",
40
- "@wordpress/editor": "^12.0.1",
41
- "@wordpress/element": "^4.0.3",
42
- "@wordpress/hooks": "^3.2.1",
43
- "@wordpress/i18n": "^4.2.3",
44
- "@wordpress/icons": "^6.0.1",
45
- "@wordpress/interface": "^4.1.2",
46
- "@wordpress/keyboard-shortcuts": "^3.0.4",
47
- "@wordpress/keycodes": "^3.2.3",
48
- "@wordpress/media-utils": "^3.0.3",
49
- "@wordpress/notices": "^3.2.5",
50
- "@wordpress/plugins": "^4.0.4",
51
- "@wordpress/primitives": "^3.0.3",
52
- "@wordpress/url": "^3.2.3",
53
- "@wordpress/viewport": "^4.0.4",
29
+ "@babel/runtime": "^7.16.0",
30
+ "@wordpress/a11y": "^3.2.4",
31
+ "@wordpress/api-fetch": "^5.2.6",
32
+ "@wordpress/block-editor": "^8.0.2",
33
+ "@wordpress/block-library": "^6.0.6",
34
+ "@wordpress/blocks": "^11.1.4",
35
+ "@wordpress/components": "^19.0.2",
36
+ "@wordpress/compose": "^5.0.6",
37
+ "@wordpress/core-data": "^4.0.7",
38
+ "@wordpress/data": "^6.1.4",
39
+ "@wordpress/data-controls": "^2.2.7",
40
+ "@wordpress/editor": "^12.0.5",
41
+ "@wordpress/element": "^4.0.4",
42
+ "@wordpress/hooks": "^3.2.2",
43
+ "@wordpress/i18n": "^4.2.4",
44
+ "@wordpress/icons": "^6.1.1",
45
+ "@wordpress/interface": "^4.1.4",
46
+ "@wordpress/keyboard-shortcuts": "^3.0.6",
47
+ "@wordpress/keycodes": "^3.2.4",
48
+ "@wordpress/media-utils": "^3.0.5",
49
+ "@wordpress/notices": "^3.2.7",
50
+ "@wordpress/plugins": "^4.0.6",
51
+ "@wordpress/primitives": "^3.0.4",
52
+ "@wordpress/url": "^3.3.1",
53
+ "@wordpress/viewport": "^4.0.6",
54
54
  "@wordpress/warning": "^2.2.2",
55
55
  "classnames": "^2.3.1",
56
56
  "lodash": "^4.17.21",
@@ -61,5 +61,5 @@
61
61
  "publishConfig": {
62
62
  "access": "public"
63
63
  },
64
- "gitHead": "157f4ae53ab98e574af01f72213ae5a9613159ff"
64
+ "gitHead": "9a1dd3474d937468e4cf9caf9886ad61ef0a8f50"
65
65
  }
@@ -1,14 +1,6 @@
1
1
  .edit-post-layout__metaboxes {
2
2
  flex-shrink: 0;
3
- }
4
- .edit-post-layout__metaboxes:not(:empty) {
5
- border-top: $border-width solid $gray-300;
6
- padding: 10px 0 10px;
7
3
  clear: both;
8
-
9
- .edit-post-meta-boxes-area {
10
- margin: auto 20px;
11
- }
12
4
  }
13
5
 
14
6
  // Adjust the position of the notices
@@ -19,22 +19,15 @@ import { store as editPostStore } from '../../store';
19
19
 
20
20
  export default function MetaBoxes( { location } ) {
21
21
  const registry = useRegistry();
22
- const {
23
- metaBoxes,
24
- isVisible,
25
- areMetaBoxesInitialized,
26
- isEditorReady,
27
- } = useSelect(
22
+ const { metaBoxes, areMetaBoxesInitialized, isEditorReady } = useSelect(
28
23
  ( select ) => {
29
24
  const { __unstableIsEditorReady } = select( editorStore );
30
25
  const {
31
- isMetaBoxLocationVisible,
32
26
  getMetaBoxesPerLocation,
33
27
  areMetaBoxesInitialized: _areMetaBoxesInitialized,
34
28
  } = select( editPostStore );
35
29
  return {
36
30
  metaBoxes: getMetaBoxesPerLocation( location ),
37
- isVisible: isMetaBoxLocationVisible( location ),
38
31
  areMetaBoxesInitialized: _areMetaBoxesInitialized(),
39
32
  isEditorReady: __unstableIsEditorReady(),
40
33
  };
@@ -60,7 +53,7 @@ export default function MetaBoxes( { location } ) {
60
53
  { map( metaBoxes, ( { id } ) => (
61
54
  <MetaBoxVisibility key={ id } id={ id } />
62
55
  ) ) }
63
- { isVisible && <MetaBoxesArea location={ location } /> }
56
+ <MetaBoxesArea location={ location } />
64
57
  </>
65
58
  );
66
59
  }
@@ -19,6 +19,11 @@
19
19
  box-sizing: border-box;
20
20
  }
21
21
 
22
+ .postbox-header {
23
+ border-top: $border-width solid $gray-300;
24
+ border-bottom: 0;
25
+ }
26
+
22
27
  /* Match width and positioning of the meta boxes. Override default styles. */
23
28
  #poststuff {
24
29
  margin: 0 auto;
@@ -34,7 +39,7 @@
34
39
  color: inherit;
35
40
  font-weight: 600;
36
41
  outline: none;
37
- padding: 15px;
42
+ padding: 0 $grid-unit-30;
38
43
  position: relative;
39
44
  width: 100%;
40
45
  }
@@ -46,9 +51,8 @@
46
51
  }
47
52
 
48
53
  .postbox > .inside {
49
- border-bottom: $border-width solid $gray-300;
50
54
  color: inherit;
51
- padding: 0 $block-padding $block-padding;
55
+ padding: 0 $grid-unit-30 $grid-unit-30;
52
56
  margin: 0;
53
57
  }
54
58
 
@@ -47,13 +47,15 @@ export function TemplatePanel() {
47
47
  getCurrentPostType,
48
48
  } = select( editorStore );
49
49
  const { getPostType, getEntityRecords, canUser } = select( coreStore );
50
- const _isViewable =
51
- getPostType( getCurrentPostType() )?.viewable ?? false;
50
+ const currentPostType = getCurrentPostType();
51
+ const _isViewable = getPostType( currentPostType )?.viewable ?? false;
52
52
  const _supportsTemplateMode =
53
53
  select( editorStore ).getEditorSettings().supportsTemplateMode &&
54
54
  _isViewable;
55
55
 
56
- const wpTemplates = getEntityRecords( 'postType', 'wp_template' );
56
+ const wpTemplates = getEntityRecords( 'postType', 'wp_template', {
57
+ post_type: currentPostType,
58
+ } );
57
59
 
58
60
  const newAvailableTemplates = fromPairs(
59
61
  ( wpTemplates || [] ).map( ( { slug, title } ) => [
package/src/editor.js CHANGED
@@ -161,9 +161,22 @@ function Editor( {
161
161
  ] );
162
162
 
163
163
  const styles = useMemo( () => {
164
- return hasThemeStyles && settings.styles?.length
164
+ const themeStyles = [];
165
+ const presetStyles = [];
166
+ settings.styles.forEach( ( style ) => {
167
+ if ( ! style.__unstableType || style.__unstableType === 'theme' ) {
168
+ themeStyles.push( style );
169
+ } else {
170
+ presetStyles.push( style );
171
+ }
172
+ } );
173
+ const defaultEditorStyles = [
174
+ ...settings.defaultEditorStyles,
175
+ ...presetStyles,
176
+ ];
177
+ return hasThemeStyles && themeStyles.length
165
178
  ? settings.styles
166
- : settings.defaultEditorStyles;
179
+ : defaultEditorStyles;
167
180
  }, [ settings, hasThemeStyles ] );
168
181
 
169
182
  if ( ! post ) {
package/src/index.js CHANGED
@@ -91,6 +91,7 @@ export function initializeEditor(
91
91
  dispatch( interfaceStore ).setFeatureDefaults( 'core/edit-post', {
92
92
  fixedToolbar: false,
93
93
  welcomeGuide: true,
94
+ mobileGalleryWarning: true,
94
95
  fullscreenMode: true,
95
96
  showIconLabels: false,
96
97
  themeStyles: true,