@rxap/schematic-angular 16.1.0-dev.4 → 16.1.0-dev.41
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 +297 -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 +114 -155
- 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 +4 -0
- package/src/lib/table-column.js +40 -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 +16 -3
- package/src/schematics/accordion/item/accordion-item-tree-table-component/schema.json +16 -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 +9 -1
- package/src/schematics/table/action/form-table-action/index.js +151 -71
- package/src/schematics/table/action/form-table-action/index.js.map +1 -1
- package/src/schematics/table/action/form-table-action/schema.d.ts +13 -1
- package/src/schematics/table/action/form-table-action/schema.json +106 -3
- 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 +26 -48
- package/src/schematics/table/table-component/files/component/__componentName__.component.ts.template +13 -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 +210 -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 +86 -82
- package/src/schematics/table/tree-table-component/files/component/__componentName__.component.ts.template +11 -4
- 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 +14 -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
|
@@ -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 {};
|
|
@@ -10,14 +10,14 @@ const assert_table_component_exists_1 = require("../../../../lib/assert-table-co
|
|
|
10
10
|
const backend_types_1 = require("../../../../lib/backend-types");
|
|
11
11
|
const table_action_1 = require("../../table-action");
|
|
12
12
|
function NormalizeOperationTableActionOptions(options) {
|
|
13
|
-
var _a
|
|
13
|
+
var _a;
|
|
14
14
|
const normalizedOptions = (0, table_action_1.NormalizeTableActionOptions)(options);
|
|
15
15
|
const nestModule = (_a = options.nestModule) !== null && _a !== void 0 ? _a : normalizedOptions.tableName;
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
context });
|
|
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)({
|
|
18
|
+
controllerName: context,
|
|
19
|
+
nestModule,
|
|
20
|
+
}), context }));
|
|
21
21
|
}
|
|
22
22
|
exports.NormalizeOperationTableActionOptions = NormalizeOperationTableActionOptions;
|
|
23
23
|
function openApiOperationRule(normalizedOptions) {
|
|
@@ -27,10 +27,7 @@ function openApiOperationRule(normalizedOptions) {
|
|
|
27
27
|
(0, schematics_ts_morph_1.CoerceOperationTableActionRule)({
|
|
28
28
|
scope,
|
|
29
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`,
|
|
31
|
-
controllerName,
|
|
32
|
-
nestModule,
|
|
33
|
-
})),
|
|
30
|
+
operationId: (0, schematics_ts_morph_1.buildOperationId)(normalizedOptions, `${type}-action`, controllerName),
|
|
34
31
|
type,
|
|
35
32
|
tableName,
|
|
36
33
|
refresh,
|
|
@@ -70,16 +67,18 @@ function backendRule(normalizedOptions) {
|
|
|
70
67
|
}
|
|
71
68
|
return (0, schematics_1.noop)();
|
|
72
69
|
}
|
|
73
|
-
function
|
|
70
|
+
function printOptions(options) {
|
|
74
71
|
(0, angular_options_1.PrintAngularOptions)('operation-table-action', options);
|
|
75
72
|
}
|
|
76
73
|
function default_1(options) {
|
|
77
74
|
const normalizedOptions = NormalizeOperationTableActionOptions(options);
|
|
78
|
-
|
|
75
|
+
printOptions(normalizedOptions);
|
|
79
76
|
return (host) => {
|
|
80
77
|
(0, assert_table_component_exists_1.AssertTableComponentExists)(host, normalizedOptions);
|
|
81
78
|
return (0, schematics_1.chain)([
|
|
79
|
+
() => console.group('\x1b[32m[@rxap/schematics-angular:operation-table-action]\x1b[0m'),
|
|
82
80
|
backendRule(normalizedOptions),
|
|
81
|
+
() => console.groupEnd(),
|
|
83
82
|
]);
|
|
84
83
|
};
|
|
85
84
|
}
|
|
@@ -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,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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,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,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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7E,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;A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AE;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;
|