eco-vue-js 0.4.15 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. package/dist/components/Button/WButtonAction.vue.js +1 -0
  2. package/dist/components/InfiniteList/WInfiniteList.vue.d.ts +16 -13
  3. package/dist/components/InfiniteList/WInfiniteList.vue.d.ts.map +1 -1
  4. package/dist/components/InfiniteList/WInfiniteList.vue.js +4 -2
  5. package/dist/components/InfiniteList/WInfiniteListPages.vue.d.ts +16 -13
  6. package/dist/components/InfiniteList/WInfiniteListPages.vue.d.ts.map +1 -1
  7. package/dist/components/InfiniteList/WInfiniteListPages.vue.js +4 -2
  8. package/dist/components/InfiniteList/components/InfiniteListPage.vue.d.ts +10 -7
  9. package/dist/components/InfiniteList/components/InfiniteListPage.vue.d.ts.map +1 -1
  10. package/dist/components/InfiniteList/components/InfiniteListPage.vue.js +5 -3
  11. package/dist/components/InfiniteList/components/InfiniteListPageTitle.vue.d.ts +29 -17
  12. package/dist/components/InfiniteList/components/InfiniteListPageTitle.vue.d.ts.map +1 -1
  13. package/dist/components/InfiniteList/components/InfiniteListPageTitle.vue.js +1 -1
  14. package/dist/components/InfiniteList/use/useInfiniteListHeader.js +1 -0
  15. package/dist/components/Select/WSelectAsync.vue.d.ts +7 -4
  16. package/dist/components/Select/WSelectAsync.vue.d.ts.map +1 -1
  17. package/dist/components/Select/WSelectAsync.vue.js +4 -2
  18. package/dist/components/Select/WSelectAsyncList.vue.d.ts +10 -7
  19. package/dist/components/Select/WSelectAsyncList.vue.d.ts.map +1 -1
  20. package/dist/components/Select/WSelectAsyncList.vue.js +4 -2
  21. package/dist/components/Select/WSelectAsyncSingle.vue.d.ts +7 -4
  22. package/dist/components/Select/WSelectAsyncSingle.vue.d.ts.map +1 -1
  23. package/dist/components/Select/WSelectAsyncSingle.vue.js +4 -2
  24. package/dist/components/Select/components/SelectAsyncList.vue.d.ts +10 -7
  25. package/dist/components/Select/components/SelectAsyncList.vue.d.ts.map +1 -1
  26. package/dist/components/Select/components/SelectAsyncList.vue.js +4 -2
  27. package/dist/components/Select/components/SelectAsyncPrefix.vue.d.ts +7 -4
  28. package/dist/components/Select/components/SelectAsyncPrefix.vue.d.ts.map +1 -1
  29. package/dist/components/Select/components/SelectAsyncPrefix.vue.js +4 -2
  30. package/dist/components/Select/components/SelectAsyncPrefixPage.vue.d.ts +7 -4
  31. package/dist/components/Select/components/SelectAsyncPrefixPage.vue.d.ts.map +1 -1
  32. package/dist/components/Select/components/SelectAsyncPrefixPage.vue.js +3 -1
  33. package/dist/main.d.ts +1 -0
  34. package/dist/main.d.ts.map +1 -1
  35. package/dist/main.js +1 -0
  36. package/dist/types/global.d.ts +11 -9
  37. package/dist/utils/useDefaultQuery.d.ts +7 -0
  38. package/dist/utils/useDefaultQuery.d.ts.map +1 -0
  39. package/dist/utils/useDefaultQuery.js +12 -0
  40. package/package.json +4 -1
@@ -7,6 +7,7 @@ import '../../utils/supportsPassive.js';
7
7
  import '../Dropdown/utils/DropdownStyle.js';
8
8
  import '../../utils/Modal.js';
9
9
  import '../Link/WLink.vue.js';
10
+ import '@tanstack/vue-query';
10
11
 
11
12
  const _hoisted_1 = { class: "font-normal text-center md:text-base text-[0.625rem] whitespace-nowrap" };
12
13
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -1,15 +1,15 @@
1
- declare const _default: <Model extends string | number, Data extends DefaultData>(__VLS_props: {
1
+ declare const _default: <Model extends string | number, Data extends DefaultData, ApiError, QueryParams>(__VLS_props: {
2
2
  transition?: boolean | undefined;
3
3
  valueGetter?: ((data: Data) => Model) | undefined;
4
4
  wrap?: boolean | undefined;
5
5
  "onUpdate:count"?: ((value: number) => any) | undefined;
6
6
  scrollingElement?: Element | null | undefined;
7
- queryParams: QueryParams;
8
7
  "onUpdate:selected"?: ((values: Model[]) => any) | undefined;
8
+ queryParams: QueryParams;
9
9
  selected?: Model[] | undefined;
10
10
  selectOnly?: boolean | undefined;
11
11
  unselectOnly?: boolean | undefined;
12
- useQueryFn: UsePaginatedQuery<Data>;
12
+ useQueryFn: UseQueryPaginated<Data, ApiError, QueryParams>;
13
13
  isInvalidPage: (error: unknown) => boolean;
14
14
  skeletonLength?: number | undefined;
15
15
  hidePageTitle?: boolean | undefined;
@@ -20,11 +20,12 @@ declare const _default: <Model extends string | number, Data extends DefaultData
20
20
  minHeight?: boolean | undefined;
21
21
  pageClass?: string | undefined;
22
22
  refetchInterval?: number | false | undefined;
23
+ queryOptions?: Partial<Parameters<UseQueryPaginated<Data, ApiError, QueryParams>>[1]>;
24
+ maxPages?: number | undefined;
23
25
  "onUpdate:page"?: ((value: number | undefined) => any) | undefined;
24
26
  skipScrollTarget?: boolean | undefined;
25
27
  pageLength?: number | undefined;
26
- excludeParams?: string[] | undefined;
27
- maxPages?: number | undefined;
28
+ excludeParams?: (keyof QueryParams)[] | undefined;
28
29
  "onUpdate:header-padding"?: ((value: number) => any) | undefined;
29
30
  headerMargin?: number | undefined;
30
31
  headerTopIgnore?: boolean | undefined;
@@ -72,12 +73,12 @@ declare const _default: <Model extends string | number, Data extends DefaultData
72
73
  wrap?: boolean | undefined;
73
74
  "onUpdate:count"?: ((value: number) => any) | undefined;
74
75
  scrollingElement?: Element | null | undefined;
75
- queryParams: QueryParams;
76
76
  "onUpdate:selected"?: ((values: Model[]) => any) | undefined;
77
+ queryParams: QueryParams;
77
78
  selected?: Model[] | undefined;
78
79
  selectOnly?: boolean | undefined;
79
80
  unselectOnly?: boolean | undefined;
80
- useQueryFn: UsePaginatedQuery<Data>;
81
+ useQueryFn: UseQueryPaginated<Data, ApiError, QueryParams>;
81
82
  isInvalidPage: (error: unknown) => boolean;
82
83
  skeletonLength?: number | undefined;
83
84
  hidePageTitle?: boolean | undefined;
@@ -88,11 +89,12 @@ declare const _default: <Model extends string | number, Data extends DefaultData
88
89
  minHeight?: boolean | undefined;
89
90
  pageClass?: string | undefined;
90
91
  refetchInterval?: number | false | undefined;
92
+ queryOptions?: Partial<Parameters<UseQueryPaginated<Data, ApiError, QueryParams>>[1]>;
93
+ maxPages?: number | undefined;
91
94
  "onUpdate:page"?: ((value: number | undefined) => any) | undefined;
92
95
  skipScrollTarget?: boolean | undefined;
93
96
  pageLength?: number | undefined;
94
- excludeParams?: string[] | undefined;
95
- maxPages?: number | undefined;
97
+ excludeParams?: (keyof QueryParams)[] | undefined;
96
98
  "onUpdate:header-padding"?: ((value: number) => any) | undefined;
97
99
  headerMargin?: number | undefined;
98
100
  headerTopIgnore?: boolean | undefined;
@@ -144,12 +146,12 @@ declare const _default: <Model extends string | number, Data extends DefaultData
144
146
  wrap?: boolean | undefined;
145
147
  "onUpdate:count"?: ((value: number) => any) | undefined;
146
148
  scrollingElement?: Element | null | undefined;
147
- queryParams: QueryParams;
148
149
  "onUpdate:selected"?: ((values: Model[]) => any) | undefined;
150
+ queryParams: QueryParams;
149
151
  selected?: Model[] | undefined;
150
152
  selectOnly?: boolean | undefined;
151
153
  unselectOnly?: boolean | undefined;
152
- useQueryFn: UsePaginatedQuery<Data>;
154
+ useQueryFn: UseQueryPaginated<Data, ApiError, QueryParams>;
153
155
  isInvalidPage: (error: unknown) => boolean;
154
156
  skeletonLength?: number | undefined;
155
157
  hidePageTitle?: boolean | undefined;
@@ -160,11 +162,12 @@ declare const _default: <Model extends string | number, Data extends DefaultData
160
162
  minHeight?: boolean | undefined;
161
163
  pageClass?: string | undefined;
162
164
  refetchInterval?: number | false | undefined;
165
+ queryOptions?: Partial<Parameters<UseQueryPaginated<Data, ApiError, QueryParams>>[1]>;
166
+ maxPages?: number | undefined;
163
167
  "onUpdate:page"?: ((value: number | undefined) => any) | undefined;
164
168
  skipScrollTarget?: boolean | undefined;
165
169
  pageLength?: number | undefined;
166
- excludeParams?: string[] | undefined;
167
- maxPages?: number | undefined;
170
+ excludeParams?: (keyof QueryParams)[] | undefined;
168
171
  "onUpdate:header-padding"?: ((value: number) => any) | undefined;
169
172
  headerMargin?: number | undefined;
170
173
  headerTopIgnore?: boolean | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"WInf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AAG,IAAI;;;;AAtD/C,wBA6S2E;AAQ3E,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -29,7 +29,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
29
29
  pageClass: { default: void 0 },
30
30
  maxPages: { default: void 0 },
31
31
  refetchInterval: { type: [Number, Boolean], default: void 0 },
32
- valueGetter: { type: Function, default: (item) => item.id }
32
+ valueGetter: { type: Function, default: (item) => item.id },
33
+ queryOptions: {}
33
34
  },
34
35
  emits: ["update:page", "update:header-padding", "update:count", "update:selected"],
35
36
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -104,6 +105,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
104
105
  "max-pages": _ctx.maxPages,
105
106
  "refetch-interval": _ctx.refetchInterval,
106
107
  "value-getter": _ctx.valueGetter,
108
+ "query-options": _ctx.queryOptions,
107
109
  "onUpdate:count": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:count", $event)),
108
110
  "onUpdate:selected": _cache[1] || (_cache[1] = ($event) => _ctx.$emit("update:selected", $event)),
109
111
  "onUpdate:page": _cache[2] || (_cache[2] = ($event) => _ctx.$emit("update:page", $event))
@@ -122,7 +124,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
122
124
  })
123
125
  ]),
