react-global-state-hooks 15.0.3 → 15.0.5
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/GlobalStore.d.ts +11 -22
- package/GlobalStore.js +1 -1
- package/bundle.js +1 -1
- package/createGlobalState.d.ts +4 -4
- package/index.d.ts +2 -3
- package/package.json +2 -7
- package/uniqueId.d.ts +1 -1
- package/webpack.config.js +0 -1
- package/GlobalStoreAbstract.d.ts +0 -9
- package/GlobalStoreAbstract.js +0 -1
package/GlobalStore.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { ActionCollectionConfig, ActionCollectionResult, AnyFunction, BaseMetadata, GlobalStoreCallbacks, StateChanges
|
|
2
|
-
import
|
|
3
|
-
import type { LocalStorageConfig } from './types';
|
|
4
|
-
export declare class GlobalStore<State, Metadata extends BaseMetadata, ActionsConfig extends ActionCollectionConfig<State, Metadata> | undefined | unknown, PublicStateMutator = keyof ActionsConfig extends never | undefined ? React.Dispatch<React.SetStateAction<State>> : ActionCollectionResult<State, Metadata, NonNullable<ActionsConfig>>> extends
|
|
1
|
+
import type { ActionCollectionConfig, ActionCollectionResult, AnyFunction, BaseMetadata, GlobalStoreCallbacks, StateChanges } from 'react-hooks-global-states/types';
|
|
2
|
+
import GlobalStoreBase from 'react-hooks-global-states/GlobalStore';
|
|
3
|
+
import type { LocalStorageConfig, ItemEnvelope } from './types';
|
|
4
|
+
export declare class GlobalStore<State, Metadata extends BaseMetadata, ActionsConfig extends ActionCollectionConfig<State, Metadata> | undefined | unknown, PublicStateMutator = keyof ActionsConfig extends never | undefined ? React.Dispatch<React.SetStateAction<State>> : ActionCollectionResult<State, Metadata, NonNullable<ActionsConfig>>> extends GlobalStoreBase<State, Metadata, ActionsConfig> {
|
|
5
5
|
protected localStorage: LocalStorageConfig<State> | null;
|
|
6
6
|
constructor(state: State);
|
|
7
7
|
constructor(state: State, args: {
|
|
@@ -12,23 +12,12 @@ export declare class GlobalStore<State, Metadata extends BaseMetadata, ActionsCo
|
|
|
12
12
|
localStorage?: LocalStorageConfig<State>;
|
|
13
13
|
});
|
|
14
14
|
protected isPersistStorageAvailable: () => boolean;
|
|
15
|
-
protected
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
protected
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
protected onInitialize: (args: StoreTools<State, PublicStateMutator, Metadata>) => void;
|
|
23
|
-
protected onChange: (args: StoreTools<State, PublicStateMutator, Metadata> & StateChanges<State>) => void;
|
|
24
|
-
/**
|
|
25
|
-
* Instead of calling onInitialize and onChange directly, we call the _onInitialize and _onChange
|
|
26
|
-
* This allows the concat the logic of the GlobalStore with the logic of the extension class.
|
|
27
|
-
*/
|
|
28
|
-
protected onInit: (parameters: StoreTools<State, PublicStateMutator, Metadata>) => void;
|
|
29
|
-
protected onStateChanged: (args: StoreTools<State, PublicStateMutator, Metadata> & StateChanges<State>) => void;
|
|
30
|
-
private getStorageItem;
|
|
31
|
-
private setStorageItem;
|
|
32
|
-
private handleStorageError;
|
|
15
|
+
protected onInit: () => void;
|
|
16
|
+
trySetStorageItem: (state: State) => void;
|
|
17
|
+
updateStateWithValidation: (state: State) => void;
|
|
18
|
+
protected onStateChanged: ({ state }: StateChanges<State>) => void;
|
|
19
|
+
getStorageItem: () => ItemEnvelope<State> | null;
|
|
20
|
+
setStorageItem: (state: State) => void;
|
|
21
|
+
handleStorageError: (error: unknown) => void;
|
|
33
22
|
}
|
|
34
23
|
export default GlobalStore;
|
package/GlobalStore.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var t,e;t=this,e=(t,e,o,r)=>(()=>{"use strict";var a={70:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){try{return{result:t(),error:null}}catch(t){return{result:null,error:t}}}},
|
|
1
|
+
var t,e;t=this,e=(t,e,o,r)=>(()=>{"use strict";var a={70:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){try{return{result:t(),error:null}}catch(t){return{result:null,error:t}}}},330:e=>{e.exports=t},413:t=>{t.exports=e},536:t=>{t.exports=o},773:t=>{t.exports=r}},n={};function l(t){var e=n[t];if(void 0!==e)return e.exports;var o=n[t]={exports:{}};return a[t](o,o.exports,l),o.exports}var i={};return(()=>{var t=i;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function o(t,o){if(o&&("object"==e(o)||"function"==typeof o))return o;if(void 0!==o)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function r(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(r=function(){return!!t})()}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}var u=function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalStore=void 0;var s=u(l(536)),c=u(l(70)),f=u(l(330)),d=u(l(413)),g=u(l(773)),v=function(t){function l(t){var n,i,u,s,v,S=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{metadata:{}};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),u=this,v=[t,S],s=a(s=l),(n=o(u,r()?Reflect.construct(s,v||[],a(u).constructor):s.apply(u,v))).localStorage=null,n.isPersistStorageAvailable=function(){var t;return Boolean((null===(t=n.localStorage)||void 0===t?void 0:t.key)&&(null===globalThis||void 0===globalThis?void 0:globalThis.localStorage))},n.onInit=function(){var t=n.localStorage;if(t&&n.isPersistStorageAvailable()){var e=t.versioning,o=(0,c.default)(function(){var o,r,a=null===(o=t.adapter)||void 0===o?void 0:o.getItem;return a?{s:a(t.key),v:null!==(r=null==e?void 0:e.version)&&void 0!==r?r:-1}:n.getStorageItem()}),r=o.result,a=o.error;if(a)return n.handleStorageError(a),void n.updateStateWithValidation(n.getState());if(r){var l=r.v===(null==e?void 0:e.version),i=null==e?void 0:e.migrator;if(l||!i||t.adapter)n.updateStateWithValidation(r.s);else{var u=(0,c.default)(function(){return i({legacy:r.s,initial:n.getState()})}),s=u.result,f=u.error;f?(n.handleStorageError(f),n.updateStateWithValidation(n.getState())):n.updateStateWithValidation(s)}}else n.updateStateWithValidation(n.getState())}},n.trySetStorageItem=function(t){var e=n.localStorage;if(e){var o=(0,c.default)(function(){var o,r=null===(o=e.adapter)||void 0===o?void 0:o.setItem;if(!r)return n.setStorageItem(t);r(e.key,t)}),r=o.error;r&&n.handleStorageError(r)}},n.updateStateWithValidation=function(t){var e=n.localStorage;if(e){var o=(0,c.default)(function(){return e.validator({restored:t,initial:n.getState()})}),r=o.result,a=o.error;if(a)return n.handleStorageError(a),void n.trySetStorageItem(n.getState());if(void 0===r)return void 0===t?void n.trySetStorageItem(n.getState()):(n.setState(t),void n.trySetStorageItem(t));n.setState(r),n.trySetStorageItem(r)}},n.onStateChanged=function(t){var e=t.state,o=n.localStorage;if(o&&n.isPersistStorageAvailable()){var r=(0,c.default)(function(){var t,r=null===(t=o.adapter)||void 0===t?void 0:t.setItem;if(r)return r(o.key,e);n.setStorageItem(e)}),a=r.error;a&&n.handleStorageError(a)}},n.getStorageItem=function(){var t=globalThis.localStorage.getItem(n.localStorage.key),o=(0,g.default)(t)?null:(0,f.default)(t);return function(t,o){if(!((0,g.default)(o)||"object"===e(o)&&"s"in o&&"v"in o))throw new Error('[react-native-global-state-hooks] The value of the key "'.concat(t,'" is not a valid storage envelope.'))}(n.localStorage.key,o),o},n.setStorageItem=function(t){var e,o,r,a={s:t,v:null!==(r=null===(o=null===(e=n.localStorage)||void 0===e?void 0:e.versioning)||void 0===o?void 0:o.version)&&void 0!==r?r:-1},l=(0,d.default)(a);globalThis.localStorage.setItem(n.localStorage.key,l)},n.handleStorageError=function(t){var e,o;if(null===(e=n.localStorage)||void 0===e?void 0:e.onError)return n.localStorage.onError(t);globalThis.console.error(["[react-global-state-hooks]\n"," localStorage sync error:","[hook]:"," ".concat(n._name),"[Localstorage Key]:"," ".concat(null===(o=n.localStorage)||void 0===o?void 0:o.key),"[Error]:"," ".concat(null!=t?t:"undefined","\n\n"),"Stacktrace:"].join("\n"),t.stack)},n.localStorage=null!==(i=S.localStorage)&&void 0!==i?i:null,n.constructor!==l?o(n):(n.initialize(),n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&n(t,e)}(l,t),i=l,Object.defineProperty(i,"prototype",{writable:!1}),i;var i}(s.default);t.GlobalStore=v,t.default=v})(),i})(),"object"==typeof exports&&"object"==typeof module?module.exports=e(require("json-storage-formatter/formatFromStore"),require("json-storage-formatter/formatToStore"),require("react-hooks-global-states/GlobalStore"),require("json-storage-formatter/isNil")):"function"==typeof define&&define.amd?define(["json-storage-formatter/formatFromStore","json-storage-formatter/formatToStore","react-hooks-global-states/GlobalStore","json-storage-formatter/isNil"],e):"object"==typeof exports?exports["react-global-state-hooks"]=e(require("json-storage-formatter/formatFromStore"),require("json-storage-formatter/formatToStore"),require("react-hooks-global-states/GlobalStore"),require("json-storage-formatter/isNil")):t["react-global-state-hooks"]=e(t["json-storage-formatter/formatFromStore"],t["json-storage-formatter/formatToStore"],t["react-hooks-global-states/GlobalStore"],t["json-storage-formatter/isNil"]);
|
package/bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e,r;e=this,r=(e,r,t,o,n,a,
|
|
1
|
+
var e,r;e=this,r=(e,r,t,o,n,a,i)=>(()=>{"use strict";var l={78:r=>{r.exports=e},361:e=>{e.exports=r},487:e=>{e.exports=t},623:e=>{e.exports=o},670:e=>{e.exports=n},673:e=>{e.exports=a},778:e=>{e.exports=i}},s={};function u(e){var r=s[e];if(void 0!==r)return r.exports;var t=s[e]={exports:{}};return l[e](t,t.exports,u),t.exports}var c={};return(()=>{var e=c;Object.defineProperty(e,"__esModule",{value:!0}),e.createGlobalState=e.GlobalStore=e.createContext=e.isRecord=e.throwWrongKeyOnActionCollectionConfig=e.uniqueId=e.shallowCompare=void 0;var r=u(673);Object.defineProperty(e,"shallowCompare",{enumerable:!0,get:function(){return r.shallowCompare}});var t=u(78);Object.defineProperty(e,"uniqueId",{enumerable:!0,get:function(){return t.uniqueId}});var o=u(361);Object.defineProperty(e,"throwWrongKeyOnActionCollectionConfig",{enumerable:!0,get:function(){return o.throwWrongKeyOnActionCollectionConfig}});var n=u(487);Object.defineProperty(e,"isRecord",{enumerable:!0,get:function(){return n.isRecord}});var a=u(623);Object.defineProperty(e,"createContext",{enumerable:!0,get:function(){return a.createContext}});var i=u(778);Object.defineProperty(e,"GlobalStore",{enumerable:!0,get:function(){return(e=i,e&&e.__esModule?e:{default:e}).default;var e}});var l=u(670);Object.defineProperty(e,"createGlobalState",{enumerable:!0,get:function(){return l.createGlobalState}})})(),c})(),"object"==typeof exports&&"object"==typeof module?module.exports=r(require("./uniqueId.js"),require("./throwWrongKeyOnActionCollectionConfig.js"),require("./isRecord.js"),require("./createContext.js"),require("./createGlobalState.js"),require("./shallowCompare.js"),require("./GlobalStore.js")):"function"==typeof define&&define.amd?define(["./uniqueId.js","./throwWrongKeyOnActionCollectionConfig.js","./isRecord.js","./createContext.js","./createGlobalState.js","./shallowCompare.js","./GlobalStore.js"],r):"object"==typeof exports?exports["react-global-state-hooks"]=r(require("./uniqueId.js"),require("./throwWrongKeyOnActionCollectionConfig.js"),require("./isRecord.js"),require("./createContext.js"),require("./createGlobalState.js"),require("./shallowCompare.js"),require("./GlobalStore.js")):e["react-global-state-hooks"]=r(e["./uniqueId.js"],e["./throwWrongKeyOnActionCollectionConfig.js"],e["./isRecord.js"],e["./createContext.js"],e["./createGlobalState.js"],e["./shallowCompare.js"],e["./GlobalStore.js"]);
|
package/createGlobalState.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
export type { InferActionsType, InferStateApi, AnyActions, } from 'react-hooks-global-states/createGlobalState';
|
|
1
2
|
import type React from 'react';
|
|
2
|
-
import { StateHook, BaseMetadata, ActionCollectionConfig, ActionCollectionResult, GlobalStoreCallbacks } from 'react-hooks-global-states
|
|
3
|
-
export type { InferActionsType } from 'react-hooks-global-states/createGlobalState';
|
|
3
|
+
import type { StateHook, BaseMetadata, ActionCollectionConfig, ActionCollectionResult, GlobalStoreCallbacks, AnyActions } from 'react-hooks-global-states';
|
|
4
4
|
import type { LocalStorageConfig } from './types';
|
|
5
5
|
interface CreateGlobalState {
|
|
6
6
|
/**
|
|
@@ -76,7 +76,7 @@ interface CreateGlobalState {
|
|
|
76
76
|
<State, Metadata extends BaseMetadata, ActionsConfig extends ActionCollectionConfig<State, Metadata> | null | {}, PublicStateMutator = keyof ActionsConfig extends never | undefined ? React.Dispatch<React.SetStateAction<State>> : ActionCollectionResult<State, Metadata, NonNullable<ActionsConfig>>>(state: State, args: {
|
|
77
77
|
name?: string;
|
|
78
78
|
metadata?: Metadata;
|
|
79
|
-
callbacks?: GlobalStoreCallbacks<State,
|
|
79
|
+
callbacks?: GlobalStoreCallbacks<State, AnyActions, Metadata>;
|
|
80
80
|
actions?: ActionsConfig;
|
|
81
81
|
localStorage?: LocalStorageConfig<State>;
|
|
82
82
|
}): StateHook<State, PublicStateMutator, Metadata>;
|
|
@@ -133,7 +133,7 @@ interface CreateGlobalState {
|
|
|
133
133
|
<State, Metadata extends BaseMetadata, ActionsConfig extends ActionCollectionConfig<State, Metadata>, PublicStateMutator = ActionCollectionResult<State, Metadata, NonNullable<ActionsConfig>>>(state: State, args: {
|
|
134
134
|
name?: string;
|
|
135
135
|
metadata?: Metadata;
|
|
136
|
-
callbacks?: GlobalStoreCallbacks<State,
|
|
136
|
+
callbacks?: GlobalStoreCallbacks<State, AnyActions, Metadata>;
|
|
137
137
|
actions: ActionsConfig;
|
|
138
138
|
localStorage?: LocalStorageConfig<State>;
|
|
139
139
|
}): StateHook<State, PublicStateMutator, Metadata>;
|
package/index.d.ts
CHANGED
|
@@ -4,11 +4,10 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export type { StateApi, ObservableFragment, MetadataSetter, StateChanges, StoreTools, ActionCollectionResult, GlobalStoreCallbacks, UseHookOptions, UnsubscribeCallback, SubscribeCallbackConfig, SubscribeCallback, BaseMetadata, MetadataGetter, SelectorCallback, SubscriberParameters, SubscriptionCallback, StateHook, ActionCollectionConfig, } from './types';
|
|
6
6
|
export { shallowCompare } from './shallowCompare';
|
|
7
|
-
export { uniqueId } from './uniqueId';
|
|
7
|
+
export { uniqueId, type BrandedId } from './uniqueId';
|
|
8
8
|
export { throwWrongKeyOnActionCollectionConfig } from './throwWrongKeyOnActionCollectionConfig';
|
|
9
9
|
export { isRecord } from './isRecord';
|
|
10
10
|
export { type ContextProvider, type ContextHook, type InferContextApi, createContext } from './createContext';
|
|
11
11
|
export { type LocalStorageConfig } from './types';
|
|
12
12
|
export { default as GlobalStore } from './GlobalStore';
|
|
13
|
-
export {
|
|
14
|
-
export { createGlobalState, type InferActionsType } from './createGlobalState';
|
|
13
|
+
export { createGlobalState, type InferActionsType, type InferStateApi, AnyActions, } from './createGlobalState';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-global-state-hooks",
|
|
3
|
-
"version": "15.0.
|
|
3
|
+
"version": "15.0.5",
|
|
4
4
|
"description": "This is a package to easily handling global-state across your react components",
|
|
5
5
|
"main": "./bundle.js",
|
|
6
6
|
"types": "./index.d.ts",
|
|
@@ -21,11 +21,6 @@
|
|
|
21
21
|
"require": "./GlobalStore.js",
|
|
22
22
|
"types": "./GlobalStore.d.ts"
|
|
23
23
|
},
|
|
24
|
-
"./GlobalStoreAbstract": {
|
|
25
|
-
"import": "./GlobalStoreAbstract.js",
|
|
26
|
-
"require": "./GlobalStoreAbstract.js",
|
|
27
|
-
"types": "./GlobalStoreAbstract.d.ts"
|
|
28
|
-
},
|
|
29
24
|
"./createGlobalState": {
|
|
30
25
|
"import": "./createGlobalState.js",
|
|
31
26
|
"require": "./createGlobalState.js",
|
|
@@ -150,7 +145,7 @@
|
|
|
150
145
|
},
|
|
151
146
|
"dependencies": {
|
|
152
147
|
"json-storage-formatter": "^3.0.2",
|
|
153
|
-
"react-hooks-global-states": "^15.0.
|
|
148
|
+
"react-hooks-global-states": "^15.0.6"
|
|
154
149
|
},
|
|
155
150
|
"peerDependencies": {
|
|
156
151
|
"json-storage-formatter": "^3.0.2",
|
package/uniqueId.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { uniqueId, default } from 'react-hooks-global-states/uniqueId';
|
|
1
|
+
export { uniqueId, default, type BrandedId } from 'react-hooks-global-states/uniqueId';
|
package/webpack.config.js
CHANGED
|
@@ -5,7 +5,6 @@ const individualEntries = {
|
|
|
5
5
|
// inherit from react-global-state-hooks
|
|
6
6
|
createContext: './src/createContext.ts',
|
|
7
7
|
GlobalStore: './src/GlobalStore.ts',
|
|
8
|
-
GlobalStoreAbstract: './src/GlobalStoreAbstract.ts',
|
|
9
8
|
createGlobalState: './src/createGlobalState.ts',
|
|
10
9
|
isRecord: './src/isRecord.ts',
|
|
11
10
|
shallowCompare: './src/shallowCompare.ts',
|
package/GlobalStoreAbstract.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ActionCollectionConfig, ActionCollectionResult, BaseMetadata, StateChanges, StoreTools } from 'react-hooks-global-states/types';
|
|
2
|
-
import GlobalStore from './GlobalStore';
|
|
3
|
-
export declare abstract class GlobalStoreAbstract<State, Metadata extends BaseMetadata, ActionsConfig extends ActionCollectionConfig<State, Metadata> | null | {}, PublicStateMutator = keyof ActionsConfig extends never | undefined ? React.Dispatch<React.SetStateAction<State>> : ActionCollectionResult<State, Metadata, NonNullable<ActionsConfig>>> extends GlobalStore<State, Metadata, ActionsConfig> {
|
|
4
|
-
protected onInit: (args: StoreTools<State, PublicStateMutator, Metadata>) => void;
|
|
5
|
-
onStateChanged: (args: StoreTools<State, PublicStateMutator, Metadata> & StateChanges<State>) => void;
|
|
6
|
-
protected abstract onInitialize: (args: StoreTools<State, PublicStateMutator, Metadata>) => void;
|
|
7
|
-
protected abstract onChange: (args: StoreTools<State, PublicStateMutator, Metadata> & StateChanges<State>) => void;
|
|
8
|
-
}
|
|
9
|
-
export default GlobalStoreAbstract;
|
package/GlobalStoreAbstract.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var t;t=t=>(()=>{"use strict";var e={778:e=>{e.exports=t}},o={};function r(t){var n=o[t];if(void 0!==n)return n.exports;var i=o[t]={exports:{}};return e[t](i,i.exports,r),i.exports}var n={};return(()=>{var t=n;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function o(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(o=function(){return!!t})()}function i(t){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},i(t)}function u(t,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},u(t,e)}Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalStoreAbstract=void 0;var c,l=function(t){function r(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),(t=function(t,r,n){return r=i(r),function(t,o){if(o&&("object"==e(o)||"function"==typeof o))return o;if(void 0!==o)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,o()?Reflect.construct(r,n||[],i(t).constructor):r.apply(t,n))}(this,r,arguments)).onInit=function(e){var o;t._onInitialize(e),null===(o=t.onInitialize)||void 0===o||o.call(t,e)},t.onStateChanged=function(e){var o;t._onInitialize(e),null===(o=t.onChange)||void 0===o||o.call(t,e)},t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(r,t),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}((c=r(778),c&&c.__esModule?c:{default:c}).default);t.GlobalStoreAbstract=l,t.default=l})(),n})(),"object"==typeof exports&&"object"==typeof module?module.exports=t(require("./GlobalStore.js")):"function"==typeof define&&define.amd?define(["./GlobalStore.js"],t):"object"==typeof exports?exports["react-global-state-hooks"]=t(require("./GlobalStore.js")):this["react-global-state-hooks"]=t(this["./GlobalStore.js"]);
|