@rxap/schematic-angular 16.0.1-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/GETSTARTED.md +0 -0
- package/GUIDES.md +0 -0
- package/README.md +21 -0
- package/collection.json +109 -0
- package/package.json +70 -0
- package/src/index.d.ts +0 -0
- package/src/index.js +2 -0
- package/src/index.js.map +1 -0
- package/src/lib/accordion-item.d.ts +10 -0
- package/src/lib/accordion-item.js +36 -0
- package/src/lib/accordion-item.js.map +1 -0
- package/src/lib/accordion-itme-types.d.ts +7 -0
- package/src/lib/accordion-itme-types.js +15 -0
- package/src/lib/accordion-itme-types.js.map +1 -0
- package/src/lib/angular-options.d.ts +20 -0
- package/src/lib/angular-options.js +57 -0
- package/src/lib/angular-options.js.map +1 -0
- package/src/lib/assert-table-component-exists.d.ts +8 -0
- package/src/lib/assert-table-component-exists.js +18 -0
- package/src/lib/assert-table-component-exists.js.map +1 -0
- package/src/lib/backend-types.d.ts +5 -0
- package/src/lib/backend-types.js +10 -0
- package/src/lib/backend-types.js.map +1 -0
- package/src/lib/data-grid-item.d.ts +9 -0
- package/src/lib/data-grid-item.js +31 -0
- package/src/lib/data-grid-item.js.map +1 -0
- package/src/lib/data-grid-options.d.ts +18 -0
- package/src/lib/data-grid-options.js +25 -0
- package/src/lib/data-grid-options.js.map +1 -0
- package/src/lib/dialog-action.d.ts +9 -0
- package/src/lib/dialog-action.js +33 -0
- package/src/lib/dialog-action.js.map +1 -0
- package/src/lib/existing-method.d.ts +5 -0
- package/src/lib/existing-method.js +11 -0
- package/src/lib/existing-method.js.map +1 -0
- package/src/lib/form-component-control.d.ts +13 -0
- package/src/lib/form-component-control.js +46 -0
- package/src/lib/form-component-control.js.map +1 -0
- package/src/lib/form-definition-control.d.ts +15 -0
- package/src/lib/form-definition-control.js +59 -0
- package/src/lib/form-definition-control.js.map +1 -0
- package/src/lib/minimum-table-component-options.d.ts +17 -0
- package/src/lib/minimum-table-component-options.js +343 -0
- package/src/lib/minimum-table-component-options.js.map +1 -0
- package/src/lib/minimum-table-options.d.ts +18 -0
- package/src/lib/minimum-table-options.js +27 -0
- package/src/lib/minimum-table-options.js.map +1 -0
- package/src/lib/table-action.d.ts +11 -0
- package/src/lib/table-action.js +93 -0
- package/src/lib/table-action.js.map +1 -0
- package/src/lib/table-column.d.ts +18 -0
- package/src/lib/table-column.js +73 -0
- package/src/lib/table-column.js.map +1 -0
- package/src/lib/table-header-button.d.ts +9 -0
- package/src/lib/table-header-button.js +58 -0
- package/src/lib/table-header-button.js.map +1 -0
- package/src/lib/table-options.d.ts +15 -0
- package/src/lib/table-options.js +16 -0
- package/src/lib/table-options.js.map +1 -0
- package/src/lib/table-row-action.d.ts +14 -0
- package/src/lib/table-row-action.js +21 -0
- package/src/lib/table-row-action.js.map +1 -0
- package/src/lib/to-title.d.ts +1 -0
- package/src/lib/to-title.js +12 -0
- package/src/lib/to-title.js.map +1 -0
- package/src/lib/tree-table-options.d.ts +15 -0
- package/src/lib/tree-table-options.js +15 -0
- package/src/lib/tree-table-options.js.map +1 -0
- package/src/schematics/accordion/accordion-component/files/component/__componentName__.component.html.template +30 -0
- package/src/schematics/accordion/accordion-component/files/component/__componentName__.component.ts.template +54 -0
- package/src/schematics/accordion/accordion-component/files/header-component/accordion-header.component.html.template +5 -0
- package/src/schematics/accordion/accordion-component/files/header-component/accordion-header.component.ts.template +14 -0
- package/src/schematics/accordion/accordion-component/index.d.ts +8 -0
- package/src/schematics/accordion/accordion-component/index.js +350 -0
- package/src/schematics/accordion/accordion-component/index.js.map +1 -0
- package/src/schematics/accordion/accordion-component/schema.d.ts +7 -0
- package/src/schematics/accordion/accordion-component/schema.json +90 -0
- package/src/schematics/accordion/accordion-item-component/files/component/__componentName__.component.html.template +7 -0
- package/src/schematics/accordion/accordion-item-component/files/component/__componentName__.component.ts.template +32 -0
- package/src/schematics/accordion/accordion-item-component/index.d.ts +21 -0
- package/src/schematics/accordion/accordion-item-component/index.js +319 -0
- package/src/schematics/accordion/accordion-item-component/index.js.map +1 -0
- package/src/schematics/accordion/accordion-item-component/schema.d.ts +9 -0
- package/src/schematics/accordion/accordion-item-component/schema.json +73 -0
- package/src/schematics/accordion/item/accordion-item-data-grid-component/files/data-grid/__componentName__.component.html.template +1 -0
- package/src/schematics/accordion/item/accordion-item-data-grid-component/files/data-grid/__componentName__.component.ts.template +14 -0
- package/src/schematics/accordion/item/accordion-item-data-grid-component/files/data-grid-collection/__componentName__.component.html.template +10 -0
- package/src/schematics/accordion/item/accordion-item-data-grid-component/files/data-grid-collection/__componentName__.component.ts.template +32 -0
- package/src/schematics/accordion/item/accordion-item-data-grid-component/index.d.ts +10 -0
- package/src/schematics/accordion/item/accordion-item-data-grid-component/index.js +211 -0
- package/src/schematics/accordion/item/accordion-item-data-grid-component/index.js.map +1 -0
- package/src/schematics/accordion/item/accordion-item-data-grid-component/schema.d.ts +7 -0
- package/src/schematics/accordion/item/accordion-item-data-grid-component/schema.json +122 -0
- package/src/schematics/accordion/item/accordion-item-table-component/files/component/__componentName__.component.html.template +1 -0
- package/src/schematics/accordion/item/accordion-item-table-component/files/component/__componentName__.component.ts.template +35 -0
- package/src/schematics/accordion/item/accordion-item-table-component/index.d.ts +7 -0
- package/src/schematics/accordion/item/accordion-item-table-component/index.js +108 -0
- package/src/schematics/accordion/item/accordion-item-table-component/index.js.map +1 -0
- package/src/schematics/accordion/item/accordion-item-table-component/schema.d.ts +7 -0
- package/src/schematics/accordion/item/accordion-item-table-component/schema.json +248 -0
- package/src/schematics/accordion/item/accordion-item-tree-table-component/files/component/__componentName__.component.html.template +1 -0
- package/src/schematics/accordion/item/accordion-item-tree-table-component/files/component/__componentName__.component.ts.template +34 -0
- package/src/schematics/accordion/item/accordion-item-tree-table-component/index.d.ts +7 -0
- package/src/schematics/accordion/item/accordion-item-tree-table-component/index.js +182 -0
- package/src/schematics/accordion/item/accordion-item-tree-table-component/index.js.map +1 -0
- package/src/schematics/accordion/item/accordion-item-tree-table-component/schema.d.ts +7 -0
- package/src/schematics/accordion/item/accordion-item-tree-table-component/schema.json +257 -0
- package/src/schematics/data-grid-component/files/form/__componentName__.component.html.template +42 -0
- package/src/schematics/data-grid-component/files/form/__componentName__.component.ts.template +43 -0
- package/src/schematics/data-grid-component/files/plain/__componentName__.component.html.template +25 -0
- package/src/schematics/data-grid-component/files/plain/__componentName__.component.ts.template +36 -0
- package/src/schematics/data-grid-component/index.d.ts +16 -0
- package/src/schematics/data-grid-component/index.js +320 -0
- package/src/schematics/data-grid-component/index.js.map +1 -0
- package/src/schematics/data-grid-component/schema.d.ts +4 -0
- package/src/schematics/data-grid-component/schema.json +112 -0
- package/src/schematics/dialog-component/files/component/__componentName__.component.html.template +23 -0
- package/src/schematics/dialog-component/index.d.ts +2 -0
- package/src/schematics/dialog-component/index.js +43 -0
- package/src/schematics/dialog-component/index.js.map +1 -0
- package/src/schematics/dialog-component/schema.d.ts +9 -0
- package/src/schematics/dialog-component/schema.json +71 -0
- package/src/schematics/form/control/input-form-control/index.d.ts +7 -0
- package/src/schematics/form/control/input-form-control/index.js +40 -0
- package/src/schematics/form/control/input-form-control/index.js.map +1 -0
- package/src/schematics/form/control/input-form-control/schema.d.ts +5 -0
- package/src/schematics/form/control/input-form-control/schema.json +115 -0
- package/src/schematics/form/control/select-form-control/index.d.ts +6 -0
- package/src/schematics/form/control/select-form-control/index.js +124 -0
- package/src/schematics/form/control/select-form-control/index.js.map +1 -0
- package/src/schematics/form/control/select-form-control/schema.d.ts +6 -0
- package/src/schematics/form/control/select-form-control/schema.json +101 -0
- package/src/schematics/form/control/table-select-form-control/index.d.ts +12 -0
- package/src/schematics/form/control/table-select-form-control/index.js +183 -0
- package/src/schematics/form/control/table-select-form-control/index.js.map +1 -0
- package/src/schematics/form/control/table-select-form-control/schema.d.ts +7 -0
- package/src/schematics/form/control/table-select-form-control/schema.json +105 -0
- package/src/schematics/form/form-component/files/component/__componentName__.component.html.template +12 -0
- package/src/schematics/form/form-component/files/component/__componentName__.component.ts.template +52 -0
- package/src/schematics/form/form-component/files/window/open-__name__-form-window.method.ts.template +29 -0
- package/src/schematics/form/form-component/index.d.ts +16 -0
- package/src/schematics/form/form-component/index.js +149 -0
- package/src/schematics/form/form-component/index.js.map +1 -0
- package/src/schematics/form/form-component/schema.d.ts +8 -0
- package/src/schematics/form/form-component/schema.json +107 -0
- package/src/schematics/form/form-control/index.d.ts +9 -0
- package/src/schematics/form/form-control/index.js +54 -0
- package/src/schematics/form/form-control/index.js.map +1 -0
- package/src/schematics/form/form-control/schema.d.ts +6 -0
- package/src/schematics/form/form-control/schema.json +91 -0
- package/src/schematics/form/form-definition/index.d.ts +10 -0
- package/src/schematics/form/form-definition/index.js +43 -0
- package/src/schematics/form/form-definition/index.js.map +1 -0
- package/src/schematics/form/form-definition/schema.d.ts +6 -0
- package/src/schematics/form/form-definition/schema.json +97 -0
- package/src/schematics/table/action/dialog-table-action/index.d.ts +8 -0
- package/src/schematics/table/action/dialog-table-action/index.js +99 -0
- package/src/schematics/table/action/dialog-table-action/index.js.map +1 -0
- package/src/schematics/table/action/dialog-table-action/schema.d.ts +8 -0
- package/src/schematics/table/action/dialog-table-action/schema.json +133 -0
- package/src/schematics/table/action/form-table-action/index.d.ts +9 -0
- package/src/schematics/table/action/form-table-action/index.js +146 -0
- package/src/schematics/table/action/form-table-action/index.js.map +1 -0
- package/src/schematics/table/action/form-table-action/schema.d.ts +4 -0
- package/src/schematics/table/action/form-table-action/schema.json +94 -0
- package/src/schematics/table/action/navigation-table-action/index.d.ts +7 -0
- package/src/schematics/table/action/navigation-table-action/index.js +46 -0
- package/src/schematics/table/action/navigation-table-action/index.js.map +1 -0
- package/src/schematics/table/action/navigation-table-action/schema.d.ts +5 -0
- package/src/schematics/table/action/navigation-table-action/schema.json +85 -0
- package/src/schematics/table/action/operation-table-action/index.d.ts +11 -0
- package/src/schematics/table/action/operation-table-action/index.js +87 -0
- package/src/schematics/table/action/operation-table-action/index.js.map +1 -0
- package/src/schematics/table/action/operation-table-action/schema.d.ts +4 -0
- package/src/schematics/table/action/operation-table-action/schema.json +93 -0
- package/src/schematics/table/table-action/index.d.ts +7 -0
- package/src/schematics/table/table-action/index.js +46 -0
- package/src/schematics/table/table-action/index.js.map +1 -0
- package/src/schematics/table/table-action/schema.d.ts +7 -0
- package/src/schematics/table/table-action/schema.json +81 -0
- package/src/schematics/table/table-component/files/component/__componentName__.component.html.template +311 -0
- package/src/schematics/table/table-component/files/component/__componentName__.component.ts.template +100 -0
- package/src/schematics/table/table-component/index.d.ts +17 -0
- package/src/schematics/table/table-component/index.js +329 -0
- package/src/schematics/table/table-component/index.js.map +1 -0
- package/src/schematics/table/table-component/schema.d.ts +4 -0
- package/src/schematics/table/table-component/schema.json +230 -0
- package/src/schematics/table/tree-table-component/files/component/__componentName__.component.html.template +201 -0
- package/src/schematics/table/tree-table-component/files/component/__componentName__.component.ts.template +102 -0
- package/src/schematics/table/tree-table-component/index.d.ts +9 -0
- package/src/schematics/table/tree-table-component/index.js +314 -0
- package/src/schematics/table/tree-table-component/index.js.map +1 -0
- package/src/schematics/table/tree-table-component/schema.d.ts +4 -0
- package/src/schematics/table/tree-table-component/schema.json +239 -0
- package/src/schematics/tree-component/index.d.ts +10 -0
- package/src/schematics/tree-component/index.js +33 -0
- package/src/schematics/tree-component/index.js.map +1 -0
- package/src/schematics/tree-component/schema.d.ts +6 -0
- package/src/schematics/tree-component/schema.json +75 -0
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "tree-table-component",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"name": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"description": "The name of the table",
|
|
9
|
+
"x-prompt": "Which name should the table module have?"
|
|
10
|
+
},
|
|
11
|
+
"project": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "The target project where the table module should be added."
|
|
14
|
+
},
|
|
15
|
+
"feature": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "The feature name where the table module should be added.",
|
|
18
|
+
"x-prompt": "To which feature should the table module be added?"
|
|
19
|
+
},
|
|
20
|
+
"shared": {
|
|
21
|
+
"type": "boolean",
|
|
22
|
+
"description": "Whether the table is shared across applications",
|
|
23
|
+
"default": false
|
|
24
|
+
},
|
|
25
|
+
"backend": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"description": "The backend that should be used to handel data",
|
|
28
|
+
"enum": [
|
|
29
|
+
"none",
|
|
30
|
+
"local",
|
|
31
|
+
"nestjs"
|
|
32
|
+
],
|
|
33
|
+
"default": "none"
|
|
34
|
+
},
|
|
35
|
+
"directory": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"description": "A directory name or absolute path for the table module. relative to the feature base path"
|
|
38
|
+
},
|
|
39
|
+
"nestModule": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"description": "The module name for the table nest operations"
|
|
42
|
+
},
|
|
43
|
+
"modifiers": {
|
|
44
|
+
"alias": "modifier",
|
|
45
|
+
"type": "array",
|
|
46
|
+
"items": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"enum": [
|
|
49
|
+
"navigation-back-header",
|
|
50
|
+
"without-title"
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
"description": "The table modifiers"
|
|
54
|
+
},
|
|
55
|
+
"headerButton": {
|
|
56
|
+
"oneOf": [
|
|
57
|
+
{
|
|
58
|
+
"type": "string"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"type": "object",
|
|
62
|
+
"properties": {
|
|
63
|
+
"role": {
|
|
64
|
+
"type": "string"
|
|
65
|
+
},
|
|
66
|
+
"permission": {
|
|
67
|
+
"type": "string"
|
|
68
|
+
},
|
|
69
|
+
"icon": {
|
|
70
|
+
"type": "string"
|
|
71
|
+
},
|
|
72
|
+
"svgIcon": {
|
|
73
|
+
"type": "string"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"description": "The header button configuration"
|
|
79
|
+
},
|
|
80
|
+
"columnList": {
|
|
81
|
+
"alias": "column",
|
|
82
|
+
"type": "array",
|
|
83
|
+
"items": {
|
|
84
|
+
"oneOf": [
|
|
85
|
+
{
|
|
86
|
+
"type": "string"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"type": "object",
|
|
90
|
+
"properties": {
|
|
91
|
+
"name": {
|
|
92
|
+
"type": "string"
|
|
93
|
+
},
|
|
94
|
+
"type": {
|
|
95
|
+
"type": "string"
|
|
96
|
+
},
|
|
97
|
+
"modifiers": {
|
|
98
|
+
"type": "array",
|
|
99
|
+
"items": {
|
|
100
|
+
"type": "string"
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"hasFilter": {
|
|
104
|
+
"type": "boolean"
|
|
105
|
+
},
|
|
106
|
+
"title": {
|
|
107
|
+
"type": "string"
|
|
108
|
+
},
|
|
109
|
+
"propertyPath": {
|
|
110
|
+
"type": "string"
|
|
111
|
+
},
|
|
112
|
+
"hidden": {
|
|
113
|
+
"type": "boolean"
|
|
114
|
+
},
|
|
115
|
+
"active": {
|
|
116
|
+
"type": "boolean"
|
|
117
|
+
},
|
|
118
|
+
"inactive": {
|
|
119
|
+
"type": "boolean"
|
|
120
|
+
},
|
|
121
|
+
"show": {
|
|
122
|
+
"type": "boolean"
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"required": [
|
|
126
|
+
"name"
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
"description": "table column name"
|
|
131
|
+
},
|
|
132
|
+
"description": "List of table column names"
|
|
133
|
+
},
|
|
134
|
+
"actionList": {
|
|
135
|
+
"alias": "action",
|
|
136
|
+
"type": "array",
|
|
137
|
+
"items": {
|
|
138
|
+
"oneOf": [
|
|
139
|
+
{
|
|
140
|
+
"type": "string"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"type": "object",
|
|
144
|
+
"properties": {
|
|
145
|
+
"type": {
|
|
146
|
+
"type": "string"
|
|
147
|
+
},
|
|
148
|
+
"refresh": {
|
|
149
|
+
"type": "boolean"
|
|
150
|
+
},
|
|
151
|
+
"confirm": {
|
|
152
|
+
"type": "boolean"
|
|
153
|
+
},
|
|
154
|
+
"tooltip": {
|
|
155
|
+
"type": "string"
|
|
156
|
+
},
|
|
157
|
+
"errorMessage": {
|
|
158
|
+
"type": "string"
|
|
159
|
+
},
|
|
160
|
+
"successMessage": {
|
|
161
|
+
"type": "string"
|
|
162
|
+
},
|
|
163
|
+
"priority": {
|
|
164
|
+
"type": "number"
|
|
165
|
+
},
|
|
166
|
+
"checkFunction": {
|
|
167
|
+
"type": "string"
|
|
168
|
+
},
|
|
169
|
+
"inHeader": {
|
|
170
|
+
"type": "boolean"
|
|
171
|
+
},
|
|
172
|
+
"role": {
|
|
173
|
+
"type": "string",
|
|
174
|
+
"enum": [
|
|
175
|
+
"form",
|
|
176
|
+
"link",
|
|
177
|
+
"method",
|
|
178
|
+
"custom"
|
|
179
|
+
]
|
|
180
|
+
},
|
|
181
|
+
"icon": {
|
|
182
|
+
"type": "string"
|
|
183
|
+
},
|
|
184
|
+
"svgIcon": {
|
|
185
|
+
"type": "string"
|
|
186
|
+
},
|
|
187
|
+
"permission": {
|
|
188
|
+
"type": "string"
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
"required": [
|
|
192
|
+
"type",
|
|
193
|
+
"role"
|
|
194
|
+
]
|
|
195
|
+
}
|
|
196
|
+
]
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
"overwrite": {
|
|
200
|
+
"type": "boolean",
|
|
201
|
+
"description": "Overwrite existing files",
|
|
202
|
+
"default": false
|
|
203
|
+
},
|
|
204
|
+
"context": {
|
|
205
|
+
"type": "string",
|
|
206
|
+
"description": "The context use to generate proper names for class, files, etc"
|
|
207
|
+
},
|
|
208
|
+
"tableRootMethod": {
|
|
209
|
+
"type": "object",
|
|
210
|
+
"properties": {
|
|
211
|
+
"className": {
|
|
212
|
+
"type": "string",
|
|
213
|
+
"description": "The name of the table method class"
|
|
214
|
+
},
|
|
215
|
+
"importPath": {
|
|
216
|
+
"type": "string",
|
|
217
|
+
"description": "The import path for the table method class"
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
"tableChildMethod": {
|
|
222
|
+
"type": "object",
|
|
223
|
+
"properties": {
|
|
224
|
+
"className": {
|
|
225
|
+
"type": "string",
|
|
226
|
+
"description": "The name of the table method class"
|
|
227
|
+
},
|
|
228
|
+
"importPath": {
|
|
229
|
+
"type": "string",
|
|
230
|
+
"description": "The import path for the table method class"
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
"required": [
|
|
236
|
+
"name",
|
|
237
|
+
"feature"
|
|
238
|
+
]
|
|
239
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TreeComponentOptions } from './schema';
|
|
2
|
+
import { NormalizedAngularOptions } from '../../lib/angular-options';
|
|
3
|
+
import { Normalized } from '@rxap/utilities';
|
|
4
|
+
export interface NormalizedTreeComponentOptions extends Readonly<Normalized<TreeComponentOptions> & NormalizedAngularOptions> {
|
|
5
|
+
name: string;
|
|
6
|
+
controllerName: string;
|
|
7
|
+
componentName: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function NormalizeTreeComponentOptions(options: TreeComponentOptions): NormalizedTreeComponentOptions;
|
|
10
|
+
export default function (options: TreeComponentOptions): () => import("@angular-devkit/schematics").Rule;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NormalizeTreeComponentOptions = void 0;
|
|
4
|
+
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
5
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
6
|
+
const schematics_ts_morph_1 = require("@rxap/schematics-ts-morph");
|
|
7
|
+
const angular_options_1 = require("../../lib/angular-options");
|
|
8
|
+
function NormalizeTreeComponentOptions(options) {
|
|
9
|
+
var _a, _b, _c;
|
|
10
|
+
const normalizedAngularOptions = (0, angular_options_1.NormalizeAngularOptions)(options);
|
|
11
|
+
(0, angular_options_1.AssertAngularOptionsNameProperty)(normalizedAngularOptions);
|
|
12
|
+
const { name } = normalizedAngularOptions;
|
|
13
|
+
const componentName = (0, schematics_utilities_1.CoerceSuffix)((0, schematics_utilities_1.dasherize)(name), '-tree');
|
|
14
|
+
return Object.seal(Object.assign(Object.assign({}, normalizedAngularOptions), { modifiers: (_a = options.modifiers) !== null && _a !== void 0 ? _a : [], controllerName: (_b = options.controllerName) !== null && _b !== void 0 ? _b : componentName, componentName, fullTree: (_c = options.fullTree) !== null && _c !== void 0 ? _c : true }));
|
|
15
|
+
}
|
|
16
|
+
exports.NormalizeTreeComponentOptions = NormalizeTreeComponentOptions;
|
|
17
|
+
function default_1(options) {
|
|
18
|
+
const normalizedOptions = NormalizeTreeComponentOptions(options);
|
|
19
|
+
const { fullTree, project, feature, shared, controllerName, } = normalizedOptions;
|
|
20
|
+
return () => {
|
|
21
|
+
return (0, schematics_1.chain)([
|
|
22
|
+
(0, schematics_ts_morph_1.CoerceTreeOperationRule)({
|
|
23
|
+
project,
|
|
24
|
+
feature,
|
|
25
|
+
shared,
|
|
26
|
+
controllerName,
|
|
27
|
+
fullTree,
|
|
28
|
+
}),
|
|
29
|
+
]);
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
exports.default = default_1;
|
|
33
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/angular/src/schematics/tree-component/index.ts"],"names":[],"mappings":";;;AACA,qEAGoC;AACpC,2DAAmD;AACnD,mEAAoE;AACpE,+DAImC;AAUnC,SAAgB,6BAA6B,CAC3C,OAA6B;;IAE7B,MAAM,wBAAwB,GAAG,IAAA,yCAAuB,EAAC,OAAO,CAAC,CAAC;IAClE,IAAA,kDAAgC,EAAC,wBAAwB,CAAC,CAAC;IAC3D,MAAM,EAAE,IAAI,EAAE,GAAG,wBAAwB,CAAC;IAC1C,MAAM,aAAa,GAAG,IAAA,mCAAY,EAAC,IAAA,gCAAS,EAAC,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC;IAC7D,OAAO,MAAM,CAAC,IAAI,iCACb,wBAAwB,KAC3B,SAAS,EAAE,MAAA,OAAO,CAAC,SAAS,mCAAI,EAAE,EAClC,cAAc,EAAE,MAAA,OAAO,CAAC,cAAc,mCAAI,aAAa,EACvD,aAAa,EACb,QAAQ,EAAE,MAAA,OAAO,CAAC,QAAQ,mCAAI,IAAI,IAClC,CAAC;AACL,CAAC;AAdD,sEAcC;AAED,mBAAyB,OAA6B;IACpD,MAAM,iBAAiB,GAAG,6BAA6B,CAAC,OAAO,CAAC,CAAC;IACjE,MAAM,EACJ,QAAQ,EACR,OAAO,EACP,OAAO,EACP,MAAM,EACN,cAAc,GACf,GACC,iBAAiB,CAAC;IAEpB,OAAO,GAAG,EAAE;QACV,OAAO,IAAA,kBAAK,EAAC;YACX,IAAA,6CAAuB,EAAC;gBACtB,OAAO;gBACP,OAAO;gBACP,MAAM;gBACN,cAAc;gBACd,QAAQ;aACT,CAAC;SACH,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAtBD,4BAsBC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "tree-component",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"name": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"description": "The name of the tree",
|
|
9
|
+
"x-prompt": "Which name should the tree component have?"
|
|
10
|
+
},
|
|
11
|
+
"project": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "The target project where the tree component should be added."
|
|
14
|
+
},
|
|
15
|
+
"feature": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "The feature name where the tree component should be added.",
|
|
18
|
+
"x-prompt": "To which feature should the tree component be added?"
|
|
19
|
+
},
|
|
20
|
+
"backend": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "The backend that should be used to handel data",
|
|
23
|
+
"enum": [
|
|
24
|
+
"none",
|
|
25
|
+
"local",
|
|
26
|
+
"nestjs"
|
|
27
|
+
],
|
|
28
|
+
"default": "none"
|
|
29
|
+
},
|
|
30
|
+
"shared": {
|
|
31
|
+
"type": "boolean",
|
|
32
|
+
"description": "Whether the tree is shared across applications",
|
|
33
|
+
"default": false
|
|
34
|
+
},
|
|
35
|
+
"modifiers": {
|
|
36
|
+
"alias": "modifier",
|
|
37
|
+
"type": "array",
|
|
38
|
+
"items": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"enum": [
|
|
41
|
+
"navigation-back-header",
|
|
42
|
+
"without-title"
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
"description": "The tree modifiers"
|
|
46
|
+
},
|
|
47
|
+
"directory": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"description": "A directory name or absolute path for the tree component. relative to the feature base path"
|
|
50
|
+
},
|
|
51
|
+
"nestModule": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"description": "The module name for the tree nest operations"
|
|
54
|
+
},
|
|
55
|
+
"controllerName": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"description": "The controller name for the tree nest operations"
|
|
58
|
+
},
|
|
59
|
+
"overwrite": {
|
|
60
|
+
"type": "boolean",
|
|
61
|
+
"description": "Overwrite existing files",
|
|
62
|
+
"default": false
|
|
63
|
+
},
|
|
64
|
+
"fullTree": {
|
|
65
|
+
"type": "boolean",
|
|
66
|
+
"description": "Whether the tree should be a full tree",
|
|
67
|
+
"default": true
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"required": [
|
|
71
|
+
"name",
|
|
72
|
+
"feature",
|
|
73
|
+
"project"
|
|
74
|
+
]
|
|
75
|
+
}
|