@rxap/schematic-angular 16.1.0-dev.3 → 16.1.0-dev.31
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 +241 -0
- package/README.md +1 -1
- package/collection.json +21 -1
- package/package.json +44 -40
- package/src/lib/angular-options.js +18 -1
- package/src/lib/angular-options.js.map +1 -1
- package/src/lib/form-definition-control.js +3 -1
- package/src/lib/form-definition-control.js.map +1 -1
- package/src/lib/minimum-table-component-options.d.ts +1 -0
- package/src/lib/minimum-table-component-options.js +115 -156
- package/src/lib/minimum-table-component-options.js.map +1 -1
- package/src/lib/table-action.d.ts +1 -1
- package/src/lib/table-action.js +16 -10
- package/src/lib/table-action.js.map +1 -1
- package/src/lib/table-column.d.ts +3 -0
- package/src/lib/table-column.js +20 -2
- package/src/lib/table-column.js.map +1 -1
- package/src/lib/table-header-button.d.ts +9 -2
- package/src/lib/table-header-button.js +22 -2
- package/src/lib/table-header-button.js.map +1 -1
- package/src/lib/table-row-action.d.ts +5 -1
- package/src/lib/table-row-action.js +8 -6
- package/src/lib/table-row-action.js.map +1 -1
- package/src/schematics/accordion/accordion-component/files/component/__componentName__.component.ts.template +1 -1
- package/src/schematics/accordion/accordion-component/index.js +1 -1
- package/src/schematics/accordion/accordion-component/index.js.map +1 -1
- package/src/schematics/accordion/accordion-component/schema.json +13 -3
- package/src/schematics/accordion/accordion-item-component/files/component/__componentName__.component.html.template +1 -1
- package/src/schematics/accordion/accordion-item-component/schema.json +13 -3
- package/src/schematics/accordion/item/accordion-item-data-grid-component/schema.json +13 -3
- package/src/schematics/accordion/item/accordion-item-table-component/schema.json +13 -3
- package/src/schematics/accordion/item/accordion-item-tree-table-component/schema.json +13 -3
- package/src/schematics/angular.schema.json +61 -0
- package/src/schematics/data-grid-component/schema.json +13 -3
- package/src/schematics/dialog-component/schema.json +13 -3
- package/src/schematics/form/control/input-form-control/index.d.ts +2 -2
- package/src/schematics/form/control/input-form-control/index.js +7 -3
- package/src/schematics/form/control/input-form-control/index.js.map +1 -1
- package/src/schematics/form/control/select-form-control/index.js +2 -0
- package/src/schematics/form/control/select-form-control/index.js.map +1 -1
- package/src/schematics/form/control/table-select-form-control/index.js +2 -0
- package/src/schematics/form/control/table-select-form-control/index.js.map +1 -1
- package/src/schematics/form/form-component/index.d.ts +0 -1
- package/src/schematics/form/form-component/index.js +45 -14
- package/src/schematics/form/form-component/index.js.map +1 -1
- package/src/schematics/form/form-component/schema.json +3 -6
- package/src/schematics/form/form-control/index.d.ts +2 -2
- package/src/schematics/form/form-control/index.js +7 -8
- package/src/schematics/form/form-control/index.js.map +1 -1
- package/src/schematics/form/form-definition/index.d.ts +2 -2
- package/src/schematics/form/form-definition/index.js +24 -10
- package/src/schematics/form/form-definition/index.js.map +1 -1
- package/src/schematics/form/form-definition/schema.d.ts +2 -1
- package/src/schematics/form/form-definition/schema.json +5 -0
- package/src/schematics/general.schema.json +41 -0
- package/src/schematics/table/action/dialog-table-action/index.d.ts +2 -1
- package/src/schematics/table/action/dialog-table-action/index.js +6 -2
- package/src/schematics/table/action/dialog-table-action/index.js.map +1 -1
- package/src/schematics/table/action/dialog-table-action/schema.json +12 -2
- package/src/schematics/table/action/form-table-action/index.d.ts +6 -1
- package/src/schematics/table/action/form-table-action/index.js +120 -68
- package/src/schematics/table/action/form-table-action/index.js.map +1 -1
- package/src/schematics/table/action/form-table-action/schema.json +47 -2
- package/src/schematics/table/action/navigation-table-action/index.d.ts +1 -1
- package/src/schematics/table/action/navigation-table-action/index.js +10 -10
- package/src/schematics/table/action/navigation-table-action/index.js.map +1 -1
- package/src/schematics/table/action/open-api-table-action/index.d.ts +10 -0
- package/src/schematics/table/action/open-api-table-action/index.js +50 -0
- package/src/schematics/table/action/open-api-table-action/index.js.map +1 -0
- package/src/schematics/table/action/open-api-table-action/schema.d.ts +9 -0
- package/src/schematics/table/action/open-api-table-action/schema.json +121 -0
- package/src/schematics/table/action/operation-table-action/index.d.ts +1 -3
- package/src/schematics/table/action/operation-table-action/index.js +11 -12
- package/src/schematics/table/action/operation-table-action/index.js.map +1 -1
- package/src/schematics/table/header-button/form-table-header-button/index.d.ts +11 -0
- package/src/schematics/table/header-button/form-table-header-button/index.js +83 -0
- package/src/schematics/table/header-button/form-table-header-button/index.js.map +1 -0
- package/src/schematics/table/header-button/form-table-header-button/schema.d.ts +7 -0
- package/src/schematics/table/header-button/form-table-header-button/schema.json +123 -0
- package/src/schematics/table/header-button/navigation-table-header-button/index.d.ts +8 -0
- package/src/schematics/table/header-button/navigation-table-header-button/index.js +69 -0
- package/src/schematics/table/header-button/navigation-table-header-button/index.js.map +1 -0
- package/src/schematics/table/header-button/navigation-table-header-button/schema.d.ts +8 -0
- package/src/schematics/table/header-button/navigation-table-header-button/schema.json +87 -0
- package/src/schematics/table/table-action/index.d.ts +1 -1
- package/src/schematics/table/table-action/index.js +6 -4
- package/src/schematics/table/table-action/index.js.map +1 -1
- package/src/schematics/table/table-action/schema.json +8 -0
- package/src/schematics/table/table-component/files/component/__componentName__.component.html.template +17 -18
- package/src/schematics/table/table-component/files/component/__componentName__.component.ts.template +3 -5
- package/src/schematics/table/table-component/index.d.ts +1 -0
- package/src/schematics/table/table-component/index.js +44 -8
- package/src/schematics/table/table-component/index.js.map +1 -1
- package/src/schematics/table/table-component/schema.json +207 -220
- package/src/schematics/table/table-header-button/index.d.ts +8 -0
- package/src/schematics/table/table-header-button/index.js +50 -0
- package/src/schematics/table/table-header-button/index.js.map +1 -0
- package/src/schematics/table/table-header-button/schema.d.ts +8 -0
- package/src/schematics/table/table-header-button/schema.json +80 -0
- package/src/schematics/table/tree-table-component/files/component/__componentName__.component.html.template +3 -3
- package/src/schematics/table/tree-table-component/files/component/__componentName__.component.ts.template +1 -3
- package/src/schematics/table/tree-table-component/index.d.ts +1 -0
- package/src/schematics/table/tree-table-component/index.js +14 -18
- package/src/schematics/table/tree-table-component/index.js.map +1 -1
- package/src/schematics/table/tree-table-component/schema.json +11 -1
- package/src/schematics/tree-component/schema.json +11 -1
- /package/src/schematics/form/form-component/files/window/{open-__name__-form-window.method.ts.template → open-__componentName__-window.method.ts.template} +0 -0
|
@@ -1,258 +1,245 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/schema",
|
|
3
3
|
"$id": "template-table-module",
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"type": "string",
|
|
8
|
-
"description": "The name of the table",
|
|
9
|
-
"x-prompt": "Which name should the table module have?"
|
|
4
|
+
"allOf": [
|
|
5
|
+
{
|
|
6
|
+
"$ref": "https://unpkg.com/@rxap/schematic-angular@16.1.0-dev.23/src/schematics/angular.schema.json"
|
|
10
7
|
},
|
|
11
|
-
|
|
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
|
-
"open-api"
|
|
33
|
-
],
|
|
34
|
-
"default": "none"
|
|
35
|
-
},
|
|
36
|
-
"tableMethod": {
|
|
37
|
-
"type": "object",
|
|
38
|
-
"properties": {
|
|
39
|
-
"className": {
|
|
40
|
-
"type": "string",
|
|
41
|
-
"description": "The name of the table method class"
|
|
42
|
-
},
|
|
43
|
-
"importPath": {
|
|
44
|
-
"type": "string",
|
|
45
|
-
"description": "The import path for the table method class"
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
"openApi": {
|
|
8
|
+
{
|
|
50
9
|
"type": "object",
|
|
51
10
|
"properties": {
|
|
52
|
-
"
|
|
11
|
+
"name": {
|
|
53
12
|
"type": "string",
|
|
54
|
-
"description": "The
|
|
13
|
+
"description": "The name of the table",
|
|
14
|
+
"x-prompt": "Which name should the table module have?"
|
|
55
15
|
},
|
|
56
|
-
"
|
|
16
|
+
"tableMethod": {
|
|
57
17
|
"type": "object",
|
|
58
18
|
"properties": {
|
|
59
19
|
"className": {
|
|
60
20
|
"type": "string",
|
|
61
|
-
"description": "The name of the
|
|
21
|
+
"description": "The name of the table method class"
|
|
62
22
|
},
|
|
63
23
|
"importPath": {
|
|
64
24
|
"type": "string",
|
|
65
|
-
"description": "The import path for the
|
|
25
|
+
"description": "The import path for the table method class"
|
|
66
26
|
}
|
|
67
|
-
}
|
|
68
|
-
"required": [
|
|
69
|
-
"className",
|
|
70
|
-
"importPath"
|
|
71
|
-
]
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
"required": [
|
|
75
|
-
"operationId"
|
|
76
|
-
]
|
|
77
|
-
},
|
|
78
|
-
"modifiers": {
|
|
79
|
-
"alias": "modifier",
|
|
80
|
-
"type": "array",
|
|
81
|
-
"items": {
|
|
82
|
-
"type": "string",
|
|
83
|
-
"enum": [
|
|
84
|
-
"navigation-back-header",
|
|
85
|
-
"without-title"
|
|
86
|
-
]
|
|
87
|
-
},
|
|
88
|
-
"description": "The table modifiers"
|
|
89
|
-
},
|
|
90
|
-
"headerButton": {
|
|
91
|
-
"oneOf": [
|
|
92
|
-
{
|
|
93
|
-
"type": "string"
|
|
27
|
+
}
|
|
94
28
|
},
|
|
95
|
-
{
|
|
29
|
+
"openApi": {
|
|
96
30
|
"type": "object",
|
|
97
31
|
"properties": {
|
|
98
|
-
"
|
|
99
|
-
"type": "string"
|
|
100
|
-
|
|
101
|
-
"permission": {
|
|
102
|
-
"type": "string"
|
|
103
|
-
},
|
|
104
|
-
"icon": {
|
|
105
|
-
"type": "string"
|
|
32
|
+
"operationId": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"description": "The operationId for the open api operation"
|
|
106
35
|
},
|
|
107
|
-
"
|
|
108
|
-
"type": "
|
|
36
|
+
"adapter": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"properties": {
|
|
39
|
+
"className": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"description": "The name of the open api adapter class"
|
|
42
|
+
},
|
|
43
|
+
"importPath": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"description": "The import path for the open api adapter class"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"required": [
|
|
49
|
+
"className",
|
|
50
|
+
"importPath"
|
|
51
|
+
]
|
|
109
52
|
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
],
|
|
113
|
-
"description": "The header button configuration"
|
|
114
|
-
},
|
|
115
|
-
"directory": {
|
|
116
|
-
"type": "string",
|
|
117
|
-
"description": "A directory name or absolute path for the table module. relative to the feature base path"
|
|
118
|
-
},
|
|
119
|
-
"nestModule": {
|
|
120
|
-
"type": "string",
|
|
121
|
-
"description": "The module name for the table nest operations"
|
|
122
|
-
},
|
|
123
|
-
"columnList": {
|
|
124
|
-
"alias": "column",
|
|
125
|
-
"type": "array",
|
|
126
|
-
"items": {
|
|
127
|
-
"oneOf": [
|
|
128
|
-
{
|
|
129
|
-
"type": "string"
|
|
130
53
|
},
|
|
131
|
-
|
|
132
|
-
"
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
54
|
+
"required": [
|
|
55
|
+
"operationId"
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
"modifiers": {
|
|
59
|
+
"alias": "modifier",
|
|
60
|
+
"type": "array",
|
|
61
|
+
"items": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"enum": [
|
|
64
|
+
"navigation-back-header",
|
|
65
|
+
"without-title"
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
"description": "The table modifiers"
|
|
69
|
+
},
|
|
70
|
+
"headerButton": {
|
|
71
|
+
"oneOf": [
|
|
72
|
+
{
|
|
73
|
+
"type": "string"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"type": "object",
|
|
77
|
+
"properties": {
|
|
78
|
+
"role": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"enum": [
|
|
81
|
+
"form",
|
|
82
|
+
"navigation",
|
|
83
|
+
"method"
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
"permission": {
|
|
87
|
+
"type": "string"
|
|
88
|
+
},
|
|
89
|
+
"icon": {
|
|
90
|
+
"type": "string"
|
|
91
|
+
},
|
|
92
|
+
"svgIcon": {
|
|
143
93
|
"type": "string"
|
|
94
|
+
},
|
|
95
|
+
"options": {
|
|
96
|
+
"type": "object",
|
|
97
|
+
"additionalProperties": true
|
|
144
98
|
}
|
|
145
99
|
},
|
|
146
|
-
"
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
100
|
+
"additionalProperties": true
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
"description": "The header button configuration"
|
|
104
|
+
},
|
|
105
|
+
"columnList": {
|
|
106
|
+
"alias": "column",
|
|
107
|
+
"type": "array",
|
|
108
|
+
"items": {
|
|
109
|
+
"oneOf": [
|
|
110
|
+
{
|
|
153
111
|
"type": "string"
|
|
154
112
|
},
|
|
155
|
-
|
|
156
|
-
"type": "
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
113
|
+
{
|
|
114
|
+
"type": "object",
|
|
115
|
+
"properties": {
|
|
116
|
+
"name": {
|
|
117
|
+
"type": "string"
|
|
118
|
+
},
|
|
119
|
+
"type": {
|
|
120
|
+
"type": "string"
|
|
121
|
+
},
|
|
122
|
+
"modifiers": {
|
|
123
|
+
"type": "array",
|
|
124
|
+
"items": {
|
|
125
|
+
"type": "string"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"hasFilter": {
|
|
129
|
+
"type": "boolean"
|
|
130
|
+
},
|
|
131
|
+
"nowrap": {
|
|
132
|
+
"type": "boolean"
|
|
133
|
+
},
|
|
134
|
+
"cssClass": {
|
|
135
|
+
"type": "string"
|
|
136
|
+
},
|
|
137
|
+
"title": {
|
|
138
|
+
"type": "string"
|
|
139
|
+
},
|
|
140
|
+
"propertyPath": {
|
|
141
|
+
"type": "string"
|
|
142
|
+
},
|
|
143
|
+
"hidden": {
|
|
144
|
+
"type": "boolean"
|
|
145
|
+
},
|
|
146
|
+
"active": {
|
|
147
|
+
"type": "boolean"
|
|
148
|
+
},
|
|
149
|
+
"inactive": {
|
|
150
|
+
"type": "boolean"
|
|
151
|
+
},
|
|
152
|
+
"show": {
|
|
153
|
+
"type": "boolean"
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"required": [
|
|
157
|
+
"name"
|
|
158
|
+
]
|
|
166
159
|
}
|
|
167
|
-
|
|
168
|
-
"
|
|
169
|
-
"name"
|
|
170
|
-
]
|
|
171
|
-
}
|
|
172
|
-
],
|
|
173
|
-
"description": "table column name"
|
|
174
|
-
},
|
|
175
|
-
"description": "List of table column names"
|
|
176
|
-
},
|
|
177
|
-
"actionList": {
|
|
178
|
-
"alias": "action",
|
|
179
|
-
"type": "array",
|
|
180
|
-
"items": {
|
|
181
|
-
"oneOf": [
|
|
182
|
-
{
|
|
183
|
-
"type": "string"
|
|
160
|
+
],
|
|
161
|
+
"description": "table column name"
|
|
184
162
|
},
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
},
|
|
194
|
-
"confirm": {
|
|
195
|
-
"type": "boolean"
|
|
196
|
-
},
|
|
197
|
-
"tooltip": {
|
|
198
|
-
"type": "string"
|
|
199
|
-
},
|
|
200
|
-
"errorMessage": {
|
|
201
|
-
"type": "string"
|
|
202
|
-
},
|
|
203
|
-
"successMessage": {
|
|
204
|
-
"type": "string"
|
|
205
|
-
},
|
|
206
|
-
"priority": {
|
|
207
|
-
"type": "number"
|
|
208
|
-
},
|
|
209
|
-
"checkFunction": {
|
|
210
|
-
"type": "string"
|
|
211
|
-
},
|
|
212
|
-
"inHeader": {
|
|
213
|
-
"type": "boolean"
|
|
214
|
-
},
|
|
215
|
-
"role": {
|
|
216
|
-
"type": "string"
|
|
217
|
-
},
|
|
218
|
-
"icon": {
|
|
219
|
-
"type": "string"
|
|
220
|
-
},
|
|
221
|
-
"svgIcon": {
|
|
222
|
-
"type": "string"
|
|
223
|
-
},
|
|
224
|
-
"permission": {
|
|
163
|
+
"description": "List of table column names"
|
|
164
|
+
},
|
|
165
|
+
"actionList": {
|
|
166
|
+
"alias": "action",
|
|
167
|
+
"type": "array",
|
|
168
|
+
"items": {
|
|
169
|
+
"oneOf": [
|
|
170
|
+
{
|
|
225
171
|
"type": "string"
|
|
226
172
|
},
|
|
227
|
-
|
|
173
|
+
{
|
|
228
174
|
"type": "object",
|
|
229
|
-
"
|
|
175
|
+
"properties": {
|
|
176
|
+
"type": {
|
|
177
|
+
"type": "string"
|
|
178
|
+
},
|
|
179
|
+
"refresh": {
|
|
180
|
+
"type": "boolean"
|
|
181
|
+
},
|
|
182
|
+
"confirm": {
|
|
183
|
+
"type": "boolean"
|
|
184
|
+
},
|
|
185
|
+
"tooltip": {
|
|
186
|
+
"type": "string"
|
|
187
|
+
},
|
|
188
|
+
"errorMessage": {
|
|
189
|
+
"type": "string"
|
|
190
|
+
},
|
|
191
|
+
"successMessage": {
|
|
192
|
+
"type": "string"
|
|
193
|
+
},
|
|
194
|
+
"priority": {
|
|
195
|
+
"type": "number"
|
|
196
|
+
},
|
|
197
|
+
"checkFunction": {
|
|
198
|
+
"type": "string"
|
|
199
|
+
},
|
|
200
|
+
"inHeader": {
|
|
201
|
+
"type": "boolean"
|
|
202
|
+
},
|
|
203
|
+
"role": {
|
|
204
|
+
"type": "string"
|
|
205
|
+
},
|
|
206
|
+
"icon": {
|
|
207
|
+
"type": "string"
|
|
208
|
+
},
|
|
209
|
+
"svgIcon": {
|
|
210
|
+
"type": "string"
|
|
211
|
+
},
|
|
212
|
+
"permission": {
|
|
213
|
+
"type": "string"
|
|
214
|
+
},
|
|
215
|
+
"color": {
|
|
216
|
+
"type": "string",
|
|
217
|
+
"description": "Value for the color input of the mat-button / mat-icon component"
|
|
218
|
+
},
|
|
219
|
+
"cssClass": {
|
|
220
|
+
"type": "string",
|
|
221
|
+
"description": "Additional CSS classes added to the button element"
|
|
222
|
+
},
|
|
223
|
+
"options": {
|
|
224
|
+
"type": "object",
|
|
225
|
+
"additionalProperties": true
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
"required": [
|
|
229
|
+
"type"
|
|
230
|
+
]
|
|
230
231
|
}
|
|
231
|
-
},
|
|
232
|
-
"required": [
|
|
233
|
-
"type",
|
|
234
|
-
"role"
|
|
235
232
|
]
|
|
236
233
|
}
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
"
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
"type": "boolean",
|
|
247
|
-
"description": "Whether to add a select column to the table"
|
|
248
|
-
},
|
|
249
|
-
"context": {
|
|
250
|
-
"type": "string",
|
|
251
|
-
"description": "The context use to generate proper names for class, files, etc"
|
|
234
|
+
},
|
|
235
|
+
"selectColumn": {
|
|
236
|
+
"type": "boolean",
|
|
237
|
+
"description": "Whether to add a select column to the table"
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
"required": [
|
|
241
|
+
"name"
|
|
242
|
+
]
|
|
252
243
|
}
|
|
253
|
-
},
|
|
254
|
-
"required": [
|
|
255
|
-
"name",
|
|
256
|
-
"feature"
|
|
257
244
|
]
|
|
258
245
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Tree } from '@angular-devkit/schematics';
|
|
2
|
+
import { Normalized } from '@rxap/utilities';
|
|
3
|
+
import { NormalizedAngularOptions } from '../../../lib/angular-options';
|
|
4
|
+
import { NormalizedTableHeaderButton } from '../../../lib/table-header-button';
|
|
5
|
+
import { TableHeaderButtonOptions } from './schema';
|
|
6
|
+
export type NormalizedTableHeaderButtonOptions<Options extends Record<string, any> = Record<string, any>> = Readonly<Normalized<TableHeaderButtonOptions<Options>> & NormalizedAngularOptions & NormalizedTableHeaderButton>;
|
|
7
|
+
export declare function NormalizeTableHeaderButtonOptions<Options extends Record<string, any> = Record<string, any>>(options: Readonly<TableHeaderButtonOptions<Options>>): NormalizedTableHeaderButtonOptions<Options>;
|
|
8
|
+
export default function (options: TableHeaderButtonOptions): (host: Tree) => import("@angular-devkit/schematics").Rule;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NormalizeTableHeaderButtonOptions = void 0;
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
+
const schematics_ts_morph_1 = require("@rxap/schematics-ts-morph");
|
|
6
|
+
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
7
|
+
const angular_options_1 = require("../../../lib/angular-options");
|
|
8
|
+
const assert_table_component_exists_1 = require("../../../lib/assert-table-component-exists");
|
|
9
|
+
const table_header_button_1 = require("../../../lib/table-header-button");
|
|
10
|
+
function NormalizeTableHeaderButtonOptions(options) {
|
|
11
|
+
const normalizedAngularOptions = (0, angular_options_1.NormalizeAngularOptions)(options);
|
|
12
|
+
const normalizedTableHeaderButton = (0, table_header_button_1.NormalizeTableHeaderButton)(options, options.tableName);
|
|
13
|
+
if (!normalizedTableHeaderButton) {
|
|
14
|
+
throw new Error('FATAL: should never happen');
|
|
15
|
+
}
|
|
16
|
+
const tableName = (0, schematics_utilities_1.CoerceSuffix)((0, schematics_utilities_1.dasherize)(options.tableName), '-table');
|
|
17
|
+
return Object.seal(Object.assign(Object.assign(Object.assign({}, normalizedTableHeaderButton), normalizedAngularOptions), { tableName }));
|
|
18
|
+
}
|
|
19
|
+
exports.NormalizeTableHeaderButtonOptions = NormalizeTableHeaderButtonOptions;
|
|
20
|
+
function printOptions(options) {
|
|
21
|
+
(0, angular_options_1.PrintAngularOptions)('table-header-button', options);
|
|
22
|
+
}
|
|
23
|
+
function default_1(options) {
|
|
24
|
+
const normalizedOptions = NormalizeTableHeaderButtonOptions(options);
|
|
25
|
+
const { refresh, confirm, tooltip, errorMessage, successMessage, tableName, project, feature, shared, directory, overwrite, } = normalizedOptions;
|
|
26
|
+
printOptions(normalizedOptions);
|
|
27
|
+
return (host) => {
|
|
28
|
+
(0, assert_table_component_exists_1.AssertTableComponentExists)(host, normalizedOptions);
|
|
29
|
+
return (0, schematics_1.chain)([
|
|
30
|
+
() => console.group('\x1b[32m[@rxap/schematics-angular:table-header-button]\x1b[0m'),
|
|
31
|
+
() => console.log('Coerce table header button method ...'),
|
|
32
|
+
(0, schematics_ts_morph_1.CoerceTableHeaderButtonMethodRule)({
|
|
33
|
+
project,
|
|
34
|
+
feature,
|
|
35
|
+
shared,
|
|
36
|
+
directory,
|
|
37
|
+
overwrite,
|
|
38
|
+
tableName,
|
|
39
|
+
refresh,
|
|
40
|
+
confirm,
|
|
41
|
+
tooltip,
|
|
42
|
+
errorMessage,
|
|
43
|
+
successMessage,
|
|
44
|
+
}),
|
|
45
|
+
() => console.groupEnd(),
|
|
46
|
+
]);
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
exports.default = default_1;
|
|
50
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/schematic/angular/src/schematics/table/table-header-button/index.ts"],"names":[],"mappings":";;;AAAA,2DAGoC;AACpC,mEAA8E;AAC9E,qEAGoC;AAEpC,kEAIsC;AACtC,8FAAwF;AACxF,0EAG0C;AAK1C,SAAgB,iCAAiC,CAC/C,OAAoD;IAEpD,MAAM,wBAAwB,GAAG,IAAA,yCAAuB,EAAC,OAAO,CAAC,CAAC;IAClE,MAAM,2BAA2B,GAAG,IAAA,gDAA0B,EAAU,OAAO,EAAE,OAAO,CAAC,SAAS,CAAQ,CAAC;IAC3G,IAAI,CAAC,2BAA2B,EAAE;QAChC,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;KAC/C;IACD,MAAM,SAAS,GAAG,IAAA,mCAAY,EAAC,IAAA,gCAAS,EAAC,OAAO,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,CAAC;IACvE,OAAO,MAAM,CAAC,IAAI,+CACb,2BAA2B,GAC3B,wBAAwB,KAC3B,SAAS,IACT,CAAC;AACL,CAAC;AAdD,8EAcC;AAED,SAAS,YAAY,CAAC,OAA2C;IAC/D,IAAA,qCAAmB,EAAC,qBAAqB,EAAE,OAAO,CAAC,CAAC;AACtD,CAAC;AAED,mBAAyB,OAAiC;IACxD,MAAM,iBAAiB,GAAG,iCAAiC,CAAC,OAAO,CAAC,CAAC;IACrE,MAAM,EACJ,OAAO,EACP,OAAO,EACP,OAAO,EACP,YAAY,EACZ,cAAc,EACd,SAAS,EACT,OAAO,EACP,OAAO,EACP,MAAM,EACN,SAAS,EACT,SAAS,GACV,GAAG,iBAAiB,CAAC;IAEtB,YAAY,CAAC,iBAAiB,CAAC,CAAC;IAEhC,OAAO,CAAC,IAAU,EAAE,EAAE;QAEpB,IAAA,0DAA0B,EAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;QAEpD,OAAO,IAAA,kBAAK,EAAC;YACX,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,+DAA+D,CAAC;YACpF,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,uCAAuC,CAAC;YAC1D,IAAA,uDAAiC,EAAC;gBAChC,OAAO;gBACP,OAAO;gBACP,MAAM;gBACN,SAAS;gBACT,SAAS;gBACT,SAAS;gBACT,OAAO;gBACP,OAAO;gBACP,OAAO;gBACP,YAAY;gBACZ,cAAc;aACf,CAAC;YACF,GAAG,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE;SACzB,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAzCD,4BAyCC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AngularOptions } from '../../../lib/angular-options';
|
|
2
|
+
import { TableHeaderButton } from '../../../lib/table-header-button';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export interface TableHeaderButtonOptions<Options extends Record<string, any> = Record<string, any>>
|
|
6
|
+
extends AngularOptions, TableHeaderButton<Options> {
|
|
7
|
+
tableName: string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "table-action",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"tableName": {
|
|
7
|
+
"alias": "table",
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "The name of the table action"
|
|
10
|
+
},
|
|
11
|
+
"project": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "The target project where the table action should be added."
|
|
14
|
+
},
|
|
15
|
+
"feature": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "The feature name where the table action should be added.",
|
|
18
|
+
"x-prompt": "To which feature should the table action 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
|
+
"open-api"
|
|
28
|
+
],
|
|
29
|
+
"default": "none"
|
|
30
|
+
},
|
|
31
|
+
"shared": {
|
|
32
|
+
"type": "boolean",
|
|
33
|
+
"description": "Whether the table action is shared across applications",
|
|
34
|
+
"default": false
|
|
35
|
+
},
|
|
36
|
+
"refresh": {
|
|
37
|
+
"type": "boolean",
|
|
38
|
+
"description": "Whether the table action should refresh the table after execution",
|
|
39
|
+
"default": false
|
|
40
|
+
},
|
|
41
|
+
"confirm": {
|
|
42
|
+
"type": "boolean",
|
|
43
|
+
"description": "Whether the table action should confirm before execution",
|
|
44
|
+
"default": false
|
|
45
|
+
},
|
|
46
|
+
"tooltip": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"description": "The tooltip for the table action"
|
|
49
|
+
},
|
|
50
|
+
"errorMessage": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"description": "The error message for the table action"
|
|
53
|
+
},
|
|
54
|
+
"successMessage": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"description": "The success message for the table action"
|
|
57
|
+
},
|
|
58
|
+
"directory": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"description": "A directory name or absolute path for the table action. relative to the feature base path"
|
|
61
|
+
},
|
|
62
|
+
"permission": {
|
|
63
|
+
"type": "string"
|
|
64
|
+
},
|
|
65
|
+
"icon": {
|
|
66
|
+
"type": "string"
|
|
67
|
+
},
|
|
68
|
+
"svgIcon": {
|
|
69
|
+
"type": "string"
|
|
70
|
+
},
|
|
71
|
+
"options": {
|
|
72
|
+
"type": "object",
|
|
73
|
+
"additionalProperties": true
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"required": [
|
|
77
|
+
"project",
|
|
78
|
+
"feature"
|
|
79
|
+
]
|
|
80
|
+
}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
rxapCardProgressBar
|
|
13
13
|
[loading$]="tableDataSourceDirective.loading$"
|
|
14
14
|
></mat-progress-bar>
|
|
15
|
-
<mat-card-header class="min-h-full h-12">
|
|
15
|
+
<mat-card-header class="min-h-full h-12<% if (!headerButton && hasWithoutTitle) { %> justify-end<% } %>">
|
|
16
16
|
<% if (!hasNavigationBackHeader && !hasWithoutTitle) { %>
|
|
17
17
|
<mat-card-title i18n><%= name %></mat-card-title>
|
|
18
18
|
<% } %>
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
</button>
|
|
32
32
|
<mat-card-subtitle i18n><%= headerButton.label %></mat-card-subtitle>
|
|
33
33
|
<% } %>
|
|
34
|
-
<rxap-table-column-menu matCard #rxapTableColumns="rxapTableColumns" [ngClass]="{ 'hidden': tableDataSourceDirective.hasError$ | async }">
|
|
34
|
+
<rxap-table-column-menu matCard #rxapTableColumns="rxapTableColumns" <% if (!headerButton && hasWithoutTitle) { %>inline<% } %> [ngClass]="{ 'hidden': tableDataSourceDirective.hasError$ | async }">
|
|
35
35
|
<rxap-table-column-option hidden name="tree"></rxap-table-column-option>
|
|
36
36
|
<% for (const column of columnList) { %>
|
|
37
37
|
<rxap-table-column-option name="<%= column.name %>">
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
*ngIf="tableDataSourceDirective.hasError$ | async"
|
|
58
58
|
[refresh]="tableDataSourceDirective.retry">
|
|
59
59
|
</rxap-data-source-error>
|
|
60
|
-
<div class="table-scroll-container mt-4 overflow-x-auto overscroll-
|
|
60
|
+
<div class="table-scroll-container mt-4 overflow-x-auto overscroll-auto">
|
|
61
61
|
<table
|
|
62
62
|
[ngClass]="{ 'hidden': tableDataSourceDirective.hasError$ | async }"
|
|
63
63
|
matSort
|
|
@@ -14,7 +14,6 @@ import {
|
|
|
14
14
|
TableColumnMenuModule, TableCreateButtonDirective,
|
|
15
15
|
TableDataSourceDirective,
|
|
16
16
|
TableFilterModule, TableRowActionsModule,
|
|
17
|
-
TableRowControlsModule,
|
|
18
17
|
} from '@rxap/material-table-system';
|
|
19
18
|
import { MatCardModule } from '@angular/material/card';
|
|
20
19
|
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
@@ -66,7 +65,6 @@ import { MatSnackBarModule } from '@angular/material/snack-bar';
|
|
|
66
65
|
<% if (hasNavigationBackHeader) { %>
|
|
67
66
|
NavigateBackButtonComponent,
|
|
68
67
|
<% } %>
|
|
69
|
-
TableRowControlsModule,
|
|
70
68
|
TableColumnMenuModule,
|
|
71
69
|
DateCellComponent,
|
|
72
70
|
|
|
@@ -99,4 +97,4 @@ export class <%= classify(componentName) %>Component {
|
|
|
99
97
|
|
|
100
98
|
}
|
|
101
99
|
|
|
102
|
-
export default <%= classify(componentName) %>Component
|
|
100
|
+
<% if (exportDefault) { %>export default <%= classify(componentName) %>Component;<% } %>
|