impaktapps-ui-builder 0.0.372 → 0.0.374

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.
@@ -5871,6 +5871,7 @@ const ComponentSchema = {
5871
5871
  { title: "Card", const: "card" },
5872
5872
  { title: "CheckBox", const: "CheckBox" },
5873
5873
  { title: "Container", const: "WrapperSection" },
5874
+ { title: "DataGrid", const: "DataGrid" },
5874
5875
  { title: "Date", const: "Date" },
5875
5876
  { title: "Download File", const: "DownloadFile" },
5876
5877
  { title: "Empty Box", const: "EmptyBox" },
@@ -5999,6 +6000,20 @@ const ComponentSchema = {
5999
6000
  }
6000
6001
  }
6001
6002
  },
6003
+ sizeHolder: {
6004
+ type: "array",
6005
+ items: {
6006
+ type: "object",
6007
+ properties: {
6008
+ keyName: {
6009
+ type: "string"
6010
+ },
6011
+ value: {
6012
+ type: "string"
6013
+ }
6014
+ }
6015
+ }
6016
+ },
6002
6017
  legendLabels: {
6003
6018
  type: "array",
6004
6019
  items: {
@@ -6690,6 +6705,25 @@ const getArrayControl = (parentScope, childScope, childLabel) => {
6690
6705
  }
6691
6706
  };
6692
6707
  };
