@telia-ace/widget-core 1.0.19-next.0 → 1.0.20-next.0
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/action-resolver.d.ts +1 -1
- package/dist/bootstrap.d.ts +1 -1
- package/dist/component-platform/actions-controller.d.ts +6 -6
- package/dist/component-platform/component-node-collection.d.ts +1 -1
- package/dist/component-platform/component-node.d.ts +14 -14
- package/dist/component-platform/component-platform.d.ts +3 -3
- package/dist/component-platform/component-query.d.ts +1 -1
- package/dist/component-platform/create-component-model.d.ts +4 -4
- package/dist/component-platform/custom-component-handler.d.ts +1 -1
- package/dist/component-platform/descriptor.d.ts +1 -1
- package/dist/component-platform/extend-component.d.ts +2 -2
- package/dist/component-platform/state-processor.d.ts +4 -4
- package/dist/component-resolver.d.ts +1 -1
- package/dist/event-subscriber.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/types/configuration.d.ts +12 -12
- package/dist/types/ui.d.ts +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Container, EventSubscriptionCancellation } from '@webprovisions/platform';
|
|
2
|
-
export
|
|
2
|
+
export type Action = (origin: string, action: string, value?: any) => void;
|
|
3
3
|
export default class ActionResolver {
|
|
4
4
|
private events;
|
|
5
5
|
constructor(container: Container);
|
package/dist/bootstrap.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BootstrappedImplementation } from '@webprovisions/bootstrapping';
|
|
2
2
|
import { ConfigureCallback } from '@webprovisions/platform';
|
|
3
3
|
import Implementation from './implementation';
|
|
4
|
-
export
|
|
4
|
+
export type BootstrapOptions = {
|
|
5
5
|
/**
|
|
6
6
|
* Resolver function for the root element to base the bootstrapping on.
|
|
7
7
|
*/
|
|
@@ -3,15 +3,15 @@ import { ComponentNodeController } from './component-controller';
|
|
|
3
3
|
import { ComponentNode } from './component-node';
|
|
4
4
|
import { ComponentPlatform } from './component-platform';
|
|
5
5
|
import { ComponentQuery } from './component-query';
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
6
|
+
export type ActionData = any;
|
|
7
|
+
export type ActionHandler = (data: any, options: any, instance: ComponentNodeController) => any;
|
|
8
|
+
export type NextActionDelegate = (data: any, options?: any) => Promise<any>;
|
|
9
|
+
export type WatchActionDelegate = (input: ActionData, next: NextActionDelegate, instance: ComponentNodeController) => Promise<any> | any;
|
|
10
|
+
export type ActionWatcherContext = {
|
|
11
11
|
source: ComponentNode;
|
|
12
12
|
action: string;
|
|
13
13
|
};
|
|
14
|
-
export
|
|
14
|
+
export type ActionsState = {
|
|
15
15
|
handlers: {
|
|
16
16
|
fn: ActionHandler;
|
|
17
17
|
key: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EventManager } from '@webprovisions/platform';
|
|
2
2
|
import { ComponentNode } from './component-node';
|
|
3
3
|
import { SwitchMap } from './component-platform';
|
|
4
|
-
export
|
|
4
|
+
export type QueryDescriptor = {
|
|
5
5
|
id?: string;
|
|
6
6
|
type?: string;
|
|
7
7
|
name?: string;
|
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
import { Container, EventManager } from '@webprovisions/platform';
|
|
2
2
|
import { Breakpoints } from '../types';
|
|
3
|
-
export
|
|
3
|
+
export type ComponentNodeEventData = {
|
|
4
4
|
node: ComponentNode;
|
|
5
5
|
};
|
|
6
|
-
export
|
|
7
|
-
export
|
|
6
|
+
export type RemoveChangeset = () => void;
|
|
7
|
+
export type ComponentNodeAttributes = {
|
|
8
8
|
tags: string[];
|
|
9
9
|
properties: ComponentNodeProperties;
|
|
10
10
|
context: ComponentNodeContext;
|
|
11
11
|
layout: ComponentNodeLayout;
|
|
12
12
|
};
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
13
|
+
export type ResolveComponentNodeProperties = (properties: ComponentNodeProperties) => Partial<ComponentNodeProperties> | void;
|
|
14
|
+
export type ResolveComponentNodeContext = (context: ComponentNodeContext) => Partial<ComponentNodeContext>;
|
|
15
|
+
export type ResolveComponentNodeLayout = (layout: ComponentNodeLayout) => Partial<ComponentNodeLayout>;
|
|
16
|
+
export type ComponentNodeSettings = {
|
|
17
17
|
tags?: string[];
|
|
18
18
|
properties?: ComponentNodeProperties | ResolveComponentNodeProperties;
|
|
19
19
|
context?: ComponentNodeContext | ResolveComponentNodeContext;
|
|
20
20
|
layout?: ComponentNodeLayout | ResolveComponentNodeLayout;
|
|
21
21
|
};
|
|
22
|
-
export
|
|
22
|
+
export type ComponentNodeProperties = {
|
|
23
23
|
[key: string]: any;
|
|
24
24
|
};
|
|
25
|
-
export
|
|
25
|
+
export type ComponentNodeContext = {
|
|
26
26
|
[key: string]: any;
|
|
27
27
|
};
|
|
28
|
-
export
|
|
28
|
+
export type ComponentNodeLayout = {
|
|
29
29
|
size?: Size;
|
|
30
30
|
indent?: number;
|
|
31
31
|
order?: number;
|
|
32
32
|
};
|
|
33
|
-
export
|
|
34
|
-
export
|
|
35
|
-
export
|
|
33
|
+
export type Size = number | 'full' | 'none';
|
|
34
|
+
export type UnmountComponentNode = () => void;
|
|
35
|
+
export type ChangesetOptions = {
|
|
36
36
|
breakpoints?: Breakpoints;
|
|
37
37
|
};
|
|
38
|
-
export
|
|
38
|
+
export type Changeset = [Partial<ComponentNodeSettings>, ChangesetOptions];
|
|
39
39
|
export declare class ComponentNode {
|
|
40
40
|
private events;
|
|
41
41
|
id: string;
|
|
@@ -5,13 +5,13 @@ import { ChangesetOptions, ComponentNode, ComponentNodeSettings, RemoveChangeset
|
|
|
5
5
|
import { ComponentNodeCollection } from './component-node-collection';
|
|
6
6
|
import { ComponentQuery } from './component-query';
|
|
7
7
|
import { CustomHandlerCallback } from './custom-component-handler';
|
|
8
|
-
export
|
|
8
|
+
export type MergeOptions = {
|
|
9
9
|
breakpoints?: string[];
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type SwitchMap = {
|
|
12
12
|
[id: string]: string;
|
|
13
13
|
};
|
|
14
|
-
export
|
|
14
|
+
export type ChangesetData = {
|
|
15
15
|
key?: string;
|
|
16
16
|
target: ComponentQuery;
|
|
17
17
|
attributes: Partial<ComponentNodeSettings>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AbstractComponentController } from './component-controller';
|
|
2
2
|
import { ComponentNode } from './component-node';
|
|
3
3
|
import { ComponentPlatform } from './component-platform';
|
|
4
|
-
export
|
|
4
|
+
export type ComponentQueryRule = {
|
|
5
5
|
id?: string;
|
|
6
6
|
type?: string;
|
|
7
7
|
};
|
|
@@ -2,20 +2,20 @@ import { EventSubscriptionCancellation } from '@webprovisions/platform';
|
|
|
2
2
|
import { Breakpoints, ComponentSettings, ViewDefinition, WidgetSettings } from '../types';
|
|
3
3
|
import { ComponentNode, ComponentNodeContext, ComponentNodeLayout, ComponentNodeProperties } from './component-node';
|
|
4
4
|
import { ComponentPlatform } from './component-platform';
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
type ComponentReference = string | [string, ...ComponentReferenceOverride[]];
|
|
6
|
+
type ComponentReferenceOverride = {
|
|
7
7
|
breakpoints?: Breakpoints;
|
|
8
8
|
tags?: string[];
|
|
9
9
|
context?: ComponentNodeContext;
|
|
10
10
|
properties?: ComponentNodeProperties;
|
|
11
11
|
layout?: ComponentNodeLayout;
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type NormalizedComponentReference = {
|
|
14
14
|
definitionId: string;
|
|
15
15
|
overrides: ComponentReferenceOverride[];
|
|
16
16
|
};
|
|
17
17
|
export declare const normalizeReference: (reference: ComponentReference) => NormalizedComponentReference;
|
|
18
|
-
export
|
|
18
|
+
export type ComponentHandlerOptions = {
|
|
19
19
|
platform: ComponentPlatform;
|
|
20
20
|
node: ComponentNode;
|
|
21
21
|
references: ComponentReference[];
|
|
@@ -2,7 +2,7 @@ import { ComponentReference, ComponentSettings, ViewDefinition } from '../types'
|
|
|
2
2
|
import { ComponentNode } from './component-node';
|
|
3
3
|
import { ComponentPlatform } from './component-platform';
|
|
4
4
|
import { NormalizedComponentReference } from './create-component-model';
|
|
5
|
-
export
|
|
5
|
+
export type CustomHandlerCallback = (ref: NormalizedComponentReference, options: {
|
|
6
6
|
platform: ComponentPlatform;
|
|
7
7
|
node: ComponentNode;
|
|
8
8
|
references: ComponentReference[];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Container } from '@webprovisions/platform';
|
|
2
2
|
import { ComponentNodeController } from './component-controller';
|
|
3
3
|
import { ComponentQuery } from './component-query';
|
|
4
|
-
export
|
|
5
|
-
export
|
|
4
|
+
export type ExtendComponentHandler = (controller: ComponentNodeController) => any;
|
|
5
|
+
export type ExtendComponentOptions = {
|
|
6
6
|
reuseController?: boolean;
|
|
7
7
|
};
|
|
8
8
|
export declare const extendComponent: (container: Container, typeOrQuery: string | ComponentQuery, handler: ExtendComponentHandler, ns?: string, options?: ExtendComponentOptions) => Promise<void>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ComponentPlatform } from '.';
|
|
2
2
|
import { ComponentNode } from './component-node';
|
|
3
|
-
export
|
|
3
|
+
export type ProcessOptions = {
|
|
4
4
|
context?: boolean;
|
|
5
5
|
properties?: boolean;
|
|
6
6
|
layout?: boolean;
|
|
7
7
|
recursive?: boolean;
|
|
8
8
|
};
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
9
|
+
export type StateProcessor = (node: ComponentNode, options: ProcessOptions) => void;
|
|
10
|
+
export type ProcessResult = Map<ComponentNode, ProcessOptions>;
|
|
11
|
+
export type ProcessReportCallback = (report: ProcessResult) => void;
|
|
12
12
|
export declare const createStateProcessor: (platform: ComponentPlatform, callback: ProcessReportCallback) => StateProcessor;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Logger } from '@telia-ace/widget-utilities';
|
|
2
2
|
import { Container, EventManager, EventSubscriptionCancellation } from '@webprovisions/platform';
|
|
3
|
-
export
|
|
3
|
+
export type ReactComponent = any | null;
|
|
4
4
|
export default class ComponentResolver {
|
|
5
5
|
aliases: Map<string, string>;
|
|
6
6
|
components: Map<string, any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventListener, EventManager, EventSubscriptionCancellation } from '@webprovisions/platform';
|
|
2
|
-
export
|
|
2
|
+
export type SubscribeDelegate = (type: string, listener: EventListener) => void;
|
|
3
3
|
/**
|
|
4
4
|
* Creates s subscriber for the specified `EventManager` and provides a single cancellation
|
|
5
5
|
* function for all registered subscriptions.
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentNodeLayout } from '../component-platform';
|
|
2
|
-
export
|
|
2
|
+
export type ComponentSettings = {
|
|
3
3
|
type: string;
|
|
4
4
|
context?: Context;
|
|
5
5
|
properties?: Properties;
|
|
@@ -13,24 +13,24 @@ declare enum HistoryMode {
|
|
|
13
13
|
browser = "browser",
|
|
14
14
|
memory = "memory"
|
|
15
15
|
}
|
|
16
|
-
export
|
|
16
|
+
export type RoutingSettings = {
|
|
17
17
|
initialPath: string;
|
|
18
18
|
mode: HistoryMode;
|
|
19
19
|
basePath?: string;
|
|
20
20
|
};
|
|
21
|
-
export
|
|
22
|
-
export
|
|
21
|
+
export type ComponentReference = string | [string, ...ComponentReferenceOverride[]];
|
|
22
|
+
export type Properties = {
|
|
23
23
|
[key: string]: any;
|
|
24
24
|
};
|
|
25
|
-
export
|
|
25
|
+
export type Context = {
|
|
26
26
|
[key: string]: any;
|
|
27
27
|
};
|
|
28
|
-
export
|
|
28
|
+
export type ViewDefinition = {
|
|
29
29
|
path: string | string[];
|
|
30
30
|
entry: ComponentReference;
|
|
31
31
|
};
|
|
32
|
-
export
|
|
33
|
-
export
|
|
32
|
+
export type Breakpoints = 'all' | string[];
|
|
33
|
+
export type ComponentReferenceOverride = {
|
|
34
34
|
breakpoints?: Breakpoints;
|
|
35
35
|
size?: number | 'full' | 'none';
|
|
36
36
|
indent?: number;
|
|
@@ -38,10 +38,10 @@ export declare type ComponentReferenceOverride = {
|
|
|
38
38
|
context?: Context;
|
|
39
39
|
properties?: Properties;
|
|
40
40
|
};
|
|
41
|
-
export
|
|
41
|
+
export type ComponentDefinitionMap = {
|
|
42
42
|
[name: string]: ComponentSettings;
|
|
43
43
|
};
|
|
44
|
-
export
|
|
44
|
+
export type WidgetSettings = {
|
|
45
45
|
data: {
|
|
46
46
|
projection: string;
|
|
47
47
|
site?: 'current' | 'referrer';
|
|
@@ -70,11 +70,11 @@ export declare type WidgetSettings = {
|
|
|
70
70
|
[key: string]: any;
|
|
71
71
|
};
|
|
72
72
|
};
|
|
73
|
-
export
|
|
73
|
+
export type MinMax = {
|
|
74
74
|
min: string;
|
|
75
75
|
max: string;
|
|
76
76
|
};
|
|
77
|
-
|
|
77
|
+
type Symbol = {
|
|
78
78
|
type: 'Uri' | 'Svg' | 'FontAwesome' | 'Text' | string;
|
|
79
79
|
content: string;
|
|
80
80
|
};
|
package/dist/types/ui.d.ts
CHANGED
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "
|
|
1
|
+
declare const _default: "3d86c50";
|
|
2
2
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telia-ace/widget-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.20-next.0",
|
|
4
4
|
"description": "Core framework for ACE widgets.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"author": "Telia Company AB",
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
},
|
|
22
22
|
"sideEffects": false,
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@telia-ace/widget-utilities": "^1.0.
|
|
24
|
+
"@telia-ace/widget-utilities": "^1.0.9-next.0",
|
|
25
25
|
"@webprovisions/bootstrapping": "^1.0.12",
|
|
26
26
|
"@webprovisions/platform": "^1.1.2"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@telia-ace/widget-developer-tools": "^1.0.
|
|
29
|
+
"@telia-ace/widget-developer-tools": "^1.0.15-next.0"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
32
|
"clean": "rimraf ./dist",
|