@rxap/schematic-angular 16.2.0-dev.1 → 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 +73 -0
- package/README.md +1 -1
- package/package.json +13 -11
- package/src/lib/accordion-header.d.ts +5 -0
- package/src/lib/accordion-header.js +8 -2
- package/src/lib/accordion-header.js.map +1 -1
- package/src/lib/accordion-item.d.ts +17 -16
- package/src/lib/accordion-item.js +44 -32
- 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/coerce-accordion-component.js +4 -2
- package/src/lib/coerce-accordion-component.js.map +1 -1
- package/src/lib/coerce-form-component.js +5 -2
- package/src/lib/coerce-form-component.js.map +1 -1
- package/src/lib/coerce-minimum-table-component.js +9 -3
- package/src/lib/coerce-minimum-table-component.js.map +1 -1
- package/src/lib/coerce-tree-table-component.js +16 -0
- package/src/lib/coerce-tree-table-component.js.map +1 -1
- package/src/lib/data-grid-item.d.ts +4 -7
- package/src/lib/data-grid-item.js.map +1 -1
- package/src/lib/data-grid-options.d.ts +2 -0
- package/src/lib/data-grid-options.js +7 -3
- package/src/lib/data-grid-options.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 +2 -6
- 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 +3 -57
- package/src/lib/form-definition-control.js +18 -144
- 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/minimum-table-component-options.d.ts +12 -2
- package/src/lib/minimum-table-component-options.js +14 -17
- package/src/lib/minimum-table-component-options.js.map +1 -1
- 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-column.d.ts +8 -2
- package/src/lib/table-column.js +110 -43
- package/src/lib/table-column.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.js +6 -98
- package/src/schematics/accordion/accordion-component/index.js.map +1 -1
- package/src/schematics/accordion/accordion-component/schema.json +313 -132
- package/src/schematics/accordion/accordion-component/template.schema.json +102 -0
- package/src/schematics/accordion/accordion-item-component/index.d.ts +2 -2
- package/src/schematics/accordion/accordion-item-component/index.js +49 -44
- package/src/schematics/accordion/accordion-item-component/index.js.map +1 -1
- package/src/schematics/accordion/accordion-item-component/schema.d.ts +2 -2
- package/src/schematics/accordion/accordion-item-component/schema.json +281 -78
- 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 +1 -1
- package/src/schematics/accordion/item/accordion-item-data-grid-component/index.js +17 -29
- 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 +1 -1
- 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 +1 -1
- package/src/schematics/accordion/item/accordion-item-switch-component/index.js +4 -4
- 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 +1 -1
- package/src/schematics/accordion/item/accordion-item-switch-component/schema.json +317 -191
- 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 +1 -1
- package/src/schematics/accordion/item/accordion-item-table-component/index.js +8 -8
- 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 +1 -1
- package/src/schematics/accordion/item/accordion-item-table-component/schema.json +584 -264
- 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 +1 -1
- package/src/schematics/accordion/item/accordion-item-tree-table-component/index.js +11 -10
- 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 +1 -1
- package/src/schematics/accordion/item/accordion-item-tree-table-component/schema.json +556 -253
- 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 +31 -25
- package/src/schematics/data-grid-component/index.js.map +1 -1
- package/src/schematics/data-grid-component/schema.json +326 -144
- 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 -27
- 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.js +9 -3
- package/src/schematics/form/form-component/index.js.map +1 -1
- package/src/schematics/form/form-component/schema.json +325 -146
- 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.json +312 -127
- 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 +11 -104
- 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 +11 -4
- package/src/schematics/table/tree-table-component/index.js.map +1 -1
- package/src/schematics/table/tree-table-component/schema.json +521 -250
- 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/schematics/accordion/accordion-component/files/component/__componentName__.component.html.template +0 -94
- package/src/schematics/accordion/accordion-component/files/header-component/accordion-header.component.html.template +0 -10
- package/src/schematics/data-grid-component/files/form/__componentName__.component.html.template +0 -42
- package/src/schematics/data-grid-component/files/plain/__componentName__.component.html.template +0 -25
- package/src/schematics/table/table-component/files/component/__componentName__.component.html.template +0 -299
- package/src/schematics/table/tree-table-component/files/component/__componentName__.component.html.template +0 -213
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/schematic/angular/src/schematics/form/form-component/index.ts"],"names":[],"mappings":";;;AAAA,+CAA+C;AAC/C,2DAUoC;AACpC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/schematic/angular/src/schematics/form/form-component/index.ts"],"names":[],"mappings":";;;AAAA,+CAA+C;AAC/C,2DAUoC;AACpC,mEAWmC;AACnC,qEAGoC;AACpC,+CAGyB;AACzB,+BAA4B;AAC5B,kEAKsC;AACtC,8DAA0D;AAC1D,8EAA6E;AAC7E,gFAG6C;AAE7C,gGAGqD;AAarD,SAAgB,6BAA6B,CAC3C,OAAuC;;IAEvC,MAAM,wBAAwB,GAAG,IAAA,yCAAuB,EAAC,OAAO,CAAC,CAAC;IAClE,IAAA,kDAAgC,EAAC,wBAAwB,CAAC,CAAC;IAC3D,MAAM,EACJ,IAAI,EACJ,UAAU,GACX,GAAG,wBAAwB,CAAC;IAC7B,MAAM,aAAa,GAAG,IAAA,mCAAY,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAClD,MAAM,cAAc,GAAG,MAAA,OAAO,CAAC,cAAc,mCAAI,IAAA,6CAAuB,EAAC;QACvE,cAAc,EAAE,aAAa;QAC7B,UAAU;KACX,CAAC,CAAC;IACH,OAAO,MAAM,CAAC,MAAM,iCACf,wBAAwB,KAC3B,MAAM,EAAE,MAAA,OAAO,CAAC,MAAM,mCAAI,KAAK,EAC/B,SAAS,EAAE,IAAA,WAAI,EAAC,MAAA,OAAO,CAAC,SAAS,mCAAI,EAAE,EAAE,aAAa,CAAC,EACvD,IAAI,EAAE,MAAA,OAAO,CAAC,IAAI,mCAAI,IAAI,EAC1B,aAAa;QACb,cAAc,EACd,WAAW,EAAE,IAAA,0DAAiC,EAAC,OAAO,CAAC,WAAW,CAAC,EACnE,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,IAAA,qBAAS,EAAC,O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CAAC;IAC7C,OAAO;QACL,OAAO,IAAA,kBAAK,EAAC;YACX,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,0DAA0D,CAAC;YAC/E,aAAa,CAAC,iBAAiB,CAAC;YAChC,UAAU,CAAC,iBAAiB,CAAC;YAC7B,kBAAkB,CAAC,iBAAiB,CAAC;YACrC,cAAc,CAAC,iBAAiB,CAAC;YACjC,GAAG,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE;SACzB,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAbD,4BAaC"}
|
|
@@ -1,173 +1,352 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/schema",
|
|
3
|
-
"$id": "form-component",
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"type": "string",
|
|
42
|
-
"description": "A path suffix added to the base path"
|
|
43
|
-
},
|
|
44
|
-
"role": {
|
|
45
|
-
"type": "string",
|
|
46
|
-
"description": "Define the role of the form"
|
|
47
|
-
},
|
|
48
|
-
"nestModule": {
|
|
49
|
-
"type": "string",
|
|
50
|
-
"description": "Name of the nest module where the controller is created"
|
|
51
|
-
},
|
|
52
|
-
"controllerName": {
|
|
53
|
-
"type": "string",
|
|
54
|
-
"description": "Name of the nest controller"
|
|
55
|
-
},
|
|
56
|
-
"matFormFieldDefaultOptions": {
|
|
57
|
-
"appearance": {
|
|
58
|
-
"type": "string",
|
|
59
|
-
"description": "The appearance of the mat form field",
|
|
60
|
-
"enum": [
|
|
61
|
-
"legacy",
|
|
62
|
-
"standard",
|
|
63
|
-
"fill",
|
|
64
|
-
"outline"
|
|
65
|
-
]
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
"controlList": {
|
|
69
|
-
"alias": "control",
|
|
70
|
-
"type": "array",
|
|
71
|
-
"items": {
|
|
72
|
-
"type": "object",
|
|
73
|
-
"properties": {
|
|
74
|
-
"name": {
|
|
75
|
-
"type": "string",
|
|
76
|
-
"description": "The name of the control"
|
|
3
|
+
"$id": "form-component-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
|
+
}
|
|
77
41
|
},
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
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
|
+
]
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"allOf": [
|
|
102
|
+
{
|
|
103
|
+
"type": "object",
|
|
104
|
+
"properties": {
|
|
105
|
+
"controlList": {
|
|
106
|
+
"alias": "control",
|
|
107
|
+
"type": "array",
|
|
108
|
+
"items": {
|
|
84
109
|
"type": "object",
|
|
85
110
|
"properties": {
|
|
86
111
|
"name": {
|
|
87
|
-
"type": "string"
|
|
112
|
+
"type": "string",
|
|
113
|
+
"description": "The name of the control"
|
|
88
114
|
},
|
|
89
|
-
"
|
|
90
|
-
"
|
|
115
|
+
"type": {
|
|
116
|
+
"$ref": "#/definitions/type"
|
|
91
117
|
},
|
|
92
|
-
"
|
|
93
|
-
"type": "
|
|
118
|
+
"isArray": {
|
|
119
|
+
"type": "boolean",
|
|
120
|
+
"description": "Whether the control value is an array",
|
|
121
|
+
"default": false
|
|
94
122
|
},
|
|
95
|
-
"
|
|
96
|
-
"type": "string"
|
|
123
|
+
"state": {
|
|
124
|
+
"type": "string",
|
|
125
|
+
"description": "The initial state of the control"
|
|
97
126
|
},
|
|
98
|
-
"
|
|
99
|
-
"type": "
|
|
127
|
+
"isRequired": {
|
|
128
|
+
"type": "boolean",
|
|
129
|
+
"description": "Whether the control value is required",
|
|
130
|
+
"default": false
|
|
100
131
|
},
|
|
101
|
-
"
|
|
102
|
-
"type": "
|
|
132
|
+
"isReadonly": {
|
|
133
|
+
"type": "boolean",
|
|
134
|
+
"description": "Whether the control value is readonly",
|
|
135
|
+
"default": false
|
|
136
|
+
},
|
|
137
|
+
"isDisabled": {
|
|
138
|
+
"type": "boolean",
|
|
139
|
+
"description": "Whether the control value is disabled",
|
|
140
|
+
"default": false
|
|
141
|
+
},
|
|
142
|
+
"validatorList": {
|
|
143
|
+
"type": "array",
|
|
144
|
+
"items": {
|
|
145
|
+
"type": "string"
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
"kind": {
|
|
149
|
+
"type": "string",
|
|
150
|
+
"description": "The name of the template",
|
|
151
|
+
"enum": [
|
|
152
|
+
"default",
|
|
153
|
+
"input",
|
|
154
|
+
"select",
|
|
155
|
+
"checkbox",
|
|
156
|
+
"autocomplete-table-select",
|
|
157
|
+
"table-select",
|
|
158
|
+
"textarea",
|
|
159
|
+
"slide-toggle"
|
|
160
|
+
],
|
|
161
|
+
"default": "default"
|
|
103
162
|
}
|
|
104
163
|
},
|
|
105
164
|
"required": [
|
|
106
165
|
"name"
|
|
107
|
-
]
|
|
166
|
+
],
|
|
167
|
+
"additionalProperties": true
|
|
108
168
|
}
|
|
109
|
-
]
|
|
110
|
-
},
|
|
111
|
-
"isArray": {
|
|
112
|
-
"type": "boolean",
|
|
113
|
-
"description": "Whether the control value is an array",
|
|
114
|
-
"default": false
|
|
115
|
-
},
|
|
116
|
-
"state": {
|
|
117
|
-
"type": "string",
|
|
118
|
-
"description": "The initial state of the control"
|
|
119
|
-
},
|
|
120
|
-
"isRequired": {
|
|
121
|
-
"type": "boolean",
|
|
122
|
-
"description": "Whether the control value is required",
|
|
123
|
-
"default": false
|
|
124
|
-
},
|
|
125
|
-
"isReadonly": {
|
|
126
|
-
"type": "boolean",
|
|
127
|
-
"description": "Whether the control value is readonly",
|
|
128
|
-
"default": false
|
|
129
|
-
},
|
|
130
|
-
"isDisabled": {
|
|
131
|
-
"type": "boolean",
|
|
132
|
-
"description": "Whether the control value is disabled",
|
|
133
|
-
"default": false
|
|
134
|
-
},
|
|
135
|
-
"validatorList": {
|
|
136
|
-
"type": "array",
|
|
137
|
-
"items": {
|
|
138
|
-
"type": "string"
|
|
139
169
|
}
|
|
140
170
|
},
|
|
141
|
-
"
|
|
142
|
-
"
|
|
143
|
-
|
|
144
|
-
|
|
171
|
+
"required": [
|
|
172
|
+
"controlList"
|
|
173
|
+
]
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"type": "object",
|
|
177
|
+
"properties": {
|
|
178
|
+
"window": {
|
|
179
|
+
"type": "boolean",
|
|
180
|
+
"description": "Whether the form can be opened in a window"
|
|
181
|
+
},
|
|
182
|
+
"role": {
|
|
183
|
+
"type": "string",
|
|
184
|
+
"description": "Define the role of the form"
|
|
185
|
+
},
|
|
186
|
+
"matFormFieldDefaultOptions": {
|
|
187
|
+
"appearance": {
|
|
145
188
|
"type": "string",
|
|
146
|
-
"description": "The
|
|
189
|
+
"description": "The appearance of the mat form field",
|
|
147
190
|
"enum": [
|
|
148
|
-
"
|
|
149
|
-
"
|
|
150
|
-
"
|
|
191
|
+
"legacy",
|
|
192
|
+
"standard",
|
|
193
|
+
"fill",
|
|
194
|
+
"outline"
|
|
151
195
|
]
|
|
152
196
|
}
|
|
153
|
-
}
|
|
154
|
-
"additionalProperties": true,
|
|
155
|
-
"required": ["name"]
|
|
197
|
+
}
|
|
156
198
|
}
|
|
199
|
+
}
|
|
200
|
+
]
|
|
201
|
+
}
|
|
202
|
+
],
|
|
203
|
+
"definitions": {
|
|
204
|
+
"type": {
|
|
205
|
+
"oneOf": [
|
|
206
|
+
{
|
|
207
|
+
"type": "string"
|
|
157
208
|
},
|
|
158
|
-
|
|
159
|
-
"
|
|
160
|
-
|
|
209
|
+
{
|
|
210
|
+
"type": "object",
|
|
211
|
+
"properties": {
|
|
212
|
+
"name": {
|
|
213
|
+
"type": "string"
|
|
214
|
+
},
|
|
215
|
+
"isTypeOnly": {
|
|
216
|
+
"type": "boolean"
|
|
217
|
+
},
|
|
218
|
+
"moduleSpecifier": {
|
|
219
|
+
"type": "string"
|
|
220
|
+
},
|
|
221
|
+
"namedImport": {
|
|
222
|
+
"type": "string"
|
|
223
|
+
},
|
|
224
|
+
"namespaceImport": {
|
|
225
|
+
"type": "string"
|
|
226
|
+
},
|
|
227
|
+
"defaultImport": {
|
|
228
|
+
"type": "string"
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
"required": [
|
|
232
|
+
"name"
|
|
233
|
+
]
|
|
234
|
+
}
|
|
235
|
+
]
|
|
236
|
+
},
|
|
237
|
+
"property": {
|
|
238
|
+
"oneOf": [
|
|
239
|
+
{
|
|
240
|
+
"type": "string"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"type": "object",
|
|
244
|
+
"properties": {
|
|
245
|
+
"name": {
|
|
246
|
+
"type": "string"
|
|
247
|
+
},
|
|
248
|
+
"type": {
|
|
249
|
+
"$ref": "#/definitions/type"
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
"required": [
|
|
253
|
+
"name"
|
|
254
|
+
]
|
|
255
|
+
}
|
|
256
|
+
],
|
|
257
|
+
"definitions": {
|
|
258
|
+
"type": {
|
|
259
|
+
"oneOf": [
|
|
260
|
+
{
|
|
261
|
+
"type": "string"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"type": "object",
|
|
265
|
+
"properties": {
|
|
266
|
+
"name": {
|
|
267
|
+
"type": "string"
|
|
268
|
+
},
|
|
269
|
+
"isTypeOnly": {
|
|
270
|
+
"type": "boolean"
|
|
271
|
+
},
|
|
272
|
+
"moduleSpecifier": {
|
|
273
|
+
"type": "string"
|
|
274
|
+
},
|
|
275
|
+
"namedImport": {
|
|
276
|
+
"type": "string"
|
|
277
|
+
},
|
|
278
|
+
"namespaceImport": {
|
|
279
|
+
"type": "string"
|
|
280
|
+
},
|
|
281
|
+
"defaultImport": {
|
|
282
|
+
"type": "string"
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
"required": [
|
|
286
|
+
"name"
|
|
287
|
+
]
|
|
288
|
+
}
|
|
289
|
+
]
|
|
290
|
+
}
|
|
161
291
|
}
|
|
162
292
|
},
|
|
163
|
-
"
|
|
164
|
-
"type": "
|
|
165
|
-
"
|
|
293
|
+
"button": {
|
|
294
|
+
"type": "object",
|
|
295
|
+
"properties": {
|
|
296
|
+
"svgIcon": {
|
|
297
|
+
"type": "string"
|
|
298
|
+
},
|
|
299
|
+
"icon": {
|
|
300
|
+
"type": "string"
|
|
301
|
+
},
|
|
302
|
+
"directiveList": {
|
|
303
|
+
"type": "array",
|
|
304
|
+
"items": {
|
|
305
|
+
"$ref": "#/definitions/type"
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
"importList": {
|
|
309
|
+
"type": "array",
|
|
310
|
+
"items": {
|
|
311
|
+
"$ref": "#/definitions/type"
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
"definitions": {
|
|
316
|
+
"type": {
|
|
317
|
+
"oneOf": [
|
|
318
|
+
{
|
|
319
|
+
"type": "string"
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"type": "object",
|
|
323
|
+
"properties": {
|
|
324
|
+
"name": {
|
|
325
|
+
"type": "string"
|
|
326
|
+
},
|
|
327
|
+
"isTypeOnly": {
|
|
328
|
+
"type": "boolean"
|
|
329
|
+
},
|
|
330
|
+
"moduleSpecifier": {
|
|
331
|
+
"type": "string"
|
|
332
|
+
},
|
|
333
|
+
"namedImport": {
|
|
334
|
+
"type": "string"
|
|
335
|
+
},
|
|
336
|
+
"namespaceImport": {
|
|
337
|
+
"type": "string"
|
|
338
|
+
},
|
|
339
|
+
"defaultImport": {
|
|
340
|
+
"type": "string"
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
"required": [
|
|
344
|
+
"name"
|
|
345
|
+
]
|
|
346
|
+
}
|
|
347
|
+
]
|
|
348
|
+
}
|
|
349
|
+
}
|
|
166
350
|
}
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
"name",
|
|
170
|
-
"project",
|
|
171
|
-
"feature"
|
|
172
|
-
]
|
|
173
|
-
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "form-component-schematic",
|
|
4
|
+
"allOf": [
|
|
5
|
+
{
|
|
6
|
+
"$ref": "../../angular.schema.json"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"$ref": "../../form-component.schema.json"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"definitions": {
|
|
13
|
+
"type": {
|
|
14
|
+
"$ref": "../../type.schema.json"
|
|
15
|
+
},
|
|
16
|
+
"property": {
|
|
17
|
+
"$ref": "../../property.schema.json"
|
|
18
|
+
},
|
|
19
|
+
"button": {
|
|
20
|
+
"$ref": "../../button.schema.json"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { Rule } from '@angular-devkit/schematics';
|
|
1
2
|
import { Normalized } from '@rxap/utilities';
|
|
2
3
|
import { NormalizedAngularOptions } from '../../../lib/angular-options';
|
|
3
4
|
import { NormalizedFormDefinitionControl } from '../../../lib/form-definition-control';
|
|
4
5
|
import { FormControlOptions } from './schema';
|
|
6
|
+
import 'colors';
|
|
5
7
|
export interface NormalizedFormControlOptions extends Readonly<Normalized<FormControlOptions> & NormalizedAngularOptions & NormalizedFormDefinitionControl> {
|
|
6
8
|
controllerName: string;
|
|
7
9
|
}
|
|
8
10
|
export declare function NormalizeFormControlOptions(options: Readonly<FormControlOptions>): NormalizedFormControlOptions;
|
|
9
|
-
export default function (options: FormControlOptions): () =>
|
|
11
|
+
export default function (options: FormControlOptions): () => Rule;
|
|
@@ -5,25 +5,35 @@ const schematics_1 = require("@angular-devkit/schematics");
|
|
|
5
5
|
const schematics_ts_morph_1 = require("@rxap/schematics-ts-morph");
|
|
6
6
|
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
7
7
|
const angular_options_1 = require("../../../lib/angular-options");
|
|
8
|
+
const form_control_1 = require("../../../lib/form-control");
|
|
8
9
|
const form_definition_control_1 = require("../../../lib/form-definition-control");
|
|
10
|
+
require("colors");
|
|
9
11
|
function NormalizeFormControlOptions(options) {
|
|
10
|
-
var _a
|
|
12
|
+
var _a;
|
|
11
13
|
const normalizedAngularOptions = (0, angular_options_1.NormalizeAngularOptions)(options);
|
|
12
14
|
const normalizedFormDefinitionControl = (0, form_definition_control_1.NormalizeFormDefinitionControl)(options);
|
|
13
|
-
const { nestModule } = normalizedAngularOptions;
|
|
14
15
|
const formName = (0, schematics_utilities_1.dasherize)(options.formName);
|
|
15
|
-
|
|
16
|
-
if (!directory.endsWith('/' + formName + '-form')) {
|
|
17
|
-
directory += '/' + formName + '-form';
|
|
18
|
-
}
|
|
19
|
-
const controllerName = (_b = options.controllerName) !== null && _b !== void 0 ? _b : formName;
|
|
16
|
+
const controllerName = (_a = options.controllerName) !== null && _a !== void 0 ? _a : formName;
|
|
20
17
|
return Object.freeze(Object.assign(Object.assign(Object.assign({}, normalizedAngularOptions), normalizedFormDefinitionControl), { formName,
|
|
21
|
-
directory,
|
|
22
18
|
controllerName, context: options.context ? (0, schematics_utilities_1.dasherize)(options.context) : null }));
|
|
23
19
|
}
|
|
24
20
|
exports.NormalizeFormControlOptions = NormalizeFormControlOptions;
|
|
25
21
|
function printOptions(options) {
|
|
26
22
|
(0, angular_options_1.PrintAngularOptions)('form-control', options);
|
|
23
|
+
console.log(`=== form: ${options.formName}`.blue);
|
|
24
|
+
}
|
|
25
|
+
function formControlKind(normalizedOptions) {
|
|
26
|
+
switch (normalizedOptions.kind) {
|
|
27
|
+
case form_control_1.FormControlKinds.INPUT:
|
|
28
|
+
return (0, schematics_utilities_1.ExecuteSchematic)('input-form-control', normalizedOptions);
|
|
29
|
+
case form_control_1.FormControlKinds.SELECT:
|
|
30
|
+
return (0, schematics_utilities_1.ExecuteSchematic)('select-form-control', normalizedOptions);
|
|
31
|
+
case form_control_1.FormControlKinds.TABLE_SELECT:
|
|
32
|
+
return (0, schematics_utilities_1.ExecuteSchematic)('table-select-form-control', normalizedOptions);
|
|
33
|
+
default:
|
|
34
|
+
return () => console.log(`No schematic for form control kind: ${normalizedOptions.kind}`.yellow);
|
|
35
|
+
}
|
|
36
|
+
return (0, schematics_1.noop)();
|
|
27
37
|
}
|
|
28
38
|
function default_1(options) {
|
|
29
39
|
const normalizedOptions = NormalizeFormControlOptions(options);
|
|
@@ -45,6 +55,7 @@ function default_1(options) {
|
|
|
45
55
|
isRequired,
|
|
46
56
|
validatorList,
|
|
47
57
|
}),
|
|
58
|
+
formControlKind(normalizedOptions),
|
|
48
59
|
() => console.groupEnd(),
|
|
49
60
|
]);
|
|
50
61
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/schematic/angular/src/schematics/form/form-control/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/schematic/angular/src/schematics/form/form-control/index.ts"],"names":[],"mappings":";;;AAAA,2DAIoC;AACpC,mEAAwE;AACxE,qEAGoC;AAEpC,kEAIsC;AACtC,4DAA6D;AAC7D,kFAG8C;AAE9C,kBAAgB;AAOhB,SAAgB,2BAA2B,CACzC,OAAqC;;IAErC,MAAM,wBAAwB,GAAG,IAAA,yCAAuB,EAAC,OAAO,CAAC,CAAC;IAClE,MAAM,+BAA+B,GAAG,IAAA,wDAA8B,EAAC,OAAO,CAAC,CAAC;IAChF,MAAM,QAAQ,GAAG,IAAA,gCAAS,EAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC7C,MAAM,cAAc,GAAG,MAAA,OAAO,CAAC,cAAc,mCAAI,QAAQ,CAAC;IAC1D,OAAO,MAAM,CAAC,MAAM,+CACf,wBAAwB,GACxB,+BAA+B,KAClC,QAAQ;QACR,cAAc,EACd,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,IAAA,gCAAS,EAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,IAC5D,CAAC;AACL,CAAC;AAdD,kEAcC;AAED,SAAS,YAAY,CAAC,OAAqC;IACzD,IAAA,qCAAmB,EAAC,cAAc,EAAE,OAAO,CAAC,CAAC;IAC7C,OAAO,CAAC,GAAG,CAAC,aAAa,OAAO,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,CAAC;AACpD,CAAC;AAED,SAAS,eAAe,CAAC,iBAA+C;IACtE,QAAQ,iBAAiB,CA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