@glhrmoura/vue-virtualize 0.2.0 → 0.2.1
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/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +448 -431
- package/dist/index.mjs.map +1 -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 ve, 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 we, 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 v = this.ordinalIndex(r, c);
|
|
174
|
+
return this.getItemOffset(v) + this.getItemSize(v);
|
|
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 v = this.ordinalIndex(r, c), k = this.getItemOffset(v), L = this.getItemSize(v);
|
|
182
182
|
n.push({
|
|
183
|
-
index:
|
|
184
|
-
key: this.getItemKey(
|
|
183
|
+
index: v,
|
|
184
|
+
key: this.getItemKey(v),
|
|
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;
|
|
256
263
|
}
|
|
264
|
+
if (n) {
|
|
265
|
+
t ? n.scrollLeft = e : n.scrollTop = e;
|
|
266
|
+
return;
|
|
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, v = null, k = 0, L = 0, m = 0, b = l(e.revision), w = 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() && w > 0 && a > w && f !== S, z = I() && w > 0 && a > w && f === S, R = g || z ? a - w : 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")), w = 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 : (v || (v = 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
|
+
})), v);
|
|
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(), v?.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, w = [];
|
|
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
|
+
w.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 w;
|
|
607
624
|
});
|
|
608
|
-
function
|
|
609
|
-
const
|
|
610
|
-
if (!
|
|
611
|
-
const
|
|
612
|
-
r.scrollToIndex(Math.floor(
|
|
625
|
+
function O(m, b) {
|
|
626
|
+
const w = l(e.items);
|
|
627
|
+
if (!w.length) return;
|
|
628
|
+
const S = Math.min(Math.max(m, 0), w.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 w = Math.max(n.get(m) ?? 0, b);
|
|
636
|
+
w <= 0 || w === n.get(m) || (n.set(m, w), r.measure(m, w));
|
|
620
637
|
}
|
|
621
638
|
let c = null;
|
|
622
|
-
const
|
|
639
|
+
const v = /* @__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 w = v.get(b.target);
|
|
644
|
+
if (w === void 0) continue;
|
|
645
|
+
const y = b.borderBoxSize?.[0]?.blockSize ?? b.contentRect.height;
|
|
646
|
+
y > 0 && p(w, 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 w = Ve(m), S = k();
|
|
652
|
+
if (!w) return;
|
|
653
|
+
v.set(w, b), S?.observe(w);
|
|
654
|
+
const y = w.getBoundingClientRect().height;
|
|
655
|
+
y > 0 && p(b, y);
|
|
639
656
|
}
|
|
640
657
|
return Ce(() => {
|
|
641
|
-
c?.disconnect(),
|
|
658
|
+
c?.disconnect(), v.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 v = c.width ?? c.minWidth ?? 160, k = {
|
|
678
695
|
...c,
|
|
679
696
|
start: d,
|
|
680
|
-
size:
|
|
681
|
-
end: d +
|
|
697
|
+
size: v,
|
|
698
|
+
end: d + v,
|
|
682
699
|
pinOffset: 0,
|
|
683
700
|
stickyStyle: {}
|
|
684
701
|
};
|
|
685
|
-
return d +=
|
|
702
|
+
return d += v, 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 v = O[c];
|
|
714
|
+
!v || v.pin !== "end" || (v.pinOffset = p, v.stickyStyle = {
|
|
698
715
|
position: "sticky",
|
|
699
716
|
right: `${p}px`,
|
|
700
717
|
zIndex: 2
|
|
701
|
-
}, p +=
|
|
718
|
+
}, p += v.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,26 +751,26 @@ 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
|
|
773
|
+
function vt(e, t, i) {
|
|
757
774
|
return {
|
|
758
775
|
position: "absolute",
|
|
759
776
|
top: 0,
|
|
@@ -766,7 +783,7 @@ function wt(e, t, i) {
|
|
|
766
783
|
overflow: "hidden"
|
|
767
784
|
};
|
|
768
785
|
}
|
|
769
|
-
const
|
|
786
|
+
const zt = /* @__PURE__ */ ve({
|
|
770
787
|
__name: "VirtualList",
|
|
771
788
|
props: {
|
|
772
789
|
items: {},
|
|
@@ -789,76 +806,76 @@ const yt = /* @__PURE__ */ ge({
|
|
|
789
806
|
},
|
|
790
807
|
emits: ["visibleRangeChange", "scrollEnd"],
|
|
791
808
|
setup(e, { expose: t, emit: i }) {
|
|
792
|
-
const n = e, r = i,
|
|
809
|
+
const n = e, r = i, o = _(null), { virtualItems: d, totalSize: O, scrollAdjust: E, scrollToIndex: p, scrollToOffset: c, measure: v, measureElement: k } = $e({
|
|
793
810
|
items: () => n.items,
|
|
794
|
-
estimateSize: (
|
|
811
|
+
estimateSize: (S, y) => {
|
|
795
812
|
const h = n.estimateSize;
|
|
796
|
-
return typeof h == "number" ? h : h(
|
|
813
|
+
return typeof h == "number" ? h : h(S, y);
|
|
797
814
|
},
|
|
798
815
|
itemSize: () => typeof n.estimateSize == "number" ? n.estimateSize : void 0,
|
|
799
|
-
container:
|
|
816
|
+
container: o,
|
|
800
817
|
horizontal: () => n.horizontal,
|
|
801
818
|
overscan: () => n.overscan,
|
|
802
819
|
gap: () => n.gap,
|
|
803
820
|
paddingStart: () => n.paddingStart,
|
|
804
821
|
paddingEnd: () => n.paddingEnd,
|
|
805
|
-
getItemKey: (
|
|
822
|
+
getItemKey: (S, y) => n.getItemKey?.(S, y) ?? y,
|
|
806
823
|
initialRect: () => ({
|
|
807
|
-
width:
|
|
808
|
-
height:
|
|
824
|
+
width: ee(n.width),
|
|
825
|
+
height: ee(n.height)
|
|
809
826
|
}),
|
|
810
827
|
revision: () => n.revision,
|
|
811
828
|
windowScroll: () => n.windowScroll,
|
|
812
829
|
scrollMargin: () => n.scrollMargin,
|
|
813
830
|
reverse: () => n.reverse,
|
|
814
|
-
onVisibleRangeChange: (
|
|
831
|
+
onVisibleRangeChange: (S) => r("visibleRangeChange", S),
|
|
815
832
|
onScrollEnd: () => r("scrollEnd")
|
|
816
|
-
}),
|
|
833
|
+
}), L = T(
|
|
817
834
|
() => Se({
|
|
818
835
|
height: n.height,
|
|
819
836
|
width: n.width,
|
|
820
837
|
horizontal: n.horizontal,
|
|
821
838
|
windowScroll: n.windowScroll
|
|
822
839
|
})
|
|
823
|
-
),
|
|
824
|
-
function b(
|
|
825
|
-
return
|
|
840
|
+
), m = T(() => gt(O.value, n.horizontal));
|
|
841
|
+
function b(S, y) {
|
|
842
|
+
return vt(S, n.horizontal, y);
|
|
826
843
|
}
|
|
827
|
-
function S
|
|
828
|
-
return (
|
|
829
|
-
k(
|
|
844
|
+
function w(S) {
|
|
845
|
+
return (y) => {
|
|
846
|
+
k(y, S);
|
|
830
847
|
};
|
|
831
848
|
}
|
|
832
849
|
return t({
|
|
833
850
|
scrollToIndex: p,
|
|
834
851
|
scrollToOffset: c,
|
|
835
|
-
measure:
|
|
836
|
-
}), (
|
|
852
|
+
measure: v
|
|
853
|
+
}), (S, y) => (V(), ce(ue(e.tag), {
|
|
837
854
|
ref_key: "container",
|
|
838
|
-
ref:
|
|
855
|
+
ref: o,
|
|
839
856
|
"data-virtual-container": "",
|
|
840
857
|
role: "list",
|
|
841
|
-
style:
|
|
858
|
+
style: W(L.value)
|
|
842
859
|
}, {
|
|
843
|
-
default:
|
|
844
|
-
e.items.length ? (V(),
|
|
860
|
+
default: de(() => [
|
|
861
|
+
e.items.length ? (V(), B("div", {
|
|
845
862
|
key: 1,
|
|
846
863
|
"data-virtual-spacer": "",
|
|
847
|
-
style:
|
|
864
|
+
style: W(m.value)
|
|
848
865
|
}, [
|
|
849
|
-
(V(!0),
|
|
866
|
+
(V(!0), B(ne, null, ie(N(d), (h) => (V(), ce(ue(e.itemTag), we({
|
|
850
867
|
key: h.key,
|
|
851
868
|
ref_for: !0,
|
|
852
|
-
ref:
|
|
869
|
+
ref: w(h.index),
|
|
853
870
|
role: "listitem",
|
|
854
871
|
"data-index": h.index,
|
|
855
872
|
"data-key": String(h.key),
|
|
856
873
|
"aria-setsize": e.items.length,
|
|
857
874
|
"aria-posinset": h.index + 1,
|
|
858
|
-
style: b(h.start -
|
|
875
|
+
style: b(h.start - N(E), h.size)
|
|
859
876
|
}, { ref_for: !0 }, e.itemAttrs), {
|
|
860
|
-
default:
|
|
861
|
-
|
|
877
|
+
default: de(() => [
|
|
878
|
+
Z(S.$slots, "default", {
|
|
862
879
|
item: h.item,
|
|
863
880
|
index: h.index,
|
|
864
881
|
start: h.start,
|
|
@@ -868,12 +885,12 @@ const yt = /* @__PURE__ */ ge({
|
|
|
868
885
|
]),
|
|
869
886
|
_: 2
|
|
870
887
|
}, 1040, ["data-index", "data-key", "aria-setsize", "aria-posinset", "style"]))), 128))
|
|
871
|
-
], 4)) :
|
|
888
|
+
], 4)) : Z(S.$slots, "empty", {}, void 0, void 0, 0)
|
|
872
889
|
]),
|
|
873
890
|
_: 3
|
|
874
891
|
}, 8, ["style"]));
|
|
875
892
|
}
|
|
876
|
-
}),
|
|
893
|
+
}), wt = ["data-index", "data-key"], xt = /* @__PURE__ */ ve({
|
|
877
894
|
__name: "VirtualGrid",
|
|
878
895
|
props: {
|
|
879
896
|
items: {},
|
|
@@ -896,61 +913,61 @@ const yt = /* @__PURE__ */ ge({
|
|
|
896
913
|
},
|
|
897
914
|
emits: ["visibleRangeChange", "scrollEnd"],
|
|
898
915
|
setup(e, { expose: t, emit: i }) {
|
|
899
|
-
const n = e, r = i,
|
|
916
|
+
const n = e, r = i, o = _(null), {
|
|
900
917
|
virtualCells: d,
|
|
901
|
-
totalWidth:
|
|
902
|
-
totalHeight:
|
|
918
|
+
totalWidth: O,
|
|
919
|
+
totalHeight: E,
|
|
903
920
|
scrollAdjustX: p,
|
|
904
921
|
scrollAdjustY: c,
|
|
905
|
-
scrollToIndex:
|
|
922
|
+
scrollToIndex: v,
|
|
906
923
|
scrollToOffset: k,
|
|
907
|
-
measureRow:
|
|
908
|
-
measureRowElement:
|
|
909
|
-
} =
|
|
924
|
+
measureRow: L,
|
|
925
|
+
measureRowElement: m
|
|
926
|
+
} = mt({
|
|
910
927
|
items: () => n.items,
|
|
911
928
|
columnCount: () => n.columnCount,
|
|
912
929
|
estimateRowSize: () => n.estimateRowSize,
|
|
913
930
|
estimateColumnSize: () => n.estimateColumnSize,
|
|
914
|
-
container:
|
|
931
|
+
container: o,
|
|
915
932
|
overscan: () => n.overscan,
|
|
916
933
|
overscanRows: () => n.overscanRows,
|
|
917
934
|
overscanColumns: () => n.overscanColumns,
|
|
918
935
|
rowGap: () => n.rowGap,
|
|
919
936
|
columnGap: () => n.columnGap,
|
|
920
|
-
getItemKey: (h,
|
|
937
|
+
getItemKey: (h, C) => n.getItemKey?.(h, C) ?? C,
|
|
921
938
|
initialRect: () => ({
|
|
922
|
-
width:
|
|
923
|
-
height:
|
|
939
|
+
width: ee(n.width),
|
|
940
|
+
height: ee(n.height)
|
|
924
941
|
}),
|
|
925
942
|
revision: () => n.revision,
|
|
926
943
|
windowScroll: () => n.windowScroll,
|
|
927
944
|
scrollMargin: () => n.scrollMargin,
|
|
928
945
|
onVisibleRangeChange: (h) => r("visibleRangeChange", h),
|
|
929
946
|
onScrollEnd: () => r("scrollEnd")
|
|
930
|
-
}), b =
|
|
947
|
+
}), b = T(
|
|
931
948
|
() => Se({
|
|
932
949
|
height: n.height,
|
|
933
950
|
width: n.width,
|
|
934
951
|
horizontal: !1,
|
|
935
952
|
windowScroll: n.windowScroll
|
|
936
953
|
})
|
|
937
|
-
),
|
|
954
|
+
), w = T(() => ({
|
|
938
955
|
position: "relative",
|
|
939
|
-
width: `${
|
|
940
|
-
height: `${
|
|
956
|
+
width: `${X(O.value)}px`,
|
|
957
|
+
height: `${X(E.value)}px`
|
|
941
958
|
}));
|
|
942
|
-
function
|
|
943
|
-
return (
|
|
944
|
-
|
|
959
|
+
function S(h) {
|
|
960
|
+
return (C) => {
|
|
961
|
+
m(C, h);
|
|
945
962
|
};
|
|
946
963
|
}
|
|
947
|
-
function
|
|
964
|
+
function y(h, C, M, H) {
|
|
948
965
|
return {
|
|
949
966
|
position: "absolute",
|
|
950
967
|
top: 0,
|
|
951
968
|
left: 0,
|
|
952
|
-
width: `${
|
|
953
|
-
height: `${
|
|
969
|
+
width: `${C}px`,
|
|
970
|
+
height: `${H}px`,
|
|
954
971
|
transform: `translate(${h}px, ${M}px)`,
|
|
955
972
|
contain: "layout style",
|
|
956
973
|
boxSizing: "border-box",
|
|
@@ -958,32 +975,32 @@ const yt = /* @__PURE__ */ ge({
|
|
|
958
975
|
};
|
|
959
976
|
}
|
|
960
977
|
return t({
|
|
961
|
-
scrollToIndex:
|
|
978
|
+
scrollToIndex: v,
|
|
962
979
|
scrollToOffset: k,
|
|
963
|
-
measureRow:
|
|
964
|
-
}), (h,
|
|
980
|
+
measureRow: L
|
|
981
|
+
}), (h, C) => (V(), ce(ue(e.tag), {
|
|
965
982
|
ref_key: "container",
|
|
966
|
-
ref:
|
|
983
|
+
ref: o,
|
|
967
984
|
"data-virtual-container": "",
|
|
968
985
|
role: "grid",
|
|
969
|
-
style:
|
|
986
|
+
style: W(b.value)
|
|
970
987
|
}, {
|
|
971
|
-
default:
|
|
972
|
-
e.items.length ? (V(),
|
|
988
|
+
default: de(() => [
|
|
989
|
+
e.items.length ? (V(), B("div", {
|
|
973
990
|
key: 1,
|
|
974
991
|
"data-virtual-spacer": "",
|
|
975
|
-
style:
|
|
992
|
+
style: W(w.value)
|
|
976
993
|
}, [
|
|
977
|
-
(V(!0),
|
|
994
|
+
(V(!0), B(ne, null, ie(N(d), (M) => (V(), B("div", we({
|
|
978
995
|
key: M.key,
|
|
979
996
|
ref_for: !0,
|
|
980
|
-
ref:
|
|
997
|
+
ref: S(M.row.index),
|
|
981
998
|
role: "gridcell",
|
|
982
999
|
"data-index": M.index,
|
|
983
1000
|
"data-key": String(M.key),
|
|
984
|
-
style:
|
|
1001
|
+
style: y(M.column.start - N(p), M.column.size, M.row.start - N(c), M.row.size)
|
|
985
1002
|
}, { ref_for: !0 }, e.itemAttrs), [
|
|
986
|
-
|
|
1003
|
+
Z(h.$slots, "default", {
|
|
987
1004
|
item: M.item,
|
|
988
1005
|
index: M.index,
|
|
989
1006
|
rowIndex: M.row.index,
|
|
@@ -991,13 +1008,13 @@ const yt = /* @__PURE__ */ ge({
|
|
|
991
1008
|
row: M.row,
|
|
992
1009
|
column: M.column
|
|
993
1010
|
})
|
|
994
|
-
], 16,
|
|
995
|
-
], 4)) :
|
|
1011
|
+
], 16, wt))), 128))
|
|
1012
|
+
], 4)) : Z(h.$slots, "empty", {}, void 0, void 0, 0)
|
|
996
1013
|
]),
|
|
997
1014
|
_: 3
|
|
998
1015
|
}, 8, ["style"]));
|
|
999
1016
|
}
|
|
1000
|
-
}),
|
|
1017
|
+
}), St = ["data-index", "data-key", "aria-rowindex"], pt = /* @__PURE__ */ ve({
|
|
1001
1018
|
__name: "VirtualTable",
|
|
1002
1019
|
props: {
|
|
1003
1020
|
rows: {},
|
|
@@ -1017,31 +1034,31 @@ const yt = /* @__PURE__ */ ge({
|
|
|
1017
1034
|
},
|
|
1018
1035
|
emits: ["visibleRangeChange", "scrollEnd"],
|
|
1019
1036
|
setup(e, { expose: t, emit: i }) {
|
|
1020
|
-
const n = e, r = i,
|
|
1021
|
-
virtualRows:
|
|
1037
|
+
const n = e, r = i, o = _(null), d = _(null), O = _(0), {
|
|
1038
|
+
virtualRows: E,
|
|
1022
1039
|
columns: p,
|
|
1023
1040
|
totalWidth: c,
|
|
1024
|
-
totalHeight:
|
|
1041
|
+
totalHeight: v,
|
|
1025
1042
|
scrollAdjust: k,
|
|
1026
|
-
scrollToIndex:
|
|
1027
|
-
scrollToOffset:
|
|
1043
|
+
scrollToIndex: L,
|
|
1044
|
+
scrollToOffset: m,
|
|
1028
1045
|
measure: b,
|
|
1029
|
-
measureElement:
|
|
1030
|
-
} =
|
|
1046
|
+
measureElement: w
|
|
1047
|
+
} = ht({
|
|
1031
1048
|
rows: () => n.rows,
|
|
1032
1049
|
columns: () => n.columns,
|
|
1033
|
-
estimateRowSize: (u,
|
|
1034
|
-
const
|
|
1035
|
-
return typeof
|
|
1050
|
+
estimateRowSize: (u, I) => {
|
|
1051
|
+
const x = n.estimateRowSize;
|
|
1052
|
+
return typeof x == "number" ? x : x(u, I);
|
|
1036
1053
|
},
|
|
1037
|
-
container:
|
|
1054
|
+
container: o,
|
|
1038
1055
|
overscan: () => n.overscan,
|
|
1039
|
-
getRowKey: (u,
|
|
1056
|
+
getRowKey: (u, I) => n.getRowKey?.(u, I) ?? I,
|
|
1040
1057
|
initialRect: () => ({
|
|
1041
|
-
width:
|
|
1042
|
-
height:
|
|
1058
|
+
width: ee(n.width),
|
|
1059
|
+
height: ee(n.height)
|
|
1043
1060
|
}),
|
|
1044
|
-
viewportInset:
|
|
1061
|
+
viewportInset: O,
|
|
1045
1062
|
revision: () => n.revision,
|
|
1046
1063
|
itemSize: () => typeof n.estimateRowSize == "number" ? n.estimateRowSize : void 0,
|
|
1047
1064
|
windowScroll: () => n.windowScroll,
|
|
@@ -1050,32 +1067,32 @@ const yt = /* @__PURE__ */ ge({
|
|
|
1050
1067
|
onVisibleRangeChange: (u) => r("visibleRangeChange", u),
|
|
1051
1068
|
onScrollEnd: () => r("scrollEnd")
|
|
1052
1069
|
});
|
|
1053
|
-
|
|
1054
|
-
if (
|
|
1055
|
-
const
|
|
1056
|
-
|
|
1057
|
-
},
|
|
1058
|
-
|
|
1070
|
+
Te(d, (u, I, x) => {
|
|
1071
|
+
if (I === u && !u || !u || !U() || typeof ResizeObserver > "u") return;
|
|
1072
|
+
const j = () => {
|
|
1073
|
+
O.value = u.getBoundingClientRect().height;
|
|
1074
|
+
}, te = new ResizeObserver(j);
|
|
1075
|
+
te.observe(u), j(), x(() => te.disconnect());
|
|
1059
1076
|
});
|
|
1060
|
-
const
|
|
1077
|
+
const S = T(
|
|
1061
1078
|
() => Se({
|
|
1062
1079
|
height: n.height,
|
|
1063
1080
|
width: n.width,
|
|
1064
1081
|
horizontal: !1,
|
|
1065
1082
|
windowScroll: n.windowScroll
|
|
1066
1083
|
})
|
|
1067
|
-
),
|
|
1084
|
+
), y = T(() => ({
|
|
1068
1085
|
minWidth: `${c.value}px`
|
|
1069
|
-
})), h =
|
|
1086
|
+
})), h = T(() => ({
|
|
1070
1087
|
position: n.stickyHeader ? "sticky" : "relative",
|
|
1071
1088
|
top: n.stickyHeader ? "0px" : void 0,
|
|
1072
1089
|
zIndex: 3,
|
|
1073
1090
|
display: "flex",
|
|
1074
1091
|
width: `${c.value}px`
|
|
1075
|
-
})),
|
|
1092
|
+
})), C = T(() => ({
|
|
1076
1093
|
position: "relative",
|
|
1077
|
-
height: `${
|
|
1078
|
-
width: `${
|
|
1094
|
+
height: `${X(v.value)}px`,
|
|
1095
|
+
width: `${X(c.value)}px`
|
|
1079
1096
|
}));
|
|
1080
1097
|
function M(u) {
|
|
1081
1098
|
return {
|
|
@@ -1087,13 +1104,13 @@ const yt = /* @__PURE__ */ ge({
|
|
|
1087
1104
|
zIndex: u.pin ? n.stickyHeader ? 4 : 2 : u.stickyStyle.zIndex
|
|
1088
1105
|
};
|
|
1089
1106
|
}
|
|
1090
|
-
function
|
|
1107
|
+
function H(u, I) {
|
|
1091
1108
|
return {
|
|
1092
1109
|
position: "absolute",
|
|
1093
1110
|
top: 0,
|
|
1094
1111
|
left: 0,
|
|
1095
1112
|
width: "100%",
|
|
1096
|
-
height: `${
|
|
1113
|
+
height: `${I}px`,
|
|
1097
1114
|
display: "flex",
|
|
1098
1115
|
transform: `translateY(${u}px)`,
|
|
1099
1116
|
contain: "layout style",
|
|
@@ -1101,75 +1118,75 @@ const yt = /* @__PURE__ */ ge({
|
|
|
1101
1118
|
overflow: "hidden"
|
|
1102
1119
|
};
|
|
1103
1120
|
}
|
|
1104
|
-
function
|
|
1105
|
-
return (
|
|
1106
|
-
|
|
1121
|
+
function Q(u) {
|
|
1122
|
+
return (I) => {
|
|
1123
|
+
w(I, u);
|
|
1107
1124
|
};
|
|
1108
1125
|
}
|
|
1109
|
-
function $(u,
|
|
1110
|
-
return
|
|
1126
|
+
function $(u, I, x) {
|
|
1127
|
+
return I.accessor ? I.accessor(u, x) : u && typeof u == "object" && I.id in u ? u[I.id] : "";
|
|
1111
1128
|
}
|
|
1112
1129
|
return t({
|
|
1113
|
-
scrollToIndex:
|
|
1114
|
-
scrollToOffset:
|
|
1130
|
+
scrollToIndex: L,
|
|
1131
|
+
scrollToOffset: m,
|
|
1115
1132
|
measure: b
|
|
1116
|
-
}), (u,
|
|
1133
|
+
}), (u, I) => (V(), ce(ue(e.tag), {
|
|
1117
1134
|
ref_key: "container",
|
|
1118
|
-
ref:
|
|
1135
|
+
ref: o,
|
|
1119
1136
|
"data-virtual-container": "",
|
|
1120
1137
|
role: "table",
|
|
1121
|
-
style:
|
|
1138
|
+
style: W(S.value)
|
|
1122
1139
|
}, {
|
|
1123
|
-
default:
|
|
1124
|
-
|
|
1125
|
-
style:
|
|
1140
|
+
default: de(() => [
|
|
1141
|
+
Ee("div", {
|
|
1142
|
+
style: W(y.value)
|
|
1126
1143
|
}, [
|
|
1127
|
-
|
|
1144
|
+
Ee("div", {
|
|
1128
1145
|
ref_key: "header",
|
|
1129
1146
|
ref: d,
|
|
1130
1147
|
role: "row",
|
|
1131
|
-
style:
|
|
1148
|
+
style: W(h.value)
|
|
1132
1149
|
}, [
|
|
1133
|
-
|
|
1134
|
-
(V(!0),
|
|
1135
|
-
key:
|
|
1150
|
+
Z(u.$slots, "header", { columns: N(p) }, () => [
|
|
1151
|
+
(V(!0), B(ne, null, ie(N(p), (x) => (V(), B("div", {
|
|
1152
|
+
key: x.id,
|
|
1136
1153
|
role: "columnheader",
|
|
1137
|
-
style:
|
|
1138
|
-
}, Oe(
|
|
1154
|
+
style: W(M(x))
|
|
1155
|
+
}, Oe(x.header), 5))), 128))
|
|
1139
1156
|
])
|
|
1140
1157
|
], 4),
|
|
1141
|
-
e.rows.length ? (V(),
|
|
1158
|
+
e.rows.length ? (V(), B("div", {
|
|
1142
1159
|
key: 1,
|
|
1143
1160
|
"data-virtual-spacer": "",
|
|
1144
1161
|
role: "rowgroup",
|
|
1145
|
-
style:
|
|
1162
|
+
style: W(C.value)
|
|
1146
1163
|
}, [
|
|
1147
|
-
(V(!0),
|
|
1148
|
-
key:
|
|
1164
|
+
(V(!0), B(ne, null, ie(N(E), (x) => (V(), B("div", we({
|
|
1165
|
+
key: x.key,
|
|
1149
1166
|
ref_for: !0,
|
|
1150
|
-
ref:
|
|
1167
|
+
ref: Q(x.index),
|
|
1151
1168
|
role: "row",
|
|
1152
|
-
"data-index":
|
|
1153
|
-
"data-key": String(
|
|
1154
|
-
"aria-rowindex":
|
|
1155
|
-
style:
|
|
1169
|
+
"data-index": x.index,
|
|
1170
|
+
"data-key": String(x.key),
|
|
1171
|
+
"aria-rowindex": x.index + 1,
|
|
1172
|
+
style: H(x.start - N(k), x.size)
|
|
1156
1173
|
}, { ref_for: !0 }, e.rowAttrs), [
|
|
1157
|
-
(V(!0),
|
|
1158
|
-
key:
|
|
1174
|
+
(V(!0), B(ne, null, ie(N(p), (j) => (V(), B("div", {
|
|
1175
|
+
key: j.id,
|
|
1159
1176
|
role: "cell",
|
|
1160
|
-
style:
|
|
1177
|
+
style: W(M(j))
|
|
1161
1178
|
}, [
|
|
1162
|
-
|
|
1163
|
-
row:
|
|
1164
|
-
column:
|
|
1165
|
-
rowIndex:
|
|
1166
|
-
value: $(
|
|
1179
|
+
Z(u.$slots, "cell", {
|
|
1180
|
+
row: x.item,
|
|
1181
|
+
column: j,
|
|
1182
|
+
rowIndex: x.index,
|
|
1183
|
+
value: $(x.item, j, x.index)
|
|
1167
1184
|
}, () => [
|
|
1168
|
-
|
|
1185
|
+
Ye(Oe($(x.item, j, x.index)), 1)
|
|
1169
1186
|
])
|
|
1170
1187
|
], 4))), 128))
|
|
1171
|
-
], 16,
|
|
1172
|
-
], 4)) :
|
|
1188
|
+
], 16, St))), 128))
|
|
1189
|
+
], 4)) : Z(u.$slots, "empty", {}, void 0, void 0, 0)
|
|
1173
1190
|
], 4)
|
|
1174
1191
|
]),
|
|
1175
1192
|
_: 3
|
|
@@ -1177,20 +1194,20 @@ const yt = /* @__PURE__ */ ge({
|
|
|
1177
1194
|
}
|
|
1178
1195
|
});
|
|
1179
1196
|
export {
|
|
1180
|
-
|
|
1197
|
+
qe as MeasurementCache,
|
|
1181
1198
|
xt as VirtualGrid,
|
|
1182
|
-
|
|
1199
|
+
zt as VirtualList,
|
|
1183
1200
|
pt as VirtualTable,
|
|
1184
|
-
|
|
1201
|
+
nt as Virtualizer,
|
|
1185
1202
|
J as clampScrollOffset,
|
|
1186
|
-
|
|
1187
|
-
|
|
1203
|
+
Ze as mapDomOffsetToVirtual,
|
|
1204
|
+
Je as mapVirtualOffsetToDom,
|
|
1188
1205
|
he as normalizeSize,
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1206
|
+
tt as resolveScrollOffset,
|
|
1207
|
+
X as scrollContentSize,
|
|
1208
|
+
mt as useVirtualGrid,
|
|
1209
|
+
$e as useVirtualList,
|
|
1210
|
+
ht as useVirtualTable,
|
|
1211
|
+
ge as useVirtualizer
|
|
1195
1212
|
};
|
|
1196
1213
|
//# sourceMappingURL=index.mjs.map
|