@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,265 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Field Component",
4
+ "type": "object",
5
+ "properties": {
6
+ "component": {
7
+ "type": "string",
8
+ "const": "field"
9
+ },
10
+ "name": {
11
+ "type": "string",
12
+ "description": "Field name (form field path)",
13
+ "x-example": "countryCode"
14
+ },
15
+ "props": {
16
+ "type": "object",
17
+ "properties": {
18
+ "label": {
19
+ "oneOf": [{ "type": "string" }, { "$ref": "../schemas.json#/definitions/localized" }],
20
+ "x-example": {
21
+ "en-US": "Country Code"
22
+ }
23
+ },
24
+ "placeholder": {
25
+ "type": "string",
26
+ "description": "Field placeholder text",
27
+ "x-example": "Enter Country Code"
28
+ },
29
+ "type": {
30
+ "type": "string",
31
+ "enum": [
32
+ "text",
33
+ "number",
34
+ "email",
35
+ "password",
36
+ "tel",
37
+ "url",
38
+ "date",
39
+ "datetime",
40
+ "rangedatetime",
41
+ "time",
42
+ "select",
43
+ "select-async",
44
+ "autocomplete-googleplaces",
45
+ "checkbox",
46
+ "radio",
47
+ "textarea",
48
+ "attachment"
49
+ ],
50
+ "description": "Field input type",
51
+ "x-example": "select-async"
52
+ },
53
+ "required": {
54
+ "type": "boolean",
55
+ "description": "Whether field is required",
56
+ "x-example": true
57
+ },
58
+ "disabled": {
59
+ "type": "boolean",
60
+ "description": "Whether field is disabled",
61
+ "x-example": false
62
+ },
63
+ "options": {
64
+ "type": "object",
65
+ "description": "Field options for select types",
66
+ "properties": {
67
+ "variant": { "type": "string" },
68
+ "size": { "type": "string" },
69
+ "allowInlineCreate": { "type": "boolean" },
70
+ "allowCreate": { "type": "boolean", "description": "Alias for allowInlineCreate" },
71
+ "allowMultiple": { "type": "boolean" },
72
+ "allowClear": { "type": "boolean" },
73
+ "allowSearch": { "type": "boolean" },
74
+ "placeholder": { "type": "string" },
75
+ "minWidth": { "type": "string" },
76
+ "valueFieldName": {
77
+ "type": "string",
78
+ "description": "Field name to use as the value for select options",
79
+ "x-example": "countryCode"
80
+ },
81
+ "itemLabelTemplate": {
82
+ "type": "string",
83
+ "description": "Template expression for option labels",
84
+ "x-example": "{{countryName}}"
85
+ },
86
+ "itemValueTemplate": {
87
+ "type": "string",
88
+ "description": "Template expression for option values",
89
+ "x-example": "{{countryCode}}"
90
+ },
91
+ "navigateActionPermission": {
92
+ "type": "string",
93
+ "description": "Permission required for navigation actions",
94
+ "x-example": "System/Countries/Update"
95
+ },
96
+ "searchQuery": {
97
+ "type": "object",
98
+ "description": "Query configuration for async search",
99
+ "properties": {
100
+ "name": { "type": "string", "x-example": "getCountries" },
101
+ "path": {
102
+ "type": "string",
103
+ "description": "Path to data in query result",
104
+ "x-example": "countries.items"
105
+ },
106
+ "params": {
107
+ "type": "object",
108
+ "description": "Query parameters",
109
+ "additionalProperties": true,
110
+ "x-example": {
111
+ "search": "{{ string search }}",
112
+ "take": "{{ number pageSize }}",
113
+ "skip": "{{ number skip }}",
114
+ "filter": "{{ string filter }}"
115
+ }
116
+ }
117
+ }
118
+ },
119
+ "valueQuery": {
120
+ "type": "object",
121
+ "description": "Query configuration for fetching selected value",
122
+ "properties": {
123
+ "name": { "type": "string" },
124
+ "path": { "type": "string", "description": "Path to data in query result" },
125
+ "params": { "type": "object", "description": "Query parameters", "additionalProperties": true }
126
+ }
127
+ },
128
+ "defaultValues": {
129
+ "type": "object",
130
+ "description": "Default values for the field",
131
+ "additionalProperties": true
132
+ }
133
+ },
134
+ "additionalProperties": true
135
+ },
136
+ "dropDownToolbar": {
137
+ "type": "array",
138
+ "description": "Toolbar components for dropdown",
139
+ "items": { "$ref": "../schemas.json#/definitions/component" }
140
+ },
141
+ "queries": {
142
+ "type": "array",
143
+ "description": "Field-specific queries for select-async fields",
144
+ "items": {
145
+ "type": "object",
146
+ "properties": {
147
+ "name": { "type": "string" },
148
+ "query": {
149
+ "type": "object",
150
+ "properties": {
151
+ "command": { "type": "string" },
152
+ "variables": { "type": "object", "additionalProperties": true }
153
+ }
154
+ }
155
+ }
156
+ }
157
+ },
158
+ "onEditClick": { "$ref": "../schemas.json#/definitions/actionsList" },
159
+ "onOptionTagClick": {
160
+ "$ref": "../schemas.json#/definitions/actionsList",
161
+ "description": "Actions to execute when clicking on an option tag/chip in the dropdown"
162
+ },
163
+ "items": {
164
+ "type": "array",
165
+ "description": "Static options for select fields",
166
+ "items": {
167
+ "type": "object",
168
+ "properties": {
169
+ "label": { "type": "string" },
170
+ "value": { "oneOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }] }
171
+ },
172
+ "required": ["label", "value"]
173
+ }
174
+ },
175
+ "transformValue": {
176
+ "type": "object",
177
+ "description": "Value transformation configuration",
178
+ "properties": {
179
+ "onLoad": { "type": "string", "description": "Template expression to transform value on load" },
180
+ "onChange": { "type": "string", "description": "Template expression to transform value on change" },
181
+ "onBlur": { "type": "string", "description": "Template expression to transform value on blur" }
182
+ }
183
+ },
184
+ "onChange": { "$ref": "../schemas.json#/definitions/actionsList" },
185
+ "onBlur": { "$ref": "../schemas.json#/definitions/actionsList" },
186
+ "onFocus": { "$ref": "../schemas.json#/definitions/actionsList" },
187
+ "onSelectValue": {
188
+ "$ref": "../schemas.json#/definitions/actionsList",
189
+ "description": "Actions to execute when a value is selected in select-async fields"
190
+ }
191
+ }
192
+ }
193
+ },
194
+ "allOf": [
195
+ {
196
+ "if": { "properties": { "props": { "properties": { "type": { "const": "select" } } } } },
197
+ "then": { "properties": { "props": { "required": ["items"] } } }
198
+ }
199
+ ],
200
+ "required": ["component", "name"],
201
+ "x-examples": [
202
+ {
203
+ "component": "field",
204
+ "name": "calendarType",
205
+ "props": {
206
+ "label": { "en-US": "Calendar Type" },
207
+ "type": "select",
208
+ "options": { "placeholder": "Select Calendar Type" },
209
+ "items": [
210
+ { "label": "Standard", "value": "Standard" },
211
+ { "label": "Resource", "value": "Resource" },
212
+ { "label": "Personal", "value": "Personal" }
213
+ ]
214
+ }
215
+ },
216
+ {
217
+ "component": "field",
218
+ "name": "countryId",
219
+ "props": {
220
+ "label": { "en-US": "Country" },
221
+ "type": "select-async",
222
+ "options": {
223
+ "allowSearch": true,
224
+ "allowClear": true,
225
+ "searchQuery": {
226
+ "name": "getCountries",
227
+ "path": "countries.items",
228
+ "params": {
229
+ "search": "{{ string search }}",
230
+ "take": "{{ number pageSize }}",
231
+ "skip": "{{ number skip }}",
232
+ "filter": "{{ string filter }}"
233
+ }
234
+ }
235
+ }
236
+ }
237
+ },
238
+ {
239
+ "component": "field",
240
+ "name": "tags",
241
+ "props": {
242
+ "label": { "en-US": "Tags" },
243
+ "type": "select-async",
244
+ "onOptionTagClick": [
245
+ {
246
+ "dialog": {
247
+ "name": "editTagDialog",
248
+ "props": { "title": { "en-US": "Edit Tag" } },
249
+ "component": { "component": "layout", "children": [{ "component": "Tags/EditTag" }] }
250
+ }
251
+ }
252
+ ]
253
+ }
254
+ },
255
+ {
256
+ "component": "field",
257
+ "name": "description",
258
+ "props": {
259
+ "label": { "en-US": "Description" },
260
+ "type": "text",
261
+ "placeholder": "Enter description"
262
+ }
263
+ }
264
+ ]
265
+ }
@@ -0,0 +1,234 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Form Component",
4
+ "type": "object",
5
+ "properties": {
6
+ "component": {
7
+ "type": "string",
8
+ "const": "form"
9
+ },
10
+ "name": {
11
+ "type": "string",
12
+ "description": "Form name identifier",
13
+ "x-example": "countryForm"
14
+ },
15
+ "inputs": {
16
+ "type": "object",
17
+ "description": "Input parameters for the form",
18
+ "additionalProperties": true,
19
+ "x-example": {}
20
+ },
21
+ "props": {
22
+ "type": "object",
23
+ "additionalProperties": false,
24
+ "properties": {
25
+ "title": {
26
+ "oneOf": [{ "type": "string" }, { "$ref": "../schemas.json#/definitions/localized" }],
27
+ "x-example": {
28
+ "en-US": "Country"
29
+ }
30
+ },
31
+ "cols": {
32
+ "type": "integer",
33
+ "description": "Number of columns for form layout",
34
+ "x-example": 2
35
+ },
36
+ "orientation": {
37
+ "type": "string",
38
+ "enum": ["horizontal", "vertical"],
39
+ "description": "Form layout orientation",
40
+ "x-example": "vertical"
41
+ },
42
+ "initialValues": {
43
+ "type": "object",
44
+ "description": "Initial form values",
45
+ "properties": {
46
+ "fromQuery": {
47
+ "type": "object",
48
+ "properties": {
49
+ "name": {
50
+ "type": "string",
51
+ "description": "Query name to fetch initial values",
52
+ "x-example": "getCountry"
53
+ },
54
+ "path": {
55
+ "type": "string",
56
+ "description": "Path to data in query result",
57
+ "x-example": "country"
58
+ }
59
+ },
60
+ "required": ["name", "path"],
61
+ "x-example": {
62
+ "name": "getCountry",
63
+ "path": "country"
64
+ }
65
+ },
66
+ "append": {
67
+ "type": "object",
68
+ "description": "Additional values to append",
69
+ "additionalProperties": true,
70
+ "x-example": {
71
+ "customValues": {},
72
+ "isActive": true
73
+ }
74
+ }
75
+ },
76
+ "additionalProperties": true
77
+ },
78
+ "queries": {
79
+ "type": "array",
80
+ "description": "Form-associated queries",
81
+ "items": {
82
+ "type": "object",
83
+ "properties": {
84
+ "name": {
85
+ "type": "string",
86
+ "description": "Unique name for the query",
87
+ "x-example": "getCountry"
88
+ },
89
+ "query": {
90
+ "type": "object",
91
+ "properties": {
92
+ "command": {
93
+ "type": "string",
94
+ "description": "GraphQL query string"
95
+ },
96
+ "variables": {
97
+ "type": "object",
98
+ "description": "Query variables with template expressions",
99
+ "additionalProperties": true
100
+ }
101
+ },
102
+ "required": ["command"]
103
+ }
104
+ },
105
+ "required": ["name", "query"]
106
+ }
107
+ },
108
+ "validationSchema": {
109
+ "type": "object",
110
+ "description": "Form-level validation schema",
111
+ "additionalProperties": {
112
+ "type": "object",
113
+ "properties": {
114
+ "type": {
115
+ "type": "string",
116
+ "enum": ["string", "number", "boolean", "array", "object"]
117
+ },
118
+ "required": {
119
+ "oneOf": [
120
+ { "type": "boolean" },
121
+ {
122
+ "type": "object",
123
+ "properties": {
124
+ "message": { "type": "string" }
125
+ }
126
+ }
127
+ ]
128
+ },
129
+ "min": {
130
+ "type": "object",
131
+ "properties": {
132
+ "length": { "type": "number" },
133
+ "message": { "type": "string" }
134
+ }
135
+ },
136
+ "max": {
137
+ "type": "object",
138
+ "properties": {
139
+ "length": { "type": "number" },
140
+ "message": { "type": "string" }
141
+ }
142
+ },
143
+ "nullable": {
144
+ "type": "boolean"
145
+ },
146
+ "schema": {
147
+ "type": "object",
148
+ "description": "Nested schema for object types",
149
+ "additionalProperties": true
150
+ }
151
+ }
152
+ }
153
+ },
154
+ "autoSave": {
155
+ "type": "boolean",
156
+ "description": "Enable automatic form saving"
157
+ },
158
+ "resetOnSubmit": {
159
+ "type": "boolean",
160
+ "description": "Reset form values after successful submission"
161
+ },
162
+ "dirtyGuard": {
163
+ "type": "object",
164
+ "description": "Configuration for unsaved changes warning dialog",
165
+ "properties": {
166
+ "enabled": {
167
+ "type": "boolean",
168
+ "description": "Enables or disables the dirty guard feature"
169
+ },
170
+ "title": {
171
+ "$ref": "../schemas.json#/definitions/localized",
172
+ "description": "Localized dialog title"
173
+ },
174
+ "message": {
175
+ "$ref": "../schemas.json#/definitions/localized",
176
+ "description": "Localized dialog message explaining the warning"
177
+ },
178
+ "confirmLabel": {
179
+ "$ref": "../schemas.json#/definitions/localized",
180
+ "description": "Localized confirm button text"
181
+ },
182
+ "cancelLabel": {
183
+ "$ref": "../schemas.json#/definitions/localized",
184
+ "description": "Localized cancel button text"
185
+ },
186
+ "onConfirm": {
187
+ "$ref": "../schemas.json#/definitions/actionsList",
188
+ "description": "Actions to execute when user confirms leaving (discards changes)"
189
+ },
190
+ "onCancel": {
191
+ "$ref": "../schemas.json#/definitions/actionsList",
192
+ "description": "Actions to execute when user cancels and stays on the page"
193
+ }
194
+ },
195
+ "x-example": {
196
+ "enabled": true,
197
+ "title": { "en-US": "Unsaved Changes" },
198
+ "message": { "en-US": "You have unsaved changes. Are you sure you want to leave?" },
199
+ "confirmLabel": { "en-US": "Leave" },
200
+ "cancelLabel": { "en-US": "Stay" }
201
+ }
202
+ },
203
+ "preventDefault": {
204
+ "type": "boolean",
205
+ "description": "Prevent default form submission behavior"
206
+ },
207
+ "isHidden": {
208
+ "$ref": "../schemas.json#/definitions/templateExpression",
209
+ "description": "Boolean expression for conditional rendering"
210
+ },
211
+ "onSubmit": {
212
+ "$ref": "../schemas.json#/definitions/actionsList"
213
+ },
214
+ "onLoad": {
215
+ "$ref": "../schemas.json#/definitions/actionsList"
216
+ },
217
+ "onReset": {
218
+ "$ref": "../schemas.json#/definitions/actionsList"
219
+ },
220
+ "onValidate": {
221
+ "$ref": "../schemas.json#/definitions/actionsList"
222
+ },
223
+ "onError": {
224
+ "$ref": "../schemas.json#/definitions/actionsList"
225
+ }
226
+ },
227
+ "required": ["validationSchema"]
228
+ },
229
+ "children": {
230
+ "$ref": "../schemas.json#/definitions/componentChildren"
231
+ }
232
+ },
233
+ "required": ["component", "name"]
234
+ }
@@ -0,0 +1,68 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Component Schemas Index",
4
+ "description": "Index of all available CargoXplorer component schemas",
5
+ "type": "object",
6
+ "definitions": {
7
+ "appComponent": {
8
+ "$ref": "appComponent.json"
9
+ },
10
+ "navbar": {
11
+ "$ref": "navbar.json"
12
+ },
13
+ "navbarItem": {
14
+ "$ref": "navbarItem.json"
15
+ },
16
+ "navDropdown": {
17
+ "$ref": "navDropdown.json"
18
+ },
19
+ "navbarLink": {
20
+ "$ref": "navbarLink.json"
21
+ },
22
+ "collection": {
23
+ "$ref": "collection.json"
24
+ },
25
+ "row": {
26
+ "$ref": "row.json"
27
+ },
28
+ "dataGrid": {
29
+ "$ref": "dataGrid.json"
30
+ },
31
+ "card": {
32
+ "$ref": "card.json"
33
+ },
34
+ "barcodeScanner": {
35
+ "$ref": "barcodeScanner.json"
36
+ },
37
+ "button": {
38
+ "$ref": "button.json"
39
+ },
40
+ "form": {
41
+ "$ref": "form.json"
42
+ },
43
+ "layout": {
44
+ "$ref": "layout.json"
45
+ },
46
+ "tabs": {
47
+ "$ref": "tabs.json"
48
+ },
49
+ "tab": {
50
+ "$ref": "tab.json"
51
+ },
52
+ "field": {
53
+ "$ref": "field.json"
54
+ },
55
+ "dropdown": {
56
+ "$ref": "dropdown.json"
57
+ },
58
+ "datasource": {
59
+ "$ref": "datasource.json"
60
+ },
61
+ "calendar": {
62
+ "$ref": "calendar.json"
63
+ },
64
+ "module": {
65
+ "$ref": "module.json"
66
+ }
67
+ }
68
+ }
@@ -0,0 +1,69 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Layout Component",
4
+ "type": "object",
5
+ "properties": {
6
+ "component": {
7
+ "type": "string",
8
+ "const": "layout"
9
+ },
10
+ "name": {
11
+ "type": "string",
12
+ "description": "Layout name identifier"
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
+ "cols": {
28
+ "type": "integer",
29
+ "description": "Number of columns"
30
+ },
31
+ "orientation": {
32
+ "type": "string",
33
+ "enum": ["horizontal", "vertical"],
34
+ "description": "Layout orientation"
35
+ },
36
+ "toolbar": {
37
+ "type": "array",
38
+ "description": "Toolbar components",
39
+ "items": {
40
+ "$ref": "../schemas.json#/definitions/component"
41
+ }
42
+ }
43
+ }
44
+ },
45
+ "inputs": {
46
+ "type": "array",
47
+ "description": "Layout input parameters",
48
+ "items": {
49
+ "type": "object",
50
+ "properties": {
51
+ "name": {
52
+ "type": "string"
53
+ },
54
+ "type": {
55
+ "type": "string"
56
+ },
57
+ "props": {
58
+ "type": "object",
59
+ "additionalProperties": true
60
+ }
61
+ }
62
+ }
63
+ },
64
+ "children": {
65
+ "$ref": "../schemas.json#/definitions/componentChildren"
66
+ }
67
+ },
68
+ "required": ["component"]
69
+ }