@rxap/schematics-ts-morph 16.1.0-dev.1 → 16.1.0-dev.10
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 +72 -0
- package/README.md +1 -1
- package/package.json +10 -8
- package/src/index.d.ts +7 -2
- package/src/index.js +7 -2
- package/src/index.js.map +1 -1
- package/src/lib/angular/coerce-component.d.ts +6 -0
- package/src/lib/angular/coerce-component.js +57 -2
- package/src/lib/angular/coerce-component.js.map +1 -1
- package/src/lib/angular/coerce-dialog-table-action-component.js +2 -2
- package/src/lib/angular/coerce-dialog-table-action-component.js.map +1 -1
- package/src/lib/angular/coerce-form-definition-array.d.ts +14 -0
- package/src/lib/angular/coerce-form-definition-array.js +87 -0
- package/src/lib/angular/coerce-form-definition-array.js.map +1 -0
- package/src/lib/angular/coerce-form-definition-control.d.ts +9 -12
- package/src/lib/angular/coerce-form-definition-control.js +68 -125
- package/src/lib/angular/coerce-form-definition-control.js.map +1 -1
- package/src/lib/angular/coerce-form-definition-form-control.d.ts +11 -0
- package/src/lib/angular/coerce-form-definition-form-control.js +66 -0
- package/src/lib/angular/coerce-form-definition-form-control.js.map +1 -0
- package/src/lib/angular/coerce-form-definition-group.d.ts +14 -0
- package/src/lib/angular/coerce-form-definition-group.js +80 -0
- package/src/lib/angular/coerce-form-definition-group.js.map +1 -0
- package/src/lib/angular/coerce-form-definition-type.d.ts +2 -2
- package/src/lib/angular/coerce-form-definition-type.js +16 -2
- package/src/lib/angular/coerce-form-definition-type.js.map +1 -1
- package/src/lib/angular/coerce-form-definition.d.ts +4 -4
- package/src/lib/angular/coerce-form-definition.js +24 -13
- package/src/lib/angular/coerce-form-definition.js.map +1 -1
- package/src/lib/angular/coerce-options-data-source.d.ts +3 -1
- package/src/lib/angular/coerce-options-data-source.js +35 -6
- package/src/lib/angular/coerce-options-data-source.js.map +1 -1
- package/src/lib/angular/coerce-proxy-remote-method-class.d.ts +2 -2
- package/src/lib/angular/coerce-proxy-remote-method-class.js +15 -18
- package/src/lib/angular/coerce-proxy-remote-method-class.js.map +1 -1
- package/src/lib/angular/coerce-table-data-source.js +1 -1
- package/src/lib/angular/coerce-table-data-source.js.map +1 -1
- package/src/lib/angular/coerce-table-parameters-from-route.js +4 -4
- package/src/lib/angular/coerce-table-parameters-from-route.js.map +1 -1
- package/src/lib/angular/coerce-table-select-resolve-value-method.js +2 -2
- package/src/lib/angular/coerce-table-select-resolve-value-method.js.map +1 -1
- package/src/lib/angular/coerce-tree-table-children-proxy-remote-method-class.js +2 -2
- package/src/lib/angular/coerce-tree-table-children-proxy-remote-method-class.js.map +1 -1
- package/src/lib/angular/form-definition-utilities.d.ts +1 -0
- package/src/lib/angular/form-definition-utilities.js +7 -3
- package/src/lib/angular/form-definition-utilities.js.map +1 -1
- package/src/lib/nest/add-operation-to-controller.d.ts +1 -1
- package/src/lib/nest/add-operation-to-controller.js +59 -55
- package/src/lib/nest/add-operation-to-controller.js.map +1 -1
- package/src/lib/nest/build-nest-controller-name.js +10 -0
- package/src/lib/nest/build-nest-controller-name.js.map +1 -1
- package/src/lib/nest/coerce-dto-class.d.ts +3 -15
- package/src/lib/nest/coerce-dto-class.js +56 -63
- package/src/lib/nest/coerce-dto-class.js.map +1 -1
- package/src/lib/nest/coerce-form-submit-operation.d.ts +2 -4
- package/src/lib/nest/coerce-form-submit-operation.js +13 -15
- package/src/lib/nest/coerce-form-submit-operation.js.map +1 -1
- package/src/lib/nest/coerce-get-by-id-operation.d.ts +9 -7
- package/src/lib/nest/coerce-get-by-id-operation.js +85 -56
- package/src/lib/nest/coerce-get-by-id-operation.js.map +1 -1
- package/src/lib/nest/coerce-get-children-operation.js +8 -46
- package/src/lib/nest/coerce-get-children-operation.js.map +1 -1
- package/src/lib/nest/coerce-get-data-grid-operation.d.ts +5 -4
- package/src/lib/nest/coerce-get-data-grid-operation.js +7 -22
- package/src/lib/nest/coerce-get-data-grid-operation.js.map +1 -1
- package/src/lib/nest/coerce-get-operation.d.ts +5 -0
- package/src/lib/nest/coerce-get-operation.js +11 -0
- package/src/lib/nest/coerce-get-operation.js.map +1 -0
- package/src/lib/nest/coerce-get-page-operation.d.ts +17 -27
- package/src/lib/nest/coerce-get-page-operation.js +157 -145
- package/src/lib/nest/coerce-get-page-operation.js.map +1 -1
- package/src/lib/nest/coerce-get-root-operation.d.ts +2 -4
- package/src/lib/nest/coerce-get-root-operation.js +8 -28
- package/src/lib/nest/coerce-get-root-operation.js.map +1 -1
- package/src/lib/nest/coerce-operation.d.ts +32 -9
- package/src/lib/nest/coerce-operation.js +191 -29
- package/src/lib/nest/coerce-operation.js.map +1 -1
- package/src/lib/nest/coerce-options-operation.d.ts +2 -2
- package/src/lib/nest/coerce-options-operation.js +13 -42
- package/src/lib/nest/coerce-options-operation.js.map +1 -1
- package/src/lib/nest/coerce-page-dto-class.d.ts +3 -8
- package/src/lib/nest/coerce-page-dto-class.js +52 -22
- package/src/lib/nest/coerce-page-dto-class.js.map +1 -1
- package/src/lib/nest/coerce-row-dto-class.d.ts +1 -0
- package/src/lib/nest/coerce-row-dto-class.js +12 -10
- package/src/lib/nest/coerce-row-dto-class.js.map +1 -1
- package/src/lib/nest/coerce-submit-data-grid-operation.js +3 -7
- package/src/lib/nest/coerce-submit-data-grid-operation.js.map +1 -1
- package/src/lib/nest/coerce-table-select-operation.js +6 -6
- package/src/lib/nest/coerce-table-select-operation.js.map +1 -1
- package/src/lib/nest/coerce-table-select-value-resolve-operation.d.ts +7 -6
- package/src/lib/nest/coerce-table-select-value-resolve-operation.js +32 -33
- package/src/lib/nest/coerce-table-select-value-resolve-operation.js.map +1 -1
- package/src/lib/nest/coerce-tree-operation.js +35 -44
- package/src/lib/nest/coerce-tree-operation.js.map +1 -1
- package/src/lib/nest/dto-class-property.d.ts +18 -0
- package/src/lib/nest/dto-class-property.js +26 -0
- package/src/lib/nest/dto-class-property.js.map +1 -0
- package/src/lib/nest/table-query-list.d.ts +2 -0
- package/src/lib/nest/table-query-list.js +41 -0
- package/src/lib/nest/table-query-list.js.map +1 -0
- package/src/lib/ts-morph/coerce-imports.js +1 -1
- package/src/lib/ts-morph/coerce-imports.js.map +1 -1
- package/src/lib/types/abstract-control.d.ts +8 -0
- package/src/lib/types/{form-definition-control.js → abstract-control.js} +1 -1
- package/src/lib/types/abstract-control.js.map +1 -0
- package/src/lib/nest/create-dto-class.d.ts +0 -24
- package/src/lib/nest/create-dto-class.js +0 -169
- package/src/lib/nest/create-dto-class.js.map +0 -1
- package/src/lib/types/form-definition-control.d.ts +0 -10
- package/src/lib/types/form-definition-control.js.map +0 -1
|
@@ -1,37 +1,67 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CoercePageDtoClass = void 0;
|
|
3
|
+
exports.CoercePageDtoClass = exports.BuildPageDtoClassName = void 0;
|
|
4
4
|
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
5
|
+
const ts_morph_1 = require("@rxap/ts-morph");
|
|
6
|
+
const utilities_1 = require("@rxap/utilities");
|
|
5
7
|
const path_1 = require("path");
|
|
6
8
|
const coerce_dto_class_1 = require("./coerce-dto-class");
|
|
9
|
+
function BuildPageDtoClassName(name) {
|
|
10
|
+
return (0, schematics_utilities_1.CoerceSuffix)(name, '-page');
|
|
11
|
+
}
|
|
12
|
+
exports.BuildPageDtoClassName = BuildPageDtoClassName;
|
|
7
13
|
function CoercePageDtoClass(options) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
importStructureList.push({
|
|
11
|
-
namedImports: ['PageDto'],
|
|
12
|
-
moduleSpecifier: '@rxap/nest-dto',
|
|
13
|
-
}, {
|
|
14
|
-
namedImports: [rowClassName],
|
|
15
|
-
moduleSpecifier: `./${(0, path_1.basename)(rowFilePath)}`,
|
|
16
|
-
});
|
|
17
|
-
classStructure !== null && classStructure !== void 0 ? classStructure : (classStructure = {});
|
|
18
|
-
classStructure.extends = `PageDto<${rowClassName}>`;
|
|
19
|
-
propertyList !== null && propertyList !== void 0 ? propertyList : (propertyList = [
|
|
14
|
+
const { project, name, propertyList = [], rowClassName, rowFilePath, tsMorphTransform = utilities_1.noop, } = options;
|
|
15
|
+
(0, utilities_1.CoerceArrayItems)(propertyList, [
|
|
20
16
|
{
|
|
21
17
|
name: 'rows',
|
|
22
18
|
type: rowClassName,
|
|
23
19
|
isArray: true,
|
|
24
20
|
isType: true,
|
|
25
21
|
},
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
22
|
+
{
|
|
23
|
+
name: 'pageSize',
|
|
24
|
+
type: 'number',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: 'pageIndex',
|
|
28
|
+
type: 'number',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: 'total',
|
|
32
|
+
type: 'number',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: 'sortDirection',
|
|
36
|
+
type: 'string',
|
|
37
|
+
isOptional: true,
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: 'sortBy',
|
|
41
|
+
type: 'string',
|
|
42
|
+
isOptional: true,
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: 'filter',
|
|
46
|
+
type: 'FilterQueryDto',
|
|
47
|
+
isArray: true,
|
|
48
|
+
isType: true,
|
|
49
|
+
isOptional: true,
|
|
50
|
+
}
|
|
51
|
+
], (a, b) => a.name === b.name);
|
|
52
|
+
return (0, coerce_dto_class_1.CoerceDtoClass)(Object.assign(Object.assign({}, options), { project, name: BuildPageDtoClassName(name), propertyList, tsMorphTransform: (p, sourceFile, classDeclaration) => {
|
|
53
|
+
(0, ts_morph_1.CoerceImports)(sourceFile, [
|
|
54
|
+
{
|
|
55
|
+
namedImports: [rowClassName],
|
|
56
|
+
moduleSpecifier: `./${(0, path_1.basename)(rowFilePath)}`,
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
namedImports: ['FilterQueryDto'],
|
|
60
|
+
moduleSpecifier: '@rxap/nest-dto',
|
|
61
|
+
}
|
|
62
|
+
]);
|
|
63
|
+
tsMorphTransform(p, sourceFile, classDeclaration);
|
|
64
|
+
} }));
|
|
35
65
|
}
|
|
36
66
|
exports.CoercePageDtoClass = CoercePageDtoClass;
|
|
37
67
|
//# sourceMappingURL=coerce-page-dto-class.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coerce-page-dto-class.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/coerce-page-dto-class.ts"],"names":[],"mappings":";;;AAAA,qEAA0D;AAC1D,+BAAgC;
|
|
1
|
+
{"version":3,"file":"coerce-page-dto-class.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/coerce-page-dto-class.ts"],"names":[],"mappings":";;;AAAA,qEAA0D;AAC1D,6CAA+C;AAC/C,+CAGyB;AACzB,+BAAgC;AAChC,yDAG4B;AAO5B,SAAgB,qBAAqB,CAAC,IAAY;IAChD,OAAO,IAAA,mCAAY,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AACrC,CAAC;AAFD,sDAEC;AAED,SAAgB,kBAAkB,CAAC,OAAkC;IACnE,MAAM,EACJ,OAAO,EACP,IAAI,EACJ,YAAY,GAAE,EAAE,EAChB,YAAY,EACZ,WAAW,EACX,gBAAgB,GAAG,gBAAI,GACxB,GAAG,OAAO,CAAC;IACZ,IAAA,4BAAgB,EAAC,YAAY,EAAE;QAC7B;YACE,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,YAAY;YAClB,OAAO,EAAE,IAAI;YACb,MAAM,EAAE,IAAI;SACb;QACD;YACE,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,QAAQ;SACf;QACD;YACE,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,QAAQ;SACf;QACD;YACE,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,QAAQ;SACf;QACD;YACE,IAAI,EAAE,eAAe;YACrB,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,IAAI;SACjB;QACD;YACE,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,IAAI;SACjB;QACD;YACE,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,gBAAgB;YACtB,OAAO,EAAE,IAAI;YACb,MAAM,EAAE,IAAI;YACZ,UAAU,EAAE,IAAI;SACjB;KACF,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC;IAChC,OAAO,IAAA,iCAAc,kCAChB,OAAO,KACV,OAAO,EACP,IAAI,EAAE,qBAAqB,CAAC,IAAI,CAAC,EACjC,YAAY,EACZ,gBAAgB,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,gBAAgB,EAAE,EAAE;YACpD,IAAA,wBAAa,EAAC,UAAU,EAAE;gBACxB;oBACE,YAAY,EAAE,CAAE,YAAY,CAAE;oBAC9B,eAAe,EAAE,KAAM,IAAA,eAAQ,EAAC,WAAW,CAAE,EAAE;iBAChD;gBACD;oBACE,YAAY,EAAE,CAAE,gBAAgB,CAAE;oBAClC,eAAe,EAAE,gBAAgB;iBAClC;aACF,CAAC,CAAC;YACH,gBAAgB,CAAC,CAAC,EAAE,UAAU,EAAE,gBAAgB,CAAC,CAAC;QACpD,CAAC,IACD,CAAC;AACL,CAAC;AAjED,gDAiEC"}
|
|
@@ -6,4 +6,5 @@ export interface CoerceRowDtoClassOptions extends CoerceDtoClassOptions {
|
|
|
6
6
|
*/
|
|
7
7
|
rowIdType?: string | null;
|
|
8
8
|
}
|
|
9
|
+
export declare function BuildRowDtoClassName(name: string): string;
|
|
9
10
|
export declare function CoerceRowDtoClass(options: CoerceRowDtoClassOptions): import("./coerce-dto-class").CoerceDtoClassOutput;
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CoerceRowDtoClass = void 0;
|
|
3
|
+
exports.CoerceRowDtoClass = exports.BuildRowDtoClassName = void 0;
|
|
4
4
|
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
5
|
+
const utilities_1 = require("@rxap/utilities");
|
|
5
6
|
const coerce_dto_class_1 = require("./coerce-dto-class");
|
|
7
|
+
function BuildRowDtoClassName(name) {
|
|
8
|
+
return (0, schematics_utilities_1.CoerceSuffix)(name, '-row');
|
|
9
|
+
}
|
|
10
|
+
exports.BuildRowDtoClassName = BuildRowDtoClassName;
|
|
6
11
|
function CoerceRowDtoClass(options) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
});
|
|
12
|
+
const { rowIdType, project, name, propertyList = [], } = options;
|
|
13
|
+
(0, utilities_1.CoerceArrayItems)(propertyList, [{
|
|
14
|
+
name: '__rowId',
|
|
15
|
+
type: rowIdType === null ? 'number' : rowIdType !== null && rowIdType !== void 0 ? rowIdType : 'string',
|
|
16
|
+
}], (a, b) => a.name === b.name);
|
|
13
17
|
return (0, coerce_dto_class_1.CoerceDtoClass)({
|
|
14
18
|
project,
|
|
15
|
-
name: (
|
|
19
|
+
name: BuildRowDtoClassName(name),
|
|
16
20
|
propertyList,
|
|
17
|
-
classStructure,
|
|
18
|
-
importStructureList,
|
|
19
21
|
});
|
|
20
22
|
}
|
|
21
23
|
exports.CoerceRowDtoClass = CoerceRowDtoClass;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coerce-row-dto-class.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/coerce-row-dto-class.ts"],"names":[],"mappings":";;;AAAA,qEAA0D;AAC1D,yDAG4B;AAU5B,SAAgB,iBAAiB,CAAC,OAAiC;IACjE,
|
|
1
|
+
{"version":3,"file":"coerce-row-dto-class.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/coerce-row-dto-class.ts"],"names":[],"mappings":";;;AAAA,qEAA0D;AAC1D,+CAAmD;AACnD,yDAG4B;AAU5B,SAAgB,oBAAoB,CAAC,IAAY;IAC/C,OAAO,IAAA,mCAAY,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AACpC,CAAC;AAFD,oDAEC;AAED,SAAgB,iBAAiB,CAAC,OAAiC;IACjE,MAAM,EACJ,SAAS,EACT,OAAO,EACP,IAAI,EACJ,YAAY,GAAG,EAAE,GAClB,GAAG,OAAO,CAAC;IACZ,IAAA,4BAAgB,EAAC,YAAY,EAAE,CAAC;YAC9B,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,QAAQ;SAC5D,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC;IACjC,OAAO,IAAA,iCAAc,EAAC;QACpB,OAAO;QACP,IAAI,EAAE,oBAAoB,CAAC,IAAI,CAAC;QAChC,YAAY;KACb,CAAC,CAAC;AACL,CAAC;AAhBD,8CAgBC"}
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CoerceSubmitDataGridOperation = void 0;
|
|
4
|
-
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
5
4
|
const coerce_form_submit_operation_1 = require("./coerce-form-submit-operation");
|
|
6
5
|
function CoerceSubmitDataGridOperation(options) {
|
|
7
|
-
|
|
8
|
-
collection
|
|
9
|
-
|
|
10
|
-
controllerName = (0, schematics_utilities_1.CoerceSuffix)(controllerName, '-data-grid');
|
|
11
|
-
return (0, coerce_form_submit_operation_1.CoerceFormSubmitOperation)(Object.assign(Object.assign({}, options), { controllerName,
|
|
12
|
-
paramList }));
|
|
6
|
+
const { collection = false, } = options;
|
|
7
|
+
console.log(`collection: ${collection}`);
|
|
8
|
+
return (0, coerce_form_submit_operation_1.CoerceFormSubmitOperation)(Object.assign({}, options));
|
|
13
9
|
}
|
|
14
10
|
exports.CoerceSubmitDataGridOperation = CoerceSubmitDataGridOperation;
|
|
15
11
|
//# sourceMappingURL=coerce-submit-data-grid-operation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coerce-submit-data-grid-operation.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/coerce-submit-data-grid-operation.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"coerce-submit-data-grid-operation.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/coerce-submit-data-grid-operation.ts"],"names":[],"mappings":";;;AACA,iFAGwC;AAMxC,SAAgB,6BAA6B,CAAC,OAAuD;IACnG,MAAM,EACJ,UAAU,GAAG,KAAK,GACnB,GAAG,OAAO,CAAC;IAEZ,OAAO,CAAC,GAAG,CAAC,eAAgB,UAAW,EAAE,CAAC,CAAC;IAE3C,OAAO,IAAA,wDAAyB,oBAC3B,OAAO,EACV,CAAC;AACL,CAAC;AAVD,sEAUC"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CoerceTableSelectOperationRule = void 0;
|
|
4
|
+
const ts_morph_1 = require("@rxap/ts-morph");
|
|
4
5
|
const coerce_get_page_operation_1 = require("./coerce-get-page-operation");
|
|
5
6
|
function CoerceTableSelectOperationRule(options) {
|
|
6
|
-
|
|
7
|
-
rowIdProperty !== null && rowIdProperty !== void 0 ? rowIdProperty : (rowIdProperty = 'uuid');
|
|
8
|
-
rowDisplayProperty !== null && rowDisplayProperty !== void 0 ? rowDisplayProperty : (rowDisplayProperty = 'name');
|
|
9
|
-
rowValueProperty !== null && rowValueProperty !== void 0 ? rowValueProperty : (rowValueProperty = rowIdProperty);
|
|
7
|
+
const { propertyList = [], rowIdProperty = 'uuid', rowDisplayProperty = 'name', rowValueProperty = rowIdProperty !== null && rowIdProperty !== void 0 ? rowIdProperty : 'uuid', } = options;
|
|
10
8
|
propertyList.unshift({
|
|
11
9
|
name: '__display',
|
|
12
|
-
type:
|
|
10
|
+
type: (0, ts_morph_1.NormalizeTypeImport)('string'),
|
|
11
|
+
isArray: false,
|
|
13
12
|
source: rowDisplayProperty,
|
|
14
13
|
});
|
|
15
14
|
propertyList.unshift({
|
|
16
15
|
name: '__value',
|
|
17
|
-
type:
|
|
16
|
+
type: (0, ts_morph_1.NormalizeTypeImport)('string'),
|
|
17
|
+
isArray: false,
|
|
18
18
|
source: rowValueProperty,
|
|
19
19
|
});
|
|
20
20
|
return (0, coerce_get_page_operation_1.CoerceGetPageOperation)(Object.assign(Object.assign({}, options), { propertyList: propertyList, rowIdProperty }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coerce-table-select-operation.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/coerce-table-select-operation.ts"],"names":[],"mappings":";;;AAAA,2EAGqC;AAOrC,SAAgB,8BAA8B,CAAC,OAA0C;IACvF,
|
|
1
|
+
{"version":3,"file":"coerce-table-select-operation.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/coerce-table-select-operation.ts"],"names":[],"mappings":";;;AAAA,6CAAqD;AACrD,2EAGqC;AAOrC,SAAgB,8BAA8B,CAAC,OAA0C;IACvF,MAAM,EACJ,YAAY,GAAG,EAAE,EACjB,aAAa,GAAE,MAAM,EACrB,kBAAkB,GAAG,MAAM,EAC3B,gBAAgB,GAAG,aAAa,aAAb,aAAa,cAAb,aAAa,GAAI,MAAM,GAC3C,GAAG,OAAO,CAAC;IAEZ,YAAY,CAAC,OAAO,CAAC;QACnB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,IAAA,8BAAmB,EAAC,QAAQ,CAAC;QACnC,OAAO,EAAE,KAAK;QACd,MAAM,EAAE,kBAAkB;KAC3B,CAAC,CAAC;IACH,YAAY,CAAC,OAAO,CAAC;QACnB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,IAAA,8BAAmB,EAAC,QAAQ,CAAC;QACnC,OAAO,EAAE,KAAK;QACd,MAAM,EAAE,gBAAgB;KACzB,CAAC,CAAC;IAEH,OAAO,IAAA,kDAAsB,kCACxB,OAAO,KACV,YAAY,EAAE,YAAY,EAC1B,aAAa,IACb,CAAC;AAEL,CAAC;AA3BD,wEA2BC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { ClassDeclaration, SourceFile, WriterFunction } from 'ts-morph';
|
|
2
|
+
import { CoerceDtoClassOutput } from './coerce-dto-class';
|
|
3
|
+
import { CoerceOperationOptions, TransformOperation } from './coerce-operation';
|
|
4
|
+
export interface CoerceTableSelectValueResolveOperationOptions extends CoerceOperationOptions {
|
|
5
|
+
rowDisplayProperty?: string;
|
|
6
|
+
rowValueProperty?: string;
|
|
7
7
|
}
|
|
8
|
+
export declare function BuildTableSelectValueResolveUpstreamGetParametersImplementation(classDeclaration: ClassDeclaration, moduleSourceFile: SourceFile, dto: CoerceDtoClassOutput | null, options: Readonly<CoerceTableSelectValueResolveOperationOptions>): TransformOperation<string | WriterFunction>;
|
|
8
9
|
export declare function CoerceTableSelectValueResolveOperationRule(options: CoerceTableSelectValueResolveOperationOptions): import("@angular-devkit/schematics").Rule;
|
|
@@ -1,40 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CoerceTableSelectValueResolveOperationRule = void 0;
|
|
4
|
-
const
|
|
3
|
+
exports.CoerceTableSelectValueResolveOperationRule = exports.BuildTableSelectValueResolveUpstreamGetParametersImplementation = void 0;
|
|
4
|
+
const ts_morph_1 = require("@rxap/ts-morph");
|
|
5
5
|
const coerce_operation_1 = require("./coerce-operation");
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
function BuildTableSelectValueResolveUpstreamGetParametersImplementation(classDeclaration, moduleSourceFile, dto, options) {
|
|
7
|
+
return () => {
|
|
8
|
+
var _a;
|
|
9
|
+
const { upstream } = options;
|
|
10
|
+
if (upstream) {
|
|
11
|
+
if ((0, ts_morph_1.IsNormalizedOpenApiUpstreamOptions)(upstream)) {
|
|
12
|
+
if ((_a = upstream.mapper) === null || _a === void 0 ? void 0 : _a.value) {
|
|
13
|
+
return `{ parameters: { ${upstream.mapper.value}: value } }`;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return '{ value }';
|
|
17
|
+
}
|
|
18
|
+
return '';
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
exports.BuildTableSelectValueResolveUpstreamGetParametersImplementation = BuildTableSelectValueResolveUpstreamGetParametersImplementation;
|
|
8
22
|
function CoerceTableSelectValueResolveOperationRule(options) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
moduleSpecifier: rowFilePath,
|
|
24
|
-
namedImports: [rowClassName],
|
|
25
|
-
});
|
|
26
|
-
return {
|
|
27
|
-
returnType: rowClassName,
|
|
28
|
-
statements: [
|
|
29
|
-
'const item = {} as any',
|
|
30
|
-
'return plainToInstance(',
|
|
31
|
-
rowClassName + ',',
|
|
32
|
-
`this.to${rowClassName}(item),`,
|
|
33
|
-
'classTransformOptions',
|
|
34
|
-
')',
|
|
35
|
-
],
|
|
36
|
-
};
|
|
37
|
-
} }));
|
|
23
|
+
const { buildUpstreamGetParametersImplementation = BuildTableSelectValueResolveUpstreamGetParametersImplementation, propertyList = [], rowDisplayProperty = 'name', rowValueProperty = 'uuid', } = options;
|
|
24
|
+
propertyList.unshift({
|
|
25
|
+
name: '__display',
|
|
26
|
+
type: (0, ts_morph_1.NormalizeTypeImport)('string'),
|
|
27
|
+
isArray: false,
|
|
28
|
+
source: rowDisplayProperty,
|
|
29
|
+
});
|
|
30
|
+
propertyList.unshift({
|
|
31
|
+
name: '__value',
|
|
32
|
+
type: (0, ts_morph_1.NormalizeTypeImport)('string'),
|
|
33
|
+
isArray: false,
|
|
34
|
+
source: rowValueProperty,
|
|
35
|
+
});
|
|
36
|
+
return (0, coerce_operation_1.CoerceOperation)(Object.assign(Object.assign({}, options), { buildUpstreamGetParametersImplementation }));
|
|
38
37
|
}
|
|
39
38
|
exports.CoerceTableSelectValueResolveOperationRule = CoerceTableSelectValueResolveOperationRule;
|
|
40
39
|
//# sourceMappingURL=coerce-table-select-value-resolve-operation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coerce-table-select-value-resolve-operation.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/coerce-table-select-value-resolve-operation.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"coerce-table-select-value-resolve-operation.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/coerce-table-select-value-resolve-operation.ts"],"names":[],"mappings":";;;AAAA,6CAGwB;AAOxB,yDAI4B;AAQ5B,SAAgB,+DAA+D,CAClB,gBAAkC,EAClC,gBAA4B,EAC5B,GAAgC,EAChC,OAAgE;IAE3H,OAAO,GAAG,EAAE;;QACV,MAAM,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC;QAC7B,IAAI,QAAQ,EAAE;YACZ,IAAI,IAAA,6CAAkC,EAAC,QAAQ,CAAC,EAAE;gBAChD,IAAI,MAAA,QAAQ,CAAC,MAAM,0CAAE,KAAK,EAAE;oBAC1B,OAAO,mBAAoB,QAAQ,CAAC,MAAM,CAAC,KAAM,aAAa,CAAC;iBAChE;aACF;YACD,OAAO,WAAW,CAAC;SACpB;QACD,OAAO,EAAE,CAAC;IACZ,CAAC,CAAC;AACJ,CAAC;AAlBD,0IAkBC;AAED,SAAgB,0CAA0C,CAAC,OAAsD;IAC/G,MAAM,EACJ,wCAAwC,GAAG,+DAA+D,EAC1G,YAAY,GAAG,EAAE,EACjB,kBAAkB,GAAG,MAAM,EAC3B,gBAAgB,GAAG,MAAM,GAC1B,GAAG,OAAO,CAAC;IAEZ,YAAY,CAAC,OAAO,CAAC;QACnB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,IAAA,8BAAmB,EAAC,QAAQ,CAAC;QACnC,OAAO,EAAE,KAAK;QACd,MAAM,EAAE,kBAAkB;KAC3B,CAAC,CAAC;IACH,YAAY,CAAC,OAAO,CAAC;QACnB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,IAAA,8BAAmB,EAAC,QAAQ,CAAC;QACnC,OAAO,EAAE,KAAK;QACd,MAAM,EAAE,gBAAgB;KACzB,CAAC,CAAC;IAEH,OAAO,IAAA,kCAAe,kCACjB,OAAO,KACV,wCAAwC,IACxC,CAAC;AACL,CAAC;AAzBD,gGAyBC"}
|
|
@@ -1,56 +1,47 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CoerceTreeOperationRule = void 0;
|
|
4
|
-
const
|
|
5
|
-
const coerce_dto_class_1 = require("./coerce-dto-class");
|
|
4
|
+
const utilities_1 = require("@rxap/utilities");
|
|
6
5
|
const coerce_operation_1 = require("./coerce-operation");
|
|
7
6
|
function CoerceTreeOperationRule(options) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
const { operationName = 'tree', fullTree = false, path = 'true', propertyList = [], dtoClassNameSuffix = '-tree-node', isArray = true, } = options;
|
|
8
|
+
(0, utilities_1.CoerceArrayItems)(propertyList, [
|
|
9
|
+
{
|
|
10
|
+
name: 'id',
|
|
11
|
+
type: 'string',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
name: 'name',
|
|
15
|
+
type: 'string',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: 'type',
|
|
19
|
+
type: 'string',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: 'icon',
|
|
23
|
+
type: {
|
|
24
|
+
name: 'IconDto',
|
|
25
|
+
moduleSpecifier: '@rxap/nest-dto'
|
|
26
|
+
},
|
|
27
|
+
isType: true,
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: 'children',
|
|
31
|
+
isOptional: true,
|
|
32
|
+
isArray: true,
|
|
33
|
+
isType: true,
|
|
34
|
+
type: '<self>',
|
|
35
|
+
},
|
|
36
|
+
], (a, b) => a.name === b.name);
|
|
13
37
|
if (!fullTree) {
|
|
14
38
|
throw new Error('non full tree not implemented yet');
|
|
15
39
|
}
|
|
16
40
|
return (0, coerce_operation_1.CoerceOperation)(Object.assign(Object.assign({}, options), { path,
|
|
17
|
-
operationName,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
propertyList: [
|
|
22
|
-
{
|
|
23
|
-
name: 'id',
|
|
24
|
-
type: 'string',
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
name: 'name',
|
|
28
|
-
type: 'string',
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
name: 'type',
|
|
32
|
-
type: 'string',
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
name: 'icon',
|
|
36
|
-
type: 'IconConfigDto',
|
|
37
|
-
isType: true,
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
name: 'children',
|
|
41
|
-
isOptional: true,
|
|
42
|
-
isArray: true,
|
|
43
|
-
isType: true,
|
|
44
|
-
type: '<self>',
|
|
45
|
-
},
|
|
46
|
-
]
|
|
47
|
-
});
|
|
48
|
-
(0, coerce_imports_1.CoerceImports)(sourceFile, {
|
|
49
|
-
namedImports: [className],
|
|
50
|
-
moduleSpecifier: filePath,
|
|
51
|
-
});
|
|
52
|
-
return Object.assign({ returnType: className + '[]' }, tsMorphTransform(project, sourceFile, classDeclaration, controllerName));
|
|
53
|
-
} }));
|
|
41
|
+
operationName,
|
|
42
|
+
dtoClassNameSuffix,
|
|
43
|
+
propertyList,
|
|
44
|
+
isArray }));
|
|
54
45
|
}
|
|
55
46
|
exports.CoerceTreeOperationRule = CoerceTreeOperationRule;
|
|
56
47
|
//# sourceMappingURL=coerce-tree-operation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coerce-tree-operation.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/coerce-tree-operation.ts"],"names":[],"mappings":";;;AAAA,+
|
|
1
|
+
{"version":3,"file":"coerce-tree-operation.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/coerce-tree-operation.ts"],"names":[],"mappings":";;;AAAA,+CAAmD;AACnD,yDAG4B;AAO5B,SAAgB,uBAAuB,CAAC,OAAmC;IACzE,MAAM,EACJ,aAAa,GAAG,MAAM,EACtB,QAAQ,GAAE,KAAK,EACf,IAAI,GAAE,MAAM,EACZ,YAAY,GAAG,EAAE,EACjB,kBAAkB,GAAG,YAAY,EACjC,OAAO,GAAG,IAAI,GACf,GAAG,OAAO,CAAC;IAEZ,IAAA,4BAAgB,EAAC,YAAY,EAAE;QAC7B;YACE,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,QAAQ;SACf;QACD;YACE,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,QAAQ;SACf;QACD;YACE,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,QAAQ;SACf;QACD;YACE,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE;gBACJ,IAAI,EAAE,SAAS;gBACf,eAAe,EAAE,gBAAgB;aAClC;YACD,MAAM,EAAE,IAAI;SACb;QACD;YACE,IAAI,EAAE,UAAU;YAChB,UAAU,EAAE,IAAI;YAChB,OAAO,EAAE,IAAI;YACb,MAAM,EAAE,IAAI;YACZ,IAAI,EAAE,QAAQ;SACf;KACF,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC;IAEhC,IAAI,CAAC,QAAQ,EAAE;QACb,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;KACtD;IAED,OAAO,IAAA,kCAAe,kCACjB,OAAO,KACV,IAAI;QACJ,aAAa;QACb,kBAAkB;QAClB,YAAY;QACZ,OAAO,IACP,CAAC;AACL,CAAC;AApDD,0DAoDC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DataProperty, NormalizedTypeImport, TypeImport } from '@rxap/ts-morph';
|
|
2
|
+
import { Normalized } from '@rxap/utilities';
|
|
3
|
+
export interface DtoClassProperty extends DataProperty {
|
|
4
|
+
/**
|
|
5
|
+
* The type of the property
|
|
6
|
+
*
|
|
7
|
+
* if type = '<self>' the type will be the name of the class
|
|
8
|
+
*/
|
|
9
|
+
type: string | TypeImport | '<self>';
|
|
10
|
+
/**
|
|
11
|
+
* indicates that the @Type decorator should be used as the type of the property is another dto class
|
|
12
|
+
*/
|
|
13
|
+
isType?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface NormalizedDtoClassProperty extends Normalized<Omit<DtoClassProperty, 'type'>> {
|
|
16
|
+
type: NormalizedTypeImport;
|
|
17
|
+
}
|
|
18
|
+
export declare function NormalizeDataClassProperty(property: DtoClassProperty): NormalizedDtoClassProperty;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NormalizeDataClassProperty = void 0;
|
|
4
|
+
const ts_morph_1 = require("@rxap/ts-morph");
|
|
5
|
+
function NormalizeDataClassProperty(property) {
|
|
6
|
+
var _a, _b, _c;
|
|
7
|
+
const { name, type, isArray } = (0, ts_morph_1.NormalizeDataProperty)(property);
|
|
8
|
+
let isType = (_b = (_a = property.isType) !== null && _a !== void 0 ? _a : type.name === '<self>') !== null && _b !== void 0 ? _b : false;
|
|
9
|
+
const isOptional = (_c = property.isOptional) !== null && _c !== void 0 ? _c : false;
|
|
10
|
+
switch (type.name) {
|
|
11
|
+
case 'IconConfig':
|
|
12
|
+
type.name = 'IconDto';
|
|
13
|
+
type.moduleSpecifier = '@rxap/nest-dto';
|
|
14
|
+
isType = true;
|
|
15
|
+
break;
|
|
16
|
+
}
|
|
17
|
+
return {
|
|
18
|
+
name,
|
|
19
|
+
type,
|
|
20
|
+
isArray,
|
|
21
|
+
isType,
|
|
22
|
+
isOptional,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
exports.NormalizeDataClassProperty = NormalizeDataClassProperty;
|
|
26
|
+
//# sourceMappingURL=dto-class-property.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dto-class-property.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/dto-class-property.ts"],"names":[],"mappings":";;;AAAA,6CAKwB;AAoBxB,SAAgB,0BAA0B,CAAC,QAA0B;;IACnE,MAAM,EAAE,IAAI,EAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAA,gCAAqB,EAAC,QAAQ,CAAC,CAAC;IACjE,IAAI,MAAM,GAAG,MAAA,MAAA,QAAQ,CAAC,MAAM,mCAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,mCAAI,KAAK,CAAC;IAChE,MAAM,UAAU,GAAG,MAAA,QAAQ,CAAC,UAAU,mCAAI,KAAK,CAAC;IAChD,QAAQ,IAAI,CAAC,IAAI,EAAE;QACjB,KAAK,YAAY;YACf,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC;YACtB,IAAI,CAAC,eAAe,GAAG,gBAAgB,CAAC;YACxC,MAAM,GAAG,IAAI,CAAC;YACd,MAAM;KACT;IACD,OAAO;QACL,IAAI;QACJ,IAAI;QACJ,OAAO;QACP,MAAM;QACN,UAAU;KACX,CAAC;AACJ,CAAC;AAlBD,gEAkBC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TABLE_QUERY_LIST = void 0;
|
|
4
|
+
exports.TABLE_QUERY_LIST = [
|
|
5
|
+
{
|
|
6
|
+
name: 'pageIndex',
|
|
7
|
+
type: 'number',
|
|
8
|
+
defaultValue: '0',
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
name: 'pageSize',
|
|
12
|
+
type: 'number',
|
|
13
|
+
defaultValue: '5',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
name: 'sortDirection',
|
|
17
|
+
type: 'string',
|
|
18
|
+
defaultValue: w => w.quote('desc'),
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: 'sortBy',
|
|
22
|
+
type: 'string',
|
|
23
|
+
defaultValue: w => w.quote('__updatedAt'),
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: 'filter',
|
|
27
|
+
type: {
|
|
28
|
+
name: 'FilterQuery',
|
|
29
|
+
moduleSpecifier: '@rxap/nest-utilities',
|
|
30
|
+
},
|
|
31
|
+
isArray: true,
|
|
32
|
+
pipeList: [{
|
|
33
|
+
name: 'new FilterQueryPipe()',
|
|
34
|
+
namedImport: 'FilterQueryPipe',
|
|
35
|
+
moduleSpecifier: '@rxap/nest-utilities',
|
|
36
|
+
}],
|
|
37
|
+
// the FilterQueryPipe will set the default value to an empty array
|
|
38
|
+
hasQuestionToken: false,
|
|
39
|
+
},
|
|
40
|
+
];
|
|
41
|
+
//# sourceMappingURL=table-query-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-query-list.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/table-query-list.ts"],"names":[],"mappings":";;;AAEa,QAAA,gBAAgB,GAAyB;IACpD;QACE,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,QAAQ;QACd,YAAY,EAAE,GAAG;KAClB;IACD;QACE,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,QAAQ;QACd,YAAY,EAAE,GAAG;KAClB;IACD;QACE,IAAI,EAAE,eAAe;QACrB,IAAI,EAAE,QAAQ;QACd,YAAY,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC;KACnC;IACD;QACE,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,QAAQ;QACd,YAAY,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC;KAC1C;IACD;QACE,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE;YACJ,IAAI,EAAE,aAAa;YACnB,eAAe,EAAE,sBAAsB;SACxC;QACD,OAAO,EAAE,IAAI;QACb,QAAQ,EAAE,CAAE;gBACV,IAAI,EAAE,uBAAuB;gBAC7B,WAAW,EAAE,iBAAiB;gBAC9B,eAAe,EAAE,sBAAsB;aACxC,CAAE;QACH,mEAAmE;QACnE,gBAAgB,EAAE,KAAK;KACxB;CACF,CAAC"}
|
|
@@ -6,7 +6,7 @@ exports.CoerceImports = void 0;
|
|
|
6
6
|
*/
|
|
7
7
|
function CoerceImports(sourceFile, structures) {
|
|
8
8
|
for (const structure of Array.isArray(structures) ? structures : [structures]) {
|
|
9
|
-
const moduleSpecifier = structure.moduleSpecifier;
|
|
9
|
+
const moduleSpecifier = structure.moduleSpecifier.endsWith('.ts') ? structure.moduleSpecifier.replace(/\.ts$/, '') : structure.moduleSpecifier;
|
|
10
10
|
const namedImports = structure.namedImports;
|
|
11
11
|
if (!moduleSpecifier ||
|
|
12
12
|
!(Array.isArray(namedImports) && namedImports.every((named) => typeof named === 'string')) ||
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coerce-imports.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/ts-morph/coerce-imports.ts"],"names":[],"mappings":";;;AAMA;;GAEG;AACH,SAAgB,aAAa,CAC3B,UAAsB,EACtB,UAA8G;IAG9G,KAAK,MAAM,SAAS,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAE,UAAU,CAAE,EAAE;QAE/E,MAAM,eAAe,GAAG,SAAS,CAAC,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"coerce-imports.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/ts-morph/coerce-imports.ts"],"names":[],"mappings":";;;AAMA;;GAEG;AACH,SAAgB,aAAa,CAC3B,UAAsB,EACtB,UAA8G;IAG9G,KAAK,MAAM,SAAS,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAE,UAAU,CAAE,EAAE;QAE/E,MAAM,eAAe,GAAG,SAAS,CAAC,eAAe,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC;QAC/I,MAAM,YAAY,GAAG,SAAS,CAAC,YAAY,CAAC;QAE5C,IAAI,CAAC,eAAe;YAClB,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,YAAY,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC;YAC1F,CAAC,UAAU,CAAC,oBAAoB,CAAC,eAAe,CAAC,EAAE;YACnD,UAAU,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC;SAC5C;aAAM;YACL,MAAM,iBAAiB,GAAG,UAAU,CAAC,oBAAoB,CAAC,eAAe,CAAE,CAAC;YAC5E,MAAM,eAAe,GAAG,iBAAiB,CAAC,eAAe,EAAE,CAAC;YAC5D,KAAK,MAAM,KAAK,IAAI,YAAY,EAAE;gBAChC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,EAAE,KAAK,KAAK,CAAC,EAAE;oBACrE,iBAAiB,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;iBACzC;aACF;SACF;KAEF;AAEH,CAAC;AA1BD,sCA0BC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DataProperty } from '@rxap/ts-morph';
|
|
2
|
+
import { WriterFunction } from 'ts-morph';
|
|
3
|
+
export interface AbstractControl extends DataProperty {
|
|
4
|
+
state?: string | WriterFunction | null;
|
|
5
|
+
isRequired?: boolean;
|
|
6
|
+
validatorList?: string[];
|
|
7
|
+
role?: 'control' | 'group' | 'array';
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abstract-control.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/types/abstract-control.ts"],"names":[],"mappings":""}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { TypeImport } from '@rxap/ts-morph';
|
|
2
|
-
import { ClassDeclaration, ClassDeclarationStructure, ImportDeclarationStructure, OptionalKind, SourceFile, WriterFunction } from 'ts-morph';
|
|
3
|
-
export interface DtoClassProperty {
|
|
4
|
-
name: string;
|
|
5
|
-
/**
|
|
6
|
-
* The type of the property
|
|
7
|
-
*
|
|
8
|
-
* if type = '<self>' the type will be the name of the class
|
|
9
|
-
*/
|
|
10
|
-
type: string | WriterFunction | TypeImport | '<self>';
|
|
11
|
-
isArray?: boolean | null;
|
|
12
|
-
/**
|
|
13
|
-
* indicates that the @Type decorator should be used as the type of the property is another dto class
|
|
14
|
-
*/
|
|
15
|
-
isType?: boolean | null;
|
|
16
|
-
isOptional?: boolean | null;
|
|
17
|
-
/**
|
|
18
|
-
* Use to import the type
|
|
19
|
-
* @deprecated use the type property with a TypeImport object
|
|
20
|
-
*/
|
|
21
|
-
moduleSpecifier?: string | null;
|
|
22
|
-
}
|
|
23
|
-
export declare function CreateDtoClass(sourceFile: SourceFile, className: string, propertyList: DtoClassProperty[], classStructure?: Omit<OptionalKind<ClassDeclarationStructure>, 'name'>, structures?: Array<OptionalKind<ImportDeclarationStructure>>): ClassDeclaration;
|
|
24
|
-
export declare function CreatePageDtoClass(sourceFile: SourceFile, className: string, rowType: string | WriterFunction, classStructure?: Omit<OptionalKind<ClassDeclarationStructure>, 'name'>, structures?: Array<OptionalKind<ImportDeclarationStructure>>): ClassDeclaration;
|