@ruiapp/rapid-configure-tools 0.6.0 → 0.6.2
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/dist/mod.js
CHANGED
|
@@ -278,8 +278,8 @@ function convertSdRpdFieldTypeToTypeScriptType(field, entities) {
|
|
|
278
278
|
return `${dataDictionary}[]`;
|
|
279
279
|
case "relation":
|
|
280
280
|
case "relation[]":
|
|
281
|
-
const
|
|
282
|
-
return relation === "one" ? `Partial<${
|
|
281
|
+
const targetType = lodash.find(entities, { singularCode: targetSingularCode })?.code || "any";
|
|
282
|
+
return relation === "one" ? `Partial<${targetType}>` : `Partial<${targetType}>[]`;
|
|
283
283
|
case "file":
|
|
284
284
|
case "image":
|
|
285
285
|
return "FileOrImageFieldType";
|
|
@@ -764,6 +764,7 @@ function newModelUpdater(rapidConfigApi) {
|
|
|
764
764
|
"derivedType",
|
|
765
765
|
"derivedTypePropertyCode",
|
|
766
766
|
"displayPropertyCode",
|
|
767
|
+
"defaultOrderBy",
|
|
767
768
|
"indexes",
|
|
768
769
|
"permissionPolicies",
|
|
769
770
|
"softDelete",
|
|
@@ -848,6 +849,7 @@ function newPropertyUpdater(rapidConfigApi) {
|
|
|
848
849
|
"maxLength",
|
|
849
850
|
"relation",
|
|
850
851
|
"targetSingularCode",
|
|
852
|
+
"targetTypeColumnName",
|
|
851
853
|
"targetIdColumnName",
|
|
852
854
|
"selfIdColumnName",
|
|
853
855
|
"linkTableName",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ruiapp/rapid-configure-tools",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/mod.js",
|
|
6
6
|
"keywords": [],
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"axios-cookiejar-support": "^4.0.7",
|
|
21
21
|
"lodash": "^4.17.21",
|
|
22
22
|
"tough-cookie": "^4.1.3",
|
|
23
|
-
"@ruiapp/rapid-
|
|
24
|
-
"@ruiapp/rapid-
|
|
23
|
+
"@ruiapp/rapid-core": "^0.10.4",
|
|
24
|
+
"@ruiapp/rapid-extension": "^0.6.8"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {},
|
|
27
27
|
"scripts": {
|
|
@@ -34,8 +34,8 @@ function convertSdRpdFieldTypeToTypeScriptType(field: RapidField, entities: Rapi
|
|
|
34
34
|
return `${dataDictionary}[]`;
|
|
35
35
|
case "relation":
|
|
36
36
|
case "relation[]":
|
|
37
|
-
const
|
|
38
|
-
return relation === "one" ? `Partial<${
|
|
37
|
+
const targetType = find(entities, { singularCode: targetSingularCode })?.code || "any";
|
|
38
|
+
return relation === "one" ? `Partial<${targetType}>` : `Partial<${targetType}>[]`;
|
|
39
39
|
case "file":
|
|
40
40
|
case "image":
|
|
41
41
|
return "FileOrImageFieldType";
|