impaktapps-ui-builder 0.0.963-CopyComponent.6 → 0.0.963-CopyComponent.7
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 +177 -105
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +12 -12
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/eventSection.d.ts +23 -2
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/tableSection.d.ts +24 -3
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/eventSection.ts +24 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/tableSection.ts +28 -23
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +70 -22
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +26 -24
- package/src/impaktapps-ui-builder/builder/services/component.ts +97 -32
- package/src/impaktapps-ui-builder/builder/services/event.ts +6 -14
- package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +45 -17
|
@@ -102,34 +102,62 @@ export default (funcParams: funcParamsProps) => {
|
|
|
102
102
|
store.updateDialog("popUpPageMasterEvent");
|
|
103
103
|
},
|
|
104
104
|
|
|
105
|
+
|
|
105
106
|
CopyComponent: function(){
|
|
106
107
|
const rowId = dynamicData.path.split(".")[1];
|
|
107
|
-
const
|
|
108
|
-
const
|
|
109
|
-
const updatedPath = path ? `${path}.elements[${rowId}]` : `elements[${rowId}]`;
|
|
108
|
+
const parentPathOfCopiedComponent = store.searchParams?.get("path");
|
|
109
|
+
const copiedComponentPath = parentPathOfCopiedComponent ? `${parentPathOfCopiedComponent}.elements[${rowId}]` : `elements[${rowId}]`;
|
|
110
110
|
|
|
111
|
-
const formData = getFormdataFromSessionStorage(
|
|
112
|
-
sessionStorage.setItem('
|
|
111
|
+
const formData = getFormdataFromSessionStorage(copiedComponentPath);
|
|
112
|
+
sessionStorage.setItem('copiedConfig',JSON.stringify(formData));
|
|
113
113
|
|
|
114
114
|
},
|
|
115
|
-
|
|
115
|
+
|
|
116
116
|
PasteComponent: function(){
|
|
117
117
|
const path = store.searchParams?.get("path");
|
|
118
|
-
const
|
|
119
|
-
// const updatedPath = `${path}.elements[${rowId}]`;
|
|
120
|
-
const updatedPath = path ? `${path}.elements[${rowId}]` : `elements[${rowId}]`;
|
|
121
|
-
const formData = getFormdataFromSessionStorage(updatedPath)
|
|
118
|
+
const formData = getFormdataFromSessionStorage(path)
|
|
122
119
|
const insertComponentPath = formData.elements.length;
|
|
123
120
|
|
|
124
|
-
const finalPath = `${
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
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
|
+
}
|
|
128
129
|
saveFormdataInSessionStorage(copiedData, finalPath);
|
|
129
|
-
sessionStorage.removeItem('
|
|
130
|
-
|
|
130
|
+
sessionStorage.removeItem('copiedConfig');
|
|
131
131
|
this.setPage();
|
|
132
|
-
|
|
133
132
|
}
|
|
133
|
+
|
|
134
|
+
// CopyComponent: function(){
|
|
135
|
+
// const rowId = dynamicData.path.split(".")[1];
|
|
136
|
+
// const path = store.searchParams?.get("path");
|
|
137
|
+
// const id = store.searchParams?.get("id");
|
|
138
|
+
// const updatedPath = path ? `${path}.elements[${rowId}]` : `elements[${rowId}]`;
|
|
139
|
+
|
|
140
|
+
// const formData = getFormdataFromSessionStorage(updatedPath);
|
|
141
|
+
// sessionStorage.setItem('copiedComponent',JSON.stringify(formData));
|
|
142
|
+
|
|
143
|
+
// },
|
|
144
|
+
|
|
145
|
+
// PasteComponent: function(){
|
|
146
|
+
// const path = store.searchParams?.get("path");
|
|
147
|
+
// const rowId = dynamicData.path.split(".")[1];
|
|
148
|
+
// // const updatedPath = `${path}.elements[${rowId}]`;
|
|
149
|
+
// const updatedPath = path ? `${path}.elements[${rowId}]` : `elements[${rowId}]`;
|
|
150
|
+
// const formData = getFormdataFromSessionStorage(updatedPath)
|
|
151
|
+
// const insertComponentPath = formData.elements.length;
|
|
152
|
+
|
|
153
|
+
// const finalPath = `${updatedPath}.elements[${insertComponentPath}]`;
|
|
154
|
+
|
|
155
|
+
// // const copiedData = sessionStorage.getItem('copiedComponent');
|
|
156
|
+
// const copiedData = JSON.parse(sessionStorage.getItem("copiedComponent"));
|
|
157
|
+
// saveFormdataInSessionStorage(copiedData, finalPath);
|
|
158
|
+
// sessionStorage.removeItem('copiedComponent');
|
|
159
|
+
|
|
160
|
+
// this.setPage();
|
|
161
|
+
// }
|
|
134
162
|
}
|
|
135
163
|
};
|