@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,67 +1,63 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CoerceTypeAlias = exports.NormalizeFormTableActionOptions = 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 utilities_1 = require("@rxap/utilities");
|
|
8
|
+
const path_1 = require("path");
|
|
9
|
+
const angular_options_1 = require("../../../../lib/angular-options");
|
|
10
|
+
const assert_table_component_exists_1 = require("../../../../lib/assert-table-component-exists");
|
|
11
|
+
const backend_types_1 = require("../../../../lib/backend-types");
|
|
12
|
+
const form_component_control_1 = require("../../../../lib/form-component-control");
|
|
13
|
+
const index_1 = require("../../../form/form-component/index");
|
|
14
|
+
const operation_table_action_1 = require("../operation-table-action");
|
|
15
|
+
function NormalizeFormTableActionOptions(options) {
|
|
16
|
+
var _a, _b, _c;
|
|
17
|
+
const normalizedOptions = (0, operation_table_action_1.NormalizeOperationTableActionOptions)(options);
|
|
14
18
|
const { controllerName, type, nestModule, } = normalizedOptions;
|
|
15
|
-
return {
|
|
16
|
-
...normalizedOptions,
|
|
17
|
-
controllerName: BuildNestControllerName({
|
|
19
|
+
return Object.assign(Object.assign({}, normalizedOptions), { controllerName: (0, schematics_ts_morph_1.BuildNestControllerName)({
|
|
18
20
|
nestModule,
|
|
19
21
|
controllerName: [type, 'action'].join('-'),
|
|
20
|
-
}),
|
|
21
|
-
options: {
|
|
22
|
-
...normalizedOptions.options ?? {},
|
|
23
|
-
controlList: NormalizeFormComponentControlList(normalizedOptions.options?.['controlList'] ?? []),
|
|
24
|
-
},
|
|
25
|
-
};
|
|
22
|
+
}), options: Object.assign(Object.assign({}, (_a = normalizedOptions.options) !== null && _a !== void 0 ? _a : {}), { controlList: (0, form_component_control_1.NormalizeFormComponentControlList)((_c = (_b = normalizedOptions.options) === null || _b === void 0 ? void 0 : _b['controlList']) !== null && _c !== void 0 ? _c : []) }) });
|
|
26
23
|
}
|
|
27
|
-
|
|
24
|
+
exports.NormalizeFormTableActionOptions = NormalizeFormTableActionOptions;
|
|
25
|
+
function CoerceTypeAlias(sourceFile, name, structure) {
|
|
28
26
|
let typeAliasDeclaration = sourceFile.getTypeAlias(name);
|
|
29
27
|
if (!typeAliasDeclaration) {
|
|
30
|
-
typeAliasDeclaration = sourceFile.addTypeAlias({
|
|
31
|
-
...structure,
|
|
32
|
-
name,
|
|
33
|
-
});
|
|
28
|
+
typeAliasDeclaration = sourceFile.addTypeAlias(Object.assign(Object.assign({}, structure), { name }));
|
|
34
29
|
}
|
|
35
30
|
return typeAliasDeclaration;
|
|
36
31
|
}
|
|
32
|
+
exports.CoerceTypeAlias = CoerceTypeAlias;
|
|
37
33
|
function UseOperationResponseAsFormTypeRule(options) {
|
|
38
34
|
const { name, operationId, scope, } = options;
|
|
39
|
-
const className = CoerceSuffix(classify(name), 'Form');
|
|
35
|
+
const className = (0, utilities_1.CoerceSuffix)((0, utilities_1.classify)(name), 'Form');
|
|
40
36
|
const interfaceName = `I${className}`;
|
|
41
|
-
return TsMorphAngularProjectTransformRule(options, (project, [sourceFile]) => {
|
|
37
|
+
return (0, schematics_ts_morph_1.TsMorphAngularProjectTransformRule)(options, (project, [sourceFile]) => {
|
|
42
38
|
const interfaceDeclaration = sourceFile.getInterface(interfaceName);
|
|
43
39
|
if (interfaceDeclaration) {
|
|
44
40
|
interfaceDeclaration.remove();
|
|
45
41
|
}
|
|
46
42
|
CoerceTypeAlias(sourceFile, interfaceName, {
|
|
47
|
-
type: OperationIdToResponseClassName(operationId),
|
|
43
|
+
type: (0, schematics_ts_morph_1.OperationIdToResponseClassName)(operationId),
|
|
48
44
|
isExported: true,
|
|
49
|
-
}).set({ type: OperationIdToResponseClassName(operationId) });
|
|
50
|
-
CoerceImports(sourceFile, {
|
|
51
|
-
namedImports: [OperationIdToResponseClassName(operationId)],
|
|
52
|
-
moduleSpecifier: OperationIdToResponseClassImportPath(operationId, scope),
|
|
45
|
+
}).set({ type: (0, schematics_ts_morph_1.OperationIdToResponseClassName)(operationId) });
|
|
46
|
+
(0, schematics_ts_morph_1.CoerceImports)(sourceFile, {
|
|
47
|
+
namedImports: [(0, schematics_ts_morph_1.OperationIdToResponseClassName)(operationId)],
|
|
48
|
+
moduleSpecifier: (0, schematics_ts_morph_1.OperationIdToResponseClassImportPath)(operationId, scope),
|
|
53
49
|
});
|
|
54
|
-
}, ['/' + CoerceSuffix(name, '.form.ts')]);
|
|
50
|
+
}, ['/' + (0, utilities_1.CoerceSuffix)(name, '.form.ts')]);
|
|
55
51
|
}
|
|
56
52
|
function nestjsBackendRule(normalizedOptions) {
|
|
57
53
|
const { project, feature, shared, directory, nestModule, type, context, controllerName, scope, } = normalizedOptions;
|
|
58
54
|
if (!nestModule) {
|
|
59
55
|
throw new Error('The nest module is required');
|
|
60
56
|
}
|
|
61
|
-
const controllerPath = `${dasherize(nestModule)}/action/:rowId/${type}`;
|
|
62
|
-
return chain([
|
|
57
|
+
const controllerPath = `${(0, utilities_1.dasherize)(nestModule)}/action/:rowId/${type}`;
|
|
58
|
+
return (0, schematics_1.chain)([
|
|
63
59
|
() => console.log('Coerce form get table action operation'),
|
|
64
|
-
CoerceOperation({
|
|
60
|
+
(0, schematics_ts_morph_1.CoerceOperation)({
|
|
65
61
|
controllerName,
|
|
66
62
|
nestModule,
|
|
67
63
|
project,
|
|
@@ -71,12 +67,12 @@ function nestjsBackendRule(normalizedOptions) {
|
|
|
71
67
|
operationName: `get`,
|
|
72
68
|
controllerPath,
|
|
73
69
|
tsMorphTransform: (project, sourceFile) => {
|
|
74
|
-
const { className, filePath, } = CoerceDtoClass({
|
|
70
|
+
const { className, filePath, } = (0, schematics_ts_morph_1.CoerceDtoClass)({
|
|
75
71
|
project,
|
|
76
72
|
name: controllerName,
|
|
77
|
-
propertyList: normalizedOptions.options.controlList.map(control => FormComponentControlToDtoClassProperty(control)),
|
|
73
|
+
propertyList: normalizedOptions.options.controlList.map(control => (0, index_1.FormComponentControlToDtoClassProperty)(control)),
|
|
78
74
|
});
|
|
79
|
-
CoerceImports(sourceFile, {
|
|
75
|
+
(0, schematics_ts_morph_1.CoerceImports)(sourceFile, {
|
|
80
76
|
namedImports: [className],
|
|
81
77
|
moduleSpecifier: filePath,
|
|
82
78
|
});
|
|
@@ -92,7 +88,7 @@ function nestjsBackendRule(normalizedOptions) {
|
|
|
92
88
|
},
|
|
93
89
|
}),
|
|
94
90
|
() => console.log('Coerce form submit table action operation'),
|
|
95
|
-
CoerceFormSubmitOperation({
|
|
91
|
+
(0, schematics_ts_morph_1.CoerceFormSubmitOperation)({
|
|
96
92
|
controllerName,
|
|
97
93
|
project,
|
|
98
94
|
feature,
|
|
@@ -113,7 +109,7 @@ function nestjsBackendRule(normalizedOptions) {
|
|
|
113
109
|
scope,
|
|
114
110
|
project,
|
|
115
111
|
feature,
|
|
116
|
-
directory: join(directory
|
|
112
|
+
directory: (0, path_1.join)(directory !== null && directory !== void 0 ? directory : '', (0, utilities_1.CoerceSuffix)(type, '-form')),
|
|
117
113
|
name: type,
|
|
118
114
|
operationId: buildGetOperationId(normalizedOptions),
|
|
119
115
|
}),
|
|
@@ -122,31 +118,31 @@ function nestjsBackendRule(normalizedOptions) {
|
|
|
122
118
|
function backendRule(normalizedOptions) {
|
|
123
119
|
const { backend } = normalizedOptions;
|
|
124
120
|
switch (backend) {
|
|
125
|
-
case BackendTypes.NESTJS:
|
|
121
|
+
case backend_types_1.BackendTypes.NESTJS:
|
|
126
122
|
return nestjsBackendRule(normalizedOptions);
|
|
127
123
|
}
|
|
128
|
-
return noop();
|
|
124
|
+
return (0, schematics_1.noop)();
|
|
129
125
|
}
|
|
130
126
|
function printOptions(options) {
|
|
131
|
-
PrintAngularOptions('form-table-action', options);
|
|
127
|
+
(0, angular_options_1.PrintAngularOptions)('form-table-action', options);
|
|
132
128
|
}
|
|
133
129
|
function buildGetOperationId(normalizedOptions) {
|
|
134
130
|
const { controllerName, } = normalizedOptions;
|
|
135
|
-
return buildOperationId(normalizedOptions, `get`, controllerName);
|
|
131
|
+
return (0, schematics_ts_morph_1.buildOperationId)(normalizedOptions, `get`, controllerName);
|
|
136
132
|
}
|
|
137
|
-
|
|
133
|
+
function default_1(options) {
|
|
138
134
|
const normalizedOptions = NormalizeFormTableActionOptions(options);
|
|
139
135
|
const { refresh, confirm, tooltip, errorMessage, successMessage, priority, checkFunction, tableName, project, feature, shared, directory, nestModule, type, context, controllerName, overwrite, scope, options: formOptions, backend, } = normalizedOptions;
|
|
140
136
|
printOptions(normalizedOptions);
|
|
141
137
|
return (host) => {
|
|
142
|
-
AssertTableComponentExists(host, normalizedOptions);
|
|
143
|
-
return chain([
|
|
138
|
+
(0, assert_table_component_exists_1.AssertTableComponentExists)(host, normalizedOptions);
|
|
139
|
+
return (0, schematics_1.chain)([
|
|
144
140
|
() => console.group('\x1b[32m[@rxap/schematics-angular:form-table-action]\x1b[0m'),
|
|
145
141
|
() => console.info(`Generating form table action rule...`),
|
|
146
|
-
CoerceFormTableActionRule({
|
|
142
|
+
(0, schematics_ts_morph_1.CoerceFormTableActionRule)({
|
|
147
143
|
scope,
|
|
148
|
-
directory: join(directory
|
|
149
|
-
loadOperationId: backend === BackendTypes.NESTJS ? buildGetOperationId(normalizedOptions) : undefined,
|
|
144
|
+
directory: (0, path_1.join)(directory !== null && directory !== void 0 ? directory : '', 'methods', 'action'),
|
|
145
|
+
loadOperationId: backend === backend_types_1.BackendTypes.NESTJS ? buildGetOperationId(normalizedOptions) : undefined,
|
|
150
146
|
type,
|
|
151
147
|
tableName,
|
|
152
148
|
refresh,
|
|
@@ -160,7 +156,7 @@ export default function (options) {
|
|
|
160
156
|
feature,
|
|
161
157
|
}),
|
|
162
158
|
() => console.log('Coerce open form window method to table component ...'),
|
|
163
|
-
CoerceComponentRule({
|
|
159
|
+
(0, schematics_ts_morph_1.CoerceComponentRule)({
|
|
164
160
|
project,
|
|
165
161
|
feature,
|
|
166
162
|
shared,
|
|
@@ -168,34 +164,27 @@ export default function (options) {
|
|
|
168
164
|
directory,
|
|
169
165
|
overwrite,
|
|
170
166
|
tsMorphTransform: (project, [sourceFile]) => {
|
|
171
|
-
AddComponentProvider(sourceFile, `Open${classify(type)}FormWindowMethod`, [
|
|
167
|
+
(0, schematics_ts_morph_1.AddComponentProvider)(sourceFile, `Open${(0, utilities_1.classify)(type)}FormWindowMethod`, [
|
|
172
168
|
{
|
|
173
169
|
moduleSpecifier: `./${type}-form/open-${type}-form-window.method`,
|
|
174
|
-
namedImports: [`Open${classify(type)}FormWindowMethod`],
|
|
170
|
+
namedImports: [`Open${(0, utilities_1.classify)(type)}FormWindowMethod`],
|
|
175
171
|
},
|
|
176
172
|
]);
|
|
177
173
|
},
|
|
178
174
|
}),
|
|
179
175
|
() => console.info(`Generating form component...`),
|
|
180
|
-
ExecuteSchematic('form-component', {
|
|
181
|
-
...formOptions ?? {},
|
|
182
|
-
project,
|
|
183
|
-
name: type,
|
|
184
|
-
feature,
|
|
176
|
+
(0, schematics_utilities_1.ExecuteSchematic)('form-component', Object.assign(Object.assign({}, formOptions !== null && formOptions !== void 0 ? formOptions : {}), { project, name: type, feature,
|
|
185
177
|
directory,
|
|
186
|
-
shared,
|
|
187
|
-
window: true,
|
|
188
|
-
role: type,
|
|
189
|
-
nestModule,
|
|
178
|
+
shared, window: true, role: type, nestModule,
|
|
190
179
|
controllerName,
|
|
191
180
|
overwrite,
|
|
192
181
|
context,
|
|
193
|
-
backend,
|
|
194
|
-
}),
|
|
182
|
+
backend })),
|
|
195
183
|
() => console.info(`Generating backend...`),
|
|
196
184
|
backendRule(normalizedOptions),
|
|
197
185
|
() => console.groupEnd(),
|
|
198
186
|
]);
|
|
199
187
|
};
|
|
200
188
|
}
|
|
189
|
+
exports.default = default_1;
|
|
201
190
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/schematic/angular/src/schematics/table/action/form-table-action/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/schematic/angular/src/schematics/table/action/form-table-action/index.ts"],"names":[],"mappings":";;;AAAA,2DAKoC;AACpC,mEAcmC;AACnC,qEAA8D;AAC9D,+CAKyB;AACzB,+BAA4B;AAO5B,qEAAsE;AACtE,iGAA2F;AAC3F,iEAA6D;AAC7D,mFAGgD;AAChD,8DAA4F;AAC5F,sEAGmC;AAUnC,SAAgB,+BAA+B,CAC7C,OAAyC;;IAEzC,MAAM,iBAAiB,GAAG,IAAA,6DAAoC,EAAC,OAAO,CAAC,CAAC;I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C"}
|
|
@@ -1,28 +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.NormalizeNavigationTableActionOptions = void 0;
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
+
const schematics_ts_morph_1 = require("@rxap/schematics-ts-morph");
|
|
6
|
+
const path_1 = require("path");
|
|
7
|
+
const angular_options_1 = require("../../../../lib/angular-options");
|
|
8
|
+
const assert_table_component_exists_1 = require("../../../../lib/assert-table-component-exists");
|
|
9
|
+
const operation_table_action_1 = require("../operation-table-action");
|
|
10
|
+
function NormalizeNavigationTableActionOptions(options) {
|
|
11
|
+
var _a;
|
|
12
|
+
return Object.assign(Object.assign({}, (0, operation_table_action_1.NormalizeOperationTableActionOptions)(options)), { route: (_a = options.route) !== null && _a !== void 0 ? _a : null });
|
|
12
13
|
}
|
|
14
|
+
exports.NormalizeNavigationTableActionOptions = NormalizeNavigationTableActionOptions;
|
|
13
15
|
function printOptions(options) {
|
|
14
|
-
PrintAngularOptions('navigation-table-action', options);
|
|
16
|
+
(0, angular_options_1.PrintAngularOptions)('navigation-table-action', options);
|
|
15
17
|
}
|
|
16
|
-
|
|
18
|
+
function default_1(options) {
|
|
17
19
|
const normalizedOptions = NormalizeNavigationTableActionOptions(options);
|
|
18
20
|
const { refresh, confirm, tooltip, errorMessage, successMessage, priority, checkFunction, tableName, project, feature, shared, directory, type, route, } = normalizedOptions;
|
|
19
21
|
printOptions(normalizedOptions);
|
|
20
22
|
return (host) => {
|
|
21
|
-
AssertTableComponentExists(host, normalizedOptions);
|
|
22
|
-
return chain([
|
|
23
|
+
(0, assert_table_component_exists_1.AssertTableComponentExists)(host, normalizedOptions);
|
|
24
|
+
return (0, schematics_1.chain)([
|
|
23
25
|
() => console.group('\x1b[32m[@rxap/schematics-angular:navigation-table-action]\x1b[0m'),
|
|
24
|
-
CoerceNavigationTableActionRule({
|
|
25
|
-
directory: join(directory
|
|
26
|
+
(0, schematics_ts_morph_1.CoerceNavigationTableActionRule)({
|
|
27
|
+
directory: (0, path_1.join)(directory !== null && directory !== void 0 ? directory : '', 'methods', 'action'),
|
|
26
28
|
type,
|
|
27
29
|
tableName,
|
|
28
30
|
refresh,
|
|
@@ -40,4 +42,5 @@ export default function (options) {
|
|
|
40
42
|
]);
|
|
41
43
|
};
|
|
42
44
|
}
|
|
45
|
+
exports.default = default_1;
|
|
43
46
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/schematic/angular/src/schematics/table/action/navigation-table-action/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/schematic/angular/src/schematics/table/action/navigation-table-action/index.ts"],"names":[],"mappings":";;;AAAA,2DAGoC;AACpC,mEAA4E;AAE5E,+BAA4B;AAC5B,qEAAsE;AACtE,iGAA2F;AAC3F,sEAGmC;AAMnC,SAAgB,qCAAqC,CACnD,OAAqC;;IAErC,uCACK,IAAA,6DAAoC,EAAC,OAAO,CAAC,KAChD,KAAK,EAAE,MAAA,OAAO,CAAC,KAAK,mCAAI,IAAI,IAC5B;AACJ,CAAC;AAPD,sFAOC;AAED,SAAS,YAAY,CAAC,OAA+C;IACnE,IAAA,qCAAmB,EAAC,yBAAyB,EAAE,OAAO,CAAC,CAAC;AAC1D,CAAC;AAED,mBAAyB,OAAqC;IAC5D,MAAM,iBAAiB,GAAG,qCAAqC,CAAC,OAAO,CAAC,CAAC;IACzE,MAAM,EACJ,OAAO,EACP,OAAO,EACP,OAAO,EACP,YAAY,EACZ,cAAc,EACd,QAAQ,EACR,aAAa,EACb,SAAS,EACT,OAAO,EACP,OAAO,EACP,MAAM,EACN,SAAS,EACT,IAAI,EACJ,KAAK,GACN,GAAG,iBAAiB,CAAC;IACtB,YAAY,CAAC,iBAAiB,CAAC,CAAC;IAChC,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,mEAAmE,CAAC;YACxF,IAAA,qDAA+B,EAAC;gBAC9B,SAAS,EAAE,IAAA,WAAI,EAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,EAAE,EAAE,SAAS,EAAE,QAAQ,CAAC;gBACrD,IAAI;gBACJ,SAAS;gBACT,OAAO;gBACP,OAAO;gBACP,OAAO;gBACP,YAAY;gBACZ,cAAc;gBACd,QAAQ;gBACR,aAAa;gBACb,OAAO;gBACP,OAAO;gBACP,KAAK;aACN,CAAC;YACF,GAAG,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE;SACzB,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AA3CD,4BA2CC"}
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NormalizeOperationTableActionOptions = void 0;
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
+
const schematics_ts_morph_1 = require("@rxap/schematics-ts-morph");
|
|
6
|
+
const utilities_1 = require("@rxap/utilities");
|
|
7
|
+
const path_1 = require("path");
|
|
8
|
+
const angular_options_1 = require("../../../../lib/angular-options");
|
|
9
|
+
const assert_table_component_exists_1 = require("../../../../lib/assert-table-component-exists");
|
|
10
|
+
const backend_types_1 = require("../../../../lib/backend-types");
|
|
11
|
+
const table_action_1 = require("../../table-action");
|
|
12
|
+
function NormalizeOperationTableActionOptions(options) {
|
|
13
|
+
var _a;
|
|
14
|
+
const normalizedOptions = (0, table_action_1.NormalizeTableActionOptions)(options);
|
|
15
|
+
const nestModule = (_a = options.nestModule) !== null && _a !== void 0 ? _a : normalizedOptions.tableName;
|
|
16
|
+
const context = options.context ? (0, utilities_1.dasherize)(options.context) : null;
|
|
17
|
+
return Object.seal(Object.assign(Object.assign({}, normalizedOptions), { nestModule, controllerName: (0, schematics_ts_morph_1.BuildNestControllerName)({
|
|
17
18
|
controllerName: context,
|
|
18
19
|
nestModule,
|
|
19
|
-
}),
|
|
20
|
-
context,
|
|
21
|
-
});
|
|
20
|
+
}), context }));
|
|
22
21
|
}
|
|
22
|
+
exports.NormalizeOperationTableActionOptions = NormalizeOperationTableActionOptions;
|
|
23
23
|
function openApiOperationRule(normalizedOptions) {
|
|
24
24
|
const { refresh, confirm, tooltip, errorMessage, successMessage, priority, checkFunction, tableName, project, feature, shared, directory, nestModule, controllerName, type, scope, } = normalizedOptions;
|
|
25
|
-
return chain([
|
|
25
|
+
return (0, schematics_1.chain)([
|
|
26
26
|
() => console.log('Coerce table action method class ...'),
|
|
27
|
-
CoerceOperationTableActionRule({
|
|
27
|
+
(0, schematics_ts_morph_1.CoerceOperationTableActionRule)({
|
|
28
28
|
scope,
|
|
29
|
-
directory: join(directory
|
|
30
|
-
operationId: buildOperationId(normalizedOptions, `${type}-action`, controllerName),
|
|
29
|
+
directory: (0, path_1.join)(directory !== null && directory !== void 0 ? directory : '', 'methods', 'action'),
|
|
30
|
+
operationId: (0, schematics_ts_morph_1.buildOperationId)(normalizedOptions, `${type}-action`, controllerName),
|
|
31
31
|
type,
|
|
32
32
|
tableName,
|
|
33
33
|
refresh,
|
|
@@ -41,7 +41,7 @@ function openApiOperationRule(normalizedOptions) {
|
|
|
41
41
|
feature,
|
|
42
42
|
}),
|
|
43
43
|
() => console.log('Coerce table action method operation ...'),
|
|
44
|
-
CoerceOperation({
|
|
44
|
+
(0, schematics_ts_morph_1.CoerceOperation)({
|
|
45
45
|
controllerName,
|
|
46
46
|
nestModule,
|
|
47
47
|
project,
|
|
@@ -62,24 +62,25 @@ function openApiOperationRule(normalizedOptions) {
|
|
|
62
62
|
function backendRule(normalizedOptions) {
|
|
63
63
|
const { backend, } = normalizedOptions;
|
|
64
64
|
switch (backend) {
|
|
65
|
-
case BackendTypes.NESTJS:
|
|
65
|
+
case backend_types_1.BackendTypes.NESTJS:
|
|
66
66
|
return openApiOperationRule(normalizedOptions);
|
|
67
67
|
}
|
|
68
|
-
return noop();
|
|
68
|
+
return (0, schematics_1.noop)();
|
|
69
69
|
}
|
|
70
70
|
function printOptions(options) {
|
|
71
|
-
PrintAngularOptions('operation-table-action', options);
|
|
71
|
+
(0, angular_options_1.PrintAngularOptions)('operation-table-action', options);
|
|
72
72
|
}
|
|
73
|
-
|
|
73
|
+
function default_1(options) {
|
|
74
74
|
const normalizedOptions = NormalizeOperationTableActionOptions(options);
|
|
75
75
|
printOptions(normalizedOptions);
|
|
76
76
|
return (host) => {
|
|
77
|
-
AssertTableComponentExists(host, normalizedOptions);
|
|
78
|
-
return chain([
|
|
77
|
+
(0, assert_table_component_exists_1.AssertTableComponentExists)(host, normalizedOptions);
|
|
78
|
+
return (0, schematics_1.chain)([
|
|
79
79
|
() => console.group('\x1b[32m[@rxap/schematics-angular:operation-table-action]\x1b[0m'),
|
|
80
80
|
backendRule(normalizedOptions),
|
|
81
81
|
() => console.groupEnd(),
|
|
82
82
|
]);
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
|
+
exports.default = default_1;
|
|
85
86
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/schematic/angular/src/schematics/table/action/operation-table-action/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/schematic/angular/src/schematics/table/action/operation-table-action/index.ts"],"names":[],"mappings":";;;AAAA,2DAIoC;AACpC,mEAKmC;AACnC,+CAGyB;AACzB,+BAA4B;AAC5B,qEAGyC;AACzC,iGAA2F;AAC3F,iEAA6D;AAC7D,qDAAiE;AAQjE,SAAgB,oCAAoC,CAClD,OAAoC;;IAEpC,MAAM,iBAAiB,GAAG,IAAA,0CAA2B,EAAC,OAAO,CAAC,CAAC;IAC/D,MAAM,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,iBAAiB,CAAC,SAAS,CAAC;IACrE,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,IAAA,qBAAS,EAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACpE,OAAO,MAAM,CAAC,IAAI,iCACb,iBAAiB,KACpB,UAAU,EACV,cAAc,EAAE,IAAA,6CAAuB,EAAC;YACtC,cAAc,EAAE,OAAO;YACvB,UAAU;SACX,CAAC,EACF,OAAO,IACP,CAAC;AACL,CAAC;AAfD,oFAeC;AAED,SAAS,oBAAoB,CAAC,iBAAwD;IAEpF,MAAM,EACJ,OAAO,EACP,OAAO,EACP,OAAO,EACP,YAAY,EACZ,cAAc,EACd,QAAQ,EACR,aAAa,EACb,SAAS,EACT,OAAO,EACP,OAAO,EACP,MAAM,EACN,SAAS,EACT,UAAU,EACV,cAAc,EACd,IAAI,EACJ,KAAK,GACN,GAAG,iBAAiB,CAAC;IAEtB,OAAO,IAAA,kBAAK,EAAC;QACX,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC;QACzD,IAAA,oDAA8B,EAAC;YAC7B,KAAK;YACL,SAAS,EAAE,IAAA,WAAI,EAAC,SAAS,aAAT,SAAS,cAA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0B,EAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;QAEpD,OAAO,IAAA,kBAAK,EAAC;YACX,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,kEAAkE,CAAC;YACvF,WAAW,CAAC,iBAAiB,CAAC;YAC9B,GAAG,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE;SACzB,CAAC,CAAC;IAEL,CAAC,CAAC;AACJ,CAAC;AAhBD,4BAgBC"}
|
|
@@ -1,51 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NormalizeFormTableHeaderButtonOptions = 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 ts_morph_1 = require("ts-morph");
|
|
8
|
+
const angular_options_1 = require("../../../../lib/angular-options");
|
|
9
|
+
const assert_table_component_exists_1 = require("../../../../lib/assert-table-component-exists");
|
|
10
|
+
const index_1 = require("../../table-header-button/index");
|
|
11
|
+
function NormalizeFormTableHeaderButtonOptions(options) {
|
|
12
|
+
const normalizedTableHeaderButtonOptions = (0, index_1.NormalizeTableHeaderButtonOptions)(options);
|
|
10
13
|
const nestModule = options.nestModule;
|
|
11
|
-
return Object.seal({
|
|
12
|
-
...normalizedTableHeaderButtonOptions,
|
|
13
|
-
context: options.context,
|
|
14
|
-
nestModule,
|
|
15
|
-
controllerName: BuildNestControllerName({
|
|
14
|
+
return Object.seal(Object.assign(Object.assign({}, normalizedTableHeaderButtonOptions), { context: options.context, nestModule, controllerName: (0, schematics_ts_morph_1.BuildNestControllerName)({
|
|
16
15
|
nestModule,
|
|
17
16
|
controllerName: 'header-button',
|
|
18
|
-
})
|
|
19
|
-
});
|
|
17
|
+
}) }));
|
|
20
18
|
}
|
|
19
|
+
exports.NormalizeFormTableHeaderButtonOptions = NormalizeFormTableHeaderButtonOptions;
|
|
21
20
|
function printOptions(options) {
|
|
22
|
-
PrintAngularOptions('form-table-header-button', options);
|
|
21
|
+
(0, angular_options_1.PrintAngularOptions)('form-table-header-button', options);
|
|
23
22
|
}
|
|
24
|
-
|
|
23
|
+
function default_1(options) {
|
|
25
24
|
const normalizedOptions = NormalizeFormTableHeaderButtonOptions(options);
|
|
26
25
|
const { refresh, confirm, tooltip, errorMessage, successMessage, tableName, project, feature, shared, directory, overwrite, options: formOptions, context, backend, nestModule, controllerName, } = normalizedOptions;
|
|
27
26
|
printOptions(normalizedOptions);
|
|
28
27
|
return (host) => {
|
|
29
|
-
AssertTableComponentExists(host, normalizedOptions);
|
|
30
|
-
return chain([
|
|
28
|
+
(0, assert_table_component_exists_1.AssertTableComponentExists)(host, normalizedOptions);
|
|
29
|
+
return (0, schematics_1.chain)([
|
|
31
30
|
() => console.group('\x1b[32m[@rxap/schematics-angular:form-table-header-button]\x1b[0m'),
|
|
32
31
|
() => console.log('Coerce table header button form ...'),
|
|
33
|
-
ExecuteSchematic('form-component', {
|
|
34
|
-
...formOptions,
|
|
35
|
-
project,
|
|
36
|
-
name: `table-header-button`,
|
|
37
|
-
feature,
|
|
32
|
+
(0, schematics_utilities_1.ExecuteSchematic)('form-component', Object.assign(Object.assign({}, formOptions), { project, name: `table-header-button`, feature,
|
|
38
33
|
directory,
|
|
39
|
-
shared,
|
|
40
|
-
window: true,
|
|
41
|
-
nestModule,
|
|
34
|
+
shared, window: true, nestModule,
|
|
42
35
|
controllerName,
|
|
43
36
|
context,
|
|
44
37
|
backend,
|
|
45
|
-
overwrite,
|
|
46
|
-
}),
|
|
38
|
+
overwrite })),
|
|
47
39
|
() => console.log('Coerce table header button method ...'),
|
|
48
|
-
CoerceTableHeaderButtonMethodRule({
|
|
40
|
+
(0, schematics_ts_morph_1.CoerceTableHeaderButtonMethodRule)({
|
|
49
41
|
project,
|
|
50
42
|
feature,
|
|
51
43
|
shared,
|
|
@@ -58,13 +50,13 @@ export default function (options) {
|
|
|
58
50
|
errorMessage,
|
|
59
51
|
successMessage,
|
|
60
52
|
tsMorphTransform: (project, sourceFile, classDeclaration) => {
|
|
61
|
-
const [constructorDeclaration] = CoerceClassConstructor(classDeclaration);
|
|
62
|
-
CoerceParameterDeclaration(constructorDeclaration, 'openWindowMethod', {
|
|
53
|
+
const [constructorDeclaration] = (0, schematics_ts_morph_1.CoerceClassConstructor)(classDeclaration);
|
|
54
|
+
(0, schematics_ts_morph_1.CoerceParameterDeclaration)(constructorDeclaration, 'openWindowMethod', {
|
|
63
55
|
isReadonly: true,
|
|
64
|
-
scope: Scope.Private,
|
|
56
|
+
scope: ts_morph_1.Scope.Private,
|
|
65
57
|
type: 'OpenTableHeaderButtonFormWindowMethod',
|
|
66
58
|
});
|
|
67
|
-
CoerceImports(sourceFile, [
|
|
59
|
+
(0, schematics_ts_morph_1.CoerceImports)(sourceFile, [
|
|
68
60
|
{
|
|
69
61
|
moduleSpecifier: '../table-header-button-form/open-table-header-button-form-window.method',
|
|
70
62
|
namedImports: ['OpenTableHeaderButtonFormWindowMethod'],
|
|
@@ -75,7 +67,7 @@ export default function (options) {
|
|
|
75
67
|
};
|
|
76
68
|
},
|
|
77
69
|
tsMorphTransformComponent: (project, [sourceFile]) => {
|
|
78
|
-
AddComponentProvider(sourceFile, 'OpenTableHeaderButtonFormWindowMethod', [
|
|
70
|
+
(0, schematics_ts_morph_1.AddComponentProvider)(sourceFile, 'OpenTableHeaderButtonFormWindowMethod', [
|
|
79
71
|
{
|
|
80
72
|
moduleSpecifier: './table-header-button-form/open-table-header-button-form-window.method',
|
|
81
73
|
namedImports: ['OpenTableHeaderButtonFormWindowMethod'],
|
|
@@ -87,4 +79,5 @@ export default function (options) {
|
|
|
87
79
|
]);
|
|
88
80
|
};
|
|
89
81
|
}
|
|
82
|
+
exports.default = default_1;
|
|
90
83
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/schematic/angular/src/schematics/table/header-button/form-table-header-button/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/schematic/angular/src/schematics/table/header-button/form-table-header-button/index.ts"],"names":[],"mappings":";;;AAAA,2DAGoC;AACpC,mEAOmC;AACnC,qEAA8D;AAE9D,uCAIkB;AAClB,qEAGyC;AACzC,iGAA2F;AAE3F,2DAAoF;AASpF,SAAgB,qCAAqC,CACnD,OAA+C;IAE/C,MAAM,kCAAkC,GAAG,IAAA,yCAAiC,EAAC,OAAO,CAAC,CAAC;IACtF,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IACtC,OAAO,MAAM,CAAC,IAAI,iCACb,kCAAkC,KACrC,OAAO,EAAE,OAAO,CAAC,OAAO,EACxB,UAAU,EACV,cAAc,EAAE,IAAA,6CAAuB,EAAC;YACtC,UAAU;YACV,cAAc,EAAE,eAAe;SAChC,CAAC,IACF,CAAC;AACL,CAAC;AAdD,sFAcC;AAED,SAAS,YAAY,CAAC,OAA+C;IACnE,IAAA,qCAAmB,EAAC,0BAA0B,EAAE,OAAO,CAAC,CAAC;AAC3D,CAAC;AAED,mBAAyB,OAAqC;IAC5D,MAAM,iBAAiB,GAAG,qCAAqC,CAAC,OAAO,CAAC,CAAC;IACzE,MAAM,EACJ,OAAO,EACP,OAAO,EACP,OAAO,EACP,YAAY,EACZ,cAAc,EACd,SAAS,EACT,OAAO,EACP,OAAO,EACP,MAAM,EACN,SAAS,EACT,SAAS,EACT,OAAO,EAAE,WAAW,EACpB,OAAO,EACP,OAAO,EACP,UAAU,EACV,cAAc,GACf,GAAG,iBAAiB,CAAC;IAEtB,YAAY,CAAC,iBAAiB,CAAC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