impaktapps-ui-builder 0.0.963-CopyComponent.6 → 0.0.963-CopyComponent.8

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.
@@ -140,33 +140,28 @@ export default (
140
140
  store.updateDialog("popUpEvent");
141
141
  },
142
142
 
143
- CopyEvent: function(){
144
- const rowId = dynamicData.path.split(".")[1];
145
- const path = store.searchParams?.get("path");
146
-
147
- // const updatedPath = `${path}.elements[${rowId}]`;
148
- const updatedPath = path ? `${path}.events[${rowId}]` : `events[${rowId}]`;
143
+ CopyEvent: Component(store, dynamicData, submitHandler, service).CopyEvent,
144
+ PasteEvent: Component(store, dynamicData, submitHandler, service).PasteEvent,
149
145
 
150
- const formData = getFormdataFromSessionStorage(updatedPath);
151
- // sessionStorage.setItem('copiedComponent',formData);
152
- sessionStorage.setItem('copiedComponent',JSON.stringify(formData));
153
- },
146
+ // CopyEvent: function(){
147
+ // const rowId = dynamicData.path.split(".")[1];
148
+ // const path = store.searchParams?.get("path");
149
+ // const updatedPath = path ? `${path}.events[${rowId}]` : `events[${rowId}]`;
154
150
 
155
- PasteEvent: function(){
156
- const path = store.searchParams?.get("path");
157
- const rowId = dynamicData.path.split(".")[1];
158
- // const updatedPath = `${path}.elements[${rowId}]`;
159
- const updatedPath = path ? `${path}.events[${rowId}]` : `events[${rowId}]`;
160
- const formData = getFormdataFromSessionStorage(updatedPath)
161
- const insertComponentPath = formData.elements.length;
151
+ // const formData = getFormdataFromSessionStorage(updatedPath);
152
+ // sessionStorage.setItem('copiedConfig',JSON.stringify(formData));
153
+ // },
162
154
 
163
- const finalPath = `${updatedPath}.events[${insertComponentPath}]`;
155
+ // PasteEvent: function(){
156
+ // const path = store.searchParams?.get("path");
157
+ // const formData = getFormdataFromSessionStorage(path)
158
+ // const insertComponentPath = formData.events.length;
164
159
 
165
- // const copiedData = sessionStorage.getItem('copiedComponent');
166
- const copiedData = JSON.parse(sessionStorage.getItem("copiedComponent"));
167
- saveFormdataInSessionStorage(copiedData, finalPath);
168
- sessionStorage.removeItem('copiedComponent');
169
- this.setPage();
170
- }
160
+ // const finalPath = `${path}.events[${insertComponentPath}]`;
161
+ // const copiedData = JSON.parse(sessionStorage.getItem("copiedConfig"));
162
+ // saveFormdataInSessionStorage(copiedData, finalPath);
163
+ // sessionStorage.removeItem('copiedConfig');
164
+ // this.setPage();
165
+ // }
171
166
  }
172
167
  };
@@ -102,34 +102,42 @@ export default (funcParams: funcParamsProps) => {
102
102
  store.updateDialog("popUpPageMasterEvent");
103
103
  },
104
104
 
105
- CopyComponent: function(){
106
- const rowId = dynamicData.path.split(".")[1];
107
- const path = store.searchParams?.get("path");
108
- const id = store.searchParams?.get("id");
109
- const updatedPath = path ? `${path}.elements[${rowId}]` : `elements[${rowId}]`;
110
105
 
111
- const formData = getFormdataFromSessionStorage(updatedPath);
112
- sessionStorage.setItem('copiedComponent',JSON.stringify(formData));
106
+ CopyComponent: Component(store, dynamicData, submitHandler, service).CopyComponent,
113
107
 
114
- },
115
-
116
- PasteComponent: function(){
117
- const path = store.searchParams?.get("path");
118
- const rowId = dynamicData.path.split(".")[1];
119
- // const updatedPath = `${path}.elements[${rowId}]`;
120
- const updatedPath = path ? `${path}.elements[${rowId}]` : `elements[${rowId}]`;
121
- const formData = getFormdataFromSessionStorage(updatedPath)
122
- const insertComponentPath = formData.elements.length;
108
+ PasteComponent: Component(store, dynamicData, submitHandler, service).PasteComponent,
123
109
 
124
- const finalPath = `${updatedPath}.elements[${insertComponentPath}]`;
110
+ CopyEvent: Component(store, dynamicData, submitHandler, service).CopyEvent,
111
+ PasteEvent: Component(store, dynamicData, submitHandler, service).PasteEvent,
112
+
113
+
114
+ // CopyComponent: function(){
115
+ // const rowId = dynamicData.path.split(".")[1];
116
+ // const path = store.searchParams?.get("path");
117
+ // const id = store.searchParams?.get("id");
118
+ // const updatedPath = path ? `${path}.elements[${rowId}]` : `elements[${rowId}]`;
119
+
120
+ // const formData = getFormdataFromSessionStorage(updatedPath);
121
+ // sessionStorage.setItem('copiedComponent',JSON.stringify(formData));
122
+
123
+ // },
124
+
125
+ // PasteComponent: function(){
126
+ // const path = store.searchParams?.get("path");
127
+ // const rowId = dynamicData.path.split(".")[1];
128
+ // // const updatedPath = `${path}.elements[${rowId}]`;
129
+ // const updatedPath = path ? `${path}.elements[${rowId}]` : `elements[${rowId}]`;
130
+ // const formData = getFormdataFromSessionStorage(updatedPath)
131
+ // const insertComponentPath = formData.elements.length;
125
132
 
126
- // const copiedData = sessionStorage.getItem('copiedComponent');
127
- const copiedData = JSON.parse(sessionStorage.getItem("copiedComponent"));
128
- saveFormdataInSessionStorage(copiedData, finalPath);
129
- sessionStorage.removeItem('copiedComponent');
133
+ // const finalPath = `${updatedPath}.elements[${insertComponentPath}]`;
130
134
 
131
- this.setPage();
135
+ // // const copiedData = sessionStorage.getItem('copiedComponent');
136
+ // const copiedData = JSON.parse(sessionStorage.getItem("copiedComponent"));
137
+ // saveFormdataInSessionStorage(copiedData, finalPath);
138
+ // sessionStorage.removeItem('copiedComponent');
132
139
 
133
- }
140
+ // this.setPage();
141
+ // }
134
142
  }
135
143
  };