impaktapps-ui-builder 0.0.963-copyElement.1027 → 0.0.963-copyElement.1029
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 +8 -10
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +9 -9
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/services/component.d.ts +1 -1
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/services/component.ts +5 -5
- package/src/impaktapps-ui-builder/builder/services/event.ts +3 -5
|
@@ -8442,9 +8442,9 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
8442
8442
|
const rowId = dynamicData2.path.split(".")[1];
|
|
8443
8443
|
const parentPathOfCopiedComponent = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
8444
8444
|
const copiedElementPath = this.elementPathHandler(parentPathOfCopiedComponent, rowId, elementType);
|
|
8445
|
-
const
|
|
8446
|
-
this.ElementPathSetter(uiSchema);
|
|
8447
|
-
sessionStorage.setItem("copiedConfig", JSON.stringify(
|
|
8445
|
+
const copiedFormData = getFormdataFromSessionStorage(copiedElementPath);
|
|
8446
|
+
this.ElementPathSetter(uiSchema, copiedFormData);
|
|
8447
|
+
sessionStorage.setItem("copiedConfig", JSON.stringify(copiedFormData));
|
|
8448
8448
|
store2.setSchema(schema2);
|
|
8449
8449
|
store2.setUiSchema(uiSchema);
|
|
8450
8450
|
},
|
|
@@ -8496,8 +8496,8 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
8496
8496
|
}
|
|
8497
8497
|
return parentPath ? `${parentPath}.events[${rowId}]` : `events[${rowId}]`;
|
|
8498
8498
|
},
|
|
8499
|
-
ElementPathSetter: function(uiSchema) {
|
|
8500
|
-
const formData = JSON.parse(sessionStorage.getItem("copiedConfig"));
|
|
8499
|
+
ElementPathSetter: function(uiSchema, copiedFormData) {
|
|
8500
|
+
const formData = copiedFormData || JSON.parse(sessionStorage.getItem("copiedConfig"));
|
|
8501
8501
|
const completePath = formData.pageName.split(">").map((item) => item.trim());
|
|
8502
8502
|
const componentName = completePath[completePath.length - 2];
|
|
8503
8503
|
const elementHeading = formData.name ? `Copied Element: ${formData.name}` : `Copied Event: ${componentName} Event Type: ${formData.eventType} `;
|
|
@@ -9488,16 +9488,14 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
|
|
|
9488
9488
|
...functionsName
|
|
9489
9489
|
];
|
|
9490
9490
|
}
|
|
9491
|
+
if (sessionStorage.getItem("copiedConfig")) {
|
|
9492
|
+
Component(store22, dynamicData2, submitHandler, service2).ElementPathSetter(uiSchema);
|
|
9493
|
+
}
|
|
9491
9494
|
store22.setSchema(schema2);
|
|
9492
9495
|
store22.setUiSchema(uiSchema);
|
|
9493
9496
|
},
|
|
9494
9497
|
getFormData: Component(store2, dynamicData2, submitHandler, service2).getFormdata,
|
|
9495
9498
|
getUiSchema: function() {
|
|
9496
|
-
const UiSchema = _.cloneDeep(EventUiSchema(store2.theme.myTheme));
|
|
9497
|
-
if (sessionStorage.getItem("copiedConfig")) {
|
|
9498
|
-
Component(store2, dynamicData2, submitHandler, service2).ElementPathSetter(UiSchema);
|
|
9499
|
-
}
|
|
9500
|
-
store2.setUiSchema(UiSchema);
|
|
9501
9499
|
return EventUiSchema;
|
|
9502
9500
|
},
|
|
9503
9501
|
getSchema: () => {
|