virtua 0.53.0 → 0.53.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/lib/angular/VMasonry.d.ts +6 -1
- package/lib/angular/index.js +78 -60
- package/lib/angular/index.js.map +1 -1
- package/lib/index.cjs +48 -41
- package/lib/index.cjs.map +1 -1
- package/lib/index.js +103 -96
- package/lib/index.js.map +1 -1
- package/lib/react/VMasonry.d.ts +4 -0
- package/lib/solid/VMasonry.d.ts +4 -0
- package/lib/solid/index.cjs +8 -2
- package/lib/solid/index.cjs.map +1 -1
- package/lib/solid/index.js +8 -2
- package/lib/solid/index.js.map +1 -1
- package/lib/solid/index.jsx +17 -3
- package/lib/solid/index.jsx.map +1 -1
- package/lib/svelte/VMasonry.svelte +19 -5
- package/lib/svelte/VMasonry.type.d.ts +4 -0
- package/lib/vue/VMasonry.d.ts +4 -0
- package/lib/vue/index.cjs +14 -7
- package/lib/vue/index.cjs.map +1 -1
- package/lib/vue/index.js +14 -7
- package/lib/vue/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -84,6 +84,10 @@ export declare class VMasonry<T> implements OnInit, VMasonryHandle {
|
|
|
84
84
|
* @defaultValue 200
|
|
85
85
|
*/
|
|
86
86
|
readonly bufferSize: import("@angular/core").InputSignal<number | undefined>;
|
|
87
|
+
/**
|
|
88
|
+
* List of indexes that should be always mounted, even when off screen.
|
|
89
|
+
*/
|
|
90
|
+
readonly keepMounted: import("@angular/core").InputSignal<readonly number[] | undefined>;
|
|
87
91
|
/**
|
|
88
92
|
* You can restore cache by passing a {@link CacheSnapshot} on mount. This is useful when you want to restore scroll position after navigation. The snapshot can be obtained from {@link VMasonryHandle.cache}.
|
|
89
93
|
*
|
|
@@ -98,6 +102,7 @@ export declare class VMasonry<T> implements OnInit, VMasonryHandle {
|
|
|
98
102
|
* Emitted when scrolling stops.
|
|
99
103
|
*/
|
|
100
104
|
readonly scrollEnded: import("@angular/core").OutputEmitterRef<void>;
|
|
105
|
+
private _indexes;
|
|
101
106
|
constructor();
|
|
102
107
|
ngOnInit(): void;
|
|
103
108
|
get cache(): CacheSnapshot;
|
|
@@ -110,5 +115,5 @@ export declare class VMasonry<T> implements OnInit, VMasonryHandle {
|
|
|
110
115
|
scrollTo(offset: number): void;
|
|
111
116
|
scrollBy(offset: number): void;
|
|
112
117
|
static ɵfac: i0.ɵɵFactoryDeclaration<VMasonry<any>, never>;
|
|
113
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<VMasonry<any>, "virtua-vmasonry", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "getKey": { "alias": "getKey"; "required": false; "isSignal": true; }; "lanes": { "alias": "lanes"; "required": true; "isSignal": true; }; "gap": { "alias": "gap"; "required": false; "isSignal": true; }; "itemSize": { "alias": "itemSize"; "required": false; "isSignal": true; }; "bufferSize": { "alias": "bufferSize"; "required": false; "isSignal": true; }; "cacheProp": { "alias": "cache"; "required": false; "isSignal": true; }; }, { "scrolled": "scrolled"; "scrollEnded": "scrollEnded"; }, ["template"], never, true, never>;
|
|
118
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<VMasonry<any>, "virtua-vmasonry", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "getKey": { "alias": "getKey"; "required": false; "isSignal": true; }; "lanes": { "alias": "lanes"; "required": true; "isSignal": true; }; "gap": { "alias": "gap"; "required": false; "isSignal": true; }; "itemSize": { "alias": "itemSize"; "required": false; "isSignal": true; }; "bufferSize": { "alias": "bufferSize"; "required": false; "isSignal": true; }; "keepMounted": { "alias": "keepMounted"; "required": false; "isSignal": true; }; "cacheProp": { "alias": "cache"; "required": false; "isSignal": true; }; }, { "scrolled": "scrolled"; "scrollEnded": "scrollEnded"; }, ["template"], never, true, never>;
|
|
114
119
|
}
|
package/lib/angular/index.js
CHANGED
|
@@ -6,18 +6,18 @@ import { NgTemplateOutlet as v } from "@angular/common";
|
|
|
6
6
|
|
|
7
7
|
var z, N = [], {min: w, max: b, abs: $, floor: R} = Math, I = (e, t, i) => w(i, b(t, e)), P = e => e.sort((e, t) => e - t), x = setTimeout, q = clearTimeout, F = "function" == typeof queueMicrotask ? queueMicrotask : e => {
|
|
8
8
|
Promise.resolve().then(e);
|
|
9
|
-
},
|
|
9
|
+
}, k = () => {
|
|
10
10
|
let e;
|
|
11
11
|
return [ new Promise(t => {
|
|
12
12
|
e = t;
|
|
13
13
|
}), e ];
|
|
14
|
-
},
|
|
15
|
-
z),
|
|
14
|
+
}, O = e => e.ownerDocument, C = e => e.defaultView, T = () => (null == z && (z = /iP(hone|od|ad)/.test(navigator.userAgent) || "MacIntel" === navigator.platform && navigator.maxTouchPoints > 0),
|
|
15
|
+
z), M = e => b(e.$getTotalSize(), e.$getViewportSize()), _ = ({$getRange: e, $findIndex: t, $getItemOffset: i, $getItemSize: s, $isSizeEqual: n, $getTotalSize: r, $getLength: o, $setLength: l, $isEstimating: a, $resize: c, $relayout: u}, p = 0) => {
|
|
16
16
|
let m = !!p, d = 1, h = 0, f = 0, g = 0, S = 0, y = 0, v = 0, z = 0, N = 0, R = null, I = [ 0, m ? b(p - 1, 0) : -1 ], P = !1;
|
|
17
|
-
const x = /* @__PURE__ */ new Set, q = () => g - f, F = () => q() + y + S,
|
|
17
|
+
const x = /* @__PURE__ */ new Set, q = () => g - f, F = () => q() + y + S, k = e => i(e) - y, O = e => {
|
|
18
18
|
if (2 === N) return !0;
|
|
19
19
|
if (R && 1 === N) return e < R[0];
|
|
20
|
-
const t = q(), i =
|
|
20
|
+
const t = q(), i = k(e), n = s(e);
|
|
21
21
|
return 1 !== z && 0 === N ? i + n <= t : i < t && i + n < t + h;
|
|
22
22
|
}, C = e => {
|
|
23
23
|
e && (T() && 0 !== z || R && 1 === N ? y += e : S += e);
|
|
@@ -39,7 +39,7 @@ z), _ = e => b(e.$getTotalSize(), e.$getViewportSize()), M = ({$getRange: e, $fi
|
|
|
39
39
|
},
|
|
40
40
|
$findItemIndex: e => t(e - f),
|
|
41
41
|
$isUnmeasuredItem: n,
|
|
42
|
-
$getItemOffset:
|
|
42
|
+
$getItemOffset: k,
|
|
43
43
|
$getItemSize: s,
|
|
44
44
|
$getItemsLength: o,
|
|
45
45
|
$getScrollOffset: () => g,
|
|
@@ -77,7 +77,7 @@ z), _ = e => b(e.$getTotalSize(), e.$getViewportSize()), M = ({$getRange: e, $fi
|
|
|
77
77
|
{
|
|
78
78
|
const e = i.filter(([e, t]) => !n(e, t));
|
|
79
79
|
if (!e.length) break;
|
|
80
|
-
C(c(e,
|
|
80
|
+
C(c(e, O, F(), h)), a = 3, o = !0;
|
|
81
81
|
break;
|
|
82
82
|
}
|
|
83
83
|
|
|
@@ -309,7 +309,7 @@ z), _ = e => b(e.$getTotalSize(), e.$getViewportSize()), M = ({$getRange: e, $fi
|
|
|
309
309
|
let t;
|
|
310
310
|
return {
|
|
311
311
|
i(i) {
|
|
312
|
-
(t || (t = new (C(
|
|
312
|
+
(t || (t = new (C(O(i)).ResizeObserver)(e))).observe(i);
|
|
313
313
|
},
|
|
314
314
|
o(e) {
|
|
315
315
|
t.unobserve(e);
|
|
@@ -389,7 +389,7 @@ z), _ = e => b(e.$getTotalSize(), e.$getViewportSize()), M = ({$getRange: e, $fi
|
|
|
389
389
|
}
|
|
390
390
|
};
|
|
391
391
|
}, ee = (e, t) => {
|
|
392
|
-
let i, s, n =
|
|
392
|
+
let i, s, n = k(), r = !0;
|
|
393
393
|
const o = /* @__PURE__ */ new WeakMap, l = U(n => {
|
|
394
394
|
const l = [];
|
|
395
395
|
for (const {target: a, contentRect: {width: c, height: u}} of n) if (a === i) c || u ? (r || s.u(),
|
|
@@ -409,7 +409,7 @@ z), _ = e => b(e.$getTotalSize(), e.$getViewportSize()), M = ({$getRange: e, $fi
|
|
|
409
409
|
}), n[1](!0);
|
|
410
410
|
},
|
|
411
411
|
$dispose() {
|
|
412
|
-
l.l(), s && s.l(), n[1](!1), n =
|
|
412
|
+
l.l(), s && s.l(), n[1](!1), n = k();
|
|
413
413
|
},
|
|
414
414
|
$observeItem: (e, t) => (o.set(e, t), l.i(e), () => {
|
|
415
415
|
o.delete(e), l.o(e);
|
|
@@ -661,7 +661,7 @@ z), _ = e => b(e.$getTotalSize(), e.$getViewportSize()), M = ({$getRange: e, $fi
|
|
|
661
661
|
ngOnInit() {
|
|
662
662
|
const e = this.itemSize(), t = this.ssrCount();
|
|
663
663
|
this.isSSR.set(!!t);
|
|
664
|
-
const i = this.v = L(this.data().length, e, this.cacheProp()), s = this.S =
|
|
664
|
+
const i = this.v = L(this.data().length, e, this.cacheProp()), s = this.S = _(i, t);
|
|
665
665
|
this.driver = ee(s, this.horizontal()), s.$subscribe(1, e => {
|
|
666
666
|
this.R.set(s.$getStateVersion()), e && this.$.tick();
|
|
667
667
|
}), s.$subscribe(4, () => {
|
|
@@ -677,7 +677,7 @@ z), _ = e => b(e.$getTotalSize(), e.$getViewportSize()), M = ({$getRange: e, $fi
|
|
|
677
677
|
return this.S.$getScrollOffset();
|
|
678
678
|
}
|
|
679
679
|
get scrollSize() {
|
|
680
|
-
return
|
|
680
|
+
return M(this.S);
|
|
681
681
|
}
|
|
682
682
|
get viewportSize() {
|
|
683
683
|
return this.S.$getViewportSize();
|
|
@@ -1084,9 +1084,9 @@ var ue = class i {
|
|
|
1084
1084
|
ngOnInit() {
|
|
1085
1085
|
const e = this.itemSize(), t = this.ssrCount();
|
|
1086
1086
|
this.isSSR.set(!!t);
|
|
1087
|
-
const i = this.v = L(this.data().length, e, this.cacheProp()), s = this.S =
|
|
1087
|
+
const i = this.v = L(this.data().length, e, this.cacheProp()), s = this.S = _(i, t);
|
|
1088
1088
|
this.driver = ((e, t) => {
|
|
1089
|
-
let i, s, n, r, o, l =
|
|
1089
|
+
let i, s, n, r, o, l = k();
|
|
1090
1090
|
const a = /* @__PURE__ */ new WeakMap, c = U(s => {
|
|
1091
1091
|
const n = [];
|
|
1092
1092
|
for (const {target: e, contentRect: {width: r, height: l}} of s) if (e === i) o && o(); else if (e.offsetParent) {
|
|
@@ -1097,7 +1097,7 @@ var ue = class i {
|
|
|
1097
1097
|
});
|
|
1098
1098
|
return {
|
|
1099
1099
|
$observe(a) {
|
|
1100
|
-
const u =
|
|
1100
|
+
const u = O(a), p = C(u), m = i = u.scrollingElement, d = t && "rtl" === getComputedStyle(m).direction, h = (e, t, i, s, n = 0) => {
|
|
1101
1101
|
const r = s ? "offsetLeft" : "offsetTop", o = n + (d ? t.clientWidth - e[r] - e.offsetWidth : e[r]), l = e.offsetParent;
|
|
1102
1102
|
return e !== i && l ? h(l, t, i, s, o) : o;
|
|
1103
1103
|
}, f = r = () => h(a, m, u.body, t), g = o = () => {
|
|
@@ -1108,7 +1108,7 @@ var ue = class i {
|
|
|
1108
1108
|
}, s = Z(e, p, m, t, d, null, f), l[1](!0);
|
|
1109
1109
|
},
|
|
1110
1110
|
$dispose() {
|
|
1111
|
-
n && n(), c.l(), s && s.l(), l[1](!1), l =
|
|
1111
|
+
n && n(), c.l(), s && s.l(), l[1](!1), l = k();
|
|
1112
1112
|
},
|
|
1113
1113
|
$observeItem: (e, t) => (a.set(e, t), c.i(e), () => {
|
|
1114
1114
|
a.delete(e), c.o(e);
|
|
@@ -1503,7 +1503,7 @@ var pe = class t {
|
|
|
1503
1503
|
P;
|
|
1504
1504
|
q;
|
|
1505
1505
|
F;
|
|
1506
|
-
|
|
1506
|
+
k;
|
|
1507
1507
|
driver;
|
|
1508
1508
|
N=d(n).nativeElement;
|
|
1509
1509
|
$=d(t);
|
|
@@ -1516,8 +1516,8 @@ var pe = class t {
|
|
|
1516
1516
|
});
|
|
1517
1517
|
rowCount=u(() => this.R() && this.P.$getItemsLength());
|
|
1518
1518
|
colCount=u(() => this.R() && this.q.$getItemsLength());
|
|
1519
|
-
|
|
1520
|
-
C=u(() => this.
|
|
1519
|
+
O=u(() => this.F.$getSizes(this.rows(), this.rowHeight()));
|
|
1520
|
+
C=u(() => this.k.$getSizes(this.cols(), this.colWidth()));
|
|
1521
1521
|
T=u(() => ((e = N) => {
|
|
1522
1522
|
const t = /* @__PURE__ */ new Map;
|
|
1523
1523
|
for (const i of e) {
|
|
@@ -1553,18 +1553,18 @@ var pe = class t {
|
|
|
1553
1553
|
y.push(e), i >= 0 && y.push(g[i]), v.push(t);
|
|
1554
1554
|
}
|
|
1555
1555
|
P(y), P(v);
|
|
1556
|
-
const F = A(y, u, m, i, s, d),
|
|
1556
|
+
const F = A(y, u, m, i, s, d), k = A(v, p, h, n, r, f), O = F.length, C = k.length, T = /* @__PURE__ */ new Map, M = [], _ = [];
|
|
1557
1557
|
for (const e of z) {
|
|
1558
1558
|
const t = Q(e, u), i = J(e, p);
|
|
1559
|
-
|
|
1560
|
-
const s =
|
|
1561
|
-
for (let n = F.indexOf(e.rowIndex); n <
|
|
1559
|
+
M.push(t), _.push(i);
|
|
1560
|
+
const s = k.indexOf(e.colIndex);
|
|
1561
|
+
for (let n = F.indexOf(e.rowIndex); n < O && F[n] < t; n++) {
|
|
1562
1562
|
const t = F[n] * p;
|
|
1563
|
-
for (let n = s; n < C &&
|
|
1563
|
+
for (let n = s; n < C && k[n] < i; n++) T.set(t + k[n], e);
|
|
1564
1564
|
}
|
|
1565
1565
|
}
|
|
1566
1566
|
const V = [];
|
|
1567
|
-
for (const e of
|
|
1567
|
+
for (const e of k) V.push(!t.$isMeasurable(e) && null);
|
|
1568
1568
|
const E = [], L = e.$getItemOffset(m), K = [];
|
|
1569
1569
|
let D = K;
|
|
1570
1570
|
const G = W.get(e), j = /* @__PURE__ */ new Map;
|
|
@@ -1572,7 +1572,7 @@ var pe = class t {
|
|
|
1572
1572
|
const l = o < m, a = o >= d, y = H(g, o, d), v = l ? 0 : a ? d : y < 0 ? -1 : g[y];
|
|
1573
1573
|
if (o === v) {
|
|
1574
1574
|
const e = l ? m : a ? u : y + 1 < g.length ? g[y + 1] : d;
|
|
1575
|
-
|
|
1575
|
+
M.push(e);
|
|
1576
1576
|
const t = [];
|
|
1577
1577
|
K.push({
|
|
1578
1578
|
$key: l ? -1 : a ? -2 : -3 - v,
|
|
@@ -1581,23 +1581,23 @@ var pe = class t {
|
|
|
1581
1581
|
}), D = t;
|
|
1582
1582
|
} else v < 0 && (D = K);
|
|
1583
1583
|
const z = y >= 0 && o === v, N = l || a || o === x || o >= i && o <= s, w = z ? L : null, $ = o * p, R = G && G.get(o), I = R && R.$cells, P = [];
|
|
1584
|
-
let q = 0, F = !e.$isMeasurable(o) && null,
|
|
1584
|
+
let q = 0, F = !e.$isMeasurable(o) && null, O = o + 1, _ = !1;
|
|
1585
1585
|
for (let e = 0; e < C; e++) {
|
|
1586
|
-
const i =
|
|
1586
|
+
const i = k[e], s = i < h, a = i >= f, m = s || a || i >= n && i <= r, d = T.get($ + i);
|
|
1587
1587
|
if (d ? d.rowIndex === o && d.colIndex === i : N && m) {
|
|
1588
1588
|
const n = d ? Q(d, u) : o + 1, r = d ? J(d, p) : i + 1, m = n - o, h = r - i, f = m > 1, g = h > 1, y = f || g;
|
|
1589
1589
|
let v, N;
|
|
1590
|
-
|
|
1590
|
+
O = b(O, n);
|
|
1591
1591
|
const w = s ? t.$getItemOffset(i) : null, $ = a ? t.$getItemOffset(p) - t.$getItemOffset(r) : null;
|
|
1592
1592
|
!1 !== F || f || (v = o, F = !0), !1 !== V[e] || g || (N = i, V[e] = !0);
|
|
1593
|
-
const R = l ? "columnheader" : i === S && (s || z) ? "rowheader" : "cell", x = y ? m : void 0,
|
|
1593
|
+
const R = l ? "columnheader" : i === S && (s || z) ? "rowheader" : "cell", x = y ? m : void 0, k = y ? h : void 0, C = "cell" !== R && c && c.rowIndex === o && c.colIndex === i ? c.order : void 0;
|
|
1594
1594
|
let T;
|
|
1595
1595
|
if (I) {
|
|
1596
1596
|
const e = I.length;
|
|
1597
1597
|
for (;q < e && I[q].$col < i; ) q++;
|
|
1598
1598
|
q < e && I[q].$col === i && (T = I[q]);
|
|
1599
1599
|
}
|
|
1600
|
-
if (!T || T.$rowSpan !== x || T.$colSpan !==
|
|
1600
|
+
if (!T || T.$rowSpan !== x || T.$colSpan !== k || T.$start !== w || T.$end !== $ || T.$measureRow !== v || T.$measureCol !== N || T.$role !== R || T.$sort !== C) {
|
|
1601
1601
|
let e = "1/l" + i;
|
|
1602
1602
|
y && (e += "/l" + n + "/l" + r);
|
|
1603
1603
|
const t = {
|
|
@@ -1610,7 +1610,7 @@ var pe = class t {
|
|
|
1610
1610
|
t.position = "sticky", t.zIndex = 2), T = {
|
|
1611
1611
|
$col: i,
|
|
1612
1612
|
$rowSpan: x,
|
|
1613
|
-
$colSpan:
|
|
1613
|
+
$colSpan: k,
|
|
1614
1614
|
$measureRow: v,
|
|
1615
1615
|
$measureCol: N,
|
|
1616
1616
|
$role: R,
|
|
@@ -1618,27 +1618,27 @@ var pe = class t {
|
|
|
1618
1618
|
$style: t,
|
|
1619
1619
|
$start: w,
|
|
1620
1620
|
$end: $
|
|
1621
|
-
},
|
|
1621
|
+
}, _ = !0;
|
|
1622
1622
|
}
|
|
1623
1623
|
P.push(T);
|
|
1624
1624
|
}
|
|
1625
1625
|
}
|
|
1626
1626
|
if (E.push(F), P.length) {
|
|
1627
|
-
const e = R && !
|
|
1627
|
+
const e = R && !_ && R.$cells.length === P.length && R.$top === w ? R : {
|
|
1628
1628
|
$row: o,
|
|
1629
1629
|
$cells: P,
|
|
1630
|
-
$style: Y(o,
|
|
1630
|
+
$style: Y(o, O, w, "top", 3),
|
|
1631
1631
|
$top: w
|
|
1632
1632
|
};
|
|
1633
1633
|
j.set(o, e), D.push(e);
|
|
1634
1634
|
}
|
|
1635
1635
|
}
|
|
1636
1636
|
return W.set(e, j), {
|
|
1637
|
-
$rowTemplate: X(e, F, E, P(
|
|
1638
|
-
$colTemplate: X(t,
|
|
1637
|
+
$rowTemplate: X(e, F, E, P(M), "max-content", u),
|
|
1638
|
+
$colTemplate: X(t, k, V, P(_), "minmax(max-content,auto)", p),
|
|
1639
1639
|
$groups: K
|
|
1640
1640
|
};
|
|
1641
|
-
})(this.F, this.
|
|
1641
|
+
})(this.F, this.k, this.P.$getRange(this.bufferSize()), this.q.$getRange(this.bufferSize()), this.T(), this.sectionRows(), this.keepMounted(), this.ariaSort())));
|
|
1642
1642
|
rowItem(e) {
|
|
1643
1643
|
return D(this.rows(), e);
|
|
1644
1644
|
}
|
|
@@ -1655,7 +1655,7 @@ var pe = class t {
|
|
|
1655
1655
|
gap: this.gap() + "px",
|
|
1656
1656
|
"margin-top": i + "px",
|
|
1657
1657
|
"margin-inline-start": s + "px",
|
|
1658
|
-
height:
|
|
1658
|
+
height: M(this.P) - i + "px",
|
|
1659
1659
|
"pointer-events": this.P.$isScrolling() || this.q.$isScrolling() ? "none" : void 0
|
|
1660
1660
|
};
|
|
1661
1661
|
});
|
|
@@ -1663,9 +1663,9 @@ var pe = class t {
|
|
|
1663
1663
|
m(() => {
|
|
1664
1664
|
const e = this.rows(), t = this.cols(), i = this.headerRows(), s = this.footerRows(), n = this.headerCols(), r = this.footerCols();
|
|
1665
1665
|
if (!this.P) return;
|
|
1666
|
-
const o = this.
|
|
1666
|
+
const o = this.O(), l = this.C();
|
|
1667
1667
|
S(() => {
|
|
1668
|
-
this.F.$setPinned(i, s), this.
|
|
1668
|
+
this.F.$setPinned(i, s), this.k.$setPinned(n, r);
|
|
1669
1669
|
const a = K(e), c = K(t);
|
|
1670
1670
|
a !== this.P.$getItemsLength() && this.P.$update(5, [ a ]), c !== this.q.$getItemsLength() && this.q.$update(5, [ c ]),
|
|
1671
1671
|
this.P.$update(9, o), this.q.$update(9, l);
|
|
@@ -1685,9 +1685,9 @@ var pe = class t {
|
|
|
1685
1685
|
ngOnInit() {
|
|
1686
1686
|
const e = this.N;
|
|
1687
1687
|
e.setAttribute("style", "display:block;overflow:auto;contain:strict;width:100%;height:100%;" + (e.getAttribute("style") || ""));
|
|
1688
|
-
const t = this.gap(), i = this.F = G(this.rows(), this.rowHeight(), t), s = this.
|
|
1688
|
+
const t = this.gap(), i = this.F = G(this.rows(), this.rowHeight(), t), s = this.k = G(this.cols(), this.colWidth(), t), n = this.P = _(i), r = this.q = _(s);
|
|
1689
1689
|
this.driver = ((e, t) => {
|
|
1690
|
-
let i, s, n, r =
|
|
1690
|
+
let i, s, n, r = k(), o = !0;
|
|
1691
1691
|
const l = /* @__PURE__ */ new WeakMap, a = /* @__PURE__ */ new WeakMap, c = U(r => {
|
|
1692
1692
|
const c = [], u = [];
|
|
1693
1693
|
for (const {target: p, contentRect: {width: m, height: d}} of r) if (p === i) m || d ? (o || (s.u(),
|
|
@@ -1712,7 +1712,7 @@ var pe = class t {
|
|
|
1712
1712
|
s = a(e, !1), n = a(t, !0), r[1](!0);
|
|
1713
1713
|
},
|
|
1714
1714
|
$dispose() {
|
|
1715
|
-
c.l(), s && s.l(), n && n.l(), r[1](!1), r =
|
|
1715
|
+
c.l(), s && s.l(), n && n.l(), r[1](!1), r = k();
|
|
1716
1716
|
},
|
|
1717
1717
|
$observeItem: (e, t, i) => (null != t && l.set(e, t), null != i && a.set(e, i),
|
|
1718
1718
|
c.i(e), () => {
|
|
@@ -1745,10 +1745,10 @@ var pe = class t {
|
|
|
1745
1745
|
return this.q.$getScrollOffset();
|
|
1746
1746
|
}
|
|
1747
1747
|
get scrollHeight() {
|
|
1748
|
-
return
|
|
1748
|
+
return M(this.P);
|
|
1749
1749
|
}
|
|
1750
1750
|
get scrollWidth() {
|
|
1751
|
-
return
|
|
1751
|
+
return M(this.q);
|
|
1752
1752
|
}
|
|
1753
1753
|
get viewportHeight() {
|
|
1754
1754
|
return this.P.$getViewportSize();
|
|
@@ -1777,7 +1777,7 @@ var pe = class t {
|
|
|
1777
1777
|
scrollToIndex(e) {
|
|
1778
1778
|
((e, t, i, s, n, r = N, {rowIndex: o, colIndex: l, rowAlign: a, colAlign: c}) => {
|
|
1779
1779
|
null != o && ne(e, t, s, r, o, a, !1), null != l && ne(e, i, n, N, l, c, !0);
|
|
1780
|
-
})(this.driver, this.P, this.q, this.F, this.
|
|
1780
|
+
})(this.driver, this.P, this.q, this.F, this.k, this.sectionRows(), e);
|
|
1781
1781
|
}
|
|
1782
1782
|
scrollTo({vertical: e, horizontal: t}) {
|
|
1783
1783
|
((e, t, i) => {
|
|
@@ -2059,6 +2059,7 @@ var fe = (e, t) => t ? `calc(${100 * e}% + ${t}px)` : 100 * e + "%", ge = class
|
|
|
2059
2059
|
gap=h();
|
|
2060
2060
|
itemSize=h();
|
|
2061
2061
|
bufferSize=h();
|
|
2062
|
+
keepMounted=h();
|
|
2062
2063
|
cacheProp=h(void 0, {
|
|
2063
2064
|
alias: "cache"
|
|
2064
2065
|
});
|
|
@@ -2072,22 +2073,32 @@ var fe = (e, t) => t ? `calc(${100 * e}% + ${t}px)` : 100 * e + "%", ge = class
|
|
|
2072
2073
|
N=d(n).nativeElement;
|
|
2073
2074
|
$=d(t);
|
|
2074
2075
|
R=g(void 0);
|
|
2076
|
+
I=u(() => {
|
|
2077
|
+
this.R();
|
|
2078
|
+
const e = this.data().length, [t, i] = this.S.$getRange(this.bufferSize()), s = this.keepMounted(), n = [];
|
|
2079
|
+
if (s) {
|
|
2080
|
+
const r = new Set(s);
|
|
2081
|
+
for (let e = t; e <= i; e++) r.add(e);
|
|
2082
|
+
for (const t of P([ ...r ])) t < e && n.push(t);
|
|
2083
|
+
} else for (let e = t; e <= i; e++) n.push(e);
|
|
2084
|
+
return n;
|
|
2085
|
+
});
|
|
2075
2086
|
items=u(() => {
|
|
2076
2087
|
this.R();
|
|
2077
|
-
const e = this.S, t = this.v, i = this.data(), s = this.getKey(), n = t.$getGap(), r = t.$getLanes(), o = fe(1 / r, n / r - n),
|
|
2078
|
-
for (
|
|
2079
|
-
const
|
|
2080
|
-
|
|
2081
|
-
key: s(
|
|
2082
|
-
index:
|
|
2083
|
-
data:
|
|
2084
|
-
offset: e.$getItemOffset(
|
|
2085
|
-
crossOffset: fe(
|
|
2088
|
+
const e = this.S, t = this.v, i = this.data(), s = this.getKey(), n = t.$getGap(), r = t.$getLanes(), o = fe(1 / r, n / r - n), l = [];
|
|
2089
|
+
for (const a of this.I()) {
|
|
2090
|
+
const c = i[a], u = t.$getItemLane(a);
|
|
2091
|
+
l.push({
|
|
2092
|
+
key: s(c, a),
|
|
2093
|
+
index: a,
|
|
2094
|
+
data: c,
|
|
2095
|
+
offset: e.$getItemOffset(a),
|
|
2096
|
+
crossOffset: fe(u / r, u * n / r),
|
|
2086
2097
|
crossSize: o,
|
|
2087
|
-
hide: e.$isUnmeasuredItem(
|
|
2098
|
+
hide: e.$isUnmeasuredItem(a)
|
|
2088
2099
|
});
|
|
2089
2100
|
}
|
|
2090
|
-
return
|
|
2101
|
+
return l;
|
|
2091
2102
|
});
|
|
2092
2103
|
containerStyle=u(() => (this.R(), {
|
|
2093
2104
|
contain: "size style",
|
|
@@ -2201,7 +2212,7 @@ var fe = (e, t) => t ? `calc(${100 * e}% + ${t}px)` : 100 * e + "%", ge = class
|
|
|
2201
2212
|
$getGap: () => i,
|
|
2202
2213
|
$getItemLane: e => (y(e), f[e])
|
|
2203
2214
|
};
|
|
2204
|
-
})(this.data().length, this.lanes(), this.gap(), this.itemSize(), this.cacheProp()), i = this.S =
|
|
2215
|
+
})(this.data().length, this.lanes(), this.gap(), this.itemSize(), this.cacheProp()), i = this.S = _(t);
|
|
2205
2216
|
this.driver = ee(i, !1), i.$subscribe(1, e => {
|
|
2206
2217
|
this.R.set(i.$getStateVersion()), e && this.$.tick();
|
|
2207
2218
|
}), i.$subscribe(4, () => {
|
|
@@ -2217,7 +2228,7 @@ var fe = (e, t) => t ? `calc(${100 * e}% + ${t}px)` : 100 * e + "%", ge = class
|
|
|
2217
2228
|
return this.S.$getScrollOffset();
|
|
2218
2229
|
}
|
|
2219
2230
|
get scrollSize() {
|
|
2220
|
-
return
|
|
2231
|
+
return M(this.S);
|
|
2221
2232
|
}
|
|
2222
2233
|
get viewportSize() {
|
|
2223
2234
|
return this.S.$getViewportSize();
|
|
@@ -2294,6 +2305,13 @@ var fe = (e, t) => t ? `calc(${100 * e}% + ${t}px)` : 100 * e + "%", ge = class
|
|
|
2294
2305
|
isRequired: !1,
|
|
2295
2306
|
transformFunction: null
|
|
2296
2307
|
},
|
|
2308
|
+
keepMounted: {
|
|
2309
|
+
classPropertyName: "keepMounted",
|
|
2310
|
+
publicName: "keepMounted",
|
|
2311
|
+
isSignal: !0,
|
|
2312
|
+
isRequired: !1,
|
|
2313
|
+
transformFunction: null
|
|
2314
|
+
},
|
|
2297
2315
|
cacheProp: {
|
|
2298
2316
|
classPropertyName: "cacheProp",
|
|
2299
2317
|
publicName: "cache",
|