impaktapps-ui-builder 1.0.124 → 1.0.125

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": "1.0.124",
3
+ "version": "1.0.125",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -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: {
@@ -196,11 +196,11 @@ export default (funcParams: funcParamsProps) => {
196
196
  ...executeEventsParameters,
197
197
  config: eventConfig,
198
198
  componentName,
199
- formDataHolder:formDataHolder
199
+ formDataHolder
200
200
  })
201
- }
202
- if (!isEmpty(formDataHolder)) {
203
- funcParams.store.setFormdata((pre) => ({ ...pre, ...formDataHolder }));
201
+ if (eventConfig.Handler === "refresh") {
202
+ funcParams.store.setFormdata((pre) => ({ ...pre, ...formDataHolder }));
203
+ }
204
204
  }
205
205
  }
206
206
  }))
@@ -252,16 +252,23 @@ export default (funcParams: funcParamsProps) => {
252
252
  callHandler: function (eventType: string, functionParameters?: any) {
253
253
  const path = funcParams.dynamicData?.tableButtonPath || funcParams.dynamicData.path.split(".")[funcParams.dynamicData.path.split(".").length - 1];
254
254
  if (eventGroups?.[eventType]?.[path] !== undefined) {
255
- (eventGroups?.[eventType]?.[path].map(async (eventConfig) => {
255
+ (eventGroups?.[eventType]?.[path].map((eventConfig) => {
256
256
  executeEventsParameters.store.functionParameters = functionParameters
257
- await executeEvents({
258
- ...executeEventsParameters,
259
- config: eventConfig,
260
- componentName: path,
261
- formDataHolder: formDataHolder
262
- })
263
- if (!isEmpty(formDataHolder)) {
264
- funcParams.store.setFormdata((pre) => ({ ...pre, ...formDataHolder }));
257
+ if (eventConfig.Handler === "refresh") {
258
+ executeEvents({
259
+ ...executeEventsParameters,
260
+ config: eventConfig,
261
+ componentName: path,
262
+ formDataHolder: formDataHolder
263
+ }).then((res) => {
264
+ funcParams.store.setFormdata((pre) => ({ ...pre, ...formDataHolder }));
265
+ });
266
+ } else {
267
+ executeEvents({
268
+ ...executeEventsParameters,
269
+ config: eventConfig,
270
+ componentName: path
271
+ })
265
272
  }
266
273
  }))
267
274
  }