impaktapps-ui-builder 0.0.376 → 0.0.378
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 +51 -12
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +11 -11
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/runtime/services/downloadFile.d.ts +1 -1
- package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +1 -1
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildStepper.ts +5 -2
- package/src/impaktapps-ui-builder/builder/build/buildTable.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +16 -8
- package/src/impaktapps-ui-builder/builder/build/buildWrapperSection.ts +4 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +4 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +14 -0
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +1 -1
- 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 +26 -16
- package/src/impaktapps-ui-builder/runtime/services/events.ts +1 -1
- package/src/impaktapps-ui-builder/runtime/services/service.ts +3 -3
|
@@ -6018,6 +6018,20 @@ const ComponentSchema = {
|
|
|
6018
6018
|
}
|
|
6019
6019
|
}
|
|
6020
6020
|
},
|
|
6021
|
+
sizeHolder: {
|
|
6022
|
+
type: "array",
|
|
6023
|
+
items: {
|
|
6024
|
+
type: "object",
|
|
6025
|
+
properties: {
|
|
6026
|
+
keyName: {
|
|
6027
|
+
type: "string"
|
|
6028
|
+
},
|
|
6029
|
+
value: {
|
|
6030
|
+
type: "string"
|
|
6031
|
+
}
|
|
6032
|
+
}
|
|
6033
|
+
}
|
|
6034
|
+
},
|
|
6021
6035
|
legendLabels: {
|
|
6022
6036
|
type: "array",
|
|
6023
6037
|
items: {
|
|
@@ -6882,10 +6896,10 @@ const buildPropertiesSection = function(type) {
|
|
|
6882
6896
|
case "Stepper":
|
|
6883
6897
|
uiSchema.elements = [
|
|
6884
6898
|
getRadioInputField("resetButton", "Reset Button", ["YES", "NO"]),
|
|
6899
|
+
getRadioInputField("defaultButtonAvailable", "Use Default Buttons ", ["YES", "NO"]),
|
|
6885
6900
|
getInputField("resetText", "Reset Text"),
|
|
6886
6901
|
getInputField("completeText", "Complete Text"),
|
|
6887
6902
|
getSelectField("orientation", "Orientation Type"),
|
|
6888
|
-
EmptyBox,
|
|
6889
6903
|
getArrayControl("sectionLabels", "label")
|
|
6890
6904
|
];
|
|
6891
6905
|
break;
|
|
@@ -6998,7 +7012,8 @@ const buildPropertiesSection = function(type) {
|
|
|
6998
7012
|
getRadioInputField("DragAvailable", "Drag Available", ["YES", "NO"]),
|
|
6999
7013
|
getRadioInputField("downloadAllData", "Download All Data", ["YES", "NO"]),
|
|
7000
7014
|
getInputField("selectKey", "Selection Key"),
|
|
7001
|
-
getArrayControl("Table_Download_Keys_Name", "KeyName", "Table Key Name")
|
|
7015
|
+
getArrayControl("Table_Download_Keys_Name", "KeyName", "Table Key Name"),
|
|
7016
|
+
sizeHolder
|
|
7002
7017
|
];
|
|
7003
7018
|
break;
|
|
7004
7019
|
case "Radio":
|
|
@@ -7451,7 +7466,8 @@ const sectionLabels = {
|
|
|
7451
7466
|
Text: ["Core", "Properties", "style", "Event", "Validation"],
|
|
7452
7467
|
TextArea: ["Core", "Properties", "style", "Event", "Validation"],
|
|
7453
7468
|
PopUp: ["Core", "Components", "Properties", "style"],
|
|
7454
|
-
Stepper: ["Core", "Components", "Properties", "Event", "style"]
|
|
7469
|
+
Stepper: ["Core", "Components", "Properties", "Event", "style"],
|
|
7470
|
+
DataGrid: ["Core", "Components", "Properties", "Event", "style"]
|
|
7455
7471
|
};
|
|
7456
7472
|
const refreshPage = (type, store2) => {
|
|
7457
7473
|
var _a;
|
|
@@ -8298,11 +8314,20 @@ const downloadFile$1 = (obj) => {
|
|
|
8298
8314
|
URL.revokeObjectURL(url);
|
|
8299
8315
|
document.body.removeChild(link);
|
|
8300
8316
|
};
|
|
8301
|
-
const
|
|
8302
|
-
|
|
8317
|
+
const clickDownloadLink = (response2, service2) => {
|
|
8318
|
+
let url = `${service2.defaults.baseURL}/${response2.path}`;
|
|
8319
|
+
if (response2 == null ? void 0 : response2.params) {
|
|
8320
|
+
const keysArray = Object.keys(response2 == null ? void 0 : response2.params);
|
|
8321
|
+
keysArray.map((e, i) => {
|
|
8322
|
+
if (i === 0) {
|
|
8323
|
+
url = url + `?${e}=${response2 == null ? void 0 : response2.params[e]}`;
|
|
8324
|
+
} else {
|
|
8325
|
+
url = url + `&${e}=${response2 == null ? void 0 : response2.params[e]}`;
|
|
8326
|
+
}
|
|
8327
|
+
});
|
|
8328
|
+
}
|
|
8303
8329
|
const link = document.createElement("a");
|
|
8304
8330
|
link.href = url;
|
|
8305
|
-
link.setAttribute("download", `${response2.headers.filename}`);
|
|
8306
8331
|
document.body.appendChild(link);
|
|
8307
8332
|
link.click();
|
|
8308
8333
|
link.parentNode.removeChild(link);
|
|
@@ -8388,7 +8413,7 @@ async function executeInBuiltFunctionHandler(params) {
|
|
|
8388
8413
|
const makeFunc = eval(params.config.funcParametersCode);
|
|
8389
8414
|
parameter = makeFunc(params.store, params.dynamicData, params.userValue, params.parentEventOutput, params.service);
|
|
8390
8415
|
}
|
|
8391
|
-
params.serviceHolder[params.config.inBuiltFunctionType](parameter);
|
|
8416
|
+
params.serviceHolder[params.config.inBuiltFunctionType](parameter, params.service);
|
|
8392
8417
|
}
|
|
8393
8418
|
async function executeCustomHandler(params) {
|
|
8394
8419
|
const makeFunc = eval(params.config.eventCode);
|
|
@@ -8575,7 +8600,7 @@ var service = (funcParams) => {
|
|
|
8575
8600
|
dynamicData: funcParams.dynamicData,
|
|
8576
8601
|
userValue: funcParams.userValue,
|
|
8577
8602
|
service: funcParams.service,
|
|
8578
|
-
serviceHolder: { downloadFile: downloadFile$1, download },
|
|
8603
|
+
serviceHolder: { downloadFile: downloadFile$1, download: clickDownloadLink },
|
|
8579
8604
|
eventGroups
|
|
8580
8605
|
};
|
|
8581
8606
|
return {
|
|
@@ -8722,7 +8747,7 @@ var service = (funcParams) => {
|
|
|
8722
8747
|
}
|
|
8723
8748
|
},
|
|
8724
8749
|
downloadFile: downloadFile$1,
|
|
8725
|
-
download
|
|
8750
|
+
download: clickDownloadLink
|
|
8726
8751
|
};
|
|
8727
8752
|
};
|
|
8728
8753
|
var leaderBoard = {
|
|
@@ -9547,6 +9572,9 @@ const buildWrapperSection = (config, componentScope) => {
|
|
|
9547
9572
|
if (config.style) {
|
|
9548
9573
|
wrapper.config.style = JSON.parse(config.style);
|
|
9549
9574
|
}
|
|
9575
|
+
if (config.layout) {
|
|
9576
|
+
wrapper.config.layout = createLayoutFormat(config.layout);
|
|
9577
|
+
}
|
|
9550
9578
|
return wrapper;
|
|
9551
9579
|
};
|
|
9552
9580
|
var TextInputField = {
|
|
@@ -9730,7 +9758,7 @@ const buildTable = (config, componentScope) => {
|
|
|
9730
9758
|
table.config.main.Selection = config.SelectionAvailable === "YES" ? true : false;
|
|
9731
9759
|
}
|
|
9732
9760
|
if (config.ColumnResizingAvailable) {
|
|
9733
|
-
table.config.main.disableColumnResizing = config.ColumnResizingAvailable === "YES" ?
|
|
9761
|
+
table.config.main.disableColumnResizing = config.ColumnResizingAvailable === "YES" ? false : true;
|
|
9734
9762
|
}
|
|
9735
9763
|
if (config.DragAvailable) {
|
|
9736
9764
|
table.config.main.enableDrag = config.DragAvailable === "YES" ? true : false;
|
|
@@ -10453,11 +10481,14 @@ const buildStepper = (config, componentScope) => {
|
|
|
10453
10481
|
const stepper = _.cloneDeep(Stepper);
|
|
10454
10482
|
stepper.scope = componentScope;
|
|
10455
10483
|
stepper.config.main.resetButton = config.resetButton === "YES" ? true : false;
|
|
10484
|
+
if (config.defaultButtonAvailable) {
|
|
10485
|
+
stepper.config.main.defaultButtonAvailable = config.defaultButtonAvailable === "YES" ? true : false;
|
|
10486
|
+
}
|
|
10456
10487
|
stepper.config.main.resetText = config.resetText || "ResetData";
|
|
10457
10488
|
stepper.config.main.completeText = config.completeText || "Complete Text";
|
|
10458
10489
|
stepper.config.main.orientation = config.orientation || "horizontal";
|
|
10459
10490
|
if (config.sectionLabels) {
|
|
10460
|
-
stepper.config.main.
|
|
10491
|
+
stepper.config.main.steps = config.sectionLabels.map((e, i) => {
|
|
10461
10492
|
return { label: e.label, id: i };
|
|
10462
10493
|
});
|
|
10463
10494
|
}
|
|
@@ -10797,17 +10828,25 @@ const buildUiSchema = (config) => {
|
|
|
10797
10828
|
if ((config == null ? void 0 : config.type) === "LeaderBoard") {
|
|
10798
10829
|
return elements;
|
|
10799
10830
|
} else if (config.type == "Table") {
|
|
10831
|
+
const sizeMap = {};
|
|
10832
|
+
if (config.sizeHolder) {
|
|
10833
|
+
config.sizeHolder.map((e, i) => {
|
|
10834
|
+
sizeMap[e.keyName] = e.value;
|
|
10835
|
+
});
|
|
10836
|
+
}
|
|
10800
10837
|
elements.elements = config.elements.map((e, elemInd) => {
|
|
10801
10838
|
if (e.type) {
|
|
10802
10839
|
return {
|
|
10803
10840
|
accessorKey: e.name,
|
|
10804
10841
|
header: e.label || e.name,
|
|
10842
|
+
size: sizeMap[e.name] || 180,
|
|
10805
10843
|
widget: buildUiSchema(e)
|
|
10806
10844
|
};
|
|
10807
10845
|
}
|
|
10808
10846
|
return {
|
|
10809
10847
|
accessorKey: e.name,
|
|
10810
|
-
header: e.label || e.name
|
|
10848
|
+
header: e.label || e.name,
|
|
10849
|
+
size: sizeMap[e.name] || 180
|
|
10811
10850
|
};
|
|
10812
10851
|
});
|
|
10813
10852
|
} else if (config.type == "Array") {
|