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
|
@@ -21,6 +21,6 @@ declare const _default: (store: any, dynamicData: any, submitHandler: any, servi
|
|
|
21
21
|
PasteElement: (setPage: any, elementType: string) => void;
|
|
22
22
|
RemoveItemButton: (paramStore?: any) => void;
|
|
23
23
|
elementPathHandler: (parentPath: string, rowId: any, elementType: string) => string;
|
|
24
|
-
ElementPathSetter: (uiSchema: any) => void;
|
|
24
|
+
ElementPathSetter: (uiSchema: any, copiedFormData?: any) => void;
|
|
25
25
|
};
|
|
26
26
|
export default _default;
|
package/package.json
CHANGED
|
@@ -189,10 +189,10 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
189
189
|
const rowId = dynamicData.path.split(".")[1];
|
|
190
190
|
const parentPathOfCopiedComponent = store.searchParams?.get("path");
|
|
191
191
|
const copiedElementPath = this.elementPathHandler(parentPathOfCopiedComponent, rowId, elementType);
|
|
192
|
-
const
|
|
192
|
+
const copiedFormData = getFormdataFromSessionStorage(copiedElementPath);
|
|
193
193
|
|
|
194
|
-
this.ElementPathSetter(uiSchema);
|
|
195
|
-
sessionStorage.setItem('copiedConfig',JSON.stringify(
|
|
194
|
+
this.ElementPathSetter(uiSchema,copiedFormData);
|
|
195
|
+
sessionStorage.setItem('copiedConfig',JSON.stringify(copiedFormData));
|
|
196
196
|
store.setSchema(schema);
|
|
197
197
|
store.setUiSchema(uiSchema);
|
|
198
198
|
},
|
|
@@ -246,8 +246,8 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
246
246
|
}
|
|
247
247
|
return parentPath ? `${parentPath}.events[${rowId}]` : `events[${rowId}]`;
|
|
248
248
|
},
|
|
249
|
-
ElementPathSetter: function(uiSchema: any){
|
|
250
|
-
const formData = JSON.parse(sessionStorage.getItem("copiedConfig"));
|
|
249
|
+
ElementPathSetter: function(uiSchema: any,copiedFormData?: any){
|
|
250
|
+
const formData = copiedFormData || JSON.parse(sessionStorage.getItem("copiedConfig"));
|
|
251
251
|
const completePath = formData.pageName.split('>').map(item => item.trim());
|
|
252
252
|
const componentName = completePath[completePath.length - 2];
|
|
253
253
|
const elementHeading = formData.name ? `Copied Element: ${formData.name}` : `Copied Event: ${componentName} Event Type: ${formData.eventType} `;
|
|
@@ -85,17 +85,15 @@ export default (
|
|
|
85
85
|
...functionsName
|
|
86
86
|
]
|
|
87
87
|
}
|
|
88
|
+
if (sessionStorage.getItem("copiedConfig") ) {
|
|
89
|
+
Component(store, dynamicData, submitHandler, service).ElementPathSetter(uiSchema);
|
|
90
|
+
}
|
|
88
91
|
store.setSchema(schema)
|
|
89
92
|
store.setUiSchema(uiSchema)
|
|
90
93
|
},
|
|
91
94
|
|
|
92
95
|
getFormData: Component(store, dynamicData, submitHandler, service).getFormdata,
|
|
93
96
|
getUiSchema: function () {
|
|
94
|
-
const UiSchema = _.cloneDeep(EventUiSchema(store.theme.myTheme))
|
|
95
|
-
if (sessionStorage.getItem("copiedConfig") ) {
|
|
96
|
-
Component(store, dynamicData, submitHandler, service).ElementPathSetter(UiSchema);
|
|
97
|
-
}
|
|
98
|
-
store.setUiSchema(UiSchema);
|
|
99
97
|
return EventUiSchema;
|
|
100
98
|
},
|
|
101
99
|
getSchema: () => {
|