impaktapps-ui-builder 0.0.963-CopyComponent.5 → 0.0.963-CopyComponent.7
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 +255 -65
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +15 -15
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/eventSection.d.ts +52 -2
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/tableSection.d.ts +24 -3
- package/dist/src/impaktapps-ui-builder/builder/services/component.d.ts +2 -0
- package/dist/src/impaktapps-ui-builder/builder/services/event.d.ts +2 -0
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/eventSection.ts +67 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/tableSection.ts +28 -23
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +70 -22
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +44 -0
- package/src/impaktapps-ui-builder/builder/services/component.ts +113 -22
- package/src/impaktapps-ui-builder/builder/services/event.ts +22 -1
- package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +45 -17
|
@@ -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;
|
|
@@ -41,6 +62,8 @@ export declare const EventSection: (theme: any) => {
|
|
|
41
62
|
accessorKey: string;
|
|
42
63
|
header: string;
|
|
43
64
|
widget?: undefined;
|
|
65
|
+
field?: undefined;
|
|
66
|
+
flex?: undefined;
|
|
44
67
|
} | {
|
|
45
68
|
accessorKey: string;
|
|
46
69
|
header: string;
|
|
@@ -64,6 +87,8 @@ export declare const EventSection: (theme: any) => {
|
|
|
64
87
|
};
|
|
65
88
|
accessorKeyName?: undefined;
|
|
66
89
|
};
|
|
90
|
+
field?: undefined;
|
|
91
|
+
flex?: undefined;
|
|
67
92
|
} | {
|
|
68
93
|
accessorKey: string;
|
|
69
94
|
header: string;
|
|
@@ -85,6 +110,31 @@ export declare const EventSection: (theme: any) => {
|
|
|
85
110
|
style?: undefined;
|
|
86
111
|
};
|
|
87
112
|
};
|
|
113
|
+
field?: undefined;
|
|
114
|
+
flex?: undefined;
|
|
115
|
+
} | {
|
|
116
|
+
header: string;
|
|
117
|
+
field: string;
|
|
118
|
+
flex: number;
|
|
119
|
+
widget: {
|
|
120
|
+
type: string;
|
|
121
|
+
scope: string;
|
|
122
|
+
options: {
|
|
123
|
+
widget: string;
|
|
124
|
+
};
|
|
125
|
+
config: {
|
|
126
|
+
main: {
|
|
127
|
+
icon: string;
|
|
128
|
+
onClick: string;
|
|
129
|
+
tooltipMessage: string;
|
|
130
|
+
color?: undefined;
|
|
131
|
+
size?: undefined;
|
|
132
|
+
};
|
|
133
|
+
style?: undefined;
|
|
134
|
+
};
|
|
135
|
+
accessorKeyName?: undefined;
|
|
136
|
+
};
|
|
137
|
+
accessorKey?: undefined;
|
|
88
138
|
})[];
|
|
89
139
|
}[];
|
|
90
140
|
};
|
|
@@ -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;
|
|
@@ -101,8 +122,8 @@ export declare const TableSection: (theme: any) => {
|
|
|
101
122
|
main: {
|
|
102
123
|
icon: string;
|
|
103
124
|
onClick: string;
|
|
104
|
-
tooltipMessage: string;
|
|
105
125
|
color?: undefined;
|
|
126
|
+
tooltipMessage?: undefined;
|
|
106
127
|
};
|
|
107
128
|
style?: undefined;
|
|
108
129
|
};
|
|
@@ -87,5 +87,7 @@ declare const _default: (store: any, dynamicData: any, submitHandler: any, servi
|
|
|
87
87
|
deleteEvent: () => Promise<void>;
|
|
88
88
|
backHandler: () => void;
|
|
89
89
|
deletePopUpEvent: () => void;
|
|
90
|
+
CopyEvent: () => void;
|
|
91
|
+
PasteEvent: () => void;
|
|
90
92
|
};
|
|
91
93
|
export default _default;
|
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,
|
|
@@ -98,6 +122,49 @@ export const EventSection = (theme)=>{
|
|
|
98
122
|
},
|
|
99
123
|
},
|
|
100
124
|
},
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
{
|
|
128
|
+
header: "Copy",
|
|
129
|
+
field: "Copy_Event",
|
|
130
|
+
flex: 1,
|
|
131
|
+
widget: {
|
|
132
|
+
type: "Control",
|
|
133
|
+
scope: "#/properties/CopyEvent",
|
|
134
|
+
options: {
|
|
135
|
+
widget: "IconButton",
|
|
136
|
+
},
|
|
137
|
+
config: {
|
|
138
|
+
main: {
|
|
139
|
+
icon: "FileCopyIcon",
|
|
140
|
+
// color: "error",
|
|
141
|
+
onClick: "CopyEvent",
|
|
142
|
+
tooltipMessage: "Reject This Record",
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
|
|
148
|
+
{
|
|
149
|
+
header: "paste",
|
|
150
|
+
field: "Paste_Event",
|
|
151
|
+
flex: 1,
|
|
152
|
+
widget: {
|
|
153
|
+
type: "Control",
|
|
154
|
+
scope: "#/properties/PasteEvent",
|
|
155
|
+
options: {
|
|
156
|
+
widget: "IconButton",
|
|
157
|
+
},
|
|
158
|
+
config: {
|
|
159
|
+
main: {
|
|
160
|
+
icon: "SendIcon",
|
|
161
|
+
// color: "error",
|
|
162
|
+
onClick: "PasteEvent",
|
|
163
|
+
tooltipMessage: "Reject This Record",
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
},
|
|
101
168
|
]
|
|
102
169
|
}]}
|
|
103
170
|
return uiSchema
|
|
@@ -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,32 +138,12 @@ export const TableSection = (theme) => {
|
|
|
113
138
|
icon: "FileCopyIcon",
|
|
114
139
|
// color: "error",
|
|
115
140
|
onClick: "CopyComponent",
|
|
116
|
-
tooltipMessage: "Reject This Record",
|
|
117
141
|
},
|
|
118
142
|
},
|
|
119
143
|
},
|
|
120
144
|
},
|
|
121
145
|
|
|
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",
|
|
138
|
-
},
|
|
139
|
-
},
|
|
140
|
-
},
|
|
141
|
-
},
|
|
146
|
+
|
|
142
147
|
]
|
|
143
148
|
}]
|
|
144
149
|
}
|
|
@@ -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,12 @@ export const PageMasterUiSchema: any = (theme) => {
|
|
|
204
228
|
icon: "FileCopyIcon",
|
|
205
229
|
// color: "error",
|
|
206
230
|
onClick: "CopyComponent",
|
|
207
|
-
tooltipMessage: "Reject This Record",
|
|
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",
|
|
229
231
|
},
|
|
230
232
|
},
|
|
231
233
|
},
|
|
232
234
|
},
|
|
233
235
|
|
|
236
|
+
|
|
234
237
|
]
|
|
235
238
|
},
|
|
236
239
|
{
|
|
@@ -266,6 +269,30 @@ export const PageMasterUiSchema: any = (theme) => {
|
|
|
266
269
|
},
|
|
267
270
|
}
|
|
268
271
|
},
|
|
272
|
+
|
|
273
|
+
{
|
|
274
|
+
widget: {
|
|
275
|
+
type: "Control",
|
|
276
|
+
scope: "#/properties/Paste_Icon",
|
|
277
|
+
|
|
278
|
+
options: {
|
|
279
|
+
widget: "IconButton",
|
|
280
|
+
},
|
|
281
|
+
config: {
|
|
282
|
+
main: {
|
|
283
|
+
// color: "info",
|
|
284
|
+
onClick: "PasteEvent",
|
|
285
|
+
size: "small",
|
|
286
|
+
icon: "SendIcon",
|
|
287
|
+
iconLabel: "Paste",
|
|
288
|
+
styleDefault: true,
|
|
289
|
+
},
|
|
290
|
+
style: {
|
|
291
|
+
mt: "6px",
|
|
292
|
+
},
|
|
293
|
+
},
|
|
294
|
+
}
|
|
295
|
+
},
|
|
269
296
|
]
|
|
270
297
|
},
|
|
271
298
|
|
|
@@ -327,6 +354,27 @@ export const PageMasterUiSchema: any = (theme) => {
|
|
|
327
354
|
},
|
|
328
355
|
},
|
|
329
356
|
},
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
{
|
|
360
|
+
header: "Copy",
|
|
361
|
+
field: "Copy_Event",
|
|
362
|
+
flex: 1,
|
|
363
|
+
widget: {
|
|
364
|
+
type: "Control",
|
|
365
|
+
scope: "#/properties/CopyEvent",
|
|
366
|
+
options: {
|
|
367
|
+
widget: "IconButton",
|
|
368
|
+
},
|
|
369
|
+
config: {
|
|
370
|
+
main: {
|
|
371
|
+
icon: "FileCopyIcon",
|
|
372
|
+
// color: "error",
|
|
373
|
+
onClick: "CopyEvent",
|
|
374
|
+
},
|
|
375
|
+
},
|
|
376
|
+
},
|
|
377
|
+
},
|
|
330
378
|
]
|
|
331
379
|
// }]
|
|
332
380
|
},
|
|
@@ -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,
|
|
@@ -166,6 +190,26 @@ export const EventUiSchema: any = (theme) => {
|
|
|
166
190
|
},
|
|
167
191
|
},
|
|
168
192
|
},
|
|
193
|
+
|
|
194
|
+
{
|
|
195
|
+
header: "Copy",
|
|
196
|
+
field: "Copy_Event",
|
|
197
|
+
flex: 1,
|
|
198
|
+
widget: {
|
|
199
|
+
type: "Control",
|
|
200
|
+
scope: "#/properties/CopyEvent",
|
|
201
|
+
options: {
|
|
202
|
+
widget: "IconButton",
|
|
203
|
+
},
|
|
204
|
+
config: {
|
|
205
|
+
main: {
|
|
206
|
+
icon: "FileCopyIcon",
|
|
207
|
+
// color: "error",
|
|
208
|
+
onClick: "CopyEvent",
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
},
|
|
169
213
|
]
|
|
170
214
|
// }]
|
|
171
215
|
}
|
|
@@ -173,41 +173,132 @@ 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
|
-
// const updatedPath = `${path}.elements[${rowId}]`;
|
|
182
|
-
const updatedPath = path ? `${path}.elements[${rowId}]` : `elements[${rowId}]`;
|
|
179
|
+
const parentPathOfCopiedComponent = store.searchParams?.get("path");
|
|
180
|
+
const copiedComponentPath = parentPathOfCopiedComponent ? `${parentPathOfCopiedComponent}.elements[${rowId}]` : `elements[${rowId}]`;
|
|
183
181
|
|
|
184
|
-
const formData = getFormdataFromSessionStorage(
|
|
185
|
-
|
|
186
|
-
sessionStorage.setItem('copiedComponent',JSON.stringify(formData));
|
|
182
|
+
const formData = getFormdataFromSessionStorage(copiedComponentPath);
|
|
183
|
+
sessionStorage.setItem('copiedConfig',JSON.stringify(formData));
|
|
187
184
|
|
|
188
185
|
},
|
|
189
|
-
|
|
186
|
+
|
|
190
187
|
PasteComponent: function(){
|
|
191
188
|
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)
|
|
189
|
+
const formData = getFormdataFromSessionStorage(path)
|
|
196
190
|
const insertComponentPath = formData.elements.length;
|
|
197
191
|
|
|
198
|
-
const finalPath = `${
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
192
|
+
const finalPath = `${path}.elements[${insertComponentPath}]`;
|
|
193
|
+
const copiedData = JSON.parse(sessionStorage.getItem("copiedConfig"));
|
|
194
|
+
if(!copiedData.elements){
|
|
195
|
+
store.setNotify({
|
|
196
|
+
FailMessage: "Pasting not Valid",
|
|
197
|
+
Fail: true,
|
|
198
|
+
});
|
|
199
|
+
}
|
|
202
200
|
saveFormdataInSessionStorage(copiedData, finalPath);
|
|
203
|
-
sessionStorage.removeItem('
|
|
204
|
-
|
|
205
|
-
// const finalPath = `${path}.elements[${store.formData.elements.length}]`
|
|
206
|
-
// store.searchParams.set("path", finalPath)
|
|
207
|
-
// store.setSearchParams(store.searchParams)
|
|
201
|
+
sessionStorage.removeItem('copiedConfig');
|
|
208
202
|
this.setPage();
|
|
203
|
+
},
|
|
209
204
|
|
|
205
|
+
|
|
206
|
+
CopyEvent: function(){
|
|
207
|
+
const rowId = dynamicData.path.split(".")[1];
|
|
208
|
+
const path = store.searchParams?.get("path");
|
|
209
|
+
const updatedPath = path ? `${path}.events[${rowId}]` : `events[${rowId}]`;
|
|
210
|
+
|
|
211
|
+
const formData = getFormdataFromSessionStorage(updatedPath);
|
|
212
|
+
sessionStorage.setItem('copiedConfig',JSON.stringify(formData));
|
|
213
|
+
},
|
|
214
|
+
|
|
215
|
+
PasteEvent: function(){
|
|
216
|
+
const path = store.searchParams?.get("path");
|
|
217
|
+
const formData = getFormdataFromSessionStorage(path)
|
|
218
|
+
const insertComponentPath = formData.events.length;
|
|
219
|
+
|
|
220
|
+
const finalPath = `${path}.events[${insertComponentPath}]`;
|
|
221
|
+
|
|
222
|
+
const copiedData = JSON.parse(sessionStorage.getItem("copiedConfig"));
|
|
223
|
+
if(!copiedData.events){
|
|
224
|
+
store.setNotify({
|
|
225
|
+
FailMessage: "Pasting not Valid",
|
|
226
|
+
Fail: true,
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
saveFormdataInSessionStorage(copiedData, finalPath);
|
|
230
|
+
sessionStorage.removeItem('copiedConfig');
|
|
231
|
+
this.setPage();
|
|
210
232
|
}
|
|
211
233
|
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
// CopyComponent: function(){
|
|
242
|
+
// const rowId = dynamicData.path.split(".")[1];
|
|
243
|
+
// const path = store.searchParams?.get("path");
|
|
244
|
+
|
|
245
|
+
// // const updatedPath = `${path}.elements[${rowId}]`;
|
|
246
|
+
// const updatedPath = path ? `${path}.elements[${rowId}]` : `elements[${rowId}]`;
|
|
247
|
+
|
|
248
|
+
// const formData = getFormdataFromSessionStorage(updatedPath);
|
|
249
|
+
// // sessionStorage.setItem('copiedComponent',formData);
|
|
250
|
+
// sessionStorage.setItem('copiedComponent',JSON.stringify(formData));
|
|
251
|
+
|
|
252
|
+
// },
|
|
253
|
+
|
|
254
|
+
// PasteComponent: function(){
|
|
255
|
+
// const path = store.searchParams?.get("path");
|
|
256
|
+
// const rowId = dynamicData.path.split(".")[1];
|
|
257
|
+
// // const updatedPath = `${path}.elements[${rowId}]`;
|
|
258
|
+
// const updatedPath = path ? `${path}.elements[${rowId}]` : `elements[${rowId}]`;
|
|
259
|
+
// const formData = getFormdataFromSessionStorage(updatedPath)
|
|
260
|
+
// const insertComponentPath = formData.elements.length;
|
|
261
|
+
|
|
262
|
+
// const finalPath = `${updatedPath}.elements[${insertComponentPath}]`;
|
|
263
|
+
|
|
264
|
+
// // const copiedData = sessionStorage.getItem('copiedComponent');
|
|
265
|
+
// const copiedData = JSON.parse(sessionStorage.getItem("copiedComponent"));
|
|
266
|
+
// saveFormdataInSessionStorage(copiedData, finalPath);
|
|
267
|
+
// sessionStorage.removeItem('copiedComponent');
|
|
268
|
+
// this.setPage();
|
|
269
|
+
|
|
270
|
+
// },
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
// CopyEvent: function(){
|
|
275
|
+
// const rowId = dynamicData.path.split(".")[1];
|
|
276
|
+
// const path = store.searchParams?.get("path");
|
|
277
|
+
|
|
278
|
+
// // const updatedPath = `${path}.elements[${rowId}]`;
|
|
279
|
+
// const updatedPath = path ? `${path}.events[${rowId}]` : `events[${rowId}]`;
|
|
280
|
+
|
|
281
|
+
// const formData = getFormdataFromSessionStorage(updatedPath);
|
|
282
|
+
// // sessionStorage.setItem('copiedComponent',formData);
|
|
283
|
+
// sessionStorage.setItem('copiedComponent',JSON.stringify(formData));
|
|
284
|
+
// },
|
|
285
|
+
|
|
286
|
+
// PasteEvent: function(){
|
|
287
|
+
// const path = store.searchParams?.get("path");
|
|
288
|
+
// const rowId = dynamicData.path.split(".")[1];
|
|
289
|
+
// // const updatedPath = `${path}.elements[${rowId}]`;
|
|
290
|
+
// const updatedPath = path ? `${path}.elements[${rowId}]` : `elements[${rowId}]`;
|
|
291
|
+
// const formData = getFormdataFromSessionStorage(updatedPath)
|
|
292
|
+
// const insertComponentPath = formData.elements.length;
|
|
293
|
+
|
|
294
|
+
// const finalPath = `${updatedPath}.events[${insertComponentPath}]`;
|
|
295
|
+
|
|
296
|
+
// // const copiedData = sessionStorage.getItem('copiedComponent');
|
|
297
|
+
// const copiedData = JSON.parse(sessionStorage.getItem("copiedComponent"));
|
|
298
|
+
// saveFormdataInSessionStorage(copiedData, finalPath);
|
|
299
|
+
// sessionStorage.removeItem('copiedComponent');
|
|
300
|
+
// this.setPage();
|
|
301
|
+
// }
|
|
302
|
+
|
|
212
303
|
}
|
|
213
304
|
};
|