@rxap/schematic-angular 16.1.0-dev.2 → 16.1.0-dev.20
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 +123 -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 +8 -1
- package/src/schematics/form/form-definition/index.js.map +1 -1
- 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
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,129 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [16.1.0-dev.20](https://gitlab.com/rxap/packages/compare/@rxap/schematic-angular@16.1.0-dev.19...@rxap/schematic-angular@16.1.0-dev.20) (2023-10-02)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- ensure required packages are installed ([fbef16e](https://gitlab.com/rxap/packages/commit/fbef16edb34530ed4414a5c597096c1e0ecd537e))
|
|
11
|
+
|
|
12
|
+
# [16.1.0-dev.19](https://gitlab.com/rxap/packages/compare/@rxap/schematic-angular@16.1.0-dev.18...@rxap/schematic-angular@16.1.0-dev.19) (2023-10-02)
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
- add generator termination indicator ([aa34baf](https://gitlab.com/rxap/packages/commit/aa34baf92397cf320859845fb7b5a4765b77d4d9))
|
|
17
|
+
- ensure required packages are added to package.json ([ebe0858](https://gitlab.com/rxap/packages/commit/ebe085822edb94a276f7f79dd70d28c9872f7b32))
|
|
18
|
+
- generate a valid implementation for navigation execution ([d9d13d1](https://gitlab.com/rxap/packages/commit/d9d13d11c56bc5b0c5c130c21281e2c2d91e575a))
|
|
19
|
+
|
|
20
|
+
# [16.1.0-dev.18](https://gitlab.com/rxap/packages/compare/@rxap/schematic-angular@16.1.0-dev.17...@rxap/schematic-angular@16.1.0-dev.18) (2023-10-01)
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
- move additional table header options into the options object ([3284d7c](https://gitlab.com/rxap/packages/commit/3284d7cd7aba7ae41255bd2bcd8b9dd6c37f92f6))
|
|
25
|
+
|
|
26
|
+
# [16.1.0-dev.17](https://gitlab.com/rxap/packages/compare/@rxap/schematic-angular@16.1.0-dev.16...@rxap/schematic-angular@16.1.0-dev.17) (2023-10-01)
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
- move additional table header options into the options object ([731702b](https://gitlab.com/rxap/packages/commit/731702baac87997ebce3248c68d48ed083fa138f))
|
|
31
|
+
|
|
32
|
+
# [16.1.0-dev.16](https://gitlab.com/rxap/packages/compare/@rxap/schematic-angular@16.1.0-dev.15...@rxap/schematic-angular@16.1.0-dev.16) (2023-09-21)
|
|
33
|
+
|
|
34
|
+
### Bug Fixes
|
|
35
|
+
|
|
36
|
+
- change overscroll-contain to overscroll-auto ([0a8db9f](https://gitlab.com/rxap/packages/commit/0a8db9ff3d131b98d207ad40aef411927ebdc837))
|
|
37
|
+
|
|
38
|
+
# [16.1.0-dev.15](https://gitlab.com/rxap/packages/compare/@rxap/schematic-angular@16.1.0-dev.14...@rxap/schematic-angular@16.1.0-dev.15) (2023-09-14)
|
|
39
|
+
|
|
40
|
+
### Bug Fixes
|
|
41
|
+
|
|
42
|
+
- remove css class usage of container ([9a1969f](https://gitlab.com/rxap/packages/commit/9a1969f8748a08d6d948f9e7d4f4b511c1349352))
|
|
43
|
+
|
|
44
|
+
# [16.1.0-dev.14](https://gitlab.com/rxap/packages/compare/@rxap/schematic-angular@16.1.0-dev.13...@rxap/schematic-angular@16.1.0-dev.14) (2023-09-12)
|
|
45
|
+
|
|
46
|
+
### Bug Fixes
|
|
47
|
+
|
|
48
|
+
- peer dependency issue ([e67e2b8](https://gitlab.com/rxap/packages/commit/e67e2b8eb884b598536d16c2c544a9ad9be5b53e))
|
|
49
|
+
|
|
50
|
+
# [16.1.0-dev.13](https://gitlab.com/rxap/packages/compare/@rxap/schematic-angular@16.1.0-dev.12...@rxap/schematic-angular@16.1.0-dev.13) (2023-09-12)
|
|
51
|
+
|
|
52
|
+
**Note:** Version bump only for package @rxap/schematic-angular
|
|
53
|
+
|
|
54
|
+
# [16.1.0-dev.12](https://gitlab.com/rxap/packages/compare/@rxap/schematic-angular@16.1.0-dev.11...@rxap/schematic-angular@16.1.0-dev.12) (2023-09-07)
|
|
55
|
+
|
|
56
|
+
**Note:** Version bump only for package @rxap/schematic-angular
|
|
57
|
+
|
|
58
|
+
# [16.1.0-dev.11](https://gitlab.com/rxap/packages/compare/@rxap/schematic-angular@16.1.0-dev.10...@rxap/schematic-angular@16.1.0-dev.11) (2023-09-03)
|
|
59
|
+
|
|
60
|
+
**Note:** Version bump only for package @rxap/schematic-angular
|
|
61
|
+
|
|
62
|
+
# [16.1.0-dev.10](https://gitlab.com/rxap/packages/compare/@rxap/schematic-angular@16.1.0-dev.9...@rxap/schematic-angular@16.1.0-dev.10) (2023-09-03)
|
|
63
|
+
|
|
64
|
+
### Bug Fixes
|
|
65
|
+
|
|
66
|
+
- remove deprecated code ([8c3fda1](https://gitlab.com/rxap/packages/commit/8c3fda114efa98adbdde8417f6a5d793b5db1f77))
|
|
67
|
+
|
|
68
|
+
# [16.1.0-dev.9](https://gitlab.com/rxap/packages/compare/@rxap/schematic-angular@16.1.0-dev.8...@rxap/schematic-angular@16.1.0-dev.9) (2023-08-31)
|
|
69
|
+
|
|
70
|
+
### Bug Fixes
|
|
71
|
+
|
|
72
|
+
- ensure the project name is not included in the project tag list ([b131ac3](https://gitlab.com/rxap/packages/commit/b131ac3bd92b3b8799d62f15bbd30a1997d7c753))
|
|
73
|
+
|
|
74
|
+
# [16.1.0-dev.8](https://gitlab.com/rxap/packages/compare/@rxap/schematic-angular@16.1.0-dev.7...@rxap/schematic-angular@16.1.0-dev.8) (2023-08-17)
|
|
75
|
+
|
|
76
|
+
### Reverts
|
|
77
|
+
|
|
78
|
+
- change from commonjs to es2022 ([747a381](https://gitlab.com/rxap/packages/commit/747a381a090f0a276cf363da61bb19ed0c9cb5b7))
|
|
79
|
+
|
|
80
|
+
# [16.1.0-dev.7](https://gitlab.com/rxap/packages/compare/@rxap/schematic-angular@16.1.0-dev.6...@rxap/schematic-angular@16.1.0-dev.7) (2023-08-16)
|
|
81
|
+
|
|
82
|
+
### Bug Fixes
|
|
83
|
+
|
|
84
|
+
- change from commonjs to es2022 ([fd0f2ba](https://gitlab.com/rxap/packages/commit/fd0f2bae24eae7c854e96f630076cd5598c30be6))
|
|
85
|
+
|
|
86
|
+
# [16.1.0-dev.6](https://gitlab.com/rxap/packages/compare/@rxap/schematic-angular@16.1.0-dev.5...@rxap/schematic-angular@16.1.0-dev.6) (2023-08-14)
|
|
87
|
+
|
|
88
|
+
### Bug Fixes
|
|
89
|
+
|
|
90
|
+
- controller name composition ([d7c89a4](https://gitlab.com/rxap/packages/commit/d7c89a41dd3bfa6ab599e1eded3a1f2be92828e7))
|
|
91
|
+
- remove custom controller name generation ([525554b](https://gitlab.com/rxap/packages/commit/525554b252be90339cec8a7d25845b08ae9a7b32))
|
|
92
|
+
- remove old mat tooltip i18n ([fbffc23](https://gitlab.com/rxap/packages/commit/fbffc23fc346b5f5b6636f2b2735e088763c437f))
|
|
93
|
+
- table button component generation ([da7da39](https://gitlab.com/rxap/packages/commit/da7da39788dda48d23d7befcdc8395201e5caafe))
|
|
94
|
+
|
|
95
|
+
### Features
|
|
96
|
+
|
|
97
|
+
- add navigation header button schematic ([5293374](https://gitlab.com/rxap/packages/commit/5293374546ce02201abe987dc1f1901c753d55ca))
|
|
98
|
+
|
|
99
|
+
# [16.1.0-dev.5](https://gitlab.com/rxap/packages/compare/@rxap/schematic-angular@16.1.0-dev.4...@rxap/schematic-angular@16.1.0-dev.5) (2023-08-14)
|
|
100
|
+
|
|
101
|
+
### Bug Fixes
|
|
102
|
+
|
|
103
|
+
- add missing import ([04df10c](https://gitlab.com/rxap/packages/commit/04df10c4fe7cac05a00793d565fdf5107fac91c8))
|
|
104
|
+
- build controller name for tables ([ce4c728](https://gitlab.com/rxap/packages/commit/ce4c728b941f9808d6d4dd7b1245ce4259acf823))
|
|
105
|
+
- check with role ([d9bacb2](https://gitlab.com/rxap/packages/commit/d9bacb27e94276a5e1860d89a201a02a9ee12634))
|
|
106
|
+
- controller naming and route ([6004d02](https://gitlab.com/rxap/packages/commit/6004d02890eb4d9b4d8369a9fa9b7726f7af28e2))
|
|
107
|
+
- ensure table action respect then backend type ([f49c961](https://gitlab.com/rxap/packages/commit/f49c96109a1c290945bb2d69ac06cf020cfc02d8))
|
|
108
|
+
- extend debug output ([a3f71c6](https://gitlab.com/rxap/packages/commit/a3f71c6a0380037642e72cd03a095d9127c9ee96))
|
|
109
|
+
- generate window specific methods ([b73445f](https://gitlab.com/rxap/packages/commit/b73445fce4f3d29b5942866461436b4c19ddefdb))
|
|
110
|
+
- update table action generator to new concept ([e08a27f](https://gitlab.com/rxap/packages/commit/e08a27fc9755eb25d695991234f8ec1d0770b176))
|
|
111
|
+
- use table type as base for the form filter type ([d05a200](https://gitlab.com/rxap/packages/commit/d05a200bf4c6e6734eecd7029139c3939dc67576))
|
|
112
|
+
|
|
113
|
+
### Performance Improvements
|
|
114
|
+
|
|
115
|
+
- improve ts-morph transform performance ([ec059e6](https://gitlab.com/rxap/packages/commit/ec059e68dd50aa89391d71cbcd453a45b2596439))
|
|
116
|
+
|
|
117
|
+
# [16.1.0-dev.4](https://gitlab.com/rxap/packages/compare/@rxap/schematic-angular@16.1.0-dev.3...@rxap/schematic-angular@16.1.0-dev.4) (2023-08-07)
|
|
118
|
+
|
|
119
|
+
### Bug Fixes
|
|
120
|
+
|
|
121
|
+
- use role for sub schematic decision ([bd6b135](https://gitlab.com/rxap/packages/commit/bd6b13584d17be6e2aec0d29e9e83b05bfa29d95))
|
|
122
|
+
|
|
123
|
+
# [16.1.0-dev.3](https://gitlab.com/rxap/packages/compare/@rxap/schematic-angular@16.1.0-dev.2...@rxap/schematic-angular@16.1.0-dev.3) (2023-08-07)
|
|
124
|
+
|
|
125
|
+
### Bug Fixes
|
|
126
|
+
|
|
127
|
+
- allow new role types ([5703642](https://gitlab.com/rxap/packages/commit/5703642f5f33659b7fe6d955ce46445090dbe1fd))
|
|
128
|
+
|
|
6
129
|
# [16.1.0-dev.2](https://gitlab.com/rxap/packages/compare/@rxap/schematic-angular@16.1.0-dev.1...@rxap/schematic-angular@16.1.0-dev.2) (2023-08-07)
|
|
7
130
|
|
|
8
131
|
### Features
|
package/README.md
CHANGED
|
@@ -17,5 +17,5 @@ yarn add @rxap/schematic-angular
|
|
|
17
17
|
```
|
|
18
18
|
**Install peer dependencies:**
|
|
19
19
|
```bash
|
|
20
|
-
yarn add @angular-devkit/core@^16.1.4 @angular-devkit/schematics@^16.1.4 @rxap/schematics-ts-morph@^16.0.0-dev.
|
|
20
|
+
yarn add @angular-devkit/core@^16.1.4 @angular-devkit/schematics@^16.1.4 @rxap/schematics-ts-morph@^16.0.0-dev.23 @rxap/schematics-utilities@^16.0.0-dev.18 @rxap/utilities@^16.0.0-dev.19 ts-morph@^18.0.0 tslib@2.6.2
|
|
21
21
|
```
|
package/collection.json
CHANGED
|
@@ -25,6 +25,21 @@
|
|
|
25
25
|
"schema": "./src/schematics/table/table-action/schema.json",
|
|
26
26
|
"description": "Generates a table action."
|
|
27
27
|
},
|
|
28
|
+
"table-header-button": {
|
|
29
|
+
"factory": "./src/schematics/table/table-header-button/index",
|
|
30
|
+
"schema": "./src/schematics/table/table-header-button/schema.json",
|
|
31
|
+
"description": "Generates a table header-button."
|
|
32
|
+
},
|
|
33
|
+
"form-table-header-button": {
|
|
34
|
+
"factory": "./src/schematics/table/header-button/form-table-header-button/index",
|
|
35
|
+
"schema": "./src/schematics/table/header-button/form-table-header-button/schema.json",
|
|
36
|
+
"description": "Generates a table form header-button."
|
|
37
|
+
},
|
|
38
|
+
"navigation-table-header-button": {
|
|
39
|
+
"factory": "./src/schematics/table/header-button/navigation-table-header-button/index",
|
|
40
|
+
"schema": "./src/schematics/table/header-button/navigation-table-header-button/schema.json",
|
|
41
|
+
"description": "Generates a table navigation header-button."
|
|
42
|
+
},
|
|
28
43
|
"accordion-component": {
|
|
29
44
|
"schema": "./src/schematics/accordion/accordion-component/schema.json",
|
|
30
45
|
"factory": "./src/schematics/accordion/accordion-component/index",
|
|
@@ -106,4 +121,4 @@
|
|
|
106
121
|
"description": "The accordion-item-tree-table-component schematic"
|
|
107
122
|
}
|
|
108
123
|
}
|
|
109
|
-
}
|
|
124
|
+
}
|
package/package.json
CHANGED
|
@@ -1,63 +1,54 @@
|
|
|
1
1
|
{
|
|
2
|
+
"version": "16.1.0-dev.20",
|
|
2
3
|
"name": "@rxap/schematic-angular",
|
|
3
|
-
"version": "16.1.0-dev.2",
|
|
4
|
-
"type": "commonjs",
|
|
5
|
-
"schematics": "./collection.json",
|
|
6
|
-
"publishConfig": {
|
|
7
|
-
"access": "public",
|
|
8
|
-
"directory": "../../../dist/packages/schematic/angular"
|
|
9
|
-
},
|
|
10
|
-
"keywords": [
|
|
11
|
-
"rxap",
|
|
12
|
-
"packages",
|
|
13
|
-
"schematic",
|
|
14
|
-
"angular"
|
|
15
|
-
],
|
|
16
|
-
"homepage": "https:/gitlab.com/rxap/packages/packages/schematic/angular",
|
|
17
|
-
"bugs": {
|
|
18
|
-
"url": "https://gitlab.com/rxap/packages/-/issues",
|
|
19
|
-
"email": "incoming+rxap-packages-14898188-issue-@incoming.gitlab.com"
|
|
20
|
-
},
|
|
21
4
|
"license": "GPL-3.0-or-later",
|
|
22
|
-
"repository": {
|
|
23
|
-
"type": "git",
|
|
24
|
-
"url": "https://gitlab.com/rxap/packages.git",
|
|
25
|
-
"directory": "packages/schematic/angular"
|
|
26
|
-
},
|
|
27
|
-
"author": {
|
|
28
|
-
"name": "Merzough Münker",
|
|
29
|
-
"email": "mmuenker@digitaix.com"
|
|
30
|
-
},
|
|
31
5
|
"dependencies": {
|
|
32
6
|
"ignore": "^5.2.4",
|
|
33
7
|
"process": "0.11.10",
|
|
34
8
|
"semver": "^7.3.5",
|
|
35
|
-
"tslib": "2.6.
|
|
9
|
+
"tslib": "2.6.2"
|
|
36
10
|
},
|
|
37
11
|
"peerDependencies": {
|
|
38
12
|
"@angular-devkit/core": "^16.1.4",
|
|
39
13
|
"@angular-devkit/schematics": "^16.1.4",
|
|
40
|
-
"@rxap/schematics-ts-morph": "^16.0.0-dev.
|
|
41
|
-
"@rxap/schematics-utilities": "^16.0.0-dev.
|
|
42
|
-
"@rxap/utilities": "^16.0.0-dev.
|
|
14
|
+
"@rxap/schematics-ts-morph": "^16.0.0-dev.23",
|
|
15
|
+
"@rxap/schematics-utilities": "^16.0.0-dev.18",
|
|
16
|
+
"@rxap/utilities": "^16.0.0-dev.19",
|
|
43
17
|
"ts-morph": "^18.0.0",
|
|
44
|
-
"
|
|
45
|
-
"@rxap/
|
|
46
|
-
"@rxap/workspace-
|
|
18
|
+
"tslib": "2.6.2",
|
|
19
|
+
"@rxap/node-utilities": "1.1.0-dev.13",
|
|
20
|
+
"@rxap/workspace-ts-morph": "0.1.0-dev.9",
|
|
21
|
+
"@rxap/workspace-utilities": "0.1.0-dev.18"
|
|
47
22
|
},
|
|
23
|
+
"author": {
|
|
24
|
+
"name": "Merzough Münker",
|
|
25
|
+
"email": "mmuenker@digitaix.com"
|
|
26
|
+
},
|
|
27
|
+
"bugs": {
|
|
28
|
+
"url": "https://gitlab.com/rxap/packages/-/issues",
|
|
29
|
+
"email": "incoming+rxap-packages-14898188-issue-@incoming.gitlab.com"
|
|
30
|
+
},
|
|
31
|
+
"homepage": "https:/gitlab.com/rxap/packages/packages/schematic/angular",
|
|
32
|
+
"keywords": [
|
|
33
|
+
"angular",
|
|
34
|
+
"packages",
|
|
35
|
+
"rxap",
|
|
36
|
+
"schematic",
|
|
37
|
+
"schematic-angular"
|
|
38
|
+
],
|
|
48
39
|
"nx-migrations": {
|
|
49
40
|
"packageGroup": [
|
|
50
41
|
{
|
|
51
42
|
"package": "@rxap/schematics-ts-morph",
|
|
52
|
-
"version": "16.0.0-dev.
|
|
43
|
+
"version": "16.0.0-dev.23"
|
|
53
44
|
},
|
|
54
45
|
{
|
|
55
46
|
"package": "@rxap/schematics-utilities",
|
|
56
|
-
"version": "16.0.0-dev.
|
|
47
|
+
"version": "16.0.0-dev.18"
|
|
57
48
|
},
|
|
58
49
|
{
|
|
59
50
|
"package": "@rxap/utilities",
|
|
60
|
-
"version": "16.0.0-dev.
|
|
51
|
+
"version": "16.0.0-dev.19"
|
|
61
52
|
},
|
|
62
53
|
{
|
|
63
54
|
"package": "@rxap/workspace-utilities",
|
|
@@ -65,7 +56,18 @@
|
|
|
65
56
|
}
|
|
66
57
|
]
|
|
67
58
|
},
|
|
68
|
-
"
|
|
59
|
+
"publishConfig": {
|
|
60
|
+
"access": "public",
|
|
61
|
+
"directory": "../../../dist/packages/schematic/angular"
|
|
62
|
+
},
|
|
63
|
+
"repository": {
|
|
64
|
+
"type": "git",
|
|
65
|
+
"url": "https://gitlab.com/rxap/packages.git",
|
|
66
|
+
"directory": "packages/schematic/angular"
|
|
67
|
+
},
|
|
68
|
+
"schematics": "./collection.json",
|
|
69
|
+
"type": "commonjs",
|
|
70
|
+
"gitHead": "6ed826464be2ebee05283eb1ef2ee57d81d40fcb",
|
|
69
71
|
"main": "./src/index.js",
|
|
70
72
|
"types": "./src/index.d.ts"
|
|
71
73
|
}
|
|
@@ -37,19 +37,36 @@ function PrintAngularOptions(schematicName, options) {
|
|
|
37
37
|
if (context) {
|
|
38
38
|
console.log(`\x1b[34m===== Context: ${context}\x1b[0m`);
|
|
39
39
|
}
|
|
40
|
+
else {
|
|
41
|
+
console.log(`\x1b[34m===== Context: \x1b[31mNONE\x1b[0m`);
|
|
42
|
+
}
|
|
40
43
|
switch (backend) {
|
|
41
44
|
case backend_types_1.BackendTypes.NESTJS:
|
|
45
|
+
console.log(`\x1b[31m===== Backend: NESTJS\x1b[0m`);
|
|
42
46
|
if (nestModule) {
|
|
43
47
|
console.log(`\x1b[36m===== Nest Module: ${nestModule}\x1b[0m`);
|
|
44
48
|
}
|
|
49
|
+
else {
|
|
50
|
+
console.log(`\x1b[36m===== Nest Module: \x1b[31mNONE\x1b[0m`);
|
|
51
|
+
}
|
|
45
52
|
if (controllerName) {
|
|
46
53
|
console.log(`\x1b[36m===== Controller Name: ${controllerName}\x1b[0m`);
|
|
47
54
|
}
|
|
55
|
+
else {
|
|
56
|
+
console.log(`\x1b[36m===== Controller Name: \x1b[31mNONE\x1b[0m`);
|
|
57
|
+
}
|
|
58
|
+
break;
|
|
59
|
+
case backend_types_1.BackendTypes.OPEN_API:
|
|
60
|
+
console.log(`\x1b[31m===== Backend: OPENAPI\x1b[0m`);
|
|
61
|
+
break;
|
|
62
|
+
case backend_types_1.BackendTypes.LOCAL:
|
|
63
|
+
console.log(`\x1b[31m===== Backend: LOCAL\x1b[0m`);
|
|
48
64
|
break;
|
|
49
65
|
case backend_types_1.BackendTypes.NONE:
|
|
50
|
-
default:
|
|
51
66
|
console.log(`\x1b[31m===== Backend: NONE\x1b[0m`);
|
|
52
67
|
break;
|
|
68
|
+
default:
|
|
69
|
+
throw new Error(`Unknown backend type: ${backend}`);
|
|
53
70
|
}
|
|
54
71
|
}
|
|
55
72
|
exports.PrintAngularOptions = PrintAngularOptions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"angular-options.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/angular-options.ts"],"names":[],"mappings":";;;AAAA,qEAIoC;AACpC,+CAIyB;AACzB,mDAA+C;AAkB/C,SAAgB,uBAAuB,CAAC,OAAuB;;IAC7D,IAAI,MAAM,GAAG,MAAA,OAAO,CAAC,MAAM,mCAAI,KAAK,CAAC;IACrC,MAAM,OAAO,GAAG,IAAA,qBAAS,EAAC,MAAA,OAAO,CAAC,OAAO,mCAAI,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,EAAE;QACjB,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;KAChD;AACH,CAAC;AAJD,4EAIC;AAED,SAAgB,mBAAmB,CAAC,aAAqB,EAAE,OAAiC;IAC1F,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;IACrC,IAAA,0CAAmB,EAAC,aAAa,EAAE,OAAO,CAAC,CAAC;IAC5C,MAAM,EACJ,IAAI,EACJ,OAAO,EACP,UAAU,EACV,cAAc,EACd,OAAO,EACP,SAAS,EACT,aAAa,GACd,GAAG,OAAO,CAAC;IAEZ,IAAI,IAAI,EAAE;QACR,OAAO,CAAC,GAAG,CAAC,uBAAwB,IAAK,SAAS,CAAC,CAAC;KACrD;IACD,IAAI,aAAa,EAAE;QACjB,OAAO,CAAC,GAAG,CAAC,iCAAkC,aAAc,SAAS,CAAC,CAAC;KACxE;IACD,IAAI,SAAS,EAAE;QACb,OAAO,CAAC,GAAG,CAAC,4BAA6B,SAAU,SAAS,CAAC,CAAC;KAC/D;IACD,IAAI,OAAO,EAAE;QACX,OAAO,CAAC,GAAG,CAAC,0BAA2B,OAAQ,SAAS,CAAC,CAAC;KAC3D;IACD,QAAQ,OAAO,EAAE;QAEf,KAAK,4BAAY,CAAC,MAAM;YACtB,IAAI,UAAU,EAAE;gBACd,OAAO,CAAC,GAAG,CAAC,8BAA+B,UAAW,SAAS,CAAC,CAAC;aAClE;YACD,IAAI,cAAc,EAAE;gBAClB,OAAO,CAAC,GAAG,CAAC,kCAAmC,cAAe,SAAS,CAAC,CAAC;aAC1E;YACD,MAAM;QAER,KAAK,4BAAY,CAAC,
|
|
1
|
+
{"version":3,"file":"angular-options.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/angular-options.ts"],"names":[],"mappings":";;;AAAA,qEAIoC;AACpC,+CAIyB;AACzB,mDAA+C;AAkB/C,SAAgB,uBAAuB,CAAC,OAAuB;;IAC7D,IAAI,MAAM,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,OAAO,CAAC,GAAG,CAAC,kCAAmC,cAAe,SAAS,CAAC,CAAC;aAC1E;iBAAM;gBACL,OAAO,CAAC,GAAG,CAAC,oDAAoD,CAAC,CAAC;aACnE;YACD,MAAM;QAER,KAAK,4BAAY,CAAC,QAAQ;YACxB,OAAO,CAAC,GAAG,CAAC,uCAAuC,CAAC,CAAC;YACrD,MAAM;QAER,KAAK,4BAAY,CAAC,KAAK;YACrB,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;YACnD,MAAM;QAER,KAAK,4BAAY,CAAC,IAAI;YACpB,OAAO,CAAC,GAAG,CAAC,oCAAoC,CAAC,CAAC;YAClD,MAAM;QAER;YACE,MAAM,IAAI,KAAK,CAAC,yBAA0B,OAAQ,EAAE,CAAC,CAAC;KAEzD;AAEH,CAAC;AA5DD,kDA4DC"}
|
|
@@ -9,6 +9,7 @@ export interface NormalizedMinimumTableComponentOptions extends Readonly<Normali
|
|
|
9
9
|
columnList: NormalizedTableColumn[];
|
|
10
10
|
actionList: NormalizedTableAction[];
|
|
11
11
|
componentName: string;
|
|
12
|
+
controllerName: string;
|
|
12
13
|
}
|
|
13
14
|
export declare function NormalizeMinimumTableComponentOptions(options: Readonly<MinimumTableComponentOptions>): NormalizedMinimumTableComponentOptions;
|
|
14
15
|
export declare function tableInterfaceRule(normalizedOptions: NormalizedMinimumTableComponentOptions): Rule;
|
|
@@ -10,13 +10,17 @@ const angular_options_1 = require("./angular-options");
|
|
|
10
10
|
const backend_types_1 = require("./backend-types");
|
|
11
11
|
const minimum_table_options_1 = require("./minimum-table-options");
|
|
12
12
|
function NormalizeMinimumTableComponentOptions(options) {
|
|
13
|
-
var _a;
|
|
13
|
+
var _a, _b;
|
|
14
14
|
const normalizedAngularOptions = (0, angular_options_1.NormalizeAngularOptions)(options);
|
|
15
15
|
(0, angular_options_1.AssertAngularOptionsNameProperty)(normalizedAngularOptions);
|
|
16
16
|
const { name } = normalizedAngularOptions;
|
|
17
17
|
const normalizedTableOptions = (0, minimum_table_options_1.NormalizeMinimumTableOptions)(options, name);
|
|
18
|
-
const componentName =
|
|
19
|
-
|
|
18
|
+
const { componentName } = normalizedTableOptions;
|
|
19
|
+
const nestModule = (_a = options.nestModule) !== null && _a !== void 0 ? _a : null;
|
|
20
|
+
return Object.seal(Object.assign(Object.assign(Object.assign({}, normalizedAngularOptions), normalizedTableOptions), { nestModule, controllerName: (0, schematics_ts_morph_1.BuildNestControllerName)({
|
|
21
|
+
controllerName: componentName,
|
|
22
|
+
nestModule,
|
|
23
|
+
}), directory: (0, path_1.join)((_b = options.directory) !== null && _b !== void 0 ? _b : '', componentName) }));
|
|
20
24
|
}
|
|
21
25
|
exports.NormalizeMinimumTableComponentOptions = NormalizeMinimumTableComponentOptions;
|
|
22
26
|
// region table interface
|
|
@@ -45,6 +49,10 @@ function tableInterfaceFromOpenApiRule(normalizedOptions) {
|
|
|
45
49
|
moduleSpecifier: '@rxap/material-table-system',
|
|
46
50
|
namedImports: ['TableRowMetadata'],
|
|
47
51
|
});
|
|
52
|
+
(0, schematics_ts_morph_1.CoerceImports)(sourceFile, {
|
|
53
|
+
moduleSpecifier: (0, schematics_ts_morph_1.OperationIdToResponseClassImportPath)(operationId),
|
|
54
|
+
namedImports: [(0, schematics_ts_morph_1.OperationIdToResponseClassName)(operationId)],
|
|
55
|
+
});
|
|
48
56
|
}, [`${(0, utilities_1.dasherize)(componentName)}.ts?`]),
|
|
49
57
|
]);
|
|
50
58
|
}
|
|
@@ -90,10 +98,10 @@ exports.tableInterfaceRule = tableInterfaceRule;
|
|
|
90
98
|
// region table action
|
|
91
99
|
function operationActionRule(action, normalizedOptions) {
|
|
92
100
|
var _a;
|
|
93
|
-
const { type } = action;
|
|
101
|
+
const { type, role, } = action;
|
|
94
102
|
const { overwrite, project, feature, shared, backend, componentName, directory, nestModule, controllerName, context, } = normalizedOptions;
|
|
95
|
-
if (
|
|
96
|
-
throw new schematics_1.SchematicsException(`Invalid action
|
|
103
|
+
if (role !== 'operation') {
|
|
104
|
+
throw new schematics_1.SchematicsException(`Invalid action role: ${role} - expected operation`);
|
|
97
105
|
}
|
|
98
106
|
return (0, schematics_1.chain)([
|
|
99
107
|
() => console.log(`Coerce operation table action '${action.type}'`),
|
|
@@ -101,15 +109,15 @@ function operationActionRule(action, normalizedOptions) {
|
|
|
101
109
|
project,
|
|
102
110
|
feature,
|
|
103
111
|
shared,
|
|
104
|
-
backend, tableName: componentName, directory, nestModule: (_a = (shared ? undefined : nestModule)) !== null && _a !== void 0 ? _a : controllerName, context
|
|
112
|
+
backend, tableName: componentName, directory, nestModule: (_a = (shared ? undefined : nestModule)) !== null && _a !== void 0 ? _a : controllerName, context })),
|
|
105
113
|
]);
|
|
106
114
|
}
|
|
107
115
|
function formActionRule(action, normalizedOptions) {
|
|
108
116
|
var _a;
|
|
109
|
-
const { type } = action;
|
|
117
|
+
const { type, role, } = action;
|
|
110
118
|
const { overwrite, project, feature, shared, backend, componentName, directory, nestModule, controllerName, context, } = normalizedOptions;
|
|
111
|
-
if (
|
|
112
|
-
throw new schematics_1.SchematicsException(`Invalid action
|
|
119
|
+
if (role !== 'form') {
|
|
120
|
+
throw new schematics_1.SchematicsException(`Invalid action role: ${role} - expected form`);
|
|
113
121
|
}
|
|
114
122
|
return (0, schematics_1.chain)([
|
|
115
123
|
() => console.log(`Coerce form table action '${action.type}'`),
|
|
@@ -117,14 +125,14 @@ function formActionRule(action, normalizedOptions) {
|
|
|
117
125
|
project,
|
|
118
126
|
feature,
|
|
119
127
|
shared,
|
|
120
|
-
backend, tableName: componentName, directory, nestModule: (_a = (shared ? undefined : nestModule)) !== null && _a !== void 0 ? _a : controllerName, context
|
|
128
|
+
backend, tableName: componentName, directory, nestModule: (_a = (shared ? undefined : nestModule)) !== null && _a !== void 0 ? _a : controllerName, context })),
|
|
121
129
|
]);
|
|
122
130
|
}
|
|
123
131
|
function navigateActionRule(action, normalizedOptions) {
|
|
124
|
-
const { type } = action;
|
|
132
|
+
const { type, role, } = action;
|
|
125
133
|
const { overwrite, project, feature, shared, backend, componentName, directory, } = normalizedOptions;
|
|
126
|
-
if (!['link', 'navigate'].includes(
|
|
127
|
-
throw new schematics_1.SchematicsException(`Invalid action
|
|
134
|
+
if (!['link', 'navigate'].includes(role !== null && role !== void 0 ? role : '')) {
|
|
135
|
+
throw new schematics_1.SchematicsException(`Invalid action role: ${role} - expected navigate`);
|
|
128
136
|
}
|
|
129
137
|
return (0, schematics_1.chain)([
|
|
130
138
|
() => console.log(`Coerce navigate table action '${action.type}'`),
|
|
@@ -137,10 +145,10 @@ function navigateActionRule(action, normalizedOptions) {
|
|
|
137
145
|
}
|
|
138
146
|
function dialogActionRule(action, normalizedOptions) {
|
|
139
147
|
var _a;
|
|
140
|
-
const { type } = action;
|
|
148
|
+
const { type, role, } = action;
|
|
141
149
|
const { overwrite, project, feature, shared, backend, componentName, directory, nestModule, controllerName, context, } = normalizedOptions;
|
|
142
|
-
if (
|
|
143
|
-
throw new schematics_1.SchematicsException(`Invalid action
|
|
150
|
+
if (role !== 'dialog') {
|
|
151
|
+
throw new schematics_1.SchematicsException(`Invalid action role: ${role} - expected dialog`);
|
|
144
152
|
}
|
|
145
153
|
return (0, schematics_1.chain)([
|
|
146
154
|
() => console.log(`Coerce dialog table action '${action.type}'`),
|
|
@@ -148,7 +156,7 @@ function dialogActionRule(action, normalizedOptions) {
|
|
|
148
156
|
project,
|
|
149
157
|
feature,
|
|
150
158
|
shared,
|
|
151
|
-
backend, tableName: componentName, directory, nestModule: (_a = (shared ? undefined : nestModule)) !== null && _a !== void 0 ? _a : controllerName, context
|
|
159
|
+
backend, tableName: componentName, directory, nestModule: (_a = (shared ? undefined : nestModule)) !== null && _a !== void 0 ? _a : controllerName, context })),
|
|
152
160
|
]);
|
|
153
161
|
}
|
|
154
162
|
function defaultActionRule(action, normalizedOptions) {
|
|
@@ -163,24 +171,28 @@ function defaultActionRule(action, normalizedOptions) {
|
|
|
163
171
|
]);
|
|
164
172
|
}
|
|
165
173
|
function actionRule(action, normalizedOptions) {
|
|
166
|
-
|
|
174
|
+
const rules = [];
|
|
175
|
+
switch (action.role) {
|
|
167
176
|
case 'operation':
|
|
168
|
-
|
|
177
|
+
rules.push(operationActionRule(action, normalizedOptions));
|
|
178
|
+
break;
|
|
169
179
|
case 'form':
|
|
170
|
-
|
|
180
|
+
rules.push(formActionRule(action, normalizedOptions));
|
|
181
|
+
break;
|
|
171
182
|
case 'link':
|
|
172
183
|
console.warn('Deprecated action type: link - use navigate instead');
|
|
173
|
-
|
|
184
|
+
rules.push(navigateActionRule(action, normalizedOptions));
|
|
185
|
+
break;
|
|
174
186
|
case 'navigate':
|
|
175
|
-
|
|
187
|
+
rules.push(navigateActionRule(action, normalizedOptions));
|
|
188
|
+
break;
|
|
176
189
|
case 'dialog':
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
console.warn('Deprecated action type: method - leaf empty instead');
|
|
180
|
-
return defaultActionRule(action, normalizedOptions);
|
|
190
|
+
rules.push(dialogActionRule(action, normalizedOptions));
|
|
191
|
+
break;
|
|
181
192
|
default:
|
|
182
|
-
|
|
193
|
+
rules.push(defaultActionRule(action, normalizedOptions));
|
|
183
194
|
}
|
|
195
|
+
return (0, schematics_1.chain)(rules);
|
|
184
196
|
}
|
|
185
197
|
function actionListRule(normalizedOptions) {
|
|
186
198
|
const { actionList } = normalizedOptions;
|
|
@@ -215,126 +227,23 @@ function cellComponentRule(normalizedOptions) {
|
|
|
215
227
|
}
|
|
216
228
|
exports.cellComponentRule = cellComponentRule;
|
|
217
229
|
function headerButtonRule(normalizedOptions) {
|
|
218
|
-
|
|
219
|
-
const { headerButton, project, feature, directory, shared, nestModule, controllerName, context, backend, overwrite, componentName, } = normalizedOptions;
|
|
230
|
+
const { headerButton, name, project, feature, backend, shared, directory, context, nestModule, controllerName, } = normalizedOptions;
|
|
220
231
|
if (headerButton) {
|
|
232
|
+
const options = Object.assign({ tableName: name, project,
|
|
233
|
+
feature,
|
|
234
|
+
backend,
|
|
235
|
+
shared,
|
|
236
|
+
directory }, headerButton);
|
|
221
237
|
switch (headerButton.role) {
|
|
222
238
|
case 'form':
|
|
223
|
-
return (0,
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
directory,
|
|
230
|
-
shared,
|
|
231
|
-
window: true,
|
|
232
|
-
controlList: [],
|
|
233
|
-
nestModule: (_a = (shared ? undefined : nestModule)) !== null && _a !== void 0 ? _a : controllerName,
|
|
234
|
-
context: (0, utilities_1.joinWithDash)([context, controllerName]),
|
|
235
|
-
backend,
|
|
236
|
-
overwrite,
|
|
237
|
-
}),
|
|
238
|
-
(0, schematics_ts_morph_1.CoerceMethodClass)({
|
|
239
|
-
project,
|
|
240
|
-
feature,
|
|
241
|
-
shared,
|
|
242
|
-
directory: (0, path_1.join)(directory !== null && directory !== void 0 ? directory : '', 'methods'),
|
|
243
|
-
name: 'table-header-button',
|
|
244
|
-
overwrite,
|
|
245
|
-
tsMorphTransform: (project, sourceFile, classDeclaration) => {
|
|
246
|
-
const [constructorDeclaration] = (0, schematics_ts_morph_1.CoerceClassConstructor)(classDeclaration);
|
|
247
|
-
(0, schematics_ts_morph_1.CoerceParameterDeclaration)(constructorDeclaration, 'formWindowService', {
|
|
248
|
-
type: 'FormWindowService',
|
|
249
|
-
});
|
|
250
|
-
(0, schematics_ts_morph_1.CoerceParameterDeclaration)(constructorDeclaration, 'injector', {
|
|
251
|
-
type: 'Injector',
|
|
252
|
-
decorators: [
|
|
253
|
-
{
|
|
254
|
-
name: 'Inject',
|
|
255
|
-
arguments: ['INJECTOR'],
|
|
256
|
-
},
|
|
257
|
-
],
|
|
258
|
-
});
|
|
259
|
-
(0, schematics_ts_morph_1.CoerceParameterDeclaration)(constructorDeclaration, 'defaultOptions', {
|
|
260
|
-
type: 'FormWindowOptions<ITableHeaderButtonForm> | null',
|
|
261
|
-
initializer: 'null',
|
|
262
|
-
decorators: [
|
|
263
|
-
{
|
|
264
|
-
name: 'Inject',
|
|
265
|
-
arguments: ['RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFAULT_OPTIONS'],
|
|
266
|
-
},
|
|
267
|
-
{
|
|
268
|
-
name: 'Optional',
|
|
269
|
-
arguments: [],
|
|
270
|
-
},
|
|
271
|
-
],
|
|
272
|
-
});
|
|
273
|
-
(0, schematics_ts_morph_1.CoerceImports)(sourceFile, [
|
|
274
|
-
{
|
|
275
|
-
moduleSpecifier: '@angular/core',
|
|
276
|
-
namedImports: ['Injector', 'INJECTOR', 'Inject', 'Optional'],
|
|
277
|
-
},
|
|
278
|
-
{
|
|
279
|
-
moduleSpecifier: '@rxap/form-window-system',
|
|
280
|
-
namedImports: [
|
|
281
|
-
'FormWindowOptions',
|
|
282
|
-
'FormWindowService',
|
|
283
|
-
'OpenFormWindowMethod',
|
|
284
|
-
'RXAP_FORM_WINDOW_SYSTEM_OPEN_FORM_DEFAULT_OPTIONS',
|
|
285
|
-
],
|
|
286
|
-
},
|
|
287
|
-
{
|
|
288
|
-
moduleSpecifier: '../table-header-button-form/table-header-button.form',
|
|
289
|
-
namedImports: ['ITableHeaderButtonForm', 'TableHeaderButtonForm'],
|
|
290
|
-
},
|
|
291
|
-
{
|
|
292
|
-
moduleSpecifier: '../table-header-button-form/table-header-button-form.component',
|
|
293
|
-
namedImports: ['TableHeaderButtonFormComponent'],
|
|
294
|
-
},
|
|
295
|
-
]);
|
|
296
|
-
(0, schematics_ts_morph_1.CoerceStatements)(constructorDeclaration, [
|
|
297
|
-
'super(',
|
|
298
|
-
'formWindowService,',
|
|
299
|
-
'TableHeaderButtonForm,',
|
|
300
|
-
'injector,',
|
|
301
|
-
'TableHeaderButtonFormComponent,',
|
|
302
|
-
'defaultOptions,',
|
|
303
|
-
');',
|
|
304
|
-
]);
|
|
305
|
-
classDeclaration.setExtends('OpenFormWindowMethod<ITableHeaderButtonForm>');
|
|
306
|
-
return {
|
|
307
|
-
hasOverrideKeyword: true,
|
|
308
|
-
statements: ['super.call(parameters);'],
|
|
309
|
-
};
|
|
310
|
-
},
|
|
311
|
-
}),
|
|
312
|
-
(0, schematics_ts_morph_1.CoerceComponentRule)({
|
|
313
|
-
project,
|
|
314
|
-
feature,
|
|
315
|
-
shared,
|
|
316
|
-
name: componentName,
|
|
317
|
-
directory,
|
|
318
|
-
overwrite,
|
|
319
|
-
tsMorphTransform: (project, [sourceFile]) => {
|
|
320
|
-
(0, schematics_ts_morph_1.AddComponentProvider)(sourceFile, {
|
|
321
|
-
provide: 'TABLE_CREATE_REMOTE_METHOD',
|
|
322
|
-
useClass: 'TableHeaderButtonMethod',
|
|
323
|
-
}, [
|
|
324
|
-
{
|
|
325
|
-
moduleSpecifier: '@rxap/material-table-system',
|
|
326
|
-
namedImports: ['TABLE_CREATE_REMOTE_METHOD'],
|
|
327
|
-
},
|
|
328
|
-
{
|
|
329
|
-
moduleSpecifier: './methods/table-header-button.method',
|
|
330
|
-
namedImports: ['TableHeaderButtonMethod'],
|
|
331
|
-
},
|
|
332
|
-
]);
|
|
333
|
-
},
|
|
334
|
-
}),
|
|
335
|
-
]);
|
|
239
|
+
return (0, schematics_utilities_1.ExecuteSchematic)('form-table-header-button', Object.assign(Object.assign({}, options), { context,
|
|
240
|
+
// if the nest module is not defined, then use the controller name as the nest module name
|
|
241
|
+
nestModule: nestModule !== null && nestModule !== void 0 ? nestModule : controllerName }));
|
|
242
|
+
case 'navigation':
|
|
243
|
+
case 'link':
|
|
244
|
+
return (0, schematics_utilities_1.ExecuteSchematic)('navigation-table-header-button', options);
|
|
336
245
|
default:
|
|
337
|
-
|
|
246
|
+
return (0, schematics_utilities_1.ExecuteSchematic)('table-header-button', options);
|
|
338
247
|
}
|
|
339
248
|
}
|
|
340
249
|
return (0, schematics_1.noop)();
|