monkey-front-core 0.0.298 → 0.0.299
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/esm2020/lib/store/reducers/monkeyecx-seeder.reducer.mjs +6 -1
- package/fesm2015/monkey-front-core.mjs +27 -23
- package/fesm2015/monkey-front-core.mjs.map +1 -1
- package/fesm2020/monkey-front-core.mjs +27 -23
- package/fesm2020/monkey-front-core.mjs.map +1 -1
- package/monkey-front-core-0.0.299.tgz +0 -0
- package/package.json +1 -1
- package/monkey-front-core-0.0.298.tgz +0 -0
|
@@ -5445,29 +5445,6 @@ var index$2 = /*#__PURE__*/Object.freeze({
|
|
|
5445
5445
|
monkeyecxStorage: monkeyecxStorage_actions
|
|
5446
5446
|
});
|
|
5447
5447
|
|
|
5448
|
-
const seederReducer = (reducer) => {
|
|
5449
|
-
return (state, action) => {
|
|
5450
|
-
/* if (action.type === INIT || action.type === UPDATE) {
|
|
5451
|
-
const storageValue = localStorage.getItem('state');
|
|
5452
|
-
if (storageValue) {
|
|
5453
|
-
try {
|
|
5454
|
-
return JSON.parse(storageValue);
|
|
5455
|
-
} catch {
|
|
5456
|
-
localStorage.removeItem('state');
|
|
5457
|
-
}
|
|
5458
|
-
}
|
|
5459
|
-
} */
|
|
5460
|
-
const nextState = reducer(state, action);
|
|
5461
|
-
localStorage.setItem('state', JSON.stringify(nextState));
|
|
5462
|
-
return nextState;
|
|
5463
|
-
};
|
|
5464
|
-
};
|
|
5465
|
-
|
|
5466
|
-
var monkeyecxSeeder_reducer = /*#__PURE__*/Object.freeze({
|
|
5467
|
-
__proto__: null,
|
|
5468
|
-
seederReducer: seederReducer
|
|
5469
|
-
});
|
|
5470
|
-
|
|
5471
5448
|
const featureKey = 'mecx-core-storage';
|
|
5472
5449
|
const adapter = createEntityAdapter({
|
|
5473
5450
|
selectId: (item) => {
|
|
@@ -5517,6 +5494,33 @@ var monkeyecxStorage_reducer = /*#__PURE__*/Object.freeze({
|
|
|
5517
5494
|
selectTotal: selectTotal
|
|
5518
5495
|
});
|
|
5519
5496
|
|
|
5497
|
+
const seederReducer = (reducer) => {
|
|
5498
|
+
return (state, action) => {
|
|
5499
|
+
/* if (action.type === INIT || action.type === UPDATE) {
|
|
5500
|
+
const storageValue = localStorage.getItem('state');
|
|
5501
|
+
if (storageValue) {
|
|
5502
|
+
try {
|
|
5503
|
+
return JSON.parse(storageValue);
|
|
5504
|
+
} catch {
|
|
5505
|
+
localStorage.removeItem('state');
|
|
5506
|
+
}
|
|
5507
|
+
}
|
|
5508
|
+
} */
|
|
5509
|
+
const nextState = reducer(state, action);
|
|
5510
|
+
const data = nextState?.[featureKey];
|
|
5511
|
+
console.log('@#@@@@@');
|
|
5512
|
+
console.log(data);
|
|
5513
|
+
console.log('@#@@@@@');
|
|
5514
|
+
localStorage.setItem('state', JSON.stringify(nextState));
|
|
5515
|
+
return nextState;
|
|
5516
|
+
};
|
|
5517
|
+
};
|
|
5518
|
+
|
|
5519
|
+
var monkeyecxSeeder_reducer = /*#__PURE__*/Object.freeze({
|
|
5520
|
+
__proto__: null,
|
|
5521
|
+
seederReducer: seederReducer
|
|
5522
|
+
});
|
|
5523
|
+
|
|
5520
5524
|
var index$1 = /*#__PURE__*/Object.freeze({
|
|
5521
5525
|
__proto__: null,
|
|
5522
5526
|
fromMonkeyecxSeeder: monkeyecxSeeder_reducer,
|