impaktapps-ui-builder 1.0.119 → 1.0.121
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/dist/impaktapps-ui-builder.es.js +40 -26
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +3 -3
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildTable.ts +3 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +5 -0
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +8 -0
- package/src/impaktapps-ui-builder/runtime/services/events.ts +1 -1
- package/src/impaktapps-ui-builder/runtime/services/service.ts +27 -26
package/package.json
CHANGED
|
@@ -77,5 +77,8 @@ export const buildTable = (config: any, componentScope: string) => {
|
|
|
77
77
|
if (config.maxPageSize) {
|
|
78
78
|
table.config.main.maxPageSize = config.maxPageSize
|
|
79
79
|
}
|
|
80
|
+
if(config.initialDensity){
|
|
81
|
+
table.config.main.initialDensity = config.initialDensity
|
|
82
|
+
}
|
|
80
83
|
return table;
|
|
81
84
|
};
|
|
@@ -487,6 +487,11 @@ export const buildPropertiesSection = function (type: String) {
|
|
|
487
487
|
{ label: "100", value: 100 },
|
|
488
488
|
{ label: "500", value: 500 }
|
|
489
489
|
]),
|
|
490
|
+
getSelectField("initialDensity", "Initial Toggle Density", [
|
|
491
|
+
{ label: "Compact", value: "compact" },
|
|
492
|
+
{ label: "Comfortable", value: "comfortable" },
|
|
493
|
+
{ label: "Spacious", value: "spacious" }
|
|
494
|
+
]),
|
|
490
495
|
buildWrapper("Tree Table Properties", [
|
|
491
496
|
getRadioInputField("enableRowMovement", "Row Rearrangement", ["YES", "NO"]),
|
|
492
497
|
getRadioInputField("enableExpanding", "Row Expanding", ["YES", "NO"]),
|
|
@@ -94,6 +94,14 @@ export const ComponentSchema: any = {
|
|
|
94
94
|
{ title: "500", const: 500 }
|
|
95
95
|
]
|
|
96
96
|
},
|
|
97
|
+
initialDensity:{
|
|
98
|
+
type: "string",
|
|
99
|
+
oneOf: [
|
|
100
|
+
{ title: "Compact", const: "compact" },
|
|
101
|
+
{ title: "Comfortable", const: "comfortable" },
|
|
102
|
+
{ title: "Spacious", const: "spacious" }
|
|
103
|
+
]
|
|
104
|
+
},
|
|
97
105
|
layout: {
|
|
98
106
|
type: "array",
|
|
99
107
|
items: {
|
|
@@ -72,7 +72,10 @@ export default (funcParams: funcParamsProps) => {
|
|
|
72
72
|
return {
|
|
73
73
|
setPage: async function () {
|
|
74
74
|
funcParams.store.setAdditionalErrors([]);
|
|
75
|
-
funcParams.store.setFormdata(
|
|
75
|
+
funcParams.store.setFormdata((pre) => ({
|
|
76
|
+
...pre,
|
|
77
|
+
...(funcParams?.initFormData())
|
|
78
|
+
}));
|
|
76
79
|
funcParams.store.setSchema({ type: "object", properties: {} });
|
|
77
80
|
funcParams.store.newData = {};
|
|
78
81
|
eventGroups = {};
|
|
@@ -192,23 +195,14 @@ export default (funcParams: funcParamsProps) => {
|
|
|
192
195
|
funcParams.store?.newData[componentName] !== undefined
|
|
193
196
|
) {
|
|
194
197
|
for (const eventConfig of eventGroups.onChange[componentName]) {
|
|
195
|
-
|
|
198
|
+
await executeEvents({
|
|
199
|
+
...executeEventsParameters,
|
|
200
|
+
config: eventConfig,
|
|
201
|
+
componentName,
|
|
202
|
+
formDataHolder
|
|
203
|
+
})
|
|
196
204
|
if (eventConfig.Handler === "refresh") {
|
|
197
|
-
|
|
198
|
-
...executeEventsParameters,
|
|
199
|
-
config: eventConfig,
|
|
200
|
-
componentName,
|
|
201
|
-
formDataHolder: formDataHolder
|
|
202
|
-
})
|
|
203
|
-
if (!isEmpty(formDataHolder)) {
|
|
204
|
-
funcParams.store.setFormdata((pre) => ({ ...pre, ...formDataHolder }));
|
|
205
|
-
}
|
|
206
|
-
} else {
|
|
207
|
-
await executeEvents({
|
|
208
|
-
...executeEventsParameters,
|
|
209
|
-
config: eventConfig,
|
|
210
|
-
componentName,
|
|
211
|
-
})
|
|
205
|
+
funcParams.store.setFormdata((pre) => ({ ...pre, ...formDataHolder }));
|
|
212
206
|
}
|
|
213
207
|
}
|
|
214
208
|
}
|
|
@@ -261,16 +255,23 @@ export default (funcParams: funcParamsProps) => {
|
|
|
261
255
|
callHandler: function (eventType: string, functionParameters?: any) {
|
|
262
256
|
const path = funcParams.dynamicData?.tableButtonPath || funcParams.dynamicData.path.split(".")[funcParams.dynamicData.path.split(".").length - 1];
|
|
263
257
|
if (eventGroups?.[eventType]?.[path] !== undefined) {
|
|
264
|
-
(eventGroups?.[eventType]?.[path].map(
|
|
258
|
+
(eventGroups?.[eventType]?.[path].map((eventConfig) => {
|
|
265
259
|
executeEventsParameters.store.functionParameters = functionParameters
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
260
|
+
if (eventConfig.Handler === "refresh") {
|
|
261
|
+
executeEvents({
|
|
262
|
+
...executeEventsParameters,
|
|
263
|
+
config: eventConfig,
|
|
264
|
+
componentName: path,
|
|
265
|
+
formDataHolder: formDataHolder
|
|
266
|
+
}).then((res) => {
|
|
267
|
+
funcParams.store.setFormdata((pre) => ({ ...pre, ...formDataHolder }));
|
|
268
|
+
});
|
|
269
|
+
} else {
|
|
270
|
+
executeEvents({
|
|
271
|
+
...executeEventsParameters,
|
|
272
|
+
config: eventConfig,
|
|
273
|
+
componentName: path
|
|
274
|
+
})
|
|
274
275
|
}
|
|
275
276
|
}))
|
|
276
277
|
}
|