impaktapps-ui-builder 0.0.963-CopyComponent.7 → 0.0.963-CopyComponent.8

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.
@@ -80,6 +80,7 @@ export declare const EventSection: (theme: any) => {
80
80
  icon: string;
81
81
  tooltipMessage: string;
82
82
  onClick: string;
83
+ styleDefault?: undefined;
83
84
  };
84
85
  style: {
85
86
  color: any;
@@ -106,6 +107,7 @@ export declare const EventSection: (theme: any) => {
106
107
  tooltipMessage: string;
107
108
  onClick: string;
108
109
  size?: undefined;
110
+ styleDefault?: undefined;
109
111
  };
110
112
  style?: undefined;
111
113
  };
@@ -127,6 +129,7 @@ export declare const EventSection: (theme: any) => {
127
129
  icon: string;
128
130
  onClick: string;
129
131
  tooltipMessage: string;
132
+ styleDefault: boolean;
130
133
  color?: undefined;
131
134
  size?: undefined;
132
135
  };
@@ -80,6 +80,7 @@ export declare const TableSection: (theme: any) => {
80
80
  color: string;
81
81
  onClick: string;
82
82
  tooltipMessage: string;
83
+ styleDefault?: undefined;
83
84
  };
84
85
  style: {
85
86
  color: any;
@@ -103,6 +104,7 @@ export declare const TableSection: (theme: any) => {
103
104
  color: string;
104
105
  onClick: string;
105
106
  tooltipMessage: string;
107
+ styleDefault?: undefined;
106
108
  };
107
109
  style?: undefined;
108
110
  };
@@ -122,6 +124,7 @@ export declare const TableSection: (theme: any) => {
122
124
  main: {
123
125
  icon: string;
124
126
  onClick: string;
127
+ styleDefault: boolean;
125
128
  color?: undefined;
126
129
  tooltipMessage?: undefined;
127
130
  };
@@ -65,5 +65,7 @@ declare const _default: (funcParams: funcParamsProps) => {
65
65
  deletePopUpEvent: () => void;
66
66
  CopyComponent: () => void;
67
67
  PasteComponent: () => void;
68
+ CopyEvent: () => void;
69
+ PasteEvent: () => void;
68
70
  };
69
71
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "0.0.963-CopyComponent.7",
3
+ "version": "0.0.963-CopyComponent.8",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -140,27 +140,7 @@ export const EventSection = (theme)=>{
140
140
  // color: "error",
141
141
  onClick: "CopyEvent",
142
142
  tooltipMessage: "Reject This Record",
143
- },
144
- },
145
- },
146
- },
147
-
148
- {
149
- header: "paste",
150
- field: "Paste_Event",
151
- flex: 1,
152
- widget: {
153
- type: "Control",
154
- scope: "#/properties/PasteEvent",
155
- options: {
156
- widget: "IconButton",
157
- },
158
- config: {
159
- main: {
160
- icon: "SendIcon",
161
- // color: "error",
162
- onClick: "PasteEvent",
163
- tooltipMessage: "Reject This Record",
143
+ styleDefault: true,
164
144
  },
165
145
  },
166
146
  },
@@ -138,12 +138,11 @@ export const TableSection = (theme) => {
138
138
  icon: "FileCopyIcon",
139
139
  // color: "error",
140
140
  onClick: "CopyComponent",
141
+ styleDefault: true,
141
142
  },
142
143
  },
143
144
  },
144
145
  },
145
-
146
-
147
146
  ]
148
147
  }]
149
148
  }
@@ -228,6 +228,7 @@ export const PageMasterUiSchema: any = (theme) => {
228
228
  icon: "FileCopyIcon",
229
229
  // color: "error",
230
230
  onClick: "CopyComponent",
231
+ styleDefault: true,
231
232
  },
232
233
  },
233
234
  },
@@ -371,6 +372,7 @@ export const PageMasterUiSchema: any = (theme) => {
371
372
  icon: "FileCopyIcon",
372
373
  // color: "error",
373
374
  onClick: "CopyEvent",
375
+ styleDefault: true,
374
376
  },
375
377
  },
376
378
  },
@@ -206,6 +206,7 @@ export const EventUiSchema: any = (theme) => {
206
206
  icon: "FileCopyIcon",
207
207
  // color: "error",
208
208
  onClick: "CopyEvent",
209
+ styleDefault: true,
209
210
  },
210
211
  },
211
212
  },
@@ -178,17 +178,14 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
178
178
  const rowId = dynamicData.path.split(".")[1];
179
179
  const parentPathOfCopiedComponent = store.searchParams?.get("path");
180
180
  const copiedComponentPath = parentPathOfCopiedComponent ? `${parentPathOfCopiedComponent}.elements[${rowId}]` : `elements[${rowId}]`;
181
-
182
181
  const formData = getFormdataFromSessionStorage(copiedComponentPath);
183
182
  sessionStorage.setItem('copiedConfig',JSON.stringify(formData));
184
-
185
183
  },
186
184
 
187
185
  PasteComponent: function(){
188
186
  const path = store.searchParams?.get("path");
189
187
  const formData = getFormdataFromSessionStorage(path)
190
188
  const insertComponentPath = formData.elements.length;
191
-
192
189
  const finalPath = `${path}.elements[${insertComponentPath}]`;
193
190
  const copiedData = JSON.parse(sessionStorage.getItem("copiedConfig"));
194
191
  if(!copiedData.elements){
@@ -197,9 +194,11 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
197
194
  Fail: true,
198
195
  });