124
126
  _: 3
125
- }, 8, ["query-params", "use-query-fn", "is-invalid-page", "scrolling-element", "skip-scroll-target", "skeleton-length", "hide-page-title", "selected", "wrap", "no-gap", "transition", "page-length", "header-top", "header-height", "min-height", "exclude-params", "empty-stub", "select-only", "unselect-only", "reverse-selection", "allow-page-selection", "page-class", "max-pages", "refetch-interval", "value-getter"])
127
+ }, 8, ["query-params", "use-query-fn", "is-invalid-page", "scrolling-element", "skip-scroll-target", "skeleton-length", "hide-page-title", "selected", "wrap", "no-gap", "transition", "page-length", "header-top", "header-height", "min-height", "exclude-params", "empty-stub", "select-only", "unselect-only", "reverse-selection", "allow-page-selection", "page-class", "max-pages", "refetch-interval", "value-getter", "query-options"])
126
128
  ], 64);
127
129
  };
128
130
  }
@@ -1,15 +1,15 @@
1
- declare const _default: <Model extends string | number, Data extends DefaultData>(__VLS_props: {
1
+ declare const _default: <Model extends string | number, Data extends DefaultData, ApiError, QueryParams>(__VLS_props: {
2
2
  transition?: boolean | undefined;
3
3
  valueGetter: (data: Data) => Model;
4
4
  wrap?: boolean | undefined;
5
5
  "onUpdate:count"?: ((value: number) => any) | undefined;
6
6
  scrollingElement?: Element | null | undefined;
7
- queryParams: QueryParams;
8
7
  "onUpdate:selected"?: ((values: Model[]) => any) | undefined;
8
+ queryParams: QueryParams;
9
9
  selected?: Model[] | undefined;
10
10
  selectOnly?: boolean | undefined;
11
11
  unselectOnly?: boolean | undefined;
12
- useQueryFn: UsePaginatedQuery<Data>;
12
+ useQueryFn: UseQueryPaginated<Data, ApiError, QueryParams>;
13
13
  isInvalidPage: (error: unknown) => boolean;
14
14
  skeletonLength?: number | undefined;
15
15
  hidePageTitle?: boolean | undefined;
@@ -20,13 +20,14 @@ declare const _default: <Model extends string | number, Data extends DefaultData
20
20
  minHeight?: boolean | undefined;
21
21
  pageClass?: string | undefined;
22
22
  refetchInterval?: number | false | undefined;
23
+ queryOptions?: Partial<Parameters<UseQueryPaginated<Data, ApiError, QueryParams>>[1]>;
24
+ maxPages?: number | undefined;
23
25
  "onUpdate:page"?: ((value: number | undefined) => any) | undefined;
24
26
  skipScrollTarget?: boolean | undefined;
25
27
  pageLength?: number | undefined;
26
28
  headerTop?: number | undefined;
27
29
  headerHeight?: number | undefined;
28
- excludeParams?: string[] | undefined;
29
- maxPages?: number | undefined;
30
+ excludeParams?: (keyof QueryParams)[] | undefined;
30
31
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, __VLS_ctx?: {
31
32
  attrs: any;
32
33
  slots: Readonly<{
@@ -68,12 +69,12 @@ declare const _default: <Model extends string | number, Data extends DefaultData
68
69
  wrap?: boolean | undefined;
69
70
  "onUpdate:count"?: ((value: number) => any) | undefined;
70
71
  scrollingElement?: Element | null | undefined;
71
- queryParams: QueryParams;
72
72
  "onUpdate:selected"?: ((values: Model[]) => any) | undefined;
73
+ queryParams: QueryParams;
73
74
  selected?: Model[] | undefined;
74
75
  selectOnly?: boolean | undefined;
75
76
  unselectOnly?: boolean | undefined;
76
- useQueryFn: UsePaginatedQuery<Data>;
77
+ useQueryFn: UseQueryPaginated<Data, ApiError, QueryParams>;
77
78
  isInvalidPage: (error: unknown) => boolean;
78
79
  skeletonLength?: number | undefined;
79
80
  hidePageTitle?: boolean | undefined;
@@ -84,13 +85,14 @@ declare const _default: <Model extends string | number, Data extends DefaultData
84
85
  minHeight?: boolean | undefined;
85
86
  pageClass?: string | undefined;
86
87
  refetchInterval?: number | false | undefined;
88
+ queryOptions?: Partial<Parameters<UseQueryPaginated<Data, ApiError, QueryParams>>[1]>;
89
+ maxPages?: number | undefined;
87
90
  "onUpdate:page"?: ((value: number | undefined) => any) | undefined;
88
91
  skipScrollTarget?: boolean | undefined;
89
92
  pageLength?: number | undefined;
90
93
  headerTop?: number | undefined;
91
94
  headerHeight?: number | undefined;
92
- excludeParams?: string[] | undefined;
93
- maxPages?: number | undefined;
95
+ excludeParams?: (keyof QueryParams)[] | undefined;
94
96
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
95
97
  expose(exposed: import("vue").ShallowUnwrapRef<{
96
98
  resetPage: () => void;
@@ -136,12 +138,12 @@ declare const _default: <Model extends string | number, Data extends DefaultData
136
138
  wrap?: boolean | undefined;
137
139
  "onUpdate:count"?: ((value: number) => any) | undefined;
138
140
  scrollingElement?: Element | null | undefined;
139
- queryParams: QueryParams;
140
141
  "onUpdate:selected"?: ((values: Model[]) => any) | undefined;
142
+ queryParams: QueryParams;
141
143
  selected?: Model[] | undefined;
142
144
  selectOnly?: boolean | undefined;
143
145
  unselectOnly?: boolean | undefined;
144
- useQueryFn: UsePaginatedQuery<Data>;
146
+ useQueryFn: UseQueryPaginated<Data, ApiError, QueryParams>;
145
147
  isInvalidPage: (error: unknown) => boolean;
146
148
  skeletonLength?: number | undefined;
147
149
  hidePageTitle?: boolean | undefined;
@@ -152,13 +154,14 @@ declare const _default: <Model extends string | number, Data extends DefaultData
152
154
  minHeight?: boolean | undefined;
153
155
  pageClass?: string | undefined;
154
156
  refetchInterval?: number | false | undefined;
157
+ queryOptions?: Partial<Parameters<UseQueryPaginated<Data, ApiError, QueryParams>>[1]>;
158
+ maxPages?: number | undefined;
155
159
  "onUpdate:page"?: ((value: number | undefined) => any) | undefined;
156
160
  skipScrollTarget?: boolean | undefined;
157
161
  pageLength?: number | undefined;
158
162
  headerTop?: number | undefined;
159
163
  headerHeight?: number | undefined;
160
- excludeParams?: string[] | undefined;
161
- maxPages?: number | undefined;
164
+ excludeParams?: (keyof QueryParams)[] | undefined;
162
165
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
163
166
  expose(exposed: import("vue").ShallowUnwrapRef<{
164
167
  resetPage: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"WInfiniteListPages.vue.d.ts","sourceRoot":"","sources":["../../../src/components/InfiniteList/WInfiniteListPages.vue"],"names":[],"mappings":"AA4EA;;;wBA8cwB,IAAI,KAAK,KAAK;;;;iBAtBrB,WAAW;;;;;gBAFZ,kBAAkB,IAAI,CAAC;2BACZ,OAAO,KAAK,OAAO;;;;;;;;;;;;;;;;;;WA+BvC,GAAG;;;kBAnRA,IAAI;+BACS,IAAI,GAAG,SAAS,KAAK,IAAI;sBAClC,OAAO;qBACR,MAAM,IAAI;;;mBAGZ,OAAO;kBACR,OAAO;uBACF,OAAO;cACd,IAAI;;;kBATF,IAAI;+BACS,IAAI,GAAG,SAAS,KAAK,IAAI;sBAClC,OAAO;qBACR,MAAM,IAAI;;;mBAGZ,OAAO;kBACR,OAAO;uBACF,OA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AAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -33,7 +33,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
33
33
  pageClass: { default: void 0 },
34
34
  maxPages: { default: 5 },
35
35
  refetchInterval: { type: [Number, Boolean], default: void 0 },
36
- valueGetter: {}
36
+ valueGetter: {},
37
+ queryOptions: {}
37
38
  },
38
39
  emits: ["update:page", "update:count", "update:selected"],
39
40
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -183,6 +184,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
183
184
  "refetch-interval": _ctx.refetchInterval,
184
185
  "scrolling-element": _ctx.scrollingElement,
185
186
  "value-getter": _ctx.valueGetter,
187
+ "query-options": _ctx.queryOptions,
186
188
  class: normalizeClass({
187
189
  "last:min-h-[calc(100vh-var(--header-height)-var(--infinite-list-header-height))] last:pb-16": !_ctx.minHeight
188
190
  }),
@@ -217,7 +219,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
217
219
  })
218
220
  ]),
219
221
  _: 2
220
- }, 1032, ["query-params", "use-query-fn", "is-invalid-page", "skeleton-length", "first-page", "last-page", "hide-page-title", "selected", "wrap", "no-gap", "transition", "resetting", "empty-stub", "select-only", "unselect-only", "reverse-selection", "allow-page-selection", "min-height", "page-class", "refetch-interval", "scrolling-element", "value-getter", "class", "onRefetch"]);
222
+ }, 1032, ["query-params", "use-query-fn", "is-invalid-page", "skeleton-length", "first-page", "last-page", "hide-page-title", "selected", "wrap", "no-gap", "transition", "resetting", "empty-stub", "select-only", "unselect-only", "reverse-selection", "allow-page-selection", "min-height", "page-class", "refetch-interval", "scrolling-element", "value-getter", "query-options", "class", "onRefetch"]);
221
223
  }), 128)),
