@wordpress/edit-widgets 3.1.15 → 3.1.20

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.
@@ -88,10 +88,11 @@ function Interface(_ref) {
88
88
  closeGeneralSidebar();
89
89
  }
90
90
  }, [isInserterOpened, isListViewOpened, isHugeViewport]);
91
+ const hasSecondarySidebar = isListViewOpened || isInserterOpened;
91
92
  return (0, _element.createElement)(_interface.InterfaceSkeleton, {
92
93
  labels: interfaceLabels,
93
94
  header: (0, _element.createElement)(_header.default, null),
94
- secondarySidebar: (0, _element.createElement)(_secondarySidebar.default, null),
95
+ secondarySidebar: hasSecondarySidebar && (0, _element.createElement)(_secondarySidebar.default, null),
95
96
  sidebar: hasSidebarEnabled && (0, _element.createElement)(_interface.ComplementaryArea.Slot, {
96
97
  scope: "core/edit-widgets"
97
98
  }),
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-widgets/src/components/layout/interface.js"],"names":["interfaceLabels","header","body","sidebar","footer","Interface","blockEditorSettings","isMobileViewport","isHugeViewport","setIsInserterOpened","setIsListViewOpened","closeGeneralSidebar","editWidgetsStore","hasBlockBreadCrumbsEnabled","hasSidebarEnabled","isInserterOpened","isListViewOpened","previousShortcut","nextShortcut","select","interfaceStore","getActiveComplementaryArea","name","isFeatureActive","keyboardShortcutsStore","getAllShortcutKeyCombinations","previous","next"],"mappings":";;;;;;;;;AAKA;;AAFA;;AACA;;AAEA;;AACA;;AAKA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AArBA;AACA;AACA;;AAaA;AACA;AACA;AAMA,MAAMA,eAAe,GAAG;AACvB;AACAC,EAAAA,MAAM,EAAE,cAAI,iBAAJ,CAFe;;AAGvB;AACAC,EAAAA,IAAI,EAAE,cAAI,oBAAJ,CAJiB;;AAKvB;AACAC,EAAAA,OAAO,EAAE,cAAI,kBAAJ,CANc;;AAOvB;AACAC,EAAAA,MAAM,EAAE,cAAI,gBAAJ;AARe,CAAx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AAnB;AACA;AACD,GALD,EAKG,CAAEI,iBAAF,EAAqBN,cAArB,CALH;AAOA,0BAAW,MAAM;AAChB,QAAK,CAAEO,gBAAgB,IAAIC,gBAAtB,KAA4C,CAAER,cAAnD,EAAoE;AACnEG,MAAAA,mBAAmB;AACnB;AACD,GAJD,EAIG,CAAEI,gBAAF,EAAoBC,gBAApB,EAAsCR,cAAtC,CAJH;AAMA,SACC,4BAAC,4BAAD;AACC,IAAA,MAAM,EAAGR,eADV;AAEC,IAAA,MAAM,EAAG,4BAAC,eAAD,OAFV;AAGC,IAAA,gBAAgB,EAAG,4BAAC,yBAAD,OAHpB;AAIC,IAAA,OAAO,EACNc,iBAAiB,IAChB,4BAAC,4BAAD,CAAmB,IAAnB;AAAwB,MAAA,KAAK,EAAC;AAA9B,MANH;AASC,IAAA,OAAO,EACN,4BAAC,sCAAD;AACC,MAAA,mBAAmB,EAAGR;AADvB,MAVF;AAcC,IAAA,MAAM,EACLO,0BAA0B,IAC1B,CAAEN,gBADF,IAEC;AAAK,MAAA,SAAS,EAAC;AAAf,OACC,4BAAC,4BAAD;AAAiB,MAAA,aAAa,EAAG,cAAI,SAAJ;AAAjC,MADD,CAjBH;AAsBC,IAAA,SAAS,EAAG;AACXmB,MAAAA,QAAQ,EAAET,gBADC;AAEXU,MAAAA,IAAI,EAAET;AAFK;AAtBb,IADD;AA6BA;;eAEcb,S","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport { BlockBreadcrumb } from '@wordpress/block-editor';\nimport { useEffect } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tInterfaceSkeleton,\n\tComplementaryArea,\n\tstore as interfaceStore,\n} from '@wordpress/interface';\nimport { __ } from '@wordpress/i18n';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\n\n/**\n * Internal dependencies\n */\nimport Header from '../header';\nimport WidgetAreasBlockEditorContent from '../widget-areas-block-editor-content';\nimport { store as editWidgetsStore } from '../../store';\nimport SecondarySidebar from '../secondary-sidebar';\n\nconst interfaceLabels = {\n\t/* translators: accessibility text for the widgets screen top bar landmark region. */\n\theader: __( 'Widgets top bar' ),\n\t/* translators: accessibility text for the widgets screen content landmark region. */\n\tbody: __( 'Widgets and blocks' ),\n\t/* translators: accessibility text for the widgets screen settings landmark region. */\n\tsidebar: __( 'Widgets settings' ),\n\t/* translators: accessibility text for the widgets screen footer landmark region. */\n\tfooter: __( 'Widgets footer' ),\n};\n\nfunction Interface( { blockEditorSettings } ) {\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst isHugeViewport = useViewportMatch( 'huge', '>=' );\n\tconst {\n\t\tsetIsInserterOpened,\n\t\tsetIsListViewOpened,\n\t\tcloseGeneralSidebar,\n\t} = useDispatch( editWidgetsStore );\n\tconst {\n\t\thasBlockBreadCrumbsEnabled,\n\t\thasSidebarEnabled,\n\t\tisInserterOpened,\n\t\tisListViewOpened,\n\t\tpreviousShortcut,\n\t\tnextShortcut,\n\t} = useSelect(\n\t\t( select ) => ( {\n\t\t\thasSidebarEnabled: !! select(\n\t\t\t\tinterfaceStore\n\t\t\t).getActiveComplementaryArea( editWidgetsStore.name ),\n\t\t\tisInserterOpened: !! select( editWidgetsStore ).isInserterOpened(),\n\t\t\tisListViewOpened: !! select( editWidgetsStore ).isListViewOpened(),\n\t\t\thasBlockBreadCrumbsEnabled: select(\n\t\t\t\tinterfaceStore\n\t\t\t).isFeatureActive( 'core/edit-widgets', 'showBlockBreadcrumbs' ),\n\t\t\tpreviousShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations(\n\t\t\t\t'core/edit-widgets/previous-region'\n\t\t\t),\n\t\t\tnextShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations( 'core/edit-widgets/next-region' ),\n\t\t} ),\n\t\t[]\n\t);\n\n\t// Inserter and Sidebars are mutually exclusive\n\tuseEffect( () => {\n\t\tif ( hasSidebarEnabled && ! isHugeViewport ) {\n\t\t\tsetIsInserterOpened( false );\n\t\t\tsetIsListViewOpened( false );\n\t\t}\n\t}, [ hasSidebarEnabled, isHugeViewport ] );\n\n\tuseEffect( () => {\n\t\tif ( ( isInserterOpened || isListViewOpened ) && ! isHugeViewport ) {\n\t\t\tcloseGeneralSidebar();\n\t\t}\n\t}, [ isInserterOpened, isListViewOpened, isHugeViewport ] );\n\n\treturn (\n\t\t<InterfaceSkeleton\n\t\t\tlabels={ interfaceLabels }\n\t\t\theader={ <Header /> }\n\t\t\tsecondarySidebar={ <SecondarySidebar /> }\n\t\t\tsidebar={\n\t\t\t\thasSidebarEnabled && (\n\t\t\t\t\t<ComplementaryArea.Slot scope=\"core/edit-widgets\" />\n\t\t\t\t)\n\t\t\t}\n\t\t\tcontent={\n\t\t\t\t<WidgetAreasBlockEditorContent\n\t\t\t\t\tblockEditorSettings={ blockEditorSettings }\n\t\t\t\t/>\n\t\t\t}\n\t\t\tfooter={\n\t\t\t\thasBlockBreadCrumbsEnabled &&\n\t\t\t\t! isMobileViewport && (\n\t\t\t\t\t<div className=\"edit-widgets-layout__footer\">\n\t\t\t\t\t\t<BlockBreadcrumb rootLabelText={ __( 'Widgets' ) } />\n\t\t\t\t\t</div>\n\t\t\t\t)\n\t\t\t}\n\t\t\tshortcuts={ {\n\t\t\t\tprevious: previousShortcut,\n\t\t\t\tnext: nextShortcut,\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nexport default Interface;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-widgets/src/components/layout/interface.js"],"names":["interfaceLabels","header","body","sidebar","footer","Interface","blockEditorSettings","isMobileViewport","isHugeViewport","setIsInserterOpened","setIsListViewOpened","closeGeneralSidebar","editWidgetsStore","hasBlockBreadCrumbsEnabled","hasSidebarEnabled","isInserterOpened","isListViewOpened","previousShortcut","nextShortcut","select","interfaceStore","getActiveComplementaryArea","name","isFeatureActive","keyboardShortcutsStore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,EAAG;AACXoB,MAAAA,QAAQ,EAAEV,gBADC;AAEXW,MAAAA,IAAI,EAAEV;AAFK;AAtBb,IADD;AA6BA;;eAEcb,S","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport { BlockBreadcrumb } from '@wordpress/block-editor';\nimport { useEffect } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tInterfaceSkeleton,\n\tComplementaryArea,\n\tstore as interfaceStore,\n} from '@wordpress/interface';\nimport { __ } from '@wordpress/i18n';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\n\n/**\n * Internal dependencies\n */\nimport Header from '../header';\nimport WidgetAreasBlockEditorContent from '../widget-areas-block-editor-content';\nimport { store as editWidgetsStore } from '../../store';\nimport SecondarySidebar from '../secondary-sidebar';\n\nconst interfaceLabels = {\n\t/* translators: accessibility text for the widgets screen top bar landmark region. */\n\theader: __( 'Widgets top bar' ),\n\t/* translators: accessibility text for the widgets screen content landmark region. */\n\tbody: __( 'Widgets and blocks' ),\n\t/* translators: accessibility text for the widgets screen settings landmark region. */\n\tsidebar: __( 'Widgets settings' ),\n\t/* translators: accessibility text for the widgets screen footer landmark region. */\n\tfooter: __( 'Widgets footer' ),\n};\n\nfunction Interface( { blockEditorSettings } ) {\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst isHugeViewport = useViewportMatch( 'huge', '>=' );\n\tconst {\n\t\tsetIsInserterOpened,\n\t\tsetIsListViewOpened,\n\t\tcloseGeneralSidebar,\n\t} = useDispatch( editWidgetsStore );\n\tconst {\n\t\thasBlockBreadCrumbsEnabled,\n\t\thasSidebarEnabled,\n\t\tisInserterOpened,\n\t\tisListViewOpened,\n\t\tpreviousShortcut,\n\t\tnextShortcut,\n\t} = useSelect(\n\t\t( select ) => ( {\n\t\t\thasSidebarEnabled: !! select(\n\t\t\t\tinterfaceStore\n\t\t\t).getActiveComplementaryArea( editWidgetsStore.name ),\n\t\t\tisInserterOpened: !! select( editWidgetsStore ).isInserterOpened(),\n\t\t\tisListViewOpened: !! select( editWidgetsStore ).isListViewOpened(),\n\t\t\thasBlockBreadCrumbsEnabled: select(\n\t\t\t\tinterfaceStore\n\t\t\t).isFeatureActive( 'core/edit-widgets', 'showBlockBreadcrumbs' ),\n\t\t\tpreviousShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations(\n\t\t\t\t'core/edit-widgets/previous-region'\n\t\t\t),\n\t\t\tnextShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations( 'core/edit-widgets/next-region' ),\n\t\t} ),\n\t\t[]\n\t);\n\n\t// Inserter and Sidebars are mutually exclusive\n\tuseEffect( () => {\n\t\tif ( hasSidebarEnabled && ! isHugeViewport ) {\n\t\t\tsetIsInserterOpened( false );\n\t\t\tsetIsListViewOpened( false );\n\t\t}\n\t}, [ hasSidebarEnabled, isHugeViewport ] );\n\n\tuseEffect( () => {\n\t\tif ( ( isInserterOpened || isListViewOpened ) && ! isHugeViewport ) {\n\t\t\tcloseGeneralSidebar();\n\t\t}\n\t}, [ isInserterOpened, isListViewOpened, isHugeViewport ] );\n\n\tconst hasSecondarySidebar = isListViewOpened || isInserterOpened;\n\n\treturn (\n\t\t<InterfaceSkeleton\n\t\t\tlabels={ interfaceLabels }\n\t\t\theader={ <Header /> }\n\t\t\tsecondarySidebar={ hasSecondarySidebar && <SecondarySidebar /> }\n\t\t\tsidebar={\n\t\t\t\thasSidebarEnabled && (\n\t\t\t\t\t<ComplementaryArea.Slot scope=\"core/edit-widgets\" />\n\t\t\t\t)\n\t\t\t}\n\t\t\tcontent={\n\t\t\t\t<WidgetAreasBlockEditorContent\n\t\t\t\t\tblockEditorSettings={ blockEditorSettings }\n\t\t\t\t/>\n\t\t\t}\n\t\t\tfooter={\n\t\t\t\thasBlockBreadCrumbsEnabled &&\n\t\t\t\t! isMobileViewport && (\n\t\t\t\t\t<div className=\"edit-widgets-layout__footer\">\n\t\t\t\t\t\t<BlockBreadcrumb rootLabelText={ __( 'Widgets' ) } />\n\t\t\t\t\t</div>\n\t\t\t\t)\n\t\t\t}\n\t\t\tshortcuts={ {\n\t\t\t\tprevious: previousShortcut,\n\t\t\t\tnext: nextShortcut,\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nexport default Interface;\n"]}
@@ -70,10 +70,11 @@ function Interface(_ref) {
70
70
  closeGeneralSidebar();
71
71
  }
72
72
  }, [isInserterOpened, isListViewOpened, isHugeViewport]);
