impaktapps-ui-builder 0.0.382-alpha.61 → 0.0.382-alpha.63
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 +106 -96
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +7 -7
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/runtime/services/events.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/runtime/services/interface.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +3 -1
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +96 -239
- package/src/impaktapps-ui-builder/runtime/services/events.ts +13 -6
- package/src/impaktapps-ui-builder/runtime/services/interface.ts +10 -9
- package/src/impaktapps-ui-builder/runtime/services/service.ts +24 -23
|
@@ -6351,11 +6351,18 @@ const componentBasicUiSchema = (theme) => {
|
|
|
6351
6351
|
{
|
|
6352
6352
|
type: "HorizontalLayout",
|
|
6353
6353
|
config: {
|
|
6354
|
-
|
|
6354
|
+
main: {
|
|
6355
|
+
direction: "row"
|
|
6356
|
+
},
|
|
6355
6357
|
style: {
|
|
6358
|
+
flexDirection: "row",
|
|
6356
6359
|
position: "absolute",
|
|
6357
|
-
bottom:
|
|
6358
|
-
|
|
6360
|
+
bottom: 0,
|
|
6361
|
+
marginBottom: "-8px",
|
|
6362
|
+
height: "fit-content",
|
|
6363
|
+
overflow: "hidden",
|
|
6364
|
+
zIndex: 1e3,
|
|
6365
|
+
width: "inherit"
|
|
6359
6366
|
}
|
|
6360
6367
|
},
|
|
6361
6368
|
elements: [
|
|
@@ -6366,90 +6373,80 @@ const componentBasicUiSchema = (theme) => {
|
|
|
6366
6373
|
widget: "Box"
|
|
6367
6374
|
},
|
|
6368
6375
|
config: {
|
|
6369
|
-
layout: 9.5,
|
|
6370
6376
|
main: {
|
|
6371
6377
|
heading: "Copywriter@ACT21.IO"
|
|
6372
6378
|
},
|
|
6373
6379
|
style: {
|
|
6374
6380
|
color: ((_a = theme == null ? void 0 : theme.palette) == null ? void 0 : _a.text.disabled) || "#AFAFAF",
|
|
6375
6381
|
fontSize: "12px",
|
|
6376
|
-
textAlign: "center"
|
|
6382
|
+
textAlign: "center",
|
|
6383
|
+
lineHeight: 1,
|
|
6384
|
+
width: "fit-content",
|
|
6385
|
+
left: "50%",
|
|
6386
|
+
position: "relative",
|
|
6387
|
+
margin: 0,
|
|
6388
|
+
flexGrow: 1,
|
|
6389
|
+
height: 0
|
|
6377
6390
|
}
|
|
6378
6391
|
}
|
|
6379
6392
|
},
|
|
6380
6393
|
{
|
|
6381
|
-
type: "
|
|
6382
|
-
|
|
6383
|
-
|
|
6384
|
-
|
|
6394
|
+
type: "Control",
|
|
6395
|
+
scope: "#/properties/backIcon",
|
|
6396
|
+
options: {
|
|
6397
|
+
widget: "Box"
|
|
6385
6398
|
},
|
|
6386
|
-
|
|
6387
|
-
{
|
|
6388
|
-
|
|
6389
|
-
|
|
6390
|
-
|
|
6391
|
-
widget: "EmptyBox"
|
|
6392
|
-
},
|
|
6393
|
-
config: {
|
|
6394
|
-
layout: 6,
|
|
6395
|
-
style: {
|
|
6396
|
-
flexGrow: 1
|
|
6397
|
-
}
|
|
6398
|
-
}
|
|
6399
|
+
config: {
|
|
6400
|
+
main: {
|
|
6401
|
+
iconName: "PrevIcon",
|
|
6402
|
+
onClick: "backHandler",
|
|
6403
|
+
width: "fit-content"
|
|
6399
6404
|
},
|
|
6400
|
-
{
|
|
6401
|
-
|
|
6402
|
-
|
|
6403
|
-
|
|
6404
|
-
|
|
6405
|
-
|
|
6406
|
-
|
|
6407
|
-
|
|
6408
|
-
|
|
6409
|
-
|
|
6410
|
-
|
|
6411
|
-
|
|
6412
|
-
style: {
|
|
6413
|
-
fill: theme.palette.primary.main,
|
|
6414
|
-
width: 20,
|
|
6415
|
-
height: 20,
|
|
6416
|
-
display: "flex",
|
|
6417
|
-
alignItems: "center",
|
|
6418
|
-
justifyContent: "center",
|
|
6419
|
-
marginRight: "-8px",
|
|
6420
|
-
cursor: "pointer",
|
|
6421
|
-
":hover": {
|
|
6422
|
-
fill: theme.palette.primary.dark
|
|
6423
|
-
}
|
|
6424
|
-
}
|
|
6405
|
+
style: {
|
|
6406
|
+
fill: theme.palette.primary.main,
|
|
6407
|
+
width: 20,
|
|
6408
|
+
height: 0,
|
|
6409
|
+
margin: 0,
|
|
6410
|
+
top: 0,
|
|
6411
|
+
right: "90px",
|
|
6412
|
+
position: "absolute",
|
|
6413
|
+
fontSize: "12px",
|
|
6414
|
+
cursor: "pointer",
|
|
6415
|
+
":hover": {
|
|
6416
|
+
fill: theme.palette.primary.dark
|
|
6425
6417
|
}
|
|
6418
|
+
}
|
|
6419
|
+
}
|
|
6420
|
+
},
|
|
6421
|
+
{
|
|
6422
|
+
type: "Control",
|
|
6423
|
+
scope: "#/properties/text",
|
|
6424
|
+
options: {
|
|
6425
|
+
widget: "Box"
|
|
6426
|
+
},
|
|
6427
|
+
config: {
|
|
6428
|
+
main: {
|
|
6429
|
+
heading: "Previous Page",
|
|
6430
|
+
onClick: "backHandler"
|
|
6426
6431
|
},
|
|
6427
|
-
{
|
|
6428
|
-
|
|
6429
|
-
|
|
6430
|
-
|
|
6431
|
-
|
|
6432
|
-
|
|
6433
|
-
|
|
6434
|
-
|
|
6435
|
-
|
|
6436
|
-
|
|
6437
|
-
|
|
6438
|
-
|
|
6439
|
-
|
|
6440
|
-
|
|
6441
|
-
|
|
6442
|
-
fontSize: "12px",
|
|
6443
|
-
cursor: "pointer",
|
|
6444
|
-
marginLeft: "2px",
|
|
6445
|
-
marginRight: 0,
|
|
6446
|
-
":hover": {
|
|
6447
|
-
color: theme.palette.primary.dark
|
|
6448
|
-
}
|
|
6449
|
-
}
|
|
6432
|
+
style: {
|
|
6433
|
+
textAlign: "left",
|
|
6434
|
+
lineHeight: 1,
|
|
6435
|
+
height: 0,
|
|
6436
|
+
width: "fit-content",
|
|
6437
|
+
color: theme.palette.primary.main,
|
|
6438
|
+
fontSize: "12px",
|
|
6439
|
+
cursor: "pointer",
|
|
6440
|
+
marginLeft: "2px",
|
|
6441
|
+
marginRight: 0,
|
|
6442
|
+
top: 3,
|
|
6443
|
+
right: "20px",
|
|
6444
|
+
position: "absolute",
|
|
6445
|
+
":hover": {
|
|
6446
|
+
color: theme.palette.primary.dark
|
|
6450
6447
|
}
|
|
6451
6448
|
}
|
|
6452
|
-
|
|
6449
|
+
}
|
|
6453
6450
|
}
|
|
6454
6451
|
]
|
|
6455
6452
|
}
|
|
@@ -8387,8 +8384,10 @@ async function executeInBuiltFunctionHandler(params) {
|
|
|
8387
8384
|
if (params.config.funcParametersCode) {
|
|
8388
8385
|
const makeFunc = eval(params.config.funcParametersCode);
|
|
8389
8386
|
parameter = makeFunc(params.store, params.dynamicData, params.userValue, params.parentEventOutput, params.service);
|
|
8387
|
+
params.serviceHolder[params.config.inBuiltFunctionType](parameter, params.service);
|
|
8388
|
+
} else {
|
|
8389
|
+
params.serviceHolder[params.config.inBuiltFunctionType](params.store, params.dynamicData, params.userValue, params.parentEventOutput, params.service);
|
|
8390
8390
|
}
|
|
8391
|
-
params.serviceHolder[params.config.inBuiltFunctionType](parameter);
|
|
8392
8391
|
}
|
|
8393
8392
|
async function executeCustomHandler(params) {
|
|
8394
8393
|
const makeFunc = eval(params.config.eventCode);
|
|
@@ -8436,14 +8435,15 @@ async function mergeFormdata(handlerResponse, componentName, eventConfig, store2
|
|
|
8436
8435
|
} else {
|
|
8437
8436
|
if (handlerResponse) {
|
|
8438
8437
|
store2.setFormdata((pre) => {
|
|
8439
|
-
|
|
8438
|
+
var _a;
|
|
8439
|
+
return { ...pre, [componentName]: eventConfig.lazyLoading ? (_a = handlerResponse == null ? void 0 : handlerResponse.data) == null ? void 0 : _a.data : handlerResponse.data };
|
|
8440
8440
|
});
|
|
8441
8441
|
await asyncOperation();
|
|
8442
8442
|
}
|
|
8443
8443
|
}
|
|
8444
8444
|
}
|
|
8445
8445
|
const buildBodyFormat = (body2, formData, userValue2) => {
|
|
8446
|
-
|
|
8446
|
+
let finalBody = { ...userValue2 == null ? void 0 : userValue2.payload };
|
|
8447
8447
|
body2.map((elem) => {
|
|
8448
8448
|
var _a, _b;
|
|
8449
8449
|
if (typeof (elem == null ? void 0 : elem.value) !== "string") {
|
|
@@ -8455,6 +8455,10 @@ const buildBodyFormat = (body2, formData, userValue2) => {
|
|
|
8455
8455
|
} else if ((_b = elem == null ? void 0 : elem.value) == null ? void 0 : _b.startsWith("$")) {
|
|
8456
8456
|
const finalpath = elem.value.substring(1);
|
|
8457
8457
|
finalBody[elem.key] = _.get(formData, finalpath);
|
|
8458
|
+
} else if ((elem == null ? void 0 : elem.value) === "*" && (elem == null ? void 0 : elem.key) === "*") {
|
|
8459
|
+
finalBody = { ...finalBody, ...formData };
|
|
8460
|
+
} else if ((elem == null ? void 0 : elem.value) === "*") {
|
|
8461
|
+
finalBody[elem.key] = formData;
|
|
8458
8462
|
} else {
|
|
8459
8463
|
finalBody[elem.key] = elem.value;
|
|
8460
8464
|
}
|
|
@@ -8575,12 +8579,14 @@ var service = (funcParams) => {
|
|
|
8575
8579
|
dynamicData: funcParams.dynamicData,
|
|
8576
8580
|
userValue: funcParams.userValue,
|
|
8577
8581
|
service: funcParams.service,
|
|
8578
|
-
serviceHolder: { downloadFile: downloadFile$1, download: doDownload },
|
|
8579
|
-
eventGroups
|
|
8582
|
+
serviceHolder: { downloadFile: downloadFile$1, download: doDownload, ...funcParams.functionsProvider },
|
|
8583
|
+
eventGroups,
|
|
8584
|
+
functionsProvider: funcParams.functionsProvider
|
|
8580
8585
|
};
|
|
8581
8586
|
return {
|
|
8582
8587
|
setPage: async function() {
|
|
8583
8588
|
funcParams.store.setFormdata({});
|
|
8589
|
+
await asyncOperation();
|
|
8584
8590
|
executeEventsParameters = {
|
|
8585
8591
|
config: {},
|
|
8586
8592
|
componentName: "",
|
|
@@ -8588,19 +8594,10 @@ var service = (funcParams) => {
|
|
|
8588
8594
|
dynamicData: funcParams.dynamicData,
|
|
8589
8595
|
userValue: funcParams.userValue,
|
|
8590
8596
|
service: funcParams.service,
|
|
8597
|
+
functionsProvider: funcParams.functionsProvider,
|
|
8591
8598
|
serviceHolder: this,
|
|
8592
8599
|
eventGroups
|
|
8593
8600
|
};
|
|
8594
|
-
funcParams.store.setSchema(
|
|
8595
|
-
(pre) => {
|
|
8596
|
-
return {
|
|
8597
|
-
...funcParams.schema,
|
|
8598
|
-
properties: { ...funcParams.schema.properties, ...pre.properties }
|
|
8599
|
-
};
|
|
8600
|
-
}
|
|
8601
|
-
);
|
|
8602
|
-
funcParams.uiSchema.elements.push(notifyUiSchema);
|
|
8603
|
-
funcParams.store.setUiSchema(funcParams.uiSchema);
|
|
8604
8601
|
await executeRefreshHandler({
|
|
8605
8602
|
config: {},
|
|
8606
8603
|
componentName: "",
|
|
@@ -8611,16 +8608,33 @@ var service = (funcParams) => {
|
|
|
8611
8608
|
serviceHolder: this,
|
|
8612
8609
|
eventGroups
|
|
8613
8610
|
});
|
|
8611
|
+
await asyncOperation();
|
|
8612
|
+
funcParams.store.setSchema(
|
|
8613
|
+
(pre) => {
|
|
8614
|
+
return {
|
|
8615
|
+
...funcParams.schema,
|
|
8616
|
+
properties: { ...funcParams.schema.properties, ...pre.properties }
|
|
8617
|
+
};
|
|
8618
|
+
}
|
|
8619
|
+
);
|
|
8620
|
+
funcParams.uiSchema.elements.push(notifyUiSchema);
|
|
8621
|
+
funcParams.store.setUiSchema(funcParams.uiSchema);
|
|
8614
8622
|
},
|
|
8615
8623
|
onClick: async function() {
|
|
8616
8624
|
await this.callHandler("onClick");
|
|
8617
8625
|
},
|
|
8626
|
+
onMount: async function() {
|
|
8627
|
+
await this.callHandler("onMount");
|
|
8628
|
+
},
|
|
8618
8629
|
onFileDownload: async function() {
|
|
8619
8630
|
await this.callHandler("onDownload");
|
|
8620
8631
|
},
|
|
8621
8632
|
onFileUpload: async function() {
|
|
8622
8633
|
await this.callHandler("onUpload");
|
|
8623
8634
|
},
|
|
8635
|
+
backHandler: function() {
|
|
8636
|
+
funcParams.store.navigate(-1);
|
|
8637
|
+
},
|
|
8624
8638
|
onPaginationChange: async function(paginationValues) {
|
|
8625
8639
|
var _a;
|
|
8626
8640
|
const apiBody = [
|
|
@@ -8639,17 +8653,16 @@ var service = (funcParams) => {
|
|
|
8639
8653
|
{ key: "searchValue", value: param.serachValue },
|
|
8640
8654
|
{ key: "currentValue", value: param.currentValue }
|
|
8641
8655
|
];
|
|
8642
|
-
|
|
8656
|
+
const response2 = await this.updateConfigApiBody(param, apiBody);
|
|
8657
|
+
return response2 == null ? void 0 : response2.data;
|
|
8643
8658
|
}
|
|
8644
8659
|
},
|
|
8645
8660
|
onChange: async function() {
|
|
8646
|
-
var _a, _b;
|
|
8647
8661
|
if (eventGroups.onChange) {
|
|
8648
|
-
(_a = funcParams.dynamicData) == null ? void 0 : _a.setLoading(true);
|
|
8649
8662
|
const ChangeEventsKeysArray = Object.keys(eventGroups.onChange);
|
|
8650
8663
|
Promise.all(ChangeEventsKeysArray.map(async (componentName) => {
|
|
8651
|
-
var
|
|
8652
|
-
if (((
|
|
8664
|
+
var _a, _b;
|
|
8665
|
+
if (((_a = funcParams.store) == null ? void 0 : _a.formData[componentName]) !== funcParams.store.newData[componentName] && ((_b = funcParams.store) == null ? void 0 : _b.newData[componentName]) !== void 0) {
|
|
8653
8666
|
for (const eventConfig of eventGroups.onChange[componentName]) {
|
|
8654
8667
|
await executeEvents({
|
|
8655
8668
|
...executeEventsParameters,
|
|
@@ -8659,7 +8672,6 @@ var service = (funcParams) => {
|
|
|
8659
8672
|
}
|
|
8660
8673
|
}
|
|
8661
8674
|
}));
|
|
8662
|
-
(_b = funcParams.dynamicData) == null ? void 0 : _b.setLoading(false);
|
|
8663
8675
|
}
|
|
8664
8676
|
},
|
|
8665
8677
|
updateConfigApiBody: async function(paramValue, apiBody) {
|
|
@@ -8702,9 +8714,6 @@ var service = (funcParams) => {
|
|
|
8702
8714
|
functionParameters == null ? void 0 : functionParameters.handleNext();
|
|
8703
8715
|
}
|
|
8704
8716
|
},
|
|
8705
|
-
backHandler: () => {
|
|
8706
|
-
funcParams.store.navigate(-1);
|
|
8707
|
-
},
|
|
8708
8717
|
onReset: async function(functionParameters) {
|
|
8709
8718
|
var _a, _b;
|
|
8710
8719
|
const path = ((_a = funcParams.dynamicData) == null ? void 0 : _a.tableButtonPath) || funcParams.dynamicData.path.split(".")[0];
|
|
@@ -8728,7 +8737,8 @@ var service = (funcParams) => {
|
|
|
8728
8737
|
}
|
|
8729
8738
|
},
|
|
8730
8739
|
downloadFile: downloadFile$1,
|
|
8731
|
-
download: doDownload
|
|
8740
|
+
download: doDownload,
|
|
8741
|
+
...funcParams.functionsProvider
|
|
8732
8742
|
};
|
|
8733
8743
|
};
|
|
8734
8744
|
var leaderBoard = {
|