@wordpress/edit-post 6.0.2 → 6.1.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 (146) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/components/block-manager/category.js +2 -2
  3. package/build/components/block-manager/category.js.map +1 -1
  4. package/build/components/block-manager/index.js +2 -2
  5. package/build/components/block-manager/index.js.map +1 -1
  6. package/build/components/header/header-toolbar/index.js +1 -1
  7. package/build/components/header/header-toolbar/index.js.map +1 -1
  8. package/build/components/header/header-toolbar/index.native.js +1 -1
  9. package/build/components/header/header-toolbar/index.native.js.map +1 -1
  10. package/build/components/header/more-menu/index.js +0 -6
  11. package/build/components/header/more-menu/index.js.map +1 -1
  12. package/build/components/header/writing-menu/index.js +7 -7
  13. package/build/components/header/writing-menu/index.js.map +1 -1
  14. package/build/components/keyboard-shortcut-help-modal/config.js +5 -0
  15. package/build/components/keyboard-shortcut-help-modal/config.js.map +1 -1
  16. package/build/components/layout/index.js.map +1 -1
  17. package/build/components/layout/index.native.js +1 -1
  18. package/build/components/layout/index.native.js.map +1 -1
  19. package/build/components/preferences-modal/index.js +14 -99
  20. package/build/components/preferences-modal/index.js.map +1 -1
  21. package/build/components/preferences-modal/meta-boxes-section.js +2 -4
  22. package/build/components/preferences-modal/meta-boxes-section.js.map +1 -1
  23. package/build/components/preferences-modal/options/enable-custom-fields.js +2 -8
  24. package/build/components/preferences-modal/options/enable-custom-fields.js.map +1 -1
  25. package/build/components/preferences-modal/options/enable-feature.js +2 -4
  26. package/build/components/preferences-modal/options/enable-feature.js.map +1 -1
  27. package/build/components/preferences-modal/options/enable-panel.js +2 -4
  28. package/build/components/preferences-modal/options/enable-panel.js.map +1 -1
  29. package/build/components/preferences-modal/options/enable-publish-sidebar.js +2 -8
  30. package/build/components/preferences-modal/options/enable-publish-sidebar.js.map +1 -1
  31. package/build/components/sidebar/post-link/index.js +1 -1
  32. package/build/components/sidebar/post-link/index.js.map +1 -1
  33. package/build/editor.js +4 -3
  34. package/build/editor.js.map +1 -1
  35. package/build/editor.native.js +8 -8
  36. package/build/editor.native.js.map +1 -1
  37. package/build/hooks/validate-multiple-use/index.js +1 -1
  38. package/build/hooks/validate-multiple-use/index.js.map +1 -1
  39. package/build/index.js +5 -4
  40. package/build/index.js.map +1 -1
  41. package/build/plugins/welcome-guide-menu-item/index.js +3 -3
  42. package/build/plugins/welcome-guide-menu-item/index.js.map +1 -1
  43. package/build/store/actions.js +62 -50
  44. package/build/store/actions.js.map +1 -1
  45. package/build/store/reducer.js +0 -12
  46. package/build/store/reducer.js.map +1 -1
  47. package/build/store/selectors.js +44 -10
  48. package/build/store/selectors.js.map +1 -1
  49. package/build-module/components/block-manager/category.js +2 -2
  50. package/build-module/components/block-manager/category.js.map +1 -1
  51. package/build-module/components/block-manager/index.js +2 -2
  52. package/build-module/components/block-manager/index.js.map +1 -1
  53. package/build-module/components/header/header-toolbar/index.js +1 -1
  54. package/build-module/components/header/header-toolbar/index.js.map +1 -1
  55. package/build-module/components/header/header-toolbar/index.native.js +1 -1
  56. package/build-module/components/header/header-toolbar/index.native.js.map +1 -1
  57. package/build-module/components/header/more-menu/index.js +0 -5
  58. package/build-module/components/header/more-menu/index.js.map +1 -1
  59. package/build-module/components/header/writing-menu/index.js +7 -7
  60. package/build-module/components/header/writing-menu/index.js.map +1 -1
  61. package/build-module/components/keyboard-shortcut-help-modal/config.js +5 -0
  62. package/build-module/components/keyboard-shortcut-help-modal/config.js.map +1 -1
  63. package/build-module/components/layout/index.js +2 -2
  64. package/build-module/components/layout/index.js.map +1 -1
  65. package/build-module/components/layout/index.native.js +1 -1
  66. package/build-module/components/layout/index.native.js.map +1 -1
  67. package/build-module/components/preferences-modal/index.js +15 -98
  68. package/build-module/components/preferences-modal/index.js.map +1 -1
  69. package/build-module/components/preferences-modal/meta-boxes-section.js +2 -2
  70. package/build-module/components/preferences-modal/meta-boxes-section.js.map +1 -1
  71. package/build-module/components/preferences-modal/options/enable-custom-fields.js +1 -5
  72. package/build-module/components/preferences-modal/options/enable-custom-fields.js.map +1 -1
  73. package/build-module/components/preferences-modal/options/enable-feature.js +1 -1
  74. package/build-module/components/preferences-modal/options/enable-feature.js.map +1 -1
  75. package/build-module/components/preferences-modal/options/enable-panel.js +1 -1
  76. package/build-module/components/preferences-modal/options/enable-panel.js.map +1 -1
  77. package/build-module/components/preferences-modal/options/enable-publish-sidebar.js +1 -5
  78. package/build-module/components/preferences-modal/options/enable-publish-sidebar.js.map +1 -1
  79. package/build-module/components/sidebar/post-link/index.js +2 -2
  80. package/build-module/components/sidebar/post-link/index.js.map +1 -1
  81. package/build-module/editor.js +5 -4
  82. package/build-module/editor.js.map +1 -1
  83. package/build-module/editor.native.js +8 -8
  84. package/build-module/editor.native.js.map +1 -1
  85. package/build-module/hooks/validate-multiple-use/index.js +1 -1
  86. package/build-module/hooks/validate-multiple-use/index.js.map +1 -1
  87. package/build-module/index.js +5 -4
  88. package/build-module/index.js.map +1 -1
  89. package/build-module/plugins/welcome-guide-menu-item/index.js +3 -3
  90. package/build-module/plugins/welcome-guide-menu-item/index.js.map +1 -1
  91. package/build-module/store/actions.js +52 -43
  92. package/build-module/store/actions.js.map +1 -1
  93. package/build-module/store/reducer.js +1 -13
  94. package/build-module/store/reducer.js.map +1 -1
  95. package/build-module/store/selectors.js +36 -6
  96. package/build-module/store/selectors.js.map +1 -1
  97. package/build-style/style-rtl.css +91 -130
  98. package/build-style/style.css +91 -130
  99. package/package.json +30 -25
  100. package/src/components/block-manager/category.js +2 -2
  101. package/src/components/block-manager/index.js +2 -2
  102. package/src/components/header/fullscreen-mode-close/test/index.js +1 -1
  103. package/src/components/header/header-toolbar/index.js +1 -1
  104. package/src/components/header/header-toolbar/index.native.js +1 -1
  105. package/src/components/header/more-menu/index.js +0 -6
  106. package/src/components/header/style.scss +1 -1
  107. package/src/components/header/writing-menu/index.js +7 -7
  108. package/src/components/keyboard-shortcut-help-modal/config.js +4 -0
  109. package/src/components/keyboard-shortcut-help-modal/test/__snapshots__/index.js.snap +6 -0
  110. package/src/components/layout/index.js +2 -2
  111. package/src/components/layout/index.native.js +1 -1
  112. package/src/components/preferences-modal/index.js +24 -150
  113. package/src/components/preferences-modal/meta-boxes-section.js +3 -3
  114. package/src/components/preferences-modal/options/enable-custom-fields.js +1 -5
  115. package/src/components/preferences-modal/options/enable-feature.js +1 -1
  116. package/src/components/preferences-modal/options/enable-panel.js +1 -1
  117. package/src/components/preferences-modal/options/enable-publish-sidebar.js +1 -5
  118. package/src/components/preferences-modal/options/test/__snapshots__/enable-custom-fields.js.snap +4 -4
  119. package/src/components/preferences-modal/options/test/enable-custom-fields.js +1 -1
  120. package/src/components/preferences-modal/test/__snapshots__/index.js.snap +235 -357
  121. package/src/components/preferences-modal/test/index.js +6 -6
  122. package/src/components/sidebar/post-link/index.js +2 -2
  123. package/src/editor.js +4 -3
  124. package/src/editor.native.js +7 -7
  125. package/src/hooks/validate-multiple-use/index.js +1 -1
  126. package/src/index.js +5 -4
  127. package/src/plugins/welcome-guide-menu-item/index.js +3 -3
  128. package/src/store/actions.js +49 -33
  129. package/src/store/reducer.js +1 -12
  130. package/src/store/selectors.js +56 -8
  131. package/src/store/test/actions.js +167 -4
  132. package/src/store/test/reducer.js +0 -28
  133. package/src/style.scss +0 -2
  134. package/src/test/editor.native.js +2 -2
  135. package/build/components/preferences-modal/options/base.js +0 -35
  136. package/build/components/preferences-modal/options/base.js.map +0 -1
  137. package/build/components/preferences-modal/section.js +0 -27
  138. package/build/components/preferences-modal/section.js.map +0 -1
  139. package/build-module/components/preferences-modal/options/base.js +0 -27
  140. package/build-module/components/preferences-modal/options/base.js.map +0 -1
  141. package/build-module/components/preferences-modal/section.js +0 -19
  142. package/build-module/components/preferences-modal/section.js.map +0 -1
  143. package/src/components/header/more-menu/style.scss +0 -35
  144. package/src/components/preferences-modal/options/base.js +0 -20
  145. package/src/components/preferences-modal/section.js +0 -15
  146. package/src/components/preferences-modal/style.scss +0 -112
