@rxap/schematics-ts-morph 16.1.0-dev.12 → 16.1.0-dev.14
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 +12 -0
- package/README.md +1 -1
- package/package.json +4 -4
- package/src/lib/angular/coerce-proxy-remote-method-class.d.ts +2 -0
- package/src/lib/angular/coerce-proxy-remote-method-class.js +41 -19
- package/src/lib/angular/coerce-proxy-remote-method-class.js.map +1 -1
- package/src/lib/angular/coerce-tree-table-root-proxy-remote-method-class.d.ts +1 -0
- package/src/lib/angular/coerce-tree-table-root-proxy-remote-method-class.js +10 -3
- package/src/lib/angular/coerce-tree-table-root-proxy-remote-method-class.js.map +1 -1
- package/src/lib/nest/coerce-table-select-operation.js +5 -2
- package/src/lib/nest/coerce-table-select-operation.js.map +1 -1
- package/src/lib/nest/coerce-table-select-value-resolve-operation.js +6 -3
- package/src/lib/nest/coerce-table-select-value-resolve-operation.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
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.14](https://gitlab.com/rxap/packages/compare/@rxap/schematics-ts-morph@16.1.0-dev.13...@rxap/schematics-ts-morph@16.1.0-dev.14) (2024-03-07)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- ensure the coerce array items function is used instead of unshift ([17b8d10](https://gitlab.com/rxap/packages/commit/17b8d10fa3df7eaec51180b79216d5c4913b3b1d))
|
|
11
|
+
|
|
12
|
+
# [16.1.0-dev.13](https://gitlab.com/rxap/packages/compare/@rxap/schematics-ts-morph@16.1.0-dev.12...@rxap/schematics-ts-morph@16.1.0-dev.13) (2024-03-07)
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
- use defined identifier property ([fd5fa55](https://gitlab.com/rxap/packages/commit/fd5fa55b7e580475227340ffd8b1d6c39847b626))
|
|
17
|
+
|
|
6
18
|
# [16.1.0-dev.12](https://gitlab.com/rxap/packages/compare/@rxap/schematics-ts-morph@16.1.0-dev.11...@rxap/schematics-ts-morph@16.1.0-dev.12) (2024-03-07)
|
|
7
19
|
|
|
8
20
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -17,5 +17,5 @@ yarn add @rxap/schematics-ts-morph
|
|
|
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-utilities@^16.0.1-dev.1 @rxap/ts-morph@^1.1.0-dev.
|
|
20
|
+
yarn add @angular-devkit/core@^16.1.4 @angular-devkit/schematics@^16.1.4 @rxap/schematics-utilities@^16.0.1-dev.1 @rxap/ts-morph@^1.1.0-dev.13 @rxap/utilities@^16.1.0-dev.6 @rxap/workspace-ts-morph@^16.0.2-dev.1 colors@^1.4.0 handlebars@^4.7.7 ts-morph@^18.0.0 tslib@2.6.2
|
|
21
21
|
```
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "16.1.0-dev.
|
|
2
|
+
"version": "16.1.0-dev.14",
|
|
3
3
|
"name": "@rxap/schematics-ts-morph",
|
|
4
4
|
"license": "GPL-3.0-or-later",
|
|
5
5
|
"dependencies": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"@angular-devkit/core": "^16.1.4",
|
|
14
14
|
"@angular-devkit/schematics": "^16.1.4",
|
|
15
15
|
"@rxap/schematics-utilities": "^16.0.1-dev.1",
|
|
16
|
-
"@rxap/ts-morph": "^1.1.0-dev.
|
|
16
|
+
"@rxap/ts-morph": "^1.1.0-dev.13",
|
|
17
17
|
"@rxap/utilities": "^16.1.0-dev.6",
|
|
18
18
|
"@rxap/workspace-ts-morph": "^16.0.2-dev.1",
|
|
19
19
|
"colors": "^1.4.0",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
"package": "@rxap/ts-morph",
|
|
52
|
-
"version": "1.1.0-dev.
|
|
52
|
+
"version": "1.1.0-dev.13"
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
"package": "@rxap/utilities",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"directory": "packages/schematic/ts-morph"
|
|
72
72
|
},
|
|
73
73
|
"type": "commonjs",
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "7e271d5f45e33d0a712fab60ee96da09e790b80b",
|
|
75
75
|
"main": "./src/index.js",
|
|
76
76
|
"types": "./src/index.d.ts"
|
|
77
77
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { NormalizedIdentifierOptions } from '@rxap/ts-morph';
|
|
1
2
|
import { TsMorphAngularProjectTransformOptions } from '@rxap/workspace-ts-morph';
|
|
2
3
|
import { ClassDeclaration, MethodDeclarationStructure, Project, SourceFile, WriterFunction } from 'ts-morph';
|
|
3
4
|
export interface CoerceProxyRemoteMethodClassOptions extends TsMorphAngularProjectTransformOptions {
|
|
@@ -7,5 +8,6 @@ export interface CoerceProxyRemoteMethodClassOptions extends TsMorphAngularProje
|
|
|
7
8
|
sourceType: string | WriterFunction;
|
|
8
9
|
targetType: string | WriterFunction;
|
|
9
10
|
proxyMethod: string | WriterFunction;
|
|
11
|
+
identifier?: NormalizedIdentifierOptions | null;
|
|
10
12
|
}
|
|
11
13
|
export declare function CoerceProxyRemoteMethodClass(options: CoerceProxyRemoteMethodClassOptions): import("@angular-devkit/schematics").Rule;
|
|
@@ -4,9 +4,10 @@ exports.CoerceProxyRemoteMethodClass = void 0;
|
|
|
4
4
|
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
5
5
|
const ts_morph_1 = require("@rxap/ts-morph");
|
|
6
6
|
const utilities_1 = require("@rxap/utilities");
|
|
7
|
+
const ts_morph_2 = require("ts-morph");
|
|
7
8
|
const ts_morph_transform_1 = require("../ts-morph-transform");
|
|
8
9
|
function CoerceProxyRemoteMethodClass(options) {
|
|
9
|
-
const { override, name, tsMorphTransform = utilities_1.noop, sourceType, targetType, proxyMethod, } = options;
|
|
10
|
+
const { override, name, tsMorphTransform = utilities_1.noop, sourceType, targetType, proxyMethod, identifier, } = options;
|
|
10
11
|
const className = (0, schematics_utilities_1.classify)((0, schematics_utilities_1.CoerceSuffix)(name, 'ProxyMethod'));
|
|
11
12
|
const fileName = (0, schematics_utilities_1.CoerceSuffix)(name, '-proxy.method.ts');
|
|
12
13
|
return (0, ts_morph_transform_1.TsMorphAngularProjectTransformRule)(options, (project) => {
|
|
@@ -41,23 +42,23 @@ function CoerceProxyRemoteMethodClass(options) {
|
|
|
41
42
|
statements: ['super(method);'],
|
|
42
43
|
},
|
|
43
44
|
],
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
45
|
+
});
|
|
46
|
+
classDeclaration.setExtends(w => {
|
|
47
|
+
w.write('ProxyRemoteMethod<');
|
|
48
|
+
if (typeof sourceType === 'string') {
|
|
49
|
+
w.write(sourceType);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
sourceType(w);
|
|
53
|
+
}
|
|
54
|
+
w.write(', ');
|
|
55
|
+
if (typeof targetType === 'string') {
|
|
56
|
+
w.write(targetType);
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
targetType(w);
|
|
60
|
+
}
|
|
61
|
+
w.write('>');
|
|
61
62
|
});
|
|
62
63
|
(0, ts_morph_1.CoerceImports)(sourceFile, {
|
|
63
64
|
moduleSpecifier: '@rxap/pattern',
|
|
@@ -78,7 +79,28 @@ function CoerceProxyRemoteMethodClass(options) {
|
|
|
78
79
|
type: sourceType,
|
|
79
80
|
},
|
|
80
81
|
]);
|
|
81
|
-
(
|
|
82
|
+
if ((identifier === null || identifier === void 0 ? void 0 : identifier.source) === 'route' && !methodStructure.statements) {
|
|
83
|
+
(0, ts_morph_1.CoerceClassProperty)(classDeclaration, 'route', {
|
|
84
|
+
scope: ts_morph_2.Scope.Protected,
|
|
85
|
+
initializer: 'inject(ActivatedRoute)',
|
|
86
|
+
isReadonly: true,
|
|
87
|
+
});
|
|
88
|
+
(0, ts_morph_1.CoerceImports)(sourceFile, {
|
|
89
|
+
moduleSpecifier: '@angular/router',
|
|
90
|
+
namedImports: ['ActivatedRoute'],
|
|
91
|
+
});
|
|
92
|
+
(0, ts_morph_1.CoerceImports)(sourceFile, {
|
|
93
|
+
moduleSpecifier: '@angular/core',
|
|
94
|
+
namedImports: ['inject'],
|
|
95
|
+
});
|
|
96
|
+
methodStructure.statements = [
|
|
97
|
+
`const { ${identifier.property.name} } = this.route.snapshot.params;`,
|
|
98
|
+
`return { parameters: { ${identifier.property.name} } };`,
|
|
99
|
+
];
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
(_c = methodStructure.statements) !== null && _c !== void 0 ? _c : (methodStructure.statements = ['return source as any;']);
|
|
103
|
+
}
|
|
82
104
|
(_d = methodStructure.returnType) !== null && _d !== void 0 ? _d : (methodStructure.returnType = w => {
|
|
83
105
|
w.write('Promise<');
|
|
84
106
|
if (typeof targetType ===
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coerce-proxy-remote-method-class.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/angular/coerce-proxy-remote-method-class.ts"],"names":[],"mappings":";;;AAAA,qEAGoC;AACpC,
|
|
1
|
+
{"version":3,"file":"coerce-proxy-remote-method-class.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/angular/coerce-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AC,CAAC;SACxC;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AApHD,oEAoHC"}
|
|
@@ -2,5 +2,6 @@ import { CoerceProxyRemoteMethodClassOptions } from './coerce-proxy-remote-metho
|
|
|
2
2
|
export interface CoerceTreeTableRootProxyRemoteMethodClassOptions extends Omit<Omit<Omit<Omit<CoerceProxyRemoteMethodClassOptions, 'name'>, 'sourceType'>, 'targetType'>, 'proxyMethod'> {
|
|
3
3
|
getRootOperationId: string;
|
|
4
4
|
scope?: string | null;
|
|
5
|
+
hasParameter?: boolean;
|
|
5
6
|
}
|
|
6
7
|
export declare function CoerceTreeTableRootProxyRemoteMethodClass(options: CoerceTreeTableRootProxyRemoteMethodClassOptions): import("@angular-devkit/schematics").Rule;
|
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CoerceTreeTableRootProxyRemoteMethodClass = void 0;
|
|
4
|
+
const ts_morph_1 = require("@rxap/ts-morph");
|
|
5
|
+
const utilities_1 = require("@rxap/utilities");
|
|
4
6
|
const operation_id_utilities_1 = require("../nest/operation-id-utilities");
|
|
5
7
|
const coerce_imports_1 = require("../ts-morph/coerce-imports");
|
|
6
8
|
const coerce_proxy_remote_method_class_1 = require("./coerce-proxy-remote-method-class");
|
|
7
9
|
function CoerceTreeTableRootProxyRemoteMethodClass(options) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
const { tsMorphTransform = utilities_1.noop, getRootOperationId, scope, identifier } = options;
|
|
11
|
+
return (0, coerce_proxy_remote_method_class_1.CoerceProxyRemoteMethodClass)(Object.assign(Object.assign({}, options), { name: 'tree-table-root', sourceType: 'Node<unknown>', targetType: `OpenApiRemoteMethodParameter<${identifier ? (0, operation_id_utilities_1.OperationIdToParameterClassName)(getRootOperationId) : 'void'}>`, proxyMethod: (0, operation_id_utilities_1.OperationIdToClassName)(getRootOperationId), tsMorphTransform: (project, sourceFile, classDeclaration) => {
|
|
12
|
+
if (identifier) {
|
|
13
|
+
(0, coerce_imports_1.CoerceImports)(sourceFile, {
|
|
14
|
+
namedImports: [(0, operation_id_utilities_1.OperationIdToParameterClassName)(getRootOperationId)],
|
|
15
|
+
moduleSpecifier: (0, ts_morph_1.OperationIdToParameterClassImportPath)(getRootOperationId, scope),
|
|
16
|
+
});
|
|
17
|
+
}
|
|
11
18
|
(0, coerce_imports_1.CoerceImports)(sourceFile, {
|
|
12
19
|
namedImports: [(0, operation_id_utilities_1.OperationIdToClassName)(getRootOperationId)],
|
|
13
20
|
moduleSpecifier: (0, operation_id_utilities_1.OperationIdToClassImportPath)(getRootOperationId, scope),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coerce-tree-table-root-proxy-remote-method-class.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/angular/coerce-tree-table-root-proxy-remote-method-class.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"coerce-tree-table-root-proxy-remote-method-class.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/angular/coerce-tree-table-root-proxy-remote-method-class.ts"],"names":[],"mappings":";;;AAAA,6CAAuE;AACvE,+CAAuC;AAMvC,2EAIwC;AACxC,+DAA2D;AAC3D,yFAG4C;AAS5C,SAAgB,yCAAyC,CAAC,OAAyD;IACjH,MAAM,EACJ,gBAAgB,GAAG,gBAAI,EACvB,kBAAkB,EAClB,KAAK,EACL,UAAU,EACX,GAAG,OAAO,CAAC;IACZ,OAAO,IAAA,+DAA4B,kCAC9B,OAAO,KACV,IAAI,EAAE,iBAAiB,EACvB,UAAU,EAAE,eAAe,EAC3B,UAAU,EAAE,gCAAiC,UAAU,CAAC,CAAC,CAAC,IAAA,wDAA+B,EAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,MAAO,GAAG,EAC1H,WAAW,EAAE,IAAA,+CAAsB,EAAC,kBAAkB,CAAC,EACvD,gBAAgB,EAAE,CAAC,OAAgB,EAAE,UAAsB,EAAE,gBAAkC,EAAE,EAAE;YACjG,IAAI,UAAU,EAAE;gBACd,IAAA,8BAAa,EAAC,UAAU,EAAE;oBACxB,YAAY,EAAE,CAAE,IAAA,wDAA+B,EAAC,kBAAkB,CAAC,CAAE;oBACrE,eAAe,EAAE,IAAA,gDAAqC,EAAC,kBAAkB,EAAE,KAAK,CAAC;iBAClF,CAAC,CAAC;aACJ;YACD,IAAA,8BAAa,EAAC,UAAU,EAAE;gBACxB,YAAY,EAAE,CAAE,IAAA,+CAAsB,EAAC,kBAAkB,CAAC,CAAE;gBAC5D,eAAe,EAAE,IAAA,qDAA4B,EAAC,kBAAkB,EAAE,KAAK,CAAC;aACzE,CAAC,CAAC;YACH,IAAA,8BAAa,EAAC,UAAU,EAAE;gBACxB,YAAY,EAAE,CAAE,MAAM,CAAE;gBACxB,eAAe,EAAE,2BAA2B;aAC7C,CAAC,CAAC;YACH,IAAA,8BAAa,EAAC,UAAU,EAAE;gBACxB,YAAY,EAAE,CAAE,8BAA8B,CAAE;gBAChD,eAAe,EAAE,8BAA8B;aAChD,CAAC,CAAC;YACH,OAAO,gBAAiB,CAAC,OAAO,EAAE,UAAU,EAAE,gBAAgB,CAAC,CAAC;QAClE,CAAC,IACD,CAAC;AACL,CAAC;AAnCD,8FAmCC"}
|
|
@@ -2,11 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CoerceTableSelectOperationRule = void 0;
|
|
4
4
|
const ts_morph_1 = require("@rxap/ts-morph");
|
|
5
|
+
const utilities_1 = require("@rxap/utilities");
|
|
5
6
|
const coerce_get_page_operation_1 = require("./coerce-get-page-operation");
|
|
6
7
|
function CoerceTableSelectOperationRule(options) {
|
|
7
8
|
const { propertyList = [], rowIdProperty, rowDisplayProperty, rowValueProperty = (0, ts_morph_1.NormalizeDataProperty)(rowIdProperty), } = options;
|
|
8
|
-
|
|
9
|
-
|
|
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 });
|
|
10
13
|
return (0, coerce_get_page_operation_1.CoerceGetPageOperation)(Object.assign(Object.assign({}, options), { propertyList: propertyList, rowIdProperty }));
|
|
11
14
|
}
|
|
12
15
|
exports.CoerceTableSelectOperationRule = CoerceTableSelectOperationRule;
|
|
@@ -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,6CAIwB;AACxB,2EAGqC;AAQrC,SAAgB,8BAA8B,CAAC,OAA0C;IACvF,MAAM,EACJ,YAAY,GAAG,EAAE,EACjB,aAAa,EACb,kBAAkB,EAClB,gBAAgB,GAAG,IAAA,gCAAqB,EAAC,aAAa,CAAC,GACxD,GAAG,OAAO,CAAC;IAEZ,YAAY,CAAC,
|
|
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,6CAIwB;AACxB,+CAAmD;AACnD,2EAGqC;AAQrC,SAAgB,8BAA8B,CAAC,OAA0C;IACvF,MAAM,EACJ,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;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,kDAAsB,kCACxB,OAAO,KACV,YAAY,EAAE,YAAY,EAC1B,aAAa,IACb,CAAC;AAEL,CAAC;AA3BD,wEA2BC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CoerceTableSelectValueResolveOperationRule = exports.BuildTableSelectValueResolveUpstreamGetParametersImplementation = void 0;
|
|
4
4
|
const ts_morph_1 = require("@rxap/ts-morph");
|
|
5
|
+
const utilities_1 = require("@rxap/utilities");
|
|
5
6
|
const coerce_operation_1 = require("./coerce-operation");
|
|
6
7
|
function BuildTableSelectValueResolveUpstreamGetParametersImplementation(classDeclaration, moduleSourceFile, dto, options) {
|
|
7
8
|
return () => {
|
|
@@ -21,9 +22,11 @@ function BuildTableSelectValueResolveUpstreamGetParametersImplementation(classDe
|
|
|
21
22
|
exports.BuildTableSelectValueResolveUpstreamGetParametersImplementation = BuildTableSelectValueResolveUpstreamGetParametersImplementation;
|
|
22
23
|
function CoerceTableSelectValueResolveOperationRule(options) {
|
|
23
24
|
const { buildUpstreamGetParametersImplementation = BuildTableSelectValueResolveUpstreamGetParametersImplementation, propertyList = [], rowIdProperty, rowDisplayProperty, rowValueProperty = (0, ts_morph_1.NormalizeDataProperty)(rowIdProperty), } = options;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
(0, utilities_1.CoerceArrayItems)(propertyList, [
|
|
26
|
+
Object.assign(Object.assign({}, rowValueProperty), { name: '__value', source: rowValueProperty.name }),
|
|
27
|
+
Object.assign(Object.assign({}, rowDisplayProperty), { name: '__display', source: rowDisplayProperty.name }),
|
|
28
|
+
(0, ts_morph_1.NormalizeDataProperty)(Object.assign(Object.assign({}, rowIdProperty), { name: '__rowId', source: rowIdProperty.name }), 'number')
|
|
29
|
+
], { compareTo: (a, b) => a.name === b.name, unshift: true });
|
|
27
30
|
return (0, coerce_operation_1.CoerceOperation)(Object.assign(Object.assign({}, options), { buildUpstreamGetParametersImplementation }));
|
|
28
31
|
}
|
|
29
32
|
exports.CoerceTableSelectValueResolveOperationRule = CoerceTableSelectValueResolveOperationRule;
|
|
@@ -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;
|
|
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,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,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