6708
+ const sizeHolder = getArrayControl("sizeHolder", "keyName", "Component Name");
6709
+ sizeHolder.options.detail.elements[1] = {
6710
+ type: "Control",
6711
+ scope: `#/properties/value`,
6712
+ options: {
6713
+ widget: "InputField"
6714
+ },
6715
+ config: {
6716
+ layout: {
6717
+ xs: 11,
6718
+ sm: 11,
6719
+ md: 5.5,
6720
+ lg: 5.5
6721
+ },
6722
+ main: {
6723
+ label: "Size"
6724
+ }
6725
+ }
6726
+ };
6693
6727
  const getInputField = (scope, label) => {
6694
6728
  return {
6695
6729
  type: "Control",
@@ -6781,13 +6815,19 @@ const GraphSection = {
6781
6815
  const buildPropertiesSection = function(type) {
6782
6816
  let uiSchema = _.cloneDeep(GraphSection);
6783
6817
  switch (type) {
6818
+ case "DataGrid":
6819
+ uiSchema.elements = [
6820
+ getRadioInputField("useWrapper", "use Item Wrapper", ["YES", "NO"]),
6821
+ getInputField("elevation", "Item Wrapper Elevation")
6822
+ ];
6823
+ break;
6784
6824
  case "Stepper":
6785
6825
  uiSchema.elements = [
6786
6826
  getRadioInputField("resetButton", "Reset Button", ["YES", "NO"]),
6827
+ getRadioInputField("defaultButtonAvailable", "Use Default Buttons ", ["YES", "NO"]),
6787
6828
  getInputField("resetText", "Reset Text"),
6788
6829
  getInputField("completeText", "Complete Text"),
6789
6830
  getSelectField("orientation", "Orientation Type"),
6790
- EmptyBox,
6791
6831
  getArrayControl("sectionLabels", "label")
6792
6832
  ];
6793
6833
  break;
@@ -6900,7 +6940,8 @@ const buildPropertiesSection = function(type) {
6900
6940
  getRadioInputField("DragAvailable", "Drag Available", ["YES", "NO"]),
6901
6941
  getRadioInputField("downloadAllData", "Download All Data", ["YES", "NO"]),
6902
6942
  getInputField("selectKey", "Selection Key"),
6903
- getArrayControl("Table_Download_Keys_Name", "KeyName", "Table Key Name")
6943
+ getArrayControl("Table_Download_Keys_Name", "KeyName", "Table Key Name"),
6944
+ sizeHolder
6904
6945
  ];
6905
6946
  break;
6906
6947
  case "Radio":
@@ -7353,7 +7394,8 @@ const sectionLabels = {
7353
7394
  Text: ["Core", "Properties", "style", "Event", "Validation"],
7354
7395
  TextArea: ["Core", "Properties", "style", "Event", "Validation"],
7355
7396
  PopUp: ["Core", "Components", "Properties", "style"],
7356
- Stepper: ["Core", "Components", "Properties", "Event", "style"]
7397
+ Stepper: ["Core", "Components", "Properties", "Event", "style"],
7398
+ DataGrid: ["Core", "Components", "Properties", "Event", "style"]
7357
7399
  };
7358
7400
  const refreshPage = (type, store2) => {
7359
7401
  var _a;
@@ -8204,7 +8246,7 @@ const download = (response2) => {
8204
8246
  const url = window.URL.createObjectURL(new Blob([response2.data]));
8205
8247
  const link = document.createElement("a");
8206
8248
  link.href = url;
8207
- link.setAttribute("download", `${response2.headers.filename}`);
8249
+ link.setAttribute("download", `${response2.headers.data}`);
8208
8250
  document.body.appendChild(link);
8209
8251
  link.click();
8210
8252
  link.parentNode.removeChild(link);
@@ -8477,7 +8519,7 @@ var service = (funcParams) => {
8477
8519
  dynamicData: funcParams.dynamicData,
8478
8520
  userValue: funcParams.userValue,
8479
8521
  service: funcParams.service,
8480
- serviceHolder: { downloadFile: downloadFile$1, download },
8522
+ serviceHolder: { downloadFile: downloadFile$1 },
8481
8523
  eventGroups
8482
8524
  };
8483
8525
  return {
@@ -9449,6 +9491,9 @@ const buildWrapperSection = (config, componentScope) => {
9449
9491
  if (config.style) {
9450
9492
  wrapper.config.style = JSON.parse(config.style);
9451
9493
  }
9494
+ if (config.layout) {
9495
+ wrapper.config.layout = createLayoutFormat(config.layout);
9496
+ }
9452
9497
  return wrapper;
9453
9498
  };
9454
9499
  var TextInputField = {
@@ -9632,7 +9677,7 @@ const buildTable = (config, componentScope) => {
9632
9677
  table.config.main.Selection = config.SelectionAvailable === "YES" ? true : false;
9633
9678
  }
9634
9679
  if (config.ColumnResizingAvailable) {
9635
- table.config.main.disableColumnResizing = config.ColumnResizingAvailable === "YES" ? true : false;
9680
+ table.config.main.disableColumnResizing = config.ColumnResizingAvailable === "YES" ? false : true;
9636
9681
  }
9637
9682
  if (config.DragAvailable) {
9638
9683
  table.config.main.enableDrag = config.DragAvailable === "YES" ? true : false;
@@ -10355,11 +10400,14 @@ const buildStepper = (config, componentScope) => {
10355
10400
  const stepper = _.cloneDeep(Stepper);
10356
10401
  stepper.scope = componentScope;
10357
10402
  stepper.config.main.resetButton = config.resetButton === "YES" ? true : false;
10403
+ if (config.defaultButtonAvailable) {
10404
+ stepper.config.main.defaultButtonAvailable = config.defaultButtonAvailable === "YES" ? true : false;
10405
+ }
10358
10406
  stepper.config.main.resetText = config.resetText || "ResetData";
10359
10407
  stepper.config.main.completeText = config.completeText || "Complete Text";
10360
10408
  stepper.config.main.orientation = config.orientation || "horizontal";
10361
10409
  if (config.sectionLabels) {
10362
- stepper.config.main.label = config.sectionLabels.map((e, i) => {
10410
+ stepper.config.main.steps = config.sectionLabels.map((e, i) => {
10363
10411
  return { label: e.label, id: i };
10364
10412
  });
10365
10413
  }
@@ -10410,6 +10458,43 @@ const buildPopUp = (config, componentScope) => {
10410
10458
  }
10411
10459
  return popup;
10412
10460
  };
10461
+ const dataGrid = {
10462
+ "type": "Control",
10463
+ "scope": "#/properties/dataGrid",
10464
+ "layout": 12,
10465
+ "options": {
10466
+ "widget": "DataGrid"
10467
+ },
10468
+ elements: [],
10469
+ "config": {
10470
+ "main": {
10471
+ elevation: 0,
10472
+ useWrapper: false
10473
+ },
10474
+ style: {}
10475
+ }
10476
+ };
10477
+ const buildDataGrid = (config, componentScope) => {
10478
+ const DataGrid = _.cloneDeep(dataGrid);
10479
+ DataGrid.scope = componentScope;
10480
+ DataGrid.config.main.useWrapper = config.useWrapper === "NO" ? false : true;
10481
+ if (config.elevation) {
10482
+ DataGrid.config.main.elevation = +config.elevation;
10483
+ }
10484
+ if (config.height) {
10485
+ DataGrid.config.main.height = `${config.height}px`;
10486
+ }
10487
+ if (config.label) {
10488
+ DataGrid.config.main.label = config.label;
10489
+ }
10490
+ if (config.layout) {
10491
+ DataGrid.config.layout = createLayoutFormat(config.layout);
10492
+ }
10493
+ if (config.style) {
10494
+ DataGrid.config.style = JSON.parse(config.style);
10495
+ }
10496
+ return DataGrid;
10497
+ };
10413
10498
  let schema = {
10414
10499
  type: "object",
10415
10500
  properties: {},
@@ -10528,6 +10613,9 @@ const buildUiSchema = (config) => {
10528
10613
  let elements = {};
10529
10614
  const componentScope = `#/properties/${config.name}`;
10530
10615
  switch (config.type) {
10616
+ case "DataGrid":
10617
+ elements = buildDataGrid(config, componentScope);
10618
+ break;
10531
10619
  case "Stepper":
10532
10620
  elements = buildStepper(config, componentScope);
10533
10621
  break;
@@ -10653,17 +10741,25 @@ const buildUiSchema = (config) => {
10653
10741
  if ((config == null ? void 0 : config.type) === "LeaderBoard") {
10654
10742
  return elements;
10655
10743
  } else if (config.type == "Table") {
10744
+ const sizeMap = {};
10745
+ if (config.sizeHolder) {
10746
+ config.sizeHolder.map((e, i) => {
10747
+ sizeMap[e.keyName] = e.value;
10748
+ });
10749
+ }
10656
10750
  elements.elements = config.elements.map((e, elemInd) => {
10657
10751
  if (e.type) {
10658
10752
  return {
10659
10753
  accessorKey: e.name,
10660
10754
  header: e.label || e.name,
10755
+ size: sizeMap[e.name] || 180,
10661
10756
  widget: buildUiSchema(e)
10662
10757
  };
10663
10758
  }
10664
10759
  return {
10665
10760
  accessorKey: e.name,
10666
- header: e.label || e.name
10761
+ header: e.label || e.name,
10762
+ size: sizeMap[e.name] || 180
10667
10763
  };
10668
10764
  });
10669
10765
  } else if (config.type == "Array") {