@@ -9,8 +9,10 @@ import { get, includes, some, flatten, values } from 'lodash';
9
9
 
10
10
  import { createRegistrySelector } from '@wordpress/data';
11
11
  import { store as interfaceStore } from '@wordpress/interface';
12
+ import { store as preferencesStore } from '@wordpress/preferences';
12
13
  import { store as coreStore } from '@wordpress/core-data';
13
14
  import { store as editorStore } from '@wordpress/editor';
15
+ const EMPTY_ARRAY = [];
14
16
  /**
15
17
  * Returns the current editing mode.
16
18
  *
@@ -63,7 +65,10 @@ export const isPluginSidebarOpened = createRegistrySelector(select => () => {
63
65
 
64
66
  export const getActiveGeneralSidebarName = createRegistrySelector(select => () => {
65
67
  return select(interfaceStore).getActiveComplementaryArea('core/edit-post');
66
- });
68
+ }); // The current list of preference keys that have been migrated to the
69
+ // preferences package.
70
+
71
+ const MIGRATED_KEYS = ['hiddenBlockTypes'];
67
72
  /**
68
73
  * Returns the preferences (these preferences are persisted locally).
69
74
  *
@@ -72,9 +77,21 @@ export const getActiveGeneralSidebarName = createRegistrySelector(select => () =
72
77
  * @return {Object} Preferences Object.
73
78
  */
