impaktapps-ui-builder 0.0.383 → 0.0.382457
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 +398 -56
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +14 -14
- 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/builder/build/buildPop.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/buildStepper.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 +5 -0
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildButton.ts +2 -0
- package/src/impaktapps-ui-builder/builder/build/buildDataGrid.ts +51 -0
- package/src/impaktapps-ui-builder/builder/build/buildFileInput.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildPop.ts +43 -0
- package/src/impaktapps-ui-builder/builder/build/buildRadio.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildStepper.ts +45 -0
- package/src/impaktapps-ui-builder/builder/build/buildTable.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +28 -8
- package/src/impaktapps-ui-builder/builder/build/buildWrapperSection.ts +9 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +109 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +43 -0
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +7 -3
- package/src/impaktapps-ui-builder/builder/services/component.ts +3 -0
- package/src/impaktapps-ui-builder/builder/services/event.ts +1 -0
- package/src/impaktapps-ui-builder/builder/services/utils.ts +1 -1
- package/src/impaktapps-ui-builder/runtime/services/downloadFile.ts +22 -7
- package/src/impaktapps-ui-builder/runtime/services/events.ts +26 -5
- package/src/impaktapps-ui-builder/runtime/services/service.ts +52 -35
|
@@ -1117,7 +1117,7 @@ var lodash = { exports: {} };
|
|
|
1117
1117
|
}
|
|
1118
1118
|
var runInContext = function runInContext2(context) {
|
|
1119
1119
|
context = context == null ? root : _2.defaults(root.Object(), context, _2.pick(root, contextProps));
|
|
1120
|
-
var Array2 = context.Array, Date = context.Date,
|
|
1120
|
+
var Array2 = context.Array, Date = context.Date, Error2 = context.Error, Function2 = context.Function, Math = context.Math, Object2 = context.Object, RegExp2 = context.RegExp, String = context.String, TypeError = context.TypeError;
|
|
1121
1121
|
var arrayProto = Array2.prototype, funcProto = Function2.prototype, objectProto = Object2.prototype;
|
|
1122
1122
|
var coreJsData = context["__core-js_shared__"];
|
|
1123
1123
|
var funcToString = funcProto.toString;
|
|
@@ -1602,7 +1602,7 @@ var lodash = { exports: {} };
|
|
|
1602
1602
|
if (typeof func != "function") {
|
|
1603
1603
|
throw new TypeError(FUNC_ERROR_TEXT);
|
|
1604
1604
|
}
|
|
1605
|
-
return
|
|
1605
|
+
return setTimeout2(function() {
|
|
1606
1606
|
func.apply(undefined$1, args);
|
|
1607
1607
|
}, wait);
|
|
1608
1608
|
}
|
|
@@ -3433,7 +3433,7 @@ var lodash = { exports: {} };
|
|
|
3433
3433
|
return object[key];
|
|
3434
3434
|
}
|
|
3435
3435
|
var setData = shortOut(baseSetData);
|
|
3436
|
-
var
|
|
3436
|
+
var setTimeout2 = ctxSetTimeout || function(func, wait) {
|
|
3437
3437
|
return root.setTimeout(func, wait);
|
|
3438
3438
|
};
|
|
3439
3439
|
var setToString = shortOut(baseSetToString);
|
|
@@ -4225,7 +4225,7 @@ var lodash = { exports: {} };
|
|
|
4225
4225
|
}
|
|
4226
4226
|
function leadingEdge(time) {
|
|
4227
4227
|
lastInvokeTime = time;
|
|
4228
|
-
timerId =
|
|
4228
|
+
timerId = setTimeout2(timerExpired, wait);
|
|
4229
4229
|
return leading ? invokeFunc(time) : result2;
|
|
4230
4230
|
}
|
|
4231
4231
|
function remainingWait(time) {
|
|
@@ -4241,7 +4241,7 @@ var lodash = { exports: {} };
|
|
|
4241
4241
|
if (shouldInvoke(time)) {
|
|
4242
4242
|
return trailingEdge(time);
|
|
4243
4243
|
}
|
|
4244
|
-
timerId =
|
|
4244
|
+
timerId = setTimeout2(timerExpired, remainingWait(time));
|
|
4245
4245
|
}
|
|
4246
4246
|
function trailingEdge(time) {
|
|
4247
4247
|
timerId = undefined$1;
|
|
@@ -4272,12 +4272,12 @@ var lodash = { exports: {} };
|
|
|
4272
4272
|
}
|
|
4273
4273
|
if (maxing) {
|
|
4274
4274
|
clearTimeout(timerId);
|
|
4275
|
-
timerId =
|
|
4275
|
+
timerId = setTimeout2(timerExpired, wait);
|
|
4276
4276
|
return invokeFunc(lastCallTime);
|
|
4277
4277
|
}
|
|
4278
4278
|
}
|
|
4279
4279
|
if (timerId === undefined$1) {
|
|
4280
|
-
timerId =
|
|
4280
|
+
timerId = setTimeout2(timerExpired, wait);
|
|
4281
4281
|
}
|
|
4282
4282
|
return result2;
|
|
4283
4283
|
}
|
|
@@ -4520,7 +4520,7 @@ var lodash = { exports: {} };
|
|
|
4520
4520
|
}
|
|
4521
4521
|
function isNative(value) {
|
|
4522
4522
|
if (isMaskable(value)) {
|
|
4523
|
-
throw new
|
|
4523
|
+
throw new Error2(CORE_ERROR_TEXT);
|
|
4524
4524
|
}
|
|
4525
4525
|
return baseIsNative(value);
|
|
4526
4526
|
}
|
|
@@ -5061,7 +5061,7 @@ var lodash = { exports: {} };
|
|
|
5061
5061
|
if (!variable) {
|
|
5062
5062
|
source = "with (obj) {\n" + source + "\n}\n";
|
|
5063
5063
|
} else if (reForbiddenIdentifierChars.test(variable)) {
|
|
5064
|
-
throw new
|
|
5064
|
+
throw new Error2(INVALID_TEMPL_VAR_ERROR_TEXT);
|
|
5065
5065
|
}
|
|
5066
5066
|
source = (isEvaluating ? source.replace(reEmptyStringLeading, "") : source).replace(reEmptyStringMiddle, "$1").replace(reEmptyStringTrailing, "$1;");
|
|
5067
5067
|
source = "function(" + (variable || "obj") + ") {\n" + (variable ? "" : "obj || (obj = {});\n") + "var __t, __p = ''" + (isEscaping ? ", __e = _.escape" : "") + (isEvaluating ? ", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n" : ";\n") + source + "return __p\n}";
|
|
@@ -5180,7 +5180,7 @@ var lodash = { exports: {} };
|
|
|
5180
5180
|
try {
|
|
5181
5181
|
return apply(func, undefined$1, args);
|
|
5182
5182
|
} catch (e) {
|
|
5183
|
-
return isError(e) ? e : new
|
|
5183
|
+
return isError(e) ? e : new Error2(e);
|
|
5184
5184
|
}
|
|
5185
5185
|
});
|
|
5186
5186
|
var bindAll = flatRest(function(object, methodNames) {
|
|
@@ -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" },
|
|
@@ -5880,11 +5881,13 @@ const ComponentSchema = {
|
|
|
5880
5881
|
{ title: "LeaderBoard", const: "LeaderBoard" },
|
|
5881
5882
|
{ title: "MultipleSelect", const: "MultipleSelect" },
|
|
5882
5883
|
{ title: "PanCardText", const: "PanCardText" },
|
|
5884
|
+
{ title: "Popup Container", const: "PopUp" },
|
|
5883
5885
|
{ title: "ProgressBar", const: "ProgressBar" },
|
|
5884
5886
|
{ title: "ProgressBar Card", const: "ProgressBarCard" },
|
|
5885
5887
|
{ title: "Select", const: "Select" },
|
|
5886
5888
|
{ title: "Slider", const: "Slider" },
|
|
5887
5889
|
{ title: "SpeedoMeter", const: "SpeedoMeter" },
|
|
5890
|
+
{ title: "Stepper Container", const: "Stepper" },
|
|
5888
5891
|
{ title: "Radio", const: "Radio" },
|
|
5889
5892
|
{ title: "Rank", const: "Rank" },
|
|
5890
5893
|
{ title: "Rank Card", const: "RankCard" },
|
|
@@ -5897,6 +5900,12 @@ const ComponentSchema = {
|
|
|
5897
5900
|
{ title: "Upload File", const: "UploadFile" }
|
|
5898
5901
|
]
|
|
5899
5902
|
},
|
|
5903
|
+
orientation: {
|
|
5904
|
+
oneOf: [
|
|
5905
|
+
{ title: "Horizontal", const: "horizontal" },
|
|
5906
|
+
{ title: "Vertical", const: "vertical" }
|
|
5907
|
+
]
|
|
5908
|
+
},
|
|
5900
5909
|
method: {
|
|
5901
5910
|
type: "string",
|
|
5902
5911
|
oneOf: [
|
|
@@ -5924,6 +5933,24 @@ const ComponentSchema = {
|
|
|
5924
5933
|
}
|
|
5925
5934
|
}
|
|
5926
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
|
+
},
|
|
5927
5954
|
value: {
|
|
5928
5955
|
type: "array",
|
|
5929
5956
|
items: {
|
|
@@ -5991,6 +6018,20 @@ const ComponentSchema = {
|
|
|
5991
6018
|
}
|
|
5992
6019
|
}
|
|
5993
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
|
+
},
|
|
5994
6035
|
legendLabels: {
|
|
5995
6036
|
type: "array",
|
|
5996
6037
|
items: {
|
|
@@ -6648,6 +6689,57 @@ const EmptyBox = {
|
|
|
6648
6689
|
main: {}
|
|
6649
6690
|
}
|
|
6650
6691
|
};
|
|
6692
|
+
const cardLayout = {
|
|
6693
|
+
type: "Control",
|
|
6694
|
+
scope: "#/properties/cardLayout",
|
|
6695
|
+
layout: 11.5,
|
|
6696
|
+
options: {
|
|
6697
|
+
detail: {
|
|
6698
|
+
type: "HorizontalLayout",
|
|
6699
|
+
elements: [
|
|
6700
|
+
{
|
|
6701
|
+
type: "Control",
|
|
6702
|
+
scope: "#/properties/key",
|
|
6703
|
+
options: {
|
|
6704
|
+
widget: "SelectInputField"
|
|
6705
|
+
},
|
|
6706
|
+
config: {
|
|
6707
|
+
layout: {
|
|
6708
|
+
xs: 11,
|
|
6709
|
+
sm: 11,
|
|
6710
|
+
md: 5.5,
|
|
6711
|
+
lg: 5.5
|
|
6712
|
+
},
|
|
6713
|
+
main: {
|
|
6714
|
+
label: "Screen Size"
|
|
6715
|
+
}
|
|
6716
|
+
}
|
|
6717
|
+
},
|
|
6718
|
+
{
|
|
6719
|
+
type: "Control",
|
|
6720
|
+
scope: "#/properties/value",
|
|
6721
|
+
options: {
|
|
6722
|
+
widget: "InputField"
|
|
6723
|
+
},
|
|
6724
|
+
config: {
|
|
6725
|
+
layout: {
|
|
6726
|
+
xs: 11,
|
|
6727
|
+
sm: 11,
|
|
6728
|
+
md: 5.5,
|
|
6729
|
+
lg: 5.5
|
|
6730
|
+
},
|
|
6731
|
+
main: {
|
|
6732
|
+
label: "Value",
|
|
6733
|
+
type: "number",
|
|
6734
|
+
helperText: "Number should be in range of 0 to 12",
|
|
6735
|
+
errorMessage: "Number Can't be greater than 12 and can't be less than 0."
|
|
6736
|
+
}
|
|
6737
|
+
}
|
|
6738
|
+
}
|
|
6739
|
+
]
|
|
6740
|
+
}
|
|
6741
|
+
}
|
|
6742
|
+
};
|
|
6651
6743
|
const getArrayControl = (parentScope, childScope, childLabel) => {
|
|
6652
6744
|
return {
|
|
6653
6745
|
type: "Control",
|
|
@@ -6682,6 +6774,25 @@ const getArrayControl = (parentScope, childScope, childLabel) => {
|
|
|
6682
6774
|
}
|
|
6683
6775
|
};
|
|
6684
6776
|
};
|
|
6777
|
+
const sizeHolder = getArrayControl("sizeHolder", "keyName", "Component Name");
|
|
6778
|
+
sizeHolder.options.detail.elements[1] = {
|
|
6779
|
+
type: "Control",
|
|
6780
|
+
scope: `#/properties/value`,
|
|
6781
|
+
options: {
|
|
6782
|
+
widget: "InputField"
|
|
6783
|
+
},
|
|
6784
|
+
config: {
|
|
6785
|
+
layout: {
|
|
6786
|
+
xs: 11,
|
|
6787
|
+
sm: 11,
|
|
6788
|
+
md: 5.5,
|
|
6789
|
+
lg: 5.5
|
|
6790
|
+
},
|
|
6791
|
+
main: {
|
|
6792
|
+
label: "Size"
|
|
6793
|
+
}
|
|
6794
|
+
}
|
|
6795
|
+
};
|
|
6685
6796
|
const getInputField = (scope, label) => {
|
|
6686
6797
|
return {
|
|
6687
6798
|
type: "Control",
|
|
@@ -6773,6 +6884,33 @@ const GraphSection = {
|
|
|
6773
6884
|
const buildPropertiesSection = function(type) {
|
|
6774
6885
|
let uiSchema = _.cloneDeep(GraphSection);
|
|
6775
6886
|
switch (type) {
|
|
6887
|
+
case "DataGrid":
|
|
6888
|
+
uiSchema.elements = [
|
|
6889
|
+
getRadioInputField("divider", "Use Header divider", ["YES", "NO"]),
|
|
6890
|
+
getInputField("elevation", "Card Elevation"),
|
|
6891
|
+
getInputField("height", "Grid height"),
|
|
6892
|
+
getInputField("justifyContent", "justifyContent"),
|
|
6893
|
+
cardLayout
|
|
6894
|
+
];
|
|
6895
|
+
break;
|
|
6896
|
+
case "Stepper":
|
|
6897
|
+
uiSchema.elements = [
|
|
6898
|
+
getRadioInputField("resetButton", "Reset Button", ["YES", "NO"]),
|
|
6899
|
+
getRadioInputField("defaultButtonAvailable", "Use Default Buttons ", ["YES", "NO"]),
|
|
6900
|
+
getInputField("resetText", "Reset Text"),
|
|
6901
|
+
getInputField("completeText", "Complete Text"),
|
|
6902
|
+
getSelectField("orientation", "Orientation Type"),
|
|
6903
|
+
getArrayControl("sectionLabels", "label")
|
|
6904
|
+
];
|
|
6905
|
+
break;
|
|
6906
|
+
case "PopUp":
|
|
6907
|
+
uiSchema.elements = [
|
|
6908
|
+
getRadioInputField("fullScreen", "FullScreen", ["YES", "NO"]),
|
|
6909
|
+
getRadioInputField("fullWidth", "FullWidth", ["YES", "NO"]),
|
|
6910
|
+
getInputField("maxWidth", "Max. Width"),
|
|
6911
|
+
EmptyBox
|
|
6912
|
+
];
|
|
6913
|
+
break;
|
|
6776
6914
|
case "Text":
|
|
6777
6915
|
uiSchema.elements = [
|
|
6778
6916
|
getInputField("placeholder", "Placeholder"),
|
|
@@ -6874,7 +7012,8 @@ const buildPropertiesSection = function(type) {
|
|
|
6874
7012
|
getRadioInputField("DragAvailable", "Drag Available", ["YES", "NO"]),
|
|
6875
7013
|
getRadioInputField("downloadAllData", "Download All Data", ["YES", "NO"]),
|
|
6876
7014
|
getInputField("selectKey", "Selection Key"),
|
|
6877
|
-
getArrayControl("Table_Download_Keys_Name", "KeyName", "Table Key Name")
|
|
7015
|
+
getArrayControl("Table_Download_Keys_Name", "KeyName", "Table Key Name"),
|
|
7016
|
+
sizeHolder
|
|
6878
7017
|
];
|
|
6879
7018
|
break;
|
|
6880
7019
|
case "Radio":
|
|
@@ -7254,14 +7393,14 @@ const getFormdataFromLocalStorage = (path) => {
|
|
|
7254
7393
|
};
|
|
7255
7394
|
async function saveHandler(store2, service2, submitHandler, pageName) {
|
|
7256
7395
|
var _a, _b;
|
|
7257
|
-
(_a = store2.searchParams) == null ? void 0 : _a.get("id");
|
|
7396
|
+
const id = (_a = store2.searchParams) == null ? void 0 : _a.get("id");
|
|
7258
7397
|
const path = (_b = store2.searchParams) == null ? void 0 : _b.get("path");
|
|
7259
7398
|
saveFormdataInLocalStorage(store2.ctx.core.data, path);
|
|
7260
7399
|
const config = JSON.parse(localStorage.getItem("pageFormdata"));
|
|
7261
7400
|
if (_.isEmpty(store2.ctx.core.errors)) {
|
|
7262
7401
|
try {
|
|
7263
7402
|
const saveReturn = await submitHandler(store2, service2, config);
|
|
7264
|
-
navigateHandler(store2, true, pageName ? `/${pageName}?id=${
|
|
7403
|
+
navigateHandler(store2, true, pageName ? `/${pageName}?id=${id}` : "/PageMasterRecords");
|
|
7265
7404
|
} catch (err) {
|
|
7266
7405
|
navigateHandler(store2, false);
|
|
7267
7406
|
}
|
|
@@ -7325,7 +7464,10 @@ const sectionLabels = {
|
|
|
7325
7464
|
Array: ["Core", "Components", "Validation"],
|
|
7326
7465
|
Radio: ["Core", "Properties", "style", "Event", "Validation"],
|
|
7327
7466
|
Text: ["Core", "Properties", "style", "Event", "Validation"],
|
|
7328
|
-
TextArea: ["Core", "Properties", "style", "Event", "Validation"]
|
|
7467
|
+
TextArea: ["Core", "Properties", "style", "Event", "Validation"],
|
|
7468
|
+
PopUp: ["Core", "Components", "Properties", "style"],
|
|
7469
|
+
Stepper: ["Core", "Components", "Properties", "Event", "style"],
|
|
7470
|
+
DataGrid: ["Core", "Components", "Properties", "Event", "style"]
|
|
7329
7471
|
};
|
|
7330
7472
|
const refreshPage = (type, store2) => {
|
|
7331
7473
|
var _a;
|
|
@@ -7554,12 +7696,14 @@ const EventSchema = {
|
|
|
7554
7696
|
type: "string",
|
|
7555
7697
|
oneOf: [
|
|
7556
7698
|
{ title: "Click Event", const: "onClick" },
|
|
7557
|
-
{ title: "onStart", const: "onStart" },
|
|
7558
7699
|
{ title: "Load Event", const: "onLoad" },
|
|
7559
|
-
{ title: "File Upload Event", const: "onUpload" },
|
|
7560
|
-
{ title: "File Download Event", const: "onDownload" },
|
|
7561
7700
|
{ title: "Change Event", const: "onChange" },
|
|
7562
7701
|
{ title: "Success", const: "Success" },
|
|
7702
|
+
{ title: "onStart", const: "onStart" },
|
|
7703
|
+
{ title: "File Upload Event", const: "onUpload" },
|
|
7704
|
+
{ title: "Back Event", const: "onBack" },
|
|
7705
|
+
{ title: "Next Event", const: "onNext" },
|
|
7706
|
+
{ title: "File Download Event", const: "onDownload" },
|
|
7563
7707
|
{ title: "Fail", const: "Fail" }
|
|
7564
7708
|
]
|
|
7565
7709
|
},
|
|
@@ -7576,7 +7720,8 @@ const EventSchema = {
|
|
|
7576
7720
|
type: "string",
|
|
7577
7721
|
oneOf: [
|
|
7578
7722
|
{ title: "RankProvider", const: "RankProvider" },
|
|
7579
|
-
{ title: "Download File", const: "downloadFile" }
|
|
7723
|
+
{ title: "Download File", const: "downloadFile" },
|
|
7724
|
+
{ title: "Download", const: "download" }
|
|
7580
7725
|
]
|
|
7581
7726
|
},
|
|
7582
7727
|
body: {
|
|
@@ -8169,6 +8314,20 @@ const downloadFile$1 = (obj) => {
|
|
|
8169
8314
|
URL.revokeObjectURL(url);
|
|
8170
8315
|
document.body.removeChild(link);
|
|
8171
8316
|
};
|
|
8317
|
+
const doDownload = (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
|
+
url = url + `${i === 0 ? "?" : "&"}${e}=${response2 == null ? void 0 : response2.params[e]}`;
|
|
8323
|
+
});
|
|
8324
|
+
}
|
|
8325
|
+
const link = document.createElement("a");
|
|
8326
|
+
link.href = url;
|
|
8327
|
+
document.body.appendChild(link);
|
|
8328
|
+
link.click();
|
|
8329
|
+
link.parentNode.removeChild(link);
|
|
8330
|
+
};
|
|
8172
8331
|
const executeEvents = async (params2) => {
|
|
8173
8332
|
var _a, _b, _c;
|
|
8174
8333
|
let nextEvent = [];
|
|
@@ -8195,6 +8354,7 @@ const executeEvents = async (params2) => {
|
|
|
8195
8354
|
return finalResponse;
|
|
8196
8355
|
};
|
|
8197
8356
|
async function executeEventsHandler(params2) {
|
|
8357
|
+
var _a, _b, _c;
|
|
8198
8358
|
if (params2.config.Handler === "api") {
|
|
8199
8359
|
return await executeApiEventHandler(params2);
|
|
8200
8360
|
} else if (params2.config.Handler === "inBuiltFunction") {
|
|
@@ -8212,6 +8372,12 @@ async function executeEventsHandler(params2) {
|
|
|
8212
8372
|
params2.service
|
|
8213
8373
|
);
|
|
8214
8374
|
return result;
|
|
8375
|
+
} else if (params2.config.Handler === "onBackHandler") {
|
|
8376
|
+
return (_a = params2.store.functionParameters) == null ? void 0 : _a.handleBack();
|
|
8377
|
+
} else if (params2.config.Handler === "onNextHandler") {
|
|
8378
|
+
return (_b = params2.store.functionParameters) == null ? void 0 : _b.handleNext();
|
|
8379
|
+
} else if (params2.config.Handler === "onResetHandler") {
|
|
8380
|
+
return (_c = params2.store.functionParameters) == null ? void 0 : _c.handleReset();
|
|
8215
8381
|
}
|
|
8216
8382
|
}
|
|
8217
8383
|
async function executeRefreshHandler(params2) {
|
|
@@ -8276,7 +8442,7 @@ async function mergeFormdata(handlerResponse, componentName, eventConfig, store2
|
|
|
8276
8442
|
...(_a = pre.properties) == null ? void 0 : _a[componentName],
|
|
8277
8443
|
type: "array",
|
|
8278
8444
|
items: {
|
|
8279
|
-
oneOf: handlerResponse.data
|
|
8445
|
+
oneOf: handlerResponse == null ? void 0 : handlerResponse.data
|
|
8280
8446
|
}
|
|
8281
8447
|
}
|
|
8282
8448
|
}
|
|
@@ -8293,7 +8459,7 @@ async function mergeFormdata(handlerResponse, componentName, eventConfig, store2
|
|
|
8293
8459
|
store2.setFormdata((pre) => {
|
|
8294
8460
|
return { ...pre, [componentName]: eventConfig.lazyLoading ? handlerResponse.data.data : handlerResponse.data };
|
|
8295
8461
|
});
|
|
8296
|
-
await
|
|
8462
|
+
await asyncOperation();
|
|
8297
8463
|
}
|
|
8298
8464
|
}
|
|
8299
8465
|
}
|
|
@@ -8367,6 +8533,16 @@ function getRefreshElements(eventConfig, eventGropus) {
|
|
|
8367
8533
|
console.log(result);
|
|
8368
8534
|
return result;
|
|
8369
8535
|
}
|
|
8536
|
+
function asyncOperation() {
|
|
8537
|
+
return new Promise((resolve, reject) => {
|
|
8538
|
+
setTimeout(() => {
|
|
8539
|
+
{
|
|
8540
|
+
resolve("Operation completed successfully!");
|
|
8541
|
+
reject(new Error("Operation failed!"));
|
|
8542
|
+
}
|
|
8543
|
+
}, 50);
|
|
8544
|
+
});
|
|
8545
|
+
}
|
|
8370
8546
|
let compType;
|
|
8371
8547
|
let eventGroups = {};
|
|
8372
8548
|
const notifyUiSchema = {
|
|
@@ -8397,6 +8573,9 @@ const extractEvents = (eventConfig) => {
|
|
|
8397
8573
|
if (!!!SuccessEvent && event2.eventType === "onLoad") {
|
|
8398
8574
|
event2.events.push({ Handler: "mergeFormdata", eventType: "Success", type: compType, lazyLoading: eventConfig.lazyLoading === "YES" ? true : false });
|
|
8399
8575
|
}
|
|
8576
|
+
if (!!!SuccessEvent && (event2.eventType === "onBack" || event2.eventType === "onNext" || event2.eventType === "onReset")) {
|
|
8577
|
+
event2.events.push({ Handler: `${event2.eventType}Handler`, eventType: "Success", type: compType, lazyLoading: eventConfig.lazyLoading === "YES" ? true : false });
|
|
8578
|
+
}
|
|
8400
8579
|
eventGroups[event2.eventType][eventConfigObj.name].push({ ...event2, type: compType });
|
|
8401
8580
|
});
|
|
8402
8581
|
}
|
|
@@ -8417,7 +8596,7 @@ var service = (funcParams) => {
|
|
|
8417
8596
|
dynamicData: funcParams.dynamicData,
|
|
8418
8597
|
userValue: funcParams.userValue,
|
|
8419
8598
|
service: funcParams.service,
|
|
8420
|
-
serviceHolder: { downloadFile: downloadFile$1 },
|
|
8599
|
+
serviceHolder: { downloadFile: downloadFile$1, download: doDownload },
|
|
8421
8600
|
eventGroups
|
|
8422
8601
|
};
|
|
8423
8602
|
return {
|
|
@@ -8455,37 +8634,13 @@ var service = (funcParams) => {
|
|
|
8455
8634
|
});
|
|
8456
8635
|
},
|
|
8457
8636
|
onClick: async function() {
|
|
8458
|
-
|
|
8459
|
-
const path = ((_a = funcParams.dynamicData) == null ? void 0 : _a.tableButtonPath) || funcParams.dynamicData.path.split(".")[0];
|
|
8460
|
-
for (const eventConfig of eventGroups == null ? void 0 : eventGroups.onClick[path]) {
|
|
8461
|
-
await executeEvents({
|
|
8462
|
-
...executeEventsParameters,
|
|
8463
|
-
config: eventConfig,
|
|
8464
|
-
componentName: path
|
|
8465
|
-
});
|
|
8466
|
-
}
|
|
8637
|
+
await this.callHandler("onClick");
|
|
8467
8638
|
},
|
|
8468
|
-
onFileDownload: async ()
|
|
8469
|
-
|
|
8470
|
-
const path = ((_a = funcParams.dynamicData) == null ? void 0 : _a.tableButtonPath) || funcParams.dynamicData.path.split(".")[0];
|
|
8471
|
-
for (const eventConfig of eventGroups == null ? void 0 : eventGroups.onDownload[path]) {
|
|
8472
|
-
await executeEvents({
|
|
8473
|
-
...executeEventsParameters,
|
|
8474
|
-
config: eventConfig,
|
|
8475
|
-
componentName: path
|
|
8476
|
-
});
|
|
8477
|
-
}
|
|
8639
|
+
onFileDownload: async function() {
|
|
8640
|
+
await this.callHandler("onDownload");
|
|
8478
8641
|
},
|
|
8479
|
-
onFileUpload: async ()
|
|
8480
|
-
|
|
8481
|
-
const path = ((_a = funcParams.dynamicData) == null ? void 0 : _a.tableButtonPath) || funcParams.dynamicData.path.split(".")[0];
|
|
8482
|
-
for (const eventConfig of eventGroups == null ? void 0 : eventGroups.onUpload[path]) {
|
|
8483
|
-
await executeEvents({
|
|
8484
|
-
...executeEventsParameters,
|
|
8485
|
-
config: eventConfig,
|
|
8486
|
-
componentName: path
|
|
8487
|
-
});
|
|
8488
|
-
}
|
|
8642
|
+
onFileUpload: async function() {
|
|
8643
|
+
await this.callHandler("onUpload");
|
|
8489
8644
|
},
|
|
8490
8645
|
onPaginationChange: async function(paginationValues) {
|
|
8491
8646
|
var _a;
|
|
@@ -8549,7 +8704,46 @@ var service = (funcParams) => {
|
|
|
8549
8704
|
}
|
|
8550
8705
|
return LastCallResponse;
|
|
8551
8706
|
},
|
|
8552
|
-
|
|
8707
|
+
onBack: async function(functionParameters) {
|
|
8708
|
+
var _a, _b;
|
|
8709
|
+
const path = ((_a = funcParams.dynamicData) == null ? void 0 : _a.tableButtonPath) || funcParams.dynamicData.path.split(".")[0];
|
|
8710
|
+
await this.callHandler("onBack", functionParameters);
|
|
8711
|
+
if (((_b = eventGroups == null ? void 0 : eventGroups["onBack"]) == null ? void 0 : _b[path]) === void 0) {
|
|
8712
|
+
functionParameters == null ? void 0 : functionParameters.handleBack();
|
|
8713
|
+
}
|
|
8714
|
+
},
|
|
8715
|
+
onNext: async function(functionParameters) {
|
|
8716
|
+
var _a, _b;
|
|
8717
|
+
const path = ((_a = funcParams.dynamicData) == null ? void 0 : _a.tableButtonPath) || funcParams.dynamicData.path.split(".")[0];
|
|
8718
|
+
await this.callHandler("onNext", functionParameters);
|
|
8719
|
+
if (((_b = eventGroups == null ? void 0 : eventGroups["onNext"]) == null ? void 0 : _b[path]) === void 0) {
|
|
8720
|
+
functionParameters == null ? void 0 : functionParameters.handleNext();
|
|
8721
|
+
}
|
|
8722
|
+
},
|
|
8723
|
+
onReset: async function(functionParameters) {
|
|
8724
|
+
var _a, _b;
|
|
8725
|
+
const path = ((_a = funcParams.dynamicData) == null ? void 0 : _a.tableButtonPath) || funcParams.dynamicData.path.split(".")[0];
|
|
8726
|
+
await this.callHandler("onReset", functionParameters);
|
|
8727
|
+
if (((_b = eventGroups == null ? void 0 : eventGroups["onReset"]) == null ? void 0 : _b[path]) === void 0) {
|
|
8728
|
+
functionParameters == null ? void 0 : functionParameters.handleReset();
|
|
8729
|
+
}
|
|
8730
|
+
},
|
|
8731
|
+
callHandler: async function(eventType, functionParameters) {
|
|
8732
|
+
var _a, _b, _c;
|
|
8733
|
+
const path = ((_a = funcParams.dynamicData) == null ? void 0 : _a.tableButtonPath) || funcParams.dynamicData.path.split(".")[0];
|
|
8734
|
+
if (((_b = eventGroups == null ? void 0 : eventGroups[eventType]) == null ? void 0 : _b[path]) !== void 0) {
|
|
8735
|
+
for (const eventConfig of (_c = eventGroups == null ? void 0 : eventGroups[eventType]) == null ? void 0 : _c[path]) {
|
|
8736
|
+
executeEventsParameters.store.functionParameters = functionParameters;
|
|
8737
|
+
await executeEvents({
|
|
8738
|
+
...executeEventsParameters,
|
|
8739
|
+
config: eventConfig,
|
|
8740
|
+
componentName: path
|
|
8741
|
+
});
|
|
8742
|
+
}
|
|
8743
|
+
}
|
|
8744
|
+
},
|
|
8745
|
+
downloadFile: downloadFile$1,
|
|
8746
|
+
download: doDownload
|
|
8553
8747
|
};
|
|
8554
8748
|
};
|
|
8555
8749
|
var leaderBoard = {
|
|
@@ -9368,9 +9562,17 @@ var WrapperSection = {
|
|
|
9368
9562
|
elements: []
|
|
9369
9563
|
};
|
|
9370
9564
|
const buildWrapperSection = (config, componentScope) => {
|
|
9565
|
+
console.log("config buildWrapperSection : ", config);
|
|
9566
|
+
console.log("componentScope : ", componentScope);
|
|
9371
9567
|
const wrapper = _.cloneDeep(WrapperSection);
|
|
9372
9568
|
wrapper.config.main.label = config.label;
|
|
9373
9569
|
wrapper.config.main.divider = config.divider === "YES" ? true : false;
|
|
9570
|
+
if (config.style) {
|
|
9571
|
+
wrapper.config.style = JSON.parse(config.style);
|
|
9572
|
+
}
|
|
9573
|
+
if (config.layout) {
|
|
9574
|
+
wrapper.config.layout = createLayoutFormat(config.layout);
|
|
9575
|
+
}
|
|
9374
9576
|
return wrapper;
|
|
9375
9577
|
};
|
|
9376
9578
|
var TextInputField = {
|
|
@@ -9477,6 +9679,8 @@ var Button = {
|
|
|
9477
9679
|
}
|
|
9478
9680
|
};
|
|
9479
9681
|
const buildButton = (config, componentScope) => {
|
|
9682
|
+
console.log("config : ", config);
|
|
9683
|
+
console.log("componentScope : ", componentScope);
|
|
9480
9684
|
const button = _.cloneDeep(Button);
|
|
9481
9685
|
if (config.buttonType) {
|
|
9482
9686
|
button.options.widget = config.buttonType === "IconButton" ? "IconButton" : "Button";
|
|
@@ -9554,7 +9758,7 @@ const buildTable = (config, componentScope) => {
|
|
|
9554
9758
|
table.config.main.Selection = config.SelectionAvailable === "YES" ? true : false;
|
|
9555
9759
|
}
|
|
9556
9760
|
if (config.ColumnResizingAvailable) {
|
|
9557
|
-
table.config.main.disableColumnResizing = config.ColumnResizingAvailable === "YES" ?
|
|
9761
|
+
table.config.main.disableColumnResizing = config.ColumnResizingAvailable === "YES" ? false : true;
|
|
9558
9762
|
}
|
|
9559
9763
|
if (config.DragAvailable) {
|
|
9560
9764
|
table.config.main.enableDrag = config.DragAvailable === "YES" ? true : false;
|
|
@@ -10123,7 +10327,7 @@ const RadioUiSchema = {
|
|
|
10123
10327
|
const buildRadio = (config, componentScope) => {
|
|
10124
10328
|
const Radio = _.cloneDeep(RadioUiSchema);
|
|
10125
10329
|
Radio.scope = componentScope;
|
|
10126
|
-
Radio.config.main.
|
|
10330
|
+
Radio.config.main.label = config.label;
|
|
10127
10331
|
if (config.layout) {
|
|
10128
10332
|
Radio.config.layout = createLayoutFormat(config.layout);
|
|
10129
10333
|
}
|
|
@@ -10248,7 +10452,7 @@ const FileInput = {
|
|
|
10248
10452
|
const buildFileInput = (config, componentScope) => {
|
|
10249
10453
|
const box = _.cloneDeep(FileInput);
|
|
10250
10454
|
box.scope = componentScope;
|
|
10251
|
-
box.config.main.
|
|
10455
|
+
box.config.main.label = config.label;
|
|
10252
10456
|
if (config.layout) {
|
|
10253
10457
|
box.config.layout = createLayoutFormat(config.layout);
|
|
10254
10458
|
}
|
|
@@ -10257,6 +10461,127 @@ const buildFileInput = (config, componentScope) => {
|
|
|
10257
10461
|
}
|
|
10258
10462
|
return box;
|
|
10259
10463
|
};
|
|
10464
|
+
const Stepper = {
|
|
10465
|
+
type: "Control",
|
|
10466
|
+
scope: "#/properties/Stepper",
|
|
10467
|
+
options: {
|
|
10468
|
+
widget: "Stepper"
|
|
10469
|
+
},
|
|
10470
|
+
config: {
|
|
10471
|
+
main: {
|
|
10472
|
+
steps: [{ label: "First" }, { label: "Second" }, { label: "Third" }],
|
|
10473
|
+
resetButton: false,
|
|
10474
|
+
resetText: "Reset",
|
|
10475
|
+
orientation: "vertical"
|
|
10476
|
+
}
|
|
10477
|
+
},
|
|
10478
|
+
"elements": []
|
|
10479
|
+
};
|
|
10480
|
+
const buildStepper = (config, componentScope) => {
|
|
10481
|
+
const stepper = _.cloneDeep(Stepper);
|
|
10482
|
+
stepper.scope = componentScope;
|
|
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
|
+
}
|
|
10487
|
+
stepper.config.main.resetText = config.resetText || "ResetData";
|
|
10488
|
+
stepper.config.main.completeText = config.completeText || "Complete Text";
|
|
10489
|
+
stepper.config.main.orientation = config.orientation || "horizontal";
|
|
10490
|
+
if (config.sectionLabels) {
|
|
10491
|
+
stepper.config.main.steps = config.sectionLabels.map((e, i) => {
|
|
10492
|
+
return { label: e.label, id: i };
|
|
10493
|
+
});
|
|
10494
|
+
}
|
|
10495
|
+
if (config.layout) {
|
|
10496
|
+
stepper.config.layout = createLayoutFormat(config.layout);
|
|
10497
|
+
}
|
|
10498
|
+
if (config.style) {
|
|
10499
|
+
stepper.config.style = JSON.parse(config.style);
|
|
10500
|
+
}
|
|
10501
|
+
return stepper;
|
|
10502
|
+
};
|
|
10503
|
+
const PopUP = {
|
|
10504
|
+
type: "Control",
|
|
10505
|
+
scope: "#/properties/text",
|
|
10506
|
+
options: {
|
|
10507
|
+
widget: "PopUp"
|
|
10508
|
+
},
|
|
10509
|
+
config: {
|
|
10510
|
+
layout: {
|
|
10511
|
+
xs: 12,
|
|
10512
|
+
sm: 12,
|
|
10513
|
+
md: 12,
|
|
10514
|
+
lg: 12
|
|
10515
|
+
},
|
|
10516
|
+
main: {
|
|
10517
|
+
label: "PopUp",
|
|
10518
|
+
fullScreen: false,
|
|
10519
|
+
fullWidth: false,
|
|
10520
|
+
maxWidth: false,
|
|
10521
|
+
alignItems: false,
|
|
10522
|
+
spacing: 2
|
|
10523
|
+
},
|
|
10524
|
+
style: {}
|
|
10525
|
+
}
|
|
10526
|
+
};
|
|
10527
|
+
const buildPopUp = (config, componentScope) => {
|
|
10528
|
+
const popup = _.cloneDeep(PopUP);
|
|
10529
|
+
popup.scope = componentScope;
|
|
10530
|
+
popup.config.main.title = config.label;
|
|
10531
|
+
popup.config.main.fullScreen = config.fullScreen === "YES" ? true : false;
|
|
10532
|
+
popup.config.main.fullWidth = config.fullWidth === "YES" ? true : false;
|
|
10533
|
+
popup.config.main.maxWidth = config.maxWidth || false;
|
|
10534
|
+
if (config.layout) {
|
|
10535
|
+
popup.config.layout = createLayoutFormat(config.layout);
|
|
10536
|
+
}
|
|
10537
|
+
if (config.style) {
|
|
10538
|
+
PopUP.config.style = JSON.parse(config.style);
|
|
10539
|
+
}
|
|
10540
|
+
return popup;
|
|
10541
|
+
};
|
|
10542
|
+
const dataGrid = {
|
|
10543
|
+
"type": "Control",
|
|
10544
|
+
"scope": "#/properties/dataGrid",
|
|
10545
|
+
"layout": 12,
|
|
10546
|
+
"options": {
|
|
10547
|
+
"widget": "DataGrid"
|
|
10548
|
+
},
|
|
10549
|
+
elements: [],
|
|
10550
|
+
"config": {
|
|
10551
|
+
"main": {
|
|
10552
|
+
elevation: 0,
|
|
10553
|
+
useWrapper: false
|
|
10554
|
+
},
|
|
10555
|
+
style: {}
|
|
10556
|
+
}
|
|
10557
|
+
};
|
|
10558
|
+
const buildDataGrid = (config, componentScope) => {
|
|
10559
|
+
const DataGrid = _.cloneDeep(dataGrid);
|
|
10560
|
+
DataGrid.scope = componentScope;
|
|
10561
|
+
if (config.elevation) {
|
|
10562
|
+
DataGrid.config.main.elevation = +config.elevation;
|
|
10563
|
+
}
|
|
10564
|
+
DataGrid.config.main.divider = config.divider === "NO" ? false : true;
|
|
10565
|
+
if (config.height) {
|
|
10566
|
+
DataGrid.config.main.height = `${config.height}px`;
|
|
10567
|
+
}
|
|
10568
|
+
if (config.justifyContent) {
|
|
10569
|
+
DataGrid.config.main.justifyContent = config.justifyContent;
|
|
10570
|
+
}
|
|
10571
|
+
if (config.label) {
|
|
10572
|
+
DataGrid.config.main.label = config.label;
|
|
10573
|
+
}
|
|
10574
|
+
if (config.layout) {
|
|
10575
|
+
DataGrid.config.layout = createLayoutFormat(config.layout);
|
|
10576
|
+
}
|
|
10577
|
+
if (config.cardLayout) {
|
|
10578
|
+
DataGrid.config.cardLayout = createLayoutFormat(config.cardLayout);
|
|
10579
|
+
}
|
|
10580
|
+
if (config.style) {
|
|
10581
|
+
DataGrid.config.style = JSON.parse(config.style);
|
|
10582
|
+
}
|
|
10583
|
+
return DataGrid;
|
|
10584
|
+
};
|
|
10260
10585
|
let schema = {
|
|
10261
10586
|
type: "object",
|
|
10262
10587
|
properties: {},
|
|
@@ -10375,6 +10700,15 @@ const buildUiSchema = (config) => {
|
|
|
10375
10700
|
let elements = {};
|
|
10376
10701
|
const componentScope = `#/properties/${config.name}`;
|
|
10377
10702
|
switch (config.type) {
|
|
10703
|
+
case "DataGrid":
|
|
10704
|
+
elements = buildDataGrid(config, componentScope);
|
|
10705
|
+
break;
|
|
10706
|
+
case "Stepper":
|
|
10707
|
+
elements = buildStepper(config, componentScope);
|
|
10708
|
+
break;
|
|
10709
|
+
case "PopUp":
|
|
10710
|
+
elements = buildPopUp(config, componentScope);
|
|
10711
|
+
break;
|
|
10378
10712
|
case "FileInput":
|
|
10379
10713
|
elements = buildFileInput(config, componentScope);
|
|
10380
10714
|
break;
|
|
@@ -10391,7 +10725,7 @@ const buildUiSchema = (config) => {
|
|
|
10391
10725
|
elements = RunnerBoyProgressbar(config, componentScope);
|
|
10392
10726
|
break;
|
|
10393
10727
|
case "WrapperSection":
|
|
10394
|
-
elements = buildWrapperSection(config);
|
|
10728
|
+
elements = buildWrapperSection(config, componentScope);
|
|
10395
10729
|
break;
|
|
10396
10730
|
case "Text":
|
|
10397
10731
|
elements = buildTextField(config, componentScope);
|
|
@@ -10494,17 +10828,25 @@ const buildUiSchema = (config) => {
|
|
|
10494
10828
|
if ((config == null ? void 0 : config.type) === "LeaderBoard") {
|
|
10495
10829
|
return elements;
|
|
10496
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
|
+
}
|
|
10497
10837
|
elements.elements = config.elements.map((e, elemInd) => {
|
|
10498
10838
|
if (e.type) {
|
|
10499
10839
|
return {
|
|
10500
10840
|
accessorKey: e.name,
|
|
10501
10841
|
header: e.label || e.name,
|
|
10842
|
+
size: sizeMap[e.name] || 180,
|
|
10502
10843
|
widget: buildUiSchema(e)
|
|
10503
10844
|
};
|
|
10504
10845
|
}
|
|
10505
10846
|
return {
|
|
10506
10847
|
accessorKey: e.name,
|
|
10507
|
-
header: e.label || e.name
|
|
10848
|
+
header: e.label || e.name,
|
|
10849
|
+
size: sizeMap[e.name] || 180
|
|
10508
10850
|
};
|
|
10509
10851
|
});
|
|
10510
10852
|
} else if (config.type == "Array") {
|