@telia-ace/widget-runtime-flamingo 1.1.2 → 1.1.3
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.
- package/component-platform-factory.d.ts +13 -0
- package/context/children.context.d.ts +4 -0
- package/context/component-node.context.d.ts +4 -0
- package/context/container.context.d.ts +4 -0
- package/context/context.context.d.ts +3 -0
- package/context/layout.context.d.ts +3 -0
- package/context/properties.context.d.ts +3 -0
- package/controllers/actions-controller.d.ts +14 -0
- package/core/create-lit-component.d.ts +11 -0
- package/core/get-render-state.d.ts +4 -0
- package/data-provider/data-provider.d.ts +24 -0
- package/data-provider/providers/guide-provider.plugin.d.ts +2 -0
- package/index-4be3f206.mjs +3409 -0
- package/index-5087564d.mjs +335 -0
- package/index-6dd00f59.js +1 -0
- package/index-e07bd0fb.js +206 -0
- package/{src/index.ts → index.d.ts} +1 -13
- package/index.js +1 -0
- package/index.mjs +17 -0
- package/mixins/widget-component.mixin.d.ts +24 -0
- package/package.json +1 -1
- package/render-049911af.mjs +458 -0
- package/render-f343a6c5.js +120 -0
- package/services.d.ts +5 -0
- package/ui/area.d.ts +9 -0
- package/ui/branding.d.ts +1 -0
- package/ui/get-css-props.d.ts +5 -0
- package/ui/get-layout-props.d.ts +9 -0
- package/ui/html-element-handlers.d.ts +14 -0
- package/ui/prepare-dom.d.ts +21 -0
- package/ui/render.d.ts +3 -0
- package/ui/trigger-component.d.ts +20 -0
- package/ui/view-outlet.d.ts +36 -0
- package/ui/wrapper.d.ts +21 -0
- package/widget.d.ts +54 -0
- package/.eslintrc.json +0 -30
- package/README.md +0 -11
- package/project.json +0 -48
- package/src/component-platform-factory.ts +0 -163
- package/src/context/children.context.ts +0 -4
- package/src/context/component-node.context.ts +0 -6
- package/src/context/container.context.ts +0 -6
- package/src/context/context.context.ts +0 -3
- package/src/context/layout.context.ts +0 -3
- package/src/context/properties.context.ts +0 -3
- package/src/controllers/actions-controller.ts +0 -55
- package/src/core/create-lit-component.ts +0 -31
- package/src/core/get-render-state.ts +0 -25
- package/src/data-provider/data-provider.ts +0 -87
- package/src/data-provider/providers/guide-provider.plugin.ts +0 -64
- package/src/declaration.d.ts +0 -2
- package/src/mixins/widget-component.mixin.ts +0 -231
- package/src/services.ts +0 -27
- package/src/ui/area.ts +0 -97
- package/src/ui/branding.ts +0 -25
- package/src/ui/get-css-props.ts +0 -23
- package/src/ui/get-layout-props.ts +0 -41
- package/src/ui/html-element-handlers.ts +0 -140
- package/src/ui/index.ts +0 -6
- package/src/ui/prepare-dom.ts +0 -164
- package/src/ui/render.ts +0 -19
- package/src/ui/trigger-component.ts +0 -200
- package/src/ui/view-outlet.ts +0 -172
- package/src/ui/wrapper.ts +0 -247
- package/src/vite.env.d.ts +0 -1
- package/src/widget.ts +0 -748
- package/tsconfig.json +0 -23
- package/tsconfig.lib.json +0 -10
- package/tsconfig.spec.json +0 -19
- package/vite.config.ts +0 -56
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ChangesetOptions, ChangesetProvider, ComponentNodeSettings, ComponentPlatform, ComponentQuery } from '@telia-ace/widget-core';
|
|
2
|
+
import { StorageWriter } from '@telia-ace/widget-services';
|
|
3
|
+
import { Container, Widget } from '@webprovisions/platform';
|
|
4
|
+
export declare class LocalStorageChangesetProvider implements ChangesetProvider {
|
|
5
|
+
private container;
|
|
6
|
+
private storageWriter;
|
|
7
|
+
constructor(container: Container, storageWriter: StorageWriter);
|
|
8
|
+
static create(container: Container): Promise<LocalStorageChangesetProvider>;
|
|
9
|
+
write(key: string, target: ComponentQuery, attributes: Partial<ComponentNodeSettings>, options: ChangesetOptions): Promise<any>;
|
|
10
|
+
remove(key: string): Promise<any>;
|
|
11
|
+
load(platform: ComponentPlatform): Promise<any>;
|
|
12
|
+
}
|
|
13
|
+
export declare const createPlatform: (widget: Widget) => Promise<ComponentPlatform>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactiveController, ReactiveControllerHost, ReactiveElement } from 'lit';
|
|
2
|
+
import { Container } from '@webprovisions/platform';
|
|
3
|
+
import { ComponentDescriptor } from '@telia-ace/widget-core';
|
|
4
|
+
export declare class ActionsController implements ReactiveController {
|
|
5
|
+
host: ReactiveControllerHost;
|
|
6
|
+
private _container?;
|
|
7
|
+
private _descriptor?;
|
|
8
|
+
constructor(host: ReactiveElement);
|
|
9
|
+
hostConnected(): void;
|
|
10
|
+
hostDisconnected(): void;
|
|
11
|
+
setDescriptor(descriptor: ComponentDescriptor): void;
|
|
12
|
+
setContainer(container: Container): void;
|
|
13
|
+
dispatch(key: string, value: Record<string, any> | string): Promise<void>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ExtendComponentHandler, ExtendComponentOptions } from '@telia-ace/widget-core';
|
|
2
|
+
import { Container } from '@webprovisions/platform';
|
|
3
|
+
/**
|
|
4
|
+
* Registers a Lit component on the component platform.
|
|
5
|
+
* @param container Container to register the component on.
|
|
6
|
+
* @param type Type name to resolve the component from configuration.
|
|
7
|
+
* @param component Promise resolving to the Lit component for rendering.
|
|
8
|
+
* @param fn Handler for controlling the component.
|
|
9
|
+
*/
|
|
10
|
+
declare const createLitComponent: (container: Container, type: string, component: any, fn?: ExtendComponentHandler, options?: ExtendComponentOptions) => Promise<void>;
|
|
11
|
+
export default createLitComponent;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { WidgetRenderState } from '@telia-ace/widget-core';
|
|
2
|
+
import { Container } from '@webprovisions/platform';
|
|
3
|
+
export declare const getRenderState: (container: Container) => Promise<WidgetRenderState>;
|
|
4
|
+
export declare const subscribeToRenderState: (container: Container, subscriptionFn: (origin: string, action: string) => void) => Promise<import("@webprovisions/platform").EventSubscriptionCancellation>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ComponentNodeController } from '@telia-ace/widget-core';
|
|
2
|
+
import { Container } from '@webprovisions/platform';
|
|
3
|
+
type DataResource = {
|
|
4
|
+
query: (input: Record<string, any>, providerSettings: Record<string, any>) => Promise<any>;
|
|
5
|
+
};
|
|
6
|
+
type DataProviderSettings = Record<string, any>;
|
|
7
|
+
export declare const getProvider: (component: ComponentNodeController, container: Container) => Promise<{
|
|
8
|
+
provider: DataProvider;
|
|
9
|
+
settings: {};
|
|
10
|
+
}>;
|
|
11
|
+
export declare const createDataProvider: (component: ComponentNodeController, container: Container) => Promise<{
|
|
12
|
+
addResource: (resourceKey: string, resource: DataResource) => void;
|
|
13
|
+
getData: (resourceKey: string, input: Record<string, any>) => Promise<any>;
|
|
14
|
+
}>;
|
|
15
|
+
export declare class DataProvider {
|
|
16
|
+
container: Container;
|
|
17
|
+
private resources;
|
|
18
|
+
private nodeConfiguration;
|
|
19
|
+
constructor(container: Container);
|
|
20
|
+
getData(resourceKey: string, input: Record<string, any>, providerSettings: Record<string, any>): Promise<any>;
|
|
21
|
+
addResource(resourceKey: string, resource: DataResource): void;
|
|
22
|
+
applyComponentNodeSettings(nodeId: string, value: DataProviderSettings): void;
|
|
23
|
+
}
|
|
24
|
+
export {};
|