impaktapps-ui-builder 0.0.963-copyElement.1000 → 0.0.963-copyElement.1002

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.
@@ -42,9 +42,6 @@ export declare const PageMasterSchema: {
42
42
  RemoveItemButton: {
43
43
  disabled: boolean;
44
44
  };
45
- Paste_Icon: {
46
- disabled: boolean;
47
- };
48
45
  };
49
46
  required: string[];
50
47
  };
@@ -18,6 +18,7 @@ declare const _default: (store: any, dynamicData: any, submitHandler: any, servi
18
18
  deletePopUpEvent: () => void;
19
19
  CopyComponent: (store: any) => void;
20
20
  PasteComponent: (store: any) => void;
21
+ RemoveItemButton: (store: any) => void;
21
22
  CopyEvent: (store: any) => void;
22
23
  PasteEvent: (store: any) => void;
23
24
  };
@@ -53,9 +53,6 @@ declare const _default: (funcParams: funcParamsProps) => {
53
53
  RemoveItemButton: {
54
54
  disabled: boolean;
55
55
  };
56
- Paste_Icon: {
57
- disabled: boolean;
58
- };
59
56
  };
60
57
  required: string[];
61
58
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "0.0.963-copyElement.1000",
3
+ "version": "0.0.963-copyElement.1002",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -347,9 +347,9 @@ export const ComponentSchema: any = {
347
347
  RemoveItemButton:{
348
348
  disabled: true,
349
349
  },
350
- Paste_Icon:{
351
- disabled: true,
352
- }
350
+ // Paste_Icon:{
351
+ // disabled: true,
352
+ // }
353
353
  },
354
354
 
355
355
  required: ["name",]
@@ -44,9 +44,9 @@ export const PageMasterSchema = {
44
44
  RemoveItemButton:{
45
45
  disabled: true
46
46
  },
47
- Paste_Icon:{
48
- disabled: true,
49
- }
47
+ // Paste_Icon:{
48
+ // disabled: true,
49
+ // }
50
50
  },
51
51
  required:["template","name", "label"]
52
52
  }
@@ -62,7 +62,7 @@ export const refreshPage = (type: string, store: any) => {
62
62
  }
63
63
  if (sessionStorage.getItem("copiedConfig") ) {
64
64
  const formData = JSON.parse(sessionStorage.getItem("copiedConfig"));
65
- UiSchema.elements[4].element[1].config.main.heading = `Copied Element: ${formData.name}`;
65
+ UiSchema.elements[4].elements[1].config.main.heading = `Copied Element: ${formData.name}`;
66
66
  }
67
67
  store.setUiSchema(UiSchema);
68
68
  }
@@ -191,6 +191,7 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
191
191
  const schema = cloneDeep(store.schema);
192
192
  const uiSchema = cloneDeep(store.uiSchema);
193
193
  schema.properties.RemoveItemButton.disabled = false;
194
+ // schema.properties.Paste_Icon.disabled = false;
194
195
 
195
196
  const rowId = dynamicData.path.split(".")[1];
196
197
  const parentPathOfCopiedComponent = store.searchParams?.get("path");
@@ -203,6 +204,7 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
203
204
  sessionStorage.setItem('copiedConfig',JSON.stringify(formData));
204
205
 
205
206
  store.setSchema(schema);
207
+ store.setUiSchema(uiSchema);
206
208
  }
207
209
  },
208
210
 
@@ -228,6 +230,16 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
228
230
  }
229
231
  },
230
232
 
233
+ RemoveItemButton: function(store){
234
+ const schema = cloneDeep(store.schema);
235
+ const uiSchema = cloneDeep(store.uiSchema);
236
+ schema.properties.RemoveItemButton.disabled = true;
237
+ // schema.properties.Paste_Icon.disabled = true;
238
+
239
+ store.setSchema(schema);
240
+ store.setUiSchema(uiSchema);
241
+ },
242
+
231
243
 
232
244
  CopyEvent: function(store){
233
245
  const rowId = dynamicData.path.split(".")[1];
@@ -37,7 +37,7 @@ export default (funcParams: funcParamsProps) => {
37
37
  const UiSchema = _.cloneDeep(PageMasterUiSchema(store.theme.myTheme));
38
38
  if (sessionStorage.getItem("copiedConfig") ) {
39
39
  const formData = JSON.parse(sessionStorage.getItem("copiedConfig"));
40
- UiSchema.elements[2].element[1].config.main.heading = `Copied Element: ${formData.name}`;
40
+ UiSchema.elements[2].elements[1].config.main.heading = `Copied Element: ${formData.name}`;
41
41
  }
42
42
  return UiSchema;
43
43
  },
@@ -116,11 +116,10 @@ export default (funcParams: funcParamsProps) => {
116
116
  PasteComponent: function(){
117
117
  Component(store, dynamicData, submitHandler, service).PasteComponent(store)
118
118
  },
119
-
119
+
120
120
  RemoveItemButton: function(){
121
-
121
+ Component(store, dynamicData, submitHandler, service).RemoveItemButton(store)
122
122
  },
123
-
124
123
 
125
124
  CopyEvent: function(){
126
125
  Component(store, dynamicData, submitHandler, service).CopyEvent(store)
@@ -130,6 +129,8 @@ export default (funcParams: funcParamsProps) => {
130
129
  PasteEvent: function(){
131
130
  Component(store, dynamicData, submitHandler, service).PasteEvent(store)
132
131
  },
132
+
133
+
133
134
 
134
135
 
135
136