impaktapps-ui-builder 0.0.963-copyElement.1017 → 0.0.963-copyElement.1019

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "0.0.963-copyElement.1017",
3
+ "version": "0.0.963-copyElement.1019",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -184,8 +184,10 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
184
184
  copyPasteElement: function(paramStore: any, setPage: any = this.setPage.bind(this) ){
185
185
 
186
186
  // Paste_Event // Paste_Component //Copy_Event //Copy_Component
187
- const actionType = dynamicData.tableButtonPath.split('_')[0];
188
- const elementType = dynamicData.tableButtonPath.split('_')[1];
187
+ // elements.0.Copy_Component
188
+ const path = dynamicData.path.split('.')[2];
189
+ const actionType = path.split('_')[0];
190
+ const elementType = path.split('_')[1];
189
191
 
190
192
  if(actionType === "Copy"){
191
193
  this.CopyElement(paramStore, elementType);
@@ -232,17 +234,17 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
232
234
  }
233
235
  const pastedElementParentPath = store.searchParams?.get("path");
234
236
  const formData = getFormdataFromSessionStorage(pastedElementParentPath);
235
- const insertElementIndex = elementType === "component" ? formData.elements.length : formData.events.length;
237
+ const insertElementIndex = elementType === "Component" ? formData.elements.length : formData.events.length;
236
238
  const pastedElementPath = this.elementPathHandler(pastedElementParentPath, insertElementIndex, elementType);
237
239
 
238
240
  const copiedConfig = JSON.parse(sessionStorage.getItem("copiedConfig"));
239
- if(copiedConfig.Handler && elementType === "component"){
241
+ if(copiedConfig.Handler && elementType === "Component"){
240
242
  store.setNotify({
241
243
  FailMessage: "The pasted content is invalid; the event cannot be integrated into the component section.",
242
244
  Fail: true,
243
245
  });
244
246
  }
245
- else if(copiedConfig.elements && elementType === "event"){
247
+ else if(copiedConfig.elements && elementType === "Event"){
246
248
  store.setNotify({
247
249
  FailMessage: "The pasted content is invalid; the component cannot be integrated into the event section.",
248
250
  Fail: true,