impaktapps-ui-builder 0.0.374 → 0.0.376
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 +89 -41
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +8 -8
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildDataGrid.ts +7 -1
- package/src/impaktapps-ui-builder/builder/build/buildStepper.ts +2 -5
- package/src/impaktapps-ui-builder/builder/build/buildTable.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +8 -16
- package/src/impaktapps-ui-builder/builder/build/buildWrapperSection.ts +0 -4
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +61 -6
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +21 -14
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +1 -1
- package/src/impaktapps-ui-builder/builder/services/component.ts +0 -1
- package/src/impaktapps-ui-builder/builder/services/event.ts +0 -1
- package/src/impaktapps-ui-builder/runtime/services/downloadFile.ts +8 -8
- package/src/impaktapps-ui-builder/runtime/services/service.ts +2 -2
|
@@ -5933,6 +5933,24 @@ const ComponentSchema = {
|
|
|
5933
5933
|
}
|
|
5934
5934
|
}
|
|
5935
5935
|
},
|
|
5936
|
+
cardLayout: {
|
|
5937
|
+
type: "array",
|
|
5938
|
+
items: {
|
|
5939
|
+
type: "object",
|
|
5940
|
+
properties: {
|
|
5941
|
+
key: {
|
|
5942
|
+
type: "string",
|
|
5943
|
+
oneOf: [
|
|
5944
|
+
{ title: "Extra Small", const: "xs" },
|
|
5945
|
+
{ title: "Small", const: "sm" },
|
|
5946
|
+
{ title: "Medium", const: "md" },
|
|
5947
|
+
{ title: "Large", const: "lg" }
|
|
5948
|
+
]
|
|
5949
|
+
},
|
|
5950
|
+
value: {}
|
|
5951
|
+
}
|
|
5952
|
+
}
|
|
5953
|
+
},
|
|
5936
5954
|
value: {
|
|
5937
5955
|
type: "array",
|
|
5938
5956
|
items: {
|
|
@@ -6000,20 +6018,6 @@ const ComponentSchema = {
|
|
|
6000
6018
|
}
|
|
6001
6019
|
}
|
|
6002
6020
|
},
|
|
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
|
-
},
|
|
6017
6021
|
legendLabels: {
|
|
6018
6022
|
type: "array",
|
|
6019
6023
|
items: {
|
|
@@ -6671,6 +6675,57 @@ const EmptyBox = {
|
|
|
6671
6675
|
main: {}
|
|
6672
6676
|
}
|
|
6673
6677
|
};
|
|
6678
|
+
const cardLayout = {
|
|
6679
|
+
type: "Control",
|
|
6680
|
+
scope: "#/properties/cardLayout",
|
|
6681
|
+
layout: 11.5,
|
|
6682
|
+
options: {
|
|
6683
|
+
detail: {
|
|
6684
|
+
type: "HorizontalLayout",
|
|
6685
|
+
elements: [
|
|
6686
|
+
{
|
|
6687
|
+
type: "Control",
|
|
6688
|
+
scope: "#/properties/key",
|
|
6689
|
+
options: {
|
|
6690
|
+
widget: "SelectInputField"
|
|
6691
|
+
},
|
|
6692
|
+
config: {
|
|
6693
|
+
layout: {
|
|
6694
|
+
xs: 11,
|
|
6695
|
+
sm: 11,
|
|
6696
|
+
md: 5.5,
|
|
6697
|
+
lg: 5.5
|
|
6698
|
+
},
|
|
6699
|
+
main: {
|
|
6700
|
+
label: "Screen Size"
|
|
6701
|
+
}
|
|
6702
|
+
}
|
|
6703
|
+
},
|
|
6704
|
+
{
|
|
6705
|
+
type: "Control",
|
|
6706
|
+
scope: "#/properties/value",
|
|
6707
|
+
options: {
|
|
6708
|
+
widget: "InputField"
|
|
6709
|
+
},
|
|
6710
|
+
config: {
|
|
6711
|
+
layout: {
|
|
6712
|
+
xs: 11,
|
|
6713
|
+
sm: 11,
|
|
6714
|
+
md: 5.5,
|
|
6715
|
+
lg: 5.5
|
|
6716
|
+
},
|
|
6717
|
+
main: {
|
|
6718
|
+
label: "Value",
|
|
6719
|
+
type: "number",
|
|
6720
|
+
helperText: "Number should be in range of 0 to 12",
|
|
6721
|
+
errorMessage: "Number Can't be greater than 12 and can't be less than 0."
|
|
6722
|
+
}
|
|
6723
|
+
}
|
|
6724
|
+
}
|
|
6725
|
+
]
|
|
6726
|
+
}
|
|
6727
|
+
}
|
|
6728
|
+
};
|
|
6674
6729
|
const getArrayControl = (parentScope, childScope, childLabel) => {
|
|
6675
6730
|
return {
|
|
6676
6731
|
type: "Control",
|
|
@@ -6817,17 +6872,20 @@ const buildPropertiesSection = function(type) {
|
|
|
6817
6872
|
switch (type) {
|
|
6818
6873
|
case "DataGrid":
|
|
6819
6874
|
uiSchema.elements = [
|
|
6820
|
-
getRadioInputField("
|
|
6821
|
-
getInputField("elevation", "
|
|
6875
|
+
getRadioInputField("divider", "Use Header divider", ["YES", "NO"]),
|
|
6876
|
+
getInputField("elevation", "Card Elevation"),
|
|
6877
|
+
getInputField("height", "Grid height"),
|
|
6878
|
+
getInputField("justifyContent", "justifyContent"),
|
|
6879
|
+
cardLayout
|
|
6822
6880
|
];
|
|
6823
6881
|
break;
|
|
6824
6882
|
case "Stepper":
|
|
6825
6883
|
uiSchema.elements = [
|
|
6826
6884
|
getRadioInputField("resetButton", "Reset Button", ["YES", "NO"]),
|
|
6827
|
-
getRadioInputField("defaultButtonAvailable", "Use Default Buttons ", ["YES", "NO"]),
|
|
6828
6885
|
getInputField("resetText", "Reset Text"),
|
|
6829
6886
|
getInputField("completeText", "Complete Text"),
|
|
6830
6887
|
getSelectField("orientation", "Orientation Type"),
|
|
6888
|
+
EmptyBox,
|
|
6831
6889
|
getArrayControl("sectionLabels", "label")
|
|
6832
6890
|
];
|
|
6833
6891
|
break;
|
|
@@ -6940,8 +6998,7 @@ const buildPropertiesSection = function(type) {
|
|
|
6940
6998
|
getRadioInputField("DragAvailable", "Drag Available", ["YES", "NO"]),
|
|
6941
6999
|
getRadioInputField("downloadAllData", "Download All Data", ["YES", "NO"]),
|
|
6942
7000
|
getInputField("selectKey", "Selection Key"),
|
|
6943
|
-
getArrayControl("Table_Download_Keys_Name", "KeyName", "Table Key Name")
|
|
6944
|
-
sizeHolder
|
|
7001
|
+
getArrayControl("Table_Download_Keys_Name", "KeyName", "Table Key Name")
|
|
6945
7002
|
];
|
|
6946
7003
|
break;
|
|
6947
7004
|
case "Radio":
|
|
@@ -7394,8 +7451,7 @@ const sectionLabels = {
|
|
|
7394
7451
|
Text: ["Core", "Properties", "style", "Event", "Validation"],
|
|
7395
7452
|
TextArea: ["Core", "Properties", "style", "Event", "Validation"],
|
|
7396
7453
|
PopUp: ["Core", "Components", "Properties", "style"],
|
|
7397
|
-
Stepper: ["Core", "Components", "Properties", "Event", "style"]
|
|
7398
|
-
DataGrid: ["Core", "Components", "Properties", "Event", "style"]
|
|
7454
|
+
Stepper: ["Core", "Components", "Properties", "Event", "style"]
|
|
7399
7455
|
};
|
|
7400
7456
|
const refreshPage = (type, store2) => {
|
|
7401
7457
|
var _a;
|
|
@@ -8246,7 +8302,7 @@ const download = (response2) => {
|
|
|
8246
8302
|
const url = window.URL.createObjectURL(new Blob([response2.data]));
|
|
8247
8303
|
const link = document.createElement("a");
|
|
8248
8304
|
link.href = url;
|
|
8249
|
-
link.setAttribute("download", `${response2.headers.
|
|
8305
|
+
link.setAttribute("download", `${response2.headers.filename}`);
|
|
8250
8306
|
document.body.appendChild(link);
|
|
8251
8307
|
link.click();
|
|
8252
8308
|
link.parentNode.removeChild(link);
|
|
@@ -8519,7 +8575,7 @@ var service = (funcParams) => {
|
|
|
8519
8575
|
dynamicData: funcParams.dynamicData,
|
|
8520
8576
|
userValue: funcParams.userValue,
|
|
8521
8577
|
service: funcParams.service,
|
|
8522
|
-
serviceHolder: { downloadFile: downloadFile$1 },
|
|
8578
|
+
serviceHolder: { downloadFile: downloadFile$1, download },
|
|
8523
8579
|
eventGroups
|
|
8524
8580
|
};
|
|
8525
8581
|
return {
|
|
@@ -9491,9 +9547,6 @@ const buildWrapperSection = (config, componentScope) => {
|
|
|
9491
9547
|
if (config.style) {
|
|
9492
9548
|
wrapper.config.style = JSON.parse(config.style);
|
|
9493
9549
|
}
|
|
9494
|
-
if (config.layout) {
|
|
9495
|
-
wrapper.config.layout = createLayoutFormat(config.layout);
|
|
9496
|
-
}
|
|
9497
9550
|
return wrapper;
|
|
9498
9551
|
};
|
|
9499
9552
|
var TextInputField = {
|
|
@@ -9677,7 +9730,7 @@ const buildTable = (config, componentScope) => {
|
|
|
9677
9730
|
table.config.main.Selection = config.SelectionAvailable === "YES" ? true : false;
|
|
9678
9731
|
}
|
|
9679
9732
|
if (config.ColumnResizingAvailable) {
|
|
9680
|
-
table.config.main.disableColumnResizing = config.ColumnResizingAvailable === "YES" ?
|
|
9733
|
+
table.config.main.disableColumnResizing = config.ColumnResizingAvailable === "YES" ? true : false;
|
|
9681
9734
|
}
|
|
9682
9735
|
if (config.DragAvailable) {
|
|
9683
9736
|
table.config.main.enableDrag = config.DragAvailable === "YES" ? true : false;
|
|
@@ -10400,14 +10453,11 @@ const buildStepper = (config, componentScope) => {
|
|
|
10400
10453
|
const stepper = _.cloneDeep(Stepper);
|
|
10401
10454
|
stepper.scope = componentScope;
|
|
10402
10455
|
stepper.config.main.resetButton = config.resetButton === "YES" ? true : false;
|
|
10403
|
-
if (config.defaultButtonAvailable) {
|
|
10404
|
-
stepper.config.main.defaultButtonAvailable = config.defaultButtonAvailable === "YES" ? true : false;
|
|
10405
|
-
}
|
|
10406
10456
|
stepper.config.main.resetText = config.resetText || "ResetData";
|
|
10407
10457
|
stepper.config.main.completeText = config.completeText || "Complete Text";
|
|
10408
10458
|
stepper.config.main.orientation = config.orientation || "horizontal";
|
|
10409
10459
|
if (config.sectionLabels) {
|
|
10410
|
-
stepper.config.main.
|
|
10460
|
+
stepper.config.main.label = config.sectionLabels.map((e, i) => {
|
|
10411
10461
|
return { label: e.label, id: i };
|
|
10412
10462
|
});
|
|
10413
10463
|
}
|
|
@@ -10477,19 +10527,25 @@ const dataGrid = {
|
|
|
10477
10527
|
const buildDataGrid = (config, componentScope) => {
|
|
10478
10528
|
const DataGrid = _.cloneDeep(dataGrid);
|
|
10479
10529
|
DataGrid.scope = componentScope;
|
|
10480
|
-
DataGrid.config.main.useWrapper = config.useWrapper === "NO" ? false : true;
|
|
10481
10530
|
if (config.elevation) {
|
|
10482
10531
|
DataGrid.config.main.elevation = +config.elevation;
|
|
10483
10532
|
}
|
|
10533
|
+
DataGrid.config.main.divider = config.divider === "NO" ? false : true;
|
|
10484
10534
|
if (config.height) {
|
|
10485
10535
|
DataGrid.config.main.height = `${config.height}px`;
|
|
10486
10536
|
}
|
|
10537
|
+
if (config.justifyContent) {
|
|
10538
|
+
DataGrid.config.main.justifyContent = config.justifyContent;
|
|
10539
|
+
}
|
|
10487
10540
|
if (config.label) {
|
|
10488
10541
|
DataGrid.config.main.label = config.label;
|
|
10489
10542
|
}
|
|
10490
10543
|
if (config.layout) {
|
|
10491
10544
|
DataGrid.config.layout = createLayoutFormat(config.layout);
|
|
10492
10545
|
}
|
|
10546
|
+
if (config.cardLayout) {
|
|
10547
|
+
DataGrid.config.cardLayout = createLayoutFormat(config.cardLayout);
|
|
10548
|
+
}
|
|
10493
10549
|
if (config.style) {
|
|
10494
10550
|
DataGrid.config.style = JSON.parse(config.style);
|
|
10495
10551
|
}
|
|
@@ -10741,25 +10797,17 @@ const buildUiSchema = (config) => {
|
|
|
10741
10797
|
if ((config == null ? void 0 : config.type) === "LeaderBoard") {
|
|
10742
10798
|
return elements;
|
|
10743
10799
|
} 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
|
-
}
|
|
10750
10800
|
elements.elements = config.elements.map((e, elemInd) => {
|
|
10751
10801
|
if (e.type) {
|
|
10752
10802
|
return {
|
|
10753
10803
|
accessorKey: e.name,
|
|
10754
10804
|
header: e.label || e.name,
|
|
10755
|
-
size: sizeMap[e.name] || 180,
|
|
10756
10805
|
widget: buildUiSchema(e)
|
|
10757
10806
|
};
|
|
10758
10807
|
}
|
|
10759
10808
|
return {
|
|
10760
10809
|
accessorKey: e.name,
|
|
10761
|
-
header: e.label || e.name
|
|
10762
|
-
size: sizeMap[e.name] || 180
|
|
10810
|
+
header: e.label || e.name
|
|
10763
10811
|
};
|
|
10764
10812
|
});
|
|
10765
10813
|
} else if (config.type == "Array") {
|