impaktapps-ui-builder 0.0.393-alpha.10 → 0.0.393-alpha.11
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/package.json
CHANGED
|
@@ -67,45 +67,45 @@ function buildRule(configObj: any, tableName?: string, arrayHolderName?: boolean
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
|
|
71
|
-
// if (configObj.type === "Select") {
|
|
72
|
-
// schema.properties[configObj.name] = {
|
|
73
|
-
// oneOf: configObj.value.map((e) => {
|
|
74
|
-
// return { const: e.value, title: e.label }
|
|
75
|
-
// })
|
|
76
|
-
// }
|
|
77
|
-
// }
|
|
78
|
-
// else if (configObj.type === "MultipleSelect") {
|
|
79
|
-
// schema.properties[configObj.name] = {
|
|
80
|
-
// items: {
|
|
81
|
-
// oneOf: configObj.value.map((e) => {
|
|
82
|
-
// return { const: e.value, title: e.label }
|
|
83
|
-
// })
|
|
84
|
-
// }
|
|
85
|
-
// }
|
|
86
|
-
// }
|
|
87
|
-
// }
|
|
88
|
-
else if ((configObj.type === "Select" || configObj.type === "MultipleSelect") && configObj.value?.length >= 0) {
|
|
70
|
+
else if ((configObj.type === "Select" || configObj.type === "MultipleSelect") && configObj.value?.length > 0) {
|
|
89
71
|
if (configObj.type === "Select") {
|
|
90
72
|
schema.properties[configObj.name] = {
|
|
91
|
-
oneOf:
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
} else if (configObj.type === "MultipleSelect") {
|
|
73
|
+
oneOf: configObj.value.map((e) => {
|
|
74
|
+
return { const: e.value, title: e.label }
|
|
75
|
+
})
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
else if (configObj.type === "MultipleSelect") {
|
|
98
79
|
schema.properties[configObj.name] = {
|
|
99
80
|
items: {
|
|
100
|
-
oneOf:
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
})
|
|
104
|
-
: [{ const: "", title: "" }]
|
|
81
|
+
oneOf: configObj.value.map((e) => {
|
|
82
|
+
return { const: e.value, title: e.label }
|
|
83
|
+
})
|
|
105
84
|
}
|
|
106
|
-
}
|
|
85
|
+
}
|
|
107
86
|
}
|
|
108
87
|
}
|
|
88
|
+
// else if ((configObj.type === "Select" || configObj.type === "MultipleSelect") && configObj.value?.length >= 0) {
|
|
89
|
+
// if (configObj.type === "Select") {
|
|
90
|
+
// schema.properties[configObj.name] = {
|
|
91
|
+
// oneOf: configObj.value.length > 0
|
|
92
|
+
// ? configObj.value.map((e) => {
|
|
93
|
+
// return { const: e.value, title: e.label };
|
|
94
|
+
// })
|
|
95
|
+
// : [{ const: "", title: "" }]
|
|
96
|
+
// };
|
|
97
|
+
// } else if (configObj.type === "MultipleSelect") {
|
|
98
|
+
// schema.properties[configObj.name] = {
|
|
99
|
+
// items: {
|
|
100
|
+
// oneOf: configObj.value.length > 0
|
|
101
|
+
// ? configObj.value.map((e) => {
|
|
102
|
+
// return { const: e.value, title: e.label };
|
|
103
|
+
// })
|
|
104
|
+
// : [{ const: "", title: "" }]
|
|
105
|
+
// }
|
|
106
|
+
// };
|
|
107
|
+
// }
|
|
108
|
+
// }
|
|
109
109
|
if (configObj.validation) {
|
|
110
110
|
configObj.validation.forEach((rule: any) => {
|
|
111
111
|
if (tableName) {
|