@telia-ace/widget-core-flamingo 1.1.70-rc.25 → 1.1.70-rc.26
Sign up to get free protection for your applications and to get access to all the features.
- package/components/trigger.component.d.ts +3 -0
- package/index.js +36 -30
- package/index.mjs +371 -282
- package/models/application.d.ts +2 -0
- package/models/environment.d.ts +12 -0
- package/models/site.d.ts +3 -1
- package/package.json +1 -1
- package/services/site-api.d.ts +6 -0
- package/services/widget-api.d.ts +10 -0
package/models/application.d.ts
CHANGED
@@ -4,6 +4,7 @@ import { Wrapper } from '../components/wrapper.component';
|
|
4
4
|
import { ComponentPlatform } from '../services/component-platform';
|
5
5
|
import { StorageService } from '../services/storage.service';
|
6
6
|
import { TextsService } from '../services/texts.service';
|
7
|
+
import { WidgetAPI } from '../services/widget-api';
|
7
8
|
import { ApplicationOptions, PluginType, RenderStrategy, TriggerIcon, WidgetAnchor, WidgetConfig } from '../types';
|
8
9
|
import { Container } from './container';
|
9
10
|
export declare class Application {
|
@@ -24,6 +25,7 @@ export declare class Application {
|
|
24
25
|
private componentResolver;
|
25
26
|
private components;
|
26
27
|
trigger: Trigger | null;
|
28
|
+
api: WidgetAPI;
|
27
29
|
constructor(id: string, name: string, container: Container, settings: WidgetConfig, options: ApplicationOptions);
|
28
30
|
activate(): Promise<void>;
|
29
31
|
private loadPlugins;
|
package/models/environment.d.ts
CHANGED
@@ -1,13 +1,25 @@
|
|
1
1
|
import { Application } from './application';
|
2
2
|
import { Container } from './container';
|
3
3
|
import { ApplicationOptions, PluginType, WidgetConfig } from '../types';
|
4
|
+
import { WidgetAPI } from '../services/widget-api';
|
5
|
+
import { SiteAPI } from '../services/site-api';
|
6
|
+
import { Site } from './site';
|
7
|
+
export type WidgetAPIHandler = (widget?: WidgetAPI) => void;
|
8
|
+
export type SiteConfigurationHandler = (site: SiteAPI) => void;
|
4
9
|
export declare class Environment {
|
5
10
|
applications: Application[];
|
6
11
|
container: Container;
|
12
|
+
private bootstrapped;
|
13
|
+
private site;
|
14
|
+
widgetAPIHandlers: Map<string, WidgetAPIHandler[]>;
|
15
|
+
siteConfigurationHandlers: SiteConfigurationHandler[];
|
7
16
|
constructor();
|
8
17
|
bootstrap(): Promise<void>;
|
9
18
|
private activate;
|
10
19
|
private notifyWidgetsOfCreation;
|
20
|
+
configure(delegate: SiteConfigurationHandler): void;
|
21
|
+
widget(name: string, delegate: WidgetAPIHandler): void;
|
11
22
|
registerApp(id: string, name: string, config: WidgetConfig, options: ApplicationOptions): void;
|
23
|
+
registerSite(site: Site): void;
|
12
24
|
plugin(plugin: PluginType): this;
|
13
25
|
}
|
package/models/site.d.ts
CHANGED
@@ -1,10 +1,12 @@
|
|
1
|
+
import { SiteAPI } from '../services/site-api';
|
1
2
|
import { InitConfig } from '../types';
|
2
3
|
import { Environment } from './environment';
|
3
4
|
export declare class Site {
|
4
|
-
|
5
|
+
environment?: Environment;
|
5
6
|
private configurations;
|
6
7
|
private url?;
|
7
8
|
private httpClient;
|
9
|
+
api: SiteAPI;
|
8
10
|
constructor(urlOrConfig: string | InitConfig);
|
9
11
|
load(url: string): Promise<void>;
|
10
12
|
loadFromConfig(config: InitConfig): void;
|
package/package.json
CHANGED