impaktapps-ui-builder 0.0.963-CopyComponent.9 → 0.0.963-copyElement.1001
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 +221 -60
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +5 -5
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/tableSection.d.ts +3 -0
- package/dist/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/schema.d.ts +6 -0
- package/dist/src/impaktapps-ui-builder/builder/services/component.d.ts +4 -4
- package/dist/src/impaktapps-ui-builder/builder/services/event.d.ts +2 -2
- package/dist/src/impaktapps-ui-builder/builder/services/pageMaster.d.ts +7 -0
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/eventSection.ts +9 -2
- package/src/impaktapps-ui-builder/builder/build/uischema/tableSection.ts +8 -3
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +6 -2
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +53 -26
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/schema.ts +7 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +55 -9
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +53 -7
- package/src/impaktapps-ui-builder/builder/services/component.ts +29 -22
- package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +27 -5
|
@@ -39,6 +39,12 @@ const PageMasterSchema = {
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
+
},
|
|
43
|
+
RemoveItemButton: {
|
|
44
|
+
disabled: true
|
|
45
|
+
},
|
|
46
|
+
Paste_Icon: {
|
|
47
|
+
disabled: true
|
|
42
48
|
}
|
|
43
49
|
},
|
|
44
50
|
required: ["template", "name", "label"]
|
|
@@ -177,7 +183,7 @@ const PageMasterUiSchema = (theme) => {
|
|
|
177
183
|
main: {
|
|
178
184
|
onClick: "PasteComponent",
|
|
179
185
|
size: "small",
|
|
180
|
-
icon: "
|
|
186
|
+
icon: "PasteIcon",
|
|
181
187
|
iconLabel: "Paste",
|
|
182
188
|
styleDefault: true
|
|
183
189
|
},
|
|
@@ -309,7 +315,7 @@ const PageMasterUiSchema = (theme) => {
|
|
|
309
315
|
main: {
|
|
310
316
|
onClick: "PasteEvent",
|
|
311
317
|
size: "small",
|
|
312
|
-
icon: "
|
|
318
|
+
icon: "PasteIcon",
|
|
313
319
|
iconLabel: "Paste",
|
|
314
320
|
styleDefault: true
|
|
315
321
|
},
|
|
@@ -401,14 +407,58 @@ const PageMasterUiSchema = (theme) => {
|
|
|
401
407
|
]
|
|
402
408
|
},
|
|
403
409
|
{
|
|
404
|
-
type: "
|
|
405
|
-
scope: "#/properties/btn",
|
|
406
|
-
options: {
|
|
407
|
-
widget: "EmptyBox"
|
|
408
|
-
},
|
|
410
|
+
type: "HorizontalLayout",
|
|
409
411
|
config: {
|
|
410
|
-
layout: { xs:
|
|
411
|
-
}
|
|
412
|
+
layout: { xs: 12, sm: 6 }
|
|
413
|
+
},
|
|
414
|
+
elements: [
|
|
415
|
+
{
|
|
416
|
+
type: "Control",
|
|
417
|
+
scope: "#/properties/RemoveItemButton",
|
|
418
|
+
options: {
|
|
419
|
+
widget: "IconButton"
|
|
420
|
+
},
|
|
421
|
+
config: {
|
|
422
|
+
layout: { xs: 1, sm: 1 },
|
|
423
|
+
main: {
|
|
424
|
+
onClick: "RemoveCopiedConfig",
|
|
425
|
+
size: "large",
|
|
426
|
+
icon: "RejectIcon",
|
|
427
|
+
styleDefault: true
|
|
428
|
+
},
|
|
429
|
+
style: {
|
|
430
|
+
marginLeft: "-10px"
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
type: "Control",
|
|
436
|
+
scope: "#/properties/copiedElementDetails",
|
|
437
|
+
options: {
|
|
438
|
+
widget: "Box"
|
|
439
|
+
},
|
|
440
|
+
config: {
|
|
441
|
+
layout: { xs: 6, sm: 6 },
|
|
442
|
+
main: {
|
|
443
|
+
heading: "No element copied"
|
|
444
|
+
},
|
|
445
|
+
style: {
|
|
446
|
+
color: "#a1a09d",
|
|
447
|
+
marginLeft: "-10px"
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
type: "Control",
|
|
453
|
+
scope: "#/properties/EmptyBox",
|
|
454
|
+
options: {
|
|
455
|
+
widget: "EmptyBox"
|
|
456
|
+
},
|
|
457
|
+
config: {
|
|
458
|
+
layout: { xs: 1, sm: 5 }
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
]
|
|
412
462
|
},
|
|
413
463
|
{
|
|
414
464
|
type: "Control",
|
|
@@ -6496,8 +6546,11 @@ const ComponentSchema = {
|
|
|
6496
6546
|
type: "string"
|
|
6497
6547
|
},
|
|
6498
6548
|
label: { type: "string" },
|
|
6499
|
-
|
|
6500
|
-
disabled:
|
|
6549
|
+
RemoveItemButton: {
|
|
6550
|
+
disabled: true
|
|
6551
|
+
},
|
|
6552
|
+
Paste_Icon: {
|
|
6553
|
+
disabled: true
|
|
6501
6554
|
}
|
|
6502
6555
|
},
|
|
6503
6556
|
required: ["name"]
|
|
@@ -6856,20 +6909,58 @@ const componentBasicUiSchema = (theme) => {
|
|
|
6856
6909
|
]
|
|
6857
6910
|
},
|
|
6858
6911
|
{
|
|
6859
|
-
type: "
|
|
6860
|
-
scope: "#/properties/copiedElementDetails",
|
|
6861
|
-
options: {
|
|
6862
|
-
widget: "Box"
|
|
6863
|
-
},
|
|
6912
|
+
type: "HorizontalLayout",
|
|
6864
6913
|
config: {
|
|
6865
|
-
layout: { xs:
|
|
6866
|
-
|
|
6867
|
-
|
|
6914
|
+
layout: { xs: 12, sm: 6 }
|
|
6915
|
+
},
|
|
6916
|
+
elements: [
|
|
6917
|
+
{
|
|
6918
|
+
type: "Control",
|
|
6919
|
+
scope: "#/properties/RemoveItemButton",
|
|
6920
|
+
options: {
|
|
6921
|
+
widget: "IconButton"
|
|
6922
|
+
},
|
|
6923
|
+
config: {
|
|
6924
|
+
layout: { xs: 1, sm: 1 },
|
|
6925
|
+
main: {
|
|
6926
|
+
onClick: "RemoveCopiedConfig",
|
|
6927
|
+
size: "large",
|
|
6928
|
+
icon: "RejectIcon",
|
|
6929
|
+
styleDefault: true
|
|
6930
|
+
},
|
|
6931
|
+
style: {
|
|
6932
|
+
marginLeft: "-10px"
|
|
6933
|
+
}
|
|
6934
|
+
}
|
|
6868
6935
|
},
|
|
6869
|
-
|
|
6870
|
-
|
|
6936
|
+
{
|
|
6937
|
+
type: "Control",
|
|
6938
|
+
scope: "#/properties/copiedElementDetails",
|
|
6939
|
+
options: {
|
|
6940
|
+
widget: "Box"
|
|
6941
|
+
},
|
|
6942
|
+
config: {
|
|
6943
|
+
layout: { xs: 6, sm: 6 },
|
|
6944
|
+
main: {
|
|
6945
|
+
heading: "No element copied"
|
|
6946
|
+
},
|
|
6947
|
+
style: {
|
|
6948
|
+
color: "#a1a09d",
|
|
6949
|
+
marginLeft: "-10px"
|
|
6950
|
+
}
|
|
6951
|
+
}
|
|
6952
|
+
},
|
|
6953
|
+
{
|
|
6954
|
+
type: "Control",
|
|
6955
|
+
scope: "#/properties/EmptyBox",
|
|
6956
|
+
options: {
|
|
6957
|
+
widget: "EmptyBox"
|
|
6958
|
+
},
|
|
6959
|
+
config: {
|
|
6960
|
+
layout: { xs: 1, sm: 5 }
|
|
6961
|
+
}
|
|
6871
6962
|
}
|
|
6872
|
-
|
|
6963
|
+
]
|
|
6873
6964
|
},
|
|
6874
6965
|
{
|
|
6875
6966
|
type: "Control",
|
|
@@ -7199,7 +7290,7 @@ const EventSection = (theme) => {
|
|
|
7199
7290
|
main: {
|
|
7200
7291
|
onClick: "PasteEvent",
|
|
7201
7292
|
size: "small",
|
|
7202
|
-
icon: "
|
|
7293
|
+
icon: "PasteIcon",
|
|
7203
7294
|
iconLabel: "Paste",
|
|
7204
7295
|
styleDefault: true
|
|
7205
7296
|
},
|
|
@@ -7827,7 +7918,7 @@ const TableSection = (theme) => {
|
|
|
7827
7918
|
main: {
|
|
7828
7919
|
onClick: "PasteComponent",
|
|
7829
7920
|
size: "small",
|
|
7830
|
-
icon: "
|
|
7921
|
+
icon: "PasteIcon",
|
|
7831
7922
|
iconLabel: "Paste",
|
|
7832
7923
|
styleDefault: true
|
|
7833
7924
|
},
|
|
@@ -7910,7 +8001,8 @@ const TableSection = (theme) => {
|
|
|
7910
8001
|
main: {
|
|
7911
8002
|
icon: "FileCopyIcon",
|
|
7912
8003
|
onClick: "CopyComponent",
|
|
7913
|
-
styleDefault: true
|
|
8004
|
+
styleDefault: true,
|
|
8005
|
+
disabled: false
|
|
7914
8006
|
}
|
|
7915
8007
|
}
|
|
7916
8008
|
}
|
|
@@ -8222,6 +8314,10 @@ const refreshPage = (type, store2) => {
|
|
|
8222
8314
|
UiSchema.elements[1].config.main.tabLabels = sectionLabels[type] || ["Core", "Style", "Event", "Validation"];
|
|
8223
8315
|
UiSchema.elements[1].elements = elements || [CoreSection, StyleSection, EventSection(store2.theme.myTheme), ValidationSection];
|
|
8224
8316
|
}
|
|
8317
|
+
if (sessionStorage.getItem("copiedConfig")) {
|
|
8318
|
+
const formData = JSON.parse(sessionStorage.getItem("copiedConfig"));
|
|
8319
|
+
UiSchema.elements[4].elements[1].config.main.heading = `Copied Element: ${formData.name}`;
|
|
8320
|
+
}
|
|
8225
8321
|
store2.setUiSchema(UiSchema);
|
|
8226
8322
|
};
|
|
8227
8323
|
var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
@@ -8336,30 +8432,36 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
8336
8432
|
sessionStorage.setItem("rowId", rowId);
|
|
8337
8433
|
store2.updateDialog("popUpEventSection");
|
|
8338
8434
|
},
|
|
8339
|
-
CopyComponent: function() {
|
|
8435
|
+
CopyComponent: function(store22) {
|
|
8340
8436
|
var _a;
|
|
8341
|
-
|
|
8342
|
-
|
|
8343
|
-
|
|
8344
|
-
|
|
8345
|
-
|
|
8346
|
-
|
|
8347
|
-
|
|
8348
|
-
|
|
8349
|
-
|
|
8350
|
-
|
|
8351
|
-
|
|
8352
|
-
|
|
8353
|
-
|
|
8437
|
+
if (sessionStorage.getItem("copiedConfig")) {
|
|
8438
|
+
store22.setNotify({
|
|
8439
|
+
FailMessage: "Element already copied. Cancel to copy again.",
|
|
8440
|
+
Fail: true
|
|
8441
|
+
});
|
|
8442
|
+
} else {
|
|
8443
|
+
const schema2 = lodash.exports.cloneDeep(store22.schema);
|
|
8444
|
+
const uiSchema = lodash.exports.cloneDeep(store22.uiSchema);
|
|
8445
|
+
schema2.properties.RemoveItemButton.disabled = false;
|
|
8446
|
+
const rowId = dynamicData2.path.split(".")[1];
|
|
8447
|
+
const parentPathOfCopiedComponent = (_a = store22.searchParams) == null ? void 0 : _a.get("path");
|
|
8448
|
+
const copiedComponentPath = parentPathOfCopiedComponent ? `${parentPathOfCopiedComponent}.elements[${rowId}]` : `elements[${rowId}]`;
|
|
8449
|
+
const formData = getFormdataFromSessionStorage(copiedComponentPath);
|
|
8450
|
+
uiSchema.elements[4].config.main.heading = `Copied Element: ${formData.name}`;
|
|
8451
|
+
sessionStorage.setItem("copiedConfig", JSON.stringify(formData));
|
|
8452
|
+
store22.setSchema(schema2);
|
|
8453
|
+
}
|
|
8454
|
+
},
|
|
8455
|
+
PasteComponent: function(store22) {
|
|
8354
8456
|
var _a;
|
|
8355
|
-
const path = (_a =
|
|
8457
|
+
const path = (_a = store22.searchParams) == null ? void 0 : _a.get("path");
|
|
8356
8458
|
const formData = getFormdataFromSessionStorage(path);
|
|
8357
8459
|
const insertComponentPath = formData.elements.length;
|
|
8358
8460
|
const finalPath = `${path}.elements[${insertComponentPath}]`;
|
|
8359
8461
|
const copiedData = JSON.parse(sessionStorage.getItem("copiedConfig"));
|
|
8360
8462
|
if (!copiedData.elements) {
|
|
8361
|
-
|
|
8362
|
-
FailMessage: "Pasting not Valid",
|
|
8463
|
+
store22.setNotify({
|
|
8464
|
+
FailMessage: "Pasting element not Valid",
|
|
8363
8465
|
Fail: true
|
|
8364
8466
|
});
|
|
8365
8467
|
} else {
|
|
@@ -8368,23 +8470,23 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
8368
8470
|
this.setPage();
|
|
8369
8471
|
}
|
|
8370
8472
|
},
|
|
8371
|
-
CopyEvent: function() {
|
|
8473
|
+
CopyEvent: function(store22) {
|
|
8372
8474
|
var _a;
|
|
8373
8475
|
const rowId = dynamicData2.path.split(".")[1];
|
|
8374
|
-
const path = (_a =
|
|
8476
|
+
const path = (_a = store22.searchParams) == null ? void 0 : _a.get("path");
|
|
8375
8477
|
const updatedPath = path ? `${path}.events[${rowId}]` : `events[${rowId}]`;
|
|
8376
8478
|
const formData = getFormdataFromSessionStorage(updatedPath);
|
|
8377
8479
|
sessionStorage.setItem("copiedConfig", JSON.stringify(formData));
|
|
8378
8480
|
},
|
|
8379
|
-
PasteEvent: function() {
|
|
8481
|
+
PasteEvent: function(store22) {
|
|
8380
8482
|
var _a;
|
|
8381
|
-
const path = (_a =
|
|
8483
|
+
const path = (_a = store22.searchParams) == null ? void 0 : _a.get("path");
|
|
8382
8484
|
const formData = getFormdataFromSessionStorage(path);
|
|
8383
8485
|
const insertComponentPath = formData.events.length;
|
|
8384
8486
|
const finalPath = `${path}.events[${insertComponentPath}]`;
|
|
8385
8487
|
const copiedData = JSON.parse(sessionStorage.getItem("copiedConfig"));
|
|
8386
8488
|
if (!copiedData.events) {
|
|
8387
|
-
|
|
8489
|
+
store22.setNotify({
|
|
8388
8490
|
FailMessage: "Pasting not Valid",
|
|
8389
8491
|
Fail: true
|
|
8390
8492
|
});
|
|
@@ -8419,7 +8521,12 @@ var pageMaster = (funcParams) => {
|
|
|
8419
8521
|
return config;
|
|
8420
8522
|
},
|
|
8421
8523
|
getUiSchema: function() {
|
|
8422
|
-
|
|
8524
|
+
const UiSchema = _.cloneDeep(PageMasterUiSchema(store2.theme.myTheme));
|
|
8525
|
+
if (sessionStorage.getItem("copiedConfig")) {
|
|
8526
|
+
const formData = JSON.parse(sessionStorage.getItem("copiedConfig"));
|
|
8527
|
+
UiSchema.elements[2].elements[1].config.main.heading = `Copied Element: ${formData.name}`;
|
|
8528
|
+
}
|
|
8529
|
+
return UiSchema;
|
|
8423
8530
|
},
|
|
8424
8531
|
getSchema: () => {
|
|
8425
8532
|
return PageMasterSchema;
|
|
@@ -8487,10 +8594,20 @@ var pageMaster = (funcParams) => {
|
|
|
8487
8594
|
sessionStorage.setItem("rowId", rowId);
|
|
8488
8595
|
store2.updateDialog("popUpPageMasterEvent");
|
|
8489
8596
|
},
|
|
8490
|
-
CopyComponent:
|
|
8491
|
-
|
|
8492
|
-
|
|
8493
|
-
|
|
8597
|
+
CopyComponent: function() {
|
|
8598
|
+
Component(store2, dynamicData2, submitHandler, service2).CopyComponent(store2);
|
|
8599
|
+
},
|
|
8600
|
+
PasteComponent: function() {
|
|
8601
|
+
Component(store2, dynamicData2, submitHandler, service2).PasteComponent(store2);
|
|
8602
|
+
},
|
|
8603
|
+
RemoveItemButton: function() {
|
|
8604
|
+
},
|
|
8605
|
+
CopyEvent: function() {
|
|
8606
|
+
Component(store2, dynamicData2, submitHandler, service2).CopyEvent(store2);
|
|
8607
|
+
},
|
|
8608
|
+
PasteEvent: function() {
|
|
8609
|
+
Component(store2, dynamicData2, submitHandler, service2).PasteEvent(store2);
|
|
8610
|
+
}
|
|
8494
8611
|
};
|
|
8495
8612
|
};
|
|
8496
8613
|
const EventSchema = {
|
|
@@ -8689,7 +8806,7 @@ const EventUiSchema = (theme) => {
|
|
|
8689
8806
|
main: {
|
|
8690
8807
|
onClick: "PasteEvent",
|
|
8691
8808
|
size: "small",
|
|
8692
|
-
icon: "
|
|
8809
|
+
icon: "PasteIcon",
|
|
8693
8810
|
iconLabel: "Paste",
|
|
8694
8811
|
styleDefault: true
|
|
8695
8812
|
},
|
|
@@ -8781,14 +8898,58 @@ const EventUiSchema = (theme) => {
|
|
|
8781
8898
|
]
|
|
8782
8899
|
},
|
|
8783
8900
|
{
|
|
8784
|
-
type: "
|
|
8785
|
-
scope: "#/properties/EmptyBox",
|
|
8786
|
-
options: {
|
|
8787
|
-
widget: "EmptyBox"
|
|
8788
|
-
},
|
|
8901
|
+
type: "HorizontalLayout",
|
|
8789
8902
|
config: {
|
|
8790
|
-
layout: { xs:
|
|
8791
|
-
}
|
|
8903
|
+
layout: { xs: 12, sm: 6 }
|
|
8904
|
+
},
|
|
8905
|
+
elements: [
|
|
8906
|
+
{
|
|
8907
|
+
type: "Control",
|
|
8908
|
+
scope: "#/properties/RemoveItemButton",
|
|
8909
|
+
options: {
|
|
8910
|
+
widget: "IconButton"
|
|
8911
|
+
},
|
|
8912
|
+
config: {
|
|
8913
|
+
layout: { xs: 1, sm: 1 },
|
|
8914
|
+
main: {
|
|
8915
|
+
onClick: "RemoveCopiedConfig",
|
|
8916
|
+
size: "large",
|
|
8917
|
+
icon: "RejectIcon",
|
|
8918
|
+
styleDefault: true
|
|
8919
|
+
},
|
|
8920
|
+
style: {
|
|
8921
|
+
marginLeft: "-10px"
|
|
8922
|
+
}
|
|
8923
|
+
}
|
|
8924
|
+
},
|
|
8925
|
+
{
|
|
8926
|
+
type: "Control",
|
|
8927
|
+
scope: "#/properties/copiedElementDetails",
|
|
8928
|
+
options: {
|
|
8929
|
+
widget: "Box"
|
|
8930
|
+
},
|
|
8931
|
+
config: {
|
|
8932
|
+
layout: { xs: 6, sm: 6 },
|
|
8933
|
+
main: {
|
|
8934
|
+
heading: "No element copied"
|
|
8935
|
+
},
|
|
8936
|
+
style: {
|
|
8937
|
+
color: "#a1a09d",
|
|
8938
|
+
marginLeft: "-10px"
|
|
8939
|
+
}
|
|
8940
|
+
}
|
|
8941
|
+
},
|
|
8942
|
+
{
|
|
8943
|
+
type: "Control",
|
|
8944
|
+
scope: "#/properties/EmptyBox",
|
|
8945
|
+
options: {
|
|
8946
|
+
widget: "EmptyBox"
|
|
8947
|
+
},
|
|
8948
|
+
config: {
|
|
8949
|
+
layout: { xs: 1, sm: 5 }
|
|
8950
|
+
}
|
|
8951
|
+
}
|
|
8952
|
+
]
|
|
8792
8953
|
},
|
|
8793
8954
|
{
|
|
8794
8955
|
type: "Control",
|