@wordpress/interface 5.16.0 → 5.17.1
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 +2 -0
- package/build/components/action-item/index.js +6 -14
- package/build/components/action-item/index.js.map +1 -1
- package/build/components/complementary-area/index.js +9 -28
- package/build/components/complementary-area/index.js.map +1 -1
- package/build/components/complementary-area-context/index.js +0 -3
- package/build/components/complementary-area-context/index.js.map +1 -1
- package/build/components/complementary-area-header/index.js +1 -7
- package/build/components/complementary-area-header/index.js.map +1 -1
- package/build/components/complementary-area-more-menu-item/index.js +3 -9
- package/build/components/complementary-area-more-menu-item/index.js.map +1 -1
- package/build/components/complementary-area-toggle/index.js +2 -10
- package/build/components/complementary-area-toggle/index.js.map +1 -1
- package/build/components/fullscreen-mode/index.js +3 -7
- package/build/components/fullscreen-mode/index.js.map +1 -1
- package/build/components/index.js +0 -14
- package/build/components/index.js.map +1 -1
- package/build/components/index.native.js +0 -3
- package/build/components/index.native.js.map +1 -1
- package/build/components/interface-skeleton/index.js +8 -22
- package/build/components/interface-skeleton/index.js.map +1 -1
- package/build/components/more-menu-dropdown/index.js +1 -8
- package/build/components/more-menu-dropdown/index.js.map +1 -1
- package/build/components/more-menu-feature-toggle/index.js +2 -11
- package/build/components/more-menu-feature-toggle/index.js.map +1 -1
- package/build/components/navigable-region/index.js +1 -4
- package/build/components/navigable-region/index.js.map +1 -1
- package/build/components/pinned-items/index.js +1 -7
- package/build/components/pinned-items/index.js.map +1 -1
- package/build/components/preferences-modal/index.js +1 -4
- package/build/components/preferences-modal/index.js.map +1 -1
- package/build/components/preferences-modal-base-option/index.js +1 -4
- package/build/components/preferences-modal-base-option/index.js.map +1 -1
- package/build/components/preferences-modal-section/index.js +0 -3
- package/build/components/preferences-modal-section/index.js.map +1 -1
- package/build/components/preferences-modal-tabs/index.js +6 -15
- package/build/components/preferences-modal-tabs/index.js.map +1 -1
- package/build/index.js +0 -3
- package/build/index.js.map +1 -1
- package/build/store/actions.js +15 -37
- package/build/store/actions.js.map +1 -1
- package/build/store/constants.js +0 -1
- package/build/store/constants.js.map +1 -1
- package/build/store/index.js +3 -11
- package/build/store/index.js.map +1 -1
- package/build/store/reducer.js +8 -14
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +8 -15
- package/build/store/selectors.js.map +1 -1
- package/build-module/components/action-item/index.js +5 -10
- package/build-module/components/action-item/index.js.map +1 -1
- package/build-module/components/complementary-area/index.js +10 -17
- package/build-module/components/complementary-area/index.js.map +1 -1
- package/build-module/components/complementary-area-context/index.js.map +1 -1
- package/build-module/components/complementary-area-header/index.js +2 -5
- package/build-module/components/complementary-area-header/index.js.map +1 -1
- package/build-module/components/complementary-area-more-menu-item/index.js +3 -5
- package/build-module/components/complementary-area-more-menu-item/index.js.map +1 -1
- package/build-module/components/complementary-area-toggle/index.js +2 -5
- package/build-module/components/complementary-area-toggle/index.js.map +1 -1
- package/build-module/components/fullscreen-mode/index.js +2 -6
- package/build-module/components/fullscreen-mode/index.js.map +1 -1
- package/build-module/components/index.js.map +1 -1
- package/build-module/components/index.native.js.map +1 -1
- package/build-module/components/interface-skeleton/index.js +9 -17
- package/build-module/components/interface-skeleton/index.js.map +1 -1
- package/build-module/components/more-menu-dropdown/index.js +1 -3
- package/build-module/components/more-menu-dropdown/index.js.map +1 -1
- package/build-module/components/more-menu-feature-toggle/index.js +2 -5
- package/build-module/components/more-menu-feature-toggle/index.js.map +1 -1
- package/build-module/components/navigable-region/index.js +0 -1
- package/build-module/components/navigable-region/index.js.map +1 -1
- package/build-module/components/pinned-items/index.js +1 -5
- package/build-module/components/pinned-items/index.js.map +1 -1
- package/build-module/components/preferences-modal/index.js +0 -1
- package/build-module/components/preferences-modal/index.js.map +1 -1
- package/build-module/components/preferences-modal-base-option/index.js +0 -3
- package/build-module/components/preferences-modal-base-option/index.js.map +1 -1
- package/build-module/components/preferences-modal-section/index.js +0 -2
- package/build-module/components/preferences-modal-section/index.js.map +1 -1
- package/build-module/components/preferences-modal-tabs/index.js +5 -9
- package/build-module/components/preferences-modal-tabs/index.js.map +1 -1
- package/build-module/index.js.map +1 -1
- package/build-module/store/actions.js +16 -20
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/constants.js.map +1 -1
- package/build-module/store/index.js +5 -4
- package/build-module/store/index.js.map +1 -1
- package/build-module/store/reducer.js +7 -9
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +9 -10
- package/build-module/store/selectors.js.map +1 -1
- package/build-style/style-rtl.css +14 -8
- package/build-style/style.css +14 -8
- package/package.json +13 -13
- package/src/components/complementary-area/README.md +1 -1
- package/src/components/complementary-area/index.js +18 -2
- package/src/components/complementary-area-toggle/index.js +1 -1
- package/src/components/interface-skeleton/index.js +2 -0
- package/src/components/interface-skeleton/style.scss +6 -0
- package/src/components/more-menu-feature-toggle/index.js +1 -1
- package/src/components/pinned-items/style.scss +12 -10
package/CHANGELOG.md
CHANGED
|
@@ -4,16 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _element = require("@wordpress/element");
|
|
9
|
-
|
|
10
8
|
var _components = require("@wordpress/components");
|
|
11
|
-
|
|
12
9
|
/**
|
|
13
10
|
* WordPress dependencies
|
|
14
11
|
*/
|
|
15
|
-
const noop = () => {};
|
|
16
12
|
|
|
13
|
+
const noop = () => {};
|
|
17
14
|
function ActionItemSlot({
|
|
18
15
|
name,
|
|
19
16
|
as: Component = _components.ButtonGroup,
|
|
@@ -28,15 +25,14 @@ function ActionItemSlot({
|
|
|
28
25
|
}, fills => {
|
|
29
26
|
if (!_element.Children.toArray(fills).length) {
|
|
30
27
|
return null;
|
|
31
|
-
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Special handling exists for backward compatibility.
|
|
32
31
|
// It ensures that menu items created by plugin authors aren't
|
|
33
32
|
// duplicated with automatically injected menu items coming
|
|
34
33
|
// from pinnable plugin sidebars.
|
|
35
34
|
// @see https://github.com/WordPress/gutenberg/issues/14457
|
|
36
|
-
|
|
37
|
-
|
|
38
35
|
const initializedByPlugins = [];
|
|
39
|
-
|
|
40
36
|
_element.Children.forEach(fills, ({
|
|
41
37
|
props: {
|
|
42
38
|
__unstableExplicitMenuItem,
|
|
@@ -47,20 +43,17 @@ function ActionItemSlot({
|
|
|
47
43
|
initializedByPlugins.push(__unstableTarget);
|
|
48
44
|
}
|
|
49
45
|
});
|
|
50
|
-
|
|
51
46
|
const children = _element.Children.map(fills, child => {
|
|
52
47
|
if (!child.props.__unstableExplicitMenuItem && initializedByPlugins.includes(child.props.__unstableTarget)) {
|
|
53
48
|
return null;
|
|
54
49
|
}
|
|
55
|
-
|
|
56
50
|
return child;
|
|
57
51
|
});
|
|
58
|
-
|
|
59
|
-
|
|
52
|
+
return (0, _element.createElement)(Component, {
|
|
53
|
+
...props
|
|
60
54
|
}, children);
|
|
61
55
|
});
|
|
62
56
|
}
|
|
63
|
-
|
|
64
57
|
function ActionItem({
|
|
65
58
|
name,
|
|
66
59
|
as: Component = _components.Button,
|
|
@@ -81,7 +74,6 @@ function ActionItem({
|
|
|
81
74
|
});
|
|
82
75
|
});
|
|
83
76
|
}
|
|
84
|
-
|
|
85
77
|
ActionItem.Slot = ActionItemSlot;
|
|
86
78
|
var _default = ActionItem;
|
|
87
79
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["_element","require","_components","noop","ActionItemSlot","name","as","Component","ButtonGroup","fillProps","bubblesVirtually","props","createElement","Slot","fills","Children","toArray","length","initializedByPlugins","forEach","__unstableExplicitMenuItem","__unstableTarget","push","children","map","child","includes","ActionItem","Button","onClick","Fill","fpOnClick","args","undefined","_default","exports","default"],"sources":["@wordpress/interface/src/components/action-item/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { ButtonGroup, Button, Slot, Fill } from '@wordpress/components';\nimport { Children } from '@wordpress/element';\n\nconst noop = () => {};\n\nfunction ActionItemSlot( {\n\tname,\n\tas: Component = ButtonGroup,\n\tfillProps = {},\n\tbubblesVirtually,\n\t...props\n} ) {\n\treturn (\n\t\t<Slot\n\t\t\tname={ name }\n\t\t\tbubblesVirtually={ bubblesVirtually }\n\t\t\tfillProps={ fillProps }\n\t\t>\n\t\t\t{ ( fills ) => {\n\t\t\t\tif ( ! Children.toArray( fills ).length ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\t// Special handling exists for backward compatibility.\n\t\t\t\t// It ensures that menu items created by plugin authors aren't\n\t\t\t\t// duplicated with automatically injected menu items coming\n\t\t\t\t// from pinnable plugin sidebars.\n\t\t\t\t// @see https://github.com/WordPress/gutenberg/issues/14457\n\t\t\t\tconst initializedByPlugins = [];\n\t\t\t\tChildren.forEach(\n\t\t\t\t\tfills,\n\t\t\t\t\t( {\n\t\t\t\t\t\tprops: { __unstableExplicitMenuItem, __unstableTarget },\n\t\t\t\t\t} ) => {\n\t\t\t\t\t\tif ( __unstableTarget && __unstableExplicitMenuItem ) {\n\t\t\t\t\t\t\tinitializedByPlugins.push( __unstableTarget );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t\tconst children = Children.map( fills, ( child ) => {\n\t\t\t\t\tif (\n\t\t\t\t\t\t! child.props.__unstableExplicitMenuItem &&\n\t\t\t\t\t\tinitializedByPlugins.includes(\n\t\t\t\t\t\t\tchild.props.__unstableTarget\n\t\t\t\t\t\t)\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\treturn child;\n\t\t\t\t} );\n\n\t\t\t\treturn <Component { ...props }>{ children }</Component>;\n\t\t\t} }\n\t\t</Slot>\n\t);\n}\n\nfunction ActionItem( { name, as: Component = Button, onClick, ...props } ) {\n\treturn (\n\t\t<Fill name={ name }>\n\t\t\t{ ( { onClick: fpOnClick } ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<Component\n\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\tonClick || fpOnClick\n\t\t\t\t\t\t\t\t? ( ...args ) => {\n\t\t\t\t\t\t\t\t\t\t( onClick || noop )( ...args );\n\t\t\t\t\t\t\t\t\t\t( fpOnClick || noop )( ...args );\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} }\n\t\t</Fill>\n\t);\n}\n\nActionItem.Slot = ActionItemSlot;\n\nexport default ActionItem;\n"],"mappings":";;;;;;AAIA,IAAAA,QAAA,GAAAC,OAAA;AADA,IAAAC,WAAA,GAAAD,OAAA;AAHA;AACA;AACA;;AAIA,MAAME,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;AAErB,SAASC,cAAcA,CAAE;EACxBC,IAAI;EACJC,EAAE,EAAEC,SAAS,GAAGC,uBAAW;EAC3BC,SAAS,GAAG,CAAC,CAAC;EACdC,gBAAgB;EAChB,GAAGC;AACJ,CAAC,EAAG;EACH,OACC,IAAAX,QAAA,CAAAY,aAAA,EAACV,WAAA,CAAAW,IAAI;IACJR,IAAI,EAAGA,IAAM;IACbK,gBAAgB,EAAGA,gBAAkB;IACrCD,SAAS,EAAGA;EAAW,GAEnBK,KAAK,IAAM;IACd,IAAK,CAAEC,iBAAQ,CAACC,OAAO,CAAEF,KAAM,CAAC,CAACG,MAAM,EAAG;MACzC,OAAO,IAAI;IACZ;;IAEA;IACA;IACA;IACA;IACA;IACA,MAAMC,oBAAoB,GAAG,EAAE;IAC/BH,iBAAQ,CAACI,OAAO,CACfL,KAAK,EACL,CAAE;MACDH,KAAK,EAAE;QAAES,0BAA0B;QAAEC;MAAiB;IACvD,CAAC,KAAM;MACN,IAAKA,gBAAgB,IAAID,0BAA0B,EAAG;QACrDF,oBAAoB,CAACI,IAAI,CA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");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
|
|
10
8
|
var _element = require("@wordpress/element");
|
|
11
|
-
|
|
12
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
-
|
|
14
10
|
var _components = require("@wordpress/components");
|
|
15
|
-
|
|
16
11
|
var _data = require("@wordpress/data");
|
|
17
|
-
|
|
18
12
|
var _i18n = require("@wordpress/i18n");
|
|
19
|
-
|
|
20
13
|
var _icons = require("@wordpress/icons");
|
|
21
|
-
|
|
22
14
|
var _viewport = require("@wordpress/viewport");
|
|
23
|
-
|
|
24
15
|
var _complementaryAreaHeader = _interopRequireDefault(require("../complementary-area-header"));
|
|
25
|
-
|
|
26
16
|
var _complementaryAreaMoreMenuItem = _interopRequireDefault(require("../complementary-area-more-menu-item"));
|
|
27
|
-
|
|
28
17
|
var _complementaryAreaToggle = _interopRequireDefault(require("../complementary-area-toggle"));
|
|
29
|
-
|
|
30
18
|
var _complementaryAreaContext = _interopRequireDefault(require("../complementary-area-context"));
|
|
31
|
-
|
|
32
19
|
var _pinnedItems = _interopRequireDefault(require("../pinned-items"));
|
|
33
|
-
|
|
34
20
|
var _store = require("../../store");
|
|
35
|
-
|
|
36
21
|
/**
|
|
37
22
|
* External dependencies
|
|
38
23
|
*/
|
|
@@ -44,6 +29,7 @@ var _store = require("../../store");
|
|
|
44
29
|
/**
|
|
45
30
|
* Internal dependencies
|
|
46
31
|
*/
|
|
32
|
+
|
|
47
33
|
function ComplementaryAreaSlot({
|
|
48
34
|
scope,
|
|
49
35
|
...props
|
|
@@ -53,7 +39,6 @@ function ComplementaryAreaSlot({
|
|
|
53
39
|
...props
|
|
54
40
|
});
|
|
55
41
|
}
|
|
56
|
-
|
|
57
42
|
function ComplementaryAreaFill({
|
|
58
43
|
scope,
|
|
59
44
|
children,
|
|
@@ -65,7 +50,6 @@ function ComplementaryAreaFill({
|
|
|
65
50
|
className: className
|
|
66
51
|
}, children));
|
|
67
52
|
}
|
|
68
|
-
|
|
69
53
|
function useAdjustComplementaryListener(scope, identifier, activeArea, isActive, isSmall) {
|
|
70
54
|
const previousIsSmall = (0, _element.useRef)(false);
|
|
71
55
|
const shouldOpenWhenNotSmall = (0, _element.useRef)(false);
|
|
@@ -77,11 +61,12 @@ function useAdjustComplementaryListener(scope, identifier, activeArea, isActive,
|
|
|
77
61
|
// If the complementary area is active and the editor is switching from
|
|
78
62
|
// a big to a small window size.
|
|
79
63
|
if (isActive && isSmall && !previousIsSmall.current) {
|
|
80
|
-
disableComplementaryArea(scope);
|
|
64
|
+
disableComplementaryArea(scope);
|
|
65
|
+
// Flag the complementary area to be reopened when the window size
|
|
81
66
|
// goes from small to big.
|
|
82
|
-
|
|
83
67
|
shouldOpenWhenNotSmall.current = true;
|
|
84
|
-
} else if (
|
|
68
|
+
} else if (
|
|
69
|
+
// If there is a flag indicating the complementary area should be
|
|
85
70
|
// enabled when we go from small to big window size and we are going
|
|
86
71
|
// from a small to big window size.
|
|
87
72
|
shouldOpenWhenNotSmall.current && !isSmall && previousIsSmall.current) {
|
|
@@ -89,19 +74,18 @@ function useAdjustComplementaryListener(scope, identifier, activeArea, isActive,
|
|
|
89
74
|
// enabled.
|
|
90
75
|
shouldOpenWhenNotSmall.current = false;
|
|
91
76
|
enableComplementaryArea(scope, identifier);
|
|
92
|
-
} else if (
|
|
77
|
+
} else if (
|
|
78
|
+
// If the flag is indicating the current complementary should be
|
|
93
79
|
// reopened but another complementary area becomes active, remove
|
|
94
80
|
// the flag.
|
|
95
81
|
shouldOpenWhenNotSmall.current && activeArea && activeArea !== identifier) {
|
|
96
82
|
shouldOpenWhenNotSmall.current = false;
|
|
97
83
|
}
|
|
98
|
-
|
|
99
84
|
if (isSmall !== previousIsSmall.current) {
|
|
100
85
|
previousIsSmall.current = isSmall;
|
|
101
86
|
}
|
|
102
|
-
}, [isActive, isSmall, scope, identifier, activeArea]);
|
|
87
|
+
}, [isActive, isSmall, scope, identifier, activeArea, disableComplementaryArea, enableComplementaryArea]);
|
|
103
88
|
}
|
|
104
|
-
|
|
105
89
|
function ComplementaryArea({
|
|
106
90
|
children,
|
|
107
91
|
className,
|
|
@@ -133,9 +117,7 @@ function ComplementaryArea({
|
|
|
133
117
|
isComplementaryAreaLoading,
|
|
134
118
|
isItemPinned
|
|
135
119
|
} = select(_store.store);
|
|
136
|
-
|
|
137
120
|
const _activeArea = getActiveComplementaryArea(scope);
|
|
138
|
-
|
|
139
121
|
return {
|
|
140
122
|
isLoading: isComplementaryAreaLoading(scope),
|
|
141
123
|
isActive: _activeArea === identifier,
|
|
@@ -160,7 +142,7 @@ function ComplementaryArea({
|
|
|
160
142
|
} else if (activeArea === undefined && isSmall) {
|
|
161
143
|
disableComplementaryArea(scope, identifier);
|
|
162
144
|
}
|
|
163
|
-
}, [activeArea, isActiveByDefault, scope, identifier, isSmall]);
|
|
145
|
+
}, [activeArea, isActiveByDefault, scope, identifier, isSmall, enableComplementaryArea, disableComplementaryArea]);
|
|
164
146
|
return (0, _element.createElement)(_element.Fragment, null, isPinnable && (0, _element.createElement)(_pinnedItems.default, {
|
|
165
147
|
scope: scope
|
|
166
148
|
}, isPinned && (0, _element.createElement)(_complementaryAreaToggle.default, {
|
|
@@ -202,7 +184,6 @@ function ComplementaryArea({
|
|
|
202
184
|
className: panelClassName
|
|
203
185
|
}, children)));
|
|
204
186
|
}
|
|
205
|
-
|
|
206
187
|
const ComplementaryAreaWrapped = (0, _complementaryAreaContext.default)(ComplementaryArea);
|
|
207
188
|
ComplementaryAreaWrapped.Slot = ComplementaryAreaSlot;
|
|
208
189
|
var _default = ComplementaryAreaWrapped;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/interface/src/components/complementary-area/index.js"],"names":["ComplementaryAreaSlot","scope","props","ComplementaryAreaFill","children","className","useAdjustComplementaryListener","identifier","activeArea","isActive","isSmall","previousIsSmall","shouldOpenWhenNotSmall","enableComplementaryArea","disableComplementaryArea","interfaceStore","current","ComplementaryArea","closeLabel","header","headerClassName","icon","isPinnable","panelClassName","name","smallScreenTitle","title","toggleShortcut","isActiveByDefault","showIconLabels","isLoading","isPinned","isLarge","select","getActiveComplementaryArea","isComplementaryAreaLoading","isItemPinned","_activeArea","viewportStore","isViewportMatch","pinItem","unpinItem","undefined","check","label","shortcut","starFilled","starEmpty","ComplementaryAreaWrapped","Slot"],"mappings":";;;;;;;;;AAYA;;AATA;;AAKA;;AACA;;AACA;;AACA;;AAEA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAvBA;AACA;AACA;;AAGA;AACA;AACA;;AAQA;AACA;AACA;AAQA,SAASA,qBAAT,CAAgC;AAAEC,EAAAA,KAAF;AAAS,KAAGC;AAAZ,CAAhC,EAAsD;AACrD,SAAO,4BAAC,gBAAD;AAAM,IAAA,IAAI,EAAI,qBAAqBD,KAAO,EAA1C;AAAA,OAAmDC;AAAnD,IAAP;AACA;;AAED,SAASC,qBAAT,CAAgC;AAAEF,EAAAA,KAAF;AAASG,EAAAA,QAAT;AAAmBC,EAAAA;AAAnB,CAAhC,EAAiE;AAChE,SACC,4BAAC,gBAAD;AAAM,IAAA,IAAI,EAAI,qBAAqBJ,KAAO;AAA1C,KACC;AAAK,IAAA,SAAS,EAAGI;AAAjB,KAA+BD,QAA/B,CADD,CADD;AAKA;;AAED,SAASE,8BAAT,CACCL,KADD,EAECM,UAFD,EAGCC,UAHD,EAICC,QAJD,EAKCC,OALD,EAME;AACD,QAAMC,eAAe,GAAG,qBAAQ,KAAR,CAAxB;AACA,QAAMC,sBAAsB,GAAG,qBAAQ,KAAR,CAA/B;AACA,QAAM;AAAEC,IAAAA,uBAAF;AAA2BC,IAAAA;AAA3B,MACL,uBAAaC,YAAb,CADD;AAEA,0BAAW,MAAM;AAChB;AACA;AACA,QAAKN,QAAQ,IAAIC,OAAZ,IAAuB,CAAEC,eAAe,CAACK,OAA9C,E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;AAJmB;AALrB,KAYGY,MAAM,IACP,qDACC,4CAAUO,KAAV,CADD,EAEGJ,UAAU,IACX,4BAAC,kBAAD;AACC,IAAA,SAAS,EAAC,8CADX;AAEC,IAAA,IAAI,EACHS,QAAQ,GAAGe,iBAAH,GAAgBC,gBAH1B;AAKC,IAAA,KAAK,EACJhB,QAAQ,GACL,cAAI,oBAAJ,CADK,GAEL,cAAI,gBAAJ,CARL;AAUC,IAAA,OAAO,EAAG,MACT,CAAEA,QAAQ,GAAGU,SAAH,GAAeD,OAAzB,EACCvC,KADD,EAECM,UAFD,CAXF;AAgBC,IAAA,SAAS,EAAGwB,QAhBb;AAiBC,qBAAgBA;AAjBjB,IAHF,CAbF,CAPD,EA8CC,4BAAC,iBAAD;AAAO,IAAA,SAAS,EAAGR;AAAnB,KAAsCnB,QAAtC,CA9CD,CA9BF,CADD;AAkFA;;AAED,MAAM4C,wBAAwB,GAC7B,uCAA8B/B,iBAA9B,CADD;AAGA+B,wBAAwB,CAACC,IAAzB,GAAgCjD,qBAAhC;eAEegD,wB","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Button, Panel, Slot, Fill } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { check, starEmpty, starFilled } from '@wordpress/icons';\nimport { useEffect, useRef } from '@wordpress/element';\nimport { store as viewportStore } from '@wordpress/viewport';\n\n/**\n * Internal dependencies\n */\nimport ComplementaryAreaHeader from '../complementary-area-header';\nimport ComplementaryAreaMoreMenuItem from '../complementary-area-more-menu-item';\nimport ComplementaryAreaToggle from '../complementary-area-toggle';\nimport withComplementaryAreaContext from '../complementary-area-context';\nimport PinnedItems from '../pinned-items';\nimport { store as interfaceStore } from '../../store';\n\nfunction ComplementaryAreaSlot( { scope, ...props } ) {\n\treturn <Slot name={ `ComplementaryArea/${ scope }` } { ...props } />;\n}\n\nfunction ComplementaryAreaFill( { scope, children, className } ) {\n\treturn (\n\t\t<Fill name={ `ComplementaryArea/${ scope }` }>\n\t\t\t<div className={ className }>{ children }</div>\n\t\t</Fill>\n\t);\n}\n\nfunction useAdjustComplementaryListener(\n\tscope,\n\tidentifier,\n\tactiveArea,\n\tisActive,\n\tisSmall\n) {\n\tconst previousIsSmall = useRef( false );\n\tconst shouldOpenWhenNotSmall = useRef( false );\n\tconst { enableComplementaryArea, disableComplementaryArea } =\n\t\tuseDispatch( interfaceStore );\n\tuseEffect( () => {\n\t\t// If the complementary area is active and the editor is switching from\n\t\t// a big to a small window size.\n\t\tif ( isActive && isSmall && ! previousIsSmall.current ) {\n\t\t\tdisableComplementaryArea( scope );\n\t\t\t// Flag the complementary area to be reopened when the window size\n\t\t\t// goes from small to big.\n\t\t\tshouldOpenWhenNotSmall.current = true;\n\t\t} else if (\n\t\t\t// If there is a flag indicating the complementary area should be\n\t\t\t// enabled when we go from small to big window size and we are going\n\t\t\t// from a small to big window size.\n\t\t\tshouldOpenWhenNotSmall.current &&\n\t\t\t! isSmall &&\n\t\t\tpreviousIsSmall.current\n\t\t) {\n\t\t\t// Remove the flag indicating the complementary area should be\n\t\t\t// enabled.\n\t\t\tshouldOpenWhenNotSmall.current = false;\n\t\t\tenableComplementaryArea( scope, identifier );\n\t\t} else if (\n\t\t\t// If the flag is indicating the current complementary should be\n\t\t\t// reopened but another complementary area becomes active, remove\n\t\t\t// the flag.\n\t\t\tshouldOpenWhenNotSmall.current &&\n\t\t\tactiveArea &&\n\t\t\tactiveArea !== identifier\n\t\t) {\n\t\t\tshouldOpenWhenNotSmall.current = false;\n\t\t}\n\t\tif ( isSmall !== previousIsSmall.current ) {\n\t\t\tpreviousIsSmall.current = isSmall;\n\t\t}\n\t}, [ isActive, isSmall, scope, identifier, activeArea ] );\n}\n\nfunction ComplementaryArea( {\n\tchildren,\n\tclassName,\n\tcloseLabel = __( 'Close plugin' ),\n\tidentifier,\n\theader,\n\theaderClassName,\n\ticon,\n\tisPinnable = true,\n\tpanelClassName,\n\tscope,\n\tname,\n\tsmallScreenTitle,\n\ttitle,\n\ttoggleShortcut,\n\tisActiveByDefault,\n\tshowIconLabels = false,\n} ) {\n\tconst { isLoading, isActive, isPinned, activeArea, isSmall, isLarge } =\n\t\tuseSelect(\n\t\t\t( select ) => {\n\t\t\t\tconst {\n\t\t\t\t\tgetActiveComplementaryArea,\n\t\t\t\t\tisComplementaryAreaLoading,\n\t\t\t\t\tisItemPinned,\n\t\t\t\t} = select( interfaceStore );\n\n\t\t\t\tconst _activeArea = getActiveComplementaryArea( scope );\n\n\t\t\t\treturn {\n\t\t\t\t\tisLoading: isComplementaryAreaLoading( scope ),\n\t\t\t\t\tisActive: _activeArea === identifier,\n\t\t\t\t\tisPinned: isItemPinned( scope, identifier ),\n\t\t\t\t\tactiveArea: _activeArea,\n\t\t\t\t\tisSmall:\n\t\t\t\t\t\tselect( viewportStore ).isViewportMatch( '< medium' ),\n\t\t\t\t\tisLarge: select( viewportStore ).isViewportMatch( 'large' ),\n\t\t\t\t};\n\t\t\t},\n\t\t\t[ identifier, scope ]\n\t\t);\n\tuseAdjustComplementaryListener(\n\t\tscope,\n\t\tidentifier,\n\t\tactiveArea,\n\t\tisActive,\n\t\tisSmall\n\t);\n\tconst {\n\t\tenableComplementaryArea,\n\t\tdisableComplementaryArea,\n\t\tpinItem,\n\t\tunpinItem,\n\t} = useDispatch( interfaceStore );\n\n\tuseEffect( () => {\n\t\t// Set initial visibility: For large screens, enable if it's active by\n\t\t// default. For small screens, always initially disable.\n\t\tif ( isActiveByDefault && activeArea === undefined && ! isSmall ) {\n\t\t\tenableComplementaryArea( scope, identifier );\n\t\t} else if ( activeArea === undefined && isSmall ) {\n\t\t\tdisableComplementaryArea( scope, identifier );\n\t\t}\n\t}, [ activeArea, isActiveByDefault, scope, identifier, isSmall ] );\n\n\treturn (\n\t\t<>\n\t\t\t{ isPinnable && (\n\t\t\t\t<PinnedItems scope={ scope }>\n\t\t\t\t\t{ isPinned && (\n\t\t\t\t\t\t<ComplementaryAreaToggle\n\t\t\t\t\t\t\tscope={ scope }\n\t\t\t\t\t\t\tidentifier={ identifier }\n\t\t\t\t\t\t\tisPressed={\n\t\t\t\t\t\t\t\tisActive && ( ! showIconLabels || isLarge )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taria-expanded={ isActive }\n\t\t\t\t\t\t\taria-disabled={ isLoading }\n\t\t\t\t\t\t\tlabel={ title }\n\t\t\t\t\t\t\ticon={ showIconLabels ? check : icon }\n\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\tvariant={ showIconLabels ? 'tertiary' : undefined }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</PinnedItems>\n\t\t\t) }\n\t\t\t{ name && isPinnable && (\n\t\t\t\t<ComplementaryAreaMoreMenuItem\n\t\t\t\t\ttarget={ name }\n\t\t\t\t\tscope={ scope }\n\t\t\t\t\ticon={ icon }\n\t\t\t\t>\n\t\t\t\t\t{ title }\n\t\t\t\t</ComplementaryAreaMoreMenuItem>\n\t\t\t) }\n\t\t\t{ isActive && (\n\t\t\t\t<ComplementaryAreaFill\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t'interface-complementary-area',\n\t\t\t\t\t\tclassName\n\t\t\t\t\t) }\n\t\t\t\t\tscope={ scope }\n\t\t\t\t>\n\t\t\t\t\t<ComplementaryAreaHeader\n\t\t\t\t\t\tclassName={ headerClassName }\n\t\t\t\t\t\tcloseLabel={ closeLabel }\n\t\t\t\t\t\tonClose={ () => disableComplementaryArea( scope ) }\n\t\t\t\t\t\tsmallScreenTitle={ smallScreenTitle }\n\t\t\t\t\t\ttoggleButtonProps={ {\n\t\t\t\t\t\t\tlabel: closeLabel,\n\t\t\t\t\t\t\tshortcut: toggleShortcut,\n\t\t\t\t\t\t\tscope,\n\t\t\t\t\t\t\tidentifier,\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ header || (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<strong>{ title }</strong>\n\t\t\t\t\t\t\t\t{ isPinnable && (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tclassName=\"interface-complementary-area__pin-unpin-item\"\n\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\tisPinned ? starFilled : starEmpty\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\t\t\tisPinned\n\t\t\t\t\t\t\t\t\t\t\t\t? __( 'Unpin from toolbar' )\n\t\t\t\t\t\t\t\t\t\t\t\t: __( 'Pin to toolbar' )\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\t\t\t( isPinned ? unpinItem : pinItem )(\n\t\t\t\t\t\t\t\t\t\t\t\tscope,\n\t\t\t\t\t\t\t\t\t\t\t\tidentifier\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tisPressed={ isPinned }\n\t\t\t\t\t\t\t\t\t\taria-expanded={ isPinned }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</ComplementaryAreaHeader>\n\t\t\t\t\t<Panel className={ panelClassName }>{ children }</Panel>\n\t\t\t\t</ComplementaryAreaFill>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nconst ComplementaryAreaWrapped =\n\twithComplementaryAreaContext( ComplementaryArea );\n\nComplementaryAreaWrapped.Slot = ComplementaryAreaSlot;\n\nexport default ComplementaryAreaWrapped;\n"]}
|
|
1
|
+
{"version":3,"names":["_element","require","_classnames","_interopRequireDefault","_components","_data","_i18n","_icons","_viewport","_complementaryAreaHeader","_complementaryAreaMoreMenuItem","_complementaryAreaToggle","_complementaryAreaContext","_pinnedItems","_store","ComplementaryAreaSlot","scope","props","createElement","Slot","name","ComplementaryAreaFill","children","className","Fill","useAdjustComplementaryListener","identifier","activeArea","isActive","isSmall","previousIsSmall","useRef","shouldOpenWhenNotSmall","enableComplementaryArea","disableComplementaryArea","useDispatch","interfaceStore","useEffect","current","ComplementaryArea","closeLabel","__","header","headerClassName","icon","isPinnable","panelClassName","smallScreenTitle","title","toggleShortcut","isActiveByDefault","showIconLabels","isLoading","isPinned","isLarge","useSelect","select","getActiveComplementaryArea","isComplementaryAreaLoading","isItemPinned","_activeArea","viewportStore","isViewportMatch","pinItem","unpinItem","undefined","Fragment","default","isPressed","label","check","showTooltip","variant","target","classnames","onClose","toggleButtonProps","shortcut","Button","starFilled","starEmpty","onClick","Panel","ComplementaryAreaWrapped","withComplementaryAreaContext","_default","exports"],"sources":["@wordpress/interface/src/components/complementary-area/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Button, Panel, Slot, Fill } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { check, starEmpty, starFilled } from '@wordpress/icons';\nimport { useEffect, useRef } from '@wordpress/element';\nimport { store as viewportStore } from '@wordpress/viewport';\n\n/**\n * Internal dependencies\n */\nimport ComplementaryAreaHeader from '../complementary-area-header';\nimport ComplementaryAreaMoreMenuItem from '../complementary-area-more-menu-item';\nimport ComplementaryAreaToggle from '../complementary-area-toggle';\nimport withComplementaryAreaContext from '../complementary-area-context';\nimport PinnedItems from '../pinned-items';\nimport { store as interfaceStore } from '../../store';\n\nfunction ComplementaryAreaSlot( { scope, ...props } ) {\n\treturn <Slot name={ `ComplementaryArea/${ scope }` } { ...props } />;\n}\n\nfunction ComplementaryAreaFill( { scope, children, className } ) {\n\treturn (\n\t\t<Fill name={ `ComplementaryArea/${ scope }` }>\n\t\t\t<div className={ className }>{ children }</div>\n\t\t</Fill>\n\t);\n}\n\nfunction useAdjustComplementaryListener(\n\tscope,\n\tidentifier,\n\tactiveArea,\n\tisActive,\n\tisSmall\n) {\n\tconst previousIsSmall = useRef( false );\n\tconst shouldOpenWhenNotSmall = useRef( false );\n\tconst { enableComplementaryArea, disableComplementaryArea } =\n\t\tuseDispatch( interfaceStore );\n\tuseEffect( () => {\n\t\t// If the complementary area is active and the editor is switching from\n\t\t// a big to a small window size.\n\t\tif ( isActive && isSmall && ! previousIsSmall.current ) {\n\t\t\tdisableComplementaryArea( scope );\n\t\t\t// Flag the complementary area to be reopened when the window size\n\t\t\t// goes from small to big.\n\t\t\tshouldOpenWhenNotSmall.current = true;\n\t\t} else if (\n\t\t\t// If there is a flag indicating the complementary area should be\n\t\t\t// enabled when we go from small to big window size and we are going\n\t\t\t// from a small to big window size.\n\t\t\tshouldOpenWhenNotSmall.current &&\n\t\t\t! isSmall &&\n\t\t\tpreviousIsSmall.current\n\t\t) {\n\t\t\t// Remove the flag indicating the complementary area should be\n\t\t\t// enabled.\n\t\t\tshouldOpenWhenNotSmall.current = false;\n\t\t\tenableComplementaryArea( scope, identifier );\n\t\t} else if (\n\t\t\t// If the flag is indicating the current complementary should be\n\t\t\t// reopened but another complementary area becomes active, remove\n\t\t\t// the flag.\n\t\t\tshouldOpenWhenNotSmall.current &&\n\t\t\tactiveArea &&\n\t\t\tactiveArea !== identifier\n\t\t) {\n\t\t\tshouldOpenWhenNotSmall.current = false;\n\t\t}\n\t\tif ( isSmall !== previousIsSmall.current ) {\n\t\t\tpreviousIsSmall.current = isSmall;\n\t\t}\n\t}, [\n\t\tisActive,\n\t\tisSmall,\n\t\tscope,\n\t\tidentifier,\n\t\tactiveArea,\n\t\tdisableComplementaryArea,\n\t\tenableComplementaryArea,\n\t] );\n}\n\nfunction ComplementaryArea( {\n\tchildren,\n\tclassName,\n\tcloseLabel = __( 'Close plugin' ),\n\tidentifier,\n\theader,\n\theaderClassName,\n\ticon,\n\tisPinnable = true,\n\tpanelClassName,\n\tscope,\n\tname,\n\tsmallScreenTitle,\n\ttitle,\n\ttoggleShortcut,\n\tisActiveByDefault,\n\tshowIconLabels = false,\n} ) {\n\tconst { isLoading, isActive, isPinned, activeArea, isSmall, isLarge } =\n\t\tuseSelect(\n\t\t\t( select ) => {\n\t\t\t\tconst {\n\t\t\t\t\tgetActiveComplementaryArea,\n\t\t\t\t\tisComplementaryAreaLoading,\n\t\t\t\t\tisItemPinned,\n\t\t\t\t} = select( interfaceStore );\n\n\t\t\t\tconst _activeArea = getActiveComplementaryArea( scope );\n\n\t\t\t\treturn {\n\t\t\t\t\tisLoading: isComplementaryAreaLoading( scope ),\n\t\t\t\t\tisActive: _activeArea === identifier,\n\t\t\t\t\tisPinned: isItemPinned( scope, identifier ),\n\t\t\t\t\tactiveArea: _activeArea,\n\t\t\t\t\tisSmall:\n\t\t\t\t\t\tselect( viewportStore ).isViewportMatch( '< medium' ),\n\t\t\t\t\tisLarge: select( viewportStore ).isViewportMatch( 'large' ),\n\t\t\t\t};\n\t\t\t},\n\t\t\t[ identifier, scope ]\n\t\t);\n\tuseAdjustComplementaryListener(\n\t\tscope,\n\t\tidentifier,\n\t\tactiveArea,\n\t\tisActive,\n\t\tisSmall\n\t);\n\tconst {\n\t\tenableComplementaryArea,\n\t\tdisableComplementaryArea,\n\t\tpinItem,\n\t\tunpinItem,\n\t} = useDispatch( interfaceStore );\n\n\tuseEffect( () => {\n\t\t// Set initial visibility: For large screens, enable if it's active by\n\t\t// default. For small screens, always initially disable.\n\t\tif ( isActiveByDefault && activeArea === undefined && ! isSmall ) {\n\t\t\tenableComplementaryArea( scope, identifier );\n\t\t} else if ( activeArea === undefined && isSmall ) {\n\t\t\tdisableComplementaryArea( scope, identifier );\n\t\t}\n\t}, [\n\t\tactiveArea,\n\t\tisActiveByDefault,\n\t\tscope,\n\t\tidentifier,\n\t\tisSmall,\n\t\tenableComplementaryArea,\n\t\tdisableComplementaryArea,\n\t] );\n\n\treturn (\n\t\t<>\n\t\t\t{ isPinnable && (\n\t\t\t\t<PinnedItems scope={ scope }>\n\t\t\t\t\t{ isPinned && (\n\t\t\t\t\t\t<ComplementaryAreaToggle\n\t\t\t\t\t\t\tscope={ scope }\n\t\t\t\t\t\t\tidentifier={ identifier }\n\t\t\t\t\t\t\tisPressed={\n\t\t\t\t\t\t\t\tisActive && ( ! showIconLabels || isLarge )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taria-expanded={ isActive }\n\t\t\t\t\t\t\taria-disabled={ isLoading }\n\t\t\t\t\t\t\tlabel={ title }\n\t\t\t\t\t\t\ticon={ showIconLabels ? check : icon }\n\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\tvariant={ showIconLabels ? 'tertiary' : undefined }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</PinnedItems>\n\t\t\t) }\n\t\t\t{ name && isPinnable && (\n\t\t\t\t<ComplementaryAreaMoreMenuItem\n\t\t\t\t\ttarget={ name }\n\t\t\t\t\tscope={ scope }\n\t\t\t\t\ticon={ icon }\n\t\t\t\t>\n\t\t\t\t\t{ title }\n\t\t\t\t</ComplementaryAreaMoreMenuItem>\n\t\t\t) }\n\t\t\t{ isActive && (\n\t\t\t\t<ComplementaryAreaFill\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t'interface-complementary-area',\n\t\t\t\t\t\tclassName\n\t\t\t\t\t) }\n\t\t\t\t\tscope={ scope }\n\t\t\t\t>\n\t\t\t\t\t<ComplementaryAreaHeader\n\t\t\t\t\t\tclassName={ headerClassName }\n\t\t\t\t\t\tcloseLabel={ closeLabel }\n\t\t\t\t\t\tonClose={ () => disableComplementaryArea( scope ) }\n\t\t\t\t\t\tsmallScreenTitle={ smallScreenTitle }\n\t\t\t\t\t\ttoggleButtonProps={ {\n\t\t\t\t\t\t\tlabel: closeLabel,\n\t\t\t\t\t\t\tshortcut: toggleShortcut,\n\t\t\t\t\t\t\tscope,\n\t\t\t\t\t\t\tidentifier,\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ header || (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<strong>{ title }</strong>\n\t\t\t\t\t\t\t\t{ isPinnable && (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tclassName=\"interface-complementary-area__pin-unpin-item\"\n\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\tisPinned ? starFilled : starEmpty\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\t\t\tisPinned\n\t\t\t\t\t\t\t\t\t\t\t\t? __( 'Unpin from toolbar' )\n\t\t\t\t\t\t\t\t\t\t\t\t: __( 'Pin to toolbar' )\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\t\t\t( isPinned ? unpinItem : pinItem )(\n\t\t\t\t\t\t\t\t\t\t\t\tscope,\n\t\t\t\t\t\t\t\t\t\t\t\tidentifier\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tisPressed={ isPinned }\n\t\t\t\t\t\t\t\t\t\taria-expanded={ isPinned }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</ComplementaryAreaHeader>\n\t\t\t\t\t<Panel className={ panelClassName }>{ children }</Panel>\n\t\t\t\t</ComplementaryAreaFill>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nconst ComplementaryAreaWrapped =\n\twithComplementaryAreaContext( ComplementaryArea );\n\nComplementaryAreaWrapped.Slot = ComplementaryAreaSlot;\n\nexport default ComplementaryAreaWrapped;\n"],"mappings":";;;;;;;AAYA,IAAAA,QAAA,GAAAC,O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AiB,EAAG;MACnBP,KAAK,EAAE7B,UAAU;MACjBqC,QAAQ,EAAE5B,cAAc;MACxBjC,KAAK;MACLU;IACD;EAAG,GAEDgB,MAAM,IACP,IAAA1C,QAAA,CAAAkB,aAAA,EAAAlB,QAAA,CAAAkE,QAAA,QACC,IAAAlE,QAAA,CAAAkB,aAAA,kBAAU8B,KAAe,CAAC,EACxBH,UAAU,IACX,IAAA7C,QAAA,CAAAkB,aAAA,EAACd,WAAA,CAAA0E,MAAM;IACNvD,SAAS,EAAC,8CAA8C;IACxDqB,IAAI,EACHS,QAAQ,GAAG0B,iBAAU,GAAGC,gBACxB;IACDX,KAAK,EACJhB,QAAQ,GACL,IAAAZ,QAAE,EAAE,oBAAqB,CAAC,GAC1B,IAAAA,QAAE,EAAE,gBAAiB,CACxB;IACDwC,OAAO,EAAGA,CAAA,KACT,CAAE5B,QAAQ,GAAGW,SAAS,GAAGD,OAAO,EAC/B/C,KAAK,EACLU,UACD,CACA;IACD0C,SAAS,EAAGf,QAAU;IACtB,iBAAgBA;EAAU,CAC1B,CAED,CAEqB,CAAC,EAC1B,IAAArD,QAAA,CAAAkB,aAAA,EAACd,WAAA,CAAA8E,KAAK;IAAC3D,SAAS,EAAGuB;EAAgB,GAAGxB,QAAiB,CACjC,CAEvB,CAAC;AAEL;AAEA,MAAM6D,wBAAwB,GAC7B,IAAAC,iCAA4B,EAAE7C,iBAAkB,CAAC;AAElD4C,wBAAwB,CAAChE,IAAI,GAAGJ,qBAAqB;AAAC,IAAAsE,QAAA,GAEvCF,wBAAwB;AAAAG,OAAA,CAAAnB,OAAA,GAAAkB,QAAA"}
|
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _plugins = require("@wordpress/plugins");
|
|
9
|
-
|
|
10
8
|
/**
|
|
11
9
|
* WordPress dependencies
|
|
12
10
|
*/
|
|
@@ -16,6 +14,5 @@ var _default = (0, _plugins.withPluginContext)((context, ownProps) => {
|
|
|
16
14
|
identifier: ownProps.identifier || `${context.name}/${ownProps.name}`
|
|
17
15
|
};
|
|
18
16
|
});
|
|
19
|
-
|
|
20
17
|
exports.default = _default;
|
|
21
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["_plugins","require","_default","withPluginContext","context","ownProps","icon","identifier","name","exports","default"],"sources":["@wordpress/interface/src/components/complementary-area-context/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { withPluginContext } from '@wordpress/plugins';\n\nexport default withPluginContext( ( context, ownProps ) => {\n\treturn {\n\t\ticon: ownProps.icon || context.icon,\n\t\tidentifier:\n\t\t\townProps.identifier || `${ context.name }/${ ownProps.name }`,\n\t};\n} );\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAHA;AACA;AACA;AAFA,IAAAC,QAAA,GAKe,IAAAC,0BAAiB,EAAE,CAAEC,OAAO,EAAEC,QAAQ,KAAM;EAC1D,OAAO;IACNC,IAAI,EAAED,QAAQ,CAACC,IAAI,IAAIF,OAAO,CAACE,IAAI;IACnCC,UAAU,EACTF,QAAQ,CAACE,UAAU,IAAK,GAAGH,OAAO,CAACI,IAAM,IAAIH,QAAQ,CAACG,IAAM;EAC9D,CAAC;AACF,CAAE,CAAC;AAAAC,OAAA,CAAAC,OAAA,GAAAR,QAAA"}
|
|
@@ -1,20 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
|
|
10
8
|
var _element = require("@wordpress/element");
|
|
11
|
-
|
|
12
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
-
|
|
14
10
|
var _icons = require("@wordpress/icons");
|
|
15
|
-
|
|
16
11
|
var _complementaryAreaToggle = _interopRequireDefault(require("../complementary-area-toggle"));
|
|
17
|
-
|
|
18
12
|
/**
|
|
19
13
|
* External dependencies
|
|
20
14
|
*/
|
|
@@ -26,6 +20,7 @@ var _complementaryAreaToggle = _interopRequireDefault(require("../complementary-
|
|
|
26
20
|
/**
|
|
27
21
|
* Internal dependencies
|
|
28
22
|
*/
|
|
23
|
+
|
|
29
24
|
const ComplementaryAreaHeader = ({
|
|
30
25
|
smallScreenTitle,
|
|
31
26
|
children,
|
|
@@ -45,7 +40,6 @@ const ComplementaryAreaHeader = ({
|
|
|
45
40
|
tabIndex: -1
|
|
46
41
|
}, children, toggleButton));
|
|
47
42
|
};
|
|
48
|
-
|
|
49
43
|
var _default = ComplementaryAreaHeader;
|
|
50
44
|
exports.default = _default;
|
|
51
45
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["_classnames","_interopRequireDefault","require","_icons","_complementaryAreaToggle","ComplementaryAreaHeader","smallScreenTitle","children","className","toggleButtonProps","toggleButton","_element","createElement","default","icon","closeSmall","Fragment","classnames","tabIndex","_default","exports"],"sources":["@wordpress/interface/src/components/complementary-area-header/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { closeSmall } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport ComplementaryAreaToggle from '../complementary-area-toggle';\n\nconst ComplementaryAreaHeader = ( {\n\tsmallScreenTitle,\n\tchildren,\n\tclassName,\n\ttoggleButtonProps,\n} ) => {\n\tconst toggleButton = (\n\t\t<ComplementaryAreaToggle icon={ closeSmall } { ...toggleButtonProps } />\n\t);\n\treturn (\n\t\t<>\n\t\t\t<div className=\"components-panel__header interface-complementary-area-header__small\">\n\t\t\t\t{ smallScreenTitle && (\n\t\t\t\t\t<span className=\"interface-complementary-area-header__small-title\">\n\t\t\t\t\t\t{ smallScreenTitle }\n\t\t\t\t\t</span>\n\t\t\t\t) }\n\t\t\t\t{ toggleButton }\n\t\t\t</div>\n\t\t\t<div\n\t\t\t\tclassName={ classnames(\n\t\t\t\t\t'components-panel__header',\n\t\t\t\t\t'interface-complementary-area-header',\n\t\t\t\t\tclassName\n\t\t\t\t) }\n\t\t\t\ttabIndex={ -1 }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t\t{ toggleButton }\n\t\t\t</div>\n\t\t</>\n\t);\n};\n\nexport default ComplementaryAreaHeader;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,MAAA,GAAAD,OAAA;AAKA,IAAAE,wBAAA,GAAAH,sBAAA,CAAAC,OAAA;AAbA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA,MAAMG,uBAAuB,GAAGA,CAAE;EACjCC,gBAAgB;EAChBC,QAAQ;EACRC,SAAS;EACTC;AACD,CAAC,KAAM;EACN,MAAMC,YAAY,GACjB,IAAAC,QAAA,CAAAC,aAAA,EAACR,wBAAA,CAAAS,OAAuB;IAACC,IAAI,EAAGC,iBAAY;IAAA,GAAMN;EAAiB,CAAI,CACvE;EACD,OACC,IAAAE,QAAA,CAAAC,aAAA,EAAAD,QAAA,CAAAK,QAAA,QACC,IAAAL,QAAA,CAAAC,aAAA;IAAKJ,SAAS,EAAC;EAAqE,GACjFF,gBAAgB,IACjB,IAAAK,QAAA,CAAAC,aAAA;IAAMJ,SAAS,EAAC;EAAkD,GAC/DF,gBACG,CACN,EACCI,YACE,CAAC,EACN,IAAAC,QAAA,CAAAC,aAAA;IACCJ,SAAS,EAAG,IAAAS,mBAAU,EACrB,0BAA0B,EAC1B,qCAAqC,EACrCT,SACD,CAAG;IACHU,QAAQ,EAAG,CAAC;EAAG,GAEbX,QAAQ,EACRG,YACE,CACJ,CAAC;AAEL,CAAC;AAAC,IAAAS,QAAA,GAEad,uBAAuB;AAAAe,OAAA,CAAAP,OAAA,GAAAM,QAAA"}
|
|
@@ -1,22 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = ComplementaryAreaMoreMenuItem;
|
|
9
|
-
|
|
10
8
|
var _element = require("@wordpress/element");
|
|
11
|
-
|
|
12
9
|
var _icons = require("@wordpress/icons");
|
|
13
|
-
|
|
14
10
|
var _components = require("@wordpress/components");
|
|
15
|
-
|
|
16
11
|
var _complementaryAreaToggle = _interopRequireDefault(require("../complementary-area-toggle"));
|
|
17
|
-
|
|
18
12
|
var _actionItem = _interopRequireDefault(require("../action-item"));
|
|
19
|
-
|
|
20
13
|
/**
|
|
21
14
|
* WordPress dependencies
|
|
22
15
|
*/
|
|
@@ -24,6 +17,7 @@ var _actionItem = _interopRequireDefault(require("../action-item"));
|
|
|
24
17
|
/**
|
|
25
18
|
* Internal dependencies
|
|
26
19
|
*/
|
|
20
|
+
|
|
27
21
|
const PluginsMenuItem = ({
|
|
28
22
|
// Menu item is marked with unstable prop for backward compatibility.
|
|
29
23
|
// They are removed so they don't leak to DOM elements.
|
|
@@ -31,9 +25,9 @@ const PluginsMenuItem = ({
|
|
|
31
25
|
__unstableExplicitMenuItem,
|
|
32
26
|
__unstableTarget,
|
|
33
27
|
...restProps
|
|
34
|
-
}) => (0, _element.createElement)(_components.MenuItem, {
|
|
28
|
+
}) => (0, _element.createElement)(_components.MenuItem, {
|
|
29
|
+
...restProps
|
|
35
30
|
});
|
|
36
|
-
|
|
37
31
|
function ComplementaryAreaMoreMenuItem({
|
|
38
32
|
scope,
|
|
39
33
|
target,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["_icons","require","_components","_complementaryAreaToggle","_interopRequireDefault","_actionItem","PluginsMenuItem","__unstableExplicitMenuItem","__unstableTarget","restProps","_element","createElement","MenuItem","ComplementaryAreaMoreMenuItem","scope","target","props","default","as","toggleProps","name","role","selectedIcon","check"],"sources":["@wordpress/interface/src/components/complementary-area-more-menu-item/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { check } from '@wordpress/icons';\nimport { MenuItem } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport ComplementaryAreaToggle from '../complementary-area-toggle';\nimport ActionItem from '../action-item';\n\nconst PluginsMenuItem = ( {\n\t// Menu item is marked with unstable prop for backward compatibility.\n\t// They are removed so they don't leak to DOM elements.\n\t// @see https://github.com/WordPress/gutenberg/issues/14457\n\t__unstableExplicitMenuItem,\n\t__unstableTarget,\n\t...restProps\n} ) => <MenuItem { ...restProps } />;\n\nexport default function ComplementaryAreaMoreMenuItem( {\n\tscope,\n\ttarget,\n\t__unstableExplicitMenuItem,\n\t...props\n} ) {\n\treturn (\n\t\t<ComplementaryAreaToggle\n\t\t\tas={ ( toggleProps ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<ActionItem\n\t\t\t\t\t\t__unstableExplicitMenuItem={\n\t\t\t\t\t\t\t__unstableExplicitMenuItem\n\t\t\t\t\t\t}\n\t\t\t\t\t\t__unstableTarget={ `${ scope }/${ target }` }\n\t\t\t\t\t\tas={ PluginsMenuItem }\n\t\t\t\t\t\tname={ `${ scope }/plugin-more-menu` }\n\t\t\t\t\t\t{ ...toggleProps }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} }\n\t\t\trole=\"menuitemcheckbox\"\n\t\t\tselectedIcon={ check }\n\t\t\tname={ target }\n\t\t\tscope={ scope }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAKA,IAAAE,wBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,WAAA,GAAAD,sBAAA,CAAAH,OAAA;AAVA;AACA;AACA;;AAIA;AACA;AACA;;AAIA,MAAMK,eAAe,GAAGA,CAAE;EACzB;EACA;EACA;EACAC,0BAA0B;EAC1BC,gBAAgB;EAChB,GAAGC;AACJ,CAAC,KAAM,IAAAC,QAAA,CAAAC,aAAA,EAACT,WAAA,CAAAU,QAAQ;EAAA,GAAMH;AAAS,CAAI,CAAC;AAErB,SAASI,6BAA6BA,CAAE;EACtDC,KAAK;EACLC,MAAM;EACNR,0BAA0B;EAC1B,GAAGS;AACJ,CAAC,EAAG;EACH,OACC,IAAAN,QAAA,CAAAC,aAAA,EAACR,wBAAA,CAAAc,OAAuB;IACvBC,EAAE,EAAKC,WAAW,IAAM;MACvB,OACC,IAAAT,QAAA,CAAAC,aAAA,EAACN,WAAA,CAAAY,OAAU;QACVV,0BAA0B,EACzBA,0BACA;QACDC,gBAAgB,EAAI,GAAGM,KAAO,IAAIC,MAAQ,EAAG;QAC7CG,EAAE,EAAGZ,eAAiB;QACtBc,IAAI,EAAI,GAAGN,KAAO,mBAAoB;QAAA,GACjCK;MAAW,CAChB,CAAC;IAEJ,CAAG;IACHE,IAAI,EAAC,kBAAkB;IACvBC,YAAY,EAAGC,YAAO;IACtBH,IAAI,EAAGL,MAAQ;IACfD,KAAK,EAAGA,KAAO;IAAA,GACVE;EAAK,CACV,CAAC;AAEJ"}
|
|
@@ -1,22 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
|
|
10
8
|
var _element = require("@wordpress/element");
|
|
11
|
-
|
|
12
9
|
var _components = require("@wordpress/components");
|
|
13
|
-
|
|
14
10
|
var _data = require("@wordpress/data");
|
|
15
|
-
|
|
16
11
|
var _store = require("../../store");
|
|
17
|
-
|
|
18
12
|
var _complementaryAreaContext = _interopRequireDefault(require("../complementary-area-context"));
|
|
19
|
-
|
|
20
13
|
/**
|
|
21
14
|
* WordPress dependencies
|
|
22
15
|
*/
|
|
@@ -24,6 +17,7 @@ var _complementaryAreaContext = _interopRequireDefault(require("../complementary
|
|
|
24
17
|
/**
|
|
25
18
|
* Internal dependencies
|
|
26
19
|
*/
|
|
20
|
+
|
|
27
21
|
function ComplementaryAreaToggle({
|
|
28
22
|
as = _components.Button,
|
|
29
23
|
scope,
|
|
@@ -34,7 +28,7 @@ function ComplementaryAreaToggle({
|
|
|
34
28
|
...props
|
|
35
29
|
}) {
|
|
36
30
|
const ComponentToUse = as;
|
|
37
|
-
const isSelected = (0, _data.useSelect)(select => select(_store.store).getActiveComplementaryArea(scope) === identifier, [identifier]);
|
|
31
|
+
const isSelected = (0, _data.useSelect)(select => select(_store.store).getActiveComplementaryArea(scope) === identifier, [identifier, scope]);
|
|
38
32
|
const {
|
|
39
33
|
enableComplementaryArea,
|
|
40
34
|
disableComplementaryArea
|
|
@@ -51,8 +45,6 @@ function ComplementaryAreaToggle({
|
|
|
51
45
|
...props
|
|
52
46
|
});
|
|
53
47
|
}
|
|
54
|
-
|
|
55
48
|
var _default = (0, _complementaryAreaContext.default)(ComplementaryAreaToggle);
|
|
56
|
-
|
|
57
49
|
exports.default = _default;
|
|
58
50
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["_components","require","_data","_store","_complementaryAreaContext","_interopRequireDefault","ComplementaryAreaToggle","as","Button","scope","identifier","icon","selectedIcon","name","props","ComponentToUse","isSelected","useSelect","select","interfaceStore","getActiveComplementaryArea","enableComplementaryArea","disableComplementaryArea","useDispatch","_element","createElement","onClick","_default","complementaryAreaContext","exports","default"],"sources":["@wordpress/interface/src/components/complementary-area-toggle/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Button } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as interfaceStore } from '../../store';\nimport complementaryAreaContext from '../complementary-area-context';\n\nfunction ComplementaryAreaToggle( {\n\tas = Button,\n\tscope,\n\tidentifier,\n\ticon,\n\tselectedIcon,\n\tname,\n\t...props\n} ) {\n\tconst ComponentToUse = as;\n\tconst isSelected = useSelect(\n\t\t( select ) =>\n\t\t\tselect( interfaceStore ).getActiveComplementaryArea( scope ) ===\n\t\t\tidentifier,\n\t\t[ identifier, scope ]\n\t);\n\tconst { enableComplementaryArea, disableComplementaryArea } =\n\t\tuseDispatch( interfaceStore );\n\treturn (\n\t\t<ComponentToUse\n\t\t\ticon={ selectedIcon && isSelected ? selectedIcon : icon }\n\t\t\tonClick={ () => {\n\t\t\t\tif ( isSelected ) {\n\t\t\t\t\tdisableComplementaryArea( scope );\n\t\t\t\t} else {\n\t\t\t\t\tenableComplementaryArea( scope, identifier );\n\t\t\t\t}\n\t\t\t} }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nexport default complementaryAreaContext( ComplementaryAreaToggle );\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAKA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,yBAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAVA;AACA;AACA;;AAIA;AACA;AACA;;AAIA,SAASK,uBAAuBA,CAAE;EACjCC,EAAE,GAAGC,kBAAM;EACXC,KAAK;EACLC,UAAU;EACVC,IAAI;EACJC,YAAY;EACZC,IAAI;EACJ,GAAGC;AACJ,CAAC,EAAG;EACH,MAAMC,cAAc,GAAGR,EAAE;EACzB,MAAMS,UAAU,GAAG,IAAAC,eAAS,EACzBC,MAAM,IACPA,MAAM,CAAEC,YAAe,CAAC,CAACC,0BAA0B,CAAEX,KAAM,CAAC,KAC5DC,UAAU,EACX,CAAEA,UAAU,EAAED,KAAK,CACpB,CAAC;EACD,MAAM;IAAEY,uBAAuB;IAAEC;EAAyB,CAAC,GAC1D,IAAAC,iBAAW,EAAEJ,YAAe,CAAC;EAC9B,OACC,IAAAK,QAAA,CAAAC,aAAA,EAACV,cAAc;IACdJ,IAAI,EAAGC,YAAY,IAAII,UAAU,GAAGJ,YAAY,GAAGD,IAAM;IACzDe,OAAO,EAAGA,CAAA,KAAM;MACf,IAAKV,UAAU,EAAG;QACjBM,wBAAwB,CAAEb,KAAM,CAAC;MAClC,CAAC,MAAM;QACNY,uBAAuB,CAAEZ,KAAK,EAAEC,UAAW,CAAC;MAC7C;IACD,CAAG;IAAA,GACEI;EAAK,CACV,CAAC;AAEJ;AAAC,IAAAa,QAAA,GAEc,IAAAC,iCAAwB,EAAEtB,uBAAwB,CAAC;AAAAuB,OAAA,CAAAC,OAAA,GAAAH,QAAA"}
|
|
@@ -4,26 +4,24 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _element = require("@wordpress/element");
|
|
9
|
-
|
|
10
8
|
/**
|
|
11
9
|
* WordPress dependencies
|
|
12
10
|
*/
|
|
11
|
+
|
|
13
12
|
const FullscreenMode = ({
|
|
14
13
|
isActive
|
|
15
14
|
}) => {
|
|
16
15
|
(0, _element.useEffect)(() => {
|
|
17
|
-
let isSticky = false;
|
|
16
|
+
let isSticky = false;
|
|
17
|
+
// `is-fullscreen-mode` is set in PHP as a body class by Gutenberg, and this causes
|
|
18
18
|
// `sticky-menu` to be applied by WordPress and prevents the admin menu being scrolled
|
|
19
19
|
// even if `is-fullscreen-mode` is then removed. Let's remove `sticky-menu` here as
|
|
20
20
|
// a consequence of the FullscreenMode setup.
|
|
21
|
-
|
|
22
21
|
if (document.body.classList.contains('sticky-menu')) {
|
|
23
22
|
isSticky = true;
|
|
24
23
|
document.body.classList.remove('sticky-menu');
|
|
25
24
|
}
|
|
26
|
-
|
|
27
25
|
return () => {
|
|
28
26
|
if (isSticky) {
|
|
29
27
|
document.body.classList.add('sticky-menu');
|
|
@@ -36,7 +34,6 @@ const FullscreenMode = ({
|
|
|
36
34
|
} else {
|
|
37
35
|
document.body.classList.remove('is-fullscreen-mode');
|
|
38
36
|
}
|
|
39
|
-
|
|
40
37
|
return () => {
|
|
41
38
|
if (isActive) {
|
|
42
39
|
document.body.classList.remove('is-fullscreen-mode');
|
|
@@ -45,7 +42,6 @@ const FullscreenMode = ({
|
|
|
45
42
|
}, [isActive]);
|
|
46
43
|
return null;
|
|
47
44
|
};
|
|
48
|
-
|
|
49
45
|
var _default = FullscreenMode;
|
|
50
46
|
exports.default = _default;
|
|
51
47
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["_element","require","FullscreenMode","isActive","useEffect","isSticky","document","body","classList","contains","remove","add","_default","exports","default"],"sources":["@wordpress/interface/src/components/fullscreen-mode/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\n\nconst FullscreenMode = ( { isActive } ) => {\n\tuseEffect( () => {\n\t\tlet isSticky = false;\n\t\t// `is-fullscreen-mode` is set in PHP as a body class by Gutenberg, and this causes\n\t\t// `sticky-menu` to be applied by WordPress and prevents the admin menu being scrolled\n\t\t// even if `is-fullscreen-mode` is then removed. Let's remove `sticky-menu` here as\n\t\t// a consequence of the FullscreenMode setup.\n\t\tif ( document.body.classList.contains( 'sticky-menu' ) ) {\n\t\t\tisSticky = true;\n\t\t\tdocument.body.classList.remove( 'sticky-menu' );\n\t\t}\n\n\t\treturn () => {\n\t\t\tif ( isSticky ) {\n\t\t\t\tdocument.body.classList.add( 'sticky-menu' );\n\t\t\t}\n\t\t};\n\t}, [] );\n\n\tuseEffect( () => {\n\t\tif ( isActive ) {\n\t\t\tdocument.body.classList.add( 'is-fullscreen-mode' );\n\t\t} else {\n\t\t\tdocument.body.classList.remove( 'is-fullscreen-mode' );\n\t\t}\n\n\t\treturn () => {\n\t\t\tif ( isActive ) {\n\t\t\t\tdocument.body.classList.remove( 'is-fullscreen-mode' );\n\t\t\t}\n\t\t};\n\t}, [ isActive ] );\n\n\treturn null;\n};\nexport default FullscreenMode;\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGA,MAAMC,cAAc,GAAGA,CAAE;EAAEC;AAAS,CAAC,KAAM;EAC1C,IAAAC,kBAAS,EAAE,MAAM;IAChB,IAAIC,QAAQ,GAAG,KAAK;IACpB;IACA;IACA;IACA;IACA,IAAKC,QAAQ,CAACC,IAAI,CAACC,SAAS,CAACC,QAAQ,CAAE,aAAc,CAAC,EAAG;MACxDJ,QAAQ,GAAG,IAAI;MACfC,QAAQ,CAACC,IAAI,CAACC,SAAS,CAACE,MAAM,CAAE,aAAc,CAAC;IAChD;IAEA,OAAO,MAAM;MACZ,IAAKL,QAAQ,EAAG;QACfC,QAAQ,CAACC,IAAI,CAACC,SAAS,CAACG,GAAG,CAAE,aAAc,CAAC;MAC7C;IACD,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,IAAAP,kBAAS,EAAE,MAAM;IAChB,IAAKD,QAAQ,EAAG;MACfG,QAAQ,CAACC,IAAI,CAACC,SAAS,CAACG,GAAG,CAAE,oBAAqB,CAAC;IACpD,CAAC,MAAM;MACNL,QAAQ,CAACC,IAAI,CAACC,SAAS,CAACE,MAAM,CAAE,oBAAqB,CAAC;IACvD;IAEA,OAAO,MAAM;MACZ,IAAKP,QAAQ,EAAG;QACfG,QAAQ,CAACC,IAAI,CAACC,SAAS,CAACE,MAAM,CAAE,oBAAqB,CAAC;MACvD;IACD,CAAC;EACF,CAAC,EAAE,CAAEP,QAAQ,CAAG,CAAC;EAEjB,OAAO,IAAI;AACZ,CAAC;AAAC,IAAAS,QAAA,GACaV,cAAc;AAAAW,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
@@ -83,30 +82,17 @@ Object.defineProperty(exports, "___unstablePreferencesModalBaseOption", {
|
|
|
83
82
|
return _preferencesModalBaseOption.default;
|
|
84
83
|
}
|
|
85
84
|
});
|
|
86
|
-
|
|
87
85
|
var _complementaryArea = _interopRequireDefault(require("./complementary-area"));
|
|
88
|
-
|
|
89
86
|
var _complementaryAreaMoreMenuItem = _interopRequireDefault(require("./complementary-area-more-menu-item"));
|
|
90
|
-
|
|
91
87
|
var _fullscreenMode = _interopRequireDefault(require("./fullscreen-mode"));
|
|
92
|
-
|
|
93
88
|
var _interfaceSkeleton = _interopRequireDefault(require("./interface-skeleton"));
|
|
94
|
-
|
|
95
89
|
var _pinnedItems = _interopRequireDefault(require("./pinned-items"));
|
|
96
|
-
|
|
97
90
|
var _moreMenuDropdown = _interopRequireDefault(require("./more-menu-dropdown"));
|
|
98
|
-
|
|
99
91
|
var _moreMenuFeatureToggle = _interopRequireDefault(require("./more-menu-feature-toggle"));
|
|
100
|
-
|
|
101
92
|
var _actionItem = _interopRequireDefault(require("./action-item"));
|
|
102
|
-
|
|
103
93
|
var _preferencesModal = _interopRequireDefault(require("./preferences-modal"));
|
|
104
|
-
|
|
105
94
|
var _preferencesModalTabs = _interopRequireDefault(require("./preferences-modal-tabs"));
|
|
106
|
-
|
|
107
95
|
var _preferencesModalSection = _interopRequireDefault(require("./preferences-modal-section"));
|
|
108
|
-
|
|
109
96
|
var _preferencesModalBaseOption = _interopRequireDefault(require("./preferences-modal-base-option"));
|
|
110
|
-
|
|
111
97
|
var _navigableRegion = _interopRequireDefault(require("./navigable-region"));
|
|
112
98
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/interface/src/components/index.js"],"
|
|
1
|
+
{"version":3,"names":["_complementaryArea","_interopRequireDefault","require","_complementaryAreaMoreMenuItem","_fullscreenMode","_interfaceSkeleton","_pinnedItems","_moreMenuDropdown","_moreMenuFeatureToggle","_actionItem","_preferencesModal","_preferencesModalTabs","_preferencesModalSection","_preferencesModalBaseOption","_navigableRegion"],"sources":["@wordpress/interface/src/components/index.js"],"sourcesContent":["export { default as ComplementaryArea } from './complementary-area';\nexport { default as ComplementaryAreaMoreMenuItem } from './complementary-area-more-menu-item';\nexport { default as FullscreenMode } from './fullscreen-mode';\nexport { default as InterfaceSkeleton } from './interface-skeleton';\nexport { default as PinnedItems } from './pinned-items';\nexport { default as MoreMenuDropdown } from './more-menu-dropdown';\nexport { default as MoreMenuFeatureToggle } from './more-menu-feature-toggle';\nexport { default as ActionItem } from './action-item';\nexport { default as PreferencesModal } from './preferences-modal';\nexport { default as PreferencesModalTabs } from './preferences-modal-tabs';\nexport { default as PreferencesModalSection } from './preferences-modal-section';\nexport { default as ___unstablePreferencesModalBaseOption } from './preferences-modal-base-option';\nexport { default as NavigableRegion } from './navigable-region';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,kBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,8BAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,eAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,kBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,YAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,iBAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,sBAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,WAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,iBAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,qBAAA,GAAAV,sBAAA,CAAAC,OAAA;AACA,IAAAU,wBAAA,GAAAX,sBAAA,CAAAC,OAAA;AACA,IAAAW,2BAAA,GAAAZ,sBAAA,CAAAC,OAAA;AACA,IAAAY,gBAAA,GAAAb,sBAAA,CAAAC,OAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
@@ -17,8 +16,6 @@ Object.defineProperty(exports, "PinnedItems", {
|
|
|
17
16
|
return _pinnedItems.default;
|
|
18
17
|
}
|
|
19
18
|
});
|
|
20
|
-
|
|
21
19
|
var _complementaryArea = _interopRequireDefault(require("./complementary-area"));
|
|
22
|
-
|
|
23
20
|
var _pinnedItems = _interopRequireDefault(require("./pinned-items"));
|
|
24
21
|
//# sourceMappingURL=index.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/interface/src/components/index.native.js"],"
|
|
1
|
+
{"version":3,"names":["_complementaryArea","_interopRequireDefault","require","_pinnedItems"],"sources":["@wordpress/interface/src/components/index.native.js"],"sourcesContent":["export { default as ComplementaryArea } from './complementary-area';\nexport { default as PinnedItems } from './pinned-items';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,IAAAA,kBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAF,sBAAA,CAAAC,OAAA"}
|