@rxap/schematic-angular 16.2.0-dev.15 → 16.2.0-dev.17
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 +17 -0
- package/README.md +1 -1
- package/package.json +8 -8
- package/src/lib/accordion-identifier.d.ts +4 -0
- package/src/lib/accordion-identifier.js.map +1 -1
- package/src/lib/accordion-item.js +10 -4
- package/src/lib/accordion-item.js.map +1 -1
- package/src/lib/data-grid-options.d.ts +7 -2
- package/src/lib/data-grid-options.js +34 -6
- package/src/lib/data-grid-options.js.map +1 -1
- package/src/lib/form-control.d.ts +7 -1
- package/src/lib/form-control.js +9 -15
- package/src/lib/form-control.js.map +1 -1
- package/src/lib/merge-with-column-list.js +3 -1
- package/src/lib/merge-with-column-list.js.map +1 -1
- package/src/lib/pipe-option.js +0 -2
- package/src/lib/pipe-option.js.map +1 -1
- package/src/lib/table-column.js +7 -5
- package/src/lib/table-column.js.map +1 -1
- package/src/schema.json +21 -0
- package/src/schematics/accordion/item/accordion-item-data-grid-component/schema.json +10 -0
- package/src/schematics/data-grid-component/index.d.ts +2 -3
- package/src/schematics/data-grid-component/index.js +26 -30
- package/src/schematics/data-grid-component/index.js.map +1 -1
- package/src/schematics/data-grid-component/schema.json +52 -0
- package/src/schematics/data-grid.schema.json +16 -0
- package/src/schematics/form/control/table-select-form-control/index.d.ts +7 -1
- package/src/schematics/form/control/table-select-form-control/index.js +195 -149
- package/src/schematics/form/control/table-select-form-control/index.js.map +1 -1
- package/src/schematics/form/control/table-select-form-control/schema.json +8 -0
- package/src/schematics/form/control/table-select-form-control/template.schema.json +8 -0
- package/src/schematics/form/form-component/index.d.ts +2 -0
- package/src/schematics/form/form-component/index.js +13 -4
- package/src/schematics/form/form-component/index.js.map +1 -1
- package/src/schematics/form/form-component/schema.d.ts +3 -1
- package/src/schematics/form/form-component/schema.json +45 -0
- package/src/schematics/form-component.schema.json +6 -0
- package/src/schematics/table/action/form-table-action/schema.json +45 -0
- package/src/schematics/table/table-component/index.d.ts +10 -2
- package/src/schematics/table/table-component/index.js +18 -1
- package/src/schematics/table/table-component/index.js.map +1 -1
- package/src/schematics/table/tree-table-component/index.js +7 -0
- package/src/schematics/table/tree-table-component/index.js.map +1 -1
|
@@ -4,15 +4,17 @@ exports.TableColumnListToTableSelectColumnMap = exports.TableColumnToTableSelect
|
|
|
4
4
|
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
|
+
const ts_morph_1 = require("@rxap/ts-morph");
|
|
7
8
|
const utilities_1 = require("@rxap/utilities");
|
|
8
9
|
const path_1 = require("path");
|
|
9
|
-
const
|
|
10
|
+
const ts_morph_2 = require("ts-morph");
|
|
10
11
|
const angular_options_1 = require("../../../../lib/angular-options");
|
|
11
12
|
const form_control_1 = require("../../../../lib/form-control");
|
|
12
13
|
const table_component_1 = require("../../../table/table-component");
|
|
13
14
|
const form_control_2 = require("../../form-control");
|
|
14
15
|
function NormalizeTableSelectFormControlOptions(options) {
|
|
15
|
-
|
|
16
|
+
const normalizedOptions = (0, form_control_2.NormalizeFormControlOptions)(options);
|
|
17
|
+
return Object.freeze(Object.assign(Object.assign(Object.assign({}, normalizedOptions), (0, form_control_1.NormalizeTableSelectFormControl)(options)), { controllerName: (0, schematics_ts_morph_1.BuildNestControllerName)(normalizedOptions) }));
|
|
16
18
|
}
|
|
17
19
|
exports.NormalizeTableSelectFormControlOptions = NormalizeTableSelectFormControlOptions;
|
|
18
20
|
function TableColumnToTableSelectColumn(column) {
|
|
@@ -23,170 +25,214 @@ function TableColumnToTableSelectColumn(column) {
|
|
|
23
25
|
properties['filter'] = 'true';
|
|
24
26
|
}
|
|
25
27
|
properties['type'] = (w) => w.quote(kind);
|
|
26
|
-
return
|
|
28
|
+
return ts_morph_2.Writers.object(properties);
|
|
27
29
|
}
|
|
28
30
|
exports.TableColumnToTableSelectColumn = TableColumnToTableSelectColumn;
|
|
29
31
|
function TableColumnListToTableSelectColumnMap(columnList) {
|
|
30
|
-
return
|
|
32
|
+
return ts_morph_2.Writers.object(columnList.reduce((properties, column) => (Object.assign(Object.assign({}, properties), { [column.name]: TableColumnToTableSelectColumn(column) })), {}));
|
|
31
33
|
}
|
|
32
34
|
exports.TableColumnListToTableSelectColumnMap = TableColumnListToTableSelectColumnMap;
|
|
33
35
|
function printOptions(options) {
|
|
34
36
|
(0, angular_options_1.PrintAngularOptions)('table-select-form-control', options);
|
|
35
37
|
}
|
|
36
|
-
function
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
function buildOptionsOperationName({ name }) {
|
|
39
|
+
return ['get', name, 'control', 'table-select', 'page'].join('-');
|
|
40
|
+
}
|
|
41
|
+
function buildOptionsOperationPath({ name }) {
|
|
42
|
+
return ['control', name, 'table-select', 'page'].join('/');
|
|
43
|
+
}
|
|
44
|
+
function buildOptionsOperationId(normalizedOptions) {
|
|
45
|
+
return (0, schematics_ts_morph_1.buildOperationId)(normalizedOptions, buildOptionsOperationName(normalizedOptions), (0, schematics_ts_morph_1.BuildNestControllerName)(normalizedOptions));
|
|
46
|
+
}
|
|
47
|
+
function buildDtoSuffix({ context, name }) {
|
|
48
|
+
return (0, utilities_1.joinWithDash)([context, name, 'table-select']);
|
|
49
|
+
}
|
|
50
|
+
function tableSelectResolveRule(normalizedOptions) {
|
|
51
|
+
const { name, project, feature, directory, formName, type, isArray, state, isRequired, validatorList, nestModule, controllerName, shared, context, scope, resolver, columnList, propertyList, toDisplay, toValue } = normalizedOptions;
|
|
52
|
+
const { upstream } = resolver !== null && resolver !== void 0 ? resolver : {};
|
|
53
|
+
const resolveValueOperationName = ['resolve', name, 'control', 'value'].join('-');
|
|
54
|
+
const resolveValueOperationPath = ['control', name, 'resolve', ':value'].join('/');
|
|
55
|
+
const resolveValueOperationId = (0, schematics_ts_morph_1.buildOperationId)(normalizedOptions, resolveValueOperationName, (0, schematics_ts_morph_1.BuildNestControllerName)({
|
|
43
56
|
controllerName,
|
|
44
57
|
nestModule,
|
|
45
58
|
}));
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
const resolveValueName = [(0, schematics_utilities_1.dasherize)(name), 'table-select', 'value', 'resolver'].join('-');
|
|
60
|
+
const resolveValueMethodName = (0, schematics_utilities_1.classify)([resolveValueName, 'method'].join('-'));
|
|
61
|
+
const resolveValueMethodImportPath = `./methods/${resolveValueName}.method`;
|
|
62
|
+
const resolveValueMethodDirectory = (0, path_1.join)(directory !== null && directory !== void 0 ? directory : '', 'methods');
|
|
63
|
+
return (0, schematics_1.chain)([
|
|
64
|
+
(0, schematics_ts_morph_1.CoerceTableSelectValueResolveOperationRule)({
|
|
65
|
+
project,
|
|
66
|
+
feature,
|
|
67
|
+
nestModule,
|
|
68
|
+
controllerName,
|
|
69
|
+
upstream,
|
|
70
|
+
propertyList: (0, table_component_1.TableColumnListAndPropertyListToGetPageOperationPropertyList)(columnList, propertyList),
|
|
71
|
+
rowValueProperty: toValue.property.name,
|
|
72
|
+
rowDisplayProperty: toDisplay.property.name,
|
|
73
|
+
operationName: resolveValueOperationName,
|
|
74
|
+
path: resolveValueOperationPath,
|
|
75
|
+
dtoClassNameSuffix: buildDtoSuffix(normalizedOptions),
|
|
76
|
+
context,
|
|
77
|
+
}),
|
|
78
|
+
(0, schematics_ts_morph_1.CoerceFormProviderRule)({
|
|
79
|
+
project,
|
|
80
|
+
feature,
|
|
81
|
+
directory,
|
|
82
|
+
providerObject: resolveValueMethodName,
|
|
83
|
+
importStructures: [
|
|
84
|
+
{
|
|
85
|
+
namedImports: [resolveValueMethodName],
|
|
86
|
+
moduleSpecifier: resolveValueMethodImportPath,
|
|
87
|
+
},
|
|
88
|
+
],
|
|
89
|
+
}),
|
|
90
|
+
(0, schematics_ts_morph_1.CoerceTableSelectResolveValueMethodRule)({
|
|
91
|
+
scope,
|
|
92
|
+
project,
|
|
93
|
+
feature,
|
|
94
|
+
directory: resolveValueMethodDirectory,
|
|
95
|
+
shared,
|
|
96
|
+
name: resolveValueName,
|
|
97
|
+
operationId: resolveValueOperationId,
|
|
98
|
+
}),
|
|
99
|
+
(0, schematics_ts_morph_1.CoerceFormDefinitionControl)({
|
|
100
|
+
project,
|
|
101
|
+
feature,
|
|
102
|
+
directory,
|
|
103
|
+
formName,
|
|
104
|
+
name,
|
|
105
|
+
type,
|
|
106
|
+
isArray,
|
|
107
|
+
state,
|
|
108
|
+
isRequired,
|
|
109
|
+
validatorList,
|
|
110
|
+
coerceFormControl: (sourceFile, classDeclaration, control) => {
|
|
111
|
+
const { propertyDeclaration, decoratorDeclaration, } = (0, schematics_ts_morph_1.CoerceFormControl)(sourceFile, classDeclaration, control);
|
|
112
|
+
(0, ts_morph_1.CoerceDecorator)(propertyDeclaration, 'UseTableSelectMethod').set({
|
|
113
|
+
arguments: [resolveValueMethodName],
|
|
114
|
+
});
|
|
115
|
+
(0, ts_morph_1.CoerceImports)(sourceFile, {
|
|
116
|
+
namedImports: [resolveValueMethodName],
|
|
117
|
+
moduleSpecifier: resolveValueMethodImportPath,
|
|
118
|
+
});
|
|
119
|
+
(0, ts_morph_1.CoerceImports)(sourceFile, {
|
|
120
|
+
namedImports: [
|
|
121
|
+
'UseTableSelectMethod',
|
|
122
|
+
],
|
|
123
|
+
moduleSpecifier: '@digitaix/eurogard-table-select',
|
|
124
|
+
});
|
|
125
|
+
return {
|
|
126
|
+
propertyDeclaration,
|
|
127
|
+
decoratorDeclaration,
|
|
128
|
+
};
|
|
129
|
+
},
|
|
130
|
+
}),
|
|
131
|
+
]);
|
|
132
|
+
}
|
|
133
|
+
function tableSelectDataSourceRule(normalizedOptions) {
|
|
134
|
+
const { name, project, feature, directory, formName, type, isArray, state, isRequired, validatorList, nestModule, controllerName, columnList, shared, context, scope, toDisplay, toValue, propertyList, upstream, } = normalizedOptions;
|
|
135
|
+
const optionsOperationName = buildOptionsOperationName(normalizedOptions);
|
|
136
|
+
const optionsOperationPath = buildOptionsOperationPath(normalizedOptions);
|
|
137
|
+
const optionsOperationId = buildOptionsOperationId(normalizedOptions);
|
|
60
138
|
const tableDataSourceName = (0, schematics_utilities_1.classify)([name, 'select-table', 'data-source'].join('-'));
|
|
61
139
|
const tableDataSourceImportPath = `./data-sources/${(0, schematics_utilities_1.dasherize)(name)}-select-table.data-source`;
|
|
62
140
|
const tableDataSourceDirectory = (0, path_1.join)(directory !== null && directory !== void 0 ? directory : '', 'data-sources');
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
141
|
+
return (0, schematics_1.chain)([
|
|
142
|
+
(0, schematics_ts_morph_1.CoerceTableSelectOperationRule)({
|
|
143
|
+
project,
|
|
144
|
+
feature,
|
|
145
|
+
nestModule,
|
|
146
|
+
controllerName,
|
|
147
|
+
propertyList: (0, table_component_1.TableColumnListAndPropertyListToGetPageOperationPropertyList)(columnList, propertyList),
|
|
148
|
+
operationName: optionsOperationName,
|
|
149
|
+
path: optionsOperationPath,
|
|
150
|
+
dtoClassNameSuffix: buildDtoSuffix(normalizedOptions),
|
|
151
|
+
rowValueProperty: toValue.property.name,
|
|
152
|
+
rowDisplayProperty: toDisplay.property.name,
|
|
153
|
+
context,
|
|
154
|
+
upstream
|
|
155
|
+
}),
|
|
156
|
+
(0, schematics_ts_morph_1.CoerceFormProviderRule)({
|
|
157
|
+
project,
|
|
158
|
+
feature,
|
|
159
|
+
directory,
|
|
160
|
+
providerObject: tableDataSourceName,
|
|
161
|
+
importStructures: [
|
|
162
|
+
{
|
|
163
|
+
namedImports: [tableDataSourceName],
|
|
164
|
+
moduleSpecifier: tableDataSourceImportPath,
|
|
165
|
+
},
|
|
166
|
+
],
|
|
167
|
+
}),
|
|
168
|
+
(0, schematics_ts_morph_1.CoerceTableDataSourceRule)({
|
|
169
|
+
scope,
|
|
170
|
+
project,
|
|
171
|
+
feature,
|
|
172
|
+
directory: tableDataSourceDirectory,
|
|
173
|
+
shared,
|
|
174
|
+
name: [name, 'select-table'].join('-'),
|
|
175
|
+
operationId: optionsOperationId,
|
|
176
|
+
}),
|
|
177
|
+
(0, schematics_ts_morph_1.CoerceFormDefinitionControl)({
|
|
178
|
+
project,
|
|
179
|
+
feature,
|
|
180
|
+
directory,
|
|
181
|
+
formName,
|
|
182
|
+
name,
|
|
183
|
+
type,
|
|
184
|
+
isArray,
|
|
185
|
+
state,
|
|
186
|
+
isRequired,
|
|
187
|
+
validatorList,
|
|
188
|
+
coerceFormControl: (sourceFile, classDeclaration, control) => {
|
|
189
|
+
const { propertyDeclaration, decoratorDeclaration, } = (0, schematics_ts_morph_1.CoerceFormControl)(sourceFile, classDeclaration, control);
|
|
190
|
+
const tableSelectOperationResponseClassName = (0, ts_morph_1.OperationIdToResponseClassName)(optionsOperationId);
|
|
191
|
+
(0, ts_morph_1.CoerceImports)(sourceFile, {
|
|
192
|
+
namedImports: [tableSelectOperationResponseClassName],
|
|
193
|
+
moduleSpecifier: (0, ts_morph_1.OperationIdToResponseClassImportPath)(optionsOperationId),
|
|
194
|
+
});
|
|
195
|
+
(0, ts_morph_1.CoerceDecorator)(propertyDeclaration, 'UseTableSelectDataSource').set({
|
|
196
|
+
arguments: [tableDataSourceName],
|
|
197
|
+
});
|
|
198
|
+
(0, ts_morph_1.CoerceDecorator)(propertyDeclaration, `UseTableSelectToDisplay<${tableSelectOperationResponseClassName}['rows'][number]>`).set({
|
|
199
|
+
arguments: [`item => item.${toDisplay.property.name}`],
|
|
200
|
+
});
|
|
201
|
+
(0, ts_morph_1.CoerceDecorator)(propertyDeclaration, `UseTableSelectToValue<${tableSelectOperationResponseClassName}['rows'][number]>`).set({
|
|
202
|
+
arguments: [`item => item.${toValue.property.name}`],
|
|
203
|
+
});
|
|
204
|
+
(0, ts_morph_1.CoerceImports)(sourceFile, {
|
|
205
|
+
namedImports: [tableDataSourceName],
|
|
206
|
+
moduleSpecifier: tableDataSourceImportPath,
|
|
207
|
+
});
|
|
208
|
+
(0, ts_morph_1.CoerceDecorator)(propertyDeclaration, 'UseTableSelectColumns').set({
|
|
209
|
+
arguments: [TableColumnListToTableSelectColumnMap(columnList)],
|
|
210
|
+
});
|
|
211
|
+
(0, ts_morph_1.CoerceImports)(sourceFile, {
|
|
212
|
+
namedImports: [
|
|
213
|
+
'UseTableSelectDataSource',
|
|
214
|
+
'UseTableSelectColumns',
|
|
215
|
+
'UseTableSelectToDisplay',
|
|
216
|
+
'UseTableSelectToValue'
|
|
217
|
+
],
|
|
218
|
+
moduleSpecifier: '@digitaix/eurogard-table-select',
|
|
219
|
+
});
|
|
220
|
+
return {
|
|
221
|
+
propertyDeclaration,
|
|
222
|
+
decoratorDeclaration,
|
|
223
|
+
};
|
|
224
|
+
},
|
|
225
|
+
}),
|
|
226
|
+
]);
|
|
227
|
+
}
|
|
228
|
+
function default_1(options) {
|
|
229
|
+
const normalizedOptions = NormalizeTableSelectFormControlOptions(options);
|
|
230
|
+
printOptions(normalizedOptions);
|
|
71
231
|
return () => {
|
|
72
232
|
return (0, schematics_1.chain)([
|
|
73
233
|
() => console.group('\x1b[32m[@rxap/schematics-angular:table-select-form-control]\x1b[0m'),
|
|
74
|
-
(
|
|
75
|
-
|
|
76
|
-
feature,
|
|
77
|
-
nestModule,
|
|
78
|
-
controllerName,
|
|
79
|
-
propertyList: (0, table_component_1.TableColumnListAndPropertyListToGetPageOperationPropertyList)(columnList, propertyList),
|
|
80
|
-
operationName: optionsOperationName,
|
|
81
|
-
path: optionsOperationPath,
|
|
82
|
-
dtoClassNameSuffix: tableResponseDtoName,
|
|
83
|
-
context,
|
|
84
|
-
upstream
|
|
85
|
-
}),
|
|
86
|
-
// CoerceTableSelectValueResolveOperationRule({
|
|
87
|
-
// project,
|
|
88
|
-
// feature,
|
|
89
|
-
// nestModule,
|
|
90
|
-
// controllerName,
|
|
91
|
-
// operationName: resolveValueOperationName,
|
|
92
|
-
// path: resolveValueOperationPath,
|
|
93
|
-
// responseDtoName: tableResponseDtoName,
|
|
94
|
-
// context,
|
|
95
|
-
// }),
|
|
96
|
-
(0, schematics_ts_morph_1.CoerceFormProviderRule)({
|
|
97
|
-
project,
|
|
98
|
-
feature,
|
|
99
|
-
directory,
|
|
100
|
-
providerObject: tableDataSourceName,
|
|
101
|
-
importStructures: [
|
|
102
|
-
{
|
|
103
|
-
namedImports: [tableDataSourceName],
|
|
104
|
-
moduleSpecifier: tableDataSourceImportPath,
|
|
105
|
-
},
|
|
106
|
-
],
|
|
107
|
-
}),
|
|
108
|
-
// CoerceFormProviderRule({
|
|
109
|
-
// project,
|
|
110
|
-
// feature,
|
|
111
|
-
// directory,
|
|
112
|
-
// providerObject: resolveValueMethodName,
|
|
113
|
-
// importStructures: [
|
|
114
|
-
// {
|
|
115
|
-
// namedImports: [ resolveValueMethodName ],
|
|
116
|
-
// moduleSpecifier: resolveValueMethodImportPath,
|
|
117
|
-
// },
|
|
118
|
-
// ],
|
|
119
|
-
// }),
|
|
120
|
-
(0, schematics_ts_morph_1.CoerceTableDataSourceRule)({
|
|
121
|
-
scope,
|
|
122
|
-
project,
|
|
123
|
-
feature,
|
|
124
|
-
directory: tableDataSourceDirectory,
|
|
125
|
-
shared,
|
|
126
|
-
name: [name, 'select-table'].join('-'),
|
|
127
|
-
operationId: optionsOperationId,
|
|
128
|
-
}),
|
|
129
|
-
// CoerceTableSelectResolveValueMethodRule({
|
|
130
|
-
// scope,
|
|
131
|
-
// project,
|
|
132
|
-
// feature,
|
|
133
|
-
// directory: resolveValueMethodDirectory,
|
|
134
|
-
// shared,
|
|
135
|
-
// name: [ name, 'table-select', 'value', 'resolver' ].join('-'),
|
|
136
|
-
// operationId: resolveValueOperationId,
|
|
137
|
-
// }),
|
|
138
|
-
(0, schematics_ts_morph_1.CoerceFormDefinitionControl)({
|
|
139
|
-
project,
|
|
140
|
-
feature,
|
|
141
|
-
directory,
|
|
142
|
-
formName,
|
|
143
|
-
name,
|
|
144
|
-
type,
|
|
145
|
-
isArray,
|
|
146
|
-
state,
|
|
147
|
-
isRequired,
|
|
148
|
-
validatorList,
|
|
149
|
-
coerceFormControl: (sourceFile, classDeclaration, control) => {
|
|
150
|
-
const { propertyDeclaration, decoratorDeclaration, } = (0, schematics_ts_morph_1.CoerceFormControl)(sourceFile, classDeclaration, control);
|
|
151
|
-
(0, schematics_ts_morph_1.CoerceDecorator)(propertyDeclaration, 'UseTableSelectDataSource').set({
|
|
152
|
-
arguments: [tableDataSourceName],
|
|
153
|
-
});
|
|
154
|
-
(0, schematics_ts_morph_1.CoerceDecorator)(propertyDeclaration, 'UseTableSelectToDisplay').set({
|
|
155
|
-
arguments: [`item => item.${toDisplay.property.name}`],
|
|
156
|
-
});
|
|
157
|
-
(0, schematics_ts_morph_1.CoerceDecorator)(propertyDeclaration, 'UseTableSelectToValue').set({
|
|
158
|
-
arguments: [`item => item.${toValue.property.name}`],
|
|
159
|
-
});
|
|
160
|
-
(0, schematics_ts_morph_1.CoerceImports)(sourceFile, {
|
|
161
|
-
namedImports: [tableDataSourceName],
|
|
162
|
-
moduleSpecifier: tableDataSourceImportPath,
|
|
163
|
-
});
|
|
164
|
-
// CoerceDecorator(propertyDeclaration, 'UseTableSelectMethod').set({
|
|
165
|
-
// arguments: [ resolveValueMethodName ],
|
|
166
|
-
// });
|
|
167
|
-
// CoerceImports(sourceFile, {
|
|
168
|
-
// namedImports: [ resolveValueMethodName ],
|
|
169
|
-
// moduleSpecifier: resolveValueMethodImportPath,
|
|
170
|
-
// });
|
|
171
|
-
(0, schematics_ts_morph_1.CoerceDecorator)(propertyDeclaration, 'UseTableSelectColumns').set({
|
|
172
|
-
arguments: [TableColumnListToTableSelectColumnMap(columnList)],
|
|
173
|
-
});
|
|
174
|
-
(0, schematics_ts_morph_1.CoerceImports)(sourceFile, {
|
|
175
|
-
namedImports: [
|
|
176
|
-
'UseTableSelectDataSource',
|
|
177
|
-
'UseTableSelectColumns',
|
|
178
|
-
// 'UseTableSelectMethod',
|
|
179
|
-
'UseTableSelectToDisplay',
|
|
180
|
-
'UseTableSelectToValue'
|
|
181
|
-
],
|
|
182
|
-
moduleSpecifier: '@digitaix/eurogard-table-select',
|
|
183
|
-
});
|
|
184
|
-
return {
|
|
185
|
-
propertyDeclaration,
|
|
186
|
-
decoratorDeclaration,
|
|
187
|
-
};
|
|
188
|
-
},
|
|
189
|
-
}),
|
|
234
|
+
tableSelectDataSourceRule(normalizedOptions),
|
|
235
|
+
tableSelectResolveRule(normalizedOptions),
|
|
190
236
|
(0, schematics_ts_morph_1.EnforceUseFormControlOrderRule)(normalizedOptions),
|
|
191
237
|
() => console.groupEnd(),
|
|
192
238
|
]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/schematic/angular/src/schematics/form/control/table-select-form-control/index.ts"],"names":[],"mappings":";;;AAAA,2DAAmD;AACnD,mEAYmC;AACnC,qEAIoC;AACpC,+CAGyB;AACzB,+BAA4B;AAC5B,uCAKkB;AAClB,qEAAsE;AACtE,+DAIsC;AACtC,oEAA8G;AAC9G,qDAG4B;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/schematic/angular/src/schematics/form/control/table-select-form-control/index.ts"],"names":[],"mappings":";;;AAAA,2DAAmD;AACnD,mEAYmC;AACnC,qEAIoC;AACpC,6CAMwB;AACxB,+CAGyB;AACzB,+BAA4B;AAC5B,uCAKkB;AAClB,qEAAsE;AACtE,+DAIsC;AACtC,oEAA8G;AAC9G,qDAG4B;AAS5B,SAAgB,sCAAsC,CACpD,OAAsC;IAEtC,MAAM,iBAAiB,GAAG,IAAA,0CAA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AC,mBAAmB,EAAE,uBAAuB,CAAC,CAAC,GAAG,CAAC;oBAChE,SAAS,EAAE,CAAE,qCAAqC,CAAC,UAAU,CAAC,CAAE;iBACjE,CAAC,CAAC;gBACH,IAAA,wBAAa,EAAC,UAAU,EAAE;oBACxB,YAAY,EAAE;wBACZ,0BAA0B;wBAC1B,uBAAuB;wBACvB,yBAAyB;wBACzB,uBAAuB;qBACxB;oBACD,eAAe,EAAE,iCAAiC;iBACnD,CAAC,CAAC;gBAEH,OAAO;oBACL,mBAAmB;oBACnB,oBAAoB;iBACrB,CAAC;YACJ,CAAC;SACF,CAAC;KACH,CAAC,CAAC;AAEL,CAAC;AAED,mBAAyB,OAAsC;IAC7D,MAAM,iBAAiB,GAAG,sCAAsC,CAAC,OAAO,CAAC,CAAC;IAC1E,YAAY,CAAC,iBAAiB,CAAC,CAAC;IAEhC,OAAO,GAAG,EAAE;QACV,OAAO,IAAA,kBAAK,EAAC;YACX,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,qEAAqE,CAAC;YAC1F,yBAAyB,CAAC,iBAAiB,CAAC;YAC5C,sBAAsB,CAAC,iBAAiB,CAAC;YACzC,IAAA,oDAA8B,EAAC,iBAAiB,CAAC;YACjD,GAAG,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE;SACzB,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAbD,4BAaC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Rule } from '@angular-devkit/schematics';
|
|
2
2
|
import { DtoClassProperty } from '@rxap/schematics-ts-morph';
|
|
3
3
|
import { Normalized } from '@rxap/utilities';
|
|
4
|
+
import { NormalizedAccordionIdentifier } from '../../../lib/accordion-identifier';
|
|
4
5
|
import { NormalizedAngularOptions } from '../../../lib/angular-options';
|
|
5
6
|
import { NormalizedFormComponentControl } from '../../../lib/form-component-control';
|
|
6
7
|
import { NormalizedMatFormFieldDefaultOptions } from '../../../lib/mat-form-field-default-options';
|
|
@@ -11,6 +12,7 @@ export interface NormalizedFormComponentOptions extends Omit<Readonly<Normalized
|
|
|
11
12
|
controlList: ReadonlyArray<NormalizedFormComponentControl>;
|
|
12
13
|
name: string;
|
|
13
14
|
matFormFieldDefaultOptions: NormalizedMatFormFieldDefaultOptions | null;
|
|
15
|
+
identifier: NormalizedAccordionIdentifier | null;
|
|
14
16
|
}
|
|
15
17
|
export declare function NormalizeFormComponentOptions(options: Readonly<FormComponentOptions>): Readonly<NormalizedFormComponentOptions>;
|
|
16
18
|
export declare function FormComponentControlToDtoClassProperty(control: NormalizedFormComponentControl): DtoClassProperty;
|
|
@@ -7,10 +7,12 @@ const schematics_ts_morph_1 = require("@rxap/schematics-ts-morph");
|
|
|
7
7
|
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
8
8
|
const utilities_1 = require("@rxap/utilities");
|
|
9
9
|
const path_1 = require("path");
|
|
10
|
+
const accordion_identifier_1 = require("../../../lib/accordion-identifier");
|
|
10
11
|
const angular_options_1 = require("../../../lib/angular-options");
|
|
11
12
|
const backend_types_1 = require("../../../lib/backend-types");
|
|
12
13
|
const coerce_form_component_1 = require("../../../lib/coerce-form-component");
|
|
13
14
|
const form_component_control_1 = require("../../../lib/form-component-control");
|
|
15
|
+
const load_handlebars_template_1 = require("../../../lib/load-handlebars-template");
|
|
14
16
|
const mat_form_field_default_options_1 = require("../../../lib/mat-form-field-default-options");
|
|
15
17
|
function NormalizeFormComponentOptions(options) {
|
|
16
18
|
var _a, _b, _c, _d;
|
|
@@ -23,7 +25,7 @@ function NormalizeFormComponentOptions(options) {
|
|
|
23
25
|
nestModule,
|
|
24
26
|
});
|
|
25
27
|
return Object.freeze(Object.assign(Object.assign({}, normalizedAngularOptions), { window: (_b = options.window) !== null && _b !== void 0 ? _b : false, directory: (0, path_1.join)((_c = options.directory) !== null && _c !== void 0 ? _c : '', componentName), role: (_d = options.role) !== null && _d !== void 0 ? _d : null, componentName,
|
|
26
|
-
controllerName, controlList: (0, form_component_control_1.NormalizeFormComponentControlList)(options.controlList), context: options.context ? (0, utilities_1.dasherize)(options.context) : null, matFormFieldDefaultOptions: (0, mat_form_field_default_options_1.NormalizeMatFormFieldDefaultOptions)(options.matFormFieldDefaultOptions) }));
|
|
28
|
+
controllerName, controlList: (0, form_component_control_1.NormalizeFormComponentControlList)(options.controlList), context: options.context ? (0, utilities_1.dasherize)(options.context) : null, matFormFieldDefaultOptions: (0, mat_form_field_default_options_1.NormalizeMatFormFieldDefaultOptions)(options.matFormFieldDefaultOptions), identifier: (0, accordion_identifier_1.NormalizeAccordionIdentifier)(options.identifier) }));
|
|
27
29
|
}
|
|
28
30
|
exports.NormalizeFormComponentOptions = NormalizeFormComponentOptions;
|
|
29
31
|
function FormComponentControlToDtoClassProperty(control) {
|
|
@@ -45,6 +47,12 @@ function componentRule(normalizedOptions) {
|
|
|
45
47
|
name: componentName,
|
|
46
48
|
directory,
|
|
47
49
|
overwrite,
|
|
50
|
+
handlebars: {
|
|
51
|
+
partials: {
|
|
52
|
+
matFormField: (0, load_handlebars_template_1.LoadMatFormFieldHandlebarsTemplate)(),
|
|
53
|
+
pipe: (0, load_handlebars_template_1.LoadPipeHandlebarsTemplate)(),
|
|
54
|
+
}
|
|
55
|
+
},
|
|
48
56
|
template: {
|
|
49
57
|
options: Object.assign(Object.assign({}, normalizedOptions), { OperationIdToClassName: schematics_ts_morph_1.OperationIdToClassName,
|
|
50
58
|
OperationIdToClassImportPath: schematics_ts_morph_1.OperationIdToClassImportPath }),
|
|
@@ -108,7 +116,7 @@ function formSubmitProviderRule(normalizedOptions) {
|
|
|
108
116
|
]);
|
|
109
117
|
}
|
|
110
118
|
function formSubmitBackendRule(normalizedOptions) {
|
|
111
|
-
const { backend, project, feature, controlList, controllerName, nestModule, shared, } = normalizedOptions;
|
|
119
|
+
const { backend, project, feature, controlList, controllerName, nestModule, shared, identifier, } = normalizedOptions;
|
|
112
120
|
switch (backend) {
|
|
113
121
|
case backend_types_1.BackendTypes.NESTJS:
|
|
114
122
|
return (0, schematics_1.chain)([
|
|
@@ -119,6 +127,7 @@ function formSubmitBackendRule(normalizedOptions) {
|
|
|
119
127
|
feature,
|
|
120
128
|
shared,
|
|
121
129
|
nestModule,
|
|
130
|
+
idProperty: identifier === null || identifier === void 0 ? void 0 : identifier.property,
|
|
122
131
|
propertyList: controlList.map(FormComponentControlToDtoClassProperty),
|
|
123
132
|
bodyDtoName: controllerName,
|
|
124
133
|
}),
|
|
@@ -154,12 +163,12 @@ function windowRule(normalizedOptions) {
|
|
|
154
163
|
return (0, schematics_1.noop)();
|
|
155
164
|
}
|
|
156
165
|
function getSubmitOperationId(normalizedOptions) {
|
|
157
|
-
const { project, feature, shared, controllerName, } = normalizedOptions;
|
|
166
|
+
const { project, feature, shared, controllerName, identifier, } = normalizedOptions;
|
|
158
167
|
return (0, schematics_ts_morph_1.buildOperationId)({
|
|
159
168
|
project,
|
|
160
169
|
feature,
|
|
161
170
|
shared,
|
|
162
|
-
}, 'submit', controllerName);
|
|
171
|
+
}, identifier ? 'submitById' : 'submit', controllerName);
|
|
163
172
|
}
|
|
164
173
|
function printFormComponentOptions(options) {
|
|
165
174
|
(0, angular_options_1.PrintAngularOptions)('form-component', options);
|
|
@@ -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,mEASmC;AACnC,qEAGoC;AACpC,+CAGyB;AACzB,+BAA4B;AAC5B,4EAG2C;AAC3C,kEAKsC;AACtC,8DAA0D;AAC1D,8EAA6E;AAC7E,gFAG6C;AAC7C,oFAG+C;AAC/C,gGAGqD;AAcrD,SAAgB,6BAA6B,C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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,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AccordionIdentifier } from '../../../lib/accordion-identifier';
|
|
2
2
|
import { AngularOptions } from '../../../lib/angular-options';
|
|
3
|
+
import { FormComponentControl } from '../../../lib/form-component-control';
|
|
3
4
|
import { MatFormFieldDefaultOptions } from '../../../lib/mat-form-field-default-options';
|
|
4
5
|
|
|
5
6
|
export interface FormComponentOptions extends AngularOptions {
|
|
@@ -7,4 +8,5 @@ export interface FormComponentOptions extends AngularOptions {
|
|
|
7
8
|
controlList?: Array<FormComponentControl>;
|
|
8
9
|
role?: string;
|
|
9
10
|
matFormFieldDefaultOptions?: MatFormFieldDefaultOptions;
|
|
11
|
+
identifier?: AccordionIdentifier;
|
|
10
12
|
}
|