@telia-ace/widget-core 0.0.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/action-resolver.d.ts +9 -0
- package/bootstrap.d.ts +16 -0
- package/component-platform/actions-controller.d.ts +41 -0
- package/component-platform/component-configuration-api.d.ts +2 -0
- package/component-platform/component-controller.d.ts +39 -0
- package/component-platform/component-node-collection.d.ts +19 -0
- package/component-platform/component-node.d.ts +64 -0
- package/component-platform/component-platform.d.ts +55 -0
- package/component-platform/component-query.d.ts +17 -0
- package/component-platform/create-component-model.d.ts +37 -0
- package/component-platform/custom-component-handler.d.ts +22 -0
- package/component-platform/descriptor.d.ts +9 -0
- package/component-platform/extend-component.d.ts +9 -0
- package/component-platform/index.d.ts +18 -0
- package/component-platform/queries.d.ts +7 -0
- package/component-platform/state-processor.d.ts +13 -0
- package/component-resolver.d.ts +15 -0
- package/environment.d.ts +49 -0
- package/event-subscriber.d.ts +8 -0
- package/implementation.d.ts +8 -0
- package/index.d.ts +14 -0
- package/index.js +3 -0
- package/index.mjs +910 -0
- package/package.json +12 -0
- package/plugin.d.ts +8 -0
- package/types/configuration.d.ts +87 -0
- package/types/index.d.ts +2 -0
- package/types/ui.d.ts +48 -0
- package/version.d.ts +2 -0
- package/widget-type.d.ts +8 -0
package/package.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@telia-ace/widget-core",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"dependencies": {
|
|
5
|
+
"@webprovisions/platform": "^1.1.4",
|
|
6
|
+
"@webprovisions/bootstrapping": "^1.0.14",
|
|
7
|
+
"@telia-ace/widget-utilities": "*"
|
|
8
|
+
},
|
|
9
|
+
"main": "./index.js",
|
|
10
|
+
"module": "./index.mjs",
|
|
11
|
+
"typings": "./index.d.ts"
|
|
12
|
+
}
|
package/plugin.d.ts
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { ComponentNodeLayout } from '../component-platform';
|
|
2
|
+
|
|
3
|
+
export type ComponentSettings = {
|
|
4
|
+
type: string;
|
|
5
|
+
context?: Context;
|
|
6
|
+
properties?: Properties;
|
|
7
|
+
layout?: ComponentNodeLayout;
|
|
8
|
+
tags?: string[];
|
|
9
|
+
children?: ComponentReference[];
|
|
10
|
+
};
|
|
11
|
+
declare enum HistoryMode {
|
|
12
|
+
scopedHash = "scopedHash",
|
|
13
|
+
hash = "hash",
|
|
14
|
+
browser = "browser",
|
|
15
|
+
memory = "memory"
|
|
16
|
+
}
|
|
17
|
+
export type RoutingSettings = {
|
|
18
|
+
initialPath: string;
|
|
19
|
+
mode: HistoryMode;
|
|
20
|
+
basePath?: string;
|
|
21
|
+
};
|
|
22
|
+
export type ComponentReference = string | [string, ...ComponentReferenceOverride[]];
|
|
23
|
+
export type Properties = {
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
};
|
|
26
|
+
export type Context = {
|
|
27
|
+
[key: string]: any;
|
|
28
|
+
};
|
|
29
|
+
export type ViewDefinition = {
|
|
30
|
+
path: string | string[];
|
|
31
|
+
entry: ComponentReference;
|
|
32
|
+
};
|
|
33
|
+
export type Breakpoints = 'all' | string[];
|
|
34
|
+
export type ComponentReferenceOverride = {
|
|
35
|
+
breakpoints?: Breakpoints;
|
|
36
|
+
size?: number | 'full' | 'none';
|
|
37
|
+
indent?: number;
|
|
38
|
+
tags?: string[];
|
|
39
|
+
context?: Context;
|
|
40
|
+
properties?: Properties;
|
|
41
|
+
};
|
|
42
|
+
export type ComponentDefinitionMap = {
|
|
43
|
+
[name: string]: ComponentSettings;
|
|
44
|
+
};
|
|
45
|
+
export type WidgetSettings = {
|
|
46
|
+
data: {
|
|
47
|
+
projection: string;
|
|
48
|
+
site?: 'current' | 'referrer';
|
|
49
|
+
forceHttps?: boolean;
|
|
50
|
+
};
|
|
51
|
+
components: ComponentDefinitionMap;
|
|
52
|
+
entry: ComponentReference;
|
|
53
|
+
breakpoints: {
|
|
54
|
+
[name: string]: string;
|
|
55
|
+
};
|
|
56
|
+
routing: RoutingSettings;
|
|
57
|
+
views: {
|
|
58
|
+
[name: string]: ViewDefinition;
|
|
59
|
+
};
|
|
60
|
+
integrationResources: {
|
|
61
|
+
path: string;
|
|
62
|
+
mediaQueriesSupported: boolean;
|
|
63
|
+
}[];
|
|
64
|
+
trigger?: {
|
|
65
|
+
symbol?: Symbol;
|
|
66
|
+
label?: string;
|
|
67
|
+
action?: string;
|
|
68
|
+
};
|
|
69
|
+
activate?: boolean | null;
|
|
70
|
+
plugins?: {
|
|
71
|
+
[key: string]: any;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
export type MinMax = {
|
|
75
|
+
min: string;
|
|
76
|
+
max: string;
|
|
77
|
+
};
|
|
78
|
+
type Symbol = {
|
|
79
|
+
type: 'Uri' | 'Svg' | 'FontAwesome' | 'Text' | string;
|
|
80
|
+
content: string;
|
|
81
|
+
};
|
|
82
|
+
export declare enum WidgetRenderState {
|
|
83
|
+
open = "open",
|
|
84
|
+
closed = "closed",
|
|
85
|
+
hidden = "hidden"
|
|
86
|
+
}
|
|
87
|
+
export {};
|
package/types/index.d.ts
ADDED
package/types/ui.d.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export type Theme = {
|
|
2
|
+
gap: string;
|
|
3
|
+
accessibility: {
|
|
4
|
+
border: string;
|
|
5
|
+
colors: {
|
|
6
|
+
inactiveText: string;
|
|
7
|
+
activeText: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
border: string;
|
|
11
|
+
borderRadius: string;
|
|
12
|
+
boxShadow: string;
|
|
13
|
+
inputBorder: string;
|
|
14
|
+
colors: {
|
|
15
|
+
warning: string;
|
|
16
|
+
accent: string;
|
|
17
|
+
link: string;
|
|
18
|
+
primary: string;
|
|
19
|
+
text: string;
|
|
20
|
+
textLight: string;
|
|
21
|
+
};
|
|
22
|
+
fonts: {
|
|
23
|
+
type: string;
|
|
24
|
+
base: string;
|
|
25
|
+
small: string;
|
|
26
|
+
normal: string;
|
|
27
|
+
medium: string;
|
|
28
|
+
large: string;
|
|
29
|
+
huge: string;
|
|
30
|
+
};
|
|
31
|
+
sizes: {
|
|
32
|
+
cardinal: number;
|
|
33
|
+
small: string;
|
|
34
|
+
normal: string;
|
|
35
|
+
medium: string;
|
|
36
|
+
large: string;
|
|
37
|
+
};
|
|
38
|
+
typographyVariantMapping?: {
|
|
39
|
+
h1: 'h1';
|
|
40
|
+
h2: 'h2';
|
|
41
|
+
h3: 'h3';
|
|
42
|
+
h4: 'h4';
|
|
43
|
+
h5: 'h5';
|
|
44
|
+
h6: 'h6';
|
|
45
|
+
p: 'p';
|
|
46
|
+
span: 'span';
|
|
47
|
+
};
|
|
48
|
+
};
|
package/version.d.ts
ADDED