@telia-ace/widget-runtime-flamingo 1.1.78 → 1.1.79-rc.1
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/package.json +1 -1
- package/component-platform-factory.d.ts +0 -13
- package/context/children.context.d.ts +0 -4
- package/context/component-node.context.d.ts +0 -4
- package/context/container.context.d.ts +0 -4
- package/context/context.context.d.ts +0 -3
- package/context/layout.context.d.ts +0 -3
- package/context/properties.context.d.ts +0 -3
- package/controllers/actions-controller.d.ts +0 -14
- package/core/create-lit-component.d.ts +0 -11
- package/core/get-render-state.d.ts +0 -4
- package/data-provider/data-provider.d.ts +0 -24
- package/data-provider/providers/guide-provider.plugin.d.ts +0 -2
- package/index.d.ts +0 -12
- package/mixins/widget-component.mixin.d.ts +0 -24
- package/services.d.ts +0 -5
- package/ui/area.d.ts +0 -9
- package/ui/branding.d.ts +0 -1
- package/ui/get-css-props.d.ts +0 -5
- package/ui/get-layout-props.d.ts +0 -9
- package/ui/html-element-handlers.d.ts +0 -14
- package/ui/prepare-dom.d.ts +0 -21
- package/ui/render.d.ts +0 -3
- package/ui/trigger-component.d.ts +0 -20
- package/ui/view-outlet.d.ts +0 -36
- package/ui/wrapper.d.ts +0 -22
- package/widget.d.ts +0 -54
package/package.json
CHANGED
|
@@ -1,13 +0,0 @@
|
|
|
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>;
|
|
@@ -1,14 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
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;
|
|
@@ -1,4 +0,0 @@
|
|
|
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>;
|
|
@@ -1,24 +0,0 @@
|
|
|
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 {};
|
package/index.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export { default as GridWidget, default as Widget } from './widget';
|
|
2
|
-
export { childrenContext } from './context/children.context';
|
|
3
|
-
export { descriptorContext } from './context/component-node.context';
|
|
4
|
-
export { containerContext } from './context/container.context';
|
|
5
|
-
export { contextCtx } from './context/context.context';
|
|
6
|
-
export { layoutCtx } from './context/layout.context';
|
|
7
|
-
export { propertiesCtx } from './context/properties.context';
|
|
8
|
-
export { ActionsController } from './controllers/actions-controller';
|
|
9
|
-
export { DataProvider, createDataProvider, } from './data-provider/data-provider';
|
|
10
|
-
export { GuideProviderPlugin } from './data-provider/providers/guide-provider.plugin';
|
|
11
|
-
export { default as createWebComponent } from './core/create-lit-component';
|
|
12
|
-
export { WidgetComponent } from './mixins/widget-component.mixin';
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
import { childrenContext } from '../context/children.context';
|
|
3
|
-
import { propertiesCtx } from '../context/properties.context';
|
|
4
|
-
import { contextCtx } from '../context/context.context';
|
|
5
|
-
import { ContextProvider } from '@lit/context';
|
|
6
|
-
import { Container } from '@webprovisions/platform';
|
|
7
|
-
import { ComponentDescriptor } from '@telia-ace/widget-core';
|
|
8
|
-
import { ActionsController } from '../controllers/actions-controller';
|
|
9
|
-
type Constructor<T = {}> = new (...args: any[]) => T;
|
|
10
|
-
export declare class WidgetComponentInterface {
|
|
11
|
-
entry: string;
|
|
12
|
-
descriptor?: ComponentDescriptor;
|
|
13
|
-
component?: any;
|
|
14
|
-
layout: Record<string, any>;
|
|
15
|
-
context: Record<string, any>;
|
|
16
|
-
properties: Record<string, any>;
|
|
17
|
-
container?: Container;
|
|
18
|
-
actions: ActionsController;
|
|
19
|
-
_contextProvider: ContextProvider<typeof contextCtx>;
|
|
20
|
-
_propertiesProvider: ContextProvider<typeof propertiesCtx>;
|
|
21
|
-
_childrenProvider: ContextProvider<typeof childrenContext>;
|
|
22
|
-
}
|
|
23
|
-
export declare const WidgetComponent: <T extends Constructor<LitElement>>(superClass: T) => Constructor<WidgetComponentInterface> & T;
|
|
24
|
-
export {};
|
package/services.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Container } from '@webprovisions/platform';
|
|
2
|
-
export declare const createStorageService: (_container: Container) => Promise<import("@telia-ace/widget-services").StorageProvider>;
|
|
3
|
-
export declare const createActionResolver: (container: Container) => Promise<import("@telia-ace/widget-core").ActionResolver>;
|
|
4
|
-
export declare const createComponentResolver: (container: Container) => Promise<import("@telia-ace/widget-core").ComponentResolver>;
|
|
5
|
-
export declare const createComponentPlatform: (container: Container) => Promise<import("@telia-ace/widget-core").ComponentPlatform>;
|
package/ui/area.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
declare const WidgetElement: (new (...args: any[]) => import("../mixins/widget-component.mixin").WidgetComponentInterface) & typeof LitElement;
|
|
3
|
-
export declare class AreaComponent extends WidgetElement {
|
|
4
|
-
static styles: import("lit").CSSResultGroup[];
|
|
5
|
-
private _resolveChildComponent;
|
|
6
|
-
private _resolveAllChildren;
|
|
7
|
-
render(): import("lit").TemplateResult<1>;
|
|
8
|
-
}
|
|
9
|
-
export {};
|
package/ui/branding.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const mapBranding: (context: Record<string, any>, el: HTMLElement) => void;
|
package/ui/get-css-props.d.ts
DELETED
package/ui/get-layout-props.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
type LayoutSettings = {
|
|
2
|
-
values: Record<string, string>;
|
|
3
|
-
breakpoints?: string[];
|
|
4
|
-
};
|
|
5
|
-
export declare const getLayoutProps: (settings: LayoutSettings[], activeBreakpoints: string[], hasTrigger?: boolean) => {
|
|
6
|
-
type: string;
|
|
7
|
-
styles: Record<string, string>;
|
|
8
|
-
};
|
|
9
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export type TriggerElementOptions = {
|
|
2
|
-
symbol?: {
|
|
3
|
-
type: string;
|
|
4
|
-
content: string;
|
|
5
|
-
};
|
|
6
|
-
widgetName: string;
|
|
7
|
-
label?: string;
|
|
8
|
-
ariaLabel?: string;
|
|
9
|
-
tooltip?: string;
|
|
10
|
-
};
|
|
11
|
-
export declare function createTriggerElement(element: HTMLElement, options: TriggerElementOptions): () => void;
|
|
12
|
-
export declare function setInactive(elements: HTMLElement | HTMLElement[], title?: string): void;
|
|
13
|
-
export declare function setLoading(elements: HTMLElement | HTMLElement[]): void;
|
|
14
|
-
export declare function setActive(elements: HTMLElement | HTMLElement[], title?: string): void;
|
package/ui/prepare-dom.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ViewOutletOptions } from './view-outlet';
|
|
2
|
-
import { Container } from '@webprovisions/platform';
|
|
3
|
-
declare enum ProvidedElements {
|
|
4
|
-
None = "none",
|
|
5
|
-
WidgetDOM = "widgetDOM",
|
|
6
|
-
TriggerDOM = "triggerDOM",
|
|
7
|
-
Both = "both"
|
|
8
|
-
}
|
|
9
|
-
export declare enum TriggerType {
|
|
10
|
-
Inline = "inline",
|
|
11
|
-
Link = "link",
|
|
12
|
-
Badge = "badge",
|
|
13
|
-
Unsupported = "unsupported"
|
|
14
|
-
}
|
|
15
|
-
export declare const determineProvidedElements: (widgetDOMElement?: HTMLElement, triggerDOMElement?: HTMLElement) => ProvidedElements;
|
|
16
|
-
export declare const determineTriggerType: (triggerDefinition?: any) => TriggerType;
|
|
17
|
-
type PrepareDOMElementsOutput = ViewOutletOptions & {
|
|
18
|
-
callback?: () => void;
|
|
19
|
-
};
|
|
20
|
-
export declare const prepareDOMElements: (container: Container, name: string, providedWidgetElement?: HTMLElement, providedTriggerElement?: HTMLElement, triggerDefinition?: any, waitWithReplace?: boolean) => Promise<PrepareDOMElementsOutput>;
|
|
21
|
-
export {};
|
package/ui/render.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Container } from '@webprovisions/platform';
|
|
2
|
-
import { LitElement, nothing } from 'lit';
|
|
3
|
-
type SymbolType = {
|
|
4
|
-
type: 'Uri' | 'Svg' | 'FontAwesome' | 'Text' | string;
|
|
5
|
-
content: string;
|
|
6
|
-
};
|
|
7
|
-
export declare class TriggerComponent extends LitElement {
|
|
8
|
-
static styles: import("lit").CSSResult[];
|
|
9
|
-
symbol?: SymbolType;
|
|
10
|
-
container?: Container;
|
|
11
|
-
active: boolean;
|
|
12
|
-
loaded: boolean;
|
|
13
|
-
icon: any;
|
|
14
|
-
connectedCallback(): Promise<void>;
|
|
15
|
-
_toggleActive(): void;
|
|
16
|
-
_applyBranding(): void;
|
|
17
|
-
_renderSymbol(symbol?: SymbolType): Promise<import("lit").TemplateResult<1> | typeof nothing | undefined>;
|
|
18
|
-
render(): import("lit").TemplateResult<1>;
|
|
19
|
-
}
|
|
20
|
-
export {};
|
package/ui/view-outlet.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { Container } from '@webprovisions/platform';
|
|
2
|
-
import { TriggerType } from './prepare-dom';
|
|
3
|
-
type SymbolType = {
|
|
4
|
-
type: 'Uri' | 'Svg' | 'FontAwesome' | 'Text' | string;
|
|
5
|
-
content: string;
|
|
6
|
-
};
|
|
7
|
-
export type BadgeOptions = {
|
|
8
|
-
symbol?: SymbolType;
|
|
9
|
-
label?: string;
|
|
10
|
-
ariaLabel?: string;
|
|
11
|
-
openTooltip?: string;
|
|
12
|
-
closedTooltip?: string;
|
|
13
|
-
};
|
|
14
|
-
export type ViewOutletOptions = {
|
|
15
|
-
widgetDOMElement: HTMLElement;
|
|
16
|
-
triggerDOMElement?: HTMLElement;
|
|
17
|
-
triggerOptions?: BadgeOptions | boolean;
|
|
18
|
-
triggerType: TriggerType;
|
|
19
|
-
cachedOriginals: {
|
|
20
|
-
widgetDOMElement?: Node;
|
|
21
|
-
triggerDOMElement?: Node;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
export declare class ViewOutlet {
|
|
25
|
-
options: ViewOutletOptions;
|
|
26
|
-
container: Container;
|
|
27
|
-
private unsubscribe;
|
|
28
|
-
constructor(container: Container, options: ViewOutletOptions);
|
|
29
|
-
/**
|
|
30
|
-
* Renders the view outlet to the DOM.
|
|
31
|
-
*/
|
|
32
|
-
render(): Promise<void>;
|
|
33
|
-
renderBadge(options: BadgeOptions): void;
|
|
34
|
-
dispose(): Promise<void>;
|
|
35
|
-
}
|
|
36
|
-
export {};
|
package/ui/wrapper.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { LitElement, nothing } from 'lit';
|
|
2
|
-
import { Ref } from 'lit/directives/ref.js';
|
|
3
|
-
import { Container } from '@webprovisions/platform';
|
|
4
|
-
import { ComponentPlatform, WidgetRenderState } from '@telia-ace/widget-core';
|
|
5
|
-
export declare class WrapperComponent extends LitElement {
|
|
6
|
-
static styles: import("lit").CSSResult;
|
|
7
|
-
private _provider;
|
|
8
|
-
container: Container | undefined;
|
|
9
|
-
wrapperRef: Ref<HTMLDivElement>;
|
|
10
|
-
private _unsubscribeRenderState?;
|
|
11
|
-
private _unsubscribePropChange?;
|
|
12
|
-
componentPlatform: ComponentPlatform | undefined;
|
|
13
|
-
renderState?: WidgetRenderState;
|
|
14
|
-
breakpoints: string[];
|
|
15
|
-
breakpointsSet: boolean;
|
|
16
|
-
entry: string | undefined;
|
|
17
|
-
constructor();
|
|
18
|
-
connectedCallback(): void;
|
|
19
|
-
disconnectedCallback(): void;
|
|
20
|
-
private applyBranding;
|
|
21
|
-
render(): import("lit").TemplateResult<1> | typeof nothing;
|
|
22
|
-
}
|
package/widget.d.ts
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { WidgetRenderState, WidgetSettings } from '@telia-ace/widget-core';
|
|
2
|
-
import { BootstrappingActivationData } from '@webprovisions/bootstrapping';
|
|
3
|
-
import { Container, EventSubscriptionCancellation, WidgetType } from '@webprovisions/platform';
|
|
4
|
-
import { ViewOutlet } from '././ui/view-outlet';
|
|
5
|
-
export declare enum InitialRenderState {
|
|
6
|
-
Open = "open",
|
|
7
|
-
Closed = "closed",
|
|
8
|
-
Hidden = "hidden",
|
|
9
|
-
Storage = "storage"
|
|
10
|
-
}
|
|
11
|
-
export type RenderData = {
|
|
12
|
-
widgetDOMElement?: HTMLElement;
|
|
13
|
-
triggerDOMElement?: HTMLElement;
|
|
14
|
-
key?: string;
|
|
15
|
-
open?: boolean;
|
|
16
|
-
withRenderState?: InitialRenderState;
|
|
17
|
-
};
|
|
18
|
-
export type AttachData = {
|
|
19
|
-
widgetDOMElement?: HTMLElement;
|
|
20
|
-
triggerDOMElement?: HTMLElement;
|
|
21
|
-
key?: string;
|
|
22
|
-
withRenderState?: InitialRenderState;
|
|
23
|
-
};
|
|
24
|
-
export default class Widget extends WidgetType {
|
|
25
|
-
outlets: Map<string, ViewOutlet>;
|
|
26
|
-
activated: Promise<void> | undefined;
|
|
27
|
-
subs: EventSubscriptionCancellation[];
|
|
28
|
-
constructor(container: Container);
|
|
29
|
-
handleBootstrapping: (activationData: BootstrappingActivationData) => void;
|
|
30
|
-
initialize(): Promise<void>;
|
|
31
|
-
attach(attachData?: AttachData): any;
|
|
32
|
-
detach(key?: string): void;
|
|
33
|
-
private triggerStateIfApplicable;
|
|
34
|
-
private getOrCreateViewOutlet;
|
|
35
|
-
render(renderData?: RenderData): any;
|
|
36
|
-
activate(data?: Record<string, any>): void;
|
|
37
|
-
setSettings(fn: (settings: WidgetSettings) => Promise<Partial<WidgetSettings>>): Promise<WidgetSettings>;
|
|
38
|
-
clearSettings(): Promise<void>;
|
|
39
|
-
action({ action, value }: {
|
|
40
|
-
action: string;
|
|
41
|
-
value?: any;
|
|
42
|
-
}): Promise<void>;
|
|
43
|
-
renderState(): Promise<WidgetRenderState>;
|
|
44
|
-
hide(): Promise<void>;
|
|
45
|
-
open(): Promise<void>;
|
|
46
|
-
close(): Promise<void>;
|
|
47
|
-
show(): Promise<void>;
|
|
48
|
-
private onAction;
|
|
49
|
-
private setRenderState;
|
|
50
|
-
private onOpen;
|
|
51
|
-
private onClose;
|
|
52
|
-
private setTriggerState;
|
|
53
|
-
deactivate(): Promise<void[]>;
|
|
54
|
-
}
|