@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,176 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "Card Component",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"component": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"const": "card"
|
|
9
|
+
},
|
|
10
|
+
"name": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Unique name identifier for the card"
|
|
13
|
+
},
|
|
14
|
+
"props": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"properties": {
|
|
17
|
+
"title": {
|
|
18
|
+
"oneOf": [{ "type": "string" }, { "$ref": "../schemas.json#/definitions/localized" }]
|
|
19
|
+
},
|
|
20
|
+
"icon": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "Icon class name"
|
|
23
|
+
},
|
|
24
|
+
"permission": {
|
|
25
|
+
"$ref": "../schemas.json#/definitions/permissions"
|
|
26
|
+
},
|
|
27
|
+
"className": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"description": "CSS classes for styling"
|
|
30
|
+
},
|
|
31
|
+
"toolbar": {
|
|
32
|
+
"type": "array",
|
|
33
|
+
"description": "Toolbar components",
|
|
34
|
+
"items": { "$ref": "../schemas.json#/definitions/component" }
|
|
35
|
+
},
|
|
36
|
+
"contextMenu": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"description": "Context menu (3-dots menu) configuration",
|
|
39
|
+
"properties": {
|
|
40
|
+
"icon": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"description": "Icon for the menu trigger (default: 'ellipsis-v' or 'more-vert')",
|
|
43
|
+
"default": "ellipsis-v"
|
|
44
|
+
},
|
|
45
|
+
"position": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"enum": ["top-right", "top-left", "bottom-right", "bottom-left"],
|
|
48
|
+
"description": "Position of the menu icon",
|
|
49
|
+
"default": "top-right"
|
|
50
|
+
},
|
|
51
|
+
"items": {
|
|
52
|
+
"type": "array",
|
|
53
|
+
"description": "Menu items to display",
|
|
54
|
+
"items": {
|
|
55
|
+
"type": "object",
|
|
56
|
+
"properties": {
|
|
57
|
+
"label": {
|
|
58
|
+
"oneOf": [{ "type": "string" }, { "$ref": "../schemas.json#/definitions/localized" }],
|
|
59
|
+
"description": "Display text for the menu item"
|
|
60
|
+
},
|
|
61
|
+
"icon": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"description": "Optional icon for the menu item"
|
|
64
|
+
},
|
|
65
|
+
"divider": {
|
|
66
|
+
"type": "boolean",
|
|
67
|
+
"description": "Show as a divider instead of menu item"
|
|
68
|
+
},
|
|
69
|
+
"onClick": {
|
|
70
|
+
"$ref": "../schemas.json#/definitions/actionsList",
|
|
71
|
+
"description": "Actions to execute when item is clicked"
|
|
72
|
+
},
|
|
73
|
+
"permission": {
|
|
74
|
+
"$ref": "../schemas.json#/definitions/permissions",
|
|
75
|
+
"description": "Permission required to view this item"
|
|
76
|
+
},
|
|
77
|
+
"isHidden": {
|
|
78
|
+
"$ref": "../schemas.json#/definitions/templateExpression",
|
|
79
|
+
"description": "Conditionally hide this menu item"
|
|
80
|
+
},
|
|
81
|
+
"disabled": {
|
|
82
|
+
"$ref": "../schemas.json#/definitions/templateExpression",
|
|
83
|
+
"description": "Conditionally disable this menu item"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"onClick": {
|
|
91
|
+
"$ref": "../schemas.json#/definitions/actionsList",
|
|
92
|
+
"description": "Actions to execute when the card is clicked"
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"children": {
|
|
97
|
+
"$ref": "../schemas.json#/definitions/componentChildren"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"required": ["component"],
|
|
101
|
+
"x-examples": [
|
|
102
|
+
{
|
|
103
|
+
"component": "card",
|
|
104
|
+
"props": {
|
|
105
|
+
"title": { "en-US": "Primary Contact Information" },
|
|
106
|
+
"toolbar": [
|
|
107
|
+
{
|
|
108
|
+
"component": "button",
|
|
109
|
+
"props": {
|
|
110
|
+
"icon": "pen",
|
|
111
|
+
"onClick": [
|
|
112
|
+
{ "dialog": { "name": "updateContactDialog", "component": { "component": "Contacts/UpdateContact" } } }
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
"contextMenu": {
|
|
118
|
+
"icon": "ellipsis-v",
|
|
119
|
+
"position": "top-right",
|
|
120
|
+
"items": [
|
|
121
|
+
{
|
|
122
|
+
"label": { "en-US": "Edit" },
|
|
123
|
+
"icon": "edit",
|
|
124
|
+
"onClick": [
|
|
125
|
+
{ "dialog": { "name": "editDialog", "component": { "component": "Contacts/Edit" } } }
|
|
126
|
+
]
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"label": { "en-US": "Duplicate" },
|
|
130
|
+
"icon": "copy",
|
|
131
|
+
"onClick": [
|
|
132
|
+
{ "action": "duplicate", "params": { "id": "{{ contactId }}" } }
|
|
133
|
+
]
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"divider": true
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"label": { "en-US": "Delete" },
|
|
140
|
+
"icon": "trash",
|
|
141
|
+
"onClick": [
|
|
142
|
+
{ "confirm": { "message": "Are you sure you want to delete this contact?" } },
|
|
143
|
+
{ "action": "delete", "params": { "id": "{{ contactId }}" } }
|
|
144
|
+
],
|
|
145
|
+
"permission": "contacts.delete"
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"children": [
|
|
151
|
+
{
|
|
152
|
+
"component": "layout",
|
|
153
|
+
"props": { "cols": 2 },
|
|
154
|
+
"children": [{ "component": "text", "props": { "value": "..." } }]
|
|
155
|
+
}
|
|
156
|
+
]
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"component": "card",
|
|
160
|
+
"props": {
|
|
161
|
+
"className": "p-2",
|
|
162
|
+
"onClick": [{ "navigate": "orders" }]
|
|
163
|
+
},
|
|
164
|
+
"children": [
|
|
165
|
+
{
|
|
166
|
+
"component": "layout",
|
|
167
|
+
"props": { "className": "d-flex justify-content-between cursor-pointer p-3", "cols": 0 },
|
|
168
|
+
"children": [
|
|
169
|
+
{ "component": "icon", "props": { "icon": "briefcase" } },
|
|
170
|
+
{ "component": "text", "props": { "value": { "en-US": "Orders" } } }
|
|
171
|
+
]
|
|
172
|
+
}
|
|
173
|
+
]
|
|
174
|
+
}
|
|
175
|
+
]
|
|
176
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "Collection Component",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"component": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"const": "collection"
|
|
9
|
+
},
|
|
10
|
+
"name": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Collection name identifier"
|
|
13
|
+
},
|
|
14
|
+
"props": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"properties": {
|
|
17
|
+
"items": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "Template expression for items array"
|
|
20
|
+
},
|
|
21
|
+
"itemName": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"description": "Variable name for current item in iteration"
|
|
24
|
+
},
|
|
25
|
+
"cols": {
|
|
26
|
+
"type": "integer",
|
|
27
|
+
"description": "Number of columns for layout"
|
|
28
|
+
},
|
|
29
|
+
"orientation": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"enum": ["horizontal", "vertical"],
|
|
32
|
+
"description": "Layout orientation"
|
|
33
|
+
},
|
|
34
|
+
"containerTag": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"description": "HTML container tag"
|
|
37
|
+
},
|
|
38
|
+
"className": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"description": "CSS classes for styling"
|
|
41
|
+
},
|
|
42
|
+
"childClassName": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"description": "CSS classes for child elements"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"required": ["items", "itemName"]
|
|
48
|
+
},
|
|
49
|
+
"children": {
|
|
50
|
+
"$ref": "../schemas.json#/definitions/componentChildren"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"required": ["component", "props"]
|
|
54
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "DataGrid Component",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"component": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"const": "dataGrid"
|
|
9
|
+
},
|
|
10
|
+
"name": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Unique name identifier for the dataGrid"
|
|
13
|
+
},
|
|
14
|
+
"inputs": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"description": "Input parameters for the dataGrid"
|
|
17
|
+
},
|
|
18
|
+
"props": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"properties": {
|
|
21
|
+
"refreshHandler": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"description": "Name of the refresh handler",
|
|
24
|
+
"x-example": "states"
|
|
25
|
+
},
|
|
26
|
+
"enableStore": {
|
|
27
|
+
"type": "boolean",
|
|
28
|
+
"description": "Enable store for the datagrid, row data will be placed in the store"
|
|
29
|
+
},
|
|
30
|
+
"views": {
|
|
31
|
+
"type": "array",
|
|
32
|
+
"description": "Array of view configurations",
|
|
33
|
+
"items": {
|
|
34
|
+
"$ref": "../schemas.json#/definitions/dataGridView"
|
|
35
|
+
},
|
|
36
|
+
"x-example": [
|
|
37
|
+
{
|
|
38
|
+
"name": "allStates",
|
|
39
|
+
"displayName": { "en-US": "All States" },
|
|
40
|
+
"columns": [
|
|
41
|
+
{ "name": "stateCode", "label": { "en-US": "State code" } },
|
|
42
|
+
{ "name": "name", "label": { "en-US": "State Name" } },
|
|
43
|
+
{ "name": "countryCode", "label": { "en-US": "Country code" } },
|
|
44
|
+
{
|
|
45
|
+
"name": "created",
|
|
46
|
+
"label": { "en-US": "Created" },
|
|
47
|
+
"showAs": { "component": "text", "props": { "value": "{{ format created L }}" } }
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
"dotsMenu": {
|
|
54
|
+
"type": "object",
|
|
55
|
+
"description": "Dots menu configuration for row-level actions",
|
|
56
|
+
"properties": {
|
|
57
|
+
"items": {
|
|
58
|
+
"type": "array",
|
|
59
|
+
"items": {
|
|
60
|
+
"type": "object",
|
|
61
|
+
"properties": {
|
|
62
|
+
"label": {
|
|
63
|
+
"oneOf": [{ "type": "string" }, { "$ref": "../schemas.json#/definitions/localized" }]
|
|
64
|
+
},
|
|
65
|
+
"icon": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"description": "Icon name for the menu item"
|
|
68
|
+
},
|
|
69
|
+
"onClick": {
|
|
70
|
+
"$ref": "../schemas.json#/definitions/actionsList"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"options": {
|
|
78
|
+
"$ref": "../schemas.json#/definitions/dataGridOptions",
|
|
79
|
+
"x-examples": [
|
|
80
|
+
{
|
|
81
|
+
"query": "states",
|
|
82
|
+
"rootEntityName": "State",
|
|
83
|
+
"entityKeys": ["countryCode", "stateCode"],
|
|
84
|
+
"enableDynamicGrid": true,
|
|
85
|
+
"defaultView": "allStates"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"query": "allOrderCommodities",
|
|
89
|
+
"rootEntityName": "OrderCommodity",
|
|
90
|
+
"entityKeys": ["commodityId"],
|
|
91
|
+
"navigationType": "store",
|
|
92
|
+
"enableDynamicGrid": true,
|
|
93
|
+
"enableViews": false,
|
|
94
|
+
"enableSearch": true,
|
|
95
|
+
"enablePagination": true,
|
|
96
|
+
"defaultView": "commodities"
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
},
|
|
100
|
+
"toolbar": {
|
|
101
|
+
"type": "array",
|
|
102
|
+
"description": "Toolbar components",
|
|
103
|
+
"items": {
|
|
104
|
+
"$ref": "../schemas.json#/definitions/component"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"isHidden": {
|
|
108
|
+
"$ref": "../schemas.json#/definitions/templateExpression",
|
|
109
|
+
"description": "Boolean expression for conditional rendering"
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"required": ["options"]
|
|
113
|
+
},
|
|
114
|
+
"children": {
|
|
115
|
+
"$ref": "../schemas.json#/definitions/componentChildren"
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"required": ["component", "name", "props"]
|
|
119
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "Datasource Component",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"component": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"const": "datasource"
|
|
9
|
+
},
|
|
10
|
+
"name": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Datasource name identifier",
|
|
13
|
+
"x-example": "dataSourceCommodities"
|
|
14
|
+
},
|
|
15
|
+
"props": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"properties": {
|
|
18
|
+
"name": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "Internal name for the datasource",
|
|
21
|
+
"x-example": "dataSourceCommodities"
|
|
22
|
+
},
|
|
23
|
+
"refreshHandler": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"description": "Name of the refresh handler for this datasource",
|
|
26
|
+
"x-example": "datasourcePickupOptions"
|
|
27
|
+
},
|
|
28
|
+
"isHidden": {
|
|
29
|
+
"$ref": "../schemas.json#/definitions/templateExpression",
|
|
30
|
+
"description": "Boolean expression for conditional rendering",
|
|
31
|
+
"x-example": "{{ eval !pickupForm.contactAddressId || !pickupForm.pickupDate }}"
|
|
32
|
+
},
|
|
33
|
+
"queries": {
|
|
34
|
+
"type": "array",
|
|
35
|
+
"description": "Array of queries or workflows to execute",
|
|
36
|
+
"items": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"properties": {
|
|
39
|
+
"name": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"description": "Unique name for the query or workflow",
|
|
42
|
+
"x-example": "commodities"
|
|
43
|
+
},
|
|
44
|
+
"query": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"description": "GraphQL query configuration",
|
|
47
|
+
"properties": {
|
|
48
|
+
"command": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"description": "GraphQL query string",
|
|
51
|
+
"x-example": "query($organizationId: Int!, $filter: String!) { commodities(organizationId: $organizationId, filter: $filter) { items { commodityId description } } }"
|
|
52
|
+
},
|
|
53
|
+
"path": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"description": "Path to extract data from query result",
|
|
56
|
+
"x-example": "country"
|
|
57
|
+
},
|
|
58
|
+
"variables": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"description": "Query variables with template expressions",
|
|
61
|
+
"additionalProperties": true,
|
|
62
|
+
"x-example": {
|
|
63
|
+
"organizationId": "{{number organizationId }}",
|
|
64
|
+
"filter": "{{string filter }}"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"mapping": {
|
|
68
|
+
"type": "object",
|
|
69
|
+
"description": "Optional mapping transformation applied to each item at the resolved path",
|
|
70
|
+
"additionalProperties": true,
|
|
71
|
+
"x-example": {
|
|
72
|
+
"id": "{{ item.commodityId }}",
|
|
73
|
+
"text": "{{ item.description }}"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"required": ["command"],
|
|
78
|
+
"x-example": {
|
|
79
|
+
"command": "query($organizationId: Int!, $filter: String!) { commodities(organizationId: $organizationId, filter: $filter) { items { commodityId description } } }",
|
|
80
|
+
"path": "commodities.items",
|
|
81
|
+
"variables": {
|
|
82
|
+
"organizationId": "{{ number organizationId }}",
|
|
83
|
+
"filter": "{{ string filter }}"
|
|
84
|
+
},
|
|
85
|
+
"mapping": {
|
|
86
|
+
"id": "{{ item.commodityId }}",
|
|
87
|
+
"text": "{{ item.description }}"
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"workflow": {
|
|
92
|
+
"type": "object",
|
|
93
|
+
"description": "Workflow execution configuration",
|
|
94
|
+
"properties": {
|
|
95
|
+
"workflowId": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"description": "Unique identifier of the workflow to execute",
|
|
98
|
+
"x-example": "6563ba2f-1883-4b4e-9fd8-bb431e40c159"
|
|
99
|
+
},
|
|
100
|
+
"inputs": {
|
|
101
|
+
"type": "object",
|
|
102
|
+
"description": "Input values for the workflow",
|
|
103
|
+
"additionalProperties": true,
|
|
104
|
+
"x-example": {
|
|
105
|
+
"contactAddressId": "{{ number pickupForm.contactAddressId }}",
|
|
106
|
+
"dispatchDate": "{{ format pickupForm.pickupDate YYYY-MM-DD }}"
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"required": ["workflowId"]
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"oneOf": [
|
|
114
|
+
{
|
|
115
|
+
"required": ["name", "query"]
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"required": ["name", "workflow"]
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"onSuccess": {
|
|
124
|
+
"$ref": "../schemas.json#/definitions/actionsList",
|
|
125
|
+
"description": "Actions to execute when datasource loads successfully"
|
|
126
|
+
},
|
|
127
|
+
"onError": {
|
|
128
|
+
"$ref": "../schemas.json#/definitions/actionsList",
|
|
129
|
+
"description": "Actions to execute when datasource fails to load"
|
|
130
|
+
},
|
|
131
|
+
"onLoad": {
|
|
132
|
+
"$ref": "../schemas.json#/definitions/actionsList",
|
|
133
|
+
"description": "Actions to execute when datasource starts loading"
|
|
134
|
+
},
|
|
135
|
+
"autoLoad": {
|
|
136
|
+
"type": "boolean",
|
|
137
|
+
"description": "Whether to automatically load data when component mounts",
|
|
138
|
+
"default": true,
|
|
139
|
+
"x-example": true
|
|
140
|
+
},
|
|
141
|
+
"enableStore": {
|
|
142
|
+
"type": "boolean",
|
|
143
|
+
"description": "Whether to store loaded data in the application store",
|
|
144
|
+
"x-example": false
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"required": ["queries"]
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"required": ["component", "name"]
|
|
151
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "Dropdown Component",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"component": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"const": "dropdown"
|
|
9
|
+
},
|
|
10
|
+
"name": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Dropdown name identifier"
|
|
13
|
+
},
|
|
14
|
+
"props": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"properties": {
|
|
17
|
+
"label": {
|
|
18
|
+
"oneOf": [{ "type": "string" }, { "$ref": "../schemas.json#/definitions/localized" }]
|
|
19
|
+
},
|
|
20
|
+
"icon": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "Icon class name"
|
|
23
|
+
},
|
|
24
|
+
"options": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"properties": {
|
|
27
|
+
"variant": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"enum": ["primary", "secondary", "outline-primary", "outline-secondary"],
|
|
30
|
+
"description": "Dropdown variant style"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"additionalProperties": true
|
|
34
|
+
},
|
|
35
|
+
"items": {
|
|
36
|
+
"type": "array",
|
|
37
|
+
"description": "Dropdown menu items",
|
|
38
|
+
"items": {
|
|
39
|
+
"type": "object",
|
|
40
|
+
"properties": {
|
|
41
|
+
"label": {
|
|
42
|
+
"oneOf": [{ "type": "string" }, { "$ref": "../schemas.json#/definitions/localized" }]
|
|
43
|
+
},
|
|
44
|
+
"onClick": {
|
|
45
|
+
"$ref": "../schemas.json#/definitions/actionsList"
|
|
46
|
+
},
|
|
47
|
+
"isHidden": {
|
|
48
|
+
"$ref": "../schemas.json#/definitions/templateExpression"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"required": ["component"]
|
|
57
|
+
}
|