@rxap/schematic-angular 16.1.0-dev.3 → 16.1.0-dev.30
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 +235 -0
- package/README.md +1 -1
- package/collection.json +21 -1
- package/package.json +44 -40
- package/src/lib/angular-options.js +18 -1
- package/src/lib/angular-options.js.map +1 -1
- package/src/lib/form-definition-control.js +3 -1
- package/src/lib/form-definition-control.js.map +1 -1
- package/src/lib/minimum-table-component-options.d.ts +1 -0
- package/src/lib/minimum-table-component-options.js +112 -156
- package/src/lib/minimum-table-component-options.js.map +1 -1
- package/src/lib/table-action.d.ts +1 -1
- package/src/lib/table-action.js +16 -10
- package/src/lib/table-action.js.map +1 -1
- package/src/lib/table-column.d.ts +3 -0
- package/src/lib/table-column.js +20 -2
- package/src/lib/table-column.js.map +1 -1
- package/src/lib/table-header-button.d.ts +9 -2
- package/src/lib/table-header-button.js +22 -2
- package/src/lib/table-header-button.js.map +1 -1
- package/src/lib/table-row-action.d.ts +5 -1
- package/src/lib/table-row-action.js +8 -6
- package/src/lib/table-row-action.js.map +1 -1
- package/src/schematics/accordion/accordion-component/files/component/__componentName__.component.ts.template +1 -1
- package/src/schematics/accordion/accordion-component/index.js +1 -1
- package/src/schematics/accordion/accordion-component/index.js.map +1 -1
- package/src/schematics/accordion/accordion-component/schema.json +13 -3
- package/src/schematics/accordion/accordion-item-component/files/component/__componentName__.component.html.template +1 -1
- package/src/schematics/accordion/accordion-item-component/schema.json +13 -3
- package/src/schematics/accordion/item/accordion-item-data-grid-component/schema.json +13 -3
- package/src/schematics/accordion/item/accordion-item-table-component/schema.json +13 -3
- package/src/schematics/accordion/item/accordion-item-tree-table-component/schema.json +13 -3
- package/src/schematics/angular.schema.json +61 -0
- package/src/schematics/data-grid-component/schema.json +13 -3
- package/src/schematics/dialog-component/schema.json +13 -3
- package/src/schematics/form/control/input-form-control/index.d.ts +2 -2
- package/src/schematics/form/control/input-form-control/index.js +7 -3
- package/src/schematics/form/control/input-form-control/index.js.map +1 -1
- package/src/schematics/form/control/select-form-control/index.js +2 -0
- package/src/schematics/form/control/select-form-control/index.js.map +1 -1
- package/src/schematics/form/control/table-select-form-control/index.js +2 -0
- package/src/schematics/form/control/table-select-form-control/index.js.map +1 -1
- package/src/schematics/form/form-component/index.d.ts +0 -1
- package/src/schematics/form/form-component/index.js +45 -14
- package/src/schematics/form/form-component/index.js.map +1 -1
- package/src/schematics/form/form-component/schema.json +3 -6
- package/src/schematics/form/form-control/index.d.ts +2 -2
- package/src/schematics/form/form-control/index.js +7 -8
- package/src/schematics/form/form-control/index.js.map +1 -1
- package/src/schematics/form/form-definition/index.d.ts +2 -2
- package/src/schematics/form/form-definition/index.js +24 -10
- package/src/schematics/form/form-definition/index.js.map +1 -1
- package/src/schematics/form/form-definition/schema.d.ts +2 -1
- package/src/schematics/form/form-definition/schema.json +5 -0
- package/src/schematics/general.schema.json +41 -0
- package/src/schematics/table/action/dialog-table-action/index.d.ts +2 -1
- package/src/schematics/table/action/dialog-table-action/index.js +6 -2
- package/src/schematics/table/action/dialog-table-action/index.js.map +1 -1
- package/src/schematics/table/action/dialog-table-action/schema.json +12 -2
- package/src/schematics/table/action/form-table-action/index.d.ts +6 -1
- package/src/schematics/table/action/form-table-action/index.js +120 -68
- package/src/schematics/table/action/form-table-action/index.js.map +1 -1
- package/src/schematics/table/action/form-table-action/schema.json +47 -2
- package/src/schematics/table/action/navigation-table-action/index.d.ts +1 -1
- package/src/schematics/table/action/navigation-table-action/index.js +10 -10
- package/src/schematics/table/action/navigation-table-action/index.js.map +1 -1
- package/src/schematics/table/action/open-api-table-action/index.d.ts +10 -0
- package/src/schematics/table/action/open-api-table-action/index.js +50 -0
- package/src/schematics/table/action/open-api-table-action/index.js.map +1 -0
- package/src/schematics/table/action/open-api-table-action/schema.d.ts +9 -0
- package/src/schematics/table/action/open-api-table-action/schema.json +121 -0
- package/src/schematics/table/action/operation-table-action/index.d.ts +1 -3
- package/src/schematics/table/action/operation-table-action/index.js +11 -12
- package/src/schematics/table/action/operation-table-action/index.js.map +1 -1
- package/src/schematics/table/header-button/form-table-header-button/index.d.ts +11 -0
- package/src/schematics/table/header-button/form-table-header-button/index.js +83 -0
- package/src/schematics/table/header-button/form-table-header-button/index.js.map +1 -0
- package/src/schematics/table/header-button/form-table-header-button/schema.d.ts +7 -0
- package/src/schematics/table/header-button/form-table-header-button/schema.json +123 -0
- package/src/schematics/table/header-button/navigation-table-header-button/index.d.ts +8 -0
- package/src/schematics/table/header-button/navigation-table-header-button/index.js +69 -0
- package/src/schematics/table/header-button/navigation-table-header-button/index.js.map +1 -0
- package/src/schematics/table/header-button/navigation-table-header-button/schema.d.ts +8 -0
- package/src/schematics/table/header-button/navigation-table-header-button/schema.json +87 -0
- package/src/schematics/table/table-action/index.d.ts +1 -1
- package/src/schematics/table/table-action/index.js +6 -4
- package/src/schematics/table/table-action/index.js.map +1 -1
- package/src/schematics/table/table-action/schema.json +8 -0
- package/src/schematics/table/table-component/files/component/__componentName__.component.html.template +17 -18
- package/src/schematics/table/table-component/files/component/__componentName__.component.ts.template +3 -5
- package/src/schematics/table/table-component/index.d.ts +1 -0
- package/src/schematics/table/table-component/index.js +44 -8
- package/src/schematics/table/table-component/index.js.map +1 -1
- package/src/schematics/table/table-component/schema.json +207 -220
- package/src/schematics/table/table-header-button/index.d.ts +8 -0
- package/src/schematics/table/table-header-button/index.js +50 -0
- package/src/schematics/table/table-header-button/index.js.map +1 -0
- package/src/schematics/table/table-header-button/schema.d.ts +8 -0
- package/src/schematics/table/table-header-button/schema.json +80 -0
- package/src/schematics/table/tree-table-component/files/component/__componentName__.component.html.template +3 -3
- package/src/schematics/table/tree-table-component/files/component/__componentName__.component.ts.template +1 -3
- package/src/schematics/table/tree-table-component/index.d.ts +1 -0
- package/src/schematics/table/tree-table-component/index.js +14 -18
- package/src/schematics/table/tree-table-component/index.js.map +1 -1
- package/src/schematics/table/tree-table-component/schema.json +11 -1
- package/src/schematics/tree-component/schema.json +11 -1
- /package/src/schematics/form/form-component/files/window/{open-__name__-form-window.method.ts.template → open-__componentName__-window.method.ts.template} +0 -0
|
@@ -6,9 +6,20 @@ const schematics_ts_morph_1 = require("@rxap/schematics-ts-morph");
|
|
|
6
6
|
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
7
7
|
const utilities_1 = require("@rxap/utilities");
|
|
8
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");
|
|
9
14
|
const operation_table_action_1 = require("../operation-table-action");
|
|
10
15
|
function NormalizeFormTableActionOptions(options) {
|
|
11
|
-
|
|
16
|
+
var _a, _b, _c;
|
|
17
|
+
const normalizedOptions = (0, operation_table_action_1.NormalizeOperationTableActionOptions)(options);
|
|
18
|
+
const { controllerName, type, nestModule, } = normalizedOptions;
|
|
19
|
+
return Object.assign(Object.assign({}, normalizedOptions), { controllerName: (0, schematics_ts_morph_1.BuildNestControllerName)({
|
|
20
|
+
nestModule,
|
|
21
|
+
controllerName: [type, 'action'].join('-'),
|
|
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 : []) }) });
|
|
12
23
|
}
|
|
13
24
|
exports.NormalizeFormTableActionOptions = NormalizeFormTableActionOptions;
|
|
14
25
|
function CoerceTypeAlias(sourceFile, name, structure) {
|
|
@@ -23,8 +34,7 @@ function UseOperationResponseAsFormTypeRule(options) {
|
|
|
23
34
|
const { name, operationId, scope, } = options;
|
|
24
35
|
const className = (0, utilities_1.CoerceSuffix)((0, utilities_1.classify)(name), 'Form');
|
|
25
36
|
const interfaceName = `I${className}`;
|
|
26
|
-
return (0, schematics_ts_morph_1.TsMorphAngularProjectTransformRule)(options, (project) => {
|
|
27
|
-
const sourceFile = (0, schematics_ts_morph_1.CoerceSourceFile)(project, '/' + (0, utilities_1.CoerceSuffix)(name, '.form.ts'));
|
|
37
|
+
return (0, schematics_ts_morph_1.TsMorphAngularProjectTransformRule)(options, (project, [sourceFile]) => {
|
|
28
38
|
const interfaceDeclaration = sourceFile.getInterface(interfaceName);
|
|
29
39
|
if (interfaceDeclaration) {
|
|
30
40
|
interfaceDeclaration.remove();
|
|
@@ -37,29 +47,102 @@ function UseOperationResponseAsFormTypeRule(options) {
|
|
|
37
47
|
namedImports: [(0, schematics_ts_morph_1.OperationIdToResponseClassName)(operationId)],
|
|
38
48
|
moduleSpecifier: (0, schematics_ts_morph_1.OperationIdToResponseClassImportPath)(operationId, scope),
|
|
39
49
|
});
|
|
40
|
-
});
|
|
50
|
+
}, ['/' + (0, utilities_1.CoerceSuffix)(name, '.form.ts')]);
|
|
51
|
+
}
|
|
52
|
+
function nestjsBackendRule(normalizedOptions) {
|
|
53
|
+
const { project, feature, shared, directory, nestModule, type, context, controllerName, scope, } = normalizedOptions;
|
|
54
|
+
if (!nestModule) {
|
|
55
|
+
throw new Error('The nest module is required');
|
|
56
|
+
}
|
|
57
|
+
const controllerPath = `${(0, utilities_1.dasherize)(nestModule)}/action/:rowId/${type}`;
|
|
58
|
+
return (0, schematics_1.chain)([
|
|
59
|
+
() => console.log('Coerce form get table action operation'),
|
|
60
|
+
(0, schematics_ts_morph_1.CoerceOperation)({
|
|
61
|
+
controllerName,
|
|
62
|
+
nestModule,
|
|
63
|
+
project,
|
|
64
|
+
feature,
|
|
65
|
+
shared,
|
|
66
|
+
context,
|
|
67
|
+
operationName: `get`,
|
|
68
|
+
controllerPath,
|
|
69
|
+
tsMorphTransform: (project, sourceFile) => {
|
|
70
|
+
const { className, filePath, } = (0, schematics_ts_morph_1.CoerceDtoClass)({
|
|
71
|
+
project,
|
|
72
|
+
name: controllerName,
|
|
73
|
+
propertyList: normalizedOptions.options.controlList.map(control => (0, index_1.FormComponentControlToDtoClassProperty)(control)),
|
|
74
|
+
});
|
|
75
|
+
(0, schematics_ts_morph_1.CoerceImports)(sourceFile, {
|
|
76
|
+
namedImports: [className],
|
|
77
|
+
moduleSpecifier: filePath,
|
|
78
|
+
});
|
|
79
|
+
return {
|
|
80
|
+
returnType: className,
|
|
81
|
+
paramList: [
|
|
82
|
+
{
|
|
83
|
+
name: 'rowId',
|
|
84
|
+
fromParent: true,
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
};
|
|
88
|
+
},
|
|
89
|
+
}),
|
|
90
|
+
() => console.log('Coerce form submit table action operation'),
|
|
91
|
+
(0, schematics_ts_morph_1.CoerceFormSubmitOperation)({
|
|
92
|
+
controllerName,
|
|
93
|
+
project,
|
|
94
|
+
feature,
|
|
95
|
+
shared,
|
|
96
|
+
nestModule,
|
|
97
|
+
context,
|
|
98
|
+
controllerPath,
|
|
99
|
+
paramList: [
|
|
100
|
+
{
|
|
101
|
+
name: 'rowId',
|
|
102
|
+
fromParent: true,
|
|
103
|
+
},
|
|
104
|
+
],
|
|
105
|
+
bodyDtoName: controllerName,
|
|
106
|
+
}),
|
|
107
|
+
() => console.log('Update form type alias'),
|
|
108
|
+
UseOperationResponseAsFormTypeRule({
|
|
109
|
+
scope,
|
|
110
|
+
project,
|
|
111
|
+
feature,
|
|
112
|
+
directory: (0, path_1.join)(directory !== null && directory !== void 0 ? directory : '', (0, utilities_1.CoerceSuffix)(type, '-form')),
|
|
113
|
+
name: type,
|
|
114
|
+
operationId: buildGetOperationId(normalizedOptions),
|
|
115
|
+
}),
|
|
116
|
+
]);
|
|
117
|
+
}
|
|
118
|
+
function backendRule(normalizedOptions) {
|
|
119
|
+
const { backend } = normalizedOptions;
|
|
120
|
+
switch (backend) {
|
|
121
|
+
case backend_types_1.BackendTypes.NESTJS:
|
|
122
|
+
return nestjsBackendRule(normalizedOptions);
|
|
123
|
+
}
|
|
124
|
+
return (0, schematics_1.noop)();
|
|
125
|
+
}
|
|
126
|
+
function printOptions(options) {
|
|
127
|
+
(0, angular_options_1.PrintAngularOptions)('form-table-action', options);
|
|
128
|
+
}
|
|
129
|
+
function buildGetOperationId(normalizedOptions) {
|
|
130
|
+
const { controllerName, } = normalizedOptions;
|
|
131
|
+
return (0, schematics_ts_morph_1.buildOperationId)(normalizedOptions, `get`, controllerName);
|
|
41
132
|
}
|
|
42
133
|
function default_1(options) {
|
|
43
134
|
const normalizedOptions = NormalizeFormTableActionOptions(options);
|
|
44
|
-
const { refresh, confirm, tooltip, errorMessage, successMessage, priority, checkFunction, tableName, project, feature, shared, directory, nestModule, type, context, controllerName, overwrite, scope, options: formOptions, } = normalizedOptions;
|
|
45
|
-
|
|
135
|
+
const { refresh, confirm, tooltip, errorMessage, successMessage, priority, checkFunction, tableName, project, feature, shared, directory, nestModule, type, context, controllerName, overwrite, scope, options: formOptions, backend, } = normalizedOptions;
|
|
136
|
+
printOptions(normalizedOptions);
|
|
46
137
|
return (host) => {
|
|
47
|
-
|
|
48
|
-
project,
|
|
49
|
-
feature,
|
|
50
|
-
directory,
|
|
51
|
-
name: tableName,
|
|
52
|
-
})) {
|
|
53
|
-
throw new schematics_1.SchematicsException(`Could not find the table component '${tableName}' in the project '${project}' and feature '${feature}' and directory '${directory}'.`);
|
|
54
|
-
}
|
|
138
|
+
(0, assert_table_component_exists_1.AssertTableComponentExists)(host, normalizedOptions);
|
|
55
139
|
return (0, schematics_1.chain)([
|
|
140
|
+
() => console.group('\x1b[32m[@rxap/schematics-angular:form-table-action]\x1b[0m'),
|
|
141
|
+
() => console.info(`Generating form table action rule...`),
|
|
56
142
|
(0, schematics_ts_morph_1.CoerceFormTableActionRule)({
|
|
57
143
|
scope,
|
|
58
144
|
directory: (0, path_1.join)(directory !== null && directory !== void 0 ? directory : '', 'methods', 'action'),
|
|
59
|
-
loadOperationId:
|
|
60
|
-
controllerName,
|
|
61
|
-
nestModule,
|
|
62
|
-
})),
|
|
145
|
+
loadOperationId: backend === backend_types_1.BackendTypes.NESTJS ? buildGetOperationId(normalizedOptions) : undefined,
|
|
63
146
|
type,
|
|
64
147
|
tableName,
|
|
65
148
|
refresh,
|
|
@@ -72,65 +155,34 @@ function default_1(options) {
|
|
|
72
155
|
project,
|
|
73
156
|
feature,
|
|
74
157
|
}),
|
|
75
|
-
(
|
|
76
|
-
|
|
77
|
-
nestModule,
|
|
158
|
+
() => console.log('Coerce open form window method to table component ...'),
|
|
159
|
+
(0, schematics_ts_morph_1.CoerceComponentRule)({
|
|
78
160
|
project,
|
|
79
161
|
feature,
|
|
80
162
|
shared,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
tsMorphTransform: (project, sourceFile) => {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
moduleSpecifier: filePath,
|
|
92
|
-
});
|
|
93
|
-
return {
|
|
94
|
-
returnType: className,
|
|
95
|
-
paramList: [
|
|
96
|
-
{
|
|
97
|
-
name: 'rowId',
|
|
98
|
-
fromParent: true,
|
|
99
|
-
},
|
|
100
|
-
],
|
|
101
|
-
};
|
|
163
|
+
name: tableName,
|
|
164
|
+
directory,
|
|
165
|
+
overwrite,
|
|
166
|
+
tsMorphTransform: (project, [sourceFile]) => {
|
|
167
|
+
(0, schematics_ts_morph_1.AddComponentProvider)(sourceFile, `Open${(0, utilities_1.classify)(type)}FormWindowMethod`, [
|
|
168
|
+
{
|
|
169
|
+
moduleSpecifier: `./${type}-form/open-${type}-form-window.method`,
|
|
170
|
+
namedImports: [`Open${(0, utilities_1.classify)(type)}FormWindowMethod`],
|
|
171
|
+
},
|
|
172
|
+
]);
|
|
102
173
|
},
|
|
103
174
|
}),
|
|
175
|
+
() => console.info(`Generating form component...`),
|
|
104
176
|
(0, schematics_utilities_1.ExecuteSchematic)('form-component', Object.assign(Object.assign({}, formOptions !== null && formOptions !== void 0 ? formOptions : {}), { project, name: type, feature,
|
|
105
177
|
directory,
|
|
106
178
|
shared, window: true, role: type, nestModule,
|
|
107
179
|
controllerName,
|
|
108
|
-
overwrite,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
nestModule,
|
|
115
|
-
paramList: [
|
|
116
|
-
{
|
|
117
|
-
name: 'rowId',
|
|
118
|
-
fromParent: true,
|
|
119
|
-
},
|
|
120
|
-
],
|
|
121
|
-
bodyDtoName: (0, utilities_1.joinWithDash)([context, type, 'action', type, 'form']),
|
|
122
|
-
}),
|
|
123
|
-
UseOperationResponseAsFormTypeRule({
|
|
124
|
-
scope,
|
|
125
|
-
project,
|
|
126
|
-
feature,
|
|
127
|
-
directory: (0, path_1.join)(directory !== null && directory !== void 0 ? directory : '', (0, utilities_1.CoerceSuffix)(type, '-form')),
|
|
128
|
-
name: type,
|
|
129
|
-
operationId: (0, schematics_ts_morph_1.buildOperationId)(normalizedOptions, `get`, (0, schematics_ts_morph_1.BuildNestControllerName)({
|
|
130
|
-
controllerName,
|
|
131
|
-
nestModule,
|
|
132
|
-
})),
|
|
133
|
-
}),
|
|
180
|
+
overwrite,
|
|
181
|
+
context,
|
|
182
|
+
backend })),
|
|
183
|
+
() => console.info(`Generating backend...`),
|
|
184
|
+
backendRule(normalizedOptions),
|
|
185
|
+
() => console.groupEnd(),
|
|
134
186
|
]);
|
|
135
187
|
};
|
|
136
188
|
}
|
|
@@ -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,2DAKoC;AACpC,mEAcmC;AACnC,qEAA8D;AAC9D,+CAKyB;AACzB,+BAA4B;
|
|
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;IACxE,MAAM,EACJ,cAAc,EACd,IAAI,EACJ,UAAU,GACX,GAAG,iBAAiB,CAAC;IACtB,uCACK,iBAAiB,KACpB,cAAc,EAAE,IAAA,6CAAuB,EAAC;YACtC,UAAU;YACV,cAAc,EAAE,CAAE,IAAI,EAAE,QAAQ,CAAE,CAAC,IAAI,CAAC,GAAG,CAAC;SAC7C,CAAC,EACF,OAAO,kCACF,MAAA,iBAAiB,CAAC,OAAO,mCAAI,EAAE,KAClC,WAAW,EAAE,IAAA,0DAAiC,EAAC,MAAA,MAAA,iBAAiB,CAAC,OAAO,0CAAG,aAAa,CAAC,mCAAI,EAAE,CAAC,OAElG;AACJ,CAAC;AApBD,0EAoBC;AAED,SAAgB,eAAe,CAC7B,UAAsB,EACtB,IAAY,EACZ,SAAoE;IAEpE,IAAI,oBAAoB,GAAG,UAAU,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IACzD,IAAI,CAAC,oBAAoB,EAAE;QACzB,oBAAoB,GAAG,UAAU,CAAC,YAAY,iCACzC,SAAS,KACZ,IAAI,IACJ,CAAC;KACJ;IACD,OAAO,oBAAoB,CAAC;AAC9B,CAAC;AAbD,0CAaC;AASD,SAAS,kCAAkC,CACzC,OAAkD;IAElD,MAAM,EACJ,IAAI,EACJ,WAAW,EACX,KAAK,GACN,GAAG,OAAO,CAAC;IAEZ,MAAM,SAAS,GAAG,IAAA,wBAAY,EAAC,IAAA,oBAAQ,EAAC,IA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P,SAAS;gBACT,MAAM,EACN,MAAM,EAAE,IAAI,EACZ,IAAI,EAAE,IAAI,EACV,UAAU;gBACV,cAAc;gBACd,SAAS;gBACT,OAAO;gBACP,OAAO,IACP;YACF,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,uBAAuB,CAAC;YAC3C,WAAW,CAAC,iBAAiB,CAAC;YAC9B,GAAG,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE;SACzB,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AA/FD,4BA+FC"}
|
|
@@ -78,8 +78,18 @@
|
|
|
78
78
|
"description": "The module name for the table nest operations"
|
|
79
79
|
},
|
|
80
80
|
"overwrite": {
|
|
81
|
-
"
|
|
82
|
-
|
|
81
|
+
"anyOf": [
|
|
82
|
+
{
|
|
83
|
+
"type": "boolean"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"type": "array",
|
|
87
|
+
"items": {
|
|
88
|
+
"type": "string"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
"description": "Overwrite existing files",
|
|
83
93
|
"default": false
|
|
84
94
|
},
|
|
85
95
|
"context": {
|
|
@@ -88,6 +98,41 @@
|
|
|
88
98
|
},
|
|
89
99
|
"options": {
|
|
90
100
|
"type": "object",
|
|
101
|
+
"properties": {
|
|
102
|
+
"controlList": {
|
|
103
|
+
"alias": "control",
|
|
104
|
+
"type": "array",
|
|
105
|
+
"items": {
|
|
106
|
+
"type": "object",
|
|
107
|
+
"properties": {
|
|
108
|
+
"type": {
|
|
109
|
+
"type": "string"
|
|
110
|
+
},
|
|
111
|
+
"name": {
|
|
112
|
+
"type": "string"
|
|
113
|
+
},
|
|
114
|
+
"state": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"description": "The initial state of the control"
|
|
117
|
+
},
|
|
118
|
+
"isRequired": {
|
|
119
|
+
"type": "boolean",
|
|
120
|
+
"description": "Whether the control value is required",
|
|
121
|
+
"default": false
|
|
122
|
+
},
|
|
123
|
+
"validatorList": {
|
|
124
|
+
"type": "array",
|
|
125
|
+
"items": {
|
|
126
|
+
"type": "string"
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"required": [
|
|
131
|
+
"name"
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
},
|
|
91
136
|
"additionalProperties": true
|
|
92
137
|
}
|
|
93
138
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { NavigationTableActionOptions } from './schema';
|
|
2
1
|
import { Tree } from '@angular-devkit/schematics';
|
|
3
2
|
import { Normalized } from '@rxap/utilities';
|
|
4
3
|
import { NormalizedOperationTableActionOptions } from '../operation-table-action';
|
|
4
|
+
import { NavigationTableActionOptions } from './schema';
|
|
5
5
|
export type NormalizedNavigationTableActionOptions = Readonly<Normalized<NavigationTableActionOptions>> & NormalizedOperationTableActionOptions;
|
|
6
6
|
export declare function NormalizeNavigationTableActionOptions(options: NavigationTableActionOptions): NormalizedNavigationTableActionOptions;
|
|
7
7
|
export default function (options: NavigationTableActionOptions): (host: Tree) => import("@angular-devkit/schematics").Rule;
|
|
@@ -2,28 +2,27 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NormalizeNavigationTableActionOptions = void 0;
|
|
4
4
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
-
const path_1 = require("path");
|
|
6
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");
|
|
7
9
|
const operation_table_action_1 = require("../operation-table-action");
|
|
8
10
|
function NormalizeNavigationTableActionOptions(options) {
|
|
9
11
|
var _a;
|
|
10
12
|
return Object.assign(Object.assign({}, (0, operation_table_action_1.NormalizeOperationTableActionOptions)(options)), { route: (_a = options.route) !== null && _a !== void 0 ? _a : null });
|
|
11
13
|
}
|
|
12
14
|
exports.NormalizeNavigationTableActionOptions = NormalizeNavigationTableActionOptions;
|
|
15
|
+
function printOptions(options) {
|
|
16
|
+
(0, angular_options_1.PrintAngularOptions)('navigation-table-action', options);
|
|
17
|
+
}
|
|
13
18
|
function default_1(options) {
|
|
14
19
|
const normalizedOptions = NormalizeNavigationTableActionOptions(options);
|
|
15
20
|
const { refresh, confirm, tooltip, errorMessage, successMessage, priority, checkFunction, tableName, project, feature, shared, directory, type, route, } = normalizedOptions;
|
|
16
|
-
|
|
21
|
+
printOptions(normalizedOptions);
|
|
17
22
|
return (host) => {
|
|
18
|
-
|
|
19
|
-
project,
|
|
20
|
-
feature,
|
|
21
|
-
directory,
|
|
22
|
-
name: tableName,
|
|
23
|
-
})) {
|
|
24
|
-
throw new schematics_1.SchematicsException(`Could not find the table component '${tableName}' in the project '${project}' and feature '${feature}' and directory '${directory}'.`);
|
|
25
|
-
}
|
|
23
|
+
(0, assert_table_component_exists_1.AssertTableComponentExists)(host, normalizedOptions);
|
|
26
24
|
return (0, schematics_1.chain)([
|
|
25
|
+
() => console.group('\x1b[32m[@rxap/schematics-angular:navigation-table-action]\x1b[0m'),
|
|
27
26
|
(0, schematics_ts_morph_1.CoerceNavigationTableActionRule)({
|
|
28
27
|
directory: (0, path_1.join)(directory !== null && directory !== void 0 ? directory : '', 'methods', 'action'),
|
|
29
28
|
type,
|
|
@@ -39,6 +38,7 @@ function default_1(options) {
|
|
|
39
38
|
feature,
|
|
40
39
|
route,
|
|
41
40
|
}),
|
|
41
|
+
() => console.groupEnd(),
|
|
42
42
|
]);
|
|
43
43
|
};
|
|
44
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/schematic/angular/src/schematics/table/action/navigation-table-action/index.ts"],"names":[],"mappings":";;;
|
|
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"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Tree } from '@angular-devkit/schematics';
|
|
2
|
+
import { Normalized } from '@rxap/utilities';
|
|
3
|
+
import { NormalizedAngularOptions } from '../../../../lib/angular-options';
|
|
4
|
+
import { OpenApiTableActionOptions } from './schema';
|
|
5
|
+
export interface NormalizedOpenApiTableActionOptions extends Readonly<Normalized<OpenApiTableActionOptions> & NormalizedAngularOptions> {
|
|
6
|
+
body: boolean | Record<string, string>;
|
|
7
|
+
parameters: boolean | Record<string, string>;
|
|
8
|
+
}
|
|
9
|
+
export declare function NormalizeOpenApiTableActionOptions(options: Readonly<OpenApiTableActionOptions>): NormalizedOpenApiTableActionOptions;
|
|
10
|
+
export default function (options: OpenApiTableActionOptions): (host: Tree) => import("@angular-devkit/schematics").Rule;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NormalizeOpenApiTableActionOptions = 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 table_action_1 = require("../../table-action");
|
|
10
|
+
function NormalizeOpenApiTableActionOptions(options) {
|
|
11
|
+
var _a, _b, _c;
|
|
12
|
+
const normalizedOptions = (0, table_action_1.NormalizeTableActionOptions)(options);
|
|
13
|
+
return Object.seal(Object.assign(Object.assign({}, normalizedOptions), { operationId: options.operationId, body: (_a = options.body) !== null && _a !== void 0 ? _a : false, parameters: (_b = options.parameters) !== null && _b !== void 0 ? _b : false, scope: (_c = options.scope) !== null && _c !== void 0 ? _c : null }));
|
|
14
|
+
}
|
|
15
|
+
exports.NormalizeOpenApiTableActionOptions = NormalizeOpenApiTableActionOptions;
|
|
16
|
+
function printOptions(options) {
|
|
17
|
+
(0, angular_options_1.PrintAngularOptions)('open-api-table-action', options);
|
|
18
|
+
}
|
|
19
|
+
function default_1(options) {
|
|
20
|
+
const normalizedOptions = NormalizeOpenApiTableActionOptions(options);
|
|
21
|
+
const { refresh, confirm, tooltip, errorMessage, successMessage, priority, checkFunction, tableName, project, feature, directory, type, operationId, body, parameters, scope, } = normalizedOptions;
|
|
22
|
+
printOptions(normalizedOptions);
|
|
23
|
+
return (host) => {
|
|
24
|
+
(0, assert_table_component_exists_1.AssertTableComponentExists)(host, normalizedOptions);
|
|
25
|
+
return (0, schematics_1.chain)([
|
|
26
|
+
() => console.group('\x1b[32m[@rxap/schematics-angular:open-api-table-action]\x1b[0m'),
|
|
27
|
+
(0, schematics_ts_morph_1.CoerceOpenApiTableActionRule)({
|
|
28
|
+
directory: (0, path_1.join)(directory !== null && directory !== void 0 ? directory : '', 'methods', 'action'),
|
|
29
|
+
scope,
|
|
30
|
+
operationId,
|
|
31
|
+
body,
|
|
32
|
+
parameters,
|
|
33
|
+
type,
|
|
34
|
+
tableName,
|
|
35
|
+
refresh,
|
|
36
|
+
confirm,
|
|
37
|
+
tooltip,
|
|
38
|
+
errorMessage,
|
|
39
|
+
successMessage,
|
|
40
|
+
priority,
|
|
41
|
+
checkFunction,
|
|
42
|
+
project,
|
|
43
|
+
feature,
|
|
44
|
+
}),
|
|
45
|
+
() => console.groupEnd(),
|
|
46
|
+
]);
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
exports.default = default_1;
|
|
50
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/schematic/angular/src/schematics/table/action/open-api-table-action/index.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,EAAE,SAAS,EAAE,QAAQ,CAAC;gBACrD,KAAK;gBACL,WAAW;gBACX,IAAI;gBACJ,UAAU;gBACV,IAAI;gBACJ,SAAS;gBACT,OAAO;gBACP,OAAO;gBACP,OAAO;gBACP,YAAY;gBACZ,cAAc;gBACd,QAAQ;gBACR,aAAa;gBACb,OAAO;gBACP,OAAO;aACR,CAAC;YACF,GAAG,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE;SACzB,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAlDD,4BAkDC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TableActionOptions } from '../../table-action/schema';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
export interface OpenApiTableActionOptions extends TableActionOptions {
|
|
5
|
+
operationId: string;
|
|
6
|
+
body?: boolean | Record<string, string>;
|
|
7
|
+
parameters?: boolean | Record<string, string>;
|
|
8
|
+
scope?: string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "table-action",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"tableName": {
|
|
7
|
+
"alias": "table",
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "The name of the table action"
|
|
10
|
+
},
|
|
11
|
+
"type": {
|
|
12
|
+
"alias": "actionType",
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "The table action type string",
|
|
15
|
+
"x-prompt": "Enter the table action type string?"
|
|
16
|
+
},
|
|
17
|
+
"project": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "The target project where the table action should be added."
|
|
20
|
+
},
|
|
21
|
+
"feature": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"description": "The feature name where the table action should be added.",
|
|
24
|
+
"x-prompt": "To which feature should the table action be added?"
|
|
25
|
+
},
|
|
26
|
+
"backend": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"description": "The backend that should be used to handel data",
|
|
29
|
+
"enum": [
|
|
30
|
+
"none",
|
|
31
|
+
"local",
|
|
32
|
+
"nestjs",
|
|
33
|
+
"open-api"
|
|
34
|
+
],
|
|
35
|
+
"default": "none"
|
|
36
|
+
},
|
|
37
|
+
"shared": {
|
|
38
|
+
"type": "boolean",
|
|
39
|
+
"description": "Whether the table action is shared across applications",
|
|
40
|
+
"default": false
|
|
41
|
+
},
|
|
42
|
+
"refresh": {
|
|
43
|
+
"type": "boolean",
|
|
44
|
+
"description": "Whether the table action should refresh the table after execution",
|
|
45
|
+
"default": false
|
|
46
|
+
},
|
|
47
|
+
"confirm": {
|
|
48
|
+
"type": "boolean",
|
|
49
|
+
"description": "Whether the table action should confirm before execution",
|
|
50
|
+
"default": false
|
|
51
|
+
},
|
|
52
|
+
"tooltip": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"description": "The tooltip for the table action"
|
|
55
|
+
},
|
|
56
|
+
"errorMessage": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"description": "The error message for the table action"
|
|
59
|
+
},
|
|
60
|
+
"successMessage": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"description": "The success message for the table action"
|
|
63
|
+
},
|
|
64
|
+
"checkFunction": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"description": "The check function for the table action"
|
|
67
|
+
},
|
|
68
|
+
"priority": {
|
|
69
|
+
"type": "number",
|
|
70
|
+
"description": "The priority of the table action"
|
|
71
|
+
},
|
|
72
|
+
"directory": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"description": "A directory name or absolute path for the table action. relative to the feature base path"
|
|
75
|
+
},
|
|
76
|
+
"operationId": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"description": "The open api operationId for the table action"
|
|
79
|
+
},
|
|
80
|
+
"scope": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"description": "The scope of package for the openapi classes"
|
|
83
|
+
},
|
|
84
|
+
"body": {
|
|
85
|
+
"oneOf": [
|
|
86
|
+
{
|
|
87
|
+
"type": "boolean",
|
|
88
|
+
"description": "Pass the full row as body for the operation request"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"type": "object",
|
|
92
|
+
"description": "Mapping of table columns to body properties - [request property]: [table column]",
|
|
93
|
+
"additionalProperties": true
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
"parameters": {
|
|
98
|
+
"oneOf": [
|
|
99
|
+
{
|
|
100
|
+
"type": "boolean",
|
|
101
|
+
"description": "Pass the full row as parameters for the operation request"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"type": "object",
|
|
105
|
+
"description": "Mapping of table columns to parameters properties - [request property]: [table column]",
|
|
106
|
+
"additionalProperties": true
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
"options": {
|
|
111
|
+
"type": "object",
|
|
112
|
+
"additionalProperties": true
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"required": [
|
|
116
|
+
"type",
|
|
117
|
+
"project",
|
|
118
|
+
"feature",
|
|
119
|
+
"operationId"
|
|
120
|
+
]
|
|
121
|
+
}
|
|
@@ -2,10 +2,8 @@ import { Tree } from '@angular-devkit/schematics';
|
|
|
2
2
|
import { Normalized } from '@rxap/utilities';
|
|
3
3
|
import { NormalizedAngularOptions } from '../../../../lib/angular-options';
|
|
4
4
|
import { OperationTableActionOptions } from './schema';
|
|
5
|
-
|
|
6
|
-
export interface NormalizedOperationTableActionOptions extends tmp {
|
|
5
|
+
export interface NormalizedOperationTableActionOptions extends Readonly<Normalized<OperationTableActionOptions> & NormalizedAngularOptions> {
|
|
7
6
|
controllerName: string;
|
|
8
7
|
}
|
|
9
8
|
export declare function NormalizeOperationTableActionOptions(options: OperationTableActionOptions): NormalizedOperationTableActionOptions;
|
|
10
9
|
export default function (options: OperationTableActionOptions): (host: Tree) => import("@angular-devkit/schematics").Rule;
|
|
11
|
-
export {};
|