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.
- package/dist/components/Button/WButtonAction.vue.js +1 -0
- package/dist/components/Button/WButtonGroup.vue.d.ts +12 -6
- package/dist/components/Button/WButtonGroup.vue.d.ts.map +1 -1
- package/dist/components/Button/WButtonGroup.vue.js +6 -4
- package/dist/components/Button/WButtonSelection.vue.d.ts +23 -3
- package/dist/components/Button/WButtonSelection.vue.d.ts.map +1 -1
- package/dist/components/Button/WButtonSelection.vue.js +8 -6
- package/dist/components/Checkbox/WCheckbox.vue.d.ts +4 -0
- package/dist/components/Checkbox/WCheckbox.vue.d.ts.map +1 -1
- package/dist/components/Checkbox/WCheckbox.vue.js +20 -18
- package/dist/components/InfiniteList/WInfiniteList.vue.d.ts +46 -19
- package/dist/components/InfiniteList/WInfiniteList.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/WInfiniteList.vue.js +16 -7
- package/dist/components/InfiniteList/WInfiniteListPages.vue.d.ts +34 -16
- package/dist/components/InfiniteList/WInfiniteListPages.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/WInfiniteListPages.vue.js +29 -13
- package/dist/components/InfiniteList/components/InfiniteListPage.vue.d.ts +49 -31
- package/dist/components/InfiniteList/components/InfiniteListPage.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/components/InfiniteListPage.vue.js +47 -19
- package/dist/components/InfiniteList/components/InfiniteListPageTitle.vue.d.ts +29 -17
- package/dist/components/InfiniteList/components/InfiniteListPageTitle.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/components/InfiniteListPageTitle.vue.js +1 -1
- package/dist/components/InfiniteList/use/useInfiniteListHeader.js +1 -0
- package/dist/components/Input/WInputOptions.vue.d.ts +3 -3
- package/dist/components/Input/WInputOptions.vue.d.ts.map +1 -1
- package/dist/components/ListCard/WListCard.vue.d.ts +12 -0
- package/dist/components/ListCard/WListCard.vue.d.ts.map +1 -1
- package/dist/components/ListCard/WListCard.vue.js +17 -8
- package/dist/components/Select/WSelectAsync.vue.d.ts +10 -7
- package/dist/components/Select/WSelectAsync.vue.d.ts.map +1 -1
- package/dist/components/Select/WSelectAsync.vue.js +4 -2
- package/dist/components/Select/WSelectAsyncList.vue.d.ts +13 -10
- package/dist/components/Select/WSelectAsyncList.vue.d.ts.map +1 -1
- package/dist/components/Select/WSelectAsyncList.vue.js +4 -2
- package/dist/components/Select/WSelectAsyncSingle.vue.d.ts +10 -7
- package/dist/components/Select/WSelectAsyncSingle.vue.d.ts.map +1 -1
- package/dist/components/Select/WSelectAsyncSingle.vue.js +4 -2
- package/dist/components/Select/components/SelectAsyncList.vue.d.ts +13 -10
- package/dist/components/Select/components/SelectAsyncList.vue.d.ts.map +1 -1
- package/dist/components/Select/components/SelectAsyncList.vue.js +4 -2
- package/dist/components/Select/components/SelectAsyncPrefix.vue.d.ts +10 -7
- package/dist/components/Select/components/SelectAsyncPrefix.vue.d.ts.map +1 -1
- package/dist/components/Select/components/SelectAsyncPrefix.vue.js +4 -2
- package/dist/components/Select/components/SelectAsyncPrefixPage.vue.d.ts +10 -7
- package/dist/components/Select/components/SelectAsyncPrefixPage.vue.d.ts.map +1 -1
- package/dist/components/Select/components/SelectAsyncPrefixPage.vue.js +3 -1
- package/dist/main.d.ts +1 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +1 -0
- package/dist/types/global.d.ts +11 -9
- package/dist/utils/useDefaultQuery.d.ts +7 -0
- package/dist/utils/useDefaultQuery.d.ts.map +1 -0
- package/dist/utils/useDefaultQuery.js +12 -0
- package/package.json +4 -1
@@ -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:
|
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?:
|
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<{
|
@@ -40,6 +41,8 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
40
41
|
first: boolean;
|
41
42
|
last: boolean;
|
42
43
|
resetting: boolean;
|
44
|
+
page: number;
|
45
|
+
index: number;
|
43
46
|
}) => void) | undefined;
|
44
47
|
}> & {
|
45
48
|
default?: ((props: {
|
@@ -52,6 +55,8 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
52
55
|
first: boolean;
|
53
56
|
last: boolean;
|
54
57
|
resetting: boolean;
|
58
|
+
page: number;
|
59
|
+
index: number;
|
55
60
|
}) => void) | undefined;
|
56
61
|
};
|
57
62
|
emit: {
|
@@ -60,7 +65,8 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
60
65
|
(e: 'update:selected', values: Model[]): void;
|
61
66
|
};
|
62
67
|
} | undefined, __VLS_expose?: ((exposed: import("vue").ShallowUnwrapRef<{
|
63
|
-
resetPage: () => void
|
68
|
+
resetPage: (page?: number) => Promise<void>;
|
69
|
+
goto: (page?: number, itemIndex?: number) => Promise<void>;
|
64
70
|
}>) => void) | undefined, __VLS_setup?: Promise<{
|
65
71
|
props: {
|
66
72
|
transition?: boolean | undefined;
|
@@ -68,12 +74,12 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
68
74
|
wrap?: boolean | undefined;
|
69
75
|
"onUpdate:count"?: ((value: number) => any) | undefined;
|
70
76
|
scrollingElement?: Element | null | undefined;
|
71
|
-
queryParams: QueryParams;
|
72
77
|
"onUpdate:selected"?: ((values: Model[]) => any) | undefined;
|
78
|
+
queryParams: QueryParams;
|
73
79
|
selected?: Model[] | undefined;
|
74
80
|
selectOnly?: boolean | undefined;
|
75
81
|
unselectOnly?: boolean | undefined;
|
76
|
-
useQueryFn:
|
82
|
+
useQueryFn: UseQueryPaginated<Data, ApiError, QueryParams>;
|
77
83
|
isInvalidPage: (error: unknown) => boolean;
|
78
84
|
skeletonLength?: number | undefined;
|
79
85
|
hidePageTitle?: boolean | undefined;
|
@@ -84,16 +90,18 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
84
90
|
minHeight?: boolean | undefined;
|
85
91
|
pageClass?: string | undefined;
|
86
92
|
refetchInterval?: number | false | undefined;
|
93
|
+
queryOptions?: Partial<Parameters<UseQueryPaginated<Data, ApiError, QueryParams>>[1]>;
|
94
|
+
maxPages?: number | undefined;
|
87
95
|
"onUpdate:page"?: ((value: number | undefined) => any) | undefined;
|
88
96
|
skipScrollTarget?: boolean | undefined;
|
89
97
|
pageLength?: number | undefined;
|
90
98
|
headerTop?: number | undefined;
|
91
99
|
headerHeight?: number | undefined;
|
92
|
-
excludeParams?:
|
93
|
-
maxPages?: number | undefined;
|
100
|
+
excludeParams?: (keyof QueryParams)[] | undefined;
|
94
101
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
95
102
|
expose(exposed: import("vue").ShallowUnwrapRef<{
|
96
|
-
resetPage: () => void
|
103
|
+
resetPage: (page?: number) => Promise<void>;
|
104
|
+
goto: (page?: number, itemIndex?: number) => Promise<void>;
|
97
105
|
}>): void;
|
98
106
|
attrs: any;
|
99
107
|
slots: Readonly<{
|
@@ -107,6 +115,8 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
107
115
|
first: boolean;
|
108
116
|
last: boolean;
|
109
117
|
resetting: boolean;
|
118
|
+
page: number;
|
119
|
+
index: number;
|
110
120
|
}) => void) | undefined;
|
111
121
|
}> & {
|
112
122
|
default?: ((props: {
|
@@ -119,6 +129,8 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
119
129
|
first: boolean;
|
120
130
|
last: boolean;
|
121
131
|
resetting: boolean;
|
132
|
+
page: number;
|
133
|
+
index: number;
|
122
134
|
}) => void) | undefined;
|
123
135
|
};
|
124
136
|
emit: {
|
@@ -136,12 +148,12 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
136
148
|
wrap?: boolean | undefined;
|
137
149
|
"onUpdate:count"?: ((value: number) => any) | undefined;
|
138
150
|
scrollingElement?: Element | null | undefined;
|
139
|
-
queryParams: QueryParams;
|
140
151
|
"onUpdate:selected"?: ((values: Model[]) => any) | undefined;
|
152
|
+
queryParams: QueryParams;
|
141
153
|
selected?: Model[] | undefined;
|
142
154
|
selectOnly?: boolean | undefined;
|
143
155
|
unselectOnly?: boolean | undefined;
|
144
|
-
useQueryFn:
|
156
|
+
useQueryFn: UseQueryPaginated<Data, ApiError, QueryParams>;
|
145
157
|
isInvalidPage: (error: unknown) => boolean;
|
146
158
|
skeletonLength?: number | undefined;
|
147
159
|
hidePageTitle?: boolean | undefined;
|
@@ -152,16 +164,18 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
152
164
|
minHeight?: boolean | undefined;
|
153
165
|
pageClass?: string | undefined;
|
154
166
|
refetchInterval?: number | false | undefined;
|
167
|
+
queryOptions?: Partial<Parameters<UseQueryPaginated<Data, ApiError, QueryParams>>[1]>;
|
168
|
+
maxPages?: number | undefined;
|
155
169
|
"onUpdate:page"?: ((value: number | undefined) => any) | undefined;
|
156
170
|
skipScrollTarget?: boolean | undefined;
|
157
171
|
pageLength?: number | undefined;
|
158
172
|
headerTop?: number | undefined;
|
159
173
|
headerHeight?: number | undefined;
|
160
|
-
excludeParams?:
|
161
|
-
maxPages?: number | undefined;
|
174
|
+
excludeParams?: (keyof QueryParams)[] | undefined;
|
162
175
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
163
176
|
expose(exposed: import("vue").ShallowUnwrapRef<{
|
164
|
-
resetPage: () => void
|
177
|
+
resetPage: (page?: number) => Promise<void>;
|
178
|
+
goto: (page?: number, itemIndex?: number) => Promise<void>;
|
165
179
|
}>): void;
|
166
180
|
attrs: any;
|
167
181
|
slots: Readonly<{
|
@@ -175,6 +189,8 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
175
189
|
first: boolean;
|
176
190
|
last: boolean;
|
177
191
|
resetting: boolean;
|
192
|
+
page: number;
|
193
|
+
index: number;
|
178
194
|
}) => void) | undefined;
|
179
195
|
}> & {
|
180
196
|
default?: ((props: {
|
@@ -187,6 +203,8 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
187
203
|
first: boolean;
|
188
204
|
last: boolean;
|
189
205
|
resetting: boolean;
|
206
|
+
page: number;
|
207
|
+
index: number;
|
190
208
|
}) => void) | undefined;
|
191
209
|
};
|
192
210
|
emit: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WInfiniteListPages.vue.d.ts","sourceRoot":"","sources":["../../../src/components/InfiniteList/WInfiniteListPages.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"WInfiniteListPages.vue.d.ts","sourceRoot":"","sources":["../../../src/components/InfiniteList/WInfiniteListPages.vue"],"names":[],"mappings":"AA2EA;;;wBAmewB,IAAI,KAAK,KAAK;;;;;iBAtBrB,WAAW;;;;gBAFZ,kBAAkB,IAAI,EAAE,QAAQ,EAAE,WAAW,CAAC;2BACnC,OAAO,KAAK,OAAO;;;;;;;;;;mBAwB3B,QAAQ,WAAW,kBAAkB,IAAI,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;;;;;;;;WAQlF,GAAG;;;kBAnRA,IAAI;+BACS,IAAI,GAAG,SAAS,KAAK,IAAI;sBAClC,OAAO;qBACR,MAAM,IAAI;;;mBAGZ,OAAO;kBACR,OAAO;uBACF,OAAO;kBACZ,MAAM;mBACL,MAAM;cACT,IAAI;;;kBAXF,IAAI;+BACS,IAAI,GAAG,SAAS,KAAK,IAAI;sBAClC,OAAO;qBACR,MAAM,IAAI;;;mBAGZ,OAAO;kBACR,OAAO;uBACF,OAAO;kBACZ,MAAM;mBACL,MAAM;cACT,IAAI;;;YArKN,aAAa,SAAS,MAAM,GAAG,SAAS,GAAG,IAAI;YAC/C,cAAc,SAAS,MAAM,GAAG,IAAI;YACpC,iBAAiB,UAAU,KAAK,EAAE,GAAG,IAAI;;;;sCA2GL,MAAM;OA+TuB,IAAI;;;4BARnD,IAAI,KAAK,KAAK;;;;;qBAtBrB,WAAW;;;;oBAFZ,kBAAkB,IAAI,EAAE,QAAQ,EAAE,WAAW,CAAC;+BACnC,OAAO,KAAK,OAAO;;;;;;;;;;uBAwB3B,QAAQ,WAAW,kBAAkB,IAAI,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;;;;;;;;;;0CAxT/C,MAAM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AAG,IAAI;;;;AAtD/C,wBAse2E;AAQ3E,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { defineComponent, ref, computed, watch, toRef, openBlock, createBlock, normalizeStyle, withCtx, createCommentVNode, createElementBlock, Fragment, renderList,
|
1
|
+
import { defineComponent, ref, computed, watch, toRef, openBlock, createBlock, normalizeStyle, withCtx, createCommentVNode, createElementBlock, Fragment, renderList, nextTick, unref, renderSlot } from 'vue';
|
2
2
|
import _sfc_main$1 from './components/InfiniteListScroll.vue.js';
|
3
3
|
import _sfc_main$3 from './components/InfiniteListPage.vue.js';
|
4
4
|
import { useRefetchNextPages } from './use/useRefetchNextPages.js';
|
@@ -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: { default: void 0 }
|
37
38
|
},
|
38
39
|
emits: ["update:page", "update:count", "update:selected"],
|
39
40
|
setup(__props, { expose: __expose, emit: __emit }) {
|
@@ -115,6 +116,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
115
116
|
element.scrollTop = element.scrollTop + height;
|
116
117
|
};
|
117
118
|
const removePage = (page) => {
|
119
|
+
if (previousPage.value === page)
|
120
|
+
previousPage.value = null;
|
121
|
+
if (nextPage.value === page)
|
122
|
+
nextPage.value = null;
|
118
123
|
const index = pages.value.indexOf(page);
|
119
124
|
if (index === -1)
|
120
125
|
return;
|
@@ -123,10 +128,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
123
128
|
pages.value = [1];
|
124
129
|
emit("update:page", pages.value[pages.value.length - 1]);
|
125
130
|
};
|
126
|
-
const
|
131
|
+
const goto = async (page = 1, itemIndex) => {
|
132
|
+
const index = pages.value.indexOf(page);
|
133
|
+
if (index !== -1) {
|
134
|
+
pageComponent.value[index].scrollTo(itemIndex);
|
135
|
+
return;
|
136
|
+
}
|
137
|
+
resetPage(page);
|
138
|
+
};
|
139
|
+
const resetPage = async (page = 1) => {
|
127
140
|
isResettingPage.value = true;
|
128
|
-
emit("update:page", void 0);
|
129
|
-
pages.value = [
|
141
|
+
emit("update:page", page === 1 ? void 0 : page);
|
142
|
+
pages.value = [];
|
143
|
+
await nextTick();
|
144
|
+
pages.value = [page];
|
130
145
|
nextPage.value = null;
|
131
146
|
previousPage.value = null;
|
132
147
|
if (!props.skipScrollTarget)
|
@@ -139,7 +154,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
139
154
|
});
|
140
155
|
watch(count, (value) => emit("update:count", value), { immediate: true });
|
141
156
|
__expose({
|
142
|
-
resetPage
|
157
|
+
resetPage,
|
158
|
+
goto
|
143
159
|
});
|
144
160
|
return (_ctx, _cache) => {
|
145
161
|
return openBlock(), createBlock(_sfc_main$1, {
|
@@ -183,9 +199,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
183
199
|
"refetch-interval": _ctx.refetchInterval,
|
184
200
|
"scrolling-element": _ctx.scrollingElement,
|
185
201
|
"value-getter": _ctx.valueGetter,
|
186
|
-
|
187
|
-
"last:min-h-[calc(100vh-var(--header-height)-var(--infinite-list-header-height))] last:pb-16": !_ctx.minHeight
|
188
|
-
}),
|
202
|
+
"query-options": _ctx.queryOptions,
|
189
203
|
"onUpdate:count": updateCount,
|
190
204
|
"onUpdate:pagesCount": updatePagesCount,
|
191
205
|
"onUpdate:nextPage": _cache[1] || (_cache[1] = ($event) => {
|
@@ -198,12 +212,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
198
212
|
}),
|
199
213
|
"onUpdate:scroll": updateScroll,
|
200
214
|
"onUpdateFromHeader:scroll": _cache[3] || (_cache[3] = ($event) => _ctx.headerTop > 0 && nextTick(() => updateScroll(_ctx.headerTop))),
|
201
|
-
"
|
215
|
+
"onRemove:page": removePage,
|
202
216
|
onRefetch: ($event) => unref(refetchNextPages)(index),
|
203
217
|
"onUpdate:selected": _cache[4] || (_cache[4] = ($event) => _ctx.$emit("update:selected", $event)),
|
204
218
|
onFetched: _cache[5] || (_cache[5] = ($event) => isResettingPage.value = false)
|
205
219
|
}, {
|
206
|
-
default: withCtx(({ item, setter, skeleton, refetch, previous, next, first, last }) => [
|
220
|
+
default: withCtx(({ item, setter, skeleton, refetch, previous, next, first, last, page: itemPage, index: itemIndex }) => [
|
207
221
|
renderSlot(_ctx.$slots, "default", {
|
208
222
|
item,
|
209
223
|
setter,
|
@@ -213,11 +227,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
213
227
|
next: next ?? unref(pageComponent)[index + 1]?.getFirst() ?? unref(pageComponent)[0]?.getFirst(),
|
214
228
|
first,
|
215
229
|
last,
|
216
|
-
resetting: isResettingPage.value
|
230
|
+
resetting: isResettingPage.value,
|
231
|
+
page: itemPage,
|
232
|
+
index: itemIndex
|
217
233
|
})
|
218
234
|
]),
|
219
235
|
_: 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", "
|
236
|
+
}, 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", "onRefetch"]);
|
221
237
|
}), 128)),
|
222
238
|
count.value !== 0 && nextPage.value ? (openBlock(), createBlock(_sfc_main$2, {
|
223
239
|
key: 1,
|
@@ -1,23 +1,23 @@
|
|
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
|
-
"onUpdate:
|
13
|
-
"onUpdate:
|
14
|
-
"onUpdate:
|
12
|
+
"onUpdate:pages-count"?: ((value: number) => any) | undefined;
|
13
|
+
"onUpdate:next-page"?: ((value: number | null) => any) | undefined;
|
14
|
+
"onUpdate:previous-page"?: ((value: number | null) => any) | undefined;
|
15
15
|
"onUpdate:scroll"?: ((value: number) => any) | undefined;
|
16
|
-
"
|
16
|
+
"onRemove:page"?: ((value: number) => any) | undefined;
|
17
17
|
onRefetch?: (() => any) | undefined;
|
18
18
|
"onUpdate-from-header:scroll"?: (() => any) | undefined;
|
19
19
|
onFetched?: (() => any) | undefined;
|
20
|
-
useQueryFn:
|
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<{
|
@@ -43,6 +44,8 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
43
44
|
next?: Data | undefined;
|
44
45
|
first: boolean;
|
45
46
|
last: boolean;
|
47
|
+
page: number;
|
48
|
+
index: number;
|
46
49
|
}) => void) | undefined;
|
47
50
|
}> & {
|
48
51
|
default?: ((props: {
|
@@ -54,15 +57,17 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
54
57
|
next?: Data | undefined;
|
55
58
|
first: boolean;
|
56
59
|
last: boolean;
|
60
|
+
page: number;
|
61
|
+
index: number;
|
57
62
|
}) => void) | undefined;
|
58
63
|
};
|
59
64
|
emit: {
|
60
65
|
(e: 'update:count', value: number): void;
|
61
|
-
(e: 'update:
|
62
|
-
(e: 'update:
|
63
|
-
(e: 'update:
|
66
|
+
(e: 'update:pages-count', value: number): void;
|
67
|
+
(e: 'update:next-page', value: number | null): void;
|
68
|
+
(e: 'update:previous-page', value: number | null): void;
|
64
69
|
(e: 'update:scroll', value: number): void;
|
65
|
-
(e: '
|
70
|
+
(e: 'remove:page', value: number): void;
|
66
71
|
(e: 'refetch'): void;
|
67
72
|
(e: 'update-from-header:scroll'): void;
|
68
73
|
(e: 'update:selected', values: Model[]): void;
|
@@ -72,6 +77,7 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
72
77
|
getFirst: () => Data | undefined;
|
73
78
|
getLast: () => Data | undefined;
|
74
79
|
refetch: () => Promise<void>;
|
80
|
+
scrollTo: (index?: number) => void;
|
75
81
|
}>) => void) | undefined, __VLS_setup?: Promise<{
|
76
82
|
props: {
|
77
83
|
transition?: boolean | undefined;
|
@@ -79,20 +85,20 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
79
85
|
wrap?: boolean | undefined;
|
80
86
|
"onUpdate:count"?: ((value: number) => any) | undefined;
|
81
87
|
scrollingElement?: Element | null | undefined;
|
82
|
-
queryParams: QueryParams;
|
83
88
|
"onUpdate:selected"?: ((values: Model[]) => any) | undefined;
|
89
|
+
queryParams: QueryParams;
|
84
90
|
selected?: Model[] | undefined;
|
85
91
|
selectOnly?: boolean | undefined;
|
86
92
|
unselectOnly?: boolean | undefined;
|
87
|
-
"onUpdate:
|
88
|
-
"onUpdate:
|
89
|
-
"onUpdate:
|
93
|
+
"onUpdate:pages-count"?: ((value: number) => any) | undefined;
|
94
|
+
"onUpdate:next-page"?: ((value: number | null) => any) | undefined;
|
95
|
+
"onUpdate:previous-page"?: ((value: number | null) => any) | undefined;
|
90
96
|
"onUpdate:scroll"?: ((value: number) => any) | undefined;
|
91
|
-
"
|
97
|
+
"onRemove:page"?: ((value: number) => any) | undefined;
|
92
98
|
onRefetch?: (() => any) | undefined;
|
93
99
|
"onUpdate-from-header:scroll"?: (() => any) | undefined;
|
94
100
|
onFetched?: (() => any) | undefined;
|
95
|
-
useQueryFn:
|
101
|
+
useQueryFn: UseQueryPaginated<Data, ApiError, QueryParams>;
|
96
102
|
isInvalidPage: (error: unknown) => boolean;
|
97
103
|
skeletonLength: number;
|
98
104
|
firstPage: boolean;
|
@@ -106,11 +112,13 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
106
112
|
minHeight?: boolean | undefined;
|
107
113
|
pageClass?: string | undefined;
|
108
114
|
refetchInterval?: number | false | undefined;
|
115
|
+
queryOptions?: Partial<Parameters<UseQueryPaginated<Data, ApiError, QueryParams>>[1]>;
|
109
116
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
110
117
|
expose(exposed: import("vue").ShallowUnwrapRef<{
|
111
118
|
getFirst: () => Data | undefined;
|
112
119
|
getLast: () => Data | undefined;
|
113
120
|
refetch: () => Promise<void>;
|
121
|
+
scrollTo: (index?: number) => void;
|
114
122
|
}>): void;
|
115
123
|
attrs: any;
|
116
124
|
slots: Readonly<{
|
@@ -123,6 +131,8 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
123
131
|
next?: Data | undefined;
|
124
132
|
first: boolean;
|
125
133
|
last: boolean;
|
134
|
+
page: number;
|
135
|
+
index: number;
|
126
136
|
}) => void) | undefined;
|
127
137
|
}> & {
|
128
138
|
default?: ((props: {
|
@@ -134,15 +144,17 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
134
144
|
next?: Data | undefined;
|
135
145
|
first: boolean;
|
136
146
|
last: boolean;
|
147
|
+
page: number;
|
148
|
+
index: number;
|
137
149
|
}) => void) | undefined;
|
138
150
|
};
|
139
151
|
emit: {
|
140
152
|
(e: 'update:count', value: number): void;
|
141
|
-
(e: 'update:
|
142
|
-
(e: 'update:
|
143
|
-
(e: 'update:
|
153
|
+
(e: 'update:pages-count', value: number): void;
|
154
|
+
(e: 'update:next-page', value: number | null): void;
|
155
|
+
(e: 'update:previous-page', value: number | null): void;
|
144
156
|
(e: 'update:scroll', value: number): void;
|
145
|
-
(e: '
|
157
|
+
(e: 'remove:page', value: number): void;
|
146
158
|
(e: 'refetch'): void;
|
147
159
|
(e: 'update-from-header:scroll'): void;
|
148
160
|
(e: 'update:selected', values: Model[]): void;
|
@@ -158,20 +170,20 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
158
170
|
wrap?: boolean | undefined;
|
159
171
|
"onUpdate:count"?: ((value: number) => any) | undefined;
|
160
172
|
scrollingElement?: Element | null | undefined;
|
161
|
-
queryParams: QueryParams;
|
162
173
|
"onUpdate:selected"?: ((values: Model[]) => any) | undefined;
|
174
|
+
queryParams: QueryParams;
|
163
175
|
selected?: Model[] | undefined;
|
164
176
|
selectOnly?: boolean | undefined;
|
165
177
|
unselectOnly?: boolean | undefined;
|
166
|
-
"onUpdate:
|
167
|
-
"onUpdate:
|
168
|
-
"onUpdate:
|
178
|
+
"onUpdate:pages-count"?: ((value: number) => any) | undefined;
|
179
|
+
"onUpdate:next-page"?: ((value: number | null) => any) | undefined;
|
180
|
+
"onUpdate:previous-page"?: ((value: number | null) => any) | undefined;
|
169
181
|
"onUpdate:scroll"?: ((value: number) => any) | undefined;
|
170
|
-
"
|
182
|
+
"onRemove:page"?: ((value: number) => any) | undefined;
|
171
183
|
onRefetch?: (() => any) | undefined;
|
172
184
|
"onUpdate-from-header:scroll"?: (() => any) | undefined;
|
173
185
|
onFetched?: (() => any) | undefined;
|
174
|
-
useQueryFn:
|
186
|
+
useQueryFn: UseQueryPaginated<Data, ApiError, QueryParams>;
|
175
187
|
isInvalidPage: (error: unknown) => boolean;
|
176
188
|
skeletonLength: number;
|
177
189
|
firstPage: boolean;
|
@@ -185,11 +197,13 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
185
197
|
minHeight?: boolean | undefined;
|
186
198
|
pageClass?: string | undefined;
|
187
199
|
refetchInterval?: number | false | undefined;
|
200
|
+
queryOptions?: Partial<Parameters<UseQueryPaginated<Data, ApiError, QueryParams>>[1]>;
|
188
201
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
189
202
|
expose(exposed: import("vue").ShallowUnwrapRef<{
|
190
203
|
getFirst: () => Data | undefined;
|
191
204
|
getLast: () => Data | undefined;
|
192
205
|
refetch: () => Promise<void>;
|
206
|
+
scrollTo: (index?: number) => void;
|
193
207
|
}>): void;
|
194
208
|
attrs: any;
|
195
209
|
slots: Readonly<{
|
@@ -202,6 +216,8 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
202
216
|
next?: Data | undefined;
|
203
217
|
first: boolean;
|
204
218
|
last: boolean;
|
219
|
+
page: number;
|
220
|
+
index: number;
|
205
221
|
}) => void) | undefined;
|
206
222
|
}> & {
|
207
223
|
default?: ((props: {
|
@@ -213,15 +229,17 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
213
229
|
next?: Data | undefined;
|
214
230
|
first: boolean;
|
215
231
|
last: boolean;
|
232
|
+
page: number;
|
233
|
+
index: number;
|
216
234
|
}) => void) | undefined;
|
217
235
|
};
|
218
236
|
emit: {
|
219
237
|
(e: 'update:count', value: number): void;
|
220
|
-
(e: 'update:
|
221
|
-
(e: 'update:
|
222
|
-
(e: 'update:
|
238
|
+
(e: 'update:pages-count', value: number): void;
|
239
|
+
(e: 'update:next-page', value: number | null): void;
|
240
|
+
(e: 'update:previous-page', value: number | null): void;
|
223
241
|
(e: 'update:scroll', value: number): void;
|
224
|
-
(e: '
|
242
|
+
(e: 'remove:page', value: number): void;
|
225
243
|
(e: 'refetch'): void;
|
226
244
|
(e: 'update-from-header:scroll'): void;
|
227
245
|
(e: 'update:selected', values: Model[]): void;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"InfiniteListPage.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/InfiniteList/components/InfiniteListPage.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"InfiniteListPage.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/InfiniteList/components/InfiniteListPage.vue"],"names":[],"mappings":"AAkIA;;;wBAwgBwB,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;;;kBAxTA,IAAI;+BACS,IAAI,GAAG,SAAS,KAAK,IAAI;sBAClC,OAAO;qBACR,MAAM,IAAI;;;mBAGZ,OAAO;kBACR,OAAO;kBACP,MAAM;mBACL,MAAM;cACT,IAAI;;;kBAVF,IAAI;+BACS,IAAI,GAAG,SAAS,KAAK,IAAI;sBAClC,OAAO;qBACR,MAAM,IAAI;;;mBAGZ,OAAO;kBACR,OAAO;kBACP,MAAM;mBACL,MAAM;cACT,IAAI;;;YA/KN,cAAc,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