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.
@@ -6310,6 +6310,14 @@ const ComponentSchema = {
6310
6310
  { title: "500", const: 500 }
6311
6311
  ]
6312
6312
  },
6313
+ initialDensity: {
6314
+ type: "string",
6315
+ oneOf: [
6316
+ { title: "Compact", const: "compact" },
6317
+ { title: "Comfortable", const: "comfortable" },
6318
+ { title: "Spacious", const: "spacious" }
6319
+ ]
6320
+ },
6313
6321
  layout: {
6314
6322
  type: "array",
6315
6323
  items: {
@@ -7872,6 +7880,7 @@ const buildPropertiesSection = function(type) {
7872
7880
  getInputField("selectKey", "Selection Key"),
7873
7881
  getMultiSelectField("filteringOptions", "Filtering Options"),
7874
7882
  getSelectField("maxPageSize", "Max Page Size"),
7883
+ getSelectField("initialDensity", "Initial Toggle Density"),
7875
7884
  buildWrapper("Tree Table Properties", [
7876
7885
  getRadioInputField("enableRowMovement", "Row Rearrangement", ["YES", "NO"]),
7877
7886
  getRadioInputField("enableExpanding", "Row Expanding", ["YES", "NO"]),
@@ -10150,7 +10159,7 @@ function mergeFormdata(handlerResponse, componentName, eventConfig, store2, form
10150
10159
  formDataHolder[`${componentName}_RowCount`] = (_c = (_b = handlerResponse.data) == null ? void 0 : _b.meta) == null ? void 0 : _c.totalRowCount;
10151
10160
  }
10152
10161
  } else {
10153
- if (handlerResponse == null ? void 0 : handlerResponse.data) {
10162
+ if (handlerResponse) {
10154
10163
  formDataHolder[componentName] = handlerResponse.data;
10155
10164
  }
10156
10165
  }
@@ -10298,7 +10307,10 @@ var service = (funcParams) => {
10298
10307
  setPage: async function() {
10299
10308
  var _a, _b, _c;
10300
10309
  funcParams.store.setAdditionalErrors([]);
10301
- funcParams.store.setFormdata((funcParams == null ? void 0 : funcParams.initFormData()) || {});
10310
+ funcParams.store.setFormdata((pre) => ({
10311
+ ...pre,
10312
+ ...funcParams == null ? void 0 : funcParams.initFormData()
10313
+ }));
10302
10314
  funcParams.store.setSchema({ type: "object", properties: {} });
10303
10315
  funcParams.store.newData = {};
10304
10316
  eventGroups = {};
@@ -10430,22 +10442,14 @@ var service = (funcParams) => {
10430
10442
  var _a, _b;
10431
10443
  if (((_a = funcParams.store) == null ? void 0 : _a.formData[componentName]) !== funcParams.store.newData[componentName] && ((_b = funcParams.store) == null ? void 0 : _b.newData[componentName]) !== void 0) {
10432
10444
  for (const eventConfig of eventGroups.onChange[componentName]) {
10445
+ await executeEvents({
10446
+ ...executeEventsParameters,
10447
+ config: eventConfig,
10448
+ componentName,
10449
+ formDataHolder
10450
+ });
10433
10451
  if (eventConfig.Handler === "refresh") {
10434
- await executeEvents({
10435
- ...executeEventsParameters,
10436
- config: eventConfig,
10437
- componentName,
10438
- formDataHolder
10439
- });
10440
- if (!lodash.exports.isEmpty(formDataHolder)) {
10441
- funcParams.store.setFormdata((pre) => ({ ...pre, ...formDataHolder }));
10442
- }
10443
- } else {
10444
- await executeEvents({
10445
- ...executeEventsParameters,
10446
- config: eventConfig,
10447
- componentName
10448
- });
10452
+ funcParams.store.setFormdata((pre) => ({ ...pre, ...formDataHolder }));
10449
10453
  }
10450
10454
  }
10451
10455
  }
@@ -10505,16 +10509,23 @@ var service = (funcParams) => {
10505
10509
  var _a, _b, _c;
10506
10510
  const path = ((_a = funcParams.dynamicData) == null ? void 0 : _a.tableButtonPath) || funcParams.dynamicData.path.split(".")[funcParams.dynamicData.path.split(".").length - 1];
10507
10511
  if (((_b = eventGroups == null ? void 0 : eventGroups[eventType]) == null ? void 0 : _b[path]) !== void 0) {
10508
- (_c = eventGroups == null ? void 0 : eventGroups[eventType]) == null ? void 0 : _c[path].map(async (eventConfig) => {
10512
+ (_c = eventGroups == null ? void 0 : eventGroups[eventType]) == null ? void 0 : _c[path].map((eventConfig) => {
10509
10513
  executeEventsParameters.store.functionParameters = functionParameters;
10510
- await executeEvents({
10511
- ...executeEventsParameters,
10512
- config: eventConfig,
10513
- componentName: path,
10514
- formDataHolder
10515
- });
10516
- if (!lodash.exports.isEmpty(formDataHolder)) {
10517
- funcParams.store.setFormdata((pre) => ({ ...pre, ...formDataHolder }));
10514
+ if (eventConfig.Handler === "refresh") {
10515
+ executeEvents({
10516
+ ...executeEventsParameters,
10517
+ config: eventConfig,
10518
+ componentName: path,
10519
+ formDataHolder
10520
+ }).then((res) => {
10521
+ funcParams.store.setFormdata((pre) => ({ ...pre, ...formDataHolder }));
10522
+ });
10523
+ } else {
10524
+ executeEvents({
10525
+ ...executeEventsParameters,
10526
+ config: eventConfig,
10527
+ componentName: path
10528
+ });
10518
10529
  }
10519
10530
  });
10520
10531
  }
@@ -11199,6 +11210,9 @@ const buildTable = (config2, componentScope2) => {
11199
11210
  if (config2.maxPageSize) {
11200
11211
  table.config.main.maxPageSize = config2.maxPageSize;
11201
11212
  }
11213
+ if (config2.initialDensity) {
11214
+ table.config.main.initialDensity = config2.initialDensity;
11215
+ }
11202
11216
  return table;
11203
11217
  };
11204
11218
  const Box = {