impaktapps-ui-builder 0.0.1058 → 0.0.1060

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.1058",
3
+ "version": "0.0.1060",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -15,9 +15,9 @@ const ArrayDetailUiSchema = {
15
15
  type: "Control",
16
16
  scope: "#/properties/adjustments",
17
17
  layout: 11.5,
18
-
19
- elements: []
20
-
18
+ options: {
19
+ elements: []
20
+ }
21
21
 
22
22
  };
23
23
  export const buildArray = (config: any, componentScope: string) => {
@@ -51,9 +51,10 @@ function buildRule(configObj: any, tableName?: string, arrayHolderName?: boolean
51
51
  if (arrayHolderName) {
52
52
  if (schema.properties?.[tableName]?.items?.properties) {
53
53
  if (!schema.properties?.[tableName]?.items?.properties?.[configObj.name]) {
54
- schema.properties[tableName].items.properties[configObj.name] = {};
54
+
55
55
  if (configObj.type === "Select" && configObj.value?.length > 0) {
56
56
  schema.properties[tableName].items.properties[configObj.name] = {
57
+
57
58
  oneOf: configObj.value.map((e) => {
58
59
  return { const: e.value, title: e.label }
59
60
  })
@@ -67,6 +68,8 @@ function buildRule(configObj: any, tableName?: string, arrayHolderName?: boolean
67
68
  })
68
69
  }
69
70
  }
71
+ } else {
72
+ schema.properties[tableName].items.properties[configObj.name] = { type: "string" };
70
73
  }
71
74
  }
72
75
  }
@@ -380,7 +383,7 @@ const buildUiSchema = (config: any, store?: any) => {
380
383
  return buildUiSchema(e, store)
381
384
  });
382
385
  if (config.detailView === "Yes") {
383
- elements.elements = ArrayElements;
386
+ elements.options.elements = ArrayElements;
384
387
  } else {
385
388
  elements.options.detail.elements = ArrayElements;
386
389
  }