impaktapps-ui-builder 0.0.372 → 0.0.373

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 {
@@ -9632,7 +9674,7 @@ const buildTable = (config, componentScope) => {
9632
9674
  table.config.main.Selection = config.SelectionAvailable === "YES" ? true : false;
9633
9675
  }
9634
9676
  if (config.ColumnResizingAvailable) {
9635
- table.config.main.disableColumnResizing = config.ColumnResizingAvailable === "YES" ? true : false;
9677
+ table.config.main.disableColumnResizing = config.ColumnResizingAvailable === "YES" ? false : true;
9636
9678
  }
9637
9679
  if (config.DragAvailable) {
9638
9680
  table.config.main.enableDrag = config.DragAvailable === "YES" ? true : false;
@@ -10355,11 +10397,14 @@ const buildStepper = (config, componentScope) => {
10355
10397
  const stepper = _.cloneDeep(Stepper);
10356
10398
  stepper.scope = componentScope;
10357
10399
  stepper.config.main.resetButton = config.resetButton === "YES" ? true : false;
10400
+ if (config.defaultButtonAvailable) {
10401
+ stepper.config.main.defaultButtonAvailable = config.defaultButtonAvailable === "YES" ? true : false;
10402
+ }
10358
10403
  stepper.config.main.resetText = config.resetText || "ResetData";
10359
10404
  stepper.config.main.completeText = config.completeText || "Complete Text";
10360
10405
  stepper.config.main.orientation = config.orientation || "horizontal";
10361
10406
  if (config.sectionLabels) {
10362
- stepper.config.main.label = config.sectionLabels.map((e, i) => {
10407
+ stepper.config.main.steps = config.sectionLabels.map((e, i) => {
10363
10408
  return { label: e.label, id: i };
10364
10409
  });
10365
10410
  }
@@ -10410,6 +10455,43 @@ const buildPopUp = (config, componentScope) => {
10410
10455
  }
10411
10456
  return popup;
10412
10457
  };
10458
+ const dataGrid = {
10459
+ "type": "Control",
10460
+ "scope": "#/properties/dataGrid",
10461
+ "layout": 12,
10462
+ "options": {
10463
+ "widget": "DataGrid"
10464
+ },
10465
+ elements: [],
10466
+ "config": {
10467
+ "main": {
10468
+ elevation: 0,
10469
+ useWrapper: false
10470
+ },
10471
+ style: {}
10472
+ }
10473
+ };
10474
+ const buildDataGrid = (config, componentScope) => {
10475
+ const DataGrid = _.cloneDeep(dataGrid);
10476
+ DataGrid.scope = componentScope;
10477
+ DataGrid.config.main.useWrapper = config.useWrapper === "NO" ? false : true;
10478
+ if (config.elevation) {
10479
+ DataGrid.config.main.elevation = +config.elevation;
10480
+ }
10481
+ if (config.height) {
10482
+ DataGrid.config.main.height = `${config.height}px`;
10483
+ }
10484
+ if (config.label) {
10485
+ DataGrid.config.main.label = config.label;
10486
+ }
10487
+ if (config.layout) {
10488
+ DataGrid.config.layout = createLayoutFormat(config.layout);
10489
+ }
10490
+ if (config.style) {
10491
+ DataGrid.config.style = JSON.parse(config.style);
10492
+ }
10493
+ return DataGrid;
10494
+ };
10413
10495
  let schema = {
10414
10496
  type: "object",
10415
10497
  properties: {},
@@ -10528,6 +10610,9 @@ const buildUiSchema = (config) => {
10528
10610
  let elements = {};
10529
10611
  const componentScope = `#/properties/${config.name}`;
10530
10612
  switch (config.type) {
10613
+ case "DataGrid":
10614
+ elements = buildDataGrid(config, componentScope);
10615
+ break;
10531
10616
  case "Stepper":
10532
10617
  elements = buildStepper(config, componentScope);
10533
10618
  break;
@@ -10653,17 +10738,25 @@ const buildUiSchema = (config) => {
10653
10738
  if ((config == null ? void 0 : config.type) === "LeaderBoard") {
10654
10739
  return elements;
10655
10740
  } else if (config.type == "Table") {
10741
+ const sizeMap = {};
10742
+ if (config.sizeHolder) {
10743
+ config.sizeHolder.map((e, i) => {
10744
+ sizeMap[e.keyName] = e.value;
10745
+ });
10746
+ }
10656
10747
  elements.elements = config.elements.map((e, elemInd) => {
10657
10748
  if (e.type) {
10658
10749
  return {
10659
10750
  accessorKey: e.name,
10660
10751
  header: e.label || e.name,
10752
+ size: sizeMap[e.name] || 180,
10661
10753
  widget: buildUiSchema(e)
10662
10754
  };
10663
10755
  }
10664
10756
  return {
10665
10757
  accessorKey: e.name,
10666
- header: e.label || e.name
10758
+ header: e.label || e.name,
10759
+ size: sizeMap[e.name] || 180
10667
10760
  };
10668
10761
  });
10669
10762
  } else if (config.type == "Array") {