impaktapps-ui-builder 0.0.963-copyElement.1002 → 0.0.963-copyElement.1003
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 +15 -15
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +1 -1
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/services/component.d.ts +3 -3
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/services/component.ts +7 -7
|
@@ -8426,36 +8426,36 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
8426
8426
|
sessionStorage.setItem("rowId", rowId);
|
|
8427
8427
|
store2.updateDialog("popUpEventSection");
|
|
8428
8428
|
},
|
|
8429
|
-
CopyComponent: function(
|
|
8429
|
+
CopyComponent: function(paramStore) {
|
|
8430
8430
|
var _a;
|
|
8431
8431
|
if (sessionStorage.getItem("copiedConfig")) {
|
|
8432
|
-
|
|
8432
|
+
store2.setNotify({
|
|
8433
8433
|
FailMessage: "Element already copied. Cancel to copy again.",
|
|
8434
8434
|
Fail: true
|
|
8435
8435
|
});
|
|
8436
8436
|
} else {
|
|
8437
|
-
const schema2 = lodash.exports.cloneDeep(
|
|
8438
|
-
const uiSchema = lodash.exports.cloneDeep(
|
|
8437
|
+
const schema2 = lodash.exports.cloneDeep(paramStore.schema || store2.schema);
|
|
8438
|
+
const uiSchema = lodash.exports.cloneDeep(paramStore.uiSchema || store2.uiSchema);
|
|
8439
8439
|
schema2.properties.RemoveItemButton.disabled = false;
|
|
8440
8440
|
const rowId = dynamicData2.path.split(".")[1];
|
|
8441
|
-
const parentPathOfCopiedComponent = (_a =
|
|
8441
|
+
const parentPathOfCopiedComponent = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
8442
8442
|
const copiedComponentPath = parentPathOfCopiedComponent ? `${parentPathOfCopiedComponent}.elements[${rowId}]` : `elements[${rowId}]`;
|
|
8443
8443
|
const formData = getFormdataFromSessionStorage(copiedComponentPath);
|
|
8444
8444
|
uiSchema.elements[4].config.main.heading = `Copied Element: ${formData.name}`;
|
|
8445
8445
|
sessionStorage.setItem("copiedConfig", JSON.stringify(formData));
|
|
8446
|
-
|
|
8447
|
-
|
|
8446
|
+
store2.setSchema(schema2);
|
|
8447
|
+
store2.setUiSchema(uiSchema);
|
|
8448
8448
|
}
|
|
8449
8449
|
},
|
|
8450
|
-
PasteComponent: function(
|
|
8450
|
+
PasteComponent: function(paramStore) {
|
|
8451
8451
|
var _a;
|
|
8452
|
-
const path = (_a =
|
|
8452
|
+
const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
8453
8453
|
const formData = getFormdataFromSessionStorage(path);
|
|
8454
8454
|
const insertComponentPath = formData.elements.length;
|
|
8455
8455
|
const finalPath = `${path}.elements[${insertComponentPath}]`;
|
|
8456
8456
|
const copiedData = JSON.parse(sessionStorage.getItem("copiedConfig"));
|
|
8457
8457
|
if (!copiedData.elements) {
|
|
8458
|
-
|
|
8458
|
+
store2.setNotify({
|
|
8459
8459
|
FailMessage: "Pasting element not Valid",
|
|
8460
8460
|
Fail: true
|
|
8461
8461
|
});
|
|
@@ -8465,12 +8465,12 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
8465
8465
|
this.setPage();
|
|
8466
8466
|
}
|
|
8467
8467
|
},
|
|
8468
|
-
RemoveItemButton: function(
|
|
8469
|
-
const schema2 = lodash.exports.cloneDeep(
|
|
8470
|
-
const uiSchema = lodash.exports.cloneDeep(
|
|
8468
|
+
RemoveItemButton: function(paramStore) {
|
|
8469
|
+
const schema2 = lodash.exports.cloneDeep(paramStore.schema || store2.schema);
|
|
8470
|
+
const uiSchema = lodash.exports.cloneDeep(paramStore.uiSchema || store2.uiSchema);
|
|
8471
8471
|
schema2.properties.RemoveItemButton.disabled = true;
|
|
8472
|
-
|
|
8473
|
-
|
|
8472
|
+
store2.setSchema(schema2);
|
|
8473
|
+
store2.setUiSchema(uiSchema);
|
|
8474
8474
|
},
|
|
8475
8475
|
CopyEvent: function(store22) {
|
|
8476
8476
|
var _a;
|