impaktapps-ui-builder 0.0.101-alpha.277 → 0.0.101-alpha.279
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/package.json
CHANGED
|
@@ -61,14 +61,8 @@ export const extractEvents = (eventConfig: any) => {
|
|
|
61
61
|
return eventGroups;
|
|
62
62
|
};
|
|
63
63
|
export default (funcParams: funcParamsProps) => {
|
|
64
|
-
|
|
64
|
+
eventGroups = {}
|
|
65
65
|
const formDataHolder = {}
|
|
66
|
-
if (pageData) {
|
|
67
|
-
if ((!isEmpty(pageData)) && typeof pageData === "object") {
|
|
68
|
-
|
|
69
|
-
// eventGroups = extractEvents(pageData?.config)
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
66
|
let executeEventsParameters: handlersProps = {
|
|
73
67
|
config: {}, componentName: "",
|
|
74
68
|
store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
|
|
@@ -81,19 +75,14 @@ export default (funcParams: funcParamsProps) => {
|
|
|
81
75
|
funcParams.store.setFormdata({});
|
|
82
76
|
funcParams.store.setSchema({ type: "object", properties: {} });
|
|
83
77
|
funcParams.store.newData = {};
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
const uiSchema = newPageData?.uiSchema;
|
|
93
|
-
// const event = new CustomEvent('pageNameChanged', {
|
|
94
|
-
// detail: { pageName: config.label }
|
|
95
|
-
// });
|
|
96
|
-
// window.dispatchEvent(event)
|
|
78
|
+
eventGroups = {};
|
|
79
|
+
pageData = await funcParams.pageDataProvider();
|
|
80
|
+
const config = pageData?.config;
|
|
81
|
+
const uiSchema = pageData?.uiSchema;
|
|
82
|
+
const event = new CustomEvent('pageNameChanged', {
|
|
83
|
+
detail: { pageName: config.label }
|
|
84
|
+
});
|
|
85
|
+
window.dispatchEvent(event)
|
|
97
86
|
const theme = funcParams?.store?.theme?.myTheme;
|
|
98
87
|
uiSchema.elements.push(
|
|
99
88
|
{
|
|
@@ -202,19 +191,18 @@ export default (funcParams: funcParamsProps) => {
|
|
|
202
191
|
}
|
|
203
192
|
);
|
|
204
193
|
const schema = pageData?.schema ?? { type: "object", properties: {} };
|
|
205
|
-
const
|
|
206
|
-
eventGroups =
|
|
194
|
+
const newEventGroups = extractEvents(config);
|
|
195
|
+
eventGroups = newEventGroups;
|
|
207
196
|
executeEventsParameters = {
|
|
208
197
|
config: {}, componentName: "",
|
|
209
198
|
store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
|
|
210
199
|
functionsProvider: funcParams.functionsProvider,
|
|
211
|
-
serviceHolder: this, eventGroups:
|
|
200
|
+
serviceHolder: this, eventGroups: newEventGroups, formDataHolder
|
|
212
201
|
}
|
|
213
|
-
console.log("neweventGroups >> ", neweventGroups, eventGroups)
|
|
214
202
|
await executeRefreshHandler({
|
|
215
203
|
config: {}, componentName: "",
|
|
216
204
|
store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
|
|
217
|
-
serviceHolder: this, eventGroups:
|
|
205
|
+
serviceHolder: this, eventGroups: newEventGroups, formDataHolder: {}
|
|
218
206
|
})
|
|
219
207
|
funcParams.store.setSchema(
|
|
220
208
|
(pre: any) => {
|
|
@@ -226,10 +214,6 @@ export default (funcParams: funcParamsProps) => {
|
|
|
226
214
|
)
|
|
227
215
|
uiSchema.elements.push(notifyUiSchema);
|
|
228
216
|
funcParams.store.setUiSchema(uiSchema);
|
|
229
|
-
sessionStorage.setItem("pagemasterMetaData", JSON.stringify({
|
|
230
|
-
schema: pageData?.schema,
|
|
231
|
-
uiSchema: pageData?.uiSchema, config: pageData?.config
|
|
232
|
-
}))
|
|
233
217
|
},
|
|
234
218
|
onCellRenderer: (cellParams) => {
|
|
235
219
|
if (eventGroups.onCellRenderer) {
|
|
@@ -249,11 +233,9 @@ export default (funcParams: funcParamsProps) => {
|
|
|
249
233
|
return {}
|
|
250
234
|
},
|
|
251
235
|
onClick: function () {
|
|
252
|
-
console.log("clicked button")
|
|
253
236
|
this.callHandler("onClick")
|
|
254
237
|
},
|
|
255
238
|
onMount: function () {
|
|
256
|
-
console.log("omMount")
|
|
257
239
|
this.callHandler("onMount")
|
|
258
240
|
},
|
|
259
241
|
onFileDownload: function () {
|
|
@@ -276,7 +258,6 @@ export default (funcParams: funcParamsProps) => {
|
|
|
276
258
|
return response?.data;
|
|
277
259
|
},
|
|
278
260
|
onPaginationChange: async function (paginationValues) {
|
|
279
|
-
console.log("onPaginationChange")
|
|
280
261
|
const apiBody = [
|
|
281
262
|
{ key: "size", value: paginationValues.pagination.pageSize },
|
|
282
263
|
{ key: "pageIndex", value: paginationValues.pagination.pageIndex },
|
|
@@ -288,7 +269,6 @@ export default (funcParams: funcParamsProps) => {
|
|
|
288
269
|
return response?.data;
|
|
289
270
|
},
|
|
290
271
|
getSelectOptions: async function (param) {
|
|
291
|
-
console.log("getSelectOptions")
|
|
292
272
|
if (param.serachValue !== "" && param.serachValue !== undefined) {
|
|
293
273
|
const apiBody = [
|
|
294
274
|
{ key: "searchValue", value: param.serachValue },
|
|
@@ -299,7 +279,6 @@ export default (funcParams: funcParamsProps) => {
|
|
|
299
279
|
}
|
|
300
280
|
},
|
|
301
281
|
onChange: async function () {
|
|
302
|
-
console.log("onChange")
|
|
303
282
|
if (eventGroups.onChange) {
|
|
304
283
|
const ChangeEventsKeysArray = Object.keys(eventGroups.onChange);
|
|
305
284
|
Promise.all(ChangeEventsKeysArray.map(async (componentName: string) => {
|