impaktapps-ui-builder 0.0.382-alpha.324 → 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,45 +67,45 @@ 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({});
|
|
70
77
|
executeEventsParameters = {
|
|
71
78
|
config: {}, componentName: "",
|
|
72
79
|
store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
|
|
73
80
|
serviceHolder: this, eventGroups
|
|
74
81
|
}
|
|
75
|
-
funcParams.store.setSchema(
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
)
|
|
82
|
+
// funcParams.store.setSchema(
|
|
83
|
+
// (pre: any) => {
|
|
84
|
+
// return {
|
|
85
|
+
// ...funcParams.schema, properties:
|
|
86
|
+
// { ...funcParams.schema.properties, ...pre.properties, }
|
|
87
|
+
// }
|
|
88
|
+
// }
|
|
89
|
+
// )
|
|
90
|
+
funcParams.store.setFormdata({ testKey: 'testValue' });
|
|
91
|
+
console.log("After Setting Specific Value:", funcParams.store.formData);
|
|
92
|
+
|
|
93
|
+
funcParams.store.setSchema(funcParams.schema);
|
|
83
94
|
funcParams.uiSchema.elements.push(notifyUiSchema);
|
|
84
95
|
funcParams.store.setUiSchema(funcParams.uiSchema);
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
userValue: funcParams.userValue,
|
|
93
|
-
service: funcParams.service,
|
|
94
|
-
serviceHolder: this,
|
|
95
|
-
eventGroups,
|
|
96
|
-
});
|
|
97
|
-
}, 5000);
|
|
98
|
-
// await executeRefreshHandler({
|
|
99
|
-
// config: {}, componentName: "",
|
|
100
|
-
// store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
|
|
101
|
-
// serviceHolder: this, eventGroups
|
|
102
|
-
// })
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
await executeRefreshHandler({
|
|
99
|
+
config: {}, componentName: "",
|
|
100
|
+
store: funcParams.store, dynamicData: funcParams.dynamicData, userValue: funcParams.userValue, service: funcParams.service,
|
|
101
|
+
serviceHolder: this, eventGroups
|
|
102
|
+
})
|
|
103
103
|
},
|
|
104
|
+
// onClick: async function () {
|
|
105
|
+
// await this.callHandler("onClick")
|
|
106
|
+
// },
|
|
104
107
|
onClick: async function () {
|
|
105
|
-
|
|
108
|
+
handleButtonClick();
|
|
106
109
|
},
|
|
107
110
|
onFileDownload: async function () {
|
|
108
111
|
await this.callHandler("onDownload")
|