@telia-ace/widget-core-flamingo 1.1.72-rc.2 → 1.1.72-rc.21
Sign up to get free protection for your applications and to get access to all the features.
- package/bootstrap.d.ts +4 -1
- package/index.js +54 -35
- package/index.mjs +507 -457
- package/models/application.d.ts +1 -0
- package/models/site.d.ts +2 -0
- package/package.json +1 -1
- package/services/site-api.d.ts +1 -0
- package/services/storage.service.d.ts +5 -2
- package/services/widget-api.d.ts +1 -2
package/models/application.d.ts
CHANGED
package/models/site.d.ts
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import { IHttpClient } from '../services/http-client.service';
|
1
2
|
import { SiteAPI } from '../services/site-api';
|
2
3
|
import { InitConfig } from '../types';
|
3
4
|
import { Environment } from './environment';
|
@@ -10,6 +11,7 @@ export declare class Site {
|
|
10
11
|
constructor(urlOrConfig: string | InitConfig);
|
11
12
|
load(url: string): Promise<void>;
|
12
13
|
loadFromConfig(config: InitConfig): void;
|
14
|
+
setHttpClient(client: IHttpClient): void;
|
13
15
|
bootstrap(handler: (environment: Environment) => void): Promise<void>;
|
14
16
|
private addGlobal;
|
15
17
|
}
|
package/package.json
CHANGED
package/services/site-api.d.ts
CHANGED
@@ -1,16 +1,19 @@
|
|
1
1
|
export declare enum StorageCategory {
|
2
|
-
|
3
|
-
|
2
|
+
Necessary = "necessary",
|
3
|
+
Functional = "functional",
|
4
4
|
Analytics = "analytics"
|
5
5
|
}
|
6
6
|
export declare class StorageService {
|
7
7
|
private storage;
|
8
8
|
private policy;
|
9
9
|
private widgetId;
|
10
|
+
private disallowedKeys;
|
10
11
|
constructor(widgetId: string, storageType: 'localStorage' | 'sessionStorage', policy: Record<StorageCategory, boolean>);
|
11
12
|
set<T>(key: string, value: T, category: StorageCategory): void;
|
12
13
|
get<T>(key: string): T | null;
|
13
14
|
removeItem(key: string): void;
|
15
|
+
enforcePolicy(): void;
|
14
16
|
updatePolicy(newPolicy: Record<StorageCategory, boolean>): void;
|
17
|
+
disallowKey(key: string): void;
|
15
18
|
private _prefixKey;
|
16
19
|
}
|