react-native-global-state-hooks 2.1.2 → 2.1.3
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/lib/GlobalStore.d.ts.map +1 -1
- package/lib/GlobalStore.js +3 -3
- package/lib/index.d.ts +0 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +0 -1
- package/package.json +1 -1
- package/lib/GlobalStore.utils.d.ts +0 -3
- package/lib/GlobalStore.utils.d.ts.map +0 -1
- package/lib/GlobalStore.utils.js +0 -5
package/lib/GlobalStore.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GlobalStore.d.ts","sourceRoot":"","sources":["../src/GlobalStore.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GlobalStore.d.ts","sourceRoot":"","sources":["../src/GlobalStore.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAuB,MAAM,OAAO,CAAC;AAEtE,OAAO,EACL,sBAAsB,EACtB,WAAW,EACX,iBAAiB,EACjB,sBAAsB,EACtB,wBAAwB,EAEzB,MAAM,qBAAqB,CAAC;AAU7B;;;;;KAKK;AACL,qBAAa,WAAW,CACtB,MAAM,EACN,SAAS,GAAG,IAAI,EAChB,YAAY,SACR,sBAAsB,CAAC,MAAM,EAAE,SAAS,CAAC,GACzC,WAAW,CAAC,MAAM,CAAC,GACnB,IAAI,GAAG,WAAW,CAAC,MAAM,CAAC;IAuI5B,SAAS,CAAC,KAAK,EAAE,MAAM;IACvB,SAAS,CAAC,QAAQ,EAAE,SAAS;IAC7B,SAAS,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI;IAC3C,SAAS,CAAC,MAAM,EAAE,iBAAiB,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,CAAC;IAxItE;;;SAGK;IACE,WAAW,EAAE,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAa;IAEzD;;;;;;;;;;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;;;;;;SAMK;IACL,SAAS,CAAC,sBAAsB;0BAGZ,cAAc,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC;UAC5D,yBAAyB,MAAM,EAAE,SAAS,EAAE,YAAY,CAAC,CAsB3D;IAEF;;;SAGK;IACE,OAAO,4JA8BZ;IAEF;;;SAGK;IACE,gBAAgB,eAMb,MAAM,kIAIN,SAAS,EAEjB;IAEF;;;;SAIK;IACL,SAAS,CAAC,kBAAkB;0BAGR,cAAc,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC;UACvD,YAAY,MAAM,CAAC,CAM1B;IAEF;;;;SAIK;IACL,SAAS,CAAC,oBAAoB,CAC5B,eAAe,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;IAWhE;;;SAGK;IACL,SAAS,CAAC,iBAAiB,QAAO,OAAO,CAgBvC;IAEF;;;;;;OAMG;IACH,SAAS,CAAC,eAAe;gBAIf,YAAY,MAAM,CAAC;0BACT,cAAc,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC;eAwD9D;IAEF;;;;SAIK;IACL,SAAS,CAAC,kBAAkB;0BAGR,cAAc,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC;UAC5D,uBAAuB,MAAM,EAAE,SAAS,EAAE,YAAY,CAAC,CAgDzD;CACH;AAED,eAAe,WAAW,CAAC"}
|
package/lib/GlobalStore.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GlobalStore = void 0;
|
|
4
|
+
const json_storage_formatter_1 = require("json-storage-formatter");
|
|
4
5
|
const react_1 = require("react");
|
|
5
|
-
const GlobalStore_utils_1 = require("./GlobalStore.utils");
|
|
6
6
|
const throwWrongKeyOnActionCollectionConfig = (action_key) => {
|
|
7
7
|
throw new Error(`[WRONG CONFIGURATION!]: Every key inside the storeActionsConfig must be a higher order function that returns a function \n[${action_key}]: key is not a valid function, try something like this: \n{\n
|
|
8
8
|
${action_key}: (param) => ({ setState, getState, setMetadata, getMetadata }) => {\n
|
|
@@ -100,12 +100,12 @@ class GlobalStore {
|
|
|
100
100
|
* gets a clone of the state
|
|
101
101
|
* @returns {TState} - The state clone
|
|
102
102
|
* */
|
|
103
|
-
this.getStateClone = () => (0,
|
|
103
|
+
this.getStateClone = () => (0, json_storage_formatter_1.clone)(this.state);
|
|
104
104
|
/**
|
|
105
105
|
* gets a clone of the metadata
|
|
106
106
|
* @returns {TMetadata} - The metadata clone
|
|
107
107
|
* */
|
|
108
|
-
this.getMetadataClone = () => (0,
|
|
108
|
+
this.getMetadataClone = () => (0, json_storage_formatter_1.clone)(this.metadata);
|
|
109
109
|
/**
|
|
110
110
|
* set the state and update all the subscribers
|
|
111
111
|
* @param {StateSetter<TState>} setter - The setter function or the value to set
|
package/lib/index.d.ts
CHANGED
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -2,5 +2,4 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./GlobalStore.types"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./GlobalStore.utils"), exports);
|
|
6
5
|
tslib_1.__exportStar(require("./GlobalStore"), exports);
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GlobalStore.utils.d.ts","sourceRoot":"","sources":["../src/GlobalStore.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAG/C,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
package/lib/GlobalStore.utils.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.clone = void 0;
|
|
4
|
-
const json_storage_formatter_1 = require("json-storage-formatter");
|
|
5
|
-
Object.defineProperty(exports, "clone", { enumerable: true, get: function () { return json_storage_formatter_1.clone; } });
|