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.
- package/dist/impaktapps-ui-builder.es.js +171 -149
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +13 -13
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/eventSection.d.ts +26 -2
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/tableSection.d.ts +27 -3
- package/dist/src/impaktapps-ui-builder/builder/services/pageMaster.d.ts +2 -0
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/eventSection.ts +25 -21
- package/src/impaktapps-ui-builder/builder/build/uischema/tableSection.ts +28 -24
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +72 -22
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +27 -24
- package/src/impaktapps-ui-builder/builder/services/component.ts +105 -39
- package/src/impaktapps-ui-builder/builder/services/event.ts +19 -24
- package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +31 -23
|
@@ -9,7 +9,7 @@ export declare const EventSection: (theme: any) => {
|
|
|
9
9
|
config: {
|
|
10
10
|
main: {
|
|
11
11
|
headerIcons: {
|
|
12
|
-
elements: {
|
|
12
|
+
elements: ({
|
|
13
13
|
widget: {
|
|
14
14
|
type: string;
|
|
15
15
|
scope: string;
|
|
@@ -30,7 +30,28 @@ export declare const EventSection: (theme: any) => {
|
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
|
-
}
|
|
33
|
+
} | {
|
|
34
|
+
widget: {
|
|
35
|
+
type: string;
|
|
36
|
+
scope: string;
|
|
37
|
+
options: {
|
|
38
|
+
widget: string;
|
|
39
|
+
};
|
|
40
|
+
config: {
|
|
41
|
+
main: {
|
|
42
|
+
onClick: string;
|
|
43
|
+
size: string;
|
|
44
|
+
icon: string;
|
|
45
|
+
iconLabel: string;
|
|
46
|
+
styleDefault: boolean;
|
|
47
|
+
color?: undefined;
|
|
48
|
+
};
|
|
49
|
+
style: {
|
|
50
|
+
mt: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
})[];
|
|
34
55
|
};
|
|
35
56
|
disableAction: boolean;
|
|
36
57
|
disableSelection: boolean;
|
|
@@ -59,6 +80,7 @@ export declare const EventSection: (theme: any) => {
|
|
|
59
80
|
icon: string;
|
|
60
81
|
tooltipMessage: string;
|
|
61
82
|
onClick: string;
|
|
83
|
+
styleDefault?: undefined;
|
|
62
84
|
};
|
|
63
85
|
style: {
|
|
64
86
|
color: any;
|
|
@@ -85,6 +107,7 @@ export declare const EventSection: (theme: any) => {
|
|
|
85
107
|
tooltipMessage: string;
|
|
86
108
|
onClick: string;
|
|
87
109
|
size?: undefined;
|
|
110
|
+
styleDefault?: undefined;
|
|
88
111
|
};
|
|
89
112
|
style?: undefined;
|
|
90
113
|
};
|
|
@@ -106,6 +129,7 @@ export declare const EventSection: (theme: any) => {
|
|
|
106
129
|
icon: string;
|
|
107
130
|
onClick: string;
|
|
108
131
|
tooltipMessage: string;
|
|
132
|
+
styleDefault: boolean;
|
|
109
133
|
color?: undefined;
|
|
110
134
|
size?: undefined;
|
|
111
135
|
};
|
|
@@ -9,7 +9,7 @@ export declare const TableSection: (theme: any) => {
|
|
|
9
9
|
config: {
|
|
10
10
|
main: {
|
|
11
11
|
headerIcons: {
|
|
12
|
-
elements: {
|
|
12
|
+
elements: ({
|
|
13
13
|
widget: {
|
|
14
14
|
type: string;
|
|
15
15
|
scope: string;
|
|
@@ -30,7 +30,28 @@ export declare const TableSection: (theme: any) => {
|
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
|
-
}
|
|
33
|
+
} | {
|
|
34
|
+
widget: {
|
|
35
|
+
type: string;
|
|
36
|
+
scope: string;
|
|
37
|
+
options: {
|
|
38
|
+
widget: string;
|
|
39
|
+
};
|
|
40
|
+
config: {
|
|
41
|
+
main: {
|
|
42
|
+
onClick: string;
|
|
43
|
+
size: string;
|
|
44
|
+
icon: string;
|
|
45
|
+
iconLabel: string;
|
|
46
|
+
styleDefault: boolean;
|
|
47
|
+
color?: undefined;
|
|
48
|
+
};
|
|
49
|
+
style: {
|
|
50
|
+
mt: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
})[];
|
|
34
55
|
};
|
|
35
56
|
disableAction: boolean;
|
|
36
57
|
disableSelection: boolean;
|
|
@@ -59,6 +80,7 @@ export declare const TableSection: (theme: any) => {
|
|
|
59
80
|
color: string;
|
|
60
81
|
onClick: string;
|
|
61
82
|
tooltipMessage: string;
|
|
83
|
+
styleDefault?: undefined;
|
|
62
84
|
};
|
|
63
85
|
style: {
|
|
64
86
|
color: any;
|
|
@@ -82,6 +104,7 @@ export declare const TableSection: (theme: any) => {
|
|
|
82
104
|
color: string;
|
|
83
105
|
onClick: string;
|
|
84
106
|
tooltipMessage: string;
|
|
107
|
+
styleDefault?: undefined;
|
|
85
108
|
};
|
|
86
109
|
style?: undefined;
|
|
87
110
|
};
|
|
@@ -101,8 +124,9 @@ export declare const TableSection: (theme: any) => {
|
|
|
101
124
|
main: {
|
|
102
125
|
icon: string;
|
|
103
126
|
onClick: string;
|
|
104
|
-
|
|
127
|
+
styleDefault: boolean;
|
|
105
128
|
color?: undefined;
|
|
129
|
+
tooltipMessage?: undefined;
|
|
106
130
|
};
|
|
107
131
|
style?: undefined;
|
|
108
132
|
};
|
package/package.json
CHANGED
|
@@ -35,6 +35,30 @@ export const EventSection = (theme)=>{
|
|
|
35
35
|
},
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
|
+
|
|
39
|
+
{
|
|
40
|
+
widget: {
|
|
41
|
+
type: "Control",
|
|
42
|
+
scope: "#/properties/Paste_Icon",
|
|
43
|
+
|
|
44
|
+
options: {
|
|
45
|
+
widget: "IconButton",
|
|
46
|
+
},
|
|
47
|
+
config: {
|
|
48
|
+
main: {
|
|
49
|
+
// color: "info",
|
|
50
|
+
onClick: "PasteEvent",
|
|
51
|
+
size: "small",
|
|
52
|
+
icon: "SendIcon",
|
|
53
|
+
iconLabel: "Paste",
|
|
54
|
+
styleDefault: true,
|
|
55
|
+
},
|
|
56
|
+
style: {
|
|
57
|
+
mt: "6px",
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
}
|
|
61
|
+
},
|
|
38
62
|
]
|
|
39
63
|
},
|
|
40
64
|
disableAction: true,
|
|
@@ -116,27 +140,7 @@ export const EventSection = (theme)=>{
|
|
|
116
140
|
// color: "error",
|
|
117
141
|
onClick: "CopyEvent",
|
|
118
142
|
tooltipMessage: "Reject This Record",
|
|
119
|
-
|
|
120
|
-
},
|
|
121
|
-
},
|
|
122
|
-
},
|
|
123
|
-
|
|
124
|
-
{
|
|
125
|
-
header: "paste",
|
|
126
|
-
field: "Paste_Event",
|
|
127
|
-
flex: 1,
|
|
128
|
-
widget: {
|
|
129
|
-
type: "Control",
|
|
130
|
-
scope: "#/properties/PasteEvent",
|
|
131
|
-
options: {
|
|
132
|
-
widget: "IconButton",
|
|
133
|
-
},
|
|
134
|
-
config: {
|
|
135
|
-
main: {
|
|
136
|
-
icon: "SendIcon",
|
|
137
|
-
// color: "error",
|
|
138
|
-
onClick: "PasteEvent",
|
|
139
|
-
tooltipMessage: "Reject This Record",
|
|
143
|
+
styleDefault: true,
|
|
140
144
|
},
|
|
141
145
|
},
|
|
142
146
|
},
|
|
@@ -35,6 +35,31 @@ export const TableSection = (theme) => {
|
|
|
35
35
|
},
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
{
|
|
41
|
+
widget: {
|
|
42
|
+
type: "Control",
|
|
43
|
+
scope: "#/properties/Paste_Icon",
|
|
44
|
+
|
|
45
|
+
options: {
|
|
46
|
+
widget: "IconButton",
|
|
47
|
+
},
|
|
48
|
+
config: {
|
|
49
|
+
main: {
|
|
50
|
+
// color: "info",
|
|
51
|
+
onClick: "PasteComponent",
|
|
52
|
+
size: "small",
|
|
53
|
+
icon: "SendIcon",
|
|
54
|
+
iconLabel: "Paste",
|
|
55
|
+
styleDefault: true,
|
|
56
|
+
},
|
|
57
|
+
style: {
|
|
58
|
+
mt: "6px",
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
}
|
|
62
|
+
},
|
|
38
63
|
]
|
|
39
64
|
},
|
|
40
65
|
disableAction: true,
|
|
@@ -100,11 +125,11 @@ export const TableSection = (theme) => {
|
|
|
100
125
|
|
|
101
126
|
{
|
|
102
127
|
header: "Copy",
|
|
103
|
-
field: "
|
|
128
|
+
field: "Copy_Component",
|
|
104
129
|
flex: 1,
|
|
105
130
|
widget: {
|
|
106
131
|
type: "Control",
|
|
107
|
-
scope: "#/properties/
|
|
132
|
+
scope: "#/properties/CopyComponent",
|
|
108
133
|
options: {
|
|
109
134
|
widget: "IconButton",
|
|
110
135
|
},
|
|
@@ -113,28 +138,7 @@ export const TableSection = (theme) => {
|
|
|
113
138
|
icon: "FileCopyIcon",
|
|
114
139
|
// color: "error",
|
|
115
140
|
onClick: "CopyComponent",
|
|
116
|
-
|
|
117
|
-
},
|
|
118
|
-
},
|
|
119
|
-
},
|
|
120
|
-
},
|
|
121
|
-
|
|
122
|
-
{
|
|
123
|
-
header: "paste",
|
|
124
|
-
field: "Paste_Component2",
|
|
125
|
-
flex: 1,
|
|
126
|
-
widget: {
|
|
127
|
-
type: "Control",
|
|
128
|
-
scope: "#/properties/PasteComponent2",
|
|
129
|
-
options: {
|
|
130
|
-
widget: "IconButton",
|
|
131
|
-
},
|
|
132
|
-
config: {
|
|
133
|
-
main: {
|
|
134
|
-
icon: "SendIcon",
|
|
135
|
-
// color: "error",
|
|
136
|
-
onClick: "PasteComponent",
|
|
137
|
-
tooltipMessage: "Reject This Record",
|
|
141
|
+
styleDefault: true,
|
|
138
142
|
},
|
|
139
143
|
},
|
|
140
144
|
},
|
|
@@ -127,6 +127,30 @@ export const PageMasterUiSchema: any = (theme) => {
|
|
|
127
127
|
},
|
|
128
128
|
}
|
|
129
129
|
},
|
|
130
|
+
|
|
131
|
+
{
|
|
132
|
+
widget: {
|
|
133
|
+
type: "Control",
|
|
134
|
+
scope: "#/properties/Paste_Icon",
|
|
135
|
+
|
|
136
|
+
options: {
|
|
137
|
+
widget: "IconButton",
|
|
138
|
+
},
|
|
139
|
+
config: {
|
|
140
|
+
main: {
|
|
141
|
+
// color: "info",
|
|
142
|
+
onClick: "PasteComponent",
|
|
143
|
+
size: "small",
|
|
144
|
+
icon: "SendIcon",
|
|
145
|
+
iconLabel: "Paste",
|
|
146
|
+
styleDefault: true,
|
|
147
|
+
},
|
|
148
|
+
style: {
|
|
149
|
+
mt: "6px",
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
}
|
|
153
|
+
},
|
|
130
154
|
]
|
|
131
155
|
},
|
|
132
156
|
disableAction: true,
|
|
@@ -204,33 +228,13 @@ export const PageMasterUiSchema: any = (theme) => {
|
|
|
204
228
|
icon: "FileCopyIcon",
|
|
205
229
|
// color: "error",
|
|
206
230
|
onClick: "CopyComponent",
|
|
207
|
-
|
|
208
|
-
},
|
|
209
|
-
},
|
|
210
|
-
},
|
|
211
|
-
},
|
|
212
|
-
|
|
213
|
-
{
|
|
214
|
-
header: "paste",
|
|
215
|
-
field: "Paste_Component",
|
|
216
|
-
flex: 1,
|
|
217
|
-
widget: {
|
|
218
|
-
type: "Control",
|
|
219
|
-
scope: "#/properties/PasteComponent",
|
|
220
|
-
options: {
|
|
221
|
-
widget: "IconButton",
|
|
222
|
-
},
|
|
223
|
-
config: {
|
|
224
|
-
main: {
|
|
225
|
-
icon: "SendIcon",
|
|
226
|
-
// color: "error",
|
|
227
|
-
onClick: "PasteComponent",
|
|
228
|
-
tooltipMessage: "Reject This Record",
|
|
231
|
+
styleDefault: true,
|
|
229
232
|
},
|
|
230
233
|
},
|
|
231
234
|
},
|
|
232
235
|
},
|
|
233
236
|
|
|
237
|
+
|
|
234
238
|
]
|
|
235
239
|
},
|
|
236
240
|
{
|
|
@@ -266,6 +270,30 @@ export const PageMasterUiSchema: any = (theme) => {
|
|
|
266
270
|
},
|
|
267
271
|
}
|
|
268
272
|
},
|
|
273
|
+
|
|
274
|
+
{
|
|
275
|
+
widget: {
|
|
276
|
+
type: "Control",
|
|
277
|
+
scope: "#/properties/Paste_Icon",
|
|
278
|
+
|
|
279
|
+
options: {
|
|
280
|
+
widget: "IconButton",
|
|
281
|
+
},
|
|
282
|
+
config: {
|
|
283
|
+
main: {
|
|
284
|
+
// color: "info",
|
|
285
|
+
onClick: "PasteEvent",
|
|
286
|
+
size: "small",
|
|
287
|
+
icon: "SendIcon",
|
|
288
|
+
iconLabel: "Paste",
|
|
289
|
+
styleDefault: true,
|
|
290
|
+
},
|
|
291
|
+
style: {
|
|
292
|
+
mt: "6px",
|
|
293
|
+
},
|
|
294
|
+
},
|
|
295
|
+
}
|
|
296
|
+
},
|
|
269
297
|
]
|
|
270
298
|
},
|
|
271
299
|
|
|
@@ -327,6 +355,28 @@ export const PageMasterUiSchema: any = (theme) => {
|
|
|
327
355
|
},
|
|
328
356
|
},
|
|
329
357
|
},
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
{
|
|
361
|
+
header: "Copy",
|
|
362
|
+
field: "Copy_Event",
|
|
363
|
+
flex: 1,
|
|
364
|
+
widget: {
|
|
365
|
+
type: "Control",
|
|
366
|
+
scope: "#/properties/CopyEvent",
|
|
367
|
+
options: {
|
|
368
|
+
widget: "IconButton",
|
|
369
|
+
},
|
|
370
|
+
config: {
|
|
371
|
+
main: {
|
|
372
|
+
icon: "FileCopyIcon",
|
|
373
|
+
// color: "error",
|
|
374
|
+
onClick: "CopyEvent",
|
|
375
|
+
styleDefault: true,
|
|
376
|
+
},
|
|
377
|
+
},
|
|
378
|
+
},
|
|
379
|
+
},
|
|
330
380
|
]
|
|
331
381
|
// }]
|
|
332
382
|
},
|
|
@@ -106,6 +106,30 @@ export const EventUiSchema: any = (theme) => {
|
|
|
106
106
|
},
|
|
107
107
|
}
|
|
108
108
|
},
|
|
109
|
+
|
|
110
|
+
{
|
|
111
|
+
widget: {
|
|
112
|
+
type: "Control",
|
|
113
|
+
scope: "#/properties/Paste_Icon",
|
|
114
|
+
|
|
115
|
+
options: {
|
|
116
|
+
widget: "IconButton",
|
|
117
|
+
},
|
|
118
|
+
config: {
|
|
119
|
+
main: {
|
|
120
|
+
// color: "info",
|
|
121
|
+
onClick: "PasteEvent",
|
|
122
|
+
size: "small",
|
|
123
|
+
icon: "SendIcon",
|
|
124
|
+
iconLabel: "Paste",
|
|
125
|
+
styleDefault: true,
|
|
126
|
+
},
|
|
127
|
+
style: {
|
|
128
|
+
mt: "6px",
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
}
|
|
132
|
+
},
|
|
109
133
|
]
|
|
110
134
|
},
|
|
111
135
|
disableAction: true,
|
|
@@ -169,11 +193,11 @@ export const EventUiSchema: any = (theme) => {
|
|
|
169
193
|
|
|
170
194
|
{
|
|
171
195
|
header: "Copy",
|
|
172
|
-
field: "
|
|
196
|
+
field: "Copy_Event",
|
|
173
197
|
flex: 1,
|
|
174
198
|
widget: {
|
|
175
199
|
type: "Control",
|
|
176
|
-
scope: "#/properties/
|
|
200
|
+
scope: "#/properties/CopyEvent",
|
|
177
201
|
options: {
|
|
178
202
|
widget: "IconButton",
|
|
179
203
|
},
|
|
@@ -182,28 +206,7 @@ export const EventUiSchema: any = (theme) => {
|
|
|
182
206
|
icon: "FileCopyIcon",
|
|
183
207
|
// color: "error",
|
|
184
208
|
onClick: "CopyEvent",
|
|
185
|
-
|
|
186
|
-
},
|
|
187
|
-
},
|
|
188
|
-
},
|
|
189
|
-
},
|
|
190
|
-
|
|
191
|
-
{
|
|
192
|
-
header: "paste",
|
|
193
|
-
field: "Paste_Event2",
|
|
194
|
-
flex: 1,
|
|
195
|
-
widget: {
|
|
196
|
-
type: "Control",
|
|
197
|
-
scope: "#/properties/PasteEvent2",
|
|
198
|
-
options: {
|
|
199
|
-
widget: "IconButton",
|
|
200
|
-
},
|
|
201
|
-
config: {
|
|
202
|
-
main: {
|
|
203
|
-
icon: "SendIcon",
|
|
204
|
-
// color: "error",
|
|
205
|
-
onClick: "PasteEvent",
|
|
206
|
-
tooltipMessage: "Reject This Record",
|
|
209
|
+
styleDefault: true,
|
|
207
210
|
},
|
|
208
211
|
},
|
|
209
212
|
},
|
|
@@ -173,67 +173,133 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
173
173
|
store.updateDialog("popUpEventSection");
|
|
174
174
|
},
|
|
175
175
|
|
|
176
|
-
|
|
176
|
+
|
|
177
177
|
CopyComponent: function(){
|
|
178
178
|
const rowId = dynamicData.path.split(".")[1];
|
|
179
|
-
const
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
const formData = getFormdataFromSessionStorage(updatedPath);
|
|
185
|
-
// sessionStorage.setItem('copiedComponent',formData);
|
|
186
|
-
sessionStorage.setItem('copiedComponent',JSON.stringify(formData));
|
|
187
|
-
|
|
179
|
+
const parentPathOfCopiedComponent = store.searchParams?.get("path");
|
|
180
|
+
const copiedComponentPath = parentPathOfCopiedComponent ? `${parentPathOfCopiedComponent}.elements[${rowId}]` : `elements[${rowId}]`;
|
|
181
|
+
const formData = getFormdataFromSessionStorage(copiedComponentPath);
|
|
182
|
+
sessionStorage.setItem('copiedConfig',JSON.stringify(formData));
|
|
188
183
|
},
|
|
189
|
-
|
|
184
|
+
|
|
190
185
|
PasteComponent: function(){
|
|
191
186
|
const path = store.searchParams?.get("path");
|
|
192
|
-
const
|
|
193
|
-
// const updatedPath = `${path}.elements[${rowId}]`;
|
|
194
|
-
const updatedPath = path ? `${path}.elements[${rowId}]` : `elements[${rowId}]`;
|
|
195
|
-
const formData = getFormdataFromSessionStorage(updatedPath)
|
|
187
|
+
const formData = getFormdataFromSessionStorage(path)
|
|
196
188
|
const insertComponentPath = formData.elements.length;
|
|
197
|
-
|
|
198
|
-
const
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
189
|
+
const finalPath = `${path}.elements[${insertComponentPath}]`;
|
|
190
|
+
const copiedData = JSON.parse(sessionStorage.getItem("copiedConfig"));
|
|
191
|
+
if(!copiedData.elements){
|
|
192
|
+
store.setNotify({
|
|
193
|
+
FailMessage: "Pasting not Valid",
|
|
194
|
+
Fail: true,
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
else{
|
|
198
|
+
saveFormdataInSessionStorage(copiedData, finalPath);
|
|
199
|
+
sessionStorage.removeItem('copiedConfig');
|
|
200
|
+
this.setPage();
|
|
201
|
+
}
|
|
206
202
|
},
|
|
207
203
|
|
|
208
204
|
|
|
209
205
|
CopyEvent: function(){
|
|
210
206
|
const rowId = dynamicData.path.split(".")[1];
|
|
211
207
|
const path = store.searchParams?.get("path");
|
|
212
|
-
|
|
213
|
-
// const updatedPath = `${path}.elements[${rowId}]`;
|
|
214
208
|
const updatedPath = path ? `${path}.events[${rowId}]` : `events[${rowId}]`;
|
|
215
209
|
|
|
216
210
|
const formData = getFormdataFromSessionStorage(updatedPath);
|
|
217
|
-
|
|
218
|
-
sessionStorage.setItem('copiedComponent',JSON.stringify(formData));
|
|
211
|
+
sessionStorage.setItem('copiedConfig',JSON.stringify(formData));
|
|
219
212
|
},
|
|
220
213
|
|
|
221
214
|
PasteEvent: function(){
|
|
222
215
|
const path = store.searchParams?.get("path");
|
|
223
|
-
const
|
|
224
|
-
|
|
225
|
-
const updatedPath = path ? `${path}.events[${rowId}]` : `events[${rowId}]`;
|
|
226
|
-
const formData = getFormdataFromSessionStorage(updatedPath)
|
|
227
|
-
const insertComponentPath = formData.elements.length;
|
|
216
|
+
const formData = getFormdataFromSessionStorage(path)
|
|
217
|
+
const insertComponentPath = formData.events.length;
|
|
228
218
|
|
|
229
|
-
const finalPath = `${
|
|
219
|
+
const finalPath = `${path}.events[${insertComponentPath}]`;
|
|
230
220
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
221
|
+
const copiedData = JSON.parse(sessionStorage.getItem("copiedConfig"));
|
|
222
|
+
if(!copiedData.events){
|
|
223
|
+
store.setNotify({
|
|
224
|
+
FailMessage: "Pasting not Valid",
|
|
225
|
+
Fail: true,
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
else{
|
|
229
|
+
saveFormdataInSessionStorage(copiedData, finalPath);
|
|
230
|
+
sessionStorage.removeItem('copiedConfig');
|
|
231
|
+
this.setPage();
|
|
232
|
+
}
|
|
236
233
|
}
|
|
237
234
|
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
// CopyComponent: function(){
|
|
243
|
+
// const rowId = dynamicData.path.split(".")[1];
|
|
244
|
+
// const path = store.searchParams?.get("path");
|
|
245
|
+
|
|
246
|
+
// // const updatedPath = `${path}.elements[${rowId}]`;
|
|
247
|
+
// const updatedPath = path ? `${path}.elements[${rowId}]` : `elements[${rowId}]`;
|
|
248
|
+
|
|
249
|
+
// const formData = getFormdataFromSessionStorage(updatedPath);
|
|
250
|
+
// // sessionStorage.setItem('copiedComponent',formData);
|
|
251
|
+
// sessionStorage.setItem('copiedComponent',JSON.stringify(formData));
|
|
252
|
+
|
|
253
|
+
// },
|
|
254
|
+
|
|
255
|
+
// PasteComponent: function(){
|
|
256
|
+
// const path = store.searchParams?.get("path");
|
|
257
|
+
// const rowId = dynamicData.path.split(".")[1];
|
|
258
|
+
// // const updatedPath = `${path}.elements[${rowId}]`;
|
|
259
|
+
// const updatedPath = path ? `${path}.elements[${rowId}]` : `elements[${rowId}]`;
|
|
260
|
+
// const formData = getFormdataFromSessionStorage(updatedPath)
|
|
261
|
+
// const insertComponentPath = formData.elements.length;
|
|
262
|
+
|
|
263
|
+
// const finalPath = `${updatedPath}.elements[${insertComponentPath}]`;
|
|
264
|
+
|
|
265
|
+
// // const copiedData = sessionStorage.getItem('copiedComponent');
|
|
266
|
+
// const copiedData = JSON.parse(sessionStorage.getItem("copiedComponent"));
|
|
267
|
+
// saveFormdataInSessionStorage(copiedData, finalPath);
|
|
268
|
+
// sessionStorage.removeItem('copiedComponent');
|
|
269
|
+
// this.setPage();
|
|
270
|
+
|
|
271
|
+
// },
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
// CopyEvent: function(){
|
|
276
|
+
// const rowId = dynamicData.path.split(".")[1];
|
|
277
|
+
// const path = store.searchParams?.get("path");
|
|
278
|
+
|
|
279
|
+
// // const updatedPath = `${path}.elements[${rowId}]`;
|
|
280
|
+
// const updatedPath = path ? `${path}.events[${rowId}]` : `events[${rowId}]`;
|
|
281
|
+
|
|
282
|
+
// const formData = getFormdataFromSessionStorage(updatedPath);
|
|
283
|
+
// // sessionStorage.setItem('copiedComponent',formData);
|
|
284
|
+
// sessionStorage.setItem('copiedComponent',JSON.stringify(formData));
|
|
285
|
+
// },
|
|
286
|
+
|
|
287
|
+
// PasteEvent: function(){
|
|
288
|
+
// const path = store.searchParams?.get("path");
|
|
289
|
+
// const rowId = dynamicData.path.split(".")[1];
|
|
290
|
+
// // const updatedPath = `${path}.elements[${rowId}]`;
|
|
291
|
+
// const updatedPath = path ? `${path}.elements[${rowId}]` : `elements[${rowId}]`;
|
|
292
|
+
// const formData = getFormdataFromSessionStorage(updatedPath)
|
|
293
|
+
// const insertComponentPath = formData.elements.length;
|
|
294
|
+
|
|
295
|
+
// const finalPath = `${updatedPath}.events[${insertComponentPath}]`;
|
|
296
|
+
|
|
297
|
+
// // const copiedData = sessionStorage.getItem('copiedComponent');
|
|
298
|
+
// const copiedData = JSON.parse(sessionStorage.getItem("copiedComponent"));
|
|
299
|
+
// saveFormdataInSessionStorage(copiedData, finalPath);
|
|
300
|
+
// sessionStorage.removeItem('copiedComponent');
|
|
301
|
+
// this.setPage();
|
|
302
|
+
// }
|
|
303
|
+
|
|
238
304
|
}
|
|
239
305
|
};
|