@wordpress/edit-widgets 4.12.1-next.d6164808d3.0 → 4.14.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.
- package/CHANGELOG.md +4 -0
- package/build/blocks/widget-area/index.js +2 -1
- package/build/blocks/widget-area/index.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/shortcut.js +2 -7
- package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
- package/build/components/more-menu/tools-more-menu-group.js +1 -7
- package/build/components/more-menu/tools-more-menu-group.js.map +1 -1
- package/build/components/notices/index.js +17 -14
- package/build/components/notices/index.js.map +1 -1
- package/build-module/blocks/widget-area/index.js +2 -1
- package/build-module/blocks/widget-area/index.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +2 -6
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
- package/build-module/components/more-menu/tools-more-menu-group.js +1 -6
- package/build-module/components/more-menu/tools-more-menu-group.js.map +1 -1
- package/build-module/components/notices/index.js +17 -13
- package/build-module/components/notices/index.js.map +1 -1
- package/build-style/style-rtl.css +9 -13
- package/build-style/style.css +9 -13
- package/package.json +27 -28
- package/src/blocks/widget-area/block.json +2 -1
- package/src/components/keyboard-shortcut-help-modal/shortcut.js +2 -6
- package/src/components/more-menu/tools-more-menu-group.js +1 -6
- package/src/components/notices/index.js +9 -16
package/CHANGELOG.md
CHANGED
|
@@ -35,7 +35,8 @@ const metadata = {
|
|
|
35
35
|
customClassName: false,
|
|
36
36
|
reusable: false,
|
|
37
37
|
__experimentalToolbar: false,
|
|
38
|
-
__experimentalParentSelector: false
|
|
38
|
+
__experimentalParentSelector: false,
|
|
39
|
+
__experimentalDisableBlockOverlay: true
|
|
39
40
|
},
|
|
40
41
|
editorStyle: "wp-block-widget-area-editor",
|
|
41
42
|
style: "wp-block-widget-area"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-widgets/src/blocks/widget-area/index.js"],"names":["name","metadata","settings","title","description","__experimentalLabel","label","edit"],"mappings":";;;;;;;;;AAGA;;AAMA;;AATA;AACA;AACA;;AAGA;AACA;AACA
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-widgets/src/blocks/widget-area/index.js"],"names":["name","metadata","settings","title","description","__experimentalLabel","label","edit"],"mappings":";;;;;;;;;AAGA;;AAMA;;AATA;AACA;AACA;;AAGA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAGO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,KAAK,EAAE,cAAI,aAAJ,CADgB;AAEvBC,EAAAA,WAAW,EAAE,cAAI,0BAAJ,CAFU;AAGvBC,EAAAA,mBAAmB,EAAE;AAAA,QAAE;AAAEL,MAAAA,IAAI,EAAEM;AAAR,KAAF;AAAA,WAAuBA,KAAvB;AAAA,GAHE;AAIvBC,EAAAA,IAAI,EAAJA;AAJuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ttitle: __( 'Widget Area' ),\n\tdescription: __( 'A widget area container.' ),\n\t__experimentalLabel: ( { name: label } ) => label,\n\tedit,\n};\n"]}
|
|
@@ -7,14 +7,8 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _element = require("@wordpress/element");
|
|
9
9
|
|
|
10
|
-
var _lodash = require("lodash");
|
|
11
|
-
|
|
12
10
|
var _keycodes = require("@wordpress/keycodes");
|
|
13
11
|
|
|
14
|
-
/**
|
|
15
|
-
* External dependencies
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
12
|
/**
|
|
19
13
|
* WordPress dependencies
|
|
20
14
|
*/
|
|
@@ -25,10 +19,11 @@ function KeyCombination(_ref) {
|
|
|
25
19
|
} = _ref;
|
|
26
20
|
const shortcut = keyCombination.modifier ? _keycodes.displayShortcutList[keyCombination.modifier](keyCombination.character) : keyCombination.character;
|
|
27
21
|
const ariaLabel = keyCombination.modifier ? _keycodes.shortcutAriaLabel[keyCombination.modifier](keyCombination.character) : keyCombination.character;
|
|
22
|
+
const shortcuts = Array.isArray(shortcut) ? shortcut : [shortcut];
|
|
28
23
|
return (0, _element.createElement)("kbd", {
|
|
29
24
|
className: "edit-widgets-keyboard-shortcut-help-modal__shortcut-key-combination",
|
|
30
25
|
"aria-label": forceAriaLabel || ariaLabel
|
|
31
|
-
},
|
|
26
|
+
}, shortcuts.map((character, index) => {
|
|
32
27
|
if (character === '+') {
|
|
33
28
|
return (0, _element.createElement)(_element.Fragment, {
|
|
34
29
|
key: index
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-widgets/src/components/keyboard-shortcut-help-modal/shortcut.js"],"names":["KeyCombination","keyCombination","forceAriaLabel","shortcut","modifier","displayShortcutList","character","ariaLabel","shortcutAriaLabel","map","index","Shortcut","description","aliases","alias"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-widgets/src/components/keyboard-shortcut-help-modal/shortcut.js"],"names":["KeyCombination","keyCombination","forceAriaLabel","shortcut","modifier","displayShortcutList","character","ariaLabel","shortcutAriaLabel","shortcuts","Array","isArray","map","index","Shortcut","description","aliases","alias"],"mappings":";;;;;;;AAGA;;AACA;;AAJA;AACA;AACA;AAIA,SAASA,cAAT,OAA8D;AAAA,MAArC;AAAEC,IAAAA,cAAF;AAAkBC,IAAAA;AAAlB,GAAqC;AAC7D,QAAMC,QAAQ,GAAGF,cAAc,CAACG,QAAf,GACdC,8BAAqBJ,cAAc,CAACG,QAApC,EACAH,cAAc,CAACK,SADf,CADc,GAIdL,cAAc,CAACK,SAJlB;AAKA,QAAMC,SAAS,GAAGN,cAAc,CAACG,QAAf,GACfI,4BAAmBP,cAAc,CAACG,QAAlC,EACAH,cAAc,CAACK,SADf,CADe,GAIfL,cAAc,CAACK,SAJlB;AAKA,QAAMG,SAAS,GAAGC,KAAK,CAACC,OAAN,CAAeR,QAAf,IAA4BA,QAA5B,GAAuC,CAAEA,QAAF,CAAzD;AAEA,SACC;AACC,IAAA,SAAS,EAAC,qEADX;AAEC,kBAAaD,cAAc,IAAIK;AAFhC,KAIGE,SAAS,CAACG,GAAV,CAAe,CAAEN,SAAF,EAAaO,KAAb,KAAwB;AACxC,QAAKP,SAAS,KAAK,GAAnB,EAAyB;AACxB,aAAO,4BAAC,iBAAD;AAAU,QAAA,GAAG,EAAGO;AAAhB,SAA0BP,SAA1B,CAAP;AACA;;AAED,WACC;AACC,MAAA,GAAG,EAAGO,KADP;AAEC,MAAA,SAAS,EAAC;AAFX,OAIGP,SAJH,CADD;AAQA,GAbC,CAJH,CADD;AAqBA;;AAED,SAASQ,QAAT,QAA8E;AAAA,MAA3D;AAAEC,IAAAA,WAAF;AAAed,IAAAA,cAAf;AAA+Be,IAAAA,OAAO,GAAG,EAAzC;AAA6CT,IAAAA;AAA7C,GAA2D;AAC7E,SACC,qDACC;AAAK,IAAA,SAAS,EAAC;AAAf,KACGQ,WADH,CADD,EAIC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC,4BAAC,cAAD;AACC,IAAA,cAAc,EAAGd,cADlB;AAEC,IAAA,cAAc,EAAGM;AAFlB,IADD,EAKGS,OAAO,CAACJ,GAAR,CAAa,CAAEK,KAAF,EAASJ,KAAT,KACd,4BAAC,cAAD;AACC,IAAA,cAAc,EAAGI,KADlB;AAEC,IAAA,cAAc,EAAGV,SAFlB;AAGC,IAAA,GAAG,EAAGM;AAHP,IADC,CALH,CAJD,CADD;AAoBA;;eAEcC,Q","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Fragment } from '@wordpress/element';\nimport { displayShortcutList, shortcutAriaLabel } from '@wordpress/keycodes';\n\nfunction KeyCombination( { keyCombination, forceAriaLabel } ) {\n\tconst shortcut = keyCombination.modifier\n\t\t? displayShortcutList[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t )\n\t\t: keyCombination.character;\n\tconst ariaLabel = keyCombination.modifier\n\t\t? shortcutAriaLabel[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t )\n\t\t: keyCombination.character;\n\tconst shortcuts = Array.isArray( shortcut ) ? shortcut : [ shortcut ];\n\n\treturn (\n\t\t<kbd\n\t\t\tclassName=\"edit-widgets-keyboard-shortcut-help-modal__shortcut-key-combination\"\n\t\t\taria-label={ forceAriaLabel || ariaLabel }\n\t\t>\n\t\t\t{ shortcuts.map( ( character, index ) => {\n\t\t\t\tif ( character === '+' ) {\n\t\t\t\t\treturn <Fragment key={ index }>{ character }</Fragment>;\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\t<kbd\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\tclassName=\"edit-widgets-keyboard-shortcut-help-modal__shortcut-key\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ character }\n\t\t\t\t\t</kbd>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</kbd>\n\t);\n}\n\nfunction Shortcut( { description, keyCombination, aliases = [], ariaLabel } ) {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"edit-widgets-keyboard-shortcut-help-modal__shortcut-description\">\n\t\t\t\t{ description }\n\t\t\t</div>\n\t\t\t<div className=\"edit-widgets-keyboard-shortcut-help-modal__shortcut-term\">\n\t\t\t\t<KeyCombination\n\t\t\t\t\tkeyCombination={ keyCombination }\n\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t/>\n\t\t\t\t{ aliases.map( ( alias, index ) => (\n\t\t\t\t\t<KeyCombination\n\t\t\t\t\t\tkeyCombination={ alias }\n\t\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default Shortcut;\n"]}
|
|
@@ -7,14 +7,8 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _element = require("@wordpress/element");
|
|
9
9
|
|
|
10
|
-
var _lodash = require("lodash");
|
|
11
|
-
|
|
12
10
|
var _components = require("@wordpress/components");
|
|
13
11
|
|
|
14
|
-
/**
|
|
15
|
-
* External dependencies
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
12
|
/**
|
|
19
13
|
* WordPress dependencies
|
|
20
14
|
*/
|
|
@@ -29,7 +23,7 @@ ToolsMoreMenuGroup.Slot = _ref => {
|
|
|
29
23
|
} = _ref;
|
|
30
24
|
return (0, _element.createElement)(Slot, {
|
|
31
25
|
fillProps: fillProps
|
|
32
|
-
}, fills =>
|
|
26
|
+
}, fills => fills.length > 0 && fills);
|
|
33
27
|
};
|
|
34
28
|
|
|
35
29
|
var _default = ToolsMoreMenuGroup;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-widgets/src/components/more-menu/tools-more-menu-group.js"],"names":["Fill","ToolsMoreMenuGroup","Slot","fillProps","fills"],"mappings":";;;;;;;;;AAGA;;
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-widgets/src/components/more-menu/tools-more-menu-group.js"],"names":["Fill","ToolsMoreMenuGroup","Slot","fillProps","fills","length"],"mappings":";;;;;;;;;AAGA;;AAHA;AACA;AACA;AAGA,MAAM;AAAEA,EAAAA,IAAI,EAAEC,kBAAR;AAA4BC,EAAAA;AAA5B,IAAqC,gCAC1C,+BAD0C,CAA3C;;AAIAD,kBAAkB,CAACC,IAAnB,GAA0B;AAAA,MAAE;AAAEC,IAAAA;AAAF,GAAF;AAAA,SACzB,4BAAC,IAAD;AAAM,IAAA,SAAS,EAAGA;AAAlB,KACKC,KAAF,IAAaA,KAAK,CAACC,MAAN,GAAe,CAAf,IAAoBD,KADpC,CADyB;AAAA,CAA1B;;eAMeH,kB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createSlotFill } from '@wordpress/components';\n\nconst { Fill: ToolsMoreMenuGroup, Slot } = createSlotFill(\n\t'EditWidgetsToolsMoreMenuGroup'\n);\n\nToolsMoreMenuGroup.Slot = ( { fillProps } ) => (\n\t<Slot fillProps={ fillProps }>\n\t\t{ ( fills ) => fills.length > 0 && fills }\n\t</Slot>\n);\n\nexport default ToolsMoreMenuGroup;\n"]}
|
|
@@ -7,18 +7,12 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _element = require("@wordpress/element");
|
|
9
9
|
|
|
10
|
-
var _lodash = require("lodash");
|
|
11
|
-
|
|
12
10
|
var _components = require("@wordpress/components");
|
|
13
11
|
|
|
14
12
|
var _data = require("@wordpress/data");
|
|
15
13
|
|
|
16
14
|
var _notices = require("@wordpress/notices");
|
|
17
15
|
|
|
18
|
-
/**
|
|
19
|
-
* External dependencies
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
16
|
/**
|
|
23
17
|
* WordPress dependencies
|
|
24
18
|
*/
|
|
@@ -33,16 +27,25 @@ function Notices() {
|
|
|
33
27
|
notices: select(_notices.store).getNotices()
|
|
34
28
|
};
|
|
35
29
|
}, []);
|
|
36
|
-
const dismissibleNotices =
|
|
37
|
-
|
|
38
|
-
|
|
30
|
+
const dismissibleNotices = notices.filter(_ref => {
|
|
31
|
+
let {
|
|
32
|
+
isDismissible,
|
|
33
|
+
type
|
|
34
|
+
} = _ref;
|
|
35
|
+
return isDismissible && type === 'default';
|
|
39
36
|
});
|
|
40
|
-
const nonDismissibleNotices =
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
const nonDismissibleNotices = notices.filter(_ref2 => {
|
|
38
|
+
let {
|
|
39
|
+
isDismissible,
|
|
40
|
+
type
|
|
41
|
+
} = _ref2;
|
|
42
|
+
return !isDismissible && type === 'default';
|
|
43
43
|
});
|
|
44
|
-
const snackbarNotices =
|
|
45
|
-
|
|
44
|
+
const snackbarNotices = notices.filter(_ref3 => {
|
|
45
|
+
let {
|
|
46
|
+
type
|
|
47
|
+
} = _ref3;
|
|
48
|
+
return type === 'snackbar';
|
|
46
49
|
});
|
|
47
50
|
return (0, _element.createElement)(_element.Fragment, null, (0, _element.createElement)(_components.NoticeList, {
|
|
48
51
|
notices: nonDismissibleNotices,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-widgets/src/components/notices/index.js"],"names":["Notices","removeNotice","noticesStore","notices","select","getNotices","dismissibleNotices","isDismissible","type","nonDismissibleNotices","snackbarNotices"],"mappings":";;;;;;;;;AAGA;;
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-widgets/src/components/notices/index.js"],"names":["Notices","removeNotice","noticesStore","notices","select","getNotices","dismissibleNotices","filter","isDismissible","type","nonDismissibleNotices","snackbarNotices"],"mappings":";;;;;;;;;AAGA;;AACA;;AACA;;AALA;AACA;AACA;AAKA,SAASA,OAAT,GAAmB;AAClB,QAAM;AAAEC,IAAAA;AAAF,MAAmB,uBAAaC,cAAb,CAAzB;AACA,QAAM;AAAEC,IAAAA;AAAF,MAAc,qBAAaC,MAAF,IAAc;AAC5C,WAAO;AACND,MAAAA,OAAO,EAAEC,MAAM,CAAEF,cAAF,CAAN,CAAuBG,UAAvB;AADH,KAAP;AAGA,GAJmB,EAIjB,EAJiB,CAApB;AAMA,QAAMC,kBAAkB,GAAGH,OAAO,CAACI,MAAR,CAC1B;AAAA,QAAE;AAAEC,MAAAA,aAAF;AAAiBC,MAAAA;AAAjB,KAAF;AAAA,WAA+BD,aAAa,IAAIC,IAAI,KAAK,SAAzD;AAAA,GAD0B,CAA3B;AAGA,QAAMC,qBAAqB,GAAGP,OAAO,CAACI,MAAR,CAC7B;AAAA,QAAE;AAAEC,MAAAA,aAAF;AAAiBC,MAAAA;AAAjB,KAAF;AAAA,WAA+B,CAAED,aAAF,IAAmBC,IAAI,KAAK,SAA3D;AAAA,GAD6B,CAA9B;AAGA,QAAME,eAAe,GAAGR,OAAO,CAACI,MAAR,CACvB;AAAA,QAAE;AAAEE,MAAAA;AAAF,KAAF;AAAA,WAAgBA,IAAI,KAAK,UAAzB;AAAA,GADuB,CAAxB;AAIA,SACC,qDACC,4BAAC,sBAAD;AACC,IAAA,OAAO,EAAGC,qBADX;AAEC,IAAA,SAAS,EAAC;AAFX,IADD,EAKC,4BAAC,sBAAD;AACC,IAAA,OAAO,EAAGJ,kBADX;AAEC,IAAA,SAAS,EAAC,mCAFX;AAGC,IAAA,QAAQ,EAAGL;AAHZ,IALD,EAUC,4BAAC,wBAAD;AACC,IAAA,OAAO,EAAGU,eADX;AAEC,IAAA,SAAS,EAAC,gCAFX;AAGC,IAAA,QAAQ,EAAGV;AAHZ,IAVD,CADD;AAkBA;;eAEcD,O","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { NoticeList, SnackbarList } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as noticesStore } from '@wordpress/notices';\n\nfunction Notices() {\n\tconst { removeNotice } = useDispatch( noticesStore );\n\tconst { notices } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tnotices: select( noticesStore ).getNotices(),\n\t\t};\n\t}, [] );\n\n\tconst dismissibleNotices = notices.filter(\n\t\t( { isDismissible, type } ) => isDismissible && type === 'default'\n\t);\n\tconst nonDismissibleNotices = notices.filter(\n\t\t( { isDismissible, type } ) => ! isDismissible && type === 'default'\n\t);\n\tconst snackbarNotices = notices.filter(\n\t\t( { type } ) => type === 'snackbar'\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<NoticeList\n\t\t\t\tnotices={ nonDismissibleNotices }\n\t\t\t\tclassName=\"edit-widgets-notices__pinned\"\n\t\t\t/>\n\t\t\t<NoticeList\n\t\t\t\tnotices={ dismissibleNotices }\n\t\t\t\tclassName=\"edit-widgets-notices__dismissible\"\n\t\t\t\tonRemove={ removeNotice }\n\t\t\t/>\n\t\t\t<SnackbarList\n\t\t\t\tnotices={ snackbarNotices }\n\t\t\t\tclassName=\"edit-widgets-notices__snackbar\"\n\t\t\t\tonRemove={ removeNotice }\n\t\t\t/>\n\t\t</>\n\t);\n}\n\nexport default Notices;\n"]}
|
|
@@ -23,7 +23,8 @@ const metadata = {
|
|
|
23
23
|
customClassName: false,
|
|
24
24
|
reusable: false,
|
|
25
25
|
__experimentalToolbar: false,
|
|
26
|
-
__experimentalParentSelector: false
|
|
26
|
+
__experimentalParentSelector: false,
|
|
27
|
+
__experimentalDisableBlockOverlay: true
|
|
27
28
|
},
|
|
28
29
|
editorStyle: "wp-block-widget-area-editor",
|
|
29
30
|
style: "wp-block-widget-area"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-widgets/src/blocks/widget-area/index.js"],"names":["__","edit","name","metadata","settings","title","description","__experimentalLabel","label"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AAEA;AACA;AACA
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-widgets/src/blocks/widget-area/index.js"],"names":["__","edit","name","metadata","settings","title","description","__experimentalLabel","label"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBC,EAAAA,KAAK,EAAEL,EAAE,CAAE,aAAF,CADc;AAEvBM,EAAAA,WAAW,EAAEN,EAAE,CAAE,0BAAF,CAFQ;AAGvBO,EAAAA,mBAAmB,EAAE;AAAA,QAAE;AAAEL,MAAAA,IAAI,EAAEM;AAAR,KAAF;AAAA,WAAuBA,KAAvB;AAAA,GAHE;AAIvBP,EAAAA;AAJuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ttitle: __( 'Widget Area' ),\n\tdescription: __( 'A widget area container.' ),\n\t__experimentalLabel: ( { name: label } ) => label,\n\tedit,\n};\n"]}
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import { createElement } from "@wordpress/element";
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* External dependencies
|
|
5
|
-
*/
|
|
6
|
-
import { castArray } from 'lodash';
|
|
7
3
|
/**
|
|
8
4
|
* WordPress dependencies
|
|
9
5
|
*/
|
|
10
|
-
|
|
11
6
|
import { Fragment } from '@wordpress/element';
|
|
12
7
|
import { displayShortcutList, shortcutAriaLabel } from '@wordpress/keycodes';
|
|
13
8
|
|
|
@@ -18,10 +13,11 @@ function KeyCombination(_ref) {
|
|
|
18
13
|
} = _ref;
|
|
19
14
|
const shortcut = keyCombination.modifier ? displayShortcutList[keyCombination.modifier](keyCombination.character) : keyCombination.character;
|
|
20
15
|
const ariaLabel = keyCombination.modifier ? shortcutAriaLabel[keyCombination.modifier](keyCombination.character) : keyCombination.character;
|
|
16
|
+
const shortcuts = Array.isArray(shortcut) ? shortcut : [shortcut];
|
|
21
17
|
return createElement("kbd", {
|
|
22
18
|
className: "edit-widgets-keyboard-shortcut-help-modal__shortcut-key-combination",
|
|
23
19
|
"aria-label": forceAriaLabel || ariaLabel
|
|
24
|
-
},
|
|
20
|
+
}, shortcuts.map((character, index) => {
|
|
25
21
|
if (character === '+') {
|
|
26
22
|
return createElement(Fragment, {
|
|
27
23
|
key: index
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-widgets/src/components/keyboard-shortcut-help-modal/shortcut.js"],"names":["
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-widgets/src/components/keyboard-shortcut-help-modal/shortcut.js"],"names":["Fragment","displayShortcutList","shortcutAriaLabel","KeyCombination","keyCombination","forceAriaLabel","shortcut","modifier","character","ariaLabel","shortcuts","Array","isArray","map","index","Shortcut","description","aliases","alias"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,QAAT,QAAyB,oBAAzB;AACA,SAASC,mBAAT,EAA8BC,iBAA9B,QAAuD,qBAAvD;;AAEA,SAASC,cAAT,OAA8D;AAAA,MAArC;AAAEC,IAAAA,cAAF;AAAkBC,IAAAA;AAAlB,GAAqC;AAC7D,QAAMC,QAAQ,GAAGF,cAAc,CAACG,QAAf,GACdN,mBAAmB,CAAEG,cAAc,CAACG,QAAjB,CAAnB,CACAH,cAAc,CAACI,SADf,CADc,GAIdJ,cAAc,CAACI,SAJlB;AAKA,QAAMC,SAAS,GAAGL,cAAc,CAACG,QAAf,GACfL,iBAAiB,CAAEE,cAAc,CAACG,QAAjB,CAAjB,CACAH,cAAc,CAACI,SADf,CADe,GAIfJ,cAAc,CAACI,SAJlB;AAKA,QAAME,SAAS,GAAGC,KAAK,CAACC,OAAN,CAAeN,QAAf,IAA4BA,QAA5B,GAAuC,CAAEA,QAAF,CAAzD;AAEA,SACC;AACC,IAAA,SAAS,EAAC,qEADX;AAEC,kBAAaD,cAAc,IAAII;AAFhC,KAIGC,SAAS,CAACG,GAAV,CAAe,CAAEL,SAAF,EAAaM,KAAb,KAAwB;AACxC,QAAKN,SAAS,KAAK,GAAnB,EAAyB;AACxB,aAAO,cAAC,QAAD;AAAU,QAAA,GAAG,EAAGM;AAAhB,SAA0BN,SAA1B,CAAP;AACA;;AAED,WACC;AACC,MAAA,GAAG,EAAGM,KADP;AAEC,MAAA,SAAS,EAAC;AAFX,OAIGN,SAJH,CADD;AAQA,GAbC,CAJH,CADD;AAqBA;;AAED,SAASO,QAAT,QAA8E;AAAA,MAA3D;AAAEC,IAAAA,WAAF;AAAeZ,IAAAA,cAAf;AAA+Ba,IAAAA,OAAO,GAAG,EAAzC;AAA6CR,IAAAA;AAA7C,GAA2D;AAC7E,SACC,8BACC;AAAK,IAAA,SAAS,EAAC;AAAf,KACGO,WADH,CADD,EAIC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC,cAAC,cAAD;AACC,IAAA,cAAc,EAAGZ,cADlB;AAEC,IAAA,cAAc,EAAGK;AAFlB,IADD,EAKGQ,OAAO,CAACJ,GAAR,CAAa,CAAEK,KAAF,EAASJ,KAAT,KACd,cAAC,cAAD;AACC,IAAA,cAAc,EAAGI,KADlB;AAEC,IAAA,cAAc,EAAGT,SAFlB;AAGC,IAAA,GAAG,EAAGK;AAHP,IADC,CALH,CAJD,CADD;AAoBA;;AAED,eAAeC,QAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Fragment } from '@wordpress/element';\nimport { displayShortcutList, shortcutAriaLabel } from '@wordpress/keycodes';\n\nfunction KeyCombination( { keyCombination, forceAriaLabel } ) {\n\tconst shortcut = keyCombination.modifier\n\t\t? displayShortcutList[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t )\n\t\t: keyCombination.character;\n\tconst ariaLabel = keyCombination.modifier\n\t\t? shortcutAriaLabel[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t )\n\t\t: keyCombination.character;\n\tconst shortcuts = Array.isArray( shortcut ) ? shortcut : [ shortcut ];\n\n\treturn (\n\t\t<kbd\n\t\t\tclassName=\"edit-widgets-keyboard-shortcut-help-modal__shortcut-key-combination\"\n\t\t\taria-label={ forceAriaLabel || ariaLabel }\n\t\t>\n\t\t\t{ shortcuts.map( ( character, index ) => {\n\t\t\t\tif ( character === '+' ) {\n\t\t\t\t\treturn <Fragment key={ index }>{ character }</Fragment>;\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\t<kbd\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\tclassName=\"edit-widgets-keyboard-shortcut-help-modal__shortcut-key\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ character }\n\t\t\t\t\t</kbd>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</kbd>\n\t);\n}\n\nfunction Shortcut( { description, keyCombination, aliases = [], ariaLabel } ) {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"edit-widgets-keyboard-shortcut-help-modal__shortcut-description\">\n\t\t\t\t{ description }\n\t\t\t</div>\n\t\t\t<div className=\"edit-widgets-keyboard-shortcut-help-modal__shortcut-term\">\n\t\t\t\t<KeyCombination\n\t\t\t\t\tkeyCombination={ keyCombination }\n\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t/>\n\t\t\t\t{ aliases.map( ( alias, index ) => (\n\t\t\t\t\t<KeyCombination\n\t\t\t\t\t\tkeyCombination={ alias }\n\t\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default Shortcut;\n"]}
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import { createElement } from "@wordpress/element";
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* External dependencies
|
|
5
|
-
*/
|
|
6
|
-
import { isEmpty } from 'lodash';
|
|
7
3
|
/**
|
|
8
4
|
* WordPress dependencies
|
|
9
5
|
*/
|
|
10
|
-
|
|
11
6
|
import { createSlotFill } from '@wordpress/components';
|
|
12
7
|
const {
|
|
13
8
|
Fill: ToolsMoreMenuGroup,
|
|
@@ -20,7 +15,7 @@ ToolsMoreMenuGroup.Slot = _ref => {
|
|
|
20
15
|
} = _ref;
|
|
21
16
|
return createElement(Slot, {
|
|
22
17
|
fillProps: fillProps
|
|
23
|
-
}, fills =>
|
|
18
|
+
}, fills => fills.length > 0 && fills);
|
|
24
19
|
};
|
|
25
20
|
|
|
26
21
|
export default ToolsMoreMenuGroup;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-widgets/src/components/more-menu/tools-more-menu-group.js"],"names":["
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-widgets/src/components/more-menu/tools-more-menu-group.js"],"names":["createSlotFill","Fill","ToolsMoreMenuGroup","Slot","fillProps","fills","length"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,cAAT,QAA+B,uBAA/B;AAEA,MAAM;AAAEC,EAAAA,IAAI,EAAEC,kBAAR;AAA4BC,EAAAA;AAA5B,IAAqCH,cAAc,CACxD,+BADwD,CAAzD;;AAIAE,kBAAkB,CAACC,IAAnB,GAA0B;AAAA,MAAE;AAAEC,IAAAA;AAAF,GAAF;AAAA,SACzB,cAAC,IAAD;AAAM,IAAA,SAAS,EAAGA;AAAlB,KACKC,KAAF,IAAaA,KAAK,CAACC,MAAN,GAAe,CAAf,IAAoBD,KADpC,CADyB;AAAA,CAA1B;;AAMA,eAAeH,kBAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createSlotFill } from '@wordpress/components';\n\nconst { Fill: ToolsMoreMenuGroup, Slot } = createSlotFill(\n\t'EditWidgetsToolsMoreMenuGroup'\n);\n\nToolsMoreMenuGroup.Slot = ( { fillProps } ) => (\n\t<Slot fillProps={ fillProps }>\n\t\t{ ( fills ) => fills.length > 0 && fills }\n\t</Slot>\n);\n\nexport default ToolsMoreMenuGroup;\n"]}
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import { createElement, Fragment } from "@wordpress/element";
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* External dependencies
|
|
5
|
-
*/
|
|
6
|
-
import { filter } from 'lodash';
|
|
7
3
|
/**
|
|
8
4
|
* WordPress dependencies
|
|
9
5
|
*/
|
|
10
|
-
|
|
11
6
|
import { NoticeList, SnackbarList } from '@wordpress/components';
|
|
12
7
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
13
8
|
import { store as noticesStore } from '@wordpress/notices';
|
|
@@ -23,16 +18,25 @@ function Notices() {
|
|
|
23
18
|
notices: select(noticesStore).getNotices()
|
|
24
19
|
};
|
|
25
20
|
}, []);
|
|
26
|
-
const dismissibleNotices = filter(
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
const dismissibleNotices = notices.filter(_ref => {
|
|
22
|
+
let {
|
|
23
|
+
isDismissible,
|
|
24
|
+
type
|
|
25
|
+
} = _ref;
|
|
26
|
+
return isDismissible && type === 'default';
|
|
29
27
|
});
|
|
30
|
-
const nonDismissibleNotices = filter(
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
const nonDismissibleNotices = notices.filter(_ref2 => {
|
|
29
|
+
let {
|
|
30
|
+
isDismissible,
|
|
31
|
+
type
|
|
32
|
+
} = _ref2;
|
|
33
|
+
return !isDismissible && type === 'default';
|
|
33
34
|
});
|
|
34
|
-
const snackbarNotices = filter(
|
|
35
|
-
|
|
35
|
+
const snackbarNotices = notices.filter(_ref3 => {
|
|
36
|
+
let {
|
|
37
|
+
type
|
|
38
|
+
} = _ref3;
|
|
39
|
+
return type === 'snackbar';
|
|
36
40
|
});
|
|
37
41
|
return createElement(Fragment, null, createElement(NoticeList, {
|
|
38
42
|
notices: nonDismissibleNotices,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-widgets/src/components/notices/index.js"],"names":["
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-widgets/src/components/notices/index.js"],"names":["NoticeList","SnackbarList","useSelect","useDispatch","store","noticesStore","Notices","removeNotice","notices","select","getNotices","dismissibleNotices","filter","isDismissible","type","nonDismissibleNotices","snackbarNotices"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,UAAT,EAAqBC,YAArB,QAAyC,uBAAzC;AACA,SAASC,SAAT,EAAoBC,WAApB,QAAuC,iBAAvC;AACA,SAASC,KAAK,IAAIC,YAAlB,QAAsC,oBAAtC;;AAEA,SAASC,OAAT,GAAmB;AAClB,QAAM;AAAEC,IAAAA;AAAF,MAAmBJ,WAAW,CAAEE,YAAF,CAApC;AACA,QAAM;AAAEG,IAAAA;AAAF,MAAcN,SAAS,CAAIO,MAAF,IAAc;AAC5C,WAAO;AACND,MAAAA,OAAO,EAAEC,MAAM,CAAEJ,YAAF,CAAN,CAAuBK,UAAvB;AADH,KAAP;AAGA,GAJ4B,EAI1B,EAJ0B,CAA7B;AAMA,QAAMC,kBAAkB,GAAGH,OAAO,CAACI,MAAR,CAC1B;AAAA,QAAE;AAAEC,MAAAA,aAAF;AAAiBC,MAAAA;AAAjB,KAAF;AAAA,WAA+BD,aAAa,IAAIC,IAAI,KAAK,SAAzD;AAAA,GAD0B,CAA3B;AAGA,QAAMC,qBAAqB,GAAGP,OAAO,CAACI,MAAR,CAC7B;AAAA,QAAE;AAAEC,MAAAA,aAAF;AAAiBC,MAAAA;AAAjB,KAAF;AAAA,WAA+B,CAAED,aAAF,IAAmBC,IAAI,KAAK,SAA3D;AAAA,GAD6B,CAA9B;AAGA,QAAME,eAAe,GAAGR,OAAO,CAACI,MAAR,CACvB;AAAA,QAAE;AAAEE,MAAAA;AAAF,KAAF;AAAA,WAAgBA,IAAI,KAAK,UAAzB;AAAA,GADuB,CAAxB;AAIA,SACC,8BACC,cAAC,UAAD;AACC,IAAA,OAAO,EAAGC,qBADX;AAEC,IAAA,SAAS,EAAC;AAFX,IADD,EAKC,cAAC,UAAD;AACC,IAAA,OAAO,EAAGJ,kBADX;AAEC,IAAA,SAAS,EAAC,mCAFX;AAGC,IAAA,QAAQ,EAAGJ;AAHZ,IALD,EAUC,cAAC,YAAD;AACC,IAAA,OAAO,EAAGS,eADX;AAEC,IAAA,SAAS,EAAC,gCAFX;AAGC,IAAA,QAAQ,EAAGT;AAHZ,IAVD,CADD;AAkBA;;AAED,eAAeD,OAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { NoticeList, SnackbarList } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as noticesStore } from '@wordpress/notices';\n\nfunction Notices() {\n\tconst { removeNotice } = useDispatch( noticesStore );\n\tconst { notices } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tnotices: select( noticesStore ).getNotices(),\n\t\t};\n\t}, [] );\n\n\tconst dismissibleNotices = notices.filter(\n\t\t( { isDismissible, type } ) => isDismissible && type === 'default'\n\t);\n\tconst nonDismissibleNotices = notices.filter(\n\t\t( { isDismissible, type } ) => ! isDismissible && type === 'default'\n\t);\n\tconst snackbarNotices = notices.filter(\n\t\t( { type } ) => type === 'snackbar'\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<NoticeList\n\t\t\t\tnotices={ nonDismissibleNotices }\n\t\t\t\tclassName=\"edit-widgets-notices__pinned\"\n\t\t\t/>\n\t\t\t<NoticeList\n\t\t\t\tnotices={ dismissibleNotices }\n\t\t\t\tclassName=\"edit-widgets-notices__dismissible\"\n\t\t\t\tonRemove={ removeNotice }\n\t\t\t/>\n\t\t\t<SnackbarList\n\t\t\t\tnotices={ snackbarNotices }\n\t\t\t\tclassName=\"edit-widgets-notices__snackbar\"\n\t\t\t\tonRemove={ removeNotice }\n\t\t\t/>\n\t\t</>\n\t);\n}\n\nexport default Notices;\n"]}
|
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
top: 0;
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
|
-
.interface-complementary-area p {
|
|
163
|
+
.interface-complementary-area p:not(.components-base-control__help) {
|
|
164
164
|
margin-top: 0;
|
|
165
165
|
}
|
|
166
166
|
.interface-complementary-area h2 {
|
|
@@ -505,6 +505,10 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
505
505
|
margin: 0;
|
|
506
506
|
}
|
|
507
507
|
|
|
508
|
+
.interface-preferences-modal__section-legend {
|
|
509
|
+
margin-bottom: 8px;
|
|
510
|
+
}
|
|
511
|
+
|
|
508
512
|
.interface-preferences-modal__section-title {
|
|
509
513
|
font-size: 0.9rem;
|
|
510
514
|
font-weight: 600;
|
|
@@ -518,20 +522,12 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
518
522
|
color: #757575;
|
|
519
523
|
}
|
|
520
524
|
|
|
521
|
-
.interface-preferences-modal__option
|
|
522
|
-
|
|
523
|
-
display: flex;
|
|
524
|
-
margin-bottom: 0;
|
|
525
|
-
}
|
|
526
|
-
.interface-preferences-modal__option .components-base-control .components-base-control__field > label {
|
|
527
|
-
flex-grow: 1;
|
|
528
|
-
padding: 0.6rem 10px 0.6rem 0;
|
|
525
|
+
.interface-preferences-modal__option + .interface-preferences-modal__option {
|
|
526
|
+
margin-top: 16px;
|
|
529
527
|
}
|
|
530
528
|
.interface-preferences-modal__option .components-base-control__help {
|
|
531
|
-
margin:
|
|
532
|
-
|
|
533
|
-
font-style: normal;
|
|
534
|
-
color: #757575;
|
|
529
|
+
margin-top: 0;
|
|
530
|
+
margin-right: 48px;
|
|
535
531
|
}
|
|
536
532
|
|
|
537
533
|
.wp-block[data-type="core/widget-area"] {
|
package/build-style/style.css
CHANGED
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
top: 0;
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
|
-
.interface-complementary-area p {
|
|
163
|
+
.interface-complementary-area p:not(.components-base-control__help) {
|
|
164
164
|
margin-top: 0;
|
|
165
165
|
}
|
|
166
166
|
.interface-complementary-area h2 {
|
|
@@ -505,6 +505,10 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
505
505
|
margin: 0;
|
|
506
506
|
}
|
|
507
507
|
|
|
508
|
+
.interface-preferences-modal__section-legend {
|
|
509
|
+
margin-bottom: 8px;
|
|
510
|
+
}
|
|
511
|
+
|
|
508
512
|
.interface-preferences-modal__section-title {
|
|
509
513
|
font-size: 0.9rem;
|
|
510
514
|
font-weight: 600;
|
|
@@ -518,20 +522,12 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
518
522
|
color: #757575;
|
|
519
523
|
}
|
|
520
524
|
|
|
521
|
-
.interface-preferences-modal__option
|
|
522
|
-
|
|
523
|
-
display: flex;
|
|
524
|
-
margin-bottom: 0;
|
|
525
|
-
}
|
|
526
|
-
.interface-preferences-modal__option .components-base-control .components-base-control__field > label {
|
|
527
|
-
flex-grow: 1;
|
|
528
|
-
padding: 0.6rem 0 0.6rem 10px;
|
|
525
|
+
.interface-preferences-modal__option + .interface-preferences-modal__option {
|
|
526
|
+
margin-top: 16px;
|
|
529
527
|
}
|
|
530
528
|
.interface-preferences-modal__option .components-base-control__help {
|
|
531
|
-
margin:
|
|
532
|
-
|
|
533
|
-
font-style: normal;
|
|
534
|
-
color: #757575;
|
|
529
|
+
margin-top: 0;
|
|
530
|
+
margin-left: 48px;
|
|
535
531
|
}
|
|
536
532
|
|
|
537
533
|
.wp-block[data-type="core/widget-area"] {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/edit-widgets",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.14.0",
|
|
4
4
|
"description": "Widgets Page module for WordPress..",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -27,32 +27,31 @@
|
|
|
27
27
|
"react-native": "src/index",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@babel/runtime": "^7.16.0",
|
|
30
|
-
"@wordpress/api-fetch": "^6.
|
|
31
|
-
"@wordpress/block-editor": "^
|
|
32
|
-
"@wordpress/block-library": "^7.
|
|
33
|
-
"@wordpress/blocks": "^11.
|
|
34
|
-
"@wordpress/components": "^
|
|
35
|
-
"@wordpress/compose": "^5.
|
|
36
|
-
"@wordpress/core-data": "^
|
|
37
|
-
"@wordpress/data": "^7.
|
|
38
|
-
"@wordpress/deprecated": "^3.
|
|
39
|
-
"@wordpress/dom": "^3.
|
|
40
|
-
"@wordpress/element": "^4.
|
|
41
|
-
"@wordpress/hooks": "^3.
|
|
42
|
-
"@wordpress/i18n": "^4.
|
|
43
|
-
"@wordpress/icons": "^9.
|
|
44
|
-
"@wordpress/interface": "^4.
|
|
45
|
-
"@wordpress/keyboard-shortcuts": "^3.
|
|
46
|
-
"@wordpress/keycodes": "^3.
|
|
47
|
-
"@wordpress/media-utils": "^4.
|
|
48
|
-
"@wordpress/notices": "^3.
|
|
49
|
-
"@wordpress/plugins": "^4.
|
|
50
|
-
"@wordpress/preferences": "^2.
|
|
51
|
-
"@wordpress/reusable-blocks": "^3.
|
|
52
|
-
"@wordpress/url": "^3.
|
|
53
|
-
"@wordpress/widgets": "^2.
|
|
54
|
-
"classnames": "^2.3.1"
|
|
55
|
-
"lodash": "^4.17.21"
|
|
30
|
+
"@wordpress/api-fetch": "^6.14.0",
|
|
31
|
+
"@wordpress/block-editor": "^10.0.0",
|
|
32
|
+
"@wordpress/block-library": "^7.14.0",
|
|
33
|
+
"@wordpress/blocks": "^11.16.0",
|
|
34
|
+
"@wordpress/components": "^21.0.0",
|
|
35
|
+
"@wordpress/compose": "^5.15.0",
|
|
36
|
+
"@wordpress/core-data": "^5.0.0",
|
|
37
|
+
"@wordpress/data": "^7.1.0",
|
|
38
|
+
"@wordpress/deprecated": "^3.17.0",
|
|
39
|
+
"@wordpress/dom": "^3.17.0",
|
|
40
|
+
"@wordpress/element": "^4.15.0",
|
|
41
|
+
"@wordpress/hooks": "^3.17.0",
|
|
42
|
+
"@wordpress/i18n": "^4.17.0",
|
|
43
|
+
"@wordpress/icons": "^9.8.0",
|
|
44
|
+
"@wordpress/interface": "^4.16.0",
|
|
45
|
+
"@wordpress/keyboard-shortcuts": "^3.15.0",
|
|
46
|
+
"@wordpress/keycodes": "^3.17.0",
|
|
47
|
+
"@wordpress/media-utils": "^4.8.0",
|
|
48
|
+
"@wordpress/notices": "^3.17.0",
|
|
49
|
+
"@wordpress/plugins": "^4.15.0",
|
|
50
|
+
"@wordpress/preferences": "^2.9.0",
|
|
51
|
+
"@wordpress/reusable-blocks": "^3.15.0",
|
|
52
|
+
"@wordpress/url": "^3.18.0",
|
|
53
|
+
"@wordpress/widgets": "^2.15.0",
|
|
54
|
+
"classnames": "^2.3.1"
|
|
56
55
|
},
|
|
57
56
|
"peerDependencies": {
|
|
58
57
|
"react": "^17.0.0",
|
|
@@ -61,5 +60,5 @@
|
|
|
61
60
|
"publishConfig": {
|
|
62
61
|
"access": "public"
|
|
63
62
|
},
|
|
64
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "0d732d4b184adcb28cc83087603e81b764390d4b"
|
|
65
64
|
}
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"customClassName": false,
|
|
16
16
|
"reusable": false,
|
|
17
17
|
"__experimentalToolbar": false,
|
|
18
|
-
"__experimentalParentSelector": false
|
|
18
|
+
"__experimentalParentSelector": false,
|
|
19
|
+
"__experimentalDisableBlockOverlay": true
|
|
19
20
|
},
|
|
20
21
|
"editorStyle": "wp-block-widget-area-editor",
|
|
21
22
|
"style": "wp-block-widget-area"
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { castArray } from 'lodash';
|
|
5
|
-
|
|
6
1
|
/**
|
|
7
2
|
* WordPress dependencies
|
|
8
3
|
*/
|
|
@@ -20,13 +15,14 @@ function KeyCombination( { keyCombination, forceAriaLabel } ) {
|
|
|
20
15
|
keyCombination.character
|
|
21
16
|
)
|
|
22
17
|
: keyCombination.character;
|
|
18
|
+
const shortcuts = Array.isArray( shortcut ) ? shortcut : [ shortcut ];
|
|
23
19
|
|
|
24
20
|
return (
|
|
25
21
|
<kbd
|
|
26
22
|
className="edit-widgets-keyboard-shortcut-help-modal__shortcut-key-combination"
|
|
27
23
|
aria-label={ forceAriaLabel || ariaLabel }
|
|
28
24
|
>
|
|
29
|
-
{
|
|
25
|
+
{ shortcuts.map( ( character, index ) => {
|
|
30
26
|
if ( character === '+' ) {
|
|
31
27
|
return <Fragment key={ index }>{ character }</Fragment>;
|
|
32
28
|
}
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { isEmpty } from 'lodash';
|
|
5
|
-
|
|
6
1
|
/**
|
|
7
2
|
* WordPress dependencies
|
|
8
3
|
*/
|
|
@@ -14,7 +9,7 @@ const { Fill: ToolsMoreMenuGroup, Slot } = createSlotFill(
|
|
|
14
9
|
|
|
15
10
|
ToolsMoreMenuGroup.Slot = ( { fillProps } ) => (
|
|
16
11
|
<Slot fillProps={ fillProps }>
|
|
17
|
-
{ ( fills ) =>
|
|
12
|
+
{ ( fills ) => fills.length > 0 && fills }
|
|
18
13
|
</Slot>
|
|
19
14
|
);
|
|
20
15
|
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { filter } from 'lodash';
|
|
5
|
-
|
|
6
1
|
/**
|
|
7
2
|
* WordPress dependencies
|
|
8
3
|
*/
|
|
@@ -18,17 +13,15 @@ function Notices() {
|
|
|
18
13
|
};
|
|
19
14
|
}, [] );
|
|
20
15
|
|
|
21
|
-
const dismissibleNotices = filter(
|
|
22
|
-
isDismissible
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
type: 'snackbar',
|
|
31
|
-
} );
|
|
16
|
+
const dismissibleNotices = notices.filter(
|
|
17
|
+
( { isDismissible, type } ) => isDismissible && type === 'default'
|
|
18
|
+
);
|
|
19
|
+
const nonDismissibleNotices = notices.filter(
|
|
20
|
+
( { isDismissible, type } ) => ! isDismissible && type === 'default'
|
|
21
|
+
);
|
|
22
|
+
const snackbarNotices = notices.filter(
|
|
23
|
+
( { type } ) => type === 'snackbar'
|
|
24
|
+
);
|
|
32
25
|
|
|
33
26
|
return (
|
|
34
27
|
<>
|