impaktapps-ui-builder 0.0.963-CopyComponent.7 → 0.0.963-CopyComponent.9
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/dist/impaktapps-ui-builder.es.js +43 -78
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +8 -8
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/eventSection.d.ts +3 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/tableSection.d.ts +3 -0
- package/dist/src/impaktapps-ui-builder/builder/services/pageMaster.d.ts +2 -0
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/eventSection.ts +1 -21
- package/src/impaktapps-ui-builder/builder/build/uischema/tableSection.ts +1 -2
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +5 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +25 -3
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +2 -0
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +1 -0
- package/src/impaktapps-ui-builder/builder/services/component.ts +29 -8
- package/src/impaktapps-ui-builder/builder/services/event.ts +20 -17
- package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +4 -24
|
@@ -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
|
};
|
package/package.json
CHANGED
|
@@ -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
|
},
|
|
@@ -363,17 +363,39 @@ export const componentBasicUiSchema: any = (theme)=>{
|
|
|
363
363
|
},
|
|
364
364
|
},
|
|
365
365
|
]
|
|
366
|
-
|
|
366
|
+
},
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
|
|
367
370
|
{
|
|
368
371
|
type: "Control",
|
|
369
|
-
scope: "#/properties/
|
|
372
|
+
scope: "#/properties/copiedElementDetails",
|
|
373
|
+
|
|
370
374
|
options: {
|
|
371
|
-
widget: "
|
|
375
|
+
widget: "Box",
|
|
372
376
|
},
|
|
373
377
|
config: {
|
|
374
378
|
layout: { xs: 4, sm: 8 },
|
|
379
|
+
main: {
|
|
380
|
+
heading: "",
|
|
381
|
+
},
|
|
382
|
+
style: {
|
|
383
|
+
float: "left"
|
|
384
|
+
}
|
|
375
385
|
},
|
|
376
386
|
},
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
// {
|
|
390
|
+
// type: "Control",
|
|
391
|
+
// scope: "#/properties/EmptyBox",
|
|
392
|
+
// options: {
|
|
393
|
+
// widget: "EmptyBox",
|
|
394
|
+
// },
|
|
395
|
+
// config: {
|
|
396
|
+
// layout: { xs: 4, sm: 8 },
|
|
397
|
+
// },
|
|
398
|
+
// },
|
|
377
399
|
{
|
|
378
400
|
type: "Control",
|
|
379
401
|
scope: "#/properties/btn",
|
|
@@ -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
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _ from "lodash";
|
|
1
|
+
import _, { cloneDeep } from "lodash";
|
|
2
2
|
import { ComponentSchema } from "../elements/UiSchema/Component/schema";
|
|
3
3
|
import { componentBasicUiSchema } from "../elements/UiSchema/Component/uiSchema";
|
|
4
4
|
import { CoreSection } from "../build/uischema/coreSection";
|
|
@@ -175,20 +175,34 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
175
175
|
|
|
176
176
|
|
|
177
177
|
CopyComponent: function(){
|
|
178
|
+
const schema = cloneDeep(store.schema);
|
|
179
|
+
const uiSchema = cloneDeep(store.uiSchema);
|
|
180
|
+
schema.properties.CopyComponent.disabled = true;
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
|
|
178
184
|
const rowId = dynamicData.path.split(".")[1];
|
|
179
185
|
const parentPathOfCopiedComponent = store.searchParams?.get("path");
|
|
180
186
|
const copiedComponentPath = parentPathOfCopiedComponent ? `${parentPathOfCopiedComponent}.elements[${rowId}]` : `elements[${rowId}]`;
|
|
181
187
|
|
|
188
|
+
|
|
182
189
|
const formData = getFormdataFromSessionStorage(copiedComponentPath);
|
|
190
|
+
|
|
191
|
+
uiSchema.elements[5].config.main.heading = formData.name;
|
|
192
|
+
|
|
193
|
+
|
|
183
194
|
sessionStorage.setItem('copiedConfig',JSON.stringify(formData));
|
|
184
195
|
|
|
196
|
+
store.setSchema(schema);
|
|
197
|
+
store.setUiSchema(uiSchema);
|
|
185
198
|
},
|
|
186
199
|
|
|
187
200
|
PasteComponent: function(){
|
|
201
|
+
// const schema = cloneDeep(store.schema);
|
|
202
|
+
|
|
188
203
|
const path = store.searchParams?.get("path");
|
|
189
204
|
const formData = getFormdataFromSessionStorage(path)
|
|
190
205
|
const insertComponentPath = formData.elements.length;
|
|
191
|
-
|
|
192
206
|
const finalPath = `${path}.elements[${insertComponentPath}]`;
|
|
193
207
|
const copiedData = JSON.parse(sessionStorage.getItem("copiedConfig"));
|
|
194
208
|
if(!copiedData.elements){
|
|
@@ -197,9 +211,14 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
197
211
|
Fail: true,
|
|
198
212
|
});
|
|
199
213
|
}
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
214
|
+
else{
|
|
215
|
+
saveFormdataInSessionStorage(copiedData, finalPath);
|
|
216
|
+
sessionStorage.removeItem('copiedConfig');
|
|
217
|
+
|
|
218
|
+
// schema.properties.CopyComponent.disabled = false;
|
|
219
|
+
|
|
220
|
+
this.setPage();
|
|
221
|
+
}
|
|
203
222
|
},
|
|
204
223
|
|
|
205
224
|
|
|
@@ -226,9 +245,11 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
226
245
|
Fail: true,
|
|
227
246
|
});
|
|
228
247
|
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
248
|
+
else{
|
|
249
|
+
saveFormdataInSessionStorage(copiedData, finalPath);
|
|
250
|
+
sessionStorage.removeItem('copiedConfig');
|
|
251
|
+
this.setPage();
|
|
252
|
+
}
|
|
232
253
|
}
|
|
233
254
|
|
|
234
255
|
|
|
@@ -140,25 +140,28 @@ export default (
|
|
|
140
140
|
store.updateDialog("popUpEvent");
|
|
141
141
|
},
|
|
142
142
|
|
|
143
|
-
CopyEvent:
|
|
144
|
-
|
|
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
|
-
|
|
149
|
-
|
|
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
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
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
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
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:
|
|
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
|
-
|
|
117
|
-
|
|
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];
|