impaktapps-ui-builder 0.0.963-copyElement.1012 → 0.0.963-copyElement.1014
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 +119 -104
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +3 -3
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +99 -96
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +1 -1
- package/src/impaktapps-ui-builder/builder/services/component.ts +32 -20
- package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +5 -1
|
@@ -6720,6 +6720,96 @@ const componentBasicUiSchema = (theme) => {
|
|
|
6720
6720
|
}
|
|
6721
6721
|
]
|
|
6722
6722
|
},
|
|
6723
|
+
{
|
|
6724
|
+
type: "HorizontalLayout",
|
|
6725
|
+
config: {
|
|
6726
|
+
layout: { xs: 12, sm: 6 }
|
|
6727
|
+
},
|
|
6728
|
+
elements: [
|
|
6729
|
+
{
|
|
6730
|
+
type: "Control",
|
|
6731
|
+
scope: "#/properties/RemoveItemButton",
|
|
6732
|
+
options: {
|
|
6733
|
+
widget: "IconButton"
|
|
6734
|
+
},
|
|
6735
|
+
config: {
|
|
6736
|
+
layout: { xs: 1, sm: 1 },
|
|
6737
|
+
main: {
|
|
6738
|
+
onClick: "RemoveItemButton",
|
|
6739
|
+
size: "large",
|
|
6740
|
+
icon: "RejectIcon",
|
|
6741
|
+
styleDefault: true
|
|
6742
|
+
},
|
|
6743
|
+
style: {
|
|
6744
|
+
marginLeft: "-10px"
|
|
6745
|
+
}
|
|
6746
|
+
}
|
|
6747
|
+
},
|
|
6748
|
+
{
|
|
6749
|
+
type: "Control",
|
|
6750
|
+
scope: "#/properties/copiedElementDetails",
|
|
6751
|
+
options: {
|
|
6752
|
+
widget: "Box"
|
|
6753
|
+
},
|
|
6754
|
+
config: {
|
|
6755
|
+
layout: { xs: 6, sm: 6 },
|
|
6756
|
+
main: {
|
|
6757
|
+
heading: "No element copied"
|
|
6758
|
+
},
|
|
6759
|
+
style: {
|
|
6760
|
+
color: "#535557",
|
|
6761
|
+
marginLeft: "-10px"
|
|
6762
|
+
}
|
|
6763
|
+
}
|
|
6764
|
+
},
|
|
6765
|
+
{
|
|
6766
|
+
type: "Control",
|
|
6767
|
+
scope: "#/properties/EmptyBox",
|
|
6768
|
+
options: {
|
|
6769
|
+
widget: "EmptyBox"
|
|
6770
|
+
},
|
|
6771
|
+
config: {
|
|
6772
|
+
layout: { xs: 1, sm: 5 }
|
|
6773
|
+
}
|
|
6774
|
+
}
|
|
6775
|
+
]
|
|
6776
|
+
},
|
|
6777
|
+
{
|
|
6778
|
+
type: "Control",
|
|
6779
|
+
scope: "#/properties/btn",
|
|
6780
|
+
options: {
|
|
6781
|
+
widget: "Button"
|
|
6782
|
+
},
|
|
6783
|
+
config: {
|
|
6784
|
+
layout: { xs: 4, sm: 2 },
|
|
6785
|
+
main: {
|
|
6786
|
+
name: "Ok",
|
|
6787
|
+
startIcon: "ApproveIcon",
|
|
6788
|
+
variant: "contained",
|
|
6789
|
+
type: "text",
|
|
6790
|
+
onClick: "okHandler",
|
|
6791
|
+
size: "medium"
|
|
6792
|
+
}
|
|
6793
|
+
}
|
|
6794
|
+
},
|
|
6795
|
+
{
|
|
6796
|
+
type: "Control",
|
|
6797
|
+
scope: "#/properties/btnSubmit",
|
|
6798
|
+
options: {
|
|
6799
|
+
widget: "Button"
|
|
6800
|
+
},
|
|
6801
|
+
config: {
|
|
6802
|
+
layout: { xs: 4, sm: 2 },
|
|
6803
|
+
main: {
|
|
6804
|
+
name: "Save & Exit",
|
|
6805
|
+
startIcon: "ApproveIcon",
|
|
6806
|
+
variant: "contained",
|
|
6807
|
+
type: "text",
|
|
6808
|
+
onClick: "saveHandler",
|
|
6809
|
+
size: "medium"
|
|
6810
|
+
}
|
|
6811
|
+
}
|
|
6812
|
+
},
|
|
6723
6813
|
{
|
|
6724
6814
|
type: "Control",
|
|
6725
6815
|
scope: "#/properties/popUpComponentSection",
|
|
@@ -6902,96 +6992,6 @@ const componentBasicUiSchema = (theme) => {
|
|
|
6902
6992
|
}
|
|
6903
6993
|
]
|
|
6904
6994
|
},
|
|
6905
|
-
{
|
|
6906
|
-
type: "HorizontalLayout",
|
|
6907
|
-
config: {
|
|
6908
|
-
layout: { xs: 12, sm: 6 }
|
|
6909
|
-
},
|
|
6910
|
-
elements: [
|
|
6911
|
-
{
|
|
6912
|
-
type: "Control",
|
|
6913
|
-
scope: "#/properties/RemoveItemButton",
|
|
6914
|
-
options: {
|
|
6915
|
-
widget: "IconButton"
|
|
6916
|
-
},
|
|
6917
|
-
config: {
|
|
6918
|
-
layout: { xs: 1, sm: 1 },
|
|
6919
|
-
main: {
|
|
6920
|
-
onClick: "RemoveItemButton",
|
|
6921
|
-
size: "large",
|
|
6922
|
-
icon: "RejectIcon",
|
|
6923
|
-
styleDefault: true
|
|
6924
|
-
},
|
|
6925
|
-
style: {
|
|
6926
|
-
marginLeft: "-10px"
|
|
6927
|
-
}
|
|
6928
|
-
}
|
|
6929
|
-
},
|
|
6930
|
-
{
|
|
6931
|
-
type: "Control",
|
|
6932
|
-
scope: "#/properties/copiedElementDetails",
|
|
6933
|
-
options: {
|
|
6934
|
-
widget: "Box"
|
|
6935
|
-
},
|
|
6936
|
-
config: {
|
|
6937
|
-
layout: { xs: 6, sm: 6 },
|
|
6938
|
-
main: {
|
|
6939
|
-
heading: "No element copied"
|
|
6940
|
-
},
|
|
6941
|
-
style: {
|
|
6942
|
-
color: "#a1a09d",
|
|
6943
|
-
marginLeft: "-10px"
|
|
6944
|
-
}
|
|
6945
|
-
}
|
|
6946
|
-
},
|
|
6947
|
-
{
|
|
6948
|
-
type: "Control",
|
|
6949
|
-
scope: "#/properties/EmptyBox",
|
|
6950
|
-
options: {
|
|
6951
|
-
widget: "EmptyBox"
|
|
6952
|
-
},
|
|
6953
|
-
config: {
|
|
6954
|
-
layout: { xs: 1, sm: 5 }
|
|
6955
|
-
}
|
|
6956
|
-
}
|
|
6957
|
-
]
|
|
6958
|
-
},
|
|
6959
|
-
{
|
|
6960
|
-
type: "Control",
|
|
6961
|
-
scope: "#/properties/btn",
|
|
6962
|
-
options: {
|
|
6963
|
-
widget: "Button"
|
|
6964
|
-
},
|
|
6965
|
-
config: {
|
|
6966
|
-
layout: { xs: 4, sm: 2 },
|
|
6967
|
-
main: {
|
|
6968
|
-
name: "Ok",
|
|
6969
|
-
startIcon: "ApproveIcon",
|
|
6970
|
-
variant: "contained",
|
|
6971
|
-
type: "text",
|
|
6972
|
-
onClick: "okHandler",
|
|
6973
|
-
size: "medium"
|
|
6974
|
-
}
|
|
6975
|
-
}
|
|
6976
|
-
},
|
|
6977
|
-
{
|
|
6978
|
-
type: "Control",
|
|
6979
|
-
scope: "#/properties/btnSubmit",
|
|
6980
|
-
options: {
|
|
6981
|
-
widget: "Button"
|
|
6982
|
-
},
|
|
6983
|
-
config: {
|
|
6984
|
-
layout: { xs: 4, sm: 2 },
|
|
6985
|
-
main: {
|
|
6986
|
-
name: "Save & Exit",
|
|
6987
|
-
startIcon: "ApproveIcon",
|
|
6988
|
-
variant: "contained",
|
|
6989
|
-
type: "text",
|
|
6990
|
-
onClick: "saveHandler",
|
|
6991
|
-
size: "medium"
|
|
6992
|
-
}
|
|
6993
|
-
}
|
|
6994
|
-
},
|
|
6995
6995
|
{
|
|
6996
6996
|
type: "Control",
|
|
6997
6997
|
scope: "#/properties/notify",
|
|
@@ -8330,7 +8330,11 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
8330
8330
|
return getFormdataFromSessionStorage(path);
|
|
8331
8331
|
},
|
|
8332
8332
|
getSchema: function() {
|
|
8333
|
-
|
|
8333
|
+
const schema2 = _.cloneDeep(ComponentSchema);
|
|
8334
|
+
if (sessionStorage.getItem("copiedConfig")) {
|
|
8335
|
+
schema2.properties.RemoveItemButton.disabled = false;
|
|
8336
|
+
}
|
|
8337
|
+
return schema2;
|
|
8334
8338
|
},
|
|
8335
8339
|
okHandler: () => okHandler(store2),
|
|
8336
8340
|
saveHandler: async () => await saveHandler(store2, service2, submitHandler, "PageMaster"),
|
|
@@ -8441,7 +8445,7 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
8441
8445
|
const parentPathOfCopiedComponent = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
8442
8446
|
const copiedComponentPath = parentPathOfCopiedComponent ? `${parentPathOfCopiedComponent}.elements[${rowId}]` : `elements[${rowId}]`;
|
|
8443
8447
|
const formData = getFormdataFromSessionStorage(copiedComponentPath);
|
|
8444
|
-
uiSchema.elements[
|
|
8448
|
+
uiSchema.elements[2].elements[1].config.main.heading = `Copied Element: ${formData.name}`;
|
|
8445
8449
|
sessionStorage.setItem("copiedConfig", JSON.stringify(formData));
|
|
8446
8450
|
store2.setSchema(schema2);
|
|
8447
8451
|
store2.setUiSchema(uiSchema);
|
|
@@ -8449,20 +8453,27 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
8449
8453
|
},
|
|
8450
8454
|
PasteComponent: function(paramStore = store2, setPage = this.setPage.bind(this)) {
|
|
8451
8455
|
var _a;
|
|
8452
|
-
|
|
8453
|
-
dynamicData2.path.split(".")[1];
|
|
8454
|
-
const formData = getFormdataFromSessionStorage(path);
|
|
8455
|
-
const insertComponentPath = formData.elements.length;
|
|
8456
|
-
const finalPath = path ? `${path}.elements[${insertComponentPath}]` : `elements[${insertComponentPath}]`;
|
|
8457
|
-
const copiedData = JSON.parse(sessionStorage.getItem("copiedConfig"));
|
|
8458
|
-
if (copiedData.Handler) {
|
|
8456
|
+
if (!sessionStorage.getItem("copiedConfig")) {
|
|
8459
8457
|
store2.setNotify({
|
|
8460
|
-
FailMessage: "
|
|
8458
|
+
FailMessage: "No item has been copied.",
|
|
8461
8459
|
Fail: true
|
|
8462
8460
|
});
|
|
8463
8461
|
} else {
|
|
8464
|
-
|
|
8465
|
-
|
|
8462
|
+
const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
8463
|
+
dynamicData2.path.split(".")[1];
|
|
8464
|
+
const formData = getFormdataFromSessionStorage(path);
|
|
8465
|
+
const insertComponentPath = formData.elements.length;
|
|
8466
|
+
const finalPath = path ? `${path}.elements[${insertComponentPath}]` : `elements[${insertComponentPath}]`;
|
|
8467
|
+
const copiedData = JSON.parse(sessionStorage.getItem("copiedConfig"));
|
|
8468
|
+
if (copiedData.Handler) {
|
|
8469
|
+
store2.setNotify({
|
|
8470
|
+
FailMessage: "Pasting element not Valid",
|
|
8471
|
+
Fail: true
|
|
8472
|
+
});
|
|
8473
|
+
} else {
|
|
8474
|
+
saveFormdataInSessionStorage(copiedData, finalPath);
|
|
8475
|
+
setPage();
|
|
8476
|
+
}
|
|
8466
8477
|
}
|
|
8467
8478
|
},
|
|
8468
8479
|
RemoveItemButton: function(paramStore = store2) {
|
|
@@ -8532,7 +8543,11 @@ var pageMaster = (funcParams) => {
|
|
|
8532
8543
|
return UiSchema;
|
|
8533
8544
|
},
|
|
8534
8545
|
getSchema: () => {
|
|
8535
|
-
|
|
8546
|
+
const schema2 = _.cloneDeep(PageMasterSchema);
|
|
8547
|
+
if (sessionStorage.getItem("copiedConfig")) {
|
|
8548
|
+
schema2.properties.RemoveItemButton.disabled = false;
|
|
8549
|
+
}
|
|
8550
|
+
return schema2;
|
|
8536
8551
|
},
|
|
8537
8552
|
backHandler: () => {
|
|
8538
8553
|
sessionStorage.removeItem("pageFormdata");
|
|
@@ -8939,7 +8954,7 @@ const EventUiSchema = (theme) => {
|
|
|
8939
8954
|
heading: "No element copied"
|
|
8940
8955
|
},
|
|
8941
8956
|
style: {
|
|
8942
|
-
color: "#
|
|
8957
|
+
color: "#535557",
|
|
8943
8958
|
marginLeft: "-10px"
|
|
8944
8959
|
}
|
|
8945
8960
|
}
|