@rxap/schematic-angular 16.2.0-dev.20 → 16.2.0-dev.22

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 (189) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +1 -1
  3. package/collection.json +15 -0
  4. package/package.json +7 -7
  5. package/src/lib/coerce-form-component.js +15 -3
  6. package/src/lib/coerce-form-component.js.map +1 -1
  7. package/src/lib/data-grid-item.d.ts +3 -3
  8. package/src/lib/data-grid-item.js +2 -2
  9. package/src/lib/data-grid-item.js.map +1 -1
  10. package/src/lib/form/abstract-control.d.ts +29 -0
  11. package/src/lib/form/abstract-control.js +37 -0
  12. package/src/lib/form/abstract-control.js.map +1 -0
  13. package/src/lib/form/array/base-form-array.d.ts +18 -0
  14. package/src/lib/form/array/base-form-array.js +40 -0
  15. package/src/lib/form/array/base-form-array.js.map +1 -0
  16. package/src/lib/form/array/form-array-kind.d.ts +3 -0
  17. package/src/lib/form/array/form-array-kind.js +8 -0
  18. package/src/lib/form/array/form-array-kind.js.map +1 -0
  19. package/src/lib/form/array/form-array.d.ts +12 -0
  20. package/src/lib/form/array/form-array.js +18 -0
  21. package/src/lib/form/array/form-array.js.map +1 -0
  22. package/src/lib/form/coerce-control-component-imports.d.ts +3 -0
  23. package/src/lib/form/coerce-control-component-imports.js +18 -0
  24. package/src/lib/form/coerce-control-component-imports.js.map +1 -0
  25. package/src/lib/form/control/autocomplete-table-select-form-control.d.ts +6 -0
  26. package/src/lib/form/control/autocomplete-table-select-form-control.js +34 -0
  27. package/src/lib/form/control/autocomplete-table-select-form-control.js.map +1 -0
  28. package/src/lib/form/control/base-form-control.d.ts +14 -0
  29. package/src/lib/form/control/base-form-control.js +19 -0
  30. package/src/lib/form/control/base-form-control.js.map +1 -0
  31. package/src/lib/form/control/checkbox-form-control.d.ts +11 -0
  32. package/src/lib/form/control/checkbox-form-control.js +23 -0
  33. package/src/lib/form/control/checkbox-form-control.js.map +1 -0
  34. package/src/lib/form/control/form-control-kind.d.ts +9 -0
  35. package/src/lib/form/control/form-control-kind.js +14 -0
  36. package/src/lib/form/control/form-control-kind.js.map +1 -0
  37. package/src/lib/form/control/form-control.d.ts +18 -0
  38. package/src/lib/form/control/form-control.js +43 -0
  39. package/src/lib/form/control/form-control.js.map +1 -0
  40. package/src/lib/form/control/form-field-form-control.d.ts +33 -0
  41. package/src/lib/form/control/form-field-form-control.js +76 -0
  42. package/src/lib/form/control/form-field-form-control.js.map +1 -0
  43. package/src/lib/form/control/input-form-control.d.ts +14 -0
  44. package/src/lib/form/control/input-form-control.js +71 -0
  45. package/src/lib/form/control/input-form-control.js.map +1 -0
  46. package/src/lib/form/control/select-form-control.d.ts +18 -0
  47. package/src/lib/form/control/select-form-control.js +29 -0
  48. package/src/lib/form/control/select-form-control.js.map +1 -0
  49. package/src/lib/form/control/slide-toggle-form-control.d.ts +11 -0
  50. package/src/lib/form/control/slide-toggle-form-control.js +23 -0
  51. package/src/lib/form/control/slide-toggle-form-control.js.map +1 -0
  52. package/src/lib/form/control/table-select-form-control.d.ts +43 -0
  53. package/src/lib/form/control/table-select-form-control.js +69 -0
  54. package/src/lib/form/control/table-select-form-control.js.map +1 -0
  55. package/src/lib/form/control.d.ts +8 -0
  56. package/src/lib/form/control.js +38 -0
  57. package/src/lib/form/control.js.map +1 -0
  58. package/src/lib/form/generate-form-template.d.ts +2 -2
  59. package/src/lib/form/group/base-form-group.d.ts +17 -0
  60. package/src/lib/form/group/base-form-group.js +20 -0
  61. package/src/lib/form/group/base-form-group.js.map +1 -0
  62. package/src/lib/form/group/form-group-kind.d.ts +3 -0
  63. package/src/lib/form/group/form-group-kind.js +8 -0
  64. package/src/lib/form/group/form-group-kind.js.map +1 -0
  65. package/src/lib/form/group/form-group.d.ts +12 -0
  66. package/src/lib/form/group/form-group.js +18 -0
  67. package/src/lib/form/group/form-group.js.map +1 -0
  68. package/src/lib/table-column.d.ts +4 -3
  69. package/src/lib/table-column.js +5 -4
  70. package/src/lib/table-column.js.map +1 -1
  71. package/src/schema.json +1691 -1311
  72. package/src/schematic-input.schema.json +109 -156
  73. package/src/schematics/abstract-control.schema.json +78 -0
  74. package/src/schematics/accordion/accordion-component/schema.json +127 -127
  75. package/src/schematics/accordion/accordion-item-component/schema.json +18 -18
  76. package/src/schematics/accordion/item/accordion-item-data-grid-component/schema.json +685 -81
  77. package/src/schematics/accordion/item/accordion-item-switch-component/schema.json +76 -76
  78. package/src/schematics/accordion/item/accordion-item-table-component/schema.json +555 -97
  79. package/src/schematics/accordion/item/accordion-item-tree-table-component/schema.json +537 -79
  80. package/src/schematics/autocomplete-table-select-form-control.schema.json +96 -0
  81. package/src/schematics/base-form-array.schema.json +45 -0
  82. package/src/schematics/base-form-control.schema.json +27 -0
  83. package/src/schematics/base-form-group.schema.json +42 -0
  84. package/src/schematics/checkbox-form-control.schema.json +30 -0
  85. package/src/schematics/control.schema.json +26 -0
  86. package/src/schematics/data-grid-component/index.js +4 -0
  87. package/src/schematics/data-grid-component/index.js.map +1 -1
  88. package/src/schematics/data-grid-component/schema.json +685 -81
  89. package/src/schematics/data-grid-item.schema.json +3 -3
  90. package/src/schematics/form/control/autocomplete-table-select-form-control/index.d.ts +10 -0
  91. package/src/schematics/form/control/autocomplete-table-select-form-control/index.js +247 -0
  92. package/src/schematics/form/control/autocomplete-table-select-form-control/index.js.map +1 -0
  93. package/src/schematics/form/control/autocomplete-table-select-form-control/schema.d.ts +4 -0
  94. package/src/schematics/form/control/autocomplete-table-select-form-control/schema.json +453 -0
  95. package/src/schematics/form/control/autocomplete-table-select-form-control/template.schema.json +39 -0
  96. package/src/schematics/form/control/input-form-control/index.d.ts +1 -1
  97. package/src/schematics/form/control/input-form-control/index.js +4 -4
  98. package/src/schematics/form/control/input-form-control/index.js.map +1 -1
  99. package/src/schematics/form/control/input-form-control/schema.d.ts +2 -2
  100. package/src/schematics/form/control/input-form-control/schema.json +256 -86
  101. package/src/schematics/form/control/input-form-control/template.schema.json +16 -3
  102. package/src/schematics/form/control/select-form-control/index.d.ts +2 -2
  103. package/src/schematics/form/control/select-form-control/index.js +21 -14
  104. package/src/schematics/form/control/select-form-control/index.js.map +1 -1
  105. package/src/schematics/form/control/select-form-control/schema.d.ts +2 -3
  106. package/src/schematics/form/control/select-form-control/schema.json +249 -90
  107. package/src/schematics/form/control/select-form-control/template.schema.json +16 -3
  108. package/src/schematics/form/control/table-select-form-control/index.d.ts +3 -9
  109. package/src/schematics/form/control/table-select-form-control/index.js +24 -18
  110. package/src/schematics/form/control/table-select-form-control/index.js.map +1 -1
  111. package/src/schematics/form/control/table-select-form-control/schema.d.ts +2 -3
  112. package/src/schematics/form/control/table-select-form-control/schema.json +325 -123
  113. package/src/schematics/form/control/table-select-form-control/template.schema.json +16 -60
  114. package/src/schematics/form/form-array/index.d.ts +9 -0
  115. package/src/schematics/form/form-array/index.js +54 -0
  116. package/src/schematics/form/form-array/index.js.map +1 -0
  117. package/src/schematics/form/form-array/schema.d.ts +4 -0
  118. package/src/schematics/form/form-array/schema.json +906 -0
  119. package/src/schematics/form/form-array/template.schema.json +33 -0
  120. package/src/schematics/form/form-component/files/component/__componentName__.component.html.hbs +4 -1
  121. package/src/schematics/form/form-component/index.d.ts +2 -4
  122. package/src/schematics/form/form-component/index.js +8 -24
  123. package/src/schematics/form/form-component/index.js.map +1 -1
  124. package/src/schematics/form/form-component/schema.d.ts +2 -2
  125. package/src/schematics/form/form-component/schema.json +749 -86
  126. package/src/schematics/form/form-control/index.d.ts +3 -5
  127. package/src/schematics/form/form-control/index.js +8 -20
  128. package/src/schematics/form/form-control/index.js.map +1 -1
  129. package/src/schematics/form/form-control/schema.d.ts +2 -4
  130. package/src/schematics/form/form-control/schema.json +599 -59
  131. package/src/schematics/form/form-control/template.schema.json +1 -2
  132. package/src/schematics/form/form-definition/index.d.ts +2 -2
  133. package/src/schematics/form/form-definition/index.js +28 -15
  134. package/src/schematics/form/form-definition/index.js.map +1 -1
  135. package/src/schematics/form/form-definition/schema.d.ts +2 -2
  136. package/src/schematics/form/form-definition/schema.json +743 -56
  137. package/src/schematics/form/form-group/index.d.ts +9 -0
  138. package/src/schematics/form/form-group/index.js +54 -0
  139. package/src/schematics/form/form-group/index.js.map +1 -0
  140. package/src/schematics/form/form-group/schema.d.ts +4 -0
  141. package/src/schematics/form/form-group/schema.json +906 -0
  142. package/src/schematics/form/form-group/template.schema.json +33 -0
  143. package/src/schematics/form/templates/checkbox-form-control.hbs +1 -1
  144. package/src/schematics/form/templates/default-form-array.hbs +27 -0
  145. package/src/schematics/form/templates/default-form-group.hbs +13 -0
  146. package/src/schematics/form/templates/input-form-control.hbs +7 -7
  147. package/src/schematics/form/templates/select-form-control.hbs +5 -0
  148. package/src/schematics/form/templates/table-select-form-control.hbs +16 -16
  149. package/src/schematics/form-array.schema.json +40 -0
  150. package/src/schematics/form-control.schema.json +69 -54
  151. package/src/schematics/form-definition.schema.json +3 -3
  152. package/src/schematics/form-group.schema.json +40 -0
  153. package/src/schematics/input-form-control.schema.json +10 -6
  154. package/src/schematics/select-form-control.schema.json +8 -4
  155. package/src/schematics/slide-toggle-form-control.schema.json +30 -0
  156. package/src/schematics/table/action/dialog-table-action/schema.json +20 -20
  157. package/src/schematics/table/action/form-table-action/index.d.ts +2 -2
  158. package/src/schematics/table/action/form-table-action/index.js +3 -4
  159. package/src/schematics/table/action/form-table-action/index.js.map +1 -1
  160. package/src/schematics/table/action/form-table-action/schema.d.ts +2 -2
  161. package/src/schematics/table/action/form-table-action/schema.json +750 -87
  162. package/src/schematics/table/action/navigation-table-action/schema.json +20 -20
  163. package/src/schematics/table/action/open-api-table-action/schema.json +20 -20
  164. package/src/schematics/table/action/operation-table-action/schema.json +20 -20
  165. package/src/schematics/table/header-button/form-table-header-button/index.d.ts +2 -2
  166. package/src/schematics/table/header-button/form-table-header-button/index.js +2 -2
  167. package/src/schematics/table/header-button/form-table-header-button/index.js.map +1 -1
  168. package/src/schematics/table/header-button/form-table-header-button/schema.d.ts +2 -2
  169. package/src/schematics/table/header-button/form-table-header-button/schema.json +818 -81
  170. package/src/schematics/table/header-button/form-table-header-button/template.schema.json +4 -22
  171. package/src/schematics/table/header-button/navigation-table-header-button/schema.json +20 -20
  172. package/src/schematics/table/table-action/schema.json +47 -47
  173. package/src/schematics/table/table-component/index.d.ts +2 -2
  174. package/src/schematics/table/table-component/schema.json +537 -79
  175. package/src/schematics/table/table-header-button/schema.json +40 -40
  176. package/src/schematics/table/tree-table-component/files/component/__componentName__.component.html.hbs +1 -1
  177. package/src/schematics/table/tree-table-component/schema.json +521 -63
  178. package/src/schematics/table-select-form-control.schema.json +96 -0
  179. package/src/schematics/textarea-form-control.schema.json +32 -0
  180. package/src/template.schema.json +45 -0
  181. package/src/lib/form-component-control.d.ts +0 -8
  182. package/src/lib/form-component-control.js +0 -15
  183. package/src/lib/form-component-control.js.map +0 -1
  184. package/src/lib/form-control.d.ts +0 -136
  185. package/src/lib/form-control.js +0 -265
  186. package/src/lib/form-control.js.map +0 -1
  187. package/src/lib/form-definition-control.d.ts +0 -5
  188. package/src/lib/form-definition-control.js +0 -30
  189. package/src/lib/form-definition-control.js.map +0 -1
