impaktapps-ui-builder 0.0.393-alpha.12 → 0.0.393-alpha.13

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "0.0.393-alpha.12",
3
+ "version": "0.0.393-alpha.13",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -69,12 +69,21 @@ function buildRule(configObj: any, tableName?: string, arrayHolderName?: boolean
69
69
  }
70
70
  else if ((configObj.type === "Select" || configObj.type === "MultipleSelect") && configObj.value?.length >= 0) {
71
71
  if (configObj.type === "Select") {
72
+ let oneOfOptions = configObj.value && configObj.value.length > 0
73
+ ? configObj.value.map((e) => ({ const: e.value, title: e.label }))
74
+ : [{ const: "", title: "" }];
75
+
72
76
  schema.properties[configObj.name] = {
73
- oneOf: configObj.value.map((e) => {
74
- return { const: e.value, title: e.label }
75
- })
76
- }
77
+ oneOf: oneOfOptions
78
+ };
77
79
  }
80
+ // if (configObj.type === "Select") {
81
+ // schema.properties[configObj.name] = {
82
+ // oneOf: configObj.value.map((e) => {
83
+ // return { const: e.value, title: e.label }
84
+ // })
85
+ // }
86
+ // }
78
87
  else if (configObj.type === "MultipleSelect") {
79
88
  schema.properties[configObj.name] = {
80
89
  items: {
@@ -86,14 +95,15 @@ function buildRule(configObj: any, tableName?: string, arrayHolderName?: boolean
86
95
  }
87
96
  }
88
97
  // 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
- // };
98
+
99
+ // if (configObj.type === "Select") {
100
+ // schema.properties[configObj.name] = {
101
+ // oneOf: configObj.value.length > 0
102
+ // ? configObj.value.map((e) => {
103
+ // return { const: e.value, title: e.label };
104
+ // })
105
+ // : [{ const: "", title: "" }]
106
+ // };
97
107
  // } else if (configObj.type === "MultipleSelect") {
98
108
  // schema.properties[configObj.name] = {
99
109
  // items: {