@rxap/schematic-angular 16.1.0-dev.7 → 16.1.0-dev.9
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 +12 -0
- package/README.md +1 -1
- package/package.json +14 -13
- package/src/lib/accordion-item.js +19 -17
- package/src/lib/accordion-item.js.map +1 -1
- package/src/lib/accordion-itme-types.js +7 -3
- package/src/lib/accordion-itme-types.js.map +1 -1
- package/src/lib/adapter-options.js +6 -2
- package/src/lib/adapter-options.js.map +1 -1
- package/src/lib/angular-options.js +22 -31
- package/src/lib/angular-options.js.map +1 -1
- package/src/lib/assert-table-component-exists.js +9 -5
- package/src/lib/assert-table-component-exists.js.map +1 -1
- package/src/lib/backend-types.js +5 -2
- package/src/lib/backend-types.js.map +1 -1
- package/src/lib/data-grid-item.js +12 -5
- package/src/lib/data-grid-item.js.map +1 -1
- package/src/lib/data-grid-options.js +13 -8
- package/src/lib/data-grid-options.js.map +1 -1
- package/src/lib/dialog-action.js +14 -7
- package/src/lib/dialog-action.js.map +1 -1
- package/src/lib/existing-method.js +5 -1
- package/src/lib/existing-method.js.map +1 -1
- package/src/lib/form-component-control.js +16 -9
- package/src/lib/form-component-control.js.map +1 -1
- package/src/lib/form-definition-control.js +17 -9
- package/src/lib/form-definition-control.js.map +1 -1
- package/src/lib/minimum-table-component-options.js +92 -121
- package/src/lib/minimum-table-component-options.js.map +1 -1
- package/src/lib/minimum-table-options.js +17 -12
- package/src/lib/minimum-table-options.js.map +1 -1
- package/src/lib/table-action.js +37 -33
- package/src/lib/table-action.js.map +1 -1
- package/src/lib/table-column.js +27 -20
- package/src/lib/table-column.js.map +1 -1
- package/src/lib/table-header-button.js +20 -15
- package/src/lib/table-header-button.js.map +1 -1
- package/src/lib/table-open-api-options.js +8 -4
- package/src/lib/table-open-api-options.js.map +1 -1
- package/src/lib/table-options.js +15 -13
- package/src/lib/table-options.js.map +1 -1
- package/src/lib/table-row-action.js +18 -13
- package/src/lib/table-row-action.js.map +1 -1
- package/src/lib/to-title.js +8 -4
- package/src/lib/to-title.js.map +1 -1
- package/src/lib/tree-table-options.js +13 -11
- package/src/lib/tree-table-options.js.map +1 -1
- package/src/schematics/accordion/accordion-component/index.js +105 -125
- package/src/schematics/accordion/accordion-component/index.js.map +1 -1
- package/src/schematics/accordion/accordion-item-component/index.js +107 -119
- package/src/schematics/accordion/accordion-item-component/index.js.map +1 -1
- package/src/schematics/accordion/item/accordion-item-data-grid-component/index.js +54 -55
- package/src/schematics/accordion/item/accordion-item-data-grid-component/index.js.map +1 -1
- package/src/schematics/accordion/item/accordion-item-table-component/index.js +36 -38
- package/src/schematics/accordion/item/accordion-item-table-component/index.js.map +1 -1
- package/src/schematics/accordion/item/accordion-item-tree-table-component/index.js +52 -54
- package/src/schematics/accordion/item/accordion-item-tree-table-component/index.js.map +1 -1
- package/src/schematics/data-grid-component/index.js +81 -87
- package/src/schematics/data-grid-component/index.js.map +1 -1
- package/src/schematics/dialog-component/index.js +20 -21
- package/src/schematics/dialog-component/index.js.map +1 -1
- package/src/schematics/form/control/input-form-control/index.js +18 -15
- package/src/schematics/form/control/input-form-control/index.js.map +1 -1
- package/src/schematics/form/control/select-form-control/index.js +43 -41
- package/src/schematics/form/control/select-form-control/index.js.map +1 -1
- package/src/schematics/form/control/table-select-form-control/index.js +58 -56
- package/src/schematics/form/control/table-select-form-control/index.js.map +1 -1
- package/src/schematics/form/form-component/index.js +54 -62
- package/src/schematics/form/form-component/index.js.map +1 -1
- package/src/schematics/form/form-control/index.js +23 -22
- package/src/schematics/form/form-control/index.js.map +1 -1
- package/src/schematics/form/form-definition/index.js +18 -16
- package/src/schematics/form/form-definition/index.js.map +1 -1
- package/src/schematics/table/action/dialog-table-action/index.js +30 -30
- package/src/schematics/table/action/dialog-table-action/index.js.map +1 -1
- package/src/schematics/table/action/form-table-action/index.js +56 -67
- package/src/schematics/table/action/form-table-action/index.js.map +1 -1
- package/src/schematics/table/action/navigation-table-action/index.js +20 -17
- package/src/schematics/table/action/navigation-table-action/index.js.map +1 -1
- package/src/schematics/table/action/operation-table-action/index.js +31 -30
- package/src/schematics/table/action/operation-table-action/index.js.map +1 -1
- package/src/schematics/table/header-button/form-table-header-button/index.js +29 -36
- package/src/schematics/table/header-button/form-table-header-button/index.js.map +1 -1
- package/src/schematics/table/header-button/navigation-table-header-button/index.js +23 -21
- package/src/schematics/table/header-button/navigation-table-header-button/index.js.map +1 -1
- package/src/schematics/table/table-action/index.js +23 -22
- package/src/schematics/table/table-action/index.js.map +1 -1
- package/src/schematics/table/table-component/index.js +93 -92
- package/src/schematics/table/table-component/index.js.map +1 -1
- package/src/schematics/table/table-header-button/index.js +21 -20
- package/src/schematics/table/table-header-button/index.js.map +1 -1
- package/src/schematics/table/tree-table-component/index.js +63 -66
- package/src/schematics/table/tree-table-component/index.js.map +1 -1
- package/src/schematics/tree-component/index.js +18 -18
- package/src/schematics/tree-component/index.js.map +1 -1
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
});
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NormalizeAccordionItemDataGridComponentOptions = void 0;
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
+
const accordion_item_component_1 = require("../../accordion-item-component");
|
|
6
|
+
const schematics_ts_morph_1 = require("@rxap/schematics-ts-morph");
|
|
7
|
+
const angular_options_1 = require("../../../../lib/angular-options");
|
|
8
|
+
const backend_types_1 = require("../../../../lib/backend-types");
|
|
9
|
+
const data_grid_options_1 = require("../../../../lib/data-grid-options");
|
|
10
|
+
const path_1 = require("path");
|
|
11
|
+
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
12
|
+
const core_1 = require("@angular-devkit/core");
|
|
13
|
+
function NormalizeAccordionItemDataGridComponentOptions(options) {
|
|
14
|
+
const normalizedAccordionItemComponentOptions = (0, accordion_item_component_1.NormalizeAccordionItemStandaloneComponentOptions)(options);
|
|
15
|
+
return Object.seal(Object.assign(Object.assign({}, normalizedAccordionItemComponentOptions), { dataGrid: (0, data_grid_options_1.NormalizeDataGridOptions)(options.dataGrid) }));
|
|
16
16
|
}
|
|
17
|
+
exports.NormalizeAccordionItemDataGridComponentOptions = NormalizeAccordionItemDataGridComponentOptions;
|
|
17
18
|
function printOptions(options) {
|
|
18
|
-
PrintAngularOptions('accordion-item-data-grid-component', options);
|
|
19
|
+
(0, angular_options_1.PrintAngularOptions)('accordion-item-data-grid-component', options);
|
|
19
20
|
if (options.dataGrid.itemList.length) {
|
|
20
21
|
console.log(`=== items: \x1b[34m${options.dataGrid.itemList.map((item) => item.name).join(', ')}\x1b[0m`);
|
|
21
22
|
}
|
|
@@ -24,17 +25,13 @@ function printOptions(options) {
|
|
|
24
25
|
}
|
|
25
26
|
}
|
|
26
27
|
function componentRule(normalizedOptions) {
|
|
28
|
+
var _a, _b, _c;
|
|
27
29
|
const { itemName, nestModule, directory, project, feature, overwrite, componentName, shared, backend, dataGrid, } = normalizedOptions;
|
|
28
|
-
const { hasSharedModifier, hasCollectionModifier, hasEditModifier, } = GetItemOptions(normalizedOptions);
|
|
29
|
-
const templateOptions = {
|
|
30
|
-
|
|
31
|
-
...normalizedOptions,
|
|
32
|
-
name: itemName,
|
|
33
|
-
...GetItemOptions(normalizedOptions),
|
|
34
|
-
};
|
|
35
|
-
return chain([
|
|
30
|
+
const { hasSharedModifier, hasCollectionModifier, hasEditModifier, } = (0, accordion_item_component_1.GetItemOptions)(normalizedOptions);
|
|
31
|
+
const templateOptions = Object.assign(Object.assign(Object.assign(Object.assign({}, core_1.strings), normalizedOptions), { name: itemName }), (0, accordion_item_component_1.GetItemOptions)(normalizedOptions));
|
|
32
|
+
return (0, schematics_1.chain)([
|
|
36
33
|
() => console.log(`Coerce data grid component ...`),
|
|
37
|
-
ExecuteSchematic('data-grid-component', {
|
|
34
|
+
(0, schematics_utilities_1.ExecuteSchematic)('data-grid-component', {
|
|
38
35
|
project,
|
|
39
36
|
feature,
|
|
40
37
|
shared: hasSharedModifier,
|
|
@@ -42,13 +39,13 @@ function componentRule(normalizedOptions) {
|
|
|
42
39
|
nestModule: hasSharedModifier ? undefined : nestModule,
|
|
43
40
|
nestController: itemName,
|
|
44
41
|
directory: hasSharedModifier ? undefined : directory,
|
|
45
|
-
itemList: dataGrid
|
|
46
|
-
collection: hasCollectionModifier || (dataGrid
|
|
47
|
-
mode: hasEditModifier ? 'form' : (dataGrid
|
|
42
|
+
itemList: (_a = dataGrid === null || dataGrid === void 0 ? void 0 : dataGrid.itemList) !== null && _a !== void 0 ? _a : [],
|
|
43
|
+
collection: hasCollectionModifier || ((_b = dataGrid === null || dataGrid === void 0 ? void 0 : dataGrid.collection) !== null && _b !== void 0 ? _b : false),
|
|
44
|
+
mode: hasEditModifier ? 'form' : ((_c = dataGrid === null || dataGrid === void 0 ? void 0 : dataGrid.mode) !== null && _c !== void 0 ? _c : 'plain'),
|
|
48
45
|
backend: backend,
|
|
49
46
|
overwrite,
|
|
50
47
|
}),
|
|
51
|
-
CoerceComponentRule({
|
|
48
|
+
(0, schematics_ts_morph_1.CoerceComponentRule)({
|
|
52
49
|
name: componentName,
|
|
53
50
|
project,
|
|
54
51
|
feature,
|
|
@@ -64,23 +61,24 @@ function componentRule(normalizedOptions) {
|
|
|
64
61
|
}
|
|
65
62
|
function nestjsBackendRule(normalizedOptions) {
|
|
66
63
|
const { itemName, nestModule, directory, project, feature, shared, } = normalizedOptions;
|
|
67
|
-
const { hasSharedModifier, hasCollectionModifier, hasEditModifier, } = GetItemOptions(normalizedOptions);
|
|
64
|
+
const { hasSharedModifier, hasCollectionModifier, hasEditModifier, } = (0, accordion_item_component_1.GetItemOptions)(normalizedOptions);
|
|
68
65
|
const rules = ([
|
|
69
66
|
() => console.log(`Modify the data source class ...`),
|
|
70
|
-
CoerceDataSourceClass({
|
|
67
|
+
(0, schematics_ts_morph_1.CoerceDataSourceClass)({
|
|
71
68
|
project,
|
|
72
69
|
feature,
|
|
73
70
|
shared: hasSharedModifier,
|
|
74
|
-
directory: join(directory
|
|
75
|
-
name: CoerceSuffix(itemName, '-data-grid'),
|
|
71
|
+
directory: (0, path_1.join)(directory !== null && directory !== void 0 ? directory : '', (0, schematics_utilities_1.CoerceSuffix)(itemName, '-data-grid')),
|
|
72
|
+
name: (0, schematics_utilities_1.CoerceSuffix)(itemName, '-data-grid'),
|
|
76
73
|
tsMorphTransform: (project, sourceFile, classDeclaration) => {
|
|
77
|
-
|
|
78
|
-
const
|
|
74
|
+
var _a;
|
|
75
|
+
const current = (_a = classDeclaration.getExtends()) === null || _a === void 0 ? void 0 : _a.getText();
|
|
76
|
+
const match = current === null || current === void 0 ? void 0 : current.match(/<([^>]+)>/);
|
|
79
77
|
if (!match) {
|
|
80
|
-
throw new SchematicsException(`Could not extract the generic type from '${current}'!`);
|
|
78
|
+
throw new schematics_1.SchematicsException(`Could not extract the generic type from '${current}'!`);
|
|
81
79
|
}
|
|
82
80
|
classDeclaration.setExtends(`PanelAccordionDataSource<${match[1]}>`);
|
|
83
|
-
CoerceImports(sourceFile, {
|
|
81
|
+
(0, schematics_ts_morph_1.CoerceImports)(sourceFile, {
|
|
84
82
|
namedImports: [
|
|
85
83
|
'PanelAccordionDataSource',
|
|
86
84
|
'AccordionDataSource',
|
|
@@ -88,19 +86,19 @@ function nestjsBackendRule(normalizedOptions) {
|
|
|
88
86
|
],
|
|
89
87
|
moduleSpecifier: '@rxap/data-source/accordion',
|
|
90
88
|
});
|
|
91
|
-
CoerceImports(sourceFile, {
|
|
89
|
+
(0, schematics_ts_morph_1.CoerceImports)(sourceFile, {
|
|
92
90
|
moduleSpecifier: '@angular/router',
|
|
93
91
|
namedImports: ['ActivatedRoute'],
|
|
94
92
|
});
|
|
95
|
-
CoerceImports(sourceFile, {
|
|
93
|
+
(0, schematics_ts_morph_1.CoerceImports)(sourceFile, {
|
|
96
94
|
moduleSpecifier: '@angular/core',
|
|
97
95
|
namedImports: ['Inject'],
|
|
98
96
|
});
|
|
99
|
-
const [constructorDeclaration] = CoerceClassConstructor(classDeclaration);
|
|
100
|
-
CoerceParameterDeclaration(constructorDeclaration, 'route').set({
|
|
97
|
+
const [constructorDeclaration] = (0, schematics_ts_morph_1.CoerceClassConstructor)(classDeclaration);
|
|
98
|
+
(0, schematics_ts_morph_1.CoerceParameterDeclaration)(constructorDeclaration, 'route').set({
|
|
101
99
|
type: 'ActivatedRoute',
|
|
102
100
|
});
|
|
103
|
-
CoerceParameterDeclaration(constructorDeclaration, 'accordionDataSource').set({
|
|
101
|
+
(0, schematics_ts_morph_1.CoerceParameterDeclaration)(constructorDeclaration, 'accordionDataSource').set({
|
|
104
102
|
type: 'AccordionDataSource',
|
|
105
103
|
decorators: [
|
|
106
104
|
{
|
|
@@ -109,13 +107,13 @@ function nestjsBackendRule(normalizedOptions) {
|
|
|
109
107
|
},
|
|
110
108
|
],
|
|
111
109
|
});
|
|
112
|
-
CoerceStatements(constructorDeclaration, [
|
|
110
|
+
(0, schematics_ts_morph_1.CoerceStatements)(constructorDeclaration, [
|
|
113
111
|
`super(method, route, accordionDataSource);`,
|
|
114
112
|
]);
|
|
115
113
|
},
|
|
116
114
|
}),
|
|
117
115
|
() => console.log(`Modify the get data grid operation ...`),
|
|
118
|
-
CoerceGetDataGridOperation({
|
|
116
|
+
(0, schematics_ts_morph_1.CoerceGetDataGridOperation)({
|
|
119
117
|
controllerName: itemName,
|
|
120
118
|
project,
|
|
121
119
|
feature,
|
|
@@ -133,7 +131,7 @@ function nestjsBackendRule(normalizedOptions) {
|
|
|
133
131
|
}),
|
|
134
132
|
]);
|
|
135
133
|
if (hasEditModifier) {
|
|
136
|
-
rules.push(() => console.log(`Modify the submit data grid operation ...`), CoerceSubmitDataGridOperation({
|
|
134
|
+
rules.push(() => console.log(`Modify the submit data grid operation ...`), (0, schematics_ts_morph_1.CoerceSubmitDataGridOperation)({
|
|
137
135
|
controllerName: itemName,
|
|
138
136
|
nestModule: hasSharedModifier ? undefined : nestModule,
|
|
139
137
|
project,
|
|
@@ -150,24 +148,24 @@ function nestjsBackendRule(normalizedOptions) {
|
|
|
150
148
|
skipCoerce: true,
|
|
151
149
|
}));
|
|
152
150
|
}
|
|
153
|
-
return chain(rules);
|
|
151
|
+
return (0, schematics_1.chain)(rules);
|
|
154
152
|
}
|
|
155
153
|
function backendRule(normalizedOptions) {
|
|
156
154
|
const { backend } = normalizedOptions;
|
|
157
155
|
switch (backend) {
|
|
158
|
-
case BackendTypes.NESTJS:
|
|
156
|
+
case backend_types_1.BackendTypes.NESTJS:
|
|
159
157
|
return nestjsBackendRule(normalizedOptions);
|
|
160
158
|
}
|
|
161
|
-
return noop();
|
|
159
|
+
return (0, schematics_1.noop)();
|
|
162
160
|
}
|
|
163
161
|
function dataGridFormModeRule(normalizedOptions) {
|
|
164
162
|
const { itemName, directory, project, feature, } = normalizedOptions;
|
|
165
|
-
return chain([
|
|
163
|
+
return (0, schematics_1.chain)([
|
|
166
164
|
() => console.log(`Extend the form component providers ...`),
|
|
167
|
-
CoerceFormComponentProviderRule({
|
|
165
|
+
(0, schematics_ts_morph_1.CoerceFormComponentProviderRule)({
|
|
168
166
|
project,
|
|
169
167
|
feature,
|
|
170
|
-
directory: join(directory
|
|
168
|
+
directory: (0, path_1.join)(directory !== null && directory !== void 0 ? directory : '', (0, schematics_utilities_1.CoerceSuffix)(itemName, '-data-grid')),
|
|
171
169
|
providerObject: {
|
|
172
170
|
provide: 'RXAP_FORM_CONTEXT',
|
|
173
171
|
useFactory: 'FormContextFromActivatedRouteFactory',
|
|
@@ -193,20 +191,21 @@ function dataGridFormModeRule(normalizedOptions) {
|
|
|
193
191
|
function dataGridModeRule(normalizedOptions) {
|
|
194
192
|
const { dataGrid: { mode } } = normalizedOptions;
|
|
195
193
|
switch (mode) {
|
|
196
|
-
case DataGridMode.Form:
|
|
194
|
+
case data_grid_options_1.DataGridMode.Form:
|
|
197
195
|
return dataGridFormModeRule(normalizedOptions);
|
|
198
196
|
}
|
|
199
|
-
return noop();
|
|
197
|
+
return (0, schematics_1.noop)();
|
|
200
198
|
}
|
|
201
|
-
|
|
199
|
+
function default_1(options) {
|
|
202
200
|
const normalizedOptions = NormalizeAccordionItemDataGridComponentOptions(options);
|
|
203
201
|
printOptions(normalizedOptions);
|
|
204
202
|
return () => {
|
|
205
|
-
return chain([
|
|
203
|
+
return (0, schematics_1.chain)([
|
|
206
204
|
componentRule(normalizedOptions),
|
|
207
205
|
backendRule(normalizedOptions),
|
|
208
206
|
dataGridModeRule(normalizedOptions),
|
|
209
207
|
]);
|
|
210
208
|
};
|
|
211
209
|
}
|
|
210
|
+
exports.default = default_1;
|
|
212
211
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/schematic/angular/src/schematics/accordion/item/accordion-item-data-grid-component/index.ts"],"names":[],"mappings":"AACA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/schematic/angular/src/schematics/accordion/item/accordion-item-data-grid-component/index.ts"],"names":[],"mappings":";;;AACA,2DAIoC;AACpC,6EAIwC;AACxC,mEAUmC;AACnC,qEAGyC;AACzC,iEAA6D;AAE7D,yEAI2C;AAC3C,+BAA4B;AAC5B,qEAGoC;AAMpC,+CAA+C;AAO/C,SAAgB,8CAA8C,CAC5D,OAAwD;IAExD,MAAM,uCAAuC,GAAG,IAAA,2EAAgD,EAAC,OAAO,CAAC,CAAC;IAC1G,OAAO,MAAM,CAAC,IAAI,iCACb,uCAAuC,KAC1C,QAAQ,EAAE,IAAA,4CAAwB,EAAC,OAAO,CAAC,QAAQ,CAAC,IACpD,CAAC;AACL,CAAC;AAR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A8C;IACrE,MAAM,iBAAiB,GAAG,8CAA8C,CAAC,OAAO,CAAC,CAAC;IAClF,YAAY,CAAC,iBAAiB,CAAC,CAAC;IAChC,OAAO,GAAG,EAAE;QACV,OAAO,IAAA,kBAAK,EAAC;YACX,aAAa,CAAC,iBAAiB,CAAC;YAChC,WAAW,CAAC,iBAAiB,CAAC;YAC9B,gBAAgB,CAAC,iBAAiB,CAAC;SACpC,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAVD,4BAUC"}
|
|
@@ -1,33 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NormalizeAccordionItemTableComponentOptions = void 0;
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
+
const accordion_item_component_1 = require("../../accordion-item-component");
|
|
6
|
+
const schematics_ts_morph_1 = require("@rxap/schematics-ts-morph");
|
|
7
|
+
const angular_options_1 = require("../../../../lib/angular-options");
|
|
8
|
+
const backend_types_1 = require("../../../../lib/backend-types");
|
|
9
|
+
const table_options_1 = require("../../../../lib/table-options");
|
|
10
|
+
const core_1 = require("@angular-devkit/core");
|
|
11
|
+
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
12
|
+
function NormalizeAccordionItemTableComponentOptions(options) {
|
|
13
|
+
const normalizedAccordionItemComponentOptions = (0, accordion_item_component_1.NormalizeAccordionItemStandaloneComponentOptions)(options);
|
|
11
14
|
const { itemName } = normalizedAccordionItemComponentOptions;
|
|
12
|
-
return Object.seal({
|
|
13
|
-
...normalizedAccordionItemComponentOptions,
|
|
14
|
-
table: NormalizeTableOptions(options.table, itemName),
|
|
15
|
-
});
|
|
15
|
+
return Object.seal(Object.assign(Object.assign({}, normalizedAccordionItemComponentOptions), { table: (0, table_options_1.NormalizeTableOptions)(options.table, itemName) }));
|
|
16
16
|
}
|
|
17
|
+
exports.NormalizeAccordionItemTableComponentOptions = NormalizeAccordionItemTableComponentOptions;
|
|
17
18
|
function printOptions(options) {
|
|
18
|
-
PrintAngularOptions('accordion-item-table-component', options);
|
|
19
|
+
(0, angular_options_1.PrintAngularOptions)('accordion-item-table-component', options);
|
|
19
20
|
}
|
|
20
21
|
function componentRule(normalizedOptions) {
|
|
21
22
|
const { componentName, project, feature, directory, shared, overwrite, itemName, } = normalizedOptions;
|
|
22
|
-
const templateOptions = {
|
|
23
|
-
|
|
24
|
-
...normalizedOptions,
|
|
25
|
-
name: itemName,
|
|
26
|
-
...GetItemOptions(normalizedOptions),
|
|
27
|
-
};
|
|
28
|
-
return chain([
|
|
23
|
+
const templateOptions = Object.assign(Object.assign(Object.assign(Object.assign({}, core_1.strings), normalizedOptions), { name: itemName }), (0, accordion_item_component_1.GetItemOptions)(normalizedOptions));
|
|
24
|
+
return (0, schematics_1.chain)([
|
|
29
25
|
() => console.log(`Coerce accordion item component ...`),
|
|
30
|
-
CoerceComponentRule({
|
|
26
|
+
(0, schematics_ts_morph_1.CoerceComponentRule)({
|
|
31
27
|
name: componentName,
|
|
32
28
|
project,
|
|
33
29
|
feature,
|
|
@@ -41,24 +37,25 @@ function componentRule(normalizedOptions) {
|
|
|
41
37
|
]);
|
|
42
38
|
}
|
|
43
39
|
function tableComponentSchematicRule(normalizedOptions) {
|
|
40
|
+
var _a, _b, _c;
|
|
44
41
|
const { directory, nestModule, itemName, project, feature, overwrite, backend, table, } = normalizedOptions;
|
|
45
|
-
const { hasSharedModifier } = GetItemOptions(normalizedOptions);
|
|
46
|
-
return chain([
|
|
42
|
+
const { hasSharedModifier } = (0, accordion_item_component_1.GetItemOptions)(normalizedOptions);
|
|
43
|
+
return (0, schematics_1.chain)([
|
|
47
44
|
() => console.log(`Generate table component ...`),
|
|
48
|
-
ExecuteSchematic('table-component', {
|
|
45
|
+
(0, schematics_utilities_1.ExecuteSchematic)('table-component', {
|
|
49
46
|
shared: hasSharedModifier,
|
|
50
47
|
name: itemName,
|
|
51
48
|
project,
|
|
52
49
|
feature,
|
|
53
50
|
directory: hasSharedModifier ? undefined : directory,
|
|
54
51
|
nestModule: hasSharedModifier ? undefined : nestModule,
|
|
55
|
-
modifiers: ['without-title', ...table
|
|
52
|
+
modifiers: ['without-title', ...(_a = table === null || table === void 0 ? void 0 : table.modifiers) !== null && _a !== void 0 ? _a : []],
|
|
56
53
|
overwrite,
|
|
57
54
|
backend,
|
|
58
|
-
columnList: table
|
|
59
|
-
actionList: table
|
|
60
|
-
title: table
|
|
61
|
-
headerButton: table
|
|
55
|
+
columnList: (_b = table === null || table === void 0 ? void 0 : table.columnList) !== null && _b !== void 0 ? _b : [],
|
|
56
|
+
actionList: (_c = table === null || table === void 0 ? void 0 : table.actionList) !== null && _c !== void 0 ? _c : [],
|
|
57
|
+
title: table === null || table === void 0 ? void 0 : table.title,
|
|
58
|
+
headerButton: table === null || table === void 0 ? void 0 : table.headerButton,
|
|
62
59
|
tableMethod: table.tableMethod,
|
|
63
60
|
selectColumn: table.selectColumn,
|
|
64
61
|
}),
|
|
@@ -66,10 +63,10 @@ function tableComponentSchematicRule(normalizedOptions) {
|
|
|
66
63
|
}
|
|
67
64
|
function nestjsBackendRule(normalizedOptions) {
|
|
68
65
|
const { nestModule, itemName, project, feature, } = normalizedOptions;
|
|
69
|
-
const { hasSharedModifier } = GetItemOptions(normalizedOptions);
|
|
70
|
-
return chain([
|
|
66
|
+
const { hasSharedModifier } = (0, accordion_item_component_1.GetItemOptions)(normalizedOptions);
|
|
67
|
+
return (0, schematics_1.chain)([
|
|
71
68
|
() => console.log(`Modify the get page operation ...`),
|
|
72
|
-
CoerceGetPageOperation({
|
|
69
|
+
(0, schematics_ts_morph_1.CoerceGetPageOperation)({
|
|
73
70
|
controllerName: itemName,
|
|
74
71
|
nestModule: hasSharedModifier ? undefined : nestModule,
|
|
75
72
|
project,
|
|
@@ -90,16 +87,16 @@ function nestjsBackendRule(normalizedOptions) {
|
|
|
90
87
|
function backendRule(normalizedOptions) {
|
|
91
88
|
const { backend } = normalizedOptions;
|
|
92
89
|
switch (backend) {
|
|
93
|
-
case BackendTypes.NESTJS:
|
|
90
|
+
case backend_types_1.BackendTypes.NESTJS:
|
|
94
91
|
return nestjsBackendRule(normalizedOptions);
|
|
95
92
|
}
|
|
96
|
-
return noop();
|
|
93
|
+
return (0, schematics_1.noop)();
|
|
97
94
|
}
|
|
98
|
-
|
|
95
|
+
function default_1(options) {
|
|
99
96
|
const normalizedOptions = NormalizeAccordionItemTableComponentOptions(options);
|
|
100
97
|
printOptions(normalizedOptions);
|
|
101
98
|
return () => {
|
|
102
|
-
return chain([
|
|
99
|
+
return (0, schematics_1.chain)([
|
|
103
100
|
componentRule(normalizedOptions),
|
|
104
101
|
() => console.log(`Modify accordion item component for type table ...`),
|
|
105
102
|
tableComponentSchematicRule(normalizedOptions),
|
|
@@ -107,4 +104,5 @@ export default function (options) {
|
|
|
107
104
|
]);
|
|
108
105
|
};
|
|
109
106
|
}
|
|
107
|
+
exports.default = default_1;
|
|
110
108
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/schematic/angular/src/schematics/accordion/item/accordion-item-table-component/index.ts"],"names":[],"mappings":"AACA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/schematic/angular/src/schematics/accordion/item/accordion-item-table-component/index.ts"],"names":[],"mappings":";;;AACA,2DAGoC;AACpC,6EAIwC;AACxC,mEAGmC;AACnC,qEAGyC;AACzC,iEAA6D;AAC7D,iEAAsE;AAEtE,+CAA+C;AAC/C,qEAA8D;AAI9D,SAAgB,2CAA2C,CACzD,OAAqD;IAErD,MAAM,uCAAuC,GAAG,IAAA,2EAAgD,EAAC,OAAO,CAAC,CAAC;IAC1G,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ACT;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE,CAAC,iBAAiB;iBAC/B;aACF;YACD,UAAU,EAAE,EAAE;YACd,UAAU,EAAE,IAAI;SACjB,CAAC;KACH,CAAC,CAAC;AAEL,CAAC;AAED,SAAS,WAAW,CAAC,iBAA+D;IAElF,MAAM,EAAE,OAAO,EAAE,GAAG,iBAAiB,CAAC;IAEtC,QAAQ,OAAO,EAAE;QAEf,KAAK,4BAAY,CAAC,MAAM;YACtB,OAAO,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;KAE/C;IAED,OAAO,IAAA,iBAAI,GAAE,CAAC;AAEhB,CAAC;AAED,mBAAyB,OAA2C;IAClE,MAAM,iBAAiB,GAAG,2CAA2C,CAAC,OAAO,CAAC,CAAC;IAC/E,YAAY,CAAC,iBAAiB,CAAC,CAAC;IAChC,OAAO,GAAG,EAAE;QACV,OAAO,IAAA,kBAAK,EAAC;YACX,aAAa,CAAC,iBAAiB,CAAC;YAChC,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,oDAAoD,CAAC;YACvE,2BAA2B,CAAC,iBAAiB,CAAC;YAC9C,WAAW,CAAC,iBAAiB,CAAC;SAC/B,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAXD,4BAWC"}
|
|
@@ -1,34 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NormalizeAccordionItemTreeTableComponentOptions = void 0;
|
|
4
|
+
const core_1 = require("@angular-devkit/core");
|
|
5
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
6
|
+
const schematics_ts_morph_1 = require("@rxap/schematics-ts-morph");
|
|
7
|
+
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
8
|
+
const ts_morph_1 = require("ts-morph");
|
|
9
|
+
const angular_options_1 = require("../../../../lib/angular-options");
|
|
10
|
+
const backend_types_1 = require("../../../../lib/backend-types");
|
|
11
|
+
const tree_table_options_1 = require("../../../../lib/tree-table-options");
|
|
12
|
+
const accordion_item_component_1 = require("../../accordion-item-component");
|
|
13
|
+
function NormalizeAccordionItemTreeTableComponentOptions(options) {
|
|
14
|
+
const normalizedAccordionItemComponentOptions = (0, accordion_item_component_1.NormalizeAccordionItemStandaloneComponentOptions)(options);
|
|
12
15
|
const { itemName } = normalizedAccordionItemComponentOptions;
|
|
13
|
-
return Object.seal({
|
|
14
|
-
...normalizedAccordionItemComponentOptions,
|
|
15
|
-
table: NormalizeTreeTableOptions(options.table, itemName),
|
|
16
|
-
});
|
|
16
|
+
return Object.seal(Object.assign(Object.assign({}, normalizedAccordionItemComponentOptions), { table: (0, tree_table_options_1.NormalizeTreeTableOptions)(options.table, itemName) }));
|
|
17
17
|
}
|
|
18
|
+
exports.NormalizeAccordionItemTreeTableComponentOptions = NormalizeAccordionItemTreeTableComponentOptions;
|
|
18
19
|
function printOptions(options) {
|
|
19
|
-
PrintAngularOptions('accordion-item-tree-table-component', options);
|
|
20
|
+
(0, angular_options_1.PrintAngularOptions)('accordion-item-tree-table-component', options);
|
|
20
21
|
}
|
|
21
22
|
function componentRule(normalizedOptions) {
|
|
22
23
|
const { componentName, project, feature, directory, shared, overwrite, itemName, } = normalizedOptions;
|
|
23
|
-
const templateOptions = {
|
|
24
|
-
|
|
25
|
-
...normalizedOptions,
|
|
26
|
-
name: itemName,
|
|
27
|
-
...GetItemOptions(normalizedOptions),
|
|
28
|
-
};
|
|
29
|
-
return chain([
|
|
24
|
+
const templateOptions = Object.assign(Object.assign(Object.assign(Object.assign({}, core_1.strings), normalizedOptions), { name: itemName }), (0, accordion_item_component_1.GetItemOptions)(normalizedOptions));
|
|
25
|
+
return (0, schematics_1.chain)([
|
|
30
26
|
() => console.log(`Coerce accordion item component ...`),
|
|
31
|
-
CoerceComponentRule({
|
|
27
|
+
(0, schematics_ts_morph_1.CoerceComponentRule)({
|
|
32
28
|
name: componentName,
|
|
33
29
|
project,
|
|
34
30
|
feature,
|
|
@@ -42,22 +38,23 @@ function componentRule(normalizedOptions) {
|
|
|
42
38
|
]);
|
|
43
39
|
}
|
|
44
40
|
function treeTableComponentSchematicRule(normalizedOptions) {
|
|
41
|
+
var _a, _b, _c;
|
|
45
42
|
const { directory, nestModule, itemName, project, feature, table, overwrite, backend, } = normalizedOptions;
|
|
46
|
-
const { hasSharedModifier } = GetItemOptions(normalizedOptions);
|
|
47
|
-
return chain([
|
|
43
|
+
const { hasSharedModifier } = (0, accordion_item_component_1.GetItemOptions)(normalizedOptions);
|
|
44
|
+
return (0, schematics_1.chain)([
|
|
48
45
|
() => console.log(`Generate tree table component ...`),
|
|
49
|
-
ExecuteSchematic('tree-table-component', {
|
|
46
|
+
(0, schematics_utilities_1.ExecuteSchematic)('tree-table-component', {
|
|
50
47
|
shared: hasSharedModifier,
|
|
51
48
|
name: itemName,
|
|
52
49
|
project,
|
|
53
50
|
feature,
|
|
54
51
|
directory: hasSharedModifier ? undefined : directory,
|
|
55
|
-
columnList: table
|
|
56
|
-
actionList: table
|
|
57
|
-
title: table
|
|
58
|
-
headerButton: table
|
|
52
|
+
columnList: (_a = table === null || table === void 0 ? void 0 : table.columnList) !== null && _a !== void 0 ? _a : [],
|
|
53
|
+
actionList: (_b = table === null || table === void 0 ? void 0 : table.actionList) !== null && _b !== void 0 ? _b : [],
|
|
54
|
+
title: table === null || table === void 0 ? void 0 : table.title,
|
|
55
|
+
headerButton: table === null || table === void 0 ? void 0 : table.headerButton,
|
|
59
56
|
nestModule: hasSharedModifier ? undefined : nestModule,
|
|
60
|
-
modifiers: ['without-title', ...table
|
|
57
|
+
modifiers: ['without-title', ...(_c = table === null || table === void 0 ? void 0 : table.modifiers) !== null && _c !== void 0 ? _c : []],
|
|
61
58
|
tableChildMethod: table.tableChildMethod,
|
|
62
59
|
tableRootMethod: table.tableRootMethod,
|
|
63
60
|
overwrite,
|
|
@@ -67,14 +64,14 @@ function treeTableComponentSchematicRule(normalizedOptions) {
|
|
|
67
64
|
}
|
|
68
65
|
function nestjsBackendRule(normalizedOptions) {
|
|
69
66
|
const { itemName, nestModule, directory, project, feature, shared, scope, } = normalizedOptions;
|
|
70
|
-
const { hasSharedModifier, } = GetItemOptions(normalizedOptions);
|
|
71
|
-
const controllerName = BuildNestControllerName({
|
|
72
|
-
controllerName: CoerceSuffix(itemName, '-tree-table'),
|
|
67
|
+
const { hasSharedModifier, } = (0, accordion_item_component_1.GetItemOptions)(normalizedOptions);
|
|
68
|
+
const controllerName = (0, schematics_ts_morph_1.BuildNestControllerName)({
|
|
69
|
+
controllerName: (0, schematics_utilities_1.CoerceSuffix)(itemName, '-tree-table'),
|
|
73
70
|
nestModule: hasSharedModifier ? undefined : nestModule,
|
|
74
71
|
});
|
|
75
|
-
return chain([
|
|
72
|
+
return (0, schematics_1.chain)([
|
|
76
73
|
() => console.log(`Modify the get root operation ...`),
|
|
77
|
-
CoerceGetRootOperation({
|
|
74
|
+
(0, schematics_ts_morph_1.CoerceGetRootOperation)({
|
|
78
75
|
controllerName: itemName,
|
|
79
76
|
nestModule: hasSharedModifier ? undefined : nestModule,
|
|
80
77
|
project,
|
|
@@ -90,7 +87,7 @@ function nestjsBackendRule(normalizedOptions) {
|
|
|
90
87
|
skipCoerce: true,
|
|
91
88
|
}),
|
|
92
89
|
() => console.log(`Modify the get children operation ...`),
|
|
93
|
-
CoerceGetChildrenOperation({
|
|
90
|
+
(0, schematics_ts_morph_1.CoerceGetChildrenOperation)({
|
|
94
91
|
controllerName: itemName,
|
|
95
92
|
nestModule: hasSharedModifier ? undefined : nestModule,
|
|
96
93
|
project,
|
|
@@ -106,23 +103,23 @@ function nestjsBackendRule(normalizedOptions) {
|
|
|
106
103
|
skipCoerce: true,
|
|
107
104
|
}),
|
|
108
105
|
() => console.log(`Modify the get root proxy method ...`),
|
|
109
|
-
CoerceTreeTableRootProxyRemoteMethodClass({
|
|
106
|
+
(0, schematics_ts_morph_1.CoerceTreeTableRootProxyRemoteMethodClass)({
|
|
110
107
|
project,
|
|
111
108
|
feature,
|
|
112
109
|
shared,
|
|
113
110
|
directory,
|
|
114
111
|
scope,
|
|
115
|
-
getRootOperationId: buildOperationId(normalizedOptions, 'get-root', controllerName),
|
|
112
|
+
getRootOperationId: (0, schematics_ts_morph_1.buildOperationId)(normalizedOptions, 'get-root', controllerName),
|
|
116
113
|
tsMorphTransform: (project, sourceFile, classDeclaration) => {
|
|
117
|
-
CoerceImports(sourceFile, {
|
|
114
|
+
(0, schematics_ts_morph_1.CoerceImports)(sourceFile, {
|
|
118
115
|
moduleSpecifier: '@angular/router',
|
|
119
116
|
namedImports: ['ActivatedRoute'],
|
|
120
117
|
});
|
|
121
|
-
const [constructorDeclaration] = CoerceClassConstructor(classDeclaration);
|
|
122
|
-
CoerceParameterDeclaration(constructorDeclaration, 'route').set({
|
|
118
|
+
const [constructorDeclaration] = (0, schematics_ts_morph_1.CoerceClassConstructor)(classDeclaration);
|
|
119
|
+
(0, schematics_ts_morph_1.CoerceParameterDeclaration)(constructorDeclaration, 'route').set({
|
|
123
120
|
type: 'ActivatedRoute',
|
|
124
121
|
isReadonly: true,
|
|
125
|
-
scope: Scope.Private,
|
|
122
|
+
scope: ts_morph_1.Scope.Private,
|
|
126
123
|
});
|
|
127
124
|
return {
|
|
128
125
|
statements: [
|
|
@@ -133,23 +130,23 @@ function nestjsBackendRule(normalizedOptions) {
|
|
|
133
130
|
},
|
|
134
131
|
}),
|
|
135
132
|
() => console.log(`Modify the get children proxy method ...`),
|
|
136
|
-
CoerceTreeTableChildrenProxyRemoteMethodClass({
|
|
133
|
+
(0, schematics_ts_morph_1.CoerceTreeTableChildrenProxyRemoteMethodClass)({
|
|
137
134
|
project,
|
|
138
135
|
feature,
|
|
139
136
|
shared,
|
|
140
137
|
directory,
|
|
141
138
|
scope,
|
|
142
|
-
getChildrenOperationId: buildOperationId(normalizedOptions, 'get-children', controllerName),
|
|
139
|
+
getChildrenOperationId: (0, schematics_ts_morph_1.buildOperationId)(normalizedOptions, 'get-children', controllerName),
|
|
143
140
|
tsMorphTransform: (project, sourceFile, classDeclaration) => {
|
|
144
|
-
CoerceImports(sourceFile, {
|
|
141
|
+
(0, schematics_ts_morph_1.CoerceImports)(sourceFile, {
|
|
145
142
|
moduleSpecifier: '@angular/router',
|
|
146
143
|
namedImports: ['ActivatedRoute'],
|
|
147
144
|
});
|
|
148
|
-
const [constructorDeclaration] = CoerceClassConstructor(classDeclaration);
|
|
149
|
-
CoerceParameterDeclaration(constructorDeclaration, 'route').set({
|
|
145
|
+
const [constructorDeclaration] = (0, schematics_ts_morph_1.CoerceClassConstructor)(classDeclaration);
|
|
146
|
+
(0, schematics_ts_morph_1.CoerceParameterDeclaration)(constructorDeclaration, 'route').set({
|
|
150
147
|
type: 'ActivatedRoute',
|
|
151
148
|
isReadonly: true,
|
|
152
|
-
scope: Scope.Private,
|
|
149
|
+
scope: ts_morph_1.Scope.Private,
|
|
153
150
|
});
|
|
154
151
|
return {
|
|
155
152
|
statements: [
|
|
@@ -164,16 +161,16 @@ function nestjsBackendRule(normalizedOptions) {
|
|
|
164
161
|
function backendRule(normalizedOptions) {
|
|
165
162
|
const { backend } = normalizedOptions;
|
|
166
163
|
switch (backend) {
|
|
167
|
-
case BackendTypes.NESTJS:
|
|
164
|
+
case backend_types_1.BackendTypes.NESTJS:
|
|
168
165
|
return nestjsBackendRule(normalizedOptions);
|
|
169
166
|
}
|
|
170
|
-
return noop();
|
|
167
|
+
return (0, schematics_1.noop)();
|
|
171
168
|
}
|
|
172
|
-
|
|
169
|
+
function default_1(options) {
|
|
173
170
|
const normalizedOptions = NormalizeAccordionItemTreeTableComponentOptions(options);
|
|
174
171
|
printOptions(normalizedOptions);
|
|
175
172
|
return () => {
|
|
176
|
-
return chain([
|
|
173
|
+
return (0, schematics_1.chain)([
|
|
177
174
|
componentRule(normalizedOptions),
|
|
178
175
|
() => console.log(`Modify accordion item component for type tree table ...`),
|
|
179
176
|
treeTableComponentSchematicRule(normalizedOptions),
|
|
@@ -181,4 +178,5 @@ export default function (options) {
|
|
|
181
178
|
]);
|
|
182
179
|
};
|
|
183
180
|
}
|
|
181
|
+
exports.default = default_1;
|
|
184
182
|
//# sourceMappingURL=index.js.map
|