impaktapps-ui-builder 0.0.381 → 0.0.383
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 -395
- 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 +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 -23
- 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,21 +8169,6 @@ const downloadFile$1 = (obj) => {
|
|
|
8314
8169
|
URL.revokeObjectURL(url);
|
|
8315
8170
|
document.body.removeChild(link);
|
|
8316
8171
|
};
|
|
8317
|
-
const clickDownloadLink = (response2, service2) => {
|
|
8318
|
-
const user = JSON.parse(localStorage.getItem("user"));
|
|
8319
|
-
let url = `${service2.defaults.baseURL}/${response2.path}?Authorization=Bearer%20${user.token}`;
|
|
8320
|
-
if (response2 == null ? void 0 : response2.params) {
|
|
8321
|
-
const keysArray = Object.keys(response2 == null ? void 0 : response2.params);
|
|
8322
|
-
keysArray.map((e, i) => {
|
|
8323
|
-
url = url + `&${e}=${response2 == null ? void 0 : response2.params[e]}`;
|
|
8324
|
-
});
|
|
8325
|
-
}
|
|
8326
|
-
const link = document.createElement("a");
|
|
8327
|
-
link.href = url;
|
|
8328
|
-
document.body.appendChild(link);
|
|
8329
|
-
link.click();
|
|
8330
|
-
link.parentNode.removeChild(link);
|
|
8331
|
-
};
|
|
8332
8172
|
const executeEvents = async (params2) => {
|
|
8333
8173
|
var _a, _b, _c;
|
|
8334
8174
|
let nextEvent = [];
|
|
@@ -8355,7 +8195,6 @@ const executeEvents = async (params2) => {
|
|
|
8355
8195
|
return finalResponse;
|
|
8356
8196
|
};
|
|
8357
8197
|
async function executeEventsHandler(params2) {
|
|
8358
|
-
var _a, _b, _c;
|
|
8359
8198
|
if (params2.config.Handler === "api") {
|
|
8360
8199
|
return await executeApiEventHandler(params2);
|
|
8361
8200
|
} else if (params2.config.Handler === "inBuiltFunction") {
|
|
@@ -8373,12 +8212,6 @@ async function executeEventsHandler(params2) {
|
|
|
8373
8212
|
params2.service
|
|
8374
8213
|
);
|
|
8375
8214
|
return result;
|
|
8376
|
-
} else if (params2.config.Handler === "onBackHandler") {
|
|
8377
|
-
return (_a = params2.store.functionParameters) == null ? void 0 : _a.handleBack();
|
|
8378
|
-
} else if (params2.config.Handler === "onNextHandler") {
|
|
8379
|
-
return (_b = params2.store.functionParameters) == null ? void 0 : _b.handleNext();
|
|
8380
|
-
} else if (params2.config.Handler === "onResetHandler") {
|
|
8381
|
-
return (_c = params2.store.functionParameters) == null ? void 0 : _c.handleReset();
|
|
8382
8215
|
}
|
|
8383
8216
|
}
|
|
8384
8217
|
async function executeRefreshHandler(params2) {
|
|
@@ -8410,7 +8243,7 @@ async function executeInBuiltFunctionHandler(params) {
|
|
|
8410
8243
|
const makeFunc = eval(params.config.funcParametersCode);
|
|
8411
8244
|
parameter = makeFunc(params.store, params.dynamicData, params.userValue, params.parentEventOutput, params.service);
|
|
8412
8245
|
}
|
|
8413
|
-
params.serviceHolder[params.config.inBuiltFunctionType](parameter
|
|
8246
|
+
params.serviceHolder[params.config.inBuiltFunctionType](parameter);
|
|
8414
8247
|
}
|
|
8415
8248
|
async function executeCustomHandler(params) {
|
|
8416
8249
|
const makeFunc = eval(params.config.eventCode);
|
|
@@ -8443,7 +8276,7 @@ async function mergeFormdata(handlerResponse, componentName, eventConfig, store2
|
|
|
8443
8276
|
...(_a = pre.properties) == null ? void 0 : _a[componentName],
|
|
8444
8277
|
type: "array",
|
|
8445
8278
|
items: {
|
|
8446
|
-
oneOf: handlerResponse
|
|
8279
|
+
oneOf: handlerResponse.data
|
|
8447
8280
|
}
|
|
8448
8281
|
}
|
|
8449
8282
|
}
|
|
@@ -8460,7 +8293,7 @@ async function mergeFormdata(handlerResponse, componentName, eventConfig, store2
|
|
|
8460
8293
|
store2.setFormdata((pre) => {
|
|
8461
8294
|
return { ...pre, [componentName]: eventConfig.lazyLoading ? handlerResponse.data.data : handlerResponse.data };
|
|
8462
8295
|
});
|
|
8463
|
-
await
|
|
8296
|
+
await service2.get("https://jsonplaceholder.typicode.com/posts/1");
|
|
8464
8297
|
}
|
|
8465
8298
|
}
|
|
8466
8299
|
}
|
|
@@ -8534,16 +8367,6 @@ function getRefreshElements(eventConfig, eventGropus) {
|
|
|
8534
8367
|
console.log(result);
|
|
8535
8368
|
return result;
|
|
8536
8369
|
}
|
|
8537
|
-
function asyncOperation() {
|
|
8538
|
-
return new Promise((resolve, reject) => {
|
|
8539
|
-
setTimeout(() => {
|
|
8540
|
-
{
|
|
8541
|
-
resolve("Operation completed successfully!");
|
|
8542
|
-
reject(new Error("Operation failed!"));
|
|
8543
|
-
}
|
|
8544
|
-
}, 50);
|
|
8545
|
-
});
|
|
8546
|
-
}
|
|
8547
8370
|
let compType;
|
|
8548
8371
|
let eventGroups = {};
|
|
8549
8372
|
const notifyUiSchema = {
|
|
@@ -8574,9 +8397,6 @@ const extractEvents = (eventConfig) => {
|
|
|
8574
8397
|
if (!!!SuccessEvent && event2.eventType === "onLoad") {
|
|
8575
8398
|
event2.events.push({ Handler: "mergeFormdata", eventType: "Success", type: compType, lazyLoading: eventConfig.lazyLoading === "YES" ? true : false });
|
|
8576
8399
|
}
|
|
8577
|
-
if (!!!SuccessEvent && (event2.eventType === "onBack" || event2.eventType === "onNext" || event2.eventType === "onReset")) {
|
|
8578
|
-
event2.events.push({ Handler: `${event2.eventType}Handler`, eventType: "Success", type: compType, lazyLoading: eventConfig.lazyLoading === "YES" ? true : false });
|
|
8579
|
-
}
|
|
8580
8400
|
eventGroups[event2.eventType][eventConfigObj.name].push({ ...event2, type: compType });
|
|
8581
8401
|
});
|
|
8582
8402
|
}
|
|
@@ -8597,7 +8417,7 @@ var service = (funcParams) => {
|
|
|
8597
8417
|
dynamicData: funcParams.dynamicData,
|
|
8598
8418
|
userValue: funcParams.userValue,
|
|
8599
8419
|
service: funcParams.service,
|
|
8600
|
-
serviceHolder: { downloadFile: downloadFile$1
|
|
8420
|
+
serviceHolder: { downloadFile: downloadFile$1 },
|
|
8601
8421
|
eventGroups
|
|
8602
8422
|
};
|
|
8603
8423
|
return {
|
|
@@ -8635,13 +8455,37 @@ var service = (funcParams) => {
|
|
|
8635
8455
|
});
|
|
8636
8456
|
},
|
|
8637
8457
|
onClick: async function() {
|
|
8638
|
-
|
|
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
|
+
}
|
|
8639
8467
|
},
|
|
8640
|
-
onFileDownload: async
|
|
8641
|
-
|
|
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
|
+
}
|
|
8642
8478
|
},
|
|
8643
|
-
onFileUpload: async
|
|
8644
|
-
|
|
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
|
+
}
|
|
8645
8489
|
},
|
|
8646
8490
|
onPaginationChange: async function(paginationValues) {
|
|
8647
8491
|
var _a;
|
|
@@ -8705,46 +8549,7 @@ var service = (funcParams) => {
|
|
|
8705
8549
|
}
|
|
8706
8550
|
return LastCallResponse;
|
|
8707
8551
|
},
|
|
8708
|
-
|
|
8709
|
-
var _a, _b;
|
|
8710
|
-
const path = ((_a = funcParams.dynamicData) == null ? void 0 : _a.tableButtonPath) || funcParams.dynamicData.path.split(".")[0];
|
|
8711
|
-
await this.callHandler("onBack", functionParameters);
|
|
8712
|
-
if (((_b = eventGroups == null ? void 0 : eventGroups["onBack"]) == null ? void 0 : _b[path]) === void 0) {
|
|
8713
|
-
functionParameters == null ? void 0 : functionParameters.handleBack();
|
|
8714
|
-
}
|
|
8715
|
-
},
|
|
8716
|
-
onNext: async function(functionParameters) {
|
|
8717
|
-
var _a, _b;
|
|
8718
|
-
const path = ((_a = funcParams.dynamicData) == null ? void 0 : _a.tableButtonPath) || funcParams.dynamicData.path.split(".")[0];
|
|
8719
|
-
await this.callHandler("onNext", functionParameters);
|
|
8720
|
-
if (((_b = eventGroups == null ? void 0 : eventGroups["onNext"]) == null ? void 0 : _b[path]) === void 0) {
|
|
8721
|
-
functionParameters == null ? void 0 : functionParameters.handleNext();
|
|
8722
|
-
}
|
|
8723
|
-
},
|
|
8724
|
-
onReset: async function(functionParameters) {
|
|
8725
|
-
var _a, _b;
|
|
8726
|
-
const path = ((_a = funcParams.dynamicData) == null ? void 0 : _a.tableButtonPath) || funcParams.dynamicData.path.split(".")[0];
|
|
8727
|
-
await this.callHandler("onReset", functionParameters);
|
|
8728
|
-
if (((_b = eventGroups == null ? void 0 : eventGroups["onReset"]) == null ? void 0 : _b[path]) === void 0) {
|
|
8729
|
-
functionParameters == null ? void 0 : functionParameters.handleReset();
|
|
8730
|
-
}
|
|
8731
|
-
},
|
|
8732
|
-
callHandler: async function(eventType, functionParameters) {
|
|
8733
|
-
var _a, _b, _c;
|
|
8734
|
-
const path = ((_a = funcParams.dynamicData) == null ? void 0 : _a.tableButtonPath) || funcParams.dynamicData.path.split(".")[0];
|
|
8735
|
-
if (((_b = eventGroups == null ? void 0 : eventGroups[eventType]) == null ? void 0 : _b[path]) !== void 0) {
|
|
8736
|
-
for (const eventConfig of (_c = eventGroups == null ? void 0 : eventGroups[eventType]) == null ? void 0 : _c[path]) {
|
|
8737
|
-
executeEventsParameters.store.functionParameters = functionParameters;
|
|
8738
|
-
await executeEvents({
|
|
8739
|
-
...executeEventsParameters,
|
|
8740
|
-
config: eventConfig,
|
|
8741
|
-
componentName: path
|
|
8742
|
-
});
|
|
8743
|
-
}
|
|
8744
|
-
}
|
|
8745
|
-
},
|
|
8746
|
-
downloadFile: downloadFile$1,
|
|
8747
|
-
download: clickDownloadLink
|
|
8552
|
+
downloadFile: downloadFile$1
|
|
8748
8553
|
};
|
|
8749
8554
|
};
|
|
8750
8555
|
var leaderBoard = {
|
|
@@ -9566,12 +9371,6 @@ const buildWrapperSection = (config, componentScope) => {
|
|
|
9566
9371
|
const wrapper = _.cloneDeep(WrapperSection);
|
|
9567
9372
|
wrapper.config.main.label = config.label;
|
|
9568
9373
|
wrapper.config.main.divider = config.divider === "YES" ? true : false;
|
|
9569
|
-
if (config.style) {
|
|
9570
|
-
wrapper.config.style = JSON.parse(config.style);
|
|
9571
|
-
}
|
|
9572
|
-
if (config.layout) {
|
|
9573
|
-
wrapper.config.layout = createLayoutFormat(config.layout);
|
|
9574
|
-
}
|
|
9575
9374
|
return wrapper;
|
|
9576
9375
|
};
|
|
9577
9376
|
var TextInputField = {
|
|
@@ -9755,7 +9554,7 @@ const buildTable = (config, componentScope) => {
|
|
|
9755
9554
|
table.config.main.Selection = config.SelectionAvailable === "YES" ? true : false;
|
|
9756
9555
|
}
|
|
9757
9556
|
if (config.ColumnResizingAvailable) {
|
|
9758
|
-
table.config.main.disableColumnResizing = config.ColumnResizingAvailable === "YES" ?
|
|
9557
|
+
table.config.main.disableColumnResizing = config.ColumnResizingAvailable === "YES" ? true : false;
|
|
9759
9558
|
}
|
|
9760
9559
|
if (config.DragAvailable) {
|
|
9761
9560
|
table.config.main.enableDrag = config.DragAvailable === "YES" ? true : false;
|
|
@@ -10324,7 +10123,7 @@ const RadioUiSchema = {
|
|
|
10324
10123
|
const buildRadio = (config, componentScope) => {
|
|
10325
10124
|
const Radio = _.cloneDeep(RadioUiSchema);
|
|
10326
10125
|
Radio.scope = componentScope;
|
|
10327
|
-
Radio.config.main.
|
|
10126
|
+
Radio.config.main.heading = config.label;
|
|
10328
10127
|
if (config.layout) {
|
|
10329
10128
|
Radio.config.layout = createLayoutFormat(config.layout);
|
|
10330
10129
|
}
|
|
@@ -10449,7 +10248,7 @@ const FileInput = {
|
|
|
10449
10248
|
const buildFileInput = (config, componentScope) => {
|
|
10450
10249
|
const box = _.cloneDeep(FileInput);
|
|
10451
10250
|
box.scope = componentScope;
|
|
10452
|
-
box.config.main.
|
|
10251
|
+
box.config.main.heading = config.label;
|
|
10453
10252
|
if (config.layout) {
|
|
10454
10253
|
box.config.layout = createLayoutFormat(config.layout);
|
|
10455
10254
|
}
|
|
@@ -10458,127 +10257,6 @@ const buildFileInput = (config, componentScope) => {
|
|
|
10458
10257
|
}
|
|
10459
10258
|
return box;
|
|
10460
10259
|
};
|
|
10461
|
-
const Stepper = {
|
|
10462
|
-
type: "Control",
|
|
10463
|
-
scope: "#/properties/Stepper",
|
|
10464
|
-
options: {
|
|
10465
|
-
widget: "Stepper"
|
|
10466
|
-
},
|
|
10467
|
-
config: {
|
|
10468
|
-
main: {
|
|
10469
|
-
steps: [{ label: "First" }, { label: "Second" }, { label: "Third" }],
|
|
10470
|
-
resetButton: false,
|
|
10471
|
-
resetText: "Reset",
|
|
10472
|
-
orientation: "vertical"
|
|
10473
|
-
}
|
|
10474
|
-
},
|
|
10475
|
-
"elements": []
|
|
10476
|
-
};
|
|
10477
|
-
const buildStepper = (config, componentScope) => {
|
|
10478
|
-
const stepper = _.cloneDeep(Stepper);
|
|
10479
|
-
stepper.scope = componentScope;
|
|
10480
|
-
stepper.config.main.resetButton = config.resetButton === "YES" ? true : false;
|
|
10481
|
-
if (config.defaultButtonAvailable) {
|
|
10482
|
-
stepper.config.main.defaultButtonAvailable = config.defaultButtonAvailable === "YES" ? true : false;
|
|
10483
|
-
}
|
|
10484
|
-
stepper.config.main.resetText = config.resetText || "ResetData";
|
|
10485
|
-
stepper.config.main.completeText = config.completeText || "Complete Text";
|
|
10486
|
-
stepper.config.main.orientation = config.orientation || "horizontal";
|
|
10487
|
-
if (config.sectionLabels) {
|
|
10488
|
-
stepper.config.main.steps = config.sectionLabels.map((e, i) => {
|
|
10489
|
-
return { label: e.label, id: i };
|
|
10490
|
-
});
|
|
10491
|
-
}
|
|
10492
|
-
if (config.layout) {
|
|
10493
|
-
stepper.config.layout = createLayoutFormat(config.layout);
|
|
10494
|
-
}
|
|
10495
|
-
if (config.style) {
|
|
10496
|
-
stepper.config.style = JSON.parse(config.style);
|
|
10497
|
-
}
|
|
10498
|
-
return stepper;
|
|
10499
|
-
};
|
|
10500
|
-
const PopUP = {
|
|
10501
|
-
type: "Control",
|
|
10502
|
-
scope: "#/properties/text",
|
|
10503
|
-
options: {
|
|
10504
|
-
widget: "PopUp"
|
|
10505
|
-
},
|
|
10506
|
-
config: {
|
|
10507
|
-
layout: {
|
|
10508
|
-
xs: 12,
|
|
10509
|
-
sm: 12,
|
|
10510
|
-
md: 12,
|
|
10511
|
-
lg: 12
|
|
10512
|
-
},
|
|
10513
|
-
main: {
|
|
10514
|
-
label: "PopUp",
|
|
10515
|
-
fullScreen: false,
|
|
10516
|
-
fullWidth: false,
|
|
10517
|
-
maxWidth: false,
|
|
10518
|
-
alignItems: false,
|
|
10519
|
-
spacing: 2
|
|
10520
|
-
},
|
|
10521
|
-
style: {}
|
|
10522
|
-
}
|
|
10523
|
-
};
|
|
10524
|
-
const buildPopUp = (config, componentScope) => {
|
|
10525
|
-
const popup = _.cloneDeep(PopUP);
|
|
10526
|
-
popup.scope = componentScope;
|
|
10527
|
-
popup.config.main.title = config.label;
|
|
10528
|
-
popup.config.main.fullScreen = config.fullScreen === "YES" ? true : false;
|
|
10529
|
-
popup.config.main.fullWidth = config.fullWidth === "YES" ? true : false;
|
|
10530
|
-
popup.config.main.maxWidth = config.maxWidth || false;
|
|
10531
|
-
if (config.layout) {
|
|
10532
|
-
popup.config.layout = createLayoutFormat(config.layout);
|
|
10533
|
-
}
|
|
10534
|
-
if (config.style) {
|
|
10535
|
-
PopUP.config.style = JSON.parse(config.style);
|
|
10536
|
-
}
|
|
10537
|
-
return popup;
|
|
10538
|
-
};
|
|
10539
|
-
const dataGrid = {
|
|
10540
|
-
"type": "Control",
|
|
10541
|
-
"scope": "#/properties/dataGrid",
|
|
10542
|
-
"layout": 12,
|
|
10543
|
-
"options": {
|
|
10544
|
-
"widget": "DataGrid"
|
|
10545
|
-
},
|
|
10546
|
-
elements: [],
|
|
10547
|
-
"config": {
|
|
10548
|
-
"main": {
|
|
10549
|
-
elevation: 0,
|
|
10550
|
-
useWrapper: false
|
|
10551
|
-
},
|
|
10552
|
-
style: {}
|
|
10553
|
-
}
|
|
10554
|
-
};
|
|
10555
|
-
const buildDataGrid = (config, componentScope) => {
|
|
10556
|
-
const DataGrid = _.cloneDeep(dataGrid);
|
|
10557
|
-
DataGrid.scope = componentScope;
|
|
10558
|
-
if (config.elevation) {
|
|
10559
|
-
DataGrid.config.main.elevation = +config.elevation;
|
|
10560
|
-
}
|
|
10561
|
-
DataGrid.config.main.divider = config.divider === "NO" ? false : true;
|
|
10562
|
-
if (config.height) {
|
|
10563
|
-
DataGrid.config.main.height = `${config.height}px`;
|
|
10564
|
-
}
|
|
10565
|
-
if (config.justifyContent) {
|
|
10566
|
-
DataGrid.config.main.justifyContent = config.justifyContent;
|
|
10567
|
-
}
|
|
10568
|
-
if (config.label) {
|
|
10569
|
-
DataGrid.config.main.label = config.label;
|
|
10570
|
-
}
|
|
10571
|
-
if (config.layout) {
|
|
10572
|
-
DataGrid.config.layout = createLayoutFormat(config.layout);
|
|
10573
|
-
}
|
|
10574
|
-
if (config.cardLayout) {
|
|
10575
|
-
DataGrid.config.cardLayout = createLayoutFormat(config.cardLayout);
|
|
10576
|
-
}
|
|
10577
|
-
if (config.style) {
|
|
10578
|
-
DataGrid.config.style = JSON.parse(config.style);
|
|
10579
|
-
}
|
|
10580
|
-
return DataGrid;
|
|
10581
|
-
};
|
|
10582
10260
|
let schema = {
|
|
10583
10261
|
type: "object",
|
|
10584
10262
|
properties: {},
|
|
@@ -10697,15 +10375,6 @@ const buildUiSchema = (config) => {
|
|
|
10697
10375
|
let elements = {};
|
|
10698
10376
|
const componentScope = `#/properties/${config.name}`;
|
|
10699
10377
|
switch (config.type) {
|
|
10700
|
-
case "DataGrid":
|
|
10701
|
-
elements = buildDataGrid(config, componentScope);
|
|
10702
|
-
break;
|
|
10703
|
-
case "Stepper":
|
|
10704
|
-
elements = buildStepper(config, componentScope);
|
|
10705
|
-
break;
|
|
10706
|
-
case "PopUp":
|
|
10707
|
-
elements = buildPopUp(config, componentScope);
|
|
10708
|
-
break;
|
|
10709
10378
|
case "FileInput":
|
|
10710
10379
|
elements = buildFileInput(config, componentScope);
|
|
10711
10380
|
break;
|
|
@@ -10825,25 +10494,17 @@ const buildUiSchema = (config) => {
|
|
|
10825
10494
|
if ((config == null ? void 0 : config.type) === "LeaderBoard") {
|
|
10826
10495
|
return elements;
|
|
10827
10496
|
} else if (config.type == "Table") {
|
|
10828
|
-
const sizeMap = {};
|
|
10829
|
-
if (config.sizeHolder) {
|
|
10830
|
-
config.sizeHolder.map((e, i) => {
|
|
10831
|
-
sizeMap[e.keyName] = e.value;
|
|
10832
|
-
});
|
|
10833
|
-
}
|
|
10834
10497
|
elements.elements = config.elements.map((e, elemInd) => {
|
|
10835
10498
|
if (e.type) {
|
|
10836
10499
|
return {
|
|
10837
10500
|
accessorKey: e.name,
|
|
10838
10501
|
header: e.label || e.name,
|
|
10839
|
-
size: sizeMap[e.name] || 180,
|
|
10840
10502
|
widget: buildUiSchema(e)
|
|
10841
10503
|
};
|
|
10842
10504
|
}
|
|
10843
10505
|
return {
|
|
10844
10506
|
accessorKey: e.name,
|
|
10845
|
-
header: e.label || e.name
|
|
10846
|
-
size: sizeMap[e.name] || 180
|
|
10507
|
+
header: e.label || e.name
|
|
10847
10508
|
};
|
|
10848
10509
|
});
|
|
10849
10510
|
} else if (config.type == "Array") {
|