impaktapps-ui-builder 0.0.382-alpha.325 → 0.0.382-alpha.326
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
|
@@ -2,6 +2,9 @@ import _, { isEmpty } from "lodash";
|
|
|
2
2
|
import { doDownload, downloadFile } from "./downloadFile";
|
|
3
3
|
import { executeEvents, executeRefreshHandler } from "./events";
|
|
4
4
|
import { handlersProps } from "./interface";
|
|
5
|
+
|
|
6
|
+
import { debounce } from "lodash";
|
|
7
|
+
|
|
5
8
|
let compType: string;
|
|
6
9
|
let eventGroups: any = {};
|
|
7
10
|
const notifyUiSchema = {
|
|
@@ -64,6 +67,10 @@ export default (funcParams: funcParamsProps) => {
|
|
|
64
67
|
store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
|
|
65
68
|
serviceHolder: { downloadFile,download:doDownload }, eventGroups
|
|
66
69
|
};
|
|
70
|
+
const handleButtonClick = debounce(async function() {
|
|
71
|
+
await this.callHandler("onClick");
|
|
72
|
+
}, 300); // adjust the delay as needed
|
|
73
|
+
|
|
67
74
|
return {
|
|
68
75
|
setPage: async function () {
|
|
69
76
|
funcParams.store.setFormdata({});
|
|
@@ -87,15 +94,18 @@ export default (funcParams: funcParamsProps) => {
|
|
|
87
94
|
funcParams.uiSchema.elements.push(notifyUiSchema);
|
|
88
95
|
funcParams.store.setUiSchema(funcParams.uiSchema);
|
|
89
96
|
|
|
90
|
-
|
|
97
|
+
|
|
91
98
|
await executeRefreshHandler({
|
|
92
99
|
config: {}, componentName: "",
|
|
93
100
|
store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
|
|
94
101
|
serviceHolder: this, eventGroups
|
|
95
102
|
})
|
|
96
103
|
},
|
|
104
|
+
// onClick: async function () {
|
|
105
|
+
// await this.callHandler("onClick")
|
|
106
|
+
// },
|
|
97
107
|
onClick: async function () {
|
|
98
|
-
|
|
108
|
+
handleButtonClick();
|
|
99
109
|
},
|
|
100
110
|
onFileDownload: async function () {
|
|
101
111
|
await this.callHandler("onDownload")
|