impaktapps-ui-builder 1.0.3 → 1.0.41

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.
Files changed (23) hide show
  1. package/dist/impaktapps-ui-builder.es.js +240 -200
  2. package/dist/impaktapps-ui-builder.es.js.map +1 -1
  3. package/dist/impaktapps-ui-builder.umd.js +7 -7
  4. package/dist/impaktapps-ui-builder.umd.js.map +1 -1
  5. package/dist/src/impaktapps-ui-builder/builder/build/buildArray.d.ts +1 -11
  6. package/dist/src/impaktapps-ui-builder/builder/build/uischema/apiSection.d.ts +1 -3
  7. package/dist/src/impaktapps-ui-builder/builder/build/uischema/coreSection.d.ts +82 -72
  8. package/dist/src/impaktapps-ui-builder/builder/build/uischema/refresh.d.ts +0 -3
  9. package/dist/src/impaktapps-ui-builder/builder/build/uischema/validationSections.d.ts +48 -38
  10. package/dist/src/impaktapps-ui-builder/builder/build/uischema/valueTab.d.ts +0 -3
  11. package/package.json +1 -1
  12. package/src/impaktapps-ui-builder/builder/build/buildArray.ts +20 -15
  13. package/src/impaktapps-ui-builder/builder/build/buildTable.ts +3 -0
  14. package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +0 -6
  15. package/src/impaktapps-ui-builder/builder/build/uischema/apiSection.ts +0 -6
  16. package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +89 -128
  17. package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +58 -119
  18. package/src/impaktapps-ui-builder/builder/build/uischema/refresh.ts +0 -3
  19. package/src/impaktapps-ui-builder/builder/build/uischema/validationSections.ts +58 -113
  20. package/src/impaktapps-ui-builder/builder/build/uischema/valueTab.ts +0 -3
  21. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +60 -118
  22. package/src/impaktapps-ui-builder/builder/services/component.ts +1 -1
  23. package/src/impaktapps-ui-builder/runtime/services/service.ts +7 -8