@@ -20,6 +20,78 @@
20
20
  }
21
21
  ],
22
22
  "definitions": {
23
+ "abstractControl": {
24
+ "allOf": [
25
+ {
26
+ "$ref": "#/definitions/property"
27
+ },
28
+ {
29
+ "type": "object",
30
+ "properties": {
31
+ "name": {
32
+ "type": "string",
33
+ "description": "The name of the control"
34
+ },
35
+ "isArray": {
36
+ "type": "boolean",
37
+ "description": "Whether the control value is an array",
38
+ "default": false
39
+ },
40
+ "state": {
41
+ "type": "string",
42
+ "description": "The initial state of the control"
43
+ },
44
+ "isRequired": {
45
+ "type": "boolean",
46
+ "description": "Whether the control value is required",
47
+ "default": false
48
+ },
49
+ "isReadonly": {
50
+ "type": "boolean",
51
+ "description": "Whether the control value is readonly",
52
+ "default": false
53
+ },
54
+ "isDisabled": {
55
+ "type": "boolean",
56
+ "description": "Whether the control value is disabled",
57
+ "default": false
58
+ },
59
+ "validatorList": {
60
+ "type": "array",
61
+ "items": {
62
+ "type": "string"
63
+ }
64
+ },
65
+ "kind": {
66
+ "type": "string",
67
+ "description": "The kind of the control",
68
+ "default": "default"
69
+ },
70
+ "importList": {
71
+ "type": "array",
72
+ "items": {
73
+ "$ref": "#/definitions/type"
74
+ }
75
+ },
76
+ "template": {
77
+ "type": "string",
78
+ "description": "The template of the control"
79
+ },
80
+ "role": {
81
+ "type": "string",
82
+ "description": "The role of the control",
83
+ "enum": [
84
+ "control",
85
+ "group",
86
+ "array"
87
+ ],
88
+ "default": "control"
89
+ }
90
+ },
91
+ "additionalProperties": true
92
+ }
93
+ ]
94
+ },
23
95
  "angular": {
24
96
  "allOf": [
25
97
  {
@@ -71,19 +143,84 @@
71
143
  }
72
144
  ]
73
145
  },
74
- "formDefinition": {
75
- "type": "object",
76
- "properties": {
77
- "controlList": {
78
- "alias": "control",
79
- "type": "array",
80
- "items": {
81
- "$ref": "#/definitions/formControl"
146
+ "autocompleteTableSelectFormControl": {
147
+ "allOf": [
148
+ {
149
+ "$ref": "#/definitions/baseFormControl"
150
+ },
151
+ {
152
+ "type": "object",
153
+ "properties": {
154
+ "formField": {
155
+ "$ref": "#/definitions/formField"
156
+ },
157
+ "kind": {
158
+ "type": "string",
159
+ "const": "table-select"
160
+ },
161
+ "placeholder": {
162
+ "type": "string"
163
+ },
164
+ "columnList": {
165
+ "alias": "column",
166
+ "type": "array",
167
+ "items": {
168
+ "description": "table column name",
169
+ "type": "object",
170
+ "properties": {
171
+ "name": {
172
+ "type": "string",
173
+ "description": "table column name"
174
+ },
175
+ "title": {
176
+ "type": "string",
177
+ "description": "table column label"
178
+ },
179
+ "hasFilter": {
180
+ "type": "boolean",
181
+ "description": "Whether the column has a filter"
182
+ },
183
+ "kind": {
184
+ "type": "string",
185
+ "description": "The kind of data in the column"
186
+ }
187
+ }
188
+ },
189
+ "description": "List of table column names"
190
+ },
191
+ "title": {
192
+ "type": "string",
193
+ "description": "The title of the table select window"
194
+ },
195
+ "toDisplay": {
196
+ "type": "object",
197
+ "properties": {
198
+ "property": {
199
+ "$ref": "#/definitions/property"
200
+ }
201
+ }
202
+ },
203
+ "toValue": {
204
+ "type": "object",
205
+ "properties": {
206
+ "property": {
207
+ "$ref": "#/definitions/property"
208
+ }
209
+ }
210
+ },
211
+ "upstream": {
212
+ "$ref": "#/definitions/upstream"
213
+ },
214
+ "resolver": {
215
+ "type": "object",
216
+ "properties": {
217
+ "upstream": {
218
+ "$ref": "#/definitions/upstream"
219
+ }
220
+ }
221
+ }
82
222
  }
83
223
  }
84
- },
85
- "required": [
86
- "controlList"
87
224
  ]
88
225
  },
89
226
  "backend": {
@@ -97,66 +234,304 @@
97
234
  ],
98
235
  "default": "none"
99
236
  },
100
- "formControl": {
237
+ "baseFormArray": {
238
+ "allOf": [
239
+ {
240
+ "$ref": "#/definitions/abstractControl"
241
+ },
242
+ {
243
+ "type": "object",
244
+ "properties": {
245
+ "controlList": {
246
+ "type": "array",
247
+ "description": "The list of controls in the group",
248
+ "items": {
249
+ "$ref": "#/definitions/control"
250
+ }
251
+ },
252
+ "legend": {
253
+ "type": "string"
254
+ },
255
+ "groupLegend": {
256
+ "type": "string"
257
+ },
258
+ "kind": {
259
+ "type": "string",
260
+ "description": "The kind of the array",
261
+ "const": "default",
262
+ "default": "default"
263
+ },
264
+ "role": {
265
+ "type": "string",
266
+ "const": "array"
267
+ }
268
+ }
269
+ }
270
+ ]
271
+ },
272
+ "baseFormControl": {
273
+ "allOf": [
274
+ {
275
+ "$ref": "#/definitions/abstractControl"
276
+ },
277
+ {
278
+ "type": "object",
279
+ "properties": {
280
+ "label": {
281
+ "type": "string",
282
+ "description": "The label of the control"
283
+ },
284
+ "role": {
285
+ "type": "string",
286
+ "const": "control"
287
+ }
288
+ }
289
+ }
290
+ ]
291
+ },
292
+ "baseFormGroup": {
293
+ "allOf": [
294
+ {
295
+ "$ref": "#/definitions/abstractControl"
296
+ },
297
+ {
298
+ "type": "object",
299
+ "properties": {
300
+ "controlList": {
301
+ "type": "array",
302
+ "description": "The list of controls in the group",
303
+ "items": {
304
+ "$ref": "#/definitions/control"
305
+ }
306
+ },
307
+ "legend": {
308
+ "type": "string"
309
+ },
310
+ "kind": {
311
+ "type": "string",
312
+ "description": "The kind of the group",
313
+ "const": "default",
314
+ "default": "default"
315
+ },
316
+ "role": {
317
+ "type": "string",
318
+ "const": "group"
319
+ }
320
+ }
321
+ }
322
+ ]
323
+ },
324
+ "button": {
101
325
  "type": "object",
102
326
  "properties": {
103
- "name": {
104
- "type": "string",
105
- "description": "The name of the control"
327
+ "svgIcon": {
328
+ "type": "string"
106
329
  },
107
- "type": {
108
- "$ref": "#/definitions/type"
330
+ "icon": {
331
+ "type": "string"
109
332
  },
110
- "isArray": {
111
- "type": "boolean",
112
- "description": "Whether the control value is an array",
113
- "default": false
333
+ "directiveList": {
334
+ "type": "array",
335
+ "items": {
336
+ "$ref": "#/definitions/type"
337
+ }
114
338
  },
115
- "state": {
116
- "type": "string",
117
- "description": "The initial state of the control"
339
+ "importList": {
340
+ "type": "array",
341
+ "items": {
342
+ "$ref": "#/definitions/type"
343
+ }
344
+ }
345
+ }
346
+ },
347
+ "checkboxFormControl": {
348
+ "allOf": [
349
+ {
350
+ "$ref": "#/definitions/baseFormControl"
118
351
  },
119
- "isRequired": {
120
- "type": "boolean",
121
- "description": "Whether the control value is required",
122
- "default": false
352
+ {
353
+ "type": "object",
354
+ "properties": {
355
+ "kind": {
356
+ "type": "string",
357
+ "const": "checkbox"
358
+ },
359
+ "labelPosition": {
360
+ "type": "string",
361
+ "enum": [
362
+ "before",
363
+ "after"
364
+ ]
365
+ }
366
+ }
367
+ }
368
+ ]
369
+ },
370
+ "control": {
371
+ "oneOf": [
372
+ {
373
+ "$ref": "#/definitions/formGroup"
123
374
  },
124
- "isReadonly": {
125
- "type": "boolean",
126
- "description": "Whether the control value is readonly",
127
- "default": false
375
+ {
376
+ "$ref": "#/definitions/formArray"
128
377
  },
129
- "isDisabled": {
130
- "type": "boolean",
131
- "description": "Whether the control value is disabled",
132
- "default": false
378
+ {
379
+ "$ref": "#/definitions/formControl"
380
+ }
381
+ ]
382
+ },
383
+ "formArray": {
384
+ "allOf": [
385
+ {
386
+ "type": "object",
387
+ "properties": {
388
+ "role": {
389
+ "type": "string",
390
+ "const": "array"
391
+ }
392
+ }
133
393
  },
134
- "validatorList": {
394
+ {
395
+ "oneOf": [
396
+ {
397
+ "allOf": [
398
+ {
399
+ "$ref": "#/definitions/baseFormArray"
400
+ },
401
+ {
402
+ "type": "object",
403
+ "properties": {
404
+ "kind": {
405
+ "type": "string",
406
+ "const": "default"
407
+ }
408
+ }
409
+ }
410
+ ]
411
+ }
412
+ ]
413
+ }
414
+ ]
415
+ },
416
+ "formControl": {
417
+ "allOf": [
418
+ {
419
+ "type": "object",
420
+ "properties": {
421
+ "role": {
422
+ "type": "string",
423
+ "const": "control",
424
+ "default": "control"
425
+ }
426
+ }
427
+ },
428
+ {
429
+ "oneOf": [
430
+ {
431
+ "allOf": [
432
+ {
433
+ "$ref": "#/definitions/baseFormControl"
434
+ },
435
+ {
436
+ "type": "object",
437
+ "properties": {
438
+ "kind": {
439
+ "type": "string",
440
+ "const": "default"
441
+ }
442
+ }
443
+ }
444
+ ]
445
+ },
446
+ {
447
+ "$ref": "#/definitions/inputFormControl"
448
+ },
449
+ {
450
+ "$ref": "#/definitions/selectFormControl"
451
+ },
452
+ {
453
+ "$ref": "#/definitions/checkboxFormControl"
454
+ },
455
+ {
456
+ "$ref": "#/definitions/textareaFormControl"
457
+ },
458
+ {
459
+ "$ref": "#/definitions/tableSelectFormControl"
460
+ },
461
+ {
462
+ "$ref": "#/definitions/slideToggleFormControl"
463
+ },
464
+ {
465
+ "$ref": "#/definitions/autocompleteTableSelectFormControl"
466
+ }
467
+ ]
468
+ }
469
+ ]
470
+ },
471
+ "formDefinition": {
472
+ "type": "object",
473
+ "properties": {
474
+ "controlList": {
475
+ "alias": "control",
135
476
  "type": "array",
136
477
  "items": {
137
- "type": "string"
478
+ "$ref": "#/definitions/control"
138
479
  }
139
- },
140
- "kind": {
141
- "type": "string",
142
- "description": "The name of the template",
143
- "enum": [
144
- "default",
145
- "input",
146
- "select",
147
- "checkbox",
148
- "autocomplete-table-select",
149
- "table-select",
150
- "textarea",
151
- "slide-toggle"
152
- ],
153
- "default": "default"
154
480
  }
155
481
  },
156
482
  "required": [
157
- "name"
158
- ],
159
- "additionalProperties": true
483
+ "controlList"
484
+ ]
485
+ },
486
+ "formField": {
487
+ "type": "object",
488
+ "properties": {
489
+ "label": {
490
+ "type": "string"
491
+ },
492
+ "prefixButton": {
493
+ "$ref": "#/definitions/button"
494
+ },
495
+ "suffixButton": {
496
+ "$ref": "#/definitions/button"
497
+ },
498
+ "hasClearButton": {
499
+ "type": "boolean"
500
+ }
501
+ }
502
+ },
503
+ "formGroup": {
504
+ "allOf": [
505
+ {
506
+ "type": "object",
507
+ "properties": {
508
+ "role": {
509
+ "type": "string",
510
+ "const": "group"
511
+ }
512
+ }
513
+ },
514
+ {
515
+ "oneOf": [
516
+ {
517
+ "allOf": [
518
+ {
519
+ "$ref": "#/definitions/baseFormGroup"
520
+ },
521
+ {
522
+ "type": "object",
523
+ "properties": {
524
+ "kind": {
525
+ "type": "string",
526
+ "const": "default"
527
+ }
528
+ }
529
+ }
530
+ ]
531
+ }
532
+ ]
533
+ }
534
+ ]
160
535
  },
161
536
  "general": {
162
537
  "type": "object",
@@ -194,6 +569,259 @@
194
569
  }
195
570
  }
196
571
  },
572
+ "inputFormControl": {
573
+ "allOf": [
574
+ {
575
+ "$ref": "#/definitions/baseFormControl"
576
+ },
577
+ {
578
+ "type": "object",
579
+ "properties": {
580
+ "kind": {
581
+ "type": "string",
582
+ "const": "input"
583
+ },
584
+ "formField": {
585
+ "$ref": "#/definitions/formField"
586
+ },
587
+ "inputType": {
588
+ "type": "string",
589
+ "enum": [
590
+ "text",
591
+ "password",
592
+ "email",
593
+ "number",
594
+ "tel",
595
+ "url",
596
+ "checkbox",
597
+ "color",
598
+ "date",
599
+ "time",
600
+ "datetime-local",
601
+ "file",
602
+ "hidden",
603
+ "image",
604
+ "month",
605
+ "radio",
606
+ "reset",
607
+ "button",
608
+ "search",
609
+ "submit",
610
+ "week",
611
+ "range"
612
+ ]
613
+ },
614
+ "placeholder": {
615
+ "type": "string"
616
+ }
617
+ }
618
+ }
619
+ ]
620
+ },
621
+ "property": {
622
+ "oneOf": [
623
+ {
624
+ "type": "string"
625
+ },
626
+ {
627
+ "type": "object",
628
+ "properties": {
629
+ "name": {
630
+ "type": "string"
631
+ },
632
+ "type": {
633
+ "$ref": "#/definitions/type"
634
+ },
635
+ "isArray": {
636
+ "type": "boolean"
637
+ }
638
+ },
639
+ "required": [
640
+ "name"
641
+ ]
642
+ }
643
+ ]
644
+ },
645
+ "selectFormControl": {
646
+ "allOf": [
647
+ {
648
+ "$ref": "#/definitions/baseFormControl"
649
+ },
650
+ {
651
+ "type": "object",
652
+ "properties": {
653
+ "formField": {
654
+ "$ref": "#/definitions/formField"
655
+ },
656
+ "kind": {
657
+ "type": "string",
658
+ "const": "select"
659
+ },
660
+ "optionList": {
661
+ "type": "array",
662
+ "items": {
663
+ "type": "object",
664
+ "properties": {
665
+ "display": {
666
+ "type": "string"
667
+ },
668
+ "value": {
669
+ "oneOf": [
670
+ {
671
+ "type": "string"
672
+ },
673
+ {
674
+ "type": "number"
675
+ },
676
+ {
677
+ "type": "boolean"
678
+ },
679
+ {
680
+ "type": "object",
681
+ "additionalProperties": true
682
+ }
683
+ ]
684
+ }
685
+ }
686
+ }
687
+ },
688
+ "backend": {
689
+ "$ref": "#/definitions/backend"
690
+ },
691
+ "multiple": {
692
+ "alias": "multi",
693
+ "type": "boolean",
694
+ "description": "Whether the select form control is multiple mode"
695
+ }
696
+ }
697
+ }
698
+ ]
699
+ },
700
+ "slideToggleFormControl": {
701
+ "allOf": [
702
+ {
703
+ "$ref": "#/definitions/baseFormControl"
704
+ },
705
+ {
706
+ "type": "object",
707
+ "properties": {
708
+ "kind": {
709
+ "type": "string",
710
+ "const": "slide-toggle"
711
+ },
712
+ "labelPosition": {
713
+ "type": "string",
714
+ "enum": [
715
+ "before",
716
+ "after"
717
+ ]
718
+ }
719
+ }
720
+ }
721
+ ]
722
+ },
723
+ "tableSelectFormControl": {
724
+ "allOf": [
725
+ {
726
+ "$ref": "#/definitions/baseFormControl"
727
+ },
728
+ {
729
+ "type": "object",
730
+ "properties": {
731
+ "formField": {
732
+ "$ref": "#/definitions/formField"
733
+ },
734
+ "kind": {
735
+ "type": "string",
736
+ "const": "table-select"
737
+ },
738
+ "placeholder": {
739
+ "type": "string"
740
+ },
741
+ "columnList": {
742
+ "alias": "column",
743
+ "type": "array",
744
+ "items": {
745
+ "description": "table column name",
746
+ "type": "object",
747
+ "properties": {
748
+ "name": {
749
+ "type": "string",
750
+ "description": "table column name"
751
+ },
752
+ "title": {
753
+ "type": "string",
754
+ "description": "table column label"
755
+ },
756
+ "hasFilter": {
757
+ "type": "boolean",
758
+ "description": "Whether the column has a filter"
759
+ },
760
+ "kind": {
761
+ "type": "string",
762
+ "description": "The kind of data in the column"
763
+ }
764
+ }
765
+ },
766
+ "description": "List of table column names"
767
+ },
768
+ "title": {
769
+ "type": "string",
770
+ "description": "The title of the table select window"
771
+ },
772
+ "toDisplay": {
773
+ "type": "object",
774
+ "properties": {
775
+ "property": {
776
+ "$ref": "#/definitions/property"
777
+ }
778
+ }
779
+ },
780
+ "toValue": {
781
+ "type": "object",
782
+ "properties": {
783
+ "property": {
784
+ "$ref": "#/definitions/property"
785
+ }
786
+ }
787
+ },
788
+ "upstream": {
789
+ "$ref": "#/definitions/upstream"
790
+ },
791
+ "resolver": {
792
+ "type": "object",
793
+ "properties": {
794
+ "upstream": {
795
+ "$ref": "#/definitions/upstream"
796
+ }
797
+ }
798
+ }
799
+ }
800
+ }
801
+ ]
802
+ },
803
+ "textareaFormControl": {
804
+ "allOf": [
805
+ {
806
+ "$ref": "#/definitions/baseFormControl"
807
+ },
808
+ {
809
+ "type": "object",
810
+ "properties": {
811
+ "formField": {
812
+ "$ref": "#/definitions/formField"
813
+ },
814
+ "kind": {
815
+ "type": "string",
816
+ "const": "textarea"
817
+ },
818
+ "placeholder": {
819
+ "type": "string"
820
+ }
821
+ }
822
+ }
823
+ ]
824
+ },
197
825
  "type": {
198
826
  "oneOf": [
199
827
  {
@@ -226,6 +854,65 @@
226
854
  ]
227
855
  }
228
856
  ]
857
+ },
858
+ "upstream": {
859
+ "oneOf": [
860
+ {
861
+ "type": "object",
862
+ "properties": {
863
+ "kind": {
864
+ "type": "string",
865
+ "enum": [
866
+ "open-api"
867
+ ]
868
+ },
869
+ "operationId": {
870
+ "type": "string"
871
+ },
872
+ "scope": {
873
+ "type": "string"
874
+ },
875
+ "mapper": {
876
+ "type": "object",
877
+ "properties": {
878
+ "pageIndex": {
879
+ "type": "string"
880
+ },
881
+ "pageSize": {
882
+ "type": "string"
883
+ },
884
+ "sortBy": {
885
+ "type": "string"
886
+ },
887
+ "sortDirection": {
888
+ "type": "string"
889
+ },
890
+ "list": {
891
+ "type": "string"
892
+ },
893
+ "total": {
894
+ "type": "string"
895
+ },
896
+ "filter": {
897
+ "type": "object",
898
+ "properties": {
899
+ "eq": {
900
+ "type": "string"
901
+ },
902
+ "join": {
903
+ "type": "string"
904
+ }
905
+ }
906
+ }
907
+ }
908
+ }
909
+ },
910
+ "required": [
911
+ "kind",
912
+ "operationId"
913
+ ]
914
+ }
915
+ ]
229
916
  }
230
917
  }
231
918
  }