74
79
 
75
- export function getPreferences(state) {
76
- return state.preferences;
77
- }
80
+ export const getPreferences = createRegistrySelector(select => state => {
81
+ const editPostPreferences = state.preferences; // Some preferences now exist in the preferences store.
82
+ // Fetch them so that they can be merged into the post
83
+ // editor preferences.
84
+
85
+ const preferenceStorePreferences = MIGRATED_KEYS.reduce((accumulatedPrefs, preferenceKey) => {
86
+ const value = select(preferencesStore).get('core/edit-post', preferenceKey);
87
+ return { ...accumulatedPrefs,
88
+ [preferenceKey]: value
89
+ };
90
+ }, {});
91
+ return { ...editPostPreferences,
92
+ ...preferenceStorePreferences
93
+ };
94
+ });
78
95
  /**
79
96
  *
80
97
  * @param {Object} state Global application state.
@@ -85,10 +102,23 @@ export function getPreferences(state) {
85
102
  */
86
103
 
87
104
  export function getPreference(state, preferenceKey, defaultValue) {
88
- const preferences = getPreferences(state);
105
+ // Avoid using the `getPreferences` registry selector where possible.
106
+ const isMigratedKey = MIGRATED_KEYS.includes(preferenceKey);
107
+ const preferences = isMigratedKey ? getPreferences(state) : state.preferences;
89
108
  const value = preferences[preferenceKey];
90
109
  return value === undefined ? defaultValue : value;
91
110
  }
111
+ /**
112
+ * Returns an array of blocks that are hidden.
113
+ *
114
+ * @return {Array} A list of the hidden block types
115
+ */
116
+
117
+ export const getHiddenBlockTypes = createRegistrySelector(select => () => {
118
+ var _select$get;
119
+
120
+ return (_select$get = select(preferencesStore).get('core/edit-post', 'hiddenBlockTypes')) !== null && _select$get !== void 0 ? _select$get : EMPTY_ARRAY;
121
+ });
92
122
  /**
93
123
  * Returns true if the publish sidebar is opened.
94
124
  *
@@ -163,7 +193,7 @@ export function isModalActive(state, modalName) {
163
193
  */
164
194
 
165
195
  export const isFeatureActive = createRegistrySelector(select => (state, feature) => {
166
- return select(interfaceStore).isFeatureActive('core/edit-post', feature);
196
+ return !!select(preferencesStore).get('core/edit-post', feature);
167
197
  });
168
198
  /**
169
199
  * Returns true if the plugin item is pinned to the header.
@@ -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","per_page","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,EA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ED;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMC,qBAAqB,GAAGjE,sBAAsB,CACxDS,MAAF,IAAc,MAAM;AACnB,QAAMyD,eAAe,GAAGzD,MAAM,CAAEL,WAAF,CAAN,CAAsB+D,sBAAtB,CACvB,UADuB,CAAxB;;AAGA,MAAKD,eAAL,EAAuB;AAAA;;AACtB,UAAME,oBAAoB,4BAAG3D,MAAM,CAAEN,SAAF,CAAN,CAC3BkE,gBAD2B,CACT,UADS,EACG,aADH,EACkB;AAAEC,MAAAA,QAAQ,EAAE,CAAC;AAAb,KADlB,CAAH,0DAAG,sBAE1BC,IAF0B,CAElBC,QAAF,IAAgBA,QAAQ,CAACC,IAAT,KAAkBP,eAFd,CAA7B;;AAGA,QAAK,CAAEE,oBAAP,EAA8B;AAC7B,aAAOA,oBAAP;AACA;;AACD,WAAO3D,MAAM,CAAEN,SAAF,CAAN,CAAoBuE,qBAApB,CACN,UADM,EAEN,aAFM,EAGNN,oBAAoB,CAACtB,EAHf,CAAP;AAKA;;AAED,QAAM6B,IAAI,GAAGlE,MAAM,CAAEL,WAAF,CAAN,CAAsBwE,cAAtB,EAAb;;AACA,MAAKD,IAAI,CAACE,IAAV,EAAiB;AAChB,WAAOpE,MAAM,CAAEN,SAAF,CAAN,CAAoB2E,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', { per_page: -1 } )\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","preferencesStore","coreStore","editorStore","EMPTY_ARRAY","getEditorMode","state","getPreference","isEditorSidebarOpened","select","activeGeneralSidebar","getActiveComplementaryArea","isPluginSidebarOpened","getActiveGeneralSidebarName","MIGRATED_KEYS","getPreferences","editPostPreferences","preferences","preferenceStorePreferences","reduce","accumulatedPrefs","preferenceKey","value","defaultValue","isMigratedKey","undefined","getHiddenBlockTypes","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","per_page","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,gBAAlB,QAA0C,wBAA1C;AACA,SAASF,KAAK,IAAIG,SAAlB,QAAmC,sBAAnC;AACA,SAASH,KAAK,IAAII,WAAlB,QAAqC,mBAArC;AAEA,MAAMC,WAAW,GAAG,EAApB;AAEA;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,GAAGV,sBAAsB,CACxDW,MAAF,IAAc,MAAM;AACnB,QAAMC,oBAAoB,GAAGD,MAAM,CAClCT,cADkC,CAAN,CAE3BW,0BAF2B,CAEC,gBAFD,CAA7B;AAGA,SAAOjB,QAAQ,CACd,CAAE,oBAAF,EAAwB,iBAAxB,CADc,EAEdgB,oB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sBAAsB,CACxDW,MAAF,IAAc,MAAM;AACnB,QAAMgE,eAAe,GAAGhE,MAAM,CAAEN,WAAF,CAAN,CAAsBuE,sBAAtB,CACvB,UADuB,CAAxB;;AAGA,MAAKD,eAAL,EAAuB;AAAA;;AACtB,UAAME,oBAAoB,4BAAGlE,MAAM,CAAEP,SAAF,CAAN,CAC3B0E,gBAD2B,CACT,UADS,EACG,aADH,EACkB;AAAEC,MAAAA,QAAQ,EAAE,CAAC;AAAb,KADlB,CAAH,0DAAG,sBAE1BC,IAF0B,CAElBC,QAAF,IAAgBA,QAAQ,CAACC,IAAT,KAAkBP,eAFd,CAA7B;;AAGA,QAAK,CAAEE,oBAAP,EAA8B;AAC7B,aAAOA,oBAAP;AACA;;AACD,WAAOlE,MAAM,CAAEP,SAAF,CAAN,CAAoB+E,qBAApB,CACN,UADM,EAEN,aAFM,EAGNN,oBAAoB,CAACtB,EAHf,CAAP;AAKA;;AAED,QAAM6B,IAAI,GAAGzE,MAAM,CAAEN,WAAF,CAAN,CAAsBgF,cAAtB,EAAb;;AACA,MAAKD,IAAI,CAACE,IAAV,EAAiB;AAChB,WAAO3E,MAAM,CAAEP,SAAF,CAAN,CAAoBmF,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 preferencesStore } from '@wordpress/preferences';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as editorStore } from '@wordpress/editor';\n\nconst EMPTY_ARRAY = [];\n\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// The current list of preference keys that have been migrated to the\n// preferences package.\nconst MIGRATED_KEYS = [ 'hiddenBlockTypes' ];\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 const getPreferences = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst editPostPreferences = state.preferences;\n\n\t\t// Some preferences now exist in the preferences store.\n\t\t// Fetch them so that they can be merged into the post\n\t\t// editor preferences.\n\t\tconst preferenceStorePreferences = MIGRATED_KEYS.reduce(\n\t\t\t( accumulatedPrefs, preferenceKey ) => {\n\t\t\t\tconst value = select( preferencesStore ).get(\n\t\t\t\t\t'core/edit-post',\n\t\t\t\t\tpreferenceKey\n\t\t\t\t);\n\n\t\t\t\treturn {\n\t\t\t\t\t...accumulatedPrefs,\n\t\t\t\t\t[ preferenceKey ]: value,\n\t\t\t\t};\n\t\t\t},\n\t\t\t{}\n\t\t);\n\n\t\treturn {\n\t\t\t...editPostPreferences,\n\t\t\t...preferenceStorePreferences,\n\t\t};\n\t}\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\t// Avoid using the `getPreferences` registry selector where possible.\n\tconst isMigratedKey = MIGRATED_KEYS.includes( preferenceKey );\n\tconst preferences = isMigratedKey\n\t\t? getPreferences( state )\n\t\t: state.preferences;\n\tconst value = preferences[ preferenceKey ];\n\treturn value === undefined ? defaultValue : value;\n}\n\n/**\n * Returns an array of blocks that are hidden.\n *\n * @return {Array} A list of the hidden block types\n */\nexport const getHiddenBlockTypes = createRegistrySelector( ( select ) => () => {\n\treturn (\n\t\tselect( preferencesStore ).get(\n\t\t\t'core/edit-post',\n\t\t\t'hiddenBlockTypes'\n\t\t) ?? EMPTY_ARRAY\n\t);\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( preferencesStore ).get( 'core/edit-post', feature );\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', { per_page: -1 } )\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"]}
@@ -304,7 +304,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
304
304
  display: flex;
305
305
  flex-direction: column;
306
306
  overflow: auto;
307
- z-index: 20;
307
+ z-index: 91;
308
308
  }
309
309
 
310
310
  .interface-interface-skeleton__secondary-sidebar,
@@ -447,6 +447,95 @@ body.is-fullscreen-mode .interface-interface-skeleton {
447
447
  max-height: 24px;
448
448
  }
449
449
 
450
+ @media (min-width: 600px) {
451
+ .interface-preferences-modal {
452
+ width: calc(100% - 32px);
453
+ height: calc(100% - 120px);
454
+ }
455
+ }
456
+ @media (min-width: 782px) {
457
+ .interface-preferences-modal {
458
+ width: 750px;
459
+ }
460
+ }
461
+ @media (min-width: 960px) {
462
+ .interface-preferences-modal {
463
+ height: 70%;
464
+ }
465
+ }
466
+ @media (max-width: 781px) {
467
+ .interface-preferences-modal .components-modal__content {
468
+ padding: 0;
469
+ }
470
+ .interface-preferences-modal .components-modal__content::before {
471
+ content: none;
472
+ }
473
+ }
474
+
475
+ .interface-preferences__tabs .components-tab-panel__tabs {
476
+ position: absolute;
477
+ top: 84px;
478
+ right: 16px;
479
+ width: 160px;
480
+ }
481
+ .interface-preferences__tabs .components-tab-panel__tabs .components-tab-panel__tabs-item {
482
+ border-radius: 2px;
483
+ font-weight: 400;
484
+ }
485
+ .interface-preferences__tabs .components-tab-panel__tabs .components-tab-panel__tabs-item.is-active {
486
+ background: #f0f0f0;
487
+ box-shadow: none;
488
+ font-weight: 500;
489
+ }
490
+ .interface-preferences__tabs .components-tab-panel__tabs .components-tab-panel__tabs-item:focus:not(:disabled) {
491
+ box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
492
+ }
493
+ .interface-preferences__tabs .components-tab-panel__tab-content {
494
+ padding-right: 24px;
495
+ margin-right: 160px;
496
+ }
497
+
498
+ @media (max-width: 781px) {
499
+ .interface-preferences__provider {
500
+ height: 100%;
501
+ }
502
+ }
503
+ .interface-preferences-modal__section {
504
+ margin: 0 0 2.5rem 0;
505
+ }
506
+ .interface-preferences-modal__section:last-child {
507
+ margin: 0;
508
+ }
509
+
510
+ .interface-preferences-modal__section-title {
511
+ font-size: 0.9rem;
512
+ font-weight: 600;
513
+ margin-top: 0;
514
+ }
515
+
516
+ .interface-preferences-modal__section-description {
517
+ margin: -8px 0 8px 0;
518
+ font-size: 12px;
519
+ font-style: normal;
520
+ color: #757575;
521
+ }
522
+
523
+ .interface-preferences-modal__option .components-base-control .components-base-control__field {
524
+ align-items: center;
525
+ display: flex;
526
+ margin-bottom: 0;
527
+ }
528
+ .interface-preferences-modal__option .components-base-control .components-base-control__field > label {
529
+ flex-grow: 1;
530
+ padding: 0.6rem 10px 0.6rem 0;
531
+ }
532
+ .interface-preferences-modal__option .components-base-control__help {
533
+ margin: -8px 58px 8px 0;
534
+ font-size: 12px;
535
+ font-style: normal;
536
+ color: #757575;
537
+ }
538
+
450
539
  .edit-post-header {
451
540
  height: 60px;
452
541
  background: #fff;
@@ -510,7 +599,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
510
599
  .edit-post-header__settings .components-button.is-tertiary {
511
600
  padding: 0 6px;
512
601
  }
513
- .edit-post-header__settings .edit-post-more-menu .components-button,
602
+ .edit-post-header__settings .interface-more-menu-dropdown .components-button,
514
603
  .edit-post-header__settings .interface-pinned-items .components-button {
515
604
  margin-left: 0;
516
605
  }
@@ -858,39 +947,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
858
947
  margin-right: 8px;
859
948
  }
860
949
 
861
- .edit-post-more-menu {
862
- margin-right: -4px;
863
- }
864
- .edit-post-more-menu .components-button {
865
- width: auto;
866
- padding: 0 2px;
867
- }
868
- @media (min-width: 600px) {
869
- .edit-post-more-menu {
870
- margin-right: 0;
871
- }
872
- .edit-post-more-menu .components-button {
873
- padding: 0 4px;
874
- }
875
- }
876
-
877
- .edit-post-more-menu__content .components-popover__content {
878
- min-width: 280px;
879
- }
880
- @media (min-width: 480px) {
881
- .edit-post-more-menu__content .components-popover__content {
882
- width: auto;
883
- max-width: 480px;
884
- }
885
- }
886
- .edit-post-more-menu__content .components-popover__content .components-dropdown-menu__menu {
887
- padding: 0;
888
- }
889
-
890
- .components-popover.edit-post-more-menu__content {
891
- z-index: 99998;
892
- }
893
-
894
950
  .edit-post-template-top-area {
895
951
  display: flex;
896
952
  flex-direction: column;
@@ -1308,101 +1364,6 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1308
1364
  clear: both;
1309
1365
  }
1310
1366
 
1311
- @media (min-width: 600px) {
1312
- .edit-post-preferences-modal {
1313
- width: calc(100% - 32px);
1314
- height: calc(100% - 120px);
1315
- }
1316
- }
1317
- @media (min-width: 782px) {
1318
- .edit-post-preferences-modal {
1319
- width: 750px;
1320
- }
1321
- }
1322
- @media (min-width: 960px) {
1323
- .edit-post-preferences-modal {
1324
- height: 70%;
1325
- }
1326
- }
1327
- @media (max-width: 781px) {
1328
- .edit-post-preferences-modal .components-modal__content {
1329
- padding: 0;
1330
- }
1331
- .edit-post-preferences-modal .components-modal__content::before {
1332
- content: none;
1333
- }
1334
- .edit-post-preferences-modal .components-navigator-provider {
1335
- height: 100%;
1336
- }
1337
- }
1338
- .edit-post-preferences-modal .edit-post-preferences__tabs .components-tab-panel__tabs {
1339
- position: absolute;
1340
- top: 84px;
1341
- right: 16px;
1342
- width: 160px;
1343
- }
1344
- .edit-post-preferences-modal .edit-post-preferences__tabs .components-tab-panel__tabs .components-tab-panel__tabs-item {
1345
- border-radius: 2px;
1346
- font-weight: 400;
1347
- }
1348
- .edit-post-preferences-modal .edit-post-preferences__tabs .components-tab-panel__tabs .components-tab-panel__tabs-item.is-active {
1349
- background: #f0f0f0;
1350
- box-shadow: none;
1351
- font-weight: 500;
1352
- }
1353
- .edit-post-preferences-modal .edit-post-preferences__tabs .components-tab-panel__tabs .components-tab-panel__tabs-item:focus:not(:disabled) {
1354
- box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
1355
- }
1356
- .edit-post-preferences-modal .edit-post-preferences__tabs .components-tab-panel__tab-content {
1357
- padding-right: 24px;
1358
- margin-right: 160px;
1359
- }
1360
- .edit-post-preferences-modal__section {
1361
- margin: 0 0 2.5rem 0;
1362
- }
1363
- .edit-post-preferences-modal__section:last-child {
1364
- margin: 0;
1365
- }
1366
- .edit-post-preferences-modal__section-title {
1367
- font-size: 0.9rem;
1368
- font-weight: 600;
1369
- margin-top: 0;
1370
- }
1371
- .edit-post-preferences-modal__option .components-base-control .components-base-control__field {
1372
- align-items: center;
1373
- display: flex;
1374
- margin-bottom: 0;
1375
- }
1376
- .edit-post-preferences-modal__option .components-base-control .components-base-control__field > label {
1377
- flex-grow: 1;
1378
- padding: 0.6rem 10px 0.6rem 0;
1379
- }
1380
- .edit-post-preferences-modal__custom-fields-confirmation-message, .edit-post-preferences-modal__custom-fields-confirmation-button {
1381
- margin: 0 48px 0.6rem 0;
1382
- }
1383
- @media (min-width: 782px) {
1384
- .edit-post-preferences-modal__custom-fields-confirmation-message, .edit-post-preferences-modal__custom-fields-confirmation-button {
1385
- margin-right: 38px;
1386
- }
1387
- }
1388
- @media (min-width: 600px) {
1389
- .edit-post-preferences-modal__custom-fields-confirmation-message, .edit-post-preferences-modal__custom-fields-confirmation-button {
1390
- max-width: 300px;
1391
- }
1392
- }
1393
- .edit-post-preferences-modal .components-base-control__help {
1394
- margin: -8px 58px 8px 0;
1395
- font-size: 12px;
1396
- font-style: normal;
1397
- color: #757575;
1398
- }
1399
- .edit-post-preferences-modal .edit-post-preferences-modal__section-description {
1400
- margin: -8px 0 8px 0;
1401
- font-size: 12px;
1402
- font-style: normal;
1403
- color: #757575;
1404
- }
1405
-
1406
1367
  .edit-post-editor__inserter-panel,
1407
1368
  .edit-post-editor__list-view-panel {
1408
1369
  height: 100%;
@@ -304,7 +304,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
304
304
  display: flex;
305
305
  flex-direction: column;
306
306
  overflow: auto;
307
- z-index: 20;
307
+ z-index: 91;
308
308
  }
309
309
 
310
310
  .interface-interface-skeleton__secondary-sidebar,
@@ -447,6 +447,95 @@ body.is-fullscreen-mode .interface-interface-skeleton {
447
447
  max-height: 24px;
448
448
  }
449
449
 
450
+ @media (min-width: 600px) {
451
+ .interface-preferences-modal {
452
+ width: calc(100% - 32px);
453
+ height: calc(100% - 120px);
454
+ }
455
+ }
456
+ @media (min-width: 782px) {
457
+ .interface-preferences-modal {
458
+ width: 750px;
459
+ }
460
+ }
461
+ @media (min-width: 960px) {
462
+ .interface-preferences-modal {
463
+ height: 70%;
464
+ }
465
+ }
466
+ @media (max-width: 781px) {
467
+ .interface-preferences-modal .components-modal__content {
468
+ padding: 0;
469
+ }
470
+ .interface-preferences-modal .components-modal__content::before {
471
+ content: none;
472
+ }
473
+ }
474
+
475
+ .interface-preferences__tabs .components-tab-panel__tabs {
476
+ position: absolute;
477
+ top: 84px;
478
+ left: 16px;
479
+ width: 160px;
480
+ }
481
+ .interface-preferences__tabs .components-tab-panel__tabs .components-tab-panel__tabs-item {
482
+ border-radius: 2px;
483
+ font-weight: 400;
484
+ }
485
+ .interface-preferences__tabs .components-tab-panel__tabs .components-tab-panel__tabs-item.is-active {
486
+ background: #f0f0f0;
487
+ box-shadow: none;
488
+ font-weight: 500;
489
+ }
490
+ .interface-preferences__tabs .components-tab-panel__tabs .components-tab-panel__tabs-item:focus:not(:disabled) {
491
+ box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
492
+ }
493
+ .interface-preferences__tabs .components-tab-panel__tab-content {
494
+ padding-left: 24px;
495
+ margin-left: 160px;
496
+ }
497
+
498
+ @media (max-width: 781px) {
499
+ .interface-preferences__provider {
500
+ height: 100%;
501
+ }
502
+ }
503
+ .interface-preferences-modal__section {
504
+ margin: 0 0 2.5rem 0;
505
+ }
506
+ .interface-preferences-modal__section:last-child {
507
+ margin: 0;
508
+ }
509
+
510
+ .interface-preferences-modal__section-title {
511
+ font-size: 0.9rem;
512
+ font-weight: 600;
513
+ margin-top: 0;
514
+ }
515
+
516
+ .interface-preferences-modal__section-description {
517
+ margin: -8px 0 8px 0;
518
+ font-size: 12px;
519
+ font-style: normal;
520
+ color: #757575;
521
+ }
522
+
523
+ .interface-preferences-modal__option .components-base-control .components-base-control__field {
524
+ align-items: center;
525
+ display: flex;
526
+ margin-bottom: 0;
527
+ }
528
+ .interface-preferences-modal__option .components-base-control .components-base-control__field > label {
529
+ flex-grow: 1;
530
+ padding: 0.6rem 0 0.6rem 10px;
531
+ }
532
+ .interface-preferences-modal__option .components-base-control__help {
533
+ margin: -8px 0 8px 58px;
534
+ font-size: 12px;
535
+ font-style: normal;
536
+ color: #757575;
537
+ }
538
+
450
539
  .edit-post-header {
451
540
  height: 60px;
452
541
  background: #fff;
@@ -510,7 +599,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
510
599
  .edit-post-header__settings .components-button.is-tertiary {
511
600
  padding: 0 6px;
512
601
  }
513
- .edit-post-header__settings .edit-post-more-menu .components-button,
602
+ .edit-post-header__settings .interface-more-menu-dropdown .components-button,
514
603
  .edit-post-header__settings .interface-pinned-items .components-button {
515
604
  margin-right: 0;
516
605
  }
@@ -858,39 +947,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
858
947
  margin-left: 8px;
859
948
  }
860
949
 
861
- .edit-post-more-menu {
862
- margin-left: -4px;
863
- }
864
- .edit-post-more-menu .components-button {
865
- width: auto;
866
- padding: 0 2px;
867
- }
868
- @media (min-width: 600px) {
869
- .edit-post-more-menu {
870
- margin-left: 0;
871
- }
872
- .edit-post-more-menu .components-button {
873
- padding: 0 4px;
874
- }
875
- }
876
-
877
- .edit-post-more-menu__content .components-popover__content {
878
- min-width: 280px;
879
- }
880
- @media (min-width: 480px) {
881
- .edit-post-more-menu__content .components-popover__content {
882
- width: auto;
883
- max-width: 480px;
884
- }
885
- }
886
- .edit-post-more-menu__content .components-popover__content .components-dropdown-menu__menu {
887
- padding: 0;
888
- }
889
-
890
- .components-popover.edit-post-more-menu__content {
891
- z-index: 99998;
892
- }
893
-
894
950
  .edit-post-template-top-area {
895
951
  display: flex;
896
952
  flex-direction: column;
@@ -1308,101 +1364,6 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
1308
1364
  clear: both;
1309
1365
  }
1310
1366
 
1311
- @media (min-width: 600px) {
1312
- .edit-post-preferences-modal {
1313
- width: calc(100% - 32px);
1314
- height: calc(100% - 120px);
1315
- }
1316
- }
1317
- @media (min-width: 782px) {
1318
- .edit-post-preferences-modal {
1319
- width: 750px;
1320
- }
1321
- }
1322
- @media (min-width: 960px) {
1323
- .edit-post-preferences-modal {
1324
- height: 70%;
1325
- }
1326
- }
1327
- @media (max-width: 781px) {
1328
- .edit-post-preferences-modal .components-modal__content {
1329
- padding: 0;
1330
- }
1331
- .edit-post-preferences-modal .components-modal__content::before {
1332
- content: none;
1333
- }
1334
- .edit-post-preferences-modal .components-navigator-provider {
1335
- height: 100%;
1336
- }
1337
- }
1338
- .edit-post-preferences-modal .edit-post-preferences__tabs .components-tab-panel__tabs {
1339
- position: absolute;
1340
- top: 84px;
1341
- left: 16px;
1342
- width: 160px;
1343
- }
1344
- .edit-post-preferences-modal .edit-post-preferences__tabs .components-tab-panel__tabs .components-tab-panel__tabs-item {
1345
- border-radius: 2px;
1346
- font-weight: 400;
1347
- }
1348
- .edit-post-preferences-modal .edit-post-preferences__tabs .components-tab-panel__tabs .components-tab-panel__tabs-item.is-active {
1349
- background: #f0f0f0;
1350
- box-shadow: none;
1351
- font-weight: 500;
1352
- }
1353
- .edit-post-preferences-modal .edit-post-preferences__tabs .components-tab-panel__tabs .components-tab-panel__tabs-item:focus:not(:disabled) {
1354
- box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
1355
- }
1356
- .edit-post-preferences-modal .edit-post-preferences__tabs .components-tab-panel__tab-content {
1357
- padding-left: 24px;
1358
- margin-left: 160px;
1359
- }
1360
- .edit-post-preferences-modal__section {
1361
- margin: 0 0 2.5rem 0;
1362
- }
1363
- .edit-post-preferences-modal__section:last-child {
1364
- margin: 0;
1365
- }
1366
- .edit-post-preferences-modal__section-title {
1367
- font-size: 0.9rem;
1368
- font-weight: 600;
1369
- margin-top: 0;
1370
- }
1371
- .edit-post-preferences-modal__option .components-base-control .components-base-control__field {
1372
- align-items: center;
1373
- display: flex;
1374
- margin-bottom: 0;
1375
- }
1376
- .edit-post-preferences-modal__option .components-base-control .components-base-control__field > label {
1377
- flex-grow: 1;
1378
- padding: 0.6rem 0 0.6rem 10px;
1379
- }
1380
- .edit-post-preferences-modal__custom-fields-confirmation-message, .edit-post-preferences-modal__custom-fields-confirmation-button {
1381
- margin: 0 0 0.6rem 48px;
1382
- }
1383
- @media (min-width: 782px) {
1384
- .edit-post-preferences-modal__custom-fields-confirmation-message, .edit-post-preferences-modal__custom-fields-confirmation-button {
1385
- margin-left: 38px;
1386
- }
1387
- }
1388
- @media (min-width: 600px) {
1389
- .edit-post-preferences-modal__custom-fields-confirmation-message, .edit-post-preferences-modal__custom-fields-confirmation-button {
1390
- max-width: 300px;
1391
- }
1392
- }
1393
- .edit-post-preferences-modal .components-base-control__help {
1394
- margin: -8px 0 8px 58px;
1395
- font-size: 12px;
1396
- font-style: normal;
1397
- color: #757575;
1398
- }
1399
- .edit-post-preferences-modal .edit-post-preferences-modal__section-description {
1400
- margin: -8px 0 8px 0;
1401
- font-size: 12px;
1402
- font-style: normal;
1403
- color: #757575;
1404
- }
1405
-
1406
1367
  .edit-post-editor__inserter-panel,
1407
1368
  .edit-post-editor__list-view-panel {
1408
1369
  height: 100%;