glchat-a2ui-react-renderer 0.3.5 → 0.4.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/README.md +200 -267
- package/dist/index.d.ts +13 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -4
- package/dist/src/Provider.d.ts +33 -8
- package/dist/src/Provider.d.ts.map +1 -1
- package/dist/src/Provider.js +12 -10
- package/dist/src/SurfaceRenderer.d.ts +7 -1
- package/dist/src/SurfaceRenderer.d.ts.map +1 -1
- package/dist/src/SurfaceRenderer.js +2 -2
- package/dist/src/components/a2ui/v0_8/UnknownComponent/UnknownComponent.d.ts.map +1 -1
- package/dist/src/components/a2ui/v0_8/UnknownComponent/UnknownComponent.js +1 -1
- package/dist/src/components/a2ui/v0_9/AudioPlayer/AudioPlayer.d.ts +1 -5
- package/dist/src/components/a2ui/v0_9/AudioPlayer/AudioPlayer.d.ts.map +1 -1
- package/dist/src/components/a2ui/v0_9/AudioPlayer/AudioPlayer.js +2 -12
- package/dist/src/components/a2ui/v0_9/Button/Button.d.ts +75 -241
- package/dist/src/components/a2ui/v0_9/Button/Button.d.ts.map +1 -1
- package/dist/src/components/a2ui/v0_9/Button/Button.js +2 -13
- package/dist/src/components/a2ui/v0_9/ChoicePicker/ChoicePicker.d.ts +1 -8
- package/dist/src/components/a2ui/v0_9/ChoicePicker/ChoicePicker.d.ts.map +1 -1
- package/dist/src/components/a2ui/v0_9/ChoicePicker/ChoicePicker.js +2 -51
- package/dist/src/components/a2ui/v0_9/TagInput/TagInput.d.ts +40 -196
- package/dist/src/components/a2ui/v0_9/TagInput/TagInput.d.ts.map +1 -1
- package/dist/src/components/a2ui/v0_9/TagInput/TagInput.js +3 -10
- package/dist/src/components/a2ui/v0_9/Timeout/Timeout.d.ts +26 -102
- package/dist/src/components/a2ui/v0_9/Timeout/Timeout.d.ts.map +1 -1
- package/dist/src/components/a2ui/v0_9/Timeout/Timeout.js +3 -23
- package/dist/src/components/a2ui/v0_9/common.d.ts +11 -57
- package/dist/src/components/a2ui/v0_9/common.d.ts.map +1 -1
- package/dist/src/components/a2ui/v0_9/common.js +0 -9
- package/dist/src/components/a2ui/v1_0/AudioPlayer/AudioPlayer.d.ts +3 -0
- package/dist/src/components/a2ui/v1_0/AudioPlayer/AudioPlayer.d.ts.map +1 -0
- package/dist/src/components/a2ui/v1_0/AudioPlayer/AudioPlayer.js +6 -0
- package/dist/src/components/a2ui/v1_0/Button/Button.d.ts +223 -0
- package/dist/src/components/a2ui/v1_0/Button/Button.d.ts.map +1 -0
- package/dist/src/components/a2ui/v1_0/Button/Button.js +26 -0
- package/dist/src/components/a2ui/v1_0/ChoicePicker/ChoicePicker.d.ts +3 -0
- package/dist/src/components/a2ui/v1_0/ChoicePicker/ChoicePicker.d.ts.map +1 -0
- package/dist/src/components/a2ui/v1_0/ChoicePicker/ChoicePicker.js +6 -0
- package/dist/src/components/a2ui/v1_0/TagInput/TagInput.d.ts +214 -0
- package/dist/src/components/a2ui/v1_0/TagInput/TagInput.d.ts.map +1 -0
- package/dist/src/components/a2ui/v1_0/TagInput/TagInput.js +34 -0
- package/dist/src/components/a2ui/v1_0/Timeout/Timeout.d.ts +58 -0
- package/dist/src/components/a2ui/v1_0/Timeout/Timeout.d.ts.map +1 -0
- package/dist/src/components/a2ui/v1_0/Timeout/Timeout.js +25 -0
- package/dist/src/components/a2ui/v1_0/common.d.ts +15 -0
- package/dist/src/components/a2ui/v1_0/common.d.ts.map +1 -0
- package/dist/src/components/a2ui/v1_0/common.js +16 -0
- package/dist/src/components/a2ui/views/AudioPlayer/AudioPlayer.d.ts +14 -0
- package/dist/src/components/a2ui/views/AudioPlayer/AudioPlayer.d.ts.map +1 -0
- package/dist/src/components/a2ui/views/AudioPlayer/AudioPlayer.js +10 -0
- package/dist/src/components/a2ui/views/Button/Button.d.ts +18 -0
- package/dist/src/components/a2ui/views/Button/Button.d.ts.map +1 -0
- package/dist/src/components/a2ui/views/Button/Button.js +22 -0
- package/dist/src/components/a2ui/views/ChoicePicker/ChoicePicker.d.ts +25 -0
- package/dist/src/components/a2ui/views/ChoicePicker/ChoicePicker.d.ts.map +1 -0
- package/dist/src/components/a2ui/views/ChoicePicker/ChoicePicker.js +46 -0
- package/dist/src/components/a2ui/views/ChoicePicker/theme.d.ts.map +1 -0
- package/dist/src/components/a2ui/views/TagInput/TagInput.d.ts +16 -0
- package/dist/src/components/a2ui/views/TagInput/TagInput.d.ts.map +1 -0
- package/dist/src/components/a2ui/views/TagInput/TagInput.js +12 -0
- package/dist/src/components/a2ui/views/Timeout/Timeout.d.ts +9 -0
- package/dist/src/components/a2ui/views/Timeout/Timeout.d.ts.map +1 -0
- package/dist/src/components/a2ui/views/Timeout/Timeout.js +27 -0
- package/dist/src/components/a2ui/views/weight.d.ts +7 -0
- package/dist/src/components/a2ui/views/weight.d.ts.map +1 -0
- package/dist/src/components/a2ui/views/weight.js +9 -0
- package/dist/src/components/ui/InlineAlert/InlineAlert.d.ts +60 -9
- package/dist/src/components/ui/InlineAlert/InlineAlert.d.ts.map +1 -1
- package/dist/src/components/ui/InlineAlert/InlineAlert.js +4 -3
- package/dist/src/core/SurfaceErrorBoundary.d.ts +27 -0
- package/dist/src/core/SurfaceErrorBoundary.d.ts.map +1 -0
- package/dist/src/core/SurfaceErrorBoundary.js +24 -0
- package/dist/src/core/SurfaceGroupProvider.d.ts +38 -0
- package/dist/src/core/SurfaceGroupProvider.d.ts.map +1 -0
- package/dist/src/core/SurfaceGroupProvider.js +142 -0
- package/dist/src/core/SurfaceRenderer.d.ts +4 -0
- package/dist/src/core/SurfaceRenderer.d.ts.map +1 -0
- package/dist/src/core/SurfaceRenderer.js +64 -0
- package/dist/src/core/errors.d.ts +44 -0
- package/dist/src/core/errors.d.ts.map +1 -0
- package/dist/src/core/errors.js +42 -0
- package/dist/src/core/types.d.ts +11 -0
- package/dist/src/core/types.d.ts.map +1 -0
- package/dist/src/core/types.js +1 -0
- package/dist/src/core/unknownComponent.d.ts +28 -0
- package/dist/src/core/unknownComponent.d.ts.map +1 -0
- package/dist/src/core/unknownComponent.js +41 -0
- package/dist/src/{v0_9 → core}/useSurfaces.d.ts +3 -3
- package/dist/src/core/useSurfaces.d.ts.map +1 -0
- package/dist/src/utils/detectVersion.d.ts +1 -1
- package/dist/src/utils/detectVersion.d.ts.map +1 -1
- package/dist/src/utils/detectVersion.js +5 -1
- package/dist/src/v0_8/Provider.d.ts +2 -1
- package/dist/src/v0_8/Provider.d.ts.map +1 -1
- package/dist/src/v0_8/Provider.js +4 -9
- package/dist/src/v0_9/Provider.d.ts +13 -13
- package/dist/src/v0_9/Provider.d.ts.map +1 -1
- package/dist/src/v0_9/Provider.js +14 -61
- package/dist/src/v0_9/catalog.d.ts +2 -8
- package/dist/src/v0_9/catalog.d.ts.map +1 -1
- package/dist/src/v0_9/catalog.js +3 -17
- package/dist/src/v1_0/Provider.d.ts +27 -0
- package/dist/src/v1_0/Provider.d.ts.map +1 -0
- package/dist/src/v1_0/Provider.js +35 -0
- package/dist/src/v1_0/catalog.d.ts +52 -0
- package/dist/src/v1_0/catalog.d.ts.map +1 -0
- package/dist/src/v1_0/catalog.js +118 -0
- package/dist/src/v1_0/types.d.ts +13 -0
- package/dist/src/v1_0/types.d.ts.map +1 -0
- package/dist/src/v1_0/types.js +1 -0
- package/json/README.md +27 -30
- package/json/v0_9/glchat_standard_catalog_definition.json +5 -5
- package/json/v1_0/a2ui-sample-messages-extension.json +150 -0
- package/json/v1_0/a2ui-sample-messages.json +144 -0
- package/json/v1_0/glchat_extension_catalog_definition.json +794 -0
- package/json/v1_0/glchat_standard_catalog_definition.json +1487 -0
- package/package.json +4 -4
- package/styles/globals.css +180 -86
- package/dist/src/components/a2ui/v0_9/ChoicePicker/theme.d.ts.map +0 -1
- package/dist/src/components/a2ui/v0_9/UnknownComponent/UnknownComponent.d.ts +0 -231
- package/dist/src/components/a2ui/v0_9/UnknownComponent/UnknownComponent.d.ts.map +0 -1
- package/dist/src/components/a2ui/v0_9/UnknownComponent/UnknownComponent.js +0 -24
- package/dist/src/v0_9/SurfaceErrorBoundary.d.ts +0 -18
- package/dist/src/v0_9/SurfaceErrorBoundary.d.ts.map +0 -1
- package/dist/src/v0_9/SurfaceErrorBoundary.js +0 -24
- package/dist/src/v0_9/SurfaceRenderer.d.ts +0 -3
- package/dist/src/v0_9/SurfaceRenderer.d.ts.map +0 -1
- package/dist/src/v0_9/SurfaceRenderer.js +0 -47
- package/dist/src/v0_9/useSurfaces.d.ts.map +0 -1
- /package/dist/src/components/a2ui/{v0_9 → views}/ChoicePicker/theme.d.ts +0 -0
- /package/dist/src/components/a2ui/{v0_9 → views}/ChoicePicker/theme.js +0 -0
- /package/dist/src/{v0_9 → core}/useSurfaces.js +0 -0
|
@@ -0,0 +1,794 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"protocolVersion": "1.0",
|
|
4
|
+
"catalogId": "https://github.com/GDP-ADMIN/glchat-sdk/blob/main/js/glchat-a2ui-react-renderer/json/v1_0/glchat_extension_catalog_definition.json",
|
|
5
|
+
"instructions": "GLChat components for A2UI v1.0, used together with the A2UI basic catalog (`https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json`).\n\n## Choosing the catalog per component\n\n- AudioPlayer, Button, ChoicePicker also exist in the basic catalog. ALWAYS use this catalog's versions: set `\"catalogId\": \"https://github.com/GDP-ADMIN/glchat-sdk/blob/main/js/glchat-a2ui-react-renderer/json/v1_0/glchat_extension_catalog_definition.json\"` on every AudioPlayer, Button, ChoicePicker component.\n- TagInput, Timeout exist only in this catalog; set the same `\"catalogId\"` on them.\n- All other components (Text, Row, Column, TextField, ...) come from the basic catalog. A component without `catalogId` resolves to `createSurface.catalogId`, so use the basic catalog ID there.\n\n## Components\n\n- Button supports an extra `destructive` variant for dangerous or irreversible actions.\n- TagInput adds and removes string tags; bind `value` to a string array. `validationRegexp` validates each tag before it is added.\n- Timeout counts down to `targetTimeUtc` (ISO 8601 UTC string).\n- Modal opens locally when its trigger is clicked. Do NOT use a Button as the Modal trigger; it would also dispatch an action.",
|
|
6
|
+
"components": {
|
|
7
|
+
"AudioPlayer": {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"component": {
|
|
11
|
+
"const": "AudioPlayer"
|
|
12
|
+
},
|
|
13
|
+
"url": {
|
|
14
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
15
|
+
"description": "The URL of the audio to be played."
|
|
16
|
+
},
|
|
17
|
+
"description": {
|
|
18
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
19
|
+
"description": "A description of the audio, such as a title or summary."
|
|
20
|
+
},
|
|
21
|
+
"weight": {
|
|
22
|
+
"$ref": "#/$defs/Weight"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"required": [
|
|
26
|
+
"component",
|
|
27
|
+
"url"
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
"Button": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"allOf": [
|
|
33
|
+
{
|
|
34
|
+
"$ref": "common_types.json#/$defs/Checkable"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"type": "object",
|
|
38
|
+
"properties": {
|
|
39
|
+
"component": {
|
|
40
|
+
"const": "Button"
|
|
41
|
+
},
|
|
42
|
+
"child": {
|
|
43
|
+
"$ref": "common_types.json#/$defs/Child",
|
|
44
|
+
"description": "The ID of the child component. Use a 'Text' component for a labeled button. Only use an 'Icon' if the requirements explicitly ask for an icon-only button."
|
|
45
|
+
},
|
|
46
|
+
"variant": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"enum": [
|
|
49
|
+
"default",
|
|
50
|
+
"primary",
|
|
51
|
+
"borderless",
|
|
52
|
+
"destructive"
|
|
53
|
+
],
|
|
54
|
+
"description": "A hint for the button style. If omitted, a default button style is used. 'primary' indicates this is the main call-to-action button. 'borderless' means the button has no visual border or background, making its child content appear like a clickable link. 'destructive' indicates a dangerous or irreversible action.",
|
|
55
|
+
"default": "default"
|
|
56
|
+
},
|
|
57
|
+
"action": {
|
|
58
|
+
"$ref": "common_types.json#/$defs/Action"
|
|
59
|
+
},
|
|
60
|
+
"weight": {
|
|
61
|
+
"$ref": "#/$defs/Weight"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"required": [
|
|
65
|
+
"component",
|
|
66
|
+
"child",
|
|
67
|
+
"action"
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
"ChoicePicker": {
|
|
73
|
+
"type": "object",
|
|
74
|
+
"description": "A component that allows selecting one or more options from a list.",
|
|
75
|
+
"allOf": [
|
|
76
|
+
{
|
|
77
|
+
"$ref": "common_types.json#/$defs/Checkable"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"type": "object",
|
|
81
|
+
"properties": {
|
|
82
|
+
"component": {
|
|
83
|
+
"const": "ChoicePicker"
|
|
84
|
+
},
|
|
85
|
+
"label": {
|
|
86
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
87
|
+
"description": "The label for the group of options."
|
|
88
|
+
},
|
|
89
|
+
"variant": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"enum": [
|
|
92
|
+
"multipleSelection",
|
|
93
|
+
"mutuallyExclusive"
|
|
94
|
+
],
|
|
95
|
+
"description": "A hint for how the choice picker should be displayed and behave.",
|
|
96
|
+
"default": "mutuallyExclusive"
|
|
97
|
+
},
|
|
98
|
+
"options": {
|
|
99
|
+
"type": "array",
|
|
100
|
+
"items": {
|
|
101
|
+
"type": "object",
|
|
102
|
+
"properties": {
|
|
103
|
+
"label": {
|
|
104
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
105
|
+
"description": "The text to display for this option."
|
|
106
|
+
},
|
|
107
|
+
"value": {
|
|
108
|
+
"type": "string",
|
|
109
|
+
"description": "The stable value associated with this option."
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"required": [
|
|
113
|
+
"label",
|
|
114
|
+
"value"
|
|
115
|
+
],
|
|
116
|
+
"additionalProperties": false
|
|
117
|
+
},
|
|
118
|
+
"description": "The list of available options to choose from."
|
|
119
|
+
},
|
|
120
|
+
"value": {
|
|
121
|
+
"$ref": "common_types.json#/$defs/DynamicStringList",
|
|
122
|
+
"description": "The list of currently selected values. This should be bound to a string array in the data model."
|
|
123
|
+
},
|
|
124
|
+
"displayStyle": {
|
|
125
|
+
"type": "string",
|
|
126
|
+
"enum": [
|
|
127
|
+
"checkbox",
|
|
128
|
+
"chips"
|
|
129
|
+
],
|
|
130
|
+
"description": "The display style of the component.",
|
|
131
|
+
"default": "checkbox"
|
|
132
|
+
},
|
|
133
|
+
"filterable": {
|
|
134
|
+
"type": "boolean",
|
|
135
|
+
"description": "If true, displays a search input to filter the options.",
|
|
136
|
+
"default": false
|
|
137
|
+
},
|
|
138
|
+
"weight": {
|
|
139
|
+
"$ref": "#/$defs/Weight"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"required": [
|
|
143
|
+
"component",
|
|
144
|
+
"options",
|
|
145
|
+
"value"
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
]
|
|
149
|
+
},
|
|
150
|
+
"TagInput": {
|
|
151
|
+
"type": "object",
|
|
152
|
+
"properties": {
|
|
153
|
+
"component": {
|
|
154
|
+
"const": "TagInput"
|
|
155
|
+
},
|
|
156
|
+
"weight": {
|
|
157
|
+
"type": "number",
|
|
158
|
+
"description": "The relative weight of this component within a Row or Column. This is similar to the CSS 'flex-grow' property. Note: this may ONLY be set when the component is a direct descendant of a Row or Column."
|
|
159
|
+
},
|
|
160
|
+
"label": {
|
|
161
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
162
|
+
"description": "The text label for the field."
|
|
163
|
+
},
|
|
164
|
+
"value": {
|
|
165
|
+
"$ref": "common_types.json#/$defs/DynamicStringList",
|
|
166
|
+
"description": "The list of current tags. Should be bound to a string array in the data model."
|
|
167
|
+
},
|
|
168
|
+
"placeholder": {
|
|
169
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
170
|
+
"description": "Placeholder text shown when there are no tags."
|
|
171
|
+
},
|
|
172
|
+
"disabled": {
|
|
173
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean",
|
|
174
|
+
"description": "If true, the input is disabled."
|
|
175
|
+
},
|
|
176
|
+
"disableTextInput": {
|
|
177
|
+
"type": "boolean",
|
|
178
|
+
"description": "If true, hides the text input and only displays existing tags."
|
|
179
|
+
},
|
|
180
|
+
"validationRegexp": {
|
|
181
|
+
"type": "string",
|
|
182
|
+
"description": "A regular expression used to validate each tag before it is added."
|
|
183
|
+
},
|
|
184
|
+
"validationErrorMessage": {
|
|
185
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
186
|
+
"description": "The error message shown when a tag fails validation."
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
"required": [
|
|
190
|
+
"component",
|
|
191
|
+
"value"
|
|
192
|
+
],
|
|
193
|
+
"unevaluatedProperties": false
|
|
194
|
+
},
|
|
195
|
+
"Timeout": {
|
|
196
|
+
"type": "object",
|
|
197
|
+
"properties": {
|
|
198
|
+
"component": {
|
|
199
|
+
"const": "Timeout"
|
|
200
|
+
},
|
|
201
|
+
"weight": {
|
|
202
|
+
"type": "number",
|
|
203
|
+
"description": "The relative weight of this component within a Row or Column. This is similar to the CSS 'flex-grow' property. Note: this may ONLY be set when the component is a direct descendant of a Row or Column."
|
|
204
|
+
},
|
|
205
|
+
"targetTimeUtc": {
|
|
206
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
207
|
+
"description": "The target time as a UTC ISO 8601 string to count down to."
|
|
208
|
+
},
|
|
209
|
+
"variant": {
|
|
210
|
+
"type": "string",
|
|
211
|
+
"enum": [
|
|
212
|
+
"body",
|
|
213
|
+
"caption",
|
|
214
|
+
"h3",
|
|
215
|
+
"h4",
|
|
216
|
+
"h5"
|
|
217
|
+
],
|
|
218
|
+
"description": "A hint for the base text style."
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
"required": [
|
|
222
|
+
"component",
|
|
223
|
+
"targetTimeUtc"
|
|
224
|
+
],
|
|
225
|
+
"unevaluatedProperties": false
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
"functions": {
|
|
229
|
+
"required": {
|
|
230
|
+
"type": "object",
|
|
231
|
+
"description": "Checks that the value is not null, undefined, or empty.",
|
|
232
|
+
"returnType": "validationResult",
|
|
233
|
+
"properties": {
|
|
234
|
+
"@call": {
|
|
235
|
+
"const": "required"
|
|
236
|
+
},
|
|
237
|
+
"args": {
|
|
238
|
+
"type": "object",
|
|
239
|
+
"properties": {
|
|
240
|
+
"value": {
|
|
241
|
+
"description": "The value to check."
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
"required": [
|
|
245
|
+
"value"
|
|
246
|
+
],
|
|
247
|
+
"unevaluatedProperties": false
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
"required": [
|
|
251
|
+
"@call",
|
|
252
|
+
"args"
|
|
253
|
+
]
|
|
254
|
+
},
|
|
255
|
+
"regex": {
|
|
256
|
+
"type": "object",
|
|
257
|
+
"description": "Checks that the value matches a regular expression string.",
|
|
258
|
+
"returnType": "validationResult",
|
|
259
|
+
"properties": {
|
|
260
|
+
"@call": {
|
|
261
|
+
"const": "regex"
|
|
262
|
+
},
|
|
263
|
+
"args": {
|
|
264
|
+
"type": "object",
|
|
265
|
+
"properties": {
|
|
266
|
+
"value": {
|
|
267
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
268
|
+
},
|
|
269
|
+
"pattern": {
|
|
270
|
+
"type": "string",
|
|
271
|
+
"description": "The regex pattern to match against."
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
"required": [
|
|
275
|
+
"value",
|
|
276
|
+
"pattern"
|
|
277
|
+
],
|
|
278
|
+
"unevaluatedProperties": false
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
"required": [
|
|
282
|
+
"@call",
|
|
283
|
+
"args"
|
|
284
|
+
]
|
|
285
|
+
},
|
|
286
|
+
"length": {
|
|
287
|
+
"type": "object",
|
|
288
|
+
"description": "Checks string length constraints.",
|
|
289
|
+
"returnType": "validationResult",
|
|
290
|
+
"properties": {
|
|
291
|
+
"@call": {
|
|
292
|
+
"const": "length"
|
|
293
|
+
},
|
|
294
|
+
"args": {
|
|
295
|
+
"type": "object",
|
|
296
|
+
"properties": {
|
|
297
|
+
"value": {
|
|
298
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
299
|
+
},
|
|
300
|
+
"min": {
|
|
301
|
+
"type": "integer",
|
|
302
|
+
"minimum": 0,
|
|
303
|
+
"description": "The minimum allowed length."
|
|
304
|
+
},
|
|
305
|
+
"max": {
|
|
306
|
+
"type": "integer",
|
|
307
|
+
"minimum": 0,
|
|
308
|
+
"description": "The maximum allowed length."
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
"required": [
|
|
312
|
+
"value"
|
|
313
|
+
],
|
|
314
|
+
"unevaluatedProperties": false,
|
|
315
|
+
"anyOf": [
|
|
316
|
+
{
|
|
317
|
+
"required": [
|
|
318
|
+
"min"
|
|
319
|
+
]
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"required": [
|
|
323
|
+
"max"
|
|
324
|
+
]
|
|
325
|
+
}
|
|
326
|
+
]
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
"required": [
|
|
330
|
+
"@call",
|
|
331
|
+
"args"
|
|
332
|
+
]
|
|
333
|
+
},
|
|
334
|
+
"numeric": {
|
|
335
|
+
"type": "object",
|
|
336
|
+
"description": "Checks numeric range constraints.",
|
|
337
|
+
"returnType": "validationResult",
|
|
338
|
+
"properties": {
|
|
339
|
+
"@call": {
|
|
340
|
+
"const": "numeric"
|
|
341
|
+
},
|
|
342
|
+
"args": {
|
|
343
|
+
"type": "object",
|
|
344
|
+
"properties": {
|
|
345
|
+
"value": {
|
|
346
|
+
"$ref": "common_types.json#/$defs/DynamicNumber"
|
|
347
|
+
},
|
|
348
|
+
"min": {
|
|
349
|
+
"type": "number",
|
|
350
|
+
"description": "The minimum allowed value."
|
|
351
|
+
},
|
|
352
|
+
"max": {
|
|
353
|
+
"type": "number",
|
|
354
|
+
"description": "The maximum allowed value."
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
"required": [
|
|
358
|
+
"value"
|
|
359
|
+
],
|
|
360
|
+
"unevaluatedProperties": false,
|
|
361
|
+
"anyOf": [
|
|
362
|
+
{
|
|
363
|
+
"required": [
|
|
364
|
+
"min"
|
|
365
|
+
]
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
"required": [
|
|
369
|
+
"max"
|
|
370
|
+
]
|
|
371
|
+
}
|
|
372
|
+
]
|
|
373
|
+
}
|
|
374
|
+
},
|
|
375
|
+
"required": [
|
|
376
|
+
"@call",
|
|
377
|
+
"args"
|
|
378
|
+
]
|
|
379
|
+
},
|
|
380
|
+
"email": {
|
|
381
|
+
"type": "object",
|
|
382
|
+
"description": "Checks that the value is a valid email address.",
|
|
383
|
+
"returnType": "validationResult",
|
|
384
|
+
"properties": {
|
|
385
|
+
"@call": {
|
|
386
|
+
"const": "email"
|
|
387
|
+
},
|
|
388
|
+
"args": {
|
|
389
|
+
"type": "object",
|
|
390
|
+
"properties": {
|
|
391
|
+
"value": {
|
|
392
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
393
|
+
}
|
|
394
|
+
},
|
|
395
|
+
"required": [
|
|
396
|
+
"value"
|
|
397
|
+
],
|
|
398
|
+
"unevaluatedProperties": false
|
|
399
|
+
}
|
|
400
|
+
},
|
|
401
|
+
"required": [
|
|
402
|
+
"@call",
|
|
403
|
+
"args"
|
|
404
|
+
]
|
|
405
|
+
},
|
|
406
|
+
"formatString": {
|
|
407
|
+
"type": "object",
|
|
408
|
+
"description": "Performs string interpolation of data model values and other functions in the catalog functions list and returns the resulting string. The value string can contain interpolated expressions in the `${expression}` format. Supported expression types include: JSON Pointer paths to the data model (e.g., `${/absolute/path}` or `${relative/path}`), and renderer-side function calls (e.g., `${now()}`). Function arguments must be named (e.g., `${formatDate(value:${/currentDate}, format:'MM-dd')}`). To include a literal `${` sequence, escape it as `\\${`.",
|
|
409
|
+
"returnType": "string",
|
|
410
|
+
"properties": {
|
|
411
|
+
"@call": {
|
|
412
|
+
"const": "formatString"
|
|
413
|
+
},
|
|
414
|
+
"args": {
|
|
415
|
+
"type": "object",
|
|
416
|
+
"properties": {
|
|
417
|
+
"value": {
|
|
418
|
+
"$ref": "common_types.json#/$defs/DynamicString"
|
|
419
|
+
}
|
|
420
|
+
},
|
|
421
|
+
"required": [
|
|
422
|
+
"value"
|
|
423
|
+
],
|
|
424
|
+
"unevaluatedProperties": false
|
|
425
|
+
}
|
|
426
|
+
},
|
|
427
|
+
"required": [
|
|
428
|
+
"@call",
|
|
429
|
+
"args"
|
|
430
|
+
]
|
|
431
|
+
},
|
|
432
|
+
"formatNumber": {
|
|
433
|
+
"type": "object",
|
|
434
|
+
"description": "Formats a number with the specified grouping and decimal precision.",
|
|
435
|
+
"returnType": "string",
|
|
436
|
+
"properties": {
|
|
437
|
+
"@call": {
|
|
438
|
+
"const": "formatNumber"
|
|
439
|
+
},
|
|
440
|
+
"args": {
|
|
441
|
+
"type": "object",
|
|
442
|
+
"properties": {
|
|
443
|
+
"value": {
|
|
444
|
+
"$ref": "common_types.json#/$defs/DynamicNumber",
|
|
445
|
+
"description": "The number to format."
|
|
446
|
+
},
|
|
447
|
+
"decimals": {
|
|
448
|
+
"$ref": "common_types.json#/$defs/DynamicNumber",
|
|
449
|
+
"description": "Optional. The number of decimal places to show. Defaults to 0 or 2 depending on locale."
|
|
450
|
+
},
|
|
451
|
+
"grouping": {
|
|
452
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean",
|
|
453
|
+
"description": "Optional. If true, uses locale-specific grouping separators (e.g. '1,000'). If false, returns raw digits (e.g. '1000'). Defaults to true."
|
|
454
|
+
}
|
|
455
|
+
},
|
|
456
|
+
"required": [
|
|
457
|
+
"value"
|
|
458
|
+
],
|
|
459
|
+
"unevaluatedProperties": false
|
|
460
|
+
}
|
|
461
|
+
},
|
|
462
|
+
"required": [
|
|
463
|
+
"@call",
|
|
464
|
+
"args"
|
|
465
|
+
]
|
|
466
|
+
},
|
|
467
|
+
"formatCurrency": {
|
|
468
|
+
"type": "object",
|
|
469
|
+
"description": "Formats a number as a currency string.",
|
|
470
|
+
"returnType": "string",
|
|
471
|
+
"properties": {
|
|
472
|
+
"@call": {
|
|
473
|
+
"const": "formatCurrency"
|
|
474
|
+
},
|
|
475
|
+
"args": {
|
|
476
|
+
"type": "object",
|
|
477
|
+
"properties": {
|
|
478
|
+
"value": {
|
|
479
|
+
"$ref": "common_types.json#/$defs/DynamicNumber",
|
|
480
|
+
"description": "The monetary amount."
|
|
481
|
+
},
|
|
482
|
+
"currency": {
|
|
483
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
484
|
+
"description": "The ISO 4217 currency code (e.g., 'USD', 'EUR')."
|
|
485
|
+
},
|
|
486
|
+
"decimals": {
|
|
487
|
+
"$ref": "common_types.json#/$defs/DynamicNumber",
|
|
488
|
+
"description": "Optional. The number of decimal places to show. Defaults to 0 or 2 depending on locale."
|
|
489
|
+
},
|
|
490
|
+
"grouping": {
|
|
491
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean",
|
|
492
|
+
"description": "Optional. If true, uses locale-specific grouping separators (e.g. '1,000'). If false, returns raw digits (e.g. '1000'). Defaults to true."
|
|
493
|
+
}
|
|
494
|
+
},
|
|
495
|
+
"required": [
|
|
496
|
+
"currency",
|
|
497
|
+
"value"
|
|
498
|
+
],
|
|
499
|
+
"unevaluatedProperties": false
|
|
500
|
+
}
|
|
501
|
+
},
|
|
502
|
+
"required": [
|
|
503
|
+
"@call",
|
|
504
|
+
"args"
|
|
505
|
+
]
|
|
506
|
+
},
|
|
507
|
+
"formatDate": {
|
|
508
|
+
"type": "object",
|
|
509
|
+
"description": "Formats a timestamp into a string using a pattern.",
|
|
510
|
+
"returnType": "string",
|
|
511
|
+
"properties": {
|
|
512
|
+
"@call": {
|
|
513
|
+
"const": "formatDate"
|
|
514
|
+
},
|
|
515
|
+
"args": {
|
|
516
|
+
"type": "object",
|
|
517
|
+
"properties": {
|
|
518
|
+
"value": {
|
|
519
|
+
"$ref": "common_types.json#/$defs/DynamicValue",
|
|
520
|
+
"description": "The date to format."
|
|
521
|
+
},
|
|
522
|
+
"format": {
|
|
523
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
524
|
+
"description": "A Unicode TR35 date pattern string.\n\nToken Reference:\n- Year: 'yy' (26), 'yyyy' (2026)\n- Month: 'M' (1), 'MM' (01), 'MMM' (Jan), 'MMMM' (January)\n- Day: 'd' (1), 'dd' (01), 'E' (Tue), 'EEEE' (Tuesday)\n- Hour (12h): 'h' (1-12), 'hh' (01-12) - requires 'a' for AM/PM\n- Hour (24h): 'H' (0-23), 'HH' (00-23) - Military Time\n- Minute: 'mm' (00-59)\n- Second: 'ss' (00-59)\n- Period: 'a' (AM/PM)\n\nExamples:\n- 'MMM dd, yyyy' -> 'Jan 16, 2026'\n- 'HH:mm' -> '14:30' (Military)\n- 'h:mm a' -> '2:30 PM'\n- 'EEEE, d MMMM' -> 'Friday, 16 January'"
|
|
525
|
+
}
|
|
526
|
+
},
|
|
527
|
+
"required": [
|
|
528
|
+
"format",
|
|
529
|
+
"value"
|
|
530
|
+
],
|
|
531
|
+
"unevaluatedProperties": false
|
|
532
|
+
}
|
|
533
|
+
},
|
|
534
|
+
"required": [
|
|
535
|
+
"@call",
|
|
536
|
+
"args"
|
|
537
|
+
]
|
|
538
|
+
},
|
|
539
|
+
"pluralize": {
|
|
540
|
+
"type": "object",
|
|
541
|
+
"description": "Returns a localized string based on the Common Locale Data Repository (CLDR) plural category of the count (zero, one, two, few, many, other). Requires an 'other' fallback. For English, just use 'one' and 'other'.",
|
|
542
|
+
"returnType": "string",
|
|
543
|
+
"properties": {
|
|
544
|
+
"@call": {
|
|
545
|
+
"const": "pluralize"
|
|
546
|
+
},
|
|
547
|
+
"args": {
|
|
548
|
+
"type": "object",
|
|
549
|
+
"properties": {
|
|
550
|
+
"value": {
|
|
551
|
+
"$ref": "common_types.json#/$defs/DynamicNumber",
|
|
552
|
+
"description": "The numeric value used to determine the plural category."
|
|
553
|
+
},
|
|
554
|
+
"zero": {
|
|
555
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
556
|
+
"description": "String for the 'zero' category (e.g., 0 items)."
|
|
557
|
+
},
|
|
558
|
+
"one": {
|
|
559
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
560
|
+
"description": "String for the 'one' category (e.g., 1 item)."
|
|
561
|
+
},
|
|
562
|
+
"two": {
|
|
563
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
564
|
+
"description": "String for the 'two' category (used in Arabic, Welsh, etc.)."
|
|
565
|
+
},
|
|
566
|
+
"few": {
|
|
567
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
568
|
+
"description": "String for the 'few' category (e.g., small groups in Slavic languages)."
|
|
569
|
+
},
|
|
570
|
+
"many": {
|
|
571
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
572
|
+
"description": "String for the 'many' category (e.g., large groups in various languages)."
|
|
573
|
+
},
|
|
574
|
+
"other": {
|
|
575
|
+
"$ref": "common_types.json#/$defs/DynamicString",
|
|
576
|
+
"description": "The default/fallback string (used for general plural cases)."
|
|
577
|
+
}
|
|
578
|
+
},
|
|
579
|
+
"required": [
|
|
580
|
+
"value",
|
|
581
|
+
"other"
|
|
582
|
+
],
|
|
583
|
+
"unevaluatedProperties": false
|
|
584
|
+
}
|
|
585
|
+
},
|
|
586
|
+
"required": [
|
|
587
|
+
"@call",
|
|
588
|
+
"args"
|
|
589
|
+
]
|
|
590
|
+
},
|
|
591
|
+
"openUrl": {
|
|
592
|
+
"type": "object",
|
|
593
|
+
"description": "Opens the specified URL in a browser or handler (requires user activation). This function has no return value.",
|
|
594
|
+
"returnType": "void",
|
|
595
|
+
"requiresUserActivation": true,
|
|
596
|
+
"properties": {
|
|
597
|
+
"@call": {
|
|
598
|
+
"const": "openUrl"
|
|
599
|
+
},
|
|
600
|
+
"args": {
|
|
601
|
+
"type": "object",
|
|
602
|
+
"properties": {
|
|
603
|
+
"url": {
|
|
604
|
+
"oneOf": [
|
|
605
|
+
{
|
|
606
|
+
"type": "string",
|
|
607
|
+
"format": "uri"
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
"$ref": "common_types.json#/$defs/DataBinding"
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
"$ref": "common_types.json#/$defs/FunctionCall"
|
|
614
|
+
}
|
|
615
|
+
],
|
|
616
|
+
"description": "The URL to open."
|
|
617
|
+
}
|
|
618
|
+
},
|
|
619
|
+
"required": [
|
|
620
|
+
"url"
|
|
621
|
+
],
|
|
622
|
+
"unevaluatedProperties": false
|
|
623
|
+
}
|
|
624
|
+
},
|
|
625
|
+
"required": [
|
|
626
|
+
"@call",
|
|
627
|
+
"args"
|
|
628
|
+
]
|
|
629
|
+
},
|
|
630
|
+
"and": {
|
|
631
|
+
"type": "object",
|
|
632
|
+
"description": "Performs a logical AND operation on a list of boolean values.",
|
|
633
|
+
"returnType": "boolean",
|
|
634
|
+
"properties": {
|
|
635
|
+
"@call": {
|
|
636
|
+
"const": "and"
|
|
637
|
+
},
|
|
638
|
+
"args": {
|
|
639
|
+
"type": "object",
|
|
640
|
+
"properties": {
|
|
641
|
+
"values": {
|
|
642
|
+
"type": "array",
|
|
643
|
+
"items": {
|
|
644
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean"
|
|
645
|
+
},
|
|
646
|
+
"minItems": 2,
|
|
647
|
+
"description": "The list of boolean values to evaluate."
|
|
648
|
+
}
|
|
649
|
+
},
|
|
650
|
+
"required": [
|
|
651
|
+
"values"
|
|
652
|
+
],
|
|
653
|
+
"unevaluatedProperties": false
|
|
654
|
+
}
|
|
655
|
+
},
|
|
656
|
+
"required": [
|
|
657
|
+
"@call",
|
|
658
|
+
"args"
|
|
659
|
+
]
|
|
660
|
+
},
|
|
661
|
+
"or": {
|
|
662
|
+
"type": "object",
|
|
663
|
+
"description": "Performs a logical OR operation on a list of boolean values.",
|
|
664
|
+
"returnType": "boolean",
|
|
665
|
+
"properties": {
|
|
666
|
+
"@call": {
|
|
667
|
+
"const": "or"
|
|
668
|
+
},
|
|
669
|
+
"args": {
|
|
670
|
+
"type": "object",
|
|
671
|
+
"properties": {
|
|
672
|
+
"values": {
|
|
673
|
+
"type": "array",
|
|
674
|
+
"items": {
|
|
675
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean"
|
|
676
|
+
},
|
|
677
|
+
"minItems": 2,
|
|
678
|
+
"description": "The list of boolean values to evaluate."
|
|
679
|
+
}
|
|
680
|
+
},
|
|
681
|
+
"required": [
|
|
682
|
+
"values"
|
|
683
|
+
],
|
|
684
|
+
"unevaluatedProperties": false
|
|
685
|
+
}
|
|
686
|
+
},
|
|
687
|
+
"required": [
|
|
688
|
+
"@call",
|
|
689
|
+
"args"
|
|
690
|
+
]
|
|
691
|
+
},
|
|
692
|
+
"not": {
|
|
693
|
+
"type": "object",
|
|
694
|
+
"description": "Performs a logical NOT operation on a boolean value.",
|
|
695
|
+
"returnType": "boolean",
|
|
696
|
+
"properties": {
|
|
697
|
+
"@call": {
|
|
698
|
+
"const": "not"
|
|
699
|
+
},
|
|
700
|
+
"args": {
|
|
701
|
+
"type": "object",
|
|
702
|
+
"properties": {
|
|
703
|
+
"value": {
|
|
704
|
+
"$ref": "common_types.json#/$defs/DynamicBoolean",
|
|
705
|
+
"description": "The boolean value to negate."
|
|
706
|
+
}
|
|
707
|
+
},
|
|
708
|
+
"required": [
|
|
709
|
+
"value"
|
|
710
|
+
],
|
|
711
|
+
"unevaluatedProperties": false
|
|
712
|
+
}
|
|
713
|
+
},
|
|
714
|
+
"required": [
|
|
715
|
+
"@call",
|
|
716
|
+
"args"
|
|
717
|
+
]
|
|
718
|
+
}
|
|
719
|
+
},
|
|
720
|
+
"$defs": {
|
|
721
|
+
"Weight": {
|
|
722
|
+
"type": "number",
|
|
723
|
+
"description": "The relative weight of this component within a Row or Column. This is similar to the CSS 'flex-grow' property. Note: this may ONLY be set when the component is a direct descendant of a Row or Column."
|
|
724
|
+
},
|
|
725
|
+
"anyComponent": {
|
|
726
|
+
"oneOf": [
|
|
727
|
+
{
|
|
728
|
+
"$ref": "#/components/AudioPlayer"
|
|
729
|
+
},
|
|
730
|
+
{
|
|
731
|
+
"$ref": "#/components/Button"
|
|
732
|
+
},
|
|
733
|
+
{
|
|
734
|
+
"$ref": "#/components/ChoicePicker"
|
|
735
|
+
},
|
|
736
|
+
{
|
|
737
|
+
"$ref": "#/components/TagInput"
|
|
738
|
+
},
|
|
739
|
+
{
|
|
740
|
+
"$ref": "#/components/Timeout"
|
|
741
|
+
}
|
|
742
|
+
],
|
|
743
|
+
"discriminator": {
|
|
744
|
+
"propertyName": "component"
|
|
745
|
+
}
|
|
746
|
+
},
|
|
747
|
+
"anyFunction": {
|
|
748
|
+
"oneOf": [
|
|
749
|
+
{
|
|
750
|
+
"$ref": "#/functions/required"
|
|
751
|
+
},
|
|
752
|
+
{
|
|
753
|
+
"$ref": "#/functions/regex"
|
|
754
|
+
},
|
|
755
|
+
{
|
|
756
|
+
"$ref": "#/functions/length"
|
|
757
|
+
},
|
|
758
|
+
{
|
|
759
|
+
"$ref": "#/functions/numeric"
|
|
760
|
+
},
|
|
761
|
+
{
|
|
762
|
+
"$ref": "#/functions/email"
|
|
763
|
+
},
|
|
764
|
+
{
|
|
765
|
+
"$ref": "#/functions/formatString"
|
|
766
|
+
},
|
|
767
|
+
{
|
|
768
|
+
"$ref": "#/functions/formatNumber"
|
|
769
|
+
},
|
|
770
|
+
{
|
|
771
|
+
"$ref": "#/functions/formatCurrency"
|
|
772
|
+
},
|
|
773
|
+
{
|
|
774
|
+
"$ref": "#/functions/formatDate"
|
|
775
|
+
},
|
|
776
|
+
{
|
|
777
|
+
"$ref": "#/functions/pluralize"
|
|
778
|
+
},
|
|
779
|
+
{
|
|
780
|
+
"$ref": "#/functions/openUrl"
|
|
781
|
+
},
|
|
782
|
+
{
|
|
783
|
+
"$ref": "#/functions/and"
|
|
784
|
+
},
|
|
785
|
+
{
|
|
786
|
+
"$ref": "#/functions/or"
|
|
787
|
+
},
|
|
788
|
+
{
|
|
789
|
+
"$ref": "#/functions/not"
|
|
790
|
+
}
|
|
791
|
+
]
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
}
|