@rxap/schematic-angular 16.1.0-dev.35 → 16.1.0-dev.37
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 +13 -0
- package/package.json +2 -2
- package/src/schematics/table/action/form-table-action/index.d.ts +5 -3
- package/src/schematics/table/action/form-table-action/index.js +20 -13
- package/src/schematics/table/action/form-table-action/index.js.map +1 -1
- package/src/schematics/table/action/form-table-action/schema.d.ts +7 -0
- package/src/schematics/table/action/form-table-action/schema.json +14 -1
- package/src/schematics/table/table-component/files/component/__componentName__.component.html.template +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,19 @@
|
|
|
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.37](https://gitlab.com/rxap/packages/compare/@rxap/schematic-angular@16.1.0-dev.36...@rxap/schematic-angular@16.1.0-dev.37) (2023-11-17)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- support custom form component ([28e26ab](https://gitlab.com/rxap/packages/commit/28e26abb2ef171b9a5c54909dfcc33285c121545))
|
|
11
|
+
- support custom form options ([04c74e6](https://gitlab.com/rxap/packages/commit/04c74e608a93ae37831f72194acc1a5c22b0001d))
|
|
12
|
+
|
|
13
|
+
# [16.1.0-dev.36](https://gitlab.com/rxap/packages/compare/@rxap/schematic-angular@16.1.0-dev.35...@rxap/schematic-angular@16.1.0-dev.36) (2023-11-17)
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
- resolve minor template issues ([1f13b90](https://gitlab.com/rxap/packages/commit/1f13b9084fd3de7e97e803f8ca8dfae7feb5cfac))
|
|
18
|
+
|
|
6
19
|
# [16.1.0-dev.35](https://gitlab.com/rxap/packages/compare/@rxap/schematic-angular@16.1.0-dev.34...@rxap/schematic-angular@16.1.0-dev.35) (2023-11-17)
|
|
7
20
|
|
|
8
21
|
### Bug Fixes
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "16.1.0-dev.
|
|
2
|
+
"version": "16.1.0-dev.37",
|
|
3
3
|
"name": "@rxap/schematic-angular",
|
|
4
4
|
"license": "GPL-3.0-or-later",
|
|
5
5
|
"dependencies": {
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
},
|
|
70
70
|
"schematics": "./collection.json",
|
|
71
71
|
"type": "commonjs",
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "6bbb8b0a723851cde8ca36ac630b9d36f10559a8",
|
|
73
73
|
"main": "./src/index.js",
|
|
74
74
|
"types": "./src/index.d.ts"
|
|
75
75
|
}
|
|
@@ -4,11 +4,13 @@ import { OptionalKind, SourceFile, TypeAliasDeclarationStructure } from 'ts-morp
|
|
|
4
4
|
import { NormalizedFormComponentControl } from '../../../../lib/form-component-control';
|
|
5
5
|
import { NormalizedOperationTableActionOptions } from '../operation-table-action';
|
|
6
6
|
import { FormTableActionOptions } from './schema';
|
|
7
|
-
export interface NormalizedFormTableActionOptions extends Readonly<Normalized<FormTableActionOptions> & NormalizedOperationTableActionOptions> {
|
|
8
|
-
|
|
7
|
+
export interface NormalizedFormTableActionOptions extends Omit<Readonly<Normalized<FormTableActionOptions> & NormalizedOperationTableActionOptions>, 'formOptions'> {
|
|
8
|
+
formComponent: string;
|
|
9
|
+
formOptions: {
|
|
9
10
|
controlList: NormalizedFormComponentControl[];
|
|
11
|
+
role: string | null;
|
|
12
|
+
window: boolean;
|
|
10
13
|
};
|
|
11
|
-
formComponent: string;
|
|
12
14
|
}
|
|
13
15
|
export declare function NormalizeFormTableActionOptions(options: Readonly<FormTableActionOptions>): NormalizedFormTableActionOptions;
|
|
14
16
|
export declare function CoerceTypeAlias(sourceFile: SourceFile, name: string, structure: Omit<OptionalKind<TypeAliasDeclarationStructure>, 'name'>): import("ts-morph").TypeAliasDeclaration;
|
|
@@ -13,15 +13,20 @@ 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, _d, _e, _f;
|
|
16
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
17
17
|
const normalizedOptions = (0, operation_table_action_1.NormalizeOperationTableActionOptions)(options);
|
|
18
18
|
const { controllerName, type, nestModule, tableName, } = normalizedOptions;
|
|
19
19
|
const loadFrom = (_a = options.loadFrom) !== null && _a !== void 0 ? _a : null;
|
|
20
20
|
const formInitial = (_b = options.formInitial) !== null && _b !== void 0 ? _b : null;
|
|
21
|
+
const formOptions = (_c = options.formOptions) !== null && _c !== void 0 ? _c : {};
|
|
21
22
|
return Object.assign(Object.assign({}, normalizedOptions), { controllerName: (0, schematics_ts_morph_1.BuildNestControllerName)({
|
|
22
23
|
nestModule,
|
|
23
24
|
controllerName: [type, 'action'].join('-'),
|
|
24
|
-
}), formComponent: (0, utilities_1.CoerceSuffix)((0, utilities_1.dasherize)((
|
|
25
|
+
}), formComponent: (0, utilities_1.CoerceSuffix)((0, utilities_1.dasherize)((_d = options.formComponent) !== null && _d !== void 0 ? _d : [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, customComponent: (_e = options.customComponent) !== null && _e !== void 0 ? _e : false, formOptions: {
|
|
26
|
+
window: (_f = formOptions.window) !== null && _f !== void 0 ? _f : true,
|
|
27
|
+
role: (_g = formOptions.role) !== null && _g !== void 0 ? _g : type,
|
|
28
|
+
controlList: (0, form_component_control_1.NormalizeFormComponentControlList)(formOptions.controlList),
|
|
29
|
+
} });
|
|
25
30
|
}
|
|
26
31
|
exports.NormalizeFormTableActionOptions = NormalizeFormTableActionOptions;
|
|
27
32
|
function CoerceTypeAlias(sourceFile, name, structure) {
|
|
@@ -69,10 +74,11 @@ function nestjsBackendRule(normalizedOptions) {
|
|
|
69
74
|
operationName: `get`,
|
|
70
75
|
controllerPath,
|
|
71
76
|
tsMorphTransform: (project, sourceFile) => {
|
|
77
|
+
var _a, _b;
|
|
72
78
|
const { className, filePath, } = (0, schematics_ts_morph_1.CoerceDtoClass)({
|
|
73
79
|
project,
|
|
74
80
|
name: controllerName,
|
|
75
|
-
propertyList: normalizedOptions.
|
|
81
|
+
propertyList: (_b = (_a = normalizedOptions.formOptions) === null || _a === void 0 ? void 0 : _a.controlList.map(control => (0, index_1.FormComponentControlToDtoClassProperty)(control))) !== null && _b !== void 0 ? _b : [],
|
|
76
82
|
});
|
|
77
83
|
(0, schematics_ts_morph_1.CoerceImports)(sourceFile, {
|
|
78
84
|
namedImports: [className],
|
|
@@ -151,11 +157,11 @@ function buildLoadFormOptions(normalizedOptions) {
|
|
|
151
157
|
}
|
|
152
158
|
function default_1(options) {
|
|
153
159
|
const normalizedOptions = NormalizeFormTableActionOptions(options);
|
|
154
|
-
const { refresh, confirm, tooltip, errorMessage, successMessage, priority, checkFunction, tableName, project, feature, shared, directory, nestModule, type, context, controllerName, overwrite, scope,
|
|
160
|
+
const { refresh, confirm, tooltip, errorMessage, successMessage, priority, checkFunction, tableName, project, feature, shared, directory, nestModule, type, context, controllerName, overwrite, scope, backend, formInitial, formComponent, customComponent, formOptions, } = normalizedOptions;
|
|
155
161
|
printOptions(normalizedOptions);
|
|
156
162
|
return (host) => {
|
|
157
163
|
(0, assert_table_component_exists_1.AssertTableComponentExists)(host, normalizedOptions);
|
|
158
|
-
|
|
164
|
+
const ruleList = [
|
|
159
165
|
() => console.group('\x1b[32m[@rxap/schematics-angular:form-table-action]\x1b[0m'),
|
|
160
166
|
() => console.info(`Generating form table action rule...`),
|
|
161
167
|
(0, schematics_ts_morph_1.CoerceFormTableActionRule)({
|
|
@@ -193,18 +199,19 @@ function default_1(options) {
|
|
|
193
199
|
]);
|
|
194
200
|
},
|
|
195
201
|
}),
|
|
196
|
-
|
|
197
|
-
|
|
202
|
+
];
|
|
203
|
+
if (!customComponent) {
|
|
204
|
+
ruleList.push(() => console.info(`Generating form component...`), (0, schematics_utilities_1.ExecuteSchematic)('form-component', Object.assign(Object.assign({}, formOptions !== null && formOptions !== void 0 ? formOptions : {}), { project, name: formComponent.replace(/-form$/, ''), feature,
|
|
198
205
|
directory,
|
|
199
|
-
shared,
|
|
206
|
+
shared,
|
|
207
|
+
nestModule,
|
|
200
208
|
controllerName,
|
|
201
209
|
overwrite,
|
|
202
210
|
context,
|
|
203
|
-
backend })),
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
]);
|
|
211
|
+
backend })), () => console.info(`Generating backend...`), backendRule(normalizedOptions));
|
|
212
|
+
}
|
|
213
|
+
ruleList.push(() => console.groupEnd());
|
|
214
|
+
return (0, schematics_1.chain)(ruleList);
|
|
208
215
|
};
|
|
209
216
|
}
|
|
210
217
|
exports.default = default_1;
|
|
@@ -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,mEAemC;AACnC,qEAA8D;AAC9D,+CAKyB;AACzB,+BAA4B;AAO5B,qEAAsE;AACtE,iGAA2F;AAC3F,iEAA6D;AAC7D,mFAGgD;AAChD,8DAA4F;AAC5F,sEAGmC;
|
|
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,iEA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C,EACzC,OAAO;gBACP,SAAS;gBACT,MAAM;gBACN,UAAU;gBACV,cAAc;gBACd,SAAS;gBACT,OAAO;gBACP,OAAO,IACP,EACF,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,uBAAuB,CAAC,EAC3C,WAAW,CAAC,iBAAiB,CAAC,CAC/B,CAAC;SACH;QAED,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;QAExC,OAAO,IAAA,kBAAK,EAAC,QAAQ,CAAC,CAAC;IACzB,CAAC,CAAC;AACJ,CAAC;AA3GD,4BA2GC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LoadFromTableActionOptions } from '@rxap/schematics-ts-morph';
|
|
2
|
+
import { FormComponentControl } from '../../../../lib/form-component-control';
|
|
2
3
|
import { OperationTableActionOptions } from '../operation-table-action/schema';
|
|
3
4
|
|
|
4
5
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
@@ -6,4 +7,10 @@ export interface FormTableActionOptions extends OperationTableActionOptions {
|
|
|
6
7
|
loadFrom?: LoadFromTableActionOptions;
|
|
7
8
|
formInitial?: Record<string, any>;
|
|
8
9
|
formComponent?: string;
|
|
10
|
+
customComponent: boolean;
|
|
11
|
+
formOptions?: {
|
|
12
|
+
controlList?: Array<FormComponentControl>;
|
|
13
|
+
role?: string;
|
|
14
|
+
window?: boolean;
|
|
15
|
+
};
|
|
9
16
|
}
|
|
@@ -103,6 +103,11 @@
|
|
|
103
103
|
"formComponent": {
|
|
104
104
|
"type": "string"
|
|
105
105
|
},
|
|
106
|
+
"customComponent": {
|
|
107
|
+
"type": "boolean",
|
|
108
|
+
"default": false,
|
|
109
|
+
"description": "If true the schematic will not coerce the form component"
|
|
110
|
+
},
|
|
106
111
|
"loadFrom": {
|
|
107
112
|
"type": "object",
|
|
108
113
|
"properties": {
|
|
@@ -141,9 +146,17 @@
|
|
|
141
146
|
}
|
|
142
147
|
}
|
|
143
148
|
},
|
|
144
|
-
"
|
|
149
|
+
"formOptions": {
|
|
145
150
|
"type": "object",
|
|
146
151
|
"properties": {
|
|
152
|
+
"role": {
|
|
153
|
+
"type": "string",
|
|
154
|
+
"description": "Define the role of the form"
|
|
155
|
+
},
|
|
156
|
+
"window": {
|
|
157
|
+
"type": "boolean",
|
|
158
|
+
"description": "Whether the form can be opened in a window"
|
|
159
|
+
},
|
|
147
160
|
"controlList": {
|
|
148
161
|
"alias": "control",
|
|
149
162
|
"type": "array",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
</button>
|
|
31
31
|
<mat-card-subtitle i18n><%= headerButton.label %></mat-card-subtitle>
|
|
32
32
|
<% } %>
|
|
33
|
-
<rxap-table-column-menu matCard #rxapTableColumns="rxapTableColumns" <% if (!headerButton && hasWithoutTitle) { %>inline<% }
|
|
33
|
+
<rxap-table-column-menu matCard #rxapTableColumns="rxapTableColumns" <% if (!headerButton && hasWithoutTitle) { %>inline<% } %>>
|
|
34
34
|
<% if (selectColumn) { %>
|
|
35
35
|
<rxap-table-column-option hidden name="select">
|
|
36
36
|
<ng-container i18n>Select</ng-container>
|
|
@@ -115,6 +115,8 @@
|
|
|
115
115
|
<button
|
|
116
116
|
rxapTableRowHeaderAction="<%= action.type %>"
|
|
117
117
|
mat-icon-button
|
|
118
|
+
<% if (action.color) { %>color="<%= action.color %>"<% } %>
|
|
119
|
+
<% if (action.cssClass) { %>class="<%= action.cssClass %>"<% } %>
|
|
118
120
|
*ngIf="selected | rxapRowActionCheck:'<%= action.type %>'"
|
|
119
121
|
<% if (action.permission) { %>rxapHasEnablePermission="<%= action.permission %>"<% } %>
|
|
120
122
|
matTooltip
|
|
@@ -246,7 +248,7 @@
|
|
|
246
248
|
<ng-container i18n><%= column.title %></ng-container>
|
|
247
249
|
</mat-checkbox>
|
|
248
250
|
<% } else { %>
|
|
249
|
-
<mat-form-field class="w-
|
|
251
|
+
<mat-form-field class="w-full pt-3">
|
|
250
252
|
<mat-label i18n><%= column.title %></mat-label>
|
|
251
253
|
<input
|
|
252
254
|
matInput
|