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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "0.0.382-alpha.324",
3
+ "version": "0.0.382-alpha.326",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -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
- // funcParams.store.setFormdata({});
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
- (pre: any) => {
77
- return {
78
- ...funcParams.schema, properties:
79
- { ...funcParams.schema.properties, ...pre.properties, }
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
- funcParams.store.setFormdata({});
86
- setTimeout(() => {
87
- executeRefreshHandler({
88
- config: {},
89
- componentName: "",
90
- store: funcParams.store,
91
- dynamicData: funcParams.dynamicData,
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
- await this.callHandler("onClick")
108
+ handleButtonClick();
106
109
  },
107
110
  onFileDownload: async function () {
108
111
  await this.callHandler("onDownload")