222
224
  count.value !== 0 && nextPage.value ? (openBlock(), createBlock(_sfc_main$2, {
223
225
  key: 1,
@@ -1,11 +1,11 @@
1
- declare const _default: <Model extends string | number, Data extends DefaultData>(__VLS_props: {
1
+ declare const _default: <Model extends string | number, Data extends DefaultData, ApiError, QueryParams>(__VLS_props: {
2
2
  transition?: boolean | undefined;
3
3
  valueGetter: (data: Data) => Model;
4
4
  wrap?: boolean | undefined;
5
5
  "onUpdate:count"?: ((value: number) => any) | undefined;
6
6
  scrollingElement?: Element | null | undefined;
7
- queryParams: QueryParams;
8
7
  "onUpdate:selected"?: ((values: Model[]) => any) | undefined;
8
+ queryParams: QueryParams;
9
9
  selected?: Model[] | undefined;
10
10
  selectOnly?: boolean | undefined;
11
11
  unselectOnly?: boolean | undefined;
@@ -17,7 +17,7 @@ declare const _default: <Model extends string | number, Data extends DefaultData
17
17
  onRefetch?: (() => any) | undefined;
18
18
  "onUpdate-from-header:scroll"?: (() => any) | undefined;
19
19
  onFetched?: (() => any) | undefined;
20
- useQueryFn: UsePaginatedQuery<Data>;
20
+ useQueryFn: UseQueryPaginated<Data, ApiError, QueryParams>;
21
21
  isInvalidPage: (error: unknown) => boolean;
22
22
  skeletonLength: number;
23
23
  firstPage: boolean;
@@ -31,6 +31,7 @@ declare const _default: <Model extends string | number, Data extends DefaultData
31
31
  minHeight?: boolean | undefined;
32
32
  pageClass?: string | undefined;
33
33
  refetchInterval?: number | false | undefined;
34
+ queryOptions?: Partial<Parameters<UseQueryPaginated<Data, ApiError, QueryParams>>[1]>;
34
35
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, __VLS_ctx?: {
35
36
  attrs: any;
36
37
  slots: Readonly<{
@@ -79,8 +80,8 @@ declare const _default: <Model extends string | number, Data extends DefaultData
79
80
  wrap?: boolean | undefined;
80
81
  "onUpdate:count"?: ((value: number) => any) | undefined;
81
82
  scrollingElement?: Element | null | undefined;
82
- queryParams: QueryParams;
83
83
  "onUpdate:selected"?: ((values: Model[]) => any) | undefined;
84
+ queryParams: QueryParams;
84
85
  selected?: Model[] | undefined;
85
86
  selectOnly?: boolean | undefined;
86
87
  unselectOnly?: boolean | undefined;
@@ -92,7 +93,7 @@ declare const _default: <Model extends string | number, Data extends DefaultData
92
93
  onRefetch?: (() => any) | undefined;
93
94
  "onUpdate-from-header:scroll"?: (() => any) | undefined;
94
95
  onFetched?: (() => any) | undefined;
95
- useQueryFn: UsePaginatedQuery<Data>;
96
+ useQueryFn: UseQueryPaginated<Data, ApiError, QueryParams>;
96
97
  isInvalidPage: (error: unknown) => boolean;
97
98
  skeletonLength: number;
98
99
  firstPage: boolean;
@@ -106,6 +107,7 @@ declare const _default: <Model extends string | number, Data extends DefaultData
106
107
  minHeight?: boolean | undefined;
107
108
  pageClass?: string | undefined;
108
109
  refetchInterval?: number | false | undefined;
110
+ queryOptions?: Partial<Parameters<UseQueryPaginated<Data, ApiError, QueryParams>>[1]>;
109
111
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
110
112
  expose(exposed: import("vue").ShallowUnwrapRef<{
111
113
  getFirst: () => Data | undefined;
@@ -158,8 +160,8 @@ declare const _default: <Model extends string | number, Data extends DefaultData
158
160
  wrap?: boolean | undefined;
159
161
  "onUpdate:count"?: ((value: number) => any) | undefined;
160
162
  scrollingElement?: Element | null | undefined;
161
- queryParams: QueryParams;
162
163
  "onUpdate:selected"?: ((values: Model[]) => any) | undefined;
164
+ queryParams: QueryParams;
163
165
  selected?: Model[] | undefined;
164
166
  selectOnly?: boolean | undefined;
165
167
  unselectOnly?: boolean | undefined;
@@ -171,7 +173,7 @@ declare const _default: <Model extends string | number, Data extends DefaultData
171
173
  onRefetch?: (() => any) | undefined;
172
174
  "onUpdate-from-header:scroll"?: (() => any) | undefined;
173
175
  onFetched?: (() => any) | undefined;
174
- useQueryFn: UsePaginatedQuery<Data>;
176
+ useQueryFn: UseQueryPaginated<Data, ApiError, QueryParams>;
175
177
  isInvalidPage: (error: unknown) => boolean;
176
178
  skeletonLength: number;
177
179
  firstPage: boolean;
@@ -185,6 +187,7 @@ declare const _default: <Model extends string | number, Data extends DefaultData
185
187
  minHeight?: boolean | undefined;
186
188
  pageClass?: string | undefined;
187
189
  refetchInterval?: number | false | undefined;
190
+ queryOptions?: Partial<Parameters<UseQueryPaginated<Data, ApiError, QueryParams>>[1]>;
188
191
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
189
192
  expose(exposed: import("vue").ShallowUnwrapRef<{
190
193
  getFirst: () => Data | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"InfiniteListPage.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/InfiniteList/components/InfiniteListPage.vue"],"names":[],"mappings":"AAuHA;;;wBAkewB,IAAI,KAAK,KAAK;;;;iBArBrB,WAAW;;;;;;;;;;;;;gBACZ,kBAAkB,IAAI,CAAC;2BACZ,OAAO,KAAK,OAAO;oBAC1B,MAAM;eACX,OAAO;cACR,OAAO;;;;;;;;;;;WAwBd,GAAG;;;kBAtSA,IAAI;+BACS,IAAI,GAAG,SAAS,KAAK,IAAI;sBAClC,OAAO;qBACR,MAAM,IAAI;;;mBAGZ,OAAO;kBACR,OAAO;cACT,IAAI;;;kBARF,IAAI;+BACS,IAAI,GAAG,SAAS,KAAK,IAAI;sBAClC,OAAO;qBACR,MAAM,IAAI;;;mBAGZ,OAAO;kBACR,OAAO;cACT,IAAI;;;YA1JN,cAAc,SAAS,MAAM,GAAG,IAAI;YACpC,mBAAmB,SAAS,MAAM,GAAG,IAAI;YACzC,iBAAiB,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI;YAC9C,qBAAqB,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI;YAClD,eAAe,SAAS,MAAM,GAAG,IAAI;YACrC,mBAAmB,SAAS,MAAM,GAAG,IAAI;YACzC,SAAS,GAAG,IAAI;YAChB,2BAA2B,GAAG,IAAI;YAClC,iBAAiB,UAAU,KAAK,EAAE,GAAG,IAAI;YACzC,SAAS,GAAG,IAAI;;;;;;OA8aiD,IAAI;;;4BAPnD,IAAI,KAAK,KAAK;;;;qBArBrB,WAAW;;;;;;;;;;;;;oBACZ,kBAAkB,IAAI,CAAC;+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SAAS,MAAM,GAAG,IAAI;gBACzC,iBAAiB,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI;gBAC9C,qBAAqB,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI;gBAClD,eAAe,SAAS,MAAM,GAAG,IAAI;gBACrC,mBAAmB,SAAS,MAAM,GAAG,IAAI;gBACzC,SAAS,GAAG,IAAI;gBAChB,2BAA2B,GAAG,IAAI;gBAClC,iBAAiB,UAAU,KAAK,EAAE,GAAG,IAAI;gBACzC,SAAS,GAAG,IAAI;;;;AApDtB,wBAwe2E;AAQ3E,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
1
+ {"version":3,"file":"InfiniteListPage.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/InfiniteList/components/InfiniteListPage.vue"],"names":[],"mappings":"AAuHA;;;wBAoewB,IAAI,KAAK,KAAK;;;;;iBArBrB,WAAW;;;;;;;;;;;;gBACZ,kBAAkB,IAAI,EAAE,QAAQ,EAAE,WAAW,CAAC;2BACnC,OAAO,KAAK,OAAO;oBAC1B,MAAM;eACX,OAAO;cACR,OAAO;;;;;;;;;;mBAiBF,QAAQ,WAAW,kBAAkB,IAAI,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;WAQlF,GAAG;;;kBAvSA,IAAI;+BACS,IAAI,GAAG,SAAS,KAAK,IAAI;sBAClC,OAAO;qBACR,MAAM,IAAI;;;mBAGZ,OAAO;kBACR,OAAO;cACT,IAAI;;;kBARF,IAAI;+BACS,IAAI,GAAG,SAAS,KAAK,IAAI;sBAClC,OAAO;qBACR,MAAM,IAAI;;;mBAGZ,OAAO;kBACR,OAAO;cACT,IAAI;;;YA3JN,cAAc,SAAS,MAAM,GAAG,IAAI;YACpC,mBAAmB,SAAS,MAAM,GAAG,IAAI;YACzC,iBAAiB,SAAS,MAAM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;;;gCAwaE,IAAI,KAAK,KAAK;;;;;yBArBrB,WAAW;;;;;;;;;;;;wBACZ,kBAAkB,IAAI,EAAE,QAAQ,EAAE,WAAW,CAAC;mCACnC,OAAO,KAAK,OAAO;4BAC1B,MAAM;uBACX,OAAO;sBACR,OAAO;;;;;;;;;;2BAiBF,QAAQ,WAAW,kBAAkB,IAAI,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;;;;;aAOlB,IAAI;eACpE,GAAG;;;sBAvSA,IAAI;mCACS,IAAI,GAAG,SAAS,KAAK,IAAI;0BAClC,OAAO;yBACR,MAAM,IAAI;;;uBAGZ,OAAO;sBACR,OAAO;kBACT,IAAI;;;sBARF,IAAI;mCACS,IAAI,GAAG,SAAS,KAAK,IAAI;0BAClC,OAAO;yBACR,MAAM,IAAI;;;uBAGZ,OAAO;sBACR,OAAO;kBACT,IAAI;;;gBA3JN,cAAc,SAAS,MAAM,GAAG,IAAI;gBACpC,mBAAmB,SAAS,MAAM,GAAG,IAAI;gBACzC,iBAAiB,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI;gBAC9C,qBAAqB,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI;gBAClD,eAAe,SAAS,MAAM,GAAG,IAAI;gBACrC,mBAAmB,SAAS,MAAM,GAAG,IAAI;gBACzC,SAAS,GAAG,IAAI;gBAChB,2BAA2B,GAAG,IAAI;gBAClC,iBAAiB,UAAU,KAAK,EAAE,GAAG,IAAI;gBACzC,SAAS,GAAG,IAAI;;;;AArDtB,wBA2e2E;AAQ3E,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -28,7 +28,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
28
28
  pageClass: { default: void 0 },
29
29
  refetchInterval: { type: [Number, Boolean], default: void 0 },
30
30
  scrollingElement: { default: void 0 },
31
- valueGetter: {}
31
+ valueGetter: {},
32
+ queryOptions: {}
32
33
  },
33
34
  emits: ["update:count", "update:pagesCount", "update:nextPage", "update:previousPage", "update:scroll", "error:invalidPage", "refetch", "update-from-header:scroll", "update:selected", "fetched"],
34
35
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -39,6 +40,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
39
40
  const { data, error, setData, refetch, isFetching } = props.useQueryFn(
40
41
  toRef(props, "queryParams"),
41
42
  {
43
+ ...props.queryOptions ?? {},
42
44
  refetchInterval: props.refetchInterval ? computed(() => isIntersecting.value ? props.refetchInterval : void 0) : void 0
43
45
  }
44
46
  );
@@ -82,14 +84,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
82
84
  emit("update:previousPage", value.previous);
83
85
  if (props.lastPage && value?.next !== void 0)
84
86
  emit("update:nextPage", value.next);
85
- if (value?.pages_count)
87
+ if (value?.pages_count !== void 0)
86
88
  emit("update:pagesCount", value.pages_count);
87
89
  if (value?.count !== void 0)
88
90
  emit("update:count", value.count);
89
91
  }, { immediate: true });
90
92
  watch(error, (error2) => {
91
93
  if (props.isInvalidPage(error2))
92
- emit("error:invalidPage", props.queryParams.page);
94
+ emit("error:invalidPage", props.queryParams.page ?? 1);
93
95
  }, { immediate: true });
94
96
  watch(isFetching, (value) => {
95
97
  if (value)
@@ -1,20 +1,32 @@
1
- declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
2
- queryParams: QueryParams;
3
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
4
- "update:selected": (value: boolean) => void;
5
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
6
- queryParams: QueryParams;
7
- }>>> & {
1
+ declare const _default: <QueryParams>(__VLS_props: {
8
2
  "onUpdate:selected"?: ((value: boolean) => any) | undefined;
9
- }, {}, {}>;
10
- export default _default;
11
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
12
- type __VLS_TypePropsToRuntimeProps<T> = {
13
- [K in keyof T]-?: {} extends Pick<T, K> ? {
14
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
15
- } : {
16
- type: import('vue').PropType<T[K]>;
17
- required: true;
18
- };
3
+ queryParams: QueryParams;
4
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, __VLS_ctx?: {
5
+ attrs: any;
6
+ slots: {};
7
+ emit: (e: 'update:selected', value: boolean) => void;
8
+ } | undefined, __VLS_expose?: ((exposed: import('vue').ShallowUnwrapRef<{}>) => void) | undefined, __VLS_setup?: Promise<{
9
+ props: {
10
+ "onUpdate:selected"?: ((value: boolean) => any) | undefined;
11
+ queryParams: QueryParams;
12
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
13
+ expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
14
+ attrs: any;
15
+ slots: {};
16
+ emit: (e: 'update:selected', value: boolean) => void;
17
+ }>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
18
+ [key: string]: any;
19
+ }> & {
20
+ __ctx?: {
21
+ props: {
22
+ "onUpdate:selected"?: ((value: boolean) => any) | undefined;
23
+ queryParams: QueryParams;
24
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
25
+ expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
26
+ attrs: any;
27
+ slots: {};
28
+ emit: (e: 'update:selected', value: boolean) => void;
29
+ } | undefined;
19
30
  };
31
+ export default _default;
20
32
  //# sourceMappingURL=InfiniteListPageTitle.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"InfiniteListPageTitle.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/InfiniteList/components/InfiniteListPageTitle.vue"],"names":[],"mappings":"AAUA;;iBAsFe,WAAW;;;;iBAAX,WAAW;;;;AAN1B,wBASG;AACH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC"}
1
+ {"version":3,"file":"InfiniteListPageTitle.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/InfiniteList/components/InfiniteListPageTitle.vue"],"names":[],"mappings":"AAUA;;;iBAuFe,WAAW;;WAQnB,GAAG;;cA9EJ,iBAAiB,SAAS,OAAO,KAAG,IAAI;yCA6E9B,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,KAAG,IAAI;;;qBAP1C,WAAW;;oBAOV,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;cA9EJ,iBAAiB,SAAS,OAAO,KAAG,IAAI;;;;;;;yBAsE/B,WAAW;;wBAOV,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;eAClD,GAAG;;kBA9EJ,iBAAiB,SAAS,OAAO,KAAG,IAAI;;;AAX9C,wBA8F2E"}
@@ -24,7 +24,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
24
24
  onClick: copyRoute
25
25
  }, {
26
26
  default: withCtx(() => [
27
- createTextVNode(" Page: " + toDisplayString(_ctx.queryParams.page), 1)
27
+ createTextVNode(" Page: " + toDisplayString(_ctx.queryParams.page ?? 1), 1)
28
28
  ]),
29
29
  _: 1
30
30
  }, 8, ["to"]);
@@ -7,6 +7,7 @@ import '../../Dropdown/utils/DropdownStyle.js';
7
7
  import 'vue-router';
8
8
  import '../../../utils/Modal.js';
9
9
  import '../../Link/WLink.vue.js';
10
+ import '@tanstack/vue-query';
10
11
 
11
12
  const headerElementHeight = 60;
12
13
  const observerOptions = {
@@ -1,5 +1,5 @@
1
1
  import { type Component } from 'vue';
2
- declare const _default: <Model extends string | number, Data extends DefaultData>(__VLS_props: {
2
+ declare const _default: <Model extends string | number, Data extends DefaultData, ApiError, QueryParams>(__VLS_props: {
3
3
  required?: boolean | undefined;
4
4
  search: string;
5
5
  title?: string | undefined;
@@ -22,9 +22,10 @@ declare const _default: <Model extends string | number, Data extends DefaultData
22
22
  mobileTitle?: string | undefined;
23
23
  "onUpdate:search"?: ((value: string) => any) | undefined;
24
24
  queryParams: QueryParams;
25
- useQueryFn: UsePaginatedQuery<Data>;
25
+ useQueryFn: UseQueryPaginated<Data, ApiError, QueryParams>;
26
26
  isInvalidPage: (error: unknown) => boolean;
27
27
  emptyStub?: string | undefined;
28
+ queryOptions?: Partial<Parameters<UseQueryPaginated<Data, ApiError, QueryParams>>[1]>;
28
29
  hideOptionIcon?: boolean | undefined;
29
30
  maxSearchLength?: number | undefined;
30
31
  optionComponent?: Component<{
@@ -93,9 +94,10 @@ declare const _default: <Model extends string | number, Data extends DefaultData
93
94
  mobileTitle?: string | undefined;
94
95
  "onUpdate:search"?: ((value: string) => any) | undefined;
95
96
  queryParams: QueryParams;
96
- useQueryFn: UsePaginatedQuery<Data>;
97
+ useQueryFn: UseQueryPaginated<Data, ApiError, QueryParams>;
97
98
  isInvalidPage: (error: unknown) => boolean;
98
99
  emptyStub?: string | undefined;
100
+ queryOptions?: Partial<Parameters<UseQueryPaginated<Data, ApiError, QueryParams>>[1]>;
99
101
  hideOptionIcon?: boolean | undefined;
100
102
  maxSearchLength?: number | undefined;
101
103
  optionComponent?: Component<{
@@ -168,9 +170,10 @@ declare const _default: <Model extends string | number, Data extends DefaultData
168
170
  mobileTitle?: string | undefined;
169
171
  "onUpdate:search"?: ((value: string) => any) | undefined;
170
172
  queryParams: QueryParams;
171
- useQueryFn: UsePaginatedQuery<Data>;
173
+ useQueryFn: UseQueryPaginated<Data, ApiError, QueryParams>;
172
174
  isInvalidPage: (error: unknown) => boolean;
173
175
  emptyStub?: string | undefined;
176
+ queryOptions?: Partial<Parameters<UseQueryPaginated<Data, ApiError, QueryParams>>[1]>;
174
177
  hideOptionIcon?: boolean | undefined;
175
178
  maxSearchLength?: number | undefined;
176
179
  optionComponent?: Component<{
@@ -1 +1 @@
1
- {"version":3,"file":"WSelectAsync.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Select/WSelectAsync.vue"],"names":[],"mappings":"AA4GA;AAEA,OAAO,EAA0B,KAAK,SAAS,EAAC,MAAM,KAAK,CAAA;;;YA8b/C,MAAM;;;;;;gBADF,KAAK,EAAE;0BA6BE,IAAI,KAAK,KAAK;;;;;;;;;;;;;iBAzBtB,WAAW;gBAFZ,kBAAkB,IAAI,CAAC;2BACZ,OAAO,KAAK,OAAO;;;;;gBAQL,IAAI;;;;;;;;;;;;;WA2BtC,GAAG;;yBA3UQ,OAAO,MAAM,EAAE,KAAK,CAAC,KAAK,IAAI;0BAC7B;YAAC,MAAM,EAAE,IAAI,GAAG,IAAI,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAC;YAAC,KAAK,EAAE,OAAO,CAAA;SAAC,KAAK,IAAI;;yBADrF,OAAO,MAAM,EAAE,KAAK,CAAC,KAAK,IAAI;0BAC7B;YAAC,MAAM,EAAE,IAAI,GAAG,IAAI,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAC;YAAC,KAAK,EAAE,OAAO,CAAA;SAAC,KAAK,IAAI;;;YAvFjG,QAAQ,QAAQ,KAAK,GAAG,IAAI;YAC5B,UAA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,IAAI;gBAC5B,UAAU,QAAQ,KAAK,GAAG,IAAI;gBAC9B,eAAe,SAAS,MAAM,GAAG,IAAI;gBACrC,mBAAmB,SAAS,KAAK,EAAE,GAAG,IAAI;gBAC1C,eAAe,SAAS,MAAM,GAAG,IAAI;;;;AAhE3C,wBAme2E;AAQ3E,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -37,7 +37,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
37
37
  createdData: { default: void 0 },
38
38
  hideOptionIcon: { type: Boolean },
39
39
  valueGetter: { type: Function, default: (data) => data.id },
40
- valueQueryKey: { default: "id__in" }
40
+ valueQueryKey: { default: "id__in" },
41
+ queryOptions: {}
41
42
  },
42
43
  emits: ["select", "unselect", "update:search", "update:modelValue", "create:option"],
43
44
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -181,6 +182,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
181
182
  "allow-create": _ctx.allowCreate && _ctx.search !== "",
182
183
  "hide-option-icon": _ctx.hideOptionIcon,
183
184
  "value-getter": _ctx.valueGetter,
185
+ "query-options": _ctx.queryOptions,
184
186
  onSelect: select,
185
187
  onUnselect: unselect,
186
188
  "onCreate:option": create,
@@ -203,7 +205,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
203
205
  ])
204
206
  ]),
205
207
  _: 3
206
- }, 8, ["model-value", "use-query-fn", "query-params", "is-invalid-page", "loading", "disabled", "empty-stub", "allow-create", "hide-option-icon", "value-getter"])
208
+ }, 8, ["model-value", "use-query-fn", "query-params", "is-invalid-page", "loading", "disabled", "empty-stub", "allow-create", "hide-option-icon", "value-getter", "query-options"])
207
209
  ]),
208
210
  _: 2
209
211
  }, [
@@ -1,4 +1,4 @@
1
- declare const _default: <Model extends string | number, Data extends DefaultData>(__VLS_props: {
1
+ declare const _default: <Model extends string | number, Data extends DefaultData, ApiError, QueryParams>(__VLS_props: {
2
2
  title?: string | undefined;
3
3
  onSelect?: ((value: Model) => any) | undefined;
4
4
  modelValue: Model[];
@@ -9,10 +9,11 @@ declare const _default: <Model extends string | number, Data extends DefaultData
9
9
  queryParams: QueryParams;
10
10
  selectOnly?: boolean | undefined;
11
11
  unselectOnly?: boolean | undefined;
12
- useQueryFn: UsePaginatedQuery<Data>;
12
+ useQueryFn: UseQueryPaginated<Data, ApiError, QueryParams>;
13
13
  isInvalidPage: (error: unknown) => boolean;
14
14
  emptyStub?: string | undefined;
15
- excludeParams?: string[] | undefined;
15
+ queryOptions?: Partial<Parameters<UseQueryPaginated<Data, ApiError, QueryParams>>[1]>;
16
+ excludeParams?: (keyof QueryParams)[] | undefined;
16
17
  "onUpdate:model-value"?: ((value: Model[]) => any) | undefined;
17
18
  hideOptionIcon?: boolean | undefined;
18
19
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, __VLS_ctx?: {
@@ -50,10 +51,11 @@ declare const _default: <Model extends string | number, Data extends DefaultData
50
51
  queryParams: QueryParams;
51
52
  selectOnly?: boolean | undefined;
52
53
  unselectOnly?: boolean | undefined;
53
- useQueryFn: UsePaginatedQuery<Data>;
54
+ useQueryFn: UseQueryPaginated<Data, ApiError, QueryParams>;
54
55
  isInvalidPage: (error: unknown) => boolean;
55
56
  emptyStub?: string | undefined;
56
- excludeParams?: string[] | undefined;
57
+ queryOptions?: Partial<Parameters<UseQueryPaginated<Data, ApiError, QueryParams>>[1]>;
58
+ excludeParams?: (keyof QueryParams)[] | undefined;
57
59
  "onUpdate:model-value"?: ((value: Model[]) => any) | undefined;
58
60
  hideOptionIcon?: boolean | undefined;
59
61
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
@@ -95,10 +97,11 @@ declare const _default: <Model extends string | number, Data extends DefaultData
95
97
  queryParams: QueryParams;
96
98
  selectOnly?: boolean | undefined;
97
99
  unselectOnly?: boolean | undefined;
98
- useQueryFn: UsePaginatedQuery<Data>;
100
+ useQueryFn: UseQueryPaginated<Data, ApiError, QueryParams>;
99
101
  isInvalidPage: (error: unknown) => boolean;
100
102
  emptyStub?: string | undefined;
101
- excludeParams?: string[] | undefined;
103
+ queryOptions?: Partial<Parameters<UseQueryPaginated<Data, ApiError, QueryParams>>[1]>;
104
+ excludeParams?: (keyof QueryParams)[] | undefined;
102
105
  "onUpdate:model-value"?: ((value: Model[]) => any) | undefined;
103
106
  hideOptionIcon?: boolean | undefined;
104
107
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
@@ -1 +1 @@
1
- {"version":3,"file":"WSelectAsyncList.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Select/WSelectAsyncList.vue"],"names":[],"mappings":"AAuDA;;;;gBAyOgB,KAAK,EAAE;0BASE,IAAI,KAAK,KAAK;;;;iBANtB,WAAW;;;gBAFZ,kBAAkB,IAAI,CAAC;2BACZ,OAAO,KAAK,OAAO;;;;;;WAevC,GAAG;;2BA3MU;YAAC,MAAM,EAAE,IAAI,GAAG,IAAI,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAC;YAAC,KAAK,EAAE,OAAO,CAAA;SAAC,KAAK,IAAI;;2BAApF;YAAC,MAAM,EAAE,IAAI,GAAG,IAAI,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAC;YAAC,KAAK,EAAE,OAAO,CAAA;SAAC,KAAK,IAAI;;;YATlG,QAAQ,SAAS,KAAK,GAAG,IAAI;YAC7B,UAAU,SAAS,KAAK,GAAG,IAAI;YAC/B,oBAAoB,SAAS,KAAK,EAAE,GAAG,IAAI;YAC3C,cAAc,SAAS,MAAM,GAAG,IAAI;;yCAgN1B,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,KAAG,IAAI;;;;oBAhBzC,KAAK,EAAE;8BASE,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CAAC;gBAAC,KAAK,EAAE,OAAO,CAAA;aAAC,KAAK,IAAI;;+BAApF;gBAAC,MAAM,EAAE,IAAI,GAAG,IAAI,CAAC;gBAAC,QAAQ,EAAE,OAAO,CAAC;gBAAC,QAAQ,EAAE,OAAO,CAAC;gBAAC,KAAK,EAAE,OAAO,CAAA;aAAC,KAAK,IAAI;;;gBATlG,QAAQ,SAAS,KAAK,GAAG,IAAI;gBAC7B,UAAU,SAAS,KAAK,GAAG,IAAI;gBAC/B,oBAAoB,SAAS,KAAK,EAAE,GAAG,IAAI;gBAC3C,cAAc,SAAS,MAAM,GAAG,IAAI;;;;AAnC1C,wBA0P2E;AAQ3E,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -20,7 +20,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
20
20
  selectOnly: { type: Boolean },
21
21
  unselectOnly: { type: Boolean },
22
22
  hideOptionIcon: { type: Boolean },
23
- valueGetter: { type: Function, default: (data) => data.id }
23
+ valueGetter: { type: Function, default: (data) => data.id },
24
+ queryOptions: {}
24
25
  },
25
26
  emits: ["select", "unselect", "update:model-value", "update:count"],
26
27
  setup(__props) {
@@ -53,6 +54,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
53
54
  "unselect-only": _ctx.unselectOnly,
54
55
  "hide-option-icon": _ctx.hideOptionIcon,
55
56
  "value-getter": _ctx.valueGetter,
57
+ "query-options": _ctx.queryOptions,
56
58
  "allow-update-selected": "",
57
59
  transition: "",
58
60
  "no-padding": "",
@@ -70,7 +72,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
70
72
  })
71
73
  ]),
72
74
  _: 3
73
- }, 8, ["model-value", "use-query-fn", "is-invalid-page", "query-params", "scrolling-element", "exclude-params", "empty-stub", "select-only", "unselect-only", "hide-option-icon", "value-getter"])
75
+ }, 8, ["model-value", "use-query-fn", "is-invalid-page", "query-params", "scrolling-element", "exclude-params", "empty-stub", "select-only", "unselect-only", "hide-option-icon", "value-getter", "query-options"])
74
76
  ], 512))
75
77
  ]);
