impaktapps-ui-builder 0.0.967 → 0.0.970
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 +521 -75
- 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 +55 -2
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/leaderBoard.d.ts +0 -15
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/tableSection.d.ts +50 -2
- package/dist/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/schema.d.ts +3 -0
- package/dist/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.d.ts +3 -0
- package/dist/src/impaktapps-ui-builder/builder/services/component.d.ts +8 -2
- package/dist/src/impaktapps-ui-builder/builder/services/event.d.ts +5 -0
- package/dist/src/impaktapps-ui-builder/builder/services/pageMaster.d.ts +5 -0
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/eventSection.ts +47 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/leaderBoard.ts +6 -7
- package/src/impaktapps-ui-builder/builder/build/uischema/tableSection.ts +45 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +4 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +98 -50
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/schema.ts +4 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +148 -9
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/schema.ts +4 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +97 -6
- package/src/impaktapps-ui-builder/builder/services/component.ts +85 -6
- package/src/impaktapps-ui-builder/builder/services/event.ts +17 -3
- package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +20 -2
|
@@ -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_Component",
|
|
135
|
+
|
|
136
|
+
options: {
|
|
137
|
+
widget: "IconButton",
|
|
138
|
+
},
|
|
139
|
+
config: {
|
|
140
|
+
main: {
|
|
141
|
+
// color: "info",
|
|
142
|
+
onClick: "copyPasteElement",
|
|
143
|
+
size: "small",
|
|
144
|
+
icon: "PasteIcon",
|
|
145
|
+
iconLabel: "Paste",
|
|
146
|
+
styleDefault: true,
|
|
147
|
+
},
|
|
148
|
+
style: {
|
|
149
|
+
mt: "6px",
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
}
|
|
153
|
+
},
|
|
130
154
|
]
|
|
131
155
|
},
|
|
132
156
|
disableAction: true,
|
|
@@ -187,7 +211,30 @@ export const PageMasterUiSchema: any = (theme) => {
|
|
|
187
211
|
},
|
|
188
212
|
},
|
|
189
213
|
},
|
|
190
|
-
}
|
|
214
|
+
},
|
|
215
|
+
|
|
216
|
+
{
|
|
217
|
+
header: "Copy",
|
|
218
|
+
field: "Copy_Component",
|
|
219
|
+
flex: 1,
|
|
220
|
+
widget: {
|
|
221
|
+
type: "Control",
|
|
222
|
+
scope: "#/properties/Copy_Component",
|
|
223
|
+
options: {
|
|
224
|
+
widget: "IconButton",
|
|
225
|
+
},
|
|
226
|
+
config: {
|
|
227
|
+
main: {
|
|
228
|
+
icon: "FileCopyIcon",
|
|
229
|
+
// color: "error",
|
|
230
|
+
onClick: "copyPasteElement",
|
|
231
|
+
styleDefault: true,
|
|
232
|
+
},
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
|
|
237
|
+
|
|
191
238
|
]
|
|
192
239
|
},
|
|
193
240
|
{
|
|
@@ -223,6 +270,30 @@ export const PageMasterUiSchema: any = (theme) => {
|
|
|
223
270
|
},
|
|
224
271
|
}
|
|
225
272
|
},
|
|
273
|
+
|
|
274
|
+
{
|
|
275
|
+
widget: {
|
|
276
|
+
type: "Control",
|
|
277
|
+
scope: "#/properties/Paste_Event",
|
|
278
|
+
|
|
279
|
+
options: {
|
|
280
|
+
widget: "IconButton",
|
|
281
|
+
},
|
|
282
|
+
config: {
|
|
283
|
+
main: {
|
|
284
|
+
// color: "info",
|
|
285
|
+
onClick: "copyPasteElement",
|
|
286
|
+
size: "small",
|
|
287
|
+
icon: "PasteIcon",
|
|
288
|
+
iconLabel: "Paste",
|
|
289
|
+
styleDefault: true,
|
|
290
|
+
},
|
|
291
|
+
style: {
|
|
292
|
+
mt: "6px",
|
|
293
|
+
},
|
|
294
|
+
},
|
|
295
|
+
}
|
|
296
|
+
},
|
|
226
297
|
]
|
|
227
298
|
},
|
|
228
299
|
|
|
@@ -284,6 +355,28 @@ export const PageMasterUiSchema: any = (theme) => {
|
|
|
284
355
|
},
|
|
285
356
|
},
|
|
286
357
|
},
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
{
|
|
361
|
+
header: "Copy",
|
|
362
|
+
field: "Copy_Event",
|
|
363
|
+
flex: 1,
|
|
364
|
+
widget: {
|
|
365
|
+
type: "Control",
|
|
366
|
+
scope: "#/properties/Copy_Event",
|
|
367
|
+
options: {
|
|
368
|
+
widget: "IconButton",
|
|
369
|
+
},
|
|
370
|
+
config: {
|
|
371
|
+
main: {
|
|
372
|
+
icon: "FileCopyIcon",
|
|
373
|
+
// color: "error",
|
|
374
|
+
onClick: "copyPasteElement",
|
|
375
|
+
styleDefault: true,
|
|
376
|
+
},
|
|
377
|
+
},
|
|
378
|
+
},
|
|
379
|
+
},
|
|
287
380
|
]
|
|
288
381
|
// }]
|
|
289
382
|
},
|
|
@@ -291,14 +384,60 @@ export const PageMasterUiSchema: any = (theme) => {
|
|
|
291
384
|
],
|
|
292
385
|
},
|
|
293
386
|
{
|
|
294
|
-
type: "
|
|
295
|
-
scope: "#/properties/btn",
|
|
296
|
-
options: {
|
|
297
|
-
widget: "EmptyBox",
|
|
298
|
-
},
|
|
387
|
+
type: "HorizontalLayout",
|
|
299
388
|
config: {
|
|
300
|
-
layout:
|
|
301
|
-
}
|
|
389
|
+
layout:{xs:12,sm: 9}
|
|
390
|
+
},
|
|
391
|
+
elements: [
|
|
392
|
+
{
|
|
393
|
+
type: "Control",
|
|
394
|
+
scope: "#/properties/RemoveItemButton",
|
|
395
|
+
options: {
|
|
396
|
+
widget: "IconButton",
|
|
397
|
+
},
|
|
398
|
+
config: {
|
|
399
|
+
layout: { xs: 1, sm: 1 },
|
|
400
|
+
main: {
|
|
401
|
+
onClick: "RemoveItemButton",
|
|
402
|
+
size: "large",
|
|
403
|
+
icon: "RejectIcon",
|
|
404
|
+
styleDefault: true,
|
|
405
|
+
},
|
|
406
|
+
style:{
|
|
407
|
+
marginLeft: "-5px"
|
|
408
|
+
}
|
|
409
|
+
},
|
|
410
|
+
},
|
|
411
|
+
|
|
412
|
+
{
|
|
413
|
+
type: "Control",
|
|
414
|
+
scope: "#/properties/copiedElementDetails",
|
|
415
|
+
|
|
416
|
+
options: {
|
|
417
|
+
widget: "Box",
|
|
418
|
+
},
|
|
419
|
+
config: {
|
|
420
|
+
layout: { xs: 6, sm: 6 },
|
|
421
|
+
main: {
|
|
422
|
+
heading: "No element copied",
|
|
423
|
+
},
|
|
424
|
+
style: {
|
|
425
|
+
color: "#535557",
|
|
426
|
+
marginLeft: "-30px"
|
|
427
|
+
},
|
|
428
|
+
},
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
type: "Control",
|
|
432
|
+
scope: "#/properties/EmptyBox",
|
|
433
|
+
options: {
|
|
434
|
+
widget: "EmptyBox",
|
|
435
|
+
},
|
|
436
|
+
config: {
|
|
437
|
+
layout: { xs: 1, sm: 5 },
|
|
438
|
+
},
|
|
439
|
+
},
|
|
440
|
+
]
|
|
302
441
|
},
|
|
303
442
|
{
|
|
304
443
|
type: "Control",
|
|
@@ -306,7 +445,7 @@ export const PageMasterUiSchema: any = (theme) => {
|
|
|
306
445
|
options: {
|
|
307
446
|
widget: "Button",
|
|
308
447
|
},
|
|
309
|
-
|
|
448
|
+
|
|
310
449
|
config: {
|
|
311
450
|
layout: { xs: 4, sm: 2 },
|
|
312
451
|
main: {
|
|
@@ -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_Event",
|
|
114
|
+
|
|
115
|
+
options: {
|
|
116
|
+
widget: "IconButton",
|
|
117
|
+
},
|
|
118
|
+
config: {
|
|
119
|
+
main: {
|
|
120
|
+
// color: "info",
|
|
121
|
+
onClick: "copyPasteElement",
|
|
122
|
+
size: "small",
|
|
123
|
+
icon: "PasteIcon",
|
|
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,20 +190,87 @@ 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/Copy_Event",
|
|
201
|
+
options: {
|
|
202
|
+
widget: "IconButton",
|
|
203
|
+
},
|
|
204
|
+
config: {
|
|
205
|
+
main: {
|
|
206
|
+
icon: "FileCopyIcon",
|
|
207
|
+
// color: "error",
|
|
208
|
+
onClick: "copyPasteElement",
|
|
209
|
+
styleDefault: true,
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
},
|
|
169
214
|
]
|
|
170
215
|
// }]
|
|
171
216
|
}
|
|
172
217
|
],
|
|
173
218
|
},
|
|
174
219
|
{
|
|
175
|
-
type: "
|
|
176
|
-
scope: "#/properties/EmptyBox",
|
|
177
|
-
options: {
|
|
178
|
-
widget: "EmptyBox",
|
|
179
|
-
},
|
|
220
|
+
type: "HorizontalLayout",
|
|
180
221
|
config: {
|
|
181
|
-
layout:
|
|
222
|
+
layout:{xs:12,sm: 6}
|
|
182
223
|
},
|
|
224
|
+
elements: [
|
|
225
|
+
{
|
|
226
|
+
type: "Control",
|
|
227
|
+
scope: "#/properties/RemoveItemButton",
|
|
228
|
+
options: {
|
|
229
|
+
widget: "IconButton",
|
|
230
|
+
},
|
|
231
|
+
config: {
|
|
232
|
+
layout: { xs: 1, sm: 1 },
|
|
233
|
+
main: {
|
|
234
|
+
onClick: "RemoveItemButton",
|
|
235
|
+
size: "large",
|
|
236
|
+
icon: "RejectIcon",
|
|
237
|
+
styleDefault: true,
|
|
238
|
+
},
|
|
239
|
+
style:{
|
|
240
|
+
marginLeft: "-10px"
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
},
|
|
244
|
+
|
|
245
|
+
{
|
|
246
|
+
type: "Control",
|
|
247
|
+
scope: "#/properties/copiedElementDetails",
|
|
248
|
+
|
|
249
|
+
options: {
|
|
250
|
+
widget: "Box",
|
|
251
|
+
},
|
|
252
|
+
config: {
|
|
253
|
+
layout: { xs: 6, sm: 6 },
|
|
254
|
+
main: {
|
|
255
|
+
heading: "No element copied",
|
|
256
|
+
},
|
|
257
|
+
style: {
|
|
258
|
+
color: "#535557",
|
|
259
|
+
marginLeft: "-10px"
|
|
260
|
+
},
|
|
261
|
+
},
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
type: "Control",
|
|
265
|
+
scope: "#/properties/EmptyBox",
|
|
266
|
+
options: {
|
|
267
|
+
widget: "EmptyBox",
|
|
268
|
+
},
|
|
269
|
+
config: {
|
|
270
|
+
layout: { xs: 1, sm: 5 },
|
|
271
|
+
},
|
|
272
|
+
},
|
|
273
|
+
]
|
|
183
274
|
},
|
|
184
275
|
{
|
|
185
276
|
type: "Control",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _ from "lodash";
|
|
1
|
+
import _, { cloneDeep } from "lodash";
|
|
2
2
|
import { ComponentSchema } from "../elements/UiSchema/Component/schema";
|
|
3
3
|
import { componentBasicUiSchema } from "../elements/UiSchema/Component/uiSchema";
|
|
4
4
|
import { CoreSection } from "../build/uischema/coreSection";
|
|
@@ -41,9 +41,7 @@ const sectionLabels = {
|
|
|
41
41
|
ColumnGroup: ["Core", "Components"]
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
export const refreshPage = (type: string, store: any) => {
|
|
44
|
+
export function refreshPage (type: string, store: any) {
|
|
47
45
|
const UiSchema = _.cloneDeep(componentBasicUiSchema(store.theme.myTheme))
|
|
48
46
|
if (type) {
|
|
49
47
|
const sectionUiSchema = {
|
|
@@ -58,7 +56,9 @@ export const refreshPage = (type: string, store: any) => {
|
|
|
58
56
|
const elements = sectionLabels[type]?.map(e => sectionUiSchema[e]);
|
|
59
57
|
UiSchema.elements[1].config.main.tabLabels = sectionLabels[type] || ["Core", "Style", "Event", "Validation"];
|
|
60
58
|
UiSchema.elements[1].elements = elements || [CoreSection, StyleSection, EventSection(store.theme.myTheme), ValidationSection];
|
|
61
|
-
|
|
59
|
+
}
|
|
60
|
+
if (sessionStorage.getItem("copiedConfig") ) {
|
|
61
|
+
this.ElementPathSetter(UiSchema);
|
|
62
62
|
}
|
|
63
63
|
store.setUiSchema(UiSchema);
|
|
64
64
|
}
|
|
@@ -79,7 +79,11 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
79
79
|
return getFormdataFromSessionStorage(path)
|
|
80
80
|
},
|
|
81
81
|
getSchema: function () {
|
|
82
|
-
|
|
82
|
+
const schema = _.cloneDeep(ComponentSchema);
|
|
83
|
+
if (sessionStorage.getItem("copiedConfig") ) {
|
|
84
|
+
schema.properties.RemoveItemButton.disabled = false;
|
|
85
|
+
}
|
|
86
|
+
return schema;
|
|
83
87
|
},
|
|
84
88
|
okHandler: () => okHandler(store),
|
|
85
89
|
saveHandler: async () => await saveHandler(store, service, submitHandler, "PageMaster"),
|
|
@@ -172,5 +176,80 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
172
176
|
sessionStorage.setItem('rowId',rowId);
|
|
173
177
|
store.updateDialog("popUpEventSection");
|
|
174
178
|
},
|
|
179
|
+
|
|
180
|
+
copyPasteElement: function(paramStore: any, setPage: any = this.setPage.bind(this) ){
|
|
181
|
+
const [actionType, elementType] = dynamicData.path.split('.').pop()?.split('_');
|
|
182
|
+
actionType === "Copy" ? this.CopyElement(paramStore, elementType) : this.PasteElement(setPage, elementType);
|
|
183
|
+
},
|
|
184
|
+
CopyElement: function(paramStore: any = store, elementType: string){
|
|
185
|
+
const schema = cloneDeep(paramStore.schema );
|
|
186
|
+
const uiSchema = cloneDeep(paramStore.uiSchema );
|
|
187
|
+
schema.properties.RemoveItemButton.disabled = false;
|
|
188
|
+
|
|
189
|
+
const rowId = dynamicData.path.split(".")[1];
|
|
190
|
+
const parentPathOfCopiedComponent = store.searchParams?.get("path");
|
|
191
|
+
const copiedElementPath = this.elementPathHandler(parentPathOfCopiedComponent, rowId, elementType);
|
|
192
|
+
const copiedFormData = getFormdataFromSessionStorage(copiedElementPath);
|
|
193
|
+
|
|
194
|
+
this.ElementPathSetter(uiSchema,copiedFormData);
|
|
195
|
+
sessionStorage.setItem('copiedConfig',JSON.stringify(copiedFormData));
|
|
196
|
+
store.setSchema(schema);
|
|
197
|
+
store.setUiSchema(uiSchema);
|
|
198
|
+
},
|
|
199
|
+
PasteElement: function( setPage: any , elementType: string){
|
|
200
|
+
if (!sessionStorage.getItem("copiedConfig") ) {
|
|
201
|
+
store.setNotify({
|
|
202
|
+
FailMessage: "No item has been copied.",
|
|
203
|
+
Fail: true,
|
|
204
|
+
});
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
const pastedElementParentPath = store.searchParams?.get("path");
|
|
208
|
+
const formData = getFormdataFromSessionStorage(pastedElementParentPath);
|
|
209
|
+
const insertElementIndex = elementType === "Component" ? formData.elements.length : formData.events.length;
|
|
210
|
+
const pastedElementPath = this.elementPathHandler(pastedElementParentPath, insertElementIndex, elementType);
|
|
211
|
+
|
|
212
|
+
const copiedConfig = JSON.parse(sessionStorage.getItem("copiedConfig"));
|
|
213
|
+
const notificationMessages = {
|
|
214
|
+
Event: "The pasted content is invalid; the event cannot be integrated into the component section.",
|
|
215
|
+
Component: "The pasted content is invalid; the component cannot be integrated into the event section."
|
|
216
|
+
};
|
|
217
|
+
if(copiedConfig.Handler && elementType === "Component"){
|
|
218
|
+
store.setNotify({
|
|
219
|
+
FailMessage: notificationMessages.Event,
|
|
220
|
+
Fail: true,
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
else if(copiedConfig.name && elementType === "Event"){
|
|
224
|
+
store.setNotify({
|
|
225
|
+
FailMessage: notificationMessages.Component,
|
|
226
|
+
Fail: true,
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
else{
|
|
230
|
+
saveFormdataInSessionStorage(copiedConfig, pastedElementPath);
|
|
231
|
+
setPage();
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
RemoveItemButton: function(paramStore: any = store){
|
|
235
|
+
const schema = cloneDeep(paramStore.schema );
|
|
236
|
+
const uiSchema = cloneDeep(paramStore.uiSchema);
|
|
237
|
+
schema.properties.RemoveItemButton.disabled = true;
|
|
238
|
+
uiSchema.elements[2].elements[1].config.main.heading = `No element copied`;
|
|
239
|
+
sessionStorage.removeItem('copiedConfig');
|
|
240
|
+
store.setSchema(schema);
|
|
241
|
+
store.setUiSchema(uiSchema);
|
|
242
|
+
},
|
|
243
|
+
elementPathHandler: function(parentPath: string, rowId: any, elementType: string){
|
|
244
|
+
if(elementType === "Component"){
|
|
245
|
+
return parentPath ? `${parentPath}.elements[${rowId}]` : `elements[${rowId}]`;
|
|
246
|
+
}
|
|
247
|
+
return parentPath ? `${parentPath}.events[${rowId}]` : `events[${rowId}]`;
|
|
248
|
+
},
|
|
249
|
+
ElementPathSetter: function(uiSchema: any,copiedFormData?: any){
|
|
250
|
+
const formData = copiedFormData || JSON.parse(sessionStorage.getItem("copiedConfig"));
|
|
251
|
+
const elementHeading = formData.name ? `Copied Element: ${formData.name}` : `Event Type: ${formData.eventType} `;
|
|
252
|
+
uiSchema.elements[2].elements[1].config.main.heading = elementHeading;
|
|
253
|
+
}
|
|
175
254
|
}
|
|
176
255
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EventSchema } from "../elements/UiSchema/event/schema";
|
|
2
2
|
import { EventUiSchema } from "../elements/UiSchema/event/uiSchema";
|
|
3
3
|
import Component from "./component";
|
|
4
|
-
import { okHandler, saveFormdataInSessionStorage, saveHandler } from "./utils";
|
|
4
|
+
import { okHandler, saveFormdataInSessionStorage, saveHandler, getFormdataFromSessionStorage } from "./utils";
|
|
5
5
|
import { APISection } from "../build/uischema/apiSection";
|
|
6
6
|
import { getRadioInputField, getSelectField, getTextArea } from "../build/uischema/buildPropertiesSection";
|
|
7
7
|
import { refreshSectionUiSchema } from "../build/uischema/refresh";
|
|
@@ -85,6 +85,9 @@ 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
|
},
|
|
@@ -94,7 +97,11 @@ export default (
|
|
|
94
97
|
return EventUiSchema;
|
|
95
98
|
},
|
|
96
99
|
getSchema: () => {
|
|
97
|
-
|
|
100
|
+
const schema = _.cloneDeep(EventSchema);
|
|
101
|
+
if (sessionStorage.getItem("copiedConfig") ) {
|
|
102
|
+
schema.properties.RemoveItemButton.disabled = false;
|
|
103
|
+
}
|
|
104
|
+
return schema;
|
|
98
105
|
},
|
|
99
106
|
okHandler: () => okHandler(store),
|
|
100
107
|
saveHandler: async () => await saveHandler(store, service, submitHandler, "PageMaster"),
|
|
@@ -138,6 +145,13 @@ export default (
|
|
|
138
145
|
const rowId = dynamicData.path.split(".")[1];
|
|
139
146
|
sessionStorage.setItem('rowId',rowId);
|
|
140
147
|
store.updateDialog("popUpEvent");
|
|
141
|
-
}
|
|
148
|
+
},
|
|
149
|
+
copyPasteElement: function(){
|
|
150
|
+
Component(store, dynamicData, submitHandler, service).copyPasteElement(store,this.setPage.bind(this));
|
|
151
|
+
},
|
|
152
|
+
RemoveItemButton: function(){
|
|
153
|
+
Component(store, dynamicData, submitHandler, service).RemoveItemButton(store)
|
|
154
|
+
},
|
|
155
|
+
|
|
142
156
|
}
|
|
143
157
|
};
|
|
@@ -34,10 +34,18 @@ export default (funcParams: funcParamsProps) => {
|
|
|
34
34
|
return config
|
|
35
35
|
},
|
|
36
36
|
getUiSchema: function () {
|
|
37
|
-
|
|
37
|
+
const UiSchema = _.cloneDeep(PageMasterUiSchema(store.theme.myTheme));
|
|
38
|
+
if (sessionStorage.getItem("copiedConfig") ) {
|
|
39
|
+
Component(store, dynamicData, submitHandler, service).ElementPathSetter(UiSchema)
|
|
40
|
+
}
|
|
41
|
+
return UiSchema;
|
|
38
42
|
},
|
|
39
43
|
getSchema: () => {
|
|
40
|
-
|
|
44
|
+
const schema = _.cloneDeep(PageMasterSchema);
|
|
45
|
+
if (sessionStorage.getItem("copiedConfig") ) {
|
|
46
|
+
schema.properties.RemoveItemButton.disabled = false;
|
|
47
|
+
}
|
|
48
|
+
return schema;
|
|
41
49
|
},
|
|
42
50
|
backHandler: () => {
|
|
43
51
|
sessionStorage.removeItem("pageFormdata")
|
|
@@ -101,5 +109,15 @@ export default (funcParams: funcParamsProps) => {
|
|
|
101
109
|
sessionStorage.setItem('rowId',rowId);
|
|
102
110
|
store.updateDialog("popUpPageMasterEvent");
|
|
103
111
|
},
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
copyPasteElement: function(){
|
|
115
|
+
Component(store, dynamicData, submitHandler, service).copyPasteElement(store,this.setPage.bind(this));
|
|
116
|
+
},
|
|
117
|
+
|
|
118
|
+
RemoveItemButton: function(){
|
|
119
|
+
Component(store, dynamicData, submitHandler, service).RemoveItemButton(store)
|
|
120
|
+
},
|
|
121
|
+
|
|
104
122
|
}
|
|
105
123
|
};
|