@fewangsit/wangsvue-fats 1.0.0-alpha.112 → 1.0.0-alpha.114

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.
@@ -1,3 +1,4 @@
1
+ import { AxiosResponse } from 'axios';
1
2
  import { DefineComponent, Slot } from 'vue';
2
3
 
3
4
  import {
@@ -36,9 +37,14 @@ export interface MultiSelectFilterField extends MultiSelectProps {
36
37
  field: string;
37
38
  optionField?: string; // @example - actionOptions
38
39
  params?: QueryParams; // Additional QueryParams for the fetchOptionFn
40
+
41
+ /**
42
+ * @param args - The query parameters to be passed to the fetchOptionFn.
43
+ */
39
44
  fetchOptionFn?:
40
45
  | ((args?: any) => Option[] | undefined) // Sync function to fetch options
41
- | ((args?: any) => Promise<Option[] | undefined>); // Async function
46
+ | ((args?: any) => Promise<Option[] | undefined>) // Async function
47
+ | ((args?: any) => Promise<AxiosResponse<FetchOptionResponse<any>>>); // The service method handle fetching options
42
48
  }
43
49
 
44
50
  export interface DropdownFilterField extends DropdownProps {
@@ -102,12 +108,20 @@ export interface CalendarFilterField extends CalendarProps {
102
108
 
103
109
  export type AdditionalFilterField = ButtonSelectTreeFilterField;
104
110
 
105
- export type FilterField =
111
+ export type FilterField = (
106
112
  | AdditionalFilterField
107
113
  | MultiSelectFilterField
108
114
  | DropdownFilterField
109
115
  | RangeNumberFilterField
110
- | CalendarFilterField;
116
+ | CalendarFilterField
117
+ ) & {
118
+ /**
119
+ * Filter field visibility
120
+ *
121
+ * You dont need manually filter, this component already handle it.
122
+ */
123
+ visible?: boolean;
124
+ };
111
125
 
112
126
  export type FilterOptions<Opt = Record<string, boolean>> = Record<
113
127
  keyof Opt,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fewangsit/wangsvue-fats",
3
- "version": "1.0.0-alpha.112",
3
+ "version": "1.0.0-alpha.114",
4
4
  "author": "Wangsit FE Developer",
5
5
  "description": "Fixed Asset Tagsamurai VueJS Component Library",
6
6
  "type": "module",