@ruiapp/rapid-configure-tools 0.6.1 → 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";
|
|
@@ -849,6 +849,7 @@ function newPropertyUpdater(rapidConfigApi) {
|
|
|
849
849
|
"maxLength",
|
|
850
850
|
"relation",
|
|
851
851
|
"targetSingularCode",
|
|
852
|
+
"targetTypeColumnName",
|
|
852
853
|
"targetIdColumnName",
|
|
853
854
|
"selfIdColumnName",
|
|
854
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-core": "^0.10.
|
|
24
|
-
"@ruiapp/rapid-extension": "^0.6.
|
|
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";
|