impaktapps-ui-builder 0.0.393-alpha.17 → 0.0.393-alpha.19

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.17",
3
+ "version": "0.0.393-alpha.19",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -72,14 +72,40 @@ export default (funcParams: funcParamsProps) => {
72
72
  store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
73
73
  serviceHolder: this, eventGroups
74
74
  }
75
+ // funcParams.store.setSchema(
76
+ // (pre: any) => {
77
+ // return {
78
+ // ...funcParams.schema, properties:
79
+ // { ...pre.properties,...funcParams.schema.properties,}
80
+ // }
81
+ // }
82
+ // )
75
83
  funcParams.store.setSchema(
76
84
  (pre: any) => {
85
+ const updatedProperties: any = {};
86
+
87
+ const mergedProperties = {
88
+ ...pre.properties,
89
+ ...funcParams.schema.properties,
90
+ };
91
+
92
+ Object.keys(mergedProperties).forEach(propertyName => {
93
+ const schemaProperty = funcParams.schema.properties[propertyName];
94
+
95
+ if (schemaProperty && (schemaProperty.type === "Select" || schemaProperty.type === "MultipleSelect")) {
96
+ if (schemaProperty.oneOf && schemaProperty.oneOf.length === 1 && schemaProperty.oneOf[0].const === "") {
97
+ return;
98
+ }
99
+ }
100
+ updatedProperties[propertyName] = schemaProperty;
101
+ });
102
+
77
103
  return {
78
- ...funcParams.schema, properties:
79
- { ...pre.properties,...funcParams.schema.properties,}
80
- }
104
+ ...funcParams.schema,
105
+ properties: updatedProperties,
106
+ };
81
107
  }
82
- )
108
+ );
83
109
  funcParams.uiSchema.elements.push(notifyUiSchema);
84
110
  funcParams.store.setUiSchema(funcParams.uiSchema);
85
111
  await executeRefreshHandler({