@@ -6693,53 +6693,64 @@ const componentBasicUiSchema = (theme) => {
6693
6693
  {
6694
6694
  type: "Control",
6695
6695
  scope: "#/properties/layout",
6696
- layout: 12,
6697
- options: {
6698
- detail: {
6699
- type: "HorizontalLayout",
6700
- elements: [
6701
- {
6702
- type: "Control",
6703
- scope: "#/properties/key",
6704
- options: {
6705
- widget: "SelectInputField"
6706
- },
6707
- config: {
6708
- layout: { xs: 6, sm: 6, md: 4, lg: 4 },
6709
- main: {
6710
- label: "Screen Size"
6711
- }
6712
- }
6713
- },
6714
- {
6715
- type: "Control",
6716
- scope: "#/properties/value",
6717
- options: {
6718
- widget: "InputField"
6719
- },
6720
- config: {
6721
- layout: { xs: 6, sm: 6, md: 4, lg: 4 },
6722
- main: {
6723
- label: "Value",
6724
- type: "number",
6725
- helperText: "Number should be in range of 0 to 12",
6726
- errorMessage: "Number Can't be greater than 12 and can't be less than 0."
6727
- }
6728
- }
6729
- },
6730
- {
6731
- type: "Control",
6732
- scope: "#/properties/proc",
6733
- config: {
6734
- layout: { xs: 0, sm: 0, md: 4, lg: 4 }
6735
- },
6736
- options: {
6737
- widget: "EmptyBox"
6738
- }
6696
+ config: {
6697
+ layout: 12,
6698
+ main: {
6699
+ label: "Layout",
6700
+ childElementLabel: "Layout"
6701
+ },
6702
+ style: {
6703
+ marginLeft: "-24px",
6704
+ marginBottom: "24px !important",
6705
+ labelStyle: {
6706
+ marginLeft: "24px"
6707
+ },
6708
+ detailsStyle: {
6709
+ marginLeft: "24px"
6710
+ }
6711
+ }
6712
+ },
6713
+ elements: [
6714
+ {
6715
+ type: "Control",
6716
+ scope: "#/properties/key",
6717
+ options: {
6718
+ widget: "SelectInputField"
6719
+ },
6720
+ config: {
6721
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
6722
+ main: {
6723
+ label: "Screen Size"
6724
+ }
6725
+ }
6726
+ },
6727
+ {
6728
+ type: "Control",
6729
+ scope: "#/properties/value",
6730
+ options: {
6731
+ widget: "InputField"
6732
+ },
6733
+ config: {
6734
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
6735
+ main: {
6736
+ label: "Value",
6737
+ type: "number",
6738
+ helperText: "Number should be in range of 0 to 12",
6739
+ errorMessage: "Number Can't be greater than 12 and can't be less than 0."
6739
6740
  }
6740
- ]
6741
+ }
6742
+ },
6743
+ {
6744
+ type: "Control",
6745
+ scope: "#/properties/proc",
6746
+ config: {
6747
+ layout: { xs: 0, sm: 0, md: 4, lg: 4 }
6748
+ },
6749
+ options: {
6750
+ widget: "EmptyBox"
6751
+ }
6741
6752
  }
6742
- }
6753
+ ]
6743
6754
  }
6744
6755
  ]
6745
6756
  }
@@ -7204,54 +7215,64 @@ const CoreSection = {
7204
7215
  {
7205
7216
  type: "Control",
7206
7217
  scope: "#/properties/layout",
7207
- layout: 12,
7208
- options: {
7209
- "elementLabelProp": "key",
7210
- detail: {
7211
- type: "HorizontalLayout",
7212
- elements: [
7213
- {
7214
- type: "Control",
7215
- scope: "#/properties/key",
7216
- options: {
7217
- widget: "SelectInputField"
7218
- },
7219
- config: {
7220
- layout: { xs: 6, sm: 6, md: 4, lg: 4 },
7221
- main: {
7222
- label: "Screen Size"
7223
- }
7224
- }
7225
- },
7226
- {
7227
- type: "Control",
7228
- scope: "#/properties/value",
7229
- options: {
7230
- widget: "InputField"
7231
- },
7232
- config: {
7233
- layout: { xs: 6, sm: 6, md: 4, lg: 4 },
7234
- main: {
7235
- label: "Value",
7236
- type: "number",
7237
- helperText: "Number should be in range of 0 to 12",
7238
- errorMessage: "Number Can't be greater than 12 and can't be less than 0."
7239
- }
7240
- }
7241
- },
7242
- {
7243
- type: "Control",
7244
- scope: "#/properties/proc",
7245
- config: {
7246
- layout: { xs: 0, sm: 0, md: 4, lg: 4 }
7247
- },
7248
- options: {
7249
- widget: "EmptyBox"
7250
- }
7218
+ config: {
7219
+ layout: 12,
7220
+ main: {
7221
+ label: "Layout",
7222
+ childElementLabel: "Layout"
7223
+ },
7224
+ style: {
7225
+ marginLeft: "-24px",
7226
+ marginBottom: "24px !important",
7227
+ labelStyle: {
7228
+ marginLeft: "24px"
7229
+ },
7230
+ detailsStyle: {
7231
+ marginLeft: "24px"
7232
+ }
7233
+ }
7234
+ },
7235
+ elements: [
7236
+ {
7237
+ type: "Control",
7238
+ scope: "#/properties/key",
7239
+ options: {
7240
+ widget: "SelectInputField"
7241
+ },
7242
+ config: {
7243
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
7244
+ main: {
7245
+ label: "Screen Size"
7251
7246
  }
7252
- ]
7247
+ }
7248
+ },
7249
+ {
7250
+ type: "Control",
7251
+ scope: "#/properties/value",
7252
+ options: {
7253
+ widget: "InputField"
7254
+ },
7255
+ config: {
7256
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
7257
+ main: {
7258
+ label: "Value",
7259
+ type: "number",
7260
+ helperText: "Number should be in range of 0 to 12",
7261
+ errorMessage: "Number Can't be greater than 12 and can't be less than 0."
7262
+ }
7263
+ }
7264
+ },
7265
+ {
7266
+ type: "Control",
7267
+ scope: "#/properties/proc",
7268
+ config: {
7269
+ layout: { xs: 0, sm: 0, md: 4, lg: 4 }
7270
+ },
7271
+ options: {
7272
+ widget: "EmptyBox"
7273
+ }
7253
7274
  }
7254
- }
7275
+ ]
7255
7276
  }
7256
7277
  ]
7257
7278
  };
@@ -7451,44 +7472,55 @@ const emptyBox$1 = (scope, layout) => {
7451
7472
  const cardLayout = {
7452
7473
  type: "Control",
7453
7474
  scope: "#/properties/cardLayout",
7454
- layout: 12,
7455
- options: {
7456
- detail: {
7457
- type: "HorizontalLayout",
7458
- elements: [
7459
- {
7460
- type: "Control",
7461
- scope: "#/properties/key",
7462
- options: {
7463
- widget: "SelectInputField"
7464
- },
7465
- config: {
7466
- layout: { xs: 6, sm: 6, md: 4, lg: 4 },
7467
- main: {
7468
- label: "Screen Size"
7469
- }
7470
- }
7471
- },
7472
- {
7473
- type: "Control",
7474
- scope: "#/properties/value",
7475
- options: {
7476
- widget: "InputField"
7477
- },
7478
- config: {
7479
- layout: { xs: 6, sm: 6, md: 4, lg: 4 },
7480
- main: {
7481
- label: "Value",
7482
- type: "number",
7483
- helperText: "Number should be in range of 0 to 12",
7484
- errorMessage: "Number Can't be greater than 12 and can't be less than 0."
7485
- }
7486
- }
7487
- },
7488
- emptyBox$1("cardEmpty")
7489
- ]
7475
+ config: {
7476
+ layout: 12,
7477
+ main: {
7478
+ label: "Card Layout",
7479
+ childElementLabel: "Card Layout"
7480
+ },
7481
+ style: {
7482
+ marginLeft: "-24px",
7483
+ marginBottom: "24px !important",
7484
+ labelStyle: {
7485
+ marginLeft: "24px"
7486
+ },
7487
+ detailsStyle: {
7488
+ marginLeft: "24px"
7489
+ }
7490
7490
  }
7491
- }
7491
+ },
7492
+ elements: [
7493
+ {
7494
+ type: "Control",
7495
+ scope: "#/properties/key",
7496
+ options: {
7497
+ widget: "SelectInputField"
7498
+ },
7499
+ config: {
7500
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
7501
+ main: {
7502
+ label: "Screen Size"
7503
+ }
7504
+ }
7505
+ },
7506
+ {
7507
+ type: "Control",
7508
+ scope: "#/properties/value",
7509
+ options: {
7510
+ widget: "InputField"
7511
+ },
7512
+ config: {
7513
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
7514
+ main: {
7515
+ label: "Value",
7516
+ type: "number",
7517
+ helperText: "Number should be in range of 0 to 12",
7518
+ errorMessage: "Number Can't be greater than 12 and can't be less than 0."
7519
+ }
7520
+ }
7521
+ },
7522
+ emptyBox$1("cardEmpty")
7523
+ ]
7492
7524
  };
7493
7525
  const getArrayControl = (parentScope, childScope, childLabel) => {
7494
7526
  return {
@@ -7654,6 +7686,14 @@ const BaseSection = {
7654
7686
  const buildPropertiesSection = function(type) {
7655
7687
  let uiSchema = _.cloneDeep(BaseSection);
7656
7688
  switch (type) {
7689
+ case "Array":
7690
+ uiSchema.elements = [
7691
+ getRadioInputField("allExpanded", "Initial Expand", ["YES", "NO"]),
7692
+ getInputField("childElementLabel", "Child Element Label"),
7693
+ emptyBox$1("empty1", { xs: 12, sm: 6, md: 4, lg: 3 }),
7694
+ emptyBox$1("empty2", { xs: 0, sm: 0, md: 4, lg: 3 })
7695
+ ];
7696
+ break;
7657
7697
  case "TreeMap":
7658
7698
  uiSchema.elements = [
7659
7699
  getSelectField("orientation", "orientation"),
@@ -7842,6 +7882,7 @@ const buildPropertiesSection = function(type) {
7842
7882
  getRadioInputField("enableExpanding", "Row Expanding", ["YES", "NO"]),
7843
7883
  getRadioInputField("paginateExpandedRows", "Multi Page Expansion", ["YES", "NO"]),
7844
7884
  getRadioInputField("treeStructure", "Flat Tree Structure", ["YES", "NO"]),
7885
+ getRadioInputField("filterFromLeafRows", "Filter from tree rows", ["YES", "NO"]),
7845
7886
  emptyBox$1("LazyLoadingTableEmpty2"),
7846
7887
  emptyBox$1("LazyLoadingTableEmpty3")
7847
7888
  ]),
@@ -8091,9 +8132,6 @@ const ValueTab = {
8091
8132
  {
8092
8133
  type: "Control",
8093
8134
  scope: "#/properties/value",
8094
- options: {
8095
- widget: "Array"
8096
- },
8097
8135
  config: {
8098
8136
  layout: 12,
8099
8137
  main: {
@@ -8164,51 +8202,61 @@ const ValidationSection = {
8164
8202
  {
8165
8203
  type: "Control",
8166
8204
  scope: "#/properties/validation",
8167
- layout: 11.5,
8168
- options: {
8169
- "elementLabelProp": "validationType",
8170
- detail: {
8171
- type: "HorizontalLayout",
8172
- elements: [
8173
- {
8174
- type: "Control",
8175
- scope: "#/properties/validationType",
8176
- options: {
8177
- widget: "SelectInputField"
8178
- },
8179
- config: {
8180
- layout: { xs: 6, sm: 6, md: 4, lg: 4 },
8181
- main: {
8182
- label: "Validation Type"
8183
- }
8184
- }
8185
- },
8186
- {
8187
- type: "Control",
8188
- scope: "#/properties/validationValue",
8189
- options: {
8190
- widget: "InputField"
8191
- },
8192
- config: {
8193
- layout: { xs: 6, sm: 6, md: 4, lg: 4 },
8194
- main: {
8195
- label: "Validation Value"
8196
- }
8197
- }
8198
- },
8199
- {
8200
- type: "Control",
8201
- scope: "#/properties/emptyBox",
8202
- options: {
8203
- widget: "EmptyBox"
8204
- },
8205
- config: {
8206
- layout: { xs: 0, sm: 0, md: 4 }
8207
- }
8205
+ config: {
8206
+ layout: 12,
8207
+ main: {
8208
+ label: "Validation",
8209
+ childElementLabel: "Validation"
8210
+ },
8211
+ style: {
8212
+ marginLeft: "-24px",
8213
+ marginBottom: "24px !important",
8214
+ labelStyle: {
8215
+ marginLeft: "24px"
8216
+ },
8217
+ detailsStyle: {
8218
+ marginLeft: "24px"
8219
+ }
8220
+ }
8221
+ },
8222
+ elements: [
8223
+ {
8224
+ type: "Control",
8225
+ scope: "#/properties/validationType",
8226
+ options: {
8227
+ widget: "SelectInputField"
8228
+ },
8229
+ config: {
8230
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
8231
+ main: {
8232
+ label: "Validation Type"
8208
8233
  }
8209
- ]
8234
+ }
8235
+ },
8236
+ {
8237
+ type: "Control",
8238
+ scope: "#/properties/validationValue",
8239
+ options: {
8240
+ widget: "InputField"
8241
+ },
8242
+ config: {
8243
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
8244
+ main: {
8245
+ label: "Validation Value"
8246
+ }
8247
+ }
8248
+ },
8249
+ {
8250
+ type: "Control",
8251
+ scope: "#/properties/emptyBox",
8252
+ options: {
8253
+ widget: "EmptyBox"
8254
+ },
8255
+ config: {
8256
+ layout: { xs: 0, sm: 0, md: 4, lg: 4 }
8257
+ }
8210
8258
  }
8211
- }
8259
+ ]
8212
8260
  }
8213
8261
  ]
8214
8262
  };
@@ -8383,7 +8431,7 @@ const sectionLabels = {
8383
8431
  Timer: ["Core", "Events", "Style", "Validation"],
8384
8432
  Rank: ["Core", "Events", "Style", "Validation"],
8385
8433
  Button: ["Core", "Properties", "Events", "Style", "Validation"],
8386
- Array: ["Core", "Components", "Validation"],
8434
+ Array: ["Core", "Components", "Properties", "Validation"],
8387
8435
  Radio: ["Core", "Properties", "Events", "Style", "Validation"],
8388
8436
  Text: ["Core", "Properties", "Events", "Style", "Validation"],
8389
8437
  TextArea: ["Core", "Properties", "Events", "Style", "Validation"],
@@ -9485,9 +9533,6 @@ const APISection = {
9485
9533
  {
9486
9534
  type: "Control",
9487
9535
  scope: "#/properties/headers",
9488
- options: {
9489
- widget: "Array"
9490
- },
9491
9536
  config: {
9492
9537
  layout: 12,
9493
9538
  main: {
@@ -9547,9 +9592,6 @@ const APISection = {
9547
9592
  {
9548
9593
  type: "Control",
9549
9594
  scope: "#/properties/body",
9550
- options: {
9551
- widget: "Array"
9552
- },
9553
9595
  config: {
9554
9596
  layout: 12,
9555
9597
  main: {
@@ -9615,9 +9657,6 @@ const refreshSectionUiSchema = {
9615
9657
  {
9616
9658
  type: "Control",
9617
9659
  scope: "#/properties/refreshElements",
9618
- options: {
9619
- widget: "Array"
9620
- },
9621
9660
  config: {
9622
9661
  layout: 12,
9623
9662
  main: {
@@ -10387,9 +10426,7 @@ var service = (funcParams) => {
10387
10426
  }
10388
10427
  );
10389
10428
  const schema2 = (_m = pageData == null ? void 0 : pageData.schema) != null ? _m : { type: "object", properties: {} };
10390
- const newEventGroups = extractEvents(config2);
10391
- console.log("newEventGroups", newEventGroups, eventGroups);
10392
- eventGroups = newEventGroups;
10429
+ eventGroups = extractEvents(config2);
10393
10430
  executeEventsParameters = {
10394
10431
  config: {},
10395
10432
  componentName: "",
@@ -10399,7 +10436,7 @@ var service = (funcParams) => {
10399
10436
  service: funcParams.service,
10400
10437
  functionsProvider: funcParams.functionsProvider,
10401
10438
  serviceHolder: this,
10402
- eventGroups: newEventGroups,
10439
+ eventGroups,
10403
10440
  formDataHolder
10404
10441
  };
10405
10442
  await executeRefreshHandler({
@@ -10410,7 +10447,7 @@ var service = (funcParams) => {
10410
10447
  userValue: funcParams.userValue,
10411
10448
  service: funcParams.service,
10412
10449
  serviceHolder: this,
10413
- eventGroups: newEventGroups,
10450
+ eventGroups,
10414
10451
  formDataHolder: {}
10415
10452
  });
10416
10453
  funcParams.store.setSchema(
@@ -10509,7 +10546,8 @@ var service = (funcParams) => {
10509
10546
  callExecuteEvents: async function(paramValue, apiBody, eventType) {
10510
10547
  var _a, _b;
10511
10548
  let LastCallResponse = void 0;
10512
- for (const eventConfig of (_a = eventGroups == null ? void 0 : eventGroups[eventType]) == null ? void 0 : _a[paramValue.path]) {
10549
+ const cloneEventGroup = _.cloneDeep(eventGroups);
10550
+ for (const eventConfig of (_a = cloneEventGroup == null ? void 0 : cloneEventGroup[eventType]) == null ? void 0 : _a[paramValue.path]) {
10513
10551
  if (eventConfig.body) {
10514
10552
  eventConfig.body = [
10515
10553
  ...eventConfig.body,
@@ -11177,6 +11215,9 @@ const buildTable = (config2, componentScope2) => {
11177
11215
  if (config2.enableExpandAll) {
11178
11216
  table.config.main.enableExpandAll = config2.enableExpandAll === "YES" ? true : false;
11179
11217
  }
11218
+ if (config2.filterFromLeafRows) {
11219
+ table.config.main.filterFromLeafRows = config2.filterFromLeafRows === "YES" ? true : false;
11220
+ }
11180
11221
  if (config2.paginateExpandedRows) {
11181
11222
  table.config.main.paginateExpandedRows = config2.paginateExpandedRows === "YES" ? true : false;
11182
11223
  }
@@ -11900,15 +11941,18 @@ const ArrayUiSchema = {
11900
11941
  type: "Control",
11901
11942
  scope: "#/properties/adjustments",
11902
11943
  layout: 11.5,
11903
- options: {
11904
- detail: {
11905
- type: "HorizontalLayout",
11906
- elements: []
11907
- }
11908
- }
11944
+ elements: []
11909
11945
  };
11910
11946
  const buildArray = (config2, componentScope2) => {
11911
11947
  const array = _.cloneDeep(ArrayUiSchema);
11948
+ if (config2.allExpanded) {
11949
+ array.config.main.allExpanded = config2.allExpanded === "YES" ? true : false;
11950
+ }
11951
+ if (config2.style) {
11952
+ array.config.style = JSON.parse(config2.style);
11953
+ }
11954
+ array.config.main.childElementLabel = config2.childElementLabel;
11955
+ array.config.main.label = config2.label;
11912
11956
  array.scope = componentScope2;
11913
11957
  return array;
11914
11958
  };
@@ -12571,10 +12615,6 @@ const buildUiSchema = (config2, store2) => {
12571
12615
  elements.elements = rowElements;
12572
12616
  elements.config.action = tableActionElement;
12573
12617
  elements.config.main.headerIcons.elements = tableHeaderElements;
12574
- } else if (config2.type == "Array") {
12575
- elements.options.detail.elements = config2.elements.map((e, elemInd) => {
12576
- return buildUiSchema(e, store2);
12577
- });
12578
12618
  } else {
12579
12619
  elements.elements = config2.elements.map((e, elemInd) => {
12580
12620
  return buildUiSchema(e, store2);