eco-vue-js 0.4.15 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. package/dist/components/Button/WButtonAction.vue.js +1 -0
  2. package/dist/components/Button/WButtonGroup.vue.d.ts +12 -6
  3. package/dist/components/Button/WButtonGroup.vue.d.ts.map +1 -1
  4. package/dist/components/Button/WButtonGroup.vue.js +6 -4
  5. package/dist/components/Button/WButtonSelection.vue.d.ts +23 -3
  6. package/dist/components/Button/WButtonSelection.vue.d.ts.map +1 -1
  7. package/dist/components/Button/WButtonSelection.vue.js +8 -6
  8. package/dist/components/Checkbox/WCheckbox.vue.d.ts +4 -0
  9. package/dist/components/Checkbox/WCheckbox.vue.d.ts.map +1 -1
  10. package/dist/components/Checkbox/WCheckbox.vue.js +20 -18
  11. package/dist/components/InfiniteList/WInfiniteList.vue.d.ts +46 -19
  12. package/dist/components/InfiniteList/WInfiniteList.vue.d.ts.map +1 -1
  13. package/dist/components/InfiniteList/WInfiniteList.vue.js +16 -7
  14. package/dist/components/InfiniteList/WInfiniteListPages.vue.d.ts +34 -16
  15. package/dist/components/InfiniteList/WInfiniteListPages.vue.d.ts.map +1 -1
  16. package/dist/components/InfiniteList/WInfiniteListPages.vue.js +29 -13
  17. package/dist/components/InfiniteList/components/InfiniteListPage.vue.d.ts +49 -31
  18. package/dist/components/InfiniteList/components/InfiniteListPage.vue.d.ts.map +1 -1
  19. package/dist/components/InfiniteList/components/InfiniteListPage.vue.js +47 -19
  20. package/dist/components/InfiniteList/components/InfiniteListPageTitle.vue.d.ts +29 -17
  21. package/dist/components/InfiniteList/components/InfiniteListPageTitle.vue.d.ts.map +1 -1
  22. package/dist/components/InfiniteList/components/InfiniteListPageTitle.vue.js +1 -1
  23. package/dist/components/InfiniteList/use/useInfiniteListHeader.js +1 -0
  24. package/dist/components/Input/WInputOptions.vue.d.ts +3 -3
  25. package/dist/components/Input/WInputOptions.vue.d.ts.map +1 -1
  26. package/dist/components/ListCard/WListCard.vue.d.ts +12 -0
  27. package/dist/components/ListCard/WListCard.vue.d.ts.map +1 -1
  28. package/dist/components/ListCard/WListCard.vue.js +17 -8
  29. package/dist/components/Select/WSelectAsync.vue.d.ts +10 -7
  30. package/dist/components/Select/WSelectAsync.vue.d.ts.map +1 -1
  31. package/dist/components/Select/WSelectAsync.vue.js +4 -2
  32. package/dist/components/Select/WSelectAsyncList.vue.d.ts +13 -10
  33. package/dist/components/Select/WSelectAsyncList.vue.d.ts.map +1 -1
  34. package/dist/components/Select/WSelectAsyncList.vue.js +4 -2
  35. package/dist/components/Select/WSelectAsyncSingle.vue.d.ts +10 -7
  36. package/dist/components/Select/WSelectAsyncSingle.vue.d.ts.map +1 -1
  37. package/dist/components/Select/WSelectAsyncSingle.vue.js +4 -2
  38. package/dist/components/Select/components/SelectAsyncList.vue.d.ts +13 -10
  39. package/dist/components/Select/components/SelectAsyncList.vue.d.ts.map +1 -1
  40. package/dist/components/Select/components/SelectAsyncList.vue.js +4 -2
  41. package/dist/components/Select/components/SelectAsyncPrefix.vue.d.ts +10 -7
  42. package/dist/components/Select/components/SelectAsyncPrefix.vue.d.ts.map +1 -1
  43. package/dist/components/Select/components/SelectAsyncPrefix.vue.js +4 -2
  44. package/dist/components/Select/components/SelectAsyncPrefixPage.vue.d.ts +10 -7
  45. package/dist/components/Select/components/SelectAsyncPrefixPage.vue.d.ts.map +1 -1
  46. package/dist/components/Select/components/SelectAsyncPrefixPage.vue.js +3 -1
  47. package/dist/main.d.ts +1 -0
  48. package/dist/main.d.ts.map +1 -1
  49. package/dist/main.js +1 -0
  50. package/dist/types/global.d.ts +11 -9
  51. package/dist/utils/useDefaultQuery.d.ts +7 -0
  52. package/dist/utils/useDefaultQuery.d.ts.map +1 -0
  53. package/dist/utils/useDefaultQuery.js +12 -0
  54. package/package.json +4 -1
