impaktapps-ui-builder 0.0.963-CopyComponent.5 → 0.0.963-CopyComponent.6
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 +118 -0
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +15 -15
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/eventSection.d.ts +29 -0
- package/dist/src/impaktapps-ui-builder/builder/services/component.d.ts +2 -0
- package/dist/src/impaktapps-ui-builder/builder/services/event.d.ts +2 -0
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/eventSection.ts +43 -0
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +42 -0
- package/src/impaktapps-ui-builder/builder/services/component.ts +30 -4
- package/src/impaktapps-ui-builder/builder/services/event.ts +30 -1
|
@@ -41,6 +41,8 @@ export declare const EventSection: (theme: any) => {
|
|
|
41
41
|
accessorKey: string;
|
|
42
42
|
header: string;
|
|
43
43
|
widget?: undefined;
|
|
44
|
+
field?: undefined;
|
|
45
|
+
flex?: undefined;
|
|
44
46
|
} | {
|
|
45
47
|
accessorKey: string;
|
|
46
48
|
header: string;
|
|
@@ -64,6 +66,8 @@ export declare const EventSection: (theme: any) => {
|
|
|
64
66
|
};
|
|
65
67
|
accessorKeyName?: undefined;
|
|
66
68
|
};
|
|
69
|
+
field?: undefined;
|
|
70
|
+
flex?: undefined;
|
|
67
71
|
} | {
|
|
68
72
|
accessorKey: string;
|
|
69
73
|
header: string;
|
|
@@ -85,6 +89,31 @@ export declare const EventSection: (theme: any) => {
|
|
|
85
89
|
style?: undefined;
|
|
86
90
|
};
|
|
87
91
|
};
|
|
92
|
+
field?: undefined;
|
|
93
|
+
flex?: undefined;
|
|
94
|
+
} | {
|
|
95
|
+
header: string;
|
|
96
|
+
field: string;
|
|
97
|
+
flex: number;
|
|
98
|
+
widget: {
|
|
99
|
+
type: string;
|
|
100
|
+
scope: string;
|
|
101
|
+
options: {
|
|
102
|
+
widget: string;
|
|
103
|
+
};
|
|
104
|
+
config: {
|
|
105
|
+
main: {
|
|
106
|
+
icon: string;
|
|
107
|
+
onClick: string;
|
|
108
|
+
tooltipMessage: string;
|
|
109
|
+
color?: undefined;
|
|
110
|
+
size?: undefined;
|
|
111
|
+
};
|
|
112
|
+
style?: undefined;
|
|
113
|
+
};
|
|
114
|
+
accessorKeyName?: undefined;
|
|
115
|
+
};
|
|
116
|
+
accessorKey?: undefined;
|
|
88
117
|
})[];
|
|
89
118
|
}[];
|
|
90
119
|
};
|
|
@@ -87,5 +87,7 @@ declare const _default: (store: any, dynamicData: any, submitHandler: any, servi
|
|
|
87
87
|
deleteEvent: () => Promise<void>;
|
|
88
88
|
backHandler: () => void;
|
|
89
89
|
deletePopUpEvent: () => void;
|
|
90
|
+
CopyEvent: () => void;
|
|
91
|
+
PasteEvent: () => void;
|
|
90
92
|
};
|
|
91
93
|
export default _default;
|
package/package.json
CHANGED
|
@@ -98,6 +98,49 @@ export const EventSection = (theme)=>{
|
|
|
98
98
|
},
|
|
99
99
|
},
|
|
100
100
|
},
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
{
|
|
104
|
+
header: "Copy",
|
|
105
|
+
field: "Copy_Event",
|
|
106
|
+
flex: 1,
|
|
107
|
+
widget: {
|
|
108
|
+
type: "Control",
|
|
109
|
+
scope: "#/properties/CopyEvent",
|
|
110
|
+
options: {
|
|
111
|
+
widget: "IconButton",
|
|
112
|
+
},
|
|
113
|
+
config: {
|
|
114
|
+
main: {
|
|
115
|
+
icon: "FileCopyIcon",
|
|
116
|
+
// color: "error",
|
|
117
|
+
onClick: "CopyEvent",
|
|
118
|
+
tooltipMessage: "Reject This Record",
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
|
|
124
|
+
{
|
|
125
|
+
header: "paste",
|
|
126
|
+
field: "Paste_Event",
|
|
127
|
+
flex: 1,
|
|
128
|
+
widget: {
|
|
129
|
+
type: "Control",
|
|
130
|
+
scope: "#/properties/PasteEvent",
|
|
131
|
+
options: {
|
|
132
|
+
widget: "IconButton",
|
|
133
|
+
},
|
|
134
|
+
config: {
|
|
135
|
+
main: {
|
|
136
|
+
icon: "SendIcon",
|
|
137
|
+
// color: "error",
|
|
138
|
+
onClick: "PasteEvent",
|
|
139
|
+
tooltipMessage: "Reject This Record",
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
},
|
|
101
144
|
]
|
|
102
145
|
}]}
|
|
103
146
|
return uiSchema
|
|
@@ -166,6 +166,48 @@ export const EventUiSchema: any = (theme) => {
|
|
|
166
166
|
},
|
|
167
167
|
},
|
|
168
168
|
},
|
|
169
|
+
|
|
170
|
+
{
|
|
171
|
+
header: "Copy",
|
|
172
|
+
field: "Copy_Event2",
|
|
173
|
+
flex: 1,
|
|
174
|
+
widget: {
|
|
175
|
+
type: "Control",
|
|
176
|
+
scope: "#/properties/CopyEvent2",
|
|
177
|
+
options: {
|
|
178
|
+
widget: "IconButton",
|
|
179
|
+
},
|
|
180
|
+
config: {
|
|
181
|
+
main: {
|
|
182
|
+
icon: "FileCopyIcon",
|
|
183
|
+
// color: "error",
|
|
184
|
+
onClick: "CopyEvent",
|
|
185
|
+
tooltipMessage: "Reject This Record",
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
|
|
191
|
+
{
|
|
192
|
+
header: "paste",
|
|
193
|
+
field: "Paste_Event2",
|
|
194
|
+
flex: 1,
|
|
195
|
+
widget: {
|
|
196
|
+
type: "Control",
|
|
197
|
+
scope: "#/properties/PasteEvent2",
|
|
198
|
+
options: {
|
|
199
|
+
widget: "IconButton",
|
|
200
|
+
},
|
|
201
|
+
config: {
|
|
202
|
+
main: {
|
|
203
|
+
icon: "SendIcon",
|
|
204
|
+
// color: "error",
|
|
205
|
+
onClick: "PasteEvent",
|
|
206
|
+
tooltipMessage: "Reject This Record",
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
},
|
|
169
211
|
]
|
|
170
212
|
// }]
|
|
171
213
|
}
|
|
@@ -201,12 +201,38 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
|
|
|
201
201
|
const copiedData = JSON.parse(sessionStorage.getItem("copiedComponent"));
|
|
202
202
|
saveFormdataInSessionStorage(copiedData, finalPath);
|
|
203
203
|
sessionStorage.removeItem('copiedComponent');
|
|
204
|
-
|
|
205
|
-
// const finalPath = `${path}.elements[${store.formData.elements.length}]`
|
|
206
|
-
// store.searchParams.set("path", finalPath)
|
|
207
|
-
// store.setSearchParams(store.searchParams)
|
|
208
204
|
this.setPage();
|
|
209
205
|
|
|
206
|
+
},
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
CopyEvent: function(){
|
|
210
|
+
const rowId = dynamicData.path.split(".")[1];
|
|
211
|
+
const path = store.searchParams?.get("path");
|
|
212
|
+
|
|
213
|
+
// const updatedPath = `${path}.elements[${rowId}]`;
|
|
214
|
+
const updatedPath = path ? `${path}.events[${rowId}]` : `events[${rowId}]`;
|
|
215
|
+
|
|
216
|
+
const formData = getFormdataFromSessionStorage(updatedPath);
|
|
217
|
+
// sessionStorage.setItem('copiedComponent',formData);
|
|
218
|
+
sessionStorage.setItem('copiedComponent',JSON.stringify(formData));
|
|
219
|
+
},
|
|
220
|
+
|
|
221
|
+
PasteEvent: function(){
|
|
222
|
+
const path = store.searchParams?.get("path");
|
|
223
|
+
const rowId = dynamicData.path.split(".")[1];
|
|
224
|
+
// const updatedPath = `${path}.elements[${rowId}]`;
|
|
225
|
+
const updatedPath = path ? `${path}.events[${rowId}]` : `events[${rowId}]`;
|
|
226
|
+
const formData = getFormdataFromSessionStorage(updatedPath)
|
|
227
|
+
const insertComponentPath = formData.elements.length;
|
|
228
|
+
|
|
229
|
+
const finalPath = `${updatedPath}.events[${insertComponentPath}]`;
|
|
230
|
+
|
|
231
|
+
// const copiedData = sessionStorage.getItem('copiedComponent');
|
|
232
|
+
const copiedData = JSON.parse(sessionStorage.getItem("copiedComponent"));
|
|
233
|
+
saveFormdataInSessionStorage(copiedData, finalPath);
|
|
234
|
+
sessionStorage.removeItem('copiedComponent');
|
|
235
|
+
this.setPage();
|
|
210
236
|
}
|
|
211
237
|
|
|
212
238
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EventSchema } from "../elements/UiSchema/event/schema";
|
|
2
2
|
import { EventUiSchema } from "../elements/UiSchema/event/uiSchema";
|
|
3
3
|
import Component from "./component";
|
|
4
|
-
import { okHandler, saveFormdataInSessionStorage, saveHandler } from "./utils";
|
|
4
|
+
import { okHandler, saveFormdataInSessionStorage, saveHandler, getFormdataFromSessionStorage } from "./utils";
|
|
5
5
|
import { APISection } from "../build/uischema/apiSection";
|
|
6
6
|
import { getRadioInputField, getSelectField, getTextArea } from "../build/uischema/buildPropertiesSection";
|
|
7
7
|
import { refreshSectionUiSchema } from "../build/uischema/refresh";
|
|
@@ -138,6 +138,35 @@ export default (
|
|
|
138
138
|
const rowId = dynamicData.path.split(".")[1];
|
|
139
139
|
sessionStorage.setItem('rowId',rowId);
|
|
140
140
|
store.updateDialog("popUpEvent");
|
|
141
|
+
},
|
|
142
|
+
|
|
143
|
+
CopyEvent: function(){
|
|
144
|
+
const rowId = dynamicData.path.split(".")[1];
|
|
145
|
+
const path = store.searchParams?.get("path");
|
|
146
|
+
|
|
147
|
+
// const updatedPath = `${path}.elements[${rowId}]`;
|
|
148
|
+
const updatedPath = path ? `${path}.events[${rowId}]` : `events[${rowId}]`;
|
|
149
|
+
|
|
150
|
+
const formData = getFormdataFromSessionStorage(updatedPath);
|
|
151
|
+
// sessionStorage.setItem('copiedComponent',formData);
|
|
152
|
+
sessionStorage.setItem('copiedComponent',JSON.stringify(formData));
|
|
153
|
+
},
|
|
154
|
+
|
|
155
|
+
PasteEvent: function(){
|
|
156
|
+
const path = store.searchParams?.get("path");
|
|
157
|
+
const rowId = dynamicData.path.split(".")[1];
|
|
158
|
+
// const updatedPath = `${path}.elements[${rowId}]`;
|
|
159
|
+
const updatedPath = path ? `${path}.events[${rowId}]` : `events[${rowId}]`;
|
|
160
|
+
const formData = getFormdataFromSessionStorage(updatedPath)
|
|
161
|
+
const insertComponentPath = formData.elements.length;
|
|
162
|
+
|
|
163
|
+
const finalPath = `${updatedPath}.events[${insertComponentPath}]`;
|
|
164
|
+
|
|
165
|
+
// const copiedData = sessionStorage.getItem('copiedComponent');
|
|
166
|
+
const copiedData = JSON.parse(sessionStorage.getItem("copiedComponent"));
|
|
167
|
+
saveFormdataInSessionStorage(copiedData, finalPath);
|
|
168
|
+
sessionStorage.removeItem('copiedComponent');
|
|
169
|
+
this.setPage();
|
|
141
170
|
}
|
|
142
171
|
}
|
|
143
172
|
};
|