76
78
  };
@@ -1,5 +1,5 @@
1
1
  import { type Component } from 'vue';
2
- declare const _default: <Model extends string | number, Data extends DefaultData>(__VLS_props: {
2
+ declare const _default: <Model extends string | number, Data extends DefaultData, ApiError, QueryParams>(__VLS_props: {
3
3
  required?: boolean | undefined;
4
4
  search: string;
5
5
  title?: string | undefined;
@@ -21,9 +21,10 @@ declare const _default: <Model extends string | number, Data extends DefaultData
21
21
  mobileTitle?: string | undefined;
22
22
  "onUpdate:search"?: ((value: string) => any) | undefined;
23
23
  queryParams: QueryParams;
24
- useQueryFn: UsePaginatedQuery<Data>;
24
+ useQueryFn: UseQueryPaginated<Data, ApiError, QueryParams>;
25
25
  isInvalidPage: (error: unknown) => boolean;
26
26
  emptyStub?: string | undefined;
27
+ queryOptions?: Partial<Parameters<UseQueryPaginated<Data, ApiError, QueryParams>>[1]>;
27
28
  hideOptionIcon?: boolean | undefined;
28
29
  maxSearchLength?: number | undefined;
29
30
  optionComponent?: Component<{
@@ -77,9 +78,10 @@ declare const _default: <Model extends string | number, Data extends DefaultData
77
78
  mobileTitle?: string | undefined;
78
79
  "onUpdate:search"?: ((value: string) => any) | undefined;
79
80
  queryParams: QueryParams;
80
- useQueryFn: UsePaginatedQuery<Data>;
81
+ useQueryFn: UseQueryPaginated<Data, ApiError, QueryParams>;
81
82
  isInvalidPage: (error: unknown) => boolean;
82
83
  emptyStub?: string | undefined;
84
+ queryOptions?: Partial<Parameters<UseQueryPaginated<Data, ApiError, QueryParams>>[1]>;
83
85
  hideOptionIcon?: boolean | undefined;
84
86
  maxSearchLength?: number | undefined;
85
87
  optionComponent?: Component<{
@@ -137,9 +139,10 @@ declare const _default: <Model extends string | number, Data extends DefaultData
137
139
  mobileTitle?: string | undefined;
138
140
  "onUpdate:search"?: ((value: string) => any) | undefined;
139
141
  queryParams: QueryParams;
140
- useQueryFn: UsePaginatedQuery<Data>;
142
+ useQueryFn: UseQueryPaginated<Data, ApiError, QueryParams>;
141
143
  isInvalidPage: (error: unknown) => boolean;
142
144
  emptyStub?: string | undefined;
145
+ queryOptions?: Partial<Parameters<UseQueryPaginated<Data, ApiError, QueryParams>>[1]>;
143
146
  hideOptionIcon?: boolean | undefined;
144
147
  maxSearchLength?: number | undefined;
145
148
  optionComponent?: Component<{
@@ -1 +1 @@
1
- {"version":3,"file":"WSelectAsyncSingle.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Select/WSelectAsyncSingle.vue"],"names":[],"mappings":"AA0DA;AAEA,OAAO,EAA8B,KAAK,SAAS,EAAC,MAAM,KAAK,CAAA;;;YAyNrD,MAAM;;;;;gBADF,KAAK,GAAG,IAAI;0BA4BH,IAAI,KAAK,KAAK;;;;;;;;;;;;;iBAxBtB,WAAW;gBAFZ,kBAAkB,IAAI,CAAC;2BACZ,OAAO,KAAK,OAAO;;;;;gBAQL,IAAI;;;;;;;;;;;WA0BpC,GAAG;;;;;;YA5DmB,GAAG;uBACJ,GAAG;;;YAtJzB,mBAAmB,SAAS,KAAK,GAAG,IAAI,GAAG,IAAI;YAC/C,eAAe,SAAS,MAAM,GAAG,IAAI;YACrC,eAAe,SAAS,MAAM,GAAG,IAAI;;;;OA8M4B,IAAI;;;gBAnCjE,MAAM;;;;;oBADF,KAAK,GAAG,IAAI;8BA4BH,IAAI,KAAK,KAAK;;;;;;;;;;;;;qBAxBtB,WAAW;oBAFZ,kBAAkB,IAAI,CAAC;+BACZ,OAAO,KAAK,OAAO;;;;;oBAQL,IAAI;;;;;;;;;;;;;SAyB4B,IAAI;WACpE,GAAG;;;;;;YA5DmB,GAAG;uBACJ,GAAG;;;YAtJzB,mBAAmB,SAAS,KAAK,GAAG,IAAI,GAAG,IAAI;YAC/C,eAAe,SAAS,MAAM,GAAG,IAAI;YACrC,eAAe,SAAS,MAAM,GAAG,IAAI;;;;;;;;oBA2KjC,M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AO,KAAK,OAAO;;uBA2B3B,QAAQ,WAAW,kBAAkB,IAAI,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;;;oBAnBhD,IAAI;;;;;;;;;;;;;SA0B4B,IAAI;WACpE,GAAG;;;;;;YA7DmB,GAAG;uBACJ,GAAG;;;YAtJzB,mBAAmB,SAAS,KAAK,GAAG,IAAI,GAAG,IAAI;YAC/C,eAAe,SAAS,MAAM,GAAG,IAAI;YACrC,eAAe,SAAS,MAAM,GAAG,IAAI;;;;;;;;oBA2KjC,MAAM;;;;;wBADF,KAAK,GAAG,IAAI;kCA4BH,IAAI,KAAK,KAAK;;;;;;;;;;;;;yBAxBtB,WAAW;wBAFZ,kBAAkB,IAAI,EAAE,QAAQ,EAAE,WAAW,CAAC;mCACnC,OAAO,KAAK,OAAO;;2BA2B3B,QAAQ,WAAW,kBAAkB,IAAI,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;;;wBAnBhD,IAAI;;;;;;;;;;;;;aA0B4B,IAAI;eACpE,GAAG;;;;;;gBA7DmB,GAAG;2BACJ,GAAG;;;gBAtJzB,mBAAmB,SAAS,KAAK,GAAG,IAAI,GAAG,IAAI;gBAC/C,eAAe,SAAS,MAAM,GAAG,IAAI;gBACrC,eAAe,SAAS,MAAM,GAAG,IAAI;;;;AA3C3C,wBAgQ2E"}
@@ -33,7 +33,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
33
33
  createdData: {},
34
34
  hideOptionIcon: { type: Boolean },
35
35
  valueGetter: { type: Function },
36
- valueQueryKey: {}
36
+ valueQueryKey: {},
37
+ queryOptions: {}
37
38
  },
38
39
  emits: ["update:modelValue", "update:search", "create:option"],
39
40
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -90,6 +91,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
90
91
  "hide-option-icon": _ctx.hideOptionIcon,
91
92
  "value-getter": _ctx.valueGetter,
92
93
  "value-query-key": _ctx.valueQueryKey,
94
+ "query-options": _ctx.queryOptions,
93
95
  "hide-prefix": "",
94
96
  onSelect: _cache[0] || (_cache[0] = ($event) => updateModelValue($event)),
95
97
  onUnselect: _cache[1] || (_cache[1] = ($event) => _ctx.allowClear && updateModelValue(null)),
@@ -112,7 +114,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
112
114
  ]),
113
115
  key: "0"
114
116
  } : void 0
115
- ]), 1032, ["model-value", "search", "title", "mobile-title", "description", "loading", "max-search-length", "empty-stub", "query-params", "use-query-fn", "is-invalid-page", "option-component", "readonly", "disabled", "skeleton", "allow-create", "error-message", "has-changes", "placeholder", "search-size", "required", "no-margin", "icon", "mono", "disable-clear", "preview-data", "created-data", "hide-option-icon", "value-getter", "value-query-key"])
117
+ ]), 1032, ["model-value", "search", "title", "mobile-title", "description", "loading", "max-search-length", "empty-stub", "query-params", "use-query-fn", "is-invalid-page", "option-component", "readonly", "disabled", "skeleton", "allow-create", "error-message", "has-changes", "placeholder", "search-size", "required", "no-margin", "icon", "mono", "disable-clear", "preview-data", "created-data", "hide-option-icon", "value-getter", "value-query-key", "query-options"])
116
118
  ]);
