@rxap/schematic-angular 16.2.0-dev.0 → 16.2.0-dev.10
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/CHANGELOG.md +111 -0
- package/README.md +1 -1
- package/package.json +15 -12
- package/src/lib/accordion-header.d.ts +32 -0
- package/src/lib/accordion-header.js +54 -0
- package/src/lib/accordion-header.js.map +1 -0
- package/src/lib/accordion-identifier.d.ts +10 -0
- package/src/lib/accordion-identifier.js +15 -0
- package/src/lib/accordion-identifier.js.map +1 -0
- package/src/lib/accordion-item.d.ts +80 -6
- package/src/lib/accordion-item.js +164 -21
- package/src/lib/accordion-item.js.map +1 -1
- package/src/lib/accordion-itme-kinds.d.ts +8 -0
- package/src/lib/accordion-itme-kinds.js +16 -0
- package/src/lib/accordion-itme-kinds.js.map +1 -0
- package/src/lib/adapter-options.d.ts +1 -1
- package/src/lib/adapter-options.js +2 -2
- package/src/lib/adapter-options.js.map +1 -1
- package/src/lib/coerce-accordion-component.d.ts +6 -0
- package/src/lib/coerce-accordion-component.js +67 -0
- package/src/lib/coerce-accordion-component.js.map +1 -0
- package/src/lib/coerce-accordion-item-table-component.d.ts +7 -0
- package/src/lib/coerce-accordion-item-table-component.js +41 -0
- package/src/lib/coerce-accordion-item-table-component.js.map +1 -0
- package/src/lib/coerce-form-component.d.ts +6 -0
- package/src/lib/coerce-form-component.js +71 -0
- package/src/lib/coerce-form-component.js.map +1 -0
- package/src/lib/coerce-minimum-table-component.d.ts +6 -0
- package/src/lib/coerce-minimum-table-component.js +101 -0
- package/src/lib/coerce-minimum-table-component.js.map +1 -0
- package/src/lib/coerce-tree-table-component.d.ts +6 -0
- package/src/lib/coerce-tree-table-component.js +28 -0
- package/src/lib/coerce-tree-table-component.js.map +1 -0
- package/src/lib/data-grid-item.d.ts +9 -6
- package/src/lib/data-grid-item.js +4 -18
- package/src/lib/data-grid-item.js.map +1 -1
- package/src/lib/data-grid-options.d.ts +3 -1
- package/src/lib/data-grid-options.js +7 -3
- package/src/lib/data-grid-options.js.map +1 -1
- package/src/lib/existing-method.d.ts +1 -1
- package/src/lib/existing-method.js +2 -2
- package/src/lib/existing-method.js.map +1 -1
- package/src/lib/form/generate-form-template.d.ts +5 -0
- package/src/lib/form/generate-form-template.js +12 -0
- package/src/lib/form/generate-form-template.js.map +1 -0
- package/src/lib/form-component-control.d.ts +5 -10
- package/src/lib/form-component-control.js +3 -34
- package/src/lib/form-component-control.js.map +1 -1
- package/src/lib/form-control.d.ts +125 -0
- package/src/lib/form-control.js +304 -0
- package/src/lib/form-control.js.map +1 -0
- package/src/lib/form-definition-control.d.ts +5 -15
- package/src/lib/form-definition-control.js +18 -49
- package/src/lib/form-definition-control.js.map +1 -1
- package/src/lib/load-handlebars-template.d.ts +3 -0
- package/src/lib/load-handlebars-template.js +24 -0
- package/src/lib/load-handlebars-template.js.map +1 -0
- package/src/lib/mat-form-field-default-options.d.ts +7 -0
- package/src/lib/mat-form-field-default-options.js +10 -0
- package/src/lib/mat-form-field-default-options.js.map +1 -0
- package/src/lib/merge-with-column-list.d.ts +3 -0
- package/src/lib/merge-with-column-list.js +18 -0
- package/src/lib/merge-with-column-list.js.map +1 -0
- package/src/lib/minimum-table-component-options.d.ts +14 -4
- package/src/lib/minimum-table-component-options.js +18 -20
- package/src/lib/minimum-table-component-options.js.map +1 -1
- package/src/lib/minimum-table-options.d.ts +11 -6
- package/src/lib/minimum-table-options.js +17 -5
- package/src/lib/minimum-table-options.js.map +1 -1
- package/src/lib/persistent.d.ts +30 -0
- package/src/lib/persistent.js +39 -0
- package/src/lib/persistent.js.map +1 -0
- package/src/lib/table/table-filter-column-rule.d.ts +13 -0
- package/src/lib/table/table-filter-column-rule.js +88 -0
- package/src/lib/table/table-filter-column-rule.js.map +1 -0
- package/src/lib/table-action.d.ts +3 -1
- package/src/lib/table-action.js.map +1 -1
- package/src/lib/table-column.d.ts +38 -6
- package/src/lib/table-column.js +220 -67
- package/src/lib/table-column.js.map +1 -1
- package/src/lib/table-options.d.ts +10 -3
- package/src/lib/table-options.js +13 -2
- package/src/lib/table-options.js.map +1 -1
- package/src/lib/tree-table-options.d.ts +9 -3
- package/src/lib/tree-table-options.js +12 -2
- package/src/lib/tree-table-options.js.map +1 -1
- package/src/lib/use-pick-from-table-interface-as-form-type.d.ts +10 -0
- package/src/lib/use-pick-from-table-interface-as-form-type.js +32 -0
- package/src/lib/use-pick-from-table-interface-as-form-type.js.map +1 -0
- package/src/schematics/accordion/accordion-component/files/component/__componentName__.component.html.hbs +25 -0
- package/src/schematics/accordion/accordion-component/index.d.ts +10 -3
- package/src/schematics/accordion/accordion-component/index.js +106 -127
- package/src/schematics/accordion/accordion-component/index.js.map +1 -1
- package/src/schematics/accordion/accordion-component/schema.d.ts +8 -2
- package/src/schematics/accordion/accordion-component/schema.json +354 -84
- package/src/schematics/accordion/accordion-component/template.schema.json +102 -0
- package/src/schematics/accordion/accordion-item-component/index.d.ts +4 -3
- package/src/schematics/accordion/accordion-item-component/index.js +91 -108
- package/src/schematics/accordion/accordion-item-component/index.js.map +1 -1
- package/src/schematics/accordion/accordion-item-component/schema.d.ts +3 -5
- package/src/schematics/accordion/accordion-item-component/schema.json +281 -72
- package/src/schematics/accordion/accordion-item-component/template.schema.json +33 -0
- package/src/schematics/accordion/item/accordion-item-data-grid-component/index.d.ts +2 -3
- package/src/schematics/accordion/item/accordion-item-data-grid-component/index.js +44 -52
- package/src/schematics/accordion/item/accordion-item-data-grid-component/index.js.map +1 -1
- package/src/schematics/accordion/item/accordion-item-data-grid-component/schema.d.ts +2 -5
- package/src/schematics/accordion/item/accordion-item-data-grid-component/schema.json +366 -103
- package/src/schematics/accordion/item/accordion-item-data-grid-component/template.schema.json +31 -0
- package/src/schematics/accordion/item/accordion-item-switch-component/index.d.ts +2 -15
- package/src/schematics/accordion/item/accordion-item-switch-component/index.js +4 -27
- package/src/schematics/accordion/item/accordion-item-switch-component/index.js.map +1 -1
- package/src/schematics/accordion/item/accordion-item-switch-component/schema.d.ts +2 -17
- package/src/schematics/accordion/item/accordion-item-switch-component/schema.json +317 -179
- package/src/schematics/accordion/item/accordion-item-switch-component/template.schema.json +84 -0
- package/src/schematics/accordion/item/accordion-item-table-component/index.d.ts +2 -3
- package/src/schematics/accordion/item/accordion-item-table-component/index.js +13 -10
- package/src/schematics/accordion/item/accordion-item-table-component/index.js.map +1 -1
- package/src/schematics/accordion/item/accordion-item-table-component/schema.d.ts +2 -5
- package/src/schematics/accordion/item/accordion-item-table-component/schema.json +598 -242
- package/src/schematics/accordion/item/accordion-item-table-component/template.schema.json +46 -0
- package/src/schematics/accordion/item/accordion-item-tree-table-component/index.d.ts +2 -3
- package/src/schematics/accordion/item/accordion-item-tree-table-component/index.js +17 -12
- package/src/schematics/accordion/item/accordion-item-tree-table-component/index.js.map +1 -1
- package/src/schematics/accordion/item/accordion-item-tree-table-component/schema.d.ts +2 -5
- package/src/schematics/accordion/item/accordion-item-tree-table-component/schema.json +573 -247
- package/src/schematics/accordion/item/accordion-item-tree-table-component/template.schema.json +46 -0
- package/src/schematics/accordion/templates/accordion-header.hbs +6 -0
- package/src/schematics/accordion/templates/data-grid-accordion-item.hbs +15 -0
- package/src/schematics/accordion/templates/default-accordion-item.hbs +15 -0
- package/src/schematics/accordion/templates/switch-accordion-item.hbs +21 -0
- package/src/schematics/accordion/templates/table-accordion-item.hbs +15 -0
- package/src/schematics/accordion/templates/tree-table-accordion-item.hbs +15 -0
- package/src/schematics/accordion-item.schema.json +35 -0
- package/src/schematics/angular.schema.json +2 -10
- package/src/schematics/backend.schema.json +13 -0
- package/src/schematics/button.schema.json +30 -0
- package/src/schematics/data-grid-component/files/component/__componentName__.component.html.hbs +34 -0
- package/src/schematics/data-grid-component/index.d.ts +0 -1
- package/src/schematics/data-grid-component/index.js +83 -47
- package/src/schematics/data-grid-component/index.js.map +1 -1
- package/src/schematics/data-grid-component/schema.json +336 -101
- package/src/schematics/data-grid-component/template.schema.json +23 -0
- package/src/schematics/data-grid-item.schema.json +23 -0
- package/src/schematics/data-grid.schema.json +44 -0
- package/src/schematics/dialog-component/schema.json +225 -66
- package/src/schematics/dialog-component/template.schema.json +65 -0
- package/src/schematics/form/control/input-form-control/index.d.ts +2 -2
- package/src/schematics/form/control/input-form-control/index.js +4 -22
- package/src/schematics/form/control/input-form-control/index.js.map +1 -1
- package/src/schematics/form/control/input-form-control/schema.d.ts +2 -3
- package/src/schematics/form/control/input-form-control/schema.json +380 -108
- package/src/schematics/form/control/input-form-control/template.schema.json +23 -0
- package/src/schematics/form/control/select-form-control/index.d.ts +4 -2
- package/src/schematics/form/control/select-form-control/index.js +132 -96
- package/src/schematics/form/control/select-form-control/index.js.map +1 -1
- package/src/schematics/form/control/select-form-control/schema.d.ts +2 -3
- package/src/schematics/form/control/select-form-control/schema.json +386 -94
- package/src/schematics/form/control/select-form-control/template.schema.json +23 -0
- package/src/schematics/form/control/table-select-form-control/index.d.ts +4 -6
- package/src/schematics/form/control/table-select-form-control/index.js +80 -69
- package/src/schematics/form/control/table-select-form-control/index.js.map +1 -1
- package/src/schematics/form/control/table-select-form-control/schema.d.ts +2 -4
- package/src/schematics/form/control/table-select-form-control/schema.json +434 -97
- package/src/schematics/form/control/table-select-form-control/template.schema.json +78 -0
- package/src/schematics/form/form-component/files/component/{__componentName__.component.html.template → __componentName__.component.html.hbs} +3 -3
- package/src/schematics/form/form-component/index.d.ts +4 -2
- package/src/schematics/form/form-component/index.js +14 -5
- package/src/schematics/form/form-component/index.js.map +1 -1
- package/src/schematics/form/form-component/schema.d.ts +3 -1
- package/src/schematics/form/form-component/schema.json +342 -95
- package/src/schematics/form/form-component/template.schema.json +23 -0
- package/src/schematics/form/form-control/index.d.ts +3 -1
- package/src/schematics/form/form-control/index.js +19 -8
- package/src/schematics/form/form-control/index.js.map +1 -1
- package/src/schematics/form/form-control/schema.json +316 -83
- package/src/schematics/form/form-control/template.schema.json +37 -0
- package/src/schematics/form/form-definition/index.js +14 -1
- package/src/schematics/form/form-definition/index.js.map +1 -1
- package/src/schematics/form/form-definition/schema.d.ts +1 -1
- package/src/schematics/form/form-definition/schema.json +289 -59
- package/src/schematics/form/form-definition/template.schema.json +33 -0
- package/src/schematics/form/templates/checkbox-form-control.hbs +9 -0
- package/src/schematics/form/templates/default-form-control.hbs +2 -0
- package/src/schematics/form/templates/input-form-control.hbs +9 -0
- package/src/schematics/form/templates/mat-form-field.hbs +31 -0
- package/src/schematics/form/templates/slide-toggle-form-control.hbs +8 -0
- package/src/schematics/form/templates/table-select-form-control.hbs +18 -0
- package/src/schematics/form-component.schema.json +39 -0
- package/src/schematics/form-control.schema.json +68 -0
- package/src/schematics/form-definition.schema.json +22 -0
- package/src/schematics/form-field.schema.json +24 -0
- package/src/schematics/header-button.schema.json +42 -0
- package/src/schematics/input-form-control.schema.json +47 -0
- package/src/schematics/minimum-table.schema.json +54 -0
- package/src/schematics/property.schema.json +28 -0
- package/src/schematics/select-form-control.schema.json +53 -0
- package/src/schematics/table/action/dialog-table-action/schema.json +294 -133
- package/src/schematics/table/action/dialog-table-action/template.schema.json +61 -0
- package/src/schematics/table/action/form-table-action/schema.json +392 -172
- package/src/schematics/table/action/form-table-action/template.schema.json +75 -0
- package/src/schematics/table/action/navigation-table-action/schema.json +272 -88
- package/src/schematics/table/action/navigation-table-action/template.schema.json +31 -0
- package/src/schematics/table/action/open-api-table-action/schema.json +288 -102
- package/src/schematics/table/action/open-api-table-action/template.schema.json +59 -0
- package/src/schematics/table/action/operation-table-action/schema.json +259 -92
- package/src/schematics/table/action/operation-table-action/template.schema.json +17 -0
- package/src/schematics/table/header-button/form-table-header-button/schema.json +325 -126
- package/src/schematics/table/header-button/form-table-header-button/template.schema.json +51 -0
- package/src/schematics/table/header-button/navigation-table-header-button/schema.json +254 -81
- package/src/schematics/table/header-button/navigation-table-header-button/template.schema.json +31 -0
- package/src/schematics/table/table-action/schema.json +254 -87
- package/src/schematics/table/table-action/template.schema.json +30 -0
- package/src/schematics/table/table-component/files/component/__componentName__.component.html.hbs +241 -0
- package/src/schematics/table/table-component/index.d.ts +2 -2
- package/src/schematics/table/table-component/index.js +15 -105
- package/src/schematics/table/table-component/index.js.map +1 -1
- package/src/schematics/table/table-component/schema.json +461 -197
- package/src/schematics/table/table-component/template.schema.json +26 -0
- package/src/schematics/table/table-header-button/schema.json +235 -73
- package/src/schematics/table/table-header-button/template.schema.json +30 -0
- package/src/schematics/table/templates/boolean-table-column.hbs +10 -0
- package/src/schematics/table/templates/component-table-column.hbs +12 -0
- package/src/schematics/table/templates/copy-to-clipboard-table-column.hbs +10 -0
- package/src/schematics/table/templates/date-table-column.hbs +11 -0
- package/src/schematics/table/templates/default-table-column.hbs +8 -0
- package/src/schematics/table/templates/icon-table-column.hbs +10 -0
- package/src/schematics/table/templates/link-table-column.hbs +10 -0
- package/src/schematics/table/tree-table-component/files/component/__componentName__.component.html.hbs +249 -0
- package/src/schematics/table/tree-table-component/index.js +16 -7
- package/src/schematics/table/tree-table-component/index.js.map +1 -1
- package/src/schematics/table/tree-table-component/schema.json +524 -260
- package/src/schematics/table/tree-table-component/template.schema.json +26 -0
- package/src/schematics/table-action.schema.json +61 -0
- package/src/schematics/table-column.schema.json +69 -0
- package/src/schematics/table.schema.json +54 -0
- package/src/schematics/tree-component/schema.json +113 -76
- package/src/schematics/tree-component/template.schema.json +31 -0
- package/src/schematics/tree-table.schema.json +40 -0
- package/src/schematics/type.schema.json +35 -0
- package/src/schematics/upstream.schema.json +56 -0
- package/src/lib/accordion-itme-types.d.ts +0 -8
- package/src/lib/accordion-itme-types.js +0 -16
- package/src/lib/accordion-itme-types.js.map +0 -1
- package/src/lib/table-property.d.ts +0 -14
- package/src/lib/table-property.js +0 -46
- package/src/lib/table-property.js.map +0 -1
- package/src/lib/type-import.d.ts +0 -4
- package/src/lib/type-import.js +0 -38
- package/src/lib/type-import.js.map +0 -1
- package/src/schematics/accordion/accordion-component/files/component/__componentName__.component.html.template +0 -79
- package/src/schematics/accordion/accordion-component/files/component/__componentName__.component.ts.template +0 -54
- package/src/schematics/accordion/accordion-component/files/header-component/accordion-header.component.html.template +0 -5
- package/src/schematics/accordion/accordion-component/files/header-component/accordion-header.component.ts.template +0 -14
- package/src/schematics/accordion/accordion-item-component/files/component/__componentName__.component.ts.template +0 -30
- package/src/schematics/accordion/item/accordion-item-data-grid-component/files/data-grid/__componentName__.component.ts.template +0 -14
- package/src/schematics/accordion/item/accordion-item-data-grid-component/files/data-grid-collection/__componentName__.component.ts.template +0 -32
- package/src/schematics/accordion/item/accordion-item-table-component/files/component/__componentName__.component.ts.template +0 -35
- package/src/schematics/accordion/item/accordion-item-tree-table-component/files/component/__componentName__.component.ts.template +0 -34
- package/src/schematics/data-grid-component/files/form/__componentName__.component.html.template +0 -42
- package/src/schematics/data-grid-component/files/form/__componentName__.component.ts.template +0 -43
- package/src/schematics/data-grid-component/files/plain/__componentName__.component.html.template +0 -25
- package/src/schematics/data-grid-component/files/plain/__componentName__.component.ts.template +0 -36
- package/src/schematics/form/form-component/files/component/__componentName__.component.ts.template +0 -50
- package/src/schematics/table/table-component/files/component/__componentName__.component.html.template +0 -299
- package/src/schematics/table/table-component/files/component/__componentName__.component.ts.template +0 -112
- package/src/schematics/table/tree-table-component/files/component/__componentName__.component.html.template +0 -213
- package/src/schematics/table/tree-table-component/files/component/__componentName__.component.ts.template +0 -113
|
@@ -1,92 +1,325 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/schema",
|
|
3
|
-
"$id": "form-control",
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
"$id": "form-control-schematic",
|
|
4
|
+
"allOf": [
|
|
5
|
+
{
|
|
6
|
+
"allOf": [
|
|
7
|
+
{
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"project": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Project name where the files should be generated"
|
|
13
|
+
},
|
|
14
|
+
"feature": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"description": "Feature name where the files should be generated"
|
|
17
|
+
},
|
|
18
|
+
"overwrite": {
|
|
19
|
+
"anyOf": [
|
|
20
|
+
{
|
|
21
|
+
"type": "boolean"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"type": "array",
|
|
25
|
+
"items": {
|
|
26
|
+
"type": "string"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"description": "Overwrite existing files",
|
|
31
|
+
"default": false
|
|
32
|
+
},
|
|
33
|
+
"overwriteHtml": {
|
|
34
|
+
"type": "boolean",
|
|
35
|
+
"default": false
|
|
36
|
+
},
|
|
37
|
+
"replace": {
|
|
38
|
+
"type": "boolean",
|
|
39
|
+
"default": false
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"required": [
|
|
43
|
+
"project"
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"type": "object",
|
|
48
|
+
"properties": {
|
|
49
|
+
"componentName": {
|
|
50
|
+
"type": "string"
|
|
51
|
+
},
|
|
52
|
+
"name": {
|
|
53
|
+
"type": "string"
|
|
54
|
+
},
|
|
55
|
+
"context": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"description": "The context use to generate proper names for class, files, etc"
|
|
58
|
+
},
|
|
59
|
+
"nestModule": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"description": "The module name for the table nest operations"
|
|
62
|
+
},
|
|
63
|
+
"controllerName": {
|
|
64
|
+
"type": "string"
|
|
65
|
+
},
|
|
66
|
+
"backend": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"description": "The backend that should be used to handel data",
|
|
69
|
+
"enum": [
|
|
70
|
+
"none",
|
|
71
|
+
"nestjs",
|
|
72
|
+
"open-api",
|
|
73
|
+
"local"
|
|
74
|
+
],
|
|
75
|
+
"default": "none"
|
|
76
|
+
},
|
|
77
|
+
"directory": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"description": "A directory name or absolute path where the files should be generated. Relative to the project and feature base path if a feature is defined"
|
|
80
|
+
},
|
|
81
|
+
"shared": {
|
|
82
|
+
"type": "boolean",
|
|
83
|
+
"description": "Whether the generated code is used across the project",
|
|
84
|
+
"default": false
|
|
85
|
+
},
|
|
86
|
+
"scope": {
|
|
87
|
+
"type": "string"
|
|
88
|
+
},
|
|
89
|
+
"prefix": {
|
|
90
|
+
"type": "string"
|
|
91
|
+
},
|
|
92
|
+
"openApi": {
|
|
93
|
+
"type": "object",
|
|
94
|
+
"additionalProperties": true
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
]
|
|
10
99
|
},
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
100
|
+
{
|
|
101
|
+
"type": "object",
|
|
102
|
+
"properties": {
|
|
103
|
+
"name": {
|
|
104
|
+
"type": "string",
|
|
105
|
+
"description": "The name of the control"
|
|
106
|
+
},
|
|
107
|
+
"type": {
|
|
108
|
+
"$ref": "#/definitions/type"
|
|
109
|
+
},
|
|
110
|
+
"isArray": {
|
|
111
|
+
"type": "boolean",
|
|
112
|
+
"description": "Whether the control value is an array",
|
|
113
|
+
"default": false
|
|
114
|
+
},
|
|
115
|
+
"state": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"description": "The initial state of the control"
|
|
118
|
+
},
|
|
119
|
+
"isRequired": {
|
|
120
|
+
"type": "boolean",
|
|
121
|
+
"description": "Whether the control value is required",
|
|
122
|
+
"default": false
|
|
123
|
+
},
|
|
124
|
+
"isReadonly": {
|
|
125
|
+
"type": "boolean",
|
|
126
|
+
"description": "Whether the control value is readonly",
|
|
127
|
+
"default": false
|
|
128
|
+
},
|
|
129
|
+
"isDisabled": {
|
|
130
|
+
"type": "boolean",
|
|
131
|
+
"description": "Whether the control value is disabled",
|
|
132
|
+
"default": false
|
|
133
|
+
},
|
|
134
|
+
"validatorList": {
|
|
135
|
+
"type": "array",
|
|
136
|
+
"items": {
|
|
137
|
+
"type": "string"
|
|
138
|
+
}
|
|
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
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"required": [
|
|
157
|
+
"name"
|
|
30
158
|
],
|
|
31
|
-
"
|
|
32
|
-
},
|
|
33
|
-
"feature": {
|
|
34
|
-
"type": "string",
|
|
35
|
-
"description": "The feature where the form control should be added",
|
|
36
|
-
"x-prompt": "Enter feature name where the form control should be added"
|
|
37
|
-
},
|
|
38
|
-
"shared": {
|
|
39
|
-
"type": "boolean",
|
|
40
|
-
"description": "Whether the form is shared across applications",
|
|
41
|
-
"default": false
|
|
42
|
-
},
|
|
43
|
-
"directory": {
|
|
44
|
-
"type": "string",
|
|
45
|
-
"description": "A path suffix added to the base path"
|
|
46
|
-
},
|
|
47
|
-
"nestModule": {
|
|
48
|
-
"type": "string",
|
|
49
|
-
"description": "Name of the nest module where the controller is created"
|
|
50
|
-
},
|
|
51
|
-
"controllerName": {
|
|
52
|
-
"type": "string",
|
|
53
|
-
"description": "Name of the nest controller"
|
|
159
|
+
"additionalProperties": true
|
|
54
160
|
},
|
|
55
|
-
|
|
56
|
-
"type": "
|
|
57
|
-
"
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
161
|
+
{
|
|
162
|
+
"type": "object",
|
|
163
|
+
"properties": {
|
|
164
|
+
"formName": {
|
|
165
|
+
"alias": "form",
|
|
166
|
+
"type": "string",
|
|
167
|
+
"description": "The name of the form where the form control should be added",
|
|
168
|
+
"x-prompt": "Enter the name of the form where the form control should be added"
|
|
169
|
+
}
|
|
64
170
|
},
|
|
65
|
-
"
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
171
|
+
"required": [
|
|
172
|
+
"formName"
|
|
173
|
+
]
|
|
174
|
+
}
|
|
175
|
+
],
|
|
176
|
+
"definitions": {
|
|
177
|
+
"type": {
|
|
178
|
+
"oneOf": [
|
|
179
|
+
{
|
|
180
|
+
"type": "string"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"type": "object",
|
|
184
|
+
"properties": {
|
|
185
|
+
"name": {
|
|
186
|
+
"type": "string"
|
|
187
|
+
},
|
|
188
|
+
"isTypeOnly": {
|
|
189
|
+
"type": "boolean"
|
|
190
|
+
},
|
|
191
|
+
"moduleSpecifier": {
|
|
192
|
+
"type": "string"
|
|
193
|
+
},
|
|
194
|
+
"namedImport": {
|
|
195
|
+
"type": "string"
|
|
196
|
+
},
|
|
197
|
+
"namespaceImport": {
|
|
198
|
+
"type": "string"
|
|
199
|
+
},
|
|
200
|
+
"defaultImport": {
|
|
201
|
+
"type": "string"
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
"required": [
|
|
205
|
+
"name"
|
|
206
|
+
]
|
|
207
|
+
}
|
|
208
|
+
]
|
|
75
209
|
},
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
|
|
79
|
-
|
|
210
|
+
"property": {
|
|
211
|
+
"oneOf": [
|
|
212
|
+
{
|
|
213
|
+
"type": "string"
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"type": "object",
|
|
217
|
+
"properties": {
|
|
218
|
+
"name": {
|
|
219
|
+
"type": "string"
|
|
220
|
+
},
|
|
221
|
+
"type": {
|
|
222
|
+
"$ref": "#/definitions/type"
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
"required": [
|
|
226
|
+
"name"
|
|
227
|
+
]
|
|
228
|
+
}
|
|
229
|
+
],
|
|
230
|
+
"definitions": {
|
|
231
|
+
"type": {
|
|
232
|
+
"oneOf": [
|
|
233
|
+
{
|
|
234
|
+
"type": "string"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"type": "object",
|
|
238
|
+
"properties": {
|
|
239
|
+
"name": {
|
|
240
|
+
"type": "string"
|
|
241
|
+
},
|
|
242
|
+
"isTypeOnly": {
|
|
243
|
+
"type": "boolean"
|
|
244
|
+
},
|
|
245
|
+
"moduleSpecifier": {
|
|
246
|
+
"type": "string"
|
|
247
|
+
},
|
|
248
|
+
"namedImport": {
|
|
249
|
+
"type": "string"
|
|
250
|
+
},
|
|
251
|
+
"namespaceImport": {
|
|
252
|
+
"type": "string"
|
|
253
|
+
},
|
|
254
|
+
"defaultImport": {
|
|
255
|
+
"type": "string"
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
"required": [
|
|
259
|
+
"name"
|
|
260
|
+
]
|
|
261
|
+
}
|
|
262
|
+
]
|
|
263
|
+
}
|
|
264
|
+
}
|
|
80
265
|
},
|
|
81
|
-
"
|
|
82
|
-
"type": "
|
|
83
|
-
"
|
|
266
|
+
"button": {
|
|
267
|
+
"type": "object",
|
|
268
|
+
"properties": {
|
|
269
|
+
"svgIcon": {
|
|
270
|
+
"type": "string"
|
|
271
|
+
},
|
|
272
|
+
"icon": {
|
|
273
|
+
"type": "string"
|
|
274
|
+
},
|
|
275
|
+
"directiveList": {
|
|
276
|
+
"type": "array",
|
|
277
|
+
"items": {
|
|
278
|
+
"$ref": "#/definitions/type"
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
"importList": {
|
|
282
|
+
"type": "array",
|
|
283
|
+
"items": {
|
|
284
|
+
"$ref": "#/definitions/type"
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
"definitions": {
|
|
289
|
+
"type": {
|
|
290
|
+
"oneOf": [
|
|
291
|
+
{
|
|
292
|
+
"type": "string"
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"type": "object",
|
|
296
|
+
"properties": {
|
|
297
|
+
"name": {
|
|
298
|
+
"type": "string"
|
|
299
|
+
},
|
|
300
|
+
"isTypeOnly": {
|
|
301
|
+
"type": "boolean"
|
|
302
|
+
},
|
|
303
|
+
"moduleSpecifier": {
|
|
304
|
+
"type": "string"
|
|
305
|
+
},
|
|
306
|
+
"namedImport": {
|
|
307
|
+
"type": "string"
|
|
308
|
+
},
|
|
309
|
+
"namespaceImport": {
|
|
310
|
+
"type": "string"
|
|
311
|
+
},
|
|
312
|
+
"defaultImport": {
|
|
313
|
+
"type": "string"
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
"required": [
|
|
317
|
+
"name"
|
|
318
|
+
]
|
|
319
|
+
}
|
|
320
|
+
]
|
|
321
|
+
}
|
|
322
|
+
}
|
|
84
323
|
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
"name",
|
|
88
|
-
"formName",
|
|
89
|
-
"project",
|
|
90
|
-
"feature"
|
|
91
|
-
]
|
|
92
|
-
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "form-control-schematic",
|
|
4
|
+
"allOf": [
|
|
5
|
+
{
|
|
6
|
+
"$ref": "../../angular.schema.json"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"$ref": "../../form-control.schema.json"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"type": "object",
|
|
13
|
+
"properties": {
|
|
14
|
+
"formName": {
|
|
15
|
+
"alias": "form",
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "The name of the form where the form control should be added",
|
|
18
|
+
"x-prompt": "Enter the name of the form where the form control should be added"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"required": [
|
|
22
|
+
"formName"
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"definitions": {
|
|
27
|
+
"type": {
|
|
28
|
+
"$ref": "../../type.schema.json"
|
|
29
|
+
},
|
|
30
|
+
"property": {
|
|
31
|
+
"$ref": "../../property.schema.json"
|
|
32
|
+
},
|
|
33
|
+
"button": {
|
|
34
|
+
"$ref": "../../button.schema.json"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.NormalizeFormDefinitionOptions = void 0;
|
|
4
4
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
5
|
const schematics_ts_morph_1 = require("@rxap/schematics-ts-morph");
|
|
6
|
+
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
6
7
|
const angular_options_1 = require("../../../lib/angular-options");
|
|
7
8
|
const form_definition_control_1 = require("../../../lib/form-definition-control");
|
|
8
9
|
function NormalizeFormDefinitionOptions(options) {
|
|
@@ -23,7 +24,7 @@ function printFormDefinitionOptions(options) {
|
|
|
23
24
|
}
|
|
24
25
|
function default_1(options) {
|
|
25
26
|
const normalizedOptions = NormalizeFormDefinitionOptions(options);
|
|
26
|
-
const { name, project, directory, feature, controlList, standalone, } = normalizedOptions;
|
|
27
|
+
const { name, project, directory, feature, controlList, standalone, context, nestModule, controllerName, backend, shared, scope, prefix, overwrite, replace, } = normalizedOptions;
|
|
27
28
|
printFormDefinitionOptions(normalizedOptions);
|
|
28
29
|
return () => {
|
|
29
30
|
return (0, schematics_1.chain)([
|
|
@@ -36,6 +37,18 @@ function default_1(options) {
|
|
|
36
37
|
controlList,
|
|
37
38
|
name,
|
|
38
39
|
}),
|
|
40
|
+
(0, schematics_1.chain)(controlList.map(control => (0, schematics_utilities_1.ExecuteSchematic)('form-control', Object.assign({ formName: name, project,
|
|
41
|
+
feature,
|
|
42
|
+
directory,
|
|
43
|
+
context,
|
|
44
|
+
nestModule,
|
|
45
|
+
controllerName,
|
|
46
|
+
backend,
|
|
47
|
+
shared,
|
|
48
|
+
scope,
|
|
49
|
+
prefix,
|
|
50
|
+
overwrite,
|
|
51
|
+
replace }, control)))),
|
|
39
52
|
standalone ?
|
|
40
53
|
(0, schematics_1.chain)([
|
|
41
54
|
() => console.log('Coerce form providers file ...'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/schematic/angular/src/schematics/form/form-definition/index.ts"],"names":[],"mappings":";;;AAAA,2DAAmD;AACnD,mEAGmC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/schematic/angular/src/schematics/form/form-definition/index.ts"],"names":[],"mappings":";;;AAAA,2DAAmD;AACnD,mEAGmC;AACnC,qEAA8D;AAE9D,kEAKsC;AACtC,kFAG8C;AAS9C,SAAgB,8BAA8B,CAC5C,OAAwC;;IAExC,MAAM,wBAAwB,GAAG,IAAA,yCAAuB,EAAC,OAAO,CAAC,CAAC;IAClE,IAAA,kDAAgC,EAAC,wBAAwB,CAAC,CAAC;IAC3D,OAAO,MAAM,CAAC,MAAM,iCACf,wBAAwB,KAC3B,WAAW,EAAE,IAAA,4DAAkC,EAAC,OAAO,CAAC,WAAW,CAAC,EACpE,UAAU,EAAE,MAAA,OAAO,CAAC,UAAU,mCAAI,IAAI,IACtC,CAAC;AACL,CAAC;AAVD,wEAUC;AAED,SAAS,0BAA0B,CAAC,OAAwC;IAC1E,IAAA,qCAAmB,EAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;IAChD,IAAI,OAAO,CAAC,WAAW,CAAC,MAAM,EAAE;QAC9B,OAAO,CAAC,GAAG,CAAC,iBAAkB,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAE,EAAE,CAAC,CAAC;KACrF;SAAM;QACL,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;KACnC;AACH,CAAC;AAED,mBAAyB,OAA8B;IACrD,MAAM,iBAAiB,GAAG,8BAA8B,CAAC,OAAO,CAAC,CAAC;IAClE,MAAM,EACJ,IAAI,EACJ,OAAO,EACP,SAAS,EACT,OAAO,EACP,WAAW,EACX,UAAU,EACV,OAAO,EACP,UAAU,EACV,cAAc,EACd,OAAO,EACP,MAAM,EACN,KAAK,EACL,MAAM,EACN,SAAS,EACT,OAAO,GACR,GAAG,iBAAiB,CAAC;IACtB,0BAA0B,CAAC,iBAAiB,CAAC,CAAC;IAC9C,OAAO,GAAG,EAAE;QACV,OAAO,IAAA,kBAAK,EAAC;YACX,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,2DAA2D,CAAC;YAChF,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC;YACrD,IAAA,0CAAoB,EAAC;gBACnB,OAAO;gBACP,OAAO;gBACP,SAAS;gBACT,WAAW;gBACX,IAAI;aACL,CAAC;YACF,IAAA,kBAAK,EAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,IAAA,uCAAgB,EAAC,cAAc,kBAC9D,QAAQ,EAAE,IAAI,EACd,OAAO;gBACP,OAAO;gBACP,SAAS;gBACT,OAAO;gBACP,UAAU;gBACV,cAAc;gBACd,OAAO;gBACP,MAAM;gBACN,KAAK;gBACL,MAAM;gBACN,SAAS;gBACT,OAAO,IACJ,OAAO,EACV,CAAC,CAAC;YACJ,UAAU,CAAC,CAAC;gBACZ,IAAA,kBAAK,EAAC;oBACJ,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC;oBACnD,IAAA,6CAAuB,EAAC;wBACtB,OAAO;wBACP,OAAO;wBACP,SAAS;wBACT,IAAI;qBACL,CAAC;iBACH,CAAC,CAAC,CAAC;gBACJ,IAAA,kBAAK,EAAC;oBACJ,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC;iBAClD,CAAC;YACF,GAAG,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE;SACzB,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AA/DD,4BA+DC"}
|
|
@@ -2,6 +2,6 @@ import { AngularOptions } from '../../../lib/angular-options';
|
|
|
2
2
|
import { FormDefinitionControl } from '../../../lib/form-definition-control';
|
|
3
3
|
|
|
4
4
|
export interface FormDefinitionOptions extends AngularOptions {
|
|
5
|
-
controlList: Array<
|
|
5
|
+
controlList: Array<FormDefinitionControl>;
|
|
6
6
|
standalone?: boolean;
|
|
7
7
|
}
|