impaktapps-ui-builder 0.0.963-CopyComponent.11 → 0.0.963-CopyComponent.13

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.
@@ -81,6 +81,7 @@ export declare const TableSection: (theme: any) => {
81
81
  onClick: string;
82
82
  tooltipMessage: string;
83
83
  styleDefault?: undefined;
84
+ disabled?: undefined;
84
85
  };
85
86
  style: {
86
87
  color: any;
@@ -105,6 +106,7 @@ export declare const TableSection: (theme: any) => {
105
106
  onClick: string;
106
107
  tooltipMessage: string;
107
108
  styleDefault?: undefined;
109
+ disabled?: undefined;
108
110
  };
109
111
  style?: undefined;
110
112
  };
@@ -125,6 +127,7 @@ export declare const TableSection: (theme: any) => {
125
127
  icon: string;
126
128
  onClick: string;
127
129
  styleDefault: boolean;
130
+ disabled: boolean;
128
131
  color?: undefined;
129
132
  tooltipMessage?: undefined;
130
133
  };
@@ -16,7 +16,7 @@ declare const _default: (store: any, dynamicData: any, submitHandler: any, servi
16
16
  backHandler: () => void;
17
17
  deletePopUpComponent: () => void;
18
18
  deletePopUpEvent: () => void;
19
- CopyComponent: () => void;
19
+ CopyComponent: (ComponentUiSchema: any) => void;
20
20
  PasteComponent: () => void;
21
21
  CopyEvent: () => void;
22
22
  PasteEvent: () => void;
@@ -63,7 +63,7 @@ declare const _default: (funcParams: funcParamsProps) => {
63
63
  deleteEvent: () => void;
64
64
  deletePopUpComponent: () => void;
65
65
  deletePopUpEvent: () => void;
66
- CopyComponent: () => void;
66
+ CopyComponent: void;
67
67
  PasteComponent: () => void;
68
68
  CopyEvent: () => void;
69
69
  PasteEvent: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "0.0.963-CopyComponent.11",
3
+ "version": "0.0.963-CopyComponent.13",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -49,7 +49,7 @@ export const EventSection = (theme)=>{
49
49
  // color: "info",
50
50
  onClick: "PasteEvent",
51
51
  size: "small",
52
- icon: "SendIcon",
52
+ icon: "PasteIcon",
53
53
  iconLabel: "Paste",
54
54
  styleDefault: true,
55
55
  },
@@ -50,7 +50,7 @@ export const TableSection = (theme) => {
50
50
  // color: "info",
51
51
  onClick: "PasteComponent",
52
52
  size: "small",
53
- icon: "SendIcon",
53
+ icon: "PasteIcon",
54
54
  iconLabel: "Paste",
55
55
  styleDefault: true,
56
56
  },
@@ -139,6 +139,7 @@ export const TableSection = (theme) => {
139
139
  // color: "error",
140
140
  onClick: "CopyComponent",
141
141
  styleDefault: true,
142
+ disabled: false
142
143
  },
143
144
  },
144
145
  },
@@ -141,7 +141,7 @@ export const PageMasterUiSchema: any = (theme) => {
141
141
  // color: "info",
142
142
  onClick: "PasteComponent",
143
143
  size: "small",
144
- icon: "SendIcon",
144
+ icon: "PasteIcon",
145
145
  iconLabel: "Paste",
146
146
  styleDefault: true,
147
147
  },
@@ -284,7 +284,7 @@ export const PageMasterUiSchema: any = (theme) => {
284
284
  // color: "info",
285
285
  onClick: "PasteEvent",
286
286
  size: "small",
287
- icon: "SendIcon",
287
+ icon: "PasteIcon",
288
288
  iconLabel: "Paste",
289
289
  styleDefault: true,
290
290
  },
@@ -120,7 +120,7 @@ export const EventUiSchema: any = (theme) => {
120
120
  // color: "info",
121
121
  onClick: "PasteEvent",
122
122
  size: "small",
123
- icon: "SendIcon",
123
+ icon: "PasteIcon",
124
124
  iconLabel: "Paste",
125
125
  styleDefault: true,
126
126
  },
@@ -174,10 +174,11 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
174
174
  },
175
175
 
176
176
 
177
- CopyComponent: function(){
178
- const schema = cloneDeep(store.schema);
179
- const uiSchema = cloneDeep(store.uiSchema);
180
- // schema.properties.CopyComponent.disabled = true;
177
+ CopyComponent: function(ComponentUiSchema){
178
+ const schema = cloneDeep(ComponentSchema);
179
+ console.log("schema", schema);
180
+ const uiSchema = cloneDeep(ComponentUiSchema || store.uiSchema);
181
+ schema.properties.CopyComponent.disabled = true;
181
182
 
182
183
 
183
184
 
@@ -189,11 +190,13 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
189
190
  const formData = getFormdataFromSessionStorage(copiedComponentPath);
190
191
 
191
192
  uiSchema.elements[4].config.main.heading = formData.name;
193
+ uiSchema.elements[1].elements[1].elements[0].elements[4].widget.config.main.disabled = true;
194
+
192
195
 
193
196
 
194
197
  sessionStorage.setItem('copiedConfig',JSON.stringify(formData));
195
198
 
196
- // store.setSchema(schema);
199
+ store.setSchema(schema);
197
200
  store.setUiSchema(uiSchema);
198
201
  },
199
202
 
@@ -214,6 +217,7 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
214
217
  else{
215
218
  saveFormdataInSessionStorage(copiedData, finalPath);
216
219
  sessionStorage.removeItem('copiedConfig');
220
+
217
221
 
218
222
  // schema.properties.CopyComponent.disabled = false;
219
223
 
@@ -103,7 +103,7 @@ export default (funcParams: funcParamsProps) => {
103
103
  },
104
104
 
105
105
 
106
- CopyComponent: Component(store, dynamicData, submitHandler, service).CopyComponent,
106
+ CopyComponent: Component(store, dynamicData, submitHandler, service).CopyComponent(store.uiSchema),
107
107
 
108
108
  PasteComponent: Component(store, dynamicData, submitHandler, service).PasteComponent,
109
109