@rxap/schematic-angular 16.1.0-dev.8 → 16.1.0
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 +352 -0
- package/README.md +1 -1
- package/collection.json +5 -0
- package/package.json +47 -40
- package/src/lib/accordion-item.d.ts +2 -2
- package/src/lib/accordion-item.js +4 -4
- package/src/lib/accordion-item.js.map +1 -1
- package/src/lib/adapter-options.d.ts +11 -5
- package/src/lib/adapter-options.js +8 -5
- package/src/lib/adapter-options.js.map +1 -1
- package/src/lib/angular-options.js +1 -1
- package/src/lib/angular-options.js.map +1 -1
- package/src/lib/data-grid-item.d.ts +1 -1
- package/src/lib/data-grid-item.js +2 -2
- package/src/lib/data-grid-item.js.map +1 -1
- package/src/lib/data-grid-options.d.ts +3 -3
- package/src/lib/data-grid-options.js +1 -1
- package/src/lib/data-grid-options.js.map +1 -1
- package/src/lib/dialog-action.d.ts +1 -1
- package/src/lib/dialog-action.js +2 -2
- package/src/lib/dialog-action.js.map +1 -1
- package/src/lib/existing-method.d.ts +11 -2
- package/src/lib/existing-method.js +8 -2
- package/src/lib/existing-method.js.map +1 -1
- package/src/lib/form-component-control.d.ts +1 -1
- package/src/lib/form-component-control.js +2 -2
- package/src/lib/form-component-control.js.map +1 -1
- package/src/lib/form-definition-control.d.ts +1 -1
- package/src/lib/form-definition-control.js +6 -4
- package/src/lib/form-definition-control.js.map +1 -1
- package/src/lib/minimum-table-component-options.d.ts +5 -3
- package/src/lib/minimum-table-component-options.js +85 -27
- package/src/lib/minimum-table-component-options.js.map +1 -1
- package/src/lib/minimum-table-options.d.ts +9 -6
- package/src/lib/minimum-table-options.js +7 -4
- package/src/lib/minimum-table-options.js.map +1 -1
- package/src/lib/table-action.d.ts +1 -1
- package/src/lib/table-action.js +11 -5
- package/src/lib/table-action.js.map +1 -1
- package/src/lib/table-column.d.ts +16 -4
- package/src/lib/table-column.js +93 -6
- package/src/lib/table-column.js.map +1 -1
- package/src/lib/table-header-button.d.ts +4 -6
- package/src/lib/table-header-button.js +2 -1
- package/src/lib/table-header-button.js.map +1 -1
- package/src/lib/table-open-api-options.d.ts +3 -2
- package/src/lib/table-open-api-options.js +1 -1
- package/src/lib/table-open-api-options.js.map +1 -1
- package/src/lib/table-options.d.ts +9 -5
- package/src/lib/table-options.js +1 -1
- package/src/lib/table-options.js.map +1 -1
- package/src/lib/table-property.d.ts +14 -0
- package/src/lib/table-property.js +46 -0
- package/src/lib/table-property.js.map +1 -0
- package/src/lib/table-row-action.d.ts +5 -1
- package/src/lib/table-row-action.js +9 -7
- package/src/lib/table-row-action.js.map +1 -1
- package/src/lib/tree-table-options.d.ts +10 -6
- package/src/lib/tree-table-options.js +2 -2
- package/src/lib/tree-table-options.js.map +1 -1
- package/src/lib/type-import.d.ts +4 -0
- package/src/lib/type-import.js +38 -0
- package/src/lib/type-import.js.map +1 -0
- package/src/schematics/accordion/accordion-component/files/component/__componentName__.component.ts.template +1 -1
- package/src/schematics/accordion/accordion-component/index.d.ts +3 -1
- package/src/schematics/accordion/accordion-component/index.js +2 -2
- 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/index.js +2 -2
- package/src/schematics/accordion/accordion-item-component/index.js.map +1 -1
- package/src/schematics/accordion/accordion-item-component/schema.json +13 -3
- package/src/schematics/accordion/item/accordion-item-data-grid-component/index.d.ts +3 -3
- package/src/schematics/accordion/item/accordion-item-data-grid-component/index.js +5 -5
- package/src/schematics/accordion/item/accordion-item-data-grid-component/index.js.map +1 -1
- package/src/schematics/accordion/item/accordion-item-data-grid-component/schema.json +13 -3
- package/src/schematics/accordion/item/accordion-item-table-component/index.d.ts +7 -4
- package/src/schematics/accordion/item/accordion-item-table-component/index.js +5 -5
- package/src/schematics/accordion/item/accordion-item-table-component/index.js.map +1 -1
- package/src/schematics/accordion/item/accordion-item-table-component/schema.json +57 -8
- package/src/schematics/accordion/item/accordion-item-tree-table-component/index.d.ts +4 -1
- package/src/schematics/accordion/item/accordion-item-tree-table-component/index.js +1 -1
- package/src/schematics/accordion/item/accordion-item-tree-table-component/index.js.map +1 -1
- package/src/schematics/accordion/item/accordion-item-tree-table-component/schema.json +62 -9
- package/src/schematics/angular.schema.json +61 -0
- package/src/schematics/data-grid-component/index.d.ts +1 -1
- package/src/schematics/data-grid-component/index.js +1 -1
- package/src/schematics/data-grid-component/index.js.map +1 -1
- package/src/schematics/data-grid-component/schema.json +13 -3
- package/src/schematics/dialog-component/index.js +3 -3
- package/src/schematics/dialog-component/index.js.map +1 -1
- package/src/schematics/dialog-component/schema.json +13 -3
- package/src/schematics/form/control/input-form-control/index.js +1 -1
- package/src/schematics/form/control/input-form-control/index.js.map +1 -1
- package/src/schematics/form/control/select-form-control/index.js +1 -1
- package/src/schematics/form/control/select-form-control/index.js.map +1 -1
- package/src/schematics/form/control/table-select-form-control/index.d.ts +2 -2
- package/src/schematics/form/control/table-select-form-control/index.js +3 -3
- package/src/schematics/form/control/table-select-form-control/index.js.map +1 -1
- package/src/schematics/form/form-component/index.d.ts +1 -1
- package/src/schematics/form/form-component/index.js +1 -1
- package/src/schematics/form/form-component/index.js.map +1 -1
- package/src/schematics/form/form-control/index.js +1 -1
- 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 +16 -9
- 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 +3 -1
- package/src/schematics/table/action/dialog-table-action/index.js +1 -1
- 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 -3
- package/src/schematics/table/action/form-table-action/index.js +46 -18
- 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 +71 -3
- package/src/schematics/table/action/navigation-table-action/index.js +4 -3
- package/src/schematics/table/action/navigation-table-action/index.js.map +1 -1
- package/src/schematics/table/action/navigation-table-action/schema.d.ts +1 -0
- package/src/schematics/table/action/navigation-table-action/schema.json +5 -0
- 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.js +1 -1
- 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 +10 -3
- package/src/schematics/table/header-button/form-table-header-button/index.js +57 -48
- package/src/schematics/table/header-button/form-table-header-button/index.js.map +1 -1
- package/src/schematics/table/header-button/form-table-header-button/schema.d.ts +8 -0
- package/src/schematics/table/header-button/form-table-header-button/schema.json +17 -1
- package/src/schematics/table/header-button/navigation-table-header-button/index.js +30 -8
- package/src/schematics/table/header-button/navigation-table-header-button/index.js.map +1 -1
- package/src/schematics/table/header-button/navigation-table-header-button/schema.d.ts +1 -0
- package/src/schematics/table/header-button/navigation-table-header-button/schema.json +8 -6
- package/src/schematics/table/table-action/index.js +1 -1
- 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 +31 -40
- package/src/schematics/table/table-component/files/component/__componentName__.component.ts.template +17 -3
- package/src/schematics/table/table-component/index.d.ts +6 -8
- package/src/schematics/table/table-component/index.js +41 -28
- package/src/schematics/table/table-component/index.js.map +1 -1
- package/src/schematics/table/table-component/schema.json +267 -218
- package/src/schematics/table/table-header-button/index.d.ts +2 -4
- package/src/schematics/table/table-header-button/index.js +1 -1
- package/src/schematics/table/table-header-button/index.js.map +1 -1
- package/src/schematics/table/table-header-button/schema.d.ts +2 -1
- package/src/schematics/table/tree-table-component/files/component/__componentName__.component.html.template +94 -82
- package/src/schematics/table/tree-table-component/files/component/__componentName__.component.ts.template +17 -4
- package/src/schematics/table/tree-table-component/index.d.ts +1 -1
- package/src/schematics/table/tree-table-component/index.js +19 -24
- package/src/schematics/table/tree-table-component/index.js.map +1 -1
- package/src/schematics/table/tree-table-component/schema.json +60 -7
- package/src/schematics/tree-component/index.d.ts +2 -2
- package/src/schematics/tree-component/index.js +2 -2
- package/src/schematics/tree-component/index.js.map +1 -1
- package/src/schematics/tree-component/schema.json +11 -1
|
@@ -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
|
+
}
|
|
@@ -14,7 +14,7 @@ function NormalizeOperationTableActionOptions(options) {
|
|
|
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
16
|
const context = options.context ? (0, utilities_1.dasherize)(options.context) : null;
|
|
17
|
-
return Object.
|
|
17
|
+
return Object.freeze(Object.assign(Object.assign({}, normalizedOptions), { nestModule, controllerName: (0, schematics_ts_morph_1.BuildNestControllerName)({
|
|
18
18
|
controllerName: context,
|
|
19
19
|
nestModule,
|
|
20
20
|
}), context }));
|
|
@@ -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;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,
|
|
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,MAAM,iCACf,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,YAA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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"}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
import { Tree } from '@angular-devkit/schematics';
|
|
1
|
+
import { Rule, Tree } from '@angular-devkit/schematics';
|
|
2
2
|
import { Normalized } from '@rxap/utilities';
|
|
3
3
|
import { NormalizedAngularOptions } from '../../../../lib/angular-options';
|
|
4
|
+
import { NormalizedFormComponentControl } from '../../../../lib/form-component-control';
|
|
4
5
|
import { NormalizedTableHeaderButton } from '../../../../lib/table-header-button';
|
|
5
6
|
import { FormTableHeaderButtonOptions } from './schema';
|
|
6
|
-
export interface NormalizedFormTableHeaderButtonOptions extends Readonly<Normalized<FormTableHeaderButtonOptions> & NormalizedAngularOptions & NormalizedTableHeaderButton> {
|
|
7
|
+
export interface NormalizedFormTableHeaderButtonOptions extends Omit<Readonly<Normalized<FormTableHeaderButtonOptions> & NormalizedAngularOptions & NormalizedTableHeaderButton>, 'formOptions'> {
|
|
7
8
|
options: Record<string, any>;
|
|
8
9
|
controllerName: string;
|
|
10
|
+
formComponent: string;
|
|
11
|
+
formOptions: {
|
|
12
|
+
controlList: ReadonlyArray<NormalizedFormComponentControl>;
|
|
13
|
+
role: string | null;
|
|
14
|
+
window: boolean;
|
|
15
|
+
};
|
|
9
16
|
}
|
|
10
17
|
export declare function NormalizeFormTableHeaderButtonOptions(options: Readonly<FormTableHeaderButtonOptions>): NormalizedFormTableHeaderButtonOptions;
|
|
11
|
-
export default function (options: FormTableHeaderButtonOptions): (host: Tree) =>
|
|
18
|
+
export default function (options: FormTableHeaderButtonOptions): (host: Tree) => Rule;
|
|
@@ -4,17 +4,26 @@ exports.NormalizeFormTableHeaderButtonOptions = void 0;
|
|
|
4
4
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
5
|
const schematics_ts_morph_1 = require("@rxap/schematics-ts-morph");
|
|
6
6
|
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
7
|
+
const utilities_1 = require("@rxap/utilities");
|
|
7
8
|
const ts_morph_1 = require("ts-morph");
|
|
8
9
|
const angular_options_1 = require("../../../../lib/angular-options");
|
|
9
10
|
const assert_table_component_exists_1 = require("../../../../lib/assert-table-component-exists");
|
|
11
|
+
const form_component_control_1 = require("../../../../lib/form-component-control");
|
|
10
12
|
const index_1 = require("../../table-header-button/index");
|
|
11
13
|
function NormalizeFormTableHeaderButtonOptions(options) {
|
|
14
|
+
var _a, _b, _c, _d, _e;
|
|
12
15
|
const normalizedTableHeaderButtonOptions = (0, index_1.NormalizeTableHeaderButtonOptions)(options);
|
|
13
16
|
const nestModule = options.nestModule;
|
|
14
|
-
|
|
17
|
+
const formOptions = (_a = options.formOptions) !== null && _a !== void 0 ? _a : {};
|
|
18
|
+
const { tableName } = normalizedTableHeaderButtonOptions;
|
|
19
|
+
return Object.freeze(Object.assign(Object.assign({}, normalizedTableHeaderButtonOptions), { context: options.context, nestModule, controllerName: (0, schematics_ts_morph_1.BuildNestControllerName)({
|
|
15
20
|
nestModule,
|
|
16
21
|
controllerName: 'header-button',
|
|
17
|
-
})
|
|
22
|
+
}), formComponent: (0, utilities_1.CoerceSuffix)((0, utilities_1.dasherize)((_b = options.formComponent) !== null && _b !== void 0 ? _b : tableName.replace(/-table$/, '')), '-form'), customComponent: (_c = options.customComponent) !== null && _c !== void 0 ? _c : false, formOptions: {
|
|
23
|
+
window: (_d = formOptions.window) !== null && _d !== void 0 ? _d : true,
|
|
24
|
+
role: (_e = formOptions.role) !== null && _e !== void 0 ? _e : null,
|
|
25
|
+
controlList: (0, form_component_control_1.NormalizeFormComponentControlList)(formOptions.controlList),
|
|
26
|
+
} }));
|
|
18
27
|
}
|
|
19
28
|
exports.NormalizeFormTableHeaderButtonOptions = NormalizeFormTableHeaderButtonOptions;
|
|
20
29
|
function printOptions(options) {
|
|
@@ -22,61 +31,61 @@ function printOptions(options) {
|
|
|
22
31
|
}
|
|
23
32
|
function default_1(options) {
|
|
24
33
|
const normalizedOptions = NormalizeFormTableHeaderButtonOptions(options);
|
|
25
|
-
const { refresh, confirm, tooltip, errorMessage, successMessage, tableName, project, feature, shared, directory, overwrite,
|
|
34
|
+
const { refresh, confirm, tooltip, errorMessage, successMessage, tableName, project, feature, shared, directory, overwrite, formOptions, context, backend, nestModule, controllerName, formComponent, customComponent, } = normalizedOptions;
|
|
26
35
|
printOptions(normalizedOptions);
|
|
27
36
|
return (host) => {
|
|
28
37
|
(0, assert_table_component_exists_1.AssertTableComponentExists)(host, normalizedOptions);
|
|
29
|
-
|
|
38
|
+
const ruleList = [
|
|
30
39
|
() => console.group('\x1b[32m[@rxap/schematics-angular:form-table-header-button]\x1b[0m'),
|
|
31
|
-
|
|
32
|
-
|
|
40
|
+
];
|
|
41
|
+
if (!customComponent) {
|
|
42
|
+
ruleList.push(() => console.log('Coerce table header button form ...'), (0, schematics_utilities_1.ExecuteSchematic)('form-component', Object.assign(Object.assign({}, formOptions), { project, name: formComponent.replace(/-form$/, ''), feature,
|
|
33
43
|
directory,
|
|
34
44
|
shared, window: true, nestModule,
|
|
35
45
|
controllerName,
|
|
36
46
|
context,
|
|
37
47
|
backend,
|
|
38
|
-
overwrite }))
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
]);
|
|
48
|
+
overwrite })));
|
|
49
|
+
}
|
|
50
|
+
ruleList.push(() => console.log('Coerce table header button method ...'), (0, schematics_ts_morph_1.CoerceTableHeaderButtonMethodRule)({
|
|
51
|
+
project,
|
|
52
|
+
feature,
|
|
53
|
+
shared,
|
|
54
|
+
directory,
|
|
55
|
+
overwrite,
|
|
56
|
+
tableName,
|
|
57
|
+
refresh,
|
|
58
|
+
confirm,
|
|
59
|
+
tooltip,
|
|
60
|
+
errorMessage,
|
|
61
|
+
successMessage,
|
|
62
|
+
tsMorphTransform: (project, sourceFile, classDeclaration) => {
|
|
63
|
+
const [constructorDeclaration] = (0, schematics_ts_morph_1.CoerceClassConstructor)(classDeclaration);
|
|
64
|
+
(0, schematics_ts_morph_1.CoerceParameterDeclaration)(constructorDeclaration, 'openWindowMethod', {
|
|
65
|
+
isReadonly: true,
|
|
66
|
+
scope: ts_morph_1.Scope.Private,
|
|
67
|
+
type: `Open${(0, utilities_1.classify)(formComponent)}WindowMethod`,
|
|
68
|
+
});
|
|
69
|
+
(0, schematics_ts_morph_1.CoerceImports)(sourceFile, [
|
|
70
|
+
{
|
|
71
|
+
moduleSpecifier: `../${(0, utilities_1.dasherize)(formComponent)}/open-${(0, utilities_1.dasherize)(formComponent)}-window.method`,
|
|
72
|
+
namedImports: [`Open${(0, utilities_1.classify)(formComponent)}WindowMethod`],
|
|
73
|
+
},
|
|
74
|
+
]);
|
|
75
|
+
return {
|
|
76
|
+
statements: ['return this.openWindowMethod.call(parameters).toPromise();'],
|
|
77
|
+
};
|
|
78
|
+
},
|
|
79
|
+
tsMorphTransformComponent: (project, [sourceFile]) => {
|
|
80
|
+
(0, schematics_ts_morph_1.AddComponentProvider)(sourceFile, `Open${(0, utilities_1.classify)(formComponent)}WindowMethod`, [
|
|
81
|
+
{
|
|
82
|
+
moduleSpecifier: `./${(0, utilities_1.dasherize)(formComponent)}/open-${(0, utilities_1.dasherize)(formComponent)}-window.method`,
|
|
83
|
+
namedImports: [`Open${(0, utilities_1.classify)(formComponent)}WindowMethod`],
|
|
84
|
+
},
|
|
85
|
+
]);
|
|
86
|
+
},
|
|
87
|
+
}), () => console.groupEnd());
|
|
88
|
+
return (0, schematics_1.chain)(ruleList);
|
|
80
89
|
};
|
|
81
90
|
}
|
|
82
91
|
exports.default = default_1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/schematic/angular/src/schematics/table/header-button/form-table-header-button/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/schematic/angular/src/schematics/table/header-button/form-table-header-button/index.ts"],"names":[],"mappings":";;;AAAA,2DAIoC;AACpC,mEAOmC;AACnC,qEAA8D;AAC9D,+CAKyB;AACzB,uCAIkB;AAClB,qEAGyC;AACzC,iGAA2F;AAC3F,mFAGgD;AAEhD,2DAAoF;AAgBpF,SAAgB,qCAAqC,CACnD,OAA+C;;IAE/C,MAAM,kCAAkC,GAAG,IAAA,yCAAiC,EAAC,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AAC,UAAU,EAAE;oBACxB;wBACE,eAAe,EAAE,MAAO,IAAA,qBAAS,EAAC,aAAa,CAAE,SAAU,IAAA,qBAAS,EAAC,aAAa,CAAE,gBAAgB;wBACpG,YAAY,EAAE,CAAE,OAAQ,IAAA,oBAAQ,EAAC,aAAa,CAAE,cAAc,CAAE;qBACjE;iBACF,CAAC,CAAC;gBACH,OAAO;oBACL,UAAU,EAAE,CAAE,4DAA4D,CAAE;iBAC7E,CAAC;YACJ,CAAC;YACD,yBAAyB,EAAE,CACzB,OAAgB,EAChB,CAAE,UAAU,CAAkB,EAC9B,EAAE;gBACF,IAAA,0CAAoB,EAClB,UAAU,EACV,OAAQ,IAAA,oBAAQ,EAAC,aAAa,CAAE,cAAc,EAC9C;oBACE;wBACE,eAAe,EAAE,KAAM,IAAA,qBAAS,EAAC,aAAa,CAAE,SAAU,IAAA,qBAAS,EAAC,aAAa,CAAE,gBAAgB;wBACnG,YAAY,EAAE,CAAE,OAAQ,IAAA,oBAAQ,EAAC,aAAa,CAAE,cAAc,CAAE;qBACjE;iBACF,CACF,CAAC;YACJ,CAAC;SACF,CAAC,EACF,GAAG,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE,CACzB,CAAC;QAEF,OAAO,IAAA,kBAAK,EAAC,QAAQ,CAAC,CAAC;IACzB,CAAC,CAAC;AACJ,CAAC;AAzGD,4BAyGC"}
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
+
import { FormComponentControl } from '../../../../lib/form-component-control';
|
|
1
2
|
import { TableHeaderButtonOptions } from '../../table-header-button/schema';
|
|
2
3
|
|
|
3
4
|
|
|
4
5
|
export interface FormTableHeaderButtonOptions extends TableHeaderButtonOptions {
|
|
5
6
|
nestModule: string;
|
|
6
7
|
context: string;
|
|
8
|
+
formComponent?: string;
|
|
9
|
+
customComponent: boolean;
|
|
10
|
+
formOptions?: {
|
|
11
|
+
controlList?: Array<FormComponentControl>;
|
|
12
|
+
role?: string;
|
|
13
|
+
window?: boolean;
|
|
14
|
+
};
|
|
7
15
|
}
|
|
@@ -68,9 +68,25 @@
|
|
|
68
68
|
"svgIcon": {
|
|
69
69
|
"type": "string"
|
|
70
70
|
},
|
|
71
|
-
"
|
|
71
|
+
"formComponent": {
|
|
72
|
+
"type": "string"
|
|
73
|
+
},
|
|
74
|
+
"customComponent": {
|
|
75
|
+
"type": "boolean",
|
|
76
|
+
"default": false,
|
|
77
|
+
"description": "If true the schematic will not coerce the form component"
|
|
78
|
+
},
|
|
79
|
+
"formOptions": {
|
|
72
80
|
"type": "object",
|
|
73
81
|
"properties": {
|
|
82
|
+
"role": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"description": "Define the role of the form"
|
|
85
|
+
},
|
|
86
|
+
"window": {
|
|
87
|
+
"type": "boolean",
|
|
88
|
+
"description": "Whether the form can be opened in a window"
|
|
89
|
+
},
|
|
74
90
|
"controlList": {
|
|
75
91
|
"alias": "control",
|
|
76
92
|
"type": "array",
|
|
@@ -8,8 +8,9 @@ const angular_options_1 = require("../../../../lib/angular-options");
|
|
|
8
8
|
const assert_table_component_exists_1 = require("../../../../lib/assert-table-component-exists");
|
|
9
9
|
const index_1 = require("../../table-header-button/index");
|
|
10
10
|
function NormalizeNavigationTableHeaderButtonOptions(options) {
|
|
11
|
+
var _a;
|
|
11
12
|
const normalizedTableHeaderButtonOptions = (0, index_1.NormalizeTableHeaderButtonOptions)(options);
|
|
12
|
-
return Object.
|
|
13
|
+
return Object.freeze(Object.assign(Object.assign({}, normalizedTableHeaderButtonOptions), { route: options.route, relativeTo: (_a = options.relativeTo) !== null && _a !== void 0 ? _a : false }));
|
|
13
14
|
}
|
|
14
15
|
exports.NormalizeNavigationTableHeaderButtonOptions = NormalizeNavigationTableHeaderButtonOptions;
|
|
15
16
|
function printOptions(options) {
|
|
@@ -17,7 +18,7 @@ function printOptions(options) {
|
|
|
17
18
|
}
|
|
18
19
|
function default_1(options) {
|
|
19
20
|
const normalizedOptions = NormalizeNavigationTableHeaderButtonOptions(options);
|
|
20
|
-
const { refresh, confirm, tooltip, errorMessage, successMessage, tableName, project, feature, shared, directory, overwrite, route, } = normalizedOptions;
|
|
21
|
+
const { refresh, confirm, tooltip, errorMessage, successMessage, tableName, project, feature, shared, directory, overwrite, route, relativeTo, } = normalizedOptions;
|
|
21
22
|
printOptions(normalizedOptions);
|
|
22
23
|
return (host) => {
|
|
23
24
|
(0, assert_table_component_exists_1.AssertTableComponentExists)(host, normalizedOptions);
|
|
@@ -38,23 +39,44 @@ function default_1(options) {
|
|
|
38
39
|
successMessage,
|
|
39
40
|
tsMorphTransform: (project, sourceFile, classDeclaration) => {
|
|
40
41
|
const [constructorDeclaration] = (0, schematics_ts_morph_1.CoerceClassConstructor)(classDeclaration);
|
|
41
|
-
(
|
|
42
|
+
if (relativeTo) {
|
|
43
|
+
(0, schematics_ts_morph_1.CoerceParameterDeclaration)(constructorDeclaration, 'route', {
|
|
44
|
+
isReadonly: true,
|
|
45
|
+
scope: ts_morph_1.Scope.Private,
|
|
46
|
+
type: 'ActivatedRoute',
|
|
47
|
+
});
|
|
48
|
+
(0, schematics_ts_morph_1.CoerceImports)(sourceFile, [
|
|
49
|
+
{
|
|
50
|
+
moduleSpecifier: '@angular/router',
|
|
51
|
+
namedImports: ['ActivatedRoute'],
|
|
52
|
+
},
|
|
53
|
+
]);
|
|
54
|
+
}
|
|
55
|
+
(0, schematics_ts_morph_1.CoerceParameterDeclaration)(constructorDeclaration, 'router', {
|
|
42
56
|
isReadonly: true,
|
|
43
57
|
scope: ts_morph_1.Scope.Private,
|
|
44
|
-
type: '
|
|
58
|
+
type: 'Router',
|
|
45
59
|
});
|
|
46
60
|
(0, schematics_ts_morph_1.CoerceImports)(sourceFile, [
|
|
47
61
|
{
|
|
48
62
|
moduleSpecifier: '@angular/router',
|
|
49
|
-
namedImports: ['
|
|
63
|
+
namedImports: ['Router'],
|
|
50
64
|
},
|
|
51
65
|
]);
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
66
|
+
if (relativeTo) {
|
|
67
|
+
return {
|
|
68
|
+
statements: [`return this.router.navigate(['${route}'], { relativeTo: this.route })`],
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
return {
|
|
73
|
+
statements: [`return this.router.navigate(['${route}'])`],
|
|
74
|
+
};
|
|
75
|
+
}
|
|
55
76
|
},
|
|
56
77
|
}),
|
|
57
78
|
() => console.groupEnd(),
|
|
79
|
+
() => console.log('\x1b[32m[/@rxap/schematics-angular:navigation-table-header-button]\x1b[0m'),
|
|
58
80
|
]);
|
|
59
81
|
};
|
|
60
82
|
}
|
|
@@ -1 +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
|
|
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,MAAM,iCACf,kCAAkC,KACrC,KAAK,EAAE,OAAO,CAAC,KAAK,EACpB,UAAU,EAAE,MAAA,OAAO,CAAC,UAAU,mCAAI,KAAK,IACvC,CAAC;AACL,CAAC;AATD,kGASC;AAED,SAAS,YAAY,CAAC,OAAqD;IACzE,IAAA,qCAAmB,EAAC,gCAAgC,EAAE,OAAO,CAAC,CAAC;AACjE,CAAC;AAED,mBAAyB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E,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,QAAQ,CAAE;yBAC3B;qBACF,CAAC,CAAC;oBACH,IAAI,UAAU,EAAE;wBACd,OAAO;4BACL,UAAU,EAAE,CAAE,iCAAkC,KAAM,iCAAiC,CAAE;yBAC1F,CAAC;qBACH;yBAAM;wBACL,OAAO;4BACL,UAAU,EAAE,CAAE,iCAAkC,KAAM,KAAK,CAAE;yBAC9D,CAAC;qBACH;gBACH,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;AAhFD,4BAgFC"}
|
|
@@ -68,18 +68,20 @@
|
|
|
68
68
|
"svgIcon": {
|
|
69
69
|
"type": "string"
|
|
70
70
|
},
|
|
71
|
-
"options": {
|
|
72
|
-
"type": "object",
|
|
73
|
-
"additionalProperties": true
|
|
74
|
-
},
|
|
75
71
|
"route": {
|
|
76
72
|
"type": "string",
|
|
77
73
|
"description": "The route path for the table action"
|
|
74
|
+
},
|
|
75
|
+
"relativeTo": {
|
|
76
|
+
"type": "boolean",
|
|
77
|
+
"description": "Indicates if the route path should be relative to the current activated route",
|
|
78
|
+
"default": false
|
|
78
79
|
}
|
|
79
80
|
},
|
|
80
81
|
"required": [
|
|
81
|
-
"
|
|
82
|
+
"options",
|
|
82
83
|
"project",
|
|
83
|
-
"feature"
|
|
84
|
+
"feature",
|
|
85
|
+
"route"
|
|
84
86
|
]
|
|
85
87
|
}
|
|
@@ -12,7 +12,7 @@ function NormalizeTableActionOptions(options) {
|
|
|
12
12
|
const normalizedAngularOptions = (0, angular_options_1.NormalizeAngularOptions)(options);
|
|
13
13
|
const normalizedTableRowAction = (0, table_row_action_1.NormalizeTableRowAction)(options);
|
|
14
14
|
const tableName = (0, schematics_utilities_1.CoerceSuffix)((0, schematics_utilities_1.dasherize)(options.tableName), '-table');
|
|
15
|
-
return Object.
|
|
15
|
+
return Object.freeze(Object.assign(Object.assign(Object.assign({}, normalizedTableRowAction), normalizedAngularOptions), { tableName }));
|
|
16
16
|
}
|
|
17
17
|
exports.NormalizeTableActionOptions = NormalizeTableActionOptions;
|
|
18
18
|
function printOptions(options) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/schematic/angular/src/schematics/table/table-action/index.ts"],"names":[],"mappings":";;;AAAA,2DAGoC;AACpC,mEAAkE;AAClE,qEAGoC;AAEpC,+BAA4B;AAC5B,kEAIsC;AACtC,8FAAwF;AACxF,oEAAwE;AAKxE,SAAgB,2BAA2B,CACzC,OAAqC;IAErC,MAAM,wBAAwB,GAAG,IAAA,yCAAuB,EAAC,OAAO,CAAC,CAAC;IAClE,MAAM,wBAAwB,GAAG,IAAA,0CAAuB,EAAC,OAAO,CAAC,CAAC;IAClE,MAAM,SAAS,GAAG,IAAA,mCAAY,EAAC,IAAA,gCAAS,EAAC,OAAO,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,CAAC;IACvE,OAAO,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/schematic/angular/src/schematics/table/table-action/index.ts"],"names":[],"mappings":";;;AAAA,2DAGoC;AACpC,mEAAkE;AAClE,qEAGoC;AAEpC,+BAA4B;AAC5B,kEAIsC;AACtC,8FAAwF;AACxF,oEAAwE;AAKxE,SAAgB,2BAA2B,CACzC,OAAqC;IAErC,MAAM,wBAAwB,GAAG,IAAA,yCAAuB,EAAC,OAAO,CAAC,CAAC;IAClE,MAA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CAAC;AA1CD,4BA0CC"}
|
|
@@ -65,6 +65,14 @@
|
|
|
65
65
|
"type": "string",
|
|
66
66
|
"description": "The check function for the table action"
|
|
67
67
|
},
|
|
68
|
+
"color": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"description": "Value for the color input of the mat-button / mat-icon component"
|
|
71
|
+
},
|
|
72
|
+
"cssClass": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"description": "Additional CSS classes added to the button element"
|
|
75
|
+
},
|
|
68
76
|
"priority": {
|
|
69
77
|
"type": "number",
|
|
70
78
|
"description": "The priority of the table action"
|