impaktapps-ui-builder 0.0.393-alpha.4 → 0.0.393-alpha.6

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.
@@ -8616,7 +8616,7 @@ var service = (funcParams) => {
8616
8616
  (pre) => {
8617
8617
  return {
8618
8618
  ...funcParams.schema,
8619
- properties: { ...funcParams.schema.properties, ...pre.properties }
8619
+ properties: { ...pre.properties, ...funcParams.schema.properties }
8620
8620
  };
8621
8621
  }
8622
8622
  );
@@ -10584,7 +10584,7 @@ let schema = {
10584
10584
  required: []
10585
10585
  };
10586
10586
  function buildRule(configObj, tableName, arrayHolderName) {
10587
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
10587
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
10588
10588
  if (arrayHolderName) {
10589
10589
  if ((_c = (_b = (_a = schema.properties) == null ? void 0 : _a[tableName]) == null ? void 0 : _b.items) == null ? void 0 : _c.properties) {
10590
10590
  if (!((_g = (_f = (_e = (_d = schema.properties) == null ? void 0 : _d[tableName]) == null ? void 0 : _e.items) == null ? void 0 : _f.properties) == null ? void 0 : _g[configObj.name])) {
@@ -10622,10 +10622,22 @@ function buildRule(configObj, tableName, arrayHolderName) {
10622
10622
  }
10623
10623
  };
10624
10624
  }
10625
+ } else if ((configObj.type === "Select" || configObj.type === "MultipleSelect") && ((_k = configObj.value) == null ? void 0 : _k.length) === 0) {
10626
+ if (configObj.type === "Select") {
10627
+ schema.properties[configObj.name] = {
10628
+ oneOf: {}
10629
+ };
10630
+ } else if (configObj.type === "MultipleSelect") {
10631
+ schema.properties[configObj.name] = {
10632
+ items: {
10633
+ oneOf: {}
10634
+ }
10635
+ };
10636
+ }
10625
10637
  }
10626
10638
  if (configObj.validation) {
10627
10639
  configObj.validation.forEach((rule) => {
10628
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k, _l;
10640
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l;
10629
10641
  if (tableName) {
10630
10642
  if ((_c2 = (_b2 = (_a2 = schema.properties) == null ? void 0 : _a2[tableName]) == null ? void 0 : _b2.items) == null ? void 0 : _c2.properties) {
10631
10643
  if (!((_g2 = (_f2 = (_e2 = (_d2 = schema.properties) == null ? void 0 : _d2[tableName]) == null ? void 0 : _e2.items) == null ? void 0 : _f2.properties) == null ? void 0 : _g2[configObj.name])) {
@@ -10647,7 +10659,7 @@ function buildRule(configObj, tableName, arrayHolderName) {
10647
10659
  }
10648
10660
  }
10649
10661
  if (rule.validationType === "required") {
10650
- (_l = (_k = (_j2 = schema.properties) == null ? void 0 : _j2[tableName]) == null ? void 0 : _k.items) == null ? void 0 : _l.required.push(configObj.name);
10662
+ (_l = (_k2 = (_j2 = schema.properties) == null ? void 0 : _j2[tableName]) == null ? void 0 : _k2.items) == null ? void 0 : _l.required.push(configObj.name);
10651
10663
  } else {
10652
10664
  schema.properties[tableName].items.properties[configObj.name]["type"] = "string";
10653
10665
  schema.properties[tableName].items.properties[configObj.name][rule.validationType] = isNaN(rule.validationValue) ? rule.validationValue : Number(rule.validationValue);