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
|
@@ -406,7 +406,7 @@ const PageMasterUiSchema = (theme) => {
|
|
|
406
406
|
{
|
|
407
407
|
type: "HorizontalLayout",
|
|
408
408
|
config: {
|
|
409
|
-
layout: { xs: 12, sm:
|
|
409
|
+
layout: { xs: 12, sm: 9 }
|
|
410
410
|
},
|
|
411
411
|
elements: [
|
|
412
412
|
{
|
|
@@ -418,13 +418,13 @@ const PageMasterUiSchema = (theme) => {
|
|
|
418
418
|
config: {
|
|
419
419
|
layout: { xs: 1, sm: 1 },
|
|
420
420
|
main: {
|
|
421
|
-
onClick: "
|
|
421
|
+
onClick: "RemoveItemButton",
|
|
422
422
|
size: "large",
|
|
423
423
|
icon: "RejectIcon",
|
|
424
424
|
styleDefault: true
|
|
425
425
|
},
|
|
426
426
|
style: {
|
|
427
|
-
marginLeft: "-
|
|
427
|
+
marginLeft: "-5px"
|
|
428
428
|
}
|
|
429
429
|
}
|
|
430
430
|
},
|
|
@@ -440,8 +440,8 @@ const PageMasterUiSchema = (theme) => {
|
|
|
440
440
|
heading: "No element copied"
|
|
441
441
|
},
|
|
442
442
|
style: {
|
|
443
|
-
color: "#
|
|
444
|
-
marginLeft: "-
|
|
443
|
+
color: "#535557",
|
|
444
|
+
marginLeft: "-30px"
|
|
445
445
|
}
|
|
446
446
|
}
|
|
447
447
|
},
|
|
@@ -6917,7 +6917,7 @@ const componentBasicUiSchema = (theme) => {
|
|
|
6917
6917
|
config: {
|
|
6918
6918
|
layout: { xs: 1, sm: 1 },
|
|
6919
6919
|
main: {
|
|
6920
|
-
onClick: "
|
|
6920
|
+
onClick: "RemoveItemButton",
|
|
6921
6921
|
size: "large",
|
|
6922
6922
|
icon: "RejectIcon",
|
|
6923
6923
|
styleDefault: true
|
|
@@ -8434,8 +8434,8 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
8434
8434
|
Fail: true
|
|
8435
8435
|
});
|
|
8436
8436
|
} else {
|
|
8437
|
-
const schema2 = lodash.exports.cloneDeep(paramStore.schema
|
|
8438
|
-
const uiSchema = lodash.exports.cloneDeep(paramStore.uiSchema
|
|
8437
|
+
const schema2 = lodash.exports.cloneDeep(paramStore.schema);
|
|
8438
|
+
const uiSchema = lodash.exports.cloneDeep(paramStore.uiSchema);
|
|
8439
8439
|
schema2.properties.RemoveItemButton.disabled = false;
|
|
8440
8440
|
const rowId = dynamicData2.path.split(".")[1];
|
|
8441
8441
|
const parentPathOfCopiedComponent = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
@@ -8447,21 +8447,29 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
8447
8447
|
store2.setUiSchema(uiSchema);
|
|
8448
8448
|
}
|
|
8449
8449
|
},
|
|
8450
|
-
PasteComponent: function(paramStore = store2) {
|
|
8450
|
+
PasteComponent: function(paramStore = store2, setPage = this.setPage) {
|
|
8451
8451
|
var _a;
|
|
8452
8452
|
const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
8453
|
+
dynamicData2.path.split(".")[1];
|
|
8453
8454
|
const formData = getFormdataFromSessionStorage(path);
|
|
8454
8455
|
const insertComponentPath = formData.elements.length;
|
|
8455
|
-
const finalPath = `${path}.elements[${insertComponentPath}]`;
|
|
8456
|
+
const finalPath = path ? `${path}.elements[${insertComponentPath}]` : `elements[${insertComponentPath}]`;
|
|
8456
8457
|
const copiedData = JSON.parse(sessionStorage.getItem("copiedConfig"));
|
|
8457
|
-
|
|
8458
|
-
|
|
8459
|
-
|
|
8458
|
+
if (!copiedData.Handler) {
|
|
8459
|
+
store2.setNotify({
|
|
8460
|
+
FailMessage: "Pasting element not Valid",
|
|
8461
|
+
Fail: true
|
|
8462
|
+
});
|
|
8463
|
+
} else {
|
|
8464
|
+
saveFormdataInSessionStorage(copiedData, finalPath);
|
|
8465
|
+
setPage();
|
|
8466
|
+
}
|
|
8460
8467
|
},
|
|
8461
|
-
RemoveItemButton: function(paramStore) {
|
|
8462
|
-
const schema2 = lodash.exports.cloneDeep(paramStore.schema
|
|
8463
|
-
const uiSchema = lodash.exports.cloneDeep(paramStore.uiSchema
|
|
8468
|
+
RemoveItemButton: function(paramStore = store2) {
|
|
8469
|
+
const schema2 = lodash.exports.cloneDeep(paramStore.schema);
|
|
8470
|
+
const uiSchema = lodash.exports.cloneDeep(paramStore.uiSchema);
|
|
8464
8471
|
schema2.properties.RemoveItemButton.disabled = true;
|
|
8472
|
+
sessionStorage.removeItem("copiedConfig");
|
|
8465
8473
|
store2.setSchema(schema2);
|
|
8466
8474
|
store2.setUiSchema(uiSchema);
|
|
8467
8475
|
},
|