@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,81 +1,240 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/schema",
|
|
3
|
-
"$id": "dialog-
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"alias": "name",
|
|
8
|
-
"type": "string",
|
|
9
|
-
"description": "The name of the dialog",
|
|
10
|
-
"x-prompt": "Which name should the dialog module have?"
|
|
11
|
-
},
|
|
12
|
-
"project": {
|
|
13
|
-
"type": "string",
|
|
14
|
-
"description": "The target project where the dialog module should be added.",
|
|
15
|
-
"x-prompt": "To which project should the dialog module be added?"
|
|
16
|
-
},
|
|
17
|
-
"directory": {
|
|
18
|
-
"type": "string",
|
|
19
|
-
"description": "The directory where the dialog module should be added."
|
|
20
|
-
},
|
|
21
|
-
"feature": {
|
|
22
|
-
"type": "string",
|
|
23
|
-
"description": "The feature name where the dialog module should be added.",
|
|
24
|
-
"x-prompt": "To which feature should the dialog module be added?"
|
|
25
|
-
},
|
|
26
|
-
"overwrite": {
|
|
27
|
-
"anyOf": [
|
|
3
|
+
"$id": "dialog-component-schematic",
|
|
4
|
+
"allOf": [
|
|
5
|
+
{
|
|
6
|
+
"allOf": [
|
|
28
7
|
{
|
|
29
|
-
"type": "
|
|
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
|
+
]
|
|
30
45
|
},
|
|
31
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
|
+
"type": "object",
|
|
102
|
+
"properties": {
|
|
103
|
+
"dialogName": {
|
|
104
|
+
"alias": "name",
|
|
105
|
+
"type": "string",
|
|
106
|
+
"description": "The name of the dialog",
|
|
107
|
+
"x-prompt": "Which name should the dialog module have?"
|
|
108
|
+
},
|
|
109
|
+
"title": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"description": "The title of the dialog"
|
|
112
|
+
},
|
|
113
|
+
"actionList": {
|
|
114
|
+
"alias": "action",
|
|
32
115
|
"type": "array",
|
|
116
|
+
"description": "The list of actions to be added to the dialog",
|
|
33
117
|
"items": {
|
|
34
|
-
"
|
|
118
|
+
"oneOf": [
|
|
119
|
+
{
|
|
120
|
+
"type": "string"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"type": "object",
|
|
124
|
+
"properties": {
|
|
125
|
+
"label": {
|
|
126
|
+
"type": "string"
|
|
127
|
+
},
|
|
128
|
+
"color": {
|
|
129
|
+
"type": "string"
|
|
130
|
+
},
|
|
131
|
+
"role": {
|
|
132
|
+
"type": "string",
|
|
133
|
+
"enum": [
|
|
134
|
+
"submit",
|
|
135
|
+
"close"
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
]
|
|
35
141
|
}
|
|
36
142
|
}
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
143
|
+
},
|
|
144
|
+
"required": [
|
|
145
|
+
"dialogName"
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
],
|
|
149
|
+
"definitions": {
|
|
150
|
+
"type": {
|
|
151
|
+
"oneOf": [
|
|
152
|
+
{
|
|
153
|
+
"type": "string"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"type": "object",
|
|
157
|
+
"properties": {
|
|
158
|
+
"name": {
|
|
159
|
+
"type": "string"
|
|
160
|
+
},
|
|
161
|
+
"isTypeOnly": {
|
|
162
|
+
"type": "boolean"
|
|
163
|
+
},
|
|
164
|
+
"moduleSpecifier": {
|
|
165
|
+
"type": "string"
|
|
166
|
+
},
|
|
167
|
+
"namedImport": {
|
|
168
|
+
"type": "string"
|
|
169
|
+
},
|
|
170
|
+
"namespaceImport": {
|
|
171
|
+
"type": "string"
|
|
172
|
+
},
|
|
173
|
+
"defaultImport": {
|
|
174
|
+
"type": "string"
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
"required": [
|
|
178
|
+
"name"
|
|
179
|
+
]
|
|
180
|
+
}
|
|
181
|
+
]
|
|
44
182
|
},
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
183
|
+
"property": {
|
|
184
|
+
"oneOf": [
|
|
185
|
+
{
|
|
186
|
+
"type": "string"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"type": "object",
|
|
190
|
+
"properties": {
|
|
191
|
+
"name": {
|
|
192
|
+
"type": "string"
|
|
193
|
+
},
|
|
194
|
+
"type": {
|
|
195
|
+
"$ref": "#/definitions/type"
|
|
196
|
+
}
|
|
53
197
|
},
|
|
54
|
-
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
198
|
+
"required": [
|
|
199
|
+
"name"
|
|
200
|
+
]
|
|
201
|
+
}
|
|
202
|
+
],
|
|
203
|
+
"definitions": {
|
|
204
|
+
"type": {
|
|
205
|
+
"oneOf": [
|
|
206
|
+
{
|
|
207
|
+
"type": "string"
|
|
208
|
+
},
|
|
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
|
+
}
|
|
62
230
|
},
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
|
|
66
|
-
"submit",
|
|
67
|
-
"close"
|
|
68
|
-
]
|
|
69
|
-
}
|
|
231
|
+
"required": [
|
|
232
|
+
"name"
|
|
233
|
+
]
|
|
70
234
|
}
|
|
71
|
-
|
|
72
|
-
|
|
235
|
+
]
|
|
236
|
+
}
|
|
73
237
|
}
|
|
74
238
|
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
"dialogName",
|
|
78
|
-
"project",
|
|
79
|
-
"feature"
|
|
80
|
-
]
|
|
81
|
-
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "dialog-component-schematic",
|
|
4
|
+
"allOf": [
|
|
5
|
+
{
|
|
6
|
+
"$ref": "../angular.schema.json"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"dialogName": {
|
|
12
|
+
"alias": "name",
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "The name of the dialog",
|
|
15
|
+
"x-prompt": "Which name should the dialog module have?"
|
|
16
|
+
},
|
|
17
|
+
"title": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "The title of the dialog"
|
|
20
|
+
},
|
|
21
|
+
"actionList": {
|
|
22
|
+
"alias": "action",
|
|
23
|
+
"type": "array",
|
|
24
|
+
"description": "The list of actions to be added to the dialog",
|
|
25
|
+
"items": {
|
|
26
|
+
"oneOf": [
|
|
27
|
+
{
|
|
28
|
+
"type": "string"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"type": "object",
|
|
32
|
+
"properties": {
|
|
33
|
+
"label": {
|
|
34
|
+
"type": "string"
|
|
35
|
+
},
|
|
36
|
+
"color": {
|
|
37
|
+
"type": "string"
|
|
38
|
+
},
|
|
39
|
+
"role": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"enum": [
|
|
42
|
+
"submit",
|
|
43
|
+
"close"
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"required": [
|
|
53
|
+
"dialogName"
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"definitions": {
|
|
58
|
+
"type": {
|
|
59
|
+
"$ref": "../type.schema.json"
|
|
60
|
+
},
|
|
61
|
+
"property": {
|
|
62
|
+
"$ref": "../property.schema.json"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Normalized } from '@rxap/utilities';
|
|
2
|
+
import { NormalizedInputFormControl } from '../../../../lib/form-control';
|
|
2
3
|
import { NormalizedFormControlOptions } from '../../form-control';
|
|
3
4
|
import { InputFormControlOptions } from './schema';
|
|
4
|
-
export
|
|
5
|
-
export type NormalizedInputFormControlOptions = Readonly<Normalized<InputFormControlOptions> & NormalizedFormControlOptions>;
|
|
5
|
+
export type NormalizedInputFormControlOptions = Readonly<Normalized<InputFormControlOptions>> & NormalizedFormControlOptions & NormalizedInputFormControl;
|
|
6
6
|
export declare function NormalizeInputFormControlOptions(options: InputFormControlOptions): NormalizedInputFormControlOptions;
|
|
7
7
|
export default function (options: InputFormControlOptions): () => import("@angular-devkit/schematics").Rule;
|
|
@@ -1,34 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NormalizeInputFormControlOptions =
|
|
3
|
+
exports.NormalizeInputFormControlOptions = void 0;
|
|
4
4
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
-
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
6
5
|
const angular_options_1 = require("../../../../lib/angular-options");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
function GuessInputType(type) {
|
|
10
|
-
switch (type) {
|
|
11
|
-
case 'boolean':
|
|
12
|
-
return 'checkbox';
|
|
13
|
-
case 'number':
|
|
14
|
-
return 'number';
|
|
15
|
-
case 'date':
|
|
16
|
-
return 'date';
|
|
17
|
-
case 'string':
|
|
18
|
-
default:
|
|
19
|
-
return 'text';
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
exports.GuessInputType = GuessInputType;
|
|
6
|
+
const form_control_1 = require("../../../../lib/form-control");
|
|
7
|
+
const form_control_2 = require("../../form-control");
|
|
23
8
|
function NormalizeInputFormControlOptions(options) {
|
|
24
|
-
|
|
25
|
-
const normalizedOptions = (0, form_control_1.NormalizeFormControlOptions)(options);
|
|
26
|
-
const { type, template } = normalizedOptions;
|
|
27
|
-
if (!(0, form_definition_control_1.IsNormalizedInputFormControlTemplate)(template)) {
|
|
28
|
-
throw new Error('The control is not a input form control');
|
|
29
|
-
}
|
|
30
|
-
const inputType = (_a = template.type) !== null && _a !== void 0 ? _a : GuessInputType(type.name);
|
|
31
|
-
return Object.freeze(Object.assign(Object.assign({}, normalizedOptions), { inputType }));
|
|
9
|
+
return Object.freeze(Object.assign(Object.assign({}, (0, form_control_2.NormalizeFormControlOptions)(options)), (0, form_control_1.NormalizeInputFormControl)(options)));
|
|
32
10
|
}
|
|
33
11
|
exports.NormalizeInputFormControlOptions = NormalizeInputFormControlOptions;
|
|
34
12
|
function printOptions(options) {
|
|
@@ -40,7 +18,6 @@ function default_1(options) {
|
|
|
40
18
|
return () => {
|
|
41
19
|
return (0, schematics_1.chain)([
|
|
42
20
|
() => console.group('\x1b[32m[@rxap/schematics-angular:input-form-control]\x1b[0m'),
|
|
43
|
-
(0, schematics_utilities_1.ExecuteSchematic)('form-control', normalizedOptions),
|
|
44
21
|
() => console.groupEnd(),
|
|
45
22
|
]);
|
|
46
23
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/schematic/angular/src/schematics/form/control/input-form-control/index.ts"],"names":[],"mappings":";;;AAAA,2DAAmD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/schematic/angular/src/schematics/form/control/input-form-control/index.ts"],"names":[],"mappings":";;;AAAA,2DAAmD;AAGnD,qEAAsE;AACtE,+DAGsC;AACtC,qDAG4B;AAM5B,SAAgB,gCAAgC,CAC9C,OAAgC;IAEhC,OAAO,MAAM,CAAC,MAAM,iCACf,IAAA,0CAA2B,EAAC,OAAO,CAAC,GACpC,IAAA,wCAAyB,EAAC,OAAO,CAAC,EACrC,CAAC;AACL,CAAC;AAPD,4EAOC;AAED,SAAS,YAAY,CAAC,OAA0C;IAC9D,IAAA,qCAAmB,EAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;AACrD,CAAC;AAED,mBAAyB,OAAgC;IACvD,MAAM,iBAAiB,GAAG,gCAAgC,CAAC,OAAO,CAAC,CAAC;IACpE,YAAY,CAAC,iBAAiB,CAAC,CAAC;IAChC,OAAO,GAAG,EAAE;QACV,OAAO,IAAA,kBAAK,EAAC;YACX,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,8DAA8D,CAAC;YACnF,GAAG,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE;SACzB,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AATD,4BASC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
+
import { InputFormControl } from '../../../../lib/form-control';
|
|
1
2
|
import { FormControlOptions } from '../../form-control/schema';
|
|
2
3
|
|
|
3
|
-
export interface InputFormControlOptions extends FormControlOptions {
|
|
4
|
-
inputType?: string;
|
|
5
|
-
}
|
|
4
|
+
export interface InputFormControlOptions extends FormControlOptions, InputFormControl {}
|