impaktapps-ui-builder 1.0.437 → 1.0.438
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 +15 -15
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +1 -1
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildConfig.ts +3 -3
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +2 -2
- package/src/impaktapps-ui-builder/builder/services/component.ts +10 -10
package/package.json
CHANGED
|
@@ -22,9 +22,9 @@ export default (FormData: any) => {
|
|
|
22
22
|
if (formData.events) {
|
|
23
23
|
delete formData.events
|
|
24
24
|
}
|
|
25
|
-
if (formData.
|
|
26
|
-
component.
|
|
27
|
-
delete formData.
|
|
25
|
+
if (formData.tabLabelElements) {
|
|
26
|
+
component.tabLabelElements = formData.tabLabelElements || [];
|
|
27
|
+
delete formData.tabLabelElements
|
|
28
28
|
}
|
|
29
29
|
component = { ...formData, ...component };
|
|
30
30
|
return component;
|
|
@@ -403,8 +403,8 @@ const buildUiSchema = (config: any, store?: any) => {
|
|
|
403
403
|
});
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
|
-
if (config.
|
|
407
|
-
elements.
|
|
406
|
+
if (config.tabLabelElements) {
|
|
407
|
+
elements.tabLabelElements = config.tabLabelElements.map((e: any, elemInd: number) => {
|
|
408
408
|
return buildUiSchema(e, store)
|
|
409
409
|
});
|
|
410
410
|
}
|
|
@@ -63,7 +63,7 @@ export function refreshPage(type: string, store: any) {
|
|
|
63
63
|
Style: StyleSection,
|
|
64
64
|
Events: EventSection(store.theme.myTheme),
|
|
65
65
|
Components: TableSection(store.theme.myTheme),
|
|
66
|
-
TabLebelComponet: TableSection(store.theme.myTheme, "
|
|
66
|
+
TabLebelComponet: TableSection(store.theme.myTheme, "tabLabelElements"),
|
|
67
67
|
Properties: buildPropertiesSection(type),
|
|
68
68
|
Validation: ValidationSection
|
|
69
69
|
}
|
|
@@ -286,7 +286,7 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
286
286
|
if (path) {
|
|
287
287
|
let finalPath = `${path}`;
|
|
288
288
|
if (dynamicData?.path?.startsWith("tabLabels")) {
|
|
289
|
-
finalPath = `${finalPath}.
|
|
289
|
+
finalPath = `${finalPath}.tabLabelElements[${rowId}]`
|
|
290
290
|
} else {
|
|
291
291
|
finalPath = `${finalPath}.elements[${rowId}]`
|
|
292
292
|
}
|
|
@@ -302,7 +302,7 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
302
302
|
const rowId = sessionStorage.getItem('rowId');
|
|
303
303
|
const isTabLabelElements = sessionStorage.getItem('isTabLabelElements') === "true";
|
|
304
304
|
if (isTabLabelElements) {
|
|
305
|
-
store.formData.
|
|
305
|
+
store.formData.tabLabelElements.splice(rowId, 1);
|
|
306
306
|
} else {
|
|
307
307
|
store.formData.elements.splice(rowId, 1);
|
|
308
308
|
}
|
|
@@ -332,14 +332,14 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
332
332
|
if (!Array.isArray(store.formData.elements)) {
|
|
333
333
|
store.formData.elements = []
|
|
334
334
|
}
|
|
335
|
-
if (!Array.isArray(store.formData.
|
|
336
|
-
store.formData.
|
|
335
|
+
if (!Array.isArray(store.formData.tabLabelElements)) {
|
|
336
|
+
store.formData.tabLabelElements = []
|
|
337
337
|
}
|
|
338
338
|
const path = store.searchParams?.get("path");
|
|
339
339
|
saveFormdataInSessionStorage(store.ctx.core.data, path)
|
|
340
340
|
let finalPath = `${path}`;
|
|
341
341
|
if (dynamicData.path.startsWith("tabLabels")) {
|
|
342
|
-
finalPath = `${finalPath}.
|
|
342
|
+
finalPath = `${finalPath}.tabLabelElements[${store.formData.tabLabelElements.length}]`
|
|
343
343
|
} else {
|
|
344
344
|
finalPath = `${finalPath}.elements[${store.formData.elements.length}]`
|
|
345
345
|
}
|
|
@@ -421,13 +421,13 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
421
421
|
if (!Array.isArray(store.formData.events)) {
|
|
422
422
|
store.formData.events = []
|
|
423
423
|
}
|
|
424
|
-
if (!Array.isArray(store.formData.
|
|
425
|
-
store.formData.
|
|
424
|
+
if (!Array.isArray(store.formData.tabLabelElements)) {
|
|
425
|
+
store.formData.tabLabelElements = []
|
|
426
426
|
}
|
|
427
427
|
saveFormdataInSessionStorage(store.ctx.core.data, pastedElementParentPath);
|
|
428
428
|
const formData = getFormdataFromSessionStorage(pastedElementParentPath);
|
|
429
429
|
const currentLength = {
|
|
430
|
-
"TabsComponent": formData.
|
|
430
|
+
"TabsComponent": formData.tabLabelElements.length,
|
|
431
431
|
"Component": formData.elements.length,
|
|
432
432
|
"Events": formData.events.length
|
|
433
433
|
};
|
|
@@ -470,7 +470,7 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
470
470
|
return parentPath ? `${parentPath}.elements[${rowId}]` : `elements[${rowId}]`;
|
|
471
471
|
}
|
|
472
472
|
if(elementType === "TabsComponent"){
|
|
473
|
-
return `${parentPath}.
|
|
473
|
+
return `${parentPath}.tabLabelElements[${rowId}]`
|
|
474
474
|
}
|
|
475
475
|
return parentPath ? `${parentPath}.events[${rowId}]` : `events[${rowId}]`;
|
|
476
476
|
},
|