@glhrmoura/vue-virtualize 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +463 -437
- package/dist/index.mjs.map +1 -1
- package/dist/utils/layout.d.ts +3 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { shallowRef as
|
|
1
|
+
import { shallowRef as Xe, ref as _, toValue as l, watch as Te, onBeforeUnmount as Ce, computed as T, defineComponent as we, openBlock as V, createBlock as ce, resolveDynamicComponent as ue, normalizeStyle as W, withCtx as de, renderSlot as Z, createElementBlock as B, Fragment as ne, renderList as ie, unref as N, mergeProps as ve, createElementVNode as Ee, toDisplayString as Oe, createTextVNode as Ye } from "vue";
|
|
2
2
|
function he(e) {
|
|
3
3
|
return !Number.isFinite(e) || e < 0 ? 0 : e;
|
|
4
4
|
}
|
|
5
|
-
class
|
|
5
|
+
class qe {
|
|
6
6
|
sizes = /* @__PURE__ */ new Map();
|
|
7
7
|
divergent = !1;
|
|
8
8
|
get(t) {
|
|
@@ -33,52 +33,52 @@ class Ye {
|
|
|
33
33
|
if (!t) return;
|
|
34
34
|
const i = /* @__PURE__ */ new Map();
|
|
35
35
|
for (const [n, r] of this.sizes) {
|
|
36
|
-
const
|
|
37
|
-
|
|
36
|
+
const o = n + t;
|
|
37
|
+
o >= 0 && i.set(o, r);
|
|
38
38
|
}
|
|
39
39
|
this.sizes.clear();
|
|
40
40
|
for (const [n, r] of i) this.sizes.set(n, r);
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function ke(e, t, i) {
|
|
44
44
|
return Math.min(i, Math.max(t, e));
|
|
45
45
|
}
|
|
46
|
-
const
|
|
46
|
+
const Ue = 16777216;
|
|
47
47
|
function J(e, t, i) {
|
|
48
48
|
const n = Math.max(0, t - Math.max(0, i));
|
|
49
|
-
return
|
|
49
|
+
return ke(Number.isFinite(e) ? e : 0, 0, n);
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
const i = Math.max(0, Number.isFinite(e) ? e : 0), n = Math.min(i,
|
|
51
|
+
function X(e, t) {
|
|
52
|
+
const i = Math.max(0, Number.isFinite(e) ? e : 0), n = Math.min(i, Ue);
|
|
53
53
|
return t === void 0 || !Number.isFinite(t) || t <= 0 ? n : Math.min(n, t);
|
|
54
54
|
}
|
|
55
|
-
function Ue(e, t, i, n) {
|
|
56
|
-
const r = Math.max(0, t - Math.max(0, n)), s = Math.max(0, i - Math.max(0, n));
|
|
57
|
-
return r <= 0 ? 0 : s <= 0 || s >= r ? J(e, t, n) : Math.max(0, e) / s * r;
|
|
58
|
-
}
|
|
59
55
|
function Ze(e, t, i, n) {
|
|
60
|
-
const r = Math.max(0, t - Math.max(0, n)),
|
|
61
|
-
return
|
|
56
|
+
const r = Math.max(0, t - Math.max(0, n)), o = Math.max(0, i - Math.max(0, n));
|
|
57
|
+
return r <= 0 ? 0 : o <= 0 || o >= r ? J(e, t, n) : Math.max(0, e) / o * r;
|
|
58
|
+
}
|
|
59
|
+
function Je(e, t, i, n) {
|
|
60
|
+
const r = Math.max(0, t - Math.max(0, n)), o = Math.max(0, i - Math.max(0, n));
|
|
61
|
+
return o <= 0 ? 0 : r <= 0 || o >= r ? J(e, t, n) : J(e, t, n) / r * o;
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function Qe(e, t, i) {
|
|
64
64
|
if (e <= 0) return 0;
|
|
65
|
-
let n = 0, r = e - 1,
|
|
65
|
+
let n = 0, r = e - 1, o = e - 1;
|
|
66
66
|
for (; n <= r; ) {
|
|
67
67
|
const d = n + r >>> 1;
|
|
68
|
-
i(d) > t ? (
|
|
68
|
+
i(d) > t ? (o = d, r = d - 1) : n = d + 1;
|
|
69
69
|
}
|
|
70
|
-
return
|
|
70
|
+
return o;
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function et(e, t, i) {
|
|
73
73
|
if (e <= 0) return 0;
|
|
74
|
-
let n = 0, r = e - 1,
|
|
74
|
+
let n = 0, r = e - 1, o = 0;
|
|
75
75
|
for (; n <= r; ) {
|
|
76
76
|
const d = n + r >>> 1;
|
|
77
|
-
i(d) < t ? (
|
|
77
|
+
i(d) < t ? (o = d, n = d + 1) : r = d - 1;
|
|
78
78
|
}
|
|
79
|
-
return
|
|
79
|
+
return o;
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function tt(e) {
|
|
82
82
|
const t = e.start + e.size;
|
|
83
83
|
let i = e.align;
|
|
84
84
|
if (i === "auto") {
|
|
@@ -88,7 +88,7 @@ function et(e) {
|
|
|
88
88
|
}
|
|
89
89
|
return i === "center" ? e.start - (e.viewport - e.size) / 2 : i === "end" ? t - e.viewport : e.start;
|
|
90
90
|
}
|
|
91
|
-
class
|
|
91
|
+
class nt {
|
|
92
92
|
count = 0;
|
|
93
93
|
estimateSize = () => 0;
|
|
94
94
|
overscan = 0;
|
|
@@ -100,14 +100,14 @@ class tt {
|
|
|
100
100
|
viewportSize = 0;
|
|
101
101
|
scrollOffset = 0;
|
|
102
102
|
getItemKey = (t) => t;
|
|
103
|
-
measurements = new
|
|
103
|
+
measurements = new qe();
|
|
104
104
|
built = 0;
|
|
105
105
|
offsets = [];
|
|
106
106
|
laneCursor = [];
|
|
107
107
|
laneEnd = [];
|
|
108
108
|
setOptions(t) {
|
|
109
|
-
const i = Math.max(1, Math.floor(t.lanes ?? 1)), n = t.gap ?? 0, r = t.paddingStart ?? 0,
|
|
110
|
-
this.count = d, this.lanes = i, this.gap = n, this.paddingStart = r, this.paddingEnd =
|
|
109
|
+
const i = Math.max(1, Math.floor(t.lanes ?? 1)), n = t.gap ?? 0, r = t.paddingStart ?? 0, o = t.paddingEnd ?? 0, d = Math.max(0, Math.floor(t.count)), O = t.itemSize === void 0 || t.itemSize === null ? null : he(t.itemSize), E = this.itemSize, p = i !== this.lanes || n !== this.gap || r !== this.paddingStart || o !== this.paddingEnd || t.estimateSize !== this.estimateSize || O !== this.itemSize;
|
|
110
|
+
this.count = d, this.lanes = i, this.gap = n, this.paddingStart = r, this.paddingEnd = o, this.overscan = Math.max(0, Math.floor(t.overscan ?? 0)), this.estimateSize = t.estimateSize, this.itemSize = O, this.getItemKey = t.getItemKey ?? ((c) => c), t.viewportSize !== void 0 && (this.viewportSize = Math.max(0, t.viewportSize)), O !== E && this.measurements.clear(), this.measurements.trim(this.count, this.itemSize), (p || this.built > this.count) && this.resetGeometry();
|
|
111
111
|
}
|
|
112
112
|
setScrollOffset(t) {
|
|
113
113
|
this.scrollOffset = Number.isFinite(t) ? t : 0;
|
|
@@ -122,8 +122,8 @@ class tt {
|
|
|
122
122
|
if (t < 0 || t >= this.count) return !1;
|
|
123
123
|
const n = he(i), r = this.measurements.get(t);
|
|
124
124
|
if (r !== void 0 && Math.abs(r - n) < 0.5) return !1;
|
|
125
|
-
const
|
|
126
|
-
return this.measurements.set(t, n, this.itemSize), Math.abs(
|
|
125
|
+
const o = this.getItemSize(t);
|
|
126
|
+
return this.measurements.set(t, n, this.itemSize), Math.abs(o - n) < 0.5 ? !1 : (this.resetGeometry(), !0);
|
|
127
127
|
}
|
|
128
128
|
clearMeasurements() {
|
|
129
129
|
this.measurements.clear(), this.resetGeometry();
|
|
@@ -150,7 +150,7 @@ class tt {
|
|
|
150
150
|
let i = this.paddingStart;
|
|
151
151
|
const n = this.itemSize ?? 0;
|
|
152
152
|
for (let r = 0; r < this.lanes && r < this.count; r += 1) {
|
|
153
|
-
const
|
|
153
|
+
const o = this.laneLength(r), d = this.paddingStart + o * n + Math.max(0, o - 1) * this.gap;
|
|
154
154
|
d > i && (i = d);
|
|
155
155
|
}
|
|
156
156
|
return i + this.paddingEnd;
|
|
@@ -167,35 +167,35 @@ class tt {
|
|
|
167
167
|
if (this.count <= 0 || this.viewportSize <= 0) return [];
|
|
168
168
|
const t = J(this.scrollOffset, this.getTotalSize(), this.viewportSize), i = t + this.viewportSize, n = [];
|
|
169
169
|
for (let r = 0; r < this.lanes; r += 1) {
|
|
170
|
-
const
|
|
171
|
-
if (
|
|
172
|
-
const d =
|
|
173
|
-
const
|
|
174
|
-
return this.getItemOffset(
|
|
175
|
-
}),
|
|
176
|
-
|
|
170
|
+
const o = this.laneLength(r);
|
|
171
|
+
if (o <= 0) continue;
|
|
172
|
+
const d = Qe(o, t, (c) => {
|
|
173
|
+
const w = this.ordinalIndex(r, c);
|
|
174
|
+
return this.getItemOffset(w) + this.getItemSize(w);
|
|
175
|
+
}), O = et(
|
|
176
|
+
o,
|
|
177
177
|
i,
|
|
178
178
|
(c) => this.getItemOffset(this.ordinalIndex(r, c))
|
|
179
|
-
),
|
|
180
|
-
for (let c =
|
|
181
|
-
const
|
|
179
|
+
), E = Math.max(0, Math.min(d, O) - this.overscan), p = Math.min(o - 1, Math.max(d, O) + this.overscan);
|
|
180
|
+
for (let c = E; c <= p; c += 1) {
|
|
181
|
+
const w = this.ordinalIndex(r, c), k = this.getItemOffset(w), L = this.getItemSize(w);
|
|
182
182
|
n.push({
|
|
183
|
-
index:
|
|
184
|
-
key: this.getItemKey(
|
|
183
|
+
index: w,
|
|
184
|
+
key: this.getItemKey(w),
|
|
185
185
|
start: k,
|
|
186
|
-
size:
|
|
187
|
-
end: k +
|
|
186
|
+
size: L,
|
|
187
|
+
end: k + L,
|
|
188
188
|
lane: r
|
|
189
189
|
});
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
|
-
return n.sort((r,
|
|
192
|
+
return n.sort((r, o) => r.index - o.index), n;
|
|
193
193
|
}
|
|
194
194
|
getOffsetForIndex(t, i = "auto") {
|
|
195
195
|
if (this.count <= 0) return 0;
|
|
196
|
-
const n =
|
|
196
|
+
const n = ke(t, 0, this.count - 1), r = this.getItemOffset(n), o = this.getItemSize(n), d = tt({
|
|
197
197
|
start: r,
|
|
198
|
-
size:
|
|
198
|
+
size: o,
|
|
199
199
|
viewport: this.viewportSize,
|
|
200
200
|
current: this.scrollOffset,
|
|
201
201
|
align: i
|
|
@@ -217,21 +217,21 @@ class tt {
|
|
|
217
217
|
for (; this.built <= i; ) {
|
|
218
218
|
const n = this.built % this.lanes, r = this.laneCursor[n] ?? this.paddingStart;
|
|
219
219
|
this.offsets[this.built] = r;
|
|
220
|
-
const
|
|
221
|
-
this.laneEnd[n] =
|
|
220
|
+
const o = r + this.getItemSize(this.built);
|
|
221
|
+
this.laneEnd[n] = o, this.laneCursor[n] = o + this.gap, this.built += 1;
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
224
|
resetGeometry() {
|
|
225
225
|
this.built = 0, this.offsets = [], this.laneCursor = Array.from({ length: this.lanes }, () => this.paddingStart), this.laneEnd = Array.from({ length: this.lanes }, () => this.paddingStart);
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
|
-
function
|
|
228
|
+
function U() {
|
|
229
229
|
return typeof window < "u" && typeof document < "u";
|
|
230
230
|
}
|
|
231
|
-
function
|
|
231
|
+
function Ve(e) {
|
|
232
232
|
return typeof Element > "u" ? null : e instanceof Element ? e : null;
|
|
233
233
|
}
|
|
234
|
-
function
|
|
234
|
+
function it(e, t, i, n) {
|
|
235
235
|
if (n === "smooth" && typeof e.scrollTo == "function") {
|
|
236
236
|
e.scrollTo({
|
|
237
237
|
top: i ? e.scrollTop : t,
|
|
@@ -242,37 +242,47 @@ function nt(e, t, i, n) {
|
|
|
242
242
|
}
|
|
243
243
|
i ? e.scrollLeft = t : e.scrollTop = t;
|
|
244
244
|
}
|
|
245
|
-
function
|
|
246
|
-
if (
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
245
|
+
function rt(e, t, i) {
|
|
246
|
+
if (typeof window > "u" || typeof document > "u") return;
|
|
247
|
+
const n = document.scrollingElement;
|
|
248
|
+
if (i === "smooth") {
|
|
249
|
+
if (n && typeof n.scrollTo == "function") {
|
|
250
|
+
n.scrollTo({
|
|
251
|
+
top: t ? n.scrollTop : e,
|
|
252
|
+
left: t ? e : n.scrollLeft,
|
|
251
253
|
behavior: i
|
|
252
254
|
});
|
|
253
255
|
return;
|
|
254
256
|
}
|
|
255
|
-
|
|
257
|
+
window.scrollTo({
|
|
258
|
+
top: t ? window.scrollY : e,
|
|
259
|
+
left: t ? e : window.scrollX,
|
|
260
|
+
behavior: i
|
|
261
|
+
});
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
if (n) {
|
|
265
|
+
t ? n.scrollLeft = e : n.scrollTop = e;
|
|
266
|
+
return;
|
|
256
267
|
}
|
|
268
|
+
t ? window.scrollTo(e, window.scrollY) : window.scrollTo(window.scrollX, e);
|
|
257
269
|
}
|
|
258
270
|
function Ie(e, t) {
|
|
259
271
|
return t ? e.scrollLeft : e.scrollTop;
|
|
260
272
|
}
|
|
261
|
-
function
|
|
262
|
-
|
|
273
|
+
function st(e) {
|
|
274
|
+
if (typeof window > "u" || typeof document > "u") return 0;
|
|
275
|
+
const t = document.scrollingElement;
|
|
276
|
+
return t ? e ? t.scrollLeft : t.scrollTop : e ? window.scrollX : window.scrollY;
|
|
263
277
|
}
|
|
264
|
-
function
|
|
278
|
+
function ot(e, t) {
|
|
265
279
|
return t ? e.clientWidth : e.clientHeight;
|
|
266
280
|
}
|
|
267
|
-
function
|
|
281
|
+
function lt(e) {
|
|
268
282
|
return typeof window > "u" ? 0 : e ? window.innerWidth : window.innerHeight;
|
|
269
283
|
}
|
|
270
|
-
function lt(e, t) {
|
|
271
|
-
return t ? e.scrollWidth : e.scrollHeight;
|
|
272
|
-
}
|
|
273
284
|
function at(e, t) {
|
|
274
|
-
|
|
275
|
-
return typeof window > "u" ? t ? i.left : i.top : t ? i.left + window.scrollX : i.top + window.scrollY;
|
|
285
|
+
return t ? e.scrollWidth : e.scrollHeight;
|
|
276
286
|
}
|
|
277
287
|
function ct(e) {
|
|
278
288
|
return typeof requestAnimationFrame == "function" ? requestAnimationFrame(e) : setTimeout(e, 0);
|
|
@@ -289,13 +299,13 @@ function dt(e, t) {
|
|
|
289
299
|
}
|
|
290
300
|
return !0;
|
|
291
301
|
}
|
|
292
|
-
function
|
|
293
|
-
const t = new
|
|
294
|
-
let
|
|
295
|
-
const
|
|
296
|
-
function
|
|
297
|
-
const
|
|
298
|
-
return typeof HTMLElement > "u" ? null :
|
|
302
|
+
function ge(e) {
|
|
303
|
+
const t = new nt(), i = Xe([]), n = _(0), r = _(0), o = _(0), d = _(!1), O = (s) => e.estimateSize(s);
|
|
304
|
+
let E = null, p = !1, c = null, w = null, k = 0, L = 0, m = 0, b = l(e.revision), v = l(e.count), S = e.getItemKey?.(0) ?? 0, y = !1, h = "";
|
|
305
|
+
const C = /* @__PURE__ */ new Map(), M = /* @__PURE__ */ new Map(), H = [];
|
|
306
|
+
function Q() {
|
|
307
|
+
const s = l(e.container);
|
|
308
|
+
return typeof HTMLElement > "u" ? null : s instanceof HTMLElement ? s : null;
|
|
299
309
|
}
|
|
300
310
|
function $() {
|
|
301
311
|
return l(e.horizontal) ?? !1;
|
|
@@ -303,167 +313,174 @@ function me(e) {
|
|
|
303
313
|
function u() {
|
|
304
314
|
return l(e.windowScroll) ?? !1;
|
|
305
315
|
}
|
|
306
|
-
function
|
|
316
|
+
function I() {
|
|
307
317
|
return l(e.reverse) ?? !1;
|
|
308
318
|
}
|
|
309
|
-
function
|
|
310
|
-
const
|
|
311
|
-
return
|
|
319
|
+
function x() {
|
|
320
|
+
const s = l(e.initialRect);
|
|
321
|
+
return s ? $() ? s.width : s.height : 0;
|
|
312
322
|
}
|
|
313
|
-
function
|
|
314
|
-
const
|
|
315
|
-
return
|
|
323
|
+
function j(s) {
|
|
324
|
+
const a = s.getBoundingClientRect(), f = l(e.scrollMargin) ?? 0, g = $() ? -a.left : -a.top;
|
|
325
|
+
return Math.max(0, g - f);
|
|
316
326
|
}
|
|
317
|
-
function
|
|
318
|
-
return u() || !
|
|
327
|
+
function te(s, a) {
|
|
328
|
+
return u() || !s ? X(a) : X(a, at(s, $()));
|
|
319
329
|
}
|
|
320
|
-
function
|
|
321
|
-
return u() ?
|
|
330
|
+
function Le(s) {
|
|
331
|
+
return u() ? !s || !U() ? 0 : j(s) : s ? Ie(s, $()) : 0;
|
|
322
332
|
}
|
|
323
|
-
function
|
|
324
|
-
return u() ?
|
|
333
|
+
function ye(s) {
|
|
334
|
+
return u() ? lt($()) : s ? ot(s, $()) : 0;
|
|
325
335
|
}
|
|
326
|
-
function Ae(
|
|
336
|
+
function Ae(s, a, f) {
|
|
327
337
|
if (u()) {
|
|
328
|
-
|
|
338
|
+
if (!s || !U()) return;
|
|
339
|
+
const g = st($()), z = j(s);
|
|
340
|
+
rt(g + (a - z), $(), f);
|
|
329
341
|
return;
|
|
330
342
|
}
|
|
331
|
-
|
|
343
|
+
s && it(s, a, $(), f);
|
|
332
344
|
}
|
|
333
|
-
function
|
|
334
|
-
return
|
|
335
|
-
|
|
345
|
+
function re(s, a, f) {
|
|
346
|
+
return Ze(
|
|
347
|
+
Le(s),
|
|
336
348
|
a,
|
|
337
|
-
|
|
338
|
-
|
|
349
|
+
te(s, a),
|
|
350
|
+
f
|
|
339
351
|
);
|
|
340
352
|
}
|
|
341
|
-
function
|
|
353
|
+
function Y(s, a, f, g, z) {
|
|
342
354
|
Ae(
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
355
|
+
s,
|
|
356
|
+
Je(a, f, te(s, f), g),
|
|
357
|
+
z
|
|
346
358
|
);
|
|
347
359
|
}
|
|
348
360
|
function Fe() {
|
|
349
|
-
const
|
|
350
|
-
if (!
|
|
351
|
-
const a = i.value,
|
|
361
|
+
const s = e.onVisibleRangeChange;
|
|
362
|
+
if (!s) return;
|
|
363
|
+
const a = i.value, f = l(e.count), g = a.length ? {
|
|
352
364
|
startIndex: a[0]?.index ?? 0,
|
|
353
365
|
endIndex: a[a.length - 1]?.index ?? -1,
|
|
354
|
-
count:
|
|
355
|
-
} : { startIndex: 0, endIndex: -1, count:
|
|
356
|
-
|
|
366
|
+
count: f
|
|
367
|
+
} : { startIndex: 0, endIndex: -1, count: f }, z = `${g.startIndex}:${g.endIndex}:${g.count}`;
|
|
368
|
+
z !== h && (h = z, s(g));
|
|
357
369
|
}
|
|
358
370
|
function F() {
|
|
359
|
-
const
|
|
360
|
-
Object.is(
|
|
361
|
-
const a = l(e.count),
|
|
362
|
-
|
|
363
|
-
const
|
|
371
|
+
const s = l(e.revision);
|
|
372
|
+
Object.is(s, b) || (b = s, t.clearMeasurements());
|
|
373
|
+
const a = l(e.count), f = e.getItemKey?.(0) ?? 0, g = I() && v > 0 && a > v && f !== S, z = I() && v > 0 && a > v && f === S, R = g || z ? a - v : 0, K = I() && t.getViewportSize() > 0 && t.getScrollOffset() + t.getViewportSize() >= t.getTotalSize() - 64;
|
|
374
|
+
g && R > 0 && t.shiftMeasurements(R);
|
|
375
|
+
const D = Q(), pe = ye(D), De = l(e.viewportInset) ?? 0, P = Math.max(0, (pe > 0 ? pe : x()) - De), Pe = l(e.itemSize);
|
|
364
376
|
if (t.setOptions({
|
|
365
377
|
count: a,
|
|
366
|
-
estimateSize:
|
|
367
|
-
overscan: (l(e.overscan) ?? 8) +
|
|
378
|
+
estimateSize: O,
|
|
379
|
+
overscan: (l(e.overscan) ?? 8) + m,
|
|
368
380
|
gap: l(e.gap) ?? 0,
|
|
369
381
|
paddingStart: l(e.paddingStart) ?? 0,
|
|
370
382
|
paddingEnd: l(e.paddingEnd) ?? 0,
|
|
371
383
|
lanes: l(e.lanes) ?? 1,
|
|
372
|
-
itemSize:
|
|
384
|
+
itemSize: Pe ?? null,
|
|
373
385
|
getItemKey: e.getItemKey,
|
|
374
|
-
viewportSize:
|
|
375
|
-
}),
|
|
376
|
-
let
|
|
377
|
-
const
|
|
378
|
-
for (let
|
|
379
|
-
|
|
380
|
-
|
|
386
|
+
viewportSize: P
|
|
387
|
+
}), g && R > 0) {
|
|
388
|
+
let oe = 0;
|
|
389
|
+
const _e = l(e.gap) ?? 0;
|
|
390
|
+
for (let le = 0; le < R; le += 1)
|
|
391
|
+
oe += t.getItemSize(le), le < R - 1 && (oe += _e);
|
|
392
|
+
oe > 0 && t.setScrollOffset(t.getScrollOffset() + oe);
|
|
381
393
|
}
|
|
382
|
-
const
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
394
|
+
const G = t.getTotalSize(), q = Math.max(0, G - P);
|
|
395
|
+
let se = !1;
|
|
396
|
+
I() && !y && G > 0 && P > 0 ? (y = !0, t.setScrollOffset(q), Y(D, q, G, P, "auto"), se = !0) : z && K ? (t.setScrollOffset(q), Y(D, q, G, P, "auto"), se = !0) : g && R > 0 && (Y(D, t.getScrollOffset(), G, P, "auto"), se = !0), !se && u() && D ? t.setScrollOffset(
|
|
397
|
+
J(re(D, G, P), G, P)
|
|
398
|
+
) : t.getScrollOffset() > q && (t.setScrollOffset(q), Y(D, q, G, P, "auto")), v = a, S = f;
|
|
399
|
+
const be = t.getVirtualItems();
|
|
400
|
+
dt(i.value, be) || (i.value = be), n.value !== G && (n.value = G);
|
|
401
|
+
const me = t.getScrollOffset();
|
|
402
|
+
r.value !== me && (r.value = me);
|
|
403
|
+
const Me = D && !u() ? me - Ie(D, $()) : 0;
|
|
404
|
+
o.value !== Me && (o.value = Me), Fe();
|
|
390
405
|
}
|
|
391
406
|
function Ke() {
|
|
392
|
-
d.value = !1,
|
|
393
|
-
for (const [
|
|
394
|
-
|
|
407
|
+
d.value = !1, m = 0;
|
|
408
|
+
for (const [s, a] of C)
|
|
409
|
+
H.push({ element: s, index: a });
|
|
395
410
|
ze(), F(), e.onScrollEnd?.();
|
|
396
411
|
}
|
|
397
|
-
function
|
|
398
|
-
d.value = !0, !(typeof window > "u") && (window.clearTimeout(
|
|
412
|
+
function Be() {
|
|
413
|
+
d.value = !0, !(typeof window > "u") && (window.clearTimeout(L), L = window.setTimeout(Ke, 120));
|
|
399
414
|
}
|
|
400
|
-
function
|
|
401
|
-
const
|
|
402
|
-
if (!u() && !
|
|
403
|
-
|
|
404
|
-
const a = t.getViewportSize(),
|
|
405
|
-
|
|
415
|
+
function A() {
|
|
416
|
+
const s = Q();
|
|
417
|
+
if (!u() && !s) return;
|
|
418
|
+
Be();
|
|
419
|
+
const a = t.getViewportSize(), f = t.getTotalSize(), g = re(s, f, a), z = t.getScrollOffset(), R = Math.max(1, l(e.itemSize) ?? 48);
|
|
420
|
+
m = Math.min(24, Math.ceil(Math.abs(g - z) / R)), t.setScrollOffset(g), F();
|
|
406
421
|
}
|
|
407
|
-
function
|
|
408
|
-
|
|
422
|
+
function fe() {
|
|
423
|
+
E && (E.removeEventListener("scroll", A), E = null), p && typeof window < "u" && (window.removeEventListener("scroll", A, !0), window.removeEventListener("scroll", A), document.removeEventListener("scroll", A, !0), document.documentElement.removeEventListener("scroll", A), document.body?.removeEventListener("scroll", A), document.scrollingElement?.removeEventListener("scroll", A), window.removeEventListener("resize", F), p = !1), c?.disconnect(), c = null;
|
|
409
424
|
}
|
|
410
|
-
function
|
|
411
|
-
const
|
|
425
|
+
function je() {
|
|
426
|
+
const s = Q();
|
|
412
427
|
if (u()) {
|
|
413
|
-
if (p &&
|
|
428
|
+
if (p && E === s || (fe(), E = s, !U())) return;
|
|
414
429
|
p = !0;
|
|
415
|
-
const
|
|
416
|
-
t.getScrollOffset() > 0 ?
|
|
430
|
+
const z = t.getViewportSize(), R = t.getTotalSize();
|
|
431
|
+
t.getScrollOffset() > 0 ? Y(s, t.getScrollOffset(), R, z, "auto") : s && t.setScrollOffset(re(s, R, z)), window.addEventListener("scroll", A, { passive: !0, capture: !0 }), document.addEventListener("scroll", A, { passive: !0, capture: !0 }), document.documentElement.addEventListener("scroll", A, { passive: !0 }), document.body?.addEventListener("scroll", A, { passive: !0 });
|
|
432
|
+
const K = document.scrollingElement;
|
|
433
|
+
K && K !== document.documentElement && K !== document.body && K.addEventListener("scroll", A, { passive: !0 }), window.addEventListener("resize", F), s && typeof ResizeObserver < "u" && (c = new ResizeObserver(() => F()), c.observe(s));
|
|
417
434
|
return;
|
|
418
435
|
}
|
|
419
|
-
if (
|
|
420
|
-
const
|
|
421
|
-
t.getScrollOffset() > 0 ?
|
|
436
|
+
if (s === E && !p || (fe(), E = s, !s || !U())) return;
|
|
437
|
+
const f = t.getViewportSize(), g = t.getTotalSize();
|
|
438
|
+
t.getScrollOffset() > 0 ? Y(s, t.getScrollOffset(), g, f, "auto") : t.setScrollOffset(re(s, g, f)), s.addEventListener("scroll", A, { passive: !0 }), typeof ResizeObserver < "u" && (c = new ResizeObserver(() => F()), c.observe(s));
|
|
422
439
|
}
|
|
423
|
-
function
|
|
424
|
-
return !
|
|
440
|
+
function Ge() {
|
|
441
|
+
return !U() || typeof ResizeObserver > "u" ? null : (w || (w = new ResizeObserver((s) => {
|
|
425
442
|
const a = $();
|
|
426
|
-
let
|
|
443
|
+
let f = !1;
|
|
427
444
|
if (!d.value) {
|
|
428
|
-
for (const
|
|
429
|
-
const
|
|
430
|
-
if (
|
|
431
|
-
const
|
|
432
|
-
a ?
|
|
445
|
+
for (const g of s) {
|
|
446
|
+
const z = C.get(g.target);
|
|
447
|
+
if (z === void 0) continue;
|
|
448
|
+
const R = g.borderBoxSize?.[0], K = Math.round(
|
|
449
|
+
a ? R?.inlineSize ?? g.contentRect.width : R?.blockSize ?? g.contentRect.height
|
|
433
450
|
);
|
|
434
|
-
|
|
451
|
+
K > 0 && t.measure(z, K) && (f = !0);
|
|
435
452
|
}
|
|
436
|
-
|
|
453
|
+
f && F();
|
|
437
454
|
}
|
|
438
|
-
})),
|
|
455
|
+
})), w);
|
|
439
456
|
}
|
|
440
457
|
function ze() {
|
|
441
458
|
if (k = 0, d.value) return;
|
|
442
|
-
const
|
|
443
|
-
let
|
|
444
|
-
for (const
|
|
445
|
-
if (!
|
|
446
|
-
const
|
|
447
|
-
|
|
459
|
+
const s = H.splice(0, H.length), a = $();
|
|
460
|
+
let f = !1;
|
|
461
|
+
for (const g of s) {
|
|
462
|
+
if (!g.element.isConnected) continue;
|
|
463
|
+
const z = g.element.getBoundingClientRect(), R = Math.round(a ? z.width : z.height);
|
|
464
|
+
R > 0 && t.measure(g.index, R) && (f = !0);
|
|
448
465
|
}
|
|
449
|
-
|
|
466
|
+
f && F();
|
|
450
467
|
}
|
|
451
|
-
function
|
|
452
|
-
const
|
|
453
|
-
|
|
468
|
+
function We(s, a) {
|
|
469
|
+
const f = Ve(s), g = Ge(), z = M.get(a);
|
|
470
|
+
z && z !== f && (g?.unobserve(z), C.delete(z), M.delete(a)), f && (M.set(a, f), C.set(f, a), g?.observe(f), H.push({ element: f, index: a }), !(d.value || k) && (k = ct(ze)));
|
|
454
471
|
}
|
|
455
|
-
function
|
|
456
|
-
const
|
|
457
|
-
t.setScrollOffset(
|
|
472
|
+
function xe(s, a = "auto") {
|
|
473
|
+
const f = Q(), g = ye(f), z = g > 0 ? g : t.getViewportSize(), R = t.getTotalSize(), K = J(s, R, z);
|
|
474
|
+
t.setScrollOffset(K), Y(f, K, R, z, a), F();
|
|
458
475
|
}
|
|
459
|
-
function
|
|
460
|
-
const
|
|
461
|
-
|
|
476
|
+
function Ne(s, a) {
|
|
477
|
+
const f = t.getOffsetForIndex(s, a?.align ?? "auto");
|
|
478
|
+
xe(f, a?.behavior ?? "auto");
|
|
462
479
|
}
|
|
463
|
-
function
|
|
464
|
-
t.measure(
|
|
480
|
+
function He(s, a) {
|
|
481
|
+
t.measure(s, a) && F();
|
|
465
482
|
}
|
|
466
|
-
return F(),
|
|
483
|
+
return F(), Te(
|
|
467
484
|
() => [
|
|
468
485
|
l(e.count),
|
|
469
486
|
l(e.overscan),
|
|
@@ -483,36 +500,36 @@ function me(e) {
|
|
|
483
500
|
l(e.initialRect)?.height
|
|
484
501
|
],
|
|
485
502
|
() => {
|
|
486
|
-
|
|
503
|
+
je(), F();
|
|
487
504
|
},
|
|
488
|
-
{ flush: "post" }
|
|
505
|
+
{ flush: "post", immediate: !0 }
|
|
489
506
|
), Ce(() => {
|
|
490
|
-
|
|
507
|
+
fe(), w?.disconnect(), ut(k), typeof window < "u" && window.clearTimeout(L), C.clear(), M.clear(), H.length = 0;
|
|
491
508
|
}), {
|
|
492
|
-
virtualItems:
|
|
493
|
-
totalSize:
|
|
494
|
-
scrollOffset:
|
|
495
|
-
scrollAdjust:
|
|
496
|
-
isScrolling:
|
|
497
|
-
scrollToIndex:
|
|
498
|
-
scrollToOffset:
|
|
499
|
-
measure:
|
|
500
|
-
measureElement:
|
|
509
|
+
virtualItems: T(() => i.value),
|
|
510
|
+
totalSize: T(() => n.value),
|
|
511
|
+
scrollOffset: T(() => r.value),
|
|
512
|
+
scrollAdjust: T(() => o.value),
|
|
513
|
+
isScrolling: T(() => d.value),
|
|
514
|
+
scrollToIndex: Ne,
|
|
515
|
+
scrollToOffset: xe,
|
|
516
|
+
measure: He,
|
|
517
|
+
measureElement: We
|
|
501
518
|
};
|
|
502
519
|
}
|
|
503
520
|
function ft(e, t, i) {
|
|
504
521
|
return typeof e == "function" ? e(t, i) : typeof e == "number" ? e : 48;
|
|
505
522
|
}
|
|
506
|
-
function
|
|
507
|
-
const t =
|
|
523
|
+
function $e(e) {
|
|
524
|
+
const t = ge({
|
|
508
525
|
count: () => l(e.items).length,
|
|
509
526
|
estimateSize: (n) => {
|
|
510
527
|
const r = l(e.items);
|
|
511
528
|
return ft(e.estimateSize, n, r[n]);
|
|
512
529
|
},
|
|
513
530
|
getItemKey: (n) => {
|
|
514
|
-
const
|
|
515
|
-
return e.getItemKey?.(
|
|
531
|
+
const o = l(e.items)[n];
|
|
532
|
+
return e.getItemKey?.(o, n) ?? n;
|
|
516
533
|
},
|
|
517
534
|
itemSize: () => e.itemSize !== void 0 ? l(e.itemSize) : typeof e.estimateSize == "number" ? e.estimateSize : void 0,
|
|
518
535
|
container: e.container,
|
|
@@ -531,14 +548,14 @@ function Ve(e) {
|
|
|
531
548
|
onScrollEnd: e.onScrollEnd
|
|
532
549
|
});
|
|
533
550
|
return {
|
|
534
|
-
virtualItems:
|
|
551
|
+
virtualItems: T(() => {
|
|
535
552
|
const n = l(e.items);
|
|
536
553
|
return t.virtualItems.value.map((r) => {
|
|
537
|
-
const
|
|
554
|
+
const o = n[r.index];
|
|
538
555
|
return {
|
|
539
556
|
...r,
|
|
540
|
-
item:
|
|
541
|
-
key: e.getItemKey?.(
|
|
557
|
+
item: o,
|
|
558
|
+
key: e.getItemKey?.(o, r.index) ?? r.key
|
|
542
559
|
};
|
|
543
560
|
});
|
|
544
561
|
}),
|
|
@@ -555,13 +572,13 @@ function Ve(e) {
|
|
|
555
572
|
function Re(e, t, i) {
|
|
556
573
|
return typeof e == "function" ? e(t) : typeof e == "number" ? e : i;
|
|
557
574
|
}
|
|
558
|
-
function
|
|
559
|
-
const t =
|
|
575
|
+
function mt(e) {
|
|
576
|
+
const t = T(() => Math.max(1, Math.floor(l(e.columnCount) || 1))), i = T(() => Math.ceil(l(e.items).length / t.value)), n = /* @__PURE__ */ new Map(), r = ge({
|
|
560
577
|
count: () => i.value,
|
|
561
|
-
estimateSize: (
|
|
578
|
+
estimateSize: (m) => Re(l(e.estimateRowSize), m, 48),
|
|
562
579
|
itemSize: () => {
|
|
563
|
-
const
|
|
564
|
-
return typeof
|
|
580
|
+
const m = l(e.estimateRowSize);
|
|
581
|
+
return typeof m == "number" ? m : void 0;
|
|
565
582
|
},
|
|
566
583
|
overscan: () => l(e.overscanRows) ?? l(e.overscan) ?? 2,
|
|
567
584
|
gap: () => l(e.rowGap) ?? 0,
|
|
@@ -573,12 +590,12 @@ function ht(e) {
|
|
|
573
590
|
scrollMargin: e.scrollMargin,
|
|
574
591
|
onVisibleRangeChange: e.onVisibleRangeChange,
|
|
575
592
|
onScrollEnd: e.onScrollEnd
|
|
576
|
-
}),
|
|
593
|
+
}), o = ge({
|
|
577
594
|
count: () => t.value,
|
|
578
|
-
estimateSize: (
|
|
595
|
+
estimateSize: (m) => Re(l(e.estimateColumnSize), m, 160),
|
|
579
596
|
itemSize: () => {
|
|
580
|
-
const
|
|
581
|
-
return typeof
|
|
597
|
+
const m = l(e.estimateColumnSize);
|
|
598
|
+
return typeof m == "number" ? m : void 0;
|
|
582
599
|
},
|
|
583
600
|
overscan: () => l(e.overscanColumns) ?? l(e.overscan) ?? 1,
|
|
584
601
|
gap: () => l(e.columnGap) ?? 0,
|
|
@@ -588,74 +605,74 @@ function ht(e) {
|
|
|
588
605
|
revision: e.revision,
|
|
589
606
|
windowScroll: e.windowScroll,
|
|
590
607
|
scrollMargin: e.scrollMargin
|
|
591
|
-
}), d =
|
|
592
|
-
const
|
|
593
|
-
for (const
|
|
594
|
-
for (const
|
|
595
|
-
const h =
|
|
596
|
-
if (h >=
|
|
597
|
-
const
|
|
598
|
-
|
|
608
|
+
}), d = T(() => {
|
|
609
|
+
const m = l(e.items), b = t.value, v = [];
|
|
610
|
+
for (const S of r.virtualItems.value)
|
|
611
|
+
for (const y of o.virtualItems.value) {
|
|
612
|
+
const h = S.index * b + y.index;
|
|
613
|
+
if (h >= m.length) continue;
|
|
614
|
+
const C = m[h];
|
|
615
|
+
v.push({
|
|
599
616
|
index: h,
|
|
600
|
-
key: e.getItemKey?.(
|
|
601
|
-
item:
|
|
602
|
-
row:
|
|
603
|
-
column:
|
|
617
|
+
key: e.getItemKey?.(C, h) ?? h,
|
|
618
|
+
item: C,
|
|
619
|
+
row: S,
|
|
620
|
+
column: y
|
|
604
621
|
});
|
|
605
622
|
}
|
|
606
|
-
return
|
|
623
|
+
return v;
|
|
607
624
|
});
|
|
608
|
-
function
|
|
609
|
-
const
|
|
610
|
-
if (!
|
|
611
|
-
const
|
|
612
|
-
r.scrollToIndex(Math.floor(
|
|
625
|
+
function O(m, b) {
|
|
626
|
+
const v = l(e.items);
|
|
627
|
+
if (!v.length) return;
|
|
628
|
+
const S = Math.min(Math.max(m, 0), v.length - 1), y = t.value;
|
|
629
|
+
r.scrollToIndex(Math.floor(S / y), b), o.scrollToIndex(S % y, b);
|
|
613
630
|
}
|
|
614
|
-
function
|
|
615
|
-
|
|
631
|
+
function E(m, b = "auto") {
|
|
632
|
+
m.top !== void 0 && r.scrollToOffset(m.top, b), m.left !== void 0 && o.scrollToOffset(m.left, b);
|
|
616
633
|
}
|
|
617
|
-
function p(
|
|
618
|
-
const
|
|
619
|
-
|
|
634
|
+
function p(m, b) {
|
|
635
|
+
const v = Math.max(n.get(m) ?? 0, b);
|
|
636
|
+
v <= 0 || v === n.get(m) || (n.set(m, v), r.measure(m, v));
|
|
620
637
|
}
|
|
621
638
|
let c = null;
|
|
622
|
-
const
|
|
639
|
+
const w = /* @__PURE__ */ new Map();
|
|
623
640
|
function k() {
|
|
624
|
-
return !
|
|
625
|
-
for (const b of
|
|
626
|
-
const
|
|
627
|
-
if (
|
|
628
|
-
const
|
|
629
|
-
|
|
641
|
+
return !U() || typeof ResizeObserver > "u" ? null : (c || (c = new ResizeObserver((m) => {
|
|
642
|
+
for (const b of m) {
|
|
643
|
+
const v = w.get(b.target);
|
|
644
|
+
if (v === void 0) continue;
|
|
645
|
+
const y = b.borderBoxSize?.[0]?.blockSize ?? b.contentRect.height;
|
|
646
|
+
y > 0 && p(v, y);
|
|
630
647
|
}
|
|
631
648
|
})), c);
|
|
632
649
|
}
|
|
633
|
-
function
|
|
634
|
-
const
|
|
635
|
-
if (!
|
|
636
|
-
|
|
637
|
-
const
|
|
638
|
-
|
|
650
|
+
function L(m, b) {
|
|
651
|
+
const v = Ve(m), S = k();
|
|
652
|
+
if (!v) return;
|
|
653
|
+
w.set(v, b), S?.observe(v);
|
|
654
|
+
const y = v.getBoundingClientRect().height;
|
|
655
|
+
y > 0 && p(b, y);
|
|
639
656
|
}
|
|
640
657
|
return Ce(() => {
|
|
641
|
-
c?.disconnect(),
|
|
658
|
+
c?.disconnect(), w.clear();
|
|
642
659
|
}), {
|
|
643
660
|
virtualRows: r.virtualItems,
|
|
644
|
-
virtualColumns:
|
|
661
|
+
virtualColumns: o.virtualItems,
|
|
645
662
|
virtualCells: d,
|
|
646
663
|
totalHeight: r.totalSize,
|
|
647
|
-
totalWidth:
|
|
648
|
-
scrollAdjustX:
|
|
664
|
+
totalWidth: o.totalSize,
|
|
665
|
+
scrollAdjustX: o.scrollAdjust,
|
|
649
666
|
scrollAdjustY: r.scrollAdjust,
|
|
650
|
-
scrollToIndex:
|
|
651
|
-
scrollToOffset:
|
|
667
|
+
scrollToIndex: O,
|
|
668
|
+
scrollToOffset: E,
|
|
652
669
|
measureRow: p,
|
|
653
|
-
measureRowElement:
|
|
654
|
-
measureColumn:
|
|
670
|
+
measureRowElement: L,
|
|
671
|
+
measureColumn: o.measure
|
|
655
672
|
};
|
|
656
673
|
}
|
|
657
|
-
function
|
|
658
|
-
const t =
|
|
674
|
+
function ht(e) {
|
|
675
|
+
const t = $e({
|
|
659
676
|
items: e.rows,
|
|
660
677
|
estimateSize: e.estimateRowSize,
|
|
661
678
|
container: e.container,
|
|
@@ -670,43 +687,43 @@ function mt(e) {
|
|
|
670
687
|
reverse: e.reverse,
|
|
671
688
|
onVisibleRangeChange: e.onVisibleRangeChange,
|
|
672
689
|
onScrollEnd: e.onScrollEnd
|
|
673
|
-
}), i =
|
|
674
|
-
const
|
|
690
|
+
}), i = T(() => {
|
|
691
|
+
const o = l(e.columns);
|
|
675
692
|
let d = 0;
|
|
676
|
-
const
|
|
677
|
-
const
|
|
693
|
+
const O = o.map((c) => {
|
|
694
|
+
const w = c.width ?? c.minWidth ?? 160, k = {
|
|
678
695
|
...c,
|
|
679
696
|
start: d,
|
|
680
|
-
size:
|
|
681
|
-
end: d +
|
|
697
|
+
size: w,
|
|
698
|
+
end: d + w,
|
|
682
699
|
pinOffset: 0,
|
|
683
700
|
stickyStyle: {}
|
|
684
701
|
};
|
|
685
|
-
return d +=
|
|
702
|
+
return d += w, k;
|
|
686
703
|
});
|
|
687
|
-
let
|
|
688
|
-
for (const c of
|
|
689
|
-
c.pin === "start" && (c.pinOffset =
|
|
704
|
+
let E = 0;
|
|
705
|
+
for (const c of O)
|
|
706
|
+
c.pin === "start" && (c.pinOffset = E, c.stickyStyle = {
|
|
690
707
|
position: "sticky",
|
|
691
|
-
left: `${
|
|
708
|
+
left: `${E}px`,
|
|
692
709
|
zIndex: 2
|
|
693
|
-
},
|
|
710
|
+
}, E += c.size);
|
|
694
711
|
let p = 0;
|
|
695
|
-
for (let c =
|
|
696
|
-
const
|
|
697
|
-
!
|
|
712
|
+
for (let c = O.length - 1; c >= 0; c -= 1) {
|
|
713
|
+
const w = O[c];
|
|
714
|
+
!w || w.pin !== "end" || (w.pinOffset = p, w.stickyStyle = {
|
|
698
715
|
position: "sticky",
|
|
699
716
|
right: `${p}px`,
|
|
700
717
|
zIndex: 2
|
|
701
|
-
}, p +=
|
|
718
|
+
}, p += w.size);
|
|
702
719
|
}
|
|
703
|
-
return
|
|
704
|
-
}), n =
|
|
705
|
-
const
|
|
706
|
-
return
|
|
720
|
+
return O;
|
|
721
|
+
}), n = T(() => {
|
|
722
|
+
const o = i.value;
|
|
723
|
+
return o.length ? o[o.length - 1]?.end ?? 0 : 0;
|
|
707
724
|
});
|
|
708
725
|
return {
|
|
709
|
-
virtualRows:
|
|
726
|
+
virtualRows: T(() => t.virtualItems.value),
|
|
710
727
|
columns: i,
|
|
711
728
|
totalHeight: t.totalSize,
|
|
712
729
|
totalWidth: n,
|
|
@@ -719,11 +736,11 @@ function mt(e) {
|
|
|
719
736
|
measureElement: t.measureElement
|
|
720
737
|
};
|
|
721
738
|
}
|
|
722
|
-
function
|
|
739
|
+
function ae(e) {
|
|
723
740
|
if (typeof e == "number" && Number.isFinite(e)) return `${e}px`;
|
|
724
741
|
if (typeof e == "string" && e.trim()) return e;
|
|
725
742
|
}
|
|
726
|
-
function
|
|
743
|
+
function ee(e) {
|
|
727
744
|
if (typeof e == "number" && Number.isFinite(e)) return e;
|
|
728
745
|
if (typeof e != "string") return 0;
|
|
729
746
|
const t = /^(-?\d+(?:\.\d+)?)px$/.exec(e.trim());
|
|
@@ -734,39 +751,46 @@ function Q(e) {
|
|
|
734
751
|
function Se(e) {
|
|
735
752
|
return e.windowScroll ? {
|
|
736
753
|
position: "relative",
|
|
737
|
-
width:
|
|
738
|
-
height:
|
|
754
|
+
width: ae(e.width) ?? "100%",
|
|
755
|
+
height: ae(e.height),
|
|
739
756
|
overflowAnchor: "none"
|
|
740
757
|
} : {
|
|
741
758
|
overflow: "auto",
|
|
742
759
|
position: "relative",
|
|
743
|
-
height:
|
|
744
|
-
width:
|
|
760
|
+
height: ae(e.height) ?? (e.horizontal ? "100%" : void 0),
|
|
761
|
+
width: ae(e.width) ?? (e.horizontal ? void 0 : "100%"),
|
|
745
762
|
overflowAnchor: "none"
|
|
746
763
|
};
|
|
747
764
|
}
|
|
748
765
|
function gt(e, t) {
|
|
749
|
-
const i =
|
|
766
|
+
const i = X(e);
|
|
750
767
|
return {
|
|
751
768
|
position: "relative",
|
|
752
769
|
width: t ? `${i}px` : "100%",
|
|
753
770
|
height: t ? "100%" : `${i}px`
|
|
754
771
|
};
|
|
755
772
|
}
|
|
756
|
-
function wt(e, t, i) {
|
|
757
|
-
|
|
773
|
+
function wt(e, t, i, n) {
|
|
774
|
+
const r = n?.fixed ?? !1;
|
|
775
|
+
return t ? {
|
|
776
|
+
position: "absolute",
|
|
777
|
+
top: 0,
|
|
778
|
+
left: 0,
|
|
779
|
+
height: "100%",
|
|
780
|
+
transform: `translateX(${e}px)`,
|
|
781
|
+
boxSizing: "border-box",
|
|
782
|
+
...r && i !== void 0 ? { width: `${i}px`, overflow: "hidden", contain: "layout style" } : {}
|
|
783
|
+
} : {
|
|
758
784
|
position: "absolute",
|
|
759
785
|
top: 0,
|
|
760
786
|
left: 0,
|
|
761
|
-
width:
|
|
762
|
-
|
|
763
|
-
transform: t ? `translateX(${e}px)` : `translateY(${e}px)`,
|
|
764
|
-
contain: "layout style",
|
|
787
|
+
width: "100%",
|
|
788
|
+
transform: `translateY(${e}px)`,
|
|
765
789
|
boxSizing: "border-box",
|
|
766
|
-
overflow: "hidden"
|
|
790
|
+
...r && i !== void 0 ? { height: `${i}px`, overflow: "hidden", contain: "layout style" } : {}
|
|
767
791
|
};
|
|
768
792
|
}
|
|
769
|
-
const
|
|
793
|
+
const zt = /* @__PURE__ */ we({
|
|
770
794
|
__name: "VirtualList",
|
|
771
795
|
props: {
|
|
772
796
|
items: {},
|
|
@@ -789,76 +813,78 @@ const yt = /* @__PURE__ */ ge({
|
|
|
789
813
|
},
|
|
790
814
|
emits: ["visibleRangeChange", "scrollEnd"],
|
|
791
815
|
setup(e, { expose: t, emit: i }) {
|
|
792
|
-
const n = e, r = i,
|
|
816
|
+
const n = e, r = i, o = _(null), { virtualItems: d, totalSize: O, scrollAdjust: E, scrollToIndex: p, scrollToOffset: c, measure: w, measureElement: k } = $e({
|
|
793
817
|
items: () => n.items,
|
|
794
|
-
estimateSize: (
|
|
818
|
+
estimateSize: (S, y) => {
|
|
795
819
|
const h = n.estimateSize;
|
|
796
|
-
return typeof h == "number" ? h : h(
|
|
820
|
+
return typeof h == "number" ? h : h(S, y);
|
|
797
821
|
},
|
|
798
822
|
itemSize: () => typeof n.estimateSize == "number" ? n.estimateSize : void 0,
|
|
799
|
-
container:
|
|
823
|
+
container: o,
|
|
800
824
|
horizontal: () => n.horizontal,
|
|
801
825
|
overscan: () => n.overscan,
|
|
802
826
|
gap: () => n.gap,
|
|
803
827
|
paddingStart: () => n.paddingStart,
|
|
804
828
|
paddingEnd: () => n.paddingEnd,
|
|
805
|
-
getItemKey: (
|
|
829
|
+
getItemKey: (S, y) => n.getItemKey?.(S, y) ?? y,
|
|
806
830
|
initialRect: () => ({
|
|
807
|
-
width:
|
|
808
|
-
height:
|
|
831
|
+
width: ee(n.width),
|
|
832
|
+
height: ee(n.height)
|
|
809
833
|
}),
|
|
810
834
|
revision: () => n.revision,
|
|
811
835
|
windowScroll: () => n.windowScroll,
|
|
812
836
|
scrollMargin: () => n.scrollMargin,
|
|
813
837
|
reverse: () => n.reverse,
|
|
814
|
-
onVisibleRangeChange: (
|
|
838
|
+
onVisibleRangeChange: (S) => r("visibleRangeChange", S),
|
|
815
839
|
onScrollEnd: () => r("scrollEnd")
|
|
816
|
-
}),
|
|
840
|
+
}), L = T(
|
|
817
841
|
() => Se({
|
|
818
842
|
height: n.height,
|
|
819
843
|
width: n.width,
|
|
820
844
|
horizontal: n.horizontal,
|
|
821
845
|
windowScroll: n.windowScroll
|
|
822
846
|
})
|
|
823
|
-
),
|
|
824
|
-
function b(
|
|
825
|
-
return wt(
|
|
847
|
+
), m = T(() => gt(O.value, n.horizontal));
|
|
848
|
+
function b(S, y) {
|
|
849
|
+
return wt(S, n.horizontal, y, {
|
|
850
|
+
fixed: typeof n.estimateSize == "number"
|
|
851
|
+
});
|
|
826
852
|
}
|
|
827
|
-
function S
|
|
828
|
-
return (
|
|
829
|
-
k(
|
|
853
|
+
function v(S) {
|
|
854
|
+
return (y) => {
|
|
855
|
+
k(y, S);
|
|
830
856
|
};
|
|
831
857
|
}
|
|
832
858
|
return t({
|
|
833
859
|
scrollToIndex: p,
|
|
834
860
|
scrollToOffset: c,
|
|
835
|
-
measure:
|
|
836
|
-
}), (
|
|
861
|
+
measure: w
|
|
862
|
+
}), (S, y) => (V(), ce(ue(e.tag), {
|
|
837
863
|
ref_key: "container",
|
|
838
|
-
ref:
|
|
864
|
+
ref: o,
|
|
839
865
|
"data-virtual-container": "",
|
|
840
866
|
role: "list",
|
|
841
|
-
style:
|
|
867
|
+
style: W(L.value)
|
|
842
868
|
}, {
|
|
843
|
-
default:
|
|
844
|
-
e.items.length ? (V(),
|
|
869
|
+
default: de(() => [
|
|
870
|
+
e.items.length ? (V(), B("div", {
|
|
845
871
|
key: 1,
|
|
846
872
|
"data-virtual-spacer": "",
|
|
847
|
-
style:
|
|
873
|
+
style: W(m.value)
|
|
848
874
|
}, [
|
|
849
|
-
(V(!0),
|
|
875
|
+
(V(!0), B(ne, null, ie(N(d), (h) => (V(), ce(ue(e.itemTag), ve({
|
|
850
876
|
key: h.key,
|
|
851
877
|
ref_for: !0,
|
|
852
|
-
ref:
|
|
878
|
+
ref: v(h.index),
|
|
853
879
|
role: "listitem",
|
|
854
880
|
"data-index": h.index,
|
|
855
881
|
"data-key": String(h.key),
|
|
856
882
|
"aria-setsize": e.items.length,
|
|
857
883
|
"aria-posinset": h.index + 1,
|
|
858
|
-
style: b(h.start -
|
|
884
|
+
style: b(h.start - N(E), h.size)
|
|
859
885
|
}, { ref_for: !0 }, e.itemAttrs), {
|
|
860
|
-
default:
|
|
861
|
-
|
|
886
|
+
default: de(() => [
|
|
887
|
+
Z(S.$slots, "default", {
|
|
862
888
|
item: h.item,
|
|
863
889
|
index: h.index,
|
|
864
890
|
start: h.start,
|
|
@@ -868,12 +894,12 @@ const yt = /* @__PURE__ */ ge({
|
|
|
868
894
|
]),
|
|
869
895
|
_: 2
|
|
870
896
|
}, 1040, ["data-index", "data-key", "aria-setsize", "aria-posinset", "style"]))), 128))
|
|
871
|
-
], 4)) :
|
|
897
|
+
], 4)) : Z(S.$slots, "empty", {}, void 0, void 0, 0)
|
|
872
898
|
]),
|
|
873
899
|
_: 3
|
|
874
900
|
}, 8, ["style"]));
|
|
875
901
|
}
|
|
876
|
-
}),
|
|
902
|
+
}), vt = ["data-index", "data-key"], xt = /* @__PURE__ */ we({
|
|
877
903
|
__name: "VirtualGrid",
|
|
878
904
|
props: {
|
|
879
905
|
items: {},
|
|
@@ -896,61 +922,61 @@ const yt = /* @__PURE__ */ ge({
|
|
|
896
922
|
},
|
|
897
923
|
emits: ["visibleRangeChange", "scrollEnd"],
|
|
898
924
|
setup(e, { expose: t, emit: i }) {
|
|
899
|
-
const n = e, r = i,
|
|
925
|
+
const n = e, r = i, o = _(null), {
|
|
900
926
|
virtualCells: d,
|
|
901
|
-
totalWidth:
|
|
902
|
-
totalHeight:
|
|
927
|
+
totalWidth: O,
|
|
928
|
+
totalHeight: E,
|
|
903
929
|
scrollAdjustX: p,
|
|
904
930
|
scrollAdjustY: c,
|
|
905
|
-
scrollToIndex:
|
|
931
|
+
scrollToIndex: w,
|
|
906
932
|
scrollToOffset: k,
|
|
907
|
-
measureRow:
|
|
908
|
-
measureRowElement:
|
|
909
|
-
} =
|
|
933
|
+
measureRow: L,
|
|
934
|
+
measureRowElement: m
|
|
935
|
+
} = mt({
|
|
910
936
|
items: () => n.items,
|
|
911
937
|
columnCount: () => n.columnCount,
|
|
912
938
|
estimateRowSize: () => n.estimateRowSize,
|
|
913
939
|
estimateColumnSize: () => n.estimateColumnSize,
|
|
914
|
-
container:
|
|
940
|
+
container: o,
|
|
915
941
|
overscan: () => n.overscan,
|
|
916
942
|
overscanRows: () => n.overscanRows,
|
|
917
943
|
overscanColumns: () => n.overscanColumns,
|
|
918
944
|
rowGap: () => n.rowGap,
|
|
919
945
|
columnGap: () => n.columnGap,
|
|
920
|
-
getItemKey: (h,
|
|
946
|
+
getItemKey: (h, C) => n.getItemKey?.(h, C) ?? C,
|
|
921
947
|
initialRect: () => ({
|
|
922
|
-
width:
|
|
923
|
-
height:
|
|
948
|
+
width: ee(n.width),
|
|
949
|
+
height: ee(n.height)
|
|
924
950
|
}),
|
|
925
951
|
revision: () => n.revision,
|
|
926
952
|
windowScroll: () => n.windowScroll,
|
|
927
953
|
scrollMargin: () => n.scrollMargin,
|
|
928
954
|
onVisibleRangeChange: (h) => r("visibleRangeChange", h),
|
|
929
955
|
onScrollEnd: () => r("scrollEnd")
|
|
930
|
-
}), b =
|
|
956
|
+
}), b = T(
|
|
931
957
|
() => Se({
|
|
932
958
|
height: n.height,
|
|
933
959
|
width: n.width,
|
|
934
960
|
horizontal: !1,
|
|
935
961
|
windowScroll: n.windowScroll
|
|
936
962
|
})
|
|
937
|
-
),
|
|
963
|
+
), v = T(() => ({
|
|
938
964
|
position: "relative",
|
|
939
|
-
width: `${
|
|
940
|
-
height: `${
|
|
965
|
+
width: `${X(O.value)}px`,
|
|
966
|
+
height: `${X(E.value)}px`
|
|
941
967
|
}));
|
|
942
|
-
function
|
|
943
|
-
return (
|
|
944
|
-
|
|
968
|
+
function S(h) {
|
|
969
|
+
return (C) => {
|
|
970
|
+
m(C, h);
|
|
945
971
|
};
|
|
946
972
|
}
|
|
947
|
-
function
|
|
973
|
+
function y(h, C, M, H) {
|
|
948
974
|
return {
|
|
949
975
|
position: "absolute",
|
|
950
976
|
top: 0,
|
|
951
977
|
left: 0,
|
|
952
|
-
width: `${
|
|
953
|
-
height: `${
|
|
978
|
+
width: `${C}px`,
|
|
979
|
+
height: `${H}px`,
|
|
954
980
|
transform: `translate(${h}px, ${M}px)`,
|
|
955
981
|
contain: "layout style",
|
|
956
982
|
boxSizing: "border-box",
|
|
@@ -958,32 +984,32 @@ const yt = /* @__PURE__ */ ge({
|
|
|
958
984
|
};
|
|
959
985
|
}
|
|
960
986
|
return t({
|
|
961
|
-
scrollToIndex:
|
|
987
|
+
scrollToIndex: w,
|
|
962
988
|
scrollToOffset: k,
|
|
963
|
-
measureRow:
|
|
964
|
-
}), (h,
|
|
989
|
+
measureRow: L
|
|
990
|
+
}), (h, C) => (V(), ce(ue(e.tag), {
|
|
965
991
|
ref_key: "container",
|
|
966
|
-
ref:
|
|
992
|
+
ref: o,
|
|
967
993
|
"data-virtual-container": "",
|
|
968
994
|
role: "grid",
|
|
969
|
-
style:
|
|
995
|
+
style: W(b.value)
|
|
970
996
|
}, {
|
|
971
|
-
default:
|
|
972
|
-
e.items.length ? (V(),
|
|
997
|
+
default: de(() => [
|
|
998
|
+
e.items.length ? (V(), B("div", {
|
|
973
999
|
key: 1,
|
|
974
1000
|
"data-virtual-spacer": "",
|
|
975
|
-
style:
|
|
1001
|
+
style: W(v.value)
|
|
976
1002
|
}, [
|
|
977
|
-
(V(!0),
|
|
1003
|
+
(V(!0), B(ne, null, ie(N(d), (M) => (V(), B("div", ve({
|
|
978
1004
|
key: M.key,
|
|
979
1005
|
ref_for: !0,
|
|
980
|
-
ref:
|
|
1006
|
+
ref: S(M.row.index),
|
|
981
1007
|
role: "gridcell",
|
|
982
1008
|
"data-index": M.index,
|
|
983
1009
|
"data-key": String(M.key),
|
|
984
|
-
style:
|
|
1010
|
+
style: y(M.column.start - N(p), M.column.size, M.row.start - N(c), M.row.size)
|
|
985
1011
|
}, { ref_for: !0 }, e.itemAttrs), [
|
|
986
|
-
|
|
1012
|
+
Z(h.$slots, "default", {
|
|
987
1013
|
item: M.item,
|
|
988
1014
|
index: M.index,
|
|
989
1015
|
rowIndex: M.row.index,
|
|
@@ -991,13 +1017,13 @@ const yt = /* @__PURE__ */ ge({
|
|
|
991
1017
|
row: M.row,
|
|
992
1018
|
column: M.column
|
|
993
1019
|
})
|
|
994
|
-
], 16,
|
|
995
|
-
], 4)) :
|
|
1020
|
+
], 16, vt))), 128))
|
|
1021
|
+
], 4)) : Z(h.$slots, "empty", {}, void 0, void 0, 0)
|
|
996
1022
|
]),
|
|
997
1023
|
_: 3
|
|
998
1024
|
}, 8, ["style"]));
|
|
999
1025
|
}
|
|
1000
|
-
}),
|
|
1026
|
+
}), St = ["data-index", "data-key", "aria-rowindex"], pt = /* @__PURE__ */ we({
|
|
1001
1027
|
__name: "VirtualTable",
|
|
1002
1028
|
props: {
|
|
1003
1029
|
rows: {},
|
|
@@ -1017,31 +1043,31 @@ const yt = /* @__PURE__ */ ge({
|
|
|
1017
1043
|
},
|
|
1018
1044
|
emits: ["visibleRangeChange", "scrollEnd"],
|
|
1019
1045
|
setup(e, { expose: t, emit: i }) {
|
|
1020
|
-
const n = e, r = i,
|
|
1021
|
-
virtualRows:
|
|
1046
|
+
const n = e, r = i, o = _(null), d = _(null), O = _(0), {
|
|
1047
|
+
virtualRows: E,
|
|
1022
1048
|
columns: p,
|
|
1023
1049
|
totalWidth: c,
|
|
1024
|
-
totalHeight:
|
|
1050
|
+
totalHeight: w,
|
|
1025
1051
|
scrollAdjust: k,
|
|
1026
|
-
scrollToIndex:
|
|
1027
|
-
scrollToOffset:
|
|
1052
|
+
scrollToIndex: L,
|
|
1053
|
+
scrollToOffset: m,
|
|
1028
1054
|
measure: b,
|
|
1029
|
-
measureElement:
|
|
1030
|
-
} =
|
|
1055
|
+
measureElement: v
|
|
1056
|
+
} = ht({
|
|
1031
1057
|
rows: () => n.rows,
|
|
1032
1058
|
columns: () => n.columns,
|
|
1033
|
-
estimateRowSize: (u,
|
|
1034
|
-
const
|
|
1035
|
-
return typeof
|
|
1059
|
+
estimateRowSize: (u, I) => {
|
|
1060
|
+
const x = n.estimateRowSize;
|
|
1061
|
+
return typeof x == "number" ? x : x(u, I);
|
|
1036
1062
|
},
|
|
1037
|
-
container:
|
|
1063
|
+
container: o,
|
|
1038
1064
|
overscan: () => n.overscan,
|
|
1039
|
-
getRowKey: (u,
|
|
1065
|
+
getRowKey: (u, I) => n.getRowKey?.(u, I) ?? I,
|
|
1040
1066
|
initialRect: () => ({
|
|
1041
|
-
width:
|
|
1042
|
-
height:
|
|
1067
|
+
width: ee(n.width),
|
|
1068
|
+
height: ee(n.height)
|
|
1043
1069
|
}),
|
|
1044
|
-
viewportInset:
|
|
1070
|
+
viewportInset: O,
|
|
1045
1071
|
revision: () => n.revision,
|
|
1046
1072
|
itemSize: () => typeof n.estimateRowSize == "number" ? n.estimateRowSize : void 0,
|
|
1047
1073
|
windowScroll: () => n.windowScroll,
|
|
@@ -1050,32 +1076,32 @@ const yt = /* @__PURE__ */ ge({
|
|
|
1050
1076
|
onVisibleRangeChange: (u) => r("visibleRangeChange", u),
|
|
1051
1077
|
onScrollEnd: () => r("scrollEnd")
|
|
1052
1078
|
});
|
|
1053
|
-
|
|
1054
|
-
if (
|
|
1055
|
-
const
|
|
1056
|
-
|
|
1057
|
-
},
|
|
1058
|
-
|
|
1079
|
+
Te(d, (u, I, x) => {
|
|
1080
|
+
if (I === u && !u || !u || !U() || typeof ResizeObserver > "u") return;
|
|
1081
|
+
const j = () => {
|
|
1082
|
+
O.value = u.getBoundingClientRect().height;
|
|
1083
|
+
}, te = new ResizeObserver(j);
|
|
1084
|
+
te.observe(u), j(), x(() => te.disconnect());
|
|
1059
1085
|
});
|
|
1060
|
-
const
|
|
1086
|
+
const S = T(
|
|
1061
1087
|
() => Se({
|
|
1062
1088
|
height: n.height,
|
|
1063
1089
|
width: n.width,
|
|
1064
1090
|
horizontal: !1,
|
|
1065
1091
|
windowScroll: n.windowScroll
|
|
1066
1092
|
})
|
|
1067
|
-
),
|
|
1093
|
+
), y = T(() => ({
|
|
1068
1094
|
minWidth: `${c.value}px`
|
|
1069
|
-
})), h =
|
|
1095
|
+
})), h = T(() => ({
|
|
1070
1096
|
position: n.stickyHeader ? "sticky" : "relative",
|
|
1071
1097
|
top: n.stickyHeader ? "0px" : void 0,
|
|
1072
1098
|
zIndex: 3,
|
|
1073
1099
|
display: "flex",
|
|
1074
1100
|
width: `${c.value}px`
|
|
1075
|
-
})),
|
|
1101
|
+
})), C = T(() => ({
|
|
1076
1102
|
position: "relative",
|
|
1077
|
-
height: `${
|
|
1078
|
-
width: `${
|
|
1103
|
+
height: `${X(w.value)}px`,
|
|
1104
|
+
width: `${X(c.value)}px`
|
|
1079
1105
|
}));
|
|
1080
1106
|
function M(u) {
|
|
1081
1107
|
return {
|
|
@@ -1087,13 +1113,13 @@ const yt = /* @__PURE__ */ ge({
|
|
|
1087
1113
|
zIndex: u.pin ? n.stickyHeader ? 4 : 2 : u.stickyStyle.zIndex
|
|
1088
1114
|
};
|
|
1089
1115
|
}
|
|
1090
|
-
function
|
|
1116
|
+
function H(u, I) {
|
|
1091
1117
|
return {
|
|
1092
1118
|
position: "absolute",
|
|
1093
1119
|
top: 0,
|
|
1094
1120
|
left: 0,
|
|
1095
1121
|
width: "100%",
|
|
1096
|
-
height: `${
|
|
1122
|
+
height: `${I}px`,
|
|
1097
1123
|
display: "flex",
|
|
1098
1124
|
transform: `translateY(${u}px)`,
|
|
1099
1125
|
contain: "layout style",
|
|
@@ -1101,75 +1127,75 @@ const yt = /* @__PURE__ */ ge({
|
|
|
1101
1127
|
overflow: "hidden"
|
|
1102
1128
|
};
|
|
1103
1129
|
}
|
|
1104
|
-
function
|
|
1105
|
-
return (
|
|
1106
|
-
|
|
1130
|
+
function Q(u) {
|
|
1131
|
+
return (I) => {
|
|
1132
|
+
v(I, u);
|
|
1107
1133
|
};
|
|
1108
1134
|
}
|
|
1109
|
-
function $(u,
|
|
1110
|
-
return
|
|
1135
|
+
function $(u, I, x) {
|
|
1136
|
+
return I.accessor ? I.accessor(u, x) : u && typeof u == "object" && I.id in u ? u[I.id] : "";
|
|
1111
1137
|
}
|
|
1112
1138
|
return t({
|
|
1113
|
-
scrollToIndex:
|
|
1114
|
-
scrollToOffset:
|
|
1139
|
+
scrollToIndex: L,
|
|
1140
|
+
scrollToOffset: m,
|
|
1115
1141
|
measure: b
|
|
1116
|
-
}), (u,
|
|
1142
|
+
}), (u, I) => (V(), ce(ue(e.tag), {
|
|
1117
1143
|
ref_key: "container",
|
|
1118
|
-
ref:
|
|
1144
|
+
ref: o,
|
|
1119
1145
|
"data-virtual-container": "",
|
|
1120
1146
|
role: "table",
|
|
1121
|
-
style:
|
|
1147
|
+
style: W(S.value)
|
|
1122
1148
|
}, {
|
|
1123
|
-
default:
|
|
1124
|
-
|
|
1125
|
-
style:
|
|
1149
|
+
default: de(() => [
|
|
1150
|
+
Ee("div", {
|
|
1151
|
+
style: W(y.value)
|
|
1126
1152
|
}, [
|
|
1127
|
-
|
|
1153
|
+
Ee("div", {
|
|
1128
1154
|
ref_key: "header",
|
|
1129
1155
|
ref: d,
|
|
1130
1156
|
role: "row",
|
|
1131
|
-
style:
|
|
1157
|
+
style: W(h.value)
|
|
1132
1158
|
}, [
|
|
1133
|
-
|
|
1134
|
-
(V(!0),
|
|
1135
|
-
key:
|
|
1159
|
+
Z(u.$slots, "header", { columns: N(p) }, () => [
|
|
1160
|
+
(V(!0), B(ne, null, ie(N(p), (x) => (V(), B("div", {
|
|
1161
|
+
key: x.id,
|
|
1136
1162
|
role: "columnheader",
|
|
1137
|
-
style:
|
|
1138
|
-
}, Oe(
|
|
1163
|
+
style: W(M(x))
|
|
1164
|
+
}, Oe(x.header), 5))), 128))
|
|
1139
1165
|
])
|
|
1140
1166
|
], 4),
|
|
1141
|
-
e.rows.length ? (V(),
|
|
1167
|
+
e.rows.length ? (V(), B("div", {
|
|
1142
1168
|
key: 1,
|
|
1143
1169
|
"data-virtual-spacer": "",
|
|
1144
1170
|
role: "rowgroup",
|
|
1145
|
-
style:
|
|
1171
|
+
style: W(C.value)
|
|
1146
1172
|
}, [
|
|
1147
|
-
(V(!0),
|
|
1148
|
-
key:
|
|
1173
|
+
(V(!0), B(ne, null, ie(N(E), (x) => (V(), B("div", ve({
|
|
1174
|
+
key: x.key,
|
|
1149
1175
|
ref_for: !0,
|
|
1150
|
-
ref:
|
|
1176
|
+
ref: Q(x.index),
|
|
1151
1177
|
role: "row",
|
|
1152
|
-
"data-index":
|
|
1153
|
-
"data-key": String(
|
|
1154
|
-
"aria-rowindex":
|
|
1155
|
-
style:
|
|
1178
|
+
"data-index": x.index,
|
|
1179
|
+
"data-key": String(x.key),
|
|
1180
|
+
"aria-rowindex": x.index + 1,
|
|
1181
|
+
style: H(x.start - N(k), x.size)
|
|
1156
1182
|
}, { ref_for: !0 }, e.rowAttrs), [
|
|
1157
|
-
(V(!0),
|
|
1158
|
-
key:
|
|
1183
|
+
(V(!0), B(ne, null, ie(N(p), (j) => (V(), B("div", {
|
|
1184
|
+
key: j.id,
|
|
1159
1185
|
role: "cell",
|
|
1160
|
-
style:
|
|
1186
|
+
style: W(M(j))
|
|
1161
1187
|
}, [
|
|
1162
|
-
|
|
1163
|
-
row:
|
|
1164
|
-
column:
|
|
1165
|
-
rowIndex:
|
|
1166
|
-
value: $(
|
|
1188
|
+
Z(u.$slots, "cell", {
|
|
1189
|
+
row: x.item,
|
|
1190
|
+
column: j,
|
|
1191
|
+
rowIndex: x.index,
|
|
1192
|
+
value: $(x.item, j, x.index)
|
|
1167
1193
|
}, () => [
|
|
1168
|
-
|
|
1194
|
+
Ye(Oe($(x.item, j, x.index)), 1)
|
|
1169
1195
|
])
|
|
1170
1196
|
], 4))), 128))
|
|
1171
|
-
], 16,
|
|
1172
|
-
], 4)) :
|
|
1197
|
+
], 16, St))), 128))
|
|
1198
|
+
], 4)) : Z(u.$slots, "empty", {}, void 0, void 0, 0)
|
|
1173
1199
|
], 4)
|
|
1174
1200
|
]),
|
|
1175
1201
|
_: 3
|
|
@@ -1177,20 +1203,20 @@ const yt = /* @__PURE__ */ ge({
|
|
|
1177
1203
|
}
|
|
1178
1204
|
});
|
|
1179
1205
|
export {
|
|
1180
|
-
|
|
1206
|
+
qe as MeasurementCache,
|
|
1181
1207
|
xt as VirtualGrid,
|
|
1182
|
-
|
|
1208
|
+
zt as VirtualList,
|
|
1183
1209
|
pt as VirtualTable,
|
|
1184
|
-
|
|
1210
|
+
nt as Virtualizer,
|
|
1185
1211
|
J as clampScrollOffset,
|
|
1186
|
-
|
|
1187
|
-
|
|
1212
|
+
Ze as mapDomOffsetToVirtual,
|
|
1213
|
+
Je as mapVirtualOffsetToDom,
|
|
1188
1214
|
he as normalizeSize,
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1215
|
+
tt as resolveScrollOffset,
|
|
1216
|
+
X as scrollContentSize,
|
|
1217
|
+
mt as useVirtualGrid,
|
|
1218
|
+
$e as useVirtualList,
|
|
1219
|
+
ht as useVirtualTable,
|
|
1220
|
+
ge as useVirtualizer
|
|
1195
1221
|
};
|
|
1196
1222
|
//# sourceMappingURL=index.mjs.map
|