impaktapps-ui-builder 0.0.963-copyElement.1007 → 0.0.963-copyElement.1009
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 +24 -16
- 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/services/component.d.ts +2 -2
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +1 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +7 -6
- package/src/impaktapps-ui-builder/builder/services/component.ts +26 -18
|
@@ -17,8 +17,8 @@ declare const _default: (store: any, dynamicData: any, submitHandler: any, servi
|
|
|
17
17
|
deletePopUpComponent: () => void;
|
|
18
18
|
deletePopUpEvent: () => void;
|
|
19
19
|
CopyComponent: (paramStore?: any) => void;
|
|
20
|
-
PasteComponent: (paramStore?: any) => void;
|
|
21
|
-
RemoveItemButton: (paramStore
|
|
20
|
+
PasteComponent: (paramStore?: any, setPage?: any) => void;
|
|
21
|
+
RemoveItemButton: (paramStore?: any) => void;
|
|
22
22
|
CopyEvent: (store: any) => void;
|
|
23
23
|
PasteEvent: (store: any) => void;
|
|
24
24
|
};
|
package/package.json
CHANGED
|
@@ -386,7 +386,7 @@ export const PageMasterUiSchema: any = (theme) => {
|
|
|
386
386
|
{
|
|
387
387
|
type: "HorizontalLayout",
|
|
388
388
|
config: {
|
|
389
|
-
layout:{xs:12,sm:
|
|
389
|
+
layout:{xs:12,sm: 9}
|
|
390
390
|
},
|
|
391
391
|
elements: [
|
|
392
392
|
{
|
|
@@ -398,13 +398,13 @@ export const PageMasterUiSchema: any = (theme) => {
|
|
|
398
398
|
config: {
|
|
399
399
|
layout: { xs: 1, sm: 1 },
|
|
400
400
|
main: {
|
|
401
|
-
onClick: "
|
|
401
|
+
onClick: "RemoveItemButton",
|
|
402
402
|
size: "large",
|
|
403
403
|
icon: "RejectIcon",
|
|
404
404
|
styleDefault: true,
|
|
405
405
|
},
|
|
406
406
|
style:{
|
|
407
|
-
marginLeft: "-
|
|
407
|
+
marginLeft: "-5px"
|
|
408
408
|
}
|
|
409
409
|
},
|
|
410
410
|
},
|
|
@@ -422,8 +422,8 @@ export const PageMasterUiSchema: any = (theme) => {
|
|
|
422
422
|
heading: "No element copied",
|
|
423
423
|
},
|
|
424
424
|
style: {
|
|
425
|
-
color: "#
|
|
426
|
-
marginLeft: "-
|
|
425
|
+
color: "#535557",
|
|
426
|
+
marginLeft: "-30px"
|
|
427
427
|
},
|
|
428
428
|
},
|
|
429
429
|
},
|
|
@@ -439,13 +439,14 @@ export const PageMasterUiSchema: any = (theme) => {
|
|
|
439
439
|
},
|
|
440
440
|
]
|
|
441
441
|
},
|
|
442
|
+
|
|
442
443
|
{
|
|
443
444
|
type: "Control",
|
|
444
445
|
scope: "#/properties/btn",
|
|
445
446
|
options: {
|
|
446
447
|
widget: "Button",
|
|
447
448
|
},
|
|
448
|
-
|
|
449
|
+
|
|
449
450
|
config: {
|
|
450
451
|
layout: { xs: 4, sm: 2 },
|
|
451
452
|
main: {
|
|
@@ -188,8 +188,8 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
188
188
|
});
|
|
189
189
|
}
|
|
190
190
|
else{
|
|
191
|
-
const schema = cloneDeep(paramStore.schema
|
|
192
|
-
const uiSchema = cloneDeep(paramStore.uiSchema
|
|
191
|
+
const schema = cloneDeep(paramStore.schema );
|
|
192
|
+
const uiSchema = cloneDeep(paramStore.uiSchema );
|
|
193
193
|
schema.properties.RemoveItemButton.disabled = false;
|
|
194
194
|
// schema.properties.Paste_Icon.disabled = false;
|
|
195
195
|
|
|
@@ -208,33 +208,41 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
208
208
|
}
|
|
209
209
|
},
|
|
210
210
|
|
|
211
|
-
PasteComponent: function(paramStore = store){
|
|
211
|
+
PasteComponent: function(paramStore = store, setPage = this.setPage){
|
|
212
212
|
// const schema = cloneDeep(store.schema);
|
|
213
213
|
|
|
214
214
|
const path = store.searchParams?.get("path");
|
|
215
|
+
const rowId = dynamicData.path.split(".")[1];
|
|
216
|
+
|
|
215
217
|
const formData = getFormdataFromSessionStorage(path)
|
|
216
218
|
const insertComponentPath = formData.elements.length;
|
|
217
|
-
const finalPath = `${path}.elements[${insertComponentPath}]`;
|
|
219
|
+
// const finalPath = `${path}.elements[${insertComponentPath}]`;
|
|
220
|
+
|
|
221
|
+
const finalPath = path ? `${path}.elements[${insertComponentPath}]` : `elements[${insertComponentPath}]`;
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
218
226
|
const copiedData = JSON.parse(sessionStorage.getItem("copiedConfig"));
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
227
|
+
if(!copiedData.Handler){
|
|
228
|
+
store.setNotify({
|
|
229
|
+
FailMessage: "Pasting element not Valid",
|
|
230
|
+
Fail: true,
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
else{
|
|
226
234
|
saveFormdataInSessionStorage(copiedData, finalPath);
|
|
227
|
-
sessionStorage.removeItem('copiedConfig');
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
// }
|
|
235
|
+
// sessionStorage.removeItem('copiedConfig');
|
|
236
|
+
setPage();
|
|
237
|
+
}
|
|
231
238
|
},
|
|
232
239
|
|
|
233
|
-
RemoveItemButton: function(paramStore){
|
|
234
|
-
const schema = cloneDeep(paramStore.schema
|
|
235
|
-
const uiSchema = cloneDeep(paramStore.uiSchema
|
|
240
|
+
RemoveItemButton: function(paramStore = store){
|
|
241
|
+
const schema = cloneDeep(paramStore.schema );
|
|
242
|
+
const uiSchema = cloneDeep(paramStore.uiSchema);
|
|
236
243
|
schema.properties.RemoveItemButton.disabled = true;
|
|
237
244
|
// schema.properties.Paste_Icon.disabled = true;
|
|
245
|
+
sessionStorage.removeItem('copiedConfig');
|
|
238
246
|
|
|
239
247
|
store.setSchema(schema);
|
|
240
248
|
store.setUiSchema(uiSchema);
|