impaktapps-ui-builder 0.0.366 → 0.0.369
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.
- package/dist/impaktapps-ui-builder.es.js +60 -2
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +1 -1
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildDataGrid.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/runtime/services/downloadFile.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +1 -0
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildDataGrid.ts +45 -0
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +4 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +9 -3
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +1 -0
- package/src/impaktapps-ui-builder/builder/services/component.ts +1 -0
- package/src/impaktapps-ui-builder/builder/services/event.ts +1 -0
- package/src/impaktapps-ui-builder/runtime/services/downloadFile.ts +11 -1
- package/src/impaktapps-ui-builder/runtime/services/service.ts +3 -2
|
@@ -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" },
|
|
@@ -6814,6 +6815,12 @@ const GraphSection = {
|
|
|
6814
6815
|
const buildPropertiesSection = function(type) {
|
|
6815
6816
|
let uiSchema = _.cloneDeep(GraphSection);
|
|
6816
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;
|
|
6817
6824
|
case "Stepper":
|
|
6818
6825
|
uiSchema.elements = [
|
|
6819
6826
|
getRadioInputField("resetButton", "Reset Button", ["YES", "NO"]),
|
|
@@ -7387,7 +7394,8 @@ const sectionLabels = {
|
|
|
7387
7394
|
Text: ["Core", "Properties", "style", "Event", "Validation"],
|
|
7388
7395
|
TextArea: ["Core", "Properties", "style", "Event", "Validation"],
|
|
7389
7396
|
PopUp: ["Core", "Components", "Properties", "style"],
|
|
7390
|
-
Stepper: ["Core", "Components", "Properties", "Event", "style"]
|
|
7397
|
+
Stepper: ["Core", "Components", "Properties", "Event", "style"],
|
|
7398
|
+
DataGrid: ["Core", "Components", "Properties", "Event", "style"]
|
|
7391
7399
|
};
|
|
7392
7400
|
const refreshPage = (type, store2) => {
|
|
7393
7401
|
var _a;
|
|
@@ -8233,6 +8241,15 @@ const downloadFile$1 = (obj) => {
|
|
|
8233
8241
|
URL.revokeObjectURL(url);
|
|
8234
8242
|
document.body.removeChild(link);
|
|
8235
8243
|
};
|
|
8244
|
+
const downloadBlobFile = (response2) => {
|
|
8245
|
+
const url = window.URL.createObjectURL(new Blob([response2.data]));
|
|
8246
|
+
const link = document.createElement("a");
|
|
8247
|
+
link.href = url;
|
|
8248
|
+
link.setAttribute("download", `${response2.headers.data}`);
|
|
8249
|
+
document.body.appendChild(link);
|
|
8250
|
+
link.click();
|
|
8251
|
+
link.parentNode.removeChild(link);
|
|
8252
|
+
};
|
|
8236
8253
|
const executeEvents = async (params2) => {
|
|
8237
8254
|
var _a, _b, _c;
|
|
8238
8255
|
let nextEvent = [];
|
|
@@ -8647,7 +8664,8 @@ var service = (funcParams) => {
|
|
|
8647
8664
|
}
|
|
8648
8665
|
}
|
|
8649
8666
|
},
|
|
8650
|
-
downloadFile: downloadFile$1
|
|
8667
|
+
downloadFile: downloadFile$1,
|
|
8668
|
+
downloadBlobFile
|
|
8651
8669
|
};
|
|
8652
8670
|
};
|
|
8653
8671
|
var leaderBoard = {
|
|
@@ -10436,6 +10454,43 @@ const buildPopUp = (config, componentScope) => {
|
|
|
10436
10454
|
}
|
|
10437
10455
|
return popup;
|
|
10438
10456
|
};
|
|
10457
|
+
const dataGrid = {
|
|
10458
|
+
"type": "Control",
|
|
10459
|
+
"scope": "#/properties/dataGrid",
|
|
10460
|
+
"layout": 12,
|
|
10461
|
+
"options": {
|
|
10462
|
+
"widget": "DataGrid"
|
|
10463
|
+
},
|
|
10464
|
+
elements: [],
|
|
10465
|
+
"config": {
|
|
10466
|
+
"main": {
|
|
10467
|
+
elevation: 0,
|
|
10468
|
+
useWrapper: false
|
|
10469
|
+
},
|
|
10470
|
+
style: {}
|
|
10471
|
+
}
|
|
10472
|
+
};
|
|
10473
|
+
const buildDataGrid = (config, componentScope) => {
|
|
10474
|
+
const DataGrid = _.cloneDeep(dataGrid);
|
|
10475
|
+
DataGrid.scope = componentScope;
|
|
10476
|
+
DataGrid.config.main.useWrapper = config.useWrapper === "NO" ? false : true;
|
|
10477
|
+
if (config.elevation) {
|
|
10478
|
+
DataGrid.config.main.elevation = +config.elevation;
|
|
10479
|
+
}
|
|
10480
|
+
if (config.height) {
|
|
10481
|
+
DataGrid.config.main.height = `${config.height}px`;
|
|
10482
|
+
}
|
|
10483
|
+
if (config.label) {
|
|
10484
|
+
DataGrid.config.main.label = config.label;
|
|
10485
|
+
}
|
|
10486
|
+
if (config.layout) {
|
|
10487
|
+
DataGrid.config.layout = createLayoutFormat(config.layout);
|
|
10488
|
+
}
|
|
10489
|
+
if (config.style) {
|
|
10490
|
+
DataGrid.config.style = JSON.parse(config.style);
|
|
10491
|
+
}
|
|
10492
|
+
return DataGrid;
|
|
10493
|
+
};
|
|
10439
10494
|
let schema = {
|
|
10440
10495
|
type: "object",
|
|
10441
10496
|
properties: {},
|
|
@@ -10554,6 +10609,9 @@ const buildUiSchema = (config) => {
|
|
|
10554
10609
|
let elements = {};
|
|
10555
10610
|
const componentScope = `#/properties/${config.name}`;
|
|
10556
10611
|
switch (config.type) {
|
|
10612
|
+
case "DataGrid":
|
|
10613
|
+
elements = buildDataGrid(config, componentScope);
|
|
10614
|
+
break;
|
|
10557
10615
|
case "Stepper":
|
|
10558
10616
|
elements = buildStepper(config, componentScope);
|
|
10559
10617
|
break;
|