@wordpress/compose 5.0.6 → 5.0.7-next.33ec3857e2.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/build/higher-order/with-state/index.js +1 -0
- package/build/higher-order/with-state/index.js.map +1 -1
- package/build/hooks/use-copy-on-click/index.js +1 -2
- package/build/hooks/use-copy-on-click/index.js.map +1 -1
- package/build/hooks/use-disabled/index.js +114 -0
- package/build/hooks/use-disabled/index.js.map +1 -0
- package/build/index.js +8 -0
- package/build/index.js.map +1 -1
- package/build-module/higher-order/with-state/index.js +1 -0
- package/build-module/higher-order/with-state/index.js.map +1 -1
- package/build-module/hooks/use-copy-on-click/index.js +1 -2
- package/build-module/hooks/use-copy-on-click/index.js.map +1 -1
- package/build-module/hooks/use-disabled/index.js +104 -0
- package/build-module/hooks/use-disabled/index.js.map +1 -0
- package/build-module/index.js +1 -0
- package/build-module/index.js.map +1 -1
- package/build-types/higher-order/with-state/index.d.ts.map +1 -1
- package/build-types/hooks/use-copy-on-click/index.d.ts.map +1 -1
- package/build-types/hooks/use-disabled/index.d.ts +23 -0
- package/build-types/hooks/use-disabled/index.d.ts.map +1 -0
- package/build-types/index.d.ts +1 -0
- package/package.json +8 -8
- package/src/higher-order/with-state/index.js +1 -0
- package/src/hooks/use-copy-on-click/index.js +1 -2
- package/src/hooks/use-disabled/index.js +113 -0
- package/src/hooks/use-disabled/test/index.js +90 -0
- package/src/index.js +1 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -36,6 +36,7 @@ var _createHigherOrderComponent = _interopRequireDefault(require("../../utils/cr
|
|
|
36
36
|
function withState() {
|
|
37
37
|
let initialState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
38
38
|
(0, _deprecated.default)('wp.compose.withState', {
|
|
39
|
+
since: '5.8',
|
|
39
40
|
alternative: 'wp.element.useState'
|
|
40
41
|
});
|
|
41
42
|
return (0, _createHigherOrderComponent.default)(OriginalComponent => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/compose/src/higher-order/with-state/index.js"],"names":["withState","initialState","alternative","OriginalComponent","WrappedComponent","Component","constructor","props","setState","bind","state","render"],"mappings":";;;;;;;;;AAGA;;;;AACA;;AAKA;;AATA;AACA;AACA;;AAIA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,SAAT,GAAwC;AAAA,MAApBC,YAAoB,uEAAL,EAAK;AACtD,2BAAY,sBAAZ,EAAoC;AACnCC,IAAAA,WAAW,EAAE;
|
|
1
|
+
{"version":3,"sources":["@wordpress/compose/src/higher-order/with-state/index.js"],"names":["withState","initialState","since","alternative","OriginalComponent","WrappedComponent","Component","constructor","props","setState","bind","state","render"],"mappings":";;;;;;;;;AAGA;;;;AACA;;AAKA;;AATA;AACA;AACA;;AAIA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,SAAT,GAAwC;AAAA,MAApBC,YAAoB,uEAAL,EAAK;AACtD,2BAAY,sBAAZ,EAAoC;AACnCC,IAAAA,KAAK,EAAE,KAD4B;AAEnCC,IAAAA,WAAW,EAAE;AAFsB,GAApC;AAKA,SAAO,yCAA8BC,iBAAF,IAAyB;AAC3D,WAAO,MAAMC,gBAAN,SAA+BC,kBAA/B,CAAyC;AAC/CC,MAAAA,WAAW;AAAE;AAAmBC,MAAAA,KAArB,EAA6B;AACvC,cAAOA,KAAP;AAEA,aAAKC,QAAL,GAAgB,KAAKA,QAAL,CAAcC,IAAd,CAAoB,IAApB,CAAhB;AAEA,aAAKC,KAAL,GAAaV,YAAb;AACA;;AAEDW,MAAAA,MAAM,GAAG;AACR,eACC,4BAAC,iBAAD,6BACM,KAAKJ,KADX,EAEM,KAAKG,KAFX;AAGC,UAAA,QAAQ,EAAG,KAAKF;AAHjB,WADD;AAOA;;AAjB8C,KAAhD;AAmBA,GApBM,EAoBJ,WApBI,CAAP;AAqBA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport createHigherOrderComponent from '../../utils/create-higher-order-component';\n\n/**\n * A Higher Order Component used to provide and manage internal component state\n * via props.\n *\n * @deprecated Use `useState` instead.\n *\n * @param {any} initialState Optional initial state of the component.\n *\n * @return {any} A higher order component wrapper accepting a component that takes the state props + its own props + `setState` and returning a component that only accepts the own props.\n */\nexport default function withState( initialState = {} ) {\n\tdeprecated( 'wp.compose.withState', {\n\t\tsince: '5.8',\n\t\talternative: 'wp.element.useState',\n\t} );\n\n\treturn createHigherOrderComponent( ( OriginalComponent ) => {\n\t\treturn class WrappedComponent extends Component {\n\t\t\tconstructor( /** @type {any} */ props ) {\n\t\t\t\tsuper( props );\n\n\t\t\t\tthis.setState = this.setState.bind( this );\n\n\t\t\t\tthis.state = initialState;\n\t\t\t}\n\n\t\t\trender() {\n\t\t\t\treturn (\n\t\t\t\t\t<OriginalComponent\n\t\t\t\t\t\t{ ...this.props }\n\t\t\t\t\t\t{ ...this.state }\n\t\t\t\t\t\tsetState={ this.setState }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t}\n\t\t};\n\t}, 'withState' );\n}\n"]}
|
|
@@ -41,8 +41,7 @@ function useCopyOnClick(ref, text) {
|
|
|
41
41
|
|
|
42
42
|
/* eslint-enable jsdoc/no-undefined-types */
|
|
43
43
|
(0, _deprecated.default)('wp.compose.useCopyOnClick', {
|
|
44
|
-
since: '
|
|
45
|
-
plugin: 'Gutenberg',
|
|
44
|
+
since: '5.8',
|
|
46
45
|
alternative: 'wp.compose.useCopyToClipboard'
|
|
47
46
|
});
|
|
48
47
|
/** @type {import('react').MutableRefObject<Clipboard | undefined>} */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/compose/src/hooks/use-copy-on-click/index.js"],"names":["useCopyOnClick","ref","text","timeout","since","
|
|
1
|
+
{"version":3,"sources":["@wordpress/compose/src/hooks/use-copy-on-click/index.js"],"names":["useCopyOnClick","ref","text","timeout","since","alternative","clipboard","hasCopied","setHasCopied","timeoutId","current","Clipboard","on","clearSelection","trigger","focus","clearTimeout","setTimeout","destroy"],"mappings":";;;;;;;;;AAGA;;AAKA;;AACA;;AATA;AACA;AACA;;AAGA;AACA;AACA;;AAIA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,cAAT,CAAyBC,GAAzB,EAA8BC,IAA9B,EAAqD;AAAA,MAAjBC,OAAiB,uEAAP,IAAO;;AACnE;AACA,2BAAY,2BAAZ,EAAyC;AACxCC,IAAAA,KAAK,EAAE,KADiC;AAExCC,IAAAA,WAAW,EAAE;AAF2B,GAAzC;AAKA;;AACA,QAAMC,SAAS,GAAG,sBAAlB;AACA,QAAM,CAAEC,SAAF,EAAaC,YAAb,IAA8B,uBAAU,KAAV,CAApC;AAEA,0BAAW,MAAM;AAChB;AACA,QAAIC,SAAJ;;AAEA,QAAK,CAAER,GAAG,CAACS,OAAX,EAAqB;AACpB;AACA,KANe,CAQhB;;;AACAJ,IAAAA,SAAS,CAACI,OAAV,GAAoB,IAAIC,kBAAJ,CAAeV,GAAG,CAACS,OAAnB,EAA4B;AAC/CR,MAAAA,IAAI,EAAE,MAAQ,OAAOA,IAAP,KAAgB,UAAhB,GAA6BA,IAAI,EAAjC,GAAsCA;AADL,KAA5B,CAApB;AAIAI,IAAAA,SAAS,CAACI,OAAV,CAAkBE,EAAlB,CAAsB,SAAtB,EAAiC,QAAmC;AAAA,UAAjC;AAAEC,QAAAA,cAAF;AAAkBC,QAAAA;AAAlB,OAAiC;AACnE;AACA;AACA;AACAD,MAAAA,cAAc,GAJqD,CAMnE;;AACA,UAAKC,OAAL,EAAe;AACd;AAA6BA,QAAAA,OAAF,CAAYC,KAAZ;AAC3B;;AAED,UAAKZ,OAAL,EAAe;AACdK,QAAAA,YAAY,CAAE,IAAF,CAAZ;AACAQ,QAAAA,YAAY,CAAEP,SAAF,CAAZ;AACAA,QAAAA,SAAS,GAAGQ,UAAU,CAAE,MAAMT,YAAY,CAAE,KAAF,CAApB,EAA+BL,OAA/B,CAAtB;AACA;AACD,KAhBD;AAkBA,WAAO,MAAM;AACZ,UAAKG,SAAS,CAACI,OAAf,EAAyB;AACxBJ,QAAAA,SAAS,CAACI,OAAV,CAAkBQ,OAAlB;AACA;;AACDF,MAAAA,YAAY,CAAEP,SAAF,CAAZ;AACA,KALD;AAMA,GArCD,EAqCG,CAAEP,IAAF,EAAQC,OAAR,EAAiBK,YAAjB,CArCH;AAuCA,SAAOD,SAAP;AACA","sourcesContent":["/**\n * External dependencies\n */\nimport Clipboard from 'clipboard';\n\n/**\n * WordPress dependencies\n */\nimport { useRef, useEffect, useState } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/* eslint-disable jsdoc/no-undefined-types */\n/**\n * Copies the text to the clipboard when the element is clicked.\n *\n * @deprecated\n *\n * @param {import('react').RefObject<string | Element | NodeListOf<Element>>} ref Reference with the element.\n * @param {string|Function} text The text to copy.\n * @param {number} [timeout] Optional timeout to reset the returned\n * state. 4 seconds by default.\n *\n * @return {boolean} Whether or not the text has been copied. Resets after the\n * timeout.\n */\nexport default function useCopyOnClick( ref, text, timeout = 4000 ) {\n\t/* eslint-enable jsdoc/no-undefined-types */\n\tdeprecated( 'wp.compose.useCopyOnClick', {\n\t\tsince: '5.8',\n\t\talternative: 'wp.compose.useCopyToClipboard',\n\t} );\n\n\t/** @type {import('react').MutableRefObject<Clipboard | undefined>} */\n\tconst clipboard = useRef();\n\tconst [ hasCopied, setHasCopied ] = useState( false );\n\n\tuseEffect( () => {\n\t\t/** @type {number | undefined} */\n\t\tlet timeoutId;\n\n\t\tif ( ! ref.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Clipboard listens to click events.\n\t\tclipboard.current = new Clipboard( ref.current, {\n\t\t\ttext: () => ( typeof text === 'function' ? text() : text ),\n\t\t} );\n\n\t\tclipboard.current.on( 'success', ( { clearSelection, trigger } ) => {\n\t\t\t// Clearing selection will move focus back to the triggering button,\n\t\t\t// ensuring that it is not reset to the body, and further that it is\n\t\t\t// kept within the rendered node.\n\t\t\tclearSelection();\n\n\t\t\t// Handle ClipboardJS focus bug, see https://github.com/zenorocha/clipboard.js/issues/680\n\t\t\tif ( trigger ) {\n\t\t\t\t/** @type {HTMLElement} */ ( trigger ).focus();\n\t\t\t}\n\n\t\t\tif ( timeout ) {\n\t\t\t\tsetHasCopied( true );\n\t\t\t\tclearTimeout( timeoutId );\n\t\t\t\ttimeoutId = setTimeout( () => setHasCopied( false ), timeout );\n\t\t\t}\n\t\t} );\n\n\t\treturn () => {\n\t\t\tif ( clipboard.current ) {\n\t\t\t\tclipboard.current.destroy();\n\t\t\t}\n\t\t\tclearTimeout( timeoutId );\n\t\t};\n\t}, [ text, timeout, setHasCopied ] );\n\n\treturn hasCopied;\n}\n"]}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = useDisabled;
|
|
7
|
+
|
|
8
|
+
var _lodash = require("lodash");
|
|
9
|
+
|
|
10
|
+
var _element = require("@wordpress/element");
|
|
11
|
+
|
|
12
|
+
var _dom = require("@wordpress/dom");
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* External dependencies
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* WordPress dependencies
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Names of control nodes which qualify for disabled behavior.
|
|
24
|
+
*
|
|
25
|
+
* See WHATWG HTML Standard: 4.10.18.5: "Enabling and disabling form controls: the disabled attribute".
|
|
26
|
+
*
|
|
27
|
+
* @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#enabling-and-disabling-form-controls:-the-disabled-attribute
|
|
28
|
+
*
|
|
29
|
+
* @type {string[]}
|
|
30
|
+
*/
|
|
31
|
+
const DISABLED_ELIGIBLE_NODE_NAMES = ['BUTTON', 'FIELDSET', 'INPUT', 'OPTGROUP', 'OPTION', 'SELECT', 'TEXTAREA'];
|
|
32
|
+
/**
|
|
33
|
+
* In some circumstances, such as block previews, all focusable DOM elements
|
|
34
|
+
* (input fields, links, buttons, etc.) need to be disabled. This hook adds the
|
|
35
|
+
* behavior to disable nested DOM elements to the returned ref.
|
|
36
|
+
*
|
|
37
|
+
* @return {import('react').RefObject<HTMLElement>} Element Ref.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```js
|
|
41
|
+
* import { __experimentalUseDisabled as useDisabled } from '@wordpress/compose';
|
|
42
|
+
* const DisabledExample = () => {
|
|
43
|
+
* const disabledRef = useDisabled();
|
|
44
|
+
* return (
|
|
45
|
+
* <div ref={ disabledRef }>
|
|
46
|
+
* <a href="#">This link will have tabindex set to -1</a>
|
|
47
|
+
* <input placeholder="This input will have the disabled attribute added to it." type="text" />
|
|
48
|
+
* </div>
|
|
49
|
+
* );
|
|
50
|
+
* };
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
|
|
54
|
+
function useDisabled() {
|
|
55
|
+
/** @type {import('react').RefObject<HTMLElement>} */
|
|
56
|
+
const node = (0, _element.useRef)(null);
|
|
57
|
+
|
|
58
|
+
const disable = () => {
|
|
59
|
+
if (!node.current) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
_dom.focus.focusable.find(node.current).forEach(focusable => {
|
|
64
|
+
if ((0, _lodash.includes)(DISABLED_ELIGIBLE_NODE_NAMES, focusable.nodeName)) {
|
|
65
|
+
focusable.setAttribute('disabled', '');
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if (focusable.nodeName === 'A') {
|
|
69
|
+
focusable.setAttribute('tabindex', '-1');
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const tabIndex = focusable.getAttribute('tabindex');
|
|
73
|
+
|
|
74
|
+
if (tabIndex !== null && tabIndex !== '-1') {
|
|
75
|
+
focusable.removeAttribute('tabindex');
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (focusable.hasAttribute('contenteditable')) {
|
|
79
|
+
focusable.setAttribute('contenteditable', 'false');
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
}; // Debounce re-disable since disabling process itself will incur
|
|
83
|
+
// additional mutations which should be ignored.
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
const debouncedDisable = (0, _element.useCallback)((0, _lodash.debounce)(disable, undefined, {
|
|
87
|
+
leading: true
|
|
88
|
+
}), []);
|
|
89
|
+
(0, _element.useLayoutEffect)(() => {
|
|
90
|
+
disable();
|
|
91
|
+
/** @type {MutationObserver | undefined} */
|
|
92
|
+
|
|
93
|
+
let observer;
|
|
94
|
+
|
|
95
|
+
if (node.current) {
|
|
96
|
+
observer = new window.MutationObserver(debouncedDisable);
|
|
97
|
+
observer.observe(node.current, {
|
|
98
|
+
childList: true,
|
|
99
|
+
attributes: true,
|
|
100
|
+
subtree: true
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return () => {
|
|
105
|
+
if (observer) {
|
|
106
|
+
observer.disconnect();
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
debouncedDisable.cancel();
|
|
110
|
+
};
|
|
111
|
+
}, []);
|
|
112
|
+
return node;
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["@wordpress/compose/src/hooks/use-disabled/index.js"],"names":["DISABLED_ELIGIBLE_NODE_NAMES","useDisabled","node","disable","current","focus","focusable","find","forEach","nodeName","setAttribute","tabIndex","getAttribute","removeAttribute","hasAttribute","debouncedDisable","undefined","leading","observer","window","MutationObserver","observe","childList","attributes","subtree","disconnect","cancel"],"mappings":";;;;;;;AAGA;;AAKA;;AACA;;AATA;AACA;AACA;;AAGA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,4BAA4B,GAAG,CACpC,QADoC,EAEpC,UAFoC,EAGpC,OAHoC,EAIpC,UAJoC,EAKpC,QALoC,EAMpC,QANoC,EAOpC,UAPoC,CAArC;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACe,SAASC,WAAT,GAAuB;AACrC;AACA,QAAMC,IAAI,GAAG,qBAAQ,IAAR,CAAb;;AAEA,QAAMC,OAAO,GAAG,MAAM;AACrB,QAAK,CAAED,IAAI,CAACE,OAAZ,EAAsB;AACrB;AACA;;AAEDC,eAAMC,SAAN,CAAgBC,IAAhB,CAAsBL,IAAI,CAACE,OAA3B,EAAqCI,OAArC,CAAgDF,SAAF,IAAiB;AAC9D,UACC,sBAAUN,4BAAV,EAAwCM,SAAS,CAACG,QAAlD,CADD,EAEE;AACDH,QAAAA,SAAS,CAACI,YAAV,CAAwB,UAAxB,EAAoC,EAApC;AACA;;AAED,UAAKJ,SAAS,CAACG,QAAV,KAAuB,GAA5B,EAAkC;AACjCH,QAAAA,SAAS,CAACI,YAAV,CAAwB,UAAxB,EAAoC,IAApC;AACA;;AAED,YAAMC,QAAQ,GAAGL,SAAS,CAACM,YAAV,CAAwB,UAAxB,CAAjB;;AACA,UAAKD,QAAQ,KAAK,IAAb,IAAqBA,QAAQ,KAAK,IAAvC,EAA8C;AAC7CL,QAAAA,SAAS,CAACO,eAAV,CAA2B,UAA3B;AACA;;AAED,UAAKP,SAAS,CAACQ,YAAV,CAAwB,iBAAxB,CAAL,EAAmD;AAClDR,QAAAA,SAAS,CAACI,YAAV,CAAwB,iBAAxB,EAA2C,OAA3C;AACA;AACD,KAnBD;AAoBA,GAzBD,CAJqC,CA+BrC;AACA;;;AACA,QAAMK,gBAAgB,GAAG,0BACxB,sBAAUZ,OAAV,EAAmBa,SAAnB,EAA8B;AAAEC,IAAAA,OAAO,EAAE;AAAX,GAA9B,CADwB,EAExB,EAFwB,CAAzB;AAKA,gCAAiB,MAAM;AACtBd,IAAAA,OAAO;AAEP;;AACA,QAAIe,QAAJ;;AACA,QAAKhB,IAAI,CAACE,OAAV,EAAoB;AACnBc,MAAAA,QAAQ,GAAG,IAAIC,MAAM,CAACC,gBAAX,CAA6BL,gBAA7B,CAAX;AACAG,MAAAA,QAAQ,CAACG,OAAT,CAAkBnB,IAAI,CAACE,OAAvB,EAAgC;AAC/BkB,QAAAA,SAAS,EAAE,IADoB;AAE/BC,QAAAA,UAAU,EAAE,IAFmB;AAG/BC,QAAAA,OAAO,EAAE;AAHsB,OAAhC;AAKA;;AAED,WAAO,MAAM;AACZ,UAAKN,QAAL,EAAgB;AACfA,QAAAA,QAAQ,CAACO,UAAT;AACA;;AACDV,MAAAA,gBAAgB,CAACW,MAAjB;AACA,KALD;AAMA,GApBD,EAoBG,EApBH;AAsBA,SAAOxB,IAAP;AACA","sourcesContent":["/**\n * External dependencies\n */\nimport { includes, debounce } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { useCallback, useLayoutEffect, useRef } from '@wordpress/element';\nimport { focus } from '@wordpress/dom';\n\n/**\n * Names of control nodes which qualify for disabled behavior.\n *\n * See WHATWG HTML Standard: 4.10.18.5: \"Enabling and disabling form controls: the disabled attribute\".\n *\n * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#enabling-and-disabling-form-controls:-the-disabled-attribute\n *\n * @type {string[]}\n */\nconst DISABLED_ELIGIBLE_NODE_NAMES = [\n\t'BUTTON',\n\t'FIELDSET',\n\t'INPUT',\n\t'OPTGROUP',\n\t'OPTION',\n\t'SELECT',\n\t'TEXTAREA',\n];\n\n/**\n * In some circumstances, such as block previews, all focusable DOM elements\n * (input fields, links, buttons, etc.) need to be disabled. This hook adds the\n * behavior to disable nested DOM elements to the returned ref.\n *\n * @return {import('react').RefObject<HTMLElement>} Element Ref.\n *\n * @example\n * ```js\n * import { __experimentalUseDisabled as useDisabled } from '@wordpress/compose';\n * const DisabledExample = () => {\n * \tconst disabledRef = useDisabled();\n *\treturn (\n *\t\t<div ref={ disabledRef }>\n *\t\t\t<a href=\"#\">This link will have tabindex set to -1</a>\n *\t\t\t<input placeholder=\"This input will have the disabled attribute added to it.\" type=\"text\" />\n *\t\t</div>\n *\t);\n * };\n * ```\n */\nexport default function useDisabled() {\n\t/** @type {import('react').RefObject<HTMLElement>} */\n\tconst node = useRef( null );\n\n\tconst disable = () => {\n\t\tif ( ! node.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tfocus.focusable.find( node.current ).forEach( ( focusable ) => {\n\t\t\tif (\n\t\t\t\tincludes( DISABLED_ELIGIBLE_NODE_NAMES, focusable.nodeName )\n\t\t\t) {\n\t\t\t\tfocusable.setAttribute( 'disabled', '' );\n\t\t\t}\n\n\t\t\tif ( focusable.nodeName === 'A' ) {\n\t\t\t\tfocusable.setAttribute( 'tabindex', '-1' );\n\t\t\t}\n\n\t\t\tconst tabIndex = focusable.getAttribute( 'tabindex' );\n\t\t\tif ( tabIndex !== null && tabIndex !== '-1' ) {\n\t\t\t\tfocusable.removeAttribute( 'tabindex' );\n\t\t\t}\n\n\t\t\tif ( focusable.hasAttribute( 'contenteditable' ) ) {\n\t\t\t\tfocusable.setAttribute( 'contenteditable', 'false' );\n\t\t\t}\n\t\t} );\n\t};\n\n\t// Debounce re-disable since disabling process itself will incur\n\t// additional mutations which should be ignored.\n\tconst debouncedDisable = useCallback(\n\t\tdebounce( disable, undefined, { leading: true } ),\n\t\t[]\n\t);\n\n\tuseLayoutEffect( () => {\n\t\tdisable();\n\n\t\t/** @type {MutationObserver | undefined} */\n\t\tlet observer;\n\t\tif ( node.current ) {\n\t\t\tobserver = new window.MutationObserver( debouncedDisable );\n\t\t\tobserver.observe( node.current, {\n\t\t\t\tchildList: true,\n\t\t\t\tattributes: true,\n\t\t\t\tsubtree: true,\n\t\t\t} );\n\t\t}\n\n\t\treturn () => {\n\t\t\tif ( observer ) {\n\t\t\t\tobserver.disconnect();\n\t\t\t}\n\t\t\tdebouncedDisable.cancel();\n\t\t};\n\t}, [] );\n\n\treturn node;\n}\n"]}
|
package/build/index.js
CHANGED
|
@@ -11,6 +11,12 @@ Object.defineProperty(exports, "__experimentalUseDialog", {
|
|
|
11
11
|
return _useDialog.default;
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
|
+
Object.defineProperty(exports, "__experimentalUseDisabled", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () {
|
|
17
|
+
return _useDisabled.default;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
14
20
|
Object.defineProperty(exports, "__experimentalUseDragging", {
|
|
15
21
|
enumerable: true,
|
|
16
22
|
get: function () {
|
|
@@ -228,6 +234,8 @@ var _useCopyToClipboard = _interopRequireDefault(require("./hooks/use-copy-to-cl
|
|
|
228
234
|
|
|
229
235
|
var _useDialog = _interopRequireDefault(require("./hooks/use-dialog"));
|
|
230
236
|
|
|
237
|
+
var _useDisabled = _interopRequireDefault(require("./hooks/use-disabled"));
|
|
238
|
+
|
|
231
239
|
var _useDragging = _interopRequireDefault(require("./hooks/use-dragging"));
|
|
232
240
|
|
|
233
241
|
var _useFocusOnMount = _interopRequireDefault(require("./hooks/use-focus-on-mount"));
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/compose/src/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["@wordpress/compose/src/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AAGA;;AAGA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAGA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA","sourcesContent":["// Utils\nexport { default as createHigherOrderComponent } from './utils/create-higher-order-component';\n\n// Compose helper (aliased flowRight from Lodash)\nexport { default as compose } from './higher-order/compose';\n\n// Higher-order components\nexport { default as ifCondition } from './higher-order/if-condition';\nexport { default as pure } from './higher-order/pure';\nexport { default as withGlobalEvents } from './higher-order/with-global-events';\nexport { default as withInstanceId } from './higher-order/with-instance-id';\nexport { default as withSafeTimeout } from './higher-order/with-safe-timeout';\nexport { default as withState } from './higher-order/with-state';\n\n// Hooks\nexport { default as useConstrainedTabbing } from './hooks/use-constrained-tabbing';\nexport { default as useCopyOnClick } from './hooks/use-copy-on-click';\nexport { default as useCopyToClipboard } from './hooks/use-copy-to-clipboard';\nexport { default as __experimentalUseDialog } from './hooks/use-dialog';\nexport { default as __experimentalUseDisabled } from './hooks/use-disabled';\nexport { default as __experimentalUseDragging } from './hooks/use-dragging';\nexport { default as useFocusOnMount } from './hooks/use-focus-on-mount';\nexport { default as __experimentalUseFocusOutside } from './hooks/use-focus-outside';\nexport { default as useFocusReturn } from './hooks/use-focus-return';\nexport { default as useInstanceId } from './hooks/use-instance-id';\nexport { default as useIsomorphicLayoutEffect } from './hooks/use-isomorphic-layout-effect';\nexport { default as useKeyboardShortcut } from './hooks/use-keyboard-shortcut';\nexport { default as useMediaQuery } from './hooks/use-media-query';\nexport { default as usePrevious } from './hooks/use-previous';\nexport { default as useReducedMotion } from './hooks/use-reduced-motion';\nexport { default as useViewportMatch } from './hooks/use-viewport-match';\nexport { default as useResizeObserver } from './hooks/use-resize-observer';\nexport { default as useAsyncList } from './hooks/use-async-list';\nexport { default as useWarnOnChange } from './hooks/use-warn-on-change';\nexport { default as useDebounce } from './hooks/use-debounce';\nexport { default as useThrottle } from './hooks/use-throttle';\nexport { default as useMergeRefs } from './hooks/use-merge-refs';\nexport { default as useRefEffect } from './hooks/use-ref-effect';\nexport { default as __experimentalUseDropZone } from './hooks/use-drop-zone';\nexport { default as useFocusableIframe } from './hooks/use-focusable-iframe';\nexport { default as __experimentalUseFixedWindowList } from './hooks/use-fixed-window-list';\n"]}
|
|
@@ -25,6 +25,7 @@ import createHigherOrderComponent from '../../utils/create-higher-order-componen
|
|
|
25
25
|
export default function withState() {
|
|
26
26
|
let initialState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
27
27
|
deprecated('wp.compose.withState', {
|
|
28
|
+
since: '5.8',
|
|
28
29
|
alternative: 'wp.element.useState'
|
|
29
30
|
});
|
|
30
31
|
return createHigherOrderComponent(OriginalComponent => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/compose/src/higher-order/with-state/index.js"],"names":["Component","deprecated","createHigherOrderComponent","withState","initialState","alternative","OriginalComponent","WrappedComponent","constructor","props","setState","bind","state","render"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,oBAA1B;AACA,OAAOC,UAAP,MAAuB,uBAAvB;AAEA;AACA;AACA;;AACA,OAAOC,0BAAP,MAAuC,2CAAvC;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,eAAe,SAASC,SAAT,GAAwC;AAAA,MAApBC,YAAoB,uEAAL,EAAK;AACtDH,EAAAA,UAAU,CAAE,sBAAF,EAA0B;AACnCI,IAAAA,WAAW,EAAE;
|
|
1
|
+
{"version":3,"sources":["@wordpress/compose/src/higher-order/with-state/index.js"],"names":["Component","deprecated","createHigherOrderComponent","withState","initialState","since","alternative","OriginalComponent","WrappedComponent","constructor","props","setState","bind","state","render"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,oBAA1B;AACA,OAAOC,UAAP,MAAuB,uBAAvB;AAEA;AACA;AACA;;AACA,OAAOC,0BAAP,MAAuC,2CAAvC;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,eAAe,SAASC,SAAT,GAAwC;AAAA,MAApBC,YAAoB,uEAAL,EAAK;AACtDH,EAAAA,UAAU,CAAE,sBAAF,EAA0B;AACnCI,IAAAA,KAAK,EAAE,KAD4B;AAEnCC,IAAAA,WAAW,EAAE;AAFsB,GAA1B,CAAV;AAKA,SAAOJ,0BAA0B,CAAIK,iBAAF,IAAyB;AAC3D,WAAO,MAAMC,gBAAN,SAA+BR,SAA/B,CAAyC;AAC/CS,MAAAA,WAAW;AAAE;AAAmBC,MAAAA,KAArB,EAA6B;AACvC,cAAOA,KAAP;AAEA,aAAKC,QAAL,GAAgB,KAAKA,QAAL,CAAcC,IAAd,CAAoB,IAApB,CAAhB;AAEA,aAAKC,KAAL,GAAaT,YAAb;AACA;;AAEDU,MAAAA,MAAM,GAAG;AACR,eACC,cAAC,iBAAD,eACM,KAAKJ,KADX,EAEM,KAAKG,KAFX;AAGC,UAAA,QAAQ,EAAG,KAAKF;AAHjB,WADD;AAOA;;AAjB8C,KAAhD;AAmBA,GApBgC,EAoB9B,WApB8B,CAAjC;AAqBA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport createHigherOrderComponent from '../../utils/create-higher-order-component';\n\n/**\n * A Higher Order Component used to provide and manage internal component state\n * via props.\n *\n * @deprecated Use `useState` instead.\n *\n * @param {any} initialState Optional initial state of the component.\n *\n * @return {any} A higher order component wrapper accepting a component that takes the state props + its own props + `setState` and returning a component that only accepts the own props.\n */\nexport default function withState( initialState = {} ) {\n\tdeprecated( 'wp.compose.withState', {\n\t\tsince: '5.8',\n\t\talternative: 'wp.element.useState',\n\t} );\n\n\treturn createHigherOrderComponent( ( OriginalComponent ) => {\n\t\treturn class WrappedComponent extends Component {\n\t\t\tconstructor( /** @type {any} */ props ) {\n\t\t\t\tsuper( props );\n\n\t\t\t\tthis.setState = this.setState.bind( this );\n\n\t\t\t\tthis.state = initialState;\n\t\t\t}\n\n\t\t\trender() {\n\t\t\t\treturn (\n\t\t\t\t\t<OriginalComponent\n\t\t\t\t\t\t{ ...this.props }\n\t\t\t\t\t\t{ ...this.state }\n\t\t\t\t\t\tsetState={ this.setState }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t}\n\t\t};\n\t}, 'withState' );\n}\n"]}
|
|
@@ -29,8 +29,7 @@ export default function useCopyOnClick(ref, text) {
|
|
|
29
29
|
|
|
30
30
|
/* eslint-enable jsdoc/no-undefined-types */
|
|
31
31
|
deprecated('wp.compose.useCopyOnClick', {
|
|
32
|
-
since: '
|
|
33
|
-
plugin: 'Gutenberg',
|
|
32
|
+
since: '5.8',
|
|
34
33
|
alternative: 'wp.compose.useCopyToClipboard'
|
|
35
34
|
});
|
|
36
35
|
/** @type {import('react').MutableRefObject<Clipboard | undefined>} */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/compose/src/hooks/use-copy-on-click/index.js"],"names":["Clipboard","useRef","useEffect","useState","deprecated","useCopyOnClick","ref","text","timeout","since","
|
|
1
|
+
{"version":3,"sources":["@wordpress/compose/src/hooks/use-copy-on-click/index.js"],"names":["Clipboard","useRef","useEffect","useState","deprecated","useCopyOnClick","ref","text","timeout","since","alternative","clipboard","hasCopied","setHasCopied","timeoutId","current","on","clearSelection","trigger","focus","clearTimeout","setTimeout","destroy"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,SAAP,MAAsB,WAAtB;AAEA;AACA;AACA;;AACA,SAASC,MAAT,EAAiBC,SAAjB,EAA4BC,QAA5B,QAA4C,oBAA5C;AACA,OAAOC,UAAP,MAAuB,uBAAvB;AAEA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,eAAe,SAASC,cAAT,CAAyBC,GAAzB,EAA8BC,IAA9B,EAAqD;AAAA,MAAjBC,OAAiB,uEAAP,IAAO;;AACnE;AACAJ,EAAAA,UAAU,CAAE,2BAAF,EAA+B;AACxCK,IAAAA,KAAK,EAAE,KADiC;AAExCC,IAAAA,WAAW,EAAE;AAF2B,GAA/B,CAAV;AAKA;;AACA,QAAMC,SAAS,GAAGV,MAAM,EAAxB;AACA,QAAM,CAAEW,SAAF,EAAaC,YAAb,IAA8BV,QAAQ,CAAE,KAAF,CAA5C;AAEAD,EAAAA,SAAS,CAAE,MAAM;AAChB;AACA,QAAIY,SAAJ;;AAEA,QAAK,CAAER,GAAG,CAACS,OAAX,EAAqB;AACpB;AACA,KANe,CAQhB;;;AACAJ,IAAAA,SAAS,CAACI,OAAV,GAAoB,IAAIf,SAAJ,CAAeM,GAAG,CAACS,OAAnB,EAA4B;AAC/CR,MAAAA,IAAI,EAAE,MAAQ,OAAOA,IAAP,KAAgB,UAAhB,GAA6BA,IAAI,EAAjC,GAAsCA;AADL,KAA5B,CAApB;AAIAI,IAAAA,SAAS,CAACI,OAAV,CAAkBC,EAAlB,CAAsB,SAAtB,EAAiC,QAAmC;AAAA,UAAjC;AAAEC,QAAAA,cAAF;AAAkBC,QAAAA;AAAlB,OAAiC;AACnE;AACA;AACA;AACAD,MAAAA,cAAc,GAJqD,CAMnE;;AACA,UAAKC,OAAL,EAAe;AACd;AAA6BA,QAAAA,OAAF,CAAYC,KAAZ;AAC3B;;AAED,UAAKX,OAAL,EAAe;AACdK,QAAAA,YAAY,CAAE,IAAF,CAAZ;AACAO,QAAAA,YAAY,CAAEN,SAAF,CAAZ;AACAA,QAAAA,SAAS,GAAGO,UAAU,CAAE,MAAMR,YAAY,CAAE,KAAF,CAApB,EAA+BL,OAA/B,CAAtB;AACA;AACD,KAhBD;AAkBA,WAAO,MAAM;AACZ,UAAKG,SAAS,CAACI,OAAf,EAAyB;AACxBJ,QAAAA,SAAS,CAACI,OAAV,CAAkBO,OAAlB;AACA;;AACDF,MAAAA,YAAY,CAAEN,SAAF,CAAZ;AACA,KALD;AAMA,GArCQ,EAqCN,CAAEP,IAAF,EAAQC,OAAR,EAAiBK,YAAjB,CArCM,CAAT;AAuCA,SAAOD,SAAP;AACA","sourcesContent":["/**\n * External dependencies\n */\nimport Clipboard from 'clipboard';\n\n/**\n * WordPress dependencies\n */\nimport { useRef, useEffect, useState } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/* eslint-disable jsdoc/no-undefined-types */\n/**\n * Copies the text to the clipboard when the element is clicked.\n *\n * @deprecated\n *\n * @param {import('react').RefObject<string | Element | NodeListOf<Element>>} ref Reference with the element.\n * @param {string|Function} text The text to copy.\n * @param {number} [timeout] Optional timeout to reset the returned\n * state. 4 seconds by default.\n *\n * @return {boolean} Whether or not the text has been copied. Resets after the\n * timeout.\n */\nexport default function useCopyOnClick( ref, text, timeout = 4000 ) {\n\t/* eslint-enable jsdoc/no-undefined-types */\n\tdeprecated( 'wp.compose.useCopyOnClick', {\n\t\tsince: '5.8',\n\t\talternative: 'wp.compose.useCopyToClipboard',\n\t} );\n\n\t/** @type {import('react').MutableRefObject<Clipboard | undefined>} */\n\tconst clipboard = useRef();\n\tconst [ hasCopied, setHasCopied ] = useState( false );\n\n\tuseEffect( () => {\n\t\t/** @type {number | undefined} */\n\t\tlet timeoutId;\n\n\t\tif ( ! ref.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Clipboard listens to click events.\n\t\tclipboard.current = new Clipboard( ref.current, {\n\t\t\ttext: () => ( typeof text === 'function' ? text() : text ),\n\t\t} );\n\n\t\tclipboard.current.on( 'success', ( { clearSelection, trigger } ) => {\n\t\t\t// Clearing selection will move focus back to the triggering button,\n\t\t\t// ensuring that it is not reset to the body, and further that it is\n\t\t\t// kept within the rendered node.\n\t\t\tclearSelection();\n\n\t\t\t// Handle ClipboardJS focus bug, see https://github.com/zenorocha/clipboard.js/issues/680\n\t\t\tif ( trigger ) {\n\t\t\t\t/** @type {HTMLElement} */ ( trigger ).focus();\n\t\t\t}\n\n\t\t\tif ( timeout ) {\n\t\t\t\tsetHasCopied( true );\n\t\t\t\tclearTimeout( timeoutId );\n\t\t\t\ttimeoutId = setTimeout( () => setHasCopied( false ), timeout );\n\t\t\t}\n\t\t} );\n\n\t\treturn () => {\n\t\t\tif ( clipboard.current ) {\n\t\t\t\tclipboard.current.destroy();\n\t\t\t}\n\t\t\tclearTimeout( timeoutId );\n\t\t};\n\t}, [ text, timeout, setHasCopied ] );\n\n\treturn hasCopied;\n}\n"]}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { includes, debounce } from 'lodash';
|
|
5
|
+
/**
|
|
6
|
+
* WordPress dependencies
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { useCallback, useLayoutEffect, useRef } from '@wordpress/element';
|
|
10
|
+
import { focus } from '@wordpress/dom';
|
|
11
|
+
/**
|
|
12
|
+
* Names of control nodes which qualify for disabled behavior.
|
|
13
|
+
*
|
|
14
|
+
* See WHATWG HTML Standard: 4.10.18.5: "Enabling and disabling form controls: the disabled attribute".
|
|
15
|
+
*
|
|
16
|
+
* @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#enabling-and-disabling-form-controls:-the-disabled-attribute
|
|
17
|
+
*
|
|
18
|
+
* @type {string[]}
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
const DISABLED_ELIGIBLE_NODE_NAMES = ['BUTTON', 'FIELDSET', 'INPUT', 'OPTGROUP', 'OPTION', 'SELECT', 'TEXTAREA'];
|
|
22
|
+
/**
|
|
23
|
+
* In some circumstances, such as block previews, all focusable DOM elements
|
|
24
|
+
* (input fields, links, buttons, etc.) need to be disabled. This hook adds the
|
|
25
|
+
* behavior to disable nested DOM elements to the returned ref.
|
|
26
|
+
*
|
|
27
|
+
* @return {import('react').RefObject<HTMLElement>} Element Ref.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```js
|
|
31
|
+
* import { __experimentalUseDisabled as useDisabled } from '@wordpress/compose';
|
|
32
|
+
* const DisabledExample = () => {
|
|
33
|
+
* const disabledRef = useDisabled();
|
|
34
|
+
* return (
|
|
35
|
+
* <div ref={ disabledRef }>
|
|
36
|
+
* <a href="#">This link will have tabindex set to -1</a>
|
|
37
|
+
* <input placeholder="This input will have the disabled attribute added to it." type="text" />
|
|
38
|
+
* </div>
|
|
39
|
+
* );
|
|
40
|
+
* };
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
|
|
44
|
+
export default function useDisabled() {
|
|
45
|
+
/** @type {import('react').RefObject<HTMLElement>} */
|
|
46
|
+
const node = useRef(null);
|
|
47
|
+
|
|
48
|
+
const disable = () => {
|
|
49
|
+
if (!node.current) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
focus.focusable.find(node.current).forEach(focusable => {
|
|
54
|
+
if (includes(DISABLED_ELIGIBLE_NODE_NAMES, focusable.nodeName)) {
|
|
55
|
+
focusable.setAttribute('disabled', '');
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if (focusable.nodeName === 'A') {
|
|
59
|
+
focusable.setAttribute('tabindex', '-1');
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const tabIndex = focusable.getAttribute('tabindex');
|
|
63
|
+
|
|
64
|
+
if (tabIndex !== null && tabIndex !== '-1') {
|
|
65
|
+
focusable.removeAttribute('tabindex');
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if (focusable.hasAttribute('contenteditable')) {
|
|
69
|
+
focusable.setAttribute('contenteditable', 'false');
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
}; // Debounce re-disable since disabling process itself will incur
|
|
73
|
+
// additional mutations which should be ignored.
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
const debouncedDisable = useCallback(debounce(disable, undefined, {
|
|
77
|
+
leading: true
|
|
78
|
+
}), []);
|
|
79
|
+
useLayoutEffect(() => {
|
|
80
|
+
disable();
|
|
81
|
+
/** @type {MutationObserver | undefined} */
|
|
82
|
+
|
|
83
|
+
let observer;
|
|
84
|
+
|
|
85
|
+
if (node.current) {
|
|
86
|
+
observer = new window.MutationObserver(debouncedDisable);
|
|
87
|
+
observer.observe(node.current, {
|
|
88
|
+
childList: true,
|
|
89
|
+
attributes: true,
|
|
90
|
+
subtree: true
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return () => {
|
|
95
|
+
if (observer) {
|
|
96
|
+
observer.disconnect();
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
debouncedDisable.cancel();
|
|
100
|
+
};
|
|
101
|
+
}, []);
|
|
102
|
+
return node;
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["@wordpress/compose/src/hooks/use-disabled/index.js"],"names":["includes","debounce","useCallback","useLayoutEffect","useRef","focus","DISABLED_ELIGIBLE_NODE_NAMES","useDisabled","node","disable","current","focusable","find","forEach","nodeName","setAttribute","tabIndex","getAttribute","removeAttribute","hasAttribute","debouncedDisable","undefined","leading","observer","window","MutationObserver","observe","childList","attributes","subtree","disconnect","cancel"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,QAAT,EAAmBC,QAAnB,QAAmC,QAAnC;AAEA;AACA;AACA;;AACA,SAASC,WAAT,EAAsBC,eAAtB,EAAuCC,MAAvC,QAAqD,oBAArD;AACA,SAASC,KAAT,QAAsB,gBAAtB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,MAAMC,4BAA4B,GAAG,CACpC,QADoC,EAEpC,UAFoC,EAGpC,OAHoC,EAIpC,UAJoC,EAKpC,QALoC,EAMpC,QANoC,EAOpC,UAPoC,CAArC;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,eAAe,SAASC,WAAT,GAAuB;AACrC;AACA,QAAMC,IAAI,GAAGJ,MAAM,CAAE,IAAF,CAAnB;;AAEA,QAAMK,OAAO,GAAG,MAAM;AACrB,QAAK,CAAED,IAAI,CAACE,OAAZ,EAAsB;AACrB;AACA;;AAEDL,IAAAA,KAAK,CAACM,SAAN,CAAgBC,IAAhB,CAAsBJ,IAAI,CAACE,OAA3B,EAAqCG,OAArC,CAAgDF,SAAF,IAAiB;AAC9D,UACCX,QAAQ,CAAEM,4BAAF,EAAgCK,SAAS,CAACG,QAA1C,CADT,EAEE;AACDH,QAAAA,SAAS,CAACI,YAAV,CAAwB,UAAxB,EAAoC,EAApC;AACA;;AAED,UAAKJ,SAAS,CAACG,QAAV,KAAuB,GAA5B,EAAkC;AACjCH,QAAAA,SAAS,CAACI,YAAV,CAAwB,UAAxB,EAAoC,IAApC;AACA;;AAED,YAAMC,QAAQ,GAAGL,SAAS,CAACM,YAAV,CAAwB,UAAxB,CAAjB;;AACA,UAAKD,QAAQ,KAAK,IAAb,IAAqBA,QAAQ,KAAK,IAAvC,EAA8C;AAC7CL,QAAAA,SAAS,CAACO,eAAV,CAA2B,UAA3B;AACA;;AAED,UAAKP,SAAS,CAACQ,YAAV,CAAwB,iBAAxB,CAAL,EAAmD;AAClDR,QAAAA,SAAS,CAACI,YAAV,CAAwB,iBAAxB,EAA2C,OAA3C;AACA;AACD,KAnBD;AAoBA,GAzBD,CAJqC,CA+BrC;AACA;;;AACA,QAAMK,gBAAgB,GAAGlB,WAAW,CACnCD,QAAQ,CAAEQ,OAAF,EAAWY,SAAX,EAAsB;AAAEC,IAAAA,OAAO,EAAE;AAAX,GAAtB,CAD2B,EAEnC,EAFmC,CAApC;AAKAnB,EAAAA,eAAe,CAAE,MAAM;AACtBM,IAAAA,OAAO;AAEP;;AACA,QAAIc,QAAJ;;AACA,QAAKf,IAAI,CAACE,OAAV,EAAoB;AACnBa,MAAAA,QAAQ,GAAG,IAAIC,MAAM,CAACC,gBAAX,CAA6BL,gBAA7B,CAAX;AACAG,MAAAA,QAAQ,CAACG,OAAT,CAAkBlB,IAAI,CAACE,OAAvB,EAAgC;AAC/BiB,QAAAA,SAAS,EAAE,IADoB;AAE/BC,QAAAA,UAAU,EAAE,IAFmB;AAG/BC,QAAAA,OAAO,EAAE;AAHsB,OAAhC;AAKA;;AAED,WAAO,MAAM;AACZ,UAAKN,QAAL,EAAgB;AACfA,QAAAA,QAAQ,CAACO,UAAT;AACA;;AACDV,MAAAA,gBAAgB,CAACW,MAAjB;AACA,KALD;AAMA,GApBc,EAoBZ,EApBY,CAAf;AAsBA,SAAOvB,IAAP;AACA","sourcesContent":["/**\n * External dependencies\n */\nimport { includes, debounce } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { useCallback, useLayoutEffect, useRef } from '@wordpress/element';\nimport { focus } from '@wordpress/dom';\n\n/**\n * Names of control nodes which qualify for disabled behavior.\n *\n * See WHATWG HTML Standard: 4.10.18.5: \"Enabling and disabling form controls: the disabled attribute\".\n *\n * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#enabling-and-disabling-form-controls:-the-disabled-attribute\n *\n * @type {string[]}\n */\nconst DISABLED_ELIGIBLE_NODE_NAMES = [\n\t'BUTTON',\n\t'FIELDSET',\n\t'INPUT',\n\t'OPTGROUP',\n\t'OPTION',\n\t'SELECT',\n\t'TEXTAREA',\n];\n\n/**\n * In some circumstances, such as block previews, all focusable DOM elements\n * (input fields, links, buttons, etc.) need to be disabled. This hook adds the\n * behavior to disable nested DOM elements to the returned ref.\n *\n * @return {import('react').RefObject<HTMLElement>} Element Ref.\n *\n * @example\n * ```js\n * import { __experimentalUseDisabled as useDisabled } from '@wordpress/compose';\n * const DisabledExample = () => {\n * \tconst disabledRef = useDisabled();\n *\treturn (\n *\t\t<div ref={ disabledRef }>\n *\t\t\t<a href=\"#\">This link will have tabindex set to -1</a>\n *\t\t\t<input placeholder=\"This input will have the disabled attribute added to it.\" type=\"text\" />\n *\t\t</div>\n *\t);\n * };\n * ```\n */\nexport default function useDisabled() {\n\t/** @type {import('react').RefObject<HTMLElement>} */\n\tconst node = useRef( null );\n\n\tconst disable = () => {\n\t\tif ( ! node.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tfocus.focusable.find( node.current ).forEach( ( focusable ) => {\n\t\t\tif (\n\t\t\t\tincludes( DISABLED_ELIGIBLE_NODE_NAMES, focusable.nodeName )\n\t\t\t) {\n\t\t\t\tfocusable.setAttribute( 'disabled', '' );\n\t\t\t}\n\n\t\t\tif ( focusable.nodeName === 'A' ) {\n\t\t\t\tfocusable.setAttribute( 'tabindex', '-1' );\n\t\t\t}\n\n\t\t\tconst tabIndex = focusable.getAttribute( 'tabindex' );\n\t\t\tif ( tabIndex !== null && tabIndex !== '-1' ) {\n\t\t\t\tfocusable.removeAttribute( 'tabindex' );\n\t\t\t}\n\n\t\t\tif ( focusable.hasAttribute( 'contenteditable' ) ) {\n\t\t\t\tfocusable.setAttribute( 'contenteditable', 'false' );\n\t\t\t}\n\t\t} );\n\t};\n\n\t// Debounce re-disable since disabling process itself will incur\n\t// additional mutations which should be ignored.\n\tconst debouncedDisable = useCallback(\n\t\tdebounce( disable, undefined, { leading: true } ),\n\t\t[]\n\t);\n\n\tuseLayoutEffect( () => {\n\t\tdisable();\n\n\t\t/** @type {MutationObserver | undefined} */\n\t\tlet observer;\n\t\tif ( node.current ) {\n\t\t\tobserver = new window.MutationObserver( debouncedDisable );\n\t\t\tobserver.observe( node.current, {\n\t\t\t\tchildList: true,\n\t\t\t\tattributes: true,\n\t\t\t\tsubtree: true,\n\t\t\t} );\n\t\t}\n\n\t\treturn () => {\n\t\t\tif ( observer ) {\n\t\t\t\tobserver.disconnect();\n\t\t\t}\n\t\t\tdebouncedDisable.cancel();\n\t\t};\n\t}, [] );\n\n\treturn node;\n}\n"]}
|
package/build-module/index.js
CHANGED
|
@@ -14,6 +14,7 @@ export { default as useConstrainedTabbing } from './hooks/use-constrained-tabbin
|
|
|
14
14
|
export { default as useCopyOnClick } from './hooks/use-copy-on-click';
|
|
15
15
|
export { default as useCopyToClipboard } from './hooks/use-copy-to-clipboard';
|
|
16
16
|
export { default as __experimentalUseDialog } from './hooks/use-dialog';
|
|
17
|
+
export { default as __experimentalUseDisabled } from './hooks/use-disabled';
|
|
17
18
|
export { default as __experimentalUseDragging } from './hooks/use-dragging';
|
|
18
19
|
export { default as useFocusOnMount } from './hooks/use-focus-on-mount';
|
|
19
20
|
export { default as __experimentalUseFocusOutside } from './hooks/use-focus-outside';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/compose/src/index.js"],"names":["default","createHigherOrderComponent","compose","ifCondition","pure","withGlobalEvents","withInstanceId","withSafeTimeout","withState","useConstrainedTabbing","useCopyOnClick","useCopyToClipboard","__experimentalUseDialog","__experimentalUseDragging","useFocusOnMount","__experimentalUseFocusOutside","useFocusReturn","useInstanceId","useIsomorphicLayoutEffect","useKeyboardShortcut","useMediaQuery","usePrevious","useReducedMotion","useViewportMatch","useResizeObserver","useAsyncList","useWarnOnChange","useDebounce","useThrottle","useMergeRefs","useRefEffect","__experimentalUseDropZone","useFocusableIframe","__experimentalUseFixedWindowList"],"mappings":"AAAA;AACA,SAASA,OAAO,IAAIC,0BAApB,QAAsD,uCAAtD,C,CAEA;;AACA,SAASD,OAAO,IAAIE,OAApB,QAAmC,wBAAnC,C,CAEA;;AACA,SAASF,OAAO,IAAIG,WAApB,QAAuC,6BAAvC;AACA,SAASH,OAAO,IAAII,IAApB,QAAgC,qBAAhC;AACA,SAASJ,OAAO,IAAIK,gBAApB,QAA4C,mCAA5C;AACA,SAASL,OAAO,IAAIM,cAApB,QAA0C,iCAA1C;AACA,SAASN,OAAO,IAAIO,eAApB,QAA2C,kCAA3C;AACA,SAASP,OAAO,IAAIQ,SAApB,QAAqC,2BAArC,C,CAEA;;AACA,SAASR,OAAO,IAAIS,qBAApB,QAAiD,iCAAjD;AACA,SAAST,OAAO,IAAIU,cAApB,QAA0C,2BAA1C;AACA,SAASV,OAAO,IAAIW,kBAApB,QAA8C,+BAA9C;AACA,SAASX,OAAO,IAAIY,uBAApB,QAAmD,oBAAnD;AACA,SAASZ,OAAO,IAAIa,yBAApB,QAAqD,sBAArD;AACA,SAASb,OAAO,IAAIc,eAApB,QAA2C,4BAA3C;AACA,
|
|
1
|
+
{"version":3,"sources":["@wordpress/compose/src/index.js"],"names":["default","createHigherOrderComponent","compose","ifCondition","pure","withGlobalEvents","withInstanceId","withSafeTimeout","withState","useConstrainedTabbing","useCopyOnClick","useCopyToClipboard","__experimentalUseDialog","__experimentalUseDisabled","__experimentalUseDragging","useFocusOnMount","__experimentalUseFocusOutside","useFocusReturn","useInstanceId","useIsomorphicLayoutEffect","useKeyboardShortcut","useMediaQuery","usePrevious","useReducedMotion","useViewportMatch","useResizeObserver","useAsyncList","useWarnOnChange","useDebounce","useThrottle","useMergeRefs","useRefEffect","__experimentalUseDropZone","useFocusableIframe","__experimentalUseFixedWindowList"],"mappings":"AAAA;AACA,SAASA,OAAO,IAAIC,0BAApB,QAAsD,uCAAtD,C,CAEA;;AACA,SAASD,OAAO,IAAIE,OAApB,QAAmC,wBAAnC,C,CAEA;;AACA,SAASF,OAAO,IAAIG,WAApB,QAAuC,6BAAvC;AACA,SAASH,OAAO,IAAII,IAApB,QAAgC,qBAAhC;AACA,SAASJ,OAAO,IAAIK,gBAApB,QAA4C,mCAA5C;AACA,SAASL,OAAO,IAAIM,cAApB,QAA0C,iCAA1C;AACA,SAASN,OAAO,IAAIO,eAApB,QAA2C,kCAA3C;AACA,SAASP,OAAO,IAAIQ,SAApB,QAAqC,2BAArC,C,CAEA;;AACA,SAASR,OAAO,IAAIS,qBAApB,QAAiD,iCAAjD;AACA,SAAST,OAAO,IAAIU,cAApB,QAA0C,2BAA1C;AACA,SAASV,OAAO,IAAIW,kBAApB,QAA8C,+BAA9C;AACA,SAASX,OAAO,IAAIY,uBAApB,QAAmD,oBAAnD;AACA,SAASZ,OAAO,IAAIa,yBAApB,QAAqD,sBAArD;AACA,SAASb,OAAO,IAAIc,yBAApB,QAAqD,sBAArD;AACA,SAASd,OAAO,IAAIe,eAApB,QAA2C,4BAA3C;AACA,SAASf,OAAO,IAAIgB,6BAApB,QAAyD,2BAAzD;AACA,SAAShB,OAAO,IAAIiB,cAApB,QAA0C,0BAA1C;AACA,SAASjB,OAAO,IAAIkB,aAApB,QAAyC,yBAAzC;AACA,SAASlB,OAAO,IAAImB,yBAApB,QAAqD,sCAArD;AACA,SAASnB,OAAO,IAAIoB,mBAApB,QAA+C,+BAA/C;AACA,SAASpB,OAAO,IAAIqB,aAApB,QAAyC,yBAAzC;AACA,SAASrB,OAAO,IAAIsB,WAApB,QAAuC,sBAAvC;AACA,SAAStB,OAAO,IAAIuB,gBAApB,QAA4C,4BAA5C;AACA,SAASvB,OAAO,IAAIwB,gBAApB,QAA4C,4BAA5C;AACA,SAASxB,OAAO,IAAIyB,iBAApB,QAA6C,6BAA7C;AACA,SAASzB,OAAO,IAAI0B,YAApB,QAAwC,wBAAxC;AACA,SAAS1B,OAAO,IAAI2B,eAApB,QAA2C,4BAA3C;AACA,SAAS3B,OAAO,IAAI4B,WAApB,QAAuC,sBAAvC;AACA,SAAS5B,OAAO,IAAI6B,WAApB,QAAuC,sBAAvC;AACA,SAAS7B,OAAO,IAAI8B,YAApB,QAAwC,wBAAxC;AACA,SAAS9B,OAAO,IAAI+B,YAApB,QAAwC,wBAAxC;AACA,SAAS/B,OAAO,IAAIgC,yBAApB,QAAqD,uBAArD;AACA,SAAShC,OAAO,IAAIiC,kBAApB,QAA8C,8BAA9C;AACA,SAASjC,OAAO,IAAIkC,gCAApB,QAA4D,+BAA5D","sourcesContent":["// Utils\nexport { default as createHigherOrderComponent } from './utils/create-higher-order-component';\n\n// Compose helper (aliased flowRight from Lodash)\nexport { default as compose } from './higher-order/compose';\n\n// Higher-order components\nexport { default as ifCondition } from './higher-order/if-condition';\nexport { default as pure } from './higher-order/pure';\nexport { default as withGlobalEvents } from './higher-order/with-global-events';\nexport { default as withInstanceId } from './higher-order/with-instance-id';\nexport { default as withSafeTimeout } from './higher-order/with-safe-timeout';\nexport { default as withState } from './higher-order/with-state';\n\n// Hooks\nexport { default as useConstrainedTabbing } from './hooks/use-constrained-tabbing';\nexport { default as useCopyOnClick } from './hooks/use-copy-on-click';\nexport { default as useCopyToClipboard } from './hooks/use-copy-to-clipboard';\nexport { default as __experimentalUseDialog } from './hooks/use-dialog';\nexport { default as __experimentalUseDisabled } from './hooks/use-disabled';\nexport { default as __experimentalUseDragging } from './hooks/use-dragging';\nexport { default as useFocusOnMount } from './hooks/use-focus-on-mount';\nexport { default as __experimentalUseFocusOutside } from './hooks/use-focus-outside';\nexport { default as useFocusReturn } from './hooks/use-focus-return';\nexport { default as useInstanceId } from './hooks/use-instance-id';\nexport { default as useIsomorphicLayoutEffect } from './hooks/use-isomorphic-layout-effect';\nexport { default as useKeyboardShortcut } from './hooks/use-keyboard-shortcut';\nexport { default as useMediaQuery } from './hooks/use-media-query';\nexport { default as usePrevious } from './hooks/use-previous';\nexport { default as useReducedMotion } from './hooks/use-reduced-motion';\nexport { default as useViewportMatch } from './hooks/use-viewport-match';\nexport { default as useResizeObserver } from './hooks/use-resize-observer';\nexport { default as useAsyncList } from './hooks/use-async-list';\nexport { default as useWarnOnChange } from './hooks/use-warn-on-change';\nexport { default as useDebounce } from './hooks/use-debounce';\nexport { default as useThrottle } from './hooks/use-throttle';\nexport { default as useMergeRefs } from './hooks/use-merge-refs';\nexport { default as useRefEffect } from './hooks/use-ref-effect';\nexport { default as __experimentalUseDropZone } from './hooks/use-drop-zone';\nexport { default as useFocusableIframe } from './hooks/use-focusable-iframe';\nexport { default as __experimentalUseFixedWindowList } from './hooks/use-fixed-window-list';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/higher-order/with-state/index.js"],"names":[],"mappings":"AAWA;;;;;;;;;GASG;AACH,iDAJW,GAAG,GAEF,GAAG,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/higher-order/with-state/index.js"],"names":[],"mappings":"AAWA;;;;;;;;;GASG;AACH,iDAJW,GAAG,GAEF,GAAG,CA6Bd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-copy-on-click/index.js"],"names":[],"mappings":"AAYA;;;;;;;;;;;;GAYG;AACH,4CARW,OAAO,OAAO,EAAE,SAAS,CAAC,MAAM,GAAG,OAAO,GAAG,WAAW,OAAO,CAAC,CAAC,QACjE,MAAM,WAAS,iCAId,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-copy-on-click/index.js"],"names":[],"mappings":"AAYA;;;;;;;;;;;;GAYG;AACH,4CARW,OAAO,OAAO,EAAE,SAAS,CAAC,MAAM,GAAG,OAAO,GAAG,WAAW,OAAO,CAAC,CAAC,QACjE,MAAM,WAAS,iCAId,OAAO,CAsDlB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* In some circumstances, such as block previews, all focusable DOM elements
|
|
3
|
+
* (input fields, links, buttons, etc.) need to be disabled. This hook adds the
|
|
4
|
+
* behavior to disable nested DOM elements to the returned ref.
|
|
5
|
+
*
|
|
6
|
+
* @return {import('react').RefObject<HTMLElement>} Element Ref.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```js
|
|
10
|
+
* import { __experimentalUseDisabled as useDisabled } from '@wordpress/compose';
|
|
11
|
+
* const DisabledExample = () => {
|
|
12
|
+
* const disabledRef = useDisabled();
|
|
13
|
+
* return (
|
|
14
|
+
* <div ref={ disabledRef }>
|
|
15
|
+
* <a href="#">This link will have tabindex set to -1</a>
|
|
16
|
+
* <input placeholder="This input will have the disabled attribute added to it." type="text" />
|
|
17
|
+
* </div>
|
|
18
|
+
* );
|
|
19
|
+
* };
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export default function useDisabled(): import('react').RefObject<HTMLElement>;
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-disabled/index.js"],"names":[],"mappings":"AA8BA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,uCAhBY,OAAO,OAAO,EAAE,SAAS,CAAC,WAAW,CAAC,CA6EjD"}
|
package/build-types/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export { default as useConstrainedTabbing } from "./hooks/use-constrained-tabbin
|
|
|
10
10
|
export { default as useCopyOnClick } from "./hooks/use-copy-on-click";
|
|
11
11
|
export { default as useCopyToClipboard } from "./hooks/use-copy-to-clipboard";
|
|
12
12
|
export { default as __experimentalUseDialog } from "./hooks/use-dialog";
|
|
13
|
+
export { default as __experimentalUseDisabled } from "./hooks/use-disabled";
|
|
13
14
|
export { default as __experimentalUseDragging } from "./hooks/use-dragging";
|
|
14
15
|
export { default as useFocusOnMount } from "./hooks/use-focus-on-mount";
|
|
15
16
|
export { default as __experimentalUseFocusOutside } from "./hooks/use-focus-outside";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/compose",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.7-next.33ec3857e2.0",
|
|
4
4
|
"description": "WordPress higher-order components (HOCs).",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
"@babel/runtime": "^7.16.0",
|
|
33
33
|
"@types/lodash": "^4.14.172",
|
|
34
34
|
"@types/mousetrap": "^1.6.8",
|
|
35
|
-
"@wordpress/deprecated": "^3.2.
|
|
36
|
-
"@wordpress/dom": "^3.2.
|
|
37
|
-
"@wordpress/element": "^4.0.
|
|
38
|
-
"@wordpress/is-shallow-equal": "^4.2.
|
|
39
|
-
"@wordpress/keycodes": "^3.2.
|
|
40
|
-
"@wordpress/priority-queue": "^2.2.
|
|
35
|
+
"@wordpress/deprecated": "^3.2.4-next.33ec3857e2.0",
|
|
36
|
+
"@wordpress/dom": "^3.2.8-next.33ec3857e2.0",
|
|
37
|
+
"@wordpress/element": "^4.0.6-next.33ec3857e2.0",
|
|
38
|
+
"@wordpress/is-shallow-equal": "^4.2.2-next.33ec3857e2.0",
|
|
39
|
+
"@wordpress/keycodes": "^3.2.5-next.33ec3857e2.0",
|
|
40
|
+
"@wordpress/priority-queue": "^2.2.4-next.33ec3857e2.0",
|
|
41
41
|
"clipboard": "^2.0.8",
|
|
42
42
|
"lodash": "^4.17.21",
|
|
43
43
|
"mousetrap": "^1.6.5",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"publishConfig": {
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "51c7917ea7fac72953702f24d6daac87d99e7617"
|
|
51
51
|
}
|
|
@@ -26,8 +26,7 @@ import deprecated from '@wordpress/deprecated';
|
|
|
26
26
|
export default function useCopyOnClick( ref, text, timeout = 4000 ) {
|
|
27
27
|
/* eslint-enable jsdoc/no-undefined-types */
|
|
28
28
|
deprecated( 'wp.compose.useCopyOnClick', {
|
|
29
|
-
since: '
|
|
30
|
-
plugin: 'Gutenberg',
|
|
29
|
+
since: '5.8',
|
|
31
30
|
alternative: 'wp.compose.useCopyToClipboard',
|
|
32
31
|
} );
|
|
33
32
|
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { includes, debounce } from 'lodash';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* WordPress dependencies
|
|
8
|
+
*/
|
|
9
|
+
import { useCallback, useLayoutEffect, useRef } from '@wordpress/element';
|
|
10
|
+
import { focus } from '@wordpress/dom';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Names of control nodes which qualify for disabled behavior.
|
|
14
|
+
*
|
|
15
|
+
* See WHATWG HTML Standard: 4.10.18.5: "Enabling and disabling form controls: the disabled attribute".
|
|
16
|
+
*
|
|
17
|
+
* @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#enabling-and-disabling-form-controls:-the-disabled-attribute
|
|
18
|
+
*
|
|
19
|
+
* @type {string[]}
|
|
20
|
+
*/
|
|
21
|
+
const DISABLED_ELIGIBLE_NODE_NAMES = [
|
|
22
|
+
'BUTTON',
|
|
23
|
+
'FIELDSET',
|
|
24
|
+
'INPUT',
|
|
25
|
+
'OPTGROUP',
|
|
26
|
+
'OPTION',
|
|
27
|
+
'SELECT',
|
|
28
|
+
'TEXTAREA',
|
|
29
|
+
];
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* In some circumstances, such as block previews, all focusable DOM elements
|
|
33
|
+
* (input fields, links, buttons, etc.) need to be disabled. This hook adds the
|
|
34
|
+
* behavior to disable nested DOM elements to the returned ref.
|
|
35
|
+
*
|
|
36
|
+
* @return {import('react').RefObject<HTMLElement>} Element Ref.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```js
|
|
40
|
+
* import { __experimentalUseDisabled as useDisabled } from '@wordpress/compose';
|
|
41
|
+
* const DisabledExample = () => {
|
|
42
|
+
* const disabledRef = useDisabled();
|
|
43
|
+
* return (
|
|
44
|
+
* <div ref={ disabledRef }>
|
|
45
|
+
* <a href="#">This link will have tabindex set to -1</a>
|
|
46
|
+
* <input placeholder="This input will have the disabled attribute added to it." type="text" />
|
|
47
|
+
* </div>
|
|
48
|
+
* );
|
|
49
|
+
* };
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
export default function useDisabled() {
|
|
53
|
+
/** @type {import('react').RefObject<HTMLElement>} */
|
|
54
|
+
const node = useRef( null );
|
|
55
|
+
|
|
56
|
+
const disable = () => {
|
|
57
|
+
if ( ! node.current ) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
focus.focusable.find( node.current ).forEach( ( focusable ) => {
|
|
62
|
+
if (
|
|
63
|
+
includes( DISABLED_ELIGIBLE_NODE_NAMES, focusable.nodeName )
|
|
64
|
+
) {
|
|
65
|
+
focusable.setAttribute( 'disabled', '' );
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if ( focusable.nodeName === 'A' ) {
|
|
69
|
+
focusable.setAttribute( 'tabindex', '-1' );
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const tabIndex = focusable.getAttribute( 'tabindex' );
|
|
73
|
+
if ( tabIndex !== null && tabIndex !== '-1' ) {
|
|
74
|
+
focusable.removeAttribute( 'tabindex' );
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if ( focusable.hasAttribute( 'contenteditable' ) ) {
|
|
78
|
+
focusable.setAttribute( 'contenteditable', 'false' );
|
|
79
|
+
}
|
|
80
|
+
} );
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
// Debounce re-disable since disabling process itself will incur
|
|
84
|
+
// additional mutations which should be ignored.
|
|
85
|
+
const debouncedDisable = useCallback(
|
|
86
|
+
debounce( disable, undefined, { leading: true } ),
|
|
87
|
+
[]
|
|
88
|
+
);
|
|
89
|
+
|
|
90
|
+
useLayoutEffect( () => {
|
|
91
|
+
disable();
|
|
92
|
+
|
|
93
|
+
/** @type {MutationObserver | undefined} */
|
|
94
|
+
let observer;
|
|
95
|
+
if ( node.current ) {
|
|
96
|
+
observer = new window.MutationObserver( debouncedDisable );
|
|
97
|
+
observer.observe( node.current, {
|
|
98
|
+
childList: true,
|
|
99
|
+
attributes: true,
|
|
100
|
+
subtree: true,
|
|
101
|
+
} );
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return () => {
|
|
105
|
+
if ( observer ) {
|
|
106
|
+
observer.disconnect();
|
|
107
|
+
}
|
|
108
|
+
debouncedDisable.cancel();
|
|
109
|
+
};
|
|
110
|
+
}, [] );
|
|
111
|
+
|
|
112
|
+
return node;
|
|
113
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { render, screen, waitFor } from '@testing-library/react';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* WordPress dependencies
|
|
8
|
+
*/
|
|
9
|
+
import { forwardRef } from '@wordpress/element';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Internal dependencies
|
|
13
|
+
*/
|
|
14
|
+
import useDisabled from '../';
|
|
15
|
+
|
|
16
|
+
jest.mock( '@wordpress/dom', () => {
|
|
17
|
+
const focus = jest.requireActual( '../../../../../dom/src' ).focus;
|
|
18
|
+
|
|
19
|
+
return {
|
|
20
|
+
focus: {
|
|
21
|
+
...focus,
|
|
22
|
+
focusable: {
|
|
23
|
+
...focus.focusable,
|
|
24
|
+
find( context ) {
|
|
25
|
+
// In JSDOM, all elements have zero'd widths and height.
|
|
26
|
+
// This is a metric for focusable's `isVisible`, so find
|
|
27
|
+
// and apply an arbitrary non-zero width.
|
|
28
|
+
Array.from( context.querySelectorAll( '*' ) ).forEach(
|
|
29
|
+
( element ) => {
|
|
30
|
+
Object.defineProperties( element, {
|
|
31
|
+
offsetWidth: {
|
|
32
|
+
get: () => 1,
|
|
33
|
+
configurable: true,
|
|
34
|
+
},
|
|
35
|
+
} );
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
return focus.focusable.find( ...arguments );
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
} );
|
|
45
|
+
|
|
46
|
+
describe( 'useDisabled', () => {
|
|
47
|
+
const Form = forwardRef( ( { showButton }, ref ) => {
|
|
48
|
+
return (
|
|
49
|
+
<form ref={ ref }>
|
|
50
|
+
<input />
|
|
51
|
+
<a href="https://wordpress.org/">A link</a>
|
|
52
|
+
<p contentEditable={ true } tabIndex="0"></p>
|
|
53
|
+
{ showButton && <button>Button</button> }
|
|
54
|
+
</form>
|
|
55
|
+
);
|
|
56
|
+
} );
|
|
57
|
+
|
|
58
|
+
function DisabledComponent( props ) {
|
|
59
|
+
const disabledRef = useDisabled();
|
|
60
|
+
return <Form ref={ disabledRef } { ...props } />;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
it( 'will disable all fields', () => {
|
|
64
|
+
const { container } = render( <DisabledComponent /> );
|
|
65
|
+
|
|
66
|
+
const input = screen.getByRole( 'textbox' );
|
|
67
|
+
const link = screen.getByRole( 'link' );
|
|
68
|
+
const p = container.querySelector( 'p' );
|
|
69
|
+
|
|
70
|
+
expect( input.hasAttribute( 'disabled' ) ).toBe( true );
|
|
71
|
+
expect( link.getAttribute( 'tabindex' ) ).toBe( '-1' );
|
|
72
|
+
expect( p.getAttribute( 'contenteditable' ) ).toBe( 'false' );
|
|
73
|
+
expect( p.hasAttribute( 'tabindex' ) ).toBe( false );
|
|
74
|
+
expect( p.hasAttribute( 'disabled' ) ).toBe( false );
|
|
75
|
+
} );
|
|
76
|
+
|
|
77
|
+
it( 'will disable an element rendered in an update to the component', async () => {
|
|
78
|
+
const { rerender } = render(
|
|
79
|
+
<DisabledComponent showButton={ false } />
|
|
80
|
+
);
|
|
81
|
+
|
|
82
|
+
expect( screen.queryByText( 'Button' ) ).not.toBeInTheDocument();
|
|
83
|
+
rerender( <DisabledComponent showButton={ true } /> );
|
|
84
|
+
|
|
85
|
+
const button = screen.getByText( 'Button' );
|
|
86
|
+
await waitFor( () => {
|
|
87
|
+
expect( button.hasAttribute( 'disabled' ) ).toBe( true );
|
|
88
|
+
} );
|
|
89
|
+
} );
|
|
90
|
+
} );
|
package/src/index.js
CHANGED
|
@@ -17,6 +17,7 @@ export { default as useConstrainedTabbing } from './hooks/use-constrained-tabbin
|
|
|
17
17
|
export { default as useCopyOnClick } from './hooks/use-copy-on-click';
|
|
18
18
|
export { default as useCopyToClipboard } from './hooks/use-copy-to-clipboard';
|
|
19
19
|
export { default as __experimentalUseDialog } from './hooks/use-dialog';
|
|
20
|
+
export { default as __experimentalUseDisabled } from './hooks/use-disabled';
|
|
20
21
|
export { default as __experimentalUseDragging } from './hooks/use-dragging';
|
|
21
22
|
export { default as useFocusOnMount } from './hooks/use-focus-on-mount';
|
|
22
23
|
export { default as __experimentalUseFocusOutside } from './hooks/use-focus-outside';
|
package/tsconfig.tsbuildinfo
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/@types/lodash/common/common.d.ts","../../node_modules/@types/lodash/common/array.d.ts","../../node_modules/@types/lodash/common/collection.d.ts","../../node_modules/@types/lodash/common/date.d.ts","../../node_modules/@types/lodash/common/function.d.ts","../../node_modules/@types/lodash/common/lang.d.ts","../../node_modules/@types/lodash/common/math.d.ts","../../node_modules/@types/lodash/common/number.d.ts","../../node_modules/@types/lodash/common/object.d.ts","../../node_modules/@types/lodash/common/seq.d.ts","../../node_modules/@types/lodash/common/string.d.ts","../../node_modules/@types/lodash/common/util.d.ts","../../node_modules/@types/lodash/index.d.ts","../../node_modules/@types/react/global.d.ts","../../node_modules/@types/react/node_modules/csstype/index.d.ts","../../node_modules/@types/prop-types/index.d.ts","../../node_modules/@types/react/index.d.ts","./src/utils/create-higher-order-component/index.ts","./src/higher-order/compose.ts","./src/higher-order/if-condition/index.tsx","../is-shallow-equal/build-types/objects.d.ts","../is-shallow-equal/build-types/arrays.d.ts","../is-shallow-equal/build-types/index.d.ts","../element/build-types/react.d.ts","../element/build-types/create-interpolate-element.d.ts","../../node_modules/@types/react-dom/index.d.ts","../element/build-types/react-platform.d.ts","../element/build-types/utils.d.ts","../element/build-types/platform.d.ts","../element/build-types/serialize.d.ts","../element/build-types/raw-html.d.ts","../element/build-types/index.d.ts","./src/higher-order/pure/index.tsx","../../node_modules/utility-types/dist/aliases-and-guards.d.ts","../../node_modules/utility-types/dist/mapped-types.d.ts","../../node_modules/utility-types/dist/utility-types.d.ts","../../node_modules/utility-types/dist/functional-helpers.d.ts","../../node_modules/utility-types/dist/index.d.ts","../deprecated/build-types/index.d.ts","./src/higher-order/with-global-events/listener.js","./src/higher-order/with-global-events/index.js","./src/hooks/use-instance-id/index.js","./src/higher-order/with-instance-id/index.tsx","./src/higher-order/with-safe-timeout/index.tsx","./src/higher-order/with-state/index.js","../keycodes/build-types/index.d.ts","../dom/build-types/dom/compute-caret-rect.d.ts","../dom/build-types/dom/document-has-text-selection.d.ts","../dom/build-types/dom/document-has-uncollapsed-selection.d.ts","../dom/build-types/dom/document-has-selection.d.ts","../dom/build-types/dom/get-rectangle-from-range.d.ts","../dom/build-types/dom/get-scroll-container.d.ts","../dom/build-types/dom/get-offset-parent.d.ts","../dom/build-types/dom/is-entirely-selected.d.ts","../dom/build-types/dom/is-horizontal-edge.d.ts","../dom/build-types/dom/is-number-input.d.ts","../dom/build-types/dom/is-text-field.d.ts","../dom/build-types/dom/is-vertical-edge.d.ts","../dom/build-types/dom/place-caret-at-horizontal-edge.d.ts","../dom/build-types/dom/place-caret-at-vertical-edge.d.ts","../dom/build-types/dom/replace.d.ts","../dom/build-types/dom/remove.d.ts","../dom/build-types/dom/insert-after.d.ts","../dom/build-types/dom/unwrap.d.ts","../dom/build-types/dom/replace-tag.d.ts","../dom/build-types/dom/wrap.d.ts","../dom/build-types/dom/strip-html.d.ts","../dom/build-types/dom/is-empty.d.ts","../dom/build-types/dom/clean-node-list.d.ts","../dom/build-types/dom/remove-invalid-html.d.ts","../dom/build-types/dom/is-rtl.d.ts","../dom/build-types/dom/safe-html.d.ts","../dom/build-types/dom/index.d.ts","../dom/build-types/phrasing-content.d.ts","../dom/build-types/data-transfer.d.ts","../dom/build-types/focusable.d.ts","../dom/build-types/tabbable.d.ts","../dom/build-types/index.d.ts","./src/hooks/use-ref-effect/index.ts","./src/hooks/use-constrained-tabbing/index.js","../../node_modules/clipboard/src/clipboard.d.ts","./src/hooks/use-copy-on-click/index.js","./src/hooks/use-copy-to-clipboard/index.js","./src/hooks/use-focus-on-mount/index.js","./src/hooks/use-focus-return/index.js","./src/hooks/use-focus-outside/index.js","./src/hooks/use-merge-refs/index.js","./src/hooks/use-dialog/index.js","./src/hooks/use-isomorphic-layout-effect/index.js","./src/hooks/use-dragging/index.js","../../node_modules/@types/mousetrap/index.d.ts","../../node_modules/@types/mousetrap/plugins/global-bind/mousetrap-global-bind.d.ts","./src/hooks/use-keyboard-shortcut/index.js","./src/hooks/use-media-query/index.js","./src/hooks/use-previous/index.ts","./src/hooks/use-reduced-motion/index.js","./src/hooks/use-viewport-match/index.js","../../node_modules/react-resize-aware/dist/index.d.ts","./src/hooks/use-resize-observer/index.js","../priority-queue/build-types/index.d.ts","./src/hooks/use-async-list/index.ts","./src/hooks/use-warn-on-change/index.js","../../node_modules/use-memo-one/index.d.ts","./src/hooks/use-debounce/index.js","./src/hooks/use-throttle/index.js","./src/hooks/use-drop-zone/index.js","./src/hooks/use-focusable-iframe/index.js","./src/hooks/use-fixed-window-list/index.js","./src/index.js","../../typings/gutenberg-env/index.d.ts"],"fileInfos":[{"version":"aa9fb4c70f369237c2f45f9d969c9a59e0eae9a192962eb48581fe864aa609db","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940","eb75e89d63b3b72dd9ca8b0cac801cecae5be352307c004adeaa60bc9d6df51f","2cc028cd0bdb35b1b5eb723d84666a255933fffbea607f72cbd0c7c7b4bee144",{"version":"e54c8715a4954cfdc66cd69489f2b725c09ebf37492dbd91cff0a1688b1159e8","affectsGlobalScope":true},{"version":"51b8b27c21c066bf877646e320bf6a722b80d1ade65e686923cd9d4494aef1ca","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"2c8c5ee58f30e7c944e04ab1fb5506fdbb4dd507c9efa6972cf4b91cec90c503","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"93544ca2f26a48716c1b6c5091842cad63129daac422dfa4bc52460465f22bb1","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"7435b75fdf3509622e79622dbe5091cf4b09688410ee2034e4fc17d0c99d0862","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"9f1817f7c3f02f6d56e0f403b927e90bb133f371dcebc36fa7d6d208ef6899da","affectsGlobalScope":true},{"version":"cd6efb9467a8b6338ece2e2855e37765700f2cd061ca54b01b33878cf5c7677e","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"4632665b87204bb1caa8b44d165bce0c50dfab177df5b561b345a567cabacf9a","affectsGlobalScope":true},"675e702f2032766a91eeadee64f51014c64688525da99dccd8178f0c599f13a8","438284c7c455a29b9c0e2d1e72abc62ee93d9a163029ffe918a34c5db3b92da2","0c75b204aed9cf6ff1c7b4bed87a3ece0d9d6fc857a6350c0c95ed0c38c814e8","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","c24ad9be9adf28f0927e3d9d9e9cec1c677022356f241ccbbfb97bfe8fb3d1a1","0ec0998e2d085e8ea54266f547976ae152c9dd6cdb9ac4d8a520a230f5ebae84","9364c7566b0be2f7b70ff5285eb34686f83ccb01bda529b82d23b2a844653bfb","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","82251920b05f30981c9a4109cb5f3169dce4b477effc845c6d781044a30e7672","3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd","3e59f00ab03c33717b3130066d4debb272da90eeded4935ff0604c2bc25a5cae","9fa6b83a35e897f340858995ca5d77e901d89fd18644cd4c9e8a4afe0b2e6363",{"version":"0714e2046df66c0e93c3330d30dbc0565b3e8cd3ee302cf99e4ede6220e5fec8","affectsGlobalScope":true},{"version":"ecf78e637f710f340ec08d5d92b3f31b134a46a4fcf2e758690d8c46ce62cba6","affectsGlobalScope":true},"b3a4ee9791cdd4f5029b3ffe60b9cae1ac308a4238b0444f40a5222e4ecc5cc1","a7e32dcb90bf0c1b7a1e4ac89b0f7747cbcba25e7beddc1ebf17be1e161842ad",{"version":"0290ce481d9430774f1d41e757d087e9324b497e1ee0a9e908cf57a9f8bc6e0d","affectsGlobalScope":true},"e0cf5719020994706e8ea6c2dcaba3a3ed1bcab3f179c7699e53bbfa770cb033","69b10db64ffa3da633ed87c4287bf34639c09e9fd7e9253b865b68a778ad59a3","3071ac26843262443e9e8eb5c866ab7c4aa30e6c4f0c4048eaa8a46a20055ea5","5190f1a110a789c2f8ed8dcf2da6ce122dcb74249d0c01d19d1ed0b1c6bb02a1","3650bbe137c9c44bc6b8f44a56353b00eba9654e41a9355e6228f7f0f464c648","9c4f32d2fa2b6efeed4f9fbd98254121b17982110b48edcede96e2dc2af0894d","e59d00012fb20e6746def2f4bc94650526aa6c574c49ad6a50a992f61a3ee675","e47b8ec56eb49bc1c53c9012daa9874de14ad0c5da442485aec333571c74b526","c45d6f4d3a20be54e46237608f537a8d85397f87b9c3318d68ed925c2f1d0b51","64edfb2b255173bc63214290f9c3ed2306d658b5895ca482a0f20f03fd544ffc","d2d9e98a2b167079474768593e1e7125fc3db055add8fbdb5977e3d05a8a3696","6462da67490105ba7d98cf312c2faf8794c425781128b161ea8394d66502eec8","62359da52b6c8d00c50c2e50738fac82e902f916fdf458d8159e7edb1c60c3a8","1e0ac21bc775686383ea8c8e48bd98b385e6195b25c85525a7affd08a2cd38b9","0449615e1ed03c7d54fc435a63b7ef0cb4e5cea5ac40c9a63280a46f7eeae0ff","b209028102cd52052a2c11011af5e4e010414843aa7d883c3b8cdc3e7403e0d5","bd0d80db12ef1aceefc4f9d3eb88517b9634fa747ae8475981da8655292feab8","55e68fb1618e3f55f7866b8c8415152159309a14b716370081ab0b7af96d876e","bf0491af2455f92282b61807be2be6e7ad7d532e47fac7b698019d3617c28ff7","5d874fb879ab8601c02549817dceb2d0a30729cb7e161625dd6f819bbff1ec0b","ee551a880882770c4f56a0964a9767c9feafe497a5be52652527d098c88d85cb","b192606574769a5566620f9bf19358a3994bc2726ecdeaad9c66f3333b2687c8","685c1e09dc780ec54927eb79661f631c10753d9dd36063994c35df72d97ec32c","d1c7fd60c15e8923cdfb51bb9105ddf21726b62cd6fa53bfad981e17dfcb0a57","97d817c482aed9bfe6fa9a5d4ebf1b155b5d9435233a983d1afc66096babf7fa","3c390becfafff24a26b8d839679e1bc5b0b64695d8789d20b928a1b924839963","397371f84b27760761b7bf792b074bb21f3de264b8f4ee7845be66b313378d55","849b34283ea59408a1f5036713d771f3f0130bd41115d50c316cd9bfd71d4033","f8c1fc8d1d92c7b953cf047a994edb35ed08a0a54ab4daefa8996944689d0c9d","cbf4ee77c80de53d71a1d076ea25eddd23541685119a67c43bd4aeaad8533b1f","215f6d27f88aeaa56a4e0fe358a6fe3b8b5f7c76a2f83663035028b0c2595b1f","df917f07e5930a2ddf94e8a040fa4353bc17080e3b97e635e2c1f4bcc2b0b649","99745b3ec986ce2f5be49ce530a088df5fb327fa6958d6fab4132cc9dadb70c3","ed29e483e8f02b00928f055ff2ba529f951464fb8fd7d1c7f77ea851b4e56039","fe43e4fd566293aee946e5db5b055db1215602498d315e468c6adaf1e6917fb4","ea912b91fed2f873b87e24180399baad37c43019b6f51b210e1d9f1d1d0135ba","a1cd2b1943db96616abf3a3f939dfd0eb69fab8149725d195a8acc7f5672a1f9","1466691ae57846e0280465b012fd01aed3c4a4e0b39fcc11276833fbfc72ade7","f36506440d1abba7d2aff62bfcda4c95402d3e81314a482ac9c83e4c87b69229","cfa03019dd5cdd18ff1b5f00b3cb37ac762faf9eca2e86ea2c718502285cf67b","4d8d7075a3381162b4ae5147f84b4d2a2ae49398d98bef7c4437b8db0fefb194","a8b1a9f91ecb89faabb130af767e007ee28ac6ca794565d856759bb87e42feb1","1b1c43c378278f5dfea558337b0e3d57944a806eb4f55330baba592967253350","5ad070af2f7e4b7a676a63137c6a6cf670144ee5f23a9a30b21c19e70bb077f3","df060b3639c427e1c09bcf5cc14975f00b296e53192c710ea76e4a658a382aa0","4dd037aee1fed84d54490818e9a32d12e3e2f75d1dd9816d25fb9a0ecacee3b9","ca84eb7ffe779cb8812ee0a6aa151adac3dd25c4dc877767f37d079e5b62151f","f1d5239e0cdfb4ddd24a47727b88871802d3d2b3fda70229b158525753ad643e","af89d09746be737e24c50de49f035f3afea14c11be30ad5d2764d142daaa4078","5422948be7ac69dd13078af8ce2a8d9ea4d79eb510bfc54b75586573185183f9","246fc68fbf5c3ae2fded7eebcc38e6c5bb0f2cb796096916d0e65505cfbe850f","fc35e9bf454dcd7c42bab9e51bdedd4c9a5662b8d9964b1204913e268cb1fe6f","6e278ba8dbcf2617a2c5f5805e3addd1cf1c35b75b7dde3cbdabbccbf926b6fe","a2e36dad616090f5bcb99c4491b8b34bf8f2b5bf2fdcd6b5a43ddfd23f1b8433","c9d56f52ca68c2c86ec5ba05d927ef3892dca4923bd3cebe6593ebbcdd7e70c3","669e565019c7940333c2d36213f78681d7244eab84d0dd82846b84bc2afd6b36","067b19c3d1fde05a39e5b769cbb5f44e0f6cf201f52fa2cafedc3943ea2e9052","e3ea09f9ea097b88c98df19c52694ac83daab0692e90cea9cf3faff00087899f","02e1dfd21586ad4379dc0d0ab88283694734f786ed4dcffaf5fbe25b23cd4b62","513bf444023dc9ee010c6ab19bebc0bb3b8d8185cf09151041ae8a35d794ad77","4a43623f49489a0e0359e905dc2eaeb88c9bc5dce62819b9c04c8c60d79d2782","88ffe0a85567a555c2479b914ac2858d8c7212042b2b32ea943facb8d547e541","0529cc464f3dcf6322b23f37cb2a35bcc52baccb9afe128b38485cda9ea5db7d","d7865f701e0b27e883babea23a4aa1d1a8f37ccc502f7834b81d117401d689f4","44cdc8a6052751fee13933ab39e7a980b5ccf4d4a169a052b8dcb9e2ae70d114","af2cdede165faf7ea5de8e750f2f453f5bd43e2cdc4c40a94920ae6ece3c24cb","612f95d4d34eb1ed0f12cfb2bb732920103691a730e56021d392523045d885a8","b2f5779995addb268ede0af28f431d3496b482f1f41debf05b89e063e55ff366","ab102b3a9dff9560dbbad27061cd9440122caed1e5343c9ba3f1df76a8d0cde8","be8b993a2eebe3915c6aa0216c1c33ffc768f76ac12347ed3ba4c012c595b64c","17b9f139390e7af350f055749ef641f7268e5ca157d394cbf7a89bf9810d4c2b","98d019534dd7c963b013eed9a2a2e8a96618e70a40730f6920614be6d410ef80","314f946c60be58c8783f62d7e635ed6a84200f49944818594e349e405b6c69c5","96520a873073a2f39f922d0a422498cdcc28be9066a769000cdd07ecaba7b645","135aa6d18002bfec723f8697aa80a59648cf0582752d5e089b6eb0770b63a02d","cb00746df33e6191fa63a666fa109c3cbcf09a6596ea4b860110990036ac2dd7","831d99b85c6ced631649a70014e1288d3f927fa262e4009ba1fbcd11b965ce58","38fef887c5b2cae9d244172fe72957e61c3393bacc2be3ae5e2c1bf1e8a69e71","e064325c76ef07fec4cd69a91dabe717fae011bba5e15d81a2486ce25e80a91e","914d7cdcd8c7ebff500b43e8a878164ef0f93168eea0e5246747484a160d730b","86d2b7c95a540a2e9c1b35a41e0657adbdcce0e49f7c14c4162d594119ebb565","1e9c747baab36c95f28b88da102d5b2f60e047dcb315fbaf61b14b9448313806","8428253b010d7a2ef74156e763b59c11beb86ef4b8088b01837951633f955c11","e7669752758ae96e591040a264669535d7e65a8ce01f86812211fe39dc7bef6c","8ebd5899eefab0ba9bb82ae4cdd18aca44564a25cebfa51ea5d92db4252b49dd","62540abf0bac8bf8c13c183db0457c5495a2bdad157f9eb03916c3953feb765e","8a126a8c4817c6365ffb7445acec8149af98848f032a9cfcabcfdb4265378617","87ac7ab11dcc72117e09c35493e19a0bdcf75ca611e48e3a81beebca9f3f04b5","9b692d3cbc5c1c246fdc72b900181488e5de06841cab58e07cf1fa4307400379","6dd661da9a47bde2190abb41b215af59eb3f5161ea91d827dc7192bb8d071273","1ebfb8edbccd5dc522a17a4c4e550604b01abb1ad62b893a729fd3b9bd3be324","a5e4163d950d5b56839b50d4eef477dd673553a2b075079005edf4f26607f77b",{"version":"f254c1abf6bb4c92633159831f924588908da902aa5e04ae45c39bd001f62e2e","affectsGlobalScope":true}],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationDir":"./build-types","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":false,"importsNotUsedAsValues":2,"jsx":1,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"rootDir":"./src","strict":true,"target":99},"fileIdsList":[[45,47,48,49,50,51,52,53,54,55,56,57],[45,46,48,49,50,51,52,53,54,55,56,57],[46,47,48,49,50,51,52,53,54,55,56,57],[45,46,47,49,50,51,52,53,54,55,56,57],[45,46,47,48,50,51,52,53,54,55,56,57],[45,46,47,48,49,51,52,53,54,55,56,57],[45,46,47,48,49,50,52,53,54,55,56,57],[45,46,47,48,49,50,51,53,54,55,56,57],[45,46,47,48,49,50,51,52,54,55,56,57],[45,46,47,48,49,50,51,52,53,55,56,57],[45,46,47,48,49,50,51,52,53,54,56,57],[45,46,47,48,49,50,51,52,53,54,55,57],[45,46,47,48,49,50,51,52,53,54,55,56],[135],[61],[58,59,60],[78,79,80,81],[78],[79],[57],[62],[61,62,67,76],[57,62,76,83,84],[61,62,86],[57,61,62,76],[62,76,83],[76,144],[61,90,122,123],[61,76,83,125],[61,76,123,125],[57,76,147],[61,76,90,124,128,129,130,131],[76,133],[61,76,123],[57,61,76,90,122],[61,76,122],[57,61,76],[61,76],[123],[76],[57,61,76,135,136],[138],[142],[76,138],[139],[62,63,64,77,85,86,87,88,89,123,124,126,127,128,129,130,131,132,133,134,137,138,139,140,141,143,145,146,148,149,150,151,152],[57,61],[82],[91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,114,115,116],[113],[117,118,119,120,121],[68],[68,69,71,72,73,74,75],[70],[61,68],[65,66],[67]],"referencedMap":[[46,1],[47,2],[45,3],[48,4],[49,5],[50,6],[51,7],[52,8],[53,9],[54,10],[55,11],[56,12],[57,13],[136,14],[70,15],[61,16],[142,15],[82,17],[79,18],[80,19],[63,20],[64,21],[77,22],[85,23],[84,20],[87,24],[88,25],[89,26],[145,27],[124,28],[126,29],[127,30],[148,31],[132,32],[134,33],[150,34],[152,35],[128,36],[130,37],[129,38],[151,39],[86,40],[133,40],[137,41],[138,40],[131,38],[139,40],[140,42],[123,38],[143,43],[149,31],[141,44],[146,45],[153,46],[62,47],[83,48],[117,49],[114,50],[122,51],[69,52],[76,53],[75,15],[71,54],[68,15],[74,55],[67,56],[65,57]],"exportedModulesMap":[[46,1],[47,2],[45,3],[48,4],[49,5],[50,6],[51,7],[52,8],[53,9],[54,10],[55,11],[56,12],[57,13],[136,14],[70,15],[61,16],[142,15],[82,17],[79,18],[80,19],[63,20],[64,21],[77,22],[85,23],[84,20],[87,24],[88,25],[89,26],[145,27],[124,28],[126,29],[127,30],[148,31],[132,32],[134,33],[150,34],[152,35],[128,36],[130,37],[129,38],[151,39],[86,40],[133,40],[137,41],[138,40],[131,38],[139,40],[140,42],[123,38],[143,43],[149,31],[141,44],[146,45],[153,46],[62,47],[83,48],[117,49],[114,50],[122,51],[69,52],[76,53],[75,15],[71,54],[68,15],[74,55],[67,56],[65,57]],"semanticDiagnosticsPerFile":[46,47,45,48,49,50,51,52,53,54,55,56,57,135,136,60,70,58,61,59,125,142,10,12,11,2,13,14,15,16,17,18,19,20,3,4,24,21,22,23,25,26,27,5,28,29,30,31,6,32,33,34,35,7,40,36,37,38,39,8,41,42,43,1,9,44,147,78,81,82,79,80,63,64,77,85,84,87,88,89,145,124,126,127,148,132,134,150,152,128,130,129,151,86,133,137,138,131,139,140,123,143,149,141,146,153,62,83,119,113,91,94,92,93,97,95,96,117,107,112,98,99,100,115,101,102,103,104,114,106,109,105,116,111,108,110,120,122,118,121,69,76,73,75,71,68,74,72,66,67,65,90,144,154]},"version":"4.4.2"}
|
|
1
|
+
{"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/@types/lodash/common/common.d.ts","../../node_modules/@types/lodash/common/array.d.ts","../../node_modules/@types/lodash/common/collection.d.ts","../../node_modules/@types/lodash/common/date.d.ts","../../node_modules/@types/lodash/common/function.d.ts","../../node_modules/@types/lodash/common/lang.d.ts","../../node_modules/@types/lodash/common/math.d.ts","../../node_modules/@types/lodash/common/number.d.ts","../../node_modules/@types/lodash/common/object.d.ts","../../node_modules/@types/lodash/common/seq.d.ts","../../node_modules/@types/lodash/common/string.d.ts","../../node_modules/@types/lodash/common/util.d.ts","../../node_modules/@types/lodash/index.d.ts","../../node_modules/@types/react/global.d.ts","../../node_modules/@types/react/node_modules/csstype/index.d.ts","../../node_modules/@types/prop-types/index.d.ts","../../node_modules/@types/scheduler/tracing.d.ts","../../node_modules/@types/react/index.d.ts","./src/utils/create-higher-order-component/index.ts","./src/higher-order/compose.ts","./src/higher-order/if-condition/index.tsx","../is-shallow-equal/build-types/objects.d.ts","../is-shallow-equal/build-types/arrays.d.ts","../is-shallow-equal/build-types/index.d.ts","../element/build-types/react.d.ts","../element/build-types/create-interpolate-element.d.ts","../../node_modules/@types/react-dom/index.d.ts","../element/build-types/react-platform.d.ts","../element/build-types/utils.d.ts","../element/build-types/platform.d.ts","../element/build-types/serialize.d.ts","../element/build-types/raw-html.d.ts","../element/build-types/index.d.ts","./src/higher-order/pure/index.tsx","../../node_modules/utility-types/dist/aliases-and-guards.d.ts","../../node_modules/utility-types/dist/mapped-types.d.ts","../../node_modules/utility-types/dist/utility-types.d.ts","../../node_modules/utility-types/dist/functional-helpers.d.ts","../../node_modules/utility-types/dist/index.d.ts","../deprecated/build-types/index.d.ts","./src/higher-order/with-global-events/listener.js","./src/higher-order/with-global-events/index.js","./src/hooks/use-instance-id/index.js","./src/higher-order/with-instance-id/index.tsx","./src/higher-order/with-safe-timeout/index.tsx","./src/higher-order/with-state/index.js","../keycodes/build-types/index.d.ts","../dom/build-types/dom/compute-caret-rect.d.ts","../dom/build-types/dom/document-has-text-selection.d.ts","../dom/build-types/dom/document-has-uncollapsed-selection.d.ts","../dom/build-types/dom/document-has-selection.d.ts","../dom/build-types/dom/get-rectangle-from-range.d.ts","../dom/build-types/dom/get-scroll-container.d.ts","../dom/build-types/dom/get-offset-parent.d.ts","../dom/build-types/dom/is-entirely-selected.d.ts","../dom/build-types/dom/is-horizontal-edge.d.ts","../dom/build-types/dom/is-number-input.d.ts","../dom/build-types/dom/is-text-field.d.ts","../dom/build-types/dom/is-vertical-edge.d.ts","../dom/build-types/dom/place-caret-at-horizontal-edge.d.ts","../dom/build-types/dom/place-caret-at-vertical-edge.d.ts","../dom/build-types/dom/replace.d.ts","../dom/build-types/dom/remove.d.ts","../dom/build-types/dom/insert-after.d.ts","../dom/build-types/dom/unwrap.d.ts","../dom/build-types/dom/replace-tag.d.ts","../dom/build-types/dom/wrap.d.ts","../dom/build-types/dom/strip-html.d.ts","../dom/build-types/dom/is-empty.d.ts","../dom/build-types/dom/clean-node-list.d.ts","../dom/build-types/dom/remove-invalid-html.d.ts","../dom/build-types/dom/is-rtl.d.ts","../dom/build-types/dom/safe-html.d.ts","../dom/build-types/dom/index.d.ts","../dom/build-types/phrasing-content.d.ts","../dom/build-types/data-transfer.d.ts","../dom/build-types/focusable.d.ts","../dom/build-types/tabbable.d.ts","../dom/build-types/index.d.ts","./src/hooks/use-ref-effect/index.ts","./src/hooks/use-constrained-tabbing/index.js","../../node_modules/clipboard/src/clipboard.d.ts","./src/hooks/use-copy-on-click/index.js","./src/hooks/use-copy-to-clipboard/index.js","./src/hooks/use-focus-on-mount/index.js","./src/hooks/use-focus-return/index.js","./src/hooks/use-focus-outside/index.js","./src/hooks/use-merge-refs/index.js","./src/hooks/use-dialog/index.js","./src/hooks/use-disabled/index.js","./src/hooks/use-isomorphic-layout-effect/index.js","./src/hooks/use-dragging/index.js","../../node_modules/@types/mousetrap/index.d.ts","../../node_modules/@types/mousetrap/plugins/global-bind/mousetrap-global-bind.d.ts","./src/hooks/use-keyboard-shortcut/index.js","./src/hooks/use-media-query/index.js","./src/hooks/use-previous/index.ts","./src/hooks/use-reduced-motion/index.js","./src/hooks/use-viewport-match/index.js","../../node_modules/react-resize-aware/dist/index.d.ts","./src/hooks/use-resize-observer/index.js","../priority-queue/build-types/index.d.ts","./src/hooks/use-async-list/index.ts","./src/hooks/use-warn-on-change/index.js","../../node_modules/use-memo-one/index.d.ts","./src/hooks/use-debounce/index.js","./src/hooks/use-throttle/index.js","./src/hooks/use-drop-zone/index.js","./src/hooks/use-focusable-iframe/index.js","./src/hooks/use-fixed-window-list/index.js","./src/index.js","../../typings/gutenberg-env/index.d.ts"],"fileInfos":[{"version":"aa9fb4c70f369237c2f45f9d969c9a59e0eae9a192962eb48581fe864aa609db","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940","eb75e89d63b3b72dd9ca8b0cac801cecae5be352307c004adeaa60bc9d6df51f","2cc028cd0bdb35b1b5eb723d84666a255933fffbea607f72cbd0c7c7b4bee144",{"version":"e54c8715a4954cfdc66cd69489f2b725c09ebf37492dbd91cff0a1688b1159e8","affectsGlobalScope":true},{"version":"51b8b27c21c066bf877646e320bf6a722b80d1ade65e686923cd9d4494aef1ca","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"2c8c5ee58f30e7c944e04ab1fb5506fdbb4dd507c9efa6972cf4b91cec90c503","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"93544ca2f26a48716c1b6c5091842cad63129daac422dfa4bc52460465f22bb1","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"7435b75fdf3509622e79622dbe5091cf4b09688410ee2034e4fc17d0c99d0862","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"9f1817f7c3f02f6d56e0f403b927e90bb133f371dcebc36fa7d6d208ef6899da","affectsGlobalScope":true},{"version":"cd6efb9467a8b6338ece2e2855e37765700f2cd061ca54b01b33878cf5c7677e","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"4632665b87204bb1caa8b44d165bce0c50dfab177df5b561b345a567cabacf9a","affectsGlobalScope":true},"675e702f2032766a91eeadee64f51014c64688525da99dccd8178f0c599f13a8","438284c7c455a29b9c0e2d1e72abc62ee93d9a163029ffe918a34c5db3b92da2","0c75b204aed9cf6ff1c7b4bed87a3ece0d9d6fc857a6350c0c95ed0c38c814e8","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","c24ad9be9adf28f0927e3d9d9e9cec1c677022356f241ccbbfb97bfe8fb3d1a1","0ec0998e2d085e8ea54266f547976ae152c9dd6cdb9ac4d8a520a230f5ebae84","9364c7566b0be2f7b70ff5285eb34686f83ccb01bda529b82d23b2a844653bfb","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","82251920b05f30981c9a4109cb5f3169dce4b477effc845c6d781044a30e7672","3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd","3e59f00ab03c33717b3130066d4debb272da90eeded4935ff0604c2bc25a5cae","9fa6b83a35e897f340858995ca5d77e901d89fd18644cd4c9e8a4afe0b2e6363",{"version":"0714e2046df66c0e93c3330d30dbc0565b3e8cd3ee302cf99e4ede6220e5fec8","affectsGlobalScope":true},{"version":"ecf78e637f710f340ec08d5d92b3f31b134a46a4fcf2e758690d8c46ce62cba6","affectsGlobalScope":true},"381899b8d1d4c1be716f18cb5242ba39f66f4b1e31d45af62a32a99f8edcb39d","f7b46d22a307739c145e5fddf537818038fdfffd580d79ed717f4d4d37249380","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"1bc82f5b3bb93df76d19730c84467b0b346187198537135d63a672956f323720","affectsGlobalScope":true},"e0cf5719020994706e8ea6c2dcaba3a3ed1bcab3f179c7699e53bbfa770cb033","69b10db64ffa3da633ed87c4287bf34639c09e9fd7e9253b865b68a778ad59a3","3071ac26843262443e9e8eb5c866ab7c4aa30e6c4f0c4048eaa8a46a20055ea5","5190f1a110a789c2f8ed8dcf2da6ce122dcb74249d0c01d19d1ed0b1c6bb02a1","3650bbe137c9c44bc6b8f44a56353b00eba9654e41a9355e6228f7f0f464c648","9c4f32d2fa2b6efeed4f9fbd98254121b17982110b48edcede96e2dc2af0894d","e59d00012fb20e6746def2f4bc94650526aa6c574c49ad6a50a992f61a3ee675","e47b8ec56eb49bc1c53c9012daa9874de14ad0c5da442485aec333571c74b526","45a63e17814c570ea59407f231ef9c561510bd6edb36f17479b09b44619496c6","64edfb2b255173bc63214290f9c3ed2306d658b5895ca482a0f20f03fd544ffc","d2d9e98a2b167079474768593e1e7125fc3db055add8fbdb5977e3d05a8a3696","6462da67490105ba7d98cf312c2faf8794c425781128b161ea8394d66502eec8","62359da52b6c8d00c50c2e50738fac82e902f916fdf458d8159e7edb1c60c3a8","1e0ac21bc775686383ea8c8e48bd98b385e6195b25c85525a7affd08a2cd38b9","0449615e1ed03c7d54fc435a63b7ef0cb4e5cea5ac40c9a63280a46f7eeae0ff","b209028102cd52052a2c11011af5e4e010414843aa7d883c3b8cdc3e7403e0d5","bd0d80db12ef1aceefc4f9d3eb88517b9634fa747ae8475981da8655292feab8","55e68fb1618e3f55f7866b8c8415152159309a14b716370081ab0b7af96d876e","bf0491af2455f92282b61807be2be6e7ad7d532e47fac7b698019d3617c28ff7","5d874fb879ab8601c02549817dceb2d0a30729cb7e161625dd6f819bbff1ec0b","ee551a880882770c4f56a0964a9767c9feafe497a5be52652527d098c88d85cb","b192606574769a5566620f9bf19358a3994bc2726ecdeaad9c66f3333b2687c8","685c1e09dc780ec54927eb79661f631c10753d9dd36063994c35df72d97ec32c","d1c7fd60c15e8923cdfb51bb9105ddf21726b62cd6fa53bfad981e17dfcb0a57","97d817c482aed9bfe6fa9a5d4ebf1b155b5d9435233a983d1afc66096babf7fa","3c390becfafff24a26b8d839679e1bc5b0b64695d8789d20b928a1b924839963","397371f84b27760761b7bf792b074bb21f3de264b8f4ee7845be66b313378d55","1110671ef0c9bed54246577aea5c934bc47fa382c554a3e0a79d03da5a65a3ad","f8c1fc8d1d92c7b953cf047a994edb35ed08a0a54ab4daefa8996944689d0c9d","cbf4ee77c80de53d71a1d076ea25eddd23541685119a67c43bd4aeaad8533b1f","215f6d27f88aeaa56a4e0fe358a6fe3b8b5f7c76a2f83663035028b0c2595b1f","df917f07e5930a2ddf94e8a040fa4353bc17080e3b97e635e2c1f4bcc2b0b649","99745b3ec986ce2f5be49ce530a088df5fb327fa6958d6fab4132cc9dadb70c3","ed29e483e8f02b00928f055ff2ba529f951464fb8fd7d1c7f77ea851b4e56039","fe43e4fd566293aee946e5db5b055db1215602498d315e468c6adaf1e6917fb4","ea912b91fed2f873b87e24180399baad37c43019b6f51b210e1d9f1d1d0135ba","a1cd2b1943db96616abf3a3f939dfd0eb69fab8149725d195a8acc7f5672a1f9","1466691ae57846e0280465b012fd01aed3c4a4e0b39fcc11276833fbfc72ade7","f36506440d1abba7d2aff62bfcda4c95402d3e81314a482ac9c83e4c87b69229","cfa03019dd5cdd18ff1b5f00b3cb37ac762faf9eca2e86ea2c718502285cf67b","4d8d7075a3381162b4ae5147f84b4d2a2ae49398d98bef7c4437b8db0fefb194","a8b1a9f91ecb89faabb130af767e007ee28ac6ca794565d856759bb87e42feb1","1b1c43c378278f5dfea558337b0e3d57944a806eb4f55330baba592967253350","5ad070af2f7e4b7a676a63137c6a6cf670144ee5f23a9a30b21c19e70bb077f3","df060b3639c427e1c09bcf5cc14975f00b296e53192c710ea76e4a658a382aa0","4dd037aee1fed84d54490818e9a32d12e3e2f75d1dd9816d25fb9a0ecacee3b9","ca84eb7ffe779cb8812ee0a6aa151adac3dd25c4dc877767f37d079e5b62151f","f1d5239e0cdfb4ddd24a47727b88871802d3d2b3fda70229b158525753ad643e","af89d09746be737e24c50de49f035f3afea14c11be30ad5d2764d142daaa4078","5422948be7ac69dd13078af8ce2a8d9ea4d79eb510bfc54b75586573185183f9","246fc68fbf5c3ae2fded7eebcc38e6c5bb0f2cb796096916d0e65505cfbe850f","fc35e9bf454dcd7c42bab9e51bdedd4c9a5662b8d9964b1204913e268cb1fe6f","6e278ba8dbcf2617a2c5f5805e3addd1cf1c35b75b7dde3cbdabbccbf926b6fe","a2e36dad616090f5bcb99c4491b8b34bf8f2b5bf2fdcd6b5a43ddfd23f1b8433","c9d56f52ca68c2c86ec5ba05d927ef3892dca4923bd3cebe6593ebbcdd7e70c3","669e565019c7940333c2d36213f78681d7244eab84d0dd82846b84bc2afd6b36","067b19c3d1fde05a39e5b769cbb5f44e0f6cf201f52fa2cafedc3943ea2e9052","e3ea09f9ea097b88c98df19c52694ac83daab0692e90cea9cf3faff00087899f","02e1dfd21586ad4379dc0d0ab88283694734f786ed4dcffaf5fbe25b23cd4b62","513bf444023dc9ee010c6ab19bebc0bb3b8d8185cf09151041ae8a35d794ad77","4a43623f49489a0e0359e905dc2eaeb88c9bc5dce62819b9c04c8c60d79d2782","88ffe0a85567a555c2479b914ac2858d8c7212042b2b32ea943facb8d547e541","0529cc464f3dcf6322b23f37cb2a35bcc52baccb9afe128b38485cda9ea5db7d","d7865f701e0b27e883babea23a4aa1d1a8f37ccc502f7834b81d117401d689f4","2290ccf854da4cabed41ff4013869e463b16772b3f16ae308e382f91d516c895","af2cdede165faf7ea5de8e750f2f453f5bd43e2cdc4c40a94920ae6ece3c24cb","612f95d4d34eb1ed0f12cfb2bb732920103691a730e56021d392523045d885a8","b2f5779995addb268ede0af28f431d3496b482f1f41debf05b89e063e55ff366","ab102b3a9dff9560dbbad27061cd9440122caed1e5343c9ba3f1df76a8d0cde8","be8b993a2eebe3915c6aa0216c1c33ffc768f76ac12347ed3ba4c012c595b64c","17b9f139390e7af350f055749ef641f7268e5ca157d394cbf7a89bf9810d4c2b","4922e74a2348b7d8ab2df3938da4da210aa8805eec96489cbfc818c6646fbe19","98d019534dd7c963b013eed9a2a2e8a96618e70a40730f6920614be6d410ef80","314f946c60be58c8783f62d7e635ed6a84200f49944818594e349e405b6c69c5","96520a873073a2f39f922d0a422498cdcc28be9066a769000cdd07ecaba7b645","135aa6d18002bfec723f8697aa80a59648cf0582752d5e089b6eb0770b63a02d","cb00746df33e6191fa63a666fa109c3cbcf09a6596ea4b860110990036ac2dd7","831d99b85c6ced631649a70014e1288d3f927fa262e4009ba1fbcd11b965ce58","38fef887c5b2cae9d244172fe72957e61c3393bacc2be3ae5e2c1bf1e8a69e71","e064325c76ef07fec4cd69a91dabe717fae011bba5e15d81a2486ce25e80a91e","914d7cdcd8c7ebff500b43e8a878164ef0f93168eea0e5246747484a160d730b","86d2b7c95a540a2e9c1b35a41e0657adbdcce0e49f7c14c4162d594119ebb565","1e9c747baab36c95f28b88da102d5b2f60e047dcb315fbaf61b14b9448313806","8428253b010d7a2ef74156e763b59c11beb86ef4b8088b01837951633f955c11","e7669752758ae96e591040a264669535d7e65a8ce01f86812211fe39dc7bef6c","8ebd5899eefab0ba9bb82ae4cdd18aca44564a25cebfa51ea5d92db4252b49dd","62540abf0bac8bf8c13c183db0457c5495a2bdad157f9eb03916c3953feb765e","8a126a8c4817c6365ffb7445acec8149af98848f032a9cfcabcfdb4265378617","87ac7ab11dcc72117e09c35493e19a0bdcf75ca611e48e3a81beebca9f3f04b5","9b692d3cbc5c1c246fdc72b900181488e5de06841cab58e07cf1fa4307400379","6dd661da9a47bde2190abb41b215af59eb3f5161ea91d827dc7192bb8d071273","1ebfb8edbccd5dc522a17a4c4e550604b01abb1ad62b893a729fd3b9bd3be324","454f345a88d7a26d1b830f936073637699530e56ec3ef6a82c0cf00518115462",{"version":"f254c1abf6bb4c92633159831f924588908da902aa5e04ae45c39bd001f62e2e","affectsGlobalScope":true}],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationDir":"./build-types","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":false,"importsNotUsedAsValues":2,"jsx":1,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"rootDir":"./src","strict":true,"target":99},"fileIdsList":[[45,47,48,49,50,51,52,53,54,55,56,57],[45,46,48,49,50,51,52,53,54,55,56,57],[46,47,48,49,50,51,52,53,54,55,56,57],[45,46,47,49,50,51,52,53,54,55,56,57],[45,46,47,48,50,51,52,53,54,55,56,57],[45,46,47,48,49,51,52,53,54,55,56,57],[45,46,47,48,49,50,52,53,54,55,56,57],[45,46,47,48,49,50,51,53,54,55,56,57],[45,46,47,48,49,50,51,52,54,55,56,57],[45,46,47,48,49,50,51,52,53,55,56,57],[45,46,47,48,49,50,51,52,53,54,56,57],[45,46,47,48,49,50,51,52,53,54,55,57],[45,46,47,48,49,50,51,52,53,54,55,56],[137],[62],[58,59,60,61],[79,80,81,82],[79],[80],[57],[63],[62,63,68,77],[57,63,77,84,85],[62,63,87],[57,62,63,77],[63,77,84],[77,146],[62,91,123,124],[62,77,84,126],[62,77,124,126],[57,77,149],[62,77,91,125,129,130,131,132],[57,62,77,123],[77,135],[62,77,124],[57,62,77,91,123],[62,77,123],[57,62,77],[62,77],[124],[77],[57,62,77,137,138],[140],[144],[77,140],[141],[63,64,65,78,86,87,88,89,90,124,125,127,128,129,130,131,132,133,134,135,136,139,140,141,142,143,145,147,148,150,151,152,153,154],[57,62],[83],[92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,115,116,117],[114],[118,119,120,121,122],[69],[69,70,72,73,74,75,76],[71],[62,69],[66,67],[68]],"referencedMap":[[46,1],[47,2],[45,3],[48,4],[49,5],[50,6],[51,7],[52,8],[53,9],[54,10],[55,11],[56,12],[57,13],[138,14],[71,15],[62,16],[144,15],[83,17],[80,18],[81,19],[64,20],[65,21],[78,22],[86,23],[85,20],[88,24],[89,25],[90,26],[147,27],[125,28],[127,29],[128,30],[150,31],[133,32],[134,33],[136,34],[152,35],[154,36],[129,37],[131,38],[130,39],[153,40],[87,41],[135,41],[139,42],[140,41],[132,39],[141,41],[142,43],[124,39],[145,44],[151,31],[143,45],[148,46],[155,47],[63,48],[84,49],[118,50],[115,51],[123,52],[70,53],[77,54],[76,15],[72,55],[69,15],[75,56],[68,57],[66,58]],"exportedModulesMap":[[46,1],[47,2],[45,3],[48,4],[49,5],[50,6],[51,7],[52,8],[53,9],[54,10],[55,11],[56,12],[57,13],[138,14],[71,15],[62,16],[144,15],[83,17],[80,18],[81,19],[64,20],[65,21],[78,22],[86,23],[85,20],[88,24],[89,25],[90,26],[147,27],[125,28],[127,29],[128,30],[150,31],[133,32],[134,33],[136,34],[152,35],[154,36],[129,37],[131,38],[130,39],[153,40],[87,41],[135,41],[139,42],[140,41],[132,39],[141,41],[142,43],[124,39],[145,44],[151,31],[143,45],[148,46],[155,47],[63,48],[84,49],[118,50],[115,51],[123,52],[70,53],[77,54],[76,15],[72,55],[69,15],[75,56],[68,57],[66,58]],"semanticDiagnosticsPerFile":[46,47,45,48,49,50,51,52,53,54,55,56,57,137,138,60,71,58,62,59,61,126,144,10,12,11,2,13,14,15,16,17,18,19,20,3,4,24,21,22,23,25,26,27,5,28,29,30,31,6,32,33,34,35,7,40,36,37,38,39,8,41,42,43,1,9,44,149,79,82,83,80,81,64,65,78,86,85,88,89,90,147,125,127,128,150,133,134,136,152,154,129,131,130,153,87,135,139,140,132,141,142,124,145,151,143,148,155,63,84,120,114,92,95,93,94,98,96,97,118,108,113,99,100,101,116,102,103,104,105,115,107,110,106,117,112,109,111,121,123,119,122,70,77,74,76,72,69,75,73,67,68,66,91,146,156]},"version":"4.4.2"}
|