impaktapps-ui-builder 0.0.382 → 0.0.384-alpha.0
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 +56 -394
- 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/runtime/services/downloadFile.d.ts +0 -1
- package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +0 -5
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildFileInput.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildRadio.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildTable.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +8 -28
- package/src/impaktapps-ui-builder/builder/build/buildWrapperSection.ts +0 -7
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +1 -109
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +0 -43
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +3 -7
- package/src/impaktapps-ui-builder/builder/services/component.ts +0 -3
- package/src/impaktapps-ui-builder/builder/services/event.ts +0 -1
- package/src/impaktapps-ui-builder/builder/services/utils.ts +1 -1
- package/src/impaktapps-ui-builder/runtime/services/downloadFile.ts +7 -22
- package/src/impaktapps-ui-builder/runtime/services/events.ts +6 -27
- package/src/impaktapps-ui-builder/runtime/services/service.ts +35 -52
- package/dist/src/impaktapps-ui-builder/builder/build/buildDataGrid.d.ts +0 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildPop.d.ts +0 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildStepper.d.ts +0 -1
- package/src/impaktapps-ui-builder/builder/build/buildDataGrid.ts +0 -51
- package/src/impaktapps-ui-builder/builder/build/buildPop.ts +0 -43
- package/src/impaktapps-ui-builder/builder/build/buildStepper.ts +0 -45
|
@@ -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, Error = 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 setTimeout(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 setTimeout = 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 = setTimeout(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 = setTimeout(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 = setTimeout(timerExpired, wait);
|
|
4276
4276
|
return invokeFunc(lastCallTime);
|
|
4277
4277
|
}
|
|
4278
4278
|
}
|
|
4279
4279
|
if (timerId === undefined$1) {
|
|
4280
|
-
timerId =
|
|
4280
|
+
timerId = setTimeout(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 Error(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 Error(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 Error(e);
|
|
5184
5184
|
}
|
|
5185
5185
|
});
|
|
5186
5186
|
var bindAll = flatRest(function(object, methodNames) {
|
|
@@ -5871,7 +5871,6 @@ 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" },
|
|
5875
5874
|
{ title: "Date", const: "Date" },
|
|
5876
5875
|
{ title: "Download File", const: "DownloadFile" },
|
|
5877
5876
|
{ title: "Empty Box", const: "EmptyBox" },
|
|
@@ -5881,13 +5880,11 @@ const ComponentSchema = {
|
|
|
5881
5880
|
{ title: "LeaderBoard", const: "LeaderBoard" },
|
|
5882
5881
|
{ title: "MultipleSelect", const: "MultipleSelect" },
|
|
5883
5882
|
{ title: "PanCardText", const: "PanCardText" },
|
|
5884
|
-
{ title: "Popup Container", const: "PopUp" },
|
|
5885
5883
|
{ title: "ProgressBar", const: "ProgressBar" },
|
|
5886
5884
|
{ title: "ProgressBar Card", const: "ProgressBarCard" },
|
|
5887
5885
|
{ title: "Select", const: "Select" },
|
|
5888
5886
|
{ title: "Slider", const: "Slider" },
|
|
5889
5887
|
{ title: "SpeedoMeter", const: "SpeedoMeter" },
|
|
5890
|
-
{ title: "Stepper Container", const: "Stepper" },
|
|
5891
5888
|
{ title: "Radio", const: "Radio" },
|
|
5892
5889
|
{ title: "Rank", const: "Rank" },
|
|
5893
5890
|
{ title: "Rank Card", const: "RankCard" },
|
|
@@ -5900,12 +5897,6 @@ const ComponentSchema = {
|
|
|
5900
5897
|
{ title: "Upload File", const: "UploadFile" }
|
|
5901
5898
|
]
|
|
5902
5899
|
},
|
|
5903
|
-
orientation: {
|
|
5904
|
-
oneOf: [
|
|
5905
|
-
{ title: "Horizontal", const: "horizontal" },
|
|
5906
|
-
{ title: "Vertical", const: "vertical" }
|
|
5907
|
-
]
|
|
5908
|
-
},
|
|
5909
5900
|
method: {
|
|
5910
5901
|
type: "string",
|
|
5911
5902
|
oneOf: [
|
|
@@ -5933,24 +5924,6 @@ const ComponentSchema = {
|
|
|
5933
5924
|
}
|
|
5934
5925
|
}
|
|
5935
5926
|
},
|
|
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
|
-
},
|
|
5954
5927
|
value: {
|
|
5955
5928
|
type: "array",
|
|
5956
5929
|
items: {
|
|
@@ -6018,20 +5991,6 @@ const ComponentSchema = {
|
|
|
6018
5991
|
}
|
|
6019
5992
|
}
|
|
6020
5993
|
},
|
|
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
|
-
},
|
|
6035
5994
|
legendLabels: {
|
|
6036
5995
|
type: "array",
|
|
6037
5996
|
items: {
|
|
@@ -6689,57 +6648,6 @@ const EmptyBox = {
|
|
|
6689
6648
|
main: {}
|
|
6690
6649
|
}
|
|
6691
6650
|
};
|
|
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
|
-
};
|
|
6743
6651
|
const getArrayControl = (parentScope, childScope, childLabel) => {
|
|
6744
6652
|
return {
|
|
6745
6653
|
type: "Control",
|
|
@@ -6774,25 +6682,6 @@ const getArrayControl = (parentScope, childScope, childLabel) => {
|
|
|
6774
6682
|
}
|
|
6775
6683
|
};
|
|
6776
6684
|
};
|
|
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
|
-
};
|
|
6796
6685
|
const getInputField = (scope, label) => {
|
|
6797
6686
|
return {
|
|
6798
6687
|
type: "Control",
|
|
@@ -6884,33 +6773,6 @@ const GraphSection = {
|
|
|
6884
6773
|
const buildPropertiesSection = function(type) {
|
|
6885
6774
|
let uiSchema = _.cloneDeep(GraphSection);
|
|
6886
6775
|
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;
|
|
6914
6776
|
case "Text":
|
|
6915
6777
|
uiSchema.elements = [
|
|
6916
6778
|
getInputField("placeholder", "Placeholder"),
|
|
@@ -7012,8 +6874,7 @@ const buildPropertiesSection = function(type) {
|
|
|
7012
6874
|
getRadioInputField("DragAvailable", "Drag Available", ["YES", "NO"]),
|
|
7013
6875
|
getRadioInputField("downloadAllData", "Download All Data", ["YES", "NO"]),
|
|
7014
6876
|
getInputField("selectKey", "Selection Key"),
|
|
7015
|
-
getArrayControl("Table_Download_Keys_Name", "KeyName", "Table Key Name")
|
|
7016
|
-
sizeHolder
|
|
6877
|
+
getArrayControl("Table_Download_Keys_Name", "KeyName", "Table Key Name")
|
|
7017
6878
|
];
|
|
7018
6879
|
break;
|
|
7019
6880
|
case "Radio":
|
|
@@ -7393,14 +7254,14 @@ const getFormdataFromLocalStorage = (path) => {
|
|
|
7393
7254
|
};
|
|
7394
7255
|
async function saveHandler(store2, service2, submitHandler, pageName) {
|
|
7395
7256
|
var _a, _b;
|
|
7396
|
-
|
|
7257
|
+
(_a = store2.searchParams) == null ? void 0 : _a.get("id");
|
|
7397
7258
|
const path = (_b = store2.searchParams) == null ? void 0 : _b.get("path");
|
|
7398
7259
|
saveFormdataInLocalStorage(store2.ctx.core.data, path);
|
|
7399
7260
|
const config = JSON.parse(localStorage.getItem("pageFormdata"));
|
|
7400
7261
|
if (_.isEmpty(store2.ctx.core.errors)) {
|
|
7401
7262
|
try {
|
|
7402
7263
|
const saveReturn = await submitHandler(store2, service2, config);
|
|
7403
|
-
navigateHandler(store2, true, pageName ? `/${pageName}?id=${id}` : "/PageMasterRecords");
|
|
7264
|
+
navigateHandler(store2, true, pageName ? `/${pageName}?id=${saveReturn.id}` : "/PageMasterRecords");
|
|
7404
7265
|
} catch (err) {
|
|
7405
7266
|
navigateHandler(store2, false);
|
|
7406
7267
|
}
|
|
@@ -7464,10 +7325,7 @@ const sectionLabels = {
|
|
|
7464
7325
|
Array: ["Core", "Components", "Validation"],
|
|
7465
7326
|
Radio: ["Core", "Properties", "style", "Event", "Validation"],
|
|
7466
7327
|
Text: ["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"]
|
|
7328
|
+
TextArea: ["Core", "Properties", "style", "Event", "Validation"]
|
|
7471
7329
|
};
|
|
7472
7330
|
const refreshPage = (type, store2) => {
|
|
7473
7331
|
var _a;
|
|
@@ -7696,14 +7554,12 @@ const EventSchema = {
|
|
|
7696
7554
|
type: "string",
|
|
7697
7555
|
oneOf: [
|
|
7698
7556
|
{ title: "Click Event", const: "onClick" },
|
|
7699
|
-
{ title: "Load Event", const: "onLoad" },
|
|
7700
|
-
{ title: "Change Event", const: "onChange" },
|
|
7701
|
-
{ title: "Success", const: "Success" },
|
|
7702
7557
|
{ title: "onStart", const: "onStart" },
|
|
7558
|
+
{ title: "Load Event", const: "onLoad" },
|
|
7703
7559
|
{ title: "File Upload Event", const: "onUpload" },
|
|
7704
|
-
{ title: "Back Event", const: "onBack" },
|
|
7705
|
-
{ title: "Next Event", const: "onNext" },
|
|
7706
7560
|
{ title: "File Download Event", const: "onDownload" },
|
|
7561
|
+
{ title: "Change Event", const: "onChange" },
|
|
7562
|
+
{ title: "Success", const: "Success" },
|
|
7707
7563
|
{ title: "Fail", const: "Fail" }
|
|
7708
7564
|
]
|
|
7709
7565
|
},
|
|
@@ -7720,8 +7576,7 @@ const EventSchema = {
|
|
|
7720
7576
|
type: "string",
|
|
7721
7577
|
oneOf: [
|
|
7722
7578
|
{ title: "RankProvider", const: "RankProvider" },
|
|
7723
|
-
{ title: "Download File", const: "downloadFile" }
|
|
7724
|
-
{ title: "Download", const: "download" }
|
|
7579
|
+
{ title: "Download File", const: "downloadFile" }
|
|
7725
7580
|
]
|
|
7726
7581
|
},
|
|
7727
7582
|
body: {
|
|
@@ -8314,20 +8169,6 @@ const downloadFile$1 = (obj) => {
|
|
|
8314
8169
|
URL.revokeObjectURL(url);
|
|
8315
8170
|
document.body.removeChild(link);
|
|
8316
8171
|
};
|
|
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
|
-
};
|
|
8331
8172
|
const executeEvents = async (params2) => {
|
|
8332
8173
|
var _a, _b, _c;
|
|
8333
8174
|
let nextEvent = [];
|
|
@@ -8354,7 +8195,6 @@ const executeEvents = async (params2) => {
|
|
|
8354
8195
|
return finalResponse;
|
|
8355
8196
|
};
|
|
8356
8197
|
async function executeEventsHandler(params2) {
|
|
8357
|
-
var _a, _b, _c;
|
|
8358
8198
|
if (params2.config.Handler === "api") {
|
|
8359
8199
|
return await executeApiEventHandler(params2);
|
|
8360
8200
|
} else if (params2.config.Handler === "inBuiltFunction") {
|
|
@@ -8372,12 +8212,6 @@ async function executeEventsHandler(params2) {
|
|
|
8372
8212
|
params2.service
|
|
8373
8213
|
);
|
|
8374
8214
|
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();
|
|
8381
8215
|
}
|
|
8382
8216
|
}
|
|
8383
8217
|
async function executeRefreshHandler(params2) {
|
|
@@ -8409,7 +8243,7 @@ async function executeInBuiltFunctionHandler(params) {
|
|
|
8409
8243
|
const makeFunc = eval(params.config.funcParametersCode);
|
|
8410
8244
|
parameter = makeFunc(params.store, params.dynamicData, params.userValue, params.parentEventOutput, params.service);
|
|
8411
8245
|
}
|
|
8412
|
-
params.serviceHolder[params.config.inBuiltFunctionType](parameter
|
|
8246
|
+
params.serviceHolder[params.config.inBuiltFunctionType](parameter);
|
|
8413
8247
|
}
|
|
8414
8248
|
async function executeCustomHandler(params) {
|
|
8415
8249
|
const makeFunc = eval(params.config.eventCode);
|
|
@@ -8442,7 +8276,7 @@ async function mergeFormdata(handlerResponse, componentName, eventConfig, store2
|
|
|
8442
8276
|
...(_a = pre.properties) == null ? void 0 : _a[componentName],
|
|
8443
8277
|
type: "array",
|
|
8444
8278
|
items: {
|
|
8445
|
-
oneOf: handlerResponse
|
|
8279
|
+
oneOf: handlerResponse.data
|
|
8446
8280
|
}
|
|
8447
8281
|
}
|
|
8448
8282
|
}
|
|
@@ -8459,7 +8293,7 @@ async function mergeFormdata(handlerResponse, componentName, eventConfig, store2
|
|
|
8459
8293
|
store2.setFormdata((pre) => {
|
|
8460
8294
|
return { ...pre, [componentName]: eventConfig.lazyLoading ? handlerResponse.data.data : handlerResponse.data };
|
|
8461
8295
|
});
|
|
8462
|
-
await
|
|
8296
|
+
await service2.get("https://jsonplaceholder.typicode.com/posts/1");
|
|
8463
8297
|
}
|
|
8464
8298
|
}
|
|
8465
8299
|
}
|
|
@@ -8533,16 +8367,6 @@ function getRefreshElements(eventConfig, eventGropus) {
|
|
|
8533
8367
|
console.log(result);
|
|
8534
8368
|
return result;
|
|
8535
8369
|
}
|
|
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
|
-
}
|
|
8546
8370
|
let compType;
|
|
8547
8371
|
let eventGroups = {};
|
|
8548
8372
|
const notifyUiSchema = {
|
|
@@ -8573,9 +8397,6 @@ const extractEvents = (eventConfig) => {
|
|
|
8573
8397
|
if (!!!SuccessEvent && event2.eventType === "onLoad") {
|
|
8574
8398
|
event2.events.push({ Handler: "mergeFormdata", eventType: "Success", type: compType, lazyLoading: eventConfig.lazyLoading === "YES" ? true : false });
|
|
8575
8399
|
}
|
|
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
|
-
}
|
|
8579
8400
|
eventGroups[event2.eventType][eventConfigObj.name].push({ ...event2, type: compType });
|
|
8580
8401
|
});
|
|
8581
8402
|
}
|
|
@@ -8596,7 +8417,7 @@ var service = (funcParams) => {
|
|
|
8596
8417
|
dynamicData: funcParams.dynamicData,
|
|
8597
8418
|
userValue: funcParams.userValue,
|
|
8598
8419
|
service: funcParams.service,
|
|
8599
|
-
serviceHolder: { downloadFile: downloadFile$1
|
|
8420
|
+
serviceHolder: { downloadFile: downloadFile$1 },
|
|
8600
8421
|
eventGroups
|
|
8601
8422
|
};
|
|
8602
8423
|
return {
|
|
@@ -8634,13 +8455,37 @@ var service = (funcParams) => {
|
|
|
8634
8455
|
});
|
|
8635
8456
|
},
|
|
8636
8457
|
onClick: async function() {
|
|
8637
|
-
|
|
8458
|
+
var _a;
|
|
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
|
+
}
|
|
8638
8467
|
},
|
|
8639
|
-
onFileDownload: async
|
|
8640
|
-
|
|
8468
|
+
onFileDownload: async () => {
|
|
8469
|
+
var _a;
|
|
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
|
+
}
|
|
8641
8478
|
},
|
|
8642
|
-
onFileUpload: async
|
|
8643
|
-
|
|
8479
|
+
onFileUpload: async () => {
|
|
8480
|
+
var _a;
|
|
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
|
+
}
|
|
8644
8489
|
},
|
|
8645
8490
|
onPaginationChange: async function(paginationValues) {
|
|
8646
8491
|
var _a;
|
|
@@ -8704,46 +8549,7 @@ var service = (funcParams) => {
|
|
|
8704
8549
|
}
|
|
8705
8550
|
return LastCallResponse;
|
|
8706
8551
|
},
|
|
8707
|
-
|
|
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
|
|
8552
|
+
downloadFile: downloadFile$1
|
|
8747
8553
|
};
|
|
8748
8554
|
};
|
|
8749
8555
|
var leaderBoard = {
|
|
@@ -9565,12 +9371,6 @@ const buildWrapperSection = (config, componentScope) => {
|
|
|
9565
9371
|
const wrapper = _.cloneDeep(WrapperSection);
|
|
9566
9372
|
wrapper.config.main.label = config.label;
|
|
9567
9373
|
wrapper.config.main.divider = config.divider === "YES" ? true : false;
|
|
9568
|
-
if (config.style) {
|
|
9569
|
-
wrapper.config.style = JSON.parse(config.style);
|
|
9570
|
-
}
|
|
9571
|
-
if (config.layout) {
|
|
9572
|
-
wrapper.config.layout = createLayoutFormat(config.layout);
|
|
9573
|
-
}
|
|
9574
9374
|
return wrapper;
|
|
9575
9375
|
};
|
|
9576
9376
|
var TextInputField = {
|
|
@@ -9754,7 +9554,7 @@ const buildTable = (config, componentScope) => {
|
|
|
9754
9554
|
table.config.main.Selection = config.SelectionAvailable === "YES" ? true : false;
|
|
9755
9555
|
}
|
|
9756
9556
|
if (config.ColumnResizingAvailable) {
|
|
9757
|
-
table.config.main.disableColumnResizing = config.ColumnResizingAvailable === "YES" ?
|
|
9557
|
+
table.config.main.disableColumnResizing = config.ColumnResizingAvailable === "YES" ? true : false;
|
|
9758
9558
|
}
|
|
9759
9559
|
if (config.DragAvailable) {
|
|
9760
9560
|
table.config.main.enableDrag = config.DragAvailable === "YES" ? true : false;
|
|
@@ -10323,7 +10123,7 @@ const RadioUiSchema = {
|
|
|
10323
10123
|
const buildRadio = (config, componentScope) => {
|
|
10324
10124
|
const Radio = _.cloneDeep(RadioUiSchema);
|
|
10325
10125
|
Radio.scope = componentScope;
|
|
10326
|
-
Radio.config.main.
|
|
10126
|
+
Radio.config.main.heading = config.label;
|
|
10327
10127
|
if (config.layout) {
|
|
10328
10128
|
Radio.config.layout = createLayoutFormat(config.layout);
|
|
10329
10129
|
}
|
|
@@ -10448,7 +10248,7 @@ const FileInput = {
|
|
|
10448
10248
|
const buildFileInput = (config, componentScope) => {
|
|
10449
10249
|
const box = _.cloneDeep(FileInput);
|
|
10450
10250
|
box.scope = componentScope;
|
|
10451
|
-
box.config.main.
|
|
10251
|
+
box.config.main.heading = config.label;
|
|
10452
10252
|
if (config.layout) {
|
|
10453
10253
|
box.config.layout = createLayoutFormat(config.layout);
|
|
10454
10254
|
}
|
|
@@ -10457,127 +10257,6 @@ const buildFileInput = (config, componentScope) => {
|
|
|
10457
10257
|
}
|
|
10458
10258
|
return box;
|
|
10459
10259
|
};
|
|
10460
|
-
const Stepper = {
|
|
10461
|
-
type: "Control",
|
|
10462
|
-
scope: "#/properties/Stepper",
|
|
10463
|
-
options: {
|
|
10464
|
-
widget: "Stepper"
|
|
10465
|
-
},
|
|
10466
|
-
config: {
|
|
10467
|
-
main: {
|
|
10468
|
-
steps: [{ label: "First" }, { label: "Second" }, { label: "Third" }],
|
|
10469
|
-
resetButton: false,
|
|
10470
|
-
resetText: "Reset",
|
|
10471
|
-
orientation: "vertical"
|
|
10472
|
-
}
|
|
10473
|
-
},
|
|
10474
|
-
"elements": []
|
|
10475
|
-
};
|
|
10476
|
-
const buildStepper = (config, componentScope) => {
|
|
10477
|
-
const stepper = _.cloneDeep(Stepper);
|
|
10478
|
-
stepper.scope = componentScope;
|
|
10479
|
-
stepper.config.main.resetButton = config.resetButton === "YES" ? true : false;
|
|
10480
|
-
if (config.defaultButtonAvailable) {
|
|
10481
|
-
stepper.config.main.defaultButtonAvailable = config.defaultButtonAvailable === "YES" ? true : false;
|
|
10482
|
-
}
|
|
10483
|
-
stepper.config.main.resetText = config.resetText || "ResetData";
|
|
10484
|
-
stepper.config.main.completeText = config.completeText || "Complete Text";
|
|
10485
|
-
stepper.config.main.orientation = config.orientation || "horizontal";
|
|
10486
|
-
if (config.sectionLabels) {
|
|
10487
|
-
stepper.config.main.steps = config.sectionLabels.map((e, i) => {
|
|
10488
|
-
return { label: e.label, id: i };
|
|
10489
|
-
});
|
|
10490
|
-
}
|
|
10491
|
-
if (config.layout) {
|
|
10492
|
-
stepper.config.layout = createLayoutFormat(config.layout);
|
|
10493
|
-
}
|
|
10494
|
-
if (config.style) {
|
|
10495
|
-
stepper.config.style = JSON.parse(config.style);
|
|
10496
|
-
}
|
|
10497
|
-
return stepper;
|
|
10498
|
-
};
|
|
10499
|
-
const PopUP = {
|
|
10500
|
-
type: "Control",
|
|
10501
|
-
scope: "#/properties/text",
|
|
10502
|
-
options: {
|
|
10503
|
-
widget: "PopUp"
|
|
10504
|
-
},
|
|
10505
|
-
config: {
|
|
10506
|
-
layout: {
|
|
10507
|
-
xs: 12,
|
|
10508
|
-
sm: 12,
|
|
10509
|
-
md: 12,
|
|
10510
|
-
lg: 12
|
|
10511
|
-
},
|
|
10512
|
-
main: {
|
|
10513
|
-
label: "PopUp",
|
|
10514
|
-
fullScreen: false,
|
|
10515
|
-
fullWidth: false,
|
|
10516
|
-
maxWidth: false,
|
|
10517
|
-
alignItems: false,
|
|
10518
|
-
spacing: 2
|
|
10519
|
-
},
|
|
10520
|
-
style: {}
|
|
10521
|
-
}
|
|
10522
|
-
};
|
|
10523
|
-
const buildPopUp = (config, componentScope) => {
|
|
10524
|
-
const popup = _.cloneDeep(PopUP);
|
|
10525
|
-
popup.scope = componentScope;
|
|
10526
|
-
popup.config.main.title = config.label;
|
|
10527
|
-
popup.config.main.fullScreen = config.fullScreen === "YES" ? true : false;
|
|
10528
|
-
popup.config.main.fullWidth = config.fullWidth === "YES" ? true : false;
|
|
10529
|
-
popup.config.main.maxWidth = config.maxWidth || false;
|
|
10530
|
-
if (config.layout) {
|
|
10531
|
-
popup.config.layout = createLayoutFormat(config.layout);
|
|
10532
|
-
}
|
|
10533
|
-
if (config.style) {
|
|
10534
|
-
PopUP.config.style = JSON.parse(config.style);
|
|
10535
|
-
}
|
|
10536
|
-
return popup;
|
|
10537
|
-
};
|
|
10538
|
-
const dataGrid = {
|
|
10539
|
-
"type": "Control",
|
|
10540
|
-
"scope": "#/properties/dataGrid",
|
|
10541
|
-
"layout": 12,
|
|
10542
|
-
"options": {
|
|
10543
|
-
"widget": "DataGrid"
|
|
10544
|
-
},
|
|
10545
|
-
elements: [],
|
|
10546
|
-
"config": {
|
|
10547
|
-
"main": {
|
|
10548
|
-
elevation: 0,
|
|
10549
|
-
useWrapper: false
|
|
10550
|
-
},
|
|
10551
|
-
style: {}
|
|
10552
|
-
}
|
|
10553
|
-
};
|
|
10554
|
-
const buildDataGrid = (config, componentScope) => {
|
|
10555
|
-
const DataGrid = _.cloneDeep(dataGrid);
|
|
10556
|
-
DataGrid.scope = componentScope;
|
|
10557
|
-
if (config.elevation) {
|
|
10558
|
-
DataGrid.config.main.elevation = +config.elevation;
|
|
10559
|
-
}
|
|
10560
|
-
DataGrid.config.main.divider = config.divider === "NO" ? false : true;
|
|
10561
|
-
if (config.height) {
|
|
10562
|
-
DataGrid.config.main.height = `${config.height}px`;
|
|
10563
|
-
}
|
|
10564
|
-
if (config.justifyContent) {
|
|
10565
|
-
DataGrid.config.main.justifyContent = config.justifyContent;
|
|
10566
|
-
}
|
|
10567
|
-
if (config.label) {
|
|
10568
|
-
DataGrid.config.main.label = config.label;
|
|
10569
|
-
}
|
|
10570
|
-
if (config.layout) {
|
|
10571
|
-
DataGrid.config.layout = createLayoutFormat(config.layout);
|
|
10572
|
-
}
|
|
10573
|
-
if (config.cardLayout) {
|
|
10574
|
-
DataGrid.config.cardLayout = createLayoutFormat(config.cardLayout);
|
|
10575
|
-
}
|
|
10576
|
-
if (config.style) {
|
|
10577
|
-
DataGrid.config.style = JSON.parse(config.style);
|
|
10578
|
-
}
|
|
10579
|
-
return DataGrid;
|
|
10580
|
-
};
|
|
10581
10260
|
let schema = {
|
|
10582
10261
|
type: "object",
|
|
10583
10262
|
properties: {},
|
|
@@ -10696,15 +10375,6 @@ const buildUiSchema = (config) => {
|
|
|
10696
10375
|
let elements = {};
|
|
10697
10376
|
const componentScope = `#/properties/${config.name}`;
|
|
10698
10377
|
switch (config.type) {
|
|
10699
|
-
case "DataGrid":
|
|
10700
|
-
elements = buildDataGrid(config, componentScope);
|
|
10701
|
-
break;
|
|
10702
|
-
case "Stepper":
|
|
10703
|
-
elements = buildStepper(config, componentScope);
|
|
10704
|
-
break;
|
|
10705
|
-
case "PopUp":
|
|
10706
|
-
elements = buildPopUp(config, componentScope);
|
|
10707
|
-
break;
|
|
10708
10378
|
case "FileInput":
|
|
10709
10379
|
elements = buildFileInput(config, componentScope);
|
|
10710
10380
|
break;
|
|
@@ -10824,25 +10494,17 @@ const buildUiSchema = (config) => {
|
|
|
10824
10494
|
if ((config == null ? void 0 : config.type) === "LeaderBoard") {
|
|
10825
10495
|
return elements;
|
|
10826
10496
|
} else if (config.type == "Table") {
|
|
10827
|
-
const sizeMap = {};
|
|
10828
|
-
if (config.sizeHolder) {
|
|
10829
|
-
config.sizeHolder.map((e, i) => {
|
|
10830
|
-
sizeMap[e.keyName] = e.value;
|
|
10831
|
-
});
|
|
10832
|
-
}
|
|
10833
10497
|
elements.elements = config.elements.map((e, elemInd) => {
|
|
10834
10498
|
if (e.type) {
|
|
10835
10499
|
return {
|
|
10836
10500
|
accessorKey: e.name,
|
|
10837
10501
|
header: e.label || e.name,
|
|
10838
|
-
size: sizeMap[e.name] || 180,
|
|
10839
10502
|
widget: buildUiSchema(e)
|
|
10840
10503
|
};
|
|
10841
10504
|
}
|
|
10842
10505
|
return {
|
|
10843
10506
|
accessorKey: e.name,
|
|
10844
|
-
header: e.label || e.name
|
|
10845
|
-
size: sizeMap[e.name] || 180
|
|
10507
|
+
header: e.label || e.name
|
|
10846
10508
|
};
|
|
10847
10509
|
});
|
|
10848
10510
|
} else if (config.type == "Array") {
|