73
+ const hasSecondarySidebar = isListViewOpened || isInserterOpened;
73
74
  return createElement(InterfaceSkeleton, {
74
75
  labels: interfaceLabels,
75
76
  header: createElement(Header, null),
76
- secondarySidebar: createElement(SecondarySidebar, null),
77
+ secondarySidebar: hasSecondarySidebar && createElement(SecondarySidebar, null),
77
78
  sidebar: hasSidebarEnabled && createElement(ComplementaryArea.Slot, {
78
79
  scope: "core/edit-widgets"
79
80
  }),
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/edit-widgets/src/components/layout/interface.js"],"names":["useViewportMatch","BlockBreadcrumb","useEffect","useDispatch","useSelect","InterfaceSkeleton","ComplementaryArea","store","interfaceStore","__","keyboardShortcutsStore","Header","WidgetAreasBlockEditorContent","editWidgetsStore","SecondarySidebar","interfaceLabels","header","body","sidebar","footer","Interface","blockEditorSettings","isMobileViewport","isHugeViewport","setIsInserterOpened","setIsListViewOpened","closeGeneralSidebar","hasBlockBreadCrumbsEnabled","hasSidebarEnabled","isInserterOpened","isListViewOpened","previousShortcut","nextShortcut","select","getActiveComplementaryArea","name","isFeatureActive","getAllShortcutKeyCombinations","previous","next"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,gBAAT,QAAiC,oBAAjC;AACA,SAASC,eAAT,QAAgC,yBAAhC;AACA,SAASC,SAAT,QAA0B,oBAA1B;AACA,SAASC,WAAT,EAAsBC,SAAtB,QAAuC,iBAAvC;AACA,SACCC,iB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F;AAcC,IAAA,MAAM,EACLM,0BAA0B,IAC1B,CAAEL,gBADF,IAEC;AAAK,MAAA,SAAS,EAAC;AAAf,OACC,cAAC,eAAD;AAAiB,MAAA,aAAa,EAAGb,EAAE,CAAE,SAAF;AAAnC,MADD,CAjBH;AAsBC,IAAA,SAAS,EAAG;AACX6B,MAAAA,QAAQ,EAAEP,gBADC;AAEXQ,MAAAA,IAAI,EAAEP;AAFK;AAtBb,IADD;AA6BA;;AAED,eAAeZ,SAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport { BlockBreadcrumb } from '@wordpress/block-editor';\nimport { useEffect } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tInterfaceSkeleton,\n\tComplementaryArea,\n\tstore as interfaceStore,\n} from '@wordpress/interface';\nimport { __ } from '@wordpress/i18n';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\n\n/**\n * Internal dependencies\n */\nimport Header from '../header';\nimport WidgetAreasBlockEditorContent from '../widget-areas-block-editor-content';\nimport { store as editWidgetsStore } from '../../store';\nimport SecondarySidebar from '../secondary-sidebar';\n\nconst interfaceLabels = {\n\t/* translators: accessibility text for the widgets screen top bar landmark region. */\n\theader: __( 'Widgets top bar' ),\n\t/* translators: accessibility text for the widgets screen content landmark region. */\n\tbody: __( 'Widgets and blocks' ),\n\t/* translators: accessibility text for the widgets screen settings landmark region. */\n\tsidebar: __( 'Widgets settings' ),\n\t/* translators: accessibility text for the widgets screen footer landmark region. */\n\tfooter: __( 'Widgets footer' ),\n};\n\nfunction Interface( { blockEditorSettings } ) {\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst isHugeViewport = useViewportMatch( 'huge', '>=' );\n\tconst {\n\t\tsetIsInserterOpened,\n\t\tsetIsListViewOpened,\n\t\tcloseGeneralSidebar,\n\t} = useDispatch( editWidgetsStore );\n\tconst {\n\t\thasBlockBreadCrumbsEnabled,\n\t\thasSidebarEnabled,\n\t\tisInserterOpened,\n\t\tisListViewOpened,\n\t\tpreviousShortcut,\n\t\tnextShortcut,\n\t} = useSelect(\n\t\t( select ) => ( {\n\t\t\thasSidebarEnabled: !! select(\n\t\t\t\tinterfaceStore\n\t\t\t).getActiveComplementaryArea( editWidgetsStore.name ),\n\t\t\tisInserterOpened: !! select( editWidgetsStore ).isInserterOpened(),\n\t\t\tisListViewOpened: !! select( editWidgetsStore ).isListViewOpened(),\n\t\t\thasBlockBreadCrumbsEnabled: select(\n\t\t\t\tinterfaceStore\n\t\t\t).isFeatureActive( 'core/edit-widgets', 'showBlockBreadcrumbs' ),\n\t\t\tpreviousShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations(\n\t\t\t\t'core/edit-widgets/previous-region'\n\t\t\t),\n\t\t\tnextShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations( 'core/edit-widgets/next-region' ),\n\t\t} ),\n\t\t[]\n\t);\n\n\t// Inserter and Sidebars are mutually exclusive\n\tuseEffect( () => {\n\t\tif ( hasSidebarEnabled && ! isHugeViewport ) {\n\t\t\tsetIsInserterOpened( false );\n\t\t\tsetIsListViewOpened( false );\n\t\t}\n\t}, [ hasSidebarEnabled, isHugeViewport ] );\n\n\tuseEffect( () => {\n\t\tif ( ( isInserterOpened || isListViewOpened ) && ! isHugeViewport ) {\n\t\t\tcloseGeneralSidebar();\n\t\t}\n\t}, [ isInserterOpened, isListViewOpened, isHugeViewport ] );\n\n\treturn (\n\t\t<InterfaceSkeleton\n\t\t\tlabels={ interfaceLabels }\n\t\t\theader={ <Header /> }\n\t\t\tsecondarySidebar={ <SecondarySidebar /> }\n\t\t\tsidebar={\n\t\t\t\thasSidebarEnabled && (\n\t\t\t\t\t<ComplementaryArea.Slot scope=\"core/edit-widgets\" />\n\t\t\t\t)\n\t\t\t}\n\t\t\tcontent={\n\t\t\t\t<WidgetAreasBlockEditorContent\n\t\t\t\t\tblockEditorSettings={ blockEditorSettings }\n\t\t\t\t/>\n\t\t\t}\n\t\t\tfooter={\n\t\t\t\thasBlockBreadCrumbsEnabled &&\n\t\t\t\t! isMobileViewport && (\n\t\t\t\t\t<div className=\"edit-widgets-layout__footer\">\n\t\t\t\t\t\t<BlockBreadcrumb rootLabelText={ __( 'Widgets' ) } />\n\t\t\t\t\t</div>\n\t\t\t\t)\n\t\t\t}\n\t\t\tshortcuts={ {\n\t\t\t\tprevious: previousShortcut,\n\t\t\t\tnext: nextShortcut,\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nexport default Interface;\n"]}
1
+ {"version":3,"sources":["@wordpress/edit-widgets/src/components/layout/interface.js"],"names":["useViewportMatch","BlockBreadcrumb","useEffect","useDispatch","useSelect","InterfaceSkeleton","ComplementaryArea","store","interfaceStore","__","keyboardShortcutsStore","Header","WidgetAreasBlockEditorContent","editWidgetsStore","SecondarySidebar","interfaceLabels","header","body","sidebar","footer","Interface","blockEditorSettings","isMobileViewport","isHugeViewport","setIsInserterOpened","setIsListViewOpened","closeGeneralSidebar","hasBlockBreadCrumbsEnabled","hasSidebarEnabled","isInserterOpened","isListViewOpened","previousShortcut","nextShortcut","select","getActiveComplementaryArea","name","isFeatureActive","getAllShortcutKeyCombinations","hasSecondarySidebar","previous","next"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,gBAAT,QAAiC,oBAAjC;AACA,SAASC,eAAT,QAAgC,yBAAhC;AACA,SAASC,SAAT,QAA0B,oBAA1B;AACA,SAASC,WAAT,EAAsBC,SAAtB,QAAuC,iBAAvC;AACA,SACCC,iBADD,EAECC,iBAFD,EAGCC,KAAK,IAAIC,cAHV,QAIO,sBAJP;AAKA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASF,KAAK,IAAIG,sBAAlB,QAAgD,+BAAhD;AAEA;AACA;AACA;;AACA,OAAOC,MAAP,MAAmB,WAAnB;AACA,OAAOC,6BAAP,MAA0C,sCAA1C;AAC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nC,MADD,CAjBH;AAsBC,IAAA,SAAS,EAAG;AACX8B,MAAAA,QAAQ,EAAER,gBADC;AAEXS,MAAAA,IAAI,EAAER;AAFK;AAtBb,IADD;AA6BA;;AAED,eAAeZ,SAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport { BlockBreadcrumb } from '@wordpress/block-editor';\nimport { useEffect } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tInterfaceSkeleton,\n\tComplementaryArea,\n\tstore as interfaceStore,\n} from '@wordpress/interface';\nimport { __ } from '@wordpress/i18n';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\n\n/**\n * Internal dependencies\n */\nimport Header from '../header';\nimport WidgetAreasBlockEditorContent from '../widget-areas-block-editor-content';\nimport { store as editWidgetsStore } from '../../store';\nimport SecondarySidebar from '../secondary-sidebar';\n\nconst interfaceLabels = {\n\t/* translators: accessibility text for the widgets screen top bar landmark region. */\n\theader: __( 'Widgets top bar' ),\n\t/* translators: accessibility text for the widgets screen content landmark region. */\n\tbody: __( 'Widgets and blocks' ),\n\t/* translators: accessibility text for the widgets screen settings landmark region. */\n\tsidebar: __( 'Widgets settings' ),\n\t/* translators: accessibility text for the widgets screen footer landmark region. */\n\tfooter: __( 'Widgets footer' ),\n};\n\nfunction Interface( { blockEditorSettings } ) {\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst isHugeViewport = useViewportMatch( 'huge', '>=' );\n\tconst {\n\t\tsetIsInserterOpened,\n\t\tsetIsListViewOpened,\n\t\tcloseGeneralSidebar,\n\t} = useDispatch( editWidgetsStore );\n\tconst {\n\t\thasBlockBreadCrumbsEnabled,\n\t\thasSidebarEnabled,\n\t\tisInserterOpened,\n\t\tisListViewOpened,\n\t\tpreviousShortcut,\n\t\tnextShortcut,\n\t} = useSelect(\n\t\t( select ) => ( {\n\t\t\thasSidebarEnabled: !! select(\n\t\t\t\tinterfaceStore\n\t\t\t).getActiveComplementaryArea( editWidgetsStore.name ),\n\t\t\tisInserterOpened: !! select( editWidgetsStore ).isInserterOpened(),\n\t\t\tisListViewOpened: !! select( editWidgetsStore ).isListViewOpened(),\n\t\t\thasBlockBreadCrumbsEnabled: select(\n\t\t\t\tinterfaceStore\n\t\t\t).isFeatureActive( 'core/edit-widgets', 'showBlockBreadcrumbs' ),\n\t\t\tpreviousShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations(\n\t\t\t\t'core/edit-widgets/previous-region'\n\t\t\t),\n\t\t\tnextShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations( 'core/edit-widgets/next-region' ),\n\t\t} ),\n\t\t[]\n\t);\n\n\t// Inserter and Sidebars are mutually exclusive\n\tuseEffect( () => {\n\t\tif ( hasSidebarEnabled && ! isHugeViewport ) {\n\t\t\tsetIsInserterOpened( false );\n\t\t\tsetIsListViewOpened( false );\n\t\t}\n\t}, [ hasSidebarEnabled, isHugeViewport ] );\n\n\tuseEffect( () => {\n\t\tif ( ( isInserterOpened || isListViewOpened ) && ! isHugeViewport ) {\n\t\t\tcloseGeneralSidebar();\n\t\t}\n\t}, [ isInserterOpened, isListViewOpened, isHugeViewport ] );\n\n\tconst hasSecondarySidebar = isListViewOpened || isInserterOpened;\n\n\treturn (\n\t\t<InterfaceSkeleton\n\t\t\tlabels={ interfaceLabels }\n\t\t\theader={ <Header /> }\n\t\t\tsecondarySidebar={ hasSecondarySidebar && <SecondarySidebar /> }\n\t\t\tsidebar={\n\t\t\t\thasSidebarEnabled && (\n\t\t\t\t\t<ComplementaryArea.Slot scope=\"core/edit-widgets\" />\n\t\t\t\t)\n\t\t\t}\n\t\t\tcontent={\n\t\t\t\t<WidgetAreasBlockEditorContent\n\t\t\t\t\tblockEditorSettings={ blockEditorSettings }\n\t\t\t\t/>\n\t\t\t}\n\t\t\tfooter={\n\t\t\t\thasBlockBreadCrumbsEnabled &&\n\t\t\t\t! isMobileViewport && (\n\t\t\t\t\t<div className=\"edit-widgets-layout__footer\">\n\t\t\t\t\t\t<BlockBreadcrumb rootLabelText={ __( 'Widgets' ) } />\n\t\t\t\t\t</div>\n\t\t\t\t)\n\t\t\t}\n\t\t\tshortcuts={ {\n\t\t\t\tprevious: previousShortcut,\n\t\t\t\tnext: nextShortcut,\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nexport default Interface;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/edit-widgets",
3
- "version": "3.1.15",
3
+ "version": "3.1.20",
4
4
  "description": "Widgets Page module for WordPress..",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -29,10 +29,10 @@
29
29
  "@babel/runtime": "^7.16.0",
30
30
  "@wordpress/a11y": "^3.2.4",
31
31
  "@wordpress/api-fetch": "^5.2.6",
32
- "@wordpress/block-editor": "^8.0.13",
33
- "@wordpress/block-library": "^6.0.18",
32
+ "@wordpress/block-editor": "^8.0.15",
33
+ "@wordpress/block-library": "^6.0.24",
34
34
  "@wordpress/blocks": "^11.1.5",
35
- "@wordpress/components": "^19.2.0",
35
+ "@wordpress/components": "^19.2.2",
36
36
  "@wordpress/compose": "^5.0.7",
37
37
  "@wordpress/core-data": "^4.0.9",
38
38
  "@wordpress/data": "^6.1.5",
@@ -41,16 +41,16 @@
41
41
  "@wordpress/hooks": "^3.2.2",
42
42
  "@wordpress/i18n": "^4.2.4",
43
43
  "@wordpress/icons": "^6.1.1",
44
- "@wordpress/interface": "^4.1.15",
44
+ "@wordpress/interface": "^4.1.17",
45
45
  "@wordpress/keyboard-shortcuts": "^3.0.7",
46
46
  "@wordpress/keycodes": "^3.2.4",
47
47
  "@wordpress/media-utils": "^3.0.5",
48
48
  "@wordpress/notices": "^3.2.8",
49
49
  "@wordpress/plugins": "^4.0.7",
50
- "@wordpress/reusable-blocks": "^3.0.19",
51
- "@wordpress/server-side-render": "^3.0.17",
50
+ "@wordpress/reusable-blocks": "^3.0.21",
51
+ "@wordpress/server-side-render": "^3.0.19",
52
52
  "@wordpress/url": "^3.3.1",
53
- "@wordpress/widgets": "^2.0.19",
53
+ "@wordpress/widgets": "^2.0.21",
54
54
  "classnames": "^2.3.1",
55
55
  "lodash": "^4.17.21",
56
56
  "rememo": "^3.0.0",
@@ -59,5 +59,5 @@
59
59
  "publishConfig": {
60
60
  "access": "public"
61
61
  },
62
- "gitHead": "f70f4664ac641bd107481c5c67ee6f5556a0a381"
62
+ "gitHead": "823b3225e81748f8febb808e780e2b71478bc854"
63
63
  }
@@ -83,11 +83,13 @@ function Interface( { blockEditorSettings } ) {
83
83
  }
84
84
  }, [ isInserterOpened, isListViewOpened, isHugeViewport ] );
85
85
 
86
+ const hasSecondarySidebar = isListViewOpened || isInserterOpened;
87
+
86
88
  return (
87
89
  <InterfaceSkeleton
88
90
  labels={ interfaceLabels }
89
91
  header={ <Header /> }
90
- secondarySidebar={ <SecondarySidebar /> }
92
+ secondarySidebar={ hasSecondarySidebar && <SecondarySidebar /> }
91
93
  sidebar={
92
94
  hasSidebarEnabled && (
93
95
  <ComplementaryArea.Slot scope="core/edit-widgets" />