@player-ui/types 0.15.1 → 0.15.2-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/xlr/AssetSwitch.json +6 -6
- package/dist/xlr/AssetWrapperOrSwitch.json +6 -6
- package/dist/xlr/DynamicSwitch.json +2 -2
- package/dist/xlr/Flow.json +24 -18
- package/dist/xlr/FlowResult.json +3 -1
- package/dist/xlr/Formatting.Reference.json +19 -0
- package/dist/xlr/Language.DataTypeRef.json +17 -0
- package/dist/xlr/Navigation.json +9 -3
- package/dist/xlr/NavigationFlow.json +9 -3
- package/dist/xlr/NavigationFlowEndState.json +3 -1
- package/dist/xlr/NavigationFlowExternalState.json +3 -1
- package/dist/xlr/NavigationFlowState.json +9 -3
- package/dist/xlr/NavigationFlowViewState.json +3 -1
- package/dist/xlr/Schema.ArrayType.json +203 -0
- package/dist/xlr/Schema.DataType.json +198 -0
- package/dist/xlr/Schema.DataTypes.json +611 -0
- package/dist/xlr/Schema.Node.json +618 -0
- package/dist/xlr/Schema.RecordType.json +203 -0
- package/dist/xlr/Schema.Schema.json +1247 -0
- package/dist/xlr/StaticSwitch.json +2 -2
- package/dist/xlr/Switch.json +1 -1
- package/dist/xlr/Validation.CrossfieldReference.json +127 -0
- package/dist/xlr/Validation.DisplayTarget.json +20 -0
- package/dist/xlr/Validation.Reference.json +129 -0
- package/dist/xlr/Validation.Severity.json +16 -0
- package/dist/xlr/Validation.Trigger.json +20 -0
- package/dist/xlr/View.json +1 -1
- package/dist/xlr/manifest.js +15 -2
- package/dist/xlr/manifest.json +17 -2
- package/package.json +1 -1
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
"required": true,
|
|
8
8
|
"node": {
|
|
9
9
|
"source": "core/types/src/index.ts",
|
|
10
|
-
"name": "Switch",
|
|
10
|
+
"name": "Switch<T>",
|
|
11
11
|
"type": "array",
|
|
12
12
|
"elementType": {
|
|
13
13
|
"source": "core/types/src/index.ts",
|
|
14
|
-
"name": "SwitchCase",
|
|
14
|
+
"name": "SwitchCase<T>",
|
|
15
15
|
"type": "object",
|
|
16
16
|
"properties": {
|
|
17
17
|
"asset": {
|
package/dist/xlr/Switch.json
CHANGED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Validation.CrossfieldReference",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"type": {
|
|
6
|
+
"required": true,
|
|
7
|
+
"node": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"title": "Reference.type",
|
|
10
|
+
"description": "The name of the referenced validation type\nThis will be used to lookup the proper handler"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"message": {
|
|
14
|
+
"required": false,
|
|
15
|
+
"node": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"title": "Reference.message",
|
|
18
|
+
"description": "An optional means of overriding the default message if the validation is triggered"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"severity": {
|
|
22
|
+
"required": false,
|
|
23
|
+
"node": {
|
|
24
|
+
"name": "Severity",
|
|
25
|
+
"type": "or",
|
|
26
|
+
"or": [
|
|
27
|
+
{
|
|
28
|
+
"type": "string",
|
|
29
|
+
"const": "error"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"type": "string",
|
|
33
|
+
"const": "warning"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"title": "Reference.severity",
|
|
37
|
+
"description": "An optional means of overriding the default severity of the validation if triggered"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"trigger": {
|
|
41
|
+
"required": false,
|
|
42
|
+
"node": {
|
|
43
|
+
"name": "Trigger",
|
|
44
|
+
"type": "or",
|
|
45
|
+
"or": [
|
|
46
|
+
{
|
|
47
|
+
"type": "string",
|
|
48
|
+
"const": "navigation"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"type": "string",
|
|
52
|
+
"const": "change"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"type": "string",
|
|
56
|
+
"const": "load"
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"title": "Reference.trigger",
|
|
60
|
+
"description": "When to run this particular validation"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"dataTarget": {
|
|
64
|
+
"required": false,
|
|
65
|
+
"node": {
|
|
66
|
+
"type": "never",
|
|
67
|
+
"title": "CrossfieldReference.dataTarget",
|
|
68
|
+
"description": "Cross-field references and validation must run against the default (deformatted) value"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"displayTarget": {
|
|
72
|
+
"required": false,
|
|
73
|
+
"node": {
|
|
74
|
+
"name": "DisplayTarget",
|
|
75
|
+
"type": "or",
|
|
76
|
+
"or": [
|
|
77
|
+
{
|
|
78
|
+
"type": "string",
|
|
79
|
+
"const": "page"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"type": "string",
|
|
83
|
+
"const": "section"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"type": "string",
|
|
87
|
+
"const": "field"
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
"title": "Reference.displayTarget",
|
|
91
|
+
"description": "Where the error should be displayed"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"blocking": {
|
|
95
|
+
"required": false,
|
|
96
|
+
"node": {
|
|
97
|
+
"type": "or",
|
|
98
|
+
"or": [
|
|
99
|
+
{
|
|
100
|
+
"type": "boolean",
|
|
101
|
+
"title": "Reference.blocking"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"type": "string",
|
|
105
|
+
"const": "once"
|
|
106
|
+
}
|
|
107
|
+
],
|
|
108
|
+
"title": "Reference.blocking",
|
|
109
|
+
"description": "If the validation blocks navigation\ntrue/false - always/never block navigation\nonce - only block navigation if the validation has not been triggered before",
|
|
110
|
+
"default": "- true for errors, 'once' for warnings"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"ref": {
|
|
114
|
+
"required": false,
|
|
115
|
+
"node": {
|
|
116
|
+
"type": "ref",
|
|
117
|
+
"ref": "Binding",
|
|
118
|
+
"title": "CrossfieldReference.ref",
|
|
119
|
+
"description": "The binding to associate this validation with"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"additionalProperties": {
|
|
124
|
+
"type": "unknown"
|
|
125
|
+
},
|
|
126
|
+
"title": "CrossfieldReference"
|
|
127
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Validation.DisplayTarget",
|
|
3
|
+
"type": "or",
|
|
4
|
+
"or": [
|
|
5
|
+
{
|
|
6
|
+
"type": "string",
|
|
7
|
+
"const": "page"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"type": "string",
|
|
11
|
+
"const": "section"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"type": "string",
|
|
15
|
+
"const": "field"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"title": "DisplayTarget",
|
|
19
|
+
"description": "Where the error/warning should be displayed.\n- `field` is the default display target. This renders the error/warning directly underneath the field.\n- `section` is used to display a message at a parent node that is designated as a \"section\"\n- `page` a special section used to display a message at the top of the page."
|
|
20
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Validation.Reference",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"type": {
|
|
6
|
+
"required": true,
|
|
7
|
+
"node": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"title": "Reference.type",
|
|
10
|
+
"description": "The name of the referenced validation type\nThis will be used to lookup the proper handler"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"message": {
|
|
14
|
+
"required": false,
|
|
15
|
+
"node": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"title": "Reference.message",
|
|
18
|
+
"description": "An optional means of overriding the default message if the validation is triggered"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"severity": {
|
|
22
|
+
"required": false,
|
|
23
|
+
"node": {
|
|
24
|
+
"name": "Severity",
|
|
25
|
+
"type": "or",
|
|
26
|
+
"or": [
|
|
27
|
+
{
|
|
28
|
+
"type": "string",
|
|
29
|
+
"const": "error"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"type": "string",
|
|
33
|
+
"const": "warning"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"title": "Reference.severity",
|
|
37
|
+
"description": "An optional means of overriding the default severity of the validation if triggered"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"trigger": {
|
|
41
|
+
"required": false,
|
|
42
|
+
"node": {
|
|
43
|
+
"name": "Trigger",
|
|
44
|
+
"type": "or",
|
|
45
|
+
"or": [
|
|
46
|
+
{
|
|
47
|
+
"type": "string",
|
|
48
|
+
"const": "navigation"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"type": "string",
|
|
52
|
+
"const": "change"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"type": "string",
|
|
56
|
+
"const": "load"
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"title": "Reference.trigger",
|
|
60
|
+
"description": "When to run this particular validation"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"dataTarget": {
|
|
64
|
+
"required": false,
|
|
65
|
+
"node": {
|
|
66
|
+
"type": "or",
|
|
67
|
+
"or": [
|
|
68
|
+
{
|
|
69
|
+
"type": "string",
|
|
70
|
+
"const": "formatted"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"type": "string",
|
|
74
|
+
"const": "deformatted"
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"title": "Reference.dataTarget",
|
|
78
|
+
"description": "Each validation is passed the value of the data to run it's validation against.\nBy default, this is the value stored in the data-model (deformatted).\nIn the off chance you'd like this validator to run against the formatted value (the one the user sees), set this option"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"displayTarget": {
|
|
82
|
+
"required": false,
|
|
83
|
+
"node": {
|
|
84
|
+
"name": "DisplayTarget",
|
|
85
|
+
"type": "or",
|
|
86
|
+
"or": [
|
|
87
|
+
{
|
|
88
|
+
"type": "string",
|
|
89
|
+
"const": "page"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"type": "string",
|
|
93
|
+
"const": "section"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"type": "string",
|
|
97
|
+
"const": "field"
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"title": "Reference.displayTarget",
|
|
101
|
+
"description": "Where the error should be displayed"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"blocking": {
|
|
105
|
+
"required": false,
|
|
106
|
+
"node": {
|
|
107
|
+
"type": "or",
|
|
108
|
+
"or": [
|
|
109
|
+
{
|
|
110
|
+
"type": "boolean",
|
|
111
|
+
"title": "Reference.blocking"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"type": "string",
|
|
115
|
+
"const": "once"
|
|
116
|
+
}
|
|
117
|
+
],
|
|
118
|
+
"title": "Reference.blocking",
|
|
119
|
+
"description": "If the validation blocks navigation\ntrue/false - always/never block navigation\nonce - only block navigation if the validation has not been triggered before",
|
|
120
|
+
"default": "- true for errors, 'once' for warnings"
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"additionalProperties": {
|
|
125
|
+
"type": "unknown"
|
|
126
|
+
},
|
|
127
|
+
"title": "Reference",
|
|
128
|
+
"description": "A reference to a validation object"
|
|
129
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Validation.Severity",
|
|
3
|
+
"type": "or",
|
|
4
|
+
"or": [
|
|
5
|
+
{
|
|
6
|
+
"type": "string",
|
|
7
|
+
"const": "error"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"type": "string",
|
|
11
|
+
"const": "warning"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"title": "Severity",
|
|
15
|
+
"description": "How serious are you about this error?\nWarning validations are reserved for errors that could be ignored by the user without consequence\nErrors must be fixed before proceeding"
|
|
16
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Validation.Trigger",
|
|
3
|
+
"type": "or",
|
|
4
|
+
"or": [
|
|
5
|
+
{
|
|
6
|
+
"type": "string",
|
|
7
|
+
"const": "navigation"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"type": "string",
|
|
11
|
+
"const": "change"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"type": "string",
|
|
15
|
+
"const": "load"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"title": "Trigger",
|
|
19
|
+
"description": "When to _first_ start caring about a validation of a data-val.\n\nload - only check once the first time the binding appears on screen\nchange - check anytime the data changes\nnavigation - check once the user attempts to navigate away from a view"
|
|
20
|
+
}
|
package/dist/xlr/View.json
CHANGED
package/dist/xlr/manifest.js
CHANGED
|
@@ -30,13 +30,26 @@ const Templatable = require("./Templatable.json")
|
|
|
30
30
|
const Template = require("./Template.json")
|
|
31
31
|
const View = require("./View.json")
|
|
32
32
|
const Flow = require("./Flow.json")
|
|
33
|
+
const Schema_Schema = require("./Schema.Schema.json")
|
|
34
|
+
const Schema_Node = require("./Schema.Node.json")
|
|
35
|
+
const Schema_DataTypes = require("./Schema.DataTypes.json")
|
|
36
|
+
const Schema_DataType = require("./Schema.DataType.json")
|
|
37
|
+
const Schema_RecordType = require("./Schema.RecordType.json")
|
|
38
|
+
const Schema_ArrayType = require("./Schema.ArrayType.json")
|
|
39
|
+
const Language_DataTypeRef = require("./Language.DataTypeRef.json")
|
|
40
|
+
const Formatting_Reference = require("./Formatting.Reference.json")
|
|
41
|
+
const Validation_Severity = require("./Validation.Severity.json")
|
|
42
|
+
const Validation_Trigger = require("./Validation.Trigger.json")
|
|
43
|
+
const Validation_DisplayTarget = require("./Validation.DisplayTarget.json")
|
|
44
|
+
const Validation_Reference = require("./Validation.Reference.json")
|
|
45
|
+
const Validation_CrossfieldReference = require("./Validation.CrossfieldReference.json")
|
|
33
46
|
|
|
34
47
|
module.exports = {
|
|
35
48
|
"pluginName": "Types",
|
|
36
49
|
"capabilities": {
|
|
37
|
-
"Types":[Asset,AssetBinding,SwitchCase,Switch,AssetWrapper,AssetWrapperOrSwitch,AssetSwitch,StaticSwitch,DynamicSwitch,Expression,ExpressionRef,Binding,BindingRef,DataModel,Navigation,ExpressionObject,NavigationFlow,NavigationFlowTransition,NavigationBaseState,NavigationFlowTransitionableState,NavigationFlowViewState,NavigationFlowEndState,NavigationFlowActionState,NavigationFlowAsyncActionState,NavigationFlowExternalState,NavigationFlowFlowState,NavigationFlowState,FlowResult,Templatable,Template,View,Flow],
|
|
50
|
+
"Types":[Asset,AssetBinding,SwitchCase,Switch,AssetWrapper,AssetWrapperOrSwitch,AssetSwitch,StaticSwitch,DynamicSwitch,Expression,ExpressionRef,Binding,BindingRef,DataModel,Navigation,ExpressionObject,NavigationFlow,NavigationFlowTransition,NavigationBaseState,NavigationFlowTransitionableState,NavigationFlowViewState,NavigationFlowEndState,NavigationFlowActionState,NavigationFlowAsyncActionState,NavigationFlowExternalState,NavigationFlowFlowState,NavigationFlowState,FlowResult,Templatable,Template,View,Flow,Schema_Schema,Schema_Node,Schema_DataTypes,Schema_DataType,Schema_RecordType,Schema_ArrayType,Language_DataTypeRef,Formatting_Reference,Validation_Severity,Validation_Trigger,Validation_DisplayTarget,Validation_Reference,Validation_CrossfieldReference],
|
|
38
51
|
},
|
|
39
52
|
"customPrimitives": [
|
|
40
|
-
"Expression","Asset","Binding","AssetWrapper","Schema.DataType","ExpressionHandler"
|
|
53
|
+
"Expression","Asset","Binding","AssetWrapper","Schema.DataType","ExpressionHandler","FormatType","ValidatorFunction"
|
|
41
54
|
]
|
|
42
55
|
}
|
package/dist/xlr/manifest.json
CHANGED
|
@@ -33,7 +33,20 @@
|
|
|
33
33
|
"Templatable",
|
|
34
34
|
"Template",
|
|
35
35
|
"View",
|
|
36
|
-
"Flow"
|
|
36
|
+
"Flow",
|
|
37
|
+
"Schema.Schema",
|
|
38
|
+
"Schema.Node",
|
|
39
|
+
"Schema.DataTypes",
|
|
40
|
+
"Schema.DataType",
|
|
41
|
+
"Schema.RecordType",
|
|
42
|
+
"Schema.ArrayType",
|
|
43
|
+
"Language.DataTypeRef",
|
|
44
|
+
"Formatting.Reference",
|
|
45
|
+
"Validation.Severity",
|
|
46
|
+
"Validation.Trigger",
|
|
47
|
+
"Validation.DisplayTarget",
|
|
48
|
+
"Validation.Reference",
|
|
49
|
+
"Validation.CrossfieldReference"
|
|
37
50
|
]
|
|
38
51
|
},
|
|
39
52
|
"customPrimitives": [
|
|
@@ -42,6 +55,8 @@
|
|
|
42
55
|
"Binding",
|
|
43
56
|
"AssetWrapper",
|
|
44
57
|
"Schema.DataType",
|
|
45
|
-
"ExpressionHandler"
|
|
58
|
+
"ExpressionHandler",
|
|
59
|
+
"FormatType",
|
|
60
|
+
"ValidatorFunction"
|
|
46
61
|
]
|
|
47
62
|
}
|