@cxtms/cx-schema 1.0.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.
Files changed (133) hide show
  1. package/README.md +384 -0
  2. package/dist/cli.d.ts +6 -0
  3. package/dist/cli.d.ts.map +1 -0
  4. package/dist/cli.js +1523 -0
  5. package/dist/cli.js.map +1 -0
  6. package/dist/index.d.ts +7 -0
  7. package/dist/index.d.ts.map +1 -0
  8. package/dist/index.js +11 -0
  9. package/dist/index.js.map +1 -0
  10. package/dist/types.d.ts +111 -0
  11. package/dist/types.d.ts.map +1 -0
  12. package/dist/types.js +6 -0
  13. package/dist/types.js.map +1 -0
  14. package/dist/utils/schemaLoader.d.ts +17 -0
  15. package/dist/utils/schemaLoader.d.ts.map +1 -0
  16. package/dist/utils/schemaLoader.js +134 -0
  17. package/dist/utils/schemaLoader.js.map +1 -0
  18. package/dist/validator.d.ts +64 -0
  19. package/dist/validator.d.ts.map +1 -0
  20. package/dist/validator.js +380 -0
  21. package/dist/validator.js.map +1 -0
  22. package/dist/workflowValidator.d.ts +64 -0
  23. package/dist/workflowValidator.d.ts.map +1 -0
  24. package/dist/workflowValidator.js +410 -0
  25. package/dist/workflowValidator.js.map +1 -0
  26. package/package.json +50 -0
  27. package/schemas/actions/all.json +26 -0
  28. package/schemas/actions/confirm.json +21 -0
  29. package/schemas/actions/consoleLog.json +16 -0
  30. package/schemas/actions/dialog.json +25 -0
  31. package/schemas/actions/fileDownload.json +16 -0
  32. package/schemas/actions/forEach.json +31 -0
  33. package/schemas/actions/if.json +12 -0
  34. package/schemas/actions/mutation.json +25 -0
  35. package/schemas/actions/navigate.json +18 -0
  36. package/schemas/actions/navigateBack.json +22 -0
  37. package/schemas/actions/navigateBackOrClose.json +21 -0
  38. package/schemas/actions/notification.json +19 -0
  39. package/schemas/actions/openBarcodeScanner.json +104 -0
  40. package/schemas/actions/query.json +32 -0
  41. package/schemas/actions/refresh.json +13 -0
  42. package/schemas/actions/resetDirtyState.json +22 -0
  43. package/schemas/actions/setFields.json +21 -0
  44. package/schemas/actions/setStore.json +13 -0
  45. package/schemas/actions/validateForm.json +15 -0
  46. package/schemas/actions/workflow.json +24 -0
  47. package/schemas/components/README.md +147 -0
  48. package/schemas/components/appComponent.json +50 -0
  49. package/schemas/components/barcodeScanner.json +69 -0
  50. package/schemas/components/button.json +123 -0
  51. package/schemas/components/calendar.json +489 -0
  52. package/schemas/components/card.json +176 -0
  53. package/schemas/components/collection.json +54 -0
  54. package/schemas/components/dataGrid.json +119 -0
  55. package/schemas/components/datasource.json +151 -0
  56. package/schemas/components/dropdown.json +57 -0
  57. package/schemas/components/field-collection.json +618 -0
  58. package/schemas/components/field.json +265 -0
  59. package/schemas/components/form.json +234 -0
  60. package/schemas/components/index.json +68 -0
  61. package/schemas/components/layout.json +69 -0
  62. package/schemas/components/module.json +138 -0
  63. package/schemas/components/navDropdown.json +36 -0
  64. package/schemas/components/navbar.json +78 -0
  65. package/schemas/components/navbarItem.json +28 -0
  66. package/schemas/components/navbarLink.json +36 -0
  67. package/schemas/components/row.json +31 -0
  68. package/schemas/components/tab.json +34 -0
  69. package/schemas/components/tabs.json +35 -0
  70. package/schemas/components/timeline.json +172 -0
  71. package/schemas/components/timelineGrid.json +324 -0
  72. package/schemas/fields/README.md +66 -0
  73. package/schemas/fields/attachment.json +156 -0
  74. package/schemas/fields/autocomplete-googleplaces.json +130 -0
  75. package/schemas/fields/checkbox.json +82 -0
  76. package/schemas/fields/date.json +88 -0
  77. package/schemas/fields/datetime.json +75 -0
  78. package/schemas/fields/email.json +75 -0
  79. package/schemas/fields/index.json +53 -0
  80. package/schemas/fields/number.json +91 -0
  81. package/schemas/fields/password.json +70 -0
  82. package/schemas/fields/radio.json +94 -0
  83. package/schemas/fields/rangedatetime.json +56 -0
  84. package/schemas/fields/select-async.json +334 -0
  85. package/schemas/fields/select.json +115 -0
  86. package/schemas/fields/tel.json +79 -0
  87. package/schemas/fields/text.json +86 -0
  88. package/schemas/fields/textarea.json +95 -0
  89. package/schemas/fields/time.json +91 -0
  90. package/schemas/fields/url.json +74 -0
  91. package/schemas/schema.graphql +10492 -0
  92. package/schemas/schemas.json +598 -0
  93. package/schemas/workflows/activity.json +111 -0
  94. package/schemas/workflows/common/condition.json +48 -0
  95. package/schemas/workflows/common/expression.json +76 -0
  96. package/schemas/workflows/common/mapping.json +134 -0
  97. package/schemas/workflows/input.json +76 -0
  98. package/schemas/workflows/output.json +41 -0
  99. package/schemas/workflows/schedule.json +26 -0
  100. package/schemas/workflows/tasks/accounting-transaction.json +95 -0
  101. package/schemas/workflows/tasks/all.json +34 -0
  102. package/schemas/workflows/tasks/attachment.json +94 -0
  103. package/schemas/workflows/tasks/charge.json +90 -0
  104. package/schemas/workflows/tasks/commodity.json +89 -0
  105. package/schemas/workflows/tasks/contact.json +82 -0
  106. package/schemas/workflows/tasks/csv.json +79 -0
  107. package/schemas/workflows/tasks/document-render.json +105 -0
  108. package/schemas/workflows/tasks/document-send.json +84 -0
  109. package/schemas/workflows/tasks/email-send.json +110 -0
  110. package/schemas/workflows/tasks/error.json +72 -0
  111. package/schemas/workflows/tasks/export.json +90 -0
  112. package/schemas/workflows/tasks/foreach.json +69 -0
  113. package/schemas/workflows/tasks/generic.json +47 -0
  114. package/schemas/workflows/tasks/graphql.json +78 -0
  115. package/schemas/workflows/tasks/httpRequest.json +119 -0
  116. package/schemas/workflows/tasks/job.json +88 -0
  117. package/schemas/workflows/tasks/log.json +73 -0
  118. package/schemas/workflows/tasks/map.json +58 -0
  119. package/schemas/workflows/tasks/order.json +87 -0
  120. package/schemas/workflows/tasks/payment.json +85 -0
  121. package/schemas/workflows/tasks/setVariable.json +76 -0
  122. package/schemas/workflows/tasks/switch.json +75 -0
  123. package/schemas/workflows/tasks/template.json +73 -0
  124. package/schemas/workflows/tasks/validation.json +90 -0
  125. package/schemas/workflows/tasks/while.json +53 -0
  126. package/schemas/workflows/tasks/workflow-execute.json +82 -0
  127. package/schemas/workflows/trigger.json +86 -0
  128. package/schemas/workflows/variable.json +46 -0
  129. package/schemas/workflows/workflow.json +172 -0
  130. package/scripts/postinstall.js +161 -0
  131. package/scripts/setup-vscode.js +80 -0
  132. package/templates/module.yaml +83 -0
  133. package/templates/workflow.yaml +100 -0
