react-window 2.0.0-alpha.0 → 2.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/react-window.cjs +1 -22
- package/dist/react-window.d.ts +26 -11
- package/dist/react-window.js +447 -677
- package/docs/assets/index-BMf3NlnJ.css +1 -0
- package/docs/assets/index-BPRxcSBS.js +67 -0
- package/docs/data/addresses.json +21935 -5957
- package/docs/data/contacts.json +300 -300
- package/docs/generated/code-snippets/CellComponent.json +1 -1
- package/docs/generated/code-snippets/FixedHeightRowComponent.json +1 -1
- package/docs/generated/code-snippets/FlexboxLayout.json +2 -2
- package/docs/generated/code-snippets/ListVariableRowHeights.json +2 -2
- package/docs/generated/code-snippets/columnWidth.json +2 -2
- package/docs/generated/code-snippets/gridRefClickEventHandler.json +2 -1
- package/docs/generated/code-snippets/listRefClickEventHandler.json +2 -1
- package/docs/generated/code-snippets/rowHeight.json +2 -2
- package/docs/generated/code-snippets/useGridCallbackRef.json +4 -0
- package/docs/generated/code-snippets/useListCallbackRef.json +4 -0
- package/docs/generated/js-docs/Grid.json +7 -3
- package/docs/index.html +2 -2
- package/docs/stats.html +1 -1
- package/package.json +1 -1
- package/docs/assets/index-DlGpNu0r.css +0 -1
- package/docs/assets/index-fVOw1dKb.js +0 -67
package/dist/react-window.js
CHANGED
|
@@ -1,812 +1,582 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the MIT license found in the
|
|
10
|
-
* LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/
|
|
12
|
-
var re;
|
|
13
|
-
function xe() {
|
|
14
|
-
if (re) return D;
|
|
15
|
-
re = 1;
|
|
16
|
-
var i = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
17
|
-
function n(o, r, s) {
|
|
18
|
-
var c = null;
|
|
19
|
-
if (s !== void 0 && (c = "" + s), r.key !== void 0 && (c = "" + r.key), "key" in r) {
|
|
20
|
-
s = {};
|
|
21
|
-
for (var a in r)
|
|
22
|
-
a !== "key" && (s[a] = r[a]);
|
|
23
|
-
} else s = r;
|
|
24
|
-
return r = s.ref, {
|
|
25
|
-
$$typeof: i,
|
|
26
|
-
type: o,
|
|
27
|
-
key: c,
|
|
28
|
-
ref: r !== void 0 ? r : null,
|
|
29
|
-
props: s
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
return D.Fragment = t, D.jsx = n, D.jsxs = n, D;
|
|
33
|
-
}
|
|
34
|
-
var U = {};
|
|
35
|
-
/**
|
|
36
|
-
* @license React
|
|
37
|
-
* react-jsx-runtime.development.js
|
|
38
|
-
*
|
|
39
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
40
|
-
*
|
|
41
|
-
* This source code is licensed under the MIT license found in the
|
|
42
|
-
* LICENSE file in the root directory of this source tree.
|
|
43
|
-
*/
|
|
44
|
-
var se;
|
|
45
|
-
function Te() {
|
|
46
|
-
return se || (se = 1, process.env.NODE_ENV !== "production" && function() {
|
|
47
|
-
function i(e) {
|
|
48
|
-
if (e == null) return null;
|
|
49
|
-
if (typeof e == "function")
|
|
50
|
-
return e.$$typeof === C ? null : e.displayName || e.name || null;
|
|
51
|
-
if (typeof e == "string") return e;
|
|
52
|
-
switch (e) {
|
|
53
|
-
case T:
|
|
54
|
-
return "Fragment";
|
|
55
|
-
case b:
|
|
56
|
-
return "Profiler";
|
|
57
|
-
case S:
|
|
58
|
-
return "StrictMode";
|
|
59
|
-
case I:
|
|
60
|
-
return "Suspense";
|
|
61
|
-
case f:
|
|
62
|
-
return "SuspenseList";
|
|
63
|
-
case Y:
|
|
64
|
-
return "Activity";
|
|
65
|
-
}
|
|
66
|
-
if (typeof e == "object")
|
|
67
|
-
switch (typeof e.tag == "number" && console.error(
|
|
68
|
-
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
69
|
-
), e.$$typeof) {
|
|
70
|
-
case w:
|
|
71
|
-
return "Portal";
|
|
72
|
-
case P:
|
|
73
|
-
return (e.displayName || "Context") + ".Provider";
|
|
74
|
-
case A:
|
|
75
|
-
return (e._context.displayName || "Context") + ".Consumer";
|
|
76
|
-
case W:
|
|
77
|
-
var l = e.render;
|
|
78
|
-
return e = e.displayName, e || (e = l.displayName || l.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
79
|
-
case v:
|
|
80
|
-
return l = e.displayName || null, l !== null ? l : i(e.type) || "Memo";
|
|
81
|
-
case $:
|
|
82
|
-
l = e._payload, e = e._init;
|
|
83
|
-
try {
|
|
84
|
-
return i(e(l));
|
|
85
|
-
} catch {
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
return null;
|
|
89
|
-
}
|
|
90
|
-
function t(e) {
|
|
91
|
-
return "" + e;
|
|
92
|
-
}
|
|
93
|
-
function n(e) {
|
|
94
|
-
try {
|
|
95
|
-
t(e);
|
|
96
|
-
var l = !1;
|
|
97
|
-
} catch {
|
|
98
|
-
l = !0;
|
|
99
|
-
}
|
|
100
|
-
if (l) {
|
|
101
|
-
l = console;
|
|
102
|
-
var u = l.error, h = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
103
|
-
return u.call(
|
|
104
|
-
l,
|
|
105
|
-
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
106
|
-
h
|
|
107
|
-
), t(e);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
function o(e) {
|
|
111
|
-
if (e === T) return "<>";
|
|
112
|
-
if (typeof e == "object" && e !== null && e.$$typeof === $)
|
|
113
|
-
return "<...>";
|
|
114
|
-
try {
|
|
115
|
-
var l = i(e);
|
|
116
|
-
return l ? "<" + l + ">" : "<...>";
|
|
117
|
-
} catch {
|
|
118
|
-
return "<...>";
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
function r() {
|
|
122
|
-
var e = N.A;
|
|
123
|
-
return e === null ? null : e.getOwner();
|
|
124
|
-
}
|
|
125
|
-
function s() {
|
|
126
|
-
return Error("react-stack-top-frame");
|
|
127
|
-
}
|
|
128
|
-
function c(e) {
|
|
129
|
-
if (V.call(e, "key")) {
|
|
130
|
-
var l = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
131
|
-
if (l && l.isReactWarning) return !1;
|
|
132
|
-
}
|
|
133
|
-
return e.key !== void 0;
|
|
134
|
-
}
|
|
135
|
-
function a(e, l) {
|
|
136
|
-
function u() {
|
|
137
|
-
_ || (_ = !0, console.error(
|
|
138
|
-
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
139
|
-
l
|
|
140
|
-
));
|
|
141
|
-
}
|
|
142
|
-
u.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
143
|
-
get: u,
|
|
144
|
-
configurable: !0
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
function g() {
|
|
148
|
-
var e = i(this.type);
|
|
149
|
-
return j[e] || (j[e] = !0, console.error(
|
|
150
|
-
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
151
|
-
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
152
|
-
}
|
|
153
|
-
function R(e, l, u, h, M, z, H, J) {
|
|
154
|
-
return u = z.ref, e = {
|
|
155
|
-
$$typeof: O,
|
|
156
|
-
type: e,
|
|
157
|
-
key: l,
|
|
158
|
-
props: z,
|
|
159
|
-
_owner: M
|
|
160
|
-
}, (u !== void 0 ? u : null) !== null ? Object.defineProperty(e, "ref", {
|
|
161
|
-
enumerable: !1,
|
|
162
|
-
get: g
|
|
163
|
-
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
164
|
-
configurable: !1,
|
|
165
|
-
enumerable: !1,
|
|
166
|
-
writable: !0,
|
|
167
|
-
value: 0
|
|
168
|
-
}), Object.defineProperty(e, "_debugInfo", {
|
|
169
|
-
configurable: !1,
|
|
170
|
-
enumerable: !1,
|
|
171
|
-
writable: !0,
|
|
172
|
-
value: null
|
|
173
|
-
}), Object.defineProperty(e, "_debugStack", {
|
|
174
|
-
configurable: !1,
|
|
175
|
-
enumerable: !1,
|
|
176
|
-
writable: !0,
|
|
177
|
-
value: H
|
|
178
|
-
}), Object.defineProperty(e, "_debugTask", {
|
|
179
|
-
configurable: !1,
|
|
180
|
-
enumerable: !1,
|
|
181
|
-
writable: !0,
|
|
182
|
-
value: J
|
|
183
|
-
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
184
|
-
}
|
|
185
|
-
function k(e, l, u, h, M, z, H, J) {
|
|
186
|
-
var d = l.children;
|
|
187
|
-
if (d !== void 0)
|
|
188
|
-
if (h)
|
|
189
|
-
if (p(d)) {
|
|
190
|
-
for (h = 0; h < d.length; h++)
|
|
191
|
-
m(d[h]);
|
|
192
|
-
Object.freeze && Object.freeze(d);
|
|
193
|
-
} else
|
|
194
|
-
console.error(
|
|
195
|
-
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
196
|
-
);
|
|
197
|
-
else m(d);
|
|
198
|
-
if (V.call(l, "key")) {
|
|
199
|
-
d = i(e);
|
|
200
|
-
var L = Object.keys(l).filter(function(pe) {
|
|
201
|
-
return pe !== "key";
|
|
202
|
-
});
|
|
203
|
-
h = 0 < L.length ? "{key: someKey, " + L.join(": ..., ") + ": ...}" : "{key: someKey}", te[d + h] || (L = 0 < L.length ? "{" + L.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
204
|
-
`A props object containing a "key" prop is being spread into JSX:
|
|
205
|
-
let props = %s;
|
|
206
|
-
<%s {...props} />
|
|
207
|
-
React keys must be passed directly to JSX without using spread:
|
|
208
|
-
let props = %s;
|
|
209
|
-
<%s key={someKey} {...props} />`,
|
|
210
|
-
h,
|
|
211
|
-
d,
|
|
212
|
-
L,
|
|
213
|
-
d
|
|
214
|
-
), te[d + h] = !0);
|
|
215
|
-
}
|
|
216
|
-
if (d = null, u !== void 0 && (n(u), d = "" + u), c(l) && (n(l.key), d = "" + l.key), "key" in l) {
|
|
217
|
-
u = {};
|
|
218
|
-
for (var X in l)
|
|
219
|
-
X !== "key" && (u[X] = l[X]);
|
|
220
|
-
} else u = l;
|
|
221
|
-
return d && a(
|
|
222
|
-
u,
|
|
223
|
-
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
224
|
-
), R(
|
|
225
|
-
e,
|
|
226
|
-
d,
|
|
227
|
-
z,
|
|
228
|
-
M,
|
|
229
|
-
r(),
|
|
230
|
-
u,
|
|
231
|
-
H,
|
|
232
|
-
J
|
|
233
|
-
);
|
|
234
|
-
}
|
|
235
|
-
function m(e) {
|
|
236
|
-
typeof e == "object" && e !== null && e.$$typeof === O && e._store && (e._store.validated = 1);
|
|
237
|
-
}
|
|
238
|
-
var x = Ee, O = Symbol.for("react.transitional.element"), w = Symbol.for("react.portal"), T = Symbol.for("react.fragment"), S = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), A = Symbol.for("react.consumer"), P = Symbol.for("react.context"), W = Symbol.for("react.forward_ref"), I = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), v = Symbol.for("react.memo"), $ = Symbol.for("react.lazy"), Y = Symbol.for("react.activity"), C = Symbol.for("react.client.reference"), N = x.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, V = Object.prototype.hasOwnProperty, p = Array.isArray, E = console.createTask ? console.createTask : function() {
|
|
239
|
-
return null;
|
|
240
|
-
};
|
|
241
|
-
x = {
|
|
242
|
-
"react-stack-bottom-frame": function(e) {
|
|
243
|
-
return e();
|
|
244
|
-
}
|
|
245
|
-
};
|
|
246
|
-
var _, j = {}, F = x["react-stack-bottom-frame"].bind(
|
|
247
|
-
x,
|
|
248
|
-
s
|
|
249
|
-
)(), ee = E(o(s)), te = {};
|
|
250
|
-
U.Fragment = T, U.jsx = function(e, l, u, h, M) {
|
|
251
|
-
var z = 1e4 > N.recentlyCreatedOwnerStacks++;
|
|
252
|
-
return k(
|
|
253
|
-
e,
|
|
254
|
-
l,
|
|
255
|
-
u,
|
|
256
|
-
!1,
|
|
257
|
-
h,
|
|
258
|
-
M,
|
|
259
|
-
z ? Error("react-stack-top-frame") : F,
|
|
260
|
-
z ? E(o(e)) : ee
|
|
261
|
-
);
|
|
262
|
-
}, U.jsxs = function(e, l, u, h, M) {
|
|
263
|
-
var z = 1e4 > N.recentlyCreatedOwnerStacks++;
|
|
264
|
-
return k(
|
|
265
|
-
e,
|
|
266
|
-
l,
|
|
267
|
-
u,
|
|
268
|
-
!0,
|
|
269
|
-
h,
|
|
270
|
-
M,
|
|
271
|
-
z ? Error("react-stack-top-frame") : F,
|
|
272
|
-
z ? E(o(e)) : ee
|
|
273
|
-
);
|
|
274
|
-
};
|
|
275
|
-
}()), U;
|
|
276
|
-
}
|
|
277
|
-
var ne;
|
|
278
|
-
function we() {
|
|
279
|
-
return ne || (ne = 1, process.env.NODE_ENV === "production" ? G.exports = xe() : G.exports = Te()), G.exports;
|
|
280
|
-
}
|
|
281
|
-
var q = we();
|
|
282
|
-
function oe(i) {
|
|
283
|
-
if (i !== void 0)
|
|
284
|
-
switch (typeof i) {
|
|
1
|
+
import { jsx as j } from "react/jsx-runtime";
|
|
2
|
+
import { useLayoutEffect as J, useEffect as P, useMemo as M, useState as $, useCallback as R, memo as V, useImperativeHandle as U, createElement as F, useRef as Y } from "react";
|
|
3
|
+
const q = typeof window < "u" ? J : P;
|
|
4
|
+
function W(t) {
|
|
5
|
+
if (t !== void 0)
|
|
6
|
+
switch (typeof t) {
|
|
285
7
|
case "number":
|
|
286
|
-
return
|
|
8
|
+
return t;
|
|
287
9
|
case "string": {
|
|
288
|
-
if (
|
|
289
|
-
return parseFloat(
|
|
10
|
+
if (t.endsWith("px"))
|
|
11
|
+
return parseFloat(t);
|
|
290
12
|
break;
|
|
291
13
|
}
|
|
292
14
|
}
|
|
293
15
|
}
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
style: c
|
|
16
|
+
function K({
|
|
17
|
+
box: t,
|
|
18
|
+
defaultHeight: r,
|
|
19
|
+
defaultWidth: l,
|
|
20
|
+
disabled: s,
|
|
21
|
+
element: e,
|
|
22
|
+
mode: i,
|
|
23
|
+
style: n
|
|
303
24
|
}) {
|
|
304
|
-
const { styleHeight:
|
|
25
|
+
const { styleHeight: c, styleWidth: o } = M(
|
|
305
26
|
() => ({
|
|
306
|
-
styleHeight:
|
|
307
|
-
styleWidth:
|
|
27
|
+
styleHeight: W(n?.height),
|
|
28
|
+
styleWidth: W(n?.width)
|
|
308
29
|
}),
|
|
309
|
-
[
|
|
310
|
-
), [
|
|
311
|
-
height:
|
|
312
|
-
width:
|
|
313
|
-
}),
|
|
314
|
-
return
|
|
315
|
-
if (
|
|
30
|
+
[n?.height, n?.width]
|
|
31
|
+
), [f, p] = $({
|
|
32
|
+
height: r,
|
|
33
|
+
width: l
|
|
34
|
+
}), I = s || i === "only-height" && c !== void 0 || i === "only-width" && o !== void 0 || c !== void 0 && o !== void 0;
|
|
35
|
+
return q(() => {
|
|
36
|
+
if (e === null || I)
|
|
316
37
|
return;
|
|
317
|
-
const
|
|
318
|
-
for (const w of
|
|
319
|
-
const { contentRect:
|
|
320
|
-
|
|
321
|
-
height:
|
|
322
|
-
width:
|
|
38
|
+
const b = new ResizeObserver((y) => {
|
|
39
|
+
for (const w of y) {
|
|
40
|
+
const { contentRect: d, target: x } = w;
|
|
41
|
+
e === x && p((z) => z.height === d.height && z.width === d.width ? z : {
|
|
42
|
+
height: d.height,
|
|
43
|
+
width: d.width
|
|
323
44
|
});
|
|
324
45
|
}
|
|
325
46
|
});
|
|
326
|
-
return
|
|
327
|
-
|
|
47
|
+
return b.observe(e, { box: t }), () => {
|
|
48
|
+
b?.unobserve(e);
|
|
328
49
|
};
|
|
329
|
-
}, [
|
|
50
|
+
}, [t, I, e, c, o]), M(
|
|
330
51
|
() => ({
|
|
331
|
-
height:
|
|
332
|
-
width:
|
|
52
|
+
height: c ?? f.height,
|
|
53
|
+
width: o ?? f.width
|
|
333
54
|
}),
|
|
334
|
-
[
|
|
55
|
+
[f, c, o]
|
|
335
56
|
);
|
|
336
57
|
}
|
|
337
|
-
function
|
|
338
|
-
|
|
58
|
+
function E(t, r = "Assertion error") {
|
|
59
|
+
if (!t)
|
|
60
|
+
throw console.error(r), Error(r);
|
|
339
61
|
}
|
|
340
|
-
function
|
|
341
|
-
|
|
342
|
-
|
|
62
|
+
function Q({
|
|
63
|
+
cachedBounds: t,
|
|
64
|
+
itemCount: r,
|
|
65
|
+
itemSize: l
|
|
66
|
+
}) {
|
|
67
|
+
if (typeof l == "number")
|
|
68
|
+
return r * l;
|
|
69
|
+
if (t.size > 0) {
|
|
70
|
+
const s = t.get(t.size - 1);
|
|
71
|
+
E(s !== void 0, "Unexpected bounds cache miss");
|
|
72
|
+
const e = (s.scrollOffset + s.size) / t.size;
|
|
73
|
+
return r * e;
|
|
74
|
+
} else
|
|
75
|
+
return 0;
|
|
343
76
|
}
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
return
|
|
369
|
-
if (this.#e.size > 0) {
|
|
370
|
-
const t = this.#e.get(this.#e.size - 1);
|
|
371
|
-
B(t !== void 0, "Unexpected bounds cache miss");
|
|
372
|
-
const n = (t.scrollOffset + t.size) / this.#e.size;
|
|
373
|
-
return this.#s * n;
|
|
374
|
-
} else
|
|
375
|
-
return 0;
|
|
376
|
-
}
|
|
377
|
-
getIndices() {
|
|
378
|
-
return this.#i < 0 ? [0, -1] : [this.#i, this.#a];
|
|
379
|
-
}
|
|
380
|
-
getItemBounds(t) {
|
|
381
|
-
if (typeof this.#r == "number")
|
|
382
|
-
return {
|
|
383
|
-
scrollOffset: t * this.#r,
|
|
384
|
-
size: this.#r
|
|
385
|
-
};
|
|
386
|
-
for (; this.#e.size - 1 < t; ) {
|
|
387
|
-
const o = this.#e.size, r = typeof this.#r == "number" ? this.#r : this.#r(o);
|
|
388
|
-
if (o === 0)
|
|
389
|
-
this.#e.set(o, {
|
|
390
|
-
size: r,
|
|
391
|
-
scrollOffset: 0
|
|
392
|
-
});
|
|
393
|
-
else {
|
|
394
|
-
const s = this.#e.get(o - 1);
|
|
395
|
-
B(
|
|
396
|
-
s !== void 0,
|
|
397
|
-
`Unexpected bounds cache miss for index ${t}`
|
|
398
|
-
), this.#e.set(o, {
|
|
399
|
-
scrollOffset: s.scrollOffset + s.size,
|
|
400
|
-
size: r
|
|
401
|
-
});
|
|
402
|
-
}
|
|
77
|
+
function X({
|
|
78
|
+
align: t,
|
|
79
|
+
cachedBounds: r,
|
|
80
|
+
index: l,
|
|
81
|
+
itemCount: s,
|
|
82
|
+
containerScrollOffset: e,
|
|
83
|
+
containerSize: i
|
|
84
|
+
}) {
|
|
85
|
+
const n = r.get(s - 1).scrollOffset, c = n + n - i, o = Math.max(
|
|
86
|
+
0,
|
|
87
|
+
r.get(l + 1).scrollOffset - i
|
|
88
|
+
), f = Math.min(
|
|
89
|
+
n,
|
|
90
|
+
r.get(l).scrollOffset
|
|
91
|
+
);
|
|
92
|
+
switch (t === "smart" && (e >= o && e <= f ? t = "auto" : t = "center"), t) {
|
|
93
|
+
case "start":
|
|
94
|
+
return Math.min(c, f);
|
|
95
|
+
case "end":
|
|
96
|
+
return o;
|
|
97
|
+
case "center": {
|
|
98
|
+
const p = Math.round(
|
|
99
|
+
o + (f - o) / 2
|
|
100
|
+
);
|
|
101
|
+
return p < Math.ceil(i / 2) ? 0 : p > c ? c : p;
|
|
403
102
|
}
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
`Unexpected bounds cache miss for index ${t}`
|
|
408
|
-
), n;
|
|
409
|
-
}
|
|
410
|
-
resize(t) {
|
|
411
|
-
this.#n = t, this.#f();
|
|
103
|
+
case "auto":
|
|
104
|
+
default:
|
|
105
|
+
return e >= o && e <= f ? e : e < o ? o : f;
|
|
412
106
|
}
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
top: r
|
|
429
|
-
});
|
|
107
|
+
}
|
|
108
|
+
function Z({
|
|
109
|
+
cachedBounds: t,
|
|
110
|
+
containerScrollOffset: r,
|
|
111
|
+
containerSize: l,
|
|
112
|
+
itemCount: s,
|
|
113
|
+
overscanCount: e
|
|
114
|
+
}) {
|
|
115
|
+
const i = s - 1;
|
|
116
|
+
let n = 0, c = -1, o = 0;
|
|
117
|
+
for (; o < i; ) {
|
|
118
|
+
const f = t.get(o);
|
|
119
|
+
if (f.scrollOffset + f.size > r)
|
|
120
|
+
break;
|
|
121
|
+
o++;
|
|
430
122
|
}
|
|
431
|
-
|
|
432
|
-
|
|
123
|
+
for (n = o, n = Math.max(0, n - e); o < i; ) {
|
|
124
|
+
const f = t.get(o);
|
|
125
|
+
if (f.scrollOffset + f.size >= r + l)
|
|
126
|
+
break;
|
|
127
|
+
o++;
|
|
433
128
|
}
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
s
|
|
457
|
-
|
|
458
|
-
|
|
129
|
+
return c = Math.min(i, o), c = Math.min(s - 1, c + e), n < 0 ? [0, -1] : [n, c];
|
|
130
|
+
}
|
|
131
|
+
function _({
|
|
132
|
+
itemCount: t,
|
|
133
|
+
itemProps: r,
|
|
134
|
+
itemSize: l
|
|
135
|
+
}) {
|
|
136
|
+
const s = /* @__PURE__ */ new Map();
|
|
137
|
+
return {
|
|
138
|
+
get(e) {
|
|
139
|
+
for (E(e < t, `Invalid index ${e}`); s.size - 1 < e; ) {
|
|
140
|
+
const n = s.size, c = typeof l == "number" ? l : l(n, r);
|
|
141
|
+
if (n === 0)
|
|
142
|
+
s.set(n, {
|
|
143
|
+
size: c,
|
|
144
|
+
scrollOffset: 0
|
|
145
|
+
});
|
|
146
|
+
else {
|
|
147
|
+
const o = s.get(n - 1);
|
|
148
|
+
E(
|
|
149
|
+
o !== void 0,
|
|
150
|
+
`Unexpected bounds cache miss for index ${e}`
|
|
151
|
+
), s.set(n, {
|
|
152
|
+
scrollOffset: o.scrollOffset + o.size,
|
|
153
|
+
size: c
|
|
154
|
+
});
|
|
155
|
+
}
|
|
459
156
|
}
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
for (; r < t; ) {
|
|
472
|
-
const s = this.getItemBounds(r);
|
|
473
|
-
if (s.scrollOffset + s.size > this.#t)
|
|
474
|
-
break;
|
|
475
|
-
r++;
|
|
157
|
+
const i = s.get(e);
|
|
158
|
+
return E(
|
|
159
|
+
i !== void 0,
|
|
160
|
+
`Unexpected bounds cache miss for index ${e}`
|
|
161
|
+
), i;
|
|
162
|
+
},
|
|
163
|
+
set(e, i) {
|
|
164
|
+
s.set(e, i);
|
|
165
|
+
},
|
|
166
|
+
get size() {
|
|
167
|
+
return s.size;
|
|
476
168
|
}
|
|
477
|
-
|
|
478
|
-
const s = this.getItemBounds(r);
|
|
479
|
-
if (s.scrollOffset + s.size >= this.#t + this.#n)
|
|
480
|
-
break;
|
|
481
|
-
r++;
|
|
482
|
-
}
|
|
483
|
-
o = Math.min(t, r), o = Math.min(this.#s - 1, o + this.#u), (this.#i !== n || this.#a !== o) && (this.#i = n, this.#a = o, this.#m());
|
|
484
|
-
}
|
|
169
|
+
};
|
|
485
170
|
}
|
|
486
|
-
function
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
element: o,
|
|
491
|
-
itemSize: r,
|
|
492
|
-
overscanCount: s,
|
|
493
|
-
size: c
|
|
171
|
+
function N({
|
|
172
|
+
itemCount: t,
|
|
173
|
+
itemProps: r,
|
|
174
|
+
itemSize: l
|
|
494
175
|
}) {
|
|
495
|
-
|
|
496
|
-
() =>
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
overscanCount: s
|
|
503
|
-
}) : null,
|
|
504
|
-
[i, t, n, o, r, s]
|
|
176
|
+
return M(
|
|
177
|
+
() => _({
|
|
178
|
+
itemCount: t,
|
|
179
|
+
itemProps: r,
|
|
180
|
+
itemSize: l
|
|
181
|
+
}),
|
|
182
|
+
[t, r, l]
|
|
505
183
|
);
|
|
506
|
-
return ce(() => {
|
|
507
|
-
c !== void 0 && a?.resize(c);
|
|
508
|
-
}, [c, a]), ge(
|
|
509
|
-
a?.subscribe ?? be,
|
|
510
|
-
a?.version ?? ie,
|
|
511
|
-
a?.version ?? ie
|
|
512
|
-
), a;
|
|
513
184
|
}
|
|
514
|
-
function
|
|
515
|
-
|
|
185
|
+
function G({
|
|
186
|
+
containerElement: t,
|
|
187
|
+
containerStyle: r,
|
|
188
|
+
defaultContainerSize: l = 0,
|
|
189
|
+
direction: s,
|
|
190
|
+
itemCount: e,
|
|
191
|
+
itemProps: i,
|
|
192
|
+
itemSize: n,
|
|
193
|
+
overscanCount: c
|
|
194
|
+
}) {
|
|
195
|
+
const [o, f] = $([0, -1]), [p, I] = [
|
|
196
|
+
Math.min(e - 1, o[0]),
|
|
197
|
+
Math.min(e - 1, o[1])
|
|
198
|
+
], { height: b = l, width: y = l } = K({
|
|
199
|
+
defaultHeight: s === "vertical" ? l : void 0,
|
|
200
|
+
defaultWidth: s === "horizontal" ? l : void 0,
|
|
201
|
+
element: t,
|
|
202
|
+
mode: s === "vertical" ? "only-height" : "only-width",
|
|
203
|
+
style: r
|
|
204
|
+
}), w = s === "vertical" ? b : y, d = N({
|
|
205
|
+
itemCount: e,
|
|
206
|
+
itemProps: i,
|
|
207
|
+
itemSize: n
|
|
208
|
+
}), x = R(
|
|
209
|
+
(u) => d.get(u),
|
|
210
|
+
[d]
|
|
211
|
+
), z = R(
|
|
212
|
+
() => Q({
|
|
213
|
+
cachedBounds: d,
|
|
214
|
+
itemCount: e,
|
|
215
|
+
itemSize: n
|
|
216
|
+
}),
|
|
217
|
+
[d, e, n]
|
|
218
|
+
), h = R(
|
|
219
|
+
(u) => Z({
|
|
220
|
+
cachedBounds: d,
|
|
221
|
+
containerScrollOffset: u,
|
|
222
|
+
containerSize: w,
|
|
223
|
+
itemCount: e,
|
|
224
|
+
overscanCount: c
|
|
225
|
+
}),
|
|
226
|
+
[d, w, e, c]
|
|
227
|
+
);
|
|
228
|
+
q(() => {
|
|
229
|
+
const u = (s === "vertical" ? t?.scrollTop : t?.scrollLeft) ?? 0;
|
|
230
|
+
f(h(u));
|
|
231
|
+
}, [t, s, h]);
|
|
232
|
+
const a = R(
|
|
233
|
+
({
|
|
234
|
+
align: u = "auto",
|
|
235
|
+
behavior: O = "auto",
|
|
236
|
+
containerScrollOffset: m,
|
|
237
|
+
index: g
|
|
238
|
+
}) => {
|
|
239
|
+
const S = X({
|
|
240
|
+
align: u,
|
|
241
|
+
cachedBounds: d,
|
|
242
|
+
containerScrollOffset: m,
|
|
243
|
+
containerSize: w,
|
|
244
|
+
index: g,
|
|
245
|
+
itemCount: e
|
|
246
|
+
});
|
|
247
|
+
s === "horizontal" ? t?.scrollTo({
|
|
248
|
+
left: S,
|
|
249
|
+
behavior: O || void 0
|
|
250
|
+
}) : t?.scrollTo({
|
|
251
|
+
behavior: O || void 0,
|
|
252
|
+
top: S
|
|
253
|
+
});
|
|
254
|
+
},
|
|
255
|
+
[d, t, w, s, e]
|
|
256
|
+
);
|
|
257
|
+
return {
|
|
258
|
+
getCellBounds: x,
|
|
259
|
+
getEstimatedHeight: z,
|
|
260
|
+
onScroll: () => {
|
|
261
|
+
const u = h(
|
|
262
|
+
(s === "vertical" ? t?.scrollTop : t?.scrollLeft) ?? 0
|
|
263
|
+
);
|
|
264
|
+
(u[0] !== p || u[1] !== I) && f(u);
|
|
265
|
+
},
|
|
266
|
+
scrollToIndex: a,
|
|
267
|
+
startIndex: p,
|
|
268
|
+
stopIndex: I
|
|
269
|
+
};
|
|
516
270
|
}
|
|
517
|
-
function
|
|
518
|
-
return
|
|
271
|
+
function A(t) {
|
|
272
|
+
return M(() => t, Object.values(t));
|
|
519
273
|
}
|
|
520
|
-
function
|
|
521
|
-
if (
|
|
274
|
+
function B(t, r) {
|
|
275
|
+
if (t === r)
|
|
522
276
|
return !0;
|
|
523
|
-
if (!!
|
|
277
|
+
if (!!t != !!r || (E(t !== void 0), E(r !== void 0), Object.keys(t).length !== Object.keys(r).length))
|
|
524
278
|
return !1;
|
|
525
|
-
for (const
|
|
526
|
-
if (!Object.is(
|
|
279
|
+
for (const l in t)
|
|
280
|
+
if (!Object.is(r[l], t[l]))
|
|
527
281
|
return !1;
|
|
528
282
|
return !0;
|
|
529
283
|
}
|
|
530
|
-
function
|
|
531
|
-
const { style:
|
|
532
|
-
return
|
|
284
|
+
function D(t, r) {
|
|
285
|
+
const { style: l, ...s } = t, { style: e, ...i } = r;
|
|
286
|
+
return B(l, e) && B(s, i);
|
|
533
287
|
}
|
|
534
|
-
function
|
|
535
|
-
cellComponent:
|
|
536
|
-
cellProps:
|
|
537
|
-
className:
|
|
538
|
-
columnCount:
|
|
539
|
-
columnWidth:
|
|
540
|
-
defaultHeight:
|
|
541
|
-
defaultWidth:
|
|
542
|
-
gridRef:
|
|
543
|
-
onCellsRendered:
|
|
544
|
-
overscanCount:
|
|
545
|
-
rowCount:
|
|
546
|
-
rowHeight:
|
|
547
|
-
style:
|
|
548
|
-
...
|
|
288
|
+
function et({
|
|
289
|
+
cellComponent: t,
|
|
290
|
+
cellProps: r,
|
|
291
|
+
className: l,
|
|
292
|
+
columnCount: s,
|
|
293
|
+
columnWidth: e,
|
|
294
|
+
defaultHeight: i = 0,
|
|
295
|
+
defaultWidth: n = 0,
|
|
296
|
+
gridRef: c,
|
|
297
|
+
onCellsRendered: o,
|
|
298
|
+
overscanCount: f = 3,
|
|
299
|
+
rowCount: p,
|
|
300
|
+
rowHeight: I,
|
|
301
|
+
style: b,
|
|
302
|
+
...y
|
|
549
303
|
}) {
|
|
550
|
-
const w =
|
|
551
|
-
() =>
|
|
552
|
-
[
|
|
553
|
-
), [
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
element: S,
|
|
557
|
-
style: x
|
|
558
|
-
}), W = y(() => typeof r == "number" ? r : (p) => r(p, w), [r, w]), I = y(() => typeof m == "number" ? m : (p) => m(p, w), [m, w]), f = Z({
|
|
559
|
-
count: o,
|
|
560
|
-
defaultSize: c,
|
|
304
|
+
const w = A(r), d = M(
|
|
305
|
+
() => V(t, D),
|
|
306
|
+
[t]
|
|
307
|
+
), [x, z] = $(null), h = G({
|
|
308
|
+
containerElement: x,
|
|
309
|
+
defaultContainerSize: n,
|
|
561
310
|
direction: "horizontal",
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
}),
|
|
567
|
-
|
|
568
|
-
|
|
311
|
+
itemCount: s,
|
|
312
|
+
itemProps: w,
|
|
313
|
+
itemSize: e,
|
|
314
|
+
overscanCount: f
|
|
315
|
+
}), a = G({
|
|
316
|
+
containerElement: x,
|
|
317
|
+
defaultContainerSize: i,
|
|
569
318
|
direction: "vertical",
|
|
570
|
-
|
|
319
|
+
itemCount: p,
|
|
320
|
+
itemProps: w,
|
|
571
321
|
itemSize: I,
|
|
572
|
-
overscanCount:
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
a,
|
|
322
|
+
overscanCount: f
|
|
323
|
+
}), { startIndex: u, stopIndex: O } = h, { startIndex: m, stopIndex: g } = a;
|
|
324
|
+
U(
|
|
325
|
+
c,
|
|
577
326
|
() => ({
|
|
578
327
|
get element() {
|
|
579
|
-
return
|
|
328
|
+
return x;
|
|
580
329
|
},
|
|
581
330
|
scrollToCell({
|
|
582
|
-
behavior:
|
|
583
|
-
columnAlign:
|
|
584
|
-
columnIndex:
|
|
585
|
-
rowAlign:
|
|
586
|
-
rowIndex:
|
|
331
|
+
behavior: T = "auto",
|
|
332
|
+
columnAlign: v = "auto",
|
|
333
|
+
columnIndex: H,
|
|
334
|
+
rowAlign: k = "auto",
|
|
335
|
+
rowIndex: L
|
|
587
336
|
}) {
|
|
588
|
-
|
|
589
|
-
align:
|
|
590
|
-
behavior:
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
align:
|
|
595
|
-
|
|
337
|
+
a?.scrollToIndex({
|
|
338
|
+
align: k,
|
|
339
|
+
behavior: T,
|
|
340
|
+
containerScrollOffset: x?.scrollTop ?? 0,
|
|
341
|
+
index: L
|
|
342
|
+
}), h?.scrollToIndex({
|
|
343
|
+
align: v,
|
|
344
|
+
behavior: T,
|
|
345
|
+
containerScrollOffset: x?.scrollLeft ?? 0,
|
|
346
|
+
index: H
|
|
596
347
|
});
|
|
597
348
|
},
|
|
598
349
|
scrollToColumn({
|
|
599
|
-
align:
|
|
600
|
-
behavior:
|
|
601
|
-
index:
|
|
350
|
+
align: T = "auto",
|
|
351
|
+
behavior: v = "auto",
|
|
352
|
+
index: H
|
|
602
353
|
}) {
|
|
603
|
-
|
|
604
|
-
align:
|
|
605
|
-
behavior:
|
|
606
|
-
|
|
354
|
+
h?.scrollToIndex({
|
|
355
|
+
align: T,
|
|
356
|
+
behavior: v,
|
|
357
|
+
containerScrollOffset: x?.scrollLeft ?? 0,
|
|
358
|
+
index: H
|
|
607
359
|
});
|
|
608
360
|
},
|
|
609
361
|
scrollToRow({
|
|
610
|
-
align:
|
|
611
|
-
behavior:
|
|
612
|
-
index:
|
|
362
|
+
align: T = "auto",
|
|
363
|
+
behavior: v = "auto",
|
|
364
|
+
index: H
|
|
613
365
|
}) {
|
|
614
|
-
|
|
366
|
+
a?.scrollToIndex({
|
|
367
|
+
align: T,
|
|
368
|
+
behavior: v,
|
|
369
|
+
containerScrollOffset: x?.scrollTop ?? 0,
|
|
370
|
+
index: H
|
|
371
|
+
});
|
|
615
372
|
}
|
|
616
373
|
}),
|
|
617
|
-
[
|
|
618
|
-
),
|
|
619
|
-
|
|
620
|
-
columnStartIndex:
|
|
621
|
-
columnStopIndex:
|
|
622
|
-
rowStartIndex:
|
|
623
|
-
rowStopIndex:
|
|
374
|
+
[h, x, a]
|
|
375
|
+
), P(() => {
|
|
376
|
+
u >= 0 && O >= 0 && m >= 0 && g >= 0 && o && o({
|
|
377
|
+
columnStartIndex: u,
|
|
378
|
+
columnStopIndex: O,
|
|
379
|
+
rowStartIndex: m,
|
|
380
|
+
rowStopIndex: g
|
|
624
381
|
});
|
|
625
382
|
}, [
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
383
|
+
o,
|
|
384
|
+
u,
|
|
385
|
+
O,
|
|
386
|
+
m,
|
|
387
|
+
g
|
|
631
388
|
]);
|
|
632
|
-
const
|
|
633
|
-
const
|
|
634
|
-
if (
|
|
635
|
-
for (let
|
|
636
|
-
const
|
|
637
|
-
for (let
|
|
638
|
-
const
|
|
639
|
-
|
|
640
|
-
/* @__PURE__ */
|
|
641
|
-
|
|
389
|
+
const S = M(() => {
|
|
390
|
+
const T = [];
|
|
391
|
+
if (h && s > 0 && a && p > 0)
|
|
392
|
+
for (let v = m; v <= g; v++) {
|
|
393
|
+
const H = a.getCellBounds(v);
|
|
394
|
+
for (let k = u; k <= O; k++) {
|
|
395
|
+
const L = h.getCellBounds(k);
|
|
396
|
+
T.push(
|
|
397
|
+
/* @__PURE__ */ F(
|
|
398
|
+
d,
|
|
642
399
|
{
|
|
643
400
|
...w,
|
|
644
|
-
columnIndex:
|
|
645
|
-
key: `${
|
|
646
|
-
rowIndex:
|
|
401
|
+
columnIndex: k,
|
|
402
|
+
key: `${v}-${k}`,
|
|
403
|
+
rowIndex: v,
|
|
647
404
|
style: {
|
|
648
405
|
position: "absolute",
|
|
649
406
|
left: 0,
|
|
650
|
-
transform: `translate(${
|
|
651
|
-
height:
|
|
652
|
-
width:
|
|
407
|
+
transform: `translate(${L.scrollOffset}px, ${H.scrollOffset}px)`,
|
|
408
|
+
height: H.size,
|
|
409
|
+
width: L.size
|
|
653
410
|
}
|
|
654
411
|
}
|
|
655
412
|
)
|
|
656
413
|
);
|
|
657
414
|
}
|
|
658
415
|
}
|
|
659
|
-
return
|
|
416
|
+
return T;
|
|
660
417
|
}, [
|
|
661
|
-
|
|
418
|
+
d,
|
|
662
419
|
w,
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
420
|
+
s,
|
|
421
|
+
u,
|
|
422
|
+
O,
|
|
423
|
+
h,
|
|
424
|
+
p,
|
|
425
|
+
m,
|
|
426
|
+
g,
|
|
427
|
+
a
|
|
671
428
|
]);
|
|
672
|
-
return /* @__PURE__ */
|
|
429
|
+
return /* @__PURE__ */ j(
|
|
673
430
|
"div",
|
|
674
431
|
{
|
|
675
432
|
role: "grid",
|
|
676
|
-
...
|
|
677
|
-
className:
|
|
678
|
-
|
|
433
|
+
...y,
|
|
434
|
+
className: l,
|
|
435
|
+
onScroll: () => {
|
|
436
|
+
h.onScroll(), a.onScroll();
|
|
437
|
+
},
|
|
438
|
+
ref: z,
|
|
679
439
|
style: {
|
|
680
|
-
...
|
|
440
|
+
...b,
|
|
681
441
|
maxHeight: "100%",
|
|
682
442
|
maxWidth: "100%",
|
|
683
443
|
flexGrow: 1,
|
|
684
444
|
overflow: "auto"
|
|
685
445
|
},
|
|
686
|
-
children: /* @__PURE__ */
|
|
446
|
+
children: /* @__PURE__ */ j(
|
|
687
447
|
"div",
|
|
688
448
|
{
|
|
689
|
-
className:
|
|
449
|
+
className: l,
|
|
690
450
|
style: {
|
|
691
451
|
position: "relative",
|
|
692
|
-
height:
|
|
693
|
-
width:
|
|
452
|
+
height: a?.getEstimatedHeight(),
|
|
453
|
+
width: h?.getEstimatedHeight()
|
|
694
454
|
},
|
|
695
|
-
children:
|
|
455
|
+
children: S
|
|
696
456
|
}
|
|
697
457
|
)
|
|
698
458
|
}
|
|
699
459
|
);
|
|
700
460
|
}
|
|
701
|
-
const
|
|
702
|
-
function
|
|
703
|
-
className:
|
|
704
|
-
defaultHeight:
|
|
705
|
-
listRef:
|
|
706
|
-
onRowsRendered:
|
|
707
|
-
overscanCount:
|
|
708
|
-
rowComponent:
|
|
709
|
-
rowCount:
|
|
710
|
-
rowHeight:
|
|
711
|
-
rowProps:
|
|
712
|
-
style:
|
|
713
|
-
...
|
|
461
|
+
const st = $, ot = Y;
|
|
462
|
+
function rt({
|
|
463
|
+
className: t,
|
|
464
|
+
defaultHeight: r = 0,
|
|
465
|
+
listRef: l,
|
|
466
|
+
onRowsRendered: s,
|
|
467
|
+
overscanCount: e = 3,
|
|
468
|
+
rowComponent: i,
|
|
469
|
+
rowCount: n,
|
|
470
|
+
rowHeight: c,
|
|
471
|
+
rowProps: o,
|
|
472
|
+
style: f,
|
|
473
|
+
...p
|
|
714
474
|
}) {
|
|
715
|
-
const
|
|
716
|
-
() =>
|
|
717
|
-
[
|
|
718
|
-
), [
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
475
|
+
const I = A(o), b = M(
|
|
476
|
+
() => V(i, D),
|
|
477
|
+
[i]
|
|
478
|
+
), [y, w] = $(null), {
|
|
479
|
+
getCellBounds: d,
|
|
480
|
+
getEstimatedHeight: x,
|
|
481
|
+
onScroll: z,
|
|
482
|
+
scrollToIndex: h,
|
|
483
|
+
startIndex: a,
|
|
484
|
+
stopIndex: u
|
|
485
|
+
} = G({
|
|
486
|
+
containerElement: y,
|
|
487
|
+
defaultContainerSize: r,
|
|
726
488
|
direction: "vertical",
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
})
|
|
732
|
-
|
|
733
|
-
|
|
489
|
+
itemCount: n,
|
|
490
|
+
itemProps: I,
|
|
491
|
+
itemSize: c,
|
|
492
|
+
overscanCount: e
|
|
493
|
+
});
|
|
494
|
+
U(
|
|
495
|
+
l,
|
|
734
496
|
() => ({
|
|
735
497
|
get element() {
|
|
736
|
-
return
|
|
498
|
+
return y;
|
|
737
499
|
},
|
|
738
500
|
scrollToRow({
|
|
739
|
-
align:
|
|
740
|
-
behavior:
|
|
741
|
-
index:
|
|
501
|
+
align: m = "auto",
|
|
502
|
+
behavior: g = "auto",
|
|
503
|
+
index: S
|
|
742
504
|
}) {
|
|
743
|
-
|
|
505
|
+
h({
|
|
506
|
+
align: m,
|
|
507
|
+
behavior: g,
|
|
508
|
+
containerScrollOffset: y?.scrollTop ?? 0,
|
|
509
|
+
index: S
|
|
510
|
+
});
|
|
744
511
|
}
|
|
745
512
|
}),
|
|
746
|
-
[
|
|
747
|
-
),
|
|
748
|
-
|
|
749
|
-
startIndex:
|
|
750
|
-
stopIndex:
|
|
513
|
+
[y, h]
|
|
514
|
+
), P(() => {
|
|
515
|
+
a >= 0 && u >= 0 && s && s({
|
|
516
|
+
startIndex: a,
|
|
517
|
+
stopIndex: u
|
|
751
518
|
});
|
|
752
|
-
}, [
|
|
753
|
-
const
|
|
754
|
-
const
|
|
755
|
-
if (
|
|
756
|
-
for (let
|
|
757
|
-
const
|
|
758
|
-
|
|
759
|
-
/* @__PURE__ */
|
|
760
|
-
|
|
519
|
+
}, [s, a, u]);
|
|
520
|
+
const O = M(() => {
|
|
521
|
+
const m = [];
|
|
522
|
+
if (n > 0)
|
|
523
|
+
for (let g = a; g <= u; g++) {
|
|
524
|
+
const S = d(g);
|
|
525
|
+
m.push(
|
|
526
|
+
/* @__PURE__ */ F(
|
|
527
|
+
b,
|
|
761
528
|
{
|
|
762
|
-
...
|
|
763
|
-
key:
|
|
764
|
-
index:
|
|
529
|
+
...I,
|
|
530
|
+
key: g,
|
|
531
|
+
index: g,
|
|
765
532
|
style: {
|
|
766
533
|
position: "absolute",
|
|
767
534
|
left: 0,
|
|
768
|
-
transform: `translateY(${
|
|
769
|
-
height:
|
|
535
|
+
transform: `translateY(${S.scrollOffset}px)`,
|
|
536
|
+
height: S.size,
|
|
770
537
|
width: "100%"
|
|
771
538
|
}
|
|
772
539
|
}
|
|
773
540
|
)
|
|
774
541
|
);
|
|
775
542
|
}
|
|
776
|
-
return
|
|
777
|
-
}, [
|
|
778
|
-
return /* @__PURE__ */
|
|
543
|
+
return m;
|
|
544
|
+
}, [b, d, n, I, a, u]);
|
|
545
|
+
return /* @__PURE__ */ j(
|
|
779
546
|
"div",
|
|
780
547
|
{
|
|
781
548
|
role: "list",
|
|
782
|
-
...
|
|
783
|
-
className:
|
|
549
|
+
...p,
|
|
550
|
+
className: t,
|
|
551
|
+
onScroll: z,
|
|
784
552
|
ref: w,
|
|
785
553
|
style: {
|
|
786
|
-
...
|
|
554
|
+
...f,
|
|
787
555
|
maxHeight: "100%",
|
|
788
556
|
flexGrow: 1,
|
|
789
557
|
overflowY: "auto"
|
|
790
558
|
},
|
|
791
|
-
children: /* @__PURE__ */
|
|
559
|
+
children: /* @__PURE__ */ j(
|
|
792
560
|
"div",
|
|
793
561
|
{
|
|
794
|
-
className:
|
|
562
|
+
className: t,
|
|
795
563
|
style: {
|
|
796
|
-
height:
|
|
564
|
+
height: x(),
|
|
797
565
|
position: "relative",
|
|
798
566
|
width: "100%"
|
|
799
567
|
},
|
|
800
|
-
children:
|
|
568
|
+
children: O
|
|
801
569
|
}
|
|
802
570
|
)
|
|
803
571
|
}
|
|
804
572
|
);
|
|
805
573
|
}
|
|
806
|
-
const
|
|
574
|
+
const lt = $, nt = Y;
|
|
807
575
|
export {
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
576
|
+
et as Grid,
|
|
577
|
+
rt as List,
|
|
578
|
+
st as useGridCallbackRef,
|
|
579
|
+
ot as useGridRef,
|
|
580
|
+
lt as useListCallbackRef,
|
|
581
|
+
nt as useListRef
|
|
812
582
|
};
|