@telia-ace/widget-core 1.0.17 → 1.0.18-next.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/dist/bootstrap.d.ts +15 -0
- package/dist/environment.d.ts +48 -0
- package/dist/implementation.d.ts +7 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +329 -256
- package/dist/index.js.map +1 -1
- package/dist/plugin.d.ts +7 -0
- package/dist/version.d.ts +2 -0
- package/dist/widget-type.d.ts +7 -0
- package/package.json +4 -4
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BootstrappedImplementation } from '@webprovisions/bootstrapping';
|
|
2
|
+
import { ConfigureCallback } from '@webprovisions/platform';
|
|
3
|
+
import Implementation from './implementation';
|
|
4
|
+
export declare type BootstrapOptions = {
|
|
5
|
+
/**
|
|
6
|
+
* Resolver function for the root element to base the bootstrapping on.
|
|
7
|
+
*/
|
|
8
|
+
rootElementResolver?: () => HTMLElement;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Bootstraps an `Implementation` by scanning trigger elements and attaches them to
|
|
12
|
+
* their corresponding widgets.
|
|
13
|
+
*/
|
|
14
|
+
declare const _default: (implementation: Implementation, configure: ConfigureCallback, options?: BootstrapOptions) => Promise<BootstrappedImplementation>;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { BootstrappedImplementationConfiguration } from '@webprovisions/bootstrapping';
|
|
2
|
+
import { ConfigurationApiDefinition, Environment as EnvironmentBase, WidgetSelector } from '@webprovisions/platform';
|
|
3
|
+
import Implementation from './implementation';
|
|
4
|
+
export interface RuntimeConfiguration {
|
|
5
|
+
/**
|
|
6
|
+
* Extensions for the configuration API (optional).
|
|
7
|
+
*/
|
|
8
|
+
configurationApiExtensions?: ConfigurationApiDefinition[];
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The widget runtime.
|
|
12
|
+
*/
|
|
13
|
+
export default class Environment extends EnvironmentBase {
|
|
14
|
+
/**
|
|
15
|
+
* Version of the widget runtime.
|
|
16
|
+
*/
|
|
17
|
+
static version: string;
|
|
18
|
+
constructor(name: string, configurationApiExtensions?: ConfigurationApiDefinition[]);
|
|
19
|
+
createImplementation(configuration: BootstrappedImplementationConfiguration): Implementation;
|
|
20
|
+
/**
|
|
21
|
+
* Performs navigation for widgets matching the specified selector by invoking a
|
|
22
|
+
* 'navigate' command.
|
|
23
|
+
* @param selector Widget selector matching the widget(s) to perform navigation on.
|
|
24
|
+
* @param route Route name.
|
|
25
|
+
* @param params Route params.
|
|
26
|
+
*/
|
|
27
|
+
navigate(selector: WidgetSelector, route: string, params: {
|
|
28
|
+
[key: string]: string;
|
|
29
|
+
}): void;
|
|
30
|
+
/**
|
|
31
|
+
* Creates a runtime based on provided configuration.
|
|
32
|
+
* @param configuration Runtime configuration.
|
|
33
|
+
*/
|
|
34
|
+
static create(configuration?: RuntimeConfiguration): Environment;
|
|
35
|
+
/**
|
|
36
|
+
* Creates a widget runtime based on provided configuration and retains configuration handlers
|
|
37
|
+
* registered on global context. Use this factory to fully support the default embed script.
|
|
38
|
+
* Will return any existing widget runtime if available.
|
|
39
|
+
* @param configuration Runtime configuration.
|
|
40
|
+
* @param global Object to read configuration handlers from (default: window).
|
|
41
|
+
*/
|
|
42
|
+
static createFromGlobal(globalInstance: any, configuration?: RuntimeConfiguration): Environment;
|
|
43
|
+
/**
|
|
44
|
+
* Determines whether the specified object is a valid widget runtime.
|
|
45
|
+
* @param obj Object to compare.
|
|
46
|
+
*/
|
|
47
|
+
static isRuntime(obj: any): boolean;
|
|
48
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
export { default as ActionResolver } from './action-resolver';
|
|
2
|
+
export { default as bootstrap } from './bootstrap';
|
|
2
3
|
export { ActionsController, asDescriptor, componentConfigurationApi, ComponentNode, ComponentNodeController, ComponentPlatform, ComponentQuery, createChildren, createComponentModel, extendComponent, findComponent, findVisibleComponents, traverseComponents, } from './component-platform';
|
|
3
4
|
export type { ChangesetOptions, ChangesetProvider, ComponentDescriptor, ComponentHandlerOptions, ComponentNodeAttributes, ComponentNodeContext, ComponentNodeLayout, ComponentNodeProperties, ComponentNodeSettings, ComponentQueryRule, ExtendComponentHandler, ExtendComponentOptions, NormalizedComponentReference, Size, SwitchMap, WatchActionDelegate, } from './component-platform';
|
|
4
5
|
export { default as ComponentResolver } from './component-resolver';
|
|
5
6
|
export type { ReactComponent } from './component-resolver';
|
|
7
|
+
export { default as Environment } from './environment';
|
|
6
8
|
export { createEventSubscriber } from './event-subscriber';
|
|
7
9
|
export type { SubscribeDelegate } from './event-subscriber';
|
|
10
|
+
export { default as Implementation } from './implementation';
|
|
11
|
+
export { default as Plugin } from './plugin';
|
|
8
12
|
export * from './types';
|
|
13
|
+
export { default as version } from './version';
|
|
14
|
+
export { default as WidgetType } from './widget-type';
|