@player-ui/types 0.4.0--canary.85.4368 → 0.4.0--canary.131.4657
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/index.d.ts +16 -3
- package/package.json +1 -1
- package/src/index.ts +20 -4
- package/dist/xlr/Asset.json +0 -40
- package/dist/xlr/AssetBinding.json +0 -23
- package/dist/xlr/AssetSwitch.json +0 -213
- package/dist/xlr/AssetWrapper.json +0 -34
- package/dist/xlr/AssetWrapperOrSwitch.json +0 -304
- package/dist/xlr/Binding.json +0 -7
- package/dist/xlr/BindingRef.json +0 -7
- package/dist/xlr/DataModel.json +0 -13
- package/dist/xlr/DynamicSwitch.json +0 -96
- package/dist/xlr/Expression.json +0 -21
- package/dist/xlr/ExpressionObject.json +0 -19
- package/dist/xlr/ExpressionRef.json +0 -7
- package/dist/xlr/Flow.json +0 -1411
- package/dist/xlr/FlowResult.json +0 -131
- package/dist/xlr/Navigation.json +0 -783
- package/dist/xlr/NavigationBaseState.json +0 -133
- package/dist/xlr/NavigationFlow.json +0 -746
- package/dist/xlr/NavigationFlowActionState.json +0 -120
- package/dist/xlr/NavigationFlowEndState.json +0 -110
- package/dist/xlr/NavigationFlowExternalState.json +0 -126
- package/dist/xlr/NavigationFlowFlowState.json +0 -125
- package/dist/xlr/NavigationFlowState.json +0 -627
- package/dist/xlr/NavigationFlowTransition.json +0 -12
- package/dist/xlr/NavigationFlowTransitionableState.json +0 -149
- package/dist/xlr/NavigationFlowViewState.json +0 -138
- package/dist/xlr/StaticSwitch.json +0 -96
- package/dist/xlr/Switch.json +0 -71
- package/dist/xlr/SwitchCase.json +0 -51
- package/dist/xlr/Templatable.json +0 -83
- package/dist/xlr/Template.json +0 -65
- package/dist/xlr/View.json +0 -166
- package/dist/xlr/manifest.js +0 -38
- package/dist/xlr/manifest.json +0 -38
package/dist/index.d.ts
CHANGED
|
@@ -203,14 +203,13 @@ declare namespace Schema {
|
|
|
203
203
|
/** A Node describes a specific object in the tree */
|
|
204
204
|
interface Node {
|
|
205
205
|
/** Each property describes a property of the object */
|
|
206
|
-
[key: string]:
|
|
206
|
+
[key: string]: DataTypes;
|
|
207
207
|
}
|
|
208
|
+
type DataTypes = DataType | RecordType | ArrayType;
|
|
208
209
|
/** Each prop in the object can have a specific DataType */
|
|
209
210
|
interface DataType<T = unknown> {
|
|
210
211
|
/** The reference of the base type to use */
|
|
211
212
|
type: string;
|
|
212
|
-
/** The referenced object represents an array rather than an object */
|
|
213
|
-
isArray?: boolean;
|
|
214
213
|
/**
|
|
215
214
|
* Any additional validations that are associated with this property
|
|
216
215
|
* These will add to any base validations associated with the "type"
|
|
@@ -229,6 +228,20 @@ declare namespace Schema {
|
|
|
229
228
|
/** Any additional options */
|
|
230
229
|
[key: string]: unknown;
|
|
231
230
|
}
|
|
231
|
+
/** Determines if the Datatype is a record object */
|
|
232
|
+
interface RecordType extends DataType {
|
|
233
|
+
/** boolean to define if its a record */
|
|
234
|
+
isRecord: boolean;
|
|
235
|
+
/** This property is mutually exclusive with RecordType and can not be used with ArrayType */
|
|
236
|
+
isArray?: never;
|
|
237
|
+
}
|
|
238
|
+
/** Determines if the DataType is an Array Object */
|
|
239
|
+
interface ArrayType extends DataType {
|
|
240
|
+
/** boolean to define if its an array */
|
|
241
|
+
isArray: boolean;
|
|
242
|
+
/** This property is mutually exclusive with ArrayType and can not be used with RecordType */
|
|
243
|
+
isRecord?: never;
|
|
244
|
+
}
|
|
232
245
|
}
|
|
233
246
|
/** Namespace to wrap up core functionality to be used by the Language Service */
|
|
234
247
|
declare namespace Language {
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -272,17 +272,16 @@ export declare namespace Schema {
|
|
|
272
272
|
/** A Node describes a specific object in the tree */
|
|
273
273
|
export interface Node {
|
|
274
274
|
/** Each property describes a property of the object */
|
|
275
|
-
[key: string]:
|
|
275
|
+
[key: string]: DataTypes;
|
|
276
276
|
}
|
|
277
277
|
|
|
278
|
+
export type DataTypes = DataType | RecordType | ArrayType;
|
|
279
|
+
|
|
278
280
|
/** Each prop in the object can have a specific DataType */
|
|
279
281
|
export interface DataType<T = unknown> {
|
|
280
282
|
/** The reference of the base type to use */
|
|
281
283
|
type: string;
|
|
282
284
|
|
|
283
|
-
/** The referenced object represents an array rather than an object */
|
|
284
|
-
isArray?: boolean;
|
|
285
|
-
|
|
286
285
|
/**
|
|
287
286
|
* Any additional validations that are associated with this property
|
|
288
287
|
* These will add to any base validations associated with the "type"
|
|
@@ -304,6 +303,23 @@ export declare namespace Schema {
|
|
|
304
303
|
/** Any additional options */
|
|
305
304
|
[key: string]: unknown;
|
|
306
305
|
}
|
|
306
|
+
/** Determines if the Datatype is a record object */
|
|
307
|
+
export interface RecordType extends DataType {
|
|
308
|
+
/** boolean to define if its a record */
|
|
309
|
+
isRecord: boolean;
|
|
310
|
+
|
|
311
|
+
/** This property is mutually exclusive with RecordType and can not be used with ArrayType */
|
|
312
|
+
isArray?: never;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/** Determines if the DataType is an Array Object */
|
|
316
|
+
export interface ArrayType extends DataType {
|
|
317
|
+
/** boolean to define if its an array */
|
|
318
|
+
isArray: boolean;
|
|
319
|
+
|
|
320
|
+
/** This property is mutually exclusive with ArrayType and can not be used with RecordType */
|
|
321
|
+
isRecord?: never;
|
|
322
|
+
}
|
|
307
323
|
}
|
|
308
324
|
|
|
309
325
|
/** Namespace to wrap up core functionality to be used by the Language Service */
|
package/dist/xlr/Asset.json
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"source": "core/types/src/index.ts",
|
|
3
|
-
"name": "Asset",
|
|
4
|
-
"type": "object",
|
|
5
|
-
"properties": {
|
|
6
|
-
"id": {
|
|
7
|
-
"required": true,
|
|
8
|
-
"node": {
|
|
9
|
-
"type": "string",
|
|
10
|
-
"title": "Asset.id",
|
|
11
|
-
"description": "Each asset requires a unique id per view"
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"type": {
|
|
15
|
-
"required": true,
|
|
16
|
-
"node": {
|
|
17
|
-
"type": "ref",
|
|
18
|
-
"ref": "T",
|
|
19
|
-
"title": "Asset.type",
|
|
20
|
-
"description": "The asset type determines the semantics of how a user interacts with a page"
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"additionalProperties": {
|
|
25
|
-
"type": "unknown"
|
|
26
|
-
},
|
|
27
|
-
"title": "Asset",
|
|
28
|
-
"description": "An asset is the smallest unit of user interaction in a player view",
|
|
29
|
-
"genericTokens": [
|
|
30
|
-
{
|
|
31
|
-
"symbol": "T",
|
|
32
|
-
"constraints": {
|
|
33
|
-
"type": "string"
|
|
34
|
-
},
|
|
35
|
-
"default": {
|
|
36
|
-
"type": "string"
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
]
|
|
40
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"source": "core/types/src/index.ts",
|
|
3
|
-
"name": "AssetBinding",
|
|
4
|
-
"type": "object",
|
|
5
|
-
"properties": {
|
|
6
|
-
"binding": {
|
|
7
|
-
"required": true,
|
|
8
|
-
"node": {
|
|
9
|
-
"type": "ref",
|
|
10
|
-
"ref": "Binding",
|
|
11
|
-
"title": "AssetBinding.binding",
|
|
12
|
-
"description": "A binding that points to somewhere in the data model"
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
"additionalProperties": false,
|
|
17
|
-
"title": "AssetBinding",
|
|
18
|
-
"description": "An asset that contains a Binding.",
|
|
19
|
-
"extends": {
|
|
20
|
-
"type": "ref",
|
|
21
|
-
"ref": "Asset"
|
|
22
|
-
}
|
|
23
|
-
}
|
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"source": "core/types/src/index.ts",
|
|
3
|
-
"name": "AssetSwitch",
|
|
4
|
-
"type": "or",
|
|
5
|
-
"or": [
|
|
6
|
-
{
|
|
7
|
-
"source": "core/types/src/index.ts",
|
|
8
|
-
"name": "StaticSwitch",
|
|
9
|
-
"type": "object",
|
|
10
|
-
"properties": {
|
|
11
|
-
"staticSwitch": {
|
|
12
|
-
"required": true,
|
|
13
|
-
"node": {
|
|
14
|
-
"source": "core/types/src/index.ts",
|
|
15
|
-
"name": "Switch",
|
|
16
|
-
"type": "array",
|
|
17
|
-
"elementType": {
|
|
18
|
-
"source": "core/types/src/index.ts",
|
|
19
|
-
"name": "SwitchCase",
|
|
20
|
-
"type": "object",
|
|
21
|
-
"properties": {
|
|
22
|
-
"asset": {
|
|
23
|
-
"required": true,
|
|
24
|
-
"node": {
|
|
25
|
-
"type": "ref",
|
|
26
|
-
"ref": "T",
|
|
27
|
-
"title": "SwitchCase.asset",
|
|
28
|
-
"description": "The Asset to use if this case is applicable"
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
"case": {
|
|
32
|
-
"required": true,
|
|
33
|
-
"node": {
|
|
34
|
-
"type": "or",
|
|
35
|
-
"or": [
|
|
36
|
-
{
|
|
37
|
-
"type": "ref",
|
|
38
|
-
"ref": "Expression",
|
|
39
|
-
"title": "SwitchCase.case"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"type": "boolean",
|
|
43
|
-
"const": true
|
|
44
|
-
}
|
|
45
|
-
],
|
|
46
|
-
"title": "SwitchCase.case",
|
|
47
|
-
"description": "An expression to execute to determine if this case applies"
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
"additionalProperties": false,
|
|
52
|
-
"title": "SwitchCase",
|
|
53
|
-
"description": "A single case statement to use in a switch",
|
|
54
|
-
"genericTokens": [
|
|
55
|
-
{
|
|
56
|
-
"symbol": "T",
|
|
57
|
-
"constraints": {
|
|
58
|
-
"type": "ref",
|
|
59
|
-
"ref": "Asset"
|
|
60
|
-
},
|
|
61
|
-
"default": {
|
|
62
|
-
"type": "ref",
|
|
63
|
-
"ref": "Asset"
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
]
|
|
67
|
-
},
|
|
68
|
-
"title": "StaticSwitch.staticSwitch",
|
|
69
|
-
"description": "A static switch only evaluates the applicable base on first render of the view",
|
|
70
|
-
"genericTokens": [
|
|
71
|
-
{
|
|
72
|
-
"symbol": "T",
|
|
73
|
-
"constraints": {
|
|
74
|
-
"type": "ref",
|
|
75
|
-
"ref": "Asset"
|
|
76
|
-
},
|
|
77
|
-
"default": {
|
|
78
|
-
"type": "ref",
|
|
79
|
-
"ref": "Asset"
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
]
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
"additionalProperties": false,
|
|
87
|
-
"title": "StaticSwitch",
|
|
88
|
-
"genericTokens": [
|
|
89
|
-
{
|
|
90
|
-
"symbol": "T",
|
|
91
|
-
"constraints": {
|
|
92
|
-
"type": "ref",
|
|
93
|
-
"ref": "Asset"
|
|
94
|
-
},
|
|
95
|
-
"default": {
|
|
96
|
-
"type": "ref",
|
|
97
|
-
"ref": "Asset"
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
]
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
"source": "core/types/src/index.ts",
|
|
104
|
-
"name": "DynamicSwitch",
|
|
105
|
-
"type": "object",
|
|
106
|
-
"properties": {
|
|
107
|
-
"dynamicSwitch": {
|
|
108
|
-
"required": true,
|
|
109
|
-
"node": {
|
|
110
|
-
"source": "core/types/src/index.ts",
|
|
111
|
-
"name": "Switch",
|
|
112
|
-
"type": "array",
|
|
113
|
-
"elementType": {
|
|
114
|
-
"source": "core/types/src/index.ts",
|
|
115
|
-
"name": "SwitchCase",
|
|
116
|
-
"type": "object",
|
|
117
|
-
"properties": {
|
|
118
|
-
"asset": {
|
|
119
|
-
"required": true,
|
|
120
|
-
"node": {
|
|
121
|
-
"type": "ref",
|
|
122
|
-
"ref": "T",
|
|
123
|
-
"title": "SwitchCase.asset",
|
|
124
|
-
"description": "The Asset to use if this case is applicable"
|
|
125
|
-
}
|
|
126
|
-
},
|
|
127
|
-
"case": {
|
|
128
|
-
"required": true,
|
|
129
|
-
"node": {
|
|
130
|
-
"type": "or",
|
|
131
|
-
"or": [
|
|
132
|
-
{
|
|
133
|
-
"type": "ref",
|
|
134
|
-
"ref": "Expression",
|
|
135
|
-
"title": "SwitchCase.case"
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
"type": "boolean",
|
|
139
|
-
"const": true
|
|
140
|
-
}
|
|
141
|
-
],
|
|
142
|
-
"title": "SwitchCase.case",
|
|
143
|
-
"description": "An expression to execute to determine if this case applies"
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
},
|
|
147
|
-
"additionalProperties": false,
|
|
148
|
-
"title": "SwitchCase",
|
|
149
|
-
"description": "A single case statement to use in a switch",
|
|
150
|
-
"genericTokens": [
|
|
151
|
-
{
|
|
152
|
-
"symbol": "T",
|
|
153
|
-
"constraints": {
|
|
154
|
-
"type": "ref",
|
|
155
|
-
"ref": "Asset"
|
|
156
|
-
},
|
|
157
|
-
"default": {
|
|
158
|
-
"type": "ref",
|
|
159
|
-
"ref": "Asset"
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
]
|
|
163
|
-
},
|
|
164
|
-
"title": "DynamicSwitch.dynamicSwitch",
|
|
165
|
-
"description": "A dynamic switch re-evaluates the applicable case as data changes",
|
|
166
|
-
"genericTokens": [
|
|
167
|
-
{
|
|
168
|
-
"symbol": "T",
|
|
169
|
-
"constraints": {
|
|
170
|
-
"type": "ref",
|
|
171
|
-
"ref": "Asset"
|
|
172
|
-
},
|
|
173
|
-
"default": {
|
|
174
|
-
"type": "ref",
|
|
175
|
-
"ref": "Asset"
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
]
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
},
|
|
182
|
-
"additionalProperties": false,
|
|
183
|
-
"title": "DynamicSwitch",
|
|
184
|
-
"genericTokens": [
|
|
185
|
-
{
|
|
186
|
-
"symbol": "T",
|
|
187
|
-
"constraints": {
|
|
188
|
-
"type": "ref",
|
|
189
|
-
"ref": "Asset"
|
|
190
|
-
},
|
|
191
|
-
"default": {
|
|
192
|
-
"type": "ref",
|
|
193
|
-
"ref": "Asset"
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
]
|
|
197
|
-
}
|
|
198
|
-
],
|
|
199
|
-
"title": "AssetSwitch",
|
|
200
|
-
"genericTokens": [
|
|
201
|
-
{
|
|
202
|
-
"symbol": "T",
|
|
203
|
-
"constraints": {
|
|
204
|
-
"type": "ref",
|
|
205
|
-
"ref": "Asset"
|
|
206
|
-
},
|
|
207
|
-
"default": {
|
|
208
|
-
"type": "ref",
|
|
209
|
-
"ref": "Asset"
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
]
|
|
213
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"source": "core/types/src/index.ts",
|
|
3
|
-
"name": "AssetWrapper",
|
|
4
|
-
"type": "object",
|
|
5
|
-
"properties": {
|
|
6
|
-
"asset": {
|
|
7
|
-
"required": true,
|
|
8
|
-
"node": {
|
|
9
|
-
"type": "ref",
|
|
10
|
-
"ref": "T",
|
|
11
|
-
"title": "AssetWrapper.asset",
|
|
12
|
-
"description": "An asset instance"
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
"additionalProperties": {
|
|
17
|
-
"type": "unknown"
|
|
18
|
-
},
|
|
19
|
-
"title": "AssetWrapper",
|
|
20
|
-
"description": "An object that contains an asset",
|
|
21
|
-
"genericTokens": [
|
|
22
|
-
{
|
|
23
|
-
"symbol": "T",
|
|
24
|
-
"constraints": {
|
|
25
|
-
"type": "ref",
|
|
26
|
-
"ref": "Asset"
|
|
27
|
-
},
|
|
28
|
-
"default": {
|
|
29
|
-
"type": "ref",
|
|
30
|
-
"ref": "Asset"
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
]
|
|
34
|
-
}
|