@wordpress/data 8.0.0 → 8.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/build/registry.js +12 -5
- package/build/registry.js.map +1 -1
- package/build-module/registry.js +12 -5
- package/build-module/registry.js.map +1 -1
- package/build-types/registry.d.ts.map +1 -1
- package/package.json +8 -8
- package/src/components/use-select/test/index.js +34 -0
- package/src/components/use-select/test/suspense.js +2 -1
- package/src/registry.js +6 -5
- package/tsconfig.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
package/build/registry.js
CHANGED
|
@@ -75,7 +75,7 @@ function createRegistry() {
|
|
|
75
75
|
let parent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
76
76
|
const stores = {};
|
|
77
77
|
const emitter = (0, _emitter.createEmitter)();
|
|
78
|
-
|
|
78
|
+
let listeningStores = null;
|
|
79
79
|
/**
|
|
80
80
|
* Global listener called for each store's update.
|
|
81
81
|
*/
|
|
@@ -129,8 +129,10 @@ function createRegistry() {
|
|
|
129
129
|
|
|
130
130
|
|
|
131
131
|
function select(storeNameOrDescriptor) {
|
|
132
|
+
var _listeningStores;
|
|
133
|
+
|
|
132
134
|
const storeName = getStoreName(storeNameOrDescriptor);
|
|
133
|
-
listeningStores.add(storeName);
|
|
135
|
+
(_listeningStores = listeningStores) === null || _listeningStores === void 0 ? void 0 : _listeningStores.add(storeName);
|
|
134
136
|
const store = stores[storeName];
|
|
135
137
|
|
|
136
138
|
if (store) {
|
|
@@ -141,12 +143,13 @@ function createRegistry() {
|
|
|
141
143
|
}
|
|
142
144
|
|
|
143
145
|
function __unstableMarkListeningStores(callback, ref) {
|
|
144
|
-
listeningStores
|
|
146
|
+
listeningStores = new Set();
|
|
145
147
|
|
|
146
148
|
try {
|
|
147
149
|
return callback.call(this);
|
|
148
150
|
} finally {
|
|
149
151
|
ref.current = Array.from(listeningStores);
|
|
152
|
+
listeningStores = null;
|
|
150
153
|
}
|
|
151
154
|
}
|
|
152
155
|
/**
|
|
@@ -163,8 +166,10 @@ function createRegistry() {
|
|
|
163
166
|
|
|
164
167
|
|
|
165
168
|
function resolveSelect(storeNameOrDescriptor) {
|
|
169
|
+
var _listeningStores2;
|
|
170
|
+
|
|
166
171
|
const storeName = getStoreName(storeNameOrDescriptor);
|
|
167
|
-
listeningStores.add(storeName);
|
|
172
|
+
(_listeningStores2 = listeningStores) === null || _listeningStores2 === void 0 ? void 0 : _listeningStores2.add(storeName);
|
|
168
173
|
const store = stores[storeName];
|
|
169
174
|
|
|
170
175
|
if (store) {
|
|
@@ -187,8 +192,10 @@ function createRegistry() {
|
|
|
187
192
|
|
|
188
193
|
|
|
189
194
|
function suspendSelect(storeNameOrDescriptor) {
|
|
195
|
+
var _listeningStores3;
|
|
196
|
+
|
|
190
197
|
const storeName = getStoreName(storeNameOrDescriptor);
|
|
191
|
-
listeningStores.add(storeName);
|
|
198
|
+
(_listeningStores3 = listeningStores) === null || _listeningStores3 === void 0 ? void 0 : _listeningStores3.add(storeName);
|
|
192
199
|
const store = stores[storeName];
|
|
193
200
|
|
|
194
201
|
if (store) {
|
package/build/registry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/data/src/registry.js"],"names":["getStoreName","storeNameOrDescriptor","name","createRegistry","storeConfigs","parent","stores","emitter","listeningStores","Set","globalListener","emit","subscribe","listener","storeName","store","select","add","getSelectors","__unstableMarkListeningStores","callback","ref","clear","call","current","Array","from","resolveSelect","getResolveSelectors","suspendSelect","getSuspendSelectors","dispatch","getActions","withPlugins","attributes","attribute","key","registry","apply","arguments","registerStoreInstance","TypeError","currentSubscribe","unsubscribeFromEmitter","unsubscribeFromStore","isPaused","register","instantiate","registerGenericStore","since","alternative","registerStore","options","reducer","batch","pause","Object","values","forEach","resume","namespaces","use","plugin","coreDataStore","config","entries"],"mappings":";;;;;;;;;AAGA;;AAKA;;AAKA;;AACA;;AAC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AgB;AACf;AACA;;AAEDzB,IAAAA,QAAQ,GAAG,EACV,GAAGA,QADO;AAEV,SAAGyB,MAAM,CAAEzB,QAAF,EAAYe,OAAZ;AAFC,KAAX;AAKA,WAAOf,QAAP;AACA;;AAEDA,EAAAA,QAAQ,CAACS,QAAT,CAAmBiB,cAAnB;;AAEA,OAAM,MAAM,CAAE7D,IAAF,EAAQ8D,MAAR,CAAZ,IAAgCR,MAAM,CAACS,OAAP,CAAgB7D,YAAhB,CAAhC,EAAiE;AAChEiC,IAAAA,QAAQ,CAACS,QAAT,CAAmB,yBAAkB5C,IAAlB,EAAwB8D,MAAxB,CAAnB;AACA;;AAED,MAAK3D,MAAL,EAAc;AACbA,IAAAA,MAAM,CAACO,SAAP,CAAkBF,cAAlB;AACA;;AAED,SAAOuB,WAAW,CAAEI,QAAF,CAAlB;AACA","sourcesContent":["/**\n * External dependencies\n */\nimport { mapValues } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport createReduxStore from './redux-store';\nimport coreDataStore from './store';\nimport { createEmitter } from './utils/emitter';\n\n/** @typedef {import('./types').StoreDescriptor} StoreDescriptor */\n\n/**\n * @typedef {Object} WPDataRegistry An isolated orchestrator of store registrations.\n *\n * @property {Function} registerGenericStore Given a namespace key and settings\n * object, registers a new generic\n * store.\n * @property {Function} registerStore Given a namespace key and settings\n * object, registers a new namespace\n * store.\n * @property {Function} subscribe Given a function callback, invokes\n * the callback on any change to state\n * within any registered store.\n * @property {Function} select Given a namespace key, returns an\n * object of the store's registered\n * selectors.\n * @property {Function} dispatch Given a namespace key, returns an\n * object of the store's registered\n * action dispatchers.\n */\n\n/**\n * @typedef {Object} WPDataPlugin An object of registry function overrides.\n *\n * @property {Function} registerStore registers store.\n */\n\nfunction getStoreName( storeNameOrDescriptor ) {\n\treturn typeof storeNameOrDescriptor === 'string'\n\t\t? storeNameOrDescriptor\n\t\t: storeNameOrDescriptor.name;\n}\n/**\n * Creates a new store registry, given an optional object of initial store\n * configurations.\n *\n * @param {Object} storeConfigs Initial store configurations.\n * @param {Object?} parent Parent registry.\n *\n * @return {WPDataRegistry} Data registry.\n */\nexport function createRegistry( storeConfigs = {}, parent = null ) {\n\tconst stores = {};\n\tconst emitter = createEmitter();\n\tconst listeningStores = new Set();\n\n\t/**\n\t * Global listener called for each store's update.\n\t */\n\tfunction globalListener() {\n\t\temitter.emit();\n\t}\n\n\t/**\n\t * Subscribe to changes to any data, either in all stores in registry, or\n\t * in one specific store.\n\t *\n\t * @param {Function} listener Listener function.\n\t * @param {string|StoreDescriptor?} storeNameOrDescriptor Optional store name.\n\t *\n\t * @return {Function} Unsubscribe function.\n\t */\n\tconst subscribe = ( listener, storeNameOrDescriptor ) => {\n\t\t// subscribe to all stores\n\t\tif ( ! storeNameOrDescriptor ) {\n\t\t\treturn emitter.subscribe( listener );\n\t\t}\n\n\t\t// subscribe to one store\n\t\tconst storeName = getStoreName( storeNameOrDescriptor );\n\t\tconst store = stores[ storeName ];\n\t\tif ( store ) {\n\t\t\treturn store.subscribe( listener );\n\t\t}\n\n\t\t// Trying to access a store that hasn't been registered,\n\t\t// this is a pattern rarely used but seen in some places.\n\t\t// We fallback to global `subscribe` here for backward-compatibility for now.\n\t\t// See https://github.com/WordPress/gutenberg/pull/27466 for more info.\n\t\tif ( ! parent ) {\n\t\t\treturn emitter.subscribe( listener );\n\t\t}\n\n\t\treturn parent.subscribe( listener, storeNameOrDescriptor );\n\t};\n\n\t/**\n\t * Calls a selector given the current state and extra arguments.\n\t *\n\t * @param {string|StoreDescriptor} storeNameOrDescriptor Unique namespace identifier for the store\n\t * or the store descriptor.\n\t *\n\t * @return {*} The selector's returned value.\n\t */\n\tfunction select( storeNameOrDescriptor ) {\n\t\tconst storeName = getStoreName( storeNameOrDescriptor );\n\t\tlisteningStores.add( storeName );\n\t\tconst store = stores[ storeName ];\n\t\tif ( store ) {\n\t\t\treturn store.getSelectors();\n\t\t}\n\n\t\treturn parent?.select( storeName );\n\t}\n\n\tfunction __unstableMarkListeningStores( callback, ref ) {\n\t\tlisteningStores.clear();\n\t\ttry {\n\t\t\treturn callback.call( this );\n\t\t} finally {\n\t\t\tref.current = Array.from( listeningStores );\n\t\t}\n\t}\n\n\t/**\n\t * Given a store descriptor, returns an object containing the store's selectors pre-bound to\n\t * state so that you only need to supply additional arguments, and modified so that they return\n\t * promises that resolve to their eventual values, after any resolvers have ran.\n\t *\n\t * @param {StoreDescriptor|string} storeNameOrDescriptor The store descriptor. The legacy calling\n\t * convention of passing the store name is\n\t * also supported.\n\t *\n\t * @return {Object} Each key of the object matches the name of a selector.\n\t */\n\tfunction resolveSelect( storeNameOrDescriptor ) {\n\t\tconst storeName = getStoreName( storeNameOrDescriptor );\n\t\tlisteningStores.add( storeName );\n\t\tconst store = stores[ storeName ];\n\t\tif ( store ) {\n\t\t\treturn store.getResolveSelectors();\n\t\t}\n\n\t\treturn parent && parent.resolveSelect( storeName );\n\t}\n\n\t/**\n\t * Given a store descriptor, returns an object containing the store's selectors pre-bound to\n\t * state so that you only need to supply additional arguments, and modified so that they throw\n\t * promises in case the selector is not resolved yet.\n\t *\n\t * @param {StoreDescriptor|string} storeNameOrDescriptor The store descriptor. The legacy calling\n\t * convention of passing the store name is\n\t * also supported.\n\t *\n\t * @return {Object} Object containing the store's suspense-wrapped selectors.\n\t */\n\tfunction suspendSelect( storeNameOrDescriptor ) {\n\t\tconst storeName = getStoreName( storeNameOrDescriptor );\n\t\tlisteningStores.add( storeName );\n\t\tconst store = stores[ storeName ];\n\t\tif ( store ) {\n\t\t\treturn store.getSuspendSelectors();\n\t\t}\n\n\t\treturn parent && parent.suspendSelect( storeName );\n\t}\n\n\t/**\n\t * Returns the available actions for a part of the state.\n\t *\n\t * @param {string|StoreDescriptor} storeNameOrDescriptor Unique namespace identifier for the store\n\t * or the store descriptor.\n\t *\n\t * @return {*} The action's returned value.\n\t */\n\tfunction dispatch( storeNameOrDescriptor ) {\n\t\tconst storeName = getStoreName( storeNameOrDescriptor );\n\t\tconst store = stores[ storeName ];\n\t\tif ( store ) {\n\t\t\treturn store.getActions();\n\t\t}\n\n\t\treturn parent && parent.dispatch( storeName );\n\t}\n\n\t//\n\t// Deprecated\n\t// TODO: Remove this after `use()` is removed.\n\tfunction withPlugins( attributes ) {\n\t\treturn mapValues( attributes, ( attribute, key ) => {\n\t\t\tif ( typeof attribute !== 'function' ) {\n\t\t\t\treturn attribute;\n\t\t\t}\n\t\t\treturn function () {\n\t\t\t\treturn registry[ key ].apply( null, arguments );\n\t\t\t};\n\t\t} );\n\t}\n\n\t/**\n\t * Registers a store instance.\n\t *\n\t * @param {string} name Store registry name.\n\t * @param {Object} store Store instance object (getSelectors, getActions, subscribe).\n\t */\n\tfunction registerStoreInstance( name, store ) {\n\t\tif ( typeof store.getSelectors !== 'function' ) {\n\t\t\tthrow new TypeError( 'store.getSelectors must be a function' );\n\t\t}\n\t\tif ( typeof store.getActions !== 'function' ) {\n\t\t\tthrow new TypeError( 'store.getActions must be a function' );\n\t\t}\n\t\tif ( typeof store.subscribe !== 'function' ) {\n\t\t\tthrow new TypeError( 'store.subscribe must be a function' );\n\t\t}\n\t\t// The emitter is used to keep track of active listeners when the registry\n\t\t// get paused, that way, when resumed we should be able to call all these\n\t\t// pending listeners.\n\t\tstore.emitter = createEmitter();\n\t\tconst currentSubscribe = store.subscribe;\n\t\tstore.subscribe = ( listener ) => {\n\t\t\tconst unsubscribeFromEmitter = store.emitter.subscribe( listener );\n\t\t\tconst unsubscribeFromStore = currentSubscribe( () => {\n\t\t\t\tif ( store.emitter.isPaused ) {\n\t\t\t\t\tstore.emitter.emit();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tlistener();\n\t\t\t} );\n\n\t\t\treturn () => {\n\t\t\t\tunsubscribeFromStore?.();\n\t\t\t\tunsubscribeFromEmitter?.();\n\t\t\t};\n\t\t};\n\t\tstores[ name ] = store;\n\t\tstore.subscribe( globalListener );\n\t}\n\n\t/**\n\t * Registers a new store given a store descriptor.\n\t *\n\t * @param {StoreDescriptor} store Store descriptor.\n\t */\n\tfunction register( store ) {\n\t\tregisterStoreInstance( store.name, store.instantiate( registry ) );\n\t}\n\n\tfunction registerGenericStore( name, store ) {\n\t\tdeprecated( 'wp.data.registerGenericStore', {\n\t\t\tsince: '5.9',\n\t\t\talternative: 'wp.data.register( storeDescriptor )',\n\t\t} );\n\t\tregisterStoreInstance( name, store );\n\t}\n\n\t/**\n\t * Registers a standard `@wordpress/data` store.\n\t *\n\t * @param {string} storeName Unique namespace identifier.\n\t * @param {Object} options Store description (reducer, actions, selectors, resolvers).\n\t *\n\t * @return {Object} Registered store object.\n\t */\n\tfunction registerStore( storeName, options ) {\n\t\tif ( ! options.reducer ) {\n\t\t\tthrow new TypeError( 'Must specify store reducer' );\n\t\t}\n\n\t\tconst store = createReduxStore( storeName, options ).instantiate(\n\t\t\tregistry\n\t\t);\n\t\tregisterStoreInstance( storeName, store );\n\t\treturn store.store;\n\t}\n\n\tfunction batch( callback ) {\n\t\temitter.pause();\n\t\tObject.values( stores ).forEach( ( store ) => store.emitter.pause() );\n\t\tcallback();\n\t\temitter.resume();\n\t\tObject.values( stores ).forEach( ( store ) => store.emitter.resume() );\n\t}\n\n\tlet registry = {\n\t\tbatch,\n\t\tstores,\n\t\tnamespaces: stores, // TODO: Deprecate/remove this.\n\t\tsubscribe,\n\t\tselect,\n\t\tresolveSelect,\n\t\tsuspendSelect,\n\t\tdispatch,\n\t\tuse,\n\t\tregister,\n\t\tregisterGenericStore,\n\t\tregisterStore,\n\t\t__unstableMarkListeningStores,\n\t};\n\n\t//\n\t// TODO:\n\t// This function will be deprecated as soon as it is no longer internally referenced.\n\tfunction use( plugin, options ) {\n\t\tif ( ! plugin ) {\n\t\t\treturn;\n\t\t}\n\n\t\tregistry = {\n\t\t\t...registry,\n\t\t\t...plugin( registry, options ),\n\t\t};\n\n\t\treturn registry;\n\t}\n\n\tregistry.register( coreDataStore );\n\n\tfor ( const [ name, config ] of Object.entries( storeConfigs ) ) {\n\t\tregistry.register( createReduxStore( name, config ) );\n\t}\n\n\tif ( parent ) {\n\t\tparent.subscribe( globalListener );\n\t}\n\n\treturn withPlugins( registry );\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["@wordpress/data/src/registry.js"],"names":["getStoreName","storeNameOrDescriptor","name","createRegistry","storeConfigs","parent","stores","emitter","listeningStores","globalListener","emit","subscribe","listener","storeName","store","select","add","getSelectors","__unstableMarkListeningStores","callback","ref","Set","call","current","Array","from","resolveSelect","getResolveSelectors","suspendSelect","getSuspendSelectors","dispatch","getActions","withPlugins","attributes","attribute","key","registry","apply","arguments","registerStoreInstance","TypeError","currentSubscribe","unsubscribeFromEmitter","unsubscribeFromStore","isPaused","register","instantiate","registerGenericStore","since","alternative","registerStore","options","reducer","batch","pause","Object","values","forEach","resume","namespaces","use","plugin","coreDataStore","config","entries"],"mappings":";;;;;;;;;AAGA;;AAKA;;AAKA;;AACA;;AACA;;AAfA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAKA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AAEA,SAASA,YAAT,CAAuBC,qBAAvB,EAA+C;AAC9C,SAAO,OAAOA,qBAAP,KAAiC,QAAjC,GACJA,qBADI,GAEJA,qBAAqB,CAACC,IAFzB;AAGA;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASC,cAAT,GAA4D;AAAA,MAAnCC,YAAmC,uEAApB,EAAoB;AAAA,MAAhBC,MAAgB,uEAAP,IAAO;AAClE,QAAMC,MAAM,GAAG,EAAf;AACA,QAAMC,OAAO,GAAG,6BAAhB;AACA,MAAIC,eAAe,GAAG,IAAtB;AAEA;AACD;AACA;;AACC,WAASC,cAAT,GAA0B;AACzBF,IAAAA,OAAO,CAACG,IAAR;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":["/**\n * External dependencies\n */\nimport { mapValues } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport createReduxStore from './redux-store';\nimport coreDataStore from './store';\nimport { createEmitter } from './utils/emitter';\n\n/** @typedef {import('./types').StoreDescriptor} StoreDescriptor */\n\n/**\n * @typedef {Object} WPDataRegistry An isolated orchestrator of store registrations.\n *\n * @property {Function} registerGenericStore Given a namespace key and settings\n * object, registers a new generic\n * store.\n * @property {Function} registerStore Given a namespace key and settings\n * object, registers a new namespace\n * store.\n * @property {Function} subscribe Given a function callback, invokes\n * the callback on any change to state\n * within any registered store.\n * @property {Function} select Given a namespace key, returns an\n * object of the store's registered\n * selectors.\n * @property {Function} dispatch Given a namespace key, returns an\n * object of the store's registered\n * action dispatchers.\n */\n\n/**\n * @typedef {Object} WPDataPlugin An object of registry function overrides.\n *\n * @property {Function} registerStore registers store.\n */\n\nfunction getStoreName( storeNameOrDescriptor ) {\n\treturn typeof storeNameOrDescriptor === 'string'\n\t\t? storeNameOrDescriptor\n\t\t: storeNameOrDescriptor.name;\n}\n/**\n * Creates a new store registry, given an optional object of initial store\n * configurations.\n *\n * @param {Object} storeConfigs Initial store configurations.\n * @param {Object?} parent Parent registry.\n *\n * @return {WPDataRegistry} Data registry.\n */\nexport function createRegistry( storeConfigs = {}, parent = null ) {\n\tconst stores = {};\n\tconst emitter = createEmitter();\n\tlet listeningStores = null;\n\n\t/**\n\t * Global listener called for each store's update.\n\t */\n\tfunction globalListener() {\n\t\temitter.emit();\n\t}\n\n\t/**\n\t * Subscribe to changes to any data, either in all stores in registry, or\n\t * in one specific store.\n\t *\n\t * @param {Function} listener Listener function.\n\t * @param {string|StoreDescriptor?} storeNameOrDescriptor Optional store name.\n\t *\n\t * @return {Function} Unsubscribe function.\n\t */\n\tconst subscribe = ( listener, storeNameOrDescriptor ) => {\n\t\t// subscribe to all stores\n\t\tif ( ! storeNameOrDescriptor ) {\n\t\t\treturn emitter.subscribe( listener );\n\t\t}\n\n\t\t// subscribe to one store\n\t\tconst storeName = getStoreName( storeNameOrDescriptor );\n\t\tconst store = stores[ storeName ];\n\t\tif ( store ) {\n\t\t\treturn store.subscribe( listener );\n\t\t}\n\n\t\t// Trying to access a store that hasn't been registered,\n\t\t// this is a pattern rarely used but seen in some places.\n\t\t// We fallback to global `subscribe` here for backward-compatibility for now.\n\t\t// See https://github.com/WordPress/gutenberg/pull/27466 for more info.\n\t\tif ( ! parent ) {\n\t\t\treturn emitter.subscribe( listener );\n\t\t}\n\n\t\treturn parent.subscribe( listener, storeNameOrDescriptor );\n\t};\n\n\t/**\n\t * Calls a selector given the current state and extra arguments.\n\t *\n\t * @param {string|StoreDescriptor} storeNameOrDescriptor Unique namespace identifier for the store\n\t * or the store descriptor.\n\t *\n\t * @return {*} The selector's returned value.\n\t */\n\tfunction select( storeNameOrDescriptor ) {\n\t\tconst storeName = getStoreName( storeNameOrDescriptor );\n\t\tlisteningStores?.add( storeName );\n\t\tconst store = stores[ storeName ];\n\t\tif ( store ) {\n\t\t\treturn store.getSelectors();\n\t\t}\n\n\t\treturn parent?.select( storeName );\n\t}\n\n\tfunction __unstableMarkListeningStores( callback, ref ) {\n\t\tlisteningStores = new Set();\n\t\ttry {\n\t\t\treturn callback.call( this );\n\t\t} finally {\n\t\t\tref.current = Array.from( listeningStores );\n\t\t\tlisteningStores = null;\n\t\t}\n\t}\n\n\t/**\n\t * Given a store descriptor, returns an object containing the store's selectors pre-bound to\n\t * state so that you only need to supply additional arguments, and modified so that they return\n\t * promises that resolve to their eventual values, after any resolvers have ran.\n\t *\n\t * @param {StoreDescriptor|string} storeNameOrDescriptor The store descriptor. The legacy calling\n\t * convention of passing the store name is\n\t * also supported.\n\t *\n\t * @return {Object} Each key of the object matches the name of a selector.\n\t */\n\tfunction resolveSelect( storeNameOrDescriptor ) {\n\t\tconst storeName = getStoreName( storeNameOrDescriptor );\n\t\tlisteningStores?.add( storeName );\n\t\tconst store = stores[ storeName ];\n\t\tif ( store ) {\n\t\t\treturn store.getResolveSelectors();\n\t\t}\n\n\t\treturn parent && parent.resolveSelect( storeName );\n\t}\n\n\t/**\n\t * Given a store descriptor, returns an object containing the store's selectors pre-bound to\n\t * state so that you only need to supply additional arguments, and modified so that they throw\n\t * promises in case the selector is not resolved yet.\n\t *\n\t * @param {StoreDescriptor|string} storeNameOrDescriptor The store descriptor. The legacy calling\n\t * convention of passing the store name is\n\t * also supported.\n\t *\n\t * @return {Object} Object containing the store's suspense-wrapped selectors.\n\t */\n\tfunction suspendSelect( storeNameOrDescriptor ) {\n\t\tconst storeName = getStoreName( storeNameOrDescriptor );\n\t\tlisteningStores?.add( storeName );\n\t\tconst store = stores[ storeName ];\n\t\tif ( store ) {\n\t\t\treturn store.getSuspendSelectors();\n\t\t}\n\n\t\treturn parent && parent.suspendSelect( storeName );\n\t}\n\n\t/**\n\t * Returns the available actions for a part of the state.\n\t *\n\t * @param {string|StoreDescriptor} storeNameOrDescriptor Unique namespace identifier for the store\n\t * or the store descriptor.\n\t *\n\t * @return {*} The action's returned value.\n\t */\n\tfunction dispatch( storeNameOrDescriptor ) {\n\t\tconst storeName = getStoreName( storeNameOrDescriptor );\n\t\tconst store = stores[ storeName ];\n\t\tif ( store ) {\n\t\t\treturn store.getActions();\n\t\t}\n\n\t\treturn parent && parent.dispatch( storeName );\n\t}\n\n\t//\n\t// Deprecated\n\t// TODO: Remove this after `use()` is removed.\n\tfunction withPlugins( attributes ) {\n\t\treturn mapValues( attributes, ( attribute, key ) => {\n\t\t\tif ( typeof attribute !== 'function' ) {\n\t\t\t\treturn attribute;\n\t\t\t}\n\t\t\treturn function () {\n\t\t\t\treturn registry[ key ].apply( null, arguments );\n\t\t\t};\n\t\t} );\n\t}\n\n\t/**\n\t * Registers a store instance.\n\t *\n\t * @param {string} name Store registry name.\n\t * @param {Object} store Store instance object (getSelectors, getActions, subscribe).\n\t */\n\tfunction registerStoreInstance( name, store ) {\n\t\tif ( typeof store.getSelectors !== 'function' ) {\n\t\t\tthrow new TypeError( 'store.getSelectors must be a function' );\n\t\t}\n\t\tif ( typeof store.getActions !== 'function' ) {\n\t\t\tthrow new TypeError( 'store.getActions must be a function' );\n\t\t}\n\t\tif ( typeof store.subscribe !== 'function' ) {\n\t\t\tthrow new TypeError( 'store.subscribe must be a function' );\n\t\t}\n\t\t// The emitter is used to keep track of active listeners when the registry\n\t\t// get paused, that way, when resumed we should be able to call all these\n\t\t// pending listeners.\n\t\tstore.emitter = createEmitter();\n\t\tconst currentSubscribe = store.subscribe;\n\t\tstore.subscribe = ( listener ) => {\n\t\t\tconst unsubscribeFromEmitter = store.emitter.subscribe( listener );\n\t\t\tconst unsubscribeFromStore = currentSubscribe( () => {\n\t\t\t\tif ( store.emitter.isPaused ) {\n\t\t\t\t\tstore.emitter.emit();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tlistener();\n\t\t\t} );\n\n\t\t\treturn () => {\n\t\t\t\tunsubscribeFromStore?.();\n\t\t\t\tunsubscribeFromEmitter?.();\n\t\t\t};\n\t\t};\n\t\tstores[ name ] = store;\n\t\tstore.subscribe( globalListener );\n\t}\n\n\t/**\n\t * Registers a new store given a store descriptor.\n\t *\n\t * @param {StoreDescriptor} store Store descriptor.\n\t */\n\tfunction register( store ) {\n\t\tregisterStoreInstance( store.name, store.instantiate( registry ) );\n\t}\n\n\tfunction registerGenericStore( name, store ) {\n\t\tdeprecated( 'wp.data.registerGenericStore', {\n\t\t\tsince: '5.9',\n\t\t\talternative: 'wp.data.register( storeDescriptor )',\n\t\t} );\n\t\tregisterStoreInstance( name, store );\n\t}\n\n\t/**\n\t * Registers a standard `@wordpress/data` store.\n\t *\n\t * @param {string} storeName Unique namespace identifier.\n\t * @param {Object} options Store description (reducer, actions, selectors, resolvers).\n\t *\n\t * @return {Object} Registered store object.\n\t */\n\tfunction registerStore( storeName, options ) {\n\t\tif ( ! options.reducer ) {\n\t\t\tthrow new TypeError( 'Must specify store reducer' );\n\t\t}\n\n\t\tconst store = createReduxStore( storeName, options ).instantiate(\n\t\t\tregistry\n\t\t);\n\t\tregisterStoreInstance( storeName, store );\n\t\treturn store.store;\n\t}\n\n\tfunction batch( callback ) {\n\t\temitter.pause();\n\t\tObject.values( stores ).forEach( ( store ) => store.emitter.pause() );\n\t\tcallback();\n\t\temitter.resume();\n\t\tObject.values( stores ).forEach( ( store ) => store.emitter.resume() );\n\t}\n\n\tlet registry = {\n\t\tbatch,\n\t\tstores,\n\t\tnamespaces: stores, // TODO: Deprecate/remove this.\n\t\tsubscribe,\n\t\tselect,\n\t\tresolveSelect,\n\t\tsuspendSelect,\n\t\tdispatch,\n\t\tuse,\n\t\tregister,\n\t\tregisterGenericStore,\n\t\tregisterStore,\n\t\t__unstableMarkListeningStores,\n\t};\n\n\t//\n\t// TODO:\n\t// This function will be deprecated as soon as it is no longer internally referenced.\n\tfunction use( plugin, options ) {\n\t\tif ( ! plugin ) {\n\t\t\treturn;\n\t\t}\n\n\t\tregistry = {\n\t\t\t...registry,\n\t\t\t...plugin( registry, options ),\n\t\t};\n\n\t\treturn registry;\n\t}\n\n\tregistry.register( coreDataStore );\n\n\tfor ( const [ name, config ] of Object.entries( storeConfigs ) ) {\n\t\tregistry.register( createReduxStore( name, config ) );\n\t}\n\n\tif ( parent ) {\n\t\tparent.subscribe( globalListener );\n\t}\n\n\treturn withPlugins( registry );\n}\n"]}
|
package/build-module/registry.js
CHANGED
|
@@ -61,7 +61,7 @@ export function createRegistry() {
|
|
|
61
61
|
let parent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
62
62
|
const stores = {};
|
|
63
63
|
const emitter = createEmitter();
|
|
64
|
-
|
|
64
|
+
let listeningStores = null;
|
|
65
65
|
/**
|
|
66
66
|
* Global listener called for each store's update.
|
|
67
67
|
*/
|
|
@@ -115,8 +115,10 @@ export function createRegistry() {
|
|
|
115
115
|
|
|
116
116
|
|
|
117
117
|
function select(storeNameOrDescriptor) {
|
|
118
|
+
var _listeningStores;
|
|
119
|
+
|
|
118
120
|
const storeName = getStoreName(storeNameOrDescriptor);
|
|
119
|
-
listeningStores.add(storeName);
|
|
121
|
+
(_listeningStores = listeningStores) === null || _listeningStores === void 0 ? void 0 : _listeningStores.add(storeName);
|
|
120
122
|
const store = stores[storeName];
|
|
121
123
|
|
|
122
124
|
if (store) {
|
|
@@ -127,12 +129,13 @@ export function createRegistry() {
|
|
|
127
129
|
}
|
|
128
130
|
|
|
129
131
|
function __unstableMarkListeningStores(callback, ref) {
|
|
130
|
-
listeningStores
|
|
132
|
+
listeningStores = new Set();
|
|
131
133
|
|
|
132
134
|
try {
|
|
133
135
|
return callback.call(this);
|
|
134
136
|
} finally {
|
|
135
137
|
ref.current = Array.from(listeningStores);
|
|
138
|
+
listeningStores = null;
|
|
136
139
|
}
|
|
137
140
|
}
|
|
138
141
|
/**
|
|
@@ -149,8 +152,10 @@ export function createRegistry() {
|
|
|
149
152
|
|
|
150
153
|
|
|
151
154
|
function resolveSelect(storeNameOrDescriptor) {
|
|
155
|
+
var _listeningStores2;
|
|
156
|
+
|
|
152
157
|
const storeName = getStoreName(storeNameOrDescriptor);
|
|
153
|
-
listeningStores.add(storeName);
|
|
158
|
+
(_listeningStores2 = listeningStores) === null || _listeningStores2 === void 0 ? void 0 : _listeningStores2.add(storeName);
|
|
154
159
|
const store = stores[storeName];
|
|
155
160
|
|
|
156
161
|
if (store) {
|
|
@@ -173,8 +178,10 @@ export function createRegistry() {
|
|
|
173
178
|
|
|
174
179
|
|
|
175
180
|
function suspendSelect(storeNameOrDescriptor) {
|
|
181
|
+
var _listeningStores3;
|
|
182
|
+
|
|
176
183
|
const storeName = getStoreName(storeNameOrDescriptor);
|
|
177
|
-
listeningStores.add(storeName);
|
|
184
|
+
(_listeningStores3 = listeningStores) === null || _listeningStores3 === void 0 ? void 0 : _listeningStores3.add(storeName);
|
|
178
185
|
const store = stores[storeName];
|
|
179
186
|
|
|
180
187
|
if (store) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/data/src/registry.js"],"names":["mapValues","deprecated","createReduxStore","coreDataStore","createEmitter","getStoreName","storeNameOrDescriptor","name","createRegistry","storeConfigs","parent","stores","emitter","listeningStores","Set","globalListener","emit","subscribe","listener","storeName","store","select","add","getSelectors","__unstableMarkListeningStores","callback","ref","clear","call","current","Array","from","resolveSelect","getResolveSelectors","suspendSelect","getSuspendSelectors","dispatch","getActions","withPlugins","attributes","attribute","key","registry","apply","arguments","registerStoreInstance","TypeError","currentSubscribe","unsubscribeFromEmitter","unsubscribeFromStore","isPaused","register","instantiate","registerGenericStore","since","alternative","registerStore","options","reducer","batch","pause","Object","values","forEach","resume","namespaces","use","plugin","config","entries"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,QAA1B;AAEA;AACA;AACA;;AACA,OAAOC,UAAP,MAAuB,uBAAvB;AAEA;AACA;AACA;;AACA,OAAOC,gBAAP,MAA6B,eAA7B;AACA,OAAOC,aAAP,MAA0B,SAA1B;AACA,SAASC,aAAT,QAA8B,iBAA9B;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,SAASC,YAAT,CAAuBC,qBAAvB,EAA+C;AAC9C,SAAO,OAAOA,qBAAP,KAAiC,QAAjC,GACJA,qBADI,GAEJA,qBAAqB,CAACC,IAFzB;AAGA;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,OAAO,SAASC,cAAT,GAA4D;AAAA,MAAnCC,YAAmC,uEAApB,EAAoB;AAAA,MAAhBC,MAAgB,uEAAP,IAAO;AAClE,QAAMC,MAAM,GAAG,EAAf;AACA,QAAMC,OAAO,GAAGR,aAAa,EAA7B;AACA,QAAMS,eAAe,GAAG,IAAIC,GAAJ,EAAxB;AAEA;AACD;AACA;;AACC,WAASC,cAAT,GAA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n */\nimport { mapValues } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport createReduxStore from './redux-store';\nimport coreDataStore from './store';\nimport { createEmitter } from './utils/emitter';\n\n/** @typedef {import('./types').StoreDescriptor} StoreDescriptor */\n\n/**\n * @typedef {Object} WPDataRegistry An isolated orchestrator of store registrations.\n *\n * @property {Function} registerGenericStore Given a namespace key and settings\n * object, registers a new generic\n * store.\n * @property {Function} registerStore Given a namespace key and settings\n * object, registers a new namespace\n * store.\n * @property {Function} subscribe Given a function callback, invokes\n * the callback on any change to state\n * within any registered store.\n * @property {Function} select Given a namespace key, returns an\n * object of the store's registered\n * selectors.\n * @property {Function} dispatch Given a namespace key, returns an\n * object of the store's registered\n * action dispatchers.\n */\n\n/**\n * @typedef {Object} WPDataPlugin An object of registry function overrides.\n *\n * @property {Function} registerStore registers store.\n */\n\nfunction getStoreName( storeNameOrDescriptor ) {\n\treturn typeof storeNameOrDescriptor === 'string'\n\t\t? storeNameOrDescriptor\n\t\t: storeNameOrDescriptor.name;\n}\n/**\n * Creates a new store registry, given an optional object of initial store\n * configurations.\n *\n * @param {Object} storeConfigs Initial store configurations.\n * @param {Object?} parent Parent registry.\n *\n * @return {WPDataRegistry} Data registry.\n */\nexport function createRegistry( storeConfigs = {}, parent = null ) {\n\tconst stores = {};\n\tconst emitter = createEmitter();\n\tconst listeningStores = new Set();\n\n\t/**\n\t * Global listener called for each store's update.\n\t */\n\tfunction globalListener() {\n\t\temitter.emit();\n\t}\n\n\t/**\n\t * Subscribe to changes to any data, either in all stores in registry, or\n\t * in one specific store.\n\t *\n\t * @param {Function} listener Listener function.\n\t * @param {string|StoreDescriptor?} storeNameOrDescriptor Optional store name.\n\t *\n\t * @return {Function} Unsubscribe function.\n\t */\n\tconst subscribe = ( listener, storeNameOrDescriptor ) => {\n\t\t// subscribe to all stores\n\t\tif ( ! storeNameOrDescriptor ) {\n\t\t\treturn emitter.subscribe( listener );\n\t\t}\n\n\t\t// subscribe to one store\n\t\tconst storeName = getStoreName( storeNameOrDescriptor );\n\t\tconst store = stores[ storeName ];\n\t\tif ( store ) {\n\t\t\treturn store.subscribe( listener );\n\t\t}\n\n\t\t// Trying to access a store that hasn't been registered,\n\t\t// this is a pattern rarely used but seen in some places.\n\t\t// We fallback to global `subscribe` here for backward-compatibility for now.\n\t\t// See https://github.com/WordPress/gutenberg/pull/27466 for more info.\n\t\tif ( ! parent ) {\n\t\t\treturn emitter.subscribe( listener );\n\t\t}\n\n\t\treturn parent.subscribe( listener, storeNameOrDescriptor );\n\t};\n\n\t/**\n\t * Calls a selector given the current state and extra arguments.\n\t *\n\t * @param {string|StoreDescriptor} storeNameOrDescriptor Unique namespace identifier for the store\n\t * or the store descriptor.\n\t *\n\t * @return {*} The selector's returned value.\n\t */\n\tfunction select( storeNameOrDescriptor ) {\n\t\tconst storeName = getStoreName( storeNameOrDescriptor );\n\t\tlisteningStores.add( storeName );\n\t\tconst store = stores[ storeName ];\n\t\tif ( store ) {\n\t\t\treturn store.getSelectors();\n\t\t}\n\n\t\treturn parent?.select( storeName );\n\t}\n\n\tfunction __unstableMarkListeningStores( callback, ref ) {\n\t\tlisteningStores.clear();\n\t\ttry {\n\t\t\treturn callback.call( this );\n\t\t} finally {\n\t\t\tref.current = Array.from( listeningStores );\n\t\t}\n\t}\n\n\t/**\n\t * Given a store descriptor, returns an object containing the store's selectors pre-bound to\n\t * state so that you only need to supply additional arguments, and modified so that they return\n\t * promises that resolve to their eventual values, after any resolvers have ran.\n\t *\n\t * @param {StoreDescriptor|string} storeNameOrDescriptor The store descriptor. The legacy calling\n\t * convention of passing the store name is\n\t * also supported.\n\t *\n\t * @return {Object} Each key of the object matches the name of a selector.\n\t */\n\tfunction resolveSelect( storeNameOrDescriptor ) {\n\t\tconst storeName = getStoreName( storeNameOrDescriptor );\n\t\tlisteningStores.add( storeName );\n\t\tconst store = stores[ storeName ];\n\t\tif ( store ) {\n\t\t\treturn store.getResolveSelectors();\n\t\t}\n\n\t\treturn parent && parent.resolveSelect( storeName );\n\t}\n\n\t/**\n\t * Given a store descriptor, returns an object containing the store's selectors pre-bound to\n\t * state so that you only need to supply additional arguments, and modified so that they throw\n\t * promises in case the selector is not resolved yet.\n\t *\n\t * @param {StoreDescriptor|string} storeNameOrDescriptor The store descriptor. The legacy calling\n\t * convention of passing the store name is\n\t * also supported.\n\t *\n\t * @return {Object} Object containing the store's suspense-wrapped selectors.\n\t */\n\tfunction suspendSelect( storeNameOrDescriptor ) {\n\t\tconst storeName = getStoreName( storeNameOrDescriptor );\n\t\tlisteningStores.add( storeName );\n\t\tconst store = stores[ storeName ];\n\t\tif ( store ) {\n\t\t\treturn store.getSuspendSelectors();\n\t\t}\n\n\t\treturn parent && parent.suspendSelect( storeName );\n\t}\n\n\t/**\n\t * Returns the available actions for a part of the state.\n\t *\n\t * @param {string|StoreDescriptor} storeNameOrDescriptor Unique namespace identifier for the store\n\t * or the store descriptor.\n\t *\n\t * @return {*} The action's returned value.\n\t */\n\tfunction dispatch( storeNameOrDescriptor ) {\n\t\tconst storeName = getStoreName( storeNameOrDescriptor );\n\t\tconst store = stores[ storeName ];\n\t\tif ( store ) {\n\t\t\treturn store.getActions();\n\t\t}\n\n\t\treturn parent && parent.dispatch( storeName );\n\t}\n\n\t//\n\t// Deprecated\n\t// TODO: Remove this after `use()` is removed.\n\tfunction withPlugins( attributes ) {\n\t\treturn mapValues( attributes, ( attribute, key ) => {\n\t\t\tif ( typeof attribute !== 'function' ) {\n\t\t\t\treturn attribute;\n\t\t\t}\n\t\t\treturn function () {\n\t\t\t\treturn registry[ key ].apply( null, arguments );\n\t\t\t};\n\t\t} );\n\t}\n\n\t/**\n\t * Registers a store instance.\n\t *\n\t * @param {string} name Store registry name.\n\t * @param {Object} store Store instance object (getSelectors, getActions, subscribe).\n\t */\n\tfunction registerStoreInstance( name, store ) {\n\t\tif ( typeof store.getSelectors !== 'function' ) {\n\t\t\tthrow new TypeError( 'store.getSelectors must be a function' );\n\t\t}\n\t\tif ( typeof store.getActions !== 'function' ) {\n\t\t\tthrow new TypeError( 'store.getActions must be a function' );\n\t\t}\n\t\tif ( typeof store.subscribe !== 'function' ) {\n\t\t\tthrow new TypeError( 'store.subscribe must be a function' );\n\t\t}\n\t\t// The emitter is used to keep track of active listeners when the registry\n\t\t// get paused, that way, when resumed we should be able to call all these\n\t\t// pending listeners.\n\t\tstore.emitter = createEmitter();\n\t\tconst currentSubscribe = store.subscribe;\n\t\tstore.subscribe = ( listener ) => {\n\t\t\tconst unsubscribeFromEmitter = store.emitter.subscribe( listener );\n\t\t\tconst unsubscribeFromStore = currentSubscribe( () => {\n\t\t\t\tif ( store.emitter.isPaused ) {\n\t\t\t\t\tstore.emitter.emit();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tlistener();\n\t\t\t} );\n\n\t\t\treturn () => {\n\t\t\t\tunsubscribeFromStore?.();\n\t\t\t\tunsubscribeFromEmitter?.();\n\t\t\t};\n\t\t};\n\t\tstores[ name ] = store;\n\t\tstore.subscribe( globalListener );\n\t}\n\n\t/**\n\t * Registers a new store given a store descriptor.\n\t *\n\t * @param {StoreDescriptor} store Store descriptor.\n\t */\n\tfunction register( store ) {\n\t\tregisterStoreInstance( store.name, store.instantiate( registry ) );\n\t}\n\n\tfunction registerGenericStore( name, store ) {\n\t\tdeprecated( 'wp.data.registerGenericStore', {\n\t\t\tsince: '5.9',\n\t\t\talternative: 'wp.data.register( storeDescriptor )',\n\t\t} );\n\t\tregisterStoreInstance( name, store );\n\t}\n\n\t/**\n\t * Registers a standard `@wordpress/data` store.\n\t *\n\t * @param {string} storeName Unique namespace identifier.\n\t * @param {Object} options Store description (reducer, actions, selectors, resolvers).\n\t *\n\t * @return {Object} Registered store object.\n\t */\n\tfunction registerStore( storeName, options ) {\n\t\tif ( ! options.reducer ) {\n\t\t\tthrow new TypeError( 'Must specify store reducer' );\n\t\t}\n\n\t\tconst store = createReduxStore( storeName, options ).instantiate(\n\t\t\tregistry\n\t\t);\n\t\tregisterStoreInstance( storeName, store );\n\t\treturn store.store;\n\t}\n\n\tfunction batch( callback ) {\n\t\temitter.pause();\n\t\tObject.values( stores ).forEach( ( store ) => store.emitter.pause() );\n\t\tcallback();\n\t\temitter.resume();\n\t\tObject.values( stores ).forEach( ( store ) => store.emitter.resume() );\n\t}\n\n\tlet registry = {\n\t\tbatch,\n\t\tstores,\n\t\tnamespaces: stores, // TODO: Deprecate/remove this.\n\t\tsubscribe,\n\t\tselect,\n\t\tresolveSelect,\n\t\tsuspendSelect,\n\t\tdispatch,\n\t\tuse,\n\t\tregister,\n\t\tregisterGenericStore,\n\t\tregisterStore,\n\t\t__unstableMarkListeningStores,\n\t};\n\n\t//\n\t// TODO:\n\t// This function will be deprecated as soon as it is no longer internally referenced.\n\tfunction use( plugin, options ) {\n\t\tif ( ! plugin ) {\n\t\t\treturn;\n\t\t}\n\n\t\tregistry = {\n\t\t\t...registry,\n\t\t\t...plugin( registry, options ),\n\t\t};\n\n\t\treturn registry;\n\t}\n\n\tregistry.register( coreDataStore );\n\n\tfor ( const [ name, config ] of Object.entries( storeConfigs ) ) {\n\t\tregistry.register( createReduxStore( name, config ) );\n\t}\n\n\tif ( parent ) {\n\t\tparent.subscribe( globalListener );\n\t}\n\n\treturn withPlugins( registry );\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["@wordpress/data/src/registry.js"],"names":["mapValues","deprecated","createReduxStore","coreDataStore","createEmitter","getStoreName","storeNameOrDescriptor","name","createRegistry","storeConfigs","parent","stores","emitter","listeningStores","globalListener","emit","subscribe","listener","storeName","store","select","add","getSelectors","__unstableMarkListeningStores","callback","ref","Set","call","current","Array","from","resolveSelect","getResolveSelectors","suspendSelect","getSuspendSelectors","dispatch","getActions","withPlugins","attributes","attribute","key","registry","apply","arguments","registerStoreInstance","TypeError","currentSubscribe","unsubscribeFromEmitter","unsubscribeFromStore","isPaused","register","instantiate","registerGenericStore","since","alternative","registerStore","options","reducer","batch","pause","Object","values","forEach","resume","namespaces","use","plugin","config","entries"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,QAA1B;AAEA;AACA;AACA;;AACA,OAAOC,UAAP,MAAuB,uBAAvB;AAEA;AACA;AACA;;AACA,OAAOC,gBAAP,MAA6B,eAA7B;AACA,OAAOC,aAAP,MAA0B,SAA1B;AACA,SAASC,aAAT,QAA8B,iBAA9B;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,SAASC,YAAT,CAAuBC,qBAAvB,EAA+C;AAC9C,SAAO,OAAOA,qBAAP,KAAiC,QAAjC,GACJA,qBADI,GAEJA,qBAAqB,CAACC,IAFzB;AAGA;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,OAAO,SAASC,cAAT,GAA4D;AAAA,MAAnCC,YAAmC,uEAApB,EAAoB;AAAA,MAAhBC,MAAgB,uEAAP,IAAO;AAClE,QAAMC,MAAM,GAAG,EAAf;AACA,QAAMC,OAAO,GAAGR,aAAa,EAA7B;AACA,MAAIS,eAAe,GAAG,IAAtB;AAEA;AACD;AACA;;AACC,WAASC,cAAT,GAA0B;AACzBF,IAAAA,OAAO,CAACG,IAAR;AACA;AAED;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACC,QAAMC,SAAS,GAAG,CAAEC,QAAF,EAAYX,qBAAZ,KAAuC;AACxD;AACA,QAAK,CAAEA,qBAAP,EAA+B;AAC9B,aAAOM,OAAO,CAACI,SAAR,CAAmBC,QAAnB,CAAP;AACA,KAJuD,CAMxD;;;AACA,UAAMC,SAAS,GAAGb,YAAY,CAAEC,qBAAF,CAA9B;AACA,UAAMa,KAAK,GAAGR,MAAM,CAAEO,SAAF,CAApB;;AACA,QAAKC,KAAL,EAAa;AACZ,aAAOA,KAAK,CAACH,SAAN,CAA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dqD,IAAAA,UAAU,EAAErD,MAHE;AAGM;AACpBK,IAAAA,SAJc;AAKdI,IAAAA,MALc;AAMdW,IAAAA,aANc;AAOdE,IAAAA,aAPc;AAQdE,IAAAA,QARc;AASd8B,IAAAA,GATc;AAUdf,IAAAA,QAVc;AAWdE,IAAAA,oBAXc;AAYdG,IAAAA,aAZc;AAadhC,IAAAA;AAbc,GAAf,CA3OkE,CA2PlE;AACA;AACA;;AACA,WAAS0C,GAAT,CAAcC,MAAd,EAAsBV,OAAtB,EAAgC;AAC/B,QAAK,CAAEU,MAAP,EAAgB;AACf;AACA;;AAEDzB,IAAAA,QAAQ,GAAG,EACV,GAAGA,QADO;AAEV,SAAGyB,MAAM,CAAEzB,QAAF,EAAYe,OAAZ;AAFC,KAAX;AAKA,WAAOf,QAAP;AACA;;AAEDA,EAAAA,QAAQ,CAACS,QAAT,CAAmB/C,aAAnB;;AAEA,OAAM,MAAM,CAAEI,IAAF,EAAQ4D,MAAR,CAAZ,IAAgCP,MAAM,CAACQ,OAAP,CAAgB3D,YAAhB,CAAhC,EAAiE;AAChEgC,IAAAA,QAAQ,CAACS,QAAT,CAAmBhD,gBAAgB,CAAEK,IAAF,EAAQ4D,MAAR,CAAnC;AACA;;AAED,MAAKzD,MAAL,EAAc;AACbA,IAAAA,MAAM,CAACM,SAAP,CAAkBF,cAAlB;AACA;;AAED,SAAOuB,WAAW,CAAEI,QAAF,CAAlB;AACA","sourcesContent":["/**\n * External dependencies\n */\nimport { mapValues } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport createReduxStore from './redux-store';\nimport coreDataStore from './store';\nimport { createEmitter } from './utils/emitter';\n\n/** @typedef {import('./types').StoreDescriptor} StoreDescriptor */\n\n/**\n * @typedef {Object} WPDataRegistry An isolated orchestrator of store registrations.\n *\n * @property {Function} registerGenericStore Given a namespace key and settings\n * object, registers a new generic\n * store.\n * @property {Function} registerStore Given a namespace key and settings\n * object, registers a new namespace\n * store.\n * @property {Function} subscribe Given a function callback, invokes\n * the callback on any change to state\n * within any registered store.\n * @property {Function} select Given a namespace key, returns an\n * object of the store's registered\n * selectors.\n * @property {Function} dispatch Given a namespace key, returns an\n * object of the store's registered\n * action dispatchers.\n */\n\n/**\n * @typedef {Object} WPDataPlugin An object of registry function overrides.\n *\n * @property {Function} registerStore registers store.\n */\n\nfunction getStoreName( storeNameOrDescriptor ) {\n\treturn typeof storeNameOrDescriptor === 'string'\n\t\t? storeNameOrDescriptor\n\t\t: storeNameOrDescriptor.name;\n}\n/**\n * Creates a new store registry, given an optional object of initial store\n * configurations.\n *\n * @param {Object} storeConfigs Initial store configurations.\n * @param {Object?} parent Parent registry.\n *\n * @return {WPDataRegistry} Data registry.\n */\nexport function createRegistry( storeConfigs = {}, parent = null ) {\n\tconst stores = {};\n\tconst emitter = createEmitter();\n\tlet listeningStores = null;\n\n\t/**\n\t * Global listener called for each store's update.\n\t */\n\tfunction globalListener() {\n\t\temitter.emit();\n\t}\n\n\t/**\n\t * Subscribe to changes to any data, either in all stores in registry, or\n\t * in one specific store.\n\t *\n\t * @param {Function} listener Listener function.\n\t * @param {string|StoreDescriptor?} storeNameOrDescriptor Optional store name.\n\t *\n\t * @return {Function} Unsubscribe function.\n\t */\n\tconst subscribe = ( listener, storeNameOrDescriptor ) => {\n\t\t// subscribe to all stores\n\t\tif ( ! storeNameOrDescriptor ) {\n\t\t\treturn emitter.subscribe( listener );\n\t\t}\n\n\t\t// subscribe to one store\n\t\tconst storeName = getStoreName( storeNameOrDescriptor );\n\t\tconst store = stores[ storeName ];\n\t\tif ( store ) {\n\t\t\treturn store.subscribe( listener );\n\t\t}\n\n\t\t// Trying to access a store that hasn't been registered,\n\t\t// this is a pattern rarely used but seen in some places.\n\t\t// We fallback to global `subscribe` here for backward-compatibility for now.\n\t\t// See https://github.com/WordPress/gutenberg/pull/27466 for more info.\n\t\tif ( ! parent ) {\n\t\t\treturn emitter.subscribe( listener );\n\t\t}\n\n\t\treturn parent.subscribe( listener, storeNameOrDescriptor );\n\t};\n\n\t/**\n\t * Calls a selector given the current state and extra arguments.\n\t *\n\t * @param {string|StoreDescriptor} storeNameOrDescriptor Unique namespace identifier for the store\n\t * or the store descriptor.\n\t *\n\t * @return {*} The selector's returned value.\n\t */\n\tfunction select( storeNameOrDescriptor ) {\n\t\tconst storeName = getStoreName( storeNameOrDescriptor );\n\t\tlisteningStores?.add( storeName );\n\t\tconst store = stores[ storeName ];\n\t\tif ( store ) {\n\t\t\treturn store.getSelectors();\n\t\t}\n\n\t\treturn parent?.select( storeName );\n\t}\n\n\tfunction __unstableMarkListeningStores( callback, ref ) {\n\t\tlisteningStores = new Set();\n\t\ttry {\n\t\t\treturn callback.call( this );\n\t\t} finally {\n\t\t\tref.current = Array.from( listeningStores );\n\t\t\tlisteningStores = null;\n\t\t}\n\t}\n\n\t/**\n\t * Given a store descriptor, returns an object containing the store's selectors pre-bound to\n\t * state so that you only need to supply additional arguments, and modified so that they return\n\t * promises that resolve to their eventual values, after any resolvers have ran.\n\t *\n\t * @param {StoreDescriptor|string} storeNameOrDescriptor The store descriptor. The legacy calling\n\t * convention of passing the store name is\n\t * also supported.\n\t *\n\t * @return {Object} Each key of the object matches the name of a selector.\n\t */\n\tfunction resolveSelect( storeNameOrDescriptor ) {\n\t\tconst storeName = getStoreName( storeNameOrDescriptor );\n\t\tlisteningStores?.add( storeName );\n\t\tconst store = stores[ storeName ];\n\t\tif ( store ) {\n\t\t\treturn store.getResolveSelectors();\n\t\t}\n\n\t\treturn parent && parent.resolveSelect( storeName );\n\t}\n\n\t/**\n\t * Given a store descriptor, returns an object containing the store's selectors pre-bound to\n\t * state so that you only need to supply additional arguments, and modified so that they throw\n\t * promises in case the selector is not resolved yet.\n\t *\n\t * @param {StoreDescriptor|string} storeNameOrDescriptor The store descriptor. The legacy calling\n\t * convention of passing the store name is\n\t * also supported.\n\t *\n\t * @return {Object} Object containing the store's suspense-wrapped selectors.\n\t */\n\tfunction suspendSelect( storeNameOrDescriptor ) {\n\t\tconst storeName = getStoreName( storeNameOrDescriptor );\n\t\tlisteningStores?.add( storeName );\n\t\tconst store = stores[ storeName ];\n\t\tif ( store ) {\n\t\t\treturn store.getSuspendSelectors();\n\t\t}\n\n\t\treturn parent && parent.suspendSelect( storeName );\n\t}\n\n\t/**\n\t * Returns the available actions for a part of the state.\n\t *\n\t * @param {string|StoreDescriptor} storeNameOrDescriptor Unique namespace identifier for the store\n\t * or the store descriptor.\n\t *\n\t * @return {*} The action's returned value.\n\t */\n\tfunction dispatch( storeNameOrDescriptor ) {\n\t\tconst storeName = getStoreName( storeNameOrDescriptor );\n\t\tconst store = stores[ storeName ];\n\t\tif ( store ) {\n\t\t\treturn store.getActions();\n\t\t}\n\n\t\treturn parent && parent.dispatch( storeName );\n\t}\n\n\t//\n\t// Deprecated\n\t// TODO: Remove this after `use()` is removed.\n\tfunction withPlugins( attributes ) {\n\t\treturn mapValues( attributes, ( attribute, key ) => {\n\t\t\tif ( typeof attribute !== 'function' ) {\n\t\t\t\treturn attribute;\n\t\t\t}\n\t\t\treturn function () {\n\t\t\t\treturn registry[ key ].apply( null, arguments );\n\t\t\t};\n\t\t} );\n\t}\n\n\t/**\n\t * Registers a store instance.\n\t *\n\t * @param {string} name Store registry name.\n\t * @param {Object} store Store instance object (getSelectors, getActions, subscribe).\n\t */\n\tfunction registerStoreInstance( name, store ) {\n\t\tif ( typeof store.getSelectors !== 'function' ) {\n\t\t\tthrow new TypeError( 'store.getSelectors must be a function' );\n\t\t}\n\t\tif ( typeof store.getActions !== 'function' ) {\n\t\t\tthrow new TypeError( 'store.getActions must be a function' );\n\t\t}\n\t\tif ( typeof store.subscribe !== 'function' ) {\n\t\t\tthrow new TypeError( 'store.subscribe must be a function' );\n\t\t}\n\t\t// The emitter is used to keep track of active listeners when the registry\n\t\t// get paused, that way, when resumed we should be able to call all these\n\t\t// pending listeners.\n\t\tstore.emitter = createEmitter();\n\t\tconst currentSubscribe = store.subscribe;\n\t\tstore.subscribe = ( listener ) => {\n\t\t\tconst unsubscribeFromEmitter = store.emitter.subscribe( listener );\n\t\t\tconst unsubscribeFromStore = currentSubscribe( () => {\n\t\t\t\tif ( store.emitter.isPaused ) {\n\t\t\t\t\tstore.emitter.emit();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tlistener();\n\t\t\t} );\n\n\t\t\treturn () => {\n\t\t\t\tunsubscribeFromStore?.();\n\t\t\t\tunsubscribeFromEmitter?.();\n\t\t\t};\n\t\t};\n\t\tstores[ name ] = store;\n\t\tstore.subscribe( globalListener );\n\t}\n\n\t/**\n\t * Registers a new store given a store descriptor.\n\t *\n\t * @param {StoreDescriptor} store Store descriptor.\n\t */\n\tfunction register( store ) {\n\t\tregisterStoreInstance( store.name, store.instantiate( registry ) );\n\t}\n\n\tfunction registerGenericStore( name, store ) {\n\t\tdeprecated( 'wp.data.registerGenericStore', {\n\t\t\tsince: '5.9',\n\t\t\talternative: 'wp.data.register( storeDescriptor )',\n\t\t} );\n\t\tregisterStoreInstance( name, store );\n\t}\n\n\t/**\n\t * Registers a standard `@wordpress/data` store.\n\t *\n\t * @param {string} storeName Unique namespace identifier.\n\t * @param {Object} options Store description (reducer, actions, selectors, resolvers).\n\t *\n\t * @return {Object} Registered store object.\n\t */\n\tfunction registerStore( storeName, options ) {\n\t\tif ( ! options.reducer ) {\n\t\t\tthrow new TypeError( 'Must specify store reducer' );\n\t\t}\n\n\t\tconst store = createReduxStore( storeName, options ).instantiate(\n\t\t\tregistry\n\t\t);\n\t\tregisterStoreInstance( storeName, store );\n\t\treturn store.store;\n\t}\n\n\tfunction batch( callback ) {\n\t\temitter.pause();\n\t\tObject.values( stores ).forEach( ( store ) => store.emitter.pause() );\n\t\tcallback();\n\t\temitter.resume();\n\t\tObject.values( stores ).forEach( ( store ) => store.emitter.resume() );\n\t}\n\n\tlet registry = {\n\t\tbatch,\n\t\tstores,\n\t\tnamespaces: stores, // TODO: Deprecate/remove this.\n\t\tsubscribe,\n\t\tselect,\n\t\tresolveSelect,\n\t\tsuspendSelect,\n\t\tdispatch,\n\t\tuse,\n\t\tregister,\n\t\tregisterGenericStore,\n\t\tregisterStore,\n\t\t__unstableMarkListeningStores,\n\t};\n\n\t//\n\t// TODO:\n\t// This function will be deprecated as soon as it is no longer internally referenced.\n\tfunction use( plugin, options ) {\n\t\tif ( ! plugin ) {\n\t\t\treturn;\n\t\t}\n\n\t\tregistry = {\n\t\t\t...registry,\n\t\t\t...plugin( registry, options ),\n\t\t};\n\n\t\treturn registry;\n\t}\n\n\tregistry.register( coreDataStore );\n\n\tfor ( const [ name, config ] of Object.entries( storeConfigs ) ) {\n\t\tregistry.register( createReduxStore( name, config ) );\n\t}\n\n\tif ( parent ) {\n\t\tparent.subscribe( globalListener );\n\t}\n\n\treturn withPlugins( registry );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.js"],"names":[],"mappings":"AAkDA;;;;;;;;GAQG;AACH,8CALW,MAAM,WACN,MAAM,UAEL,cAAc,
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.js"],"names":[],"mappings":"AAkDA;;;;;;;;GAQG;AACH,8CALW,MAAM,WACN,MAAM,UAEL,cAAc,CAwRzB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/data",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.1.0",
|
|
4
4
|
"description": "Data module for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
"sideEffects": false,
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@babel/runtime": "^7.16.0",
|
|
32
|
-
"@wordpress/compose": "^6.
|
|
33
|
-
"@wordpress/deprecated": "^3.
|
|
34
|
-
"@wordpress/element": "^5.
|
|
35
|
-
"@wordpress/is-shallow-equal": "^4.
|
|
36
|
-
"@wordpress/priority-queue": "^2.
|
|
37
|
-
"@wordpress/redux-routine": "^4.
|
|
32
|
+
"@wordpress/compose": "^6.1.0",
|
|
33
|
+
"@wordpress/deprecated": "^3.24.0",
|
|
34
|
+
"@wordpress/element": "^5.1.0",
|
|
35
|
+
"@wordpress/is-shallow-equal": "^4.24.0",
|
|
36
|
+
"@wordpress/priority-queue": "^2.24.0",
|
|
37
|
+
"@wordpress/redux-routine": "^4.24.0",
|
|
38
38
|
"equivalent-key-map": "^0.2.2",
|
|
39
39
|
"is-plain-object": "^5.0.0",
|
|
40
40
|
"is-promise": "^4.0.0",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"publishConfig": {
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "200bee7b06b15f6fa655e25b6ab69cbd6b49a357"
|
|
53
53
|
}
|
|
@@ -1146,4 +1146,38 @@ describe( 'useSelect', () => {
|
|
|
1146
1146
|
expect( screen.getByRole( 'status' ) ).toHaveTextContent( '10' );
|
|
1147
1147
|
} );
|
|
1148
1148
|
} );
|
|
1149
|
+
|
|
1150
|
+
describe( 'static store selection mode', () => {
|
|
1151
|
+
it( 'can read the current value from store', () => {
|
|
1152
|
+
registry.registerStore( 'testStore', {
|
|
1153
|
+
reducer: ( s = 0, a ) => ( a.type === 'INC' ? s + 1 : s ),
|
|
1154
|
+
actions: { inc: () => ( { type: 'INC' } ) },
|
|
1155
|
+
selectors: { get: ( s ) => s },
|
|
1156
|
+
} );
|
|
1157
|
+
|
|
1158
|
+
const record = jest.fn();
|
|
1159
|
+
|
|
1160
|
+
function TestComponent() {
|
|
1161
|
+
const { get } = useSelect( 'testStore' );
|
|
1162
|
+
return (
|
|
1163
|
+
<button onClick={ () => record( get() ) }>record</button>
|
|
1164
|
+
);
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
render(
|
|
1168
|
+
<RegistryProvider value={ registry }>
|
|
1169
|
+
<TestComponent />
|
|
1170
|
+
</RegistryProvider>
|
|
1171
|
+
);
|
|
1172
|
+
|
|
1173
|
+
fireEvent.click( screen.getByRole( 'button' ) );
|
|
1174
|
+
expect( record ).toHaveBeenLastCalledWith( 0 );
|
|
1175
|
+
|
|
1176
|
+
// no need to act() as the component doesn't react to the updates
|
|
1177
|
+
registry.dispatch( 'testStore' ).inc();
|
|
1178
|
+
|
|
1179
|
+
fireEvent.click( screen.getByRole( 'button' ) );
|
|
1180
|
+
expect( record ).toHaveBeenLastCalledWith( 1 );
|
|
1181
|
+
} );
|
|
1182
|
+
} );
|
|
1149
1183
|
} );
|
|
@@ -139,10 +139,11 @@ describe( 'useSuspenseSelect', () => {
|
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
render() {
|
|
142
|
+
const { children } = this.props;
|
|
142
143
|
if ( this.state.error ) {
|
|
143
144
|
return <div aria-label="error">{ this.state.error }</div>;
|
|
144
145
|
}
|
|
145
|
-
return
|
|
146
|
+
return children;
|
|
146
147
|
}
|
|
147
148
|
}
|
|
148
149
|
|
package/src/registry.js
CHANGED
|
@@ -60,7 +60,7 @@ function getStoreName( storeNameOrDescriptor ) {
|
|
|
60
60
|
export function createRegistry( storeConfigs = {}, parent = null ) {
|
|
61
61
|
const stores = {};
|
|
62
62
|
const emitter = createEmitter();
|
|
63
|
-
|
|
63
|
+
let listeningStores = null;
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
66
|
* Global listener called for each store's update.
|
|
@@ -112,7 +112,7 @@ export function createRegistry( storeConfigs = {}, parent = null ) {
|
|
|
112
112
|
*/
|
|
113
113
|
function select( storeNameOrDescriptor ) {
|
|
114
114
|
const storeName = getStoreName( storeNameOrDescriptor );
|
|
115
|
-
listeningStores
|
|
115
|
+
listeningStores?.add( storeName );
|
|
116
116
|
const store = stores[ storeName ];
|
|
117
117
|
if ( store ) {
|
|
118
118
|
return store.getSelectors();
|
|
@@ -122,11 +122,12 @@ export function createRegistry( storeConfigs = {}, parent = null ) {
|
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
function __unstableMarkListeningStores( callback, ref ) {
|
|
125
|
-
listeningStores
|
|
125
|
+
listeningStores = new Set();
|
|
126
126
|
try {
|
|
127
127
|
return callback.call( this );
|
|
128
128
|
} finally {
|
|
129
129
|
ref.current = Array.from( listeningStores );
|
|
130
|
+
listeningStores = null;
|
|
130
131
|
}
|
|
131
132
|
}
|
|
132
133
|
|
|
@@ -143,7 +144,7 @@ export function createRegistry( storeConfigs = {}, parent = null ) {
|
|
|
143
144
|
*/
|
|
144
145
|
function resolveSelect( storeNameOrDescriptor ) {
|
|
145
146
|
const storeName = getStoreName( storeNameOrDescriptor );
|
|
146
|
-
listeningStores
|
|
147
|
+
listeningStores?.add( storeName );
|
|
147
148
|
const store = stores[ storeName ];
|
|
148
149
|
if ( store ) {
|
|
149
150
|
return store.getResolveSelectors();
|
|
@@ -165,7 +166,7 @@ export function createRegistry( storeConfigs = {}, parent = null ) {
|
|
|
165
166
|
*/
|
|
166
167
|
function suspendSelect( storeNameOrDescriptor ) {
|
|
167
168
|
const storeName = getStoreName( storeNameOrDescriptor );
|
|
168
|
-
listeningStores
|
|
169
|
+
listeningStores?.add( storeName );
|
|
169
170
|
const store = stores[ storeName ];
|
|
170
171
|
if ( store ) {
|
|
171
172
|
return store.getSuspendSelectors();
|
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","./src/factory.js","../../node_modules/redux/index.d.ts","./src/types.ts","./src/controls.js","../../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/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","../redux-routine/build-types/index.d.ts","../../node_modules/@types/react/global.d.ts","../../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","../compose/build-types/utils/create-higher-order-component/index.d.ts","../compose/build-types/utils/debounce/index.d.ts","../compose/build-types/utils/throttle/index.d.ts","../compose/build-types/higher-order/compose.d.ts","../compose/build-types/higher-order/pipe.d.ts","../compose/build-types/higher-order/if-condition/index.d.ts","../compose/build-types/higher-order/pure/index.d.ts","../compose/build-types/higher-order/with-global-events/index.d.ts","../compose/build-types/higher-order/with-instance-id/index.d.ts","../compose/build-types/higher-order/with-safe-timeout/index.d.ts","../compose/build-types/higher-order/with-state/index.d.ts","../compose/build-types/hooks/use-constrained-tabbing/index.d.ts","../compose/build-types/hooks/use-copy-on-click/index.d.ts","../compose/build-types/hooks/use-copy-to-clipboard/index.d.ts","../compose/build-types/hooks/use-focus-on-mount/index.d.ts","../compose/build-types/hooks/use-focus-outside/index.d.ts","../compose/build-types/hooks/use-dialog/index.d.ts","../compose/build-types/hooks/use-disabled/index.d.ts","../compose/build-types/hooks/use-dragging/index.d.ts","../compose/build-types/hooks/use-focus-return/index.d.ts","../compose/build-types/hooks/use-instance-id/index.d.ts","../element/node_modules/@types/react/index.d.ts","../element/build-types/react.d.ts","../compose/build-types/hooks/use-isomorphic-layout-effect/index.d.ts","../../node_modules/@types/mousetrap/index.d.ts","../compose/build-types/hooks/use-keyboard-shortcut/index.d.ts","../compose/build-types/hooks/use-media-query/index.d.ts","../compose/build-types/hooks/use-previous/index.d.ts","../compose/build-types/hooks/use-reduced-motion/index.d.ts","../compose/build-types/hooks/use-viewport-match/index.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","../compose/build-types/hooks/use-resize-observer/index.d.ts","../compose/build-types/hooks/use-async-list/index.d.ts","../compose/build-types/hooks/use-warn-on-change/index.d.ts","../compose/build-types/hooks/use-debounce/index.d.ts","../compose/build-types/hooks/use-throttle/index.d.ts","../compose/build-types/hooks/use-merge-refs/index.d.ts","../compose/build-types/hooks/use-ref-effect/index.d.ts","../compose/build-types/hooks/use-drop-zone/index.d.ts","../compose/build-types/hooks/use-focusable-iframe/index.d.ts","../compose/build-types/hooks/use-fixed-window-list/index.d.ts","../compose/build-types/index.d.ts","../../node_modules/is-promise/index.d.ts","./src/promise-middleware.js","./src/store/index.js","./src/resolvers-cache-middleware.js","./src/redux-store/thunk-middleware.js","./src/redux-store/metadata/utils.ts","./src/redux-store/metadata/actions.js","./src/redux-store/metadata/reducer.ts","./src/redux-store/metadata/selectors.js","./src/redux-store/index.js","./src/utils/emitter.js","./src/registry.js","./src/default-registry.js","../../node_modules/is-plain-object/is-plain-object.d.ts","./src/plugins/persistence/storage/object.js","./src/plugins/persistence/storage/default.js","./src/plugins/persistence/index.js","./src/plugins/index.js","../../node_modules/use-memo-one/index.d.ts","../priority-queue/build-types/index.d.ts","../is-shallow-equal/build-types/objects.d.ts","../is-shallow-equal/build-types/arrays.d.ts","../is-shallow-equal/build-types/index.d.ts","./src/components/registry-provider/context.js","./src/components/registry-provider/use-registry.js","./src/components/async-mode-provider/context.js","./src/components/async-mode-provider/use-async-mode.js","./src/components/use-select/index.js","./src/components/with-select/index.js","./src/components/use-dispatch/use-dispatch.js","./src/components/use-dispatch/use-dispatch-with-map.js","./src/components/use-dispatch/index.js","./src/components/with-dispatch/index.js","./src/components/registry-provider/index.js","./src/components/with-registry/index.js","./src/components/async-mode-provider/index.js","./src/index.js","./src/redux-store/metadata/equivalent-key-map.d.ts","../element/node_modules/@types/react/global.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},"ce6e5b88acf57d96365aa4d49fd43480c803ecb7868830749df564789774a54c",{"version":"8f19251323456195ec9236df857bac3b8f97b73b540ef06ead2ceccc3884954f","affectsGlobalScope":true},"261c2575b44e049726cf1fbd6cf43b309581aee3e2c6dfff2c696cba50b083b5","e382a7658f76f31d91f33c404b9526eeee7938eb4aee831feb51a3ba0e40a321","675e702f2032766a91eeadee64f51014c64688525da99dccd8178f0c599f13a8","438284c7c455a29b9c0e2d1e72abc62ee93d9a163029ffe918a34c5db3b92da2","0c75b204aed9cf6ff1c7b4bed87a3ece0d9d6fc857a6350c0c95ed0c38c814e8","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","c24ad9be9adf28f0927e3d9d9e9cec1c677022356f241ccbbfb97bfe8fb3d1a1","0ec0998e2d085e8ea54266f547976ae152c9dd6cdb9ac4d8a520a230f5ebae84","9364c7566b0be2f7b70ff5285eb34686f83ccb01bda529b82d23b2a844653bfb","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","82251920b05f30981c9a4109cb5f3169dce4b477effc845c6d781044a30e7672","3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd","3e59f00ab03c33717b3130066d4debb272da90eeded4935ff0604c2bc25a5cae","9fa6b83a35e897f340858995ca5d77e901d89fd18644cd4c9e8a4afe0b2e6363",{"version":"0714e2046df66c0e93c3330d30dbc0565b3e8cd3ee302cf99e4ede6220e5fec8","affectsGlobalScope":true},"bd0d80db12ef1aceefc4f9d3eb88517b9634fa747ae8475981da8655292feab8","55e68fb1618e3f55f7866b8c8415152159309a14b716370081ab0b7af96d876e","bf0491af2455f92282b61807be2be6e7ad7d532e47fac7b698019d3617c28ff7","5d874fb879ab8601c02549817dceb2d0a30729cb7e161625dd6f819bbff1ec0b","ee551a880882770c4f56a0964a9767c9feafe497a5be52652527d098c88d85cb","b192606574769a5566620f9bf19358a3994bc2726ecdeaad9c66f3333b2687c8","29041ec2b56677a9adf3bcfa21bf513d29faacfea6964a0734a5e0a12982ac8c",{"version":"bbdf156fea2fabed31a569445835aeedcc33643d404fcbaa54541f06c109df3f","affectsGlobalScope":true},"381899b8d1d4c1be716f18cb5242ba39f66f4b1e31d45af62a32a99f8edcb39d","f7b46d22a307739c145e5fddf537818038fdfffd580d79ed717f4d4d37249380","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"5917af4ff931b050dba49a1dedd9c00f15f7b3dc4345ad8491bfacd2ec68ed32","affectsGlobalScope":true},"c8b8656890f0c3cbcbfa35247885999be08c3e6391d04c6970e6edbd113c0359","bf1c5b444373d2d9eb03cedc6a9b6eca7c3667585596a5af3a44092c190dec0f","511e4d83de1ad331844ad7d94709b33046c464c867aa8b7d849e97205a61a948","a0cf70217b68c414db6c4863831250c8a2d96469c8044b75edd3a460793c9887","8d7c0f64cebcc3690112c28a4861bd9385836b47e9d1c171e6362100b3cc32a8","04ada34f81611d5344e26d98a6817bb0fc34c7bf7370b5c8ec9b562c56161ae9","8b495154f6d961654e7d0f4ba35bd115160d6d6bfce3dc9c3d122f0948402e9f","f9523fca1617fd31e048afd09f08cca592a7bbaeca4d5ff1e1781ab0cd2ffe9b","471a29292fd062298595f697fedc5e8c7ab42539770da59a3c76592330cf3c14","997b40fb1aeb304b6d3bc9021361bd6c5a1ed3b1e1a1459533a9c854db4ac715","23d7a8b5d3297675007160f5cc75777e6eccf63ff6650bd3ed01eb0b3cdf2a38","8db59d5540f8bc033f35eb1a4a7903d202fbace0874b456e463af2675da2398b","c5a28d3d50c8edecc8cc87ae3a5dcfa34e630f970626bf30c552e681c7055fd0","5f8402dfce577684c2de40394f60628ffe6e44e6bc308dbeb1b643c527d758bf","daa0b5b58eab0c3dfc200cde4cc933084b908ede3aacdda1d2797f98c172142b","7d87403765aa7f53bf7b10ac89499008f0c98086a450cd9859f5b03ce9bd2996","96785f84f3baedac10ed5a27b39023f0ee1540917b4f255eb5504d4d3c25cfe9","4807581687ad8a41a480f2f55a93eed33881d2c3a4bbcba14cd77fddd6c32f8c","afa8dec86e0e11ff50a234b685b18674af64cda1e3671908559949301080bff0","f08d251cb25341aedf5edbfa1317f59f93ddb133de124a31962f656ab4f6ebd9","c0ac0d5a66d62f30b200514957ad91050a4f13b38f1c023422d76c2ea20d3813",{"version":"5917af4ff931b050dba49a1dedd9c00f15f7b3dc4345ad8491bfacd2ec68ed32","affectsGlobalScope":true},"e59d00012fb20e6746def2f4bc94650526aa6c574c49ad6a50a992f61a3ee675","2cc143754ed238f214e763525cd4c11613409a643fdd602f4e0a2b19f1f2d397","96520a873073a2f39f922d0a422498cdcc28be9066a769000cdd07ecaba7b645","c7284023c5462180e492357aeb94551a20aa41eac8ac517606f3766359d08bb9","ed4ec3d435678a5703a016a801afc2cd7b543c53ab4615b3e214cac9c30f560a","e1e870a8a409e1eb530b841c9fa03165041518270de8eb37d8cf00c64a53b864","501be290436f06ae2182915329b01cfd0850961814802237b5c24749fd2afa0c","cc34c3c1590513cdb6374890f421c06ad969cfd99b28efb6003a6afc845c49f8","e47b8ec56eb49bc1c53c9012daa9874de14ad0c5da442485aec333571c74b526","e4dd91dd4789a109aab51d8a0569a282369fcda9ba6f2b2297bc61bacfb1a042","5d7018910750d9cb4a912577ad2951fc3fad83c30d637689b69ffc6bbb0c9f5a","d2d9e98a2b167079474768593e1e7125fc3db055add8fbdb5977e3d05a8a3696","6462da67490105ba7d98cf312c2faf8794c425781128b161ea8394d66502eec8","62359da52b6c8d00c50c2e50738fac82e902f916fdf458d8159e7edb1c60c3a8","1e0ac21bc775686383ea8c8e48bd98b385e6195b25c85525a7affd08a2cd38b9","0449615e1ed03c7d54fc435a63b7ef0cb4e5cea5ac40c9a63280a46f7eeae0ff",{"version":"b5b080e499df18235bac525ce43da935d1a068c5770f58b245d24b6ae8baa166","affectsGlobalScope":true},"b935d4ca97dc9aa05c92aaa51ab5cf2ada5b9722e84ea3af8dc5f93fea3cd361","f295ab6b1bfd2b6b5b19ba621cca18c1b94b25c430c67fcb66c9594e89e3ff39","ea6c58f9711f6dc2f5609e085a1751d1284f1097b568852863bc24becf970831","f59327cd1c98362028d2d2b034b9bada17481ef7f12f13b046bc047ab4fc343c","d759d5a895085d1cfc89d1d1791c188c8170d933092db93e2b48676c49ee7310","2d1b4aec91b432ab2fe2b22f376a34dbc9d9b4b34acbd552f9cd0d3d98bcfca2","0b1d7ac8c1abd81feb21f2bc5d9539610dfa03c2874652cb9c6f4859731edd00","2c8e1d8fe99738fe377049c1baa8b074ac11bdbfad103881c6f012a09383e361","5fac858cb922fe34b898ddc12db441c878ec72bf6a1e3bcbe297f4da4bb6672a","7f119c8c5d4d145e6fcf668055a76f37ed273c24584d5bb90ff9f5520648b47d","5ac6404ddc5d622905e131dbc5da0362a82e89d1cb97cc8256bf06ca9fad4b24","9fcfbc2dd0c0614b3a25d41e4425dd86cdfa574a9e7d2febffc85badcee1a0b8","48674187365141743eaadc4ffa47b457bfa63d36e945b8e4f43d60b0fe6b1907","27c3ff6b4f5c0dc844debade25cbae22be0b9b0f1d4ca3ecc6e7b61e1cf08ad9","975eb852881942b64b42f35251bb55a75b6521e47c3eefe95d61f986265a5225","318affc58742934c99481fcb8043bba8b5a5caaf07f5971c34d00b5dc154da66","c67951274199df6c887191adafac1c605901c3f6ce123351225e2e93c4282de4","c2d529e790c1f7aac54caf4c61ec666df122722f276dcdb7ec8879f63b30761a","ffb454554054fdfa52dbe72f6a0f5320cfeff52452f4e8deddcfc3f5bba80f82","9c9c38faaece9950bf1e039e8d213d8a94c7d1f5f637c5db55da1ee76f7dd2a2","412e9398be155d644b609b06bb2d0b6f99d86bf3d7db81b27a357ad8df07e0c0","8213d20592699f36a9cf19a374a31131c998eb6deaf7fe6eb9547c5c055ad4c7","c17118d21ac084068b77eb8e382d9f8988e26bded75c7f0f0b132fa67d4ca625","9a4c49a0b2bf8536b1f4a72f162f807d7a23aa27a816e9cd24cc965540ba4b35","dc8a746041b9afc357038c00dc7bb204e7c758e5796e2b965782b10c010ea5da","3c2eecbb08d00f262c3266a5729d8dc7033b12c10ad11085239d942330a66be4","05dd6c14853a43da9de35936c2cd9e3c1a0fb4bc64b61ca992c5ed0b90ea2f00","50ed6e45c39d15e21c206f167abb7c33067931c37c8c660f1928e504a3ba6fda","62540abf0bac8bf8c13c183db0457c5495a2bdad157f9eb03916c3953feb765e","abb6d9adcc79c591f712e79c55f769b48690ec66a55b6f6189569a0d357c7e58","5190f1a110a789c2f8ed8dcf2da6ce122dcb74249d0c01d19d1ed0b1c6bb02a1","3650bbe137c9c44bc6b8f44a56353b00eba9654e41a9355e6228f7f0f464c648","9c4f32d2fa2b6efeed4f9fbd98254121b17982110b48edcede96e2dc2af0894d","02fdc48e90772a67702e098b722a5772fddf789fb8aa961fc1e292655581df34","e08f7f2e161bf3631ced28081d5b567ebce6f58dedc9930ec299b14f7dc52ae2","56a1d5d8e0d9fc4e3e39936097c3064338df9031872c8e21a9648e3390aae30c","c12fb0c4b324c65600609051919b1de0da4630c66bdbd4dc268efe7780ff4ed8","66a713498dc5871ab5f3246e47b33c85a360b77f64c27d73b0e958b40e0eeb79","cdb21862838795135a920f06f0d3c94df71b677d61582911edb7d1da41d8b7ed","6cc1355b44418cd30ce04c550fee3550dcb0a5250cb8f2a420784b4bc1d7f016","6f26fa5643242fa8fbcb29f62d5377ed2f2b875a4077fd795f66d6af3ee5c102","e6afc6c377cdc0b881c15db7be06fe57fbdbb4074753bb36abdc26000de853ee","a824f23995b5038bb7a479442d8463c50f055697d4cc70506210706cd0e762e3","6419036e9ec25b03fed142edef64280f5d7dbcc158170cb27899ecb9cb2dae8b","205b5a62e15144e9bd6a49846df7d30399a5738a3ab439f35eb25e19aab66299","8d09f7a29021a69909eca56a60012bb043c703b82fbb1dede51186fedcce88f9","c0a70a7b4791387646abc29e96f38df7f8834064ca867341aeb032bd4c9fa520","8eed414bd2305e20163d35205b450204002bf20e14c7241d7fec46bb18f174d2"],"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":false,"rootDir":"./src","strict":true,"target":99},"fileIdsList":[[49,51,52,53,54,55,56,57,58,59,60,61],[49,50,52,53,54,55,56,57,58,59,60,61],[50,51,52,53,54,55,56,57,58,59,60,61],[49,50,51,53,54,55,56,57,58,59,60,61],[49,50,51,52,54,55,56,57,58,59,60,61],[49,50,51,52,53,55,56,57,58,59,60,61],[49,50,51,52,53,54,56,57,58,59,60,61],[49,50,51,52,53,54,55,57,58,59,60,61],[49,50,51,52,53,54,55,56,58,59,60,61],[49,50,51,52,53,54,55,56,57,59,60,61],[49,50,51,52,53,54,55,56,57,58,60,61],[49,50,51,52,53,54,55,56,57,58,59,61],[49,50,51,52,53,54,55,56,57,58,59,60],[73],[69,70,71,72],[62,63,64,65],[62],[63],[74],[73,74],[75],[73,88,89],[96],[73,98],[111],[75,76],[74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,97,99,100,101,102,103,112,113,114,115,116,117,118,119,120,121],[148,149],[111,148],[111,135],[146,147],[111,146],[152,153],[61,111,122,147],[47,147],[47,111,122,141,142,145,147,149],[122,154],[122,156],[122,150],[45,47],[134],[45,47,48,132,134,135,140,150,151,154,155,156,157,158],[139],[61,134,136,138,159],[137],[46,123],[46,47,48,61,68,122,124,126,127,129,130,131,160],[46,128,129,160],[61,128,130],[46],[47,61,67,125,132,133],[61,125,134],[47],[66],[96,104,106,107,108,109,110],[105],[73,96],[70,71,72,161],[143,144],[145]],"referencedMap":[[50,1],[51,2],[49,3],[52,4],[53,5],[54,6],[55,7],[56,8],[57,9],[58,10],[59,11],[60,12],[61,13],[105,14],[73,15],[66,16],[63,17],[64,18],[79,14],[80,14],[82,19],[83,20],[85,14],[86,14],[87,14],[115,21],[90,22],[92,14],[119,14],[121,14],[88,14],[89,14],[93,14],[120,14],[97,23],[99,24],[117,14],[118,14],[112,25],[116,26],[103,14],[122,27],[74,14],[148,25],[158,28],[149,29],[146,30],[156,31],[147,32],[154,33],[153,34],[152,35],[150,36],[155,37],[157,38],[151,39],[48,40],[135,41],[159,42],[140,43],[139,44],[138,45],[124,46],[132,47],[130,48],[131,49],[128,50],[134,51],[126,52],[47,50],[133,53],[67,54],[104,23],[111,55],[110,14],[106,56],[96,14],[109,57],[95,58],[145,59],[143,60],[68,50]],"exportedModulesMap":[[50,1],[51,2],[49,3],[52,4],[53,5],[54,6],[55,7],[56,8],[57,9],[58,10],[59,11],[60,12],[61,13],[105,14],[73,15],[66,16],[63,17],[64,18],[79,14],[80,14],[82,19],[83,20],[85,14],[86,14],[87,14],[115,21],[90,22],[92,14],[119,14],[121,14],[88,14],[89,14],[93,14],[120,14],[97,23],[99,24],[117,14],[118,14],[112,25],[116,26],[103,14],[122,27],[74,14],[148,25],[158,28],[149,29],[146,30],[156,31],[147,32],[154,33],[153,34],[152,35],[150,36],[155,37],[157,38],[151,39],[48,40],[135,41],[159,42],[140,43],[139,44],[138,45],[124,46],[132,47],[130,48],[131,49],[128,50],[134,51],[126,52],[47,50],[133,53],[67,54],[104,23],[111,55],[110,14],[106,56],[96,14],[109,57],[95,58],[145,59],[143,60],[68,50]],"semanticDiagnosticsPerFile":[50,51,49,52,53,54,55,56,57,58,59,60,61,98,71,105,69,73,72,70,136,123,46,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,141,62,65,66,63,64,77,79,78,80,81,82,83,84,113,85,86,87,115,90,91,92,119,121,88,89,93,120,94,97,99,100,117,101,102,118,112,116,103,114,122,74,75,76,148,158,149,146,156,147,154,153,152,150,155,157,151,48,135,45,159,140,139,138,137,124,132,129,160,130,131,128,127,134,126,125,47,133,67,104,111,108,110,106,96,109,107,95,144,145,143,142,68]},"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","./src/factory.js","../../node_modules/redux/index.d.ts","./src/types.ts","./src/controls.js","../../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/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","../redux-routine/build-types/index.d.ts","../../node_modules/@types/react/global.d.ts","../../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","../compose/build-types/utils/create-higher-order-component/index.d.ts","../compose/build-types/utils/debounce/index.d.ts","../compose/build-types/utils/throttle/index.d.ts","../compose/build-types/higher-order/compose.d.ts","../compose/build-types/higher-order/pipe.d.ts","../compose/build-types/higher-order/if-condition/index.d.ts","../compose/build-types/higher-order/pure/index.d.ts","../compose/build-types/higher-order/with-global-events/index.d.ts","../compose/build-types/higher-order/with-instance-id/index.d.ts","../compose/build-types/higher-order/with-safe-timeout/index.d.ts","../compose/build-types/higher-order/with-state/index.d.ts","../compose/build-types/hooks/use-constrained-tabbing/index.d.ts","../compose/build-types/hooks/use-copy-on-click/index.d.ts","../compose/build-types/hooks/use-copy-to-clipboard/index.d.ts","../compose/build-types/hooks/use-focus-on-mount/index.d.ts","../compose/build-types/hooks/use-focus-outside/index.d.ts","../compose/build-types/hooks/use-dialog/index.d.ts","../compose/build-types/hooks/use-disabled/index.d.ts","../compose/build-types/hooks/use-dragging/index.d.ts","../compose/build-types/hooks/use-focus-return/index.d.ts","../compose/build-types/hooks/use-instance-id/index.d.ts","../element/node_modules/@types/react/index.d.ts","../element/build-types/react.d.ts","../compose/build-types/hooks/use-isomorphic-layout-effect/index.d.ts","../../node_modules/@types/mousetrap/index.d.ts","../compose/build-types/hooks/use-keyboard-shortcut/index.d.ts","../compose/build-types/hooks/use-media-query/index.d.ts","../compose/build-types/hooks/use-previous/index.d.ts","../compose/build-types/hooks/use-reduced-motion/index.d.ts","../compose/build-types/hooks/use-viewport-match/index.d.ts","../element/build-types/create-interpolate-element.d.ts","../../node_modules/@types/react-dom/index.d.ts","../../node_modules/@types/react-dom/client.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","../compose/build-types/hooks/use-resize-observer/index.d.ts","../compose/build-types/hooks/use-async-list/index.d.ts","../compose/build-types/hooks/use-warn-on-change/index.d.ts","../compose/build-types/hooks/use-debounce/index.d.ts","../compose/build-types/hooks/use-throttle/index.d.ts","../compose/build-types/hooks/use-merge-refs/index.d.ts","../compose/build-types/hooks/use-ref-effect/index.d.ts","../compose/build-types/hooks/use-drop-zone/index.d.ts","../compose/build-types/hooks/use-focusable-iframe/index.d.ts","../compose/build-types/hooks/use-fixed-window-list/index.d.ts","../compose/build-types/index.d.ts","../../node_modules/is-promise/index.d.ts","./src/promise-middleware.js","./src/store/index.js","./src/resolvers-cache-middleware.js","./src/redux-store/thunk-middleware.js","./src/redux-store/metadata/utils.ts","./src/redux-store/metadata/actions.js","./src/redux-store/metadata/reducer.ts","./src/redux-store/metadata/selectors.js","./src/redux-store/index.js","./src/utils/emitter.js","./src/registry.js","./src/default-registry.js","../../node_modules/is-plain-object/is-plain-object.d.ts","./src/plugins/persistence/storage/object.js","./src/plugins/persistence/storage/default.js","./src/plugins/persistence/index.js","./src/plugins/index.js","../../node_modules/use-memo-one/index.d.ts","../priority-queue/build-types/index.d.ts","../is-shallow-equal/build-types/objects.d.ts","../is-shallow-equal/build-types/arrays.d.ts","../is-shallow-equal/build-types/index.d.ts","./src/components/registry-provider/context.js","./src/components/registry-provider/use-registry.js","./src/components/async-mode-provider/context.js","./src/components/async-mode-provider/use-async-mode.js","./src/components/use-select/index.js","./src/components/with-select/index.js","./src/components/use-dispatch/use-dispatch.js","./src/components/use-dispatch/use-dispatch-with-map.js","./src/components/use-dispatch/index.js","./src/components/with-dispatch/index.js","./src/components/registry-provider/index.js","./src/components/with-registry/index.js","./src/components/async-mode-provider/index.js","./src/index.js","./src/redux-store/metadata/equivalent-key-map.d.ts","../element/node_modules/@types/react/global.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},"ce6e5b88acf57d96365aa4d49fd43480c803ecb7868830749df564789774a54c",{"version":"8f19251323456195ec9236df857bac3b8f97b73b540ef06ead2ceccc3884954f","affectsGlobalScope":true},"261c2575b44e049726cf1fbd6cf43b309581aee3e2c6dfff2c696cba50b083b5","e382a7658f76f31d91f33c404b9526eeee7938eb4aee831feb51a3ba0e40a321","675e702f2032766a91eeadee64f51014c64688525da99dccd8178f0c599f13a8","438284c7c455a29b9c0e2d1e72abc62ee93d9a163029ffe918a34c5db3b92da2","0c75b204aed9cf6ff1c7b4bed87a3ece0d9d6fc857a6350c0c95ed0c38c814e8","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","c24ad9be9adf28f0927e3d9d9e9cec1c677022356f241ccbbfb97bfe8fb3d1a1","0ec0998e2d085e8ea54266f547976ae152c9dd6cdb9ac4d8a520a230f5ebae84","9364c7566b0be2f7b70ff5285eb34686f83ccb01bda529b82d23b2a844653bfb","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","82251920b05f30981c9a4109cb5f3169dce4b477effc845c6d781044a30e7672","3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd","3e59f00ab03c33717b3130066d4debb272da90eeded4935ff0604c2bc25a5cae","9fa6b83a35e897f340858995ca5d77e901d89fd18644cd4c9e8a4afe0b2e6363",{"version":"0714e2046df66c0e93c3330d30dbc0565b3e8cd3ee302cf99e4ede6220e5fec8","affectsGlobalScope":true},"bd0d80db12ef1aceefc4f9d3eb88517b9634fa747ae8475981da8655292feab8","55e68fb1618e3f55f7866b8c8415152159309a14b716370081ab0b7af96d876e","bf0491af2455f92282b61807be2be6e7ad7d532e47fac7b698019d3617c28ff7","5d874fb879ab8601c02549817dceb2d0a30729cb7e161625dd6f819bbff1ec0b","ee551a880882770c4f56a0964a9767c9feafe497a5be52652527d098c88d85cb","b192606574769a5566620f9bf19358a3994bc2726ecdeaad9c66f3333b2687c8","29041ec2b56677a9adf3bcfa21bf513d29faacfea6964a0734a5e0a12982ac8c",{"version":"bbdf156fea2fabed31a569445835aeedcc33643d404fcbaa54541f06c109df3f","affectsGlobalScope":true},"381899b8d1d4c1be716f18cb5242ba39f66f4b1e31d45af62a32a99f8edcb39d","f7b46d22a307739c145e5fddf537818038fdfffd580d79ed717f4d4d37249380","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"5917af4ff931b050dba49a1dedd9c00f15f7b3dc4345ad8491bfacd2ec68ed32","affectsGlobalScope":true},"c8b8656890f0c3cbcbfa35247885999be08c3e6391d04c6970e6edbd113c0359","bf1c5b444373d2d9eb03cedc6a9b6eca7c3667585596a5af3a44092c190dec0f","511e4d83de1ad331844ad7d94709b33046c464c867aa8b7d849e97205a61a948","a0cf70217b68c414db6c4863831250c8a2d96469c8044b75edd3a460793c9887","8d7c0f64cebcc3690112c28a4861bd9385836b47e9d1c171e6362100b3cc32a8","04ada34f81611d5344e26d98a6817bb0fc34c7bf7370b5c8ec9b562c56161ae9","8b495154f6d961654e7d0f4ba35bd115160d6d6bfce3dc9c3d122f0948402e9f","f9523fca1617fd31e048afd09f08cca592a7bbaeca4d5ff1e1781ab0cd2ffe9b","471a29292fd062298595f697fedc5e8c7ab42539770da59a3c76592330cf3c14","997b40fb1aeb304b6d3bc9021361bd6c5a1ed3b1e1a1459533a9c854db4ac715","23d7a8b5d3297675007160f5cc75777e6eccf63ff6650bd3ed01eb0b3cdf2a38","8db59d5540f8bc033f35eb1a4a7903d202fbace0874b456e463af2675da2398b","c5a28d3d50c8edecc8cc87ae3a5dcfa34e630f970626bf30c552e681c7055fd0","5f8402dfce577684c2de40394f60628ffe6e44e6bc308dbeb1b643c527d758bf","daa0b5b58eab0c3dfc200cde4cc933084b908ede3aacdda1d2797f98c172142b","7d87403765aa7f53bf7b10ac89499008f0c98086a450cd9859f5b03ce9bd2996","96785f84f3baedac10ed5a27b39023f0ee1540917b4f255eb5504d4d3c25cfe9","4807581687ad8a41a480f2f55a93eed33881d2c3a4bbcba14cd77fddd6c32f8c","afa8dec86e0e11ff50a234b685b18674af64cda1e3671908559949301080bff0","f08d251cb25341aedf5edbfa1317f59f93ddb133de124a31962f656ab4f6ebd9","c0ac0d5a66d62f30b200514957ad91050a4f13b38f1c023422d76c2ea20d3813",{"version":"5917af4ff931b050dba49a1dedd9c00f15f7b3dc4345ad8491bfacd2ec68ed32","affectsGlobalScope":true},"6fb72c65c5af8c4ed7d41afecd1ebb463d1e074291ae5e8a187d0922fd40f59b","2cc143754ed238f214e763525cd4c11613409a643fdd602f4e0a2b19f1f2d397","96520a873073a2f39f922d0a422498cdcc28be9066a769000cdd07ecaba7b645","c7284023c5462180e492357aeb94551a20aa41eac8ac517606f3766359d08bb9","ed4ec3d435678a5703a016a801afc2cd7b543c53ab4615b3e214cac9c30f560a","e1e870a8a409e1eb530b841c9fa03165041518270de8eb37d8cf00c64a53b864","501be290436f06ae2182915329b01cfd0850961814802237b5c24749fd2afa0c","cc34c3c1590513cdb6374890f421c06ad969cfd99b28efb6003a6afc845c49f8","e47b8ec56eb49bc1c53c9012daa9874de14ad0c5da442485aec333571c74b526","e4dd91dd4789a109aab51d8a0569a282369fcda9ba6f2b2297bc61bacfb1a042","83e27bbd7304ea67f9afa1535f1d4fdb15866089f0d893c784cbb5b1c6fb3386","3f92e5a12ec6b30d7de129e9283a6a3e0e7a988457074950ec1e983812c2f2ff","d2d9e98a2b167079474768593e1e7125fc3db055add8fbdb5977e3d05a8a3696","6462da67490105ba7d98cf312c2faf8794c425781128b161ea8394d66502eec8","62359da52b6c8d00c50c2e50738fac82e902f916fdf458d8159e7edb1c60c3a8","1e0ac21bc775686383ea8c8e48bd98b385e6195b25c85525a7affd08a2cd38b9","0449615e1ed03c7d54fc435a63b7ef0cb4e5cea5ac40c9a63280a46f7eeae0ff",{"version":"b5b080e499df18235bac525ce43da935d1a068c5770f58b245d24b6ae8baa166","affectsGlobalScope":true},"b935d4ca97dc9aa05c92aaa51ab5cf2ada5b9722e84ea3af8dc5f93fea3cd361","f295ab6b1bfd2b6b5b19ba621cca18c1b94b25c430c67fcb66c9594e89e3ff39","ea6c58f9711f6dc2f5609e085a1751d1284f1097b568852863bc24becf970831","f59327cd1c98362028d2d2b034b9bada17481ef7f12f13b046bc047ab4fc343c","d759d5a895085d1cfc89d1d1791c188c8170d933092db93e2b48676c49ee7310","2d1b4aec91b432ab2fe2b22f376a34dbc9d9b4b34acbd552f9cd0d3d98bcfca2","0b1d7ac8c1abd81feb21f2bc5d9539610dfa03c2874652cb9c6f4859731edd00","2c8e1d8fe99738fe377049c1baa8b074ac11bdbfad103881c6f012a09383e361","5fac858cb922fe34b898ddc12db441c878ec72bf6a1e3bcbe297f4da4bb6672a","7f119c8c5d4d145e6fcf668055a76f37ed273c24584d5bb90ff9f5520648b47d","5ac6404ddc5d622905e131dbc5da0362a82e89d1cb97cc8256bf06ca9fad4b24","9fcfbc2dd0c0614b3a25d41e4425dd86cdfa574a9e7d2febffc85badcee1a0b8","48674187365141743eaadc4ffa47b457bfa63d36e945b8e4f43d60b0fe6b1907","27c3ff6b4f5c0dc844debade25cbae22be0b9b0f1d4ca3ecc6e7b61e1cf08ad9","975eb852881942b64b42f35251bb55a75b6521e47c3eefe95d61f986265a5225","318affc58742934c99481fcb8043bba8b5a5caaf07f5971c34d00b5dc154da66","c67951274199df6c887191adafac1c605901c3f6ce123351225e2e93c4282de4","c2d529e790c1f7aac54caf4c61ec666df122722f276dcdb7ec8879f63b30761a","ffb454554054fdfa52dbe72f6a0f5320cfeff52452f4e8deddcfc3f5bba80f82","9c9c38faaece9950bf1e039e8d213d8a94c7d1f5f637c5db55da1ee76f7dd2a2","412e9398be155d644b609b06bb2d0b6f99d86bf3d7db81b27a357ad8df07e0c0","a453e3cb5c9df15386ec3478e5d97a0a7a91272cda7ad044f7c7aefbcf539353","c17118d21ac084068b77eb8e382d9f8988e26bded75c7f0f0b132fa67d4ca625","9a4c49a0b2bf8536b1f4a72f162f807d7a23aa27a816e9cd24cc965540ba4b35","dc8a746041b9afc357038c00dc7bb204e7c758e5796e2b965782b10c010ea5da","3c2eecbb08d00f262c3266a5729d8dc7033b12c10ad11085239d942330a66be4","05dd6c14853a43da9de35936c2cd9e3c1a0fb4bc64b61ca992c5ed0b90ea2f00","50ed6e45c39d15e21c206f167abb7c33067931c37c8c660f1928e504a3ba6fda","62540abf0bac8bf8c13c183db0457c5495a2bdad157f9eb03916c3953feb765e","abb6d9adcc79c591f712e79c55f769b48690ec66a55b6f6189569a0d357c7e58","5190f1a110a789c2f8ed8dcf2da6ce122dcb74249d0c01d19d1ed0b1c6bb02a1","3650bbe137c9c44bc6b8f44a56353b00eba9654e41a9355e6228f7f0f464c648","9c4f32d2fa2b6efeed4f9fbd98254121b17982110b48edcede96e2dc2af0894d","02fdc48e90772a67702e098b722a5772fddf789fb8aa961fc1e292655581df34","e08f7f2e161bf3631ced28081d5b567ebce6f58dedc9930ec299b14f7dc52ae2","56a1d5d8e0d9fc4e3e39936097c3064338df9031872c8e21a9648e3390aae30c","c12fb0c4b324c65600609051919b1de0da4630c66bdbd4dc268efe7780ff4ed8","66a713498dc5871ab5f3246e47b33c85a360b77f64c27d73b0e958b40e0eeb79","cdb21862838795135a920f06f0d3c94df71b677d61582911edb7d1da41d8b7ed","6cc1355b44418cd30ce04c550fee3550dcb0a5250cb8f2a420784b4bc1d7f016","6f26fa5643242fa8fbcb29f62d5377ed2f2b875a4077fd795f66d6af3ee5c102","e6afc6c377cdc0b881c15db7be06fe57fbdbb4074753bb36abdc26000de853ee","a824f23995b5038bb7a479442d8463c50f055697d4cc70506210706cd0e762e3","6419036e9ec25b03fed142edef64280f5d7dbcc158170cb27899ecb9cb2dae8b","205b5a62e15144e9bd6a49846df7d30399a5738a3ab439f35eb25e19aab66299","8d09f7a29021a69909eca56a60012bb043c703b82fbb1dede51186fedcce88f9","c0a70a7b4791387646abc29e96f38df7f8834064ca867341aeb032bd4c9fa520","8eed414bd2305e20163d35205b450204002bf20e14c7241d7fec46bb18f174d2"],"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":false,"rootDir":"./src","strict":true,"target":99},"fileIdsList":[[49,51,52,53,54,55,56,57,58,59,60,61],[49,50,52,53,54,55,56,57,58,59,60,61],[50,51,52,53,54,55,56,57,58,59,60,61],[49,50,51,53,54,55,56,57,58,59,60,61],[49,50,51,52,54,55,56,57,58,59,60,61],[49,50,51,52,53,55,56,57,58,59,60,61],[49,50,51,52,53,54,56,57,58,59,60,61],[49,50,51,52,53,54,55,57,58,59,60,61],[49,50,51,52,53,54,55,56,58,59,60,61],[49,50,51,52,53,54,55,56,57,59,60,61],[49,50,51,52,53,54,55,56,57,58,60,61],[49,50,51,52,53,54,55,56,57,58,59,61],[49,50,51,52,53,54,55,56,57,58,59,60],[73],[69,70,71,72],[62,63,64,65],[62],[63],[74],[73,74],[75],[73,88,89],[96],[73,98],[112],[75,76],[74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,97,99,100,101,102,103,113,114,115,116,117,118,119,120,121,122],[149,150],[112,149],[112,136],[147,148],[112,147],[153,154],[61,112,123,148],[47,148],[47,112,123,142,143,146,148,150],[123,155],[123,157],[123,151],[45,47],[135],[45,47,48,133,135,136,141,151,152,155,156,157,158,159],[140],[61,135,137,139,160],[138],[46,124],[46,47,48,61,68,123,125,127,128,130,131,132,161],[46,129,130,161],[61,129,131],[46],[47,61,67,126,133,134],[61,126,135],[47],[66],[96,104,107,108,109,110,111],[105,106],[73,96],[70,71,72,162],[144,145],[146]],"referencedMap":[[50,1],[51,2],[49,3],[52,4],[53,5],[54,6],[55,7],[56,8],[57,9],[58,10],[59,11],[60,12],[61,13],[106,14],[105,14],[73,15],[66,16],[63,17],[64,18],[79,14],[80,14],[82,19],[83,20],[85,14],[86,14],[87,14],[116,21],[90,22],[92,14],[120,14],[122,14],[88,14],[89,14],[93,14],[121,14],[97,23],[99,24],[118,14],[119,14],[113,25],[117,26],[103,14],[123,27],[74,14],[149,25],[159,28],[150,29],[147,30],[157,31],[148,32],[155,33],[154,34],[153,35],[151,36],[156,37],[158,38],[152,39],[48,40],[136,41],[160,42],[141,43],[140,44],[139,45],[125,46],[133,47],[131,48],[132,49],[129,50],[135,51],[127,52],[47,50],[134,53],[67,54],[104,23],[112,55],[111,14],[107,56],[96,14],[110,57],[95,58],[146,59],[144,60],[68,50]],"exportedModulesMap":[[50,1],[51,2],[49,3],[52,4],[53,5],[54,6],[55,7],[56,8],[57,9],[58,10],[59,11],[60,12],[61,13],[106,14],[105,14],[73,15],[66,16],[63,17],[64,18],[79,14],[80,14],[82,19],[83,20],[85,14],[86,14],[87,14],[116,21],[90,22],[92,14],[120,14],[122,14],[88,14],[89,14],[93,14],[121,14],[97,23],[99,24],[118,14],[119,14],[113,25],[117,26],[103,14],[123,27],[74,14],[149,25],[159,28],[150,29],[147,30],[157,31],[148,32],[155,33],[154,34],[153,35],[151,36],[156,37],[158,38],[152,39],[48,40],[136,41],[160,42],[141,43],[140,44],[139,45],[125,46],[133,47],[131,48],[132,49],[129,50],[135,51],[127,52],[47,50],[134,53],[67,54],[104,23],[112,55],[111,14],[107,56],[96,14],[110,57],[95,58],[146,59],[144,60],[68,50]],"semanticDiagnosticsPerFile":[50,51,49,52,53,54,55,56,57,58,59,60,61,98,71,106,105,69,73,72,70,137,124,46,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,142,62,65,66,63,64,77,79,78,80,81,82,83,84,114,85,86,87,116,90,91,92,120,122,88,89,93,121,94,97,99,100,118,101,102,119,113,117,103,115,123,74,75,76,149,159,150,147,157,148,155,154,153,151,156,158,152,48,136,45,160,141,140,139,138,125,133,130,161,131,132,129,128,135,127,126,47,134,67,104,112,109,111,107,96,110,108,95,145,146,144,143,68]},"version":"4.4.2"}
|