199
196
  }
200
- saveFormdataInSessionStorage(copiedData, finalPath);
201
- sessionStorage.removeItem('copiedConfig');
202
- this.setPage();
197
+ else{
198
+ saveFormdataInSessionStorage(copiedData, finalPath);
199
+ sessionStorage.removeItem('copiedConfig');
200
+ this.setPage();
201
+ }
203
202
  },
204
203
 
205
204
 
@@ -226,9 +225,11 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
226
225
  Fail: true,
227
226
  });
228
227
  }
229
- saveFormdataInSessionStorage(copiedData, finalPath);
230
- sessionStorage.removeItem('copiedConfig');
231
- this.setPage();
228
+ else{
229
+ saveFormdataInSessionStorage(copiedData, finalPath);
230
+ sessionStorage.removeItem('copiedConfig');
231
+ this.setPage();
232
+ }
232
233
  }
233
234
 
234
235
 
@@ -140,25 +140,28 @@ export default (
140
140
  store.updateDialog("popUpEvent");
141
141
  },
142
142
 
143
- CopyEvent: function(){
144
- const rowId = dynamicData.path.split(".")[1];
145
- const path = store.searchParams?.get("path");
146
- const updatedPath = path ? `${path}.events[${rowId}]` : `events[${rowId}]`;
143
+ CopyEvent: Component(store, dynamicData, submitHandler, service).CopyEvent,
144
+ PasteEvent: Component(store, dynamicData, submitHandler, service).PasteEvent,
147
145
 
148
- const formData = getFormdataFromSessionStorage(updatedPath);
149
- sessionStorage.setItem('copiedConfig',JSON.stringify(formData));
150
- },
146
+ // CopyEvent: function(){
147
+ // const rowId = dynamicData.path.split(".")[1];
148
+ // const path = store.searchParams?.get("path");
149
+ // const updatedPath = path ? `${path}.events[${rowId}]` : `events[${rowId}]`;
151
150
 
152
- PasteEvent: function(){
153
- const path = store.searchParams?.get("path");
154
- const formData = getFormdataFromSessionStorage(path)
155
- const insertComponentPath = formData.events.length;
151
+ // const formData = getFormdataFromSessionStorage(updatedPath);
152
+ // sessionStorage.setItem('copiedConfig',JSON.stringify(formData));
153
+ // },
154
+
155
+ // PasteEvent: function(){
156
+ // const path = store.searchParams?.get("path");
157
+ // const formData = getFormdataFromSessionStorage(path)
158
+ // const insertComponentPath = formData.events.length;
156
159
 
157
- const finalPath = `${path}.events[${insertComponentPath}]`;
158
- const copiedData = JSON.parse(sessionStorage.getItem("copiedConfig"));
159
- saveFormdataInSessionStorage(copiedData, finalPath);
160
- sessionStorage.removeItem('copiedConfig');
161
- this.setPage();
162
- }
160
+ // const finalPath = `${path}.events[${insertComponentPath}]`;
161
+ // const copiedData = JSON.parse(sessionStorage.getItem("copiedConfig"));
162
+ // saveFormdataInSessionStorage(copiedData, finalPath);
163
+ // sessionStorage.removeItem('copiedConfig');
164
+ // this.setPage();
165
+ // }
163
166
  }
164
167
  };
@@ -103,33 +103,13 @@ export default (funcParams: funcParamsProps) => {
103
103
  },
104
104
 
105
105
 
106
- CopyComponent: function(){
107
- const rowId = dynamicData.path.split(".")[1];
108
- const parentPathOfCopiedComponent = store.searchParams?.get("path");
109
- const copiedComponentPath = parentPathOfCopiedComponent ? `${parentPathOfCopiedComponent}.elements[${rowId}]` : `elements[${rowId}]`;
110
-
111
- const formData = getFormdataFromSessionStorage(copiedComponentPath);
112
- sessionStorage.setItem('copiedConfig',JSON.stringify(formData));
106
+ CopyComponent: Component(store, dynamicData, submitHandler, service).CopyComponent,
113
107
 
114
- },
108
+ PasteComponent: Component(store, dynamicData, submitHandler, service).PasteComponent,
115
109
 
116
- PasteComponent: function(){
117
- const path = store.searchParams?.get("path");
118
- const formData = getFormdataFromSessionStorage(path)
119
- const insertComponentPath = formData.elements.length;
110
+ CopyEvent: Component(store, dynamicData, submitHandler, service).CopyEvent,
111
+ PasteEvent: Component(store, dynamicData, submitHandler, service).PasteEvent,
120
112
 
121
- const finalPath = `${path}.elements[${insertComponentPath}]`;
122
- const copiedData = JSON.parse(sessionStorage.getItem("copiedConfig"));
123
- if(!copiedData.elements){
124
- store.setNotify({
125
- FailMessage: "Pasting not Valid",
126
- Fail: true,
127
- });
128
- }
129
- saveFormdataInSessionStorage(copiedData, finalPath);
130
- sessionStorage.removeItem('copiedConfig');
131
- this.setPage();
132
- }
133
113
 
134
114
  // CopyComponent: function(){
135
115
  // const rowId = dynamicData.path.split(".")[1];