impaktapps-ui-builder 0.0.104 → 0.0.105-4.alpha-2

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.
@@ -6475,23 +6475,20 @@ const ComponentSchema = {
6475
6475
  }
6476
6476
  },
6477
6477
  filteringOptions: {
6478
- type: "array",
6479
- items: {
6480
- oneOf: [
6481
- { const: "fuzzy", title: "Fuzzy" },
6482
- { const: "contains", title: "Contain" },
6483
- { const: "startsWith", title: "Starts with" },
6484
- { const: "endsWith", title: "Ends with" },
6485
- { const: "equals", title: "Equals" },
6486
- { const: "notEquals", title: "Not Equals" },
6487
- { const: "between", title: "Between" },
6488
- { const: "betweenInclusive", title: "Between inclusive" },
6489
- { const: "greaterThan", title: "Greater than" },
6490
- { const: "greaterThanOrEqualTo", title: "Greater than or equal to" },
6491
- { const: "lessThan", title: "Less than" },
6492
- { const: "lessThanOrEqualTo", title: "Less than or equal to" }
6493
- ]
6494
- }
6478
+ oneOf: [
6479
+ { const: "fuzzy", title: "Fuzzy" },
6480
+ { const: "contains", title: "Contain" },
6481
+ { const: "startsWith", title: "Starts with" },
6482
+ { const: "endsWith", title: "Ends with" },
6483
+ { const: "equals", title: "Equals" },
6484
+ { const: "notEquals", title: "Not Equals" },
6485
+ { const: "between", title: "Between" },
6486
+ { const: "betweenInclusive", title: "Between inclusive" },
6487
+ { const: "greaterThan", title: "Greater than" },
6488
+ { const: "greaterThanOrEqualTo", title: "Greater than or equal to" },
6489
+ { const: "lessThan", title: "Less than" },
6490
+ { const: "lessThanOrEqualTo", title: "Less than or equal to" }
6491
+ ]
6495
6492
  },
