@softpak/components 19.10.0 → 19.10.2
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.
|
@@ -2,10 +2,15 @@ var SpxStorageKeyEnum;
|
|
|
2
2
|
(function (SpxStorageKeyEnum) {
|
|
3
3
|
SpxStorageKeyEnum["afterSignIn"] = "afterSignIn";
|
|
4
4
|
SpxStorageKeyEnum["brand"] = "brand";
|
|
5
|
+
SpxStorageKeyEnum["bundleVersion"] = "bundleVersion";
|
|
5
6
|
SpxStorageKeyEnum["channelType"] = "channelType";
|
|
6
7
|
SpxStorageKeyEnum["channelSettings"] = "companySettings";
|
|
8
|
+
SpxStorageKeyEnum["liveUpdate"] = "liveUpdate";
|
|
9
|
+
SpxStorageKeyEnum["platform"] = "platform";
|
|
10
|
+
SpxStorageKeyEnum["platformVersion"] = "platformVersion";
|
|
7
11
|
SpxStorageKeyEnum["token"] = "token";
|
|
8
12
|
SpxStorageKeyEnum["updateInProgress"] = "updateInProgress";
|
|
13
|
+
SpxStorageKeyEnum["randomDeviceId"] = "randomDeviceId";
|
|
9
14
|
SpxStorageKeyEnum["release"] = "release";
|
|
10
15
|
SpxStorageKeyEnum["patch"] = "patch";
|
|
11
16
|
})(SpxStorageKeyEnum || (SpxStorageKeyEnum = {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"softpak-components-spx-storage.mjs","sources":["../../../../projects/softpak/components/spx-storage/src/spx-storage-key.enum.ts","../../../../projects/softpak/components/spx-storage/src/spx-storage.class.ts","../../../../projects/softpak/components/spx-storage/softpak-components-spx-storage.ts"],"sourcesContent":["export enum SpxStorageKeyEnum {\n afterSignIn = 'afterSignIn',\n brand = 'brand',\n channelType = 'channelType',\n channelSettings = 'companySettings',\n token = 'token',\n updateInProgress = 'updateInProgress',\n release = 'release',\n patch = 'patch',\n};\n","import { SpxStorageKeyEnum } from './spx-storage-key.enum';\n\nexport class SpxStorage {\n private static get channelId() {\n return `${this.getSetting(SpxStorageKeyEnum.brand)?.toUpperCase()}_${this.getSetting(SpxStorageKeyEnum.channelType)?.toUpperCase()}`;\n }\n\n public static clearSetting<KeyEnum>(key: KeyEnum | SpxStorageKeyEnum): void {\n localStorage.removeItem(key as string);\n }\n\n public static getSetting<KeyEnum>(key: KeyEnum | SpxStorageKeyEnum): string | null {\n return localStorage.getItem(key as string);\n }\n\n public static setSetting<KeyEnum>(key: KeyEnum | SpxStorageKeyEnum, settingValue: string): void {\n localStorage.setItem(key as string, settingValue);\n }\n\n public static getChannelSetting<KeyEnum>(key: KeyEnum | SpxStorageKeyEnum): string | undefined {\n let storageObj;\n const storageObjStr = localStorage.getItem(SpxStorageKeyEnum.channelSettings);\n\n if (storageObjStr) {\n storageObj = JSON.parse(storageObjStr);\n if (!storageObj[this.channelId]) {\n return undefined;\n }\n return storageObj[this.channelId][key];\n } else {\n return undefined;\n }\n }\n\n public static setChannelSetting<KeyEnum>(key: KeyEnum | SpxStorageKeyEnum, settingValue: any): void {\n const companySettings = this.getSetting(SpxStorageKeyEnum.channelSettings);\n let storageObj;\n\n if (companySettings) {\n storageObj = JSON.parse(companySettings);\n } else {\n storageObj = {};\n }\n\n if (!storageObj[this.channelId]) {\n storageObj[this.channelId] = {};\n }\n\n storageObj[this.channelId][key] = settingValue;\n this.setSetting(SpxStorageKeyEnum.channelSettings, JSON.stringify(storageObj));\n }\n}\n\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"IAAY;AAAZ,CAAA,UAAY,iBAAiB,EAAA;AACzB,IAAA,iBAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAC3B,IAAA,iBAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,iBAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAC3B,IAAA,iBAAA,CAAA,iBAAA,CAAA,GAAA,iBAAmC;AACnC,IAAA,iBAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,iBAAA,CAAA,kBAAA,CAAA,GAAA,kBAAqC;AACrC,IAAA,iBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,iBAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACnB,CAAC,
|
|
1
|
+
{"version":3,"file":"softpak-components-spx-storage.mjs","sources":["../../../../projects/softpak/components/spx-storage/src/spx-storage-key.enum.ts","../../../../projects/softpak/components/spx-storage/src/spx-storage.class.ts","../../../../projects/softpak/components/spx-storage/softpak-components-spx-storage.ts"],"sourcesContent":["export enum SpxStorageKeyEnum {\n afterSignIn = 'afterSignIn',\n brand = 'brand',\n bundleVersion = 'bundleVersion',\n channelType = 'channelType',\n channelSettings = 'companySettings',\n liveUpdate = 'liveUpdate',\n platform = 'platform',\n platformVersion = 'platformVersion',\n token = 'token',\n updateInProgress = 'updateInProgress',\n randomDeviceId = 'randomDeviceId',\n release = 'release',\n patch = 'patch',\n};\n","import { SpxStorageKeyEnum } from './spx-storage-key.enum';\n\nexport class SpxStorage {\n private static get channelId() {\n return `${this.getSetting(SpxStorageKeyEnum.brand)?.toUpperCase()}_${this.getSetting(SpxStorageKeyEnum.channelType)?.toUpperCase()}`;\n }\n\n public static clearSetting<KeyEnum>(key: KeyEnum | SpxStorageKeyEnum): void {\n localStorage.removeItem(key as string);\n }\n\n public static getSetting<KeyEnum>(key: KeyEnum | SpxStorageKeyEnum): string | null {\n return localStorage.getItem(key as string);\n }\n\n public static setSetting<KeyEnum>(key: KeyEnum | SpxStorageKeyEnum, settingValue: string): void {\n localStorage.setItem(key as string, settingValue);\n }\n\n public static getChannelSetting<KeyEnum>(key: KeyEnum | SpxStorageKeyEnum): string | undefined {\n let storageObj;\n const storageObjStr = localStorage.getItem(SpxStorageKeyEnum.channelSettings);\n\n if (storageObjStr) {\n storageObj = JSON.parse(storageObjStr);\n if (!storageObj[this.channelId]) {\n return undefined;\n }\n return storageObj[this.channelId][key];\n } else {\n return undefined;\n }\n }\n\n public static setChannelSetting<KeyEnum>(key: KeyEnum | SpxStorageKeyEnum, settingValue: any): void {\n const companySettings = this.getSetting(SpxStorageKeyEnum.channelSettings);\n let storageObj;\n\n if (companySettings) {\n storageObj = JSON.parse(companySettings);\n } else {\n storageObj = {};\n }\n\n if (!storageObj[this.channelId]) {\n storageObj[this.channelId] = {};\n }\n\n storageObj[this.channelId][key] = settingValue;\n this.setSetting(SpxStorageKeyEnum.channelSettings, JSON.stringify(storageObj));\n }\n}\n\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"IAAY;AAAZ,CAAA,UAAY,iBAAiB,EAAA;AACzB,IAAA,iBAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAC3B,IAAA,iBAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,iBAAA,CAAA,eAAA,CAAA,GAAA,eAA+B;AAC/B,IAAA,iBAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAC3B,IAAA,iBAAA,CAAA,iBAAA,CAAA,GAAA,iBAAmC;AACnC,IAAA,iBAAA,CAAA,YAAA,CAAA,GAAA,YAAyB;AACzB,IAAA,iBAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrB,IAAA,iBAAA,CAAA,iBAAA,CAAA,GAAA,iBAAmC;AACnC,IAAA,iBAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,iBAAA,CAAA,kBAAA,CAAA,GAAA,kBAAqC;AACrC,IAAA,iBAAA,CAAA,gBAAA,CAAA,GAAA,gBAAiC;AACjC,IAAA,iBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,iBAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACnB,CAAC,EAdW,iBAAiB,KAAjB,iBAAiB,GAc5B,EAAA,CAAA,CAAA;AAAA;;MCZY,UAAU,CAAA;AACX,IAAA,WAAW,SAAS,GAAA;QACxB,OAAO,CAAA,EAAG,IAAI,CAAC,UAAU,CAAC,iBA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,EAAE;;QAGnC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,GAAG,YAAY;AAC9C,QAAA,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;;AAErF;;ACnDD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@softpak/components",
|
|
3
|
-
"version": "19.10.
|
|
3
|
+
"version": "19.10.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "19.x.x",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"@capacitor/device": "6.x.x || 7.x.x",
|
|
9
9
|
"@capacitor/live-updates": "0.3.x || 0.4.x",
|
|
10
10
|
"@capawesome/capacitor-app-update": "6.x.x || 7.x.x",
|
|
11
|
-
"@fortawesome/free-solid-svg-icons": "
|
|
11
|
+
"@fortawesome/free-solid-svg-icons": "6.x.x",
|
|
12
12
|
"@ionic/angular": "8.x.x",
|
|
13
13
|
"@ngrx/effects": "19.x.x",
|
|
14
14
|
"@ngrx/store": "19.x.x",
|
|
@@ -61,14 +61,14 @@
|
|
|
61
61
|
"types": "./spx-channel-selection/index.d.ts",
|
|
62
62
|
"default": "./fesm2022/softpak-components-spx-channel-selection.mjs"
|
|
63
63
|
},
|
|
64
|
-
"./spx-check-digit": {
|
|
65
|
-
"types": "./spx-check-digit/index.d.ts",
|
|
66
|
-
"default": "./fesm2022/softpak-components-spx-check-digit.mjs"
|
|
67
|
-
},
|
|
68
64
|
"./spx-form-section": {
|
|
69
65
|
"types": "./spx-form-section/index.d.ts",
|
|
70
66
|
"default": "./fesm2022/softpak-components-spx-form-section.mjs"
|
|
71
67
|
},
|
|
68
|
+
"./spx-check-digit": {
|
|
69
|
+
"types": "./spx-check-digit/index.d.ts",
|
|
70
|
+
"default": "./fesm2022/softpak-components-spx-check-digit.mjs"
|
|
71
|
+
},
|
|
72
72
|
"./spx-form-view": {
|
|
73
73
|
"types": "./spx-form-view/index.d.ts",
|
|
74
74
|
"default": "./fesm2022/softpak-components-spx-form-view.mjs"
|
|
@@ -85,14 +85,14 @@
|
|
|
85
85
|
"types": "./spx-navigation/index.d.ts",
|
|
86
86
|
"default": "./fesm2022/softpak-components-spx-navigation.mjs"
|
|
87
87
|
},
|
|
88
|
-
"./spx-number-check": {
|
|
89
|
-
"types": "./spx-number-check/index.d.ts",
|
|
90
|
-
"default": "./fesm2022/softpak-components-spx-number-check.mjs"
|
|
91
|
-
},
|
|
92
88
|
"./spx-pagination": {
|
|
93
89
|
"types": "./spx-pagination/index.d.ts",
|
|
94
90
|
"default": "./fesm2022/softpak-components-spx-pagination.mjs"
|
|
95
91
|
},
|
|
92
|
+
"./spx-number-check": {
|
|
93
|
+
"types": "./spx-number-check/index.d.ts",
|
|
94
|
+
"default": "./fesm2022/softpak-components-spx-number-check.mjs"
|
|
95
|
+
},
|
|
96
96
|
"./spx-patch": {
|
|
97
97
|
"types": "./spx-patch/index.d.ts",
|
|
98
98
|
"default": "./fesm2022/softpak-components-spx-patch.mjs"
|
|
@@ -129,13 +129,13 @@
|
|
|
129
129
|
"types": "./spx-translate/index.d.ts",
|
|
130
130
|
"default": "./fesm2022/softpak-components-spx-translate.mjs"
|
|
131
131
|
},
|
|
132
|
-
"./spx-update": {
|
|
133
|
-
"types": "./spx-update/index.d.ts",
|
|
134
|
-
"default": "./fesm2022/softpak-components-spx-update.mjs"
|
|
135
|
-
},
|
|
136
132
|
"./spx-validation": {
|
|
137
133
|
"types": "./spx-validation/index.d.ts",
|
|
138
134
|
"default": "./fesm2022/softpak-components-spx-validation.mjs"
|
|
135
|
+
},
|
|
136
|
+
"./spx-update": {
|
|
137
|
+
"types": "./spx-update/index.d.ts",
|
|
138
|
+
"default": "./fesm2022/softpak-components-spx-update.mjs"
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
export declare enum SpxStorageKeyEnum {
|
|
2
2
|
afterSignIn = "afterSignIn",
|
|
3
3
|
brand = "brand",
|
|
4
|
+
bundleVersion = "bundleVersion",
|
|
4
5
|
channelType = "channelType",
|
|
5
6
|
channelSettings = "companySettings",
|
|
7
|
+
liveUpdate = "liveUpdate",
|
|
8
|
+
platform = "platform",
|
|
9
|
+
platformVersion = "platformVersion",
|
|
6
10
|
token = "token",
|
|
7
11
|
updateInProgress = "updateInProgress",
|
|
12
|
+
randomDeviceId = "randomDeviceId",
|
|
8
13
|
release = "release",
|
|
9
14
|
patch = "patch"
|
|
10
15
|
}
|