impaktapps-ui-builder 0.0.963-CopyComponent.1 → 0.0.963-CopyComponent.2
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 +61 -2
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +9 -9
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/tableSection.d.ts +21 -0
- package/dist/src/impaktapps-ui-builder/builder/services/component.d.ts +2 -0
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/tableSection.ts +44 -1
- package/src/impaktapps-ui-builder/builder/services/component.ts +29 -0
- package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +2 -1
|
@@ -87,6 +87,27 @@ export declare const TableSection: (theme: any) => {
|
|
|
87
87
|
};
|
|
88
88
|
};
|
|
89
89
|
accessorKey?: undefined;
|
|
90
|
+
} | {
|
|
91
|
+
header: string;
|
|
92
|
+
field: string;
|
|
93
|
+
flex: number;
|
|
94
|
+
widget: {
|
|
95
|
+
type: string;
|
|
96
|
+
scope: string;
|
|
97
|
+
options: {
|
|
98
|
+
widget: string;
|
|
99
|
+
};
|
|
100
|
+
config: {
|
|
101
|
+
main: {
|
|
102
|
+
icon: string;
|
|
103
|
+
onClick: string;
|
|
104
|
+
tooltipMessage: string;
|
|
105
|
+
color?: undefined;
|
|
106
|
+
};
|
|
107
|
+
style?: undefined;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
accessorKey?: undefined;
|
|
90
111
|
})[];
|
|
91
112
|
}[];
|
|
92
113
|
};
|
|
@@ -16,5 +16,7 @@ declare const _default: (store: any, dynamicData: any, submitHandler: any, servi
|
|
|
16
16
|
backHandler: () => void;
|
|
17
17
|
deletePopUpComponent: () => void;
|
|
18
18
|
deletePopUpEvent: () => void;
|
|
19
|
+
CopyComponent: () => void;
|
|
20
|
+
PasteComponent: () => void;
|
|
19
21
|
};
|
|
20
22
|
export default _default;
|
package/package.json
CHANGED
|
@@ -95,7 +95,50 @@ export const TableSection = (theme) => {
|
|
|
95
95
|
},
|
|
96
96
|
},
|
|
97
97
|
},
|
|
98
|
-
}
|
|
98
|
+
},
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
{
|
|
102
|
+
header: "Copy",
|
|
103
|
+
field: "Copy_Component2",
|
|
104
|
+
flex: 1,
|
|
105
|
+
widget: {
|
|
106
|
+
type: "Control",
|
|
107
|
+
scope: "#/properties/CopyComponent2",
|
|
108
|
+
options: {
|
|
109
|
+
widget: "IconButton",
|
|
110
|
+
},
|
|
111
|
+
config: {
|
|
112
|
+
main: {
|
|
113
|
+
icon: "FileCopyIcon",
|
|
114
|
+
// color: "error",
|
|
115
|
+
onClick: "CopyComponent",
|
|
116
|
+
tooltipMessage: "Reject This Record",
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
|
|
122
|
+
{
|
|
123
|
+
header: "paste",
|
|
124
|
+
field: "Paste_Component2",
|
|
125
|
+
flex: 1,
|
|
126
|
+
widget: {
|
|
127
|
+
type: "Control",
|
|
128
|
+
scope: "#/properties/PasteComponent2",
|
|
129
|
+
options: {
|
|
130
|
+
widget: "IconButton",
|
|
131
|
+
},
|
|
132
|
+
config: {
|
|
133
|
+
main: {
|
|
134
|
+
icon: "SendIcon",
|
|
135
|
+
// color: "error",
|
|
136
|
+
onClick: "PasteComponent",
|
|
137
|
+
tooltipMessage: "Reject This Record",
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
},
|
|
99
142
|
]
|
|
100
143
|
}]
|
|
101
144
|
}
|
|
@@ -172,5 +172,34 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
172
172
|
sessionStorage.setItem('rowId',rowId);
|
|
173
173
|
store.updateDialog("popUpEventSection");
|
|
174
174
|
},
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
CopyComponent: function(){
|
|
178
|
+
const rowId = dynamicData.path.split(".")[1];
|
|
179
|
+
const path = store.searchParams?.get("path");
|
|
180
|
+
|
|
181
|
+
// const updatedPath = `${path}.elements[${rowId}]`;
|
|
182
|
+
const updatedPath = path ? `${path}.elements[${rowId}]` : `elements[${rowId}]`;
|
|
183
|
+
|
|
184
|
+
const formData = getFormdataFromSessionStorage(updatedPath);
|
|
185
|
+
sessionStorage.setItem('copiedComponent',formData);
|
|
186
|
+
|
|
187
|
+
},
|
|
188
|
+
|
|
189
|
+
PasteComponent: function(){
|
|
190
|
+
const path = store.searchParams?.get("path");
|
|
191
|
+
const rowId = dynamicData.path.split(".")[1];
|
|
192
|
+
const updatedPath = `${path}.elements[${rowId}]`;
|
|
193
|
+
const formData = getFormdataFromSessionStorage(updatedPath)
|
|
194
|
+
const insertComponentPath = formData.elements.length;
|
|
195
|
+
|
|
196
|
+
const finalPath = `${updatedPath}.elements[${insertComponentPath}]`;
|
|
197
|
+
|
|
198
|
+
const copiedData = sessionStorage.getItem('copiedComponent');
|
|
199
|
+
saveFormdataInSessionStorage(copiedData, finalPath);
|
|
200
|
+
sessionStorage.removeItem('copiedComponent')
|
|
201
|
+
|
|
202
|
+
}
|
|
203
|
+
|
|
175
204
|
}
|
|
176
205
|
};
|
|
@@ -106,8 +106,9 @@ export default (funcParams: funcParamsProps) => {
|
|
|
106
106
|
const rowId = dynamicData.path.split(".")[1];
|
|
107
107
|
const path = store.searchParams?.get("path");
|
|
108
108
|
const id = store.searchParams?.get("id");
|
|
109
|
+
const updatedPath = path ? `${path}.elements[${rowId}]` : `elements[${rowId}]`;
|
|
109
110
|
|
|
110
|
-
const formData = getFormdataFromSessionStorage(
|
|
111
|
+
const formData = getFormdataFromSessionStorage(updatedPath);
|
|
111
112
|
sessionStorage.setItem('copiedComponent',formData);
|
|
112
113
|
|
|
113
114
|
},
|