impaktapps-ui-builder 0.0.963-copyElement.1011 → 0.0.963-copyElement.1013

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "0.0.963-copyElement.1011",
3
+ "version": "0.0.963-copyElement.1013",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -83,7 +83,11 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
83
83
  return getFormdataFromSessionStorage(path)
84
84
  },
85
85
  getSchema: function () {
86
- return ComponentSchema;
86
+ const schema = _.cloneDeep(ComponentSchema);
87
+ if (sessionStorage.getItem("copiedConfig") ) {
88
+ schema.properties.RemoveItemButton.disabled = false;
89
+ }
90
+ return schema;
87
91
  },
88
92
  okHandler: () => okHandler(store),
89
93
  saveHandler: async () => await saveHandler(store, service, submitHandler, "PageMaster"),
@@ -208,7 +212,7 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
208
212
  }
209
213
  },
210
214
 
211
- PasteComponent: function(paramStore = store,setPage = this.setPage){
215
+ PasteComponent: function(paramStore = store, setPage = this.setPage.bind(this)){
212
216
  // const schema = cloneDeep(store.schema);
213
217
 
214
218
  const path = store.searchParams?.get("path");
@@ -42,7 +42,11 @@ export default (funcParams: funcParamsProps) => {
42
42
  return UiSchema;
43
43
  },
44
44
  getSchema: () => {
45
- return PageMasterSchema;
45
+ const schema = _.cloneDeep(PageMasterSchema);
46
+ if (sessionStorage.getItem("copiedConfig") ) {
47
+ schema.properties.RemoveItemButton.disabled = false;
48
+ }
49
+ return schema;
46
50
  },
47
51
  backHandler: () => {
48
52
  sessionStorage.removeItem("pageFormdata")
@@ -114,7 +118,9 @@ export default (funcParams: funcParamsProps) => {
114
118
 
115
119
 
116
120
  PasteComponent: function(){
117
- Component(store, dynamicData, submitHandler, service).PasteComponent(store,this.setPage)
121
+ // Component(store, dynamicData, submitHandler, service).PasteComponent(store,this.setPage)
122
+ const component = Component(store, dynamicData, submitHandler, service);
123
+ component.PasteComponent(store, this.setPage.bind(this));
118
124
  },
119
125
 
120
126
  RemoveItemButton: function(){