@nu-art/app-state 0.400.8 → 0.400.13
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _keys, BadImplementationException, cloneObj, composeUrl, deepClone, exists, Logger, mergeObject, Module } from '@nu-art/ts-common';
|
|
2
|
-
import {
|
|
2
|
+
import { ModuleFE_RoutingV2, ModuleFE_Thunderstorm, StorageKey, ThunderDispatcher } from '@nu-art/thunderstorm-frontend/index';
|
|
3
3
|
import { convertBase64ToObject, convertObjectToBase64 } from '@nu-art/thunderstorm-shared/base64-tools';
|
|
4
4
|
import { URLParam_AppState } from './consts.js';
|
|
5
5
|
export const dispatch_OnPageStateUpdated = new ThunderDispatcher('__onPageStateUpdated');
|
|
@@ -30,14 +30,14 @@ class ModuleFE_AppState_Class extends Module {
|
|
|
30
30
|
getPageState = (manager) => this.appState[manager.route] ?? {};
|
|
31
31
|
// ######################### Import / Export #########################
|
|
32
32
|
deriveStateFromURLParam = () => {
|
|
33
|
-
const encoded =
|
|
33
|
+
const encoded = ModuleFE_RoutingV2.getQueryParameter(URLParam_AppState);
|
|
34
34
|
if (!exists(encoded))
|
|
35
35
|
return;
|
|
36
36
|
const decoded = this.decodeState(encoded);
|
|
37
37
|
_keys(decoded).forEach(key => {
|
|
38
38
|
this.appState[key] = mergeObject(this.appState[key], decoded[key]);
|
|
39
39
|
});
|
|
40
|
-
|
|
40
|
+
ModuleFE_RoutingV2.removeQueryParam(URLParam_AppState);
|
|
41
41
|
};
|
|
42
42
|
getExportStateForManager = (manager) => {
|
|
43
43
|
const pageState = this.getPageState(manager);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nu-art/app-state",
|
|
3
|
-
"version": "0.400.
|
|
3
|
+
"version": "0.400.13",
|
|
4
4
|
"description": "App State",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"TacB0sS",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"linkDirectory": true
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@nu-art/ts-common": "0.400.
|
|
43
|
-
"@nu-art/ts-styles": "0.400.
|
|
44
|
-
"@nu-art/thunderstorm-shared": "0.400.
|
|
45
|
-
"@nu-art/thunderstorm-frontend": "0.400.
|
|
42
|
+
"@nu-art/ts-common": "0.400.13",
|
|
43
|
+
"@nu-art/ts-styles": "0.400.13",
|
|
44
|
+
"@nu-art/thunderstorm-shared": "0.400.13",
|
|
45
|
+
"@nu-art/thunderstorm-frontend": "0.400.13",
|
|
46
46
|
"react": "^18.0.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|