eco-vue-js 0.5.0 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/Button/WButton.vue.d.ts +14 -26
- package/dist/components/Button/WButton.vue.d.ts.map +1 -1
- package/dist/components/Button/WButton.vue.js +0 -1
- package/dist/components/Button/WButtonAction.vue.d.ts +11 -21
- package/dist/components/Button/WButtonAction.vue.d.ts.map +1 -1
- package/dist/components/Button/WButtonAction.vue.js +0 -1
- 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/WButtonMoreItem.vue.d.ts +7 -15
- package/dist/components/Button/WButtonMoreItem.vue.d.ts.map +1 -1
- package/dist/components/Button/WButtonMoreItem.vue.js +0 -1
- 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 +30 -6
- package/dist/components/InfiniteList/WInfiniteList.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/WInfiniteList.vue.js +13 -6
- package/dist/components/InfiniteList/WInfiniteListPages.vue.d.ts +18 -3
- package/dist/components/InfiniteList/WInfiniteListPages.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/WInfiniteListPages.vue.js +27 -13
- package/dist/components/InfiniteList/components/InfiniteListPage.vue.d.ts +39 -24
- package/dist/components/InfiniteList/components/InfiniteListPage.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/components/InfiniteListPage.vue.js +44 -18
- package/dist/components/Input/WInputOptions.vue.d.ts +3 -3
- package/dist/components/Input/WInputOptions.vue.d.ts.map +1 -1
- package/dist/components/Link/WLink.vue.d.ts +10 -18
- package/dist/components/Link/WLink.vue.d.ts.map +1 -1
- package/dist/components/Link/WLink.vue.js +0 -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/MenuItem/WMenuItem.vue.d.ts +6 -12
- package/dist/components/MenuItem/WMenuItem.vue.d.ts.map +1 -1
- package/dist/components/MenuItem/WMenuItem.vue.js +0 -1
- package/dist/components/Nav/WNavItem.vue.d.ts +10 -20
- package/dist/components/Nav/WNavItem.vue.d.ts.map +1 -1
- package/dist/components/Nav/WNavItem.vue.js +0 -1
- package/dist/components/Nav/WNavItemExpand.vue.d.ts +7 -15
- package/dist/components/Nav/WNavItemExpand.vue.d.ts.map +1 -1
- package/dist/components/Nav/WNavItemExpand.vue.js +0 -1
- package/dist/components/Select/WSelectAsync.vue.d.ts +3 -3
- package/dist/components/Select/WSelectAsync.vue.d.ts.map +1 -1
- package/dist/components/Select/WSelectAsync.vue.js +1 -1
- package/dist/components/Select/WSelectAsyncList.vue.d.ts +3 -3
- package/dist/components/Select/WSelectAsyncList.vue.d.ts.map +1 -1
- package/dist/components/Select/WSelectAsyncList.vue.js +1 -1
- package/dist/components/Select/WSelectAsyncSingle.vue.d.ts +3 -3
- package/dist/components/Select/WSelectAsyncSingle.vue.d.ts.map +1 -1
- package/dist/components/Select/components/SelectAsyncList.vue.d.ts +3 -3
- package/dist/components/Select/components/SelectAsyncList.vue.d.ts.map +1 -1
- package/dist/components/Select/components/SelectAsyncPrefix.vue.d.ts +3 -3
- package/dist/components/Select/components/SelectAsyncPrefix.vue.d.ts.map +1 -1
- package/dist/components/Select/components/SelectAsyncPrefixPage.vue.d.ts +3 -3
- package/dist/components/Select/components/SelectAsyncPrefixPage.vue.d.ts.map +1 -1
- package/dist/types/global.d.ts +11 -3
- package/dist/utils/useDefaultQuery.d.ts +1 -1
- package/dist/utils/useDefaultQuery.d.ts.map +1 -1
- package/package.json +2 -2
@@ -30,16 +30,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
30
30
|
maxPages: { default: void 0 },
|
31
31
|
refetchInterval: { type: [Number, Boolean], default: void 0 },
|
32
32
|
valueGetter: { type: Function, default: (item) => item.id },
|
33
|
-
queryOptions: {}
|
33
|
+
queryOptions: { default: void 0 }
|
34
34
|
},
|
35
35
|
emits: ["update:page", "update:header-padding", "update:count", "update:selected"],
|
36
36
|
setup(__props, { expose: __expose, emit: __emit }) {
|
37
37
|
const props = __props;
|
38
38
|
const emit = __emit;
|
39
|
-
const
|
39
|
+
const infiniteListPages = ref();
|
40
40
|
const updateHeaderPadding = (value) => {
|
41
41
|
emit("update:header-padding", value);
|
42
42
|
};
|
43
|
+
const goto = (page, itemIndex) => {
|
44
|
+
infiniteListPages.value?.goto(page, itemIndex);
|
45
|
+
};
|
43
46
|
const { indicator, header, headerTop, headerHeight, isIntersecting } = useInfiniteListHeader(props.scrollingElement);
|
44
47
|
watch(isIntersecting, (value) => {
|
45
48
|
if (!value && headerHeight.value) {
|
@@ -58,7 +61,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
58
61
|
});
|
59
62
|
__expose({
|
60
63
|
resetPage() {
|
61
|
-
|
64
|
+
infiniteListPages.value?.resetPage();
|
62
65
|
}
|
63
66
|
});
|
64
67
|
return (_ctx, _cache) => {
|
@@ -76,10 +79,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
76
79
|
"z-20": !unref(isIntersecting)
|
77
80
|
}])
|
78
81
|
}, [
|
79
|
-
renderSlot(_ctx.$slots, "header")
|
82
|
+
renderSlot(_ctx.$slots, "header", { goto })
|
80
83
|
], 2)
|
81
84
|
], 64)) : createCommentVNode("", true),
|
82
85
|
createVNode(_sfc_main$1, {
|
86
|
+
ref_key: "infiniteListPages",
|
87
|
+
ref: infiniteListPages,
|
83
88
|
"query-params": _ctx.queryParams,
|
84
89
|
"use-query-fn": _ctx.useQueryFn,
|
85
90
|
"is-invalid-page": _ctx.isInvalidPage,
|
@@ -110,7 +115,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
110
115
|
"onUpdate:selected": _cache[1] || (_cache[1] = ($event) => _ctx.$emit("update:selected", $event)),
|
111
116
|
"onUpdate:page": _cache[2] || (_cache[2] = ($event) => _ctx.$emit("update:page", $event))
|
112
117
|
}, {
|
113
|
-
default: withCtx(({ item, setter, skeleton, refetch, previous, next, first, last, resetting }) => [
|
118
|
+
default: withCtx(({ item, setter, skeleton, refetch, previous, next, first, last, resetting, page, index }) => [
|
114
119
|
renderSlot(_ctx.$slots, "default", {
|
115
120
|
item,
|
116
121
|
setter,
|
@@ -120,7 +125,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
120
125
|
next,
|
121
126
|
first,
|
122
127
|
last,
|
123
|
-
resetting
|
128
|
+
resetting,
|
129
|
+
page,
|
130
|
+
index
|
124
131
|
})
|
125
132
|
]),
|
126
133
|
_: 3
|
@@ -41,6 +41,8 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
41
41
|
first: boolean;
|
42
42
|
last: boolean;
|
43
43
|
resetting: boolean;
|
44
|
+
page: number;
|
45
|
+
index: number;
|
44
46
|
}) => void) | undefined;
|
45
47
|
}> & {
|
46
48
|
default?: ((props: {
|
@@ -53,6 +55,8 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
53
55
|
first: boolean;
|
54
56
|
last: boolean;
|
55
57
|
resetting: boolean;
|
58
|
+
page: number;
|
59
|
+
index: number;
|
56
60
|
}) => void) | undefined;
|
57
61
|
};
|
58
62
|
emit: {
|
@@ -61,7 +65,8 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
61
65
|
(e: 'update:selected', values: Model[]): void;
|
62
66
|
};
|
63
67
|
} | undefined, __VLS_expose?: ((exposed: import("vue").ShallowUnwrapRef<{
|
64
|
-
resetPage: () => void
|
68
|
+
resetPage: (page?: number) => Promise<void>;
|
69
|
+
goto: (page?: number, itemIndex?: number) => Promise<void>;
|
65
70
|
}>) => void) | undefined, __VLS_setup?: Promise<{
|
66
71
|
props: {
|
67
72
|
transition?: boolean | undefined;
|
@@ -95,7 +100,8 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
95
100
|
excludeParams?: (keyof QueryParams)[] | undefined;
|
96
101
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
97
102
|
expose(exposed: import("vue").ShallowUnwrapRef<{
|
98
|
-
resetPage: () => void
|
103
|
+
resetPage: (page?: number) => Promise<void>;
|
104
|
+
goto: (page?: number, itemIndex?: number) => Promise<void>;
|
99
105
|
}>): void;
|
100
106
|
attrs: any;
|
101
107
|
slots: Readonly<{
|
@@ -109,6 +115,8 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
109
115
|
first: boolean;
|
110
116
|
last: boolean;
|
111
117
|
resetting: boolean;
|
118
|
+
page: number;
|
119
|
+
index: number;
|
112
120
|
}) => void) | undefined;
|
113
121
|
}> & {
|
114
122
|
default?: ((props: {
|
@@ -121,6 +129,8 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
121
129
|
first: boolean;
|
122
130
|
last: boolean;
|
123
131
|
resetting: boolean;
|
132
|
+
page: number;
|
133
|
+
index: number;
|
124
134
|
}) => void) | undefined;
|
125
135
|
};
|
126
136
|
emit: {
|
@@ -164,7 +174,8 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
164
174
|
excludeParams?: (keyof QueryParams)[] | undefined;
|
165
175
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
166
176
|
expose(exposed: import("vue").ShallowUnwrapRef<{
|
167
|
-
resetPage: () => void
|
177
|
+
resetPage: (page?: number) => Promise<void>;
|
178
|
+
goto: (page?: number, itemIndex?: number) => Promise<void>;
|
168
179
|
}>): void;
|
169
180
|
attrs: any;
|
170
181
|
slots: Readonly<{
|
@@ -178,6 +189,8 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
178
189
|
first: boolean;
|
179
190
|
last: boolean;
|
180
191
|
resetting: boolean;
|
192
|
+
page: number;
|
193
|
+
index: number;
|
181
194
|
}) => void) | undefined;
|
182
195
|
}> & {
|
183
196
|
default?: ((props: {
|
@@ -190,6 +203,8 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
190
203
|
first: boolean;
|
191
204
|
last: boolean;
|
192
205
|
resetting: boolean;
|
206
|
+
page: number;
|
207
|
+
index: number;
|
193
208
|
}) => void) | undefined;
|
194
209
|
};
|
195
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":"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"}
|
@@ -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';
|
@@ -34,7 +34,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
34
34
|
maxPages: { default: 5 },
|
35
35
|
refetchInterval: { type: [Number, Boolean], default: void 0 },
|
36
36
|
valueGetter: {},
|
37
|
-
queryOptions: {}
|
37
|
+
queryOptions: { default: void 0 }
|
38
38
|
},
|
39
39
|
emits: ["update:page", "update:count", "update:selected"],
|
40
40
|
setup(__props, { expose: __expose, emit: __emit }) {
|
@@ -116,6 +116,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
116
116
|
element.scrollTop = element.scrollTop + height;
|
117
117
|
};
|
118
118
|
const removePage = (page) => {
|
119
|
+
if (previousPage.value === page)
|
120
|
+
previousPage.value = null;
|
121
|
+
if (nextPage.value === page)
|
122
|
+
nextPage.value = null;
|
119
123
|
const index = pages.value.indexOf(page);
|
120
124
|
if (index === -1)
|
121
125
|
return;
|
@@ -124,10 +128,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
124
128
|
pages.value = [1];
|
125
129
|
emit("update:page", pages.value[pages.value.length - 1]);
|
126
130
|
};
|
127
|
-
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) => {
|
128
140
|
isResettingPage.value = true;
|
129
|
-
emit("update:page", void 0);
|
130
|
-
pages.value = [
|
141
|
+
emit("update:page", page === 1 ? void 0 : page);
|
142
|
+
pages.value = [];
|
143
|
+
await nextTick();
|
144
|
+
pages.value = [page];
|
131
145
|
nextPage.value = null;
|
132
146
|
previousPage.value = null;
|
133
147
|
if (!props.skipScrollTarget)
|
@@ -140,7 +154,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
140
154
|
});
|
141
155
|
watch(count, (value) => emit("update:count", value), { immediate: true });
|
142
156
|
__expose({
|
143
|
-
resetPage
|
157
|
+
resetPage,
|
158
|
+
goto
|
144
159
|
});
|
145
160
|
return (_ctx, _cache) => {
|
146
161
|
return openBlock(), createBlock(_sfc_main$1, {
|
@@ -185,9 +200,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
185
200
|
"scrolling-element": _ctx.scrollingElement,
|
186
201
|
"value-getter": _ctx.valueGetter,
|
187
202
|
"query-options": _ctx.queryOptions,
|
188
|
-
class: normalizeClass({
|
189
|
-
"last:min-h-[calc(100vh-var(--header-height)-var(--infinite-list-header-height))] last:pb-16": !_ctx.minHeight
|
190
|
-
}),
|
191
203
|
"onUpdate:count": updateCount,
|
192
204
|
"onUpdate:pagesCount": updatePagesCount,
|
193
205
|
"onUpdate:nextPage": _cache[1] || (_cache[1] = ($event) => {
|
@@ -200,12 +212,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
200
212
|
}),
|
201
213
|
"onUpdate:scroll": updateScroll,
|
202
214
|
"onUpdateFromHeader:scroll": _cache[3] || (_cache[3] = ($event) => _ctx.headerTop > 0 && nextTick(() => updateScroll(_ctx.headerTop))),
|
203
|
-
"
|
215
|
+
"onRemove:page": removePage,
|
204
216
|
onRefetch: ($event) => unref(refetchNextPages)(index),
|
205
217
|
"onUpdate:selected": _cache[4] || (_cache[4] = ($event) => _ctx.$emit("update:selected", $event)),
|
206
218
|
onFetched: _cache[5] || (_cache[5] = ($event) => isResettingPage.value = false)
|
207
219
|
}, {
|
208
|
-
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 }) => [
|
209
221
|
renderSlot(_ctx.$slots, "default", {
|
210
222
|
item,
|
211
223
|
setter,
|
@@ -215,11 +227,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
215
227
|
next: next ?? unref(pageComponent)[index + 1]?.getFirst() ?? unref(pageComponent)[0]?.getFirst(),
|
216
228
|
first,
|
217
229
|
last,
|
218
|
-
resetting: isResettingPage.value
|
230
|
+
resetting: isResettingPage.value,
|
231
|
+
page: itemPage,
|
232
|
+
index: itemIndex
|
219
233
|
})
|
220
234
|
]),
|
221
235
|
_: 2
|
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", "
|
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"]);
|
223
237
|
}), 128)),
|
224
238
|
count.value !== 0 && nextPage.value ? (openBlock(), createBlock(_sfc_main$2, {
|
225
239
|
key: 1,
|
@@ -9,11 +9,11 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
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;
|
@@ -44,6 +44,8 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
44
44
|
next?: Data | undefined;
|
45
45
|
first: boolean;
|
46
46
|
last: boolean;
|
47
|
+
page: number;
|
48
|
+
index: number;
|
47
49
|
}) => void) | undefined;
|
48
50
|
}> & {
|
49
51
|
default?: ((props: {
|
@@ -55,15 +57,17 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
55
57
|
next?: Data | undefined;
|
56
58
|
first: boolean;
|
57
59
|
last: boolean;
|
60
|
+
page: number;
|
61
|
+
index: number;
|
58
62
|
}) => void) | undefined;
|
59
63
|
};
|
60
64
|
emit: {
|
61
65
|
(e: 'update:count', value: number): void;
|
62
|
-
(e: 'update:
|
63
|
-
(e: 'update:
|
64
|
-
(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;
|
65
69
|
(e: 'update:scroll', value: number): void;
|
66
|
-
(e: '
|
70
|
+
(e: 'remove:page', value: number): void;
|
67
71
|
(e: 'refetch'): void;
|
68
72
|
(e: 'update-from-header:scroll'): void;
|
69
73
|
(e: 'update:selected', values: Model[]): void;
|
@@ -73,6 +77,7 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
73
77
|
getFirst: () => Data | undefined;
|
74
78
|
getLast: () => Data | undefined;
|
75
79
|
refetch: () => Promise<void>;
|
80
|
+
scrollTo: (index?: number) => void;
|
76
81
|
}>) => void) | undefined, __VLS_setup?: Promise<{
|
77
82
|
props: {
|
78
83
|
transition?: boolean | undefined;
|
@@ -85,11 +90,11 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
85
90
|
selected?: Model[] | undefined;
|
86
91
|
selectOnly?: boolean | undefined;
|
87
92
|
unselectOnly?: boolean | undefined;
|
88
|
-
"onUpdate:
|
89
|
-
"onUpdate:
|
90
|
-
"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;
|
91
96
|
"onUpdate:scroll"?: ((value: number) => any) | undefined;
|
92
|
-
"
|
97
|
+
"onRemove:page"?: ((value: number) => any) | undefined;
|
93
98
|
onRefetch?: (() => any) | undefined;
|
94
99
|
"onUpdate-from-header:scroll"?: (() => any) | undefined;
|
95
100
|
onFetched?: (() => any) | undefined;
|
@@ -113,6 +118,7 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
113
118
|
getFirst: () => Data | undefined;
|
114
119
|
getLast: () => Data | undefined;
|
115
120
|
refetch: () => Promise<void>;
|
121
|
+
scrollTo: (index?: number) => void;
|
116
122
|
}>): void;
|
117
123
|
attrs: any;
|
118
124
|
slots: Readonly<{
|
@@ -125,6 +131,8 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
125
131
|
next?: Data | undefined;
|
126
132
|
first: boolean;
|
127
133
|
last: boolean;
|
134
|
+
page: number;
|
135
|
+
index: number;
|
128
136
|
}) => void) | undefined;
|
129
137
|
}> & {
|
130
138
|
default?: ((props: {
|
@@ -136,15 +144,17 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
136
144
|
next?: Data | undefined;
|
137
145
|
first: boolean;
|
138
146
|
last: boolean;
|
147
|
+
page: number;
|
148
|
+
index: number;
|
139
149
|
}) => void) | undefined;
|
140
150
|
};
|
141
151
|
emit: {
|
142
152
|
(e: 'update:count', value: number): void;
|
143
|
-
(e: 'update:
|
144
|
-
(e: 'update:
|
145
|
-
(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;
|
146
156
|
(e: 'update:scroll', value: number): void;
|
147
|
-
(e: '
|
157
|
+
(e: 'remove:page', value: number): void;
|
148
158
|
(e: 'refetch'): void;
|
149
159
|
(e: 'update-from-header:scroll'): void;
|
150
160
|
(e: 'update:selected', values: Model[]): void;
|
@@ -165,11 +175,11 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
165
175
|
selected?: Model[] | undefined;
|
166
176
|
selectOnly?: boolean | undefined;
|
167
177
|
unselectOnly?: boolean | undefined;
|
168
|
-
"onUpdate:
|
169
|
-
"onUpdate:
|
170
|
-
"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;
|
171
181
|
"onUpdate:scroll"?: ((value: number) => any) | undefined;
|
172
|
-
"
|
182
|
+
"onRemove:page"?: ((value: number) => any) | undefined;
|
173
183
|
onRefetch?: (() => any) | undefined;
|
174
184
|
"onUpdate-from-header:scroll"?: (() => any) | undefined;
|
175
185
|
onFetched?: (() => any) | undefined;
|
@@ -193,6 +203,7 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
193
203
|
getFirst: () => Data | undefined;
|
194
204
|
getLast: () => Data | undefined;
|
195
205
|
refetch: () => Promise<void>;
|
206
|
+
scrollTo: (index?: number) => void;
|
196
207
|
}>): void;
|
197
208
|
attrs: any;
|
198
209
|
slots: Readonly<{
|
@@ -205,6 +216,8 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
205
216
|
next?: Data | undefined;
|
206
217
|
first: boolean;
|
207
218
|
last: boolean;
|
219
|
+
page: number;
|
220
|
+
index: number;
|
208
221
|
}) => void) | undefined;
|
209
222
|
}> & {
|
210
223
|
default?: ((props: {
|
@@ -216,15 +229,17 @@ declare const _default: <Model extends string | number, Data extends DefaultData
|
|
216
229
|
next?: Data | undefined;
|
217
230
|
first: boolean;
|
218
231
|
last: boolean;
|
232
|
+
page: number;
|
233
|
+
index: number;
|
219
234
|
}) => void) | undefined;
|
220
235
|
};
|
221
236
|
emit: {
|
222
237
|
(e: 'update:count', value: number): void;
|
223
|
-
(e: 'update:
|
224
|
-
(e: 'update:
|
225
|
-
(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;
|
226
241
|
(e: 'update:scroll', value: number): void;
|
227
|
-
(e: '
|
242
|
+
(e: 'remove:page', value: number): void;
|
228
243
|
(e: 'refetch'): void;
|
229
244
|
(e: 'update-from-header:scroll'): void;
|
230
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,SAAS,MAAM,GAAG,IAAI;YACpC,oBAAoB,SAAS,MAAM,GAAG,IAAI;YAC1C,kBAAkB,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI;YAC/C,sBAAsB,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI;YACnD,eAAe,SAAS,MAAM,GAAG,IAAI;YACrC,aAAa,SAAS,MAAM,GAAG,IAAI;YACnC,SAAS,GAAG,IAAI;YAChB,2BAA2B,GAAG,IAAI;YAClC,iBAAiB,UAAU,KAAK,EAAE,GAAG,IAAI;YACzC,SAAS,GAAG,IAAI;;;;;;uBAsDI,MAAM;OA6ZuC,IAAI;;;4BARnD,IAAI,KAAK,KAAK;;;;;qBArBrB,WAAW;;;;;;;;;;;;oBACZ,kBAAkB,IAAI,EAAE,QAAQ,EAAE,WAAW,CAAC;+BACnC,OAAO,KAAK,OAAO;wBAC1B,MAAM;mBACX,OAAO;kBACR,OAAO;;;;;;;;;;uBAiBF,QAAQ,WAAW,kBAAkB,IAAI,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;;;;;2BAtZ/D,MAAM;SA6ZuC,IAAI;WACpE,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,SAAS,MAAM,GAAG,IAAI;YACpC,oBAAoB,SAAS,MAAM,GAAG,IAAI;YAC1C,kBAAkB,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI;YAC/C,sBAAsB,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI;YACnD,eAAe,SAAS,MAAM,GAAG,IAAI;YACrC,aAAa,SAAS,MAAM,GAAG,IAAI;YACnC,SAAS,GAAG,IAAI;YAChB,2BAA2B,GAAG,IAAI;YAClC,iBAAiB,UAAU,KAAK,EAAE,GAAG,IAAI;YACzC,SAAS,GAAG,IAAI;;;;;;;;gCA2cE,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;;;;;;+BAtZ/D,MAAM;aA6ZuC,IAAI;eACpE,GAAG;;;sBAxTA,IAAI;mCACS,IAAI,GAAG,SAAS,KAAK,IAAI;0BAClC,OAAO;yBACR,MAAM,IAAI;;;uBAGZ,OAAO;sBACR,OAAO;sBACP,MAAM;uBACL,MAAM;kBACT,IAAI;;;sBAVF,IAAI;mCACS,IAAI,GAAG,SAAS,KAAK,IAAI;0BAClC,OAAO;yBACR,MAAM,IAAI;;;uBAGZ,OAAO;sBACR,OAAO;sBACP,MAAM;uBACL,MAAM;kBACT,IAAI;;;gBA/KN,cAAc,SAAS,MAAM,GAAG,IAAI;gBACpC,oBAAoB,SAAS,MAAM,GAAG,IAAI;gBAC1C,kBAAkB,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI;gBAC/C,sBAAsB,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI;gBACnD,eAAe,SAAS,MAAM,GAAG,IAAI;gBACrC,aAAa,SAAS,MAAM,GAAG,IAAI;gBACnC,SAAS,GAAG,IAAI;gBAChB,2BAA2B,GAAG,IAAI;gBAClC,iBAAiB,UAAU,KAAK,EAAE,GAAG,IAAI;gBACzC,SAAS,GAAG,IAAI;;;;AAtDtB,wBA+gB2E;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, toRef, computed, watch, onMounted, nextTick, onBeforeUnmount, openBlock, createElementBlock, unref, Fragment, createElementVNode,
|
1
|
+
import { defineComponent, ref, toRef, computed, watch, onMounted, nextTick, onBeforeUnmount, openBlock, createElementBlock, normalizeClass, unref, Fragment, createElementVNode, createBlock, createCommentVNode, TransitionGroup, withCtx, renderList, renderSlot, toDisplayString } from 'vue';
|
2
2
|
import _sfc_main$2 from './InfiniteListPageTitle.vue.js';
|
3
3
|
import _sfc_main$1 from './InfiniteListPageSelection.vue.js';
|
4
4
|
|
@@ -29,13 +29,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
29
29
|
refetchInterval: { type: [Number, Boolean], default: void 0 },
|
30
30
|
scrollingElement: { default: void 0 },
|
31
31
|
valueGetter: {},
|
32
|
-
queryOptions: {}
|
32
|
+
queryOptions: { default: void 0 }
|
33
33
|
},
|
34
|
-
emits: ["update:count", "update:
|
34
|
+
emits: ["update:count", "update:pages-count", "update:next-page", "update:previous-page", "update:scroll", "remove:page", "refetch", "update-from-header:scroll", "update:selected", "fetched"],
|
35
35
|
setup(__props, { expose: __expose, emit: __emit }) {
|
36
36
|
const props = __props;
|
37
37
|
const emit = __emit;
|
38
38
|
const element = ref();
|
39
|
+
const resultElement = ref([]);
|
39
40
|
const isIntersecting = ref(false);
|
40
41
|
const { data, error, setData, refetch, isFetching } = props.useQueryFn(
|
41
42
|
toRef(props, "queryParams"),
|
@@ -46,6 +47,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
46
47
|
);
|
47
48
|
const nextPage = computed(() => data.value?.next);
|
48
49
|
const previousPage = computed(() => data.value?.previous);
|
50
|
+
const page = computed(() => props.queryParams instanceof Object && "page" in props.queryParams && Number.isInteger(props.queryParams.page) ? props.queryParams.page : null);
|
49
51
|
const setItem = (index, newItem) => {
|
50
52
|
if (!data.value)
|
51
53
|
return;
|
@@ -65,9 +67,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
65
67
|
const refetchPage = async () => {
|
66
68
|
await refetch();
|
67
69
|
if (props.lastPage && nextPage.value !== void 0)
|
68
|
-
emit("update:
|
70
|
+
emit("update:next-page", nextPage.value);
|
69
71
|
if (props.firstPage && previousPage.value !== void 0)
|
70
|
-
emit("update:
|
72
|
+
emit("update:previous-page", previousPage.value);
|
71
73
|
};
|
72
74
|
const getFirst = () => {
|
73
75
|
if (!data.value)
|
@@ -79,19 +81,28 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
79
81
|
return void 0;
|
80
82
|
return data.value.results[data.value.results.length - 1];
|
81
83
|
};
|
84
|
+
const scrollTo = (index) => {
|
85
|
+
if (index) {
|
86
|
+
if (index !== -1 && resultElement.value[index]) {
|
87
|
+
resultElement.value[index].scrollIntoView({ block: "center", behavior: "smooth" });
|
88
|
+
return;
|
89
|
+
}
|
90
|
+
}
|
91
|
+
element.value?.scrollIntoView({ block: "center", behavior: "smooth" });
|
92
|
+
};
|
82
93
|
watch(data, (value) => {
|
83
94
|
if (props.firstPage && value?.previous !== void 0)
|
84
|
-
emit("update:
|
95
|
+
emit("update:previous-page", value.previous);
|
85
96
|
if (props.lastPage && value?.next !== void 0)
|
86
|
-
emit("update:
|
97
|
+
emit("update:next-page", value.next);
|
87
98
|
if (value?.pages_count !== void 0)
|
88
|
-
emit("update:
|
99
|
+
emit("update:pages-count", value.pages_count);
|
89
100
|
if (value?.count !== void 0)
|
90
101
|
emit("update:count", value.count);
|
91
102
|
}, { immediate: true });
|
92
103
|
watch(error, (error2) => {
|
93
|
-
if (props.isInvalidPage(error2))
|
94
|
-
emit("
|
104
|
+
if (props.isInvalidPage(error2) && page.value !== null)
|
105
|
+
emit("remove:page", page.value);
|
95
106
|
}, { immediate: true });
|
96
107
|
watch(isFetching, (value) => {
|
97
108
|
if (value)
|
@@ -125,7 +136,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
125
136
|
if (!props.firstPage)
|
126
137
|
return;
|
127
138
|
if (props.lastPage) {
|
128
|
-
if (
|
139
|
+
if (page.value !== 1)
|
129
140
|
nextTick().then(() => emit("update-from-header:scroll"));
|
130
141
|
return;
|
131
142
|
}
|
@@ -134,6 +145,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
134
145
|
onBeforeUnmount(() => {
|
135
146
|
intersectionObserver?.disconnect();
|
136
147
|
intersectionObserver = void 0;
|
148
|
+
if (page.value !== null)
|
149
|
+
emit("remove:page", page.value);
|
137
150
|
});
|
138
151
|
watch(data, async (_, oldValue) => {
|
139
152
|
if (oldValue)
|
@@ -151,15 +164,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
151
164
|
__expose({
|
152
165
|
getFirst,
|
153
166
|
getLast,
|
154
|
-
refetch: refetchPage
|
167
|
+
refetch: refetchPage,
|
168
|
+
scrollTo
|
155
169
|
});
|
156
170
|
return (_ctx, _cache) => {
|
157
171
|
return openBlock(), createElementBlock("div", {
|
158
172
|
ref_key: "element",
|
159
173
|
ref: element,
|
160
|
-
class: "relative"
|
174
|
+
class: normalizeClass(["relative", {
|
175
|
+
"last:min-h-[calc(100vh-var(--header-height)-var(--infinite-list-header-height))] last:pb-16": !_ctx.minHeight,
|
176
|
+
"last:min-h-full": _ctx.minHeight && !unref(data)
|
177
|
+
}])
|
161
178
|
}, [
|
162
|
-
|
179
|
+
page.value && unref(data)?.results.length !== 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
163
180
|
createElementVNode("div", {
|
164
181
|
class: normalizeClass(["flex", {
|
165
182
|
"sm:pt-4": (_ctx.selected === void 0 || !_ctx.allowPageSelection) && _ctx.hidePageTitle && !_ctx.noGap
|
@@ -202,6 +219,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
202
219
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(data).results, (item, index) => {
|
203
220
|
return openBlock(), createElementBlock("div", {
|
204
221
|
key: _ctx.valueGetter(item),
|
222
|
+
ref_for: true,
|
223
|
+
ref_key: "resultElement",
|
224
|
+
ref: resultElement,
|
205
225
|
class: "w-full group"
|
206
226
|
}, [
|
207
227
|
createElementVNode("div", _hoisted_1, [
|
@@ -213,7 +233,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
213
233
|
next: unref(data)?.results[index + 1],
|
214
234
|
previous: unref(data)?.results[index - 1],
|
215
235
|
first: _ctx.firstPage && index === 0,
|
216
|
-
last: _ctx.lastPage && index === unref(data).results.length - 1
|
236
|
+
last: _ctx.lastPage && index === unref(data).results.length - 1,
|
237
|
+
page: page.value,
|
238
|
+
index
|
217
239
|
})
|
218
240
|
])
|
219
241
|
]);
|
@@ -230,7 +252,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
230
252
|
next: unref(data)?.results[index + 1],
|
231
253
|
previous: unref(data)?.results[index - 1],
|
232
254
|
first: _ctx.firstPage && index === 0,
|
233
|
-
last: _ctx.lastPage && index === unref(data).results.length - 1
|
255
|
+
last: _ctx.lastPage && index === unref(data).results.length - 1,
|
256
|
+
page: page.value,
|
257
|
+
index
|
234
258
|
});
|
235
259
|
}), 128))
|
236
260
|
], 64)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.skeletonLength, (index) => {
|
@@ -243,7 +267,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
243
267
|
next: void 0,
|
244
268
|
previous: void 0,
|
245
269
|
first: _ctx.firstPage && index === 1,
|
246
|
-
last: _ctx.lastPage && index === _ctx.skeletonLength
|
270
|
+
last: _ctx.lastPage && index === _ctx.skeletonLength,
|
271
|
+
page: page.value,
|
272
|
+
index
|
247
273
|
});
|
248
274
|
}), 128))
|
249
275
|
], 2)
|
@@ -256,7 +282,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
256
282
|
}, [
|
257
283
|
createElementVNode("div", _hoisted_2, toDisplayString(_ctx.emptyStub), 1)
|
258
284
|
], 2))
|
259
|
-
],
|
285
|
+
], 2);
|
260
286
|
};
|
261
287
|
}
|
262
288
|
});
|
@@ -9,8 +9,8 @@ declare const _default: <Type extends InputType = "text", Option extends Record<
|
|
9
9
|
title?: string | undefined;
|
10
10
|
disabled?: boolean | undefined;
|
11
11
|
loading?: boolean | undefined;
|
12
|
-
modelValue: Type extends "number" ? number : string;
|
13
12
|
valueGetter: (option: Option) => Type extends "number" ? number : string;
|
13
|
+
modelValue: Type extends "number" ? number : string;
|
14
14
|
icon?: SVGComponent | undefined;
|
15
15
|
readonly?: boolean | undefined;
|
16
16
|
skeleton?: boolean | undefined;
|
@@ -53,8 +53,8 @@ declare const _default: <Type extends InputType = "text", Option extends Record<
|
|
53
53
|
title?: string | undefined;
|
54
54
|
disabled?: boolean | undefined;
|
55
55
|
loading?: boolean | undefined;
|
56
|
-
modelValue: Type extends "number" ? number : string;
|
57
56
|
valueGetter: (option: Option) => Type extends "number" ? number : string;
|
57
|
+
modelValue: Type extends "number" ? number : string;
|
58
58
|
icon?: SVGComponent | undefined;
|
59
59
|
readonly?: boolean | undefined;
|
60
60
|
skeleton?: boolean | undefined;
|
@@ -101,8 +101,8 @@ declare const _default: <Type extends InputType = "text", Option extends Record<
|
|
101
101
|
title?: string | undefined;
|
102
102
|
disabled?: boolean | undefined;
|
103
103
|
loading?: boolean | undefined;
|
104
|
-
modelValue: Type extends "number" ? number : string;
|
105
104
|
valueGetter: (option: Option) => Type extends "number" ? number : string;
|
105
|
+
modelValue: Type extends "number" ? number : string;
|
106
106
|
icon?: SVGComponent | undefined;
|
107
107
|
readonly?: boolean | undefined;
|
108
108
|
skeleton?: boolean | undefined;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WInputOptions.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Input/WInputOptions.vue"],"names":[],"mappings":"AAiFA;AAEA,OAAO,EAAwC,KAAK,SAAS,EAAC,MAAM,KAAK,CAAA;;QAMmB,MAAM;;QAA+B,MAAM;;WA4W9H,IAAI,GAAG,SAAS
|
1
|
+
{"version":3,"file":"WInputOptions.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Input/WInputOptions.vue"],"names":[],"mappings":"AAiFA;AAEA,OAAO,EAAwC,KAAK,SAAS,EAAC,MAAM,KAAK,CAAA;;QAMmB,MAAM;;QAA+B,MAAM;;WA4W9H,IAAI,GAAG,SAAS;;;;;0BAFD,MAAM;;;;;;;;;;;;;;aADnB,MAAM,EAAE;;;gBASoB,MAAM;;;;;;;WAoBtC,GAAG;;uBA/DkB,GAAG;;;;;YACF,GAAG;;cArS1B,oBAAoB,qDAAsB,IAAI;;;;OAkWmB,IAAI;;eAzBlE,IAAI,GAAG,SAAS;;;;;8BAFD,MAAM;;;;;;;;;;;;;;iBADnB,MAAM,EAAE;;;oBASoB,MAAM;;;;;;;;;;SAmB0B,IAAI;WACpE,GAAG;;uBA/DkB,GAAG;;;;;YACF,GAAG;;cArS1B,oBAAoB,qDAAsB,IAAI;;;;;;mBAyU3C,IAAI,GAAG,SAAS;;;;;kCAFD,MAAM;;;;;;;;;;;;;;qBADnB,MAAM,EAAE;;;wBASoB,MAAM;;;;;;;;;;aAmB0B,IAAI;eACpE,GAAG;;2BA/DkB,GAAG;;;;;gBACF,GAAG;;kBArS1B,oBAAoB,qDAAsB,IAAI;;;AAnCpD,wBA2Y2E"}
|