impaktapps-ui-builder 0.0.409-r → 0.0.409-s
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 +16 -10
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +3 -3
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +1 -77
- package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +4 -4
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +4 -4
- package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +1 -1
- package/src/impaktapps-ui-builder/runtime/services/events.ts +1 -0
- package/src/impaktapps-ui-builder/runtime/services/service.ts +7 -1
package/package.json
CHANGED
|
@@ -358,80 +358,4 @@ const buildUiSchema = (config: any) => {
|
|
|
358
358
|
}
|
|
359
359
|
|
|
360
360
|
|
|
361
|
-
export default buildUiSchema;
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
function nodeProvider(element, sizeMap) {
|
|
391
|
-
if (element.type) {
|
|
392
|
-
return {
|
|
393
|
-
accessorKey: element.name,
|
|
394
|
-
type: element.columnFormat,
|
|
395
|
-
header: element.label || element.name,
|
|
396
|
-
size: sizeMap[element.name] || 180,
|
|
397
|
-
widget: buildUiSchema(element)
|
|
398
|
-
|
|
399
|
-
};
|
|
400
|
-
}
|
|
401
|
-
return {
|
|
402
|
-
accessorKey: element.name,
|
|
403
|
-
type: element.columnFormat,
|
|
404
|
-
header: element.label || element.name,
|
|
405
|
-
size: sizeMap[element.name] || 180,
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
function buildHierarchy(elements, parentName = null, sizeMap) {
|
|
410
|
-
const result = [];
|
|
411
|
-
for (const element of elements) {
|
|
412
|
-
if (element?.parent === parentName) {
|
|
413
|
-
const children = buildHierarchy(elements, element.name, sizeMap);
|
|
414
|
-
const node: any = nodeProvider(element, sizeMap)
|
|
415
|
-
if (children.length > 0) {
|
|
416
|
-
node.columns = children;
|
|
417
|
-
node.type = "group";
|
|
418
|
-
}
|
|
419
|
-
result.push(node);
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
return result;
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
function transformConfigToOutput(config, sizeMap) {
|
|
426
|
-
const output = [];
|
|
427
|
-
const hierarchy = buildHierarchy(config.elements, config.name, schema);
|
|
428
|
-
for (const element of config.elements) {
|
|
429
|
-
const parentExists = config.elements.some(e => e.name === element.parent);
|
|
430
|
-
if (!parentExists && element.parent !== config.name) {
|
|
431
|
-
output.push(nodeProvider(element, sizeMap))
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
return [...hierarchy, ...output,];
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
|
|
361
|
+
export default buildUiSchema;
|
|
@@ -25,7 +25,7 @@ export default (funcParams: funcParamsProps) => {
|
|
|
25
25
|
},
|
|
26
26
|
getFormdata: async function () {
|
|
27
27
|
const id = store.searchParams?.get("id");
|
|
28
|
-
const config: any = await funcParams.pageConfigProvider()
|
|
28
|
+
const config: any = await funcParams.pageConfigProvider(id)
|
|
29
29
|
const formData = getFormdataFromLocalStorage()
|
|
30
30
|
if (formData) {
|
|
31
31
|
return formData;
|
|
@@ -39,9 +39,15 @@ export const extractEvents = (eventConfig: any) => {
|
|
|
39
39
|
return elem.eventType === "Success"
|
|
40
40
|
})
|
|
41
41
|
if (!(!!SuccessEvent) && event.eventType === "onLoad") {
|
|
42
|
+
if (!(!!event.events)) {
|
|
43
|
+
event.events = [];
|
|
44
|
+
}
|
|
42
45
|
event.events.push({ Handler: "mergeFormdata", eventType: "Success", type: compType, lazyLoading: eventConfig.lazyLoading === "YES" ? true : false })
|
|
43
46
|
}
|
|
44
47
|
if (!(!!SuccessEvent) && (event.eventType === "onBack" || event.eventType === "onNext" || event.eventType === "onReset")) {
|
|
48
|
+
if (!(!!event.events)) {
|
|
49
|
+
event.events = [];
|
|
50
|
+
}
|
|
45
51
|
event.events.push({ Handler: `${event.eventType}Handler`, eventType: "Success", type: compType, lazyLoading: eventConfig.lazyLoading === "YES" ? true : false })
|
|
46
52
|
}
|
|
47
53
|
eventGroups[event.eventType][eventConfigObj.name].push({ ...event, type: compType })
|
|
@@ -71,7 +77,7 @@ export default (funcParams: funcParamsProps) => {
|
|
|
71
77
|
if (pageBasicDetailString) {
|
|
72
78
|
pageData = JSON.parse(pageBasicDetailString)
|
|
73
79
|
} else {
|
|
74
|
-
pageData =
|
|
80
|
+
pageData = await funcParams.pageDataProvider();
|
|
75
81
|
localStorage.setItem("pagemasterMetaData", JSON.stringify({
|
|
76
82
|
schema: pageData?.schema,
|
|
77
83
|
uiSchema: pageData?.uiSchema, config: pageData?.config
|