impaktapps-ui-builder 0.0.963-copyElement.1013 → 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.
@@ -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",
@@ -8445,7 +8445,7 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
8445
8445
  const parentPathOfCopiedComponent = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
8446
8446
  const copiedComponentPath = parentPathOfCopiedComponent ? `${parentPathOfCopiedComponent}.elements[${rowId}]` : `elements[${rowId}]`;
8447
8447
  const formData = getFormdataFromSessionStorage(copiedComponentPath);
8448
- uiSchema.elements[4].elements[1].config.main.heading = `Copied Element: ${formData.name}`;
8448
+ uiSchema.elements[2].elements[1].config.main.heading = `Copied Element: ${formData.name}`;
8449
8449
  sessionStorage.setItem("copiedConfig", JSON.stringify(formData));
8450
8450
  store2.setSchema(schema2);
8451
8451
  store2.setUiSchema(uiSchema);
@@ -8453,20 +8453,27 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
8453
8453
  },
8454
8454
  PasteComponent: function(paramStore = store2, setPage = this.setPage.bind(this)) {
8455
8455
  var _a;
8456
- const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
8457
- dynamicData2.path.split(".")[1];
8458
- const formData = getFormdataFromSessionStorage(path);
8459
- const insertComponentPath = formData.elements.length;
8460
- const finalPath = path ? `${path}.elements[${insertComponentPath}]` : `elements[${insertComponentPath}]`;
8461
- const copiedData = JSON.parse(sessionStorage.getItem("copiedConfig"));
8462
- if (copiedData.Handler) {
8456
+ if (!sessionStorage.getItem("copiedConfig")) {
8463
8457
  store2.setNotify({
8464
- FailMessage: "Pasting element not Valid",
8458
+ FailMessage: "No item has been copied.",
8465
8459
  Fail: true
8466
8460
  });
8467
8461
  } else {
8468
- saveFormdataInSessionStorage(copiedData, finalPath);
8469
- setPage();
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
+ }
8470
8477
  }
8471
8478
  },
8472
8479
  RemoveItemButton: function(paramStore = store2) {
@@ -8947,7 +8954,7 @@ const EventUiSchema = (theme) => {
8947
8954
  heading: "No element copied"
8948
8955
  },
8949
8956
  style: {
8950
- color: "#a1a09d",
8957
+ color: "#535557",
8951
8958
  marginLeft: "-10px"
8952
8959
  }
8953
8960
  }