impaktapps-ui-builder 0.0.382-alpha.62 → 0.0.382-alpha.64
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 +204 -213
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +4 -4
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +96 -239
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +96 -205
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +96 -239
- package/src/impaktapps-ui-builder/runtime/services/events.ts +0 -239
- package/src/impaktapps-ui-builder/runtime/services/interface.ts +0 -12
- package/src/impaktapps-ui-builder/runtime/services/service.ts +0 -209
|
@@ -307,250 +307,107 @@ export const EventUiSchema: any = (theme) => {
|
|
|
307
307
|
{
|
|
308
308
|
type: "HorizontalLayout",
|
|
309
309
|
config: {
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
310
|
+
main: {
|
|
311
|
+
direction: 'row'
|
|
312
|
+
},
|
|
313
|
+
style: {
|
|
314
|
+
flexDirection: "row",
|
|
315
|
+
position: "absolute",
|
|
316
|
+
bottom: 0,
|
|
317
|
+
marginBottom: '-8px',
|
|
318
|
+
height: 'fit-content',
|
|
319
|
+
overflow: 'hidden',
|
|
320
|
+
zIndex: 1000,
|
|
321
|
+
width: 'inherit'
|
|
322
|
+
}
|
|
316
323
|
},
|
|
317
324
|
elements: [
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
},
|
|
325
|
-
config: {
|
|
326
|
-
layout: 9.5,
|
|
327
|
-
main: {
|
|
328
|
-
heading: "Copywriter@ACT21.IO"
|
|
329
|
-
},
|
|
330
|
-
style: {
|
|
331
|
-
color: theme?.palette?.text.disabled || "#AFAFAF",
|
|
332
|
-
fontSize: '12px',
|
|
333
|
-
textAlign: 'center'
|
|
334
|
-
}
|
|
335
|
-
},
|
|
325
|
+
{
|
|
326
|
+
|
|
327
|
+
type: "Control",
|
|
328
|
+
scope: "#/properties/FooterText",
|
|
329
|
+
options: {
|
|
330
|
+
widget: "Box",
|
|
336
331
|
},
|
|
337
|
-
{
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
style: {
|
|
354
|
-
flexGrow: 1
|
|
355
|
-
}
|
|
356
|
-
},
|
|
357
|
-
},
|
|
358
|
-
{
|
|
359
|
-
type: "Control",
|
|
360
|
-
scope: "#/properties/backIcon",
|
|
361
|
-
options: {
|
|
362
|
-
widget: "Box",
|
|
363
|
-
},
|
|
364
|
-
config: {
|
|
365
|
-
layout: 1,
|
|
366
|
-
main: {
|
|
367
|
-
iconName: 'PrevIcon',
|
|
368
|
-
onClick: "backHandler"
|
|
369
|
-
},
|
|
370
|
-
style: {
|
|
371
|
-
fill: theme.palette.primary.main,
|
|
372
|
-
width: 20,
|
|
373
|
-
height: 20,
|
|
374
|
-
display: 'flex',
|
|
375
|
-
alignItems: 'center',
|
|
376
|
-
justifyContent: 'center',
|
|
377
|
-
marginRight: '-8px',
|
|
378
|
-
cursor: 'pointer',
|
|
379
|
-
':hover': {
|
|
380
|
-
fill: theme.palette.primary.dark,
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
},
|
|
385
|
-
{
|
|
386
|
-
type: "Control",
|
|
387
|
-
scope: "#/properties/text",
|
|
388
|
-
|
|
389
|
-
options: {
|
|
390
|
-
widget: "Box",
|
|
391
|
-
},
|
|
392
|
-
config: {
|
|
393
|
-
layout: 5,
|
|
394
|
-
main: {
|
|
395
|
-
heading: "Previous Page",
|
|
396
|
-
onClick: "backHandler"
|
|
397
|
-
},
|
|
398
|
-
style: {
|
|
399
|
-
width: 'fit-content',
|
|
400
|
-
color: theme.palette.primary.main,
|
|
401
|
-
fontSize: "12px",
|
|
402
|
-
cursor: 'pointer',
|
|
403
|
-
marginLeft: '2px',
|
|
404
|
-
marginRight: 0,
|
|
405
|
-
':hover': {
|
|
406
|
-
color: theme.palette.primary.dark,
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
},
|
|
410
|
-
},
|
|
411
|
-
],
|
|
332
|
+
config: {
|
|
333
|
+
main: {
|
|
334
|
+
heading: "Copywriter@ACT21.IO"
|
|
335
|
+
},
|
|
336
|
+
style: {
|
|
337
|
+
color: theme?.palette?.text.disabled || "#AFAFAF",
|
|
338
|
+
fontSize: '12px',
|
|
339
|
+
textAlign: 'center',
|
|
340
|
+
lineHeight: 1,
|
|
341
|
+
width: 'fit-content',
|
|
342
|
+
left: '50%',
|
|
343
|
+
position: 'relative',
|
|
344
|
+
margin: 0,
|
|
345
|
+
flexGrow: 1,
|
|
346
|
+
height: 0
|
|
347
|
+
}
|
|
412
348
|
},
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
// layout: { xs: 11, sm: 4, md: 4, lg: 4 },
|
|
446
|
-
// main: {
|
|
447
|
-
// heading: "Copywriter@ACT21.IO"
|
|
448
|
-
// },
|
|
449
|
-
// style: {
|
|
450
|
-
// color: theme?.palette?.text.disabled || "#AFAFAF",
|
|
451
|
-
// fontSize: '12px',
|
|
452
|
-
// }
|
|
453
|
-
// },
|
|
454
|
-
// },
|
|
455
|
-
// {
|
|
456
|
-
// type: "HorizontalLayout",
|
|
457
|
-
// config: {
|
|
458
|
-
// layout: { xs: 11, sm: 4, md: 4, lg: 4 },
|
|
459
|
-
// },
|
|
460
|
-
// elements: [
|
|
461
|
-
// {
|
|
462
|
-
// type: "Control",
|
|
463
|
-
// scope: "#/properties/EmptyBox",
|
|
464
|
-
// options: {
|
|
465
|
-
// widget: "EmptyBox",
|
|
466
|
-
// },
|
|
467
|
-
// config: {
|
|
468
|
-
// layout: 2,
|
|
469
|
-
// },
|
|
470
|
-
// },
|
|
471
|
-
// {
|
|
472
|
-
// type: "Control",
|
|
473
|
-
// scope: "#/properties/backIcon",
|
|
474
|
-
// options: {
|
|
475
|
-
// widget: "Box",
|
|
476
|
-
// },
|
|
477
|
-
// config: {
|
|
478
|
-
// layout: 1,
|
|
479
|
-
// main: {
|
|
480
|
-
// iconName: 'PrevIcon',
|
|
481
|
-
// onClick: "backHandler"
|
|
482
|
-
// },
|
|
483
|
-
// style: {
|
|
484
|
-
// fill: theme.palette.primary.dark,
|
|
485
|
-
// width: 20,
|
|
486
|
-
// height: 20,
|
|
487
|
-
// display: 'flex',
|
|
488
|
-
// alignItems: 'center',
|
|
489
|
-
// justifyContent: 'center',
|
|
490
|
-
// marginRight: '-8px',
|
|
491
|
-
// cursor: 'pointer'
|
|
492
|
-
// }
|
|
493
|
-
// }
|
|
494
|
-
// },
|
|
495
|
-
// {
|
|
496
|
-
// type: "Control",
|
|
497
|
-
// scope: "#/properties/text",
|
|
498
|
-
|
|
499
|
-
// options: {
|
|
500
|
-
// widget: "Box",
|
|
501
|
-
// },
|
|
502
|
-
// config: {
|
|
503
|
-
// layout: 9,
|
|
504
|
-
// main: {
|
|
505
|
-
// heading: "Previous Page",
|
|
506
|
-
// onClick: "backHandler"
|
|
507
|
-
// },
|
|
508
|
-
// style: {
|
|
509
|
-
// color: theme.palette.primary.dark,
|
|
510
|
-
// fontSize: "12px",
|
|
511
|
-
// cursor: 'pointer',
|
|
512
|
-
// marginLeft: '-6px'
|
|
513
|
-
// }
|
|
514
|
-
// },
|
|
515
|
-
// },
|
|
516
|
-
// ],
|
|
517
|
-
// },
|
|
518
|
-
// // {
|
|
519
|
-
// // type: "Control",
|
|
520
|
-
// // scope: "#/properties/pageName",
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
type: "Control",
|
|
352
|
+
scope: "#/properties/backIcon",
|
|
353
|
+
options: {
|
|
354
|
+
widget: "Box",
|
|
355
|
+
},
|
|
356
|
+
config: {
|
|
357
|
+
main: {
|
|
358
|
+
iconName: 'PrevIcon',
|
|
359
|
+
onClick: "backHandler",
|
|
360
|
+
width: 'fit-content',
|
|
361
|
+
},
|
|
362
|
+
style: {
|
|
363
|
+
fill: theme.palette.primary.main,
|
|
364
|
+
width: 20,
|
|
365
|
+
height: 0,
|
|
366
|
+
margin: 0,
|
|
367
|
+
top: 0,
|
|
368
|
+
right: '82px',
|
|
369
|
+
position: 'absolute',
|
|
370
|
+
fontSize: '12px',
|
|
371
|
+
cursor: 'pointer',
|
|
372
|
+
':hover': {
|
|
373
|
+
fill: theme.palette.primary.dark,
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
type: "Control",
|
|
380
|
+
scope: "#/properties/text",
|
|
521
381
|
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
// // },
|
|
552
|
-
// ]
|
|
553
|
-
// }
|
|
382
|
+
options: {
|
|
383
|
+
widget: "Box",
|
|
384
|
+
},
|
|
385
|
+
config: {
|
|
386
|
+
main: {
|
|
387
|
+
heading: "Previous Page",
|
|
388
|
+
onClick: "backHandler"
|
|
389
|
+
},
|
|
390
|
+
style: {
|
|
391
|
+
textAlign: 'left',
|
|
392
|
+
lineHeight: 1,
|
|
393
|
+
height: 0,
|
|
394
|
+
width: 'fit-content',
|
|
395
|
+
color: theme.palette.primary.main,
|
|
396
|
+
fontSize: "12px",
|
|
397
|
+
cursor: 'pointer',
|
|
398
|
+
marginLeft: '2px',
|
|
399
|
+
marginRight: 0,
|
|
400
|
+
top: 3,
|
|
401
|
+
right: '12px',
|
|
402
|
+
position: 'absolute',
|
|
403
|
+
':hover': {
|
|
404
|
+
color: theme.palette.primary.dark,
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
},
|
|
408
|
+
},
|
|
409
|
+
]
|
|
410
|
+
}
|
|
554
411
|
],
|
|
555
412
|
};
|
|
556
413
|
return uiSchema
|
|
@@ -1,242 +1,3 @@
|
|
|
1
|
-
// import _, { cloneDeep } from "lodash";
|
|
2
|
-
// import { handlersProps } from "./interface";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
// export const executeEvents = async (
|
|
6
|
-
// params: handlersProps
|
|
7
|
-
// ) => {
|
|
8
|
-
// let nextEvent = [];
|
|
9
|
-
// let finalResponse = null;
|
|
10
|
-
// try {
|
|
11
|
-
// const shouldExecute = await shouldEventExecute(params)
|
|
12
|
-
// if (!shouldExecute) {
|
|
13
|
-
// return { response: undefined, events: undefined };
|
|
14
|
-
// }
|
|
15
|
-
// const response = await executeEventsHandler(params)
|
|
16
|
-
// finalResponse = response;
|
|
17
|
-
// const SuccessEvent = params.config?.events.filter(e => e.eventType === "Success");
|
|
18
|
-
// nextEvent = SuccessEvent;
|
|
19
|
-
// } catch (err) {
|
|
20
|
-
// const FailEvent = params.config?.events?.filter(e => e.eventType === "Fail")
|
|
21
|
-
// const setEvent = FailEvent?.length > 0 ? FailEvent : []
|
|
22
|
-
// nextEvent = setEvent;
|
|
23
|
-
// }
|
|
24
|
-
// if (nextEvent?.length > 0) {
|
|
25
|
-
// for (const actionConfig of nextEvent) {
|
|
26
|
-
// await executeEvents({ ...params, config: actionConfig, parentEventOutput: finalResponse })
|
|
27
|
-
// }
|
|
28
|
-
// }
|
|
29
|
-
// return finalResponse;
|
|
30
|
-
// }
|
|
31
|
-
|
|
32
|
-
// async function executeEventsHandler(params: handlersProps) {
|
|
33
|
-
// if (params.config.Handler === "api") {
|
|
34
|
-
// return await executeApiEventHandler(params)
|
|
35
|
-
// }
|
|
36
|
-
// else if (params.config.Handler === "inBuiltFunction") {
|
|
37
|
-
// return await executeInBuiltFunctionHandler(params)
|
|
38
|
-
// }
|
|
39
|
-
// else if (params.config.Handler === "custom") {
|
|
40
|
-
// return await executeCustomHandler(params)
|
|
41
|
-
// }
|
|
42
|
-
// else if (params.config.Handler === "refresh") {
|
|
43
|
-
// return await executeRefreshHandler(params)
|
|
44
|
-
// }
|
|
45
|
-
// else if (params.config.Handler === "mergeFormdata") {
|
|
46
|
-
// const result = await mergeFormdata(
|
|
47
|
-
// params.parentEventOutput, params.componentName, params.config, params.store, params.service)
|
|
48
|
-
// return result;
|
|
49
|
-
// }
|
|
50
|
-
// else if (params.config.Handler === "onBackHandler") {
|
|
51
|
-
// return params.store.functionParameters?.handleBack()
|
|
52
|
-
// }
|
|
53
|
-
// else if (params.config.Handler === "onNextHandler") {
|
|
54
|
-
// return params.store.functionParameters?.handleNext()
|
|
55
|
-
// }
|
|
56
|
-
// else if (params.config.Handler === "onResetHandler") {
|
|
57
|
-
// return params.store.functionParameters?.handleReset()
|
|
58
|
-
// }
|
|
59
|
-
// }
|
|
60
|
-
// export async function executeRefreshHandler(params: handlersProps) {
|
|
61
|
-
// const compToRefresh: string[] = getRefreshElements(params.config, params.eventGroups)
|
|
62
|
-
// for (const componentName of compToRefresh) {
|
|
63
|
-
// for (const compEventConfig of params.eventGroups.onLoad[componentName]) {
|
|
64
|
-
// await executeEvents({ ...params, config: compEventConfig, componentName });
|
|
65
|
-
// }
|
|
66
|
-
// }
|
|
67
|
-
// }
|
|
68
|
-
// async function executeApiEventHandler(params: handlersProps) {
|
|
69
|
-
// const initialBody = { ...params.userValue?.payload };
|
|
70
|
-
// const initialHeaders = {
|
|
71
|
-
// "X-Requested-With": "XMLHttpRequest",
|
|
72
|
-
// "Access-Control-Allow-Origin": "*"
|
|
73
|
-
// };
|
|
74
|
-
// const { body, headers } = await buildApiPayload(params.config, initialBody, initialHeaders, params.store, params.dynamicData, params.userValue, params.service)
|
|
75
|
-
|
|
76
|
-
// const response = await params.service[params.config.method](
|
|
77
|
-
// params.config.path,
|
|
78
|
-
// body,
|
|
79
|
-
// headers && { headers: headers }
|
|
80
|
-
// );
|
|
81
|
-
// return response;
|
|
82
|
-
// }
|
|
83
|
-
|
|
84
|
-
// async function executeInBuiltFunctionHandler(params: handlersProps) {
|
|
85
|
-
// let parameter = {};
|
|
86
|
-
// if (params.config.funcParametersCode) {
|
|
87
|
-
// const makeFunc = eval(params.config.funcParametersCode)
|
|
88
|
-
// parameter = makeFunc(params.store, params.dynamicData, params.userValue, params.parentEventOutput, params.service);
|
|
89
|
-
// }
|
|
90
|
-
// params.serviceHolder[params.config.inBuiltFunctionType](parameter)
|
|
91
|
-
// }
|
|
92
|
-
|
|
93
|
-
// async function executeCustomHandler(params: handlersProps) {
|
|
94
|
-
// const makeFunc = eval(params.config.eventCode)
|
|
95
|
-
// const response = await makeFunc(params.store, params.dynamicData, params.userValue, params.parentEventOutput, params.service, params.componentName);
|
|
96
|
-
// return response;
|
|
97
|
-
// }
|
|
98
|
-
|
|
99
|
-
// async function mergeFormdata(handlerResponse: any, componentName: string, eventConfig: any, store: any, service: any) {
|
|
100
|
-
// if (eventConfig.type === "Select" && !(_.isEmpty(handlerResponse?.data) && handlerResponse?.data)) {
|
|
101
|
-
// store.setSchema((pre) => {
|
|
102
|
-
// return {
|
|
103
|
-
// ...pre, properties: {
|
|
104
|
-
// ...pre.properties, [componentName]: {
|
|
105
|
-
// ...pre.properties?.[componentName],
|
|
106
|
-
// oneOf: handlerResponse.data
|
|
107
|
-
// }
|
|
108
|
-
// }
|
|
109
|
-
// }
|
|
110
|
-
// })
|
|
111
|
-
// }
|
|
112
|
-
// else if (eventConfig.type === "MultipleSelect" && !(_.isEmpty(handlerResponse?.data) && handlerResponse?.data)) {
|
|
113
|
-
// store.setSchema((pre) => {
|
|
114
|
-
// return {
|
|
115
|
-
// ...pre, properties: {
|
|
116
|
-
// ...pre.properties, [componentName]: {
|
|
117
|
-
// ...pre.properties?.[componentName],
|
|
118
|
-
// type: "array",
|
|
119
|
-
// items: {
|
|
120
|
-
// oneOf: handlerResponse?.data
|
|
121
|
-
// }
|
|
122
|
-
// }
|
|
123
|
-
// }
|
|
124
|
-
// }
|
|
125
|
-
// })
|
|
126
|
-
// }
|
|
127
|
-
// else if (eventConfig.type === "page") {
|
|
128
|
-
// if (!(_.isEmpty(handlerResponse?.data) && handlerResponse?.data)) {
|
|
129
|
-
// store.setFormdata((pre: any) => { return { ...pre, ...handlerResponse?.data } })
|
|
130
|
-
// }
|
|
131
|
-
// }
|
|
132
|
-
// else {
|
|
133
|
-
// if (handlerResponse) {
|
|
134
|
-
// store.setFormdata((pre) => { return { ...pre, [componentName]: eventConfig.lazyLoading ? handlerResponse.data.data : handlerResponse.data } });
|
|
135
|
-
// const demoData = await asyncOperation();
|
|
136
|
-
// }
|
|
137
|
-
// }
|
|
138
|
-
// }
|
|
139
|
-
|
|
140
|
-
// const buildBodyFormat = (body: any[], formData: any, userValue: any) => {
|
|
141
|
-
// const finalBody = { ...userValue?.payload };
|
|
142
|
-
// body.map((elem) => {
|
|
143
|
-
// if (typeof elem?.value !== "string") {
|
|
144
|
-
// finalBody[elem.key] = elem.value;
|
|
145
|
-
// } else {
|
|
146
|
-
// if (elem?.value?.startsWith("$userValue")) {
|
|
147
|
-
// const finalpath = elem.value.substring(11);
|
|
148
|
-
// finalBody[elem.key] = _.get(userValue, finalpath);;
|
|
149
|
-
// }
|
|
150
|
-
// else if (elem?.value?.startsWith("$")) {
|
|
151
|
-
// const finalpath = elem.value.substring(1);
|
|
152
|
-
// finalBody[elem.key] = _.get(formData, finalpath);;
|
|
153
|
-
// } else {
|
|
154
|
-
// finalBody[elem.key] = elem.value;
|
|
155
|
-
// }
|
|
156
|
-
// }
|
|
157
|
-
// })
|
|
158
|
-
// return finalBody;
|
|
159
|
-
// }
|
|
160
|
-
|
|
161
|
-
// const buildHeadersFormat = (headers: any[]) => {
|
|
162
|
-
// const headerObj = {
|
|
163
|
-
// // "Content-Type": "application/json",
|
|
164
|
-
// "X-Requested-With": "XMLHttpRequest"
|
|
165
|
-
// }
|
|
166
|
-
// headers.map((elem) => {
|
|
167
|
-
// headerObj[elem.key] = elem.value;
|
|
168
|
-
// })
|
|
169
|
-
// return headerObj;
|
|
170
|
-
// }
|
|
171
|
-
|
|
172
|
-
// async function shouldEventExecute(params: handlersProps) {
|
|
173
|
-
// const startEvent = params.config?.events?.filter(e => e.eventType === "onStart");
|
|
174
|
-
// if (startEvent?.length > 0) {
|
|
175
|
-
// const response = await executeEventsHandler({ ...params, config: startEvent[0] });
|
|
176
|
-
// return response;
|
|
177
|
-
// } else {
|
|
178
|
-
// return true
|
|
179
|
-
// }
|
|
180
|
-
// }
|
|
181
|
-
|
|
182
|
-
// export async function buildApiPayload(compConfig: any, body: any, headers: any, store: any, dynamicData: any, userValue: any, service) {
|
|
183
|
-
// if (compConfig?.headers) {
|
|
184
|
-
// headers = buildHeadersFormat(compConfig.headers)
|
|
185
|
-
|
|
186
|
-
// }
|
|
187
|
-
// if (compConfig.body) {
|
|
188
|
-
// body = { ...buildBodyFormat(compConfig.body, store.newData || store?.ctx?.core?.data || store.formData, userValue) };
|
|
189
|
-
// }
|
|
190
|
-
// if (compConfig.apiBody) {
|
|
191
|
-
// const makeFunc = eval(compConfig.apiBody);
|
|
192
|
-
// const data = await makeFunc(store, dynamicData, userValue, body);
|
|
193
|
-
// body = data
|
|
194
|
-
// }
|
|
195
|
-
// return { body, headers };
|
|
196
|
-
// }
|
|
197
|
-
|
|
198
|
-
// export function getRefreshElements(eventConfig: any, eventGropus: any) {
|
|
199
|
-
// let result: string[] = [];
|
|
200
|
-
// if (eventConfig?.refreshElements?.length > 0) {
|
|
201
|
-
// result = eventConfig.refreshElements.map((e) => {
|
|
202
|
-
// return e.value
|
|
203
|
-
// })
|
|
204
|
-
|
|
205
|
-
// } else {
|
|
206
|
-
// if (eventGropus?.onLoad) {
|
|
207
|
-
// result = Object.keys(eventGropus?.onLoad)
|
|
208
|
-
// result.push(result[0]);
|
|
209
|
-
// }
|
|
210
|
-
// }
|
|
211
|
-
// console.log(result);
|
|
212
|
-
// return result;
|
|
213
|
-
// }
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
// function asyncOperation() {
|
|
217
|
-
// return new Promise((resolve, reject) => {
|
|
218
|
-
// setTimeout(() => {
|
|
219
|
-
// const success = true;
|
|
220
|
-
// if (success) {
|
|
221
|
-
// resolve("Operation completed successfully!");
|
|
222
|
-
// reject(new Error("Operation failed!"));
|
|
223
|
-
// }
|
|
224
|
-
// }, 50);
|
|
225
|
-
// });
|
|
226
|
-
// }
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
1
|
import _, { cloneDeep } from "lodash";
|
|
241
2
|
import { handlersProps } from "./interface";
|
|
242
3
|
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
// export interface handlersProps {
|
|
2
|
-
// config: any,
|
|
3
|
-
// componentName: string,
|
|
4
|
-
// store: any,
|
|
5
|
-
// dynamicData: any,
|
|
6
|
-
// userValue: any,
|
|
7
|
-
// service: any,
|
|
8
|
-
// serviceHolder: any,
|
|
9
|
-
// eventGroups?: any,
|
|
10
|
-
// parentEventOutput?: any
|
|
11
|
-
// }
|
|
12
|
-
|
|
13
1
|
export interface handlersProps {
|
|
14
2
|
config: any,
|
|
15
3
|
componentName: string,
|