@rxap/schematics-ts-morph 16.1.0-dev.17 → 16.1.0-dev.19
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/index.d.ts +2 -0
- package/src/index.js +2 -0
- package/src/index.js.map +1 -1
- package/src/lib/nest/coerce-autocomplete-options-operation.d.ts +11 -0
- package/src/lib/nest/coerce-autocomplete-options-operation.js +26 -0
- package/src/lib/nest/coerce-autocomplete-options-operation.js.map +1 -0
- package/src/lib/nest/coerce-autocomplete-table-select-value-resolve-operation.d.ts +7 -0
- package/src/lib/nest/coerce-autocomplete-table-select-value-resolve-operation.js +16 -0
- package/src/lib/nest/coerce-autocomplete-table-select-value-resolve-operation.js.map +1 -0
- package/src/lib/nest/coerce-get-root-operation.d.ts +4 -0
- package/src/lib/nest/coerce-get-root-operation.js +12 -3
- package/src/lib/nest/coerce-get-root-operation.js.map +1 -1
- package/src/lib/nest/coerce-options-operation.d.ts +4 -1
- package/src/lib/nest/coerce-options-operation.js +12 -3
- package/src/lib/nest/coerce-options-operation.js.map +1 -1
- package/src/lib/nest/coerce-table-select-value-resolve-operation.d.ts +1 -1
- package/src/lib/nest/coerce-table-select-value-resolve-operation.js.map +1 -1
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.19](https://gitlab.com/rxap/packages/compare/@rxap/schematics-ts-morph@16.1.0-dev.18...@rxap/schematics-ts-morph@16.1.0-dev.19) (2024-03-07)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- support autocomplete controls ([8d0f488](https://gitlab.com/rxap/packages/commit/8d0f4886d99437a0977a1f7aa88ae368e5ff2c75))
|
|
11
|
+
|
|
12
|
+
# [16.1.0-dev.18](https://gitlab.com/rxap/packages/compare/@rxap/schematics-ts-morph@16.1.0-dev.17...@rxap/schematics-ts-morph@16.1.0-dev.18) (2024-03-07)
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
- add default get tree operation mapper ([f4f8e08](https://gitlab.com/rxap/packages/commit/f4f8e08bca2a78cab843a21578826502490fc40c))
|
|
17
|
+
- add default options operation mapper ([d519836](https://gitlab.com/rxap/packages/commit/d5198369f0c5d5d883d233b907b9ebde37638069))
|
|
18
|
+
|
|
6
19
|
# [16.1.0-dev.17](https://gitlab.com/rxap/packages/compare/@rxap/schematics-ts-morph@16.1.0-dev.16...@rxap/schematics-ts-morph@16.1.0-dev.17) (2024-03-07)
|
|
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.19",
|
|
3
3
|
"name": "@rxap/schematics-ts-morph",
|
|
4
4
|
"license": "GPL-3.0-or-later",
|
|
5
5
|
"dependencies": {
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"directory": "packages/schematic/ts-morph"
|
|
72
72
|
},
|
|
73
73
|
"type": "commonjs",
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "3539c0a753cc776b17ad8d6207deb36b579ec9fd",
|
|
75
75
|
"main": "./src/index.js",
|
|
76
76
|
"types": "./src/index.d.ts"
|
|
77
77
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -21,6 +21,8 @@ export * from './lib/nest/add-operation-to-controller';
|
|
|
21
21
|
export * from './lib/nest/assert-nest-project';
|
|
22
22
|
export * from './lib/nest/build-nest-base-path';
|
|
23
23
|
export * from './lib/nest/build-nest-controller-name';
|
|
24
|
+
export * from './lib/nest/coerce-autocomplete-options-operation';
|
|
25
|
+
export * from './lib/nest/coerce-autocomplete-table-select-value-resolve-operation';
|
|
24
26
|
export * from './lib/nest/coerce-dto-class';
|
|
25
27
|
export * from './lib/nest/coerce-form-submit-operation';
|
|
26
28
|
export * from './lib/nest/coerce-get-by-id-operation';
|
package/src/index.js
CHANGED
|
@@ -29,6 +29,8 @@ tslib_1.__exportStar(require("./lib/nest/add-operation-to-controller"), exports)
|
|
|
29
29
|
tslib_1.__exportStar(require("./lib/nest/assert-nest-project"), exports);
|
|
30
30
|
tslib_1.__exportStar(require("./lib/nest/build-nest-base-path"), exports);
|
|
31
31
|
tslib_1.__exportStar(require("./lib/nest/build-nest-controller-name"), exports);
|
|
32
|
+
tslib_1.__exportStar(require("./lib/nest/coerce-autocomplete-options-operation"), exports);
|
|
33
|
+
tslib_1.__exportStar(require("./lib/nest/coerce-autocomplete-table-select-value-resolve-operation"), exports);
|
|
32
34
|
tslib_1.__exportStar(require("./lib/nest/coerce-dto-class"), exports);
|
|
33
35
|
tslib_1.__exportStar(require("./lib/nest/coerce-form-submit-operation"), exports);
|
|
34
36
|
tslib_1.__exportStar(require("./lib/nest/coerce-get-by-id-operation"), exports);
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/schematic/ts-morph/src/index.ts"],"names":[],"mappings":";;;AAAA,eAAe;AACf,uEAA6C;AAC7C,YAAY;AAEZ,kBAAkB;AAClB,gFAAsD;AACtD,qFAA2D;AAC3D,+EAAqD;AACrD,0EAAgD;AAChD,yEAA+C;AAC/C,wEAA8C;AAC9C,0EAAgD;AAChD,sFAA4D;AAC5D,2EAAiD;AACjD,2EAAiD;AACjD,uEAA6C;AAC7C,oEAA0C;AAC1C,YAAY;AAEZ,cAAc;AACd,yEAA+C;AAC/C,gFAAsD;AACtD,4EAAkD;AAClD,8EAAoD;AACpD,mFAAyD;AACzD,gFAAsD;AACtD,iFAAuD;AACvD,yEAA+C;AAC/C,0EAAgD;AAChD,gFAAsD;AACtD,sEAA4C;AAC5C,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D;AAClD,kFAAwD;AACxD,4EAAkD;AAClD,qFAA2D;AAC3D,qFAA2D;AAC3D,gFAAsD;AACtD,yEAA+C;AAC/C,gFAAsD;AACtD,sEAA4C;AAC5C,6EAAmD;AACnD,4EAAkD;AAClD,4EAAkD;AAClD,8DAAoC;AACpC,YAAY;AAEZ,UAAU;AACV,iEAAuC;AACvC,wDAA8B;AAC9B,kEAAwC;AACxC,iEAAuC;AACvC,sEAA4C;AAC5C,6DAAmC;AACnC,2EAAiD;AACjD,sEAA4C;AAC5C,4DAAkC;AAClC,yEAA+C;AAC/C,oEAA0C;AAC1C,6DAAmC;AACnC,oEAA0C;AAC1C,mEAAyC;AACzC,4EAAkD;AAClD,oEAA0C;AAC1C,sEAA4C;AAC5C,8EAAoD;AACpD,6FAAmE;AACnE,+EAAqD;AACrD,yEAA+C;AAC/C,4EAAkD;AAClD,uEAA6C;AAC7C,iEAAuC;AACvC,oEAA0C;AAC1C,mEAAyC;AACzC,gEAAsC;AACtC,iEAAuC;AACvC,mEAAyC;AACzC,YAAY"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/schematic/ts-morph/src/index.ts"],"names":[],"mappings":";;;AAAA,eAAe;AACf,uEAA6C;AAC7C,YAAY;AAEZ,kBAAkB;AAClB,gFAAsD;AACtD,qFAA2D;AAC3D,+EAAqD;AACrD,0EAAgD;AAChD,yEAA+C;AAC/C,wEAA8C;AAC9C,0EAAgD;AAChD,sFAA4D;AAC5D,2EAAiD;AACjD,2EAAiD;AACjD,uEAA6C;AAC7C,oEAA0C;AAC1C,YAAY;AAEZ,cAAc;AACd,yEAA+C;AAC/C,gFAAsD;AACtD,4EAAkD;AAClD,8EAAoD;AACpD,mFAAyD;AACzD,gFAAsD;AACtD,iFAAuD;AACvD,yEAA+C;AAC/C,0EAAgD;AAChD,gFAAsD;AACtD,2FAAiE;AACjE,8GAAoF;AACpF,sEAA4C;AAC5C,kFAAwD;AACxD,gFAAsD;AACtD,mFAA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ClD,qFAA2D;AAC3D,qFAA2D;AAC3D,gFAAsD;AACtD,yEAA+C;AAC/C,gFAAsD;AACtD,sEAA4C;AAC5C,6EAAmD;AACnD,4EAAkD;AAClD,4EAAkD;AAClD,8DAAoC;AACpC,YAAY;AAEZ,UAAU;AACV,iEAAuC;AACvC,wDAA8B;AAC9B,kEAAwC;AACxC,iEAAuC;AACvC,sEAA4C;AAC5C,6DAAmC;AACnC,2EAAiD;AACjD,sEAA4C;AAC5C,4DAAkC;AAClC,yEAA+C;AAC/C,oEAA0C;AAC1C,6DAAmC;AACnC,oEAA0C;AAC1C,mEAAyC;AACzC,4EAAkD;AAClD,oEAA0C;AAC1C,sEAA4C;AAC5C,8EAAoD;AACpD,6FAAmE;AACnE,+EAAqD;AACrD,yEAA+C;AAC/C,4EAAkD;AAClD,uEAA6C;AAC7C,iEAAuC;AACvC,oEAA0C;AAC1C,mEAAyC;AACzC,gEAAsC;AACtC,iEAAuC;AACvC,mEAAyC;AACzC,YAAY"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Rule } from '@angular-devkit/schematics';
|
|
2
|
+
import { NormalizedDataProperty } from '@rxap/ts-morph';
|
|
3
|
+
import { ClassDeclaration, SourceFile, WriterFunction } from 'ts-morph';
|
|
4
|
+
import { CoerceDtoClassOutput } from './coerce-dto-class';
|
|
5
|
+
import { CoerceOperationOptions, TransformOperation } from './coerce-operation';
|
|
6
|
+
export interface CoerceAutocompleteOptionsOperationRuleOptions extends CoerceOperationOptions {
|
|
7
|
+
toDisplayProperty: NormalizedDataProperty;
|
|
8
|
+
toValueProperty: NormalizedDataProperty;
|
|
9
|
+
}
|
|
10
|
+
export declare function BuildAutocompleteOptionsDtoDataMapperImplementation(classDeclaration: ClassDeclaration, moduleSourceFile: SourceFile, dto: CoerceDtoClassOutput | null, options: Readonly<CoerceOperationOptions>): TransformOperation<string | WriterFunction>;
|
|
11
|
+
export declare function CoerceAutocompleteOptionsOperationRule(options: Readonly<CoerceAutocompleteOptionsOperationRuleOptions>): Rule;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CoerceAutocompleteOptionsOperationRule = exports.BuildAutocompleteOptionsDtoDataMapperImplementation = void 0;
|
|
4
|
+
const utilities_1 = require("@rxap/utilities");
|
|
5
|
+
const coerce_operation_1 = require("./coerce-operation");
|
|
6
|
+
function BuildAutocompleteOptionsDtoDataMapperImplementation(classDeclaration, moduleSourceFile, dto, options) {
|
|
7
|
+
const { isArray, } = options;
|
|
8
|
+
return () => {
|
|
9
|
+
// TODO : implement the data mapper
|
|
10
|
+
return isArray ? '[]' : '{}';
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
exports.BuildAutocompleteOptionsDtoDataMapperImplementation = BuildAutocompleteOptionsDtoDataMapperImplementation;
|
|
14
|
+
function CoerceAutocompleteOptionsOperationRule(options) {
|
|
15
|
+
const { builtDtoDataMapperImplementation = BuildAutocompleteOptionsDtoDataMapperImplementation, isArray = true, propertyList = [], queryList = [], } = options;
|
|
16
|
+
(0, utilities_1.CoerceArrayItems)(queryList, [{ name: 'search', type: 'string', hasQuestionToken: true }], (a, b) => a.name === b.name);
|
|
17
|
+
(0, utilities_1.CoerceArrayItems)(propertyList, [
|
|
18
|
+
Object.assign(Object.assign({}, options.toValueProperty), { name: 'value', source: options.toValueProperty.name }),
|
|
19
|
+
Object.assign(Object.assign({}, options.toDisplayProperty), { name: 'display', source: options.toDisplayProperty.name }),
|
|
20
|
+
], (a, b) => a.name === b.name);
|
|
21
|
+
return (0, coerce_operation_1.CoerceOperation)(Object.assign(Object.assign({}, options), { propertyList,
|
|
22
|
+
isArray,
|
|
23
|
+
builtDtoDataMapperImplementation }));
|
|
24
|
+
}
|
|
25
|
+
exports.CoerceAutocompleteOptionsOperationRule = CoerceAutocompleteOptionsOperationRule;
|
|
26
|
+
//# sourceMappingURL=coerce-autocomplete-options-operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coerce-autocomplete-options-operation.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/coerce-autocomplete-options-operation.ts"],"names":[],"mappings":";;;AAEA,+CAAmD;AAOnD,yDAI4B;AAO5B,SAAgB,mDAAmD,CACjE,gBAAkC,EAClC,gBAA4B,EAC5B,GAAgC,EAChC,OAAyC;IAEzC,MAAM,EACJ,OAAO,GACR,GAAG,OAAO,CAAC;IACZ,OAAO,GAAG,EAAE;QACV,mCAAmC;QACnC,OAAO,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IAC/B,CAAC,CAAC;AACJ,CAAC;AAbD,kHAaC;AAED,SAAgB,sCAAsC,CAAC,OAAgE;IACrH,MAAM,EACJ,gCAAgC,GAAG,mDAAmD,EACtF,OAAO,GAAG,IAAI,EACd,YAAY,GAAG,EAAE,EACjB,SAAS,GAAG,EAAE,GACf,GAAG,OAAO,CAAC;IACZ,IAAA,4BAAgB,EAAC,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC;IACvH,IAAA,4BAAgB,EAAC,YAAY,EAAE;wCAExB,OAAO,CAAC,eAAe,KAC1B,IAAI,EAAE,OAAO,EACb,MAAM,EAAE,OAAO,CAAC,eAAe,CAAC,IAAI;wCAGjC,OAAO,CAAC,iBAAiB,KAC5B,IAAI,EAAE,SAAS,EACf,MAAM,EAAE,OAAO,CAAC,iBAAiB,CAAC,IAAI;KAEzC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC;IAChC,OAAO,IAAA,kCAAe,kCACjB,OAAO,KACV,YAAY;QACZ,OAAO;QACP,gCAAgC,IAChC,CAAC;AACL,CAAC;AA1BD,wFA0BC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { NormalizedDataProperty } from '@rxap/ts-morph';
|
|
2
|
+
import { CoerceOperationOptions } from './coerce-operation';
|
|
3
|
+
export interface CoerceAutocompleteTableSelectValueResolveOperationOptions extends CoerceOperationOptions {
|
|
4
|
+
rowDisplayProperty: NormalizedDataProperty;
|
|
5
|
+
rowValueProperty: NormalizedDataProperty;
|
|
6
|
+
}
|
|
7
|
+
export declare function CoerceAutocompleteTableSelectValueResolveOperationRule(options: CoerceAutocompleteTableSelectValueResolveOperationOptions): import("@angular-devkit/schematics").Rule;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CoerceAutocompleteTableSelectValueResolveOperationRule = void 0;
|
|
4
|
+
const utilities_1 = require("@rxap/utilities");
|
|
5
|
+
const coerce_operation_1 = require("./coerce-operation");
|
|
6
|
+
const coerce_table_select_value_resolve_operation_1 = require("./coerce-table-select-value-resolve-operation");
|
|
7
|
+
function CoerceAutocompleteTableSelectValueResolveOperationRule(options) {
|
|
8
|
+
const { buildUpstreamGetParametersImplementation = coerce_table_select_value_resolve_operation_1.BuildTableSelectValueResolveUpstreamGetParametersImplementation, propertyList = [], rowDisplayProperty, rowValueProperty, } = options;
|
|
9
|
+
(0, utilities_1.CoerceArrayItems)(propertyList, [
|
|
10
|
+
Object.assign(Object.assign({}, rowValueProperty), { name: 'value', source: rowValueProperty.name }),
|
|
11
|
+
Object.assign(Object.assign({}, rowDisplayProperty), { name: 'display', source: rowDisplayProperty.name }),
|
|
12
|
+
], { compareTo: (a, b) => a.name === b.name, unshift: true });
|
|
13
|
+
return (0, coerce_operation_1.CoerceOperation)(Object.assign(Object.assign({}, options), { buildUpstreamGetParametersImplementation }));
|
|
14
|
+
}
|
|
15
|
+
exports.CoerceAutocompleteTableSelectValueResolveOperationRule = CoerceAutocompleteTableSelectValueResolveOperationRule;
|
|
16
|
+
//# sourceMappingURL=coerce-autocomplete-table-select-value-resolve-operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coerce-autocomplete-table-select-value-resolve-operation.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/coerce-autocomplete-table-select-value-resolve-operation.ts"],"names":[],"mappings":";;;AACA,+CAAmD;AACnD,yDAG4B;AAC5B,+GAAgI;AAQhI,SAAgB,sDAAsD,CAAC,OAAkE;IACvI,MAAM,EACJ,wCAAwC,GAAG,6GAA+D,EAC1G,YAAY,GAAG,EAAE,EACjB,kBAAkB,EAClB,gBAAgB,GACjB,GAAG,OAAO,CAAC;IAEZ,IAAA,4BAAgB,EAAC,YAAY,EAAE;wCAExB,gBAAgB,KACnB,IAAI,EAAE,OAAO,EACb,MAAM,EAAE,gBAAgB,CAAC,IAAI;wCAG1B,kBAAkB,KACrB,IAAI,EAAE,SAAS,EACf,MAAM,EAAE,kBAAkB,CAAC,IAAI;KAElC,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IAE9D,OAAO,IAAA,kCAAe,kCACjB,OAAO,KACV,wCAAwC,IACxC,CAAC;AACL,CAAC;AAzBD,wHAyBC"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
import { ClassDeclaration, SourceFile, WriterFunction } from 'ts-morph';
|
|
2
|
+
import { CoerceDtoClassOutput } from './coerce-dto-class';
|
|
1
3
|
import { CoerceGetByIdControllerOptions } from './coerce-get-by-id-operation';
|
|
4
|
+
import { CoerceOperationOptions, TransformOperation } from './coerce-operation';
|
|
2
5
|
export interface CoerceGetRootOperationOptions extends CoerceGetByIdControllerOptions {
|
|
3
6
|
}
|
|
7
|
+
export declare function BuildGetRootDtoDataMapperImplementation(classDeclaration: ClassDeclaration, moduleSourceFile: SourceFile, dto: CoerceDtoClassOutput | null, options: Readonly<CoerceOperationOptions>): TransformOperation<string | WriterFunction>;
|
|
4
8
|
export declare function CoerceGetRootOperation(options: Readonly<CoerceGetRootOperationOptions>): import("@angular-devkit/schematics").Rule;
|
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CoerceGetRootOperation = void 0;
|
|
3
|
+
exports.CoerceGetRootOperation = exports.BuildGetRootDtoDataMapperImplementation = void 0;
|
|
4
4
|
const utilities_1 = require("@rxap/utilities");
|
|
5
5
|
const coerce_get_by_id_operation_1 = require("./coerce-get-by-id-operation");
|
|
6
6
|
const table_query_list_1 = require("./table-query-list");
|
|
7
|
+
function BuildGetRootDtoDataMapperImplementation(classDeclaration, moduleSourceFile, dto, options) {
|
|
8
|
+
const { isArray, } = options;
|
|
9
|
+
return () => {
|
|
10
|
+
// TODO : implement the data mapper
|
|
11
|
+
return isArray ? '[]' : '{}';
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
exports.BuildGetRootDtoDataMapperImplementation = BuildGetRootDtoDataMapperImplementation;
|
|
7
15
|
function CoerceGetRootOperation(options) {
|
|
8
|
-
const { tsMorphTransform = utilities_1.noop, propertyList = [], operationName = 'get-root', idProperty = null, dtoClassNameSuffix = '-item', isArray = true, } = options;
|
|
16
|
+
const { tsMorphTransform = utilities_1.noop, propertyList = [], operationName = 'get-root', builtDtoDataMapperImplementation = BuildGetRootDtoDataMapperImplementation, idProperty = null, dtoClassNameSuffix = '-item', isArray = true, } = options;
|
|
9
17
|
(0, utilities_1.CoerceArrayItems)(propertyList, [
|
|
10
18
|
{
|
|
11
19
|
name: 'hasChildren',
|
|
@@ -22,7 +30,8 @@ function CoerceGetRootOperation(options) {
|
|
|
22
30
|
return (0, coerce_get_by_id_operation_1.CoerceGetByIdOperation)(Object.assign(Object.assign({}, options), { operationName,
|
|
23
31
|
idProperty,
|
|
24
32
|
dtoClassNameSuffix,
|
|
25
|
-
isArray,
|
|
33
|
+
isArray,
|
|
34
|
+
builtDtoDataMapperImplementation, tsMorphTransform: (project, sourceFile, classDeclaration, controllerName, moduleSourceFile, dto) => {
|
|
26
35
|
return Object.assign({ queryList: table_query_list_1.TABLE_QUERY_LIST }, tsMorphTransform(project, sourceFile, classDeclaration, controllerName, moduleSourceFile, dto));
|
|
27
36
|
} }));
|
|
28
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coerce-get-root-operation.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/coerce-get-root-operation.ts"],"names":[],"mappings":";;;AAAA,+CAGyB;
|
|
1
|
+
{"version":3,"file":"coerce-get-root-operation.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/coerce-get-root-operation.ts"],"names":[],"mappings":";;;AAAA,+CAGyB;AAOzB,6EAGsC;AAKtC,yDAAsD;AAMtD,SAAgB,uCAAuC,CACrD,gBAAkC,EAClC,gBAA4B,EAC5B,GAAgC,EAChC,OAAyC;IAEzC,MAAM,EACJ,OAAO,GACR,GAAG,OAAO,CAAC;IACZ,OAAO,GAAG,EAAE;QACV,mCAAmC;QACnC,OAAO,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IAC/B,CAAC,CAAC;AACJ,CAAC;AAbD,0FAaC;AAED,SAAgB,sBAAsB,CAAC,OAAgD;IACrF,MAAM,EACJ,gBAAgB,GAAG,gBAAI,EACvB,YAAY,GAAG,EAAE,EACjB,aAAa,GAAG,UAAU,EAC1B,gCAAgC,GAAG,uCAAuC,EAC1E,UAAU,GAAG,IAAI,EACjB,kBAAkB,GAAG,OAAO,EAC5B,OAAO,GAAG,IAAI,GACf,GAAG,OAAO,CAAC;IACZ,IAAA,4BAAgB,EAAC,YAAY,EAAE;QAC7B;YACE,IAAI,EAAE,aAAa;YACnB,IAAI,EAAE,SAAS;SAChB;QACD;YACE,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,IAAI;YACb,UAAU,EAAE,IAAI;YAChB,MAAM,EAAE,IAAI;SACb;KACF,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC;IAChC,OAAO,IAAA,mDAAsB,kCACxB,OAAO,KACV,aAAa;QACb,UAAU;QACV,kBAAkB;QAClB,OAAO;QACP,gCAAgC,EAChC,gBAAgB,EAAE,CAChB,OAAO,EACP,UAAU,EACV,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,GAAG,EACH,EAAE;YAEF,uBACE,SAAS,EAAE,mCAAgB,IACxB,gBAAiB,CAAC,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,cAAc,EAAE,gBAAgB,EAAE,GAAG,CAAC,EAClG;QACJ,CAAC,IACD,CAAC;AACL,CAAC;AA7CD,wDA6CC"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { Rule } from '@angular-devkit/schematics';
|
|
2
|
+
import { ClassDeclaration, SourceFile, WriterFunction } from 'ts-morph';
|
|
2
3
|
import { AbstractControl } from '../types/abstract-control';
|
|
3
|
-
import {
|
|
4
|
+
import { CoerceDtoClassOutput } from './coerce-dto-class';
|
|
5
|
+
import { CoerceOperationOptions, TransformOperation } from './coerce-operation';
|
|
4
6
|
export interface CoerceOptionsOperationRuleOptions extends CoerceOperationOptions {
|
|
5
7
|
control: Required<AbstractControl>;
|
|
6
8
|
responseDtoName?: string;
|
|
7
9
|
}
|
|
10
|
+
export declare function BuildOptionsDtoDataMapperImplementation(classDeclaration: ClassDeclaration, moduleSourceFile: SourceFile, dto: CoerceDtoClassOutput | null, options: Readonly<CoerceOperationOptions>): TransformOperation<string | WriterFunction>;
|
|
8
11
|
export declare function CoerceOptionsOperationRule(options: Readonly<CoerceOptionsOperationRuleOptions>): Rule;
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CoerceOptionsOperationRule = void 0;
|
|
3
|
+
exports.CoerceOptionsOperationRule = exports.BuildOptionsDtoDataMapperImplementation = void 0;
|
|
4
4
|
const utilities_1 = require("@rxap/utilities");
|
|
5
5
|
const coerce_operation_1 = require("./coerce-operation");
|
|
6
|
+
function BuildOptionsDtoDataMapperImplementation(classDeclaration, moduleSourceFile, dto, options) {
|
|
7
|
+
const { isArray, } = options;
|
|
8
|
+
return () => {
|
|
9
|
+
// TODO : implement the data mapper
|
|
10
|
+
return isArray ? '[]' : '{}';
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
exports.BuildOptionsDtoDataMapperImplementation = BuildOptionsDtoDataMapperImplementation;
|
|
6
14
|
function CoerceOptionsOperationRule(options) {
|
|
7
|
-
const { control, isArray = true, responseDtoName, propertyList = [
|
|
15
|
+
const { control, builtDtoDataMapperImplementation = BuildOptionsDtoDataMapperImplementation, isArray = true, responseDtoName, propertyList = [
|
|
8
16
|
{
|
|
9
17
|
name: 'display',
|
|
10
18
|
type: 'string',
|
|
@@ -15,7 +23,8 @@ function CoerceOptionsOperationRule(options) {
|
|
|
15
23
|
},
|
|
16
24
|
], } = options;
|
|
17
25
|
return (0, coerce_operation_1.CoerceOperation)(Object.assign(Object.assign({}, options), { propertyList,
|
|
18
|
-
isArray,
|
|
26
|
+
isArray,
|
|
27
|
+
builtDtoDataMapperImplementation, buildOperationDtoClassName: (controllerName, { dtoClassName, dtoClassNameSuffix }) => {
|
|
19
28
|
const className = responseDtoName !== null && responseDtoName !== void 0 ? responseDtoName : (0, utilities_1.joinWithDash)([dtoClassName !== null && dtoClassName !== void 0 ? dtoClassName : controllerName, control.name, 'control', 'options']);
|
|
20
29
|
return dtoClassName !== null && dtoClassName !== void 0 ? dtoClassName : (dtoClassNameSuffix ? (0, utilities_1.CoerceSuffix)(className, dtoClassNameSuffix) : className);
|
|
21
30
|
} }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coerce-options-operation.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/coerce-options-operation.ts"],"names":[],"mappings":";;;AACA,+CAGyB;
|
|
1
|
+
{"version":3,"file":"coerce-options-operation.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/coerce-options-operation.ts"],"names":[],"mappings":";;;AACA,+CAGyB;AAQzB,yDAI4B;AAO5B,SAAgB,uCAAuC,CACrD,gBAAkC,EAClC,gBAA4B,EAC5B,GAAgC,EAChC,OAAyC;IAEzC,MAAM,EACJ,OAAO,GACR,GAAG,OAAO,CAAC;IACZ,OAAO,GAAG,EAAE;QACV,mCAAmC;QACnC,OAAO,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IAC/B,CAAC,CAAC;AACJ,CAAC;AAbD,0FAaC;AAED,SAAgB,0BAA0B,CAAC,OAAoD;IAC7F,MAAM,EACJ,OAAO,EACP,gCAAgC,GAAG,uCAAuC,EAC1E,OAAO,GAAG,IAAI,EACd,eAAe,EACf,YAAY,GAAG;QACb;YACE,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,QAAQ;SACf;QACD;YACE,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,OAAO,CAAC,IAAI;SACnB;KACF,GACF,GAAG,OAAO,CAAC;IACZ,OAAO,IAAA,kCAAe,kCACjB,OAAO,KACV,YAAY;QACZ,OAAO;QACP,gCAAgC,EAChC,0BAA0B,EAAE,CAAC,cAAc,EAAE,EAAE,YAAY,EAAE,kBAAkB,EAAE,EAAE,EAAE;YACnF,MAAM,SAAS,GAAG,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,IAAA,wBAAY,EAAC,CAAE,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,cAAc,EAAE,OAAO,CAAC,IAAI,EAAE,SAAS,EAAE,SAAS,CAAE,CAAC,CAAC;YAC1H,OAAO,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,CACrB,kBAAkB,CAAC,CAAC,CAAC,IAAA,wBAAY,EAAC,SAAS,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC,SAAS,CAC7E,CAAC;QACJ,CAAC,IACD,CAAC;AACL,CAAC;AA7BD,gEA6BC"}
|
|
@@ -7,5 +7,5 @@ export interface CoerceTableSelectValueResolveOperationOptions extends CoerceOpe
|
|
|
7
7
|
rowDisplayProperty: NormalizedDataProperty;
|
|
8
8
|
rowValueProperty?: NormalizedDataProperty;
|
|
9
9
|
}
|
|
10
|
-
export declare function BuildTableSelectValueResolveUpstreamGetParametersImplementation(classDeclaration: ClassDeclaration, moduleSourceFile: SourceFile, dto: CoerceDtoClassOutput | null, options: Readonly<CoerceTableSelectValueResolveOperationOptions
|
|
10
|
+
export declare function BuildTableSelectValueResolveUpstreamGetParametersImplementation(classDeclaration: ClassDeclaration, moduleSourceFile: SourceFile, dto: CoerceDtoClassOutput | null, options: Readonly<Pick<CoerceTableSelectValueResolveOperationOptions, 'upstream'>>): TransformOperation<string | WriterFunction>;
|
|
11
11
|
export declare function CoerceTableSelectValueResolveOperationRule(options: CoerceTableSelectValueResolveOperationOptions): import("@angular-devkit/schematics").Rule;
|
|
@@ -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,6CAKwB;AACxB,+CAAmD;AAOnD,yDAI4B;AAS5B,SAAgB,+DAA+D,CAClB,gBAAkC,EAClC,gBAA4B,EAC5B,GAAgC,EAChC,
|
|
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,6CAKwB;AACxB,+CAAmD;AAOnD,yDAI4B;AAS5B,SAAgB,+DAA+D,CAClB,gBAAkC,EAClC,gBAA4B,EAC5B,GAAgC,EAChC,OAAkF;IAE7I,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,aAAa,EACb,kBAAkB,EAClB,gBAAgB,GAAG,IAAA,gCAAqB,EAAC,aAAa,CAAC,GACxD,GAAG,OAAO,CAAC;IAEZ,IAAA,4BAAgB,EAAC,YAAY,EAAE;wCAExB,gBAAgB,KACnB,IAAI,EAAE,SAAS,EACf,MAAM,EAAE,gBAAgB,CAAC,IAAI;wCAG1B,kBAAkB,KACrB,IAAI,EAAE,WAAW,EACjB,MAAM,EAAE,kBAAkB,CAAC,IAAI;QAEjC,IAAA,gCAAqB,kCAChB,aAAa,KAChB,IAAI,EAAE,SAAS,EACf,MAAM,EAAE,aAAa,CAAC,IAAI,KACzB,QAAQ,CAAC;KACb,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC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