impaktapps-ui-builder 0.0.286 → 0.0.288
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 +96 -84
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +6 -6
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/apiSection.d.ts +4 -4
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/coreSection.d.ts +4 -4
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/validationSections.d.ts +2 -2
- package/dist/src/impaktapps-ui-builder/runtime/services/events.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +2 -0
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/apiSection.ts +6 -6
- package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +36 -36
- package/src/impaktapps-ui-builder/builder/build/uischema/validationSections.ts +4 -4
- package/src/impaktapps-ui-builder/runtime/services/events.ts +11 -10
- package/src/impaktapps-ui-builder/runtime/services/service.ts +42 -34
|
@@ -6379,34 +6379,34 @@ const CoreSection = {
|
|
|
6379
6379
|
label: "Type",
|
|
6380
6380
|
type: "text",
|
|
6381
6381
|
options: [
|
|
6382
|
-
{
|
|
6383
|
-
{
|
|
6384
|
-
{
|
|
6385
|
-
{
|
|
6386
|
-
{
|
|
6387
|
-
{
|
|
6388
|
-
{
|
|
6389
|
-
{
|
|
6390
|
-
{
|
|
6391
|
-
{
|
|
6392
|
-
{
|
|
6393
|
-
{
|
|
6394
|
-
{
|
|
6395
|
-
{
|
|
6396
|
-
{
|
|
6397
|
-
{
|
|
6398
|
-
{
|
|
6399
|
-
{
|
|
6400
|
-
{
|
|
6401
|
-
{
|
|
6402
|
-
{
|
|
6403
|
-
{
|
|
6404
|
-
{
|
|
6405
|
-
{
|
|
6406
|
-
{
|
|
6407
|
-
{
|
|
6408
|
-
{
|
|
6409
|
-
{
|
|
6382
|
+
{ label: "Select", value: "Select" },
|
|
6383
|
+
{ label: "Date", value: "Date" },
|
|
6384
|
+
{ label: "CheckBox", value: "CheckBox" },
|
|
6385
|
+
{ label: "Table", value: "Table" },
|
|
6386
|
+
{ label: "Lazy Loading Table", value: "LazyLoadingTable" },
|
|
6387
|
+
{ label: "Array", value: "Array" },
|
|
6388
|
+
{ label: "Container", value: "WrapperSection" },
|
|
6389
|
+
{ label: "Tabs", value: "TabSection" },
|
|
6390
|
+
{ label: "Text", value: "Text" },
|
|
6391
|
+
{ label: "Text Area", value: "TextArea" },
|
|
6392
|
+
{ label: "Button", value: "Button" },
|
|
6393
|
+
{ label: "Card", value: "card" },
|
|
6394
|
+
{ label: "Radio", value: "Radio" },
|
|
6395
|
+
{ label: "Rank", value: "Rank" },
|
|
6396
|
+
{ label: "SpeedoMeter", value: "SpeedoMeter" },
|
|
6397
|
+
{ label: "ProgressBar", value: "ProgressBar" },
|
|
6398
|
+
{ label: "Graph", value: "Graph" },
|
|
6399
|
+
{ label: "Label", value: "Box" },
|
|
6400
|
+
{ label: "Upload File", value: "UploadFile" },
|
|
6401
|
+
{ label: "Download File", value: "DownloadFile" },
|
|
6402
|
+
{ label: "Empty Box", value: "EmptyBox" },
|
|
6403
|
+
{ label: "ProgressBar Card", value: "ProgressBarCard" },
|
|
6404
|
+
{ label: "Rank Card", value: "RankCard" },
|
|
6405
|
+
{ label: "Runner Boy Progress Bar", value: "RunnerBoyProgressBar" },
|
|
6406
|
+
{ label: "Slider", value: "Slider" },
|
|
6407
|
+
{ label: "Timer", value: "Timer" },
|
|
6408
|
+
{ label: "MultipleSelect", value: "MultipleSelect" },
|
|
6409
|
+
{ label: "LeaderBoard", value: "LeaderBoard" }
|
|
6410
6410
|
]
|
|
6411
6411
|
}
|
|
6412
6412
|
}
|
|
@@ -6482,10 +6482,10 @@ const CoreSection = {
|
|
|
6482
6482
|
main: {
|
|
6483
6483
|
label: "Screen Size",
|
|
6484
6484
|
options: [
|
|
6485
|
-
{
|
|
6486
|
-
{
|
|
6487
|
-
{
|
|
6488
|
-
{
|
|
6485
|
+
{ label: "Extra Small", value: "xs" },
|
|
6486
|
+
{ label: "Small", value: "sm" },
|
|
6487
|
+
{ label: "Medium", value: "md" },
|
|
6488
|
+
{ label: "Large", value: "lg" }
|
|
6489
6489
|
]
|
|
6490
6490
|
}
|
|
6491
6491
|
}
|
|
@@ -6506,10 +6506,10 @@ const CoreSection = {
|
|
|
6506
6506
|
main: {
|
|
6507
6507
|
label: "Value",
|
|
6508
6508
|
options: [
|
|
6509
|
-
{
|
|
6510
|
-
{
|
|
6511
|
-
{
|
|
6512
|
-
{
|
|
6509
|
+
{ label: "3", value: "3" },
|
|
6510
|
+
{ label: "5.5", value: "5.5" },
|
|
6511
|
+
{ label: "8", value: "8" },
|
|
6512
|
+
{ label: "12", value: "12" }
|
|
6513
6513
|
]
|
|
6514
6514
|
}
|
|
6515
6515
|
}
|
|
@@ -7132,10 +7132,10 @@ const ValidationSection = {
|
|
|
7132
7132
|
main: {
|
|
7133
7133
|
label: "Validation Type",
|
|
7134
7134
|
options: [
|
|
7135
|
-
{
|
|
7136
|
-
{
|
|
7137
|
-
{
|
|
7138
|
-
{
|
|
7135
|
+
{ value: "required", label: "Required" },
|
|
7136
|
+
{ value: "minLength", label: "Minimum Length" },
|
|
7137
|
+
{ value: "maxLength", label: "Maximum Length" },
|
|
7138
|
+
{ value: "pattern", label: "Pattern" }
|
|
7139
7139
|
]
|
|
7140
7140
|
}
|
|
7141
7141
|
}
|
|
@@ -9491,10 +9491,10 @@ const APISection = {
|
|
|
9491
9491
|
label: "Method",
|
|
9492
9492
|
type: "text",
|
|
9493
9493
|
options: [
|
|
9494
|
-
{
|
|
9495
|
-
{
|
|
9496
|
-
{
|
|
9497
|
-
{
|
|
9494
|
+
{ label: "Get", value: "get" },
|
|
9495
|
+
{ label: "Post", value: "post" },
|
|
9496
|
+
{ label: "Delete", value: "delete" },
|
|
9497
|
+
{ label: "Put", value: "put" }
|
|
9498
9498
|
]
|
|
9499
9499
|
}
|
|
9500
9500
|
}
|
|
@@ -9739,16 +9739,16 @@ const downloadFile = (obj) => {
|
|
|
9739
9739
|
const executeEvents = async (params2) => {
|
|
9740
9740
|
var _a, _b, _c;
|
|
9741
9741
|
let nextEvent = [];
|
|
9742
|
-
let
|
|
9742
|
+
let finalResponse = null;
|
|
9743
9743
|
try {
|
|
9744
9744
|
if (!shouldEventExecute(params2)) {
|
|
9745
9745
|
return { response: void 0, events: void 0 };
|
|
9746
9746
|
}
|
|
9747
9747
|
const response2 = await executeEventsHandler(params2);
|
|
9748
|
-
|
|
9748
|
+
finalResponse = response2;
|
|
9749
9749
|
const SuccessEvent = (_a = params2.config) == null ? void 0 : _a.events.filter((e) => e.eventType === "Success");
|
|
9750
9750
|
if (params2.config.returnNeeded) {
|
|
9751
|
-
return
|
|
9751
|
+
return finalResponse;
|
|
9752
9752
|
}
|
|
9753
9753
|
nextEvent = SuccessEvent;
|
|
9754
9754
|
} catch (err) {
|
|
@@ -9758,10 +9758,10 @@ const executeEvents = async (params2) => {
|
|
|
9758
9758
|
}
|
|
9759
9759
|
if ((nextEvent == null ? void 0 : nextEvent.length) > 0) {
|
|
9760
9760
|
for (const actionConfig of nextEvent) {
|
|
9761
|
-
await executeEvents({ ...params2, config: actionConfig, parentEventOutput:
|
|
9761
|
+
await executeEvents({ ...params2, config: actionConfig, parentEventOutput: finalResponse });
|
|
9762
9762
|
}
|
|
9763
9763
|
}
|
|
9764
|
-
return
|
|
9764
|
+
return finalResponse;
|
|
9765
9765
|
};
|
|
9766
9766
|
async function executeEventsHandler(params2) {
|
|
9767
9767
|
if (params2.config.Handler === "api") {
|
|
@@ -9785,7 +9785,7 @@ async function executeRefreshHandler(params2) {
|
|
|
9785
9785
|
const compToRefresh = getRefreshElements(params2.config, params2.eventGroups);
|
|
9786
9786
|
for (const componentName of compToRefresh) {
|
|
9787
9787
|
for (const compEventConfig of params2.eventGroups.onLoad[componentName]) {
|
|
9788
|
-
await executeEvents({ ...params2, config: compEventConfig });
|
|
9788
|
+
await executeEvents({ ...params2, config: compEventConfig, componentName });
|
|
9789
9789
|
}
|
|
9790
9790
|
}
|
|
9791
9791
|
}
|
|
@@ -9820,12 +9820,14 @@ async function executeCustomHandler(params) {
|
|
|
9820
9820
|
async function mergeFormdata(handlerResponse, componentName, eventConfig, store2) {
|
|
9821
9821
|
if (eventConfig.type === "Select" && !(_.isEmpty(handlerResponse) && handlerResponse)) {
|
|
9822
9822
|
store2.setSchema((pre) => {
|
|
9823
|
+
var _a;
|
|
9823
9824
|
return {
|
|
9824
9825
|
...pre,
|
|
9825
9826
|
properties: {
|
|
9826
9827
|
...pre.properties,
|
|
9827
9828
|
[componentName]: {
|
|
9828
|
-
|
|
9829
|
+
...(_a = pre.properties) == null ? void 0 : _a[componentName],
|
|
9830
|
+
oneOf: handlerResponse.data
|
|
9829
9831
|
}
|
|
9830
9832
|
}
|
|
9831
9833
|
};
|
|
@@ -9876,7 +9878,7 @@ async function shouldEventExecute(params2) {
|
|
|
9876
9878
|
var _a, _b;
|
|
9877
9879
|
const startEvent = (_b = (_a = params2.config) == null ? void 0 : _a.events) == null ? void 0 : _b.filter((e) => e.eventType === "onStart");
|
|
9878
9880
|
if ((startEvent == null ? void 0 : startEvent.length) > 0) {
|
|
9879
|
-
const
|
|
9881
|
+
const response2 = await executeEventsHandler({ ...params2, config: startEvent[0] });
|
|
9880
9882
|
return response2;
|
|
9881
9883
|
}
|
|
9882
9884
|
}
|
|
@@ -9977,11 +9979,7 @@ var service = (funcParams) => {
|
|
|
9977
9979
|
serviceHolder: this,
|
|
9978
9980
|
eventGroups
|
|
9979
9981
|
};
|
|
9980
|
-
await
|
|
9981
|
-
...executeEventsParameters,
|
|
9982
|
-
config: { Handler: "refresh", eventType: "onPageRefresh" },
|
|
9983
|
-
componentName: "all"
|
|
9984
|
-
});
|
|
9982
|
+
await executeRefreshHandler(executeEventsParameters);
|
|
9985
9983
|
funcParams.store.setSchema(
|
|
9986
9984
|
(pre) => {
|
|
9987
9985
|
return {
|
|
@@ -10004,34 +10002,24 @@ var service = (funcParams) => {
|
|
|
10004
10002
|
});
|
|
10005
10003
|
}
|
|
10006
10004
|
},
|
|
10007
|
-
onPaginationChange: async (paginationValues)
|
|
10008
|
-
var _a
|
|
10009
|
-
|
|
10010
|
-
|
|
10011
|
-
|
|
10012
|
-
|
|
10013
|
-
|
|
10014
|
-
|
|
10015
|
-
|
|
10005
|
+
onPaginationChange: async function(paginationValues) {
|
|
10006
|
+
var _a;
|
|
10007
|
+
const apiBody = [
|
|
10008
|
+
{ key: "size", value: paginationValues.pagination.pageSize },
|
|
10009
|
+
{ key: "start", value: paginationValues.pagination.pageIndex * paginationValues.pagination.pageSize },
|
|
10010
|
+
{ key: "sorting", value: paginationValues.sorting || [] },
|
|
10011
|
+
{ key: "filters", value: paginationValues.columnFilters || [] },
|
|
10012
|
+
{ key: "globalFilter", value: (_a = paginationValues.globalFilter) != null ? _a : "" }
|
|
10013
|
+
];
|
|
10014
|
+
return await this.updateConfigApiBody(paginationValues, apiBody);
|
|
10015
|
+
},
|
|
10016
|
+
getSelectOptions: async function(param) {
|
|
10017
|
+
if (param.serachValue !== "" && param.serachValue !== void 0) {
|
|
10018
|
+
const apiBody = [
|
|
10019
|
+
{ key: "serachValue", value: param.serachValue },
|
|
10020
|
+
{ key: "currentValue", value: param.currentValue }
|
|
10016
10021
|
];
|
|
10017
|
-
|
|
10018
|
-
eventConfig.body = [
|
|
10019
|
-
...eventConfig.body,
|
|
10020
|
-
...bodyValues
|
|
10021
|
-
];
|
|
10022
|
-
} else {
|
|
10023
|
-
eventConfig.body = bodyValues;
|
|
10024
|
-
}
|
|
10025
|
-
const responseEvent = (_b = eventConfig == null ? void 0 : eventConfig.events) == null ? void 0 : _b.filter((elem) => {
|
|
10026
|
-
return elem.Handler !== "mergeFormdata";
|
|
10027
|
-
});
|
|
10028
|
-
eventConfig.events = responseEvent != null ? responseEvent : [];
|
|
10029
|
-
const data2 = await executeEvents({
|
|
10030
|
-
...executeEventsParameters,
|
|
10031
|
-
config: eventConfig,
|
|
10032
|
-
componentName: paginationValues.path
|
|
10033
|
-
});
|
|
10034
|
-
return data2;
|
|
10022
|
+
return await this.updateConfigApiBody(param, apiBody);
|
|
10035
10023
|
}
|
|
10036
10024
|
},
|
|
10037
10025
|
onChange: async function() {
|
|
@@ -10051,6 +10039,30 @@ var service = (funcParams) => {
|
|
|
10051
10039
|
}));
|
|
10052
10040
|
}
|
|
10053
10041
|
},
|
|
10042
|
+
updateConfigApiBody: async function(paramValue, apiBody) {
|
|
10043
|
+
var _a;
|
|
10044
|
+
let LastCallResponse = void 0;
|
|
10045
|
+
for (const eventConfig of eventGroups == null ? void 0 : eventGroups.onLoad[paramValue.path]) {
|
|
10046
|
+
if (eventConfig.body) {
|
|
10047
|
+
eventConfig.body = [
|
|
10048
|
+
...eventConfig.body,
|
|
10049
|
+
...apiBody
|
|
10050
|
+
];
|
|
10051
|
+
} else {
|
|
10052
|
+
eventConfig.body = apiBody;
|
|
10053
|
+
}
|
|
10054
|
+
const responseEvent = (_a = eventConfig == null ? void 0 : eventConfig.events) == null ? void 0 : _a.filter((elem) => {
|
|
10055
|
+
return elem.Handler !== "mergeFormdata";
|
|
10056
|
+
});
|
|
10057
|
+
eventConfig.events = responseEvent != null ? responseEvent : [];
|
|
10058
|
+
LastCallResponse = await executeEvents({
|
|
10059
|
+
...executeEventsParameters,
|
|
10060
|
+
config: eventConfig,
|
|
10061
|
+
componentName: paramValue.path
|
|
10062
|
+
});
|
|
10063
|
+
}
|
|
10064
|
+
return LastCallResponse;
|
|
10065
|
+
},
|
|
10054
10066
|
downloadFile
|
|
10055
10067
|
};
|
|
10056
10068
|
};
|