117
119
  };
118
120
  }
@@ -1,4 +1,4 @@
1
- declare const _default: <Model extends string | number, Data extends DefaultData>(__VLS_props: {
1
+ declare const _default: <Model extends string | number, Data extends DefaultData, ApiError, QueryParams>(__VLS_props: {
2
2
  onSelect?: ((value: Model) => any) | undefined;
3
3
  transition?: boolean | undefined;
4
4
  disabled?: boolean | undefined;
@@ -12,10 +12,11 @@ declare const _default: <Model extends string | number, Data extends DefaultData
12
12
  queryParams: QueryParams;
13
13
  selectOnly?: boolean | undefined;
14
14
  unselectOnly?: boolean | undefined;
15
- useQueryFn: UsePaginatedQuery<Data>;
15
+ useQueryFn: UseQueryPaginated<Data, ApiError, QueryParams>;
16
16
  isInvalidPage: (error: unknown) => boolean;
17
17
  emptyStub?: string | undefined;
18
- excludeParams?: string[] | undefined;
18
+ queryOptions?: Partial<Parameters<UseQueryPaginated<Data, ApiError, QueryParams>>[1]>;
19
+ excludeParams?: (keyof QueryParams)[] | undefined;
19
20
  hideOptionIcon?: boolean | undefined;
20
21
  "onCreate:option"?: (() => any) | undefined;
21
22
  allowCreate?: boolean | undefined;
@@ -61,10 +62,11 @@ declare const _default: <Model extends string | number, Data extends DefaultData
61
62
  queryParams: QueryParams;
62
63
  selectOnly?: boolean | undefined;
63
64
  unselectOnly?: boolean | undefined;
64
- useQueryFn: UsePaginatedQuery<Data>;
65
+ useQueryFn: UseQueryPaginated<Data, ApiError, QueryParams>;
65
66
  isInvalidPage: (error: unknown) => boolean;
66
67
  emptyStub?: string | undefined;
67
- excludeParams?: string[] | undefined;
68
+ queryOptions?: Partial<Parameters<UseQueryPaginated<Data, ApiError, QueryParams>>[1]>;
69
+ excludeParams?: (keyof QueryParams)[] | undefined;
68
70
  hideOptionIcon?: boolean | undefined;
69
71
  "onCreate:option"?: (() => any) | undefined;
70
72
  allowCreate?: boolean | undefined;
@@ -114,10 +116,11 @@ declare const _default: <Model extends string | number, Data extends DefaultData
114
116
  queryParams: QueryParams;
115
117
  selectOnly?: boolean | undefined;
116
118
  unselectOnly?: boolean | undefined;
117
- useQueryFn: UsePaginatedQuery<Data>;
119
+ useQueryFn: UseQueryPaginated<Data, ApiError, QueryParams>;
118
120
  isInvalidPage: (error: unknown) => boolean;
119
121
  emptyStub?: string | undefined;
120
- excludeParams?: string[] | undefined;
122
+ queryOptions?: Partial<Parameters<UseQueryPaginated<Data, ApiError, QueryParams>>[1]>;
123
+ excludeParams?: (keyof QueryParams)[] | undefined;
121
124
  hideOptionIcon?: boolean | undefined;
122
125
  "onCreate:option"?: (() => any) | undefined;
123
126
  allowCreate?: boolean | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"SelectAsyncList.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/components/SelectAsyncList.vue"],"names":[],"mappings":"AA4FA;;;;;;;gBA0Zc,KAAK,EAAE;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CAAC,CAAC,CAAC;;;;;;;;;;;aAOhB,IAAI;eACpE,GAAG;;+BA3TU;gBAAC,MAAM,EAAE,IAAI,GAAG,IAAI,CAAC;gBAAC,QAAQ,EAAE,OAAO,CAAC;gBAAC,QAAQ,EAAE,OAAO,CAAA;aAAC,KAAK,IAAI;;+BAApE;gBAAC,MAAM,EAAE,IAAI,GAAG,IAAI,CAAC;gBAAC,QAAQ,EAAE,OAAO,CAAC;gBAAC,QAAQ,EAAE,OAAO,CAAA;aAAC,KAAK,IAAI;;;gBArFlF,QAAQ,SAAS,KAAK,GAAG,IAAI;gBAC7B,UAAU,SAAS,KAAK,GAAG,IAAI;gBAC/B,cAAc,SAAS,MAAM,GAAG,IAAI;gBACpC,mBAAmB,SAAS,KAAK,EAAE,GAAG,IAAI;gBAC1C,eAAe,GAAG,IAAI;;;;AA/B5B,wBAgb2E"}
@@ -23,7 +23,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
23
23
  unselectOnly: { type: Boolean },
24
24
  allowCreate: { type: Boolean },
25
25
  hideOptionIcon: { type: Boolean },
26
- valueGetter: { type: Function }
26
+ valueGetter: { type: Function },
27
+ queryOptions: {}
27
28
  },
28
29
  emits: ["select", "unselect", "update:count", "update:modelValue", "create:option"],
29
30
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -103,6 +104,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
103
104
  "select-only": _ctx.selectOnly,
104
105
  "unselect-only": _ctx.unselectOnly,
105
106
  "value-getter": _ctx.valueGetter,
107
+ "query-options": _ctx.queryOptions,
106
108
  "hide-page-title": "",
107
109
  "header-top-ignore": "",
108
110
  "min-height": "",
@@ -158,7 +160,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
158
160
  }, 1032, ["is-selected", "is-cursor", "loading", "skeleton", "scroll", "first", "last", "previous", "next", "is-no-cursor", "hide-option-icon", "class", "onSelect", "onUnselect", "onMouseenter", "onUpdate:cursor", "onUnmounted", "onUpdate:first", "onUpdate:last"])
