@rxap/schematic-angular 16.1.0-dev.2 → 16.1.0-dev.21
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 +129 -0
- package/README.md +1 -1
- package/collection.json +16 -1
- package/package.json +40 -38
- package/src/lib/angular-options.js +18 -1
- package/src/lib/angular-options.js.map +1 -1
- package/src/lib/minimum-table-component-options.d.ts +1 -0
- package/src/lib/minimum-table-component-options.js +53 -144
- 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 +8 -8
- package/src/lib/table-action.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/schematics/accordion/accordion-item-component/files/component/__componentName__.component.html.template +1 -1
- 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/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/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 +35 -0
- 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/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-component/files/component/__componentName__.component.html.template +6 -9
- package/src/schematics/table/table-component/files/component/__componentName__.component.ts.template +2 -4
- package/src/schematics/table/table-component/index.d.ts +1 -0
- package/src/schematics/table/table-component/index.js +43 -7
- package/src/schematics/table/table-component/index.js.map +1 -1
- package/src/schematics/table/table-component/schema.json +14 -11
- 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 +1 -1
- package/src/schematics/table/tree-table-component/files/component/__componentName__.component.ts.template +0 -2
- package/src/schematics/table/tree-table-component/index.d.ts +1 -0
- package/src/schematics/table/tree-table-component/index.js +13 -17
- package/src/schematics/table/tree-table-component/index.js.map +1 -1
- /package/src/schematics/form/form-component/files/window/{open-__name__-form-window.method.ts.template → open-__componentName__-window.method.ts.template} +0 -0
|
@@ -1 +1 @@
|
|
|
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;
|
|
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,I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CAAC;KACH,CAAC,CAAC;AAEL,CAAC;AAED,SAAS,WAAW,CAAC,iBAAwD;IAE3E,MAAM,EACJ,OAAO,GACR,GAAG,iBAAiB,CAAC;IAEtB,QAAQ,OAAO,EAAE;QAEf,KAAK,4BAAY,CAAC,MAAM;YACtB,OAAO,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;KAElD;IAED,OAAO,IAAA,iBAAI,GAAE,CAAC;AAEhB,CAAC;AAED,SAAS,YAAY,CAAC,OAA8C;IAClE,IAAA,qCAAmB,EAAC,wBAAwB,EAAE,OAAO,CAAC,CAAC;AACzD,CAAC;AAED,mBAAyB,OAAoC;IAC3D,MAAM,iBAAiB,GAAG,oCAAoC,CAAC,OAAO,CAAC,CAAC;IAExE,YAAY,CAAC,iBAAiB,CAAC,CAAC;IAEhC,OAAO,CAAC,IAAU,EAAE,EAAE;QAEpB,IAAA,0DAA0B,EAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;QAEpD,OAAO,IAAA,kBAAK,EAAC;YACX,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,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"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Tree } from '@angular-devkit/schematics';
|
|
2
|
+
import { Normalized } from '@rxap/utilities';
|
|
3
|
+
import { NormalizedAngularOptions } from '../../../../lib/angular-options';
|
|
4
|
+
import { NormalizedTableHeaderButton } from '../../../../lib/table-header-button';
|
|
5
|
+
import { FormTableHeaderButtonOptions } from './schema';
|
|
6
|
+
export interface NormalizedFormTableHeaderButtonOptions extends Readonly<Normalized<FormTableHeaderButtonOptions> & NormalizedAngularOptions & NormalizedTableHeaderButton> {
|
|
7
|
+
options: Record<string, any>;
|
|
8
|
+
controllerName: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function NormalizeFormTableHeaderButtonOptions(options: Readonly<FormTableHeaderButtonOptions>): NormalizedFormTableHeaderButtonOptions;
|
|
11
|
+
export default function (options: FormTableHeaderButtonOptions): (host: Tree) => import("@angular-devkit/schematics").Rule;
|
|
@@ -0,0 +1,83 @@
|
|
|
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);
|
|
13
|
+
const nestModule = options.nestModule;
|
|
14
|
+
return Object.seal(Object.assign(Object.assign({}, normalizedTableHeaderButtonOptions), { context: options.context, nestModule, controllerName: (0, schematics_ts_morph_1.BuildNestControllerName)({
|
|
15
|
+
nestModule,
|
|
16
|
+
controllerName: 'header-button',
|
|
17
|
+
}) }));
|
|
18
|
+
}
|
|
19
|
+
exports.NormalizeFormTableHeaderButtonOptions = NormalizeFormTableHeaderButtonOptions;
|
|
20
|
+
function printOptions(options) {
|
|
21
|
+
(0, angular_options_1.PrintAngularOptions)('form-table-header-button', options);
|
|
22
|
+
}
|
|
23
|
+
function default_1(options) {
|
|
24
|
+
const normalizedOptions = NormalizeFormTableHeaderButtonOptions(options);
|
|
25
|
+
const { refresh, confirm, tooltip, errorMessage, successMessage, tableName, project, feature, shared, directory, overwrite, options: formOptions, context, backend, nestModule, controllerName, } = normalizedOptions;
|
|
26
|
+
printOptions(normalizedOptions);
|
|
27
|
+
return (host) => {
|
|
28
|
+
(0, assert_table_component_exists_1.AssertTableComponentExists)(host, normalizedOptions);
|
|
29
|
+
return (0, schematics_1.chain)([
|
|
30
|
+
() => console.group('\x1b[32m[@rxap/schematics-angular:form-table-header-button]\x1b[0m'),
|
|
31
|
+
() => console.log('Coerce table header button form ...'),
|
|
32
|
+
(0, schematics_utilities_1.ExecuteSchematic)('form-component', Object.assign(Object.assign({}, formOptions), { project, name: `table-header-button`, feature,
|
|
33
|
+
directory,
|
|
34
|
+
shared, window: true, nestModule,
|
|
35
|
+
controllerName,
|
|
36
|
+
context,
|
|
37
|
+
backend,
|
|
38
|
+
overwrite })),
|
|
39
|
+
() => console.log('Coerce table header button method ...'),
|
|
40
|
+
(0, schematics_ts_morph_1.CoerceTableHeaderButtonMethodRule)({
|
|
41
|
+
project,
|
|
42
|
+
feature,
|
|
43
|
+
shared,
|
|
44
|
+
directory,
|
|
45
|
+
overwrite,
|
|
46
|
+
tableName,
|
|
47
|
+
refresh,
|
|
48
|
+
confirm,
|
|
49
|
+
tooltip,
|
|
50
|
+
errorMessage,
|
|
51
|
+
successMessage,
|
|
52
|
+
tsMorphTransform: (project, sourceFile, classDeclaration) => {
|
|
53
|
+
const [constructorDeclaration] = (0, schematics_ts_morph_1.CoerceClassConstructor)(classDeclaration);
|
|
54
|
+
(0, schematics_ts_morph_1.CoerceParameterDeclaration)(constructorDeclaration, 'openWindowMethod', {
|
|
55
|
+
isReadonly: true,
|
|
56
|
+
scope: ts_morph_1.Scope.Private,
|
|
57
|
+
type: 'OpenTableHeaderButtonFormWindowMethod',
|
|
58
|
+
});
|
|
59
|
+
(0, schematics_ts_morph_1.CoerceImports)(sourceFile, [
|
|
60
|
+
{
|
|
61
|
+
moduleSpecifier: '../table-header-button-form/open-table-header-button-form-window.method',
|
|
62
|
+
namedImports: ['OpenTableHeaderButtonFormWindowMethod'],
|
|
63
|
+
},
|
|
64
|
+
]);
|
|
65
|
+
return {
|
|
66
|
+
statements: ['return this.openWindowMethod.call(parameters).toPromise();'],
|
|
67
|
+
};
|
|
68
|
+
},
|
|
69
|
+
tsMorphTransformComponent: (project, [sourceFile]) => {
|
|
70
|
+
(0, schematics_ts_morph_1.AddComponentProvider)(sourceFile, 'OpenTableHeaderButtonFormWindowMethod', [
|
|
71
|
+
{
|
|
72
|
+
moduleSpecifier: './table-header-button-form/open-table-header-button-form-window.method',
|
|
73
|
+
namedImports: ['OpenTableHeaderButtonFormWindowMethod'],
|
|
74
|
+
},
|
|
75
|
+
]);
|
|
76
|
+
},
|
|
77
|
+
}),
|
|
78
|
+
() => console.groupEnd(),
|
|
79
|
+
]);
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
exports.default = default_1;
|
|
83
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +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,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,CAA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EAAC,sBAAsB,EAAE,kBAAkB,EAAE;wBACrE,UAAU,EAAE,IAAI;wBAChB,KAAK,EAAE,gBAAK,CAAC,OAAO;wBACpB,IAAI,EAAE,uCAAuC;qBAC9C,CAAC,CAAC;oBACH,IAAA,mCAAa,EAAC,UAAU,EAAE;wBACxB;4BACE,eAAe,EAAE,yEAAyE;4BAC1F,YAAY,EAAE,CAAE,uCAAuC,CAAE;yBAC1D;qBACF,CAAC,CAAC;oBACH,OAAO;wBACL,UAAU,EAAE,CAAE,4DAA4D,CAAE;qBAC7E,CAAC;gBACJ,CAAC;gBACD,yBAAyB,EAAE,CACzB,OAAgB,EAChB,CAAE,UAAU,CAAkB,EAC9B,EAAE;oBACF,IAAA,0CAAoB,EAClB,UAAU,EACV,uCAAuC,EACvC;wBACE;4BACE,eAAe,EAAE,wEAAwE;4BACzF,YAAY,EAAE,CAAE,uCAAuC,CAAE;yBAC1D;qBACF,CACF,CAAC;gBACJ,CAAC;aACF,CAAC;YACF,GAAG,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE;SACzB,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AA7FD,4BA6FC"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "table-action",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"tableName": {
|
|
7
|
+
"alias": "table",
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "The name of the table action"
|
|
10
|
+
},
|
|
11
|
+
"project": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "The target project where the table action should be added."
|
|
14
|
+
},
|
|
15
|
+
"feature": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "The feature name where the table action should be added.",
|
|
18
|
+
"x-prompt": "To which feature should the table action be added?"
|
|
19
|
+
},
|
|
20
|
+
"backend": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "The backend that should be used to handel data",
|
|
23
|
+
"enum": [
|
|
24
|
+
"none",
|
|
25
|
+
"local",
|
|
26
|
+
"nestjs",
|
|
27
|
+
"open-api"
|
|
28
|
+
],
|
|
29
|
+
"default": "none"
|
|
30
|
+
},
|
|
31
|
+
"shared": {
|
|
32
|
+
"type": "boolean",
|
|
33
|
+
"description": "Whether the table action is shared across applications",
|
|
34
|
+
"default": false
|
|
35
|
+
},
|
|
36
|
+
"refresh": {
|
|
37
|
+
"type": "boolean",
|
|
38
|
+
"description": "Whether the table action should refresh the table after execution",
|
|
39
|
+
"default": false
|
|
40
|
+
},
|
|
41
|
+
"confirm": {
|
|
42
|
+
"type": "boolean",
|
|
43
|
+
"description": "Whether the table action should confirm before execution",
|
|
44
|
+
"default": false
|
|
45
|
+
},
|
|
46
|
+
"tooltip": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"description": "The tooltip for the table action"
|
|
49
|
+
},
|
|
50
|
+
"errorMessage": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"description": "The error message for the table action"
|
|
53
|
+
},
|
|
54
|
+
"successMessage": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"description": "The success message for the table action"
|
|
57
|
+
},
|
|
58
|
+
"directory": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"description": "A directory name or absolute path for the table action. relative to the feature base path"
|
|
61
|
+
},
|
|
62
|
+
"permission": {
|
|
63
|
+
"type": "string"
|
|
64
|
+
},
|
|
65
|
+
"icon": {
|
|
66
|
+
"type": "string"
|
|
67
|
+
},
|
|
68
|
+
"svgIcon": {
|
|
69
|
+
"type": "string"
|
|
70
|
+
},
|
|
71
|
+
"options": {
|
|
72
|
+
"type": "object",
|
|
73
|
+
"properties": {
|
|
74
|
+
"controlList": {
|
|
75
|
+
"alias": "control",
|
|
76
|
+
"type": "array",
|
|
77
|
+
"items": {
|
|
78
|
+
"type": "object",
|
|
79
|
+
"properties": {
|
|
80
|
+
"type": {
|
|
81
|
+
"type": "string"
|
|
82
|
+
},
|
|
83
|
+
"name": {
|
|
84
|
+
"type": "string"
|
|
85
|
+
},
|
|
86
|
+
"state": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"description": "The initial state of the control"
|
|
89
|
+
},
|
|
90
|
+
"isRequired": {
|
|
91
|
+
"type": "boolean",
|
|
92
|
+
"description": "Whether the control value is required",
|
|
93
|
+
"default": false
|
|
94
|
+
},
|
|
95
|
+
"validatorList": {
|
|
96
|
+
"type": "array",
|
|
97
|
+
"items": {
|
|
98
|
+
"type": "string"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"required": [
|
|
103
|
+
"name"
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"additionalProperties": true
|
|
109
|
+
},
|
|
110
|
+
"nestModule": {
|
|
111
|
+
"type": "string",
|
|
112
|
+
"description": "The module name for the table nest operations"
|
|
113
|
+
},
|
|
114
|
+
"context": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"description": "The context use to generate proper names for class, files, etc"
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"required": [
|
|
120
|
+
"project",
|
|
121
|
+
"feature"
|
|
122
|
+
]
|
|
123
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Tree } from '@angular-devkit/schematics';
|
|
2
|
+
import { Normalized } from '@rxap/utilities';
|
|
3
|
+
import { NormalizedAngularOptions } from '../../../../lib/angular-options';
|
|
4
|
+
import { NormalizedTableHeaderButton } from '../../../../lib/table-header-button';
|
|
5
|
+
import { NavigationTableHeaderButtonOptions } from './schema';
|
|
6
|
+
export type NormalizedNavigationTableHeaderButtonOptions = Readonly<Normalized<NavigationTableHeaderButtonOptions> & NormalizedAngularOptions & NormalizedTableHeaderButton>;
|
|
7
|
+
export declare function NormalizeNavigationTableHeaderButtonOptions(options: Readonly<NavigationTableHeaderButtonOptions>): NormalizedNavigationTableHeaderButtonOptions;
|
|
8
|
+
export default function (options: NavigationTableHeaderButtonOptions): (host: Tree) => import("@angular-devkit/schematics").Rule;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NormalizeNavigationTableHeaderButtonOptions = void 0;
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
+
const schematics_ts_morph_1 = require("@rxap/schematics-ts-morph");
|
|
6
|
+
const ts_morph_1 = require("ts-morph");
|
|
7
|
+
const angular_options_1 = require("../../../../lib/angular-options");
|
|
8
|
+
const assert_table_component_exists_1 = require("../../../../lib/assert-table-component-exists");
|
|
9
|
+
const index_1 = require("../../table-header-button/index");
|
|
10
|
+
function NormalizeNavigationTableHeaderButtonOptions(options) {
|
|
11
|
+
const normalizedTableHeaderButtonOptions = (0, index_1.NormalizeTableHeaderButtonOptions)(options);
|
|
12
|
+
return Object.seal(Object.assign({}, normalizedTableHeaderButtonOptions));
|
|
13
|
+
}
|
|
14
|
+
exports.NormalizeNavigationTableHeaderButtonOptions = NormalizeNavigationTableHeaderButtonOptions;
|
|
15
|
+
function printOptions(options) {
|
|
16
|
+
(0, angular_options_1.PrintAngularOptions)('navigation-table-header-button', options);
|
|
17
|
+
}
|
|
18
|
+
function default_1(options) {
|
|
19
|
+
const normalizedOptions = NormalizeNavigationTableHeaderButtonOptions(options);
|
|
20
|
+
const { refresh, confirm, tooltip, errorMessage, successMessage, tableName, project, feature, shared, directory, overwrite, } = normalizedOptions;
|
|
21
|
+
const route = normalizedOptions.options.route;
|
|
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:navigation-table-header-button]\x1b[0m'),
|
|
27
|
+
() => console.log('Coerce table header button method ...'),
|
|
28
|
+
(0, schematics_ts_morph_1.CoerceTableHeaderButtonMethodRule)({
|
|
29
|
+
project,
|
|
30
|
+
feature,
|
|
31
|
+
shared,
|
|
32
|
+
directory,
|
|
33
|
+
overwrite,
|
|
34
|
+
tableName,
|
|
35
|
+
refresh,
|
|
36
|
+
confirm,
|
|
37
|
+
tooltip,
|
|
38
|
+
errorMessage,
|
|
39
|
+
successMessage,
|
|
40
|
+
tsMorphTransform: (project, sourceFile, classDeclaration) => {
|
|
41
|
+
const [constructorDeclaration] = (0, schematics_ts_morph_1.CoerceClassConstructor)(classDeclaration);
|
|
42
|
+
(0, schematics_ts_morph_1.CoerceParameterDeclaration)(constructorDeclaration, 'route', {
|
|
43
|
+
isReadonly: true,
|
|
44
|
+
scope: ts_morph_1.Scope.Private,
|
|
45
|
+
type: 'ActivatedRoute',
|
|
46
|
+
});
|
|
47
|
+
(0, schematics_ts_morph_1.CoerceParameterDeclaration)(constructorDeclaration, 'router', {
|
|
48
|
+
isReadonly: true,
|
|
49
|
+
scope: ts_morph_1.Scope.Private,
|
|
50
|
+
type: 'Router',
|
|
51
|
+
});
|
|
52
|
+
(0, schematics_ts_morph_1.CoerceImports)(sourceFile, [
|
|
53
|
+
{
|
|
54
|
+
moduleSpecifier: '@angular/router',
|
|
55
|
+
namedImports: ['ActivatedRoute', 'Router'],
|
|
56
|
+
},
|
|
57
|
+
]);
|
|
58
|
+
return {
|
|
59
|
+
statements: [`return this.router.navigate(['${route}'], { relativeTo: this.route })`],
|
|
60
|
+
};
|
|
61
|
+
},
|
|
62
|
+
}),
|
|
63
|
+
() => console.groupEnd(),
|
|
64
|
+
() => console.log('\x1b[32m[/@rxap/schematics-angular:navigation-table-header-button]\x1b[0m'),
|
|
65
|
+
]);
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
exports.default = default_1;
|
|
69
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/schematic/angular/src/schematics/table/header-button/navigation-table-header-button/index.ts"],"names":[],"mappings":";;;AAAA,2DAGoC;AACpC,mEAKmC;AAEnC,uCAAiC;AACjC,qEAGyC;AACzC,iGAA2F;AAE3F,2DAAoF;AAKpF,SAAgB,2CAA2C,CACzD,OAAqD;IAErD,MAAM,kCAAkC,GAAG,IAAA,yCAAiC,EAAC,OAAO,CAAC,CAAC;IACtF,OAAO,MAAM,CAAC,IAAI,mBACb,kCAAkC,EACrC,CAAC;AACL,CAAC;AAPD,kGAOC;AAED,SAAS,YAAY,CAAC,OAAqD;IACzE,IAAA,qCAAmB,EAAC,gCAAgC,EAAE,OAAO,CAAC,CAAC;AACjE,CAAC;AAED,mBAAyB,OAA2C;IAClE,MAAM,iBAAiB,GAAG,2CAA2C,CAAC,OAAO,CAAC,CAAC;IAC/E,MAAM,EACJ,OAAO,EACP,OAAO,EACP,OAAO,EACP,YAAY,EACZ,cAAc,EACd,SAAS,EACT,OAAO,EACP,OAAO,EACP,MAAM,EACN,SAAS,EACT,SAAS,GACV,GAAG,iBAAiB,CAAC;IAEtB,MAAM,KAAK,GAAG,iBAAiB,CAAC,OAAQ,CAAC,KAAK,CAAC;IAE/C,YAAY,CAAC,iBAAiB,CAAC,CAAC;IAEhC,OAAO,CAAC,IAAU,EAAE,EAAE;QAEpB,IAAA,0DAA0B,EAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;QAEpD,OAAO,IAAA,kBAAK,EAAC;YACX,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,0EAA0E,CAAC;YAC/F,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,uCAAuC,CAAC;YAC1D,IAAA,uDAAiC,EAAC;gBAChC,OAAO;gBACP,OAAO;gBACP,MAAM;gBACN,SAAS;gBACT,SAAS;gBACT,SAAS;gBACT,OAAO;gBACP,OAAO;gBACP,OAAO;gBACP,YAAY;gBACZ,cAAc;gBACd,gBAAgB,EAAE,CAAC,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,EAAE;oBAC1D,MAAM,CAAE,sBAAsB,CAAE,GAAG,IAAA,4CAAsB,EAAC,gBAAgB,CAAC,CAAC;oBAC5E,IAAA,gDAA0B,EAAC,sBAAsB,EAAE,OAAO,EAAE;wBAC1D,UAAU,EAAE,IAAI;wBAChB,KAAK,EAAE,gBAAK,CAAC,OAAO;wBACpB,IAAI,EAAE,gBAAgB;qBACvB,CAAC,CAAC;oBACH,IAAA,gDAA0B,EAAC,sBAAsB,EAAE,QAAQ,EAAE;wBAC3D,UAAU,EAAE,IAAI;wBAChB,KAAK,EAAE,gBAAK,CAAC,OAAO;wBACpB,IAAI,EAAE,QAAQ;qBACf,CAAC,CAAC;oBACH,IAAA,mCAAa,EAAC,UAAU,EAAE;wBACxB;4BACE,eAAe,EAAE,iBAAiB;4BAClC,YAAY,EAAE,CAAE,gBAAgB,EAAE,QAAQ,CAAE;yBAC7C;qBACF,CAAC,CAAC;oBACH,OAAO;wBACL,UAAU,EAAE,CAAE,iCAAkC,KAAM,iCAAiC,CAAE;qBAC1F,CAAC;gBACJ,CAAC;aACF,CAAC;YACF,GAAG,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE;YACxB,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,2EAA2E,CAAC;SAC/F,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAlED,4BAkEC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "table-action",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"tableName": {
|
|
7
|
+
"alias": "table",
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "The name of the table action"
|
|
10
|
+
},
|
|
11
|
+
"project": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "The target project where the table action should be added."
|
|
14
|
+
},
|
|
15
|
+
"feature": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "The feature name where the table action should be added.",
|
|
18
|
+
"x-prompt": "To which feature should the table action be added?"
|
|
19
|
+
},
|
|
20
|
+
"backend": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "The backend that should be used to handel data",
|
|
23
|
+
"enum": [
|
|
24
|
+
"none",
|
|
25
|
+
"local",
|
|
26
|
+
"nestjs",
|
|
27
|
+
"open-api"
|
|
28
|
+
],
|
|
29
|
+
"default": "none"
|
|
30
|
+
},
|
|
31
|
+
"shared": {
|
|
32
|
+
"type": "boolean",
|
|
33
|
+
"description": "Whether the table action is shared across applications",
|
|
34
|
+
"default": false
|
|
35
|
+
},
|
|
36
|
+
"refresh": {
|
|
37
|
+
"type": "boolean",
|
|
38
|
+
"description": "Whether the table action should refresh the table after execution",
|
|
39
|
+
"default": false
|
|
40
|
+
},
|
|
41
|
+
"confirm": {
|
|
42
|
+
"type": "boolean",
|
|
43
|
+
"description": "Whether the table action should confirm before execution",
|
|
44
|
+
"default": false
|
|
45
|
+
},
|
|
46
|
+
"tooltip": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"description": "The tooltip for the table action"
|
|
49
|
+
},
|
|
50
|
+
"errorMessage": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"description": "The error message for the table action"
|
|
53
|
+
},
|
|
54
|
+
"successMessage": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"description": "The success message for the table action"
|
|
57
|
+
},
|
|
58
|
+
"directory": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"description": "A directory name or absolute path for the table action. relative to the feature base path"
|
|
61
|
+
},
|
|
62
|
+
"permission": {
|
|
63
|
+
"type": "string"
|
|
64
|
+
},
|
|
65
|
+
"icon": {
|
|
66
|
+
"type": "string"
|
|
67
|
+
},
|
|
68
|
+
"svgIcon": {
|
|
69
|
+
"type": "string"
|
|
70
|
+
},
|
|
71
|
+
"options": {
|
|
72
|
+
"type": "object",
|
|
73
|
+
"properties": {
|
|
74
|
+
"route": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"description": "The route path for the table action"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"additionalProperties": true
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"required": [
|
|
83
|
+
"options",
|
|
84
|
+
"project",
|
|
85
|
+
"feature"
|
|
86
|
+
]
|
|
87
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { TableActionOptions } from './schema';
|
|
2
1
|
import { Tree } from '@angular-devkit/schematics';
|
|
3
2
|
import { Normalized } from '@rxap/utilities';
|
|
4
3
|
import { NormalizedAngularOptions } from '../../../lib/angular-options';
|
|
4
|
+
import { TableActionOptions } from './schema';
|
|
5
5
|
export type NormalizedTableActionOptions = Readonly<Normalized<TableActionOptions>> & NormalizedAngularOptions;
|
|
6
6
|
export declare function NormalizeTableActionOptions(options: Readonly<TableActionOptions>): NormalizedTableActionOptions;
|
|
7
7
|
export default function (options: TableActionOptions): (host: Tree) => import("@angular-devkit/schematics").Rule;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NormalizeTableActionOptions = void 0;
|
|
4
|
-
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
5
4
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
6
5
|
const schematics_ts_morph_1 = require("@rxap/schematics-ts-morph");
|
|
6
|
+
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
7
7
|
const path_1 = require("path");
|
|
8
8
|
const angular_options_1 = require("../../../lib/angular-options");
|
|
9
|
-
const table_row_action_1 = require("../../../lib/table-row-action");
|
|
10
9
|
const assert_table_component_exists_1 = require("../../../lib/assert-table-component-exists");
|
|
10
|
+
const table_row_action_1 = require("../../../lib/table-row-action");
|
|
11
11
|
function NormalizeTableActionOptions(options) {
|
|
12
12
|
const normalizedAngularOptions = (0, angular_options_1.NormalizeAngularOptions)(options);
|
|
13
13
|
const normalizedTableRowAction = (0, table_row_action_1.NormalizeTableRowAction)(options);
|
|
@@ -15,16 +15,17 @@ function NormalizeTableActionOptions(options) {
|
|
|
15
15
|
return Object.seal(Object.assign(Object.assign(Object.assign({}, normalizedTableRowAction), normalizedAngularOptions), { tableName }));
|
|
16
16
|
}
|
|
17
17
|
exports.NormalizeTableActionOptions = NormalizeTableActionOptions;
|
|
18
|
-
function
|
|
18
|
+
function printOptions(options) {
|
|
19
19
|
(0, angular_options_1.PrintAngularOptions)('table-action', options);
|
|
20
20
|
}
|
|
21
21
|
function default_1(options) {
|
|
22
22
|
const normalizedOptions = NormalizeTableActionOptions(options);
|
|
23
23
|
const { refresh, confirm, tooltip, errorMessage, successMessage, priority, checkFunction, tableName, project, feature, directory, type, } = normalizedOptions;
|
|
24
|
-
|
|
24
|
+
printOptions(normalizedOptions);
|
|
25
25
|
return (host) => {
|
|
26
26
|
(0, assert_table_component_exists_1.AssertTableComponentExists)(host, normalizedOptions);
|
|
27
27
|
return (0, schematics_1.chain)([
|
|
28
|
+
() => console.group('\x1b[32m[@rxap/schematics-angular:table-action]\x1b[0m'),
|
|
28
29
|
(0, schematics_ts_morph_1.CoerceTableActionRule)({
|
|
29
30
|
directory: (0, path_1.join)(directory !== null && directory !== void 0 ? directory : '', 'methods', 'action'),
|
|
30
31
|
type,
|
|
@@ -39,6 +40,7 @@ function default_1(options) {
|
|
|
39
40
|
project,
|
|
40
41
|
feature,
|
|
41
42
|
}),
|
|
43
|
+
() => console.groupEnd(),
|
|
42
44
|
]);
|
|
43
45
|
};
|
|
44
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/schematic/angular/src/schematics/table/table-action/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/schematic/angular/src/schematics/table/table-action/index.ts"],"names":[],"mappings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,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;AA1CD,4BA0CC"}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
[loading$]="tableDataSourceDirective.loading$"
|
|
14
14
|
></mat-progress-bar>
|
|
15
15
|
<mat-card-header class="min-h-full h-12">
|
|
16
|
-
<% if (!
|
|
16
|
+
<% if (!hasWithoutTitle) { %>
|
|
17
17
|
<mat-card-title i18n><%= title %></mat-card-title>
|
|
18
18
|
<% } %>
|
|
19
19
|
<% if (headerButton) { %>
|
|
@@ -21,10 +21,9 @@
|
|
|
21
21
|
mat-card-avatar
|
|
22
22
|
mat-mini-fab
|
|
23
23
|
color="primary"
|
|
24
|
-
matTooltip
|
|
25
|
-
i18n-matTooltip
|
|
24
|
+
matTooltip
|
|
26
25
|
[disabled]="tableDataSourceDirective.hasError$ | async"
|
|
27
|
-
|
|
26
|
+
[rxapTableHeaderButton]="tableDataSourceDirective"
|
|
28
27
|
<% if (headerButton.permission) { %>rxapHasEnablePermission="<%= headerButton.permission %>"<% } %>
|
|
29
28
|
>
|
|
30
29
|
<% if (headerButton.icon) { %><mat-icon><%= headerButton.icon %></mat-icon><% } else if (headerButton.svgIcon) { %><mat-icon svgIcon="<%= headerButton.svgIcon %>"></mat-icon><% } else { %><mat-icon>add</mat-icon><% } %>
|
|
@@ -64,7 +63,7 @@
|
|
|
64
63
|
*ngIf="tableDataSourceDirective.hasError$ | async"
|
|
65
64
|
[refresh]="tableDataSourceDirective.retry">
|
|
66
65
|
</rxap-data-source-error>
|
|
67
|
-
<div class="table-scroll-container mt-4 overflow-x-auto overscroll-
|
|
66
|
+
<div class="table-scroll-container mt-4 overflow-x-auto overscroll-auto">
|
|
68
67
|
<table
|
|
69
68
|
[ngClass]="{ 'hidden': tableDataSourceDirective.hasError$ | async }"
|
|
70
69
|
[paginator]="paginator"
|
|
@@ -118,8 +117,7 @@
|
|
|
118
117
|
mat-icon-button
|
|
119
118
|
*ngIf="selected | rxapRowActionCheck:'<%= action.type %>'"
|
|
120
119
|
<% if (action.permission) { %>rxapHasEnablePermission="<%= action.permission %>"<% } %>
|
|
121
|
-
matTooltip
|
|
122
|
-
i18n-matTooltip
|
|
120
|
+
matTooltip
|
|
123
121
|
>
|
|
124
122
|
<% if (action.icon) { %><mat-icon><%= action.icon %></mat-icon><% } else if (action.svgIcon) { %><mat-icon svgIcon="<%= action.svgIcon %>"></mat-icon><% } else { %><mat-icon><%= action.type %></mat-icon><% } %>
|
|
125
123
|
<mat-progress-bar
|
|
@@ -142,8 +140,7 @@
|
|
|
142
140
|
mat-icon-button
|
|
143
141
|
*ngIf="element | rxapRowActionCheck:'<%= action.type %>'"
|
|
144
142
|
<% if (action.permission) { %>rxapHasEnablePermission="<%= action.permission %>"<% } %>
|
|
145
|
-
matTooltip
|
|
146
|
-
i18n-matTooltip
|
|
143
|
+
matTooltip
|
|
147
144
|
>
|
|
148
145
|
<% if (action.icon) { %><mat-icon><%= action.icon %></mat-icon><% } else if (action.svgIcon) { %><mat-icon svgIcon="<%= action.svgIcon %>"></mat-icon><% } else { %><mat-icon><%= action.type %></mat-icon><% } %>
|
|
149
146
|
<mat-progress-bar
|
package/src/schematics/table/table-component/files/component/__componentName__.component.ts.template
CHANGED
|
@@ -11,10 +11,9 @@ import {
|
|
|
11
11
|
CopyToClipboardCellComponent, DateCellComponent,
|
|
12
12
|
IconCellComponent,
|
|
13
13
|
LinkCellComponent, PersistentPaginatorDirective,
|
|
14
|
-
TableColumnMenuModule,
|
|
14
|
+
TableColumnMenuModule, TableHeaderButtonDirective,
|
|
15
15
|
TableDataSourceDirective,
|
|
16
16
|
TableFilterModule, TableRowActionsModule,
|
|
17
|
-
TableRowControlsModule,
|
|
18
17
|
} from '@rxap/material-table-system';
|
|
19
18
|
import { MatCardModule } from '@angular/material/card';
|
|
20
19
|
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
@@ -65,7 +64,6 @@ import { MatSnackBarModule } from '@angular/material/snack-bar';
|
|
|
65
64
|
<% if (hasNavigationBackHeader) { %>
|
|
66
65
|
NavigateBackButtonComponent,
|
|
67
66
|
<% } %>
|
|
68
|
-
TableRowControlsModule,
|
|
69
67
|
TableColumnMenuModule,
|
|
70
68
|
DateCellComponent,
|
|
71
69
|
|
|
@@ -75,7 +73,7 @@ import { MatSnackBarModule } from '@angular/material/snack-bar';
|
|
|
75
73
|
MatInputModule,
|
|
76
74
|
MatButtonModule,
|
|
77
75
|
InputClearButtonDirective,
|
|
78
|
-
|
|
76
|
+
TableHeaderButtonDirective,
|
|
79
77
|
TableShowArchivedSlideComponent,
|
|
80
78
|
PersistentPaginatorDirective,
|
|
81
79
|
ConfirmModule,
|
|
@@ -8,6 +8,7 @@ import { NormalizedTableOptions } from '../../../lib/table-options';
|
|
|
8
8
|
import { TableComponentOptions } from './schema';
|
|
9
9
|
export interface NormalizedTableComponentOptions extends Readonly<Normalized<TableComponentOptions> & NormalizedTableOptions & NormalizedAngularOptions> {
|
|
10
10
|
name: string;
|
|
11
|
+
controllerName: string;
|
|
11
12
|
columnList: NormalizedTableColumn[];
|
|
12
13
|
actionList: NormalizedTableAction[];
|
|
13
14
|
}
|