@wordpress/edit-widgets 4.0.1 → 4.0.2
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.
- package/build/components/secondary-sidebar/list-view-sidebar.js +0 -11
- package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build/store/index.js +1 -2
- package/build/store/index.js.map +1 -1
- package/build-module/components/secondary-sidebar/list-view-sidebar.js +1 -12
- package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build-module/store/index.js +1 -2
- package/build-module/store/index.js.map +1 -1
- package/build-style/style-rtl.css +1 -0
- package/build-style/style.css +1 -0
- package/package.json +17 -17
- package/src/blocks/widget-area/editor.scss +1 -0
- package/src/components/secondary-sidebar/list-view-sidebar.js +1 -11
- package/src/store/index.js +0 -1
|
@@ -34,16 +34,6 @@ function ListViewSidebar() {
|
|
|
34
34
|
const {
|
|
35
35
|
setIsListViewOpened
|
|
36
36
|
} = (0, _data.useDispatch)(_store.store);
|
|
37
|
-
const {
|
|
38
|
-
clearSelectedBlock,
|
|
39
|
-
selectBlock
|
|
40
|
-
} = (0, _data.useDispatch)(_blockEditor.store);
|
|
41
|
-
|
|
42
|
-
async function selectEditorBlock(clientId) {
|
|
43
|
-
await clearSelectedBlock();
|
|
44
|
-
selectBlock(clientId, -1);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
37
|
const focusOnMountRef = (0, _compose.useFocusOnMount)('firstElement');
|
|
48
38
|
const headerFocusReturnRef = (0, _compose.useFocusReturn)();
|
|
49
39
|
const contentFocusReturnRef = (0, _compose.useFocusReturn)();
|
|
@@ -75,7 +65,6 @@ function ListViewSidebar() {
|
|
|
75
65
|
className: "edit-widgets-editor__list-view-panel-content",
|
|
76
66
|
ref: (0, _compose.useMergeRefs)([contentFocusReturnRef, focusOnMountRef])
|
|
77
67
|
}, (0, _element.createElement)(_blockEditor.__experimentalListView, {
|
|
78
|
-
onSelect: selectEditorBlock,
|
|
79
68
|
showNestedBlocks: true,
|
|
80
69
|
__experimentalHideContainerBlockActions: true,
|
|
81
70
|
__experimentalFeatures: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-widgets/src/components/secondary-sidebar/list-view-sidebar.js"],"names":["ListViewSidebar","setIsListViewOpened","editWidgetsStore","
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-widgets/src/components/secondary-sidebar/list-view-sidebar.js"],"names":["ListViewSidebar","setIsListViewOpened","editWidgetsStore","focusOnMountRef","headerFocusReturnRef","contentFocusReturnRef","closeOnEscape","event","keyCode","ESCAPE","defaultPrevented","preventDefault","instanceId","labelId","closeSmall"],"mappings":";;;;;;;;;AAGA;;AACA;;AACA;;AAMA;;AACA;;AACA;;AACA;;AAKA;;AAnBA;AACA;AACA;;AAcA;AACA;AACA;AAGe,SAASA,eAAT,GAA2B;AACzC,QAAM;AAAEC,IAAAA;AAAF,MAA0B,uBAAaC,YAAb,CAAhC;AAEA,QAAMC,eAAe,GAAG,8BAAiB,cAAjB,CAAxB;AACA,QAAMC,oBAAoB,GAAG,8BAA7B;AACA,QAAMC,qBAAqB,GAAG,8BAA9B;;AACA,WAASC,aAAT,CAAwBC,KAAxB,EAAgC;AAC/B,QAAKA,KAAK,CAACC,OAAN,KAAkBC,gBAAlB,IAA4B,CAAEF,KAAK,CAACG,gBAAzC,EAA4D;AAC3DH,MAAAA,KAAK,CAACI,cAAN;AACAV,MAAAA,mBAAmB,CAAE,KAAF,CAAnB;AACA;AACD;;AAED,QAAMW,UAAU,GAAG,4BAAeZ,eAAf,CAAnB;AACA,QAAMa,OAAO,GAAI,8CAA8CD,UAAY,EAA3E;AAEA,SACC;AACA;AACC,yBAAkBC,OADnB;AAEC,MAAA,SAAS,EAAC,sCAFX;AAGC,MAAA,SAAS,EAAGP;AAHb,OAKC;AACC,MAAA,SAAS,EAAC,6CADX;AAEC,MAAA,GAAG,EAAGF;AAFP,OAIC;AAAQ,MAAA,EAAE,EAAGS;AAAb,OAAyB,cAAI,WAAJ,CAAzB,CAJD,EAKC,4BAAC,kBAAD;AACC,MAAA,IAAI,EAAGC,iBADR;AAEC,MAAA,KAAK,EAAG,cAAI,yBAAJ,CAFT;AAGC,MAAA,OAAO,EAAG,MAAMb,mBAAmB,CAAE,KAAF;AAHpC,MALD,CALD,EAgBC;AACC,MAAA,SAAS,EAAC,8CADX;AAEC,MAAA,GAAG,EAAG,2BAAc,CACnBI,qBADmB,EAEnBF,eAFmB,CAAd;AAFP,OAOC,4BAAC,mCAAD;AACC,MAAA,gBAAgB,MADjB;AAEC,MAAA,uCAAuC,MAFxC;AAGC,MAAA,sBAAsB,MAHvB;AAIC,MAAA,wCAAwC;AAJzC,MAPD,CAhBD;AAFD;AAkCA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalListView as ListView } from '@wordpress/block-editor';\nimport { Button } from '@wordpress/components';\nimport {\n\tuseFocusOnMount,\n\tuseFocusReturn,\n\tuseInstanceId,\n\tuseMergeRefs,\n} from '@wordpress/compose';\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { closeSmall } from '@wordpress/icons';\nimport { ESCAPE } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\nexport default function ListViewSidebar() {\n\tconst { setIsListViewOpened } = useDispatch( editWidgetsStore );\n\n\tconst focusOnMountRef = useFocusOnMount( 'firstElement' );\n\tconst headerFocusReturnRef = useFocusReturn();\n\tconst contentFocusReturnRef = useFocusReturn();\n\tfunction closeOnEscape( event ) {\n\t\tif ( event.keyCode === ESCAPE && ! event.defaultPrevented ) {\n\t\t\tevent.preventDefault();\n\t\t\tsetIsListViewOpened( false );\n\t\t}\n\t}\n\n\tconst instanceId = useInstanceId( ListViewSidebar );\n\tconst labelId = `edit-widgets-editor__list-view-panel-label-${ instanceId }`;\n\n\treturn (\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<div\n\t\t\taria-labelledby={ labelId }\n\t\t\tclassName=\"edit-widgets-editor__list-view-panel\"\n\t\t\tonKeyDown={ closeOnEscape }\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName=\"edit-widgets-editor__list-view-panel-header\"\n\t\t\t\tref={ headerFocusReturnRef }\n\t\t\t>\n\t\t\t\t<strong id={ labelId }>{ __( 'List View' ) }</strong>\n\t\t\t\t<Button\n\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\tlabel={ __( 'Close List View Sidebar' ) }\n\t\t\t\t\tonClick={ () => setIsListViewOpened( false ) }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<div\n\t\t\t\tclassName=\"edit-widgets-editor__list-view-panel-content\"\n\t\t\t\tref={ useMergeRefs( [\n\t\t\t\t\tcontentFocusReturnRef,\n\t\t\t\t\tfocusOnMountRef,\n\t\t\t\t] ) }\n\t\t\t>\n\t\t\t\t<ListView\n\t\t\t\t\tshowNestedBlocks\n\t\t\t\t\t__experimentalHideContainerBlockActions\n\t\t\t\t\t__experimentalFeatures\n\t\t\t\t\t__experimentalPersistentListViewFeatures\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"]}
|
package/build/store/index.js
CHANGED
package/build/store/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-widgets/src/store/index.js"],"names":["storeConfig","reducer","selectors","resolvers","actions","
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-widgets/src/store/index.js"],"names":["storeConfig","reducer","selectors","resolvers","actions","store","STORE_NAME","apiFetch","use","options","next","path","indexOf","Promise","resolve"],"mappings":";;;;;;;;;AAGA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AACA;;;;;;AAbA;AACA;AACA;;AAIA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,WAAW,GAAG;AACnBC,EAAAA,OAAO,EAAPA,gBADmB;AAEnBC,EAAAA,SAFmB;AAGnBC,EAAAA,SAHmB;AAInBC,EAAAA;AAJmB,CAApB;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;;AACO,MAAMC,KAAK,GAAG,4BAAkBC,qBAAlB,EAA8BN,WAA9B,CAAd,C,CAEP;AACA;;;AACA,yBAAeM,qBAAf,EAA2BN,WAA3B,E,CAEA;AACA;AACA;;AACAO,kBAASC,GAAT,CAAc,UAAWC,OAAX,EAAoBC,IAApB,EAA2B;AAAA;;AACxC,MAAK,kBAAAD,OAAO,CAACE,IAAR,gEAAcC,OAAd,CAAuB,0BAAvB,OAAwD,CAA7D,EAAiE;AAChE,WAAOC,OAAO,CAACC,OAAR,CAAiB,EAAjB,CAAP;AACA;;AAED,SAAOJ,IAAI,CAAED,OAAF,CAAX;AACA,CAND","sourcesContent":["/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\nimport { createReduxStore, registerStore } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport reducer from './reducer';\nimport * as resolvers from './resolvers';\nimport * as selectors from './selectors';\nimport * as actions from './actions';\nimport { STORE_NAME } from './constants';\n\n/**\n * Block editor data store configuration.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#registerStore\n *\n * @type {Object}\n */\nconst storeConfig = {\n\treducer,\n\tselectors,\n\tresolvers,\n\tactions,\n};\n\n/**\n * Store definition for the edit widgets namespace.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore\n *\n * @type {Object}\n */\nexport const store = createReduxStore( STORE_NAME, storeConfig );\n\n// Once we build a more generic persistence plugin that works across types of stores\n// we'd be able to replace this with a register call.\nregisterStore( STORE_NAME, storeConfig );\n\n// This package uses a few in-memory post types as wrappers for convenience.\n// This middleware prevents any network requests related to these types as they are\n// bound to fail anyway.\napiFetch.use( function ( options, next ) {\n\tif ( options.path?.indexOf( '/wp/v2/types/widget-area' ) === 0 ) {\n\t\treturn Promise.resolve( {} );\n\t}\n\n\treturn next( options );\n} );\n"]}
|
|
@@ -3,7 +3,7 @@ import { createElement } from "@wordpress/element";
|
|
|
3
3
|
/**
|
|
4
4
|
* WordPress dependencies
|
|
5
5
|
*/
|
|
6
|
-
import { __experimentalListView as ListView
|
|
6
|
+
import { __experimentalListView as ListView } from '@wordpress/block-editor';
|
|
7
7
|
import { Button } from '@wordpress/components';
|
|
8
8
|
import { useFocusOnMount, useFocusReturn, useInstanceId, useMergeRefs } from '@wordpress/compose';
|
|
9
9
|
import { useDispatch } from '@wordpress/data';
|
|
@@ -19,16 +19,6 @@ export default function ListViewSidebar() {
|
|
|
19
19
|
const {
|
|
20
20
|
setIsListViewOpened
|
|
21
21
|
} = useDispatch(editWidgetsStore);
|
|
22
|
-
const {
|
|
23
|
-
clearSelectedBlock,
|
|
24
|
-
selectBlock
|
|
25
|
-
} = useDispatch(blockEditorStore);
|
|
26
|
-
|
|
27
|
-
async function selectEditorBlock(clientId) {
|
|
28
|
-
await clearSelectedBlock();
|
|
29
|
-
selectBlock(clientId, -1);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
22
|
const focusOnMountRef = useFocusOnMount('firstElement');
|
|
33
23
|
const headerFocusReturnRef = useFocusReturn();
|
|
34
24
|
const contentFocusReturnRef = useFocusReturn();
|
|
@@ -60,7 +50,6 @@ export default function ListViewSidebar() {
|
|
|
60
50
|
className: "edit-widgets-editor__list-view-panel-content",
|
|
61
51
|
ref: useMergeRefs([contentFocusReturnRef, focusOnMountRef])
|
|
62
52
|
}, createElement(ListView, {
|
|
63
|
-
onSelect: selectEditorBlock,
|
|
64
53
|
showNestedBlocks: true,
|
|
65
54
|
__experimentalHideContainerBlockActions: true,
|
|
66
55
|
__experimentalFeatures: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-widgets/src/components/secondary-sidebar/list-view-sidebar.js"],"names":["__experimentalListView","ListView","
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-widgets/src/components/secondary-sidebar/list-view-sidebar.js"],"names":["__experimentalListView","ListView","Button","useFocusOnMount","useFocusReturn","useInstanceId","useMergeRefs","useDispatch","__","closeSmall","ESCAPE","store","editWidgetsStore","ListViewSidebar","setIsListViewOpened","focusOnMountRef","headerFocusReturnRef","contentFocusReturnRef","closeOnEscape","event","keyCode","defaultPrevented","preventDefault","instanceId","labelId"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,sBAAsB,IAAIC,QAAnC,QAAmD,yBAAnD;AACA,SAASC,MAAT,QAAuB,uBAAvB;AACA,SACCC,eADD,EAECC,cAFD,EAGCC,aAHD,EAICC,YAJD,QAKO,oBALP;AAMA,SAASC,WAAT,QAA4B,iBAA5B;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,UAAT,QAA2B,kBAA3B;AACA,SAASC,MAAT,QAAuB,qBAAvB;AAEA;AACA;AACA;;AACA,SAASC,KAAK,IAAIC,gBAAlB,QAA0C,aAA1C;AAEA,eAAe,SAASC,eAAT,GAA2B;AACzC,QAAM;AAAEC,IAAAA;AAAF,MAA0BP,WAAW,CAAEK,gBAAF,CAA3C;AAEA,QAAMG,eAAe,GAAGZ,eAAe,CAAE,cAAF,CAAvC;AACA,QAAMa,oBAAoB,GAAGZ,cAAc,EAA3C;AACA,QAAMa,qBAAqB,GAAGb,cAAc,EAA5C;;AACA,WAASc,aAAT,CAAwBC,KAAxB,EAAgC;AAC/B,QAAKA,KAAK,CAACC,OAAN,KAAkBV,MAAlB,IAA4B,CAAES,KAAK,CAACE,gBAAzC,EAA4D;AAC3DF,MAAAA,KAAK,CAACG,cAAN;AACAR,MAAAA,mBAAmB,CAAE,KAAF,CAAnB;AACA;AACD;;AAED,QAAMS,UAAU,GAAGlB,aAAa,CAAEQ,eAAF,CAAhC;AACA,QAAMW,OAAO,GAAI,8CAA8CD,UAAY,EAA3E;AAEA,SACC;AACA;AACC,yBAAkBC,OADnB;AAEC,MAAA,SAAS,EAAC,sCAFX;AAGC,MAAA,SAAS,EAAGN;AAHb,OAKC;AACC,MAAA,SAAS,EAAC,6CADX;AAEC,MAAA,GAAG,EAAGF;AAFP,OAIC;AAAQ,MAAA,EAAE,EAAGQ;AAAb,OAAyBhB,EAAE,CAAE,WAAF,CAA3B,CAJD,EAKC,cAAC,MAAD;AACC,MAAA,IAAI,EAAGC,UADR;AAEC,MAAA,KAAK,EAAGD,EAAE,CAAE,yBAAF,CAFX;AAGC,MAAA,OAAO,EAAG,MAAMM,mBAAmB,CAAE,KAAF;AAHpC,MALD,CALD,EAgBC;AACC,MAAA,SAAS,EAAC,8CADX;AAEC,MAAA,GAAG,EAAGR,YAAY,CAAE,CACnBW,qBADmB,EAEnBF,eAFmB,CAAF;AAFnB,OAOC,cAAC,QAAD;AACC,MAAA,gBAAgB,MADjB;AAEC,MAAA,uCAAuC,MAFxC;AAGC,MAAA,sBAAsB,MAHvB;AAIC,MAAA,wCAAwC;AAJzC,MAPD,CAhBD;AAFD;AAkCA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalListView as ListView } from '@wordpress/block-editor';\nimport { Button } from '@wordpress/components';\nimport {\n\tuseFocusOnMount,\n\tuseFocusReturn,\n\tuseInstanceId,\n\tuseMergeRefs,\n} from '@wordpress/compose';\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { closeSmall } from '@wordpress/icons';\nimport { ESCAPE } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\nexport default function ListViewSidebar() {\n\tconst { setIsListViewOpened } = useDispatch( editWidgetsStore );\n\n\tconst focusOnMountRef = useFocusOnMount( 'firstElement' );\n\tconst headerFocusReturnRef = useFocusReturn();\n\tconst contentFocusReturnRef = useFocusReturn();\n\tfunction closeOnEscape( event ) {\n\t\tif ( event.keyCode === ESCAPE && ! event.defaultPrevented ) {\n\t\t\tevent.preventDefault();\n\t\t\tsetIsListViewOpened( false );\n\t\t}\n\t}\n\n\tconst instanceId = useInstanceId( ListViewSidebar );\n\tconst labelId = `edit-widgets-editor__list-view-panel-label-${ instanceId }`;\n\n\treturn (\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<div\n\t\t\taria-labelledby={ labelId }\n\t\t\tclassName=\"edit-widgets-editor__list-view-panel\"\n\t\t\tonKeyDown={ closeOnEscape }\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName=\"edit-widgets-editor__list-view-panel-header\"\n\t\t\t\tref={ headerFocusReturnRef }\n\t\t\t>\n\t\t\t\t<strong id={ labelId }>{ __( 'List View' ) }</strong>\n\t\t\t\t<Button\n\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\tlabel={ __( 'Close List View Sidebar' ) }\n\t\t\t\t\tonClick={ () => setIsListViewOpened( false ) }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<div\n\t\t\t\tclassName=\"edit-widgets-editor__list-view-panel-content\"\n\t\t\t\tref={ useMergeRefs( [\n\t\t\t\t\tcontentFocusReturnRef,\n\t\t\t\t\tfocusOnMountRef,\n\t\t\t\t] ) }\n\t\t\t>\n\t\t\t\t<ListView\n\t\t\t\t\tshowNestedBlocks\n\t\t\t\t\t__experimentalHideContainerBlockActions\n\t\t\t\t\t__experimentalFeatures\n\t\t\t\t\t__experimentalPersistentListViewFeatures\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-widgets/src/store/index.js"],"names":["apiFetch","createReduxStore","registerStore","reducer","resolvers","selectors","actions","STORE_NAME","storeConfig","
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-widgets/src/store/index.js"],"names":["apiFetch","createReduxStore","registerStore","reducer","resolvers","selectors","actions","STORE_NAME","storeConfig","store","use","options","next","path","indexOf","Promise","resolve"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,QAAP,MAAqB,sBAArB;AACA,SAASC,gBAAT,EAA2BC,aAA3B,QAAgD,iBAAhD;AAEA;AACA;AACA;;AACA,OAAOC,OAAP,MAAoB,WAApB;AACA,OAAO,KAAKC,SAAZ,MAA2B,aAA3B;AACA,OAAO,KAAKC,SAAZ,MAA2B,aAA3B;AACA,OAAO,KAAKC,OAAZ,MAAyB,WAAzB;AACA,SAASC,UAAT,QAA2B,aAA3B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,MAAMC,WAAW,GAAG;AACnBL,EAAAA,OADmB;AAEnBE,EAAAA,SAFmB;AAGnBD,EAAAA,SAHmB;AAInBE,EAAAA;AAJmB,CAApB;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMG,KAAK,GAAGR,gBAAgB,CAAEM,UAAF,EAAcC,WAAd,CAA9B,C,CAEP;AACA;;AACAN,aAAa,CAAEK,UAAF,EAAcC,WAAd,CAAb,C,CAEA;AACA;AACA;;AACAR,QAAQ,CAACU,GAAT,CAAc,UAAWC,OAAX,EAAoBC,IAApB,EAA2B;AAAA;;AACxC,MAAK,kBAAAD,OAAO,CAACE,IAAR,gEAAcC,OAAd,CAAuB,0BAAvB,OAAwD,CAA7D,EAAiE;AAChE,WAAOC,OAAO,CAACC,OAAR,CAAiB,EAAjB,CAAP;AACA;;AAED,SAAOJ,IAAI,CAAED,OAAF,CAAX;AACA,CAND","sourcesContent":["/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\nimport { createReduxStore, registerStore } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport reducer from './reducer';\nimport * as resolvers from './resolvers';\nimport * as selectors from './selectors';\nimport * as actions from './actions';\nimport { STORE_NAME } from './constants';\n\n/**\n * Block editor data store configuration.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#registerStore\n *\n * @type {Object}\n */\nconst storeConfig = {\n\treducer,\n\tselectors,\n\tresolvers,\n\tactions,\n};\n\n/**\n * Store definition for the edit widgets namespace.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore\n *\n * @type {Object}\n */\nexport const store = createReduxStore( STORE_NAME, storeConfig );\n\n// Once we build a more generic persistence plugin that works across types of stores\n// we'd be able to replace this with a register call.\nregisterStore( STORE_NAME, storeConfig );\n\n// This package uses a few in-memory post types as wrappers for convenience.\n// This middleware prevents any network requests related to these types as they are\n// bound to fail anyway.\napiFetch.use( function ( options, next ) {\n\tif ( options.path?.indexOf( '/wp/v2/types/widget-area' ) === 0 ) {\n\t\treturn Promise.resolve( {} );\n\t}\n\n\treturn next( options );\n} );\n"]}
|
|
@@ -466,6 +466,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
466
466
|
}
|
|
467
467
|
.wp-block[data-type="core/widget-area"] .block-list-appender.wp-block {
|
|
468
468
|
width: initial;
|
|
469
|
+
position: relative;
|
|
469
470
|
}
|
|
470
471
|
.wp-block[data-type="core/widget-area"] .editor-styles-wrapper .wp-block.wp-block.wp-block.wp-block.wp-block {
|
|
471
472
|
max-width: 100%;
|
package/build-style/style.css
CHANGED
|
@@ -466,6 +466,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
466
466
|
}
|
|
467
467
|
.wp-block[data-type="core/widget-area"] .block-list-appender.wp-block {
|
|
468
468
|
width: initial;
|
|
469
|
+
position: relative;
|
|
469
470
|
}
|
|
470
471
|
.wp-block[data-type="core/widget-area"] .editor-styles-wrapper .wp-block.wp-block.wp-block.wp-block.wp-block {
|
|
471
472
|
max-width: 100%;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/edit-widgets",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.2",
|
|
4
4
|
"description": "Widgets Page module for WordPress..",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -28,32 +28,32 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@babel/runtime": "^7.16.0",
|
|
30
30
|
"@wordpress/api-fetch": "^6.0.1",
|
|
31
|
-
"@wordpress/block-editor": "^8.
|
|
32
|
-
"@wordpress/block-library": "^7.0.
|
|
33
|
-
"@wordpress/blocks": "^11.2.
|
|
34
|
-
"@wordpress/components": "^19.
|
|
35
|
-
"@wordpress/compose": "^5.1.
|
|
36
|
-
"@wordpress/core-data": "^4.1.
|
|
37
|
-
"@wordpress/data": "^6.
|
|
38
|
-
"@wordpress/dom": "^3.3.
|
|
31
|
+
"@wordpress/block-editor": "^8.2.0",
|
|
32
|
+
"@wordpress/block-library": "^7.0.2",
|
|
33
|
+
"@wordpress/blocks": "^11.2.2",
|
|
34
|
+
"@wordpress/components": "^19.5.0",
|
|
35
|
+
"@wordpress/compose": "^5.1.2",
|
|
36
|
+
"@wordpress/core-data": "^4.1.2",
|
|
37
|
+
"@wordpress/data": "^6.3.0",
|
|
38
|
+
"@wordpress/dom": "^3.3.2",
|
|
39
39
|
"@wordpress/element": "^4.1.1",
|
|
40
40
|
"@wordpress/hooks": "^3.3.1",
|
|
41
41
|
"@wordpress/i18n": "^4.3.1",
|
|
42
|
-
"@wordpress/icons": "^7.0.
|
|
43
|
-
"@wordpress/interface": "^4.2.
|
|
44
|
-
"@wordpress/keyboard-shortcuts": "^3.1.
|
|
42
|
+
"@wordpress/icons": "^7.0.1",
|
|
43
|
+
"@wordpress/interface": "^4.2.3",
|
|
44
|
+
"@wordpress/keyboard-shortcuts": "^3.1.2",
|
|
45
45
|
"@wordpress/keycodes": "^3.3.1",
|
|
46
46
|
"@wordpress/media-utils": "^3.1.1",
|
|
47
|
-
"@wordpress/notices": "^3.3.
|
|
48
|
-
"@wordpress/plugins": "^4.1.
|
|
49
|
-
"@wordpress/reusable-blocks": "^3.1.
|
|
47
|
+
"@wordpress/notices": "^3.3.2",
|
|
48
|
+
"@wordpress/plugins": "^4.1.3",
|
|
49
|
+
"@wordpress/reusable-blocks": "^3.1.3",
|
|
50
50
|
"@wordpress/url": "^3.4.1",
|
|
51
|
-
"@wordpress/widgets": "^2.1.
|
|
51
|
+
"@wordpress/widgets": "^2.1.3",
|
|
52
52
|
"classnames": "^2.3.1",
|
|
53
53
|
"lodash": "^4.17.21"
|
|
54
54
|
},
|
|
55
55
|
"publishConfig": {
|
|
56
56
|
"access": "public"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "4566ac290359553d04de4eb574545309343f790b"
|
|
59
59
|
}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
5
|
-
__experimentalListView as ListView,
|
|
6
|
-
store as blockEditorStore,
|
|
7
|
-
} from '@wordpress/block-editor';
|
|
4
|
+
import { __experimentalListView as ListView } from '@wordpress/block-editor';
|
|
8
5
|
import { Button } from '@wordpress/components';
|
|
9
6
|
import {
|
|
10
7
|
useFocusOnMount,
|
|
@@ -25,12 +22,6 @@ import { store as editWidgetsStore } from '../../store';
|
|
|
25
22
|
export default function ListViewSidebar() {
|
|
26
23
|
const { setIsListViewOpened } = useDispatch( editWidgetsStore );
|
|
27
24
|
|
|
28
|
-
const { clearSelectedBlock, selectBlock } = useDispatch( blockEditorStore );
|
|
29
|
-
async function selectEditorBlock( clientId ) {
|
|
30
|
-
await clearSelectedBlock();
|
|
31
|
-
selectBlock( clientId, -1 );
|
|
32
|
-
}
|
|
33
|
-
|
|
34
25
|
const focusOnMountRef = useFocusOnMount( 'firstElement' );
|
|
35
26
|
const headerFocusReturnRef = useFocusReturn();
|
|
36
27
|
const contentFocusReturnRef = useFocusReturn();
|
|
@@ -70,7 +61,6 @@ export default function ListViewSidebar() {
|
|
|
70
61
|
] ) }
|
|
71
62
|
>
|
|
72
63
|
<ListView
|
|
73
|
-
onSelect={ selectEditorBlock }
|
|
74
64
|
showNestedBlocks
|
|
75
65
|
__experimentalHideContainerBlockActions
|
|
76
66
|
__experimentalFeatures
|