159
161
  ]),
160
162
  _: 3
161
- }, 8, ["use-query-fn", "query-params", "is-invalid-page", "scrolling-element", "transition", "exclude-params", "selected", "empty-stub", "select-only", "unselect-only", "value-getter"]),
163
+ }, 8, ["use-query-fn", "query-params", "is-invalid-page", "scrolling-element", "transition", "exclude-params", "selected", "empty-stub", "select-only", "unselect-only", "value-getter", "query-options"]),
162
164
  _ctx.allowCreate ? (openBlock(), createBlock(_sfc_main$2, {
163
165
  key: 0,
164
166
  "is-selected": false,
@@ -1,12 +1,13 @@
1
1
  import { type Component } from 'vue';
2
- declare const _default: <Model extends string | number, Data extends DefaultData>(__VLS_props: {
2
+ declare const _default: <Model extends string | number, Data extends DefaultData, ApiError, QueryParams>(__VLS_props: {
3
3
  disabled?: boolean | undefined;
4
4
  loading?: boolean | undefined;
5
5
  "onUpdate:modelValue"?: ((value: Model[]) => any) | undefined;
6
6
  modelValue: Model[];
7
7
  valueGetter: (value: Data) => Model;
8
8
  onUnselect?: ((value: Model) => any) | undefined;
9
- useQueryFn: UsePaginatedQuery<Data>;
9
+ useQueryFn: UseQueryPaginated<Data, ApiError, QueryParams>;
10
+ queryOptions?: Partial<Parameters<UseQueryPaginated<Data, ApiError, QueryParams>>[1]>;
10
11
  optionComponent?: Component<{
11
12
  option: Data;
12
13
  selected?: boolean | undefined;
@@ -43,7 +44,8 @@ declare const _default: <Model extends string | number, Data extends DefaultData
43
44
  modelValue: Model[];
44
45
  valueGetter: (value: Data) => Model;
45
46
  onUnselect?: ((value: Model) => any) | undefined;
46
- useQueryFn: UsePaginatedQuery<Data>;
47
+ useQueryFn: UseQueryPaginated<Data, ApiError, QueryParams>;
48
+ queryOptions?: Partial<Parameters<UseQueryPaginated<Data, ApiError, QueryParams>>[1]>;
47
49
  optionComponent?: Component<{
48
50
  option: Data;
49
51
  selected?: boolean | undefined;
@@ -84,7 +86,8 @@ declare const _default: <Model extends string | number, Data extends DefaultData
84
86
  modelValue: Model[];
85
87
  valueGetter: (value: Data) => Model;
86
88
  onUnselect?: ((value: Model) => any) | undefined;
87
- useQueryFn: UsePaginatedQuery<Data>;
89
+ useQueryFn: UseQueryPaginated<Data, ApiError, QueryParams>;
90
+ queryOptions?: Partial<Parameters<UseQueryPaginated<Data, ApiError, QueryParams>>[1]>;
88
91
  optionComponent?: Component<{
89
92
  option: Data;
90
93
  selected?: boolean | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"SelectAsyncPrefix.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/components/SelectAsyncPrefix.vue"],"names":[],"mappings":"AA4CA;AAEA,OAAO,EAAuB,KAAK,SAAS,EAAkB,MAAM,KAAK,CAAA;;;;;gBAqN3D,KAAK,EAAE;yBAOE,IAAI,KAAK,KAAK;;gBARvB,kBAAkB,IAAI,CAAC;;gBAIE,IAAI;;;;;;;;mBAK1B,MAAM;;WAQhB,GAAG;;2BA3LU;YAAC,MAAM,EAAE,IAAI,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAA;SAAC,KAAK,IAAI;;2BAA1C;YAAC,MAAM,EAAE,IAAI,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAA;SAAC,KAAK,IAAI;;;YAdxD,UAAU,SAAS,KAAK,GAAG,IAAI;YAC/B,iBAAiB,SAAS,OAAO,GAAG,IAAI;YACxC,mBAAmB,SAAS,KAAK,EAAE,GAAG,IAAI;;yCAsMhC,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,KAAG,IAAI;;;;;oBAf3C,KAAK,EAAE;6BAOE,IAAI,KAAK,KAAK;;oBARvB,kBAAkB,IAAI,CAAC;;oBAIE,IAAI;;;;;;;;uBAK1B,MAAM;;oBAOP,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;2BA3LU;YAAC,MAAM,EAAE,IAAI,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAA;SAAC,KAAK,IAAI;;2BAA1C;YAAC,MAAM,EAAE,IAAI,CAAC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AM,EAAE,IAAI,CAAC;gBAAC,QAAQ,EAAE,OAAO,CAAA;aAAC,KAAK,IAAI;;+BAA1C;gBAAC,MAAM,EAAE,IAAI,CAAC;gBAAC,QAAQ,EAAE,OAAO,CAAA;aAAC,KAAK,IAAI;;;gBAdxD,UAAU,SAAS,KAAK,GAAG,IAAI;gBAC/B,iBAAiB,SAAS,OAAO,GAAG,IAAI;gBACxC,mBAAmB,SAAS,KAAK,EAAE,GAAG,IAAI;;;;AAzBhD,wBAsO2E"}
@@ -20,7 +20,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
20
20
  previewData: {},
21
21
  createdData: {},
22
22
  valueGetter: { type: Function },
23
- valueQueryKey: {}
23
+ valueQueryKey: {},
24
+ queryOptions: {}
24
25
  },
25
26
  emits: ["unselect", "update:fetching", "update:modelValue"],
26
27
  setup(__props, { emit: __emit }) {
@@ -46,6 +47,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
46
47
  "preview-data": _ctx.previewData,
47
48
  "created-data": _ctx.createdData,
48
49
  "value-getter": _ctx.valueGetter,
50
+ "query-options": _ctx.queryOptions,
49
51
  onUnselect: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("unselect", $event)),
50
52
  "onUpdate:fetching": _cache[1] || (_cache[1] = ($event) => _ctx.$emit("update:fetching", $event))
51
53
  }, {
@@ -56,7 +58,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
56
58
  })
57
59
  ]),
58
60
  _: 3
59
- }, 8, ["use-query-fn", "query-params", "option-component", "disable-clear", "loading", "disabled", "preview-data", "created-data", "value-getter"]),
61
+ }, 8, ["use-query-fn", "query-params", "option-component", "disable-clear", "loading", "disabled", "preview-data", "created-data", "value-getter", "query-options"]),
60
62
  _ctx.modelValue.length > PAGE_LENGTH ? (openBlock(), createElementBlock("div", _hoisted_1, [
61
63
  createElementVNode("div", null, "... " + toDisplayString(unref(numberFormatter).format(_ctx.modelValue.length)) + " items", 1),
62
64
  !_ctx.disableClear && !_ctx.disabled ? (openBlock(), createElementBlock("button", {
@@ -1,11 +1,12 @@
1
1
  import { type Component } from 'vue';
2
- declare const _default: <Model extends string | number, Data extends DefaultData>(__VLS_props: {
2
+ declare const _default: <Model extends string | number, Data extends DefaultData, ApiError, QueryParams>(__VLS_props: {
3
3
  disabled?: boolean | undefined;
4
4
  loading?: boolean | undefined;
5
5
  valueGetter: (value: Data) => Model;
6
6
  onUnselect?: ((value: Model) => any) | undefined;
7
7
  queryParams: QueryParams;
8
- useQueryFn: UsePaginatedQuery<Data>;
8
+ useQueryFn: UseQueryPaginated<Data, ApiError, QueryParams>;
9
+ queryOptions?: Partial<Parameters<UseQueryPaginated<Data, ApiError, QueryParams>>[1]>;
9
10
  optionComponent?: Component<{
10
11
  option: Data;
11
12
  selected?: boolean | undefined;
@@ -41,7 +42,8 @@ declare const _default: <Model extends string | number, Data extends DefaultData
41
42
  valueGetter: (value: Data) => Model;
42
43
  onUnselect?: ((value: Model) => any) | undefined;
43
44
  queryParams: QueryParams;
44
- useQueryFn: UsePaginatedQuery<Data>;
45
+ useQueryFn: UseQueryPaginated<Data, ApiError, QueryParams>;
46
+ queryOptions?: Partial<Parameters<UseQueryPaginated<Data, ApiError, QueryParams>>[1]>;
45
47
  optionComponent?: Component<{
46
48
  option: Data;
47
49
  selected?: boolean | undefined;
@@ -81,7 +83,8 @@ declare const _default: <Model extends string | number, Data extends DefaultData
81
83
  valueGetter: (value: Data) => Model;
82
84
  onUnselect?: ((value: Model) => any) | undefined;
83
85
  queryParams: QueryParams;
84
- useQueryFn: UsePaginatedQuery<Data>;
86
+ useQueryFn: UseQueryPaginated<Data, ApiError, QueryParams>;
87
+ queryOptions?: Partial<Parameters<UseQueryPaginated<Data, ApiError, QueryParams>>[1]>;
85
88
  optionComponent?: Component<{
86
89
  option: Data;
87
90
  selected?: boolean | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"SelectAsyncPrefixPage.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/components/SelectAs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: { type: Function },
18
+ queryOptions: {}
18
19
  },
19
20
  emits: ["unselect", "update:pages-count", "update:fetching"],
20
21
  setup(__props, { emit: __emit }) {
@@ -22,6 +23,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
22
23
  const emit = __emit;
23
24
  const queryEnabled = computed(() => !props.previewData);
24
25
  const { data, isFetching } = props.useQueryFn(toRef(props, "queryParams"), {
26
+ ...props.queryOptions ?? {},
25
27
  enabled: queryEnabled,
26
28
  refetchInterval: false,
27
29
  refetchOnMount: false,
package/dist/main.d.ts CHANGED
@@ -8,5 +8,6 @@ export * from './utils/SemanticType';
8
8
  export * from './utils/HorizontalAlign';
9
9
  export * from './utils/dateTime';
10
10
  export * from './utils/mobile';
11
+ export * from './utils/useDefaultQuery';
11
12
  export * from './utils/utils';
12
13
  //# sourceMappingURL=main.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,wBAAwB,CAAA;AACtD,OAAO,KAAK,QAAQ,MAAM,oBAAoB,CAAA;AAC9C,cAAc,4BAA4B,CAAA;AAE1C,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA;AAC7B,cAAc,8BAA8B,CAAA;AAC5C,cAAc,sBAAsB,CAAA;AACpC,cAAc,yBAAyB,CAAA;AACvC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA"}
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,wBAAwB,CAAA;AACtD,OAAO,KAAK,QAAQ,MAAM,oBAAoB,CAAA;AAC9C,cAAc,4BAA4B,CAAA;AAE1C,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA;AAC7B,cAAc,8BAA8B,CAAA;AAC5C,cAAc,sBAAsB,CAAA;AACpC,cAAc,yBAAyB,CAAA;AACvC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,yBAAyB,CAAA;AACvC,cAAc,eAAe,CAAA"}
package/dist/main.js CHANGED
@@ -70,4 +70,5 @@ export { SemanticType } from './utils/SemanticType.js';
70
70
  export { HorizontalAlign } from './utils/HorizontalAlign.js';
71
71
  export { Month, WeekDay, addDay, addMonth, addYear, dateFormat, dateFormatter, dateRegexp, dateToQueryString, datetimeFormat, durationHumanize, getDurationRound, getStartOfDay, getStartOfMonth, getStartOfWeek, isSameDate, isSameMonth, isSameYear, monthShortFormatter, parseDate, timeFormat, weekdayShortFormatter } from './utils/dateTime.js';
72
72
  export { getIsMobile, getIsTouchDevice } from './utils/mobile.js';
73
+ export { useDefaultQuery } from './utils/useDefaultQuery.js';
73
74
  export { debounce, genId, getAllScrollParents, getScrollParent, hasParent, isClientSide, isEqualArr, isEqualObj, numberCompactFormatter, numberFormatter, percentCompactFormatter, throttle } from './utils/utils.js';
@@ -40,14 +40,16 @@ declare type DefaultData = {id: number, [key: string]: unknown}
40
40
 
41
41
  type Params = Parameters<import('@tanstack/vue-query').QueryClient['setQueriesData']>
42
42
 
43
- declare type QueryParams = Partial<Record<string, unknown> & {page?: number}>
43
+ declare type ApiErrorDefault = unknown
44
44
 
45
- declare type UseDefaultQuery<TQueryFnData = unknown, TError = unknown, TData = TQueryFnData, TQueryKey extends import('@tanstack/vue-query').QueryKey = import('@tanstack/vue-query').QueryKey> =
46
- (...args: Parameters<typeof useQuery<TQueryFnData, TError, TData, TQueryKey>>) => import('@tanstack/vue-query').UseQueryReturnType<TData, TError> & {
47
- setData: (updater: TQueryFnData, options?: Params[2]) => ReturnType<import('@tanstack/vue-query').QueryClient['setQueriesData']>
48
- }
45
+ declare type UseQueryDefault<TQueryFnData = unknown, TError = ApiErrorDefault, TData = TQueryFnData, TQueryKey extends import('@tanstack/vue-query').QueryKey = import('@tanstack/vue-query').QueryKey> =
46
+ typeof import('../utils/useDefaultQuery').useDefaultQuery<TQueryFnData, TError, TData, TQueryKey>
49
47
 
50
- declare type UsePaginatedQuery<Data extends DefaultData = DefaultData> = (
51
- queryParams: import('vue').Ref<QueryParams>,
52
- options?: Partial<Parameters<UseDefaultQuery<PaginatedResponse<Data>>>[0]>
53
- ) => ReturnType<UseDefaultQuery<PaginatedResponse<Data>>>
48
+ declare type QueryOptions<Data, Error = ApiErrorDefault> = Partial<Parameters<typeof import('../utils/useDefaultQuery').useDefaultQuery<Data, Error>>[0]>
49
+
50
+ declare type UseQueryEmpty<Model, ApiError> = (options?: QueryOptions<Model, ApiError>) => ReturnType<typeof import('../utils/useDefaultQuery').useDefaultQuery<Model, ApiError>>
51
+
52
+ declare type UseQueryWithParams<Model, ApiError, QueryParams> =
53
+ (queryParams: import('vue').MaybeRef<QueryParams>, options?: QueryOptions<Model, ApiError>) => ReturnType<typeof import('../utils/useDefaultQuery').useDefaultQuery<Model, ApiError>>
54
+
55
+ declare type UseQueryPaginated<Model, ApiError, QueryParams> = UseQueryWithParams<PaginatedResponse<Model>, ApiError, QueryParams>
@@ -0,0 +1,7 @@
1
+ import { type QueryClient, type UseQueryReturnType, type QueryKey } from '@tanstack/vue-query';
2
+ type Params = Parameters<QueryClient['setQueriesData']>;
3
+ export declare const useDefaultQuery: <TQueryFnData = unknown, TError = unknown, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: import("@tanstack/vue-query").UseQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey>, queryClient?: QueryClient | undefined) => UseQueryReturnType<TData, TError> & {
4
+ setData: (updater: TQueryFnData, options?: Params[2]) => ReturnType<QueryClient['setQueriesData']>;
5
+ };
6
+ export {};
7
+ //# sourceMappingURL=useDefaultQuery.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDefaultQuery.d.ts","sourceRoot":"","sources":["../../src/utils/useDefaultQuery.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,WAAW,EAAE,KAAK,kBAAkB,EAAE,KAAK,QAAQ,EAAC,MAAM,qBAAqB,CAAA;AAEtH,KAAK,MAAM,GAAG,UAAU,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC,CAAA;AAEvD,eAAO,MAAM,eAAe;uBAEL,YAAY,YAAY,MAAM,CAAC,CAAC,CAAC,KAAK,WAAW,WAAW,CAAC,gBAAgB,CAAC,CAAC;CAUrG,CAAA"}
@@ -0,0 +1,12 @@
1
+ import { useQueryClient, useQuery } from '@tanstack/vue-query';
2
+
3
+ const useDefaultQuery = (...args) => {
4
+ const queryClient = args[1] ?? useQueryClient();
5
+ const setData = (updater, options) => queryClient.setQueriesData({ queryKey: "queryKey" in args[0] ? args[0].queryKey : void 0 }, updater, options);
6
+ return {
7
+ ...useQuery(...args),
8
+ setData
9
+ };
10
+ };
11
+
12
+ export { useDefaultQuery };
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/rsmple/eco-vue-js.git"
6
6
  },
7
- "version": "0.4.15",
7
+ "version": "0.5.0",
8
8
  "scripts": {
9
9
  "dev": "vite",
10
10
  "build": "run-p type-check build-only",
@@ -99,6 +99,9 @@
99
99
  "./dist/utils/Tooltip": {
100
100
  "import": "./dist/utils/Tooltip.js"
101
101
  },
102
+ "./dist/utils/useDefaultQuery": {
103
+ "import": "./dist/utils/useDefaultQuery.js"
104
+ },
102
105
  "./dist/components/ActionsBar/WActionsBar.vue": {
103
106
  "import": "./dist/components/ActionsBar/WActionsBar.vue.js"
104
107
  },