@@ -0,0 +1,56 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "DateTime Range Field Type",
4
+ "description": "Schema for rangedatetime input field type",
5
+ "type": "object",
6
+ "properties": {
7
+ "type": { "type": "string", "const": "rangedatetime" },
8
+ "label": {
9
+ "oneOf": [{ "type": "string" }, { "$ref": "../schemas.json#/definitions/localized" }],
10
+ "description": "Field label",
11
+ "x-example": { "en-US": "Delivery Window" }
12
+ },
13
+ "placeholder": { "type": "string", "description": "Field placeholder text", "x-example": "Select date range" },
14
+ "required": { "type": "boolean", "description": "Whether field is required", "x-example": false },
15
+ "disabled": { "type": "boolean", "description": "Whether field is disabled", "x-example": false },
16
+ "options": {
17
+ "type": "object",
18
+ "description": "DateTime range configuration options",
19
+ "properties": {
20
+ "dateFormat": { "type": "string", "description": "Display format", "x-example": "MM/dd/yyyy h:mm aa" },
21
+ "showTimeSelect": { "type": "boolean", "description": "Show time selection", "x-example": true },
22
+ "showTimeSelectOnly": { "type": "boolean", "description": "Time only (no date)", "x-example": false },
23
+ "timeIntervals": { "type": "number", "description": "Time intervals in minutes", "x-example": 60 },
24
+ "timeCaption": { "type": "string", "description": "Time caption label", "x-example": "Time" },
25
+ "useTimezone": { "type": "boolean", "description": "Enable timezone-aware handling", "x-example": false },
26
+ "storeAsUTC": { "type": "boolean", "description": "When useTimezone is true, store in UTC", "x-example": true },
27
+ "timezone": { "type": "string", "description": "Fixed timezone for display", "x-example": "America/New_York" },
28
+ "format": { "type": "string", "description": "Custom storage format" },
29
+ "isClearable": { "type": "boolean", "description": "Show clear button", "x-example": true }
30
+ },
31
+ "additionalProperties": true
32
+ },
33
+ "transformValue": {
34
+ "type": "object",
35
+ "description": "Value transformation configuration",
36
+ "properties": {
37
+ "onLoad": { "type": "string", "description": "Template expression to transform value on load" },
38
+ "onChange": { "type": "string", "description": "Template expression to transform value on change" },
39
+ "onBlur": { "type": "string", "description": "Template expression to transform value on blur" }
40
+ }
41
+ },
42
+ "onChange": {
43
+ "$ref": "../schemas.json#/definitions/actionsList",
44
+ "description": "Actions to execute when field value changes"
45
+ },
46
+ "onBlur": {
47
+ "$ref": "../schemas.json#/definitions/actionsList",
48
+ "description": "Actions to execute when field loses focus"
49
+ },
50
+ "onFocus": {
51
+ "$ref": "../schemas.json#/definitions/actionsList",
52
+ "description": "Actions to execute when field gains focus"
53
+ }
54
+ },
55
+ "required": ["type"]
56
+ }
@@ -0,0 +1,334 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Select Async Field Type",
4
+ "description": "Schema for select-async field type with GraphQL query support",
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "select-async"
10
+ },
11
+ "label": {
12
+ "oneOf": [{ "type": "string" }, { "$ref": "../schemas.json#/definitions/localized" }],
13
+ "description": "Field label",
14
+ "x-example": {
15
+ "en-US": "Select Order"
16
+ }
17
+ },
18
+ "placeholder": {
19
+ "type": "string",
20
+ "description": "Field placeholder text",
21
+ "x-example": "Search and select an order"
22
+ },
23
+ "required": {
24
+ "type": "boolean",
25
+ "description": "Whether field is required",
26
+ "x-example": false
27
+ },
28
+ "disabled": {
29
+ "type": "boolean",
30
+ "description": "Whether field is disabled",
31
+ "x-example": false
32
+ },
33
+ "options": {
34
+ "type": "object",
35
+ "description": "Select-async specific options",
36
+ "properties": {
37
+ "valueFieldName": {
38
+ "type": "string",
39
+ "description": "Field name to use as the value for select options",
40
+ "x-example": "orderId"
41
+ },
42
+ "itemLabelTemplate": {
43
+ "type": "string",
44
+ "description": "Template expression for option labels",
45
+ "x-example": "{{eval `Id ${orderId} - ${trackingNumber ? `Tracking Number ${trackingNumber}` : `Order Number ${orderNumber}`} - ${orderType}` }}"
46
+ },
47
+ "itemValueTemplate": {
48
+ "type": "string",
49
+ "description": "Template expression for option values",
50
+ "x-example": "{{orderId}}"
51
+ },
52
+ "navigateActionPermission": {
53
+ "type": "string",
54
+ "description": "Permission required for navigation actions",
55
+ "x-example": "System/Orders/Update"
56
+ },
57
+ "searchQuery": {
58
+ "type": "object",
59
+ "description": "Query configuration for async search",
60
+ "properties": {
61
+ "name": {
62
+ "type": "string",
63
+ "description": "Query name",
64
+ "x-example": "getOrders"
65
+ },
66
+ "path": {
67
+ "type": "string",
68
+ "description": "Path to data in query result",
69
+ "x-example": "orders.items"
70
+ },
71
+ "params": {
72
+ "type": "object",
73
+ "description": "Query parameters with template expressions",
74
+ "additionalProperties": true,
75
+ "x-example": {
76
+ "search": "{{ string search }}",
77
+ "take": "{{ number pageSize }}",
78
+ "skip": "{{ number skip }}",
79
+ "filter": "{{ string filter }}"
80
+ }
81
+ }
82
+ },
83
+ "required": ["name", "path"]
84
+ },
85
+ "valueQuery": {
86
+ "type": "object",
87
+ "description": "Query configuration for fetching selected value details",
88
+ "properties": {
89
+ "name": {
90
+ "type": "string",
91
+ "description": "Query name"
92
+ },
93
+ "path": {
94
+ "type": "string",
95
+ "description": "Path to data in query result"
96
+ },
97
+ "params": {
98
+ "type": "object",
99
+ "description": "Query parameters",
100
+ "additionalProperties": true
101
+ }
102
+ },
103
+ "required": ["name", "path"],
104
+ "x-example": {
105
+ "name": "getOrder",
106
+ "path": "order",
107
+ "params": {
108
+ "orderId": "{{ orderId }}"
109
+ }
110
+ }
111
+ },
112
+ "allowMultiple": {
113
+ "type": "boolean",
114
+ "description": "Allow multiple selection",
115
+ "x-example": false
116
+ },
117
+ "allowClear": {
118
+ "type": "boolean",
119
+ "description": "Allow clearing selection",
120
+ "x-example": true
121
+ },
122
+ "allowSearch": {
123
+ "type": "boolean",
124
+ "description": "Enable search functionality",
125
+ "x-example": true
126
+ },
127
+ "minWidth": {
128
+ "type": "string",
129
+ "description": "Minimum width for the dropdown",
130
+ "x-example": "300px"
131
+ },
132
+ "prefix": {
133
+ "type": "string",
134
+ "description": "Prefix for form field names, used in dynamic forms",
135
+ "x-example": "orderEntityCarriers[{{carrierIndex}}]."
136
+ },
137
+ "filter": {
138
+ "type": "string",
139
+ "description": "Filter expression for search queries",
140
+ "x-example": "contactType: Carrier"
141
+ },
142
+ "allowCreate": {
143
+ "type": "boolean",
144
+ "description": "Allow creating new items inline",
145
+ "x-example": true
146
+ },
147
+ "transformValue": {
148
+ "type": "object",
149
+ "description": "Value transformation configuration",
150
+ "properties": {
151
+ "onLoad": {
152
+ "type": "string",
153
+ "description": "Template expression to transform value on load"
154
+ },
155
+ "onChange": {
156
+ "type": "string",
157
+ "description": "Template expression to transform value on change"
158
+ },
159
+ "onBlur": {
160
+ "type": "string",
161
+ "description": "Template expression to transform value on blur"
162
+ }
163
+ }
164
+ }
165
+ },
166
+ "required": ["searchQuery"]
167
+ },
168
+ "dropDownToolbar": {
169
+ "type": "array",
170
+ "description": "Toolbar components for dropdown (create buttons, etc)",
171
+ "items": {
172
+ "$ref": "../schemas.json#/definitions/component"
173
+ },
174
+ "x-example": [
175
+ {
176
+ "component": "button",
177
+ "name": "createBtn",
178
+ "props": {
179
+ "permission": "System/Orders/Create",
180
+ "label": {
181
+ "en-US": "Create New Order"
182
+ },
183
+ "icon": "plus",
184
+ "options": {
185
+ "className": "create-entity-select-btn btn btn-sm btn-primary w-100",
186
+ "variant": "primary"
187
+ },
188
+ "onClick": [
189
+ {
190
+ "dialog": {
191
+ "component": "Orders/CreateOrder",
192
+ "props": {
193
+ "title": "Create New Order"
194
+ },
195
+ "onClose": [{ "selectValue": "{{ result }}" }]
196
+ }
197
+ }
198
+ ]
199
+ }
200
+ }
201
+ ]
202
+ },
203
+ "queries": {
204
+ "type": "array",
205
+ "description": "GraphQL queries for the field",
206
+ "items": {
207
+ "type": "object",
208
+ "properties": {
209
+ "name": {
210
+ "type": "string",
211
+ "description": "Query name"
212
+ },
213
+ "query": {
214
+ "type": "object",
215
+ "properties": {
216
+ "command": {
217
+ "type": "string",
218
+ "description": "GraphQL query string"
219
+ },
220
+ "variables": {
221
+ "type": "object",
222
+ "description": "Query variables",
223
+ "additionalProperties": true
224
+ }
225
+ },
226
+ "required": ["command"]
227
+ }
228
+ },
229
+ "required": ["name", "query"]
230
+ },
231
+ "x-example": [
232
+ {
233
+ "name": "getOrders",
234
+ "query": {
235
+ "command": "query($organizationId: Int!, $filter: String!, $search: String!, $take: Int!, $skip: Int!) { orders(organizationId: $organizationId, filter: $filter, search: $search, take: $take, skip: $skip) { items { orderId orderNumber trackingNumber orderType } totalCount } }",
236
+ "variables": {
237
+ "organizationId": "{{number organizationId}}",
238
+ "search": "{{string search}}",
239
+ "take": "{{number pageSize}}",
240
+ "skip": "{{number skip}}",
241
+ "filter": "{{ string filter }}"
242
+ }
243
+ }
244
+ }
245
+ ]
246
+ },
247
+ "onSelectValue": {
248
+ "$ref": "../schemas.json#/definitions/actionsList",
249
+ "description": "Actions to execute when a value is selected",
250
+ "x-example": [
251
+ {
252
+ "setStore": {
253
+ "orderForm.selectedOrder": "{{eval {...selectedItem} }}"
254
+ }
255
+ },
256
+ {
257
+ "setFields": {
258
+ "orderNumber": "{{ selectedItem.orderNumber }}",
259
+ "trackingNumber": "{{ selectedItem.trackingNumber }}"
260
+ }
261
+ }
262
+ ]
263
+ },
264
+ "onChange": {
265
+ "$ref": "../schemas.json#/definitions/actionsList",
266
+ "description": "Actions to execute when field value changes"
267
+ },
268
+ "onBlur": {
269
+ "$ref": "../schemas.json#/definitions/actionsList",
270
+ "description": "Actions to execute when field loses focus"
271
+ },
272
+ "onFocus": {
273
+ "$ref": "../schemas.json#/definitions/actionsList",
274
+ "description": "Actions to execute when field gains focus"
275
+ },
276
+ "onOptionTagClick": {
277
+ "$ref": "../schemas.json#/definitions/actionsList",
278
+ "description": "Actions to execute when clicking on an option tag/chip in the dropdown",
279
+ "x-example": [
280
+ {
281
+ "dialog": {
282
+ "props": {
283
+ "organizationId": "{{ organizationId }}",
284
+ "jobId": "{{ item.jobId }}",
285
+ "title": {
286
+ "en-US": "Update Job"
287
+ }
288
+ },
289
+ "component": {
290
+ "layout": {
291
+ "component": "layout",
292
+ "children": [{ "component": "Jobs/UpdateJob" }]
293
+ }
294
+ }
295
+ }
296
+ }
297
+ ]
298
+ },
299
+ "onEditClick": {
300
+ "$ref": "../schemas.json#/definitions/actionsList",
301
+ "description": "Actions to execute when edit action is clicked",
302
+ "x-example": [
303
+ {
304
+ "dialog": {
305
+ "props": {
306
+ "organizationId": "{{ organizationId }}",
307
+ "countryCode": "{{ countryCode }}",
308
+ "title": {
309
+ "en-US": "Update Country"
310
+ }
311
+ },
312
+ "component": {
313
+ "layout": {
314
+ "component": "layout",
315
+ "children": [{ "component": "Countries/UpdateCountry" }]
316
+ }
317
+ }
318
+ }
319
+ }
320
+ ]
321
+ },
322
+ "filter": {
323
+ "type": "string",
324
+ "description": "Filter expression applied to queries",
325
+ "x-example": "contactType: Contact"
326
+ },
327
+ "className": {
328
+ "type": "string",
329
+ "description": "CSS class names for the field",
330
+ "x-example": "col-3"
331
+ }
332
+ },
333
+ "required": ["type", "options"]
334
+ }
@@ -0,0 +1,115 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Select Field Type",
4
+ "description": "Schema for select field type with static options",
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "select"
10
+ },
11
+ "label": {
12
+ "oneOf": [
13
+ { "type": "string" },
14
+ { "$ref": "../schemas.json#/definitions/localized" }
15
+ ],
16
+ "description": "Field label",
17
+ "x-example": {
18
+ "en-US": "Country"
19
+ }
20
+ },
21
+ "placeholder": {
22
+ "type": "string",
23
+ "description": "Field placeholder text",
24
+ "x-example": "Select a country"
25
+ },
26
+ "required": {
27
+ "type": "boolean",
28
+ "description": "Whether field is required",
29
+ "x-example": false
30
+ },
31
+ "disabled": {
32
+ "type": "boolean",
33
+ "description": "Whether field is disabled",
34
+ "x-example": false
35
+ },
36
+ "options": {
37
+ "type": "object",
38
+ "description": "Select field options",
39
+ "properties": {
40
+ "allowMultiple": {
41
+ "type": "boolean",
42
+ "description": "Allow multiple selection",
43
+ "x-example": false
44
+ },
45
+ "allowClear": {
46
+ "type": "boolean",
47
+ "description": "Allow clearing selection",
48
+ "x-example": true
49
+ },
50
+ "variant": {
51
+ "type": "string",
52
+ "description": "Visual variant of the select",
53
+ "x-example": "outlined"
54
+ },
55
+ "size": {
56
+ "type": "string",
57
+ "description": "Size of the select component",
58
+ "x-example": "medium"
59
+ }
60
+ }
61
+ },
62
+ "items": {
63
+ "type": "array",
64
+ "description": "Static options for select field",
65
+ "items": {
66
+ "type": "object",
67
+ "properties": {
68
+ "label": {
69
+ "oneOf": [
70
+ { "type": "string" },
71
+ { "$ref": "../schemas.json#/definitions/localized" }
72
+ ],
73
+ "description": "Option label"
74
+ },
75
+ "value": {
76
+ "oneOf": [
77
+ { "type": "string" },
78
+ { "type": "number" },
79
+ { "type": "boolean" }
80
+ ],
81
+ "description": "Option value"
82
+ }
83
+ },
84
+ "required": ["label", "value"]
85
+ },
86
+ "x-example": [
87
+ {
88
+ "label": { "en-US": "United States" },
89
+ "value": "US"
90
+ },
91
+ {
92
+ "label": { "en-US": "Canada" },
93
+ "value": "CA"
94
+ },
95
+ {
96
+ "label": { "en-US": "Mexico" },
97
+ "value": "MX"
98
+ }
99
+ ]
100
+ },
101
+ "onChange": {
102
+ "$ref": "../schemas.json#/definitions/actionsList",
103
+ "description": "Actions to execute when field value changes"
104
+ },
105
+ "onBlur": {
106
+ "$ref": "../schemas.json#/definitions/actionsList",
107
+ "description": "Actions to execute when field loses focus"
108
+ },
109
+ "onFocus": {
110
+ "$ref": "../schemas.json#/definitions/actionsList",
111
+ "description": "Actions to execute when field gains focus"
112
+ }
113
+ },
114
+ "required": ["type"]
115
+ }
@@ -0,0 +1,79 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Tel Field Type",
4
+ "description": "Schema for telephone input field type",
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "tel"
10
+ },
11
+ "label": {
12
+ "oneOf": [
13
+ { "type": "string" },
14
+ { "$ref": "../schemas.json#/definitions/localized" }
15
+ ],
16
+ "description": "Field label",
17
+ "x-example": {
18
+ "en-US": "Phone Number"
19
+ }
20
+ },
21
+ "placeholder": {
22
+ "type": "string",
23
+ "description": "Field placeholder text",
24
+ "x-example": "(555) 123-4567"
25
+ },
26
+ "required": {
27
+ "type": "boolean",
28
+ "description": "Whether field is required",
29
+ "x-example": false
30
+ },
31
+ "disabled": {
32
+ "type": "boolean",
33
+ "description": "Whether field is disabled",
34
+ "x-example": false
35
+ },
36
+ "pattern": {
37
+ "type": "string",
38
+ "description": "Regex pattern for phone number validation",
39
+ "x-example": "^\\+?[1-9]\\d{1,14}$"
40
+ },
41
+ "format": {
42
+ "type": "string",
43
+ "description": "Phone number format mask",
44
+ "x-example": "(999) 999-9999"
45
+ },
46
+ "transformValue": {
47
+ "type": "object",
48
+ "description": "Value transformation configuration",
49
+ "properties": {
50
+ "onLoad": {
51
+ "type": "string",
52
+ "description": "Template expression to transform value on load"
53
+ },
54
+ "onChange": {
55
+ "type": "string",
56
+ "description": "Template expression to transform value on change",
57
+ "x-example": "{{ eval value.replace(/\\D/g, '') }}"
58
+ },
59
+ "onBlur": {
60
+ "type": "string",
61
+ "description": "Template expression to transform value on blur"
62
+ }
63
+ }
64
+ },
65
+ "onChange": {
66
+ "$ref": "../schemas.json#/definitions/actionsList",
67
+ "description": "Actions to execute when field value changes"
68
+ },
69
+ "onBlur": {
70
+ "$ref": "../schemas.json#/definitions/actionsList",
71
+ "description": "Actions to execute when field loses focus"
72
+ },
73
+ "onFocus": {
74
+ "$ref": "../schemas.json#/definitions/actionsList",
75
+ "description": "Actions to execute when field gains focus"
76
+ }
77
+ },
78
+ "required": ["type"]
79
+ }
@@ -0,0 +1,86 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Text Field Type",
4
+ "description": "Schema for text input field type",
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "text"
10
+ },
11
+ "label": {
12
+ "oneOf": [
13
+ { "type": "string" },
14
+ { "$ref": "../schemas.json#/definitions/localized" }
15
+ ],
16
+ "description": "Field label",
17
+ "x-example": {
18
+ "en-US": "Full Name"
19
+ }
20
+ },
21
+ "placeholder": {
22
+ "type": "string",
23
+ "description": "Field placeholder text",
24
+ "x-example": "Enter your full name"
25
+ },
26
+ "required": {
27
+ "type": "boolean",
28
+ "description": "Whether field is required",
29
+ "x-example": true
30
+ },
31
+ "disabled": {
32
+ "type": "boolean",
33
+ "description": "Whether field is disabled",
34
+ "x-example": false
35
+ },
36
+ "maxLength": {
37
+ "type": "number",
38
+ "description": "Maximum character length",
39
+ "x-example": 255
40
+ },
41
+ "minLength": {
42
+ "type": "number",
43
+ "description": "Minimum character length",
44
+ "x-example": 2
45
+ },
46
+ "pattern": {
47
+ "type": "string",
48
+ "description": "Regex pattern for validation",
49
+ "x-example": "^[a-zA-Z\\s]+$"
50
+ },
51
+ "transformValue": {
52
+ "type": "object",
53
+ "description": "Value transformation configuration",
54
+ "properties": {
55
+ "onLoad": {
56
+ "type": "string",
57
+ "description": "Template expression to transform value on load",
58
+ "x-example": "{{ format orderForm.orderSummary.totalIncome currency USD }}"
59
+ },
60
+ "onChange": {
61
+ "type": "string",
62
+ "description": "Template expression to transform value on change",
63
+ "x-example": "{{ eval value.toUpperCase() }}"
64
+ },
65
+ "onBlur": {
66
+ "type": "string",
67
+ "description": "Template expression to transform value on blur",
68
+ "x-example": "{{ eval value.trim() }}"
69
+ }
70
+ }
71
+ },
72
+ "onChange": {
73
+ "$ref": "../schemas.json#/definitions/actionsList",
74
+ "description": "Actions to execute when field value changes"
75
+ },
76
+ "onBlur": {
77
+ "$ref": "../schemas.json#/definitions/actionsList",
78
+ "description": "Actions to execute when field loses focus"
79
+ },
80
+ "onFocus": {
81
+ "$ref": "../schemas.json#/definitions/actionsList",
82
+ "description": "Actions to execute when field gains focus"
83
+ }
84
+ },
85
+ "required": ["type"]
86
+ }