@@ -1,13 +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
  required?: boolean | undefined;
4
4
  search: string;
5
5
  title?: string | undefined;
6
6
  disabled?: boolean | undefined;
7
7
  loading?: boolean | undefined;
8
8
  "onUpdate:modelValue"?: ((value: Model | null) => any) | undefined;
9
- modelValue: Model | null;
10
9
  valueGetter?: ((data: Data) => Model) | undefined;
10
+ modelValue: Model | null;
11
11
  icon?: SVGComponent | undefined;
12
12
  readonly?: boolean | undefined;
13
13
  skeleton?: boolean | 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<{
@@ -62,8 +63,8 @@ declare const _default: <Model extends string | number, Data extends DefaultData
62
63
  disabled?: boolean | undefined;
63
64
  loading?: boolean | undefined;
64
65
  "onUpdate:modelValue"?: ((value: Model | null) => any) | undefined;
65
- modelValue: Model | null;
66
66
  valueGetter?: ((data: Data) => Model) | undefined;
67
+ modelValue: Model | null;
67
68
  icon?: SVGComponent | undefined;
68
69
  readonly?: boolean | undefined;
69
70
  skeleton?: boolean | undefined;
@@ -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<{
@@ -122,8 +124,8 @@ declare const _default: <Model extends string | number, Data extends DefaultData
122
124
  disabled?: boolean | undefined;
123
125
  loading?: boolean | undefined;
124
126
  "onUpdate:modelValue"?: ((value: Model | null) => any) | undefined;
125
- modelValue: Model | null;
126
127
  valueGetter?: ((data: Data) => Model) | undefined;
128
+ modelValue: Model | null;
127
129
  icon?: SVGComponent | undefined;
128
130
  readonly?: boolean | undefined;
129
131
  skeleton?: boolean | undefined;
@@ -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;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AG;;;;;;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,21 +1,22 @@
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;
5
5
  loading?: boolean | undefined;
6
6
  "onUpdate:modelValue"?: ((value: Model[]) => any) | undefined;
7
- modelValue: Model[];
8
7
  valueGetter: (data: Data) => Model;
8
+ modelValue: Model[];
9
9
  "onUpdate:count"?: ((value: number) => any) | undefined;
10
10
  onUnselect?: ((value: Model) => any) | undefined;
11
11
  scrollingElement?: Element | null | undefined;
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;
@@ -53,18 +54,19 @@ declare const _default: <Model extends string | number, Data extends DefaultData
53
54
  disabled?: boolean | undefined;
54
55
  loading?: boolean | undefined;
55
56
  "onUpdate:modelValue"?: ((value: Model[]) => any) | undefined;
56
- modelValue: Model[];
57
57
  valueGetter: (data: Data) => Model;
58
+ modelValue: Model[];
58
59
  "onUpdate:count"?: ((value: number) => any) | undefined;
59
60
  onUnselect?: ((value: Model) => any) | undefined;
60
61
  scrollingElement?: Element | null | undefined;
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;
@@ -106,18 +108,19 @@ declare const _default: <Model extends string | number, Data extends DefaultData
106
108
  disabled?: boolean | undefined;
107
109
  loading?: boolean | undefined;
108
110
  "onUpdate:modelValue"?: ((value: Model[]) => any) | undefined;
109
- modelValue: Model[];
110
111
  valueGetter: (data: Data) => Model;
112
+ modelValue: Model[];
111
113
  "onUpdate:count"?: ((value: number) => any) | undefined;
112
114
  onUnselect?: ((value: Model) => any) | undefined;
113
115
  scrollingElement?: Element | null | undefined;
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;wBAeC,IAAI,KA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;;;;;;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
- modelValue: Model[];
7
6
  valueGetter: (value: Data) => Model;
7
+ modelValue: 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;
@@ -40,10 +41,11 @@ declare const _default: <Model extends string | number, Data extends DefaultData
40
41
  disabled?: boolean | undefined;
41
42
  loading?: boolean | undefined;
42
43
  "onUpdate:modelValue"?: ((value: Model[]) => any) | undefined;
43
- modelValue: Model[];
44
44
  valueGetter: (value: Data) => Model;
45
+ modelValue: 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;
@@ -81,10 +83,11 @@ declare const _default: <Model extends string | number, Data extends DefaultData
81
83
  disabled?: boolean | undefined;
82
84
  loading?: boolean | undefined;
83
85
  "onUpdate:modelValue"?: ((value: Model[]) => any) | undefined;
84
- modelValue: Model[];
85
86
  valueGetter: (value: Data) => Model;
87
+ modelValue: 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;;oBAO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,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;wBANhD,IAAI;;;;;;;;2BAK1B,MAAM;;wBAQP,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;eAClD,GAAG;;+BA5LU;gBAAC,MAAM,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,18 +1,19 @@
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
+ "onUpdate:pages-count"?: ((value: number) => any) | undefined;
9
+ useQueryFn: UseQueryPaginated<Data, ApiError, QueryParams>;
10
+ queryOptions?: Partial<Parameters<UseQueryPaginated<Data, ApiError, QueryParams>>[1]>;
9
11
  optionComponent?: Component<{
10
12
  option: Data;
11
13
  selected?: boolean | undefined;
12
14
  model?: boolean | undefined;
13
15
  }> | undefined;
14
16
  disableClear?: boolean | undefined;
15
- "onUpdate:pages-count"?: ((value: number) => any) | undefined;
16
17
  "onUpdate:fetching"?: ((value: boolean) => any) | undefined;
17
18
  previewData?: Data[] | undefined;
18
19
  createdData?: Data[] | undefined;
@@ -41,14 +42,15 @@ 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
+ "onUpdate:pages-count"?: ((value: number) => any) | undefined;
46
+ useQueryFn: UseQueryPaginated<Data, ApiError, QueryParams>;
47
+ queryOptions?: Partial<Parameters<UseQueryPaginated<Data, ApiError, QueryParams>>[1]>;
45
48
  optionComponent?: Component<{
46
49
  option: Data;
47
50
  selected?: boolean | undefined;
48
51
  model?: boolean | undefined;
49
52
  }> | undefined;
50
53
  disableClear?: boolean | undefined;
51
- "onUpdate:pages-count"?: ((value: number) => any) | undefined;
52
54
  "onUpdate:fetching"?: ((value: boolean) => any) | undefined;
53
55
  previewData?: Data[] | undefined;
54
56
  createdData?: Data[] | undefined;
@@ -81,14 +83,15 @@ 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
+ "onUpdate:pages-count"?: ((value: number) => any) | undefined;
87
+ useQueryFn: UseQueryPaginated<Data, ApiError, QueryParams>;
88
+ queryOptions?: Partial<Parameters<UseQueryPaginated<Data, ApiError, QueryParams>>[1]>;
85
89
  optionComponent?: Component<{
86
90
  option: Data;
87
91
  selected?: boolean | undefined;
88
92
  model?: boolean | undefined;
89
93
  }> | undefined;
90
94
  disableClear?: boolean | undefined;
91
- "onUpdate:pages-count"?: ((value: number) => any) | undefined;
92
95
  "onUpdate:fetching"?: ((value: boolean) => any) | undefined;
93
96
  previewData?: Data[] | undefined;
94
97
  createdData?: Data[] | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"SelectAsyncPrefixPage.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/components/SelectAsyncPrefixPage.vue"],"names":[],"mappings":"AAwDA;AAEA,OAAO,EAAyB,KAAK,SAAS,EAAkB,MAAM,KAAK,CAAA;;;;yBA8OpD,IAAI,KAAK,KAAK;;iBAPtB,WAAW;gBADZ,kBAAkB,IAAI,CAAC;;gBAIE,IAAI;;;;;;;;;;WAYpC,GAAG;;2BA9LU;YAAC,MAAM,EAAE,IAAI,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAA;SAAC,KAAK,IAAI;;2BAA1C;YAAC,MAAM,EAAE,IAAI,CAAC;YAAC,QAAQ,EA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xD,UAAU,SAAS,KAAK,GAAG,IAAI;YAC/B,oBAAoB,SAAS,MAAM,GAAG,IAAI;YAC1C,iBAAiB,SAAS,OAAO,GAAG,IAAI;;;;;;;;;iCAsNvB,IAAI,KAAK,KAAK;;yBAPtB,WAAW;;wBADZ,kBAAkB,IAAI,EAAE,QAAQ,EAAE,WAAW,CAAC;2BAS3C,QAAQ,WAAW,kBAAkB,IAAI,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;wBALhD,IAAI;;;;;;;;;wBAY3B,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;eAClD,GAAG;;+BA/LU;gBAAC,MAAM,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;;;gBAlCxD,UAAU,SAAS,KAAK,GAAG,IAAI;gBAC/B,oBAAoB,SAAS,MAAM,GAAG,IAAI;gBAC1C,iBAAiB,SAAS,OAAO,GAAG,IAAI;;;;AAtB9C,wBA0P2E"}
@@ -14,7 +14,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
14
14
  disableClear: { type: Boolean },
15
15
  previewData: {},
16
16
  createdData: {},
17
- valueGetter: { type: Function }
17
+ valueGetter: { 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.1",
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
  },