virtua 0.52.9 → 0.53.0
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 +286 -193
- package/lib/angular/VList.d.ts +3 -1
- package/lib/angular/VMasonry.d.ts +114 -0
- package/lib/angular/Virtualizer.d.ts +3 -1
- package/lib/angular/WindowVirtualizer.d.ts +3 -1
- package/lib/angular/index.d.ts +1 -0
- package/lib/angular/index.js +812 -429
- package/lib/angular/index.js.map +1 -1
- package/lib/core/index.cjs +215 -137
- package/lib/core/index.cjs.map +1 -1
- package/lib/core/index.d.ts +1 -0
- package/lib/core/index.js +282 -204
- package/lib/core/index.js.map +1 -1
- package/lib/core/layouts/masonry.d.ts +1 -0
- package/lib/index.cjs +595 -423
- package/lib/index.cjs.map +1 -1
- package/lib/index.js +594 -424
- package/lib/index.js.map +1 -1
- package/lib/react/VMasonry.d.ts +105 -0
- package/lib/react/Virtualizer.d.ts +3 -1
- package/lib/react/WindowVirtualizer.d.ts +3 -1
- package/lib/react/index.d.ts +2 -0
- package/lib/react/types.d.ts +1 -1
- package/lib/solid/VMasonry.d.ts +107 -0
- package/lib/solid/Virtualizer.d.ts +3 -1
- package/lib/solid/WindowVirtualizer.d.ts +3 -1
- package/lib/solid/index.cjs +749 -541
- package/lib/solid/index.cjs.map +1 -1
- package/lib/solid/index.d.ts +2 -0
- package/lib/solid/index.js +704 -505
- package/lib/solid/index.js.map +1 -1
- package/lib/solid/index.jsx +345 -8
- package/lib/solid/index.jsx.map +1 -1
- package/lib/solid/types.d.ts +1 -1
- package/lib/svelte/MasonryItem.svelte +49 -0
- package/lib/svelte/VGrid.svelte +1 -1
- package/lib/svelte/VList.svelte +1 -1
- package/lib/svelte/VMasonry.svelte +182 -0
- package/lib/svelte/VMasonry.type.d.ts +104 -0
- package/lib/svelte/Virtualizer.svelte +1 -1
- package/lib/svelte/Virtualizer.type.d.ts +3 -1
- package/lib/svelte/WindowVirtualizer.svelte +1 -1
- package/lib/svelte/WindowVirtualizer.type.d.ts +3 -1
- package/lib/svelte/index.d.ts +2 -0
- package/lib/svelte/index.js +2 -1
- package/lib/svelte/types.d.ts +2 -2
- package/lib/vue/VMasonry.d.ts +110 -0
- package/lib/vue/Virtualizer.d.ts +3 -1
- package/lib/vue/WindowVirtualizer.d.ts +3 -1
- package/lib/vue/index.cjs +666 -442
- package/lib/vue/index.cjs.map +1 -1
- package/lib/vue/index.d.ts +2 -0
- package/lib/vue/index.js +695 -476
- package/lib/vue/index.js.map +1 -1
- package/package.json +6 -16
package/lib/angular/index.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import * as e from "@angular/core";
|
|
2
2
|
|
|
3
|
-
import { ApplicationRef as t, ChangeDetectionStrategy as i, DestroyRef as s, ElementRef as
|
|
3
|
+
import { ApplicationRef as t, ChangeDetectionStrategy as i, DestroyRef as s, ElementRef as n, HostAttributeToken as r, InjectionToken as o, TemplateRef as l, afterNextRender as a, afterRenderEffect as c, computed as u, contentChild as p, effect as m, inject as d, input as h, output as f, signal as g, untracked as S, viewChild as y } from "@angular/core";
|
|
4
4
|
|
|
5
5
|
import { NgTemplateOutlet as v } from "@angular/common";
|
|
6
6
|
|
|
7
|
-
var
|
|
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
|
+
}, O = () => {
|
|
10
10
|
let e;
|
|
11
11
|
return [ new Promise(t => {
|
|
12
12
|
e = t;
|
|
13
13
|
}), e ];
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
let m = !!p, d = 1, h = 0, f = 0, g = 0, S = 0, y = 0, v = 0,
|
|
17
|
-
const x = /* @__PURE__ */ new Set, q = () => g - f, F = () => q() + y + S,
|
|
18
|
-
if (2 ===
|
|
19
|
-
if (R && 1 ===
|
|
20
|
-
const t = q(), i =
|
|
21
|
-
return 1 !==
|
|
22
|
-
},
|
|
23
|
-
e && (T() && 0 !==
|
|
14
|
+
}, k = 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), _ = e => b(e.$getTotalSize(), e.$getViewportSize()), M = ({$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
|
+
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, O = e => i(e) - y, k = e => {
|
|
18
|
+
if (2 === N) return !0;
|
|
19
|
+
if (R && 1 === N) return e < R[0];
|
|
20
|
+
const t = q(), i = O(e), n = s(e);
|
|
21
|
+
return 1 !== z && 0 === N ? i + n <= t : i < t && i + n < t + h;
|
|
22
|
+
}, C = e => {
|
|
23
|
+
e && (T() && 0 !== z || R && 1 === N ? y += e : S += e);
|
|
24
24
|
};
|
|
25
25
|
return {
|
|
26
26
|
$dispose: () => {
|
|
@@ -31,23 +31,23 @@ w), M = e => b(e.$getTotalSize(), e.$getViewportSize()), _ = ({$getRange: e, $fi
|
|
|
31
31
|
if (!P || m) return I;
|
|
32
32
|
let i, s;
|
|
33
33
|
if (v) [i, s] = I; else {
|
|
34
|
-
let
|
|
35
|
-
a() || (t = b(0, t), 1 !==
|
|
36
|
-
R && (i =
|
|
34
|
+
let n = b(0, F()), r = n + h;
|
|
35
|
+
a() || (t = b(0, t), 1 !== z && (n -= t), 2 !== z && (r += t)), [i, s] = I = e(b(0, n), b(0, r)),
|
|
36
|
+
R && (i = w(i, R[0]), s = b(s, R[1]));
|
|
37
37
|
}
|
|
38
|
-
return [ b(i, 0),
|
|
38
|
+
return [ b(i, 0), w(s, o() - 1) ];
|
|
39
39
|
},
|
|
40
40
|
$findItemIndex: e => t(e - f),
|
|
41
|
-
$isUnmeasuredItem:
|
|
42
|
-
$getItemOffset:
|
|
41
|
+
$isUnmeasuredItem: n,
|
|
42
|
+
$getItemOffset: O,
|
|
43
43
|
$getItemSize: s,
|
|
44
44
|
$getItemsLength: o,
|
|
45
45
|
$getScrollOffset: () => g,
|
|
46
|
-
$isScrolling: () => 0 !==
|
|
46
|
+
$isScrolling: () => 0 !== z,
|
|
47
47
|
$getViewportSize: () => h,
|
|
48
48
|
$getStartSpacerSize: () => f,
|
|
49
|
-
$getTotalSize:
|
|
50
|
-
t: () => (v = S, S = 0, [ v, 2 ===
|
|
49
|
+
$getTotalSize: r,
|
|
50
|
+
t: () => (v = S, S = 0, [ v, 2 === N ]),
|
|
51
51
|
$subscribe: (e, t) => {
|
|
52
52
|
const i = [ e, t ];
|
|
53
53
|
return x.add(i), () => {
|
|
@@ -59,25 +59,25 @@ w), M = e => b(e.$getTotalSize(), e.$getViewportSize()), _ = ({$getRange: e, $fi
|
|
|
59
59
|
switch (t) {
|
|
60
60
|
case 1:
|
|
61
61
|
{
|
|
62
|
-
if (i === g && 0 ===
|
|
62
|
+
if (i === g && 0 === N) break;
|
|
63
63
|
const e = v;
|
|
64
64
|
v = 0;
|
|
65
65
|
const t = i - g, s = $(t);
|
|
66
|
-
e && s < $(e) + 1 || 0 !==
|
|
67
|
-
const
|
|
68
|
-
|
|
66
|
+
e && s < $(e) + 1 || 0 !== N || (z = t < 0 ? 2 : 1), m && (m = !1), g = i, a = 4;
|
|
67
|
+
const n = q();
|
|
68
|
+
n >= -h && n <= r() && (a += 1, o = s > h);
|
|
69
69
|
break;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
case 2:
|
|
73
|
-
a = 8, 0 !==
|
|
73
|
+
a = 8, 0 !== z && (s = !0, a += 1), z = 0, N = 0, R = null;
|
|
74
74
|
break;
|
|
75
75
|
|
|
76
76
|
case 3:
|
|
77
77
|
{
|
|
78
|
-
const e = i.filter(([e, t]) => !
|
|
78
|
+
const e = i.filter(([e, t]) => !n(e, t));
|
|
79
79
|
if (!e.length) break;
|
|
80
|
-
|
|
80
|
+
C(c(e, k, F(), h)), a = 3, o = !0;
|
|
81
81
|
break;
|
|
82
82
|
}
|
|
83
83
|
|
|
@@ -86,7 +86,7 @@ w), M = e => b(e.$getTotalSize(), e.$getViewportSize()), _ = ({$getRange: e, $fi
|
|
|
86
86
|
break;
|
|
87
87
|
|
|
88
88
|
case 5:
|
|
89
|
-
i[1] ? (
|
|
89
|
+
i[1] ? (C(l(i[0], !0)), N = 2, a = 1) : (l(i[0]), a = 1);
|
|
90
90
|
break;
|
|
91
91
|
|
|
92
92
|
case 6:
|
|
@@ -94,13 +94,13 @@ w), M = e => b(e.$getTotalSize(), e.$getViewportSize()), _ = ({$getRange: e, $fi
|
|
|
94
94
|
break;
|
|
95
95
|
|
|
96
96
|
case 7:
|
|
97
|
-
|
|
97
|
+
N = 1;
|
|
98
98
|
break;
|
|
99
99
|
|
|
100
100
|
case 9:
|
|
101
101
|
{
|
|
102
102
|
const e = u(i, F());
|
|
103
|
-
null != e && (
|
|
103
|
+
null != e && (C(e), a = 3);
|
|
104
104
|
break;
|
|
105
105
|
}
|
|
106
106
|
|
|
@@ -116,31 +116,31 @@ w), M = e => b(e.$getTotalSize(), e.$getViewportSize()), _ = ({$getRange: e, $fi
|
|
|
116
116
|
const s = i ? "unshift" : "push";
|
|
117
117
|
for (let i = 0; i < t; i++) e[s](-1);
|
|
118
118
|
return e;
|
|
119
|
-
}, E = (e, t, i, s = 0,
|
|
120
|
-
let
|
|
121
|
-
for (;s <=
|
|
122
|
-
const t = R((s +
|
|
123
|
-
e(t) <= i ? (
|
|
119
|
+
}, E = (e, t, i, s = 0, n = t - 1) => {
|
|
120
|
+
let r = s;
|
|
121
|
+
for (;s <= n; ) {
|
|
122
|
+
const t = R((s + n) / 2);
|
|
123
|
+
e(t) <= i ? (r = t, s = t + 1) : n = t - 1;
|
|
124
124
|
}
|
|
125
|
-
return I(
|
|
125
|
+
return I(r, 0, t - 1);
|
|
126
126
|
}, L = (e, t, i) => {
|
|
127
|
-
let s = i && i[1] || t || 40,
|
|
128
|
-
const a = i && i[0], c = a ? V(a.slice(0,
|
|
127
|
+
let s = i && i[1] || t || 40, n = -1, r = 0, o = !t, l = 0;
|
|
128
|
+
const a = i && i[0], c = a ? V(a.slice(0, w(e, a.length)), b(0, e - a.length)) : V([], e), u = V([], e + 1), p = e => {
|
|
129
129
|
const t = c[e];
|
|
130
130
|
return -1 === t ? s : t;
|
|
131
131
|
}, m = t => {
|
|
132
132
|
if (!e) return 0;
|
|
133
|
-
if (
|
|
134
|
-
|
|
135
|
-
let i =
|
|
133
|
+
if (n >= t) return u[t];
|
|
134
|
+
n < 0 && (u[0] = 0, n = 0);
|
|
135
|
+
let i = n, s = u[i];
|
|
136
136
|
for (;i < t; ) s += p(i), u[++i] = s;
|
|
137
|
-
return
|
|
137
|
+
return n = t, s;
|
|
138
138
|
};
|
|
139
139
|
return {
|
|
140
140
|
$getRange: (t, i) => {
|
|
141
|
-
let s,
|
|
142
|
-
return l =
|
|
143
|
-
|
|
141
|
+
let s, n;
|
|
142
|
+
return l = w(l, e - 1), m(l) <= t ? (n = E(m, e, i, l), s = E(m, e, t, l, n)) : (s = E(m, e, t, void 0, l),
|
|
143
|
+
n = E(m, e, i, s)), l = s, [ s, n ];
|
|
144
144
|
},
|
|
145
145
|
$findIndex: t => E(m, e, t),
|
|
146
146
|
$getItemOffset: m,
|
|
@@ -148,14 +148,14 @@ w), M = e => b(e.$getTotalSize(), e.$getViewportSize()), _ = ({$getRange: e, $fi
|
|
|
148
148
|
$isSizeEqual: (e, t = -1) => c[e] === t,
|
|
149
149
|
$resize: (t, i, l, a) => {
|
|
150
150
|
let u = t.reduce((e, [t, s]) => i(t) ? e + (s - p(t)) : e, 0);
|
|
151
|
-
for (const [e, i] of t)
|
|
152
|
-
if (o && a &&
|
|
151
|
+
for (const [e, i] of t) r += -1 === c[e] ? i : i - p(e), c[e] = i, n = w(e, n);
|
|
152
|
+
if (o && a && r > a) {
|
|
153
153
|
let t = 0;
|
|
154
|
-
const i = E(m, e, l + u),
|
|
154
|
+
const i = E(m, e, l + u), r = [];
|
|
155
155
|
c.forEach((e, s) => {
|
|
156
|
-
-1 !== e && (e &&
|
|
157
|
-
}),
|
|
158
|
-
const a =
|
|
156
|
+
-1 !== e && (e && r.push(e), s < i && t++);
|
|
157
|
+
}), n = -1, P(r);
|
|
158
|
+
const a = r.length, p = a / 2 | 0, d = a % 2 == 0 ? (r[p - 1] + r[p]) / 2 : r[p], h = s;
|
|
159
159
|
u += ((s = d) - h) * b(i - t, 0), o = !1;
|
|
160
160
|
}
|
|
161
161
|
return u;
|
|
@@ -163,18 +163,18 @@ w), M = e => b(e.$getTotalSize(), e.$getViewportSize()), _ = ({$getRange: e, $fi
|
|
|
163
163
|
$getTotalSize: () => m(e),
|
|
164
164
|
$getLength: () => e,
|
|
165
165
|
$setLength: (t, i) => {
|
|
166
|
-
const
|
|
167
|
-
return
|
|
168
|
-
(i ? c.splice(0, -
|
|
166
|
+
const r = t - e;
|
|
167
|
+
return n = i ? -1 : w(t - 1, n), e = t, r > 0 ? (V(u, r), V(c, r, i), s * r) : (u.splice(r),
|
|
168
|
+
(i ? c.splice(0, -r) : c.splice(r)).reduce((e, t) => e - (-1 === t ? s : t), 0));
|
|
169
169
|
},
|
|
170
170
|
$isEstimating: () => o,
|
|
171
171
|
$snapshot: () => [ c.slice(), s ]
|
|
172
172
|
};
|
|
173
|
-
}, K = e => "number" == typeof e ? e : e.length,
|
|
173
|
+
}, K = e => "number" == typeof e ? e : e.length, D = (e, t) => "number" == typeof e ? t : e[t], G = (e, t, i = 0) => {
|
|
174
174
|
let s = K(e);
|
|
175
|
-
const
|
|
176
|
-
let o = (
|
|
177
|
-
const d = [], h = [], f = [], g = e =>
|
|
175
|
+
const n = "number" == typeof t, r = "auto" === t;
|
|
176
|
+
let o = (n ? t : 40) + i, l = -1, a = 0, c = r, u = 0, p = 0, m = null;
|
|
177
|
+
const d = [], h = [], f = [], g = e => r || !!f[e], S = () => {
|
|
178
178
|
d.length || V(d, s);
|
|
179
179
|
}, y = e => {
|
|
180
180
|
const t = d[e];
|
|
@@ -187,30 +187,30 @@ w), M = e => b(e.$getTotalSize(), e.$getViewportSize()), _ = ({$getRange: e, $fi
|
|
|
187
187
|
let t = l, i = h[t];
|
|
188
188
|
for (;t < e; ) i += y(t), h[++t] = i;
|
|
189
189
|
return l = e, i;
|
|
190
|
-
},
|
|
191
|
-
d[e] = t, l =
|
|
192
|
-
},
|
|
190
|
+
}, z = (e, t) => {
|
|
191
|
+
d[e] = t, l = w(e, l);
|
|
192
|
+
}, N = e => d.length ? E(v, s, e) : o ? I(R(e / o), 0, s - 1) : 0, $ = () => w(u, s), x = () => b(s - p, $()), q = e => (d.length ? y(e) : o) - i;
|
|
193
193
|
return {
|
|
194
194
|
$getRange: (e, t) => {
|
|
195
|
-
const
|
|
196
|
-
return [
|
|
195
|
+
const n = v($()), r = v(s) - v(x()), o = e + (n ? n - i : 0);
|
|
196
|
+
return [ N(o), N(b(o, t - (r ? r - i : 0))) ];
|
|
197
197
|
},
|
|
198
|
-
$findIndex:
|
|
198
|
+
$findIndex: N,
|
|
199
199
|
$getItemOffset: v,
|
|
200
200
|
$getItemSize: q,
|
|
201
|
-
$resize: (e, t, s,
|
|
202
|
-
let
|
|
203
|
-
for (const [t, s] of e) g(t) && (S(), a += -1 === d[t] ? s : s - q(t),
|
|
204
|
-
if (c &&
|
|
201
|
+
$resize: (e, t, s, n) => {
|
|
202
|
+
let r = e.reduce((e, [i, s]) => g(i) && t(i) ? e + (s - q(i)) : e, 0);
|
|
203
|
+
for (const [t, s] of e) g(t) && (S(), a += -1 === d[t] ? s : s - q(t), z(t, s + i));
|
|
204
|
+
if (c && n && a > n) {
|
|
205
205
|
let e = 0;
|
|
206
|
-
const t =
|
|
207
|
-
d.forEach((s,
|
|
208
|
-
-1 !== s && (s && i.push(s),
|
|
206
|
+
const t = N(s + r), i = [];
|
|
207
|
+
d.forEach((s, n) => {
|
|
208
|
+
-1 !== s && (s && i.push(s), n < t && e++);
|
|
209
209
|
}), l = -1, P(i);
|
|
210
|
-
const
|
|
211
|
-
|
|
210
|
+
const n = i.length, a = n / 2 | 0, u = n % 2 == 0 ? (i[a - 1] + i[a]) / 2 : i[a], p = o;
|
|
211
|
+
r += ((o = u) - p) * b(t - e, 0), c = !1;
|
|
212
212
|
}
|
|
213
|
-
return
|
|
213
|
+
return r;
|
|
214
214
|
},
|
|
215
215
|
$isSizeEqual: (e, t = -1) => {
|
|
216
216
|
const s = d.length ? d[e] : -1;
|
|
@@ -220,7 +220,7 @@ w), M = e => b(e.$getTotalSize(), e.$getViewportSize()), _ = ({$getRange: e, $fi
|
|
|
220
220
|
$getLength: () => s,
|
|
221
221
|
$setLength: e => {
|
|
222
222
|
const t = e - s;
|
|
223
|
-
return l =
|
|
223
|
+
return l = w(e - 1, l), s = e, d.length && (t > 0 ? V(d, t) : d.splice(t)), 0;
|
|
224
224
|
},
|
|
225
225
|
$isEstimating: () => c,
|
|
226
226
|
$isMeasurable: g,
|
|
@@ -229,87 +229,87 @@ w), M = e => b(e.$getTotalSize(), e.$getViewportSize()), _ = ({$getRange: e, $fi
|
|
|
229
229
|
},
|
|
230
230
|
$getPinnedStart: $,
|
|
231
231
|
$getTrailStart: x,
|
|
232
|
-
$getSizes: (e, t) => "number" == typeof t ?
|
|
232
|
+
$getSizes: (e, t) => "number" == typeof t ? n ? t : null : n || r || "auto" === t ? null : e.map(e => null != e ? e[t] : null),
|
|
233
233
|
$relayout: (e, t) => {
|
|
234
234
|
if (null == e) return;
|
|
235
235
|
if ("number" == typeof e) {
|
|
236
236
|
const s = e + i;
|
|
237
237
|
if (s === o) return;
|
|
238
|
-
const
|
|
239
|
-
return o = s,
|
|
238
|
+
const n = N(t) * (s - o);
|
|
239
|
+
return o = s, n;
|
|
240
240
|
}
|
|
241
241
|
if (e === m && s === f.length) return;
|
|
242
242
|
m = e, f.length = s, S();
|
|
243
|
-
const
|
|
243
|
+
const n = N(t), r = v(n);
|
|
244
244
|
let l;
|
|
245
245
|
for (let t = 0; t < s; t++) {
|
|
246
|
-
const s = e[t],
|
|
247
|
-
if (!
|
|
248
|
-
f[t] =
|
|
249
|
-
const e =
|
|
250
|
-
d[t] !== e && (
|
|
246
|
+
const s = e[t], n = "number" != typeof s;
|
|
247
|
+
if (!n || !f[t]) {
|
|
248
|
+
f[t] = n;
|
|
249
|
+
const e = n ? -1 : s + i;
|
|
250
|
+
d[t] !== e && (z(t, e), l = !0);
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
|
-
return l ? v(
|
|
253
|
+
return l ? v(n) - r : void 0;
|
|
254
254
|
}
|
|
255
255
|
};
|
|
256
|
-
}, W = /*#__PURE__*/ new WeakMap,
|
|
256
|
+
}, W = /*#__PURE__*/ new WeakMap, B = (e, t, i) => {
|
|
257
257
|
const s = [];
|
|
258
|
-
for (const
|
|
258
|
+
for (const n of e) n >= t && n < i && s.push(n);
|
|
259
259
|
return P(s);
|
|
260
|
-
},
|
|
260
|
+
}, H = (e, t, i) => {
|
|
261
261
|
if (t >= i) return -1;
|
|
262
|
-
let s = 0,
|
|
263
|
-
for (;s <
|
|
264
|
-
const i = s +
|
|
265
|
-
e[i] <= t ? s = i + 1 :
|
|
262
|
+
let s = 0, n = e.length;
|
|
263
|
+
for (;s < n; ) {
|
|
264
|
+
const i = s + n >> 1;
|
|
265
|
+
e[i] <= t ? s = i + 1 : n = i;
|
|
266
266
|
}
|
|
267
267
|
return s - 1;
|
|
268
|
-
}, j = (e, t, i, s,
|
|
269
|
-
const
|
|
270
|
-
for (;i <
|
|
268
|
+
}, j = (e, t, i, s, n) => {
|
|
269
|
+
const r = t.length;
|
|
270
|
+
for (;i < r && t[i] < s; i++) {
|
|
271
271
|
const s = t[i];
|
|
272
|
-
s >
|
|
272
|
+
s > n && (e.push(s), n = s);
|
|
273
273
|
}
|
|
274
274
|
return i;
|
|
275
|
-
}, A = (e, t, i, s,
|
|
275
|
+
}, A = (e, t, i, s, n, r) => {
|
|
276
276
|
const o = [];
|
|
277
277
|
for (let e = 0; e < i; e++) o.push(e);
|
|
278
278
|
const l = j(o, e, 0, s, i - 1);
|
|
279
|
-
for (let e = s; e <=
|
|
280
|
-
j(o, e, l,
|
|
281
|
-
for (let e =
|
|
279
|
+
for (let e = s; e <= n; e++) o.push(e);
|
|
280
|
+
j(o, e, l, r, n);
|
|
281
|
+
for (let e = r; e < t; e++) o.push(e);
|
|
282
282
|
return o;
|
|
283
|
-
},
|
|
283
|
+
}, Q = (e, t) => w(e.rowIndex + (e.rowSpan || 1), t), J = (e, t) => w(e.colIndex + (e.colSpan || 1), t), X = (e, t, i, s, n, r) => {
|
|
284
284
|
const o = t.length, l = s.length;
|
|
285
285
|
let a = "[l0]", c = 0, u = 0, p = 0;
|
|
286
|
-
for (;c <
|
|
286
|
+
for (;c < r; ) {
|
|
287
287
|
for (;p < l && s[p] <= c; ) p++;
|
|
288
|
-
const m = u < o ? t[u] :
|
|
288
|
+
const m = u < o ? t[u] : r;
|
|
289
289
|
let d, h;
|
|
290
290
|
if (m === c) {
|
|
291
291
|
d = c + 1;
|
|
292
292
|
const t = i[u];
|
|
293
|
-
h = null == t ? e.$getItemSize(c) + "px" : t ?
|
|
293
|
+
h = null == t ? e.$getItemSize(c) + "px" : t ? n : "minmax(" + e.$getItemSize(c) + "px,auto)",
|
|
294
294
|
u++;
|
|
295
|
-
} else d =
|
|
295
|
+
} else d = w(m, p < l ? s[p] : r), h = "minmax(" + (e.$getItemOffset(d - 1) + e.$getItemSize(d - 1) - e.$getItemOffset(c)) + "px,auto)";
|
|
296
296
|
a += " " + h + " [l" + d + "]", c = d;
|
|
297
297
|
}
|
|
298
298
|
return a;
|
|
299
|
-
}, Y = (e, t, i, s,
|
|
300
|
-
const
|
|
299
|
+
}, Y = (e, t, i, s, n) => {
|
|
300
|
+
const r = {
|
|
301
301
|
display: "grid",
|
|
302
302
|
gridTemplateRows: "subgrid",
|
|
303
303
|
gridTemplateColumns: "subgrid",
|
|
304
304
|
gridColumn: "1/-1",
|
|
305
305
|
gridRow: "l" + e + "/l" + t
|
|
306
306
|
};
|
|
307
|
-
return null != i && (
|
|
307
|
+
return null != i && (r.position = "sticky", r[s] = i + "px", r.zIndex = n), r;
|
|
308
308
|
}, U = e => {
|
|
309
309
|
let t;
|
|
310
310
|
return {
|
|
311
311
|
i(i) {
|
|
312
|
-
(t || (t = new (
|
|
312
|
+
(t || (t = new (C(k(i)).ResizeObserver)(e))).observe(i);
|
|
313
313
|
},
|
|
314
314
|
o(e) {
|
|
315
315
|
t.unobserve(e);
|
|
@@ -318,20 +318,20 @@ w), M = e => b(e.$getTotalSize(), e.$getViewportSize()), _ = ({$getRange: e, $fi
|
|
|
318
318
|
t && t.disconnect();
|
|
319
319
|
}
|
|
320
320
|
};
|
|
321
|
-
}, Z = (e, t, i, s,
|
|
321
|
+
}, Z = (e, t, i, s, n, r, o) => {
|
|
322
322
|
let l, a, c = 0, u = !1, p = !1, m = !1, d = !1;
|
|
323
|
-
const h = Date.now, f = s ? "scrollLeft" : "scrollTop", g = s ? "left" : "top", S = e =>
|
|
323
|
+
const h = Date.now, f = s ? "scrollLeft" : "scrollTop", g = s ? "left" : "top", S = e => n ? -e : e, y = () => S(i[f]), v = (e, t) => {
|
|
324
324
|
i.scrollTo({
|
|
325
325
|
[g]: S(e),
|
|
326
326
|
behavior: t ? "smooth" : "instant"
|
|
327
327
|
});
|
|
328
|
-
}, w = () => {
|
|
329
|
-
if (u || p) return u = !1, void z();
|
|
330
|
-
m = !1, e.$update(2);
|
|
331
328
|
}, z = () => {
|
|
332
|
-
|
|
329
|
+
if (u || p) return u = !1, void N();
|
|
330
|
+
m = !1, e.$update(2);
|
|
333
331
|
}, N = () => {
|
|
334
|
-
|
|
332
|
+
q(a), a = x(z, 150);
|
|
333
|
+
}, w = () => {
|
|
334
|
+
c = h(), m && (d = !0), o && e.$update(6, o()), e.$update(1, y()), N();
|
|
335
335
|
}, b = t => {
|
|
336
336
|
if (u || !e.$isScrolling() || t.ctrlKey) return;
|
|
337
337
|
const i = h() - c;
|
|
@@ -341,85 +341,122 @@ w), M = e => b(e.$getTotalSize(), e.$getViewportSize()), _ = ({$getRange: e, $fi
|
|
|
341
341
|
}, R = () => {
|
|
342
342
|
p = !1, T() && (m = !0);
|
|
343
343
|
};
|
|
344
|
-
return t.addEventListener("scroll",
|
|
344
|
+
return t.addEventListener("scroll", w), t.addEventListener("wheel", b, {
|
|
345
345
|
passive: !0
|
|
346
346
|
}), t.addEventListener("touchstart", $, {
|
|
347
347
|
passive: !0
|
|
348
348
|
}), t.addEventListener("touchend", R, {
|
|
349
349
|
passive: !0
|
|
350
350
|
}), {
|
|
351
|
+
u: w,
|
|
351
352
|
l: () => {
|
|
352
|
-
t.removeEventListener("scroll",
|
|
353
|
+
t.removeEventListener("scroll", w), t.removeEventListener("wheel", b), t.removeEventListener("touchstart", $),
|
|
353
354
|
t.removeEventListener("touchend", R), q(a);
|
|
354
355
|
},
|
|
355
|
-
|
|
356
|
+
p: () => {
|
|
356
357
|
const [t, s] = e.t();
|
|
357
358
|
if (!t) return;
|
|
358
|
-
d &&
|
|
359
|
-
const
|
|
360
|
-
o <= 0 || o >= a ||
|
|
359
|
+
d && r && r(), d = !1;
|
|
360
|
+
const n = e.$getScrollOffset(), o = n + t, a = e.$getStartSpacerSize() + e.$getTotalSize() - e.$getViewportSize();
|
|
361
|
+
o <= 0 || o >= a || n >= a ? v(o) : i.scrollBy({
|
|
361
362
|
[g]: S(t),
|
|
362
363
|
behavior: "instant"
|
|
363
364
|
}), s && (l && l(), e.$getViewportSize() > e.$getTotalSize() && e.$update(1, y()));
|
|
364
365
|
},
|
|
365
|
-
|
|
366
|
-
let s,
|
|
366
|
+
m: (t, i) => {
|
|
367
|
+
let s, n, r;
|
|
367
368
|
l && l();
|
|
368
369
|
const o = l = () => {
|
|
369
|
-
s = !0, q(
|
|
370
|
+
s = !0, q(n), r && r();
|
|
370
371
|
}, a = () => {
|
|
371
372
|
if (!s) {
|
|
372
|
-
if (e.$getViewportSize() && (q(
|
|
373
|
+
if (e.$getViewportSize() && (q(n), n = x(o, 150)), i) {
|
|
373
374
|
for (let [t, i] = e.$getRange(0); t <= i; t++) if (e.$isUnmeasuredItem(t)) return;
|
|
374
375
|
o();
|
|
375
376
|
}
|
|
376
377
|
e.$update(7), v(t(), i);
|
|
377
378
|
}
|
|
378
|
-
}
|
|
379
|
+
};
|
|
380
|
+
i && e.$update(8, t()), (() => {
|
|
379
381
|
if (s) return;
|
|
380
382
|
let t;
|
|
381
|
-
|
|
383
|
+
r = e.$subscribe(2, () => {
|
|
382
384
|
t || (t = !0, F(() => {
|
|
383
385
|
t = !1, a();
|
|
384
386
|
}));
|
|
385
387
|
}), a();
|
|
386
|
-
};
|
|
387
|
-
i ? (e.$update(8, t()), F(c)) : c();
|
|
388
|
+
})();
|
|
388
389
|
}
|
|
389
390
|
};
|
|
390
391
|
}, ee = (e, t) => {
|
|
392
|
+
let i, s, n = O(), r = !0;
|
|
393
|
+
const o = /* @__PURE__ */ new WeakMap, l = U(n => {
|
|
394
|
+
const l = [];
|
|
395
|
+
for (const {target: a, contentRect: {width: c, height: u}} of n) if (a === i) c || u ? (r || s.u(),
|
|
396
|
+
r = !0, e.$update(4, t ? c : u)) : r = !1; else if (a.offsetParent) {
|
|
397
|
+
const e = o.get(a);
|
|
398
|
+
null != e && l.push([ e, t ? c : u ]);
|
|
399
|
+
}
|
|
400
|
+
l.length && e.$update(3, l);
|
|
401
|
+
});
|
|
402
|
+
return {
|
|
403
|
+
$observe(r, o = r.parentElement) {
|
|
404
|
+
l.i(i = o), s = Z(e, o, o, t, t && "rtl" === getComputedStyle(o).direction, () => {
|
|
405
|
+
const e = t ? "overflowX" : "overflowY", i = o.style, s = i[e];
|
|
406
|
+
i[e] = "hidden", x(() => {
|
|
407
|
+
i[e] = s;
|
|
408
|
+
});
|
|
409
|
+
}), n[1](!0);
|
|
410
|
+
},
|
|
411
|
+
$dispose() {
|
|
412
|
+
l.l(), s && s.l(), n[1](!1), n = O();
|
|
413
|
+
},
|
|
414
|
+
$observeItem: (e, t) => (o.set(e, t), l.i(e), () => {
|
|
415
|
+
o.delete(e), l.o(e);
|
|
416
|
+
}),
|
|
417
|
+
async $scroll(e, t) {
|
|
418
|
+
await n[0] && s.m(e, t);
|
|
419
|
+
},
|
|
420
|
+
$effect() {
|
|
421
|
+
s && s.p();
|
|
422
|
+
},
|
|
423
|
+
$getBaseOffset: e.$getStartSpacerSize
|
|
424
|
+
};
|
|
425
|
+
}, te = (e, t) => {
|
|
391
426
|
e.$scroll(() => t);
|
|
392
|
-
},
|
|
427
|
+
}, ie = (e, t, i) => {
|
|
428
|
+
te(e, i + t.$getScrollOffset());
|
|
429
|
+
}, se = (e, t, i, {align: s, smooth: n, offset: r = 0} = {}) => {
|
|
393
430
|
if (i = I(i, 0, t.$getItemsLength() - 1), "nearest" === s) {
|
|
394
|
-
const e = t.$getItemOffset(i),
|
|
395
|
-
if (e <
|
|
396
|
-
if (!(e + t.$getItemSize(i) >
|
|
431
|
+
const e = t.$getItemOffset(i), n = t.$getScrollOffset();
|
|
432
|
+
if (e < n) s = "start"; else {
|
|
433
|
+
if (!(e + t.$getItemSize(i) > n + t.$getViewportSize())) return;
|
|
397
434
|
s = "end";
|
|
398
435
|
}
|
|
399
436
|
}
|
|
400
|
-
e.$scroll(() =>
|
|
401
|
-
},
|
|
437
|
+
e.$scroll(() => r + e.$getBaseOffset() + t.$getItemOffset(i) + ("end" === s ? t.$getItemSize(i) - t.$getViewportSize() : "center" === s ? (t.$getItemSize(i) - t.$getViewportSize()) / 2 : 0), n);
|
|
438
|
+
}, ne = (e, t, i, s, n, r, o) => {
|
|
402
439
|
const l = t.$getItemsLength(), a = i.$getPinnedStart(), c = i.$getTrailStart();
|
|
403
|
-
|
|
404
|
-
const u =
|
|
405
|
-
if ("nearest" ===
|
|
406
|
-
if (
|
|
407
|
-
const e = d(), i = t.$getScrollOffset() + e, s = t.$getViewportSize() - e - h(), o = t.$getItemSize(
|
|
408
|
-
let l = t.$getItemOffset(
|
|
409
|
-
if (m ===
|
|
440
|
+
n = I(n, 0, l - 1);
|
|
441
|
+
const u = B(s, a, c), p = H(u, n, c), m = p < 0 ? -1 : u[p], d = () => i.$getItemOffset(a) + (m < 0 || m === n ? 0 : i.$getItemOffset(m + 1) - i.$getItemOffset(m)), h = () => i.$getItemOffset(l) - i.$getItemOffset(c);
|
|
442
|
+
if ("nearest" === r) {
|
|
443
|
+
if (n < a || n >= c) return;
|
|
444
|
+
const e = d(), i = t.$getScrollOffset() + e, s = t.$getViewportSize() - e - h(), o = t.$getItemSize(n);
|
|
445
|
+
let l = t.$getItemOffset(n);
|
|
446
|
+
if (m === n) {
|
|
410
447
|
const e = (p + 1 < u.length ? u[p + 1] : c) - 1;
|
|
411
|
-
l = b(l,
|
|
448
|
+
l = b(l, w(i, t.$getItemOffset(e) + t.$getItemSize(e) - o));
|
|
412
449
|
}
|
|
413
|
-
if (l < i)
|
|
450
|
+
if (l < i) r = "start"; else {
|
|
414
451
|
if (!(l + o > i + s)) return;
|
|
415
|
-
|
|
452
|
+
r = "end";
|
|
416
453
|
}
|
|
417
454
|
}
|
|
418
455
|
e.$scroll(o, () => {
|
|
419
|
-
const e = d(), i = t.$getItemSize(
|
|
420
|
-
return t.$getItemOffset(
|
|
456
|
+
const e = d(), i = t.$getItemSize(n) - (t.$getViewportSize() - e - h());
|
|
457
|
+
return t.$getItemOffset(n) - e + ("end" === r ? i : "center" === r ? i / 2 : 0);
|
|
421
458
|
});
|
|
422
|
-
},
|
|
459
|
+
}, re = class t {
|
|
423
460
|
index=h.required();
|
|
424
461
|
offset=h.required();
|
|
425
462
|
hide=h.required();
|
|
@@ -440,7 +477,7 @@ w), M = e => b(e.$getTotalSize(), e.$getViewportSize()), _ = ({$getRange: e, $fi
|
|
|
440
477
|
return e && (s.display = "inline-flex"), s;
|
|
441
478
|
});
|
|
442
479
|
constructor() {
|
|
443
|
-
const e = d(
|
|
480
|
+
const e = d(n).nativeElement;
|
|
444
481
|
let t;
|
|
445
482
|
c({
|
|
446
483
|
read: () => {
|
|
@@ -531,9 +568,9 @@ w), M = e => b(e.$getTotalSize(), e.$getViewportSize()), _ = ({$getRange: e, $fi
|
|
|
531
568
|
},
|
|
532
569
|
ngImport: e
|
|
533
570
|
});
|
|
534
|
-
},
|
|
571
|
+
}, oe = (e, t) => "_" + t, le = /*#__PURE__*/ new o("virtua-item-template"), ae = class i {
|
|
535
572
|
data=h.required();
|
|
536
|
-
getKey=h(
|
|
573
|
+
getKey=h(oe);
|
|
537
574
|
itemProps=h();
|
|
538
575
|
bufferSize=h();
|
|
539
576
|
scrollRef=h();
|
|
@@ -549,48 +586,48 @@ w), M = e => b(e.$getTotalSize(), e.$getViewportSize()), _ = ({$getRange: e, $fi
|
|
|
549
586
|
scrolled=f();
|
|
550
587
|
scrollEnded=f();
|
|
551
588
|
contentTemplate=p(l);
|
|
552
|
-
|
|
589
|
+
h=d(le, {
|
|
553
590
|
optional: !0
|
|
554
591
|
});
|
|
555
|
-
template=u(() => this.
|
|
556
|
-
h;
|
|
592
|
+
template=u(() => this.h?.() ?? this.contentTemplate());
|
|
557
593
|
S;
|
|
594
|
+
v;
|
|
558
595
|
driver;
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
596
|
+
N=d(n).nativeElement;
|
|
597
|
+
$=d(t);
|
|
598
|
+
R=g(void 0);
|
|
562
599
|
isSSR=g(!1);
|
|
563
|
-
|
|
564
|
-
this
|
|
565
|
-
const e = this.data().length, [t, i] = this.
|
|
600
|
+
I=u(() => {
|
|
601
|
+
this.R();
|
|
602
|
+
const e = this.data().length, [t, i] = this.S.$getRange(this.bufferSize()), s = this.keepMounted(), n = [];
|
|
566
603
|
if (s) {
|
|
567
|
-
const
|
|
568
|
-
for (let e = t; e <= i; e++)
|
|
569
|
-
for (const t of P([ ...
|
|
570
|
-
} else for (let e = t; e <= i; e++)
|
|
571
|
-
return
|
|
604
|
+
const r = new Set(s);
|
|
605
|
+
for (let e = t; e <= i; e++) r.add(e);
|
|
606
|
+
for (const t of P([ ...r ])) t < e && n.push(t);
|
|
607
|
+
} else for (let e = t; e <= i; e++) n.push(e);
|
|
608
|
+
return n;
|
|
572
609
|
});
|
|
573
610
|
items=u(() => {
|
|
574
|
-
this
|
|
575
|
-
const e = this.
|
|
576
|
-
return this.
|
|
577
|
-
const
|
|
611
|
+
this.R();
|
|
612
|
+
const e = this.S, t = this.data(), i = this.getKey(), s = this.itemProps();
|
|
613
|
+
return this.I().map(n => {
|
|
614
|
+
const r = t[n];
|
|
578
615
|
return {
|
|
579
|
-
key: i(
|
|
580
|
-
index:
|
|
581
|
-
data:
|
|
582
|
-
offset: e.$getItemOffset(
|
|
583
|
-
hide: e.$isUnmeasuredItem(
|
|
616
|
+
key: i(r, n),
|
|
617
|
+
index: n,
|
|
618
|
+
data: r,
|
|
619
|
+
offset: e.$getItemOffset(n),
|
|
620
|
+
hide: e.$isUnmeasuredItem(n),
|
|
584
621
|
attrs: s?.({
|
|
585
|
-
item:
|
|
586
|
-
index:
|
|
622
|
+
item: r,
|
|
623
|
+
index: n
|
|
587
624
|
})
|
|
588
625
|
};
|
|
589
626
|
});
|
|
590
627
|
});
|
|
591
628
|
containerStyle=u(() => {
|
|
592
|
-
this
|
|
593
|
-
const e = this.horizontal(), t = this.
|
|
629
|
+
this.R();
|
|
630
|
+
const e = this.horizontal(), t = this.S.$getTotalSize();
|
|
594
631
|
return {
|
|
595
632
|
display: "block",
|
|
596
633
|
contain: "size style",
|
|
@@ -599,104 +636,69 @@ w), M = e => b(e.$getTotalSize(), e.$getViewportSize()), _ = ({$getRange: e, $fi
|
|
|
599
636
|
position: "relative",
|
|
600
637
|
width: e ? t + "px" : "100%",
|
|
601
638
|
height: e ? "100%" : t + "px",
|
|
602
|
-
"pointer-events": this.
|
|
639
|
+
"pointer-events": this.S.$isScrolling() ? "none" : void 0
|
|
603
640
|
};
|
|
604
641
|
});
|
|
605
642
|
constructor() {
|
|
606
643
|
m(() => {
|
|
607
644
|
const e = this.data().length;
|
|
608
|
-
this.
|
|
645
|
+
this.S && e !== this.S.$getItemsLength() && this.S.$update(5, [ e, S(this.shift) ]);
|
|
609
646
|
}), m(() => {
|
|
610
647
|
const e = this.startMargin();
|
|
611
|
-
this.
|
|
648
|
+
this.S && e !== this.S.$getStartSpacerSize() && this.S.$update(6, e);
|
|
612
649
|
}), a({
|
|
613
650
|
read: () => {
|
|
614
|
-
this.isSSR.set(!1), this.driver.$observe(this.
|
|
651
|
+
this.isSSR.set(!1), this.driver.$observe(this.N, this.scrollRef());
|
|
615
652
|
}
|
|
616
653
|
}), c({
|
|
617
654
|
read: () => {
|
|
618
|
-
this
|
|
655
|
+
this.R(), this.driver.$effect();
|
|
619
656
|
}
|
|
620
657
|
}), d(s).onDestroy(() => {
|
|
621
|
-
this.
|
|
658
|
+
this.S?.$dispose(), this.driver?.$dispose();
|
|
622
659
|
});
|
|
623
660
|
}
|
|
624
661
|
ngOnInit() {
|
|
625
662
|
const e = this.itemSize(), t = this.ssrCount();
|
|
626
663
|
this.isSSR.set(!!t);
|
|
627
|
-
const i = this.
|
|
628
|
-
this.driver = (
|
|
629
|
-
|
|
630
|
-
const n = /* @__PURE__ */ new WeakMap, o = U(s => {
|
|
631
|
-
const r = [];
|
|
632
|
-
for (const {target: o, contentRect: {width: l, height: a}} of s) if (o === i) (l || a) && e.$update(4, t ? l : a); else if (o.offsetParent) {
|
|
633
|
-
const e = n.get(o);
|
|
634
|
-
null != e && r.push([ e, t ? l : a ]);
|
|
635
|
-
}
|
|
636
|
-
r.length && e.$update(3, r);
|
|
637
|
-
});
|
|
638
|
-
return {
|
|
639
|
-
$observe(n, l = n.parentElement) {
|
|
640
|
-
o.i(i = l), s = Z(e, l, l, t, t && "rtl" === getComputedStyle(l).direction, () => {
|
|
641
|
-
const e = t ? "overflowX" : "overflowY", i = l.style, s = i[e];
|
|
642
|
-
i[e] = "hidden", x(() => {
|
|
643
|
-
i[e] = s;
|
|
644
|
-
});
|
|
645
|
-
}), r[1](!0);
|
|
646
|
-
},
|
|
647
|
-
$dispose() {
|
|
648
|
-
o.l(), s && s.l(), r[1](!1), r = k();
|
|
649
|
-
},
|
|
650
|
-
$observeItem: (e, t) => (n.set(e, t), o.i(e), () => {
|
|
651
|
-
n.delete(e), o.o(e);
|
|
652
|
-
}),
|
|
653
|
-
async $scroll(e, t) {
|
|
654
|
-
await r[0] && s.p(e, t);
|
|
655
|
-
},
|
|
656
|
-
$effect() {
|
|
657
|
-
s && s.u();
|
|
658
|
-
},
|
|
659
|
-
$getBaseOffset: e.$getStartSpacerSize
|
|
660
|
-
};
|
|
661
|
-
})(s, this.horizontal()), s.$subscribe(1, e => {
|
|
662
|
-
this.$.set(s.$getStateVersion()), e && this.N.tick();
|
|
664
|
+
const i = this.v = L(this.data().length, e, this.cacheProp()), s = this.S = M(i, t);
|
|
665
|
+
this.driver = ee(s, this.horizontal()), s.$subscribe(1, e => {
|
|
666
|
+
this.R.set(s.$getStateVersion()), e && this.$.tick();
|
|
663
667
|
}), s.$subscribe(4, () => {
|
|
664
668
|
this.scrolled.emit(s.$getScrollOffset());
|
|
665
669
|
}), s.$subscribe(8, () => {
|
|
666
670
|
this.scrollEnded.emit();
|
|
667
|
-
}), this
|
|
671
|
+
}), this.R.set(s.$getStateVersion());
|
|
668
672
|
}
|
|
669
673
|
get cache() {
|
|
670
|
-
return this.
|
|
674
|
+
return this.v.$snapshot();
|
|
671
675
|
}
|
|
672
676
|
get scrollOffset() {
|
|
673
|
-
return this.
|
|
677
|
+
return this.S.$getScrollOffset();
|
|
674
678
|
}
|
|
675
679
|
get scrollSize() {
|
|
676
|
-
return
|
|
680
|
+
return _(this.S);
|
|
677
681
|
}
|
|
678
682
|
get viewportSize() {
|
|
679
|
-
return this.
|
|
683
|
+
return this.S.$getViewportSize();
|
|
680
684
|
}
|
|
681
685
|
findItemIndex(e) {
|
|
682
|
-
return this.
|
|
686
|
+
return this.S.$findItemIndex(e);
|
|
683
687
|
}
|
|
684
688
|
getItemOffset(e) {
|
|
685
|
-
return this.
|
|
689
|
+
return this.S.$getItemOffset(e);
|
|
686
690
|
}
|
|
687
691
|
getItemSize(e) {
|
|
688
|
-
return this.
|
|
692
|
+
return this.S.$getItemSize(e);
|
|
689
693
|
}
|
|
690
694
|
scrollToIndex(e, t) {
|
|
691
|
-
|
|
695
|
+
se(this.driver, this.S, e, t);
|
|
692
696
|
}
|
|
693
697
|
scrollTo(e) {
|
|
694
|
-
|
|
698
|
+
te(this.driver, e);
|
|
695
699
|
}
|
|
696
700
|
scrollBy(e) {
|
|
697
|
-
(
|
|
698
|
-
ee(e, i + t.$getScrollOffset());
|
|
699
|
-
})(this.driver, this.h, e);
|
|
701
|
+
ie(this.driver, this.S, e);
|
|
700
702
|
}
|
|
701
703
|
static ɵfac=/*@__PURE__*/ e.ɵɵngDeclareFactory({
|
|
702
704
|
minVersion: "12.0.0",
|
|
@@ -820,7 +822,7 @@ w), M = e => b(e.$getTotalSize(), e.$getViewportSize()), _ = ({$getRange: e, $fi
|
|
|
820
822
|
isInline: !0,
|
|
821
823
|
dependencies: [ {
|
|
822
824
|
kind: "directive",
|
|
823
|
-
type: e.forwardRef(() =>
|
|
825
|
+
type: e.forwardRef(() => re),
|
|
824
826
|
selector: "div[virtuaListItem]",
|
|
825
827
|
inputs: [ "index", "offset", "hide", "horizontal", "isSSR", "resizer", "attrs" ]
|
|
826
828
|
}, {
|
|
@@ -835,9 +837,9 @@ w), M = e => b(e.$getTotalSize(), e.$getViewportSize()), _ = ({$getRange: e, $fi
|
|
|
835
837
|
|
|
836
838
|
i.OnPush;
|
|
837
839
|
|
|
838
|
-
var
|
|
840
|
+
var ce = class t {
|
|
839
841
|
data=h.required();
|
|
840
|
-
getKey=h(
|
|
842
|
+
getKey=h(oe);
|
|
841
843
|
itemProps=h();
|
|
842
844
|
bufferSize=h();
|
|
843
845
|
itemSize=h();
|
|
@@ -851,11 +853,11 @@ var le = class t {
|
|
|
851
853
|
scrolled=f();
|
|
852
854
|
scrollEnded=f();
|
|
853
855
|
template=p.required(l);
|
|
854
|
-
virtualizer=y.required(
|
|
855
|
-
|
|
856
|
+
virtualizer=y.required(ae);
|
|
857
|
+
N=d(n).nativeElement;
|
|
856
858
|
ngOnInit() {
|
|
857
|
-
const e = this.horizontal(), t = this.
|
|
858
|
-
t.setAttribute("style", `display
|
|
859
|
+
const e = this.horizontal(), t = this.N;
|
|
860
|
+
t.setAttribute("style", `display:block;${e ? "overflow-x" : "overflow-y"}:auto;contain:strict;width:100%;height:100%;` + (t.getAttribute("style") || ""));
|
|
859
861
|
}
|
|
860
862
|
get cache() {
|
|
861
863
|
return this.virtualizer().cache;
|
|
@@ -988,7 +990,7 @@ var le = class t {
|
|
|
988
990
|
viewQueries: [ {
|
|
989
991
|
propertyName: "virtualizer",
|
|
990
992
|
first: !0,
|
|
991
|
-
predicate:
|
|
993
|
+
predicate: ae,
|
|
992
994
|
emitDistinctChangesOnly: !1,
|
|
993
995
|
descendants: !0,
|
|
994
996
|
isSignal: !0
|
|
@@ -998,13 +1000,13 @@ var le = class t {
|
|
|
998
1000
|
isInline: !0,
|
|
999
1001
|
dependencies: [ {
|
|
1000
1002
|
kind: "directive",
|
|
1001
|
-
type: e.forwardRef(() =>
|
|
1003
|
+
type: e.forwardRef(() => ae),
|
|
1002
1004
|
selector: "virtua-virtualizer",
|
|
1003
1005
|
inputs: [ "data", "getKey", "itemProps", "bufferSize", "scrollRef", "itemSize", "ssrCount", "shift", "horizontal", "keepMounted", "cache", "startMargin" ],
|
|
1004
1006
|
outputs: [ "scrolled", "scrollEnded" ]
|
|
1005
1007
|
} ],
|
|
1006
1008
|
viewProviders: [ {
|
|
1007
|
-
provide:
|
|
1009
|
+
provide: le,
|
|
1008
1010
|
useFactory: () => d(t).template
|
|
1009
1011
|
} ],
|
|
1010
1012
|
changeDetection: e.ChangeDetectionStrategy.OnPush
|
|
@@ -1013,9 +1015,9 @@ var le = class t {
|
|
|
1013
1015
|
|
|
1014
1016
|
i.OnPush;
|
|
1015
1017
|
|
|
1016
|
-
var
|
|
1018
|
+
var ue = class i {
|
|
1017
1019
|
data=h.required();
|
|
1018
|
-
getKey=h(
|
|
1020
|
+
getKey=h(oe);
|
|
1019
1021
|
bufferSize=h();
|
|
1020
1022
|
itemSize=h();
|
|
1021
1023
|
ssrCount=h();
|
|
@@ -1027,19 +1029,19 @@ var ae = class i {
|
|
|
1027
1029
|
scrolled=f();
|
|
1028
1030
|
scrollEnded=f();
|
|
1029
1031
|
template=p.required(l);
|
|
1030
|
-
h;
|
|
1031
1032
|
S;
|
|
1033
|
+
v;
|
|
1032
1034
|
driver;
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1035
|
+
N=d(n).nativeElement;
|
|
1036
|
+
$=d(t);
|
|
1037
|
+
R=g(void 0);
|
|
1036
1038
|
isSSR=g(!1);
|
|
1037
1039
|
items=u(() => {
|
|
1038
|
-
this
|
|
1039
|
-
const e = this.
|
|
1040
|
-
for (let o = s; o <=
|
|
1040
|
+
this.R();
|
|
1041
|
+
const e = this.S, t = this.data(), i = this.getKey(), [s, n] = e.$getRange(this.bufferSize()), r = [];
|
|
1042
|
+
for (let o = s; o <= n; o++) {
|
|
1041
1043
|
const s = t[o];
|
|
1042
|
-
|
|
1044
|
+
r.push({
|
|
1043
1045
|
key: i(s, o),
|
|
1044
1046
|
index: o,
|
|
1045
1047
|
data: s,
|
|
@@ -1047,11 +1049,11 @@ var ae = class i {
|
|
|
1047
1049
|
hide: e.$isUnmeasuredItem(o)
|
|
1048
1050
|
});
|
|
1049
1051
|
}
|
|
1050
|
-
return
|
|
1052
|
+
return r;
|
|
1051
1053
|
});
|
|
1052
1054
|
containerStyle=u(() => {
|
|
1053
|
-
this
|
|
1054
|
-
const e = this.horizontal(), t = this.
|
|
1055
|
+
this.R();
|
|
1056
|
+
const e = this.horizontal(), t = this.S.$getTotalSize();
|
|
1055
1057
|
return {
|
|
1056
1058
|
display: "block",
|
|
1057
1059
|
contain: "size style",
|
|
@@ -1060,93 +1062,93 @@ var ae = class i {
|
|
|
1060
1062
|
position: "relative",
|
|
1061
1063
|
width: e ? t + "px" : "100%",
|
|
1062
1064
|
height: e ? "100%" : t + "px",
|
|
1063
|
-
"pointer-events": this.
|
|
1065
|
+
"pointer-events": this.S.$isScrolling() ? "none" : void 0
|
|
1064
1066
|
};
|
|
1065
1067
|
});
|
|
1066
1068
|
constructor() {
|
|
1067
1069
|
m(() => {
|
|
1068
1070
|
const e = this.data().length;
|
|
1069
|
-
this.
|
|
1071
|
+
this.S && e !== this.S.$getItemsLength() && this.S.$update(5, [ e, S(this.shift) ]);
|
|
1070
1072
|
}), a({
|
|
1071
1073
|
read: () => {
|
|
1072
|
-
this.isSSR.set(!1), this.driver.$observe(this.
|
|
1074
|
+
this.isSSR.set(!1), this.driver.$observe(this.N);
|
|
1073
1075
|
}
|
|
1074
1076
|
}), c({
|
|
1075
1077
|
read: () => {
|
|
1076
|
-
this
|
|
1078
|
+
this.R(), this.driver.$effect();
|
|
1077
1079
|
}
|
|
1078
1080
|
}), d(s).onDestroy(() => {
|
|
1079
|
-
this.
|
|
1081
|
+
this.S?.$dispose(), this.driver?.$dispose();
|
|
1080
1082
|
});
|
|
1081
1083
|
}
|
|
1082
1084
|
ngOnInit() {
|
|
1083
1085
|
const e = this.itemSize(), t = this.ssrCount();
|
|
1084
1086
|
this.isSSR.set(!!t);
|
|
1085
|
-
const i = this.
|
|
1087
|
+
const i = this.v = L(this.data().length, e, this.cacheProp()), s = this.S = M(i, t);
|
|
1086
1088
|
this.driver = ((e, t) => {
|
|
1087
|
-
let i, s,
|
|
1089
|
+
let i, s, n, r, o, l = O();
|
|
1088
1090
|
const a = /* @__PURE__ */ new WeakMap, c = U(s => {
|
|
1089
|
-
const
|
|
1090
|
-
for (const {target: e, contentRect: {width:
|
|
1091
|
+
const n = [];
|
|
1092
|
+
for (const {target: e, contentRect: {width: r, height: l}} of s) if (e === i) o && o(); else if (e.offsetParent) {
|
|
1091
1093
|
const i = a.get(e);
|
|
1092
|
-
null != i &&
|
|
1094
|
+
null != i && n.push([ i, t ? r : l ]);
|
|
1093
1095
|
}
|
|
1094
|
-
|
|
1096
|
+
n.length && e.$update(3, n);
|
|
1095
1097
|
});
|
|
1096
1098
|
return {
|
|
1097
1099
|
$observe(a) {
|
|
1098
|
-
const u =
|
|
1099
|
-
const
|
|
1100
|
+
const u = k(a), p = C(u), m = i = u.scrollingElement, d = t && "rtl" === getComputedStyle(m).direction, h = (e, t, i, s, n = 0) => {
|
|
1101
|
+
const r = s ? "offsetLeft" : "offsetTop", o = n + (d ? t.clientWidth - e[r] - e.offsetWidth : e[r]), l = e.offsetParent;
|
|
1100
1102
|
return e !== i && l ? h(l, t, i, s, o) : o;
|
|
1101
|
-
}, f =
|
|
1103
|
+
}, f = r = () => h(a, m, u.body, t), g = o = () => {
|
|
1102
1104
|
e.$update(4, m[t ? "clientWidth" : "clientHeight"]);
|
|
1103
1105
|
};
|
|
1104
|
-
p.addEventListener("resize", g), c.i(m),
|
|
1106
|
+
p.addEventListener("resize", g), c.i(m), n = () => {
|
|
1105
1107
|
p.removeEventListener("resize", g);
|
|
1106
1108
|
}, s = Z(e, p, m, t, d, null, f), l[1](!0);
|
|
1107
1109
|
},
|
|
1108
1110
|
$dispose() {
|
|
1109
|
-
|
|
1111
|
+
n && n(), c.l(), s && s.l(), l[1](!1), l = O();
|
|
1110
1112
|
},
|
|
1111
1113
|
$observeItem: (e, t) => (a.set(e, t), c.i(e), () => {
|
|
1112
1114
|
a.delete(e), c.o(e);
|
|
1113
1115
|
}),
|
|
1114
1116
|
async $scroll(e, t) {
|
|
1115
|
-
await l[0] && s.
|
|
1117
|
+
await l[0] && s.m(e, t);
|
|
1116
1118
|
},
|
|
1117
1119
|
$effect() {
|
|
1118
|
-
s && s.
|
|
1120
|
+
s && s.p();
|
|
1119
1121
|
},
|
|
1120
|
-
$getBaseOffset: () =>
|
|
1122
|
+
$getBaseOffset: () => r()
|
|
1121
1123
|
};
|
|
1122
1124
|
})(s, this.horizontal()), s.$subscribe(1, e => {
|
|
1123
|
-
this
|
|
1125
|
+
this.R.set(s.$getStateVersion()), e && this.$.tick();
|
|
1124
1126
|
}), s.$subscribe(4, () => {
|
|
1125
1127
|
this.scrolled.emit();
|
|
1126
1128
|
}), s.$subscribe(8, () => {
|
|
1127
1129
|
this.scrollEnded.emit();
|
|
1128
|
-
}), this
|
|
1130
|
+
}), this.R.set(s.$getStateVersion());
|
|
1129
1131
|
}
|
|
1130
1132
|
get cache() {
|
|
1131
|
-
return this.
|
|
1133
|
+
return this.v.$snapshot();
|
|
1132
1134
|
}
|
|
1133
1135
|
get scrollOffset() {
|
|
1134
|
-
return this.
|
|
1136
|
+
return this.S.$getScrollOffset();
|
|
1135
1137
|
}
|
|
1136
1138
|
get viewportSize() {
|
|
1137
|
-
return this.
|
|
1139
|
+
return this.S.$getViewportSize();
|
|
1138
1140
|
}
|
|
1139
1141
|
findItemIndex(e) {
|
|
1140
|
-
return this.
|
|
1142
|
+
return this.S.$findItemIndex(e);
|
|
1141
1143
|
}
|
|
1142
1144
|
getItemOffset(e) {
|
|
1143
|
-
return this.
|
|
1145
|
+
return this.S.$getItemOffset(e);
|
|
1144
1146
|
}
|
|
1145
1147
|
getItemSize(e) {
|
|
1146
|
-
return this.
|
|
1148
|
+
return this.S.$getItemSize(e);
|
|
1147
1149
|
}
|
|
1148
1150
|
scrollToIndex(e, t) {
|
|
1149
|
-
|
|
1151
|
+
se(this.driver, this.S, e, t);
|
|
1150
1152
|
}
|
|
1151
1153
|
static ɵfac=/*@__PURE__*/ e.ɵɵngDeclareFactory({
|
|
1152
1154
|
minVersion: "12.0.0",
|
|
@@ -1242,7 +1244,7 @@ var ae = class i {
|
|
|
1242
1244
|
isInline: !0,
|
|
1243
1245
|
dependencies: [ {
|
|
1244
1246
|
kind: "directive",
|
|
1245
|
-
type: e.forwardRef(() =>
|
|
1247
|
+
type: e.forwardRef(() => re),
|
|
1246
1248
|
selector: "div[virtuaListItem]",
|
|
1247
1249
|
inputs: [ "index", "offset", "hide", "horizontal", "isSSR", "resizer", "attrs" ]
|
|
1248
1250
|
}, {
|
|
@@ -1257,19 +1259,19 @@ var ae = class i {
|
|
|
1257
1259
|
|
|
1258
1260
|
i.OnPush;
|
|
1259
1261
|
|
|
1260
|
-
var
|
|
1262
|
+
var pe = class t {
|
|
1261
1263
|
state=h.required();
|
|
1262
1264
|
resizer=h.required();
|
|
1263
1265
|
constructor() {
|
|
1264
|
-
const e = d(
|
|
1265
|
-
let
|
|
1266
|
+
const e = d(n).nativeElement, t = u(() => this.state().$measureRow), i = u(() => this.state().$measureCol);
|
|
1267
|
+
let r;
|
|
1266
1268
|
c({
|
|
1267
1269
|
read: () => {
|
|
1268
|
-
const s = t(),
|
|
1269
|
-
|
|
1270
|
+
const s = t(), n = i();
|
|
1271
|
+
r && r(), r = null == s && null == n ? void 0 : S(this.resizer)(e, s, n);
|
|
1270
1272
|
}
|
|
1271
1273
|
}), d(s).onDestroy(() => {
|
|
1272
|
-
|
|
1274
|
+
r && r();
|
|
1273
1275
|
});
|
|
1274
1276
|
}
|
|
1275
1277
|
static ɵfac=/*@__PURE__*/ e.ɵɵngDeclareFactory({
|
|
@@ -1314,14 +1316,14 @@ var ce = class t {
|
|
|
1314
1316
|
},
|
|
1315
1317
|
ngImport: e
|
|
1316
1318
|
});
|
|
1317
|
-
},
|
|
1319
|
+
}, me = class t {
|
|
1318
1320
|
state=h.required();
|
|
1319
1321
|
template=h.required();
|
|
1320
1322
|
row=h.required();
|
|
1321
1323
|
cols=h.required();
|
|
1322
1324
|
resizer=h.required();
|
|
1323
1325
|
colItem(e) {
|
|
1324
|
-
return
|
|
1326
|
+
return D(this.cols(), e);
|
|
1325
1327
|
}
|
|
1326
1328
|
static ɵfac=/*@__PURE__*/ e.ɵɵngDeclareFactory({
|
|
1327
1329
|
minVersion: "12.0.0",
|
|
@@ -1388,7 +1390,7 @@ var ce = class t {
|
|
|
1388
1390
|
isInline: !0,
|
|
1389
1391
|
dependencies: [ {
|
|
1390
1392
|
kind: "directive",
|
|
1391
|
-
type: e.forwardRef(() =>
|
|
1393
|
+
type: e.forwardRef(() => pe),
|
|
1392
1394
|
selector: "div[virtuaGridCell]",
|
|
1393
1395
|
inputs: [ "state", "resizer" ]
|
|
1394
1396
|
}, {
|
|
@@ -1399,14 +1401,14 @@ var ce = class t {
|
|
|
1399
1401
|
} ],
|
|
1400
1402
|
changeDetection: e.ChangeDetectionStrategy.OnPush
|
|
1401
1403
|
});
|
|
1402
|
-
},
|
|
1404
|
+
}, de = class t {
|
|
1403
1405
|
state=h.required();
|
|
1404
1406
|
template=h.required();
|
|
1405
1407
|
rows=h.required();
|
|
1406
1408
|
cols=h.required();
|
|
1407
1409
|
resizer=h.required();
|
|
1408
1410
|
rowItem(e) {
|
|
1409
|
-
return
|
|
1411
|
+
return D(this.rows(), e);
|
|
1410
1412
|
}
|
|
1411
1413
|
static ɵfac=/*@__PURE__*/ e.ɵɵngDeclareFactory({
|
|
1412
1414
|
minVersion: "12.0.0",
|
|
@@ -1472,13 +1474,13 @@ var ce = class t {
|
|
|
1472
1474
|
isInline: !0,
|
|
1473
1475
|
dependencies: [ {
|
|
1474
1476
|
kind: "directive",
|
|
1475
|
-
type: e.forwardRef(() =>
|
|
1477
|
+
type: e.forwardRef(() => me),
|
|
1476
1478
|
selector: "div[virtuaGridRow]",
|
|
1477
1479
|
inputs: [ "state", "template", "row", "cols", "resizer" ]
|
|
1478
1480
|
} ],
|
|
1479
1481
|
changeDetection: e.ChangeDetectionStrategy.OnPush
|
|
1480
1482
|
});
|
|
1481
|
-
},
|
|
1483
|
+
}, he = class i {
|
|
1482
1484
|
rows=h.required();
|
|
1483
1485
|
cols=h.required();
|
|
1484
1486
|
rowHeight=h.required();
|
|
@@ -1498,25 +1500,25 @@ var ce = class t {
|
|
|
1498
1500
|
scrollEnded=f();
|
|
1499
1501
|
template=p.required(l);
|
|
1500
1502
|
container=y.required("container");
|
|
1501
|
-
I;
|
|
1502
1503
|
P;
|
|
1503
1504
|
q;
|
|
1504
1505
|
F;
|
|
1506
|
+
O;
|
|
1505
1507
|
driver;
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
ariaRowCount=d(new
|
|
1508
|
+
N=d(n).nativeElement;
|
|
1509
|
+
$=d(t);
|
|
1510
|
+
R=g(void 0);
|
|
1511
|
+
ariaRowCount=d(new r("aria-rowcount"), {
|
|
1510
1512
|
optional: !0
|
|
1511
1513
|
});
|
|
1512
|
-
ariaColCount=d(new
|
|
1514
|
+
ariaColCount=d(new r("aria-colcount"), {
|
|
1513
1515
|
optional: !0
|
|
1514
1516
|
});
|
|
1515
|
-
rowCount=u(() => this
|
|
1516
|
-
colCount=u(() => this
|
|
1517
|
-
k=u(() => this.
|
|
1518
|
-
C=u(() => this.
|
|
1519
|
-
|
|
1517
|
+
rowCount=u(() => this.R() && this.P.$getItemsLength());
|
|
1518
|
+
colCount=u(() => this.R() && this.q.$getItemsLength());
|
|
1519
|
+
k=u(() => this.F.$getSizes(this.rows(), this.rowHeight()));
|
|
1520
|
+
C=u(() => this.O.$getSizes(this.cols(), this.colWidth()));
|
|
1521
|
+
T=u(() => ((e = N) => {
|
|
1520
1522
|
const t = /* @__PURE__ */ new Map;
|
|
1521
1523
|
for (const i of e) {
|
|
1522
1524
|
const e = i.rowIndex + (i.rowSpan || 1);
|
|
@@ -1527,122 +1529,122 @@ var ce = class t {
|
|
|
1527
1529
|
}
|
|
1528
1530
|
return t;
|
|
1529
1531
|
})(this.spans()));
|
|
1530
|
-
plan=u(() => (this
|
|
1532
|
+
plan=u(() => (this.R(), ((e, t, [i, s], [n, r], o, l = N, a = N, c) => {
|
|
1531
1533
|
const u = e.$getLength(), p = t.$getLength(), m = e.$getPinnedStart(), d = e.$getTrailStart(), h = t.$getPinnedStart(), f = t.$getTrailStart();
|
|
1532
|
-
i = I(i, m, d), s =
|
|
1533
|
-
const g =
|
|
1534
|
-
for (const e of a) e.rowIndex < u && e.colIndex < p && (
|
|
1535
|
-
const $ =
|
|
1534
|
+
i = I(i, m, d), s = w(s, d - 1), n = I(n, h, f), r = w(r, f - 1);
|
|
1535
|
+
const g = B(l, m, d), S = b(h - 1, 0), y = [], v = [], z = [];
|
|
1536
|
+
for (const e of a) e.rowIndex < u && e.colIndex < p && (z.push(e), y.push(e.rowIndex));
|
|
1537
|
+
const $ = z.length, R = H(g, i, d), x = R < 0 ? -1 : g[R];
|
|
1536
1538
|
x >= 0 && y.push(x);
|
|
1537
1539
|
const q = A(P(y), u, m, i, s, d);
|
|
1538
|
-
for (let e = 0; e < q.length; e++) for (const t of o.get(q[e]) ||
|
|
1539
|
-
const {rowIndex: o, colIndex: l} = t, a =
|
|
1540
|
+
for (let e = 0; e < q.length; e++) for (const t of o.get(q[e]) || N) {
|
|
1541
|
+
const {rowIndex: o, colIndex: l} = t, a = Q(t, u), c = J(t, p);
|
|
1540
1542
|
if ((e < 1 || q[e - 1] < o) && l < p && (a - o > 1 || c - l > 1)) {
|
|
1541
|
-
let e = (o < m || b(o, i) <
|
|
1543
|
+
let e = (o < m || b(o, i) < w(a, s + 1) || d < a || x >= o && x < a) && (l < h || b(l, n) < w(c, r + 1) || f < c);
|
|
1542
1544
|
for (let t = 0; !e && t < $; t++) {
|
|
1543
|
-
const i =
|
|
1545
|
+
const i = z[t];
|
|
1544
1546
|
e = i.rowIndex >= o && i.rowIndex < a && i.colIndex >= l && i.colIndex < c;
|
|
1545
1547
|
}
|
|
1546
|
-
e &&
|
|
1548
|
+
e && z.push(t);
|
|
1547
1549
|
}
|
|
1548
1550
|
}
|
|
1549
|
-
for (const {rowIndex: e, colIndex: t} of
|
|
1550
|
-
const i =
|
|
1551
|
+
for (const {rowIndex: e, colIndex: t} of z) {
|
|
1552
|
+
const i = H(g, e, d);
|
|
1551
1553
|
y.push(e), i >= 0 && y.push(g[i]), v.push(t);
|
|
1552
1554
|
}
|
|
1553
1555
|
P(y), P(v);
|
|
1554
|
-
const F = A(y, u, m, i, s, d),
|
|
1555
|
-
for (const e of
|
|
1556
|
-
const t =
|
|
1557
|
-
|
|
1558
|
-
const s =
|
|
1559
|
-
for (let
|
|
1560
|
-
const t = F[
|
|
1561
|
-
for (let
|
|
1556
|
+
const F = A(y, u, m, i, s, d), O = A(v, p, h, n, r, f), k = F.length, C = O.length, T = /* @__PURE__ */ new Map, _ = [], M = [];
|
|
1557
|
+
for (const e of z) {
|
|
1558
|
+
const t = Q(e, u), i = J(e, p);
|
|
1559
|
+
_.push(t), M.push(i);
|
|
1560
|
+
const s = O.indexOf(e.colIndex);
|
|
1561
|
+
for (let n = F.indexOf(e.rowIndex); n < k && F[n] < t; n++) {
|
|
1562
|
+
const t = F[n] * p;
|
|
1563
|
+
for (let n = s; n < C && O[n] < i; n++) T.set(t + O[n], e);
|
|
1562
1564
|
}
|
|
1563
1565
|
}
|
|
1564
1566
|
const V = [];
|
|
1565
|
-
for (const e of
|
|
1567
|
+
for (const e of O) V.push(!t.$isMeasurable(e) && null);
|
|
1566
1568
|
const E = [], L = e.$getItemOffset(m), K = [];
|
|
1567
|
-
let
|
|
1568
|
-
const
|
|
1569
|
+
let D = K;
|
|
1570
|
+
const G = W.get(e), j = /* @__PURE__ */ new Map;
|
|
1569
1571
|
for (const o of F) {
|
|
1570
|
-
const l = o < m, a = o >= d, y =
|
|
1572
|
+
const l = o < m, a = o >= d, y = H(g, o, d), v = l ? 0 : a ? d : y < 0 ? -1 : g[y];
|
|
1571
1573
|
if (o === v) {
|
|
1572
1574
|
const e = l ? m : a ? u : y + 1 < g.length ? g[y + 1] : d;
|
|
1573
|
-
|
|
1575
|
+
_.push(e);
|
|
1574
1576
|
const t = [];
|
|
1575
1577
|
K.push({
|
|
1576
1578
|
$key: l ? -1 : a ? -2 : -3 - v,
|
|
1577
1579
|
$rows: t,
|
|
1578
1580
|
$style: Y(v, e, l || a ? 0 : null, a ? "bottom" : "top", 4)
|
|
1579
|
-
}),
|
|
1580
|
-
} else v < 0 && (
|
|
1581
|
-
const
|
|
1582
|
-
let q = 0, F = !e.$isMeasurable(o) && null,
|
|
1583
|
-
for (let e = 0; e <
|
|
1584
|
-
const i =
|
|
1585
|
-
if (d ? d.rowIndex === o && d.colIndex === i :
|
|
1586
|
-
const
|
|
1587
|
-
let v,
|
|
1588
|
-
|
|
1589
|
-
const
|
|
1590
|
-
!1 !== F || f || (v = o, F = !0), !1 !== V[e] || g || (
|
|
1591
|
-
const R = l ? "columnheader" : i === S && (s ||
|
|
1581
|
+
}), D = t;
|
|
1582
|
+
} else v < 0 && (D = K);
|
|
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, k = o + 1, M = !1;
|
|
1585
|
+
for (let e = 0; e < C; e++) {
|
|
1586
|
+
const i = O[e], s = i < h, a = i >= f, m = s || a || i >= n && i <= r, d = T.get($ + i);
|
|
1587
|
+
if (d ? d.rowIndex === o && d.colIndex === i : N && m) {
|
|
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
|
+
let v, N;
|
|
1590
|
+
k = b(k, n);
|
|
1591
|
+
const w = s ? t.$getItemOffset(i) : null, $ = a ? t.$getItemOffset(p) - t.$getItemOffset(r) : null;
|
|
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, O = y ? h : void 0, C = "cell" !== R && c && c.rowIndex === o && c.colIndex === i ? c.order : void 0;
|
|
1592
1594
|
let T;
|
|
1593
1595
|
if (I) {
|
|
1594
1596
|
const e = I.length;
|
|
1595
1597
|
for (;q < e && I[q].$col < i; ) q++;
|
|
1596
1598
|
q < e && I[q].$col === i && (T = I[q]);
|
|
1597
1599
|
}
|
|
1598
|
-
if (!T || T.$rowSpan !== x || T.$colSpan !==
|
|
1600
|
+
if (!T || T.$rowSpan !== x || T.$colSpan !== O || T.$start !== w || T.$end !== $ || T.$measureRow !== v || T.$measureCol !== N || T.$role !== R || T.$sort !== C) {
|
|
1599
1601
|
let e = "1/l" + i;
|
|
1600
|
-
y && (e += "/l" +
|
|
1602
|
+
y && (e += "/l" + n + "/l" + r);
|
|
1601
1603
|
const t = {
|
|
1602
1604
|
contain: "layout style",
|
|
1603
1605
|
display: "grid",
|
|
1604
1606
|
gridArea: e
|
|
1605
1607
|
};
|
|
1606
1608
|
f && (t.height = "0px", t.minHeight = "100%", t.zIndex = 1), g && (t.width = "0px",
|
|
1607
|
-
t.minWidth = "100%"), (s || a) && (t[s ? "insetInlineStart" : "insetInlineEnd"] = (s ?
|
|
1609
|
+
t.minWidth = "100%"), (s || a) && (t[s ? "insetInlineStart" : "insetInlineEnd"] = (s ? w : $) + "px",
|
|
1608
1610
|
t.position = "sticky", t.zIndex = 2), T = {
|
|
1609
1611
|
$col: i,
|
|
1610
1612
|
$rowSpan: x,
|
|
1611
|
-
$colSpan:
|
|
1613
|
+
$colSpan: O,
|
|
1612
1614
|
$measureRow: v,
|
|
1613
|
-
$measureCol:
|
|
1615
|
+
$measureCol: N,
|
|
1614
1616
|
$role: R,
|
|
1615
|
-
$sort:
|
|
1617
|
+
$sort: C,
|
|
1616
1618
|
$style: t,
|
|
1617
|
-
$start:
|
|
1619
|
+
$start: w,
|
|
1618
1620
|
$end: $
|
|
1619
|
-
},
|
|
1621
|
+
}, M = !0;
|
|
1620
1622
|
}
|
|
1621
1623
|
P.push(T);
|
|
1622
1624
|
}
|
|
1623
1625
|
}
|
|
1624
1626
|
if (E.push(F), P.length) {
|
|
1625
|
-
const e = R && !
|
|
1627
|
+
const e = R && !M && R.$cells.length === P.length && R.$top === w ? R : {
|
|
1626
1628
|
$row: o,
|
|
1627
1629
|
$cells: P,
|
|
1628
|
-
$style: Y(o,
|
|
1629
|
-
$top:
|
|
1630
|
+
$style: Y(o, k, w, "top", 3),
|
|
1631
|
+
$top: w
|
|
1630
1632
|
};
|
|
1631
|
-
j.set(o, e),
|
|
1633
|
+
j.set(o, e), D.push(e);
|
|
1632
1634
|
}
|
|
1633
1635
|
}
|
|
1634
1636
|
return W.set(e, j), {
|
|
1635
|
-
$rowTemplate: X(e, F, E, P(
|
|
1636
|
-
$colTemplate: X(t,
|
|
1637
|
+
$rowTemplate: X(e, F, E, P(_), "max-content", u),
|
|
1638
|
+
$colTemplate: X(t, O, V, P(M), "minmax(max-content,auto)", p),
|
|
1637
1639
|
$groups: K
|
|
1638
1640
|
};
|
|
1639
|
-
})(this.
|
|
1641
|
+
})(this.F, this.O, this.P.$getRange(this.bufferSize()), this.q.$getRange(this.bufferSize()), this.T(), this.sectionRows(), this.keepMounted(), this.ariaSort())));
|
|
1640
1642
|
rowItem(e) {
|
|
1641
|
-
return
|
|
1643
|
+
return D(this.rows(), e);
|
|
1642
1644
|
}
|
|
1643
1645
|
containerStyle=u(() => {
|
|
1644
|
-
this
|
|
1645
|
-
const {$rowTemplate: e, $colTemplate: t} = this.plan(), i = this.
|
|
1646
|
+
this.R();
|
|
1647
|
+
const {$rowTemplate: e, $colTemplate: t} = this.plan(), i = this.P.$getItemOffset(0), s = this.q.$getItemOffset(0);
|
|
1646
1648
|
return {
|
|
1647
1649
|
contain: "size style",
|
|
1648
1650
|
"overflow-anchor": "none",
|
|
@@ -1653,20 +1655,20 @@ var ce = class t {
|
|
|
1653
1655
|
gap: this.gap() + "px",
|
|
1654
1656
|
"margin-top": i + "px",
|
|
1655
1657
|
"margin-inline-start": s + "px",
|
|
1656
|
-
height:
|
|
1657
|
-
"pointer-events": this.
|
|
1658
|
+
height: _(this.P) - i + "px",
|
|
1659
|
+
"pointer-events": this.P.$isScrolling() || this.q.$isScrolling() ? "none" : void 0
|
|
1658
1660
|
};
|
|
1659
1661
|
});
|
|
1660
1662
|
constructor() {
|
|
1661
1663
|
m(() => {
|
|
1662
|
-
const e = this.rows(), t = this.cols(), i = this.headerRows(), s = this.footerRows(),
|
|
1663
|
-
if (!this.
|
|
1664
|
+
const e = this.rows(), t = this.cols(), i = this.headerRows(), s = this.footerRows(), n = this.headerCols(), r = this.footerCols();
|
|
1665
|
+
if (!this.P) return;
|
|
1664
1666
|
const o = this.k(), l = this.C();
|
|
1665
1667
|
S(() => {
|
|
1666
|
-
this.
|
|
1668
|
+
this.F.$setPinned(i, s), this.O.$setPinned(n, r);
|
|
1667
1669
|
const a = K(e), c = K(t);
|
|
1668
|
-
a !== this.
|
|
1669
|
-
this.
|
|
1670
|
+
a !== this.P.$getItemsLength() && this.P.$update(5, [ a ]), c !== this.q.$getItemsLength() && this.q.$update(5, [ c ]),
|
|
1671
|
+
this.P.$update(9, o), this.q.$update(9, l);
|
|
1670
1672
|
});
|
|
1671
1673
|
}), a({
|
|
1672
1674
|
read: () => {
|
|
@@ -1674,109 +1676,108 @@ var ce = class t {
|
|
|
1674
1676
|
}
|
|
1675
1677
|
}), c({
|
|
1676
1678
|
read: () => {
|
|
1677
|
-
this
|
|
1679
|
+
this.R(), this.driver.$effect();
|
|
1678
1680
|
}
|
|
1679
1681
|
}), d(s).onDestroy(() => {
|
|
1680
|
-
this.
|
|
1682
|
+
this.P?.$dispose(), this.q?.$dispose(), this.driver?.$dispose();
|
|
1681
1683
|
});
|
|
1682
1684
|
}
|
|
1683
1685
|
ngOnInit() {
|
|
1684
|
-
const e = this.
|
|
1686
|
+
const e = this.N;
|
|
1685
1687
|
e.setAttribute("style", "display:block;overflow:auto;contain:strict;width:100%;height:100%;" + (e.getAttribute("style") || ""));
|
|
1686
|
-
const t = this.gap(), i = this.
|
|
1688
|
+
const t = this.gap(), i = this.F = G(this.rows(), this.rowHeight(), t), s = this.O = G(this.cols(), this.colWidth(), t), n = this.P = M(i), r = this.q = M(s);
|
|
1687
1689
|
this.driver = ((e, t) => {
|
|
1688
|
-
let i, s,
|
|
1689
|
-
const
|
|
1690
|
-
const
|
|
1691
|
-
for (const {target:
|
|
1692
|
-
t.$update(4,
|
|
1693
|
-
const e =
|
|
1694
|
-
null != e &&
|
|
1690
|
+
let i, s, n, r = O(), o = !0;
|
|
1691
|
+
const l = /* @__PURE__ */ new WeakMap, a = /* @__PURE__ */ new WeakMap, c = U(r => {
|
|
1692
|
+
const c = [], u = [];
|
|
1693
|
+
for (const {target: p, contentRect: {width: m, height: d}} of r) if (p === i) m || d ? (o || (s.u(),
|
|
1694
|
+
n.u()), o = !0, e.$update(4, d), t.$update(4, m)) : o = !1; else if (p.offsetParent) {
|
|
1695
|
+
const e = l.get(p), t = a.get(p);
|
|
1696
|
+
null != e && c.push([ e, d ]), null != t && u.push([ t, m ]);
|
|
1695
1697
|
}
|
|
1696
|
-
|
|
1698
|
+
c.length && e.$update(3, c), u.length && t.$update(3, u);
|
|
1697
1699
|
});
|
|
1698
1700
|
return {
|
|
1699
1701
|
async $scroll(e, t) {
|
|
1700
|
-
await
|
|
1702
|
+
await r[0] && (e ? n : s).m(t);
|
|
1701
1703
|
},
|
|
1702
|
-
$observe(o) {
|
|
1703
|
-
|
|
1704
|
-
a
|
|
1705
|
-
const c = (e, t) => Z(e, l, l, t, t && "rtl" === getComputedStyle(l).direction, () => {
|
|
1704
|
+
$observe(o, l = o.parentElement) {
|
|
1705
|
+
c.i(i = l);
|
|
1706
|
+
const a = (e, t) => Z(e, l, l, t, t && "rtl" === getComputedStyle(l).direction, () => {
|
|
1706
1707
|
const e = t ? "overflowX" : "overflowY", i = l.style, s = i[e];
|
|
1707
1708
|
i[e] = "hidden", x(() => {
|
|
1708
1709
|
i[e] = s;
|
|
1709
1710
|
});
|
|
1710
1711
|
});
|
|
1711
|
-
s =
|
|
1712
|
+
s = a(e, !1), n = a(t, !0), r[1](!0);
|
|
1712
1713
|
},
|
|
1713
1714
|
$dispose() {
|
|
1714
|
-
|
|
1715
|
+
c.l(), s && s.l(), n && n.l(), r[1](!1), r = O();
|
|
1715
1716
|
},
|
|
1716
|
-
$observeItem: (e, t, i) => (null != t &&
|
|
1717
|
-
|
|
1718
|
-
|
|
1717
|
+
$observeItem: (e, t, i) => (null != t && l.set(e, t), null != i && a.set(e, i),
|
|
1718
|
+
c.i(e), () => {
|
|
1719
|
+
l.delete(e), a.delete(e), c.o(e);
|
|
1719
1720
|
}),
|
|
1720
1721
|
$effect() {
|
|
1721
|
-
s && s.
|
|
1722
|
+
s && s.p(), n && n.p();
|
|
1722
1723
|
}
|
|
1723
1724
|
};
|
|
1724
|
-
})(
|
|
1725
|
+
})(n, r);
|
|
1725
1726
|
const o = e => {
|
|
1726
|
-
this
|
|
1727
|
+
this.R.set(n.$getStateVersion() + r.$getStateVersion()), e && this.$.tick();
|
|
1727
1728
|
};
|
|
1728
|
-
|
|
1729
|
+
n.$subscribe(1, o), r.$subscribe(1, o);
|
|
1729
1730
|
let l = !1;
|
|
1730
|
-
|
|
1731
|
-
l = !0, this.verticalScrolled.emit(
|
|
1732
|
-
}),
|
|
1733
|
-
l = !0, this.horizontalScrolled.emit(
|
|
1731
|
+
n.$subscribe(4, () => {
|
|
1732
|
+
l = !0, this.verticalScrolled.emit(n.$getScrollOffset());
|
|
1733
|
+
}), r.$subscribe(4, () => {
|
|
1734
|
+
l = !0, this.horizontalScrolled.emit(r.$getScrollOffset());
|
|
1734
1735
|
});
|
|
1735
1736
|
const a = () => {
|
|
1736
|
-
!l ||
|
|
1737
|
+
!l || n.$isScrolling() || r.$isScrolling() || (l = !1, this.scrollEnded.emit());
|
|
1737
1738
|
};
|
|
1738
|
-
|
|
1739
|
+
n.$subscribe(8, a), r.$subscribe(8, a), o();
|
|
1739
1740
|
}
|
|
1740
1741
|
get verticalScrollOffset() {
|
|
1741
|
-
return this.
|
|
1742
|
+
return this.P.$getScrollOffset();
|
|
1742
1743
|
}
|
|
1743
1744
|
get horizontalScrollOffset() {
|
|
1744
|
-
return this.
|
|
1745
|
+
return this.q.$getScrollOffset();
|
|
1745
1746
|
}
|
|
1746
1747
|
get scrollHeight() {
|
|
1747
|
-
return
|
|
1748
|
+
return _(this.P);
|
|
1748
1749
|
}
|
|
1749
1750
|
get scrollWidth() {
|
|
1750
|
-
return
|
|
1751
|
+
return _(this.q);
|
|
1751
1752
|
}
|
|
1752
1753
|
get viewportHeight() {
|
|
1753
|
-
return this.
|
|
1754
|
+
return this.P.$getViewportSize();
|
|
1754
1755
|
}
|
|
1755
1756
|
get viewportWidth() {
|
|
1756
|
-
return this.
|
|
1757
|
+
return this.q.$getViewportSize();
|
|
1757
1758
|
}
|
|
1758
1759
|
findRowIndex(e) {
|
|
1759
|
-
return this.
|
|
1760
|
+
return this.P.$findItemIndex(e);
|
|
1760
1761
|
}
|
|
1761
1762
|
findColIndex(e) {
|
|
1762
|
-
return this.
|
|
1763
|
+
return this.q.$findItemIndex(e);
|
|
1763
1764
|
}
|
|
1764
1765
|
getRowOffset(e) {
|
|
1765
|
-
return this.
|
|
1766
|
+
return this.P.$getItemOffset(e);
|
|
1766
1767
|
}
|
|
1767
1768
|
getColOffset(e) {
|
|
1768
|
-
return this.
|
|
1769
|
+
return this.q.$getItemOffset(e);
|
|
1769
1770
|
}
|
|
1770
1771
|
getRowSize(e) {
|
|
1771
|
-
return this.
|
|
1772
|
+
return this.P.$getItemSize(e);
|
|
1772
1773
|
}
|
|
1773
1774
|
getColSize(e) {
|
|
1774
|
-
return this.
|
|
1775
|
+
return this.q.$getItemSize(e);
|
|
1775
1776
|
}
|
|
1776
1777
|
scrollToIndex(e) {
|
|
1777
|
-
((e, t, i, s,
|
|
1778
|
-
null != o &&
|
|
1779
|
-
})(this.driver, this.
|
|
1778
|
+
((e, t, i, s, n, r = N, {rowIndex: o, colIndex: l, rowAlign: a, colAlign: c}) => {
|
|
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.O, this.sectionRows(), e);
|
|
1780
1781
|
}
|
|
1781
1782
|
scrollTo({vertical: e, horizontal: t}) {
|
|
1782
1783
|
((e, t, i) => {
|
|
@@ -1784,16 +1785,16 @@ var ce = class t {
|
|
|
1784
1785
|
})(this.driver, e, t);
|
|
1785
1786
|
}
|
|
1786
1787
|
scrollBy({vertical: e, horizontal: t}) {
|
|
1787
|
-
((e, t, i, s,
|
|
1788
|
+
((e, t, i, s, n) => {
|
|
1788
1789
|
if (null != s) {
|
|
1789
1790
|
const i = s + t.$getScrollOffset();
|
|
1790
1791
|
e.$scroll(!1, () => i);
|
|
1791
1792
|
}
|
|
1792
|
-
if (null !=
|
|
1793
|
-
const t =
|
|
1793
|
+
if (null != n) {
|
|
1794
|
+
const t = n + i.$getScrollOffset();
|
|
1794
1795
|
e.$scroll(!0, () => t);
|
|
1795
1796
|
}
|
|
1796
|
-
})(this.driver, this.
|
|
1797
|
+
})(this.driver, this.P, this.q, e, t);
|
|
1797
1798
|
}
|
|
1798
1799
|
static ɵfac=/*@__PURE__*/ e.ɵɵngDeclareFactory({
|
|
1799
1800
|
minVersion: "12.0.0",
|
|
@@ -1944,12 +1945,12 @@ var ce = class t {
|
|
|
1944
1945
|
isInline: !0,
|
|
1945
1946
|
dependencies: [ {
|
|
1946
1947
|
kind: "directive",
|
|
1947
|
-
type: e.forwardRef(() =>
|
|
1948
|
+
type: e.forwardRef(() => de),
|
|
1948
1949
|
selector: "div[virtuaGridRowGroup]",
|
|
1949
1950
|
inputs: [ "state", "template", "rows", "cols", "resizer" ]
|
|
1950
1951
|
}, {
|
|
1951
1952
|
kind: "directive",
|
|
1952
|
-
type: e.forwardRef(() =>
|
|
1953
|
+
type: e.forwardRef(() => me),
|
|
1953
1954
|
selector: "div[virtuaGridRow]",
|
|
1954
1955
|
inputs: [ "state", "template", "row", "cols", "resizer" ]
|
|
1955
1956
|
} ],
|
|
@@ -1959,5 +1960,387 @@ var ce = class t {
|
|
|
1959
1960
|
|
|
1960
1961
|
i.OnPush, i.OnPush, i.OnPush;
|
|
1961
1962
|
|
|
1962
|
-
|
|
1963
|
+
var fe = (e, t) => t ? `calc(${100 * e}% + ${t}px)` : 100 * e + "%", ge = class t {
|
|
1964
|
+
index=h.required();
|
|
1965
|
+
offset=h.required();
|
|
1966
|
+
crossOffset=h.required();
|
|
1967
|
+
crossSize=h.required();
|
|
1968
|
+
hide=h.required();
|
|
1969
|
+
resizer=h.required();
|
|
1970
|
+
style=u(() => ({
|
|
1971
|
+
contain: "layout style",
|
|
1972
|
+
position: "absolute",
|
|
1973
|
+
top: this.offset() + "px",
|
|
1974
|
+
"inset-inline-start": this.crossOffset(),
|
|
1975
|
+
width: this.crossSize(),
|
|
1976
|
+
visibility: this.hide() ? "hidden" : void 0
|
|
1977
|
+
}));
|
|
1978
|
+
constructor() {
|
|
1979
|
+
const e = d(n).nativeElement;
|
|
1980
|
+
let t;
|
|
1981
|
+
c({
|
|
1982
|
+
read: () => {
|
|
1983
|
+
const i = this.index();
|
|
1984
|
+
t && t(), t = S(this.resizer)(e, i);
|
|
1985
|
+
}
|
|
1986
|
+
}), d(s).onDestroy(() => {
|
|
1987
|
+
t && t();
|
|
1988
|
+
});
|
|
1989
|
+
}
|
|
1990
|
+
static ɵfac=/*@__PURE__*/ e.ɵɵngDeclareFactory({
|
|
1991
|
+
minVersion: "12.0.0",
|
|
1992
|
+
version: "22.1.7",
|
|
1993
|
+
ngImport: e,
|
|
1994
|
+
type: t,
|
|
1995
|
+
deps: [],
|
|
1996
|
+
target: e.ɵɵFactoryTarget.Directive
|
|
1997
|
+
});
|
|
1998
|
+
static ɵdir=/*@__PURE__*/ e.ɵɵngDeclareDirective({
|
|
1999
|
+
minVersion: "17.1.0",
|
|
2000
|
+
version: "22.1.7",
|
|
2001
|
+
type: t,
|
|
2002
|
+
isStandalone: !0,
|
|
2003
|
+
selector: "div[virtuaMasonryItem]",
|
|
2004
|
+
inputs: {
|
|
2005
|
+
index: {
|
|
2006
|
+
classPropertyName: "index",
|
|
2007
|
+
publicName: "index",
|
|
2008
|
+
isSignal: !0,
|
|
2009
|
+
isRequired: !0,
|
|
2010
|
+
transformFunction: null
|
|
2011
|
+
},
|
|
2012
|
+
offset: {
|
|
2013
|
+
classPropertyName: "offset",
|
|
2014
|
+
publicName: "offset",
|
|
2015
|
+
isSignal: !0,
|
|
2016
|
+
isRequired: !0,
|
|
2017
|
+
transformFunction: null
|
|
2018
|
+
},
|
|
2019
|
+
crossOffset: {
|
|
2020
|
+
classPropertyName: "crossOffset",
|
|
2021
|
+
publicName: "crossOffset",
|
|
2022
|
+
isSignal: !0,
|
|
2023
|
+
isRequired: !0,
|
|
2024
|
+
transformFunction: null
|
|
2025
|
+
},
|
|
2026
|
+
crossSize: {
|
|
2027
|
+
classPropertyName: "crossSize",
|
|
2028
|
+
publicName: "crossSize",
|
|
2029
|
+
isSignal: !0,
|
|
2030
|
+
isRequired: !0,
|
|
2031
|
+
transformFunction: null
|
|
2032
|
+
},
|
|
2033
|
+
hide: {
|
|
2034
|
+
classPropertyName: "hide",
|
|
2035
|
+
publicName: "hide",
|
|
2036
|
+
isSignal: !0,
|
|
2037
|
+
isRequired: !0,
|
|
2038
|
+
transformFunction: null
|
|
2039
|
+
},
|
|
2040
|
+
resizer: {
|
|
2041
|
+
classPropertyName: "resizer",
|
|
2042
|
+
publicName: "resizer",
|
|
2043
|
+
isSignal: !0,
|
|
2044
|
+
isRequired: !0,
|
|
2045
|
+
transformFunction: null
|
|
2046
|
+
}
|
|
2047
|
+
},
|
|
2048
|
+
host: {
|
|
2049
|
+
properties: {
|
|
2050
|
+
style: "style()"
|
|
2051
|
+
}
|
|
2052
|
+
},
|
|
2053
|
+
ngImport: e
|
|
2054
|
+
});
|
|
2055
|
+
}, Se = class i {
|
|
2056
|
+
data=h.required();
|
|
2057
|
+
getKey=h(oe);
|
|
2058
|
+
lanes=h.required();
|
|
2059
|
+
gap=h();
|
|
2060
|
+
itemSize=h();
|
|
2061
|
+
bufferSize=h();
|
|
2062
|
+
cacheProp=h(void 0, {
|
|
2063
|
+
alias: "cache"
|
|
2064
|
+
});
|
|
2065
|
+
scrolled=f();
|
|
2066
|
+
scrollEnded=f();
|
|
2067
|
+
template=p.required(l);
|
|
2068
|
+
container=y.required("container");
|
|
2069
|
+
S;
|
|
2070
|
+
v;
|
|
2071
|
+
driver;
|
|
2072
|
+
N=d(n).nativeElement;
|
|
2073
|
+
$=d(t);
|
|
2074
|
+
R=g(void 0);
|
|
2075
|
+
items=u(() => {
|
|
2076
|
+
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), [l, a] = e.$getRange(this.bufferSize()), c = [];
|
|
2078
|
+
for (let u = l; u <= a; u++) {
|
|
2079
|
+
const l = i[u], a = t.$getItemLane(u);
|
|
2080
|
+
c.push({
|
|
2081
|
+
key: s(l, u),
|
|
2082
|
+
index: u,
|
|
2083
|
+
data: l,
|
|
2084
|
+
offset: e.$getItemOffset(u),
|
|
2085
|
+
crossOffset: fe(a / r, a * n / r),
|
|
2086
|
+
crossSize: o,
|
|
2087
|
+
hide: e.$isUnmeasuredItem(u)
|
|
2088
|
+
});
|
|
2089
|
+
}
|
|
2090
|
+
return c;
|
|
2091
|
+
});
|
|
2092
|
+
containerStyle=u(() => (this.R(), {
|
|
2093
|
+
contain: "size style",
|
|
2094
|
+
"overflow-anchor": "none",
|
|
2095
|
+
flex: "none",
|
|
2096
|
+
position: "relative",
|
|
2097
|
+
width: "100%",
|
|
2098
|
+
height: this.S.$getTotalSize() + "px",
|
|
2099
|
+
"pointer-events": this.S.$isScrolling() ? "none" : void 0
|
|
2100
|
+
}));
|
|
2101
|
+
constructor() {
|
|
2102
|
+
m(() => {
|
|
2103
|
+
const e = this.data();
|
|
2104
|
+
this.S && S(() => {
|
|
2105
|
+
e.length !== this.S.$getItemsLength() && this.S.$update(5, [ e.length ]);
|
|
2106
|
+
});
|
|
2107
|
+
}), m(() => {
|
|
2108
|
+
const e = this.lanes(), t = this.gap();
|
|
2109
|
+
this.S && S(() => {
|
|
2110
|
+
this.v.$setOptions(e, t), this.S.$update(9, void 0);
|
|
2111
|
+
});
|
|
2112
|
+
}), a({
|
|
2113
|
+
read: () => {
|
|
2114
|
+
this.driver.$observe(this.container().nativeElement);
|
|
2115
|
+
}
|
|
2116
|
+
}), c({
|
|
2117
|
+
read: () => {
|
|
2118
|
+
this.R(), this.driver.$effect();
|
|
2119
|
+
}
|
|
2120
|
+
}), d(s).onDestroy(() => {
|
|
2121
|
+
this.S?.$dispose(), this.driver?.$dispose();
|
|
2122
|
+
});
|
|
2123
|
+
}
|
|
2124
|
+
ngOnInit() {
|
|
2125
|
+
const e = this.N;
|
|
2126
|
+
e.setAttribute("style", "display:block;overflow-y:auto;contain:strict;width:100%;height:100%;" + (e.getAttribute("style") || ""));
|
|
2127
|
+
const t = this.v = ((e, t, i = 0, s, n) => {
|
|
2128
|
+
let r = b(t, 1), o = r, l = i, a = n && n[1] || s || 40, c = -1, u = s ? void 0 : /* @__PURE__ */ new Set, p = !s;
|
|
2129
|
+
const m = n && n[0], d = m ? V(m.slice(0, w(e, m.length)), b(0, e - m.length)) : V([], e), h = [], f = [], g = [], S = e => {
|
|
2130
|
+
const t = d[e];
|
|
2131
|
+
return -1 === t ? a : t;
|
|
2132
|
+
}, y = t => {
|
|
2133
|
+
if (t = w(t, e - 1), c >= t) return;
|
|
2134
|
+
const s = [], n = [];
|
|
2135
|
+
for (let e = 0; e < r; e++) s.push(0), n.push(-1);
|
|
2136
|
+
for (let e = c, t = r; e >= 0 && t; e--) {
|
|
2137
|
+
const i = f[e];
|
|
2138
|
+
-1 === n[i] && (n[i] = e, s[i] = h[e] + S(e), t--);
|
|
2139
|
+
}
|
|
2140
|
+
for (;c < t; ) {
|
|
2141
|
+
const e = ++c;
|
|
2142
|
+
let t = 0, o = 1 / 0, l = 1 / 0;
|
|
2143
|
+
for (let e = 0; e < r; e++) {
|
|
2144
|
+
const r = s[e] + (n[e] >= 0 ? i : 0);
|
|
2145
|
+
(r < o || r === o && n[e] < l) && (t = e, o = r, l = n[e]);
|
|
2146
|
+
}
|
|
2147
|
+
h[e] = o, f[e] = t, s[t] = o + S(e), n[t] = e, g[e] = b(e ? g[e - 1] : 0, s[t]);
|
|
2148
|
+
}
|
|
2149
|
+
}, v = t => t >= e ? N() : (y(t), h[t]), z = e => (y(e), g[e]), N = () => e ? z(e - 1) : 0, $ = t => {
|
|
2150
|
+
if (!e) return 0;
|
|
2151
|
+
const i = E(z, e, t);
|
|
2152
|
+
return z(i) <= t ? i + 1 : i;
|
|
2153
|
+
};
|
|
2154
|
+
return {
|
|
2155
|
+
$getRange: (t, i) => {
|
|
2156
|
+
const s = E(v, e, i);
|
|
2157
|
+
return [ w($(t), s), s ];
|
|
2158
|
+
},
|
|
2159
|
+
$findIndex: t => E(v, e, t),
|
|
2160
|
+
$getItemOffset: v,
|
|
2161
|
+
$getItemSize: S,
|
|
2162
|
+
$isSizeEqual: (e, t = -1) => d[e] === t,
|
|
2163
|
+
$resize: (t, s, n, o) => {
|
|
2164
|
+
let l = $(n);
|
|
2165
|
+
for (;l > 0 && !s(l - 1); ) l--;
|
|
2166
|
+
for (;l < e && s(l); ) l++;
|
|
2167
|
+
const m = v(l);
|
|
2168
|
+
for (const [e, i] of t) d[e] = i, u && u.add(e), c = w(e - 1, c);
|
|
2169
|
+
let h = v(l) - m;
|
|
2170
|
+
if (u && o) {
|
|
2171
|
+
const e = [];
|
|
2172
|
+
let t = 0;
|
|
2173
|
+
if (u.forEach(s => {
|
|
2174
|
+
const n = d[s];
|
|
2175
|
+
n > 0 && (e.push(n), t += n + i);
|
|
2176
|
+
}), t > o * r) {
|
|
2177
|
+
P(e);
|
|
2178
|
+
const t = e.length, i = t / 2 | 0, s = t % 2 == 0 ? (e[i - 1] + e[i]) / 2 : e[i], r = $(n + h), o = v(r);
|
|
2179
|
+
a = s, c = -1, h += v(r) - o, u = void 0, p = !1;
|
|
2180
|
+
}
|
|
2181
|
+
}
|
|
2182
|
+
return h;
|
|
2183
|
+
},
|
|
2184
|
+
$getTotalSize: N,
|
|
2185
|
+
$getLength: () => e,
|
|
2186
|
+
$setLength: t => {
|
|
2187
|
+
const i = t - e;
|
|
2188
|
+
return c = w(t - 1, c), e = t, i > 0 ? V(d, i) : d.splice(i), 0;
|
|
2189
|
+
},
|
|
2190
|
+
$relayout: (e, t) => {
|
|
2191
|
+
if (o === r && l === i) return;
|
|
2192
|
+
const n = $(t), a = v(n);
|
|
2193
|
+
return r = o, i = l, c = -1, u = s ? void 0 : /* @__PURE__ */ new Set, v(n) - a;
|
|
2194
|
+
},
|
|
2195
|
+
$setOptions: (e, t = 0) => {
|
|
2196
|
+
o = b(e, 1), l = t;
|
|
2197
|
+
},
|
|
2198
|
+
$isEstimating: () => p,
|
|
2199
|
+
$snapshot: () => [ d.slice(), a ],
|
|
2200
|
+
$getLanes: () => r,
|
|
2201
|
+
$getGap: () => i,
|
|
2202
|
+
$getItemLane: e => (y(e), f[e])
|
|
2203
|
+
};
|
|
2204
|
+
})(this.data().length, this.lanes(), this.gap(), this.itemSize(), this.cacheProp()), i = this.S = M(t);
|
|
2205
|
+
this.driver = ee(i, !1), i.$subscribe(1, e => {
|
|
2206
|
+
this.R.set(i.$getStateVersion()), e && this.$.tick();
|
|
2207
|
+
}), i.$subscribe(4, () => {
|
|
2208
|
+
this.scrolled.emit(i.$getScrollOffset());
|
|
2209
|
+
}), i.$subscribe(8, () => {
|
|
2210
|
+
this.scrollEnded.emit();
|
|
2211
|
+
}), this.R.set(i.$getStateVersion());
|
|
2212
|
+
}
|
|
2213
|
+
get cache() {
|
|
2214
|
+
return this.v.$snapshot();
|
|
2215
|
+
}
|
|
2216
|
+
get scrollOffset() {
|
|
2217
|
+
return this.S.$getScrollOffset();
|
|
2218
|
+
}
|
|
2219
|
+
get scrollSize() {
|
|
2220
|
+
return _(this.S);
|
|
2221
|
+
}
|
|
2222
|
+
get viewportSize() {
|
|
2223
|
+
return this.S.$getViewportSize();
|
|
2224
|
+
}
|
|
2225
|
+
getItemOffset(e) {
|
|
2226
|
+
return this.S.$getItemOffset(e);
|
|
2227
|
+
}
|
|
2228
|
+
getItemSize(e) {
|
|
2229
|
+
return this.S.$getItemSize(e);
|
|
2230
|
+
}
|
|
2231
|
+
scrollToIndex(e, t) {
|
|
2232
|
+
se(this.driver, this.S, e, t);
|
|
2233
|
+
}
|
|
2234
|
+
scrollTo(e) {
|
|
2235
|
+
te(this.driver, e);
|
|
2236
|
+
}
|
|
2237
|
+
scrollBy(e) {
|
|
2238
|
+
ie(this.driver, this.S, e);
|
|
2239
|
+
}
|
|
2240
|
+
static ɵfac=/*@__PURE__*/ e.ɵɵngDeclareFactory({
|
|
2241
|
+
minVersion: "12.0.0",
|
|
2242
|
+
version: "22.1.7",
|
|
2243
|
+
ngImport: e,
|
|
2244
|
+
type: i,
|
|
2245
|
+
deps: [],
|
|
2246
|
+
target: e.ɵɵFactoryTarget.Component
|
|
2247
|
+
});
|
|
2248
|
+
static ɵcmp=/*@__PURE__*/ e.ɵɵngDeclareComponent({
|
|
2249
|
+
minVersion: "17.0.0",
|
|
2250
|
+
version: "22.1.7",
|
|
2251
|
+
type: i,
|
|
2252
|
+
isStandalone: !0,
|
|
2253
|
+
selector: "virtua-vmasonry",
|
|
2254
|
+
inputs: {
|
|
2255
|
+
data: {
|
|
2256
|
+
classPropertyName: "data",
|
|
2257
|
+
publicName: "data",
|
|
2258
|
+
isSignal: !0,
|
|
2259
|
+
isRequired: !0,
|
|
2260
|
+
transformFunction: null
|
|
2261
|
+
},
|
|
2262
|
+
getKey: {
|
|
2263
|
+
classPropertyName: "getKey",
|
|
2264
|
+
publicName: "getKey",
|
|
2265
|
+
isSignal: !0,
|
|
2266
|
+
isRequired: !1,
|
|
2267
|
+
transformFunction: null
|
|
2268
|
+
},
|
|
2269
|
+
lanes: {
|
|
2270
|
+
classPropertyName: "lanes",
|
|
2271
|
+
publicName: "lanes",
|
|
2272
|
+
isSignal: !0,
|
|
2273
|
+
isRequired: !0,
|
|
2274
|
+
transformFunction: null
|
|
2275
|
+
},
|
|
2276
|
+
gap: {
|
|
2277
|
+
classPropertyName: "gap",
|
|
2278
|
+
publicName: "gap",
|
|
2279
|
+
isSignal: !0,
|
|
2280
|
+
isRequired: !1,
|
|
2281
|
+
transformFunction: null
|
|
2282
|
+
},
|
|
2283
|
+
itemSize: {
|
|
2284
|
+
classPropertyName: "itemSize",
|
|
2285
|
+
publicName: "itemSize",
|
|
2286
|
+
isSignal: !0,
|
|
2287
|
+
isRequired: !1,
|
|
2288
|
+
transformFunction: null
|
|
2289
|
+
},
|
|
2290
|
+
bufferSize: {
|
|
2291
|
+
classPropertyName: "bufferSize",
|
|
2292
|
+
publicName: "bufferSize",
|
|
2293
|
+
isSignal: !0,
|
|
2294
|
+
isRequired: !1,
|
|
2295
|
+
transformFunction: null
|
|
2296
|
+
},
|
|
2297
|
+
cacheProp: {
|
|
2298
|
+
classPropertyName: "cacheProp",
|
|
2299
|
+
publicName: "cache",
|
|
2300
|
+
isSignal: !0,
|
|
2301
|
+
isRequired: !1,
|
|
2302
|
+
transformFunction: null
|
|
2303
|
+
}
|
|
2304
|
+
},
|
|
2305
|
+
outputs: {
|
|
2306
|
+
scrolled: "scrolled",
|
|
2307
|
+
scrollEnded: "scrollEnded"
|
|
2308
|
+
},
|
|
2309
|
+
queries: [ {
|
|
2310
|
+
propertyName: "template",
|
|
2311
|
+
first: !0,
|
|
2312
|
+
predicate: l,
|
|
2313
|
+
emitDistinctChangesOnly: !1,
|
|
2314
|
+
descendants: !0,
|
|
2315
|
+
isSignal: !0
|
|
2316
|
+
} ],
|
|
2317
|
+
viewQueries: [ {
|
|
2318
|
+
propertyName: "container",
|
|
2319
|
+
first: !0,
|
|
2320
|
+
predicate: [ "container" ],
|
|
2321
|
+
emitDistinctChangesOnly: !1,
|
|
2322
|
+
descendants: !0,
|
|
2323
|
+
isSignal: !0
|
|
2324
|
+
} ],
|
|
2325
|
+
ngImport: e,
|
|
2326
|
+
template: '\n <div #container [style]="containerStyle()">\n @for (item of items(); track item.key) {\n <div\n virtuaMasonryItem\n [index]="item.index"\n [offset]="item.offset"\n [crossOffset]="item.crossOffset"\n [crossSize]="item.crossSize"\n [hide]="item.hide"\n [resizer]="driver.$observeItem"\n >\n <ng-container\n [ngTemplateOutlet]="template()"\n [ngTemplateOutletContext]="{\n $implicit: item.data,\n index: item.index,\n }"\n />\n </div>\n }\n </div>\n ',
|
|
2327
|
+
isInline: !0,
|
|
2328
|
+
dependencies: [ {
|
|
2329
|
+
kind: "directive",
|
|
2330
|
+
type: e.forwardRef(() => ge),
|
|
2331
|
+
selector: "div[virtuaMasonryItem]",
|
|
2332
|
+
inputs: [ "index", "offset", "crossOffset", "crossSize", "hide", "resizer" ]
|
|
2333
|
+
}, {
|
|
2334
|
+
kind: "directive",
|
|
2335
|
+
type: e.forwardRef(() => v),
|
|
2336
|
+
selector: "[ngTemplateOutlet]",
|
|
2337
|
+
inputs: [ "ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector" ]
|
|
2338
|
+
} ],
|
|
2339
|
+
changeDetection: e.ChangeDetectionStrategy.OnPush
|
|
2340
|
+
});
|
|
2341
|
+
};
|
|
2342
|
+
|
|
2343
|
+
i.OnPush;
|
|
2344
|
+
|
|
2345
|
+
export { he as VGrid, ce as VList, Se as VMasonry, ae as Virtualizer, ue as WindowVirtualizer };
|
|
1963
2346
|
//# sourceMappingURL=index.js.map
|