6496
6493
  legendLabels: {
6497
6494
  type: "array",
@@ -6702,20 +6699,47 @@ const componentBasicUiSchema = (theme) => {
6702
6699
  },
6703
6700
  {
6704
6701
  type: "Control",
6705
- scope: "#/properties/columnFormat",
6702
+ scope: "#/properties/proc1",
6703
+ config: {
6704
+ layout: { xs: 0, sm: 0, md: 4, lg: 4 }
6705
+ },
6706
6706
  options: {
6707
- widget: "SelectInputField"
6707
+ widget: "EmptyBox"
6708
+ }
6709
+ },
6710
+ {
6711
+ type: "Control",
6712
+ scope: "#/properties/proc2",
6713
+ config: {
6714
+ layout: { xs: 0, sm: 0, md: 4, lg: 4 }
6708
6715
  },
6716
+ options: {
6717
+ widget: "EmptyBox"
6718
+ }
6719
+ },
6720
+ {
6721
+ type: "Control",
6722
+ scope: "#/properties/proc3",
6709
6723
  config: {
6710
- layout: { xs: 6, sm: 6, md: 4, lg: 4 },
6711
- main: {
6712
- label: "Column Format"
6713
- }
6724
+ layout: { xs: 0, sm: 0, md: 4, lg: 4 }
6725
+ },
6726
+ options: {
6727
+ widget: "EmptyBox"
6728
+ }
6729
+ },
6730
+ {
6731
+ type: "Control",
6732
+ scope: "#/properties/proc4",
6733
+ config: {
6734
+ layout: { xs: 0, sm: 0, md: 4, lg: 4 }
6735
+ },
6736
+ options: {
6737
+ widget: "EmptyBox"
6714
6738
  }
6715
6739
  },
6716
6740
  {
6717
6741
  type: "Control",
6718
- scope: "#/properties/proc",
6742
+ scope: "#/properties/proc5",
6719
6743
  config: {
6720
6744
  layout: { xs: 0, sm: 0, md: 4, lg: 4 }
6721
6745
  },
@@ -6725,7 +6749,7 @@ const componentBasicUiSchema = (theme) => {
6725
6749
  },
6726
6750
  {
6727
6751
  type: "Control",
6728
- scope: "#/properties/proc",
6752
+ scope: "#/properties/proc8",
6729
6753
  config: {
6730
6754
  layout: { xs: 0, sm: 0, md: 4, lg: 4 }
6731
6755
  },
@@ -8431,8 +8455,9 @@ const sectionLabels = {
8431
8455
  Thought: ["Core", "Properties", "Event", "Style", "Validation"]
8432
8456
  };
8433
8457
  function refreshPage(type, store2) {
8434
- var _a;
8458
+ var _a, _b;
8435
8459
  const UiSchema = _.cloneDeep(componentBasicUiSchema(store2.theme.myTheme));
8460
+ const currentConfig = JSON.parse(sessionStorage.getItem("pageFormdata"));
8436
8461
  if (type) {
8437
8462
  const sectionUiSchema = {
8438
8463
  Core: CoreSection,
@@ -8447,6 +8472,81 @@ function refreshPage(type, store2) {
8447
8472
  UiSchema.elements[1].config.main.tabLabels = sectionLabels[type] || ["Core", "Style", "Event", "Validation"];
8448
8473
  UiSchema.elements[1].elements = elements || [CoreSection, StyleSection, EventSection(store2.theme.myTheme), ValidationSection];
8449
8474
  }
8475
+ const path = (_b = store2.searchParams) == null ? void 0 : _b.get("path");
8476
+ const lastDotIndex = path.lastIndexOf(".");
8477
+ const parentPath = path.slice(0, lastDotIndex);
8478
+ const parentObj = _.get(currentConfig, parentPath);
8479
+ if ((parentObj == null ? void 0 : parentObj.type) === "Table") {
8480
+ UiSchema.elements[1].elements[0].elements[3] = {
8481
+ type: "Control",
8482
+ scope: "#/properties/columnFormat",
8483
+ options: {
8484
+ widget: "SelectInputField"
8485
+ },
8486
+ config: {
8487
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
8488
+ main: {
8489
+ label: "Column Format"
8490
+ }
8491
+ }
8492
+ };
8493
+ UiSchema.elements[1].elements[0].elements[4] = {
8494
+ type: "Control",
8495
+ scope: "#/properties/enableFilter",
8496
+ options: {
8497
+ widget: "RadioInputField"
8498
+ },
8499
+ config: {
8500
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
8501
+ main: {
8502
+ label: "Enable Filter",
8503
+ options: ["Yes", "No"]
8504
+ }
8505
+ }
8506
+ }, UiSchema.elements[1].elements[0].elements[5] = {
8507
+ type: "Control",
8508
+ scope: "#/properties/filteringOptions",
8509
+ options: {
8510
+ widget: "SelectInputField"
8511
+ },
8512
+ config: {
8513
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
8514
+ main: {
8515
+ label: "Filter Mode",
8516
+ multiple: true
8517
+ }
8518
+ }
8519
+ };
8520
+ UiSchema.elements[1].elements[0].elements[6] = {
8521
+ type: "Control",
8522
+ scope: "#/properties/enableSorting",
8523
+ options: {
8524
+ widget: "RadioInputField"
8525
+ },
8526
+ config: {
8527
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
8528
+ main: {
8529
+ label: "Enable Sorting",
8530
+ options: ["Yes", "No"]
8531
+ }
8532
+ }
8533
+ }, UiSchema.elements[1].elements[0].elements[7] = {
8534
+ type: "Control",
8535
+ scope: "#/properties/columnKey",
8536
+ options: {
8537
+ widget: "InputField"
8538
+ },
8539
+ config: {
8540
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
8541
+ main: {
8542
+ label: "Column Key",
8543
+ options: [],
8544
+ color: "secondary",
8545
+ required: true
8546
+ }
8547
+ }
8548
+ };
8549
+ }
8450
8550
  if (sessionStorage.getItem("copiedConfig")) {
8451
8551
  this.ElementPathSetter(UiSchema);
8452
8552
  }
@@ -10108,7 +10208,7 @@ var service = (funcParams) => {
10108
10208
  };
10109
10209
  return {
10110
10210
  setPage: async function() {
10111
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
10211
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
10112
10212
  funcParams.store.setFormdata({});
10113
10213
  funcParams.store.newData = {};
10114
10214
  const pageBasicDetailString = sessionStorage.getItem("pagemasterMetaData");
@@ -10123,12 +10223,19 @@ var service = (funcParams) => {
10123
10223
  }));
10124
10224
  }
10125
10225
  const config2 = pageData == null ? void 0 : pageData.config;
10226
+ const pathParts = funcParams.store.location.pathname.split("/");
10227
+ const programId = ((_a = JSON.parse(window.sessionStorage.getItem("ProgramID") || "{}")) == null ? void 0 : _a.value) || "programID";
10228
+ if ((pathParts == null ? void 0 : pathParts[1]) === "page" && (pathParts == null ? void 0 : pathParts[1]) === "program_name") {
10229
+ if (programId !== "programID") {
10230
+ funcParams.store.setFormdata((pre) => ({ ...pre, programId }));
10231
+ }
10232
+ }
10126
10233
  const uiSchema = pageData == null ? void 0 : pageData.uiSchema;
10127
10234
  const event2 = new CustomEvent("pageNameChanged", {
10128
10235
  detail: { pageName: config2.label }
10129
10236
  });
10130
10237
  window.dispatchEvent(event2);
10131
- const theme = (_b = (_a = funcParams == null ? void 0 : funcParams.store) == null ? void 0 : _a.theme) == null ? void 0 : _b.myTheme;
10238
+ const theme = (_c = (_b = funcParams == null ? void 0 : funcParams.store) == null ? void 0 : _b.theme) == null ? void 0 : _c.myTheme;
10132
10239
  uiSchema.elements.push(
10133
10240
  {
10134
10241
  type: "HorizontalLayout",
@@ -10158,7 +10265,7 @@ var service = (funcParams) => {
10158
10265
  heading: "Copywriter@ACT21.IO"
10159
10266
  },
10160
10267
  style: {
10161
- color: ((_d = (_c = theme == null ? void 0 : theme.palette) == null ? void 0 : _c.text) == null ? void 0 : _d.disabled) || "#AFAFAF",
10268
+ color: ((_e = (_d = theme == null ? void 0 : theme.palette) == null ? void 0 : _d.text) == null ? void 0 : _e.disabled) || "#AFAFAF",
10162
10269
  fontSize: "12px",
10163
10270
  textAlign: "center",
10164
10271
  lineHeight: 2,
@@ -10185,7 +10292,7 @@ var service = (funcParams) => {
10185
10292
  width: "fit-content"
10186
10293
  },
10187
10294
  style: {
10188
- fill: (_f = (_e = theme == null ? void 0 : theme.palette) == null ? void 0 : _e.primary) == null ? void 0 : _f.main,
10295
+ fill: (_g = (_f = theme == null ? void 0 : theme.palette) == null ? void 0 : _f.primary) == null ? void 0 : _g.main,
10189
10296
  width: 20,
10190
10297
  height: 0,
10191
10298
  top: 0,
@@ -10194,7 +10301,7 @@ var service = (funcParams) => {
10194
10301
  fontSize: "12px",
10195
10302
  cursor: "pointer",
10196
10303
  ":hover": {
10197
- fill: (_h = (_g = theme == null ? void 0 : theme.palette) == null ? void 0 : _g.primary) == null ? void 0 : _h.dark
10304
+ fill: (_i = (_h = theme == null ? void 0 : theme.palette) == null ? void 0 : _h.primary) == null ? void 0 : _i.dark
10198
10305
  },
10199
10306
  marginRight: "13px"
10200
10307
  }
@@ -10217,7 +10324,7 @@ var service = (funcParams) => {
10217
10324
  lineHeight: 1,
10218
10325
  height: 0,
10219
10326
  width: "fit-content",
10220
- color: (_j = (_i = theme == null ? void 0 : theme.palette) == null ? void 0 : _i.primary) == null ? void 0 : _j.main,
10327
+ color: (_k = (_j = theme == null ? void 0 : theme.palette) == null ? void 0 : _j.primary) == null ? void 0 : _k.main,
10221
10328
  fontSize: "14px",
10222
10329
  cursor: "pointer",
10223
10330
  marginLeft: "2px",
@@ -10225,7 +10332,7 @@ var service = (funcParams) => {
10225
10332
  right: "12px",
10226
10333
  position: "absolute",
10227
10334
  ":hover": {
10228
- color: (_l = (_k = theme == null ? void 0 : theme.palette) == null ? void 0 : _k.primary) == null ? void 0 : _l.dark
10335
+ color: (_m = (_l = theme == null ? void 0 : theme.palette) == null ? void 0 : _l.primary) == null ? void 0 : _m.dark
10229
10336
  },
10230
10337
  marginRight: "4px"
10231
10338
  }
@@ -10234,7 +10341,7 @@ var service = (funcParams) => {
10234
10341
  ]
10235
10342
  }
10236
10343
  );
10237
- const schema2 = (_m = pageData == null ? void 0 : pageData.schema) != null ? _m : { type: "object", properties: {} };
10344
+ const schema2 = (_n = pageData == null ? void 0 : pageData.schema) != null ? _n : { type: "object", properties: {} };
10238
10345
  eventGroups = extractEvents(config2);
10239
10346
  executeEventsParameters = {
10240
10347
  config: {},
@@ -12367,27 +12474,25 @@ const buildUiSchema = (config2, store2) => {
12367
12474
  });
12368
12475
  }
12369
12476
  elements.elements = config2.elements.map((cellElem, elemInd) => {
12370
- var _a, _b;
12477
+ var _a;
12478
+ const commonProperties = {
12479
+ accessorKey: cellElem.name,
12480
+ type: cellElem.columnFormat,
12481
+ header: cellElem.label || cellElem.name,
12482
+ size: sizeMap[cellElem.name] || 180,
12483
+ enableColumnFilter: Object.keys(filterMap).length === 0 ? true : (_a = filterMap[cellElem.name]) != null ? _a : false,
12484
+ columnFilterModeOptions: config2.filteringOptions,
12485
+ enableSorting: config2.enableSorting === "No" ? false : true,
12486
+ columnKey: config2.columnKey
12487
+ };
12371
12488
  if (cellElem.type) {
12372
12489
  return {
12373
- accessorKey: cellElem.name,
12374
- header: cellElem.label || cellElem.name,
12375
- size: sizeMap[cellElem.name] || 180,
12376
- type: cellElem.columnFormat,
12377
12490
  widget: cellElem.type != "ColumnGroup" ? buildUiSchema(cellElem, store2) : void 0,
12378
12491
  elements: cellElem.type == "ColumnGroup" ? cellElem.elements.map((childCellElem) => buildUiSchema(childCellElem, store2)) : [],
12379
- enableColumnFilter: Object.keys(filterMap).length === 0 ? true : (_a = filterMap[cellElem.name]) != null ? _a : false,
12380
- columnFilterModeOptions: config2.filteringOptions
12492
+ ...commonProperties
12381
12493
  };
12382
12494
  } else {
12383
- return {
12384
- accessorKey: cellElem.name,
12385
- type: cellElem.columnFormat,
12386
- header: cellElem.label || cellElem.name,
12387
- size: sizeMap[cellElem.name] || 180,
12388
- enableColumnFilter: Object.keys(filterMap).length === 0 ? true : (_b = filterMap[cellElem.name]) != null ? _b : false,
12389
- columnFilterModeOptions: config2.filteringOptions
12390
- };
12495
+ return commonProperties;
12391
12496
  }
12392
12497
  });
12393
12498
  } else if (config2.type == "Array") {