@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.
- package/README.md +384 -0
- package/dist/cli.d.ts +6 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +1523 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +111 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +6 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/schemaLoader.d.ts +17 -0
- package/dist/utils/schemaLoader.d.ts.map +1 -0
- package/dist/utils/schemaLoader.js +134 -0
- package/dist/utils/schemaLoader.js.map +1 -0
- package/dist/validator.d.ts +64 -0
- package/dist/validator.d.ts.map +1 -0
- package/dist/validator.js +380 -0
- package/dist/validator.js.map +1 -0
- package/dist/workflowValidator.d.ts +64 -0
- package/dist/workflowValidator.d.ts.map +1 -0
- package/dist/workflowValidator.js +410 -0
- package/dist/workflowValidator.js.map +1 -0
- package/package.json +50 -0
- package/schemas/actions/all.json +26 -0
- package/schemas/actions/confirm.json +21 -0
- package/schemas/actions/consoleLog.json +16 -0
- package/schemas/actions/dialog.json +25 -0
- package/schemas/actions/fileDownload.json +16 -0
- package/schemas/actions/forEach.json +31 -0
- package/schemas/actions/if.json +12 -0
- package/schemas/actions/mutation.json +25 -0
- package/schemas/actions/navigate.json +18 -0
- package/schemas/actions/navigateBack.json +22 -0
- package/schemas/actions/navigateBackOrClose.json +21 -0
- package/schemas/actions/notification.json +19 -0
- package/schemas/actions/openBarcodeScanner.json +104 -0
- package/schemas/actions/query.json +32 -0
- package/schemas/actions/refresh.json +13 -0
- package/schemas/actions/resetDirtyState.json +22 -0
- package/schemas/actions/setFields.json +21 -0
- package/schemas/actions/setStore.json +13 -0
- package/schemas/actions/validateForm.json +15 -0
- package/schemas/actions/workflow.json +24 -0
- package/schemas/components/README.md +147 -0
- package/schemas/components/appComponent.json +50 -0
- package/schemas/components/barcodeScanner.json +69 -0
- package/schemas/components/button.json +123 -0
- package/schemas/components/calendar.json +489 -0
- package/schemas/components/card.json +176 -0
- package/schemas/components/collection.json +54 -0
- package/schemas/components/dataGrid.json +119 -0
- package/schemas/components/datasource.json +151 -0
- package/schemas/components/dropdown.json +57 -0
- package/schemas/components/field-collection.json +618 -0
- package/schemas/components/field.json +265 -0
- package/schemas/components/form.json +234 -0
- package/schemas/components/index.json +68 -0
- package/schemas/components/layout.json +69 -0
- package/schemas/components/module.json +138 -0
- package/schemas/components/navDropdown.json +36 -0
- package/schemas/components/navbar.json +78 -0
- package/schemas/components/navbarItem.json +28 -0
- package/schemas/components/navbarLink.json +36 -0
- package/schemas/components/row.json +31 -0
- package/schemas/components/tab.json +34 -0
- package/schemas/components/tabs.json +35 -0
- package/schemas/components/timeline.json +172 -0
- package/schemas/components/timelineGrid.json +324 -0
- package/schemas/fields/README.md +66 -0
- package/schemas/fields/attachment.json +156 -0
- package/schemas/fields/autocomplete-googleplaces.json +130 -0
- package/schemas/fields/checkbox.json +82 -0
- package/schemas/fields/date.json +88 -0
- package/schemas/fields/datetime.json +75 -0
- package/schemas/fields/email.json +75 -0
- package/schemas/fields/index.json +53 -0
- package/schemas/fields/number.json +91 -0
- package/schemas/fields/password.json +70 -0
- package/schemas/fields/radio.json +94 -0
- package/schemas/fields/rangedatetime.json +56 -0
- package/schemas/fields/select-async.json +334 -0
- package/schemas/fields/select.json +115 -0
- package/schemas/fields/tel.json +79 -0
- package/schemas/fields/text.json +86 -0
- package/schemas/fields/textarea.json +95 -0
- package/schemas/fields/time.json +91 -0
- package/schemas/fields/url.json +74 -0
- package/schemas/schema.graphql +10492 -0
- package/schemas/schemas.json +598 -0
- package/schemas/workflows/activity.json +111 -0
- package/schemas/workflows/common/condition.json +48 -0
- package/schemas/workflows/common/expression.json +76 -0
- package/schemas/workflows/common/mapping.json +134 -0
- package/schemas/workflows/input.json +76 -0
- package/schemas/workflows/output.json +41 -0
- package/schemas/workflows/schedule.json +26 -0
- package/schemas/workflows/tasks/accounting-transaction.json +95 -0
- package/schemas/workflows/tasks/all.json +34 -0
- package/schemas/workflows/tasks/attachment.json +94 -0
- package/schemas/workflows/tasks/charge.json +90 -0
- package/schemas/workflows/tasks/commodity.json +89 -0
- package/schemas/workflows/tasks/contact.json +82 -0
- package/schemas/workflows/tasks/csv.json +79 -0
- package/schemas/workflows/tasks/document-render.json +105 -0
- package/schemas/workflows/tasks/document-send.json +84 -0
- package/schemas/workflows/tasks/email-send.json +110 -0
- package/schemas/workflows/tasks/error.json +72 -0
- package/schemas/workflows/tasks/export.json +90 -0
- package/schemas/workflows/tasks/foreach.json +69 -0
- package/schemas/workflows/tasks/generic.json +47 -0
- package/schemas/workflows/tasks/graphql.json +78 -0
- package/schemas/workflows/tasks/httpRequest.json +119 -0
- package/schemas/workflows/tasks/job.json +88 -0
- package/schemas/workflows/tasks/log.json +73 -0
- package/schemas/workflows/tasks/map.json +58 -0
- package/schemas/workflows/tasks/order.json +87 -0
- package/schemas/workflows/tasks/payment.json +85 -0
- package/schemas/workflows/tasks/setVariable.json +76 -0
- package/schemas/workflows/tasks/switch.json +75 -0
- package/schemas/workflows/tasks/template.json +73 -0
- package/schemas/workflows/tasks/validation.json +90 -0
- package/schemas/workflows/tasks/while.json +53 -0
- package/schemas/workflows/tasks/workflow-execute.json +82 -0
- package/schemas/workflows/trigger.json +86 -0
- package/schemas/workflows/variable.json +46 -0
- package/schemas/workflows/workflow.json +172 -0
- package/scripts/postinstall.js +161 -0
- package/scripts/setup-vscode.js +80 -0
- package/templates/module.yaml +83 -0
- package/templates/workflow.yaml +100 -0
|
@@ -0,0 +1,618 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "field-collection-component",
|
|
4
|
+
"title": "Field Collection Component",
|
|
5
|
+
"description": "A component for managing arrays of form fields with built-in add/remove functionality, grouping, and templates. Supports grouping items by any field (e.g., day of week, status, category) with per-group add buttons and custom group templates.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["component", "props"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"component": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"const": "field-collection",
|
|
12
|
+
"description": "Component type identifier"
|
|
13
|
+
},
|
|
14
|
+
"name": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"description": "Unique identifier for the component",
|
|
17
|
+
"x-example": "businessHoursCollection"
|
|
18
|
+
},
|
|
19
|
+
"props": {
|
|
20
|
+
"type": "object",
|
|
21
|
+
"required": ["fieldName", "itemTemplate"],
|
|
22
|
+
"properties": {
|
|
23
|
+
"fieldName": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"description": "The form field name this collection binds to",
|
|
26
|
+
"x-example": "businessHours"
|
|
27
|
+
},
|
|
28
|
+
"itemTemplate": {
|
|
29
|
+
"oneOf": [
|
|
30
|
+
{
|
|
31
|
+
"type": "object",
|
|
32
|
+
"description": "Single component template for each item"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"type": "array",
|
|
36
|
+
"description": "Multiple component templates for each item",
|
|
37
|
+
"items": {
|
|
38
|
+
"type": "object"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"x-example": {
|
|
43
|
+
"component": "layout",
|
|
44
|
+
"props": {
|
|
45
|
+
"cols": 3
|
|
46
|
+
},
|
|
47
|
+
"children": [
|
|
48
|
+
{
|
|
49
|
+
"component": "field",
|
|
50
|
+
"name": "startTime",
|
|
51
|
+
"props": {
|
|
52
|
+
"type": "time",
|
|
53
|
+
"label": "Start"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"component": "field",
|
|
58
|
+
"name": "endTime",
|
|
59
|
+
"props": {
|
|
60
|
+
"type": "time",
|
|
61
|
+
"label": "End"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"options": {
|
|
68
|
+
"type": "object",
|
|
69
|
+
"description": "Collection management options",
|
|
70
|
+
"properties": {
|
|
71
|
+
"allowAdd": {
|
|
72
|
+
"type": "boolean",
|
|
73
|
+
"default": true,
|
|
74
|
+
"description": "Allow adding new items",
|
|
75
|
+
"x-example": true
|
|
76
|
+
},
|
|
77
|
+
"allowRemove": {
|
|
78
|
+
"type": "boolean",
|
|
79
|
+
"default": true,
|
|
80
|
+
"description": "Allow removing individual items",
|
|
81
|
+
"x-example": true
|
|
82
|
+
},
|
|
83
|
+
"allowRemoveAll": {
|
|
84
|
+
"type": "boolean",
|
|
85
|
+
"default": false,
|
|
86
|
+
"description": "Show remove all button",
|
|
87
|
+
"x-example": false
|
|
88
|
+
},
|
|
89
|
+
"allowReorder": {
|
|
90
|
+
"type": "boolean",
|
|
91
|
+
"default": true,
|
|
92
|
+
"description": "Allow drag-and-drop reordering",
|
|
93
|
+
"x-example": true
|
|
94
|
+
},
|
|
95
|
+
"minItems": {
|
|
96
|
+
"type": "integer",
|
|
97
|
+
"minimum": 0,
|
|
98
|
+
"default": 0,
|
|
99
|
+
"description": "Minimum number of items required",
|
|
100
|
+
"x-example": 1
|
|
101
|
+
},
|
|
102
|
+
"maxItems": {
|
|
103
|
+
"type": "integer",
|
|
104
|
+
"minimum": 1,
|
|
105
|
+
"default": null,
|
|
106
|
+
"description": "Maximum number of items allowed",
|
|
107
|
+
"x-example": 10
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"x-example": {
|
|
111
|
+
"allowAdd": true,
|
|
112
|
+
"allowRemove": true,
|
|
113
|
+
"allowReorder": true,
|
|
114
|
+
"minItems": 0,
|
|
115
|
+
"maxItems": 7
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"addButton": {
|
|
119
|
+
"type": "object",
|
|
120
|
+
"description": "Customize the add button",
|
|
121
|
+
"properties": {
|
|
122
|
+
"label": {
|
|
123
|
+
"type": ["string", "object"],
|
|
124
|
+
"description": "Button label (can be localized)",
|
|
125
|
+
"x-example": {
|
|
126
|
+
"en-US": "Add Time Slot"
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"icon": {
|
|
130
|
+
"type": "string",
|
|
131
|
+
"default": "plus",
|
|
132
|
+
"description": "FontAwesome icon name",
|
|
133
|
+
"x-example": "plus"
|
|
134
|
+
},
|
|
135
|
+
"variant": {
|
|
136
|
+
"type": "string",
|
|
137
|
+
"enum": ["text", "outlined", "contained"],
|
|
138
|
+
"default": "outlined",
|
|
139
|
+
"description": "Material-UI button variant",
|
|
140
|
+
"x-example": "contained"
|
|
141
|
+
},
|
|
142
|
+
"position": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"enum": ["top", "bottom", "both"],
|
|
145
|
+
"default": "bottom",
|
|
146
|
+
"description": "Where to show the add button",
|
|
147
|
+
"x-example": "bottom"
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"x-example": {
|
|
151
|
+
"label": {
|
|
152
|
+
"en-US": "Add New Item"
|
|
153
|
+
},
|
|
154
|
+
"icon": "plus",
|
|
155
|
+
"variant": "contained",
|
|
156
|
+
"position": "bottom"
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"removeButton": {
|
|
160
|
+
"type": "object",
|
|
161
|
+
"description": "Customize the remove button",
|
|
162
|
+
"properties": {
|
|
163
|
+
"label": {
|
|
164
|
+
"type": ["string", "object"],
|
|
165
|
+
"description": "Button label (can be localized)",
|
|
166
|
+
"x-example": {
|
|
167
|
+
"en-US": "Remove"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"icon": {
|
|
171
|
+
"type": "string",
|
|
172
|
+
"default": "trash",
|
|
173
|
+
"description": "FontAwesome icon name",
|
|
174
|
+
"x-example": "trash"
|
|
175
|
+
},
|
|
176
|
+
"variant": {
|
|
177
|
+
"type": "string",
|
|
178
|
+
"enum": ["text", "outlined", "contained"],
|
|
179
|
+
"default": "outlined",
|
|
180
|
+
"description": "Material-UI button variant",
|
|
181
|
+
"x-example": "outlined"
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"x-example": {
|
|
185
|
+
"icon": "trash",
|
|
186
|
+
"variant": "outlined"
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
"defaultItem": {
|
|
190
|
+
"type": ["object", "array", "string", "number", "boolean"],
|
|
191
|
+
"description": "Default values for new items",
|
|
192
|
+
"x-example": {
|
|
193
|
+
"dayOfWeek": 1,
|
|
194
|
+
"startTime": "09:00:00",
|
|
195
|
+
"endTime": "17:00:00",
|
|
196
|
+
"isClosed": false
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
"groupMode": {
|
|
200
|
+
"type": "boolean",
|
|
201
|
+
"default": false,
|
|
202
|
+
"description": "Enable grouping of items. When enabled, items are organized into groups based on the groupBy field value. Each group gets its own add button that automatically sets the groupBy field value for new items.",
|
|
203
|
+
"x-example": true
|
|
204
|
+
},
|
|
205
|
+
"groupBy": {
|
|
206
|
+
"type": "string",
|
|
207
|
+
"description": "Field name to group items by (required if groupMode is true). Common examples: 'dayOfWeek' for business hours, 'status' for tasks, 'category' for products.",
|
|
208
|
+
"x-example": "dayOfWeek"
|
|
209
|
+
},
|
|
210
|
+
"groups": {
|
|
211
|
+
"type": "array",
|
|
212
|
+
"description": "Define available groups. When groupMode is enabled, items are organized into these groups based on the groupBy field value. Each group gets its own add button when allowAdd is true.",
|
|
213
|
+
"items": {
|
|
214
|
+
"type": "object",
|
|
215
|
+
"required": ["key", "label"],
|
|
216
|
+
"properties": {
|
|
217
|
+
"key": {
|
|
218
|
+
"type": ["string", "number"],
|
|
219
|
+
"description": "Group identifier (matches the value in groupBy field)",
|
|
220
|
+
"x-example": 1
|
|
221
|
+
},
|
|
222
|
+
"label": {
|
|
223
|
+
"type": ["string", "object"],
|
|
224
|
+
"description": "Group display label (can be localized)",
|
|
225
|
+
"x-example": {
|
|
226
|
+
"en-US": "Monday"
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
"icon": {
|
|
230
|
+
"type": "string",
|
|
231
|
+
"description": "FontAwesome icon for the group",
|
|
232
|
+
"x-example": "calendar"
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
"x-example": [
|
|
237
|
+
{
|
|
238
|
+
"key": "pending",
|
|
239
|
+
"label": {
|
|
240
|
+
"en-US": "Pending"
|
|
241
|
+
},
|
|
242
|
+
"icon": "clock"
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"key": "completed",
|
|
246
|
+
"label": {
|
|
247
|
+
"en-US": "Completed"
|
|
248
|
+
},
|
|
249
|
+
"icon": "check"
|
|
250
|
+
}
|
|
251
|
+
]
|
|
252
|
+
},
|
|
253
|
+
"groupTemplate": {
|
|
254
|
+
"type": "object",
|
|
255
|
+
"description": "Custom template for group headers",
|
|
256
|
+
"x-example": {
|
|
257
|
+
"component": "layout",
|
|
258
|
+
"children": [
|
|
259
|
+
{
|
|
260
|
+
"component": "text",
|
|
261
|
+
"props": {
|
|
262
|
+
"value": "{{ groupLabel }} ({{ groupCount }})",
|
|
263
|
+
"type": "h5"
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
]
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
"layout": {
|
|
270
|
+
"type": "string",
|
|
271
|
+
"enum": ["list", "grid", "accordion"],
|
|
272
|
+
"default": "list",
|
|
273
|
+
"description": "Layout style for items",
|
|
274
|
+
"x-example": "grid"
|
|
275
|
+
},
|
|
276
|
+
"cols": {
|
|
277
|
+
"type": "integer",
|
|
278
|
+
"minimum": 1,
|
|
279
|
+
"maximum": 12,
|
|
280
|
+
"default": 1,
|
|
281
|
+
"description": "Number of columns for grid layout",
|
|
282
|
+
"x-example": 2
|
|
283
|
+
},
|
|
284
|
+
"spacing": {
|
|
285
|
+
"type": "integer",
|
|
286
|
+
"minimum": 0,
|
|
287
|
+
"maximum": 10,
|
|
288
|
+
"default": 2,
|
|
289
|
+
"description": "Spacing between items (Material-UI spacing units)",
|
|
290
|
+
"x-example": 3
|
|
291
|
+
},
|
|
292
|
+
"showIndex": {
|
|
293
|
+
"type": "boolean",
|
|
294
|
+
"default": false,
|
|
295
|
+
"description": "Show item index numbers",
|
|
296
|
+
"x-example": true
|
|
297
|
+
},
|
|
298
|
+
"showDragHandle": {
|
|
299
|
+
"type": "boolean",
|
|
300
|
+
"default": false,
|
|
301
|
+
"description": "Show drag handle for reordering",
|
|
302
|
+
"x-example": true
|
|
303
|
+
},
|
|
304
|
+
"containerClass": {
|
|
305
|
+
"type": "string",
|
|
306
|
+
"description": "CSS class for the container",
|
|
307
|
+
"x-example": "business-hours-container"
|
|
308
|
+
},
|
|
309
|
+
"itemClass": {
|
|
310
|
+
"type": "string",
|
|
311
|
+
"description": "CSS class for each item",
|
|
312
|
+
"x-example": "collection-item"
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
"x-examples": {
|
|
318
|
+
"simplifiedBusinessHours": {
|
|
319
|
+
"component": "field-collection",
|
|
320
|
+
"name": "businessHoursSimple",
|
|
321
|
+
"props": {
|
|
322
|
+
"fieldName": "businessHours",
|
|
323
|
+
"groupMode": true,
|
|
324
|
+
"groupBy": "dayOfWeek",
|
|
325
|
+
"groups": [
|
|
326
|
+
{ "key": 1, "label": "Monday" },
|
|
327
|
+
{ "key": 2, "label": "Tuesday" },
|
|
328
|
+
{ "key": 3, "label": "Wednesday" },
|
|
329
|
+
{ "key": 4, "label": "Thursday" },
|
|
330
|
+
{ "key": 5, "label": "Friday" },
|
|
331
|
+
{ "key": 6, "label": "Saturday" },
|
|
332
|
+
{ "key": 0, "label": "Sunday" }
|
|
333
|
+
],
|
|
334
|
+
"layout": "accordion",
|
|
335
|
+
"defaultItem": {
|
|
336
|
+
"startTime": "09:00:00",
|
|
337
|
+
"endTime": "17:00:00"
|
|
338
|
+
},
|
|
339
|
+
"itemTemplate": {
|
|
340
|
+
"component": "layout",
|
|
341
|
+
"props": { "cols": 2 },
|
|
342
|
+
"children": [
|
|
343
|
+
{
|
|
344
|
+
"component": "field",
|
|
345
|
+
"name": "startTime",
|
|
346
|
+
"props": { "type": "time", "label": "Start" }
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
"component": "field",
|
|
350
|
+
"name": "endTime",
|
|
351
|
+
"props": { "type": "time", "label": "End" }
|
|
352
|
+
}
|
|
353
|
+
]
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
"simple": {
|
|
358
|
+
"component": "field-collection",
|
|
359
|
+
"name": "phoneNumbers",
|
|
360
|
+
"props": {
|
|
361
|
+
"fieldName": "contacts.phoneNumbers",
|
|
362
|
+
"itemTemplate": {
|
|
363
|
+
"component": "field",
|
|
364
|
+
"name": "number",
|
|
365
|
+
"props": { "type": "tel", "label": "Phone Number" }
|
|
366
|
+
},
|
|
367
|
+
"defaultItem": { "number": "" },
|
|
368
|
+
"addButton": { "label": "Add Phone Number" }
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
"businessHours": {
|
|
372
|
+
"component": "field-collection",
|
|
373
|
+
"name": "mondayHours",
|
|
374
|
+
"props": {
|
|
375
|
+
"fieldName": "businessHoursMonday",
|
|
376
|
+
"options": { "allowAdd": true, "allowRemove": true, "minItems": 0, "maxItems": 3 },
|
|
377
|
+
"addButton": {
|
|
378
|
+
"label": { "en-US": "Add Time Slot" },
|
|
379
|
+
"icon": "plus",
|
|
380
|
+
"position": "bottom"
|
|
381
|
+
},
|
|
382
|
+
"defaultItem": { "dayOfWeek": 1, "startTime": "09:00:00", "endTime": "17:00:00" },
|
|
383
|
+
"layout": "list",
|
|
384
|
+
"showIndex": true,
|
|
385
|
+
"itemTemplate": {
|
|
386
|
+
"component": "layout",
|
|
387
|
+
"props": { "cols": 2 },
|
|
388
|
+
"children": [
|
|
389
|
+
{ "component": "field", "name": "startTime", "props": { "label": "Start", "type": "time" } },
|
|
390
|
+
{ "component": "field", "name": "endTime", "props": { "label": "End", "type": "time" } }
|
|
391
|
+
]
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
},
|
|
395
|
+
"groupedTasks": {
|
|
396
|
+
"component": "field-collection",
|
|
397
|
+
"name": "tasksCollection",
|
|
398
|
+
"props": {
|
|
399
|
+
"fieldName": "project.tasks",
|
|
400
|
+
"groupMode": true,
|
|
401
|
+
"groupBy": "status",
|
|
402
|
+
"groups": [
|
|
403
|
+
{ "key": "todo", "label": { "en-US": "To Do" }, "icon": "list" },
|
|
404
|
+
{ "key": "in_progress", "label": { "en-US": "In Progress" }, "icon": "spinner" },
|
|
405
|
+
{ "key": "done", "label": { "en-US": "Done" }, "icon": "check-circle" }
|
|
406
|
+
],
|
|
407
|
+
"groupTemplate": {
|
|
408
|
+
"component": "layout",
|
|
409
|
+
"props": { "className": "group-header bg-gray-100 p-2 rounded" },
|
|
410
|
+
"children": [
|
|
411
|
+
{ "component": "text", "props": { "value": "{{ groupLabel }}", "type": "h6" } },
|
|
412
|
+
{ "component": "badge", "props": { "value": "{{ groupCount }}" } }
|
|
413
|
+
]
|
|
414
|
+
},
|
|
415
|
+
"layout": "accordion",
|
|
416
|
+
"options": { "allowAdd": true, "allowRemove": true, "allowReorder": true },
|
|
417
|
+
"defaultItem": { "title": "", "description": "", "status": "todo", "assignee": null },
|
|
418
|
+
"addButton": { "label": { "en-US": "New Task" }, "icon": "plus", "variant": "contained", "position": "top" },
|
|
419
|
+
"itemTemplate": {
|
|
420
|
+
"component": "card",
|
|
421
|
+
"props": { "variant": "outlined" },
|
|
422
|
+
"children": [
|
|
423
|
+
{
|
|
424
|
+
"component": "layout",
|
|
425
|
+
"props": { "cols": 3 },
|
|
426
|
+
"children": [
|
|
427
|
+
{
|
|
428
|
+
"component": "field",
|
|
429
|
+
"name": "title",
|
|
430
|
+
"props": { "label": "Title", "type": "text", "required": true }
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
"component": "field",
|
|
434
|
+
"name": "status",
|
|
435
|
+
"props": {
|
|
436
|
+
"label": "Status",
|
|
437
|
+
"type": "select",
|
|
438
|
+
"options": [
|
|
439
|
+
{ "value": "todo", "label": "To Do" },
|
|
440
|
+
{ "value": "in_progress", "label": "In Progress" },
|
|
441
|
+
{ "value": "done", "label": "Done" }
|
|
442
|
+
]
|
|
443
|
+
}
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
"component": "field",
|
|
447
|
+
"name": "assignee",
|
|
448
|
+
"props": { "label": "Assignee", "type": "select", "options": "{{ users }}" }
|
|
449
|
+
}
|
|
450
|
+
]
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
"component": "field",
|
|
454
|
+
"name": "description",
|
|
455
|
+
"props": { "label": "Description", "type": "textarea", "rows": 3 }
|
|
456
|
+
}
|
|
457
|
+
]
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
},
|
|
461
|
+
"gridContacts": {
|
|
462
|
+
"component": "field-collection",
|
|
463
|
+
"name": "contactsGrid",
|
|
464
|
+
"props": {
|
|
465
|
+
"fieldName": "company.contacts",
|
|
466
|
+
"layout": "grid",
|
|
467
|
+
"cols": 3,
|
|
468
|
+
"spacing": 3,
|
|
469
|
+
"options": {
|
|
470
|
+
"allowAdd": true,
|
|
471
|
+
"allowRemove": true,
|
|
472
|
+
"allowRemoveAll": true,
|
|
473
|
+
"allowReorder": false,
|
|
474
|
+
"minItems": 1,
|
|
475
|
+
"maxItems": 12
|
|
476
|
+
},
|
|
477
|
+
"showDragHandle": false,
|
|
478
|
+
"showIndex": false,
|
|
479
|
+
"defaultItem": { "firstName": "", "lastName": "", "email": "", "phone": "", "department": "" },
|
|
480
|
+
"addButton": {
|
|
481
|
+
"label": { "en-US": "Add Contact" },
|
|
482
|
+
"icon": "user-plus",
|
|
483
|
+
"variant": "contained",
|
|
484
|
+
"position": "both"
|
|
485
|
+
},
|
|
486
|
+
"containerClass": "contacts-grid",
|
|
487
|
+
"itemClass": "contact-card",
|
|
488
|
+
"itemTemplate": {
|
|
489
|
+
"component": "card",
|
|
490
|
+
"props": { "variant": "elevation", "elevation": 2 },
|
|
491
|
+
"children": [
|
|
492
|
+
{
|
|
493
|
+
"component": "layout",
|
|
494
|
+
"props": { "cols": 1 },
|
|
495
|
+
"children": [
|
|
496
|
+
{
|
|
497
|
+
"component": "field",
|
|
498
|
+
"name": "firstName",
|
|
499
|
+
"props": { "label": "First Name", "type": "text", "required": true }
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
"component": "field",
|
|
503
|
+
"name": "lastName",
|
|
504
|
+
"props": { "label": "Last Name", "type": "text", "required": true }
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
"component": "field",
|
|
508
|
+
"name": "email",
|
|
509
|
+
"props": { "label": "Email", "type": "email", "required": true }
|
|
510
|
+
},
|
|
511
|
+
{ "component": "field", "name": "phone", "props": { "label": "Phone", "type": "tel" } },
|
|
512
|
+
{
|
|
513
|
+
"component": "field",
|
|
514
|
+
"name": "department",
|
|
515
|
+
"props": {
|
|
516
|
+
"label": "Department",
|
|
517
|
+
"type": "select",
|
|
518
|
+
"options": [
|
|
519
|
+
{ "value": "sales", "label": "Sales" },
|
|
520
|
+
{ "value": "support", "label": "Support" },
|
|
521
|
+
{ "value": "engineering", "label": "Engineering" },
|
|
522
|
+
{ "value": "management", "label": "Management" }
|
|
523
|
+
]
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
]
|
|
527
|
+
}
|
|
528
|
+
]
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
},
|
|
532
|
+
"businessHoursByDay": {
|
|
533
|
+
"component": "field-collection",
|
|
534
|
+
"name": "businessHoursCollection",
|
|
535
|
+
"props": {
|
|
536
|
+
"fieldName": "businessHours",
|
|
537
|
+
"groupMode": true,
|
|
538
|
+
"groupBy": "dayOfWeek",
|
|
539
|
+
"groups": [
|
|
540
|
+
{ "key": 0, "label": { "en-US": "Sunday" }, "icon": "calendar-check" },
|
|
541
|
+
{ "key": 1, "label": { "en-US": "Monday" }, "icon": "calendar" },
|
|
542
|
+
{ "key": 2, "label": { "en-US": "Tuesday" }, "icon": "calendar" },
|
|
543
|
+
{ "key": 3, "label": { "en-US": "Wednesday" }, "icon": "calendar" },
|
|
544
|
+
{ "key": 4, "label": { "en-US": "Thursday" }, "icon": "calendar" },
|
|
545
|
+
{ "key": 5, "label": { "en-US": "Friday" }, "icon": "calendar" },
|
|
546
|
+
{ "key": 6, "label": { "en-US": "Saturday" }, "icon": "calendar-check" }
|
|
547
|
+
],
|
|
548
|
+
"groupTemplate": {
|
|
549
|
+
"component": "layout",
|
|
550
|
+
"props": { "className": "d-flex justify-content-between align-items-center" },
|
|
551
|
+
"children": [
|
|
552
|
+
{ "component": "text", "props": { "value": "{{ groupLabel }}", "type": "h6" } },
|
|
553
|
+
{
|
|
554
|
+
"component": "badge",
|
|
555
|
+
"props": {
|
|
556
|
+
"value": "{{ groupCount > 0 ? 'Open' : 'Closed' }}",
|
|
557
|
+
"variant": "{{ groupCount > 0 ? 'success' : 'danger' }}"
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
]
|
|
561
|
+
},
|
|
562
|
+
"layout": "accordion",
|
|
563
|
+
"options": { "allowAdd": true, "allowRemove": true, "allowReorder": true, "minItems": 0, "maxItems": 21 },
|
|
564
|
+
"defaultItem": { "startTime": "09:00:00", "endTime": "17:00:00", "isOpen": true },
|
|
565
|
+
"showDragHandle": true,
|
|
566
|
+
"containerClass": "business-hours-container",
|
|
567
|
+
"itemTemplate": {
|
|
568
|
+
"component": "card",
|
|
569
|
+
"props": { "variant": "outlined" },
|
|
570
|
+
"children": [
|
|
571
|
+
{
|
|
572
|
+
"component": "layout",
|
|
573
|
+
"props": { "cols": 3 },
|
|
574
|
+
"children": [
|
|
575
|
+
{
|
|
576
|
+
"component": "field",
|
|
577
|
+
"name": "startTime",
|
|
578
|
+
"props": { "label": "Opening Time", "type": "time", "required": true }
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
"component": "field",
|
|
582
|
+
"name": "endTime",
|
|
583
|
+
"props": { "label": "Closing Time", "type": "time", "required": true }
|
|
584
|
+
},
|
|
585
|
+
{ "component": "field", "name": "isOpen", "props": { "label": "Open", "type": "checkbox" } }
|
|
586
|
+
]
|
|
587
|
+
}
|
|
588
|
+
]
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
},
|
|
592
|
+
"multipleTemplates": {
|
|
593
|
+
"component": "field-collection",
|
|
594
|
+
"name": "addressesCollection",
|
|
595
|
+
"props": {
|
|
596
|
+
"fieldName": "user.addresses",
|
|
597
|
+
"itemTemplate": [
|
|
598
|
+
{ "component": "text", "props": { "value": "Address {{ index + 1 }}", "type": "h6" } },
|
|
599
|
+
{
|
|
600
|
+
"component": "layout",
|
|
601
|
+
"props": { "cols": 2 },
|
|
602
|
+
"children": [
|
|
603
|
+
{ "component": "field", "name": "street", "props": { "label": "Street Address", "type": "text" } },
|
|
604
|
+
{ "component": "field", "name": "city", "props": { "label": "City", "type": "text" } },
|
|
605
|
+
{ "component": "field", "name": "state", "props": { "label": "State", "type": "text" } },
|
|
606
|
+
{ "component": "field", "name": "zipCode", "props": { "label": "ZIP Code", "type": "text" } }
|
|
607
|
+
]
|
|
608
|
+
},
|
|
609
|
+
{ "component": "field", "name": "isPrimary", "props": { "label": "Primary Address", "type": "checkbox" } }
|
|
610
|
+
],
|
|
611
|
+
"defaultItem": { "street": "", "city": "", "state": "", "zipCode": "", "isPrimary": false },
|
|
612
|
+
"options": { "allowAdd": true, "allowRemove": true, "allowReorder": true, "minItems": 1, "maxItems": 5 },
|
|
613
|
+
"showIndex": true,
|
|
614
|
+
"showDragHandle": true
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
}
|