@wordpress/edit-post 8.8.8 → 8.10.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 (76) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/components/back-button/fullscreen-mode-close.js +2 -4
  3. package/build/components/back-button/fullscreen-mode-close.js.map +1 -1
  4. package/build/components/init-pattern-modal/index.js +3 -12
  5. package/build/components/init-pattern-modal/index.js.map +1 -1
  6. package/build/components/layout/index.js +24 -30
  7. package/build/components/layout/index.js.map +1 -1
  8. package/build/components/layout/use-padding-appender.js +19 -16
  9. package/build/components/layout/use-padding-appender.js.map +1 -1
  10. package/build/components/meta-boxes/meta-box-visibility.js.map +1 -1
  11. package/build/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
  12. package/build/components/preferences-modal/enable-custom-fields.js +2 -5
  13. package/build/components/preferences-modal/enable-custom-fields.js.map +1 -1
  14. package/build/components/preferences-modal/meta-boxes-section.js.map +1 -1
  15. package/build/deprecated.js.map +1 -1
  16. package/build/index.js +2 -4
  17. package/build/index.js.map +1 -1
  18. package/build/store/actions.js +1 -1
  19. package/build/store/actions.js.map +1 -1
  20. package/build/store/private-selectors.js.map +1 -1
  21. package/build/store/selectors.js +1 -1
  22. package/build/store/selectors.js.map +1 -1
  23. package/build/utils/meta-boxes.js.map +1 -1
  24. package/build-module/components/back-button/fullscreen-mode-close.js +2 -4
  25. package/build-module/components/back-button/fullscreen-mode-close.js.map +1 -1
  26. package/build-module/components/header/header-toolbar/index.native.js +1 -2
  27. package/build-module/components/header/header-toolbar/index.native.js.map +1 -1
  28. package/build-module/components/init-pattern-modal/index.js +5 -16
  29. package/build-module/components/init-pattern-modal/index.js.map +1 -1
  30. package/build-module/components/layout/index.js +25 -33
  31. package/build-module/components/layout/index.js.map +1 -1
  32. package/build-module/components/layout/index.native.js +1 -3
  33. package/build-module/components/layout/index.native.js.map +1 -1
  34. package/build-module/components/layout/use-padding-appender.js +20 -16
  35. package/build-module/components/layout/use-padding-appender.js.map +1 -1
  36. package/build-module/components/meta-boxes/index.js +1 -3
  37. package/build-module/components/meta-boxes/index.js.map +1 -1
  38. package/build-module/components/meta-boxes/meta-box-visibility.js.map +1 -1
  39. package/build-module/components/meta-boxes/meta-boxes-area/index.js +1 -2
  40. package/build-module/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
  41. package/build-module/components/more-menu/index.js +1 -3
  42. package/build-module/components/more-menu/index.js.map +1 -1
  43. package/build-module/components/preferences-modal/enable-custom-fields.js +3 -8
  44. package/build-module/components/preferences-modal/enable-custom-fields.js.map +1 -1
  45. package/build-module/components/preferences-modal/meta-boxes-section.js +1 -2
  46. package/build-module/components/preferences-modal/meta-boxes-section.js.map +1 -1
  47. package/build-module/components/welcome-guide/default.js +1 -3
  48. package/build-module/components/welcome-guide/default.js.map +1 -1
  49. package/build-module/components/welcome-guide/image.js +1 -2
  50. package/build-module/components/welcome-guide/image.js.map +1 -1
  51. package/build-module/components/welcome-guide/template.js +1 -3
  52. package/build-module/components/welcome-guide/template.js.map +1 -1
  53. package/build-module/deprecated.js.map +1 -1
  54. package/build-module/index.js +2 -4
  55. package/build-module/index.js.map +1 -1
  56. package/build-module/store/actions.js +1 -1
  57. package/build-module/store/actions.js.map +1 -1
  58. package/build-module/store/private-selectors.js.map +1 -1
  59. package/build-module/store/selectors.js +1 -1
  60. package/build-module/store/selectors.js.map +1 -1
  61. package/build-module/utils/meta-boxes.js.map +1 -1
  62. package/build-style/classic-rtl.css +10 -1
  63. package/build-style/classic.css +10 -1
  64. package/build-style/style-rtl.css +10 -1
  65. package/build-style/style.css +10 -1
  66. package/package.json +32 -32
  67. package/src/components/back-button/fullscreen-mode-close.js +1 -2
  68. package/src/components/back-button/test/__snapshots__/fullscreen-mode-close.js.snap +1 -1
  69. package/src/components/init-pattern-modal/index.js +5 -12
  70. package/src/components/layout/index.js +21 -32
  71. package/src/components/layout/use-padding-appender.js +21 -18
  72. package/src/components/preferences-modal/enable-custom-fields.js +1 -3
  73. package/src/components/preferences-modal/test/__snapshots__/enable-custom-fields.js.snap +2 -2
  74. package/src/index.js +0 -2
  75. package/src/store/actions.js +1 -1
  76. package/src/store/selectors.js +1 -1
@@ -41,11 +41,8 @@ function CustomFieldsConfirmation({
41
41
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
42
42
  className: "edit-post-preferences-modal__custom-fields-confirmation-message",
43
43
  children: (0, _i18n.__)('A page reload is required for this change. Make sure your content is saved before reloading.')
44
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button
45
- // TODO: Switch to `true` (40px size) if possible
46
- , {
47
- __next40pxDefaultSize: false,
48
- className: "edit-post-preferences-modal__custom-fields-confirmation-button",
44
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
45
+ __next40pxDefaultSize: true,
49
46
  variant: "secondary",
50
47
  isBusy: isReloading,
51
48
  accessibleWhenDisabled: true,
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_i18n","_components","_data","_editor","_preferences","_url","_lockUnlock","_jsxRuntime","PreferenceBaseOption","unlock","preferencesPrivateApis","submitCustomFieldsForm","customFieldsForm","document","getElementById","querySelector","setAttribute","getPathAndQueryString","window","location","href","submit","CustomFieldsConfirmation","willEnable","isReloading","setIsReloading","useState","jsxs","Fragment","children","jsx","className","__","Button","__next40pxDefaultSize","variant","isBusy","accessibleWhenDisabled","disabled","onClick","EnableCustomFieldsOption","label","areCustomFieldsEnabled","isChecked","setIsChecked","onChange","_default","exports","default","withSelect","select","editorStore","getEditorSettings","enableCustomFields"],"sources":["@wordpress/edit-post/src/components/preferences-modal/enable-custom-fields.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { withSelect } from '@wordpress/data';\nimport { store as editorStore } from '@wordpress/editor';\nimport { privateApis as preferencesPrivateApis } from '@wordpress/preferences';\nimport { getPathAndQueryString } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { PreferenceBaseOption } = unlock( preferencesPrivateApis );\n\nfunction submitCustomFieldsForm() {\n\tconst customFieldsForm = document.getElementById(\n\t\t'toggle-custom-fields-form'\n\t);\n\n\t// Ensure the referrer values is up to update with any\n\tcustomFieldsForm\n\t\t.querySelector( '[name=\"_wp_http_referer\"]' )\n\t\t.setAttribute( 'value', getPathAndQueryString( window.location.href ) );\n\n\tcustomFieldsForm.submit();\n}\n\nexport function CustomFieldsConfirmation( { willEnable } ) {\n\tconst [ isReloading, setIsReloading ] = useState( false );\n\treturn (\n\t\t<>\n\t\t\t<p className=\"edit-post-preferences-modal__custom-fields-confirmation-message\">\n\t\t\t\t{ __(\n\t\t\t\t\t'A page reload is required for this change. Make sure your content is saved before reloading.'\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<Button\n\t\t\t\t// TODO: Switch to `true` (40px size) if possible\n\t\t\t\t__next40pxDefaultSize={ false }\n\t\t\t\tclassName=\"edit-post-preferences-modal__custom-fields-confirmation-button\"\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\tisBusy={ isReloading }\n\t\t\t\taccessibleWhenDisabled\n\t\t\t\tdisabled={ isReloading }\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tsetIsReloading( true );\n\t\t\t\t\tsubmitCustomFieldsForm();\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ willEnable\n\t\t\t\t\t? __( 'Show & Reload Page' )\n\t\t\t\t\t: __( 'Hide & Reload Page' ) }\n\t\t\t</Button>\n\t\t</>\n\t);\n}\n\nexport function EnableCustomFieldsOption( { label, areCustomFieldsEnabled } ) {\n\tconst [ isChecked, setIsChecked ] = useState( areCustomFieldsEnabled );\n\n\treturn (\n\t\t<PreferenceBaseOption\n\t\t\tlabel={ label }\n\t\t\tisChecked={ isChecked }\n\t\t\tonChange={ setIsChecked }\n\t\t>\n\t\t\t{ isChecked !== areCustomFieldsEnabled && (\n\t\t\t\t<CustomFieldsConfirmation willEnable={ isChecked } />\n\t\t\t) }\n\t\t</PreferenceBaseOption>\n\t);\n}\n\nexport default withSelect( ( select ) => ( {\n\tareCustomFieldsEnabled:\n\t\t!! select( editorStore ).getEditorSettings().enableCustomFields,\n} ) )( EnableCustomFieldsOption );\n"],"mappings":";;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AACA,IAAAM,IAAA,GAAAN,OAAA;AAKA,IAAAO,WAAA,GAAAP,OAAA;AAA2C,IAAAQ,WAAA,GAAAR,OAAA;AAd3C;AACA;AACA;;AASA;AACA;AACA;;AAGA,MAAM;EAAES;AAAqB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAEjE,SAASC,sBAAsBA,CAAA,EAAG;EACjC,MAAMC,gBAAgB,GAAGC,QAAQ,CAACC,cAAc,CAC/C,2BACD,CAAC;;EAED;EACAF,gBAAgB,CACdG,aAAa,CAAE,2BAA4B,CAAC,CAC5CC,YAAY,CAAE,OAAO,EAAE,IAAAC,0BAAqB,EAAEC,MAAM,CAACC,QAAQ,CAACC,IAAK,CAAE,CAAC;EAExER,gBAAgB,CAACS,MAAM,CAAC,CAAC;AAC1B;AAEO,SAASC,wBAAwBA,CAAE;EAAEC;AAAW,CAAC,EAAG;EAC1D,MAAM,CAAEC,WAAW,EAAEC,cAAc,CAAE,GAAG,IAAAC,iBAAQ,EAAE,KAAM,CAAC;EACzD,oBACC,IAAAnB,WAAA,CAAAoB,IAAA,EAAApB,WAAA,CAAAqB,QAAA;IAAAC,QAAA,gBACC,IAAAtB,WAAA,CAAAuB,GAAA;MAAGC,SAAS,EAAC,iEAAiE;MAAAF,QAAA,EAC3E,IAA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or","_preferences","_url","_lockUnlock","_jsxRuntime","PreferenceBaseOption","unlock","preferencesPrivateApis","submitCustomFieldsForm","customFieldsForm","document","getElementById","querySelector","setAttribute","getPathAndQueryString","window","location","href","submit","CustomFieldsConfirmation","willEnable","isReloading","setIsReloading","useState","jsxs","Fragment","children","jsx","className","__","Button","__next40pxDefaultSize","variant","isBusy","accessibleWhenDisabled","disabled","onClick","EnableCustomFieldsOption","label","areCustomFieldsEnabled","isChecked","setIsChecked","onChange","_default","exports","default","withSelect","select","editorStore","getEditorSettings","enableCustomFields"],"sources":["@wordpress/edit-post/src/components/preferences-modal/enable-custom-fields.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { withSelect } from '@wordpress/data';\nimport { store as editorStore } from '@wordpress/editor';\nimport { privateApis as preferencesPrivateApis } from '@wordpress/preferences';\nimport { getPathAndQueryString } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { PreferenceBaseOption } = unlock( preferencesPrivateApis );\n\nfunction submitCustomFieldsForm() {\n\tconst customFieldsForm = document.getElementById(\n\t\t'toggle-custom-fields-form'\n\t);\n\n\t// Ensure the referrer values is up to update with any\n\tcustomFieldsForm\n\t\t.querySelector( '[name=\"_wp_http_referer\"]' )\n\t\t.setAttribute( 'value', getPathAndQueryString( window.location.href ) );\n\n\tcustomFieldsForm.submit();\n}\n\nexport function CustomFieldsConfirmation( { willEnable } ) {\n\tconst [ isReloading, setIsReloading ] = useState( false );\n\treturn (\n\t\t<>\n\t\t\t<p className=\"edit-post-preferences-modal__custom-fields-confirmation-message\">\n\t\t\t\t{ __(\n\t\t\t\t\t'A page reload is required for this change. Make sure your content is saved before reloading.'\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<Button\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\tisBusy={ isReloading }\n\t\t\t\taccessibleWhenDisabled\n\t\t\t\tdisabled={ isReloading }\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tsetIsReloading( true );\n\t\t\t\t\tsubmitCustomFieldsForm();\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ willEnable\n\t\t\t\t\t? __( 'Show & Reload Page' )\n\t\t\t\t\t: __( 'Hide & Reload Page' ) }\n\t\t\t</Button>\n\t\t</>\n\t);\n}\n\nexport function EnableCustomFieldsOption( { label, areCustomFieldsEnabled } ) {\n\tconst [ isChecked, setIsChecked ] = useState( areCustomFieldsEnabled );\n\n\treturn (\n\t\t<PreferenceBaseOption\n\t\t\tlabel={ label }\n\t\t\tisChecked={ isChecked }\n\t\t\tonChange={ setIsChecked }\n\t\t>\n\t\t\t{ isChecked !== areCustomFieldsEnabled && (\n\t\t\t\t<CustomFieldsConfirmation willEnable={ isChecked } />\n\t\t\t) }\n\t\t</PreferenceBaseOption>\n\t);\n}\n\nexport default withSelect( ( select ) => ( {\n\tareCustomFieldsEnabled:\n\t\t!! select( editorStore ).getEditorSettings().enableCustomFields,\n} ) )( EnableCustomFieldsOption );\n"],"mappings":";;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AACA,IAAAM,IAAA,GAAAN,OAAA;AAKA,IAAAO,WAAA,GAAAP,OAAA;AAA2C,IAAAQ,WAAA,GAAAR,OAAA;AAd3C;AACA;AACA;;AASA;AACA;AACA;;AAGA,MAAM;EAAES;AAAqB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAEjE,SAASC,sBAAsBA,CAAA,EAAG;EACjC,MAAMC,gBAAgB,GAAGC,QAAQ,CAACC,cAAc,CAC/C,2BACD,CAAC;;EA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E,QAAQ,EAAGD,YAAc;IAAAf,QAAA,EAEvBc,SAAS,KAAKD,sBAAsB,iBACrC,IAAAnC,WAAA,CAAAuB,GAAA,EAACR,wBAAwB;MAACC,UAAU,EAAGoB;IAAW,CAAE;EACpD,CACoB,CAAC;AAEzB;AAAC,IAAAG,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc,IAAAC,gBAAU,EAAIC,MAAM,KAAQ;EAC1CR,sBAAsB,EACrB,CAAC,CAAEQ,MAAM,CAAEC,aAAY,CAAC,CAACC,iBAAiB,CAAC,CAAC,CAACC;AAC/C,CAAC,CAAG,CAAC,CAAEb,wBAAyB,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_data","_editor","_preferences","_enableCustomFields","_interopRequireDefault","_enablePanel","_store","_lockUnlock","_jsxRuntime","PreferencesModalSection","unlock","preferencesPrivateApis","MetaBoxesSection","areCustomFieldsRegistered","metaBoxes","sectionProps","thirdPartyMetaBoxes","filter","id","length","jsxs","children","jsx","default","label","__","map","title","panelName","_default","exports","withSelect","select","getEditorSettings","editorStore","getAllMetaBoxes","editPostStore","enableCustomFields","undefined"],"sources":["@wordpress/edit-post/src/components/preferences-modal/meta-boxes-section.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { withSelect } from '@wordpress/data';\nimport { store as editorStore } from '@wordpress/editor';\nimport { privateApis as preferencesPrivateApis } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport EnableCustomFieldsOption from './enable-custom-fields';\nimport EnablePanelOption from './enable-panel';\nimport { store as editPostStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { PreferencesModalSection } = unlock( preferencesPrivateApis );\n\nexport function MetaBoxesSection( {\n\tareCustomFieldsRegistered,\n\tmetaBoxes,\n\t...sectionProps\n} ) {\n\t// The 'Custom Fields' meta box is a special case that we handle separately.\n\tconst thirdPartyMetaBoxes = metaBoxes.filter(\n\t\t( { id } ) => id !== 'postcustom'\n\t);\n\n\tif ( ! areCustomFieldsRegistered && thirdPartyMetaBoxes.length === 0 ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PreferencesModalSection { ...sectionProps }>\n\t\t\t{ areCustomFieldsRegistered && (\n\t\t\t\t<EnableCustomFieldsOption label={ __( 'Custom fields' ) } />\n\t\t\t) }\n\t\t\t{ thirdPartyMetaBoxes.map( ( { id, title } ) => (\n\t\t\t\t<EnablePanelOption\n\t\t\t\t\tkey={ id }\n\t\t\t\t\tlabel={ title }\n\t\t\t\t\tpanelName={ `meta-box-${ id }` }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</PreferencesModalSection>\n\t);\n}\n\nexport default withSelect( ( select ) => {\n\tconst { getEditorSettings } = select( editorStore );\n\tconst { getAllMetaBoxes } = select( editPostStore );\n\n\treturn {\n\t\t// This setting should not live in the block editor's store.\n\t\tareCustomFieldsRegistered:\n\t\t\tgetEditorSettings().enableCustomFields !== undefined,\n\t\tmetaBoxes: getAllMetaBoxes(),\n\t};\n} )( MetaBoxesSection );\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAKA,IAAAI,mBAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,YAAA,GAAAD,sBAAA,CAAAL,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AAA2C,IAAAS,WAAA,GAAAT,OAAA;AAd3C;AACA;AACA;;AAMA;AACA;AACA;;AAMA,MAAM;EAAEU;AAAwB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAE7D,SAASC,gBAAgBA,CAAE;EACjCC,yBAAyB;EACzBC,SAAS;EACT,GAAGC;AACJ,CAAC,EAAG;EACH;EACA,MAAMC,mBAAmB,GAAGF,SAAS,CAACG,MAAM,CAC3C,CAAE;IAAEC;EAAG,CAAC,KAAMA,EAAE,KAAK,YACtB,CAAC;EAED,IAAK,CAAEL,yBAAyB,IAAIG,mBAAmB,CAACG,MAAM,KAAK,CAAC,EAAG;IACtE,OAAO,IAAI;EACZ;EAEA,oBACC,IAAAX,WAAA,CAAAY,IAAA,EAACX,uBAAuB;IAAA,GAAMM,YAAY;IAAAM,QAAA,GACvCR,yBAAyB,iBAC1B,IAAAL,WAAA,CAAAc,GAAA,EAACnB,mBAAA,CAAAoB,OAAwB;MAACC,KAAK,EAAG,IAAAC,QAAE,EAAE,eAAgB;IAAG,CAAE,CAC3D,EACCT,mBAAmB,CAACU,GAAG,CAAE,CAAE;MAAER,EAAE;MAAES;IAAM,CAAC,kBACzC,IAAAnB,WAAA,CAAAc,GAAA,EAACjB,YAAA,CAAAkB,OAAiB;MAEjBC,KAAK,EAAGG,KAAO;MACfC,SAAS,EAAI,YAAYV,EAAI;IAAG,GAF1BA,EAGN,CACA,CAAC;EAAA,CACqB,CAAC;AAE5B;AAAC,IAAAW,QAAA,GAAAC,OAAA,CAAAP,OAAA,GAEc,IAAAQ,gBAAU,EAAIC,MAAM,IAAM;EACxC,MAAM;IAAEC;EAAkB,CAAC,GAAGD,MAAM,CAAEE,aAAY,CAAC;EACnD,MAAM;IAAEC;EAAgB,CAAC,GAAGH,MAAM,CAAEI,YAAc,CAAC;EAEnD,OAAO;IACN;IACAvB,yBAAyB,EACxBoB,iBAAiB,CAAC,CAAC,CAACI,kBAAkB,KAAKC,SAAS;IACrDxB,SAAS,EAAEqB,eAAe,CAAC;EAC5B,CAAC;AACF,CAAE,CAAC,CAAEvB,gBAAiB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_i18n","require","_data","_editor","_preferences","_enableCustomFields","_interopRequireDefault","_enablePanel","_store","_lockUnlock","_jsxRuntime","PreferencesModalSection","unlock","preferencesPrivateApis","MetaBoxesSection","areCustomFieldsRegistered","metaBoxes","sectionProps","thirdPartyMetaBoxes","filter","id","length","jsxs","children","jsx","default","label","__","map","title","panelName","_default","exports","withSelect","select","getEditorSettings","editorStore","getAllMetaBoxes","editPostStore","enableCustomFields","undefined"],"sources":["@wordpress/edit-post/src/components/preferences-modal/meta-boxes-section.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { withSelect } from '@wordpress/data';\nimport { store as editorStore } from '@wordpress/editor';\nimport { privateApis as preferencesPrivateApis } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport EnableCustomFieldsOption from './enable-custom-fields';\nimport EnablePanelOption from './enable-panel';\nimport { store as editPostStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { PreferencesModalSection } = unlock( preferencesPrivateApis );\n\nexport function MetaBoxesSection( {\n\tareCustomFieldsRegistered,\n\tmetaBoxes,\n\t...sectionProps\n} ) {\n\t// The 'Custom Fields' meta box is a special case that we handle separately.\n\tconst thirdPartyMetaBoxes = metaBoxes.filter(\n\t\t( { id } ) => id !== 'postcustom'\n\t);\n\n\tif ( ! areCustomFieldsRegistered && thirdPartyMetaBoxes.length === 0 ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PreferencesModalSection { ...sectionProps }>\n\t\t\t{ areCustomFieldsRegistered && (\n\t\t\t\t<EnableCustomFieldsOption label={ __( 'Custom fields' ) } />\n\t\t\t) }\n\t\t\t{ thirdPartyMetaBoxes.map( ( { id, title } ) => (\n\t\t\t\t<EnablePanelOption\n\t\t\t\t\tkey={ id }\n\t\t\t\t\tlabel={ title }\n\t\t\t\t\tpanelName={ `meta-box-${ id }` }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</PreferencesModalSection>\n\t);\n}\n\nexport default withSelect( ( select ) => {\n\tconst { getEditorSettings } = select( editorStore );\n\tconst { getAllMetaBoxes } = select( editPostStore );\n\n\treturn {\n\t\t// This setting should not live in the block editor's store.\n\t\tareCustomFieldsRegistered:\n\t\t\tg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G,YAAaV,EAAE;IAAK,GAF1BA,EAGN,CACA,CAAC;EAAA,CACqB,CAAC;AAE5B;AAAC,IAAAW,QAAA,GAAAC,OAAA,CAAAP,OAAA,GAEc,IAAAQ,gBAAU,EAAIC,MAAM,IAAM;EACxC,MAAM;IAAEC;EAAkB,CAAC,GAAGD,MAAM,CAAEE,aAAY,CAAC;EACnD,MAAM;IAAEC;EAAgB,CAAC,GAAGH,MAAM,CAAEI,YAAc,CAAC;EAEnD,OAAO;IACN;IACAvB,yBAAyB,EACxBoB,iBAAiB,CAAC,CAAC,CAACI,kBAAkB,KAAKC,SAAS;IACrDxB,SAAS,EAAEqB,eAAe,CAAC;EAC5B,CAAC;AACF,CAAE,CAAC,CAAEvB,gBAAiB,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_editor","require","_url","_deprecated","_interopRequireDefault","_lockUnlock","_jsxRuntime","PluginPostExcerpt","unlock","editorPrivateApis","isSiteEditor","getPath","window","location","href","includes","deprecateSlot","name","deprecated","since","alternative","PluginBlockSettingsMenuItem","props","jsx","PluginDocumentSettingPanel","PluginMoreMenuItem","PluginPrePublishPanel","PluginPostPublishPanel","PluginPostStatusInfo","PluginSidebar","PluginSidebarMoreMenuItem","__experimentalPluginPostExcerpt","hint","link"],"sources":["@wordpress/edit-post/src/deprecated.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tprivateApis as editorPrivateApis,\n\tPluginBlockSettingsMenuItem as EditorPluginBlockSettingsMenuItem,\n\tPluginDocumentSettingPanel as EditorPluginDocumentSettingPanel,\n\tPluginMoreMenuItem as EditorPluginMoreMenuItem,\n\tPluginPrePublishPanel as EditorPluginPrePublishPanel,\n\tPluginPostPublishPanel as EditorPluginPostPublishPanel,\n\tPluginPostStatusInfo as EditorPluginPostStatusInfo,\n\tPluginSidebar as EditorPluginSidebar,\n\tPluginSidebarMoreMenuItem as EditorPluginSidebarMoreMenuItem,\n} from '@wordpress/editor';\nimport { getPath } from '@wordpress/url';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from './lock-unlock';\nconst { PluginPostExcerpt } = unlock( editorPrivateApis );\n\nconst isSiteEditor = getPath( window.location.href )?.includes(\n\t'site-editor.php'\n);\n\nconst deprecateSlot = ( name ) => {\n\tdeprecated( `wp.editPost.${ name }`, {\n\t\tsince: '6.6',\n\t\talternative: `wp.editor.${ name }`,\n\t} );\n};\n\n/* eslint-disable jsdoc/require-param */\n/**\n * @see PluginBlockSettingsMenuItem in @wordpress/editor package.\n */\nexport function PluginBlockSettingsMenuItem( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginBlockSettingsMenuItem' );\n\treturn <EditorPluginBlockSettingsMenuItem { ...props } />;\n}\n\n/**\n * @see PluginDocumentSettingPanel in @wordpress/editor package.\n */\nexport function PluginDocumentSettingPanel( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginDocumentSettingPanel' );\n\treturn <EditorPluginDocumentSettingPanel { ...props } />;\n}\n\n/**\n * @see PluginMoreMenuItem in @wordpress/editor package.\n */\nexport function PluginMoreMenuItem( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginMoreMenuItem' );\n\treturn <EditorPluginMoreMenuItem { ...props } />;\n}\n\n/**\n * @see PluginPrePublishPanel in @wordpress/editor package.\n */\nexport function PluginPrePublishPanel( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginPrePublishPanel' );\n\treturn <EditorPluginPrePublishPanel { ...props } />;\n}\n\n/**\n * @see PluginPostPublishPanel in @wordpress/editor package.\n */\nexport function PluginPostPublishPanel( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginPostPublishPanel' );\n\treturn <EditorPluginPostPublishPanel { ...props } />;\n}\n\n/**\n * @see PluginPostStatusInfo in @wordpress/editor package.\n */\nexport function PluginPostStatusInfo( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginPostStatusInfo' );\n\treturn <EditorPluginPostStatusInfo { ...props } />;\n}\n\n/**\n * @see PluginSidebar in @wordpress/editor package.\n */\nexport function PluginSidebar( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginSidebar' );\n\treturn <EditorPluginSidebar { ...props } />;\n}\n\n/**\n * @see PluginSidebarMoreMenuItem in @wordpress/editor package.\n */\nexport function PluginSidebarMoreMenuItem( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginSidebarMoreMenuItem' );\n\treturn <EditorPluginSidebarMoreMenuItem { ...props } />;\n}\n\n/**\n * @see PluginPostExcerpt in @wordpress/editor package.\n */\nexport function __experimentalPluginPostExcerpt() {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecated( 'wp.editPost.__experimentalPluginPostExcerpt', {\n\t\tsince: '6.6',\n\t\thint: 'Core and custom panels can be access programmatically using their panel name.',\n\t\tlink: 'https://developer.wordpress.org/block-editor/reference-guides/slotfills/plugin-document-setting-panel/#accessing-a-panel-programmatically',\n\t} );\n\treturn PluginPostExcerpt;\n}\n\n/* eslint-enable jsdoc/require-param */\n"],"mappings":";;;;;;;;;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AAWA,IAAAC,IAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAC,sBAAA,CAAAH,OAAA;AAKA,IAAAI,WAAA,GAAAJ,OAAA;AAAuC,IAAAK,WAAA,GAAAL,OAAA;AApBvC;AACA;AACA;;AAeA;AACA;AACA;;AAEA,MAAM;EAAEM;AAAkB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,mBAAkB,CAAC;AAEzD,MAAMC,YAAY,GAAG,IAAAC,YAAO,EAAEC,MAAM,C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ACH,OAAO1B,iBAAiB;AACzB;;AAEA","ignoreList":[]}
1
+ {"version":3,"names":["_editor","require","_url","_deprecated","_interopRequireDefault","_lockUnlock","_jsxRuntime","PluginPostExcerpt","unlock","editorPrivateApis","isSiteEditor","getPath","window","location","href","includes","deprecateSlot","name","deprecated","since","alternative","PluginBlockSettingsMenuItem","props","jsx","PluginDocumentSettingPanel","PluginMoreMenuItem","PluginPrePublishPanel","PluginPostPublishPanel","PluginPostStatusInfo","PluginSidebar","PluginSidebarMoreMenuItem","__experimentalPluginPostExcerpt","hint","link"],"sources":["@wordpress/edit-post/src/deprecated.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tprivateApis as editorPrivateApis,\n\tPluginBlockSettingsMenuItem as EditorPluginBlockSettingsMenuItem,\n\tPluginDocumentSettingPanel as EditorPluginDocumentSettingPanel,\n\tPluginMoreMenuItem as EditorPluginMoreMenuItem,\n\tPluginPrePublishPanel as EditorPluginPrePublishPanel,\n\tPluginPostPublishPanel as EditorPluginPostPublishPanel,\n\tPluginPostStatusInfo as EditorPluginPostStatusInfo,\n\tPluginSidebar as EditorPluginSidebar,\n\tPluginSidebarMoreMenuItem as EditorPluginSidebarMoreMenuItem,\n} from '@wordpress/editor';\nimport { getPath } from '@wordpress/url';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from './lock-unlock';\nconst { PluginPostExcerpt } = unlock( editorPrivateApis );\n\nconst isSiteEditor = getPath( window.location.href )?.includes(\n\t'site-editor.php'\n);\n\nconst deprecateSlot = ( name ) => {\n\tdeprecated( `wp.editPost.${ name }`, {\n\t\tsince: '6.6',\n\t\talternative: `wp.editor.${ name }`,\n\t} );\n};\n\n/* eslint-disable jsdoc/require-param */\n/**\n * @see PluginBlockSettingsMenuItem in @wordpress/editor package.\n */\nexport function PluginBlockSettingsMenuItem( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginBlockSettingsMenuItem' );\n\treturn <EditorPluginBlockSettingsMenuItem { ...props } />;\n}\n\n/**\n * @see PluginDocumentSettingPanel in @wordpress/editor package.\n */\nexport function PluginDocumentSettingPanel( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginDocumentSettingPanel' );\n\treturn <EditorPluginDocumentSettingPanel { ...props } />;\n}\n\n/**\n * @see PluginMoreMenuItem in @wordpress/editor package.\n */\nexport function PluginMoreMenuItem( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginMoreMenuItem' );\n\treturn <EditorPluginMoreMenuItem { ...props } />;\n}\n\n/**\n * @see PluginPrePublishPanel in @wordpress/editor package.\n */\nexport function PluginPrePublishPanel( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginPrePublishPanel' );\n\treturn <EditorPluginPrePublishPanel { ...props } />;\n}\n\n/**\n * @see PluginPostPublishPanel in @wordpress/editor package.\n */\nexport function PluginPostPublishPanel( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginPostPublishPanel' );\n\treturn <EditorPluginPostPublishPanel { ...props } />;\n}\n\n/**\n * @see PluginPostStatusInfo in @wordpress/editor package.\n */\nexport function PluginPostStatusInfo( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginPostStatusInfo' );\n\treturn <EditorPluginPostStatusInfo { ...props } />;\n}\n\n/**\n * @see PluginSidebar in @wordpress/editor package.\n */\nexport function PluginSidebar( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginSidebar' );\n\treturn <EditorPluginSidebar { ...props } />;\n}\n\n/**\n * @see PluginSidebarMoreMenuItem in @wordpress/editor package.\n */\nexport function PluginSidebarMoreMenuItem( props ) {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginSidebarMoreMenuItem' );\n\treturn <EditorPluginSidebarMoreMenuItem { ...props } />;\n}\n\n/**\n * @see PluginPostExcerpt in @wordpress/editor package.\n */\nexport function __experimentalPluginPostExcerpt() {\n\tif ( isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecated( 'wp.editPost.__experimentalPluginPostExcerpt', {\n\t\tsince: '6.6',\n\t\thint: 'Core and custom panels can be access programmatically using their panel name.',\n\t\tlink: 'https://developer.wordpress.org/block-editor/reference-guides/slotfills/plugin-document-setting-panel/#accessing-a-panel-programmatically',\n\t} );\n\treturn PluginPostExcerpt;\n}\n\n/* eslint-enable jsdoc/require-param */\n"],"mappings":";;;;;;;;;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AAWA,IAAAC,IAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAC,sBAAA,CAAAH,OAAA;AAKA,IAAAI,WAAA,GAAAJ,OAAA;AAAuC,IAAAK,WAAA,GAAAL,OAAA;AApBvC;AACA;AACA;;AAeA;AACA;AACA;;AAEA,MAAM;EAAEM;AAAkB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,mBAAkB,CAAC;AAEzD,MAAMC,YAAY,GAAG,IAAAC,YAAO,EAAEC,MAAM,CAACC,QAAQ,CAACC,IAAK,CAAC,EAAEC,QAAQ,CAC7D,iBACD,CAAC;AAED,MAAMC,aAAa,GAAKC,IAAI,IAAM;EACjC,IAAAC,mBAAU,EAAE,eAAgBD,IAAI,EAAG,EAAE;IACpCE,KAAK,EAAE,KAAK;IACZC,WAAW,EAAE,aAAcH,IAAI;EAChC,CAAE,CAAC;AACJ,CAAC;;AAED;AACA;AACA;AACA;AACO,SAASI,2BAA2BA,CAAEC,KAAK,EAAG;EACpD,IAAKZ,YAAY,EAAG;IACnB,OAAO,IAAI;EACZ;EACAM,aAAa,CAAE,6BAA8B,CAAC;EAC9C,oBAAO,IAAAV,WAAA,CAAAiB,GAAA,EAACvB,OAAA,CAAAqB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B,OAAA,CAAA4B,oBAA0B;IAAA,GAAMN;EAAK,CAAI,CAAC;AACnD;;AAEA;AACA;AACA;AACO,SAASO,aAAaA,CAAEP,KAAK,EAAG;EACtC,IAAKZ,YAAY,EAAG;IACnB,OAAO,IAAI;EACZ;EACAM,aAAa,CAAE,eAAgB,CAAC;EAChC,oBAAO,IAAAV,WAAA,CAAAiB,GAAA,EAACvB,OAAA,CAAA6B,aAAmB;IAAA,GAAMP;EAAK,CAAI,CAAC;AAC5C;;AAEA;AACA;AACA;AACO,SAASQ,yBAAyBA,CAAER,KAAK,EAAG;EAClD,IAAKZ,YAAY,EAAG;IACnB,OAAO,IAAI;EACZ;EACAM,aAAa,CAAE,2BAA4B,CAAC;EAC5C,oBAAO,IAAAV,WAAA,CAAAiB,GAAA,EAACvB,OAAA,CAAA8B,yBAA+B;IAAA,GAAMR;EAAK,CAAI,CAAC;AACxD;;AAEA;AACA;AACA;AACO,SAASS,+BAA+BA,CAAA,EAAG;EACjD,IAAKrB,YAAY,EAAG;IACnB,OAAO,IAAI;EACZ;EACA,IAAAQ,mBAAU,EAAE,6CAA6C,EAAE;IAC1DC,KAAK,EAAE,KAAK;IACZa,IAAI,EAAE,+EAA+E;IACrFC,IAAI,EAAE;EACP,CAAE,CAAC;EACH,OAAO1B,iBAAiB;AACzB;;AAEA","ignoreList":[]}
package/build/index.js CHANGED
@@ -61,8 +61,7 @@ Object.keys(_deprecated2).forEach(function (key) {
61
61
 
62
62
  const {
63
63
  BackButton: __experimentalMainDashboardButton,
64
- registerCoreBlockBindingsSources,
65
- bootstrapBlockBindingsSourcesFromServer
64
+ registerCoreBlockBindingsSources
66
65
  } = (0, _lockUnlock.unlock)(_editor.privateApis);
67
66
 
68
67
  /**
@@ -115,7 +114,6 @@ function initializeEditor(id, postType, postId, settings, initialEdits) {
115
114
  (0, _data.dispatch)(_editor.store).setIsListViewOpened(true);
116
115
  }
117
116
  (0, _blockLibrary.registerCoreBlocks)();
118
- bootstrapBlockBindingsSourcesFromServer(settings?.blockBindingsSources);
119
117
  registerCoreBlockBindingsSources();
120
118
  (0, _widgets.registerLegacyWidgetBlock)({
121
119
  inserter: false
@@ -164,7 +162,7 @@ function initializeEditor(id, postType, postId, settings, initialEdits) {
164
162
  // Prevent the default browser action for files dropped outside of dropzones.
165
163
  window.addEventListener('dragover', e => e.preventDefault(), false);
166
164
  window.addEventListener('drop', e => e.preventDefault(), false);
167
- root.render( /*#__PURE__*/(0, _jsxRuntime.jsx)(_element.StrictMode, {
165
+ root.render(/*#__PURE__*/(0, _jsxRuntime.jsx)(_element.StrictMode, {
168
166
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_layout.default, {
169
167
  settings: settings,
170
168
  postId: postId,
@@ -1 +1 @@
1
- {"version":3,"names":["_blocks","require","_blockLibrary","_deprecated","_interopRequireDefault","_element","_data","_preferences","_widgets","_editor","_layout","_lockUnlock","_jsxRuntime","_fullscreenModeClose","_store","_deprecated2","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","BackButton","__experimentalMainDashboardButton","registerCoreBlockBindingsSources","bootstrapBlockBindingsSourcesFromServer","unlock","editorPrivateApis","initializeEditor","id","postType","postId","settings","initialEdits","isMediumOrBigger","window","matchMedia","matches","target","document","getElementById","root","createRoot","dispatch","preferencesStore","setDefaults","fullscreenMode","themeStyles","welcomeGuide","welcomeGuideTemplate","allowRightClickOverrides","editorMode","fixedToolbar","hiddenBlockTypes","inactivePanels","openPanels","showBlockBreadcrumbs","showIconLabels","showListViewByDefault","enableChoosePatternModal","isPublishSidebarEnabled","__experimentalMediaProcessing","requireApproval","optimizeOnUpload","blocksStore","reapplyBlockTypeFilters","select","editorStore","setIsListViewOpened","registerCoreBlocks","blockBindingsSources","registerLegacyWidgetBlock","inserter","registerWidgetGroupBlock","globalThis","IS_GUTENBERG_PLUGIN","__experimentalRegisterExperimentalCoreBlocks","enableFSEBlocks","__unstableEnableFullSiteEditingBlocks","documentMode","compatMode","console","warn","isIphone","navigator","userAgent","indexOf","addEventListener","event","editorScrollContainer","getElementsByClassName","scrollY","scrollTop","scrollTo","e","preventDefault","render","jsx","StrictMode","children","default","reinitializeEditor","deprecated","since","version"],"sources":["@wordpress/edit-post/src/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tregisterCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport deprecated from '@wordpress/deprecated';\nimport { createRoot, StrictMode } from '@wordpress/element';\nimport { dispatch, select } from '@wordpress/data';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tregisterLegacyWidgetBlock,\n\tregisterWidgetGroupBlock,\n} from '@wordpress/widgets';\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport Layout from './components/layout';\nimport { unlock } from './lock-unlock';\n\nconst {\n\tBackButton: __experimentalMainDashboardButton,\n\tregisterCoreBlockBindingsSources,\n\tbootstrapBlockBindingsSourcesFromServer,\n} = unlock( editorPrivateApis );\n\n/**\n * Initializes and returns an instance of Editor.\n *\n * @param {string} id Unique identifier for editor instance.\n * @param {string} postType Post type of the post to edit.\n * @param {Object} postId ID of the post to edit.\n * @param {?Object} settings Editor settings object.\n * @param {Object} initialEdits Programmatic edits to apply initially, to be\n * considered as non-user-initiated (bypass for\n * unsaved changes prompt).\n */\nexport function initializeEditor(\n\tid,\n\tpostType,\n\tpostId,\n\tsettings,\n\tinitialEdits\n) {\n\tconst isMediumOrBigger = window.matchMedia( '(min-width: 782px)' ).matches;\n\tconst target = document.getElementById( id );\n\tconst root = createRoot( target );\n\n\tdispatch( preferencesStore ).setDefaults( 'core/edit-post', {\n\t\tfullscreenMode: true,\n\t\tthemeStyles: true,\n\t\twelcomeGuide: true,\n\t\twelcomeGuideTemplate: true,\n\t} );\n\n\tdispatch( preferencesStore ).setDefaults( 'core', {\n\t\tallowRightClickOverrides: true,\n\t\teditorMode: 'visual',\n\t\tfixedToolbar: false,\n\t\thiddenBlockTypes: [],\n\t\tinactivePanels: [],\n\t\topenPanels: [ 'post-status' ],\n\t\tshowBlockBreadcrumbs: true,\n\t\tshowIconLabels: false,\n\t\tshowListViewByDefault: false,\n\t\tenableChoosePatternModal: true,\n\t\tisPublishSidebarEnabled: true,\n\t} );\n\n\tif ( window.__experimentalMediaProcessing ) {\n\t\tdispatch( preferencesStore ).setDefaults( 'core/media', {\n\t\t\trequireApproval: true,\n\t\t\toptimizeOnUpload: true,\n\t\t} );\n\t}\n\n\tdispatch( blocksStore ).reapplyBlockTypeFilters();\n\n\t// Check if the block list view should be open by default.\n\t// If `distractionFree` mode is enabled, the block list view should not be open.\n\t// This behavior is disabled for small viewports.\n\tif (\n\t\tisMediumOrBigger &&\n\t\tselect( preferencesStore ).get( 'core', 'showListViewByDefault' ) &&\n\t\t! select( preferencesStore ).get( 'core', 'distractionFree' )\n\t) {\n\t\tdispatch( editorStore ).setIsListViewOpened( true );\n\t}\n\n\tregisterCoreBlocks();\n\tbootstrapBlockBindingsSourcesFromServer( settings?.blockBindingsSources );\n\tregisterCoreBlockBindingsSources();\n\tregisterLegacyWidgetBlock( { inserter: false } );\n\tregisterWidgetGroupBlock( { inserter: false } );\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t__experimentalRegisterExperimentalCoreBlocks( {\n\t\t\tenableFSEBlocks: settings.__unstableEnableFullSiteEditingBlocks,\n\t\t} );\n\t}\n\n\t// Show a console log warning if the browser is not in Standards rendering mode.\n\tconst documentMode =\n\t\tdocument.compatMode === 'CSS1Compat' ? 'Standards' : 'Quirks';\n\tif ( documentMode !== 'Standards' ) {\n\t\t// eslint-disable-next-line no-console\n\t\tconsole.warn(\n\t\t\t\"Your browser is using Quirks Mode. \\nThis can cause rendering issues such as blocks overlaying meta boxes in the editor. Quirks Mode can be triggered by PHP errors or HTML code appearing before the opening <!DOCTYPE html>. Try checking the raw page source or your site's PHP error log and resolving errors there, removing any HTML before the doctype, or disabling plugins.\"\n\t\t);\n\t}\n\n\t// This is a temporary fix for a couple of issues specific to Webkit on iOS.\n\t// Without this hack the browser scrolls the mobile toolbar off-screen.\n\t// Once supported in Safari we can replace this in favor of preventScroll.\n\t// For details see issue #18632 and PR #18686\n\t// Specifically, we scroll `interface-interface-skeleton__body` to enable a fixed top toolbar.\n\t// But Mobile Safari forces the `html` element to scroll upwards, hiding the toolbar.\n\n\tconst isIphone = window.navigator.userAgent.indexOf( 'iPhone' ) !== -1;\n\tif ( isIphone ) {\n\t\twindow.addEventListener( 'scroll', ( event ) => {\n\t\t\tconst editorScrollContainer = document.getElementsByClassName(\n\t\t\t\t'interface-interface-skeleton__body'\n\t\t\t)[ 0 ];\n\t\t\tif ( event.target === document ) {\n\t\t\t\t// Scroll element into view by scrolling the editor container by the same amount\n\t\t\t\t// that Mobile Safari tried to scroll the html element upwards.\n\t\t\t\tif ( window.scrollY > 100 ) {\n\t\t\t\t\teditorScrollContainer.scrollTop =\n\t\t\t\t\t\teditorScrollContainer.scrollTop + window.scrollY;\n\t\t\t\t}\n\t\t\t\t// Undo unwanted scroll on html element, but only in the visual editor.\n\t\t\t\tif (\n\t\t\t\t\tdocument.getElementsByClassName( 'is-mode-visual' )[ 0 ]\n\t\t\t\t) {\n\t\t\t\t\twindow.scrollTo( 0, 0 );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t// Prevent the default browser action for files dropped outside of dropzones.\n\twindow.addEventListener( 'dragover', ( e ) => e.preventDefault(), false );\n\twindow.addEventListener( 'drop', ( e ) => e.preventDefault(), false );\n\n\troot.render(\n\t\t<StrictMode>\n\t\t\t<Layout\n\t\t\t\tsettings={ settings }\n\t\t\t\tpostId={ postId }\n\t\t\t\tpostType={ postType }\n\t\t\t\tinitialEdits={ initialEdits }\n\t\t\t/>\n\t\t</StrictMode>\n\t);\n\n\treturn root;\n}\n\n/**\n * Used to reinitialize the editor after an error. Now it's a deprecated noop function.\n */\nexport function reinitializeEditor() {\n\tdeprecated( 'wp.editPost.reinitializeEditor', {\n\t\tsince: '6.2',\n\t\tversion: '6.3',\n\t} );\n}\n\nexport { default as __experimentalFullscreenModeClose } from './components/back-button/fullscreen-mode-close';\nexport { __experimentalMainDashboardButton };\nexport { store } from './store';\nexport * from './deprecated';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAIA,IAAAE,WAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AAIA,IAAAQ,OAAA,GAAAR,OAAA;AAQA,IAAAS,OAAA,GAAAN,sBAAA,CAAAH,OAAA;AACA,IAAAU,WAAA,GAAAV,OAAA;AAAuC,IAAAW,WAAA,GAAAX,OAAA;AAsJvC,IAAAY,oBAAA,GAAAT,sBAAA,CAAAH,OAAA;AAEA,IAAAa,MAAA,GAAAb,OAAA;AACA,IAAAc,YAAA,GAAAd,OAAA;AAAAe,MAAA,CAAAC,IAAA,CAAAF,YAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,YAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,YAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AAlLA;AACA;AACA;;AAmBA;AACA;AACA;;AAIA,MAAM;EACL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efault","_element","_data","_preferences","_widgets","_editor","_layout","_lockUnlock","_jsxRuntime","_fullscreenModeClose","_store","_deprecated2","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","BackButton","__experimentalMainDashboardButton","registerCoreBlockBindingsSources","unlock","editorPrivateApis","initializeEditor","id","postType","postId","settings","initialEdits","isMediumOrBigger","window","matchMedia","matches","target","document","getElementById","root","createRoot","dispatch","preferencesStore","setDefaults","fullscreenMode","themeStyles","welcomeGuide","welcomeGuideTemplate","allowRightClickOverrides","editorMode","fixedToolbar","hiddenBlockTypes","inactivePanels","openPanels","showBlockBreadcrumbs","showIconLabels","showListViewByDefault","enableChoosePatternModal","isPublishSidebarEnabled","__experimentalMediaProcessing","requireApproval","optimizeOnUpload","blocksStore","reapplyBlockTypeFilters","select","editorStore","setIsListViewOpened","registerCoreBlocks","registerLegacyWidgetBlock","inserter","registerWidgetGroupBlock","globalThis","IS_GUTENBERG_PLUGIN","__experimentalRegisterExperimentalCoreBlocks","enableFSEBlocks","__unstableEnableFullSiteEditingBlocks","documentMode","compatMode","console","warn","isIphone","navigator","userAgent","indexOf","addEventListener","event","editorScrollContainer","getElementsByClassName","scrollY","scrollTop","scrollTo","e","preventDefault","render","jsx","StrictMode","children","default","reinitializeEditor","deprecated","since","version"],"sources":["@wordpress/edit-post/src/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tregisterCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport deprecated from '@wordpress/deprecated';\nimport { createRoot, StrictMode } from '@wordpress/element';\nimport { dispatch, select } from '@wordpress/data';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tregisterLegacyWidgetBlock,\n\tregisterWidgetGroupBlock,\n} from '@wordpress/widgets';\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport Layout from './components/layout';\nimport { unlock } from './lock-unlock';\n\nconst {\n\tBackButton: __experimentalMainDashboardButton,\n\tregisterCoreBlockBindingsSources,\n} = unlock( editorPrivateApis );\n\n/**\n * Initializes and returns an instance of Editor.\n *\n * @param {string} id Unique identifier for editor instance.\n * @param {string} postType Post type of the post to edit.\n * @param {Object} postId ID of the post to edit.\n * @param {?Object} settings Editor settings object.\n * @param {Object} initialEdits Programmatic edits to apply initially, to be\n * considered as non-user-initiated (bypass for\n * unsaved changes prompt).\n */\nexport function initializeEditor(\n\tid,\n\tpostType,\n\tpostId,\n\tsettings,\n\tinitialEdits\n) {\n\tconst isMediumOrBigger = window.matchMedia( '(min-width: 782px)' ).matches;\n\tconst target = document.getElementById( id );\n\tconst root = createRoot( target );\n\n\tdispatch( preferencesStore ).setDefaults( 'core/edit-post', {\n\t\tfullscreenMode: true,\n\t\tthemeStyles: true,\n\t\twelcomeGuide: true,\n\t\twelcomeGuideTemplate: true,\n\t} );\n\n\tdispatch( preferencesStore ).setDefaults( 'core', {\n\t\tallowRightClickOverrides: true,\n\t\teditorMode: 'visual',\n\t\tfixedToolbar: false,\n\t\thiddenBlockTypes: [],\n\t\tinactivePanels: [],\n\t\topenPanels: [ 'post-status' ],\n\t\tshowBlockBreadcrumbs: true,\n\t\tshowIconLabels: false,\n\t\tshowListViewByDefault: false,\n\t\tenableChoosePatternModal: true,\n\t\tisPublishSidebarEnabled: true,\n\t} );\n\n\tif ( window.__experimentalMediaProcessing ) {\n\t\tdispatch( preferencesStore ).setDefaults( 'core/media', {\n\t\t\trequireApproval: true,\n\t\t\toptimizeOnUpload: true,\n\t\t} );\n\t}\n\n\tdispatch( blocksStore ).reapplyBlockTypeFilters();\n\n\t// Check if the block list view should be open by default.\n\t// If `distractionFree` mode is enabled, the block list view should not be open.\n\t// This behavior is disabled for small viewports.\n\tif (\n\t\tisMediumOrBigger &&\n\t\tselect( preferencesStore ).get( 'core', 'showListViewByDefault' ) &&\n\t\t! select( preferencesStore ).get( 'core', 'distractionFree' )\n\t) {\n\t\tdispatch( editorStore ).setIsListViewOpened( true );\n\t}\n\n\tregisterCoreBlocks();\n\tregisterCoreBlockBindingsSources();\n\tregisterLegacyWidgetBlock( { inserter: false } );\n\tregisterWidgetGroupBlock( { inserter: false } );\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t__experimentalRegisterExperimentalCoreBlocks( {\n\t\t\tenableFSEBlocks: settings.__unstableEnableFullSiteEditingBlocks,\n\t\t} );\n\t}\n\n\t// Show a console log warning if the browser is not in Standards rendering mode.\n\tconst documentMode =\n\t\tdocument.compatMode === 'CSS1Compat' ? 'Standards' : 'Quirks';\n\tif ( documentMode !== 'Standards' ) {\n\t\t// eslint-disable-next-line no-console\n\t\tconsole.warn(\n\t\t\t\"Your browser is using Quirks Mode. \\nThis can cause rendering issues such as blocks overlaying meta boxes in the editor. Quirks Mode can be triggered by PHP errors or HTML code appearing before the opening <!DOCTYPE html>. Try checking the raw page source or your site's PHP error log and resolving errors there, removing any HTML before the doctype, or disabling plugins.\"\n\t\t);\n\t}\n\n\t// This is a temporary fix for a couple of issues specific to Webkit on iOS.\n\t// Without this hack the browser scrolls the mobile toolbar off-screen.\n\t// Once supported in Safari we can replace this in favor of preventScroll.\n\t// For details see issue #18632 and PR #18686\n\t// Specifically, we scroll `interface-interface-skeleton__body` to enable a fixed top toolbar.\n\t// But Mobile Safari forces the `html` element to scroll upwards, hiding the toolbar.\n\n\tconst isIphone = window.navigator.userAgent.indexOf( 'iPhone' ) !== -1;\n\tif ( isIphone ) {\n\t\twindow.addEventListener( 'scroll', ( event ) => {\n\t\t\tconst editorScrollContainer = document.getElementsByClassName(\n\t\t\t\t'interface-interface-skeleton__body'\n\t\t\t)[ 0 ];\n\t\t\tif ( event.target === document ) {\n\t\t\t\t// Scroll element into view by scrolling the editor container by the same amount\n\t\t\t\t// that Mobile Safari tried to scroll the html element upwards.\n\t\t\t\tif ( window.scrollY > 100 ) {\n\t\t\t\t\teditorScrollContainer.scrollTop =\n\t\t\t\t\t\teditorScrollContainer.scrollTop + window.scrollY;\n\t\t\t\t}\n\t\t\t\t// Undo unwanted scroll on html element, but only in the visual editor.\n\t\t\t\tif (\n\t\t\t\t\tdocument.getElementsByClassName( 'is-mode-visual' )[ 0 ]\n\t\t\t\t) {\n\t\t\t\t\twindow.scrollTo( 0, 0 );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t// Prevent the default browser action for files dropped outside of dropzones.\n\twindow.addEventListener( 'dragover', ( e ) => e.preventDefault(), false );\n\twindow.addEventListener( 'drop', ( e ) => e.preventDefault(), false );\n\n\troot.render(\n\t\t<StrictMode>\n\t\t\t<Layout\n\t\t\t\tsettings={ settings }\n\t\t\t\tpostId={ postId }\n\t\t\t\tpostType={ postType }\n\t\t\t\tinitialEdits={ initialEdits }\n\t\t\t/>\n\t\t</StrictMode>\n\t);\n\n\treturn root;\n}\n\n/**\n * Used to reinitialize the editor after an error. Now it's a deprecated noop function.\n */\nexport function reinitializeEditor() {\n\tdeprecated( 'wp.editPost.reinitializeEditor', {\n\t\tsince: '6.2',\n\t\tversion: '6.3',\n\t} );\n}\n\nexport { default as __experimentalFullscreenModeClose } from './components/back-button/fullscreen-mode-close';\nexport { __experimentalMainDashboardButton };\nexport { store } from './store';\nexport * from './deprecated';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAIA,IAAAE,WAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AAIA,IAAAQ,OAAA,GAAAR,OAAA;AAQA,IAAAS,OAAA,GAAAN,sBAAA,CAAAH,OAAA;AACA,IAAAU,WAAA,GAAAV,OAAA;AAAuC,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,CAACsD,MAAM,cACV,IAAAxF,WAAA,CAAAyF,GAAA,EAAChG,QAAA,CAAAiG,UAAU;IAAAC,QAAA,eACV,IAAA3F,WAAA,CAAAyF,GAAA,EAAC3F,OAAA,CAAA8F,OAAM;MACNnE,QAAQ,EAAGA,QAAU;MACrBD,MAAM,EAAGA,MAAQ;MACjBD,QAAQ,EAAGA,QAAU;MACrBG,YAAY,EAAGA;IAAc,CAC7B;EAAC,CACS,CACb,CAAC;EAED,OAAOQ,IAAI;AACZ;;AAEA;AACA;AACA;AACO,SAAS2D,kBAAkBA,CAAA,EAAG;EACpC,IAAAC,mBAAU,EAAE,gCAAgC,EAAE;IAC7CC,KAAK,EAAE,KAAK;IACZC,OAAO,EAAE;EACV,CAAE,CAAC;AACJ","ignoreList":[]}
@@ -482,7 +482,7 @@ const initializeMetaBoxes = () => ({
482
482
  metaBoxesInitialized = true;
483
483
 
484
484
  // Save metaboxes on save completion, except for autosaves.
485
- (0, _hooks.addAction)('editor.savePost', 'core/edit-post/save-metaboxes', async options => {
485
+ (0, _hooks.addAction)('editor.savePost', 'core/edit-post/save-metaboxes', async (post, options) => {
486
486
  if (!options.isAutosave && select.hasMetaBoxes()) {
487
487
  await dispatch.requestMetaBoxUpdates();
488
488
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_apiFetch","_interopRequireDefault","require","_preferences","_editor","_deprecated","_hooks","_coreData","_metaBoxes","_lockUnlock","interfaceStore","unlock","editorPrivateApis","openGeneralSidebar","name","registry","dispatch","enableComplementaryArea","exports","closeGeneralSidebar","disableComplementaryArea","openModal","deprecated","since","alternative","closeModal","openPublishSidebar","editorStore","closePublishSidebar","togglePublishSidebar","toggleEditorPanelEnabled","panelName","toggleEditorPanelOpened","removeEditorPanel","toggleFeature","feature","preferencesStore","toggle","switchEditorMode","mode","togglePinnedPluginItem","pluginName","isPinned","select","isItemPinned","updatePreferredStyleVariations","hint","type","showBlockTypes","blockNames","hideBlockTypes","setAvailableMetaBoxesPerLocation","metaBoxesPerLocation","requestMetaBoxUpdates","window","tinyMCE","triggerSave","baseFormData","FormData","document","querySelector","postId","get","postType","post","coreStore","getEditedEntityRecord","additionalData","comment_status","ping_status","sticky","author","filter","Boolean","activeMetaBoxLocations","getActiveMetaBoxLocations","formDataToMerge","map","location","getMetaBoxContainer","formData","reduce","memo","currentFormData","key","value","append","forEach","apiFetch","url","_wpMetaBoxUrl","method","body","parse","metaBoxUpdatesSuccess","metaBoxUpdatesFailure","__experimentalSetPreviewDeviceType","deviceType","version","setDeviceType","setIsInserterOpened","setIsListViewOpened","isOpen","setIsEditingTemplate","__unstableCreateTemplate","metaBoxesInitialized","initializeMetaBoxes","isEditorReady","__unstableIsEditorReady","getCurrentPostType","postboxes","page","add_postbox_toggles","addAction","options","isAutosave","hasMetaBoxes","toggleDistractionFree"],"sources":["@wordpress/edit-post/src/store/actions.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport deprecated from '@wordpress/deprecated';\nimport { addAction } from '@wordpress/hooks';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { getMetaBoxContainer } from '../utils/meta-boxes';\nimport { unlock } from '../lock-unlock';\n\nconst { interfaceStore } = unlock( editorPrivateApis );\n\n/**\n * Returns an action object used in signalling that the user opened an editor sidebar.\n *\n * @param {?string} name Sidebar name to be opened.\n */\nexport const openGeneralSidebar =\n\t( name ) =>\n\t( { registry } ) => {\n\t\tregistry\n\t\t\t.dispatch( interfaceStore )\n\t\t\t.enableComplementaryArea( 'core', name );\n\t};\n\n/**\n * Returns an action object signalling that the user closed the sidebar.\n */\nexport const closeGeneralSidebar =\n\t() =>\n\t( { registry } ) =>\n\t\tregistry.dispatch( interfaceStore ).disableComplementaryArea( 'core' );\n\n/**\n * Returns an action object used in signalling that the user opened a modal.\n *\n * @deprecated since WP 6.3 use `core/interface` store's action with the same name instead.\n *\n *\n * @param {string} name A string that uniquely identifies the modal.\n *\n * @return {Object} Action object.\n */\nexport const openModal =\n\t( name ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"select( 'core/edit-post' ).openModal( name )\", {\n\t\t\tsince: '6.3',\n\t\t\talternative: \"select( 'core/interface').openModal( name )\",\n\t\t} );\n\t\treturn registry.dispatch( interfaceStore ).openModal( name );\n\t};\n\n/**\n * Returns an action object signalling that the user closed a modal.\n *\n * @deprecated since WP 6.3 use `core/interface` store's action with the same name instead.\n *\n * @return {Object} Action object.\n */\nexport const closeModal =\n\t() =>\n\t( { registry } ) => {\n\t\tdeprecated( \"select( 'core/edit-post' ).closeModal()\", {\n\t\t\tsince: '6.3',\n\t\t\talternative: \"select( 'core/interface').closeModal()\",\n\t\t} );\n\t\treturn registry.dispatch( interfaceStore ).closeModal();\n\t};\n\n/**\n * Returns an action object used in signalling that the user opened the publish\n * sidebar.\n * @deprecated\n *\n * @return {Object} Action object\n */\nexport const openPublishSidebar =\n\t() =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-post' ).openPublishSidebar\", {\n\t\t\tsince: '6.6',\n\t\t\talternative: \"dispatch( 'core/editor').openPublishSidebar\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).openPublishSidebar();\n\t};\n\n/**\n * Returns an action object used in signalling that the user closed the\n * publish sidebar.\n * @deprecated\n *\n * @return {Object} Action object.\n */\nexport const closePublishSidebar =\n\t() =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-post' ).closePublishSidebar\", {\n\t\t\tsince: '6.6',\n\t\t\talternative: \"dispatch( 'core/editor').closePublishSidebar\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).closePublishSidebar();\n\t};\n\n/**\n * Returns an action object used in signalling that the user toggles the publish sidebar.\n * @deprecated\n *\n * @return {Object} Action object\n */\nexport const togglePublishSidebar =\n\t() =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-post' ).togglePublishSidebar\", {\n\t\t\tsince: '6.6',\n\t\t\talternative: \"dispatch( 'core/editor').togglePublishSidebar\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).togglePublishSidebar();\n\t};\n\n/**\n * Returns an action object used to enable or disable a panel in the editor.\n *\n * @deprecated\n *\n * @param {string} panelName A string that identifies the panel to enable or disable.\n *\n * @return {Object} Action object.\n */\nexport const toggleEditorPanelEnabled =\n\t( panelName ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-post' ).toggleEditorPanelEnabled\", {\n\t\t\tsince: '6.5',\n\t\t\talternative: \"dispatch( 'core/editor').toggleEditorPanelEnabled\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).toggleEditorPanelEnabled( panelName );\n\t};\n\n/**\n * Opens a closed panel and closes an open panel.\n *\n * @deprecated\n *\n * @param {string} panelName A string that identifies the panel to open or close.\n */\nexport const toggleEditorPanelOpened =\n\t( panelName ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-post' ).toggleEditorPanelOpened\", {\n\t\t\tsince: '6.5',\n\t\t\talternative: \"dispatch( 'core/editor').toggleEditorPanelOpened\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).toggleEditorPanelOpened( panelName );\n\t};\n\n/**\n * Returns an action object used to remove a panel from the editor.\n *\n * @deprecated\n *\n * @param {string} panelName A string that identifies the panel to remove.\n *\n * @return {Object} Action object.\n */\nexport const removeEditorPanel =\n\t( panelName ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-post' ).removeEditorPanel\", {\n\t\t\tsince: '6.5',\n\t\t\talternative: \"dispatch( 'core/editor').removeEditorPanel\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).removeEditorPanel( panelName );\n\t};\n\n/**\n * Triggers an action used to toggle a feature flag.\n *\n * @param {string} feature Feature name.\n */\nexport const toggleFeature =\n\t( feature ) =>\n\t( { registry } ) =>\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.toggle( 'core/edit-post', feature );\n\n/**\n * Triggers an action used to switch editor mode.\n *\n * @deprecated\n *\n * @param {string} mode The editor mode.\n */\nexport const switchEditorMode =\n\t( mode ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-post' ).switchEditorMode\", {\n\t\t\tsince: '6.6',\n\t\t\talternative: \"dispatch( 'core/editor').switchEditorMode\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).switchEditorMode( mode );\n\t};\n\n/**\n * Triggers an action object used to toggle a plugin name flag.\n *\n * @param {string} pluginName Plugin name.\n */\nexport const togglePinnedPluginItem =\n\t( pluginName ) =>\n\t( { registry } ) => {\n\t\tconst isPinned = registry\n\t\t\t.select( interfaceStore )\n\t\t\t.isItemPinned( 'core', pluginName );\n\n\t\tregistry\n\t\t\t.dispatch( interfaceStore )\n\t\t\t[ isPinned ? 'unpinItem' : 'pinItem' ]( 'core', pluginName );\n\t};\n\n/**\n * Returns an action object used in signaling that a style should be auto-applied when a block is created.\n *\n * @deprecated\n */\nexport function updatePreferredStyleVariations() {\n\tdeprecated( \"dispatch( 'core/edit-post' ).updatePreferredStyleVariations\", {\n\t\tsince: '6.6',\n\t\thint: 'Preferred Style Variations are not supported anymore.',\n\t} );\n\treturn { type: 'NOTHING' };\n}\n\n/**\n * Update the provided block types to be visible.\n *\n * @param {string[]} blockNames Names of block types to show.\n */\nexport const showBlockTypes =\n\t( blockNames ) =>\n\t( { registry } ) => {\n\t\tunlock( registry.dispatch( editorStore ) ).showBlockTypes( blockNames );\n\t};\n\n/**\n * Update the provided block types to be hidden.\n *\n * @param {string[]} blockNames Names of block types to hide.\n */\nexport const hideBlockTypes =\n\t( blockNames ) =>\n\t( { registry } ) => {\n\t\tunlock( registry.dispatch( editorStore ) ).hideBlockTypes( blockNames );\n\t};\n\n/**\n * Stores info about which Meta boxes are available in which location.\n *\n * @param {Object} metaBoxesPerLocation Meta boxes per location.\n */\nexport function setAvailableMetaBoxesPerLocation( metaBoxesPerLocation ) {\n\treturn {\n\t\ttype: 'SET_META_BOXES_PER_LOCATIONS',\n\t\tmetaBoxesPerLocation,\n\t};\n}\n\n/**\n * Update a metabox.\n */\nexport const requestMetaBoxUpdates =\n\t() =>\n\tasync ( { registry, select, dispatch } ) => {\n\t\tdispatch( {\n\t\t\ttype: 'REQUEST_META_BOX_UPDATES',\n\t\t} );\n\n\t\t// Saves the wp_editor fields.\n\t\tif ( window.tinyMCE ) {\n\t\t\twindow.tinyMCE.triggerSave();\n\t\t}\n\n\t\t// We gather the base form data.\n\t\tconst baseFormData = new window.FormData(\n\t\t\tdocument.querySelector( '.metabox-base-form' )\n\t\t);\n\n\t\tconst postId = baseFormData.get( 'post_ID' );\n\t\tconst postType = baseFormData.get( 'post_type' );\n\n\t\t// Additional data needed for backward compatibility.\n\t\t// If we do not provide this data, the post will be overridden with the default values.\n\t\t// We cannot rely on getCurrentPost because right now on the editor we may be editing a pattern or a template.\n\t\t// We need to retrieve the post that the base form data is referring to.\n\t\tconst post = registry\n\t\t\t.select( coreStore )\n\t\t\t.getEditedEntityRecord( 'postType', postType, postId );\n\t\tconst additionalData = [\n\t\t\tpost.comment_status\n\t\t\t\t? [ 'comment_status', post.comment_status ]\n\t\t\t\t: false,\n\t\t\tpost.ping_status ? [ 'ping_status', post.ping_status ] : false,\n\t\t\tpost.sticky ? [ 'sticky', post.sticky ] : false,\n\t\t\tpost.author ? [ 'post_author', post.author ] : false,\n\t\t].filter( Boolean );\n\n\t\t// We gather all the metaboxes locations.\n\t\tconst activeMetaBoxLocations = select.getActiveMetaBoxLocations();\n\t\tconst formDataToMerge = [\n\t\t\tbaseFormData,\n\t\t\t...activeMetaBoxLocations.map(\n\t\t\t\t( location ) =>\n\t\t\t\t\tnew window.FormData( getMetaBoxContainer( location ) )\n\t\t\t),\n\t\t];\n\n\t\t// Merge all form data objects into a single one.\n\t\tconst formData = formDataToMerge.reduce( ( memo, currentFormData ) => {\n\t\t\tfor ( const [ key, value ] of currentFormData ) {\n\t\t\t\tmemo.append( key, value );\n\t\t\t}\n\t\t\treturn memo;\n\t\t}, new window.FormData() );\n\t\tadditionalData.forEach( ( [ key, value ] ) =>\n\t\t\tformData.append( key, value )\n\t\t);\n\n\t\ttry {\n\t\t\t// Save the metaboxes.\n\t\t\tawait apiFetch( {\n\t\t\t\turl: window._wpMetaBoxUrl,\n\t\t\t\tmethod: 'POST',\n\t\t\t\tbody: formData,\n\t\t\t\tparse: false,\n\t\t\t} );\n\t\t\tdispatch.metaBoxUpdatesSuccess();\n\t\t} catch {\n\t\t\tdispatch.metaBoxUpdatesFailure();\n\t\t}\n\t};\n\n/**\n * Returns an action object used to signal a successful meta box update.\n *\n * @return {Object} Action object.\n */\nexport function metaBoxUpdatesSuccess() {\n\treturn {\n\t\ttype: 'META_BOX_UPDATES_SUCCESS',\n\t};\n}\n\n/**\n * Returns an action object used to signal a failed meta box update.\n *\n * @return {Object} Action object.\n */\nexport function metaBoxUpdatesFailure() {\n\treturn {\n\t\ttype: 'META_BOX_UPDATES_FAILURE',\n\t};\n}\n\n/**\n * Action that changes the width of the editing canvas.\n *\n * @deprecated\n *\n * @param {string} deviceType\n */\nexport const __experimentalSetPreviewDeviceType =\n\t( deviceType ) =>\n\t( { registry } ) => {\n\t\tdeprecated(\n\t\t\t\"dispatch( 'core/edit-post' ).__experimentalSetPreviewDeviceType\",\n\t\t\t{\n\t\t\t\tsince: '6.5',\n\t\t\t\tversion: '6.7',\n\t\t\t\thint: 'registry.dispatch( editorStore ).setDeviceType',\n\t\t\t}\n\t\t);\n\t\tregistry.dispatch( editorStore ).setDeviceType( deviceType );\n\t};\n\n/**\n * Returns an action object used to open/close the inserter.\n *\n * @deprecated\n *\n * @param {boolean|Object} value Whether the inserter should be opened (true) or closed (false).\n */\nexport const setIsInserterOpened =\n\t( value ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-post' ).setIsInserterOpened\", {\n\t\t\tsince: '6.5',\n\t\t\talternative: \"dispatch( 'core/editor').setIsInserterOpened\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).setIsInserterOpened( value );\n\t};\n\n/**\n * Returns an action object used to open/close the list view.\n *\n * @deprecated\n *\n * @param {boolean} isOpen A boolean representing whether the list view should be opened or closed.\n */\nexport const setIsListViewOpened =\n\t( isOpen ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-post' ).setIsListViewOpened\", {\n\t\t\tsince: '6.5',\n\t\t\talternative: \"dispatch( 'core/editor').setIsListViewOpened\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).setIsListViewOpened( isOpen );\n\t};\n\n/**\n * Returns an action object used to switch to template editing.\n *\n * @deprecated\n */\nexport function setIsEditingTemplate() {\n\tdeprecated( \"dispatch( 'core/edit-post' ).setIsEditingTemplate\", {\n\t\tsince: '6.5',\n\t\talternative: \"dispatch( 'core/editor').setRenderingMode\",\n\t} );\n\treturn { type: 'NOTHING' };\n}\n\n/**\n * Create a block based template.\n *\n * @deprecated\n */\nexport function __unstableCreateTemplate() {\n\tdeprecated( \"dispatch( 'core/edit-post' ).__unstableCreateTemplate\", {\n\t\tsince: '6.5',\n\t} );\n\treturn { type: 'NOTHING' };\n}\n\nlet metaBoxesInitialized = false;\n\n/**\n * Initializes WordPress `postboxes` script and the logic for saving meta boxes.\n */\nexport const initializeMetaBoxes =\n\t() =>\n\t( { registry, select, dispatch } ) => {\n\t\tconst isEditorReady = registry\n\t\t\t.select( editorStore )\n\t\t\t.__unstableIsEditorReady();\n\n\t\tif ( ! isEditorReady ) {\n\t\t\treturn;\n\t\t}\n\t\t// Only initialize once.\n\t\tif ( metaBoxesInitialized ) {\n\t\t\treturn;\n\t\t}\n\t\tconst postType = registry.select( editorStore ).getCurrentPostType();\n\t\tif ( window.postboxes.page !== postType ) {\n\t\t\twindow.postboxes.add_postbox_toggles( postType );\n\t\t}\n\n\t\tmetaBoxesInitialized = true;\n\n\t\t// Save metaboxes on save completion, except for autosaves.\n\t\taddAction(\n\t\t\t'editor.savePost',\n\t\t\t'core/edit-post/save-metaboxes',\n\t\t\tasync ( options ) => {\n\t\t\t\tif ( ! options.isAutosave && select.hasMetaBoxes() ) {\n\t\t\t\t\tawait dispatch.requestMetaBoxUpdates();\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\tdispatch( {\n\t\t\ttype: 'META_BOXES_INITIALIZED',\n\t\t} );\n\t};\n\n/**\n * Action that toggles Distraction free mode.\n * Distraction free mode expects there are no sidebars, as due to the\n * z-index values set, you can't close sidebars.\n *\n * @deprecated\n */\nexport const toggleDistractionFree =\n\t() =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-post' ).toggleDistractionFree\", {\n\t\t\tsince: '6.6',\n\t\t\talternative: \"dispatch( 'core/editor').toggleDistractionFree\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).toggleDistractionFree();\n\t};\n"],"mappings":";;;;;;;;;;;;;;;;AAGA,IAAAA,SAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAIA,IAAAG,WAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AAKA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AAjBA;AACA;AACA;;AAWA;AACA;AACA;;AAIA,MAAM;EAAEQ;AAAe,CAAC,GAAG,IAAAC,kBAAM,EAAEC,mBAAkB,CAAC;;AAEtD;AACA;AACA;AACA;AACA;AACO,MAAMC,kBAAkB,GAC5BC,IAAI,IACN,CAAE;EAAEC;AAAS,CAAC,KAAM;EACnBA,QAAQ,CACNC,QAAQ,CAAEN,cAAe,CAAC,CAC1BO,uBAAuB,CAAE,MAAM,EAAEH,IAAK,CAAC;A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qBAAqB,CAAC,CAAC;AACzD,CAAC;AAACnG,OAAA,CAAAmG,qBAAA,GAAAA,qBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_apiFetch","_interopRequireDefault","require","_preferences","_editor","_deprecated","_hooks","_coreData","_metaBoxes","_lockUnlock","interfaceStore","unlock","editorPrivateApis","openGeneralSidebar","name","registry","dispatch","enableComplementaryArea","exports","closeGeneralSidebar","disableComplementaryArea","openModal","deprecated","since","alternative","closeModal","openPublishSidebar","editorStore","closePublishSidebar","togglePublishSidebar","toggleEditorPanelEnabled","panelName","toggleEditorPanelOpened","removeEditorPanel","toggleFeature","feature","preferencesStore","toggle","switchEditorMode","mode","togglePinnedPluginItem","pluginName","isPinned","select","isItemPinned","updatePreferredStyleVariations","hint","type","showBlockTypes","blockNames","hideBlockTypes","setAvailableMetaBoxesPerLocation","metaBoxesPerLocation","requestMetaBoxUpdates","window","tinyMCE","triggerSave","baseFormData","FormData","document","querySelector","postId","get","postType","post","coreStore","getEditedEntityRecord","additionalData","comment_status","ping_status","sticky","author","filter","Boolean","activeMetaBoxLocations","getActiveMetaBoxLocations","formDataToMerge","map","location","getMetaBoxContainer","formData","reduce","memo","currentFormData","key","value","append","forEach","apiFetch","url","_wpMetaBoxUrl","method","body","parse","metaBoxUpdatesSuccess","metaBoxUpdatesFailure","__experimentalSetPreviewDeviceType","deviceType","version","setDeviceType","setIsInserterOpened","setIsListViewOpened","isOpen","setIsEditingTemplate","__unstableCreateTemplate","metaBoxesInitialized","initializeMetaBoxes","isEditorReady","__unstableIsEditorReady","getCurrentPostType","postboxes","page","add_postbox_toggles","addAction","options","isAutosave","hasMetaBoxes","toggleDistractionFree"],"sources":["@wordpress/edit-post/src/store/actions.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport deprecated from '@wordpress/deprecated';\nimport { addAction } from '@wordpress/hooks';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { getMetaBoxContainer } from '../utils/meta-boxes';\nimport { unlock } from '../lock-unlock';\n\nconst { interfaceStore } = unlock( editorPrivateApis );\n\n/**\n * Returns an action object used in signalling that the user opened an editor sidebar.\n *\n * @param {?string} name Sidebar name to be opened.\n */\nexport const openGeneralSidebar =\n\t( name ) =>\n\t( { registry } ) => {\n\t\tregistry\n\t\t\t.dispatch( interfaceStore )\n\t\t\t.enableComplementaryArea( 'core', name );\n\t};\n\n/**\n * Returns an action object signalling that the user closed the sidebar.\n */\nexport const closeGeneralSidebar =\n\t() =>\n\t( { registry } ) =>\n\t\tregistry.dispatch( interfaceStore ).disableComplementaryArea( 'core' );\n\n/**\n * Returns an action object used in signalling that the user opened a modal.\n *\n * @deprecated since WP 6.3 use `core/interface` store's action with the same name instead.\n *\n *\n * @param {string} name A string that uniquely identifies the modal.\n *\n * @return {Object} Action object.\n */\nexport const openModal =\n\t( name ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"select( 'core/edit-post' ).openModal( name )\", {\n\t\t\tsince: '6.3',\n\t\t\talternative: \"select( 'core/interface').openModal( name )\",\n\t\t} );\n\t\treturn registry.dispatch( interfaceStore ).openModal( name );\n\t};\n\n/**\n * Returns an action object signalling that the user closed a modal.\n *\n * @deprecated since WP 6.3 use `core/interface` store's action with the same name instead.\n *\n * @return {Object} Action object.\n */\nexport const closeModal =\n\t() =>\n\t( { registry } ) => {\n\t\tdeprecated( \"select( 'core/edit-post' ).closeModal()\", {\n\t\t\tsince: '6.3',\n\t\t\talternative: \"select( 'core/interface').closeModal()\",\n\t\t} );\n\t\treturn registry.dispatch( interfaceStore ).closeModal();\n\t};\n\n/**\n * Returns an action object used in signalling that the user opened the publish\n * sidebar.\n * @deprecated\n *\n * @return {Object} Action object\n */\nexport const openPublishSidebar =\n\t() =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-post' ).openPublishSidebar\", {\n\t\t\tsince: '6.6',\n\t\t\talternative: \"dispatch( 'core/editor').openPublishSidebar\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).openPublishSidebar();\n\t};\n\n/**\n * Returns an action object used in signalling that the user closed the\n * publish sidebar.\n * @deprecated\n *\n * @return {Object} Action object.\n */\nexport const closePublishSidebar =\n\t() =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-post' ).closePublishSidebar\", {\n\t\t\tsince: '6.6',\n\t\t\talternative: \"dispatch( 'core/editor').closePublishSidebar\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).closePublishSidebar();\n\t};\n\n/**\n * Returns an action object used in signalling that the user toggles the publish sidebar.\n * @deprecated\n *\n * @return {Object} Action object\n */\nexport const togglePublishSidebar =\n\t() =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-post' ).togglePublishSidebar\", {\n\t\t\tsince: '6.6',\n\t\t\talternative: \"dispatch( 'core/editor').togglePublishSidebar\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).togglePublishSidebar();\n\t};\n\n/**\n * Returns an action object used to enable or disable a panel in the editor.\n *\n * @deprecated\n *\n * @param {string} panelName A string that identifies the panel to enable or disable.\n *\n * @return {Object} Action object.\n */\nexport const toggleEditorPanelEnabled =\n\t( panelName ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-post' ).toggleEditorPanelEnabled\", {\n\t\t\tsince: '6.5',\n\t\t\talternative: \"dispatch( 'core/editor').toggleEditorPanelEnabled\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).toggleEditorPanelEnabled( panelName );\n\t};\n\n/**\n * Opens a closed panel and closes an open panel.\n *\n * @deprecated\n *\n * @param {string} panelName A string that identifies the panel to open or close.\n */\nexport const toggleEditorPanelOpened =\n\t( panelName ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-post' ).toggleEditorPanelOpened\", {\n\t\t\tsince: '6.5',\n\t\t\talternative: \"dispatch( 'core/editor').toggleEditorPanelOpened\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).toggleEditorPanelOpened( panelName );\n\t};\n\n/**\n * Returns an action object used to remove a panel from the editor.\n *\n * @deprecated\n *\n * @param {string} panelName A string that identifies the panel to remove.\n *\n * @return {Object} Action object.\n */\nexport const removeEditorPanel =\n\t( panelName ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-post' ).removeEditorPanel\", {\n\t\t\tsince: '6.5',\n\t\t\talternative: \"dispatch( 'core/editor').removeEditorPanel\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).removeEditorPanel( panelName );\n\t};\n\n/**\n * Triggers an action used to toggle a feature flag.\n *\n * @param {string} feature Feature name.\n */\nexport const toggleFeature =\n\t( feature ) =>\n\t( { registry } ) =>\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.toggle( 'core/edit-post', feature );\n\n/**\n * Triggers an action used to switch editor mode.\n *\n * @deprecated\n *\n * @param {string} mode The editor mode.\n */\nexport const switchEditorMode =\n\t( mode ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-post' ).switchEditorMode\", {\n\t\t\tsince: '6.6',\n\t\t\talternative: \"dispatch( 'core/editor').switchEditorMode\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).switchEditorMode( mode );\n\t};\n\n/**\n * Triggers an action object used to toggle a plugin name flag.\n *\n * @param {string} pluginName Plugin name.\n */\nexport const togglePinnedPluginItem =\n\t( pluginName ) =>\n\t( { registry } ) => {\n\t\tconst isPinned = registry\n\t\t\t.select( interfaceStore )\n\t\t\t.isItemPinned( 'core', pluginName );\n\n\t\tregistry\n\t\t\t.dispatch( interfaceStore )\n\t\t\t[ isPinned ? 'unpinItem' : 'pinItem' ]( 'core', pluginName );\n\t};\n\n/**\n * Returns an action object used in signaling that a style should be auto-applied when a block is created.\n *\n * @deprecated\n */\nexport function updatePreferredStyleVariations() {\n\tdeprecated( \"dispatch( 'core/edit-post' ).updatePreferredStyleVariations\", {\n\t\tsince: '6.6',\n\t\thint: 'Preferred Style Variations are not supported anymore.',\n\t} );\n\treturn { type: 'NOTHING' };\n}\n\n/**\n * Update the provided block types to be visible.\n *\n * @param {string[]} blockNames Names of block types to show.\n */\nexport const showBlockTypes =\n\t( blockNames ) =>\n\t( { registry } ) => {\n\t\tunlock( registry.dispatch( editorStore ) ).showBlockTypes( blockNames );\n\t};\n\n/**\n * Update the provided block types to be hidden.\n *\n * @param {string[]} blockNames Names of block types to hide.\n */\nexport const hideBlockTypes =\n\t( blockNames ) =>\n\t( { registry } ) => {\n\t\tunlock( registry.dispatch( editorStore ) ).hideBlockTypes( blockNames );\n\t};\n\n/**\n * Stores info about which Meta boxes are available in which location.\n *\n * @param {Object} metaBoxesPerLocation Meta boxes per location.\n */\nexport function setAvailableMetaBoxesPerLocation( metaBoxesPerLocation ) {\n\treturn {\n\t\ttype: 'SET_META_BOXES_PER_LOCATIONS',\n\t\tmetaBoxesPerLocation,\n\t};\n}\n\n/**\n * Update a metabox.\n */\nexport const requestMetaBoxUpdates =\n\t() =>\n\tasync ( { registry, select, dispatch } ) => {\n\t\tdispatch( {\n\t\t\ttype: 'REQUEST_META_BOX_UPDATES',\n\t\t} );\n\n\t\t// Saves the wp_editor fields.\n\t\tif ( window.tinyMCE ) {\n\t\t\twindow.tinyMCE.triggerSave();\n\t\t}\n\n\t\t// We gather the base form data.\n\t\tconst baseFormData = new window.FormData(\n\t\t\tdocument.querySelector( '.metabox-base-form' )\n\t\t);\n\n\t\tconst postId = baseFormData.get( 'post_ID' );\n\t\tconst postType = baseFormData.get( 'post_type' );\n\n\t\t// Additional data needed for backward compatibility.\n\t\t// If we do not provide this data, the post will be overridden with the default values.\n\t\t// We cannot rely on getCurrentPost because right now on the editor we may be editing a pattern or a template.\n\t\t// We need to retrieve the post that the base form data is referring to.\n\t\tconst post = registry\n\t\t\t.select( coreStore )\n\t\t\t.getEditedEntityRecord( 'postType', postType, postId );\n\t\tconst additionalData = [\n\t\t\tpost.comment_status\n\t\t\t\t? [ 'comment_status', post.comment_status ]\n\t\t\t\t: false,\n\t\t\tpost.ping_status ? [ 'ping_status', post.ping_status ] : false,\n\t\t\tpost.sticky ? [ 'sticky', post.sticky ] : false,\n\t\t\tpost.author ? [ 'post_author', post.author ] : false,\n\t\t].filter( Boolean );\n\n\t\t// We gather all the metaboxes locations.\n\t\tconst activeMetaBoxLocations = select.getActiveMetaBoxLocations();\n\t\tconst formDataToMerge = [\n\t\t\tbaseFormData,\n\t\t\t...activeMetaBoxLocations.map(\n\t\t\t\t( location ) =>\n\t\t\t\t\tnew window.FormData( getMetaBoxContainer( location ) )\n\t\t\t),\n\t\t];\n\n\t\t// Merge all form data objects into a single one.\n\t\tconst formData = formDataToMerge.reduce( ( memo, currentFormData ) => {\n\t\t\tfor ( const [ key, value ] of currentFormData ) {\n\t\t\t\tmemo.append( key, value );\n\t\t\t}\n\t\t\treturn memo;\n\t\t}, new window.FormData() );\n\t\tadditionalData.forEach( ( [ key, value ] ) =>\n\t\t\tformData.append( key, value )\n\t\t);\n\n\t\ttry {\n\t\t\t// Save the metaboxes.\n\t\t\tawait apiFetch( {\n\t\t\t\turl: window._wpMetaBoxUrl,\n\t\t\t\tmethod: 'POST',\n\t\t\t\tbody: formData,\n\t\t\t\tparse: false,\n\t\t\t} );\n\t\t\tdispatch.metaBoxUpdatesSuccess();\n\t\t} catch {\n\t\t\tdispatch.metaBoxUpdatesFailure();\n\t\t}\n\t};\n\n/**\n * Returns an action object used to signal a successful meta box update.\n *\n * @return {Object} Action object.\n */\nexport function metaBoxUpdatesSuccess() {\n\treturn {\n\t\ttype: 'META_BOX_UPDATES_SUCCESS',\n\t};\n}\n\n/**\n * Returns an action object used to signal a failed meta box update.\n *\n * @return {Object} Action object.\n */\nexport function metaBoxUpdatesFailure() {\n\treturn {\n\t\ttype: 'META_BOX_UPDATES_FAILURE',\n\t};\n}\n\n/**\n * Action that changes the width of the editing canvas.\n *\n * @deprecated\n *\n * @param {string} deviceType\n */\nexport const __experimentalSetPreviewDeviceType =\n\t( deviceType ) =>\n\t( { registry } ) => {\n\t\tdeprecated(\n\t\t\t\"dispatch( 'core/edit-post' ).__experimentalSetPreviewDeviceType\",\n\t\t\t{\n\t\t\t\tsince: '6.5',\n\t\t\t\tversion: '6.7',\n\t\t\t\thint: 'registry.dispatch( editorStore ).setDeviceType',\n\t\t\t}\n\t\t);\n\t\tregistry.dispatch( editorStore ).setDeviceType( deviceType );\n\t};\n\n/**\n * Returns an action object used to open/close the inserter.\n *\n * @deprecated\n *\n * @param {boolean|Object} value Whether the inserter should be opened (true) or closed (false).\n */\nexport const setIsInserterOpened =\n\t( value ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-post' ).setIsInserterOpened\", {\n\t\t\tsince: '6.5',\n\t\t\talternative: \"dispatch( 'core/editor').setIsInserterOpened\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).setIsInserterOpened( value );\n\t};\n\n/**\n * Returns an action object used to open/close the list view.\n *\n * @deprecated\n *\n * @param {boolean} isOpen A boolean representing whether the list view should be opened or closed.\n */\nexport const setIsListViewOpened =\n\t( isOpen ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-post' ).setIsListViewOpened\", {\n\t\t\tsince: '6.5',\n\t\t\talternative: \"dispatch( 'core/editor').setIsListViewOpened\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).setIsListViewOpened( isOpen );\n\t};\n\n/**\n * Returns an action object used to switch to template editing.\n *\n * @deprecated\n */\nexport function setIsEditingTemplate() {\n\tdeprecated( \"dispatch( 'core/edit-post' ).setIsEditingTemplate\", {\n\t\tsince: '6.5',\n\t\talternative: \"dispatch( 'core/editor').setRenderingMode\",\n\t} );\n\treturn { type: 'NOTHING' };\n}\n\n/**\n * Create a block based template.\n *\n * @deprecated\n */\nexport function __unstableCreateTemplate() {\n\tdeprecated( \"dispatch( 'core/edit-post' ).__unstableCreateTemplate\", {\n\t\tsince: '6.5',\n\t} );\n\treturn { type: 'NOTHING' };\n}\n\nlet metaBoxesInitialized = false;\n\n/**\n * Initializes WordPress `postboxes` script and the logic for saving meta boxes.\n */\nexport const initializeMetaBoxes =\n\t() =>\n\t( { registry, select, dispatch } ) => {\n\t\tconst isEditorReady = registry\n\t\t\t.select( editorStore )\n\t\t\t.__unstableIsEditorReady();\n\n\t\tif ( ! isEditorReady ) {\n\t\t\treturn;\n\t\t}\n\t\t// Only initialize once.\n\t\tif ( metaBoxesInitialized ) {\n\t\t\treturn;\n\t\t}\n\t\tconst postType = registry.select( editorStore ).getCurrentPostType();\n\t\tif ( window.postboxes.page !== postType ) {\n\t\t\twindow.postboxes.add_postbox_toggles( postType );\n\t\t}\n\n\t\tmetaBoxesInitialized = true;\n\n\t\t// Save metaboxes on save completion, except for autosaves.\n\t\taddAction(\n\t\t\t'editor.savePost',\n\t\t\t'core/edit-post/save-metaboxes',\n\t\t\tasync ( post, options ) => {\n\t\t\t\tif ( ! options.isAutosave && select.hasMetaBoxes() ) {\n\t\t\t\t\tawait dispatch.requestMetaBoxUpdates();\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\tdispatch( {\n\t\t\ttype: 'META_BOXES_INITIALIZED',\n\t\t} );\n\t};\n\n/**\n * Action that toggles Distraction free mode.\n * Distraction free mode expects there are no sidebars, as due to the\n * z-index values set, you can't close sidebars.\n *\n * @deprecated\n */\nexport const toggleDistractionFree =\n\t() =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-post' ).toggleDistractionFree\", {\n\t\t\tsince: '6.6',\n\t\t\talternative: \"dispatch( 'core/editor').toggleDistractionFree\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).toggleDistractionFree();\n\t};\n"],"mappings":";;;;;;;;;;;;;;;;AAGA,IAAAA,SAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,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kD,OAAO,KAAM;IAC1B,IAAK,CAAEA,OAAO,CAACC,UAAU,IAAIxE,MAAM,CAACyE,YAAY,CAAC,CAAC,EAAG;MACpD,MAAMpG,QAAQ,CAACqC,qBAAqB,CAAC,CAAC;IACvC;EACD,CACD,CAAC;EAEDrC,QAAQ,CAAE;IACT+B,IAAI,EAAE;EACP,CAAE,CAAC;AACJ,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AANA7B,OAAA,CAAAwF,mBAAA,GAAAA,mBAAA;AAOO,MAAMW,qBAAqB,GACjCA,CAAA,KACA,CAAE;EAAEtG;AAAS,CAAC,KAAM;EACnB,IAAAO,mBAAU,EAAE,oDAAoD,EAAE;IACjEC,KAAK,EAAE,KAAK;IACZC,WAAW,EAAE;EACd,CAAE,CAAC;EACHT,QAAQ,CAACC,QAAQ,CAAEW,aAAY,CAAC,CAAC0F,qBAAqB,CAAC,CAAC;AACzD,CAAC;AAACnG,OAAA,CAAAmG,qBAAA,GAAAA,qBAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","_coreData","_editor","getEditedPostTemplateId","exports","createRegistrySelector","select","id","postId","type","postType","slug","editorStore","getCurrentPost","getEntityRecord","getEntityRecords","canUser","coreStore","siteSettings","kind","name","undefined","isPostsPage","page_for_posts","getDefaultTemplateId","currentTemplate","getEditedPostAttribute","templateWithSameSlug","per_page","find","template","slugToCheck"],"sources":["@wordpress/edit-post/src/store/private-selectors.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createRegistrySelector } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as editorStore } from '@wordpress/editor';\n\nexport const getEditedPostTemplateId = createRegistrySelector(\n\t( select ) => () => {\n\t\tconst {\n\t\t\tid: postId,\n\t\t\ttype: postType,\n\t\t\tslug,\n\t\t} = select( editorStore ).getCurrentPost();\n\t\tconst { getEntityRecord, getEntityRecords, canUser } =\n\t\t\tselect( coreStore );\n\t\tconst siteSettings = canUser( 'read', {\n\t\t\tkind: 'root',\n\t\t\tname: 'site',\n\t\t} )\n\t\t\t? getEntityRecord( 'root', 'site' )\n\t\t\t: undefined;\n\t\t// First check if the current page is set as the posts page.\n\t\tconst isPostsPage = +postId === siteSettings?.page_for_posts;\n\t\tif ( isPostsPage ) {\n\t\t\treturn select( coreStore ).getDefaultTemplateId( { slug: 'home' } );\n\t\t}\n\t\tconst currentTemplate =\n\t\t\tselect( editorStore ).getEditedPostAttribute( 'template' );\n\t\tif ( currentTemplate ) {\n\t\t\tconst templateWithSameSlug = getEntityRecords(\n\t\t\t\t'postType',\n\t\t\t\t'wp_template',\n\t\t\t\t{ per_page: -1 }\n\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 templateWithSameSlug.id;\n\t\t}\n\t\tlet slugToCheck;\n\t\t// In `draft` status we might not have a slug available, so we use the `single`\n\t\t// post type templates slug(ex page, single-post, single-product etc..).\n\t\t// Pages do not need the `single` prefix in the slug to be prioritized\n\t\t// through template hierarchy.\n\t\tif ( slug ) {\n\t\t\tslugToCheck =\n\t\t\t\tpostType === 'page'\n\t\t\t\t\t? `${ postType }-${ slug }`\n\t\t\t\t\t: `single-${ postType }-${ slug }`;\n\t\t} else {\n\t\t\tslugToCheck = postType === 'page' ? 'page' : `single-${ postType }`;\n\t\t}\n\n\t\tif ( postType ) {\n\t\t\treturn select( coreStore ).getDefaultTemplateId( {\n\t\t\t\tslug: slugToCheck,\n\t\t\t} );\n\t\t}\n\t}\n);\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AALA;AACA;AACA;;AAKO,MAAMG,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAG,IAAAE,4BAAsB,EAC1DC,MAAM,IAAM,MAAM;EACnB,MA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AG,MAAM,GAAI,UAAUA,QAAU,EAAC;EACpE;EAEA,IAAKA,QAAQ,EAAG;IACf,OAAOJ,MAAM,CAAEW,eAAU,CAAC,CAACO,oBAAoB,CAAE;MAChDb,IAAI,EAAEoB;IACP,CAAE,CAAC;EACJ;AACD,CACD,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_data","require","_coreData","_editor","getEditedPostTemplateId","exports","createRegistrySelector","select","id","postId","type","postType","slug","editorStore","getCurrentPost","getEntityRecord","getEntityRecords","canUser","coreStore","siteSettings","kind","name","undefined","isPostsPage","page_for_posts","getDefaultTemplateId","currentTemplate","getEditedPostAttribute","templateWithSameSlug","per_page","find","template","slugToCheck"],"sources":["@wordpress/edit-post/src/store/private-selectors.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createRegistrySelector } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as editorStore } from '@wordpress/editor';\n\nexport const getEditedPostTemplateId = createRegistrySelector(\n\t( select ) => () => {\n\t\tconst {\n\t\t\tid: postId,\n\t\t\ttype: postType,\n\t\t\tslug,\n\t\t} = select( editorStore ).getCurrentPost();\n\t\tconst { getEntityRecord, getEntityRecords, canUser } =\n\t\t\tselect( coreStore );\n\t\tconst siteSettings = canUser( 'read', {\n\t\t\tkind: 'root',\n\t\t\tname: 'site',\n\t\t} )\n\t\t\t? getEntityRecord( 'root', 'site' )\n\t\t\t: undefined;\n\t\t// First check if the current page is set as the posts page.\n\t\tconst isPostsPage = +postId === siteSettings?.page_for_posts;\n\t\tif ( isPostsPage ) {\n\t\t\treturn select( coreStore ).getDefaultTemplateId( { slug: 'home' } );\n\t\t}\n\t\tconst currentTemplate =\n\t\t\tselect( editorStore ).getEditedPostAttribute( 'template' );\n\t\tif ( currentTemplate ) {\n\t\t\tconst templateWithSameSlug = getEntityRecords(\n\t\t\t\t'postType',\n\t\t\t\t'wp_template',\n\t\t\t\t{ per_page: -1 }\n\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 templateWithSameSlug.id;\n\t\t}\n\t\tlet slugToCheck;\n\t\t// In `draft` status we might not have a slug available, so we use the `single`\n\t\t// post type templates slug(ex page, single-post, single-product etc..).\n\t\t// Pages do not need the `single` prefix in the slug to be prioritized\n\t\t// through template hierarchy.\n\t\tif ( slug ) {\n\t\t\tslugToCheck =\n\t\t\t\tpostType === 'page'\n\t\t\t\t\t? `${ postType }-${ slug }`\n\t\t\t\t\t: `single-${ postType }-${ slug }`;\n\t\t} else {\n\t\t\tslugToCheck = postType === 'page' ? 'page' : `single-${ postType }`;\n\t\t}\n\n\t\tif ( postType ) {\n\t\t\treturn select( coreStore ).getDefaultTemplateId( {\n\t\t\t\tslug: slugToCheck,\n\t\t\t} );\n\t\t}\n\t}\n);\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AALA;AACA;AACA;;AAKO,MAAMG,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAG,IAAAE,4BAAsB,EAC1DC,MAAM,IAAM,MAAM;EACnB,MAAM;IACLC,EAAE,EAAEC,MAAM;IACVC,IAAI,EAAEC,QAAQ;IACdC;EACD,CAAC,GAAGL,MAAM,CAAEM,aAAY,CAAC,CAACC,cAAc,CAAC,CAAC;EAC1C,MAAM;IAAEC,eAAe;IAAEC,gBAAgB;IAAEC;EAAQ,CAAC,GACnDV,MAAM,CAAEW,eAAU,CAAC;EACpB,MAAMC,YAAY,GAAGF,OAAO,CAAE,MAAM,EAAE;IACrCG,IAAI,EAAE,MAAM;IACZC,IAAI,EAAE;EACP,CAAE,CAAC,GACAN,eAAe,CAAE,MAAM,EAAE,MAAO,CAAC,GACjCO,SAAS;EACZ;EACA,MAAMC,WAAW,GAAG,CAACd,MAAM,KAAKU,YAAY,EAAEK,cAAc;EAC5D,IAAKD,WAAW,EAAG;IAClB,OAAOhB,MAAM,CAAEW,eAAU,CAAC,CAACO,oBAAoB,CAAE;MAAEb,IAAI,EAAE;IAAO,CAAE,CAAC;EACpE;EACA,MAAMc,eAAe,GACpBnB,MAAM,CAAEM,aAAY,CAAC,CAACc,sBAAsB,CAAE,UAAW,CAAC;EAC3D,IAAKD,eAAe,EAAG;IACtB,MAAME,oBAAoB,GAAGZ,gBAAgB,CAC5C,UAAU,EACV,aAAa,EACb;MAAEa,QAAQ,EAAE,CAAC;IAAE,CAChB,CAAC,EAAEC,IAAI,CAAIC,QAAQ,IAAMA,QAAQ,CAACnB,IAAI,KAAKc,eAAgB,CAAC;IAC5D,IAAK,CAAEE,oBAAoB,EAAG;MAC7B,OAAOA,oBAAoB;IAC5B;IACA,OAAOA,oBAAoB,CAACpB,EAAE;EAC/B;EACA,IAAIwB,WAAW;EACf;EACA;EACA;EACA;EACA,IAAKpB,IAAI,EAAG;IACXoB,WAAW,GACVrB,QAAQ,KAAK,MAAM,GAChB,GAAIA,QAAQ,IAAMC,IAAI,EAAG,GACzB,UAAWD,QAAQ,IAAMC,IAAI,EAAG;EACrC,CAAC,MAAM;IACNoB,WAAW,GAAGrB,QAAQ,KAAK,MAAM,GAAG,MAAM,GAAG,UAAWA,QAAQ,EAAG;EACpE;EAEA,IAAKA,QAAQ,EAAG;IACf,OAAOJ,MAAM,CAAEW,eAAU,CAAC,CAACO,oBAAoB,CAAE;MAChDb,IAAI,EAAEoB;IACP,CAAE,CAAC;EACJ;AACD,CACD,CAAC","ignoreList":[]}
@@ -455,7 +455,7 @@ const __experimentalGetInsertionPoint = exports.__experimentalGetInsertionPoint
455
455
  since: '6.5',
456
456
  version: '6.7'
457
457
  });
458
- return (0, _lockUnlock.unlock)(select(_editor.store)).getInsertionPoint();
458
+ return (0, _lockUnlock.unlock)(select(_editor.store)).getInserter();
459
459
  });
460
460
 
461
461
  /**
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","_preferences","_coreData","_editor","_deprecated","_interopRequireDefault","_lockUnlock","_privateSelectors","interfaceStore","unlock","editorPrivateApis","EMPTY_ARRAY","EMPTY_OBJECT","getEditorMode","exports","createRegistrySelector","select","_select$get","preferencesStore","get","isEditorSidebarOpened","activeGeneralSidebar","getActiveComplementaryArea","includes","isPluginSidebarOpened","getActiveGeneralSidebarName","convertPanelsToOldFormat","inactivePanels","openPanels","_ref","panelsWithEnabledState","reduce","accumulatedPanels","panelName","enabled","panels","currentPanelState","opened","getPreferences","deprecated","since","alternative","corePreferences","accumulatedPrefs","preferenceKey","value","getPreference","state","defaultValue","preferences","undefined","getHiddenBlockTypes","_select$get2","isPublishSidebarOpened","editorStore","isEditorPanelRemoved","isEditorPanelEnabled","isEditorPanelOpened","isModalActive","modalName","isFeatureActive","feature","isPluginItemPinned","pluginName","isItemPinned","getActiveMetaBoxLocations","createSelector","Object","keys","metaBoxes","locations","filter","location","isMetaBoxLocationActive","isMetaBoxLocationVisible","getMetaBoxesPerLocation","some","id","length","getAllMetaBoxes","values","flat","hasMetaBoxes","isSavingMetaBoxes","isSaving","__experimentalGetPreviewDeviceType","version","getDeviceType","isInserterOpened","__experimentalGetInsertionPoint","getInsertionPoint","isListViewOpened","isEditingTemplate","getCurrentPostType","areMetaBoxesInitialized","initialized","getEditedPostTemplate","templateId","getEditedPostTemplateId","coreStore","getEditedEntityRecord"],"sources":["@wordpress/edit-post/src/store/selectors.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createSelector, createRegistrySelector } from '@wordpress/data';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../lock-unlock';\nimport { getEditedPostTemplateId } from './private-selectors';\n\nconst { interfaceStore } = unlock( editorPrivateApis );\nconst EMPTY_ARRAY = [];\nconst EMPTY_OBJECT = {};\n\n/**\n * Returns the current editing mode.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Editing mode.\n */\nexport const getEditorMode = createRegistrySelector(\n\t( select ) => () =>\n\t\tselect( preferencesStore ).get( 'core', '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 =\n\t\t\tselect( interfaceStore ).getActiveComplementaryArea( 'core' );\n\t\treturn [ 'edit-post/document', 'edit-post/block' ].includes(\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 =\n\t\t\tselect( interfaceStore ).getActiveComplementaryArea( 'core' );\n\t\treturn (\n\t\t\t!! activeGeneralSidebar &&\n\t\t\t! [ 'edit-post/document', 'edit-post/block' ].includes(\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( 'core' );\n\t}\n);\n\n/**\n * Converts panels from the new preferences store format to the old format\n * that the post editor previously used.\n *\n * The resultant converted data should look like this:\n * {\n * panelName: {\n * enabled: false,\n * opened: true,\n * },\n * anotherPanelName: {\n * opened: true\n * },\n * }\n *\n * @param {string[] | undefined} inactivePanels An array of inactive panel names.\n * @param {string[] | undefined} openPanels An array of open panel names.\n *\n * @return {Object} The converted panel data.\n */\nfunction convertPanelsToOldFormat( inactivePanels, openPanels ) {\n\t// First reduce the inactive panels.\n\tconst panelsWithEnabledState = inactivePanels?.reduce(\n\t\t( accumulatedPanels, panelName ) => ( {\n\t\t\t...accumulatedPanels,\n\t\t\t[ panelName ]: {\n\t\t\t\tenabled: false,\n\t\t\t},\n\t\t} ),\n\t\t{}\n\t);\n\n\t// Then reduce the open panels, passing in the result of the previous\n\t// reduction as the initial value so that both open and inactive\n\t// panel state is combined.\n\tconst panels = openPanels?.reduce( ( accumulatedPanels, panelName ) => {\n\t\tconst currentPanelState = accumulatedPanels?.[ panelName ];\n\t\treturn {\n\t\t\t...accumulatedPanels,\n\t\t\t[ panelName ]: {\n\t\t\t\t...currentPanelState,\n\t\t\t\topened: true,\n\t\t\t},\n\t\t};\n\t}, panelsWithEnabledState ?? {} );\n\n\t// The panels variable will only be set if openPanels wasn't `undefined`.\n\t// If it isn't set just return `panelsWithEnabledState`, and if that isn't\n\t// set return an empty object.\n\treturn panels ?? panelsWithEnabledState ?? EMPTY_OBJECT;\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 const getPreferences = createRegistrySelector( ( select ) => () => {\n\tdeprecated( `select( 'core/edit-post' ).getPreferences`, {\n\t\tsince: '6.0',\n\t\talternative: `select( 'core/preferences' ).get`,\n\t} );\n\n\tconst corePreferences = [ 'editorMode', 'hiddenBlockTypes' ].reduce(\n\t\t( accumulatedPrefs, preferenceKey ) => {\n\t\t\tconst value = select( preferencesStore ).get(\n\t\t\t\t'core',\n\t\t\t\tpreferenceKey\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\t...accumulatedPrefs,\n\t\t\t\t[ preferenceKey ]: value,\n\t\t\t};\n\t\t},\n\t\t{}\n\t);\n\n\t// Panels were a preference, but the data structure changed when the state\n\t// was migrated to the preferences store. They need to be converted from\n\t// the new preferences store format to old format to ensure no breaking\n\t// changes for plugins.\n\tconst inactivePanels = select( preferencesStore ).get(\n\t\t'core',\n\t\t'inactivePanels'\n\t);\n\tconst openPanels = select( preferencesStore ).get( 'core', 'openPanels' );\n\tconst panels = convertPanelsToOldFormat( inactivePanels, openPanels );\n\n\treturn {\n\t\t...corePreferences,\n\t\tpanels,\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\tdeprecated( `select( 'core/edit-post' ).getPreference`, {\n\t\tsince: '6.0',\n\t\talternative: `select( 'core/preferences' ).get`,\n\t} );\n\n\t// Avoid using the `getPreferences` registry selector where possible.\n\tconst preferences = getPreferences( state );\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( 'core', 'hiddenBlockTypes' ) ??\n\t\tEMPTY_ARRAY\n\t);\n} );\n\n/**\n * Returns true if the publish sidebar is opened.\n *\n * @deprecated\n *\n * @param {Object} state Global application state\n *\n * @return {boolean} Whether the publish sidebar is open.\n */\nexport const isPublishSidebarOpened = createRegistrySelector(\n\t( select ) => () => {\n\t\tdeprecated( `select( 'core/edit-post' ).isPublishSidebarOpened`, {\n\t\t\tsince: '6.6',\n\t\t\talternative: `select( 'core/editor' ).isPublishSidebarOpened`,\n\t\t} );\n\t\treturn select( editorStore ).isPublishSidebarOpened();\n\t}\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 * @deprecated\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 const isEditorPanelRemoved = createRegistrySelector(\n\t( select ) => ( state, panelName ) => {\n\t\tdeprecated( `select( 'core/edit-post' ).isEditorPanelRemoved`, {\n\t\t\tsince: '6.5',\n\t\t\talternative: `select( 'core/editor' ).isEditorPanelRemoved`,\n\t\t} );\n\t\treturn select( editorStore ).isEditorPanelRemoved( panelName );\n\t}\n);\n\n/**\n * Returns true if the given panel is enabled, or false otherwise. Panels are\n * enabled by default.\n *\n * @deprecated\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 const isEditorPanelEnabled = createRegistrySelector(\n\t( select ) => ( state, panelName ) => {\n\t\tdeprecated( `select( 'core/edit-post' ).isEditorPanelEnabled`, {\n\t\t\tsince: '6.5',\n\t\t\talternative: `select( 'core/editor' ).isEditorPanelEnabled`,\n\t\t} );\n\t\treturn select( editorStore ).isEditorPanelEnabled( panelName );\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 * @deprecated\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 const isEditorPanelOpened = createRegistrySelector(\n\t( select ) => ( state, panelName ) => {\n\t\tdeprecated( `select( 'core/edit-post' ).isEditorPanelOpened`, {\n\t\t\tsince: '6.5',\n\t\t\talternative: `select( 'core/editor' ).isEditorPanelOpened`,\n\t\t} );\n\t\treturn select( editorStore ).isEditorPanelOpened( panelName );\n\t}\n);\n\n/**\n * Returns true if a modal is active, or false otherwise.\n *\n * @deprecated since WP 6.3 use `core/interface` store's selector with the same name instead.\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 const isModalActive = createRegistrySelector(\n\t( select ) => ( state, modalName ) => {\n\t\tdeprecated( `select( 'core/edit-post' ).isModalActive`, {\n\t\t\tsince: '6.3',\n\t\t\talternative: `select( 'core/interface' ).isModalActive`,\n\t\t} );\n\t\treturn !! select( interfaceStore ).isModalActive( modalName );\n\t}\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( 'core', pluginName );\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 const isMetaBoxLocationVisible = createRegistrySelector(\n\t( select ) => ( state, location ) => {\n\t\treturn (\n\t\t\tisMetaBoxLocationActive( state, location ) &&\n\t\t\tgetMetaBoxesPerLocation( state, location )?.some( ( { id } ) => {\n\t\t\t\treturn select( editorStore ).isEditorPanelEnabled(\n\t\t\t\t\t`meta-box-${ id }`\n\t\t\t\t);\n\t\t\t} )\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 Object.values( state.metaBoxes.locations ).flat();\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 * @deprecated\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Device type.\n */\nexport const __experimentalGetPreviewDeviceType = createRegistrySelector(\n\t( select ) => () => {\n\t\tdeprecated(\n\t\t\t`select( 'core/edit-site' ).__experimentalGetPreviewDeviceType`,\n\t\t\t{\n\t\t\t\tsince: '6.5',\n\t\t\t\tversion: '6.7',\n\t\t\t\talternative: `select( 'core/editor' ).getDeviceType`,\n\t\t\t}\n\t\t);\n\t\treturn select( editorStore ).getDeviceType();\n\t}\n);\n\n/**\n * Returns true if the inserter is opened.\n *\n * @deprecated\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the inserter is opened.\n */\nexport const isInserterOpened = createRegistrySelector( ( select ) => () => {\n\tdeprecated( `select( 'core/edit-post' ).isInserterOpened`, {\n\t\tsince: '6.5',\n\t\talternative: `select( 'core/editor' ).isInserterOpened`,\n\t} );\n\treturn select( editorStore ).isInserterOpened();\n} );\n\n/**\n * Get the insertion point for the inserter.\n *\n * @deprecated\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} The root client ID, index to insert at and starting filter value.\n */\nexport const __experimentalGetInsertionPoint = createRegistrySelector(\n\t( select ) => () => {\n\t\tdeprecated(\n\t\t\t`select( 'core/edit-post' ).__experimentalGetInsertionPoint`,\n\t\t\t{\n\t\t\t\tsince: '6.5',\n\t\t\t\tversion: '6.7',\n\t\t\t}\n\t\t);\n\t\treturn unlock( select( editorStore ) ).getInsertionPoint();\n\t}\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 const isListViewOpened = createRegistrySelector( ( select ) => () => {\n\tdeprecated( `select( 'core/edit-post' ).isListViewOpened`, {\n\t\tsince: '6.5',\n\t\talternative: `select( 'core/editor' ).isListViewOpened`,\n\t} );\n\treturn select( editorStore ).isListViewOpened();\n} );\n\n/**\n * Returns true if the template editing mode is enabled.\n *\n * @deprecated\n */\nexport const isEditingTemplate = createRegistrySelector( ( select ) => () => {\n\tdeprecated( `select( 'core/edit-post' ).isEditingTemplate`, {\n\t\tsince: '6.5',\n\t\talternative: `select( 'core/editor' ).getRenderingMode`,\n\t} );\n\treturn select( editorStore ).getCurrentPostType() === 'wp_template';\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 ) => ( state ) => {\n\t\tconst templateId = getEditedPostTemplateId( state );\n\t\tif ( ! templateId ) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn select( coreStore ).getEditedEntityRecord(\n\t\t\t'postType',\n\t\t\t'wp_template',\n\t\t\ttemplateId\n\t\t);\n\t}\n);\n"],"mappings":";;;;;;;;;;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAIA,IAAAI,WAAA,GAAAC,sBAAA,CAAAL,OAAA;AAKA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,iBAAA,GAAAP,OAAA;AAhBA;AACA;AACA;;AAUA;AACA;AACA;;AAIA,MAAM;EAAEQ;AAAe,CAAC,GAAG,IAAAC,kBAAM,EAAEC,mBAAkB,CAAC;AACtD,MAAMC,WAAW,GAAG,EAAE;AACtB,MAAMC,YAAY,GAAG,CAAC,CAAC;;AAEvB;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAG,IAAAE,4BAAsB,EAChDC,MAAM,IAAM;EAAA,IAAAC,WAAA;EAAA,QAAAA,WAAA,GACbD,MAAM,CAAEE,kBAAiB,CAAC,CAACC,GAAG,CAAE,MAAM,EAAE,YAAa,CAAC,cAAAF,WAAA,cAAAA,WAAA,GAAI,QAAQ;AAAA,CACpE,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMG,qBAAqB,GAAAN,OAAA,CAAAM,qBAAA,GAAG,IAAAL,4BAAsB,EACxDC,MAAM,IAAM,MAAM;EACnB,MAAMK,oBAAoB,GACzBL,MAAM,CAAER,cAAe,CAAC,CAACc,0BAA0B,CAAE,MAAO,CAAC;EAC9D,OAAO,CAAE,oBAAoB,EAAE,iBAAiB,CAAE,CAACC,QAAQ,CAC1DF,oBACD,CAAC;AACF,CACD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA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MAAMC,iBAAiB,GAAA9E,OAAA,CAAA8E,iBAAA,GAAG,IAAA7E,4BAAsB,EAAIC,MAAM,IAAM,MAAM;EAC5E,IAAAuB,mBAAU,EAAG,8CAA6C,EAAE;IAC3DC,KAAK,EAAE,KAAK;IACZC,WAAW,EAAG;EACf,CAAE,CAAC;EACH,OAAOzB,MAAM,CAAEsC,aAAY,CAAC,CAACuC,kBAAkB,CAAC,CAAC,KAAK,aAAa;AACpE,CAAE,CAAC;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,uBAAuBA,CAAE/C,KAAK,EAAG;EAChD,OAAOA,KAAK,CAACsB,SAAS,CAAC0B,WAAW;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACO,MAAMC,qBAAqB,GAAAlF,OAAA,CAAAkF,qBAAA,GAAG,IAAAjF,4BAAsB,EACxDC,MAAM,IAAQ+B,KAAK,IAAM;EAC1B,MAAMkD,UAAU,GAAG,IAAAC,yCAAuB,EAAEnD,KAAM,CAAC;EACnD,IAAK,CAAEkD,UAAU,EAAG;IACnB,OAAO/C,SAAS;EACjB;EACA,OAAOlC,MAAM,CAAEmF,eAAU,CAAC,CAACC,qBAAqB,CAC/C,UAAU,EACV,aAAa,EACbH,UACD,CAAC;AACF,CACD,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_data","require","_preferences","_coreData","_editor","_deprecated","_interopRequireDefault","_lockUnlock","_privateSelectors","interfaceStore","unlock","editorPrivateApis","EMPTY_ARRAY","EMPTY_OBJECT","getEditorMode","exports","createRegistrySelector","select","_select$get","preferencesStore","get","isEditorSidebarOpened","activeGeneralSidebar","getActiveComplementaryArea","includes","isPluginSidebarOpened","getActiveGeneralSidebarName","convertPanelsToOldFormat","inactivePanels","openPanels","_ref","panelsWithEnabledState","reduce","accumulatedPanels","panelName","enabled","panels","currentPanelState","opened","getPreferences","deprecated","since","alternative","corePreferences","accumulatedPrefs","preferenceKey","value","getPreference","state","defaultValue","preferences","undefined","getHiddenBlockTypes","_select$get2","isPublishSidebarOpened","editorStore","isEditorPanelRemoved","isEditorPanelEnabled","isEditorPanelOpened","isModalActive","modalName","isFeatureActive","feature","isPluginItemPinned","pluginName","isItemPinned","getActiveMetaBoxLocations","createSelector","Object","keys","metaBoxes","locations","filter","location","isMetaBoxLocationActive","isMetaBoxLocationVisible","getMetaBoxesPerLocation","some","id","length","getAllMetaBoxes","values","flat","hasMetaBoxes","isSavingMetaBoxes","isSaving","__experimentalGetPreviewDeviceType","version","getDeviceType","isInserterOpened","__experimentalGetInsertionPoint","getInserter","isListViewOpened","isEditingTemplate","getCurrentPostType","areMetaBoxesInitialized","initialized","getEditedPostTemplate","templateId","getEditedPostTemplateId","coreStore","getEditedEntityRecord"],"sources":["@wordpress/edit-post/src/store/selectors.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createSelector, createRegistrySelector } from '@wordpress/data';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../lock-unlock';\nimport { getEditedPostTemplateId } from './private-selectors';\n\nconst { interfaceStore } = unlock( editorPrivateApis );\nconst EMPTY_ARRAY = [];\nconst EMPTY_OBJECT = {};\n\n/**\n * Returns the current editing mode.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Editing mode.\n */\nexport const getEditorMode = createRegistrySelector(\n\t( select ) => () =>\n\t\tselect( preferencesStore ).get( 'core', '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 =\n\t\t\tselect( interfaceStore ).getActiveComplementaryArea( 'core' );\n\t\treturn [ 'edit-post/document', 'edit-post/block' ].includes(\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 =\n\t\t\tselect( interfaceStore ).getActiveComplementaryArea( 'core' );\n\t\treturn (\n\t\t\t!! activeGeneralSidebar &&\n\t\t\t! [ 'edit-post/document', 'edit-post/block' ].includes(\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( 'core' );\n\t}\n);\n\n/**\n * Converts panels from the new preferences store format to the old format\n * that the post editor previously used.\n *\n * The resultant converted data should look like this:\n * {\n * panelName: {\n * enabled: false,\n * opened: true,\n * },\n * anotherPanelName: {\n * opened: true\n * },\n * }\n *\n * @param {string[] | undefined} inactivePanels An array of inactive panel names.\n * @param {string[] | undefined} openPanels An array of open panel names.\n *\n * @return {Object} The converted panel data.\n */\nfunction convertPanelsToOldFormat( inactivePanels, openPanels ) {\n\t// First reduce the inactive panels.\n\tconst panelsWithEnabledState = inactivePanels?.reduce(\n\t\t( accumulatedPanels, panelName ) => ( {\n\t\t\t...accumulatedPanels,\n\t\t\t[ panelName ]: {\n\t\t\t\tenabled: false,\n\t\t\t},\n\t\t} ),\n\t\t{}\n\t);\n\n\t// Then reduce the open panels, passing in the result of the previous\n\t// reduction as the initial value so that both open and inactive\n\t// panel state is combined.\n\tconst panels = openPanels?.reduce( ( accumulatedPanels, panelName ) => {\n\t\tconst currentPanelState = accumulatedPanels?.[ panelName ];\n\t\treturn {\n\t\t\t...accumulatedPanels,\n\t\t\t[ panelName ]: {\n\t\t\t\t...currentPanelState,\n\t\t\t\topened: true,\n\t\t\t},\n\t\t};\n\t}, panelsWithEnabledState ?? {} );\n\n\t// The panels variable will only be set if openPanels wasn't `undefined`.\n\t// If it isn't set just return `panelsWithEnabledState`, and if that isn't\n\t// set return an empty object.\n\treturn panels ?? panelsWithEnabledState ?? EMPTY_OBJECT;\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 const getPreferences = createRegistrySelector( ( select ) => () => {\n\tdeprecated( `select( 'core/edit-post' ).getPreferences`, {\n\t\tsince: '6.0',\n\t\talternative: `select( 'core/preferences' ).get`,\n\t} );\n\n\tconst corePreferences = [ 'editorMode', 'hiddenBlockTypes' ].reduce(\n\t\t( accumulatedPrefs, preferenceKey ) => {\n\t\t\tconst value = select( preferencesStore ).get(\n\t\t\t\t'core',\n\t\t\t\tpreferenceKey\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\t...accumulatedPrefs,\n\t\t\t\t[ preferenceKey ]: value,\n\t\t\t};\n\t\t},\n\t\t{}\n\t);\n\n\t// Panels were a preference, but the data structure changed when the state\n\t// was migrated to the preferences store. They need to be converted from\n\t// the new preferences store format to old format to ensure no breaking\n\t// changes for plugins.\n\tconst inactivePanels = select( preferencesStore ).get(\n\t\t'core',\n\t\t'inactivePanels'\n\t);\n\tconst openPanels = select( preferencesStore ).get( 'core', 'openPanels' );\n\tconst panels = convertPanelsToOldFormat( inactivePanels, openPanels );\n\n\treturn {\n\t\t...corePreferences,\n\t\tpanels,\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\tdeprecated( `select( 'core/edit-post' ).getPreference`, {\n\t\tsince: '6.0',\n\t\talternative: `select( 'core/preferences' ).get`,\n\t} );\n\n\t// Avoid using the `getPreferences` registry selector where possible.\n\tconst preferences = getPreferences( state );\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( 'core', 'hiddenBlockTypes' ) ??\n\t\tEMPTY_ARRAY\n\t);\n} );\n\n/**\n * Returns true if the publish sidebar is opened.\n *\n * @deprecated\n *\n * @param {Object} state Global application state\n *\n * @return {boolean} Whether the publish sidebar is open.\n */\nexport const isPublishSidebarOpened = createRegistrySelector(\n\t( select ) => () => {\n\t\tdeprecated( `select( 'core/edit-post' ).isPublishSidebarOpened`, {\n\t\t\tsince: '6.6',\n\t\t\talternative: `select( 'core/editor' ).isPublishSidebarOpened`,\n\t\t} );\n\t\treturn select( editorStore ).isPublishSidebarOpened();\n\t}\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 * @deprecated\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 const isEditorPanelRemoved = createRegistrySelector(\n\t( select ) => ( state, panelName ) => {\n\t\tdeprecated( `select( 'core/edit-post' ).isEditorPanelRemoved`, {\n\t\t\tsince: '6.5',\n\t\t\talternative: `select( 'core/editor' ).isEditorPanelRemoved`,\n\t\t} );\n\t\treturn select( editorStore ).isEditorPanelRemoved( panelName );\n\t}\n);\n\n/**\n * Returns true if the given panel is enabled, or false otherwise. Panels are\n * enabled by default.\n *\n * @deprecated\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 const isEditorPanelEnabled = createRegistrySelector(\n\t( select ) => ( state, panelName ) => {\n\t\tdeprecated( `select( 'core/edit-post' ).isEditorPanelEnabled`, {\n\t\t\tsince: '6.5',\n\t\t\talternative: `select( 'core/editor' ).isEditorPanelEnabled`,\n\t\t} );\n\t\treturn select( editorStore ).isEditorPanelEnabled( panelName );\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 * @deprecated\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 const isEditorPanelOpened = createRegistrySelector(\n\t( select ) => ( state, panelName ) => {\n\t\tdeprecated( `select( 'core/edit-post' ).isEditorPanelOpened`, {\n\t\t\tsince: '6.5',\n\t\t\talternative: `select( 'core/editor' ).isEditorPanelOpened`,\n\t\t} );\n\t\treturn select( editorStore ).isEditorPanelOpened( panelName );\n\t}\n);\n\n/**\n * Returns true if a modal is active, or false otherwise.\n *\n * @deprecated since WP 6.3 use `core/interface` store's selector with the same name instead.\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 const isModalActive = createRegistrySelector(\n\t( select ) => ( state, modalName ) => {\n\t\tdeprecated( `select( 'core/edit-post' ).isModalActive`, {\n\t\t\tsince: '6.3',\n\t\t\talternative: `select( 'core/interface' ).isModalActive`,\n\t\t} );\n\t\treturn !! select( interfaceStore ).isModalActive( modalName );\n\t}\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( 'core', pluginName );\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 const isMetaBoxLocationVisible = createRegistrySelector(\n\t( select ) => ( state, location ) => {\n\t\treturn (\n\t\t\tisMetaBoxLocationActive( state, location ) &&\n\t\t\tgetMetaBoxesPerLocation( state, location )?.some( ( { id } ) => {\n\t\t\t\treturn select( editorStore ).isEditorPanelEnabled(\n\t\t\t\t\t`meta-box-${ id }`\n\t\t\t\t);\n\t\t\t} )\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 Object.values( state.metaBoxes.locations ).flat();\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 * @deprecated\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Device type.\n */\nexport const __experimentalGetPreviewDeviceType = createRegistrySelector(\n\t( select ) => () => {\n\t\tdeprecated(\n\t\t\t`select( 'core/edit-site' ).__experimentalGetPreviewDeviceType`,\n\t\t\t{\n\t\t\t\tsince: '6.5',\n\t\t\t\tversion: '6.7',\n\t\t\t\talternative: `select( 'core/editor' ).getDeviceType`,\n\t\t\t}\n\t\t);\n\t\treturn select( editorStore ).getDeviceType();\n\t}\n);\n\n/**\n * Returns true if the inserter is opened.\n *\n * @deprecated\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the inserter is opened.\n */\nexport const isInserterOpened = createRegistrySelector( ( select ) => () => {\n\tdeprecated( `select( 'core/edit-post' ).isInserterOpened`, {\n\t\tsince: '6.5',\n\t\talternative: `select( 'core/editor' ).isInserterOpened`,\n\t} );\n\treturn select( editorStore ).isInserterOpened();\n} );\n\n/**\n * Get the insertion point for the inserter.\n *\n * @deprecated\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} The root client ID, index to insert at and starting filter value.\n */\nexport const __experimentalGetInsertionPoint = createRegistrySelector(\n\t( select ) => () => {\n\t\tdeprecated(\n\t\t\t`select( 'core/edit-post' ).__experimentalGetInsertionPoint`,\n\t\t\t{\n\t\t\t\tsince: '6.5',\n\t\t\t\tversion: '6.7',\n\t\t\t}\n\t\t);\n\t\treturn unlock( select( editorStore ) ).getInserter();\n\t}\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 const isListViewOpened = createRegistrySelector( ( select ) => () => {\n\tdeprecated( `select( 'core/edit-post' ).isListViewOpened`, {\n\t\tsince: '6.5',\n\t\talternative: `select( 'core/editor' ).isListViewOpened`,\n\t} );\n\treturn select( editorStore ).isListViewOpened();\n} );\n\n/**\n * Returns true if the template editing mode is enabled.\n *\n * @deprecated\n */\nexport const isEditingTemplate = createRegistrySelector( ( select ) => () => {\n\tdeprecated( `select( 'core/edit-post' ).isEditingTemplate`, {\n\t\tsince: '6.5',\n\t\talternative: `select( 'core/editor' ).getRenderingMode`,\n\t} );\n\treturn select( editorStore ).getCurrentPostType() === 'wp_template';\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 ) => ( state ) => {\n\t\tconst templateId = getEditedPostTemplateId( state );\n\t\tif ( ! templateId ) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn select( coreStore ).getEditedEntityRecord(\n\t\t\t'postType',\n\t\t\t'wp_template',\n\t\t\ttemplateId\n\t\t);\n\t}\n);\n"],"mappings":";;;;;;;;;;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAIA,IAAAI,WAAA,GAAAC,sBAAA,CAAAL,OAAA;AAKA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,iBAAA,GAAAP,OAAA;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nC;;AAEA;AACA;AACA;AACA;AACA;AACO,MAAMC,qBAAqB,GAAAlF,OAAA,CAAAkF,qBAAA,GAAG,IAAAjF,4BAAsB,EACxDC,MAAM,IAAQ+B,KAAK,IAAM;EAC1B,MAAMkD,UAAU,GAAG,IAAAC,yCAAuB,EAAEnD,KAAM,CAAC;EACnD,IAAK,CAAEkD,UAAU,EAAG;IACnB,OAAO/C,SAAS;EACjB;EACA,OAAOlC,MAAM,CAAEmF,eAAU,CAAC,CAACC,qBAAqB,CAC/C,UAAU,EACV,aAAa,EACbH,UACD,CAAC;AACF,CACD,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["getMetaBoxContainer","location","area","document","querySelector","exports"],"sources":["@wordpress/edit-post/src/utils/meta-boxes.js"],"sourcesContent":["/**\n * Function returning the current Meta Boxes DOM Node in the editor\n * whether the meta box area is opened or not.\n * If the MetaBox Area is visible returns it, and returns the original container instead.\n *\n * @param {string} location Meta Box location.\n *\n * @return {string} HTML content.\n */\nexport const getMetaBoxContainer = ( location ) => {\n\tconst area = document.querySelector(\n\t\t`.edit-post-meta-boxes-area.is-${ location } .metabox-location-${ location }`\n\t);\n\tif ( area ) {\n\t\treturn area;\n\t}\n\n\treturn document.querySelector( '#metaboxes .metabox-location-' + location );\n};\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,mBAAmB,GAAKC,QAAQ,IAAM;EAClD,MAAMC,IAAI,GAAGC,QAAQ,CAACC,aAAa,CACjC,iCAAiCH,QAAU,sBAAsBA,QAAU,EAC7E,CAAC;EACD,IAAKC,IAAI,EAAG;IACX,OAAOA,IAAI;EACZ;EAEA,OAAOC,QAAQ,CAACC,aAAa,CAAE,+BAA+B,GAAGH,QAAS,CAAC;AAC5E,CAAC;AAACI,OAAA,CAAAL,mBAAA,GAAAA,mBAAA","ignoreList":[]}
1
+ {"version":3,"names":["getMetaBoxContainer","location","area","document","querySelector","exports"],"sources":["@wordpress/edit-post/src/utils/meta-boxes.js"],"sourcesContent":["/**\n * Function returning the current Meta Boxes DOM Node in the editor\n * whether the meta box area is opened or not.\n * If the MetaBox Area is visible returns it, and returns the original container instead.\n *\n * @param {string} location Meta Box location.\n *\n * @return {string} HTML content.\n */\nexport const getMetaBoxContainer = ( location ) => {\n\tconst area = document.querySelector(\n\t\t`.edit-post-meta-boxes-area.is-${ location } .metabox-location-${ location }`\n\t);\n\tif ( area ) {\n\t\treturn area;\n\t}\n\n\treturn document.querySelector( '#metaboxes .metabox-location-' + location );\n};\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,mBAAmB,GAAKC,QAAQ,IAAM;EAClD,MAAMC,IAAI,GAAGC,QAAQ,CAACC,aAAa,CAClC,iCAAkCH,QAAQ,sBAAwBA,QAAQ,EAC3E,CAAC;EACD,IAAKC,IAAI,EAAG;IACX,OAAOA,IAAI;EACZ;EAEA,OAAOC,QAAQ,CAACC,aAAa,CAAE,+BAA+B,GAAGH,QAAS,CAAC;AAC5E,CAAC;AAACI,OAAA,CAAAL,mBAAA,GAAAA,mBAAA","ignoreList":[]}
@@ -88,10 +88,8 @@ function FullscreenModeClose({
88
88
  const buttonLabel = (_postType$labels$view = postType?.labels?.view_items) !== null && _postType$labels$view !== void 0 ? _postType$labels$view : __('Back');
89
89
  return /*#__PURE__*/_jsx(motion.div, {
90
90
  whileHover: "expand",
91
- children: /*#__PURE__*/_jsx(Button
92
- // TODO: Switch to `true` (40px size) if possible
93
- , {
94
- __next40pxDefaultSize: false,
91
+ children: /*#__PURE__*/_jsx(Button, {
92
+ __next40pxDefaultSize: true,
95
93
  className: classes,
96
94
  href: buttonHref,
97
95
  label: buttonLabel,
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","useSelect","Button","Icon","__unstableMotion","motion","__","addQueryArgs","wordpress","store","editorStore","coreStore","useReducedMotion","jsx","_jsx","FullscreenModeClose","showTooltip","icon","href","initialPost","_postType$labels$view","isRequestingSiteIcon","postType","siteIconUrl","select","getCurrentPostType","getEntityRecord","getPostType","isResolving","siteData","undefined","_postType","type","site_icon_url","disableMotion","buttonIcon","size","effect","expand","scale","transition","duration","img","variants","alt","className","src","classes","buttonHref","post_type","slug","buttonLabel","labels","view_items","div","whileHover","children","__next40pxDefaultSize","label"],"sources":["@wordpress/edit-post/src/components/back-button/fullscreen-mode-close.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport {\n\tButton,\n\tIcon,\n\t__unstableMotion as motion,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { addQueryArgs } from '@wordpress/url';\nimport { wordpress } from '@wordpress/icons';\nimport { store as editorStore } from '@wordpress/editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useReducedMotion } from '@wordpress/compose';\n\nfunction FullscreenModeClose( { showTooltip, icon, href, initialPost } ) {\n\tconst { isRequestingSiteIcon, postType, siteIconUrl } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getCurrentPostType } = select( editorStore );\n\t\t\tconst { getEntityRecord, getPostType, isResolving } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst siteData =\n\t\t\t\tgetEntityRecord( 'root', '__unstableBase', undefined ) || {};\n\t\t\tconst _postType = initialPost?.type || getCurrentPostType();\n\t\t\treturn {\n\t\t\t\tisRequestingSiteIcon: isResolving( 'getEntityRecord', [\n\t\t\t\t\t'root',\n\t\t\t\t\t'__unstableBase',\n\t\t\t\t\tundefined,\n\t\t\t\t] ),\n\t\t\t\tpostType: getPostType( _postType ),\n\t\t\t\tsiteIconUrl: siteData.site_icon_url,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst disableMotion = useReducedMotion();\n\n\tif ( ! postType ) {\n\t\treturn null;\n\t}\n\n\tlet buttonIcon = <Icon size=\"36px\" icon={ wordpress } />;\n\n\tconst effect = {\n\t\texpand: {\n\t\t\tscale: 1.25,\n\t\t\ttransition: { type: 'tween', duration: '0.3' },\n\t\t},\n\t};\n\n\tif ( siteIconUrl ) {\n\t\tbuttonIcon = (\n\t\t\t<motion.img\n\t\t\t\tvariants={ ! disableMotion && effect }\n\t\t\t\talt={ __( 'Site Icon' ) }\n\t\t\t\tclassName=\"edit-post-fullscreen-mode-close_site-icon\"\n\t\t\t\tsrc={ siteIconUrl }\n\t\t\t/>\n\t\t);\n\t}\n\n\tif ( isRequestingSiteIcon ) {\n\t\tbuttonIcon = null;\n\t}\n\n\t// Override default icon if custom icon is provided via props.\n\tif ( icon ) {\n\t\tbuttonIcon = <Icon size=\"36px\" icon={ icon } />;\n\t}\n\n\tconst classes = clsx( 'edit-post-fullscreen-mode-close', {\n\t\t'has-icon': siteIconUrl,\n\t} );\n\n\tconst buttonHref =\n\t\thref ??\n\t\taddQueryArgs( 'edit.php', {\n\t\t\tpost_type: postType.slug,\n\t\t} );\n\n\tconst buttonLabel = postType?.labels?.view_items ?? __( 'Back' );\n\n\treturn (\n\t\t<motion.div whileHover=\"expand\">\n\t\t\t<Button\n\t\t\t\t// TODO: Switch to `true` (40px size) if possible\n\t\t\t\t__next40pxDefaultSize={ false }\n\t\t\t\tclassName={ classes }\n\t\t\t\thref={ buttonHref }\n\t\t\t\tlabel={ buttonLabel }\n\t\t\t\tshowTooltip={ showTooltip }\n\t\t\t>\n\t\t\t\t{ buttonIcon }\n\t\t\t</Button>\n\t\t</motion.div>\n\t);\n}\n\nexport default FullscreenModeClose;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SACCC,MAAM,EACNC,IAAI,EACJC,gBAAgB,IAAIC,MAAM,QACpB,uBAAuB;AAC9B,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,SAAS,QAAQ,kB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BAAmB","ignoreList":[]}
1
+ {"version":3,"names":["clsx","useSelect","Button","Icon","__unstableMotion","motion","__","addQueryArgs","wordpress","store","editorStore","coreStore","useReducedMotion","jsx","_jsx","FullscreenModeClose","showTooltip","icon","href","initialPost","_postType$labels$view","isRequestingSiteIcon","postType","siteIconUrl","select","getCurrentPostType","getEntityRecord","getPostType","isResolving","siteData","undefined","_postType","type","site_icon_url","disableMotion","buttonIcon","size","effect","expand","scale","transition","duration","img","variants","alt","className","src","classes","buttonHref","post_type","slug","buttonLabel","labels","view_items","div","whileHover","children","__next40pxDefaultSize","label"],"sources":["@wordpress/edit-post/src/components/back-button/fullscreen-mode-close.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport {\n\tButton,\n\tIcon,\n\t__unstableMotion as motion,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { addQueryArgs } from '@wordpress/url';\nimport { wordpress } from '@wordpress/icons';\nimport { store as editorStore } from '@wordpress/editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useReducedMotion } from '@wordpress/compose';\n\nfunction FullscreenModeClose( { showTooltip, icon, href, initialPost } ) {\n\tconst { isRequestingSiteIcon, postType, siteIconUrl } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getCurrentPostType } = select( editorStore );\n\t\t\tconst { getEntityRecord, getPostType, isResolving } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst siteData =\n\t\t\t\tgetEntityRecord( 'root', '__unstableBase', undefined ) || {};\n\t\t\tconst _postType = initialPost?.type || getCurrentPostType();\n\t\t\treturn {\n\t\t\t\tisRequestingSiteIcon: isResolving( 'getEntityRecord', [\n\t\t\t\t\t'root',\n\t\t\t\t\t'__unstableBase',\n\t\t\t\t\tundefined,\n\t\t\t\t] ),\n\t\t\t\tpostType: getPostType( _postType ),\n\t\t\t\tsiteIconUrl: siteData.site_icon_url,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst disableMotion = useReducedMotion();\n\n\tif ( ! postType ) {\n\t\treturn null;\n\t}\n\n\tlet buttonIcon = <Icon size=\"36px\" icon={ wordpress } />;\n\n\tconst effect = {\n\t\texpand: {\n\t\t\tscale: 1.25,\n\t\t\ttransition: { type: 'tween', duration: '0.3' },\n\t\t},\n\t};\n\n\tif ( siteIconUrl ) {\n\t\tbuttonIcon = (\n\t\t\t<motion.img\n\t\t\t\tvariants={ ! disableMotion && effect }\n\t\t\t\talt={ __( 'Site Icon' ) }\n\t\t\t\tclassName=\"edit-post-fullscreen-mode-close_site-icon\"\n\t\t\t\tsrc={ siteIconUrl }\n\t\t\t/>\n\t\t);\n\t}\n\n\tif ( isRequestingSiteIcon ) {\n\t\tbuttonIcon = null;\n\t}\n\n\t// Override default icon if custom icon is provided via props.\n\tif ( icon ) {\n\t\tbuttonIcon = <Icon size=\"36px\" icon={ icon } />;\n\t}\n\n\tconst classes = clsx( 'edit-post-fullscreen-mode-close', {\n\t\t'has-icon': siteIconUrl,\n\t} );\n\n\tconst buttonHref =\n\t\thref ??\n\t\taddQueryArgs( 'edit.php', {\n\t\t\tpost_type: postType.slug,\n\t\t} );\n\n\tconst buttonLabel = postType?.labels?.view_items ?? __( 'Back' );\n\n\treturn (\n\t\t<motion.div whileHover=\"expand\">\n\t\t\t<Button\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tclassName={ classes }\n\t\t\t\thref={ buttonHref }\n\t\t\t\tlabel={ buttonLabel }\n\t\t\t\tshowTooltip={ showTooltip }\n\t\t\t>\n\t\t\t\t{ buttonIcon }\n\t\t\t</Button>\n\t\t</motion.div>\n\t);\n}\n\nexport default FullscreenModeClose;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SACCC,MAAM,EACNC,IAAI,EACJC,gBAAgB,IAAIC,MAAM,QACp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