@rxap/schematic-angular 16.1.0-dev.33 → 16.1.0-dev.34
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 +6 -0
- package/package.json +3 -3
- package/src/schematics/table/action/form-table-action/index.d.ts +1 -0
- package/src/schematics/table/action/form-table-action/index.js +30 -9
- package/src/schematics/table/action/form-table-action/index.js.map +1 -1
- package/src/schematics/table/action/form-table-action/schema.d.ts +6 -1
- package/src/schematics/table/action/form-table-action/schema.json +45 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
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.34](https://gitlab.com/rxap/packages/compare/@rxap/schematic-angular@16.1.0-dev.33...@rxap/schematic-angular@16.1.0-dev.34) (2023-11-17)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- support custom form component ([6c1a9b7](https://gitlab.com/rxap/packages/commit/6c1a9b7e996aa5bac073a5867b30819748230a84))
|
|
11
|
+
|
|
6
12
|
# [16.1.0-dev.33](https://gitlab.com/rxap/packages/compare/@rxap/schematic-angular@16.1.0-dev.32...@rxap/schematic-angular@16.1.0-dev.33) (2023-11-17)
|
|
7
13
|
|
|
8
14
|
### Bug Fixes
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "16.1.0-dev.
|
|
2
|
+
"version": "16.1.0-dev.34",
|
|
3
3
|
"name": "@rxap/schematic-angular",
|
|
4
4
|
"license": "GPL-3.0-or-later",
|
|
5
5
|
"dependencies": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"ts-morph": "^18.0.0",
|
|
19
19
|
"tslib": "2.6.2",
|
|
20
20
|
"@rxap/node-utilities": "1.1.0-dev.15",
|
|
21
|
-
"@rxap/ts-morph": "0.1.0-dev.
|
|
21
|
+
"@rxap/ts-morph": "0.1.0-dev.19",
|
|
22
22
|
"@rxap/workspace-ts-morph": "0.1.0-dev.12",
|
|
23
23
|
"@rxap/workspace-utilities": "0.1.0-dev.26"
|
|
24
24
|
},
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
},
|
|
70
70
|
"schematics": "./collection.json",
|
|
71
71
|
"type": "commonjs",
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "a4dca7e8327ee2684f6aad3d99080200c5ed0c48",
|
|
73
73
|
"main": "./src/index.js",
|
|
74
74
|
"types": "./src/index.d.ts"
|
|
75
75
|
}
|
|
@@ -8,6 +8,7 @@ export interface NormalizedFormTableActionOptions extends Readonly<Normalized<Fo
|
|
|
8
8
|
options: Record<string, any> & {
|
|
9
9
|
controlList: NormalizedFormComponentControl[];
|
|
10
10
|
};
|
|
11
|
+
formComponent: string;
|
|
11
12
|
}
|
|
12
13
|
export declare function NormalizeFormTableActionOptions(options: Readonly<FormTableActionOptions>): NormalizedFormTableActionOptions;
|
|
13
14
|
export declare function CoerceTypeAlias(sourceFile: SourceFile, name: string, structure: Omit<OptionalKind<TypeAliasDeclarationStructure>, 'name'>): import("ts-morph").TypeAliasDeclaration;
|
|
@@ -13,13 +13,15 @@ const form_component_control_1 = require("../../../../lib/form-component-control
|
|
|
13
13
|
const index_1 = require("../../../form/form-component/index");
|
|
14
14
|
const operation_table_action_1 = require("../operation-table-action");
|
|
15
15
|
function NormalizeFormTableActionOptions(options) {
|
|
16
|
-
var _a, _b, _c;
|
|
16
|
+
var _a, _b, _c, _d, _e, _f;
|
|
17
17
|
const normalizedOptions = (0, operation_table_action_1.NormalizeOperationTableActionOptions)(options);
|
|
18
|
-
const { controllerName, type, nestModule, } = normalizedOptions;
|
|
18
|
+
const { controllerName, type, nestModule, tableName, } = normalizedOptions;
|
|
19
|
+
const loadFrom = (_a = options.loadFrom) !== null && _a !== void 0 ? _a : null;
|
|
20
|
+
const formInitial = (_b = options.formInitial) !== null && _b !== void 0 ? _b : null;
|
|
19
21
|
return Object.assign(Object.assign({}, normalizedOptions), { controllerName: (0, schematics_ts_morph_1.BuildNestControllerName)({
|
|
20
22
|
nestModule,
|
|
21
23
|
controllerName: [type, 'action'].join('-'),
|
|
22
|
-
}), options: Object.assign(Object.assign({}, (
|
|
24
|
+
}), formComponent: (0, utilities_1.CoerceSuffix)((0, utilities_1.dasherize)((_c = options.formComponent) !== null && _c !== void 0 ? _c : [type, tableName.replace(/-table$/, '')].join('-')), '-form'), loadFrom: Object.keys(loadFrom !== null && loadFrom !== void 0 ? loadFrom : {}).length ? loadFrom : null, formInitial: Object.keys(formInitial !== null && formInitial !== void 0 ? formInitial : {}).length ? formInitial : null, options: Object.assign(Object.assign({}, (_d = normalizedOptions.options) !== null && _d !== void 0 ? _d : {}), { controlList: (0, form_component_control_1.NormalizeFormComponentControlList)((_f = (_e = normalizedOptions.options) === null || _e === void 0 ? void 0 : _e['controlList']) !== null && _f !== void 0 ? _f : []) }) });
|
|
23
25
|
}
|
|
24
26
|
exports.NormalizeFormTableActionOptions = NormalizeFormTableActionOptions;
|
|
25
27
|
function CoerceTypeAlias(sourceFile, name, structure) {
|
|
@@ -130,9 +132,26 @@ function buildGetOperationId(normalizedOptions) {
|
|
|
130
132
|
const { controllerName, } = normalizedOptions;
|
|
131
133
|
return (0, schematics_ts_morph_1.buildOperationId)(normalizedOptions, `get`, controllerName);
|
|
132
134
|
}
|
|
135
|
+
function buildLoadFormOptions(normalizedOptions) {
|
|
136
|
+
const { backend } = normalizedOptions;
|
|
137
|
+
let loadFrom = undefined;
|
|
138
|
+
if (backend === backend_types_1.BackendTypes.NESTJS) {
|
|
139
|
+
loadFrom = {
|
|
140
|
+
operationId: buildGetOperationId(normalizedOptions),
|
|
141
|
+
body: false,
|
|
142
|
+
parameters: {
|
|
143
|
+
rowId: 'rowId',
|
|
144
|
+
},
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
else if (normalizedOptions.loadFrom) {
|
|
148
|
+
loadFrom = normalizedOptions.loadFrom;
|
|
149
|
+
}
|
|
150
|
+
return loadFrom;
|
|
151
|
+
}
|
|
133
152
|
function default_1(options) {
|
|
134
153
|
const normalizedOptions = NormalizeFormTableActionOptions(options);
|
|
135
|
-
const { refresh, confirm, tooltip, errorMessage, successMessage, priority, checkFunction, tableName, project, feature, shared, directory, nestModule, type, context, controllerName, overwrite, scope, options: formOptions, backend, } = normalizedOptions;
|
|
154
|
+
const { refresh, confirm, tooltip, errorMessage, successMessage, priority, checkFunction, tableName, project, feature, shared, directory, nestModule, type, context, controllerName, overwrite, scope, options: formOptions, backend, formInitial, formComponent, } = normalizedOptions;
|
|
136
155
|
printOptions(normalizedOptions);
|
|
137
156
|
return (host) => {
|
|
138
157
|
(0, assert_table_component_exists_1.AssertTableComponentExists)(host, normalizedOptions);
|
|
@@ -142,7 +161,8 @@ function default_1(options) {
|
|
|
142
161
|
(0, schematics_ts_morph_1.CoerceFormTableActionRule)({
|
|
143
162
|
scope,
|
|
144
163
|
directory: (0, path_1.join)(directory !== null && directory !== void 0 ? directory : '', 'methods', 'action'),
|
|
145
|
-
|
|
164
|
+
loadFrom: buildLoadFormOptions(normalizedOptions),
|
|
165
|
+
formInitial,
|
|
146
166
|
type,
|
|
147
167
|
tableName,
|
|
148
168
|
refresh,
|
|
@@ -154,6 +174,7 @@ function default_1(options) {
|
|
|
154
174
|
checkFunction,
|
|
155
175
|
project,
|
|
156
176
|
feature,
|
|
177
|
+
formComponent,
|
|
157
178
|
}),
|
|
158
179
|
() => console.log('Coerce open form window method to table component ...'),
|
|
159
180
|
(0, schematics_ts_morph_1.CoerceComponentRule)({
|
|
@@ -164,16 +185,16 @@ function default_1(options) {
|
|
|
164
185
|
directory,
|
|
165
186
|
overwrite,
|
|
166
187
|
tsMorphTransform: (project, [sourceFile]) => {
|
|
167
|
-
(0, schematics_ts_morph_1.AddComponentProvider)(sourceFile, `Open${(0, utilities_1.classify)(
|
|
188
|
+
(0, schematics_ts_morph_1.AddComponentProvider)(sourceFile, `Open${(0, utilities_1.classify)(formComponent)}WindowMethod`, [
|
|
168
189
|
{
|
|
169
|
-
moduleSpecifier: `./${type}-form/open-${
|
|
170
|
-
namedImports: [`Open${(0, utilities_1.classify)(
|
|
190
|
+
moduleSpecifier: `./${type}-form/open-${(0, utilities_1.dasherize)(formComponent)}-window.method`,
|
|
191
|
+
namedImports: [`Open${(0, utilities_1.classify)(formComponent)}WindowMethod`],
|
|
171
192
|
},
|
|
172
193
|
]);
|
|
173
194
|
},
|
|
174
195
|
}),
|
|
175
196
|
() => console.info(`Generating form component...`),
|
|
176
|
-
(0, schematics_utilities_1.ExecuteSchematic)('form-component', Object.assign(Object.assign({}, formOptions !== null && formOptions !== void 0 ? formOptions : {}), { project, name:
|
|
197
|
+
(0, schematics_utilities_1.ExecuteSchematic)('form-component', Object.assign(Object.assign({}, formOptions !== null && formOptions !== void 0 ? formOptions : {}), { project, name: formComponent.replace(/-form$/, ''), feature,
|
|
177
198
|
directory,
|
|
178
199
|
shared, window: true, role: type, nestModule,
|
|
179
200
|
controllerName,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/schematic/angular/src/schematics/table/action/form-table-action/index.ts"],"names":[],"mappings":";;;AAAA,2DAKoC;AACpC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/schematic/angular/src/schematics/table/action/form-table-action/index.ts"],"names":[],"mappings":";;;AAAA,2DAKoC;AACpC,mEAemC;AACnC,qEAA8D;AAC9D,+CAKyB;AACzB,+BAA4B;AAO5B,qEAAsE;AACtE,iGAA2F;AAC3F,iEAA6D;AAC7D,mFAGgD;AAChD,8DAA4F;AAC5F,sEAGmC;AAWnC,SAAgB,+BAA+B,CAC7C,OAAyC;;IAEzC,MAAM,iBAAiB,GAAG,IAAA,6DAAoC,EAAC,OAAO,CA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Options } from '@rxap/schematics-ts-morph';
|
|
1
2
|
import { OperationTableActionOptions } from '../operation-table-action/schema';
|
|
2
3
|
|
|
3
4
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
4
|
-
export interface FormTableActionOptions extends OperationTableActionOptions {
|
|
5
|
+
export interface FormTableActionOptions extends OperationTableActionOptions {
|
|
6
|
+
loadFrom?: LoadFromTableActionOptions;
|
|
7
|
+
formInitial?: Record<string, any>;
|
|
8
|
+
formComponent?: string;
|
|
9
|
+
}
|
|
@@ -96,6 +96,51 @@
|
|
|
96
96
|
"type": "string",
|
|
97
97
|
"description": "The context use to generate proper names for class, files, etc"
|
|
98
98
|
},
|
|
99
|
+
"formInitial": {
|
|
100
|
+
"type": "object",
|
|
101
|
+
"description": "The mapping from the row object to the form initial object"
|
|
102
|
+
},
|
|
103
|
+
"formComponent": {
|
|
104
|
+
"type": "string"
|
|
105
|
+
},
|
|
106
|
+
"loadFrom": {
|
|
107
|
+
"type": "object",
|
|
108
|
+
"properties": {
|
|
109
|
+
"operationId": {
|
|
110
|
+
"type": "string"
|
|
111
|
+
},
|
|
112
|
+
"scope": {
|
|
113
|
+
"type": "string",
|
|
114
|
+
"description": "The scope of package for the openapi classes"
|
|
115
|
+
},
|
|
116
|
+
"body": {
|
|
117
|
+
"oneOf": [
|
|
118
|
+
{
|
|
119
|
+
"type": "boolean",
|
|
120
|
+
"description": "Pass the full row as body for the operation request"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"type": "object",
|
|
124
|
+
"description": "Mapping of table columns to body properties - [request property]: [table column]",
|
|
125
|
+
"additionalProperties": true
|
|
126
|
+
}
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
"parameters": {
|
|
130
|
+
"oneOf": [
|
|
131
|
+
{
|
|
132
|
+
"type": "boolean",
|
|
133
|
+
"description": "Pass the full row as parameters for the operation request"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"type": "object",
|
|
137
|
+
"description": "Mapping of table columns to parameters properties - [request property]: [table column]",
|
|
138
|
+
"additionalProperties": true
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
},
|
|
99
144
|
"options": {
|
|
100
145
|
"type": "object",
|
|
101
146
|
"properties": {
|