@telia-ace/widget-core-flamingo 1.1.70-rc.24 → 1.1.70-rc.25
Sign up to get free protection for your applications and to get access to all the features.
- package/index.d.ts +1 -1
- package/index.js +33 -33
- package/index.mjs +437 -406
- package/package.json +1 -1
- package/services/storage.service.d.ts +12 -3
package/package.json
CHANGED
@@ -1,7 +1,16 @@
|
|
1
|
+
export declare enum StorageCategory {
|
2
|
+
Mandatory = "mandatory",
|
3
|
+
Preferences = "preferences",
|
4
|
+
Analytics = "analytics"
|
5
|
+
}
|
1
6
|
export declare class StorageService {
|
7
|
+
private storage;
|
8
|
+
private policy;
|
2
9
|
private widgetId;
|
3
|
-
constructor(widgetId: string);
|
4
|
-
|
5
|
-
set(key: string, value: string): void;
|
10
|
+
constructor(widgetId: string, storageType: 'localStorage' | 'sessionStorage', policy: Record<StorageCategory, boolean>);
|
11
|
+
set<T>(key: string, value: T, category: StorageCategory): void;
|
6
12
|
get<T>(key: string): T | null;
|
13
|
+
removeItem(key: string): void;
|
14
|
+
updatePolicy(newPolicy: Record<StorageCategory, boolean>): void;
|
15
|
+
private _prefixKey;
|
7
16
|
}
|