@gen-epix/ui-client-common 4.3.0 → 4.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/Breadcrumbs.js +22 -22
- package/dist/_chunks/Table.js +559 -3173
- package/dist/_chunks/Table.js.map +1 -1
- package/dist/_chunks/{oidc-client-ts.js → UserManagerUtil.js} +222 -198
- package/dist/_chunks/UserManagerUtil.js.map +1 -0
- package/dist/_chunks/middleware.js +1 -1
- package/dist/_chunks/middleware.js.map +1 -1
- package/dist/_chunks/omit.js +1 -1
- package/dist/_chunks/omit.js.map +1 -1
- package/dist/_chunks/react.js +1 -1
- package/dist/_chunks/react.js.map +1 -1
- package/dist/_chunks/useColumnsMenu.js +2 -2
- package/dist/_chunks/useColumnsMenu.js.map +1 -1
- package/dist/_chunks/useQueryMemo.js +1 -1
- package/dist/_chunks/useQueryMemo.js.map +1 -1
- package/dist/_chunks/vanilla.js +1 -1
- package/dist/_chunks/vanilla.js.map +1 -1
- package/dist/_chunks/yup.js +2 -2
- package/dist/_chunks/yup.js.map +1 -1
- package/dist/classes/services/LogService/index.js +1 -1
- package/dist/classes/services/LogService/index.js.map +1 -1
- package/dist/classes/services/RouterService/index.js +4 -4
- package/dist/components/app/App/index.js +35 -100
- package/dist/components/app/App/index.js.map +1 -1
- package/dist/components/app/AuthenticationWrapper/index.js +38 -38
- package/dist/components/app/AuthorizationWrapper/index.js +20 -20
- package/dist/components/app/RouterRoot/index.js +58 -59
- package/dist/components/app/RouterRoot/index.js.map +1 -1
- package/dist/components/ui/ApplicationBar/index.js +146 -146
- package/dist/components/ui/ApplicationBar/index.js.map +1 -1
- package/dist/components/ui/GenericErrorMessage/index.js +34 -34
- package/dist/components/ui/GenericErrorMessage/index.js.map +1 -1
- package/dist/components/ui/NavLink/index.js +8 -8
- package/dist/components/ui/PageContainer/index.js +1 -1
- package/dist/components/ui/PageContainer/index.js.map +1 -1
- package/dist/pages/AcceptInvitationPage/index.js +28 -28
- package/dist/pages/AdminPage/index.js +23 -23
- package/dist/pages/OrganizationContactsAdminPage/index.js +29 -29
- package/dist/pages/OrganizationSitesAdminPage/index.js +25 -25
- package/dist/pages/PostLoginPage/index.js +11 -11
- package/dist/pages/RouterErrorPage/index.js +10 -10
- package/dist/utils/UserManagerUtil/index.js +2 -31
- package/package.json +13 -8
- package/dist/_chunks/chunk-OB3PAWPO.js +0 -3742
- package/dist/_chunks/chunk-OB3PAWPO.js.map +0 -1
- package/dist/_chunks/oidc-client-ts.js.map +0 -1
- package/dist/_chunks/react-oidc-context.js +0 -201
- package/dist/_chunks/react-oidc-context.js.map +0 -1
- package/dist/utils/UserManagerUtil/index.js.map +0 -1
package/dist/_chunks/Table.js
CHANGED
|
@@ -15,2657 +15,43 @@ import { BooleanFilterField as C } from "../components/filters/BooleanFilterFiel
|
|
|
15
15
|
import { DateFilterField as w } from "../components/filters/DateFilterField/index.js";
|
|
16
16
|
import { GeoFilterField as T } from "../components/filters/GeoFilterField/index.js";
|
|
17
17
|
import { MultiSelectFilterField as E } from "../components/filters/MultiSelectFilterField/index.js";
|
|
18
|
-
import { NumberRangeFilterField as
|
|
19
|
-
import { TextFilterField as
|
|
20
|
-
import { SidebarItem as
|
|
21
|
-
import { WindowService as
|
|
22
|
-
import { t as
|
|
23
|
-
import { Box as
|
|
24
|
-
import * as
|
|
25
|
-
import
|
|
26
|
-
import { Fragment as
|
|
27
|
-
import { useTranslation as
|
|
28
|
-
import { TestIdUtil as
|
|
29
|
-
import
|
|
30
|
-
import { useScrollbarSize as
|
|
31
|
-
import { visuallyHidden as
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import { FormProvider as
|
|
35
|
-
import
|
|
36
|
-
import { withDialog as
|
|
37
|
-
import { DndContext as
|
|
38
|
-
import { SortableContext as
|
|
39
|
-
import { CSS as
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import { NestedDropdown as
|
|
46
|
-
//#region ../../node_modules/.pnpm/react-virtuoso@4.18.13_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/react-virtuoso/dist/index.mjs
|
|
47
|
-
var dt = /* @__PURE__ */ e(c(), 1), ft = /* @__PURE__ */ e(n(), 1), pt = /* @__PURE__ */ e(_(), 1), mt = /* @__PURE__ */ e(v(), 1), ht = 0, gt = 1, _t = 2, vt = 4;
|
|
48
|
-
function yt(e) {
|
|
49
|
-
return () => e;
|
|
50
|
-
}
|
|
51
|
-
function bt(e) {
|
|
52
|
-
e();
|
|
53
|
-
}
|
|
54
|
-
function xt(e, t) {
|
|
55
|
-
return (n) => e(t(n));
|
|
56
|
-
}
|
|
57
|
-
function St(e, t) {
|
|
58
|
-
return () => e(t);
|
|
59
|
-
}
|
|
60
|
-
function Ct(e, t) {
|
|
61
|
-
return (n) => e(t, n);
|
|
62
|
-
}
|
|
63
|
-
function wt(e) {
|
|
64
|
-
return e !== void 0;
|
|
65
|
-
}
|
|
66
|
-
function Tt(...e) {
|
|
67
|
-
return () => {
|
|
68
|
-
e.map(bt);
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
function Et() {}
|
|
72
|
-
function Dt(e, t) {
|
|
73
|
-
return t(e), e;
|
|
74
|
-
}
|
|
75
|
-
function Ot(e, t) {
|
|
76
|
-
return t(e);
|
|
77
|
-
}
|
|
78
|
-
function F(...e) {
|
|
79
|
-
return e;
|
|
80
|
-
}
|
|
81
|
-
function I(e, t) {
|
|
82
|
-
return e(gt, t);
|
|
83
|
-
}
|
|
84
|
-
function L(e, t) {
|
|
85
|
-
e(ht, t);
|
|
86
|
-
}
|
|
87
|
-
function kt(e) {
|
|
88
|
-
e(_t);
|
|
89
|
-
}
|
|
90
|
-
function R(e) {
|
|
91
|
-
return e(vt);
|
|
92
|
-
}
|
|
93
|
-
function z(e, t) {
|
|
94
|
-
return I(e, Ct(t, ht));
|
|
95
|
-
}
|
|
96
|
-
function At(e, t) {
|
|
97
|
-
let n = e(gt, (e) => {
|
|
98
|
-
n(), t(e);
|
|
99
|
-
});
|
|
100
|
-
return n;
|
|
101
|
-
}
|
|
102
|
-
function jt(e) {
|
|
103
|
-
let t, n;
|
|
104
|
-
return (r) => (i) => {
|
|
105
|
-
t = i, n && clearTimeout(n), n = setTimeout(() => {
|
|
106
|
-
r(t);
|
|
107
|
-
}, e);
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
function Mt(e, t) {
|
|
111
|
-
return e === t;
|
|
112
|
-
}
|
|
113
|
-
function B(e = Mt) {
|
|
114
|
-
let t;
|
|
115
|
-
return (n) => (r) => {
|
|
116
|
-
e(t, r) || (t = r, n(r));
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
function V(e) {
|
|
120
|
-
return (t) => (n) => {
|
|
121
|
-
e(n) && t(n);
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
function H(e) {
|
|
125
|
-
return (t) => xt(t, e);
|
|
126
|
-
}
|
|
127
|
-
function Nt(e) {
|
|
128
|
-
return (t) => () => {
|
|
129
|
-
t(e);
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
function U(e, ...t) {
|
|
133
|
-
let n = Lt(...t);
|
|
134
|
-
return ((t, r) => {
|
|
135
|
-
switch (t) {
|
|
136
|
-
case _t:
|
|
137
|
-
kt(e);
|
|
138
|
-
return;
|
|
139
|
-
case gt: return I(e, n(r));
|
|
140
|
-
}
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
function Pt(e, t) {
|
|
144
|
-
return (n) => (r) => {
|
|
145
|
-
n(t = e(t, r));
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
function Ft(e) {
|
|
149
|
-
return (t) => (n) => {
|
|
150
|
-
e > 0 ? e-- : t(n);
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
function It(e) {
|
|
154
|
-
let t = null, n;
|
|
155
|
-
return (r) => (i) => {
|
|
156
|
-
t = i, !n && (n = setTimeout(() => {
|
|
157
|
-
n = void 0, r(t);
|
|
158
|
-
}, e));
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
function W(...e) {
|
|
162
|
-
let t = Array.from({ length: e.length }), n = 0, r = null, i = 2 ** e.length - 1;
|
|
163
|
-
return e.forEach((e, a) => {
|
|
164
|
-
let o = 2 ** a;
|
|
165
|
-
I(e, (e) => {
|
|
166
|
-
let s = n;
|
|
167
|
-
n |= o, t[a] = e, s !== i && n === i && r && (r(), r = null);
|
|
168
|
-
});
|
|
169
|
-
}), (e) => (a) => {
|
|
170
|
-
let o = () => {
|
|
171
|
-
e([a].concat(t));
|
|
172
|
-
};
|
|
173
|
-
n === i ? o() : r = o;
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
function Lt(...e) {
|
|
177
|
-
return (t) => e.reduceRight(Ot, t);
|
|
178
|
-
}
|
|
179
|
-
function Rt(e) {
|
|
180
|
-
let t, n, r = () => t?.();
|
|
181
|
-
return function(i, a) {
|
|
182
|
-
switch (i) {
|
|
183
|
-
case gt: return a ? n === a ? void 0 : (r(), n = a, t = I(e, a), t) : (r(), Et);
|
|
184
|
-
case _t:
|
|
185
|
-
r(), n = null;
|
|
186
|
-
return;
|
|
187
|
-
}
|
|
188
|
-
};
|
|
189
|
-
}
|
|
190
|
-
function G(e) {
|
|
191
|
-
let t = e, n = K();
|
|
192
|
-
return ((e, r) => {
|
|
193
|
-
switch (e) {
|
|
194
|
-
case ht:
|
|
195
|
-
t = r;
|
|
196
|
-
break;
|
|
197
|
-
case gt:
|
|
198
|
-
r(t);
|
|
199
|
-
break;
|
|
200
|
-
case vt: return t;
|
|
201
|
-
}
|
|
202
|
-
return n(e, r);
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
function zt(e, t) {
|
|
206
|
-
return Dt(G(t), (t) => z(e, t));
|
|
207
|
-
}
|
|
208
|
-
function K() {
|
|
209
|
-
let e = [];
|
|
210
|
-
return ((t, n) => {
|
|
211
|
-
switch (t) {
|
|
212
|
-
case ht:
|
|
213
|
-
e.slice().forEach((e) => {
|
|
214
|
-
e(n);
|
|
215
|
-
});
|
|
216
|
-
return;
|
|
217
|
-
case _t:
|
|
218
|
-
e.splice(0);
|
|
219
|
-
return;
|
|
220
|
-
case gt: return e.push(n), () => {
|
|
221
|
-
let t = e.indexOf(n);
|
|
222
|
-
t > -1 && e.splice(t, 1);
|
|
223
|
-
};
|
|
224
|
-
}
|
|
225
|
-
});
|
|
226
|
-
}
|
|
227
|
-
function Bt(e) {
|
|
228
|
-
return Dt(K(), (t) => z(e, t));
|
|
229
|
-
}
|
|
230
|
-
var Vt = { singleton: !0 };
|
|
231
|
-
function q(e, t = [], n = Vt) {
|
|
232
|
-
let { singleton: r } = n;
|
|
233
|
-
return {
|
|
234
|
-
constructor: e,
|
|
235
|
-
dependencies: t,
|
|
236
|
-
id: Ht(),
|
|
237
|
-
singleton: r
|
|
238
|
-
};
|
|
239
|
-
}
|
|
240
|
-
var Ht = () => /* @__PURE__ */ Symbol("id");
|
|
241
|
-
function Ut(e) {
|
|
242
|
-
let t = /* @__PURE__ */ new Map(), n = ({ constructor: e, dependencies: r, id: i, singleton: a }) => {
|
|
243
|
-
if (a && t.has(i)) return t.get(i);
|
|
244
|
-
let o = e(r.map((e) => n(e)));
|
|
245
|
-
return a && t.set(i, o), o;
|
|
246
|
-
};
|
|
247
|
-
return n(e);
|
|
248
|
-
}
|
|
249
|
-
function Wt(...e) {
|
|
250
|
-
let t = K(), n = Array.from({ length: e.length }), r = 0, i = 2 ** e.length - 1;
|
|
251
|
-
return e.forEach((e, a) => {
|
|
252
|
-
let o = 2 ** a;
|
|
253
|
-
I(e, (e) => {
|
|
254
|
-
n[a] = e, r |= o, r === i && L(t, n);
|
|
255
|
-
});
|
|
256
|
-
}), function(e, a) {
|
|
257
|
-
switch (e) {
|
|
258
|
-
case _t:
|
|
259
|
-
kt(t);
|
|
260
|
-
return;
|
|
261
|
-
case gt: return r === i && a(n), I(t, a);
|
|
262
|
-
}
|
|
263
|
-
};
|
|
264
|
-
}
|
|
265
|
-
function J(e, t = Mt) {
|
|
266
|
-
return U(e, B(t));
|
|
267
|
-
}
|
|
268
|
-
function Gt(...e) {
|
|
269
|
-
return function(t, n) {
|
|
270
|
-
switch (t) {
|
|
271
|
-
case _t: return;
|
|
272
|
-
case gt: return Tt(...e.map((e) => I(e, n)));
|
|
273
|
-
}
|
|
274
|
-
};
|
|
275
|
-
}
|
|
276
|
-
var Kt = {
|
|
277
|
-
DEBUG: 0,
|
|
278
|
-
INFO: 1,
|
|
279
|
-
WARN: 2,
|
|
280
|
-
ERROR: 3
|
|
281
|
-
}, qt = {
|
|
282
|
-
[Kt.DEBUG]: "debug",
|
|
283
|
-
[Kt.ERROR]: "error",
|
|
284
|
-
[Kt.INFO]: "log",
|
|
285
|
-
[Kt.WARN]: "warn"
|
|
286
|
-
}, Jt = () => typeof globalThis > "u" ? window : globalThis, Yt = q(() => {
|
|
287
|
-
let e = G(Kt.ERROR);
|
|
288
|
-
return {
|
|
289
|
-
log: G((t, n, r = Kt.INFO) => {
|
|
290
|
-
r >= (Jt().VIRTUOSO_LOG_LEVEL ?? R(e)) && console[qt[r]]("%creact-virtuoso: %c%s %o", "color: #0253b3; font-weight: bold", "color: initial", t, n);
|
|
291
|
-
}),
|
|
292
|
-
logLevel: e
|
|
293
|
-
};
|
|
294
|
-
}, [], { singleton: !0 });
|
|
295
|
-
function Xt(e) {
|
|
296
|
-
return "self" in e ? e.document.documentElement : e;
|
|
297
|
-
}
|
|
298
|
-
function Zt(e) {
|
|
299
|
-
let t = Xt(e);
|
|
300
|
-
return t.ownerDocument.defaultView.getComputedStyle(t).direction === "rtl";
|
|
301
|
-
}
|
|
302
|
-
function Qt(e, t) {
|
|
303
|
-
return Zt(e) ? -t : t;
|
|
304
|
-
}
|
|
305
|
-
function $t(e, t) {
|
|
306
|
-
return Zt(e) ? -t : t;
|
|
307
|
-
}
|
|
308
|
-
function en(e, t, n) {
|
|
309
|
-
return tn(e, t, n).callbackRef;
|
|
310
|
-
}
|
|
311
|
-
function tn(e, t, n) {
|
|
312
|
-
let r = A.useRef(null), i = (e) => {}, a = A.useMemo(() => typeof ResizeObserver < "u" ? new ResizeObserver((t) => {
|
|
313
|
-
let r = () => {
|
|
314
|
-
let n = t[0].target;
|
|
315
|
-
n.offsetParent !== null && e(n);
|
|
316
|
-
};
|
|
317
|
-
n ? r() : requestAnimationFrame(r);
|
|
318
|
-
}) : null, [e, n]);
|
|
319
|
-
return i = (e) => {
|
|
320
|
-
e && t ? (a?.observe(e), r.current = e) : (r.current && a?.unobserve(r.current), r.current = null);
|
|
321
|
-
}, {
|
|
322
|
-
callbackRef: i,
|
|
323
|
-
ref: r
|
|
324
|
-
};
|
|
325
|
-
}
|
|
326
|
-
function nn(e, t, n, r, i, a, o, s, c) {
|
|
327
|
-
return tn(A.useCallback((n) => {
|
|
328
|
-
let c = rn(n.children, t, s ? "offsetWidth" : "offsetHeight", i), l = n.parentElement;
|
|
329
|
-
for (; l.dataset.virtuosoScroller === void 0;) l = l.parentElement;
|
|
330
|
-
let u = l.lastElementChild?.dataset.viewportType === "window", d;
|
|
331
|
-
u && (d = l.ownerDocument.defaultView);
|
|
332
|
-
let f = o ? s ? o.scrollWidth : o.scrollHeight : u ? s ? d.document.documentElement.scrollWidth : d.document.documentElement.scrollHeight : s ? l.scrollWidth : l.scrollHeight, p = o ? s ? o.offsetWidth : o.offsetHeight : u ? s ? d.innerWidth : d.innerHeight : s ? l.offsetWidth : l.offsetHeight, m = o ? s ? Qt(o, o.scrollLeft) : o.scrollTop : u ? s ? Qt(d, d.scrollX || d.document.documentElement.scrollLeft) : d.scrollY || d.document.documentElement.scrollTop : s ? Qt(l, l.scrollLeft) : l.scrollTop;
|
|
333
|
-
r({
|
|
334
|
-
scrollHeight: f,
|
|
335
|
-
scrollTop: Math.max(m, 0),
|
|
336
|
-
viewportHeight: p
|
|
337
|
-
}), a?.(s ? an("column-gap", getComputedStyle(n).columnGap, i) : an("row-gap", getComputedStyle(n).rowGap, i)), c !== null && e(c);
|
|
338
|
-
}, [
|
|
339
|
-
e,
|
|
340
|
-
t,
|
|
341
|
-
i,
|
|
342
|
-
a,
|
|
343
|
-
o,
|
|
344
|
-
r,
|
|
345
|
-
s
|
|
346
|
-
]), n, c);
|
|
347
|
-
}
|
|
348
|
-
function rn(e, t, n, r) {
|
|
349
|
-
let i = e.length;
|
|
350
|
-
if (i === 0) return null;
|
|
351
|
-
let a = [];
|
|
352
|
-
for (let o = 0; o < i; o++) {
|
|
353
|
-
let i = e.item(o);
|
|
354
|
-
if (i.dataset.index === void 0) continue;
|
|
355
|
-
let s = parseInt(i.dataset.index, 10), c = parseFloat(i.dataset.knownSize), l = t(i, n);
|
|
356
|
-
if (l === 0 && r("Zero-sized element, this should not happen", { child: i }, Kt.ERROR), l === c) continue;
|
|
357
|
-
let u = a[a.length - 1];
|
|
358
|
-
a.length === 0 || u.size !== l || u.endIndex !== s - 1 ? a.push({
|
|
359
|
-
endIndex: s,
|
|
360
|
-
size: l,
|
|
361
|
-
startIndex: s
|
|
362
|
-
}) : a[a.length - 1].endIndex++;
|
|
363
|
-
}
|
|
364
|
-
return a;
|
|
365
|
-
}
|
|
366
|
-
function an(e, t, n) {
|
|
367
|
-
return t !== "normal" && t?.endsWith("px") !== !0 && n(`${e} was not resolved to pixel value correctly`, t, Kt.WARN), t === "normal" ? 0 : parseInt(t ?? "0", 10);
|
|
368
|
-
}
|
|
369
|
-
var on = typeof document > "u" ? A.useEffect : A.useLayoutEffect;
|
|
370
|
-
function sn(e, t, n) {
|
|
371
|
-
let r = A.useRef(null), i = A.useCallback((n) => {
|
|
372
|
-
if (!n?.offsetParent) return;
|
|
373
|
-
let i = n.getBoundingClientRect(), a = i.width, s, c;
|
|
374
|
-
if (t) {
|
|
375
|
-
let e = t.getBoundingClientRect(), n = i.top - e.top;
|
|
376
|
-
c = e.height - Math.max(0, n), s = n + t.scrollTop;
|
|
377
|
-
} else {
|
|
378
|
-
let e = o.current.ownerDocument.defaultView;
|
|
379
|
-
c = e.innerHeight - Math.max(0, i.top), s = i.top + e.scrollY;
|
|
380
|
-
}
|
|
381
|
-
r.current = {
|
|
382
|
-
listHeight: i.height,
|
|
383
|
-
offsetTop: s,
|
|
384
|
-
visibleHeight: c,
|
|
385
|
-
visibleWidth: a
|
|
386
|
-
}, e(r.current);
|
|
387
|
-
}, [e, t]), { callbackRef: a, ref: o } = tn(i, !0, n), s = A.useCallback(() => {
|
|
388
|
-
i(o.current);
|
|
389
|
-
}, [i, o]);
|
|
390
|
-
return A.useEffect(() => {
|
|
391
|
-
if (t) {
|
|
392
|
-
t.addEventListener("scroll", s);
|
|
393
|
-
let e = new ResizeObserver(() => {
|
|
394
|
-
requestAnimationFrame(s);
|
|
395
|
-
});
|
|
396
|
-
return e.observe(t), () => {
|
|
397
|
-
t.removeEventListener("scroll", s), e.unobserve(t);
|
|
398
|
-
};
|
|
399
|
-
}
|
|
400
|
-
let e = o.current?.ownerDocument.defaultView;
|
|
401
|
-
return e?.addEventListener("scroll", s), e?.addEventListener("resize", s), () => {
|
|
402
|
-
e?.removeEventListener("scroll", s), e?.removeEventListener("resize", s);
|
|
403
|
-
};
|
|
404
|
-
}, [
|
|
405
|
-
s,
|
|
406
|
-
t,
|
|
407
|
-
o
|
|
408
|
-
]), a;
|
|
409
|
-
}
|
|
410
|
-
var cn = q(() => {
|
|
411
|
-
let e = K(), t = K(), n = G(0), r = K(), i = K(), a = G(0), o = K(), s = K(), c = G(0), l = G(0), u = G(0), d = G(0), f = K(), p = K(), m = G(!1), h = G(!1), g = G(!1);
|
|
412
|
-
return z(U(e, H(({ scrollTop: e }) => e)), t), z(U(e, H(({ scrollHeight: e }) => e)), s), z(t, a), {
|
|
413
|
-
deviation: n,
|
|
414
|
-
deviationCommitted: r,
|
|
415
|
-
fixedFooterHeight: u,
|
|
416
|
-
fixedHeaderHeight: l,
|
|
417
|
-
footerHeight: d,
|
|
418
|
-
headerHeight: c,
|
|
419
|
-
horizontalDirection: h,
|
|
420
|
-
scrollBy: p,
|
|
421
|
-
scrollContainerState: e,
|
|
422
|
-
scrollHeight: s,
|
|
423
|
-
scrollingInProgress: m,
|
|
424
|
-
scrollTo: f,
|
|
425
|
-
scrollTop: t,
|
|
426
|
-
skipAnimationFrameInResizeObserver: g,
|
|
427
|
-
smoothScrollTargetReached: i,
|
|
428
|
-
statefulScrollTop: a,
|
|
429
|
-
viewportHeight: o
|
|
430
|
-
};
|
|
431
|
-
}, [], { singleton: !0 }), ln = { lvl: 0 };
|
|
432
|
-
function un(e, t) {
|
|
433
|
-
let n = e.length;
|
|
434
|
-
if (n === 0) return [];
|
|
435
|
-
let { index: r, value: i } = t(e[0]), a = [];
|
|
436
|
-
for (let o = 1; o < n; o++) {
|
|
437
|
-
let { index: n, value: s } = t(e[o]);
|
|
438
|
-
a.push({
|
|
439
|
-
end: n - 1,
|
|
440
|
-
start: r,
|
|
441
|
-
value: i
|
|
442
|
-
}), r = n, i = s;
|
|
443
|
-
}
|
|
444
|
-
return a.push({
|
|
445
|
-
end: 1 / 0,
|
|
446
|
-
start: r,
|
|
447
|
-
value: i
|
|
448
|
-
}), a;
|
|
449
|
-
}
|
|
450
|
-
function Y(e) {
|
|
451
|
-
return e === ln;
|
|
452
|
-
}
|
|
453
|
-
function dn(e, t) {
|
|
454
|
-
if (!Y(e)) return t === e.k ? e.v : t < e.k ? dn(e.l, t) : dn(e.r, t);
|
|
455
|
-
}
|
|
456
|
-
function fn(e, t, n = "k") {
|
|
457
|
-
if (Y(e)) return [-1 / 0, void 0];
|
|
458
|
-
if (Number(e[n]) === t) return [e.k, e.v];
|
|
459
|
-
if (Number(e[n]) < t) {
|
|
460
|
-
let r = fn(e.r, t, n);
|
|
461
|
-
return r[0] === -1 / 0 ? [e.k, e.v] : r;
|
|
462
|
-
}
|
|
463
|
-
return fn(e.l, t, n);
|
|
464
|
-
}
|
|
465
|
-
function pn(e, t, n) {
|
|
466
|
-
return Y(e) ? wn(t, n, 1) : t === e.k ? bn(e, {
|
|
467
|
-
k: t,
|
|
468
|
-
v: n
|
|
469
|
-
}) : t < e.k ? Tn(bn(e, { l: pn(e.l, t, n) })) : Tn(bn(e, { r: pn(e.r, t, n) }));
|
|
470
|
-
}
|
|
471
|
-
function mn() {
|
|
472
|
-
return ln;
|
|
473
|
-
}
|
|
474
|
-
function hn(e, t, n) {
|
|
475
|
-
if (Y(e)) return [];
|
|
476
|
-
let r = fn(e, t)[0];
|
|
477
|
-
return On(vn(e, r, n));
|
|
478
|
-
}
|
|
479
|
-
function gn(e, t) {
|
|
480
|
-
if (Y(e)) return ln;
|
|
481
|
-
let { k: n, l: r, r: i } = e;
|
|
482
|
-
if (t === n) {
|
|
483
|
-
if (Y(r)) return i;
|
|
484
|
-
if (Y(i)) return r;
|
|
485
|
-
let [t, n] = Cn(r);
|
|
486
|
-
return yn(bn(e, {
|
|
487
|
-
k: t,
|
|
488
|
-
l: xn(r),
|
|
489
|
-
v: n
|
|
490
|
-
}));
|
|
491
|
-
}
|
|
492
|
-
return yn(t < n ? bn(e, { l: gn(r, t) }) : bn(e, { r: gn(i, t) }));
|
|
493
|
-
}
|
|
494
|
-
function _n(e) {
|
|
495
|
-
return Y(e) ? [] : [
|
|
496
|
-
..._n(e.l),
|
|
497
|
-
{
|
|
498
|
-
k: e.k,
|
|
499
|
-
v: e.v
|
|
500
|
-
},
|
|
501
|
-
..._n(e.r)
|
|
502
|
-
];
|
|
503
|
-
}
|
|
504
|
-
function vn(e, t, n) {
|
|
505
|
-
if (Y(e)) return [];
|
|
506
|
-
let { k: r, l: i, r: a, v: o } = e, s = [];
|
|
507
|
-
return r > t && (s = s.concat(vn(i, t, n))), r >= t && r <= n && s.push({
|
|
508
|
-
k: r,
|
|
509
|
-
v: o
|
|
510
|
-
}), r <= n && (s = s.concat(vn(a, t, n))), s;
|
|
511
|
-
}
|
|
512
|
-
function yn(e) {
|
|
513
|
-
let { l: t, lvl: n, r } = e;
|
|
514
|
-
if (r.lvl >= n - 1 && t.lvl >= n - 1) return e;
|
|
515
|
-
if (n > r.lvl + 1) {
|
|
516
|
-
if (Sn(t)) return En(bn(e, { lvl: n - 1 }));
|
|
517
|
-
if (!Y(t) && !Y(t.r)) return bn(t.r, {
|
|
518
|
-
l: bn(t, { r: t.r.l }),
|
|
519
|
-
lvl: n,
|
|
520
|
-
r: bn(e, {
|
|
521
|
-
l: t.r.r,
|
|
522
|
-
lvl: n - 1
|
|
523
|
-
})
|
|
524
|
-
});
|
|
525
|
-
throw Error("Unexpected empty nodes");
|
|
526
|
-
}
|
|
527
|
-
if (Sn(e)) return Dn(bn(e, { lvl: n - 1 }));
|
|
528
|
-
if (!Y(r) && !Y(r.l)) {
|
|
529
|
-
let t = r.l, i = Sn(t) ? r.lvl - 1 : r.lvl;
|
|
530
|
-
return bn(t, {
|
|
531
|
-
l: bn(e, {
|
|
532
|
-
lvl: n - 1,
|
|
533
|
-
r: t.l
|
|
534
|
-
}),
|
|
535
|
-
lvl: t.lvl + 1,
|
|
536
|
-
r: Dn(bn(r, {
|
|
537
|
-
l: t.r,
|
|
538
|
-
lvl: i
|
|
539
|
-
}))
|
|
540
|
-
});
|
|
541
|
-
}
|
|
542
|
-
throw Error("Unexpected empty nodes");
|
|
543
|
-
}
|
|
544
|
-
function bn(e, t) {
|
|
545
|
-
return wn(t.k === void 0 ? e.k : t.k, t.v === void 0 ? e.v : t.v, t.lvl === void 0 ? e.lvl : t.lvl, t.l === void 0 ? e.l : t.l, t.r === void 0 ? e.r : t.r);
|
|
546
|
-
}
|
|
547
|
-
function xn(e) {
|
|
548
|
-
return Y(e.r) ? e.l : yn(bn(e, { r: xn(e.r) }));
|
|
549
|
-
}
|
|
550
|
-
function Sn(e) {
|
|
551
|
-
return Y(e) || e.lvl > e.r.lvl;
|
|
552
|
-
}
|
|
553
|
-
function Cn(e) {
|
|
554
|
-
return Y(e.r) ? [e.k, e.v] : Cn(e.r);
|
|
555
|
-
}
|
|
556
|
-
function wn(e, t, n, r = ln, i = ln) {
|
|
557
|
-
return {
|
|
558
|
-
k: e,
|
|
559
|
-
l: r,
|
|
560
|
-
lvl: n,
|
|
561
|
-
r: i,
|
|
562
|
-
v: t
|
|
563
|
-
};
|
|
564
|
-
}
|
|
565
|
-
function Tn(e) {
|
|
566
|
-
return Dn(En(e));
|
|
567
|
-
}
|
|
568
|
-
function En(e) {
|
|
569
|
-
let { l: t } = e;
|
|
570
|
-
return !Y(t) && t.lvl === e.lvl ? bn(t, { r: bn(e, { l: t.r }) }) : e;
|
|
571
|
-
}
|
|
572
|
-
function Dn(e) {
|
|
573
|
-
let { lvl: t, r: n } = e;
|
|
574
|
-
return !Y(n) && !Y(n.r) && n.lvl === t && n.r.lvl === t ? bn(n, {
|
|
575
|
-
l: bn(e, { r: n.l }),
|
|
576
|
-
lvl: t + 1
|
|
577
|
-
}) : e;
|
|
578
|
-
}
|
|
579
|
-
function On(e) {
|
|
580
|
-
return un(e, ({ k: e, v: t }) => ({
|
|
581
|
-
index: e,
|
|
582
|
-
value: t
|
|
583
|
-
}));
|
|
584
|
-
}
|
|
585
|
-
function kn(e, t) {
|
|
586
|
-
return !!(e && e.startIndex === t.startIndex && e.endIndex === t.endIndex);
|
|
587
|
-
}
|
|
588
|
-
function An(e, t) {
|
|
589
|
-
return !!(e && e[0] === t[0] && e[1] === t[1]);
|
|
590
|
-
}
|
|
591
|
-
var jn = q(() => ({ recalcInProgress: G(!1) }), [], { singleton: !0 });
|
|
592
|
-
function Mn(e, t, n) {
|
|
593
|
-
return e[Nn(e, t, n)];
|
|
594
|
-
}
|
|
595
|
-
function Nn(e, t, n, r = 0) {
|
|
596
|
-
let i = e.length - 1;
|
|
597
|
-
for (; r <= i;) {
|
|
598
|
-
let a = Math.floor((r + i) / 2), o = e[a], s = n(o, t);
|
|
599
|
-
if (s === 0) return a;
|
|
600
|
-
if (s === -1) {
|
|
601
|
-
if (i - r < 2) return a - 1;
|
|
602
|
-
i = a - 1;
|
|
603
|
-
} else {
|
|
604
|
-
if (i === r) return a;
|
|
605
|
-
r = a + 1;
|
|
606
|
-
}
|
|
607
|
-
}
|
|
608
|
-
throw Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`);
|
|
609
|
-
}
|
|
610
|
-
function Pn(e, t, n, r) {
|
|
611
|
-
let i = Nn(e, t, r), a = Nn(e, n, r, i);
|
|
612
|
-
return e.slice(i, a + 1);
|
|
613
|
-
}
|
|
614
|
-
function Fn(e, t) {
|
|
615
|
-
return Math.round(e.getBoundingClientRect()[t]);
|
|
616
|
-
}
|
|
617
|
-
function In(e) {
|
|
618
|
-
return !Y(e.groupOffsetTree);
|
|
619
|
-
}
|
|
620
|
-
function Ln({ index: e }, t) {
|
|
621
|
-
return t === e ? 0 : t < e ? -1 : 1;
|
|
622
|
-
}
|
|
623
|
-
function Rn() {
|
|
624
|
-
return {
|
|
625
|
-
groupIndices: [],
|
|
626
|
-
groupOffsetTree: mn(),
|
|
627
|
-
lastIndex: 0,
|
|
628
|
-
lastOffset: 0,
|
|
629
|
-
lastSize: 0,
|
|
630
|
-
offsetTree: [],
|
|
631
|
-
sizeTree: mn()
|
|
632
|
-
};
|
|
633
|
-
}
|
|
634
|
-
function zn(e, t) {
|
|
635
|
-
let n = Y(e) ? 0 : 1 / 0;
|
|
636
|
-
for (let r of t) {
|
|
637
|
-
let { endIndex: t, size: i, startIndex: a } = r;
|
|
638
|
-
if (n = Math.min(n, a), Y(e)) {
|
|
639
|
-
e = pn(e, 0, i);
|
|
640
|
-
continue;
|
|
641
|
-
}
|
|
642
|
-
let o = hn(e, a - 1, t + 1);
|
|
643
|
-
if (o.some(Zn(r))) continue;
|
|
644
|
-
let s = !1, c = !1;
|
|
645
|
-
for (let { end: n, start: r, value: a } of o) s ? (t >= r || i === a) && (e = gn(e, r)) : (c = a !== i, s = !0), n > t && t >= r && a !== i && (e = pn(e, t + 1, a));
|
|
646
|
-
c && (e = pn(e, a, i));
|
|
647
|
-
}
|
|
648
|
-
return [e, n];
|
|
649
|
-
}
|
|
650
|
-
function Bn(e) {
|
|
651
|
-
return e.groupIndex !== void 0;
|
|
652
|
-
}
|
|
653
|
-
function Vn({ offset: e }, t) {
|
|
654
|
-
return t === e ? 0 : t < e ? -1 : 1;
|
|
655
|
-
}
|
|
656
|
-
function Hn(e, t, n) {
|
|
657
|
-
if (t.length === 0) return 0;
|
|
658
|
-
let { index: r, offset: i, size: a } = Mn(t, e, Ln), o = e - r, s = a * o + (o - 1) * n + i;
|
|
659
|
-
return s > 0 ? s + n : s;
|
|
660
|
-
}
|
|
661
|
-
function Un(e, t) {
|
|
662
|
-
if (!In(t)) return e;
|
|
663
|
-
let n = 0;
|
|
664
|
-
for (; t.groupIndices[n] <= e + n;) n++;
|
|
665
|
-
return e + n;
|
|
666
|
-
}
|
|
667
|
-
function Wn(e, t, n) {
|
|
668
|
-
if (Bn(e)) return t.groupIndices[e.groupIndex] + 1;
|
|
669
|
-
let r = Un(e.index === "LAST" ? n : e.index, t);
|
|
670
|
-
return r = Math.max(0, Math.min(n, r)), r;
|
|
671
|
-
}
|
|
672
|
-
function Gn(e, t, n, r = 0) {
|
|
673
|
-
return r > 0 && (t = Math.max(t, Mn(e, r, Ln).offset)), un(Pn(e, t, n, Vn), Xn);
|
|
674
|
-
}
|
|
675
|
-
function Kn(e, [t, n, r, i]) {
|
|
676
|
-
t.length > 0 && r("received item sizes", t, Kt.DEBUG);
|
|
677
|
-
let a = e.sizeTree, o = a, s = 0;
|
|
678
|
-
if (n.length > 0 && Y(a) && t.length === 2) {
|
|
679
|
-
let e = t[0].size, r = t[1].size;
|
|
680
|
-
o = n.reduce((t, n) => pn(pn(t, n, e), n + 1, r), o);
|
|
681
|
-
} else [o, s] = zn(o, t);
|
|
682
|
-
if (o === a) return e;
|
|
683
|
-
let { lastIndex: c, lastOffset: l, lastSize: u, offsetTree: d } = Yn(e.offsetTree, s, o, i);
|
|
684
|
-
return {
|
|
685
|
-
groupIndices: n,
|
|
686
|
-
groupOffsetTree: n.reduce((e, t) => pn(e, t, Hn(t, d, i)), mn()),
|
|
687
|
-
lastIndex: c,
|
|
688
|
-
lastOffset: l,
|
|
689
|
-
lastSize: u,
|
|
690
|
-
offsetTree: d,
|
|
691
|
-
sizeTree: o
|
|
692
|
-
};
|
|
693
|
-
}
|
|
694
|
-
function qn(e) {
|
|
695
|
-
return _n(e).map(({ k: e, v: t }, n, r) => {
|
|
696
|
-
let i = r[n + 1];
|
|
697
|
-
return {
|
|
698
|
-
endIndex: i === void 0 ? 1 / 0 : i.k - 1,
|
|
699
|
-
size: t,
|
|
700
|
-
startIndex: e
|
|
701
|
-
};
|
|
702
|
-
});
|
|
703
|
-
}
|
|
704
|
-
function Jn(e, t) {
|
|
705
|
-
let n = 0, r = 0;
|
|
706
|
-
for (; n < e;) n += t[r + 1] - t[r] - 1, r++;
|
|
707
|
-
return r - (n === e ? 0 : 1);
|
|
708
|
-
}
|
|
709
|
-
function Yn(e, t, n, r) {
|
|
710
|
-
let i = e, a = 0, o = 0, s = 0, c = 0;
|
|
711
|
-
if (t === 0) i = [];
|
|
712
|
-
else {
|
|
713
|
-
c = Nn(i, t - 1, Ln), s = i[c].offset;
|
|
714
|
-
let e = fn(n, t - 1);
|
|
715
|
-
a = e[0], o = e[1], i.length && i[c].size === fn(n, t)[1] && --c, i = i.slice(0, c + 1);
|
|
716
|
-
}
|
|
717
|
-
for (let { start: e, value: c } of hn(n, t, 1 / 0)) {
|
|
718
|
-
let t = e - a, n = t * o + s + t * r;
|
|
719
|
-
i.push({
|
|
720
|
-
index: e,
|
|
721
|
-
offset: n,
|
|
722
|
-
size: c
|
|
723
|
-
}), a = e, s = n, o = c;
|
|
724
|
-
}
|
|
725
|
-
return {
|
|
726
|
-
lastIndex: a,
|
|
727
|
-
lastOffset: s,
|
|
728
|
-
lastSize: o,
|
|
729
|
-
offsetTree: i
|
|
730
|
-
};
|
|
731
|
-
}
|
|
732
|
-
function Xn(e) {
|
|
733
|
-
return {
|
|
734
|
-
index: e.index,
|
|
735
|
-
value: e
|
|
736
|
-
};
|
|
737
|
-
}
|
|
738
|
-
function Zn(e) {
|
|
739
|
-
let { endIndex: t, size: n, startIndex: r } = e;
|
|
740
|
-
return (e) => e.start === r && (e.end === t || e.end === 1 / 0) && e.value === n;
|
|
741
|
-
}
|
|
742
|
-
var Qn = {
|
|
743
|
-
offsetHeight: "height",
|
|
744
|
-
offsetWidth: "width"
|
|
745
|
-
}, $n = q(([{ log: e }, { recalcInProgress: t }]) => {
|
|
746
|
-
let n = K(), r = K(), i = zt(r, 0), a = K(), o = K(), s = G(0), c = G([]), l = G(void 0), u = G(void 0), d = G(void 0), f = G(void 0), p = G((e, t) => Fn(e, Qn[t])), m = G(void 0), h = G(0), g = Rn(), _ = zt(U(n, W(c, e, h), Pt(Kn, g), B()), g), v = zt(U(c, B(), Pt((e, t) => ({
|
|
747
|
-
current: t,
|
|
748
|
-
prev: e.current
|
|
749
|
-
}), {
|
|
750
|
-
current: [],
|
|
751
|
-
prev: []
|
|
752
|
-
}), H(({ prev: e }) => e)), []);
|
|
753
|
-
z(U(c, V((e) => e.length > 0), W(_, h), H(([e, t, n]) => {
|
|
754
|
-
let r = e.reduce((e, r, i) => pn(e, r, Hn(r, t.offsetTree, n) || i), mn());
|
|
755
|
-
return {
|
|
756
|
-
...t,
|
|
757
|
-
groupIndices: e,
|
|
758
|
-
groupOffsetTree: r
|
|
759
|
-
};
|
|
760
|
-
})), _), z(U(r, W(_), V(([e, { lastIndex: t }]) => e < t), H(([e, { lastIndex: t, lastSize: n }]) => [{
|
|
761
|
-
endIndex: t,
|
|
762
|
-
size: n,
|
|
763
|
-
startIndex: e
|
|
764
|
-
}])), n), z(l, u);
|
|
765
|
-
let y = zt(U(l, H((e) => e === void 0)), !0);
|
|
766
|
-
z(U(u, V((e) => e !== void 0 && Y(R(_).sizeTree)), H((e) => {
|
|
767
|
-
let t = R(d), n = R(c).length > 0;
|
|
768
|
-
return t !== void 0 && t !== 0 ? n ? [{
|
|
769
|
-
endIndex: 0,
|
|
770
|
-
size: t,
|
|
771
|
-
startIndex: 0
|
|
772
|
-
}, {
|
|
773
|
-
endIndex: 1,
|
|
774
|
-
size: e,
|
|
775
|
-
startIndex: 1
|
|
776
|
-
}] : [] : [{
|
|
777
|
-
endIndex: 0,
|
|
778
|
-
size: e,
|
|
779
|
-
startIndex: 0
|
|
780
|
-
}];
|
|
781
|
-
})), n), z(U(f, V((e) => e !== void 0 && e.length > 0 && Y(R(_).sizeTree)), H((e) => {
|
|
782
|
-
let t = [], n = e[0], r = 0;
|
|
783
|
-
for (let i = 1; i < e.length; i++) {
|
|
784
|
-
let a = e[i];
|
|
785
|
-
a !== n && (t.push({
|
|
786
|
-
endIndex: i - 1,
|
|
787
|
-
size: n,
|
|
788
|
-
startIndex: r
|
|
789
|
-
}), n = a, r = i);
|
|
790
|
-
}
|
|
791
|
-
return t.push({
|
|
792
|
-
endIndex: e.length - 1,
|
|
793
|
-
size: n,
|
|
794
|
-
startIndex: r
|
|
795
|
-
}), t;
|
|
796
|
-
})), n), z(U(c, W(d, u), V(([, e, t]) => e !== void 0 && t !== void 0), H(([e, t, n]) => {
|
|
797
|
-
let r = [];
|
|
798
|
-
for (let i = 0; i < e.length; i++) {
|
|
799
|
-
let a = e[i], o = e[i + 1];
|
|
800
|
-
r.push({
|
|
801
|
-
startIndex: a,
|
|
802
|
-
endIndex: a,
|
|
803
|
-
size: t
|
|
804
|
-
}), o !== void 0 && r.push({
|
|
805
|
-
startIndex: a + 1,
|
|
806
|
-
endIndex: o - 1,
|
|
807
|
-
size: n
|
|
808
|
-
});
|
|
809
|
-
}
|
|
810
|
-
return r;
|
|
811
|
-
})), n);
|
|
812
|
-
let b = Bt(U(n, W(_), Pt(({ sizes: e }, [t, n]) => ({
|
|
813
|
-
changed: n !== e,
|
|
814
|
-
sizes: n
|
|
815
|
-
}), {
|
|
816
|
-
changed: !1,
|
|
817
|
-
sizes: g
|
|
818
|
-
}), H((e) => e.changed)));
|
|
819
|
-
I(U(s, Pt((e, t) => ({
|
|
820
|
-
diff: e.prev - t,
|
|
821
|
-
prev: t
|
|
822
|
-
}), {
|
|
823
|
-
diff: 0,
|
|
824
|
-
prev: 0
|
|
825
|
-
}), H((e) => e.diff)), (e) => {
|
|
826
|
-
let { groupIndices: n } = R(_);
|
|
827
|
-
if (e > 0) L(t, !0), L(a, e + Jn(e, n));
|
|
828
|
-
else if (e < 0) {
|
|
829
|
-
let t = R(v);
|
|
830
|
-
t.length > 0 && (e -= Jn(-e, t)), L(o, e);
|
|
831
|
-
}
|
|
832
|
-
}), I(U(s, W(e)), ([e, t]) => {
|
|
833
|
-
e < 0 && t("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value", { firstItemIndex: s }, Kt.ERROR);
|
|
834
|
-
});
|
|
835
|
-
let x = Bt(a);
|
|
836
|
-
z(U(a, W(_), H(([e, t]) => {
|
|
837
|
-
let n = t.groupIndices.length > 0, r = [], i = t.lastSize;
|
|
838
|
-
if (n) {
|
|
839
|
-
let n = dn(t.sizeTree, 0), a = 0, o = 0;
|
|
840
|
-
for (; a < e;) {
|
|
841
|
-
let e = t.groupIndices[o], s = t.groupIndices.length === o + 1 ? 1 / 0 : t.groupIndices[o + 1] - e - 1;
|
|
842
|
-
r.push({
|
|
843
|
-
endIndex: e,
|
|
844
|
-
size: n,
|
|
845
|
-
startIndex: e
|
|
846
|
-
}), r.push({
|
|
847
|
-
endIndex: e + 1 + s - 1,
|
|
848
|
-
size: i,
|
|
849
|
-
startIndex: e + 1
|
|
850
|
-
}), o++, a += s + 1;
|
|
851
|
-
}
|
|
852
|
-
let s = _n(t.sizeTree);
|
|
853
|
-
return a !== e && s.shift(), s.reduce((t, { k: n, v: r }) => {
|
|
854
|
-
let i = t.ranges;
|
|
855
|
-
return t.prevSize !== 0 && (i = [...t.ranges, {
|
|
856
|
-
endIndex: n + e - 1,
|
|
857
|
-
size: t.prevSize,
|
|
858
|
-
startIndex: t.prevIndex
|
|
859
|
-
}]), {
|
|
860
|
-
prevIndex: n + e,
|
|
861
|
-
prevSize: r,
|
|
862
|
-
ranges: i
|
|
863
|
-
};
|
|
864
|
-
}, {
|
|
865
|
-
prevIndex: e,
|
|
866
|
-
prevSize: 0,
|
|
867
|
-
ranges: r
|
|
868
|
-
}).ranges;
|
|
869
|
-
}
|
|
870
|
-
return _n(t.sizeTree).reduce((t, { k: n, v: r }) => ({
|
|
871
|
-
prevIndex: n + e,
|
|
872
|
-
prevSize: r,
|
|
873
|
-
ranges: [...t.ranges, {
|
|
874
|
-
endIndex: n + e - 1,
|
|
875
|
-
size: t.prevSize,
|
|
876
|
-
startIndex: t.prevIndex
|
|
877
|
-
}]
|
|
878
|
-
}), {
|
|
879
|
-
prevIndex: 0,
|
|
880
|
-
prevSize: i,
|
|
881
|
-
ranges: []
|
|
882
|
-
}).ranges;
|
|
883
|
-
})), n);
|
|
884
|
-
let S = Bt(U(o, W(_, h), H(([e, { offsetTree: t }, n]) => Hn(-e, t, n))));
|
|
885
|
-
return z(U(o, W(_, h), H(([e, t, n]) => {
|
|
886
|
-
if (t.groupIndices.length > 0) {
|
|
887
|
-
if (Y(t.sizeTree)) return t;
|
|
888
|
-
let r = mn(), i = R(v), a = 0, o = 0, s = 0;
|
|
889
|
-
for (; a < -e;) {
|
|
890
|
-
s = i[o];
|
|
891
|
-
let e = i[o + 1] - s - 1;
|
|
892
|
-
o++, a += e + 1;
|
|
893
|
-
}
|
|
894
|
-
if (r = _n(t.sizeTree).reduce((t, { k: n, v: r }) => pn(t, Math.max(0, n + e), r), r), a !== -e) {
|
|
895
|
-
let n = dn(t.sizeTree, s);
|
|
896
|
-
r = pn(r, 0, n);
|
|
897
|
-
let i = fn(t.sizeTree, -e + 1)[1];
|
|
898
|
-
r = pn(r, 1, i);
|
|
899
|
-
}
|
|
900
|
-
return {
|
|
901
|
-
...t,
|
|
902
|
-
sizeTree: r,
|
|
903
|
-
...Yn(t.offsetTree, 0, r, n)
|
|
904
|
-
};
|
|
905
|
-
}
|
|
906
|
-
let r = _n(t.sizeTree).reduce((t, { k: n, v: r }) => pn(t, Math.max(0, n + e), r), mn());
|
|
907
|
-
return {
|
|
908
|
-
...t,
|
|
909
|
-
sizeTree: r,
|
|
910
|
-
...Yn(t.offsetTree, 0, r, n)
|
|
911
|
-
};
|
|
912
|
-
})), _), {
|
|
913
|
-
beforeUnshiftWith: x,
|
|
914
|
-
data: m,
|
|
915
|
-
defaultItemSize: u,
|
|
916
|
-
firstItemIndex: s,
|
|
917
|
-
fixedItemSize: l,
|
|
918
|
-
fixedGroupSize: d,
|
|
919
|
-
gap: h,
|
|
920
|
-
groupIndices: c,
|
|
921
|
-
heightEstimates: f,
|
|
922
|
-
itemSize: p,
|
|
923
|
-
listRefresh: b,
|
|
924
|
-
shiftWith: o,
|
|
925
|
-
shiftWithOffset: S,
|
|
926
|
-
sizeRanges: n,
|
|
927
|
-
sizes: _,
|
|
928
|
-
statefulTotalCount: i,
|
|
929
|
-
totalCount: r,
|
|
930
|
-
trackItemSizes: y,
|
|
931
|
-
unshiftWith: a
|
|
932
|
-
};
|
|
933
|
-
}, F(Yt, jn), { singleton: !0 });
|
|
934
|
-
function er(e) {
|
|
935
|
-
return e.reduce((e, t) => (e.groupIndices.push(e.totalCount), e.totalCount += t + 1, e), {
|
|
936
|
-
groupIndices: [],
|
|
937
|
-
totalCount: 0
|
|
938
|
-
});
|
|
939
|
-
}
|
|
940
|
-
var tr = q(([{ groupIndices: e, sizes: t, totalCount: n }, { headerHeight: r, scrollTop: i }]) => {
|
|
941
|
-
let a = K(), o = K(), s = Bt(U(a, H(er)));
|
|
942
|
-
return z(U(s, H((e) => e.totalCount)), n), z(U(s, H((e) => e.groupIndices)), e), z(U(Wt(i, t, r), V(([e, t]) => In(t)), H(([e, t, n]) => fn(t.groupOffsetTree, Math.max(e - n, 0), "v")[0]), B(), H((e) => [e])), o), {
|
|
943
|
-
groupCounts: a,
|
|
944
|
-
topItemsIndexes: o
|
|
945
|
-
};
|
|
946
|
-
}, F($n, cn)), nr = q(([{ log: e }]) => {
|
|
947
|
-
let t = G(!1), n = Bt(U(t, V((e) => e), B()));
|
|
948
|
-
return I(t, (t) => {
|
|
949
|
-
t && R(e)("props updated", {}, Kt.DEBUG);
|
|
950
|
-
}), {
|
|
951
|
-
didMount: n,
|
|
952
|
-
propsReady: t
|
|
953
|
-
};
|
|
954
|
-
}, F(Yt), { singleton: !0 }), rr = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
|
|
955
|
-
function ir(e) {
|
|
956
|
-
let t = typeof e == "number" ? { index: e } : { ...e };
|
|
957
|
-
return t.align ||= "start", (!t.behavior || !rr) && (t.behavior = "auto"), t.offset === void 0 && (t.offset = 0), t;
|
|
958
|
-
}
|
|
959
|
-
var ar = q(([{ gap: e, listRefresh: t, sizes: n, totalCount: r }, { fixedFooterHeight: i, fixedHeaderHeight: a, footerHeight: o, headerHeight: s, scrollingInProgress: c, scrollTo: l, smoothScrollTargetReached: u, viewportHeight: d }, { log: f }]) => {
|
|
960
|
-
let p = K(), m = K(), h = G(0), g = null, _ = null, v = null;
|
|
961
|
-
function y() {
|
|
962
|
-
g !== null && (g(), g = null), v !== null && (v(), v = null), _ &&= (clearTimeout(_), null), L(c, !1);
|
|
963
|
-
}
|
|
964
|
-
return z(U(p, W(n, d, r, h, s, o, f), W(e, a, i), H(([[e, n, r, i, a, o, s, l], d, f, h]) => {
|
|
965
|
-
let b = ir(e), { align: x, behavior: S, offset: C } = b, w = i - 1, T = Wn(b, n, w), E = Hn(T, n.offsetTree, d) + o;
|
|
966
|
-
x === "end" ? (E += f + fn(n.sizeTree, T)[1] - r + h, T === w && (E += s)) : x === "center" ? E += (f + fn(n.sizeTree, T)[1] - r + h) / 2 : E -= a, C !== void 0 && C !== 0 && (E += C);
|
|
967
|
-
let ee = (t) => {
|
|
968
|
-
y(), t ? (l("retrying to scroll to", { location: e }, Kt.DEBUG), L(p, e)) : (L(m, !0), l("list did not change, scroll successful", {}, Kt.DEBUG));
|
|
969
|
-
};
|
|
970
|
-
if (y(), S === "smooth") {
|
|
971
|
-
let e = !1;
|
|
972
|
-
v = I(t, (t) => {
|
|
973
|
-
e ||= t;
|
|
974
|
-
}), g = At(u, () => {
|
|
975
|
-
ee(e);
|
|
976
|
-
});
|
|
977
|
-
} else g = At(U(t, or(150)), ee);
|
|
978
|
-
return _ = setTimeout(() => {
|
|
979
|
-
y();
|
|
980
|
-
}, 1200), L(c, !0), l("scrolling from index to", {
|
|
981
|
-
behavior: S,
|
|
982
|
-
index: T,
|
|
983
|
-
top: E
|
|
984
|
-
}, Kt.DEBUG), {
|
|
985
|
-
behavior: S,
|
|
986
|
-
top: E
|
|
987
|
-
};
|
|
988
|
-
})), l), {
|
|
989
|
-
scrollTargetReached: m,
|
|
990
|
-
scrollToIndex: p,
|
|
991
|
-
topListHeight: h
|
|
992
|
-
};
|
|
993
|
-
}, F($n, cn, Yt), { singleton: !0 });
|
|
994
|
-
function or(e) {
|
|
995
|
-
return (t) => {
|
|
996
|
-
let n = setTimeout(() => {
|
|
997
|
-
t(!1);
|
|
998
|
-
}, e);
|
|
999
|
-
return (e) => {
|
|
1000
|
-
e && (t(!0), clearTimeout(n));
|
|
1001
|
-
};
|
|
1002
|
-
};
|
|
1003
|
-
}
|
|
1004
|
-
function sr(e, t) {
|
|
1005
|
-
e === 0 ? t() : requestAnimationFrame(() => {
|
|
1006
|
-
sr(e - 1, t);
|
|
1007
|
-
});
|
|
1008
|
-
}
|
|
1009
|
-
function cr(e, t) {
|
|
1010
|
-
if (e === void 0) return 0;
|
|
1011
|
-
let n = t - 1, r = typeof e == "number" ? e : e.index === "LAST" ? n : e.index;
|
|
1012
|
-
return Math.max(0, Math.min(r, n));
|
|
1013
|
-
}
|
|
1014
|
-
function lr(e) {
|
|
1015
|
-
return e === void 0 ? !0 : typeof e == "number" ? e === 0 : e.index === 0 && (e.align === void 0 || e.align === "start") && (e.offset === void 0 || e.offset === 0);
|
|
1016
|
-
}
|
|
1017
|
-
var ur = q(([{ defaultItemSize: e, listRefresh: t, sizes: n }, { scrollTop: r }, { scrollTargetReached: i, scrollToIndex: a }, { didMount: o }]) => {
|
|
1018
|
-
let s = G(!0), c = G(0), l = G(!0);
|
|
1019
|
-
return z(U(o, W(c), V(([e, t]) => !lr(t)), Nt(!1)), s), z(U(o, W(c), V(([e, t]) => !lr(t)), Nt(!1)), l), I(U(Wt(t, o), W(s, n, e, l), V(([[, e], t, { sizeTree: n }, r, i]) => e && (!Y(n) || wt(r)) && !t && !i), W(c)), ([, e]) => {
|
|
1020
|
-
if (e === void 0) {
|
|
1021
|
-
L(s, !0), L(l, !0);
|
|
1022
|
-
return;
|
|
1023
|
-
}
|
|
1024
|
-
At(i, () => {
|
|
1025
|
-
L(l, !0);
|
|
1026
|
-
}), sr(4, () => {
|
|
1027
|
-
At(r, () => {
|
|
1028
|
-
L(s, !0);
|
|
1029
|
-
}), L(a, e);
|
|
1030
|
-
});
|
|
1031
|
-
}), {
|
|
1032
|
-
initialItemFinalLocationReached: l,
|
|
1033
|
-
initialTopMostItemIndex: c,
|
|
1034
|
-
scrolledToInitialItem: s
|
|
1035
|
-
};
|
|
1036
|
-
}, F($n, cn, ar, nr), { singleton: !0 });
|
|
1037
|
-
function dr(e, t) {
|
|
1038
|
-
return Math.abs(e - t) < 1.01;
|
|
1039
|
-
}
|
|
1040
|
-
var fr = "up", pr = "down", mr = "none", hr = {
|
|
1041
|
-
atBottom: !1,
|
|
1042
|
-
notAtBottomBecause: "NOT_SHOWING_LAST_ITEM",
|
|
1043
|
-
state: {
|
|
1044
|
-
offsetBottom: 0,
|
|
1045
|
-
scrollHeight: 0,
|
|
1046
|
-
scrollTop: 0,
|
|
1047
|
-
viewportHeight: 0
|
|
1048
|
-
}
|
|
1049
|
-
}, gr = 0, _r = q(([{ footerHeight: e, headerHeight: t, scrollBy: n, scrollContainerState: r, scrollTop: i, viewportHeight: a }]) => {
|
|
1050
|
-
let o = G(!1), s = G(!0), c = K(), l = K(), u = G(4), d = G(gr), f = zt(U(Gt(U(J(i), Ft(1), Nt(!0)), U(J(i), Ft(1), Nt(!1), jt(100))), B()), !1), p = zt(U(Gt(U(n, Nt(!0)), U(n, Nt(!1), jt(200))), B()), !1);
|
|
1051
|
-
z(U(Wt(J(i), J(d)), H(([e, t]) => e <= t), B()), s), z(U(s, It(50)), l);
|
|
1052
|
-
let m = Bt(U(Wt(r, J(a), J(t), J(e), J(u)), Pt((e, [{ scrollHeight: t, scrollTop: n }, r, i, a, o]) => {
|
|
1053
|
-
let s = n + r - t > -o, c = {
|
|
1054
|
-
scrollHeight: t,
|
|
1055
|
-
scrollTop: n,
|
|
1056
|
-
viewportHeight: r
|
|
1057
|
-
};
|
|
1058
|
-
if (s) {
|
|
1059
|
-
let t, r;
|
|
1060
|
-
return n > e.state.scrollTop ? (t = "SCROLLED_DOWN", r = e.state.scrollTop - n) : (t = "SIZE_DECREASED", r = e.state.scrollTop - n || e.scrollTopDelta), {
|
|
1061
|
-
atBottom: !0,
|
|
1062
|
-
atBottomBecause: t,
|
|
1063
|
-
scrollTopDelta: r,
|
|
1064
|
-
state: c
|
|
1065
|
-
};
|
|
1066
|
-
}
|
|
1067
|
-
let l;
|
|
1068
|
-
return l = c.scrollHeight > e.state.scrollHeight ? "SIZE_INCREASED" : r < e.state.viewportHeight ? "VIEWPORT_HEIGHT_DECREASING" : n < e.state.scrollTop ? "SCROLLING_UPWARDS" : "NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM", {
|
|
1069
|
-
atBottom: !1,
|
|
1070
|
-
notAtBottomBecause: l,
|
|
1071
|
-
state: c
|
|
1072
|
-
};
|
|
1073
|
-
}, hr), B((e, t) => e !== void 0 && e.atBottom === t.atBottom))), h = zt(U(r, Pt((e, { scrollHeight: t, scrollTop: n, viewportHeight: r }) => {
|
|
1074
|
-
if (!dr(e.scrollHeight, t)) {
|
|
1075
|
-
let i = t - (n + r) < 1;
|
|
1076
|
-
return e.scrollTop !== n && i ? {
|
|
1077
|
-
changed: !0,
|
|
1078
|
-
jump: e.scrollTop - n,
|
|
1079
|
-
scrollHeight: t,
|
|
1080
|
-
scrollTop: n
|
|
1081
|
-
} : {
|
|
1082
|
-
changed: !0,
|
|
1083
|
-
jump: 0,
|
|
1084
|
-
scrollHeight: t,
|
|
1085
|
-
scrollTop: n
|
|
1086
|
-
};
|
|
1087
|
-
}
|
|
1088
|
-
return {
|
|
1089
|
-
changed: !1,
|
|
1090
|
-
jump: 0,
|
|
1091
|
-
scrollHeight: t,
|
|
1092
|
-
scrollTop: n
|
|
1093
|
-
};
|
|
1094
|
-
}, {
|
|
1095
|
-
changed: !1,
|
|
1096
|
-
jump: 0,
|
|
1097
|
-
scrollHeight: 0,
|
|
1098
|
-
scrollTop: 0
|
|
1099
|
-
}), V((e) => e.changed), H((e) => e.jump)), 0);
|
|
1100
|
-
z(U(m, H((e) => e.atBottom)), o), z(U(o, It(50)), c);
|
|
1101
|
-
let g = G(pr);
|
|
1102
|
-
z(U(r, H(({ scrollTop: e }) => e), B(), Pt((e, t) => R(p) ? {
|
|
1103
|
-
direction: e.direction,
|
|
1104
|
-
prevScrollTop: t
|
|
1105
|
-
} : {
|
|
1106
|
-
direction: t < e.prevScrollTop ? fr : pr,
|
|
1107
|
-
prevScrollTop: t
|
|
1108
|
-
}, {
|
|
1109
|
-
direction: pr,
|
|
1110
|
-
prevScrollTop: 0
|
|
1111
|
-
}), H((e) => e.direction)), g), z(U(r, It(50), Nt(mr)), g);
|
|
1112
|
-
let _ = G(0);
|
|
1113
|
-
return z(U(f, V((e) => !e), Nt(0)), _), z(U(i, It(100), W(f), V(([e, t]) => t), Pt(([e, t], [n]) => [t, n], [0, 0]), H(([e, t]) => t - e)), _), {
|
|
1114
|
-
atBottomState: m,
|
|
1115
|
-
atBottomStateChange: c,
|
|
1116
|
-
atBottomThreshold: u,
|
|
1117
|
-
atTopStateChange: l,
|
|
1118
|
-
atTopThreshold: d,
|
|
1119
|
-
isAtBottom: o,
|
|
1120
|
-
isAtTop: s,
|
|
1121
|
-
isScrolling: f,
|
|
1122
|
-
lastJumpDueToItemResize: h,
|
|
1123
|
-
scrollDirection: g,
|
|
1124
|
-
scrollVelocity: _
|
|
1125
|
-
};
|
|
1126
|
-
}, F(cn)), vr = "top", yr = "bottom", br = "none";
|
|
1127
|
-
function xr(e, t, n) {
|
|
1128
|
-
return typeof e == "number" ? n === fr && t === vr || n === pr && t === yr ? e : 0 : n === fr ? t === vr ? e.main : e.reverse : t === yr ? e.main : e.reverse;
|
|
1129
|
-
}
|
|
1130
|
-
function Sr(e, t) {
|
|
1131
|
-
return typeof e == "number" ? e : e[t] ?? 0;
|
|
1132
|
-
}
|
|
1133
|
-
var Cr = q(([{ deviation: e, fixedHeaderHeight: t, headerHeight: n, scrollTop: r, viewportHeight: i }]) => {
|
|
1134
|
-
let a = K(), o = G(0), s = G(0), c = G(0);
|
|
1135
|
-
return {
|
|
1136
|
-
increaseViewportBy: s,
|
|
1137
|
-
listBoundary: a,
|
|
1138
|
-
overscan: c,
|
|
1139
|
-
topListHeight: o,
|
|
1140
|
-
visibleRange: zt(U(Wt(J(r), J(i), J(n), J(a, An), J(c), J(o), J(t), J(e), J(s)), H(([e, t, n, [r, i], a, o, s, c, l]) => {
|
|
1141
|
-
let u = e - c, d = o + s, f = Math.max(n - u, 0), p = br, m = Sr(l, vr), h = Sr(l, yr);
|
|
1142
|
-
return r -= c, r += n + s, i += n + s, i -= c, r > e + d - m && (p = fr), i < e - f + t + h && (p = pr), p === br ? null : [Math.max(u - n - xr(a, vr, p) - m, 0), u - f - s + t + xr(a, yr, p) + h];
|
|
1143
|
-
}), V((e) => e !== null), B(An)), [0, 0])
|
|
1144
|
-
};
|
|
1145
|
-
}, F(cn), { singleton: !0 });
|
|
1146
|
-
function wr(e, t, n) {
|
|
1147
|
-
if (In(t)) {
|
|
1148
|
-
let r = Un(e, t);
|
|
1149
|
-
return [{
|
|
1150
|
-
index: fn(t.groupOffsetTree, r)[0],
|
|
1151
|
-
offset: 0,
|
|
1152
|
-
size: 0
|
|
1153
|
-
}, {
|
|
1154
|
-
data: n?.[0],
|
|
1155
|
-
index: r,
|
|
1156
|
-
offset: 0,
|
|
1157
|
-
size: 0
|
|
1158
|
-
}];
|
|
1159
|
-
}
|
|
1160
|
-
return [{
|
|
1161
|
-
data: n?.[0],
|
|
1162
|
-
index: e,
|
|
1163
|
-
offset: 0,
|
|
1164
|
-
size: 0
|
|
1165
|
-
}];
|
|
1166
|
-
}
|
|
1167
|
-
var Tr = {
|
|
1168
|
-
bottom: 0,
|
|
1169
|
-
firstItemIndex: 0,
|
|
1170
|
-
items: [],
|
|
1171
|
-
offsetBottom: 0,
|
|
1172
|
-
offsetTop: 0,
|
|
1173
|
-
top: 0,
|
|
1174
|
-
topItems: [],
|
|
1175
|
-
topListHeight: 0,
|
|
1176
|
-
totalCount: 0
|
|
1177
|
-
};
|
|
1178
|
-
function Er(e, t, n, r, i, a) {
|
|
1179
|
-
let { lastIndex: o, lastOffset: s, lastSize: c } = i, l = 0, u = 0;
|
|
1180
|
-
if (e.length > 0) {
|
|
1181
|
-
l = e[0].offset;
|
|
1182
|
-
let t = e[e.length - 1];
|
|
1183
|
-
u = t.offset + t.size;
|
|
1184
|
-
}
|
|
1185
|
-
let d = n - o, f = s + d * c + (d - 1) * r, p = l, m = f - u;
|
|
1186
|
-
return {
|
|
1187
|
-
bottom: u,
|
|
1188
|
-
firstItemIndex: a,
|
|
1189
|
-
items: Or(e, i, a),
|
|
1190
|
-
offsetBottom: m,
|
|
1191
|
-
offsetTop: l,
|
|
1192
|
-
top: p,
|
|
1193
|
-
topItems: Or(t, i, a),
|
|
1194
|
-
topListHeight: t.reduce((e, t) => t.size + e, 0),
|
|
1195
|
-
totalCount: n
|
|
1196
|
-
};
|
|
1197
|
-
}
|
|
1198
|
-
function Dr(e, t, n, r, i, a) {
|
|
1199
|
-
let o = 0;
|
|
1200
|
-
if (n.groupIndices.length > 0) for (let t of n.groupIndices) {
|
|
1201
|
-
if (t - o >= e) break;
|
|
1202
|
-
o++;
|
|
1203
|
-
}
|
|
1204
|
-
let s = e + o, c = cr(t, s);
|
|
1205
|
-
return Er(Array.from({ length: s }).map((e, t) => ({
|
|
1206
|
-
data: a[t + c],
|
|
1207
|
-
index: t + c,
|
|
1208
|
-
offset: 0,
|
|
1209
|
-
size: 0
|
|
1210
|
-
})), [], s, i, n, r);
|
|
1211
|
-
}
|
|
1212
|
-
function Or(e, t, n) {
|
|
1213
|
-
if (e.length === 0) return [];
|
|
1214
|
-
if (!In(t)) return e.map((e) => ({
|
|
1215
|
-
...e,
|
|
1216
|
-
index: e.index + n,
|
|
1217
|
-
originalIndex: e.index
|
|
1218
|
-
}));
|
|
1219
|
-
let r = e[0].index, i = e[e.length - 1].index, a = [], o = hn(t.groupOffsetTree, r, i), s, c = 0;
|
|
1220
|
-
for (let r of e) {
|
|
1221
|
-
(!s || s.end < r.index) && (s = o.shift(), c = t.groupIndices.indexOf(s.start));
|
|
1222
|
-
let e;
|
|
1223
|
-
e = r.index === s.start ? {
|
|
1224
|
-
index: c,
|
|
1225
|
-
type: "group"
|
|
1226
|
-
} : {
|
|
1227
|
-
groupIndex: c,
|
|
1228
|
-
index: r.index - (c + 1) + n
|
|
1229
|
-
}, a.push({
|
|
1230
|
-
...e,
|
|
1231
|
-
data: r.data,
|
|
1232
|
-
offset: r.offset,
|
|
1233
|
-
originalIndex: r.index,
|
|
1234
|
-
size: r.size
|
|
1235
|
-
});
|
|
1236
|
-
}
|
|
1237
|
-
return a;
|
|
1238
|
-
}
|
|
1239
|
-
function kr(e, t) {
|
|
1240
|
-
return e === void 0 ? 0 : typeof e == "number" ? e : e[t] ?? 0;
|
|
1241
|
-
}
|
|
1242
|
-
var Ar = q(([{ data: e, firstItemIndex: t, gap: n, sizes: r, totalCount: i }, a, { listBoundary: o, topListHeight: s, visibleRange: c }, { initialTopMostItemIndex: l, scrolledToInitialItem: u }, { topListHeight: d }, f, { didMount: p }, { recalcInProgress: m }]) => {
|
|
1243
|
-
let h = G([]), g = G(0), _ = K(), v = G(0);
|
|
1244
|
-
z(a.topItemsIndexes, h);
|
|
1245
|
-
let y = zt(U(Wt(p, m, J(c, An), J(i), J(r), J(l), u, J(h), J(t), J(n), J(v), e), V(([e, t, , n, , , , , , , , r]) => {
|
|
1246
|
-
let i = r !== void 0 && r.length !== n;
|
|
1247
|
-
return e && !t && !i;
|
|
1248
|
-
}), H(([, , [e, t], n, r, i, a, o, s, c, l, u]) => {
|
|
1249
|
-
let d = r, { offsetTree: f, sizeTree: p } = d, m = R(g);
|
|
1250
|
-
if (n === 0) return {
|
|
1251
|
-
...Tr,
|
|
1252
|
-
totalCount: n
|
|
1253
|
-
};
|
|
1254
|
-
if (e === 0 && t === 0) return m === 0 ? {
|
|
1255
|
-
...Tr,
|
|
1256
|
-
totalCount: n
|
|
1257
|
-
} : Dr(m, i, r, s, c, u || []);
|
|
1258
|
-
if (Y(p)) return m > 0 ? null : Er(wr(cr(i, n), d, u), [], n, c, d, s);
|
|
1259
|
-
let h = [];
|
|
1260
|
-
if (o.length > 0) {
|
|
1261
|
-
let e = o[0], t = o[o.length - 1], n = 0;
|
|
1262
|
-
for (let r of hn(p, e, t)) {
|
|
1263
|
-
let i = r.value, a = Math.max(r.start, e), o = Math.min(r.end, t);
|
|
1264
|
-
for (let e = a; e <= o; e++) h.push({
|
|
1265
|
-
data: u?.[e],
|
|
1266
|
-
index: e,
|
|
1267
|
-
offset: n,
|
|
1268
|
-
size: i
|
|
1269
|
-
}), n += i;
|
|
1270
|
-
}
|
|
1271
|
-
}
|
|
1272
|
-
if (!a) return Er([], h, n, c, d, s);
|
|
1273
|
-
let _ = o.length > 0 ? o[o.length - 1] + 1 : 0, v = Gn(f, e, t, _);
|
|
1274
|
-
if (v.length === 0) return null;
|
|
1275
|
-
let y = n - 1, b = Dt([], (n) => {
|
|
1276
|
-
for (let r of v) {
|
|
1277
|
-
let i = r.value, a = i.offset, o = r.start, s = i.size;
|
|
1278
|
-
if (i.offset < e) {
|
|
1279
|
-
o += Math.floor((e - i.offset + c) / (s + c));
|
|
1280
|
-
let t = o - r.start;
|
|
1281
|
-
a += t * s + t * c;
|
|
1282
|
-
}
|
|
1283
|
-
o < _ && (a += (_ - o) * s, o = _);
|
|
1284
|
-
let l = Math.min(r.end, y);
|
|
1285
|
-
for (let e = o; e <= l && !(a >= t); e++) n.push({
|
|
1286
|
-
data: u?.[e],
|
|
1287
|
-
index: e,
|
|
1288
|
-
offset: a,
|
|
1289
|
-
size: s
|
|
1290
|
-
}), a += s + c;
|
|
1291
|
-
}
|
|
1292
|
-
}), x = kr(l, vr), S = kr(l, yr);
|
|
1293
|
-
if (b.length > 0 && (x > 0 || S > 0)) {
|
|
1294
|
-
let e = b[0], t = b[b.length - 1];
|
|
1295
|
-
if (x > 0 && e.index > _) {
|
|
1296
|
-
let t = Math.min(x, e.index - _), n = [], r = e.offset;
|
|
1297
|
-
for (let i = e.index - 1; i >= e.index - t; i--) {
|
|
1298
|
-
let t = hn(p, i, i)[0]?.value ?? e.size;
|
|
1299
|
-
r -= t + c, n.unshift({
|
|
1300
|
-
data: u?.[i],
|
|
1301
|
-
index: i,
|
|
1302
|
-
offset: r,
|
|
1303
|
-
size: t
|
|
1304
|
-
});
|
|
1305
|
-
}
|
|
1306
|
-
b.unshift(...n);
|
|
1307
|
-
}
|
|
1308
|
-
if (S > 0 && t.index < y) {
|
|
1309
|
-
let e = Math.min(S, y - t.index), n = t.offset + t.size + c;
|
|
1310
|
-
for (let r = t.index + 1; r <= t.index + e; r++) {
|
|
1311
|
-
let e = hn(p, r, r)[0]?.value ?? t.size;
|
|
1312
|
-
b.push({
|
|
1313
|
-
data: u?.[r],
|
|
1314
|
-
index: r,
|
|
1315
|
-
offset: n,
|
|
1316
|
-
size: e
|
|
1317
|
-
}), n += e + c;
|
|
1318
|
-
}
|
|
1319
|
-
}
|
|
1320
|
-
}
|
|
1321
|
-
return Er(b, h, n, c, d, s);
|
|
1322
|
-
}), V((e) => e !== null), B()), Tr);
|
|
1323
|
-
z(U(e, V(wt), H((e) => e?.length)), i), z(U(y, H((e) => e.topListHeight)), d), z(d, s), z(U(y, H((e) => [e.top, e.bottom])), o), z(U(y, H((e) => e.items)), _);
|
|
1324
|
-
let b = Bt(U(y, V(({ items: e }) => e.length > 0), W(i, e), V(([{ items: e }, t]) => e[e.length - 1].originalIndex === t - 1), H(([, e, t]) => [e - 1, t]), B(An), H(([e]) => e))), x = Bt(U(y, It(200), V(({ items: e, topItems: t }) => e.length > 0 && e[0].originalIndex === t.length), H(({ items: e }) => e[0].index), B()));
|
|
1325
|
-
return {
|
|
1326
|
-
endReached: b,
|
|
1327
|
-
initialItemCount: g,
|
|
1328
|
-
itemsRendered: _,
|
|
1329
|
-
listState: y,
|
|
1330
|
-
minOverscanItemCount: v,
|
|
1331
|
-
rangeChanged: Bt(U(y, V(({ items: e }) => e.length > 0), H(({ items: e }) => {
|
|
1332
|
-
let t = 0, n = e.length - 1;
|
|
1333
|
-
for (; e[t].type === "group" && t < n;) t++;
|
|
1334
|
-
for (; e[n].type === "group" && n > t;) n--;
|
|
1335
|
-
return {
|
|
1336
|
-
endIndex: e[n].index,
|
|
1337
|
-
startIndex: e[t].index
|
|
1338
|
-
};
|
|
1339
|
-
}), B(kn))),
|
|
1340
|
-
startReached: x,
|
|
1341
|
-
topItemsIndexes: h,
|
|
1342
|
-
...f
|
|
1343
|
-
};
|
|
1344
|
-
}, F($n, tr, Cr, ur, ar, _r, nr, jn), { singleton: !0 }), jr = q(([{ fixedFooterHeight: e, fixedHeaderHeight: t, footerHeight: n, headerHeight: r }, { listState: i }]) => {
|
|
1345
|
-
let a = K(), o = zt(U(Wt(n, e, r, t, i), H(([e, t, n, r, i]) => e + t + n + r + i.offsetBottom + i.bottom)), 0);
|
|
1346
|
-
return z(J(o), a), {
|
|
1347
|
-
totalListHeight: o,
|
|
1348
|
-
totalListHeightChanged: a
|
|
1349
|
-
};
|
|
1350
|
-
}, F(cn, Ar), { singleton: !0 }), Mr = q(([{ viewportHeight: e }, { totalListHeight: t }]) => {
|
|
1351
|
-
let n = G(!1);
|
|
1352
|
-
return {
|
|
1353
|
-
alignToBottom: n,
|
|
1354
|
-
paddingTopAddition: zt(U(Wt(n, e, t), V(([e]) => e), H(([, e, t]) => Math.max(0, e - t)), It(0), B()), 0)
|
|
1355
|
-
};
|
|
1356
|
-
}, F(cn, jr), { singleton: !0 }), Nr = q(() => ({ context: G(null) })), Pr = ({ itemBottom: e, itemTop: t, locationParams: { align: n, behavior: r, ...i }, viewportBottom: a, viewportTop: o }) => t < o ? {
|
|
1357
|
-
...i,
|
|
1358
|
-
align: n ?? "start",
|
|
1359
|
-
...r === void 0 ? {} : { behavior: r }
|
|
1360
|
-
} : e > a ? {
|
|
1361
|
-
...i,
|
|
1362
|
-
align: n ?? "end",
|
|
1363
|
-
...r === void 0 ? {} : { behavior: r }
|
|
1364
|
-
} : null, Fr = q(([{ gap: e, sizes: t, totalCount: n }, { fixedFooterHeight: r, fixedHeaderHeight: i, headerHeight: a, scrollingInProgress: o, scrollTop: s, viewportHeight: c }, { scrollToIndex: l }]) => {
|
|
1365
|
-
let u = K();
|
|
1366
|
-
return z(U(u, W(t, c, n, a, i, r, s), W(e), H(([[e, t, n, r, i, a, s, c], l]) => {
|
|
1367
|
-
let { calculateViewLocation: u = Pr, done: d, ...f } = e, p = Wn(e, t, r - 1), m = Hn(p, t.offsetTree, l) + i + a, h = m + fn(t.sizeTree, p)[1], g = c + a, _ = u({
|
|
1368
|
-
itemBottom: h,
|
|
1369
|
-
itemTop: m,
|
|
1370
|
-
locationParams: f,
|
|
1371
|
-
viewportBottom: c + n - s,
|
|
1372
|
-
viewportTop: g
|
|
1373
|
-
});
|
|
1374
|
-
return _ === null ? d?.() : d && At(U(o, V((e) => !e), Ft(R(o) ? 1 : 2)), d), _;
|
|
1375
|
-
}), V((e) => e !== null)), l), { scrollIntoView: u };
|
|
1376
|
-
}, F($n, cn, ar, Ar, Yt), { singleton: !0 });
|
|
1377
|
-
function Ir(e) {
|
|
1378
|
-
return e === !1 ? !1 : e === "smooth" ? "smooth" : "auto";
|
|
1379
|
-
}
|
|
1380
|
-
var Lr = (e, t) => typeof e == "function" ? Ir(e(t)) : t && Ir(e), Rr = q(([{ listRefresh: e, totalCount: t, fixedItemSize: n, data: r }, { atBottomState: i, isAtBottom: a }, { scrollToIndex: o }, { scrolledToInitialItem: s }, { didMount: c, propsReady: l }, { log: u }, { scrollingInProgress: d }, { context: f }, { scrollIntoView: p }]) => {
|
|
1381
|
-
let m = G(!1), h = K(), g = null;
|
|
1382
|
-
function _(e) {
|
|
1383
|
-
L(o, {
|
|
1384
|
-
align: "end",
|
|
1385
|
-
behavior: e,
|
|
1386
|
-
index: "LAST"
|
|
1387
|
-
});
|
|
1388
|
-
}
|
|
1389
|
-
I(U(Wt(U(J(t), Ft(1)), c), W(J(m), a, s, d), H(([[e, t], n, r, i, a]) => {
|
|
1390
|
-
let o = t && i, s = "auto";
|
|
1391
|
-
return o && (s = Lr(n, r || a), o &&= s !== !1), {
|
|
1392
|
-
followOutputBehavior: s,
|
|
1393
|
-
shouldFollow: o,
|
|
1394
|
-
totalCount: e
|
|
1395
|
-
};
|
|
1396
|
-
}), V(({ shouldFollow: e }) => e)), ({ followOutputBehavior: t, totalCount: r }) => {
|
|
1397
|
-
g !== null && (g(), g = null), R(n) === void 0 ? g = At(e, () => {
|
|
1398
|
-
R(u)("following output to ", { totalCount: r }, Kt.DEBUG), _(t), g = null;
|
|
1399
|
-
}) : requestAnimationFrame(() => {
|
|
1400
|
-
R(u)("following output to ", { totalCount: r }, Kt.DEBUG), _(t);
|
|
1401
|
-
});
|
|
1402
|
-
});
|
|
1403
|
-
function v(e) {
|
|
1404
|
-
let t = At(i, (t) => {
|
|
1405
|
-
e && !t.atBottom && t.notAtBottomBecause === "SIZE_INCREASED" && g === null && (R(u)("scrolling to bottom due to increased size", {}, Kt.DEBUG), _("auto"));
|
|
1406
|
-
});
|
|
1407
|
-
setTimeout(t, 100);
|
|
1408
|
-
}
|
|
1409
|
-
I(U(Wt(J(m), t, l), V(([e, , t]) => e !== !1 && t), Pt(({ value: e }, [, t]) => ({
|
|
1410
|
-
refreshed: e === t,
|
|
1411
|
-
value: t
|
|
1412
|
-
}), {
|
|
1413
|
-
refreshed: !1,
|
|
1414
|
-
value: 0
|
|
1415
|
-
}), V(({ refreshed: e }) => e), W(m, t)), ([, e]) => {
|
|
1416
|
-
R(s) && v(e !== !1);
|
|
1417
|
-
}), I(h, () => {
|
|
1418
|
-
v(R(m) !== !1);
|
|
1419
|
-
}), I(Wt(J(m), i), ([e, t]) => {
|
|
1420
|
-
e !== !1 && !t.atBottom && t.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && _("auto");
|
|
1421
|
-
});
|
|
1422
|
-
let y = G(null), b = K();
|
|
1423
|
-
return z(Gt(U(J(r), H((e) => e?.length ?? 0)), U(J(t))), b), I(U(Wt(U(b, Ft(1)), c), W(J(y), s, d, f), H(([[e, t], n, r, i, a]) => t && r && n?.({
|
|
1424
|
-
context: a,
|
|
1425
|
-
totalCount: e,
|
|
1426
|
-
scrollingInProgress: i
|
|
1427
|
-
})), V((e) => !!e), It(0)), (t) => {
|
|
1428
|
-
g !== null && (g(), g = null), R(n) === void 0 ? g = At(e, () => {
|
|
1429
|
-
R(u)("scrolling into view", {}), L(p, t), g = null;
|
|
1430
|
-
}) : requestAnimationFrame(() => {
|
|
1431
|
-
R(u)("scrolling into view", {}), L(p, t);
|
|
1432
|
-
});
|
|
1433
|
-
}), {
|
|
1434
|
-
autoscrollToBottom: h,
|
|
1435
|
-
followOutput: m,
|
|
1436
|
-
scrollIntoViewOnChange: y
|
|
1437
|
-
};
|
|
1438
|
-
}, F($n, _r, ar, ur, nr, Yt, cn, Nr, Fr)), zr = q(([{ data: e, firstItemIndex: t, gap: n, sizes: r }, { initialTopMostItemIndex: i }, { initialItemCount: a, listState: o }, { didMount: s }]) => (z(U(s, W(a), V(([, e]) => e !== 0), W(i, r, t, n, e), H(([[, e], t, n, r, i, a = []]) => Dr(e, t, n, r, i, a))), o), {}), F($n, ur, Ar, nr), { singleton: !0 }), Br = q(([{ didMount: e }, { scrollTo: t }, { listState: n }]) => {
|
|
1439
|
-
let r = G(0);
|
|
1440
|
-
return I(U(e, W(r), V(([, e]) => e !== 0), H(([, e]) => ({ top: e }))), (e) => {
|
|
1441
|
-
At(U(n, Ft(1), V((e) => e.items.length > 1)), () => {
|
|
1442
|
-
requestAnimationFrame(() => {
|
|
1443
|
-
L(t, e);
|
|
1444
|
-
});
|
|
1445
|
-
});
|
|
1446
|
-
}), { initialScrollTop: r };
|
|
1447
|
-
}, F(nr, cn, Ar), { singleton: !0 }), Vr = q(([{ scrollVelocity: e }]) => {
|
|
1448
|
-
let t = G(!1), n = K(), r = G(!1);
|
|
1449
|
-
return z(U(e, W(r, t, n), V(([e, t]) => t !== !1 && t !== void 0), H(([e, t, n, r]) => {
|
|
1450
|
-
let { enter: i, exit: a } = t;
|
|
1451
|
-
if (n) {
|
|
1452
|
-
if (a(e, r)) return !1;
|
|
1453
|
-
} else if (i(e, r)) return !0;
|
|
1454
|
-
return n;
|
|
1455
|
-
}), B()), t), I(U(Wt(t, e, n), W(r)), ([[e, t, n], r]) => {
|
|
1456
|
-
e && r !== !1 && r !== void 0 && r.change && r.change(t, n);
|
|
1457
|
-
}), {
|
|
1458
|
-
isSeeking: t,
|
|
1459
|
-
scrollSeekConfiguration: r,
|
|
1460
|
-
scrollSeekRangeChanged: n,
|
|
1461
|
-
scrollVelocity: e
|
|
1462
|
-
};
|
|
1463
|
-
}, F(_r), { singleton: !0 }), Hr = q(([{ scrollContainerState: e, scrollTo: t }]) => {
|
|
1464
|
-
let n = K(), r = K(), i = K(), a = G(!1), o = G(void 0);
|
|
1465
|
-
return z(U(Wt(n, r), H(([{ scrollTop: e, viewportHeight: t }, { offsetTop: n, listHeight: r }]) => ({
|
|
1466
|
-
scrollHeight: r,
|
|
1467
|
-
scrollTop: Math.max(0, e - n),
|
|
1468
|
-
viewportHeight: t
|
|
1469
|
-
}))), e), z(U(t, W(r), H(([e, { offsetTop: t }]) => ({
|
|
1470
|
-
...e,
|
|
1471
|
-
top: e.top + t
|
|
1472
|
-
}))), i), {
|
|
1473
|
-
customScrollParent: o,
|
|
1474
|
-
useWindowScroll: a,
|
|
1475
|
-
windowScrollContainerState: n,
|
|
1476
|
-
windowScrollTo: i,
|
|
1477
|
-
windowViewportRect: r
|
|
1478
|
-
};
|
|
1479
|
-
}, F(cn)), Ur = q(([{ sizeRanges: e, sizes: t }, { headerHeight: n, scrollTop: r }, { initialTopMostItemIndex: i }, { didMount: a }, { useWindowScroll: o, windowScrollContainerState: s, windowViewportRect: c }]) => {
|
|
1480
|
-
let l = K(), u = G(void 0), d = G(null), f = G(null);
|
|
1481
|
-
return z(s, d), z(c, f), I(U(l, W(t, r, o, d, f, n)), ([e, t, n, r, i, a, o]) => {
|
|
1482
|
-
let s = qn(t.sizeTree);
|
|
1483
|
-
r && i !== null && a !== null && (n = i.scrollTop - a.offsetTop), n -= o, e({
|
|
1484
|
-
ranges: s,
|
|
1485
|
-
scrollTop: n
|
|
1486
|
-
});
|
|
1487
|
-
}), z(U(u, V(wt), H(Wr)), i), z(U(a, W(u), V(([, e]) => e !== void 0), B(), H(([, e]) => e.ranges)), e), {
|
|
1488
|
-
getState: l,
|
|
1489
|
-
restoreStateFrom: u
|
|
1490
|
-
};
|
|
1491
|
-
}, F($n, cn, ur, nr, Hr));
|
|
1492
|
-
function Wr(e) {
|
|
1493
|
-
return {
|
|
1494
|
-
align: "start",
|
|
1495
|
-
index: 0,
|
|
1496
|
-
offset: e.scrollTop
|
|
1497
|
-
};
|
|
1498
|
-
}
|
|
1499
|
-
var Gr = q(([{ topItemsIndexes: e }]) => {
|
|
1500
|
-
let t = G(0);
|
|
1501
|
-
return z(U(t, V((e) => e >= 0), H((e) => Array.from({ length: e }).map((e, t) => t))), e), { topItemCount: t };
|
|
1502
|
-
}, F(Ar));
|
|
1503
|
-
function Kr(e) {
|
|
1504
|
-
let t = !1, n;
|
|
1505
|
-
return (() => (t || (t = !0, n = e()), n));
|
|
1506
|
-
}
|
|
1507
|
-
var qr = Kr(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(navigator.userAgent)), Jr = q(([{ data: e, defaultItemSize: t, firstItemIndex: n, fixedItemSize: r, fixedGroupSize: i, gap: a, groupIndices: o, heightEstimates: s, itemSize: c, sizeRanges: l, sizes: u, statefulTotalCount: d, totalCount: f, trackItemSizes: p }, { initialItemFinalLocationReached: m, initialTopMostItemIndex: h, scrolledToInitialItem: g }, _, v, y, b, { scrollToIndex: x }, S, { topItemCount: C }, { groupCounts: w }, T]) => {
|
|
1508
|
-
let { listState: E, minOverscanItemCount: ee, topItemsIndexes: te, rangeChanged: ne, ...D } = b;
|
|
1509
|
-
return z(ne, T.scrollSeekRangeChanged), z(U(Wt(T.windowViewportRect, _.headerHeight, _.fixedHeaderHeight), H(([e, t, n]) => Math.max(t + n + 1, e.visibleHeight))), _.viewportHeight), {
|
|
1510
|
-
data: e,
|
|
1511
|
-
defaultItemHeight: t,
|
|
1512
|
-
firstItemIndex: n,
|
|
1513
|
-
fixedItemHeight: r,
|
|
1514
|
-
fixedGroupHeight: i,
|
|
1515
|
-
gap: a,
|
|
1516
|
-
groupCounts: w,
|
|
1517
|
-
heightEstimates: s,
|
|
1518
|
-
initialItemFinalLocationReached: m,
|
|
1519
|
-
initialTopMostItemIndex: h,
|
|
1520
|
-
scrolledToInitialItem: g,
|
|
1521
|
-
sizeRanges: l,
|
|
1522
|
-
topItemCount: C,
|
|
1523
|
-
topItemsIndexes: te,
|
|
1524
|
-
totalCount: f,
|
|
1525
|
-
...y,
|
|
1526
|
-
groupIndices: o,
|
|
1527
|
-
itemSize: c,
|
|
1528
|
-
listState: E,
|
|
1529
|
-
minOverscanItemCount: ee,
|
|
1530
|
-
scrollToIndex: x,
|
|
1531
|
-
statefulTotalCount: d,
|
|
1532
|
-
trackItemSizes: p,
|
|
1533
|
-
rangeChanged: ne,
|
|
1534
|
-
...D,
|
|
1535
|
-
...T,
|
|
1536
|
-
..._,
|
|
1537
|
-
sizes: u,
|
|
1538
|
-
...v
|
|
1539
|
-
};
|
|
1540
|
-
}, F($n, ur, cn, Ur, Rr, Ar, ar, q(([{ deviation: e, deviationCommitted: t, scrollBy: n, scrollingInProgress: r, scrollTop: i }, { isAtBottom: a, isScrolling: o, lastJumpDueToItemResize: s, scrollDirection: c }, { listState: l }, { beforeUnshiftWith: u, gap: d, shiftWithOffset: f, sizes: p }, { log: m }, { recalcInProgress: h }]) => {
|
|
1541
|
-
let g = Bt(U(l, W(s), Pt(([, e, t, n], [{ bottom: r, items: i, offsetBottom: a, totalCount: o }, s]) => {
|
|
1542
|
-
let c = r + a, l = 0;
|
|
1543
|
-
return t === o && e.length > 0 && i.length > 0 && (i[0].originalIndex === 0 && e[0].originalIndex === 0 || (l = c - n, l !== 0 && (l += s))), [
|
|
1544
|
-
l,
|
|
1545
|
-
i,
|
|
1546
|
-
o,
|
|
1547
|
-
c
|
|
1548
|
-
];
|
|
1549
|
-
}, [
|
|
1550
|
-
0,
|
|
1551
|
-
[],
|
|
1552
|
-
0,
|
|
1553
|
-
0
|
|
1554
|
-
]), V(([e]) => e !== 0), W(i, c, r, a, m, h), V(([, e, t, n, , , r]) => !r && !n && e !== 0 && t === fr), H(([[e], , , , , t]) => (t("Upward scrolling compensation", { amount: e }, Kt.DEBUG), e))));
|
|
1555
|
-
function _(t) {
|
|
1556
|
-
t > 0 ? (L(n, {
|
|
1557
|
-
behavior: "auto",
|
|
1558
|
-
top: -t
|
|
1559
|
-
}), L(e, 0)) : (L(e, 0), L(n, {
|
|
1560
|
-
behavior: "auto",
|
|
1561
|
-
top: -t
|
|
1562
|
-
}));
|
|
1563
|
-
}
|
|
1564
|
-
I(U(g, W(e, o)), ([t, n, r]) => {
|
|
1565
|
-
r && qr() ? L(e, n - t) : _(-t);
|
|
1566
|
-
}), I(U(Wt(zt(o, !1), e, h), V(([e, t, n]) => !e && !n && t !== 0), H(([e, t]) => t), It(1)), _), z(U(f, H((e) => ({ top: -e }))), n);
|
|
1567
|
-
let v = null;
|
|
1568
|
-
function y() {
|
|
1569
|
-
if (v === null) return;
|
|
1570
|
-
let { offset: t } = v;
|
|
1571
|
-
v = null, L(n, { top: t }), requestAnimationFrame(() => {
|
|
1572
|
-
L(e, 0), L(h, !1);
|
|
1573
|
-
});
|
|
1574
|
-
}
|
|
1575
|
-
return I(t, (e) => {
|
|
1576
|
-
v === null || !v.acknowledgeable || e === v.offset && y();
|
|
1577
|
-
}), I(U(u, W(p, d), H(([e, { groupIndices: t, lastSize: n, sizeTree: r }, i]) => {
|
|
1578
|
-
function a(e) {
|
|
1579
|
-
return e * (n + i);
|
|
1580
|
-
}
|
|
1581
|
-
if (t.length === 0) return a(e);
|
|
1582
|
-
let o = 0, s = dn(r, 0), c = 0, l = 0;
|
|
1583
|
-
for (; c < e;) {
|
|
1584
|
-
c++, o += s;
|
|
1585
|
-
let n = t.length === l + 1 ? 1 / 0 : t[l + 1] - t[l] - 1;
|
|
1586
|
-
c + n > e && (o -= s, n = e - c + 1), c += n, o += a(n), l++;
|
|
1587
|
-
}
|
|
1588
|
-
return o;
|
|
1589
|
-
})), (t) => {
|
|
1590
|
-
v = {
|
|
1591
|
-
acknowledgeable: R(e) !== t,
|
|
1592
|
-
offset: t
|
|
1593
|
-
}, L(e, t), requestAnimationFrame(y);
|
|
1594
|
-
}), { deviation: e };
|
|
1595
|
-
}, F(cn, _r, Ar, $n, Yt, jn)), Gr, tr, q(([e, t, n, r, i, a, o, s, c, l, u]) => ({
|
|
1596
|
-
...e,
|
|
1597
|
-
...t,
|
|
1598
|
-
...n,
|
|
1599
|
-
...r,
|
|
1600
|
-
...i,
|
|
1601
|
-
...a,
|
|
1602
|
-
...o,
|
|
1603
|
-
...s,
|
|
1604
|
-
...c,
|
|
1605
|
-
...l,
|
|
1606
|
-
...u
|
|
1607
|
-
}), F(Cr, zr, nr, Vr, jr, Br, Mr, Hr, Fr, Yt, Nr))));
|
|
1608
|
-
function Yr(e, t) {
|
|
1609
|
-
let n = {}, r = {}, i = 0, a = e.length;
|
|
1610
|
-
for (; i < a;) r[e[i]] = 1, i += 1;
|
|
1611
|
-
for (let e in t) Object.hasOwn(r, e) || (n[e] = t[e]);
|
|
1612
|
-
return n;
|
|
1613
|
-
}
|
|
1614
|
-
var Xr = typeof document > "u" ? A.useEffect : A.useLayoutEffect;
|
|
1615
|
-
function Zr(e, t, n) {
|
|
1616
|
-
let r = Object.keys(t.required || {}), i = Object.keys(t.optional || {}), a = Object.keys(t.methods || {}), o = Object.keys(t.events || {}), s = A.createContext({});
|
|
1617
|
-
function c(e, n) {
|
|
1618
|
-
e.propsReady !== void 0 && L(e.propsReady, !1);
|
|
1619
|
-
for (let i of r) {
|
|
1620
|
-
let r = e[t.required[i]];
|
|
1621
|
-
L(r, n[i]);
|
|
1622
|
-
}
|
|
1623
|
-
for (let r of i) if (r in n) {
|
|
1624
|
-
let i = e[t.optional[r]];
|
|
1625
|
-
L(i, n[r]);
|
|
1626
|
-
}
|
|
1627
|
-
e.propsReady !== void 0 && L(e.propsReady, !0);
|
|
1628
|
-
}
|
|
1629
|
-
function l(e) {
|
|
1630
|
-
return a.reduce((n, r) => (n[r] = (n) => {
|
|
1631
|
-
let i = e[t.methods[r]];
|
|
1632
|
-
L(i, n);
|
|
1633
|
-
}, n), {});
|
|
1634
|
-
}
|
|
1635
|
-
function u(e) {
|
|
1636
|
-
return o.reduce((n, r) => (n[r] = Rt(e[t.events[r]]), n), {});
|
|
1637
|
-
}
|
|
1638
|
-
return {
|
|
1639
|
-
Component: A.forwardRef(function(t, a) {
|
|
1640
|
-
let { children: d, ...f } = t, [p] = A.useState(() => Dt(Ut(e), (e) => {
|
|
1641
|
-
c(e, f);
|
|
1642
|
-
})), [m] = A.useState(St(u, p));
|
|
1643
|
-
Xr(() => {
|
|
1644
|
-
for (let e of o) e in f && I(m[e], f[e]);
|
|
1645
|
-
return () => {
|
|
1646
|
-
Object.values(m).map(kt);
|
|
1647
|
-
};
|
|
1648
|
-
}, [
|
|
1649
|
-
f,
|
|
1650
|
-
m,
|
|
1651
|
-
p
|
|
1652
|
-
]), Xr(() => {
|
|
1653
|
-
c(p, f);
|
|
1654
|
-
}), A.useImperativeHandle(a, yt(l(p)));
|
|
1655
|
-
let h = n;
|
|
1656
|
-
return /* @__PURE__ */ N(s.Provider, {
|
|
1657
|
-
value: p,
|
|
1658
|
-
children: n === void 0 ? d : /* @__PURE__ */ N(h, {
|
|
1659
|
-
...Yr([
|
|
1660
|
-
...r,
|
|
1661
|
-
...i,
|
|
1662
|
-
...o
|
|
1663
|
-
], f),
|
|
1664
|
-
children: d
|
|
1665
|
-
})
|
|
1666
|
-
});
|
|
1667
|
-
}),
|
|
1668
|
-
useEmitter: (e, t) => {
|
|
1669
|
-
let n = A.useContext(s)[e];
|
|
1670
|
-
Xr(() => I(n, t), [t, n]);
|
|
1671
|
-
},
|
|
1672
|
-
useEmitterValue: parseInt(A.version, 10) >= 18 ? (e) => {
|
|
1673
|
-
let t = A.useContext(s)[e], n = A.useCallback((e) => I(t, e), [t]);
|
|
1674
|
-
return A.useSyncExternalStore(n, () => R(t), () => R(t));
|
|
1675
|
-
} : (e) => {
|
|
1676
|
-
let t = A.useContext(s)[e], [n, r] = A.useState(St(R, t));
|
|
1677
|
-
return Xr(() => I(t, (e) => {
|
|
1678
|
-
e !== n && r(yt(e));
|
|
1679
|
-
}), [t, n]), n;
|
|
1680
|
-
},
|
|
1681
|
-
usePublisher: (e) => {
|
|
1682
|
-
let t = A.useContext(s);
|
|
1683
|
-
return A.useCallback((n) => {
|
|
1684
|
-
L(t[e], n);
|
|
1685
|
-
}, [t, e]);
|
|
1686
|
-
}
|
|
1687
|
-
};
|
|
1688
|
-
}
|
|
1689
|
-
var Qr = A.createContext(void 0), $r = A.createContext(void 0), ei = "-webkit-sticky", ti = "sticky", ni = Kr(() => {
|
|
1690
|
-
if (typeof document > "u") return ti;
|
|
1691
|
-
let e = document.createElement("div");
|
|
1692
|
-
return e.style.position = ei, e.style.position === ei ? ei : ti;
|
|
1693
|
-
});
|
|
1694
|
-
function ri(e) {
|
|
1695
|
-
return "self" in e;
|
|
1696
|
-
}
|
|
1697
|
-
function ii(e) {
|
|
1698
|
-
return "body" in e;
|
|
1699
|
-
}
|
|
1700
|
-
function ai(e, t, n, r = Et, i, a) {
|
|
1701
|
-
let o = A.useRef(null), s = A.useRef(null), c = A.useRef(null), l = A.useCallback((n) => {
|
|
1702
|
-
let r, i, o, l = n.target;
|
|
1703
|
-
if (ii(l) || ri(l)) {
|
|
1704
|
-
let e = ri(l) ? l : l.defaultView;
|
|
1705
|
-
o = a === !0 ? Qt(e, e.scrollX) : e.scrollY, r = a === !0 ? e.document.documentElement.scrollWidth : e.document.documentElement.scrollHeight, i = a === !0 ? e.innerWidth : e.innerHeight;
|
|
1706
|
-
} else o = a === !0 ? Qt(l, l.scrollLeft) : l.scrollTop, r = a === !0 ? l.scrollWidth : l.scrollHeight, i = a === !0 ? l.offsetWidth : l.offsetHeight;
|
|
1707
|
-
let u = () => {
|
|
1708
|
-
e({
|
|
1709
|
-
scrollHeight: r,
|
|
1710
|
-
scrollTop: Math.max(o, 0),
|
|
1711
|
-
viewportHeight: i
|
|
1712
|
-
});
|
|
1713
|
-
};
|
|
1714
|
-
n.suppressFlushSync === !0 ? u() : Ie.flushSync(u), s.current !== null && (o === s.current || o <= 0 || o === r - i) && (s.current = null, t(!0), c.current &&= (clearTimeout(c.current), null));
|
|
1715
|
-
}, [
|
|
1716
|
-
e,
|
|
1717
|
-
t,
|
|
1718
|
-
a
|
|
1719
|
-
]);
|
|
1720
|
-
A.useEffect(() => {
|
|
1721
|
-
let e = i ?? o.current;
|
|
1722
|
-
return r(i ?? o.current), l({
|
|
1723
|
-
suppressFlushSync: !0,
|
|
1724
|
-
target: e
|
|
1725
|
-
}), e.addEventListener("scroll", l, { passive: !0 }), () => {
|
|
1726
|
-
r(null), e.removeEventListener("scroll", l);
|
|
1727
|
-
};
|
|
1728
|
-
}, [
|
|
1729
|
-
o,
|
|
1730
|
-
l,
|
|
1731
|
-
n,
|
|
1732
|
-
r,
|
|
1733
|
-
i
|
|
1734
|
-
]);
|
|
1735
|
-
function u(n) {
|
|
1736
|
-
let r = o.current;
|
|
1737
|
-
if (!r || (a === !0 ? "offsetWidth" in r && r.offsetWidth === 0 : "offsetHeight" in r && r.offsetHeight === 0)) return;
|
|
1738
|
-
let i = n.behavior === "smooth", l, u, d;
|
|
1739
|
-
ri(r) ? (u = Math.max(Fn(r.document.documentElement, a === !0 ? "width" : "height"), a === !0 ? r.document.documentElement.scrollWidth : r.document.documentElement.scrollHeight), l = a === !0 ? r.innerWidth : r.innerHeight, d = a === !0 ? Qt(r, r.scrollX) : r.scrollY) : (u = r[a === !0 ? "scrollWidth" : "scrollHeight"], l = Fn(r, a === !0 ? "width" : "height"), d = a === !0 ? Qt(r, r.scrollLeft) : r.scrollTop);
|
|
1740
|
-
let f = u - l;
|
|
1741
|
-
if (n.top === void 0) {
|
|
1742
|
-
r.scrollTo(n);
|
|
1743
|
-
return;
|
|
1744
|
-
}
|
|
1745
|
-
let p = Math.ceil(Math.max(Math.min(f, n.top), 0));
|
|
1746
|
-
if (n.top = p, dr(l, u) || p === d) {
|
|
1747
|
-
e({
|
|
1748
|
-
scrollHeight: u,
|
|
1749
|
-
scrollTop: d,
|
|
1750
|
-
viewportHeight: l
|
|
1751
|
-
}), i && t(!0);
|
|
1752
|
-
return;
|
|
1753
|
-
}
|
|
1754
|
-
i ? (s.current = p, c.current && clearTimeout(c.current), c.current = setTimeout(() => {
|
|
1755
|
-
c.current = null, s.current = null, t(!0);
|
|
1756
|
-
}, 1e3)) : s.current = null, a === !0 && (n = {
|
|
1757
|
-
...n.behavior === void 0 ? {} : { behavior: n.behavior },
|
|
1758
|
-
left: $t(r, p)
|
|
1759
|
-
}), r.scrollTo(n);
|
|
1760
|
-
}
|
|
1761
|
-
return {
|
|
1762
|
-
scrollByCallback: A.useCallback((e) => {
|
|
1763
|
-
a === !0 && (e = {
|
|
1764
|
-
...e.behavior === void 0 ? {} : { behavior: e.behavior },
|
|
1765
|
-
...e.top === void 0 ? {} : { left: $t(o.current, e.top) }
|
|
1766
|
-
}), o.current.scrollBy(e);
|
|
1767
|
-
}, [a]),
|
|
1768
|
-
scrollerRef: o,
|
|
1769
|
-
scrollToCallback: u
|
|
1770
|
-
};
|
|
1771
|
-
}
|
|
1772
|
-
function oi(e) {
|
|
1773
|
-
return e;
|
|
1774
|
-
}
|
|
1775
|
-
var si = /* @__PURE__ */ q(([e, t]) => ({
|
|
1776
|
-
...e,
|
|
1777
|
-
...t
|
|
1778
|
-
}), F(Jr, /* @__PURE__ */ q(() => {
|
|
1779
|
-
let e = G((e) => `Item ${e}`), t = G((e) => `Group ${e}`), n = G({}), r = G(oi), i = G("div"), a = G(Et), o = (e, t = null) => zt(U(n, H((t) => t[e]), B()), t);
|
|
1780
|
-
return {
|
|
1781
|
-
components: n,
|
|
1782
|
-
computeItemKey: r,
|
|
1783
|
-
EmptyPlaceholder: o("EmptyPlaceholder"),
|
|
1784
|
-
FooterComponent: o("Footer"),
|
|
1785
|
-
GroupComponent: o("Group", "div"),
|
|
1786
|
-
groupContent: t,
|
|
1787
|
-
HeaderComponent: o("Header"),
|
|
1788
|
-
HeaderFooterTag: i,
|
|
1789
|
-
ItemComponent: o("Item", "div"),
|
|
1790
|
-
itemContent: e,
|
|
1791
|
-
ListComponent: o("List", "div"),
|
|
1792
|
-
ScrollerComponent: o("Scroller", "div"),
|
|
1793
|
-
scrollerRef: a,
|
|
1794
|
-
ScrollSeekPlaceholder: o("ScrollSeekPlaceholder"),
|
|
1795
|
-
TopItemListComponent: o("TopItemList")
|
|
1796
|
-
};
|
|
1797
|
-
}))), ci = ({ height: e }) => /* @__PURE__ */ N("div", { style: { height: e } }), li = {
|
|
1798
|
-
overflowAnchor: "none",
|
|
1799
|
-
position: ni(),
|
|
1800
|
-
zIndex: 1
|
|
1801
|
-
}, ui = { overflowAnchor: "none" }, di = {
|
|
1802
|
-
...ui,
|
|
1803
|
-
display: "inline-block",
|
|
1804
|
-
height: "100%"
|
|
1805
|
-
}, fi = /* @__PURE__ */ A.memo(function({ showTopList: e = !1 }) {
|
|
1806
|
-
let t = Z("listState"), n = Oi("sizeRanges"), r = Z("useWindowScroll"), i = Z("customScrollParent"), a = Oi("windowScrollContainerState"), o = Oi("scrollContainerState"), s = i || r ? a : o, c = Z("itemContent"), l = Z("context"), u = Z("groupContent"), d = Z("trackItemSizes"), f = Z("itemSize"), p = Z("log"), m = Oi("gap"), h = Z("horizontalDirection"), { callbackRef: g } = nn(n, f, d, e ? Et : s, p, m, i, h, Z("skipAnimationFrameInResizeObserver")), [_, v] = A.useState(0);
|
|
1807
|
-
Di("deviation", (e) => {
|
|
1808
|
-
_ !== e && v(e);
|
|
1809
|
-
});
|
|
1810
|
-
let y = Oi("deviationCommitted");
|
|
1811
|
-
on(() => {
|
|
1812
|
-
y(_);
|
|
1813
|
-
}, [_, y]);
|
|
1814
|
-
let b = Z("EmptyPlaceholder"), x = Z("ScrollSeekPlaceholder") ?? ci, S = Z("ListComponent"), C = Z("ItemComponent"), w = Z("GroupComponent"), T = Z("computeItemKey"), E = Z("isSeeking"), ee = Z("groupIndices").length > 0, te = Z("alignToBottom"), ne = Z("initialItemFinalLocationReached"), D = e ? {} : {
|
|
1815
|
-
boxSizing: "border-box",
|
|
1816
|
-
...h ? {
|
|
1817
|
-
display: "inline-block",
|
|
1818
|
-
height: "100%",
|
|
1819
|
-
marginInlineStart: _ === 0 ? te ? "auto" : 0 : _,
|
|
1820
|
-
paddingInlineEnd: t.offsetBottom,
|
|
1821
|
-
paddingInlineStart: t.offsetTop,
|
|
1822
|
-
whiteSpace: "nowrap"
|
|
1823
|
-
} : {
|
|
1824
|
-
marginTop: _ === 0 ? te ? "auto" : 0 : _,
|
|
1825
|
-
paddingBottom: t.offsetBottom,
|
|
1826
|
-
paddingTop: t.offsetTop
|
|
1827
|
-
},
|
|
1828
|
-
...ne ? {} : { visibility: "hidden" }
|
|
1829
|
-
};
|
|
1830
|
-
return !e && t.totalCount === 0 && b != null ? /* @__PURE__ */ N(b, { ...X(b, l) }) : /* @__PURE__ */ N(S, {
|
|
1831
|
-
...X(S, l),
|
|
1832
|
-
"data-testid": e ? "virtuoso-top-item-list" : "virtuoso-item-list",
|
|
1833
|
-
ref: g,
|
|
1834
|
-
style: D,
|
|
1835
|
-
children: (e ? t.topItems : t.items).map((e) => {
|
|
1836
|
-
let n = e.originalIndex, r = T(n + t.firstItemIndex, e.data, l);
|
|
1837
|
-
return E ? /* @__PURE__ */ we(x, {
|
|
1838
|
-
...X(x, l),
|
|
1839
|
-
height: e.size,
|
|
1840
|
-
index: e.index,
|
|
1841
|
-
key: r,
|
|
1842
|
-
type: e.type || "item",
|
|
1843
|
-
...e.type === "group" ? {} : { groupIndex: e.groupIndex }
|
|
1844
|
-
}) : e.type === "group" ? /* @__PURE__ */ we(w, {
|
|
1845
|
-
...X(w, l),
|
|
1846
|
-
"data-index": n,
|
|
1847
|
-
"data-item-index": e.index,
|
|
1848
|
-
"data-known-size": e.size,
|
|
1849
|
-
key: r,
|
|
1850
|
-
style: li
|
|
1851
|
-
}, u(e.index, l)) : /* @__PURE__ */ we(C, {
|
|
1852
|
-
...X(C, l),
|
|
1853
|
-
...vi(C, e.data),
|
|
1854
|
-
"data-index": n,
|
|
1855
|
-
"data-item-group-index": e.groupIndex,
|
|
1856
|
-
"data-item-index": e.index,
|
|
1857
|
-
"data-known-size": e.size,
|
|
1858
|
-
key: r,
|
|
1859
|
-
style: h ? di : ui
|
|
1860
|
-
}, ee ? c(e.index, e.groupIndex, e.data, l) : c(e.index, e.data, l));
|
|
1861
|
-
})
|
|
1862
|
-
});
|
|
1863
|
-
}), pi = {
|
|
1864
|
-
height: "100%",
|
|
1865
|
-
outline: "none",
|
|
1866
|
-
overflowY: "auto",
|
|
1867
|
-
position: "relative",
|
|
1868
|
-
WebkitOverflowScrolling: "touch"
|
|
1869
|
-
}, mi = {
|
|
1870
|
-
outline: "none",
|
|
1871
|
-
overflowX: "auto",
|
|
1872
|
-
position: "relative"
|
|
1873
|
-
}, hi = (e) => ({
|
|
1874
|
-
height: "100%",
|
|
1875
|
-
position: "absolute",
|
|
1876
|
-
top: 0,
|
|
1877
|
-
width: "100%",
|
|
1878
|
-
...e ? {
|
|
1879
|
-
display: "flex",
|
|
1880
|
-
flexDirection: "column"
|
|
1881
|
-
} : void 0
|
|
1882
|
-
}), gi = (e, t, n = 0) => ({
|
|
1883
|
-
...hi(e),
|
|
1884
|
-
position: t ? "relative" : "absolute",
|
|
1885
|
-
top: t ? -n : 0
|
|
1886
|
-
}), _i = {
|
|
1887
|
-
position: ni(),
|
|
1888
|
-
top: 0,
|
|
1889
|
-
width: "100%",
|
|
1890
|
-
zIndex: 1
|
|
1891
|
-
};
|
|
1892
|
-
function X(e, t) {
|
|
1893
|
-
if (typeof e != "string") return { context: t };
|
|
1894
|
-
}
|
|
1895
|
-
function vi(e, t) {
|
|
1896
|
-
return { item: typeof e == "string" ? void 0 : t };
|
|
1897
|
-
}
|
|
1898
|
-
var yi = /* @__PURE__ */ A.memo(function() {
|
|
1899
|
-
let e = Z("HeaderComponent"), t = Oi("headerHeight"), n = Z("HeaderFooterTag"), r = en(A.useMemo(() => (e) => {
|
|
1900
|
-
t(Fn(e, "height"));
|
|
1901
|
-
}, [t]), !0, Z("skipAnimationFrameInResizeObserver")), i = Z("context");
|
|
1902
|
-
return e == null ? null : /* @__PURE__ */ N(n, {
|
|
1903
|
-
ref: r,
|
|
1904
|
-
children: /* @__PURE__ */ N(e, { ...X(e, i) })
|
|
1905
|
-
});
|
|
1906
|
-
}), bi = /* @__PURE__ */ A.memo(function() {
|
|
1907
|
-
let e = Z("FooterComponent"), t = Oi("footerHeight"), n = Z("HeaderFooterTag"), r = en(A.useMemo(() => (e) => {
|
|
1908
|
-
t(Fn(e, "height"));
|
|
1909
|
-
}, [t]), !0, Z("skipAnimationFrameInResizeObserver")), i = Z("context");
|
|
1910
|
-
return e == null ? null : /* @__PURE__ */ N(n, {
|
|
1911
|
-
ref: r,
|
|
1912
|
-
children: /* @__PURE__ */ N(e, { ...X(e, i) })
|
|
1913
|
-
});
|
|
1914
|
-
});
|
|
1915
|
-
function xi({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
|
|
1916
|
-
return A.memo(function({ children: r, style: i, context: a, ...o }) {
|
|
1917
|
-
let s = n("scrollContainerState"), c = t("ScrollerComponent"), l = n("smoothScrollTargetReached"), u = t("scrollerRef"), d = t("horizontalDirection") || !1, { scrollByCallback: f, scrollerRef: p, scrollToCallback: m } = ai(s, l, c, u, void 0, d);
|
|
1918
|
-
return e("scrollTo", m), e("scrollBy", f), /* @__PURE__ */ N(c, {
|
|
1919
|
-
"data-testid": "virtuoso-scroller",
|
|
1920
|
-
"data-virtuoso-scroller": !0,
|
|
1921
|
-
ref: p,
|
|
1922
|
-
style: {
|
|
1923
|
-
...d ? mi : pi,
|
|
1924
|
-
...i
|
|
1925
|
-
},
|
|
1926
|
-
tabIndex: 0,
|
|
1927
|
-
...o,
|
|
1928
|
-
...X(c, a),
|
|
1929
|
-
children: r
|
|
1930
|
-
});
|
|
1931
|
-
});
|
|
1932
|
-
}
|
|
1933
|
-
function Si({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
|
|
1934
|
-
return A.memo(function({ children: r, style: i, context: a, ...o }) {
|
|
1935
|
-
let s = n("windowScrollContainerState"), c = t("ScrollerComponent"), l = n("smoothScrollTargetReached"), u = t("totalListHeight"), d = t("deviation"), f = t("customScrollParent"), p = A.useRef(null), { scrollByCallback: m, scrollerRef: h, scrollToCallback: g } = ai(s, l, c, t("scrollerRef"), f);
|
|
1936
|
-
return on(() => (h.current = f ?? p.current?.ownerDocument.defaultView, () => {
|
|
1937
|
-
h.current = null;
|
|
1938
|
-
}), [h, f]), e("windowScrollTo", g), e("scrollBy", m), /* @__PURE__ */ N(c, {
|
|
1939
|
-
ref: p,
|
|
1940
|
-
"data-virtuoso-scroller": !0,
|
|
1941
|
-
style: {
|
|
1942
|
-
position: "relative",
|
|
1943
|
-
...i,
|
|
1944
|
-
...u === 0 ? void 0 : { height: u + d }
|
|
1945
|
-
},
|
|
1946
|
-
...o,
|
|
1947
|
-
...X(c, a),
|
|
1948
|
-
children: r
|
|
1949
|
-
});
|
|
1950
|
-
});
|
|
1951
|
-
}
|
|
1952
|
-
var Ci = ({ children: e }) => {
|
|
1953
|
-
let t = A.useContext(Qr), n = Oi("viewportHeight"), r = Oi("fixedItemHeight"), i = Z("alignToBottom"), a = Z("horizontalDirection"), o = en(A.useMemo(() => xt(n, (e) => Fn(e, a ? "width" : "height")), [n, a]), !0, Z("skipAnimationFrameInResizeObserver"));
|
|
1954
|
-
return A.useEffect(() => {
|
|
1955
|
-
t && (n(t.viewportHeight), r(t.itemHeight));
|
|
1956
|
-
}, [
|
|
1957
|
-
t,
|
|
1958
|
-
n,
|
|
1959
|
-
r
|
|
1960
|
-
]), /* @__PURE__ */ N("div", {
|
|
1961
|
-
"data-viewport-type": "element",
|
|
1962
|
-
ref: o,
|
|
1963
|
-
style: hi(i),
|
|
1964
|
-
children: e
|
|
1965
|
-
});
|
|
1966
|
-
}, wi = ({ children: e }) => {
|
|
1967
|
-
let t = A.useContext(Qr), n = Oi("windowViewportRect"), r = Oi("fixedItemHeight"), i = Z("customScrollParent"), a = Z("useWindowScroll"), o = Z("topListHeight"), s = sn(n, i, Z("skipAnimationFrameInResizeObserver")), c = Z("alignToBottom");
|
|
1968
|
-
return A.useEffect(() => {
|
|
1969
|
-
t && (r(t.itemHeight), n({
|
|
1970
|
-
listHeight: 0,
|
|
1971
|
-
offsetTop: 0,
|
|
1972
|
-
visibleHeight: t.viewportHeight,
|
|
1973
|
-
visibleWidth: 100
|
|
1974
|
-
}));
|
|
1975
|
-
}, [
|
|
1976
|
-
t,
|
|
1977
|
-
n,
|
|
1978
|
-
r
|
|
1979
|
-
]), /* @__PURE__ */ N("div", {
|
|
1980
|
-
"data-viewport-type": "window",
|
|
1981
|
-
ref: s,
|
|
1982
|
-
style: gi(c, a, o),
|
|
1983
|
-
children: e
|
|
1984
|
-
});
|
|
1985
|
-
}, Ti = ({ children: e }) => {
|
|
1986
|
-
let t = Z("TopItemListComponent") ?? "div", n = Z("headerHeight"), r = {
|
|
1987
|
-
..._i,
|
|
1988
|
-
marginTop: `${n}px`
|
|
1989
|
-
}, i = Z("context");
|
|
1990
|
-
return /* @__PURE__ */ N(t, {
|
|
1991
|
-
style: r,
|
|
1992
|
-
...X(t, i),
|
|
1993
|
-
children: e
|
|
1994
|
-
});
|
|
1995
|
-
}, { Component: Ei, useEmitter: Di, useEmitterValue: Z, usePublisher: Oi } = /* @__PURE__ */ Zr(si, {
|
|
1996
|
-
optional: {
|
|
1997
|
-
restoreStateFrom: "restoreStateFrom",
|
|
1998
|
-
context: "context",
|
|
1999
|
-
followOutput: "followOutput",
|
|
2000
|
-
scrollIntoViewOnChange: "scrollIntoViewOnChange",
|
|
2001
|
-
itemContent: "itemContent",
|
|
2002
|
-
groupContent: "groupContent",
|
|
2003
|
-
overscan: "overscan",
|
|
2004
|
-
increaseViewportBy: "increaseViewportBy",
|
|
2005
|
-
minOverscanItemCount: "minOverscanItemCount",
|
|
2006
|
-
totalCount: "totalCount",
|
|
2007
|
-
groupCounts: "groupCounts",
|
|
2008
|
-
topItemCount: "topItemCount",
|
|
2009
|
-
firstItemIndex: "firstItemIndex",
|
|
2010
|
-
initialTopMostItemIndex: "initialTopMostItemIndex",
|
|
2011
|
-
components: "components",
|
|
2012
|
-
atBottomThreshold: "atBottomThreshold",
|
|
2013
|
-
atTopThreshold: "atTopThreshold",
|
|
2014
|
-
computeItemKey: "computeItemKey",
|
|
2015
|
-
defaultItemHeight: "defaultItemHeight",
|
|
2016
|
-
fixedGroupHeight: "fixedGroupHeight",
|
|
2017
|
-
fixedItemHeight: "fixedItemHeight",
|
|
2018
|
-
heightEstimates: "heightEstimates",
|
|
2019
|
-
itemSize: "itemSize",
|
|
2020
|
-
scrollSeekConfiguration: "scrollSeekConfiguration",
|
|
2021
|
-
headerFooterTag: "HeaderFooterTag",
|
|
2022
|
-
data: "data",
|
|
2023
|
-
initialItemCount: "initialItemCount",
|
|
2024
|
-
initialScrollTop: "initialScrollTop",
|
|
2025
|
-
alignToBottom: "alignToBottom",
|
|
2026
|
-
useWindowScroll: "useWindowScroll",
|
|
2027
|
-
customScrollParent: "customScrollParent",
|
|
2028
|
-
scrollerRef: "scrollerRef",
|
|
2029
|
-
logLevel: "logLevel",
|
|
2030
|
-
horizontalDirection: "horizontalDirection",
|
|
2031
|
-
skipAnimationFrameInResizeObserver: "skipAnimationFrameInResizeObserver"
|
|
2032
|
-
},
|
|
2033
|
-
methods: {
|
|
2034
|
-
scrollToIndex: "scrollToIndex",
|
|
2035
|
-
scrollIntoView: "scrollIntoView",
|
|
2036
|
-
scrollTo: "scrollTo",
|
|
2037
|
-
scrollBy: "scrollBy",
|
|
2038
|
-
autoscrollToBottom: "autoscrollToBottom",
|
|
2039
|
-
getState: "getState"
|
|
2040
|
-
},
|
|
2041
|
-
events: {
|
|
2042
|
-
isScrolling: "isScrolling",
|
|
2043
|
-
endReached: "endReached",
|
|
2044
|
-
startReached: "startReached",
|
|
2045
|
-
rangeChanged: "rangeChanged",
|
|
2046
|
-
atBottomStateChange: "atBottomStateChange",
|
|
2047
|
-
atTopStateChange: "atTopStateChange",
|
|
2048
|
-
totalListHeightChanged: "totalListHeightChanged",
|
|
2049
|
-
itemsRendered: "itemsRendered",
|
|
2050
|
-
groupIndices: "groupIndices"
|
|
2051
|
-
}
|
|
2052
|
-
}, /* @__PURE__ */ A.memo(function(e) {
|
|
2053
|
-
let t = Z("useWindowScroll"), n = Z("topItemsIndexes").length > 0, r = Z("customScrollParent"), i = Z("context");
|
|
2054
|
-
return /* @__PURE__ */ P(r || t ? Ai : ki, {
|
|
2055
|
-
...e,
|
|
2056
|
-
context: i,
|
|
2057
|
-
children: [n && /* @__PURE__ */ N(Ti, { children: /* @__PURE__ */ N(fi, { showTopList: !0 }) }), /* @__PURE__ */ P(r || t ? wi : Ci, { children: [
|
|
2058
|
-
/* @__PURE__ */ N(yi, {}),
|
|
2059
|
-
/* @__PURE__ */ N(fi, {}),
|
|
2060
|
-
/* @__PURE__ */ N(bi, {})
|
|
2061
|
-
] })]
|
|
2062
|
-
});
|
|
2063
|
-
})), ki = /* @__PURE__ */ xi({
|
|
2064
|
-
useEmitter: Di,
|
|
2065
|
-
useEmitterValue: Z,
|
|
2066
|
-
usePublisher: Oi
|
|
2067
|
-
}), Ai = /* @__PURE__ */ Si({
|
|
2068
|
-
useEmitter: Di,
|
|
2069
|
-
useEmitterValue: Z,
|
|
2070
|
-
usePublisher: Oi
|
|
2071
|
-
}), ji = /* @__PURE__ */ q(([e, t]) => ({
|
|
2072
|
-
...e,
|
|
2073
|
-
...t
|
|
2074
|
-
}), F(Jr, /* @__PURE__ */ q(() => {
|
|
2075
|
-
let e = G((e) => /* @__PURE__ */ P("td", { children: ["Item $", e] })), t = G(null), n = G((e) => /* @__PURE__ */ P("td", {
|
|
2076
|
-
colSpan: 1e3,
|
|
2077
|
-
children: ["Group ", e]
|
|
2078
|
-
})), r = G(null), i = G(null), a = G({}), o = G(oi), s = G(Et), c = (e, t = null) => zt(U(a, H((t) => t[e]), B()), t);
|
|
2079
|
-
return {
|
|
2080
|
-
components: a,
|
|
2081
|
-
computeItemKey: o,
|
|
2082
|
-
context: t,
|
|
2083
|
-
EmptyPlaceholder: c("EmptyPlaceholder"),
|
|
2084
|
-
FillerRow: c("FillerRow"),
|
|
2085
|
-
fixedFooterContent: i,
|
|
2086
|
-
fixedHeaderContent: r,
|
|
2087
|
-
itemContent: e,
|
|
2088
|
-
groupContent: n,
|
|
2089
|
-
ScrollerComponent: c("Scroller", "div"),
|
|
2090
|
-
scrollerRef: s,
|
|
2091
|
-
ScrollSeekPlaceholder: c("ScrollSeekPlaceholder"),
|
|
2092
|
-
TableBodyComponent: c("TableBody", "tbody"),
|
|
2093
|
-
TableComponent: c("Table", "table"),
|
|
2094
|
-
TableFooterComponent: c("TableFoot", "tfoot"),
|
|
2095
|
-
TableHeadComponent: c("TableHead", "thead"),
|
|
2096
|
-
TableRowComponent: c("TableRow", "tr"),
|
|
2097
|
-
GroupComponent: c("Group", "tr")
|
|
2098
|
-
};
|
|
2099
|
-
}))), Mi = ({ height: e }) => /* @__PURE__ */ N("tr", { children: /* @__PURE__ */ N("td", { style: { height: e } }) }), Ni = ({ height: e }) => /* @__PURE__ */ N("tr", { children: /* @__PURE__ */ N("td", { style: {
|
|
2100
|
-
border: 0,
|
|
2101
|
-
height: e,
|
|
2102
|
-
padding: 0
|
|
2103
|
-
} }) }), Pi = { overflowAnchor: "none" }, Fi = {
|
|
2104
|
-
position: ni(),
|
|
2105
|
-
zIndex: 2,
|
|
2106
|
-
overflowAnchor: "none"
|
|
2107
|
-
}, Ii = /* @__PURE__ */ A.memo(function({ showTopList: e = !1 }) {
|
|
2108
|
-
let t = Q("listState"), n = Q("computeItemKey"), r = Q("firstItemIndex"), i = Q("context"), a = Q("isSeeking"), o = Q("fixedHeaderHeight"), s = Q("groupIndices").length > 0, c = Q("itemContent"), l = Q("groupContent"), u = Q("ScrollSeekPlaceholder") ?? Mi, d = Q("GroupComponent"), f = Q("TableRowComponent"), p = (e ? t.topItems : []).reduce((e, t, n) => (n === 0 ? e.push(t.size) : e.push(e[n - 1] + t.size), e), []);
|
|
2109
|
-
return (e ? t.topItems : t.items).map((t) => {
|
|
2110
|
-
let m = t.originalIndex, h = n(m + r, t.data, i), g = e ? m === 0 ? 0 : p[m - 1] : 0;
|
|
2111
|
-
return a ? /* @__PURE__ */ we(u, {
|
|
2112
|
-
...X(u, i),
|
|
2113
|
-
height: t.size,
|
|
2114
|
-
index: t.index,
|
|
2115
|
-
key: h,
|
|
2116
|
-
type: t.type || "item"
|
|
2117
|
-
}) : t.type === "group" ? /* @__PURE__ */ we(d, {
|
|
2118
|
-
...X(d, i),
|
|
2119
|
-
"data-index": m,
|
|
2120
|
-
"data-item-index": t.index,
|
|
2121
|
-
"data-known-size": t.size,
|
|
2122
|
-
key: h,
|
|
2123
|
-
style: {
|
|
2124
|
-
...Fi,
|
|
2125
|
-
top: o
|
|
2126
|
-
}
|
|
2127
|
-
}, l(t.index, i)) : /* @__PURE__ */ we(f, {
|
|
2128
|
-
...X(f, i),
|
|
2129
|
-
...vi(f, t.data),
|
|
2130
|
-
"data-index": m,
|
|
2131
|
-
"data-item-index": t.index,
|
|
2132
|
-
"data-known-size": t.size,
|
|
2133
|
-
"data-item-group-index": t.groupIndex,
|
|
2134
|
-
key: h,
|
|
2135
|
-
style: e ? {
|
|
2136
|
-
...Fi,
|
|
2137
|
-
top: o + g
|
|
2138
|
-
} : Pi
|
|
2139
|
-
}, s ? c(t.index, t.groupIndex, t.data, i) : c(t.index, t.data, i));
|
|
2140
|
-
});
|
|
2141
|
-
}), Li = /* @__PURE__ */ A.memo(function() {
|
|
2142
|
-
let e = Q("listState"), t = Q("topItemsIndexes").length > 0, n = Hi("sizeRanges"), r = Q("useWindowScroll"), i = Q("customScrollParent"), a = Hi("windowScrollContainerState"), o = Hi("scrollContainerState"), s = i || r ? a : o, c = Q("trackItemSizes"), { callbackRef: l, ref: u } = nn(n, Q("itemSize"), c, s, Q("log"), void 0, i, !1, Q("skipAnimationFrameInResizeObserver")), [d, f] = A.useState(0);
|
|
2143
|
-
Vi("deviation", (e) => {
|
|
2144
|
-
d !== e && (u.current.style.marginTop = `${e}px`, f(e));
|
|
2145
|
-
});
|
|
2146
|
-
let p = Hi("deviationCommitted");
|
|
2147
|
-
on(() => {
|
|
2148
|
-
p(d);
|
|
2149
|
-
}, [d, p]);
|
|
2150
|
-
let m = Q("EmptyPlaceholder"), h = Q("FillerRow") ?? Ni, g = Q("TableBodyComponent"), _ = Q("paddingTopAddition"), v = Q("statefulTotalCount"), y = Q("context");
|
|
2151
|
-
if (v === 0 && m != null) return /* @__PURE__ */ N(m, { ...X(m, y) });
|
|
2152
|
-
let b = (t ? e.topItems : []).reduce((e, t) => e + t.size, 0), x = e.offsetTop + _ + d - b, S = e.offsetBottom, C = x > 0 ? /* @__PURE__ */ N(h, {
|
|
2153
|
-
context: y,
|
|
2154
|
-
height: x
|
|
2155
|
-
}, "padding-top") : null, w = S > 0 ? /* @__PURE__ */ N(h, {
|
|
2156
|
-
context: y,
|
|
2157
|
-
height: S
|
|
2158
|
-
}, "padding-bottom") : null;
|
|
2159
|
-
return /* @__PURE__ */ P(g, {
|
|
2160
|
-
"data-testid": "virtuoso-item-list",
|
|
2161
|
-
ref: l,
|
|
2162
|
-
...X(g, y),
|
|
2163
|
-
children: [
|
|
2164
|
-
C,
|
|
2165
|
-
t && /* @__PURE__ */ N(Ii, { showTopList: !0 }),
|
|
2166
|
-
/* @__PURE__ */ N(Ii, {}),
|
|
2167
|
-
w
|
|
2168
|
-
]
|
|
2169
|
-
});
|
|
2170
|
-
}), Ri = ({ children: e }) => {
|
|
2171
|
-
let t = A.useContext(Qr), n = Hi("viewportHeight"), r = Hi("fixedItemHeight"), i = en(A.useMemo(() => xt(n, (e) => Fn(e, "height")), [n]), !0, Q("skipAnimationFrameInResizeObserver"));
|
|
2172
|
-
return A.useEffect(() => {
|
|
2173
|
-
t && (n(t.viewportHeight), r(t.itemHeight));
|
|
2174
|
-
}, [
|
|
2175
|
-
t,
|
|
2176
|
-
n,
|
|
2177
|
-
r
|
|
2178
|
-
]), /* @__PURE__ */ N("div", {
|
|
2179
|
-
"data-viewport-type": "element",
|
|
2180
|
-
ref: i,
|
|
2181
|
-
style: hi(!1),
|
|
2182
|
-
children: e
|
|
2183
|
-
});
|
|
2184
|
-
}, zi = ({ children: e }) => {
|
|
2185
|
-
let t = A.useContext(Qr), n = Hi("windowViewportRect"), r = Hi("fixedItemHeight"), i = Q("customScrollParent"), a = Q("useWindowScroll"), o = sn(n, i, Q("skipAnimationFrameInResizeObserver"));
|
|
2186
|
-
return A.useEffect(() => {
|
|
2187
|
-
t && (r(t.itemHeight), n({
|
|
2188
|
-
listHeight: 0,
|
|
2189
|
-
offsetTop: 0,
|
|
2190
|
-
visibleHeight: t.viewportHeight,
|
|
2191
|
-
visibleWidth: 100
|
|
2192
|
-
}));
|
|
2193
|
-
}, [
|
|
2194
|
-
t,
|
|
2195
|
-
n,
|
|
2196
|
-
r
|
|
2197
|
-
]), /* @__PURE__ */ N("div", {
|
|
2198
|
-
"data-viewport-type": "window",
|
|
2199
|
-
ref: o,
|
|
2200
|
-
style: gi(!1, a),
|
|
2201
|
-
children: e
|
|
2202
|
-
});
|
|
2203
|
-
}, { Component: Bi, useEmitter: Vi, useEmitterValue: Q, usePublisher: Hi } = /* @__PURE__ */ Zr(ji, {
|
|
2204
|
-
optional: {
|
|
2205
|
-
restoreStateFrom: "restoreStateFrom",
|
|
2206
|
-
context: "context",
|
|
2207
|
-
followOutput: "followOutput",
|
|
2208
|
-
firstItemIndex: "firstItemIndex",
|
|
2209
|
-
itemContent: "itemContent",
|
|
2210
|
-
groupContent: "groupContent",
|
|
2211
|
-
fixedHeaderContent: "fixedHeaderContent",
|
|
2212
|
-
fixedFooterContent: "fixedFooterContent",
|
|
2213
|
-
overscan: "overscan",
|
|
2214
|
-
increaseViewportBy: "increaseViewportBy",
|
|
2215
|
-
minOverscanItemCount: "minOverscanItemCount",
|
|
2216
|
-
totalCount: "totalCount",
|
|
2217
|
-
topItemCount: "topItemCount",
|
|
2218
|
-
initialTopMostItemIndex: "initialTopMostItemIndex",
|
|
2219
|
-
components: "components",
|
|
2220
|
-
groupCounts: "groupCounts",
|
|
2221
|
-
atBottomThreshold: "atBottomThreshold",
|
|
2222
|
-
atTopThreshold: "atTopThreshold",
|
|
2223
|
-
computeItemKey: "computeItemKey",
|
|
2224
|
-
defaultItemHeight: "defaultItemHeight",
|
|
2225
|
-
fixedGroupHeight: "fixedGroupHeight",
|
|
2226
|
-
fixedItemHeight: "fixedItemHeight",
|
|
2227
|
-
itemSize: "itemSize",
|
|
2228
|
-
scrollSeekConfiguration: "scrollSeekConfiguration",
|
|
2229
|
-
data: "data",
|
|
2230
|
-
initialItemCount: "initialItemCount",
|
|
2231
|
-
initialScrollTop: "initialScrollTop",
|
|
2232
|
-
alignToBottom: "alignToBottom",
|
|
2233
|
-
useWindowScroll: "useWindowScroll",
|
|
2234
|
-
customScrollParent: "customScrollParent",
|
|
2235
|
-
scrollerRef: "scrollerRef",
|
|
2236
|
-
logLevel: "logLevel"
|
|
2237
|
-
},
|
|
2238
|
-
methods: {
|
|
2239
|
-
scrollToIndex: "scrollToIndex",
|
|
2240
|
-
scrollIntoView: "scrollIntoView",
|
|
2241
|
-
scrollTo: "scrollTo",
|
|
2242
|
-
scrollBy: "scrollBy",
|
|
2243
|
-
getState: "getState"
|
|
2244
|
-
},
|
|
2245
|
-
events: {
|
|
2246
|
-
isScrolling: "isScrolling",
|
|
2247
|
-
endReached: "endReached",
|
|
2248
|
-
startReached: "startReached",
|
|
2249
|
-
rangeChanged: "rangeChanged",
|
|
2250
|
-
atBottomStateChange: "atBottomStateChange",
|
|
2251
|
-
atTopStateChange: "atTopStateChange",
|
|
2252
|
-
totalListHeightChanged: "totalListHeightChanged",
|
|
2253
|
-
itemsRendered: "itemsRendered",
|
|
2254
|
-
groupIndices: "groupIndices"
|
|
2255
|
-
}
|
|
2256
|
-
}, /* @__PURE__ */ A.memo(function(e) {
|
|
2257
|
-
let t = Q("useWindowScroll"), n = Q("customScrollParent"), r = Hi("fixedHeaderHeight"), i = Hi("fixedFooterHeight"), a = Q("fixedHeaderContent"), o = Q("fixedFooterContent"), s = Q("context"), c = en(A.useMemo(() => xt(r, (e) => Fn(e, "height")), [r]), !0, Q("skipAnimationFrameInResizeObserver")), l = en(A.useMemo(() => xt(i, (e) => Fn(e, "height")), [i]), !0, Q("skipAnimationFrameInResizeObserver")), u = n || t ? Wi : Ui, d = n || t ? zi : Ri, f = Q("TableComponent"), p = Q("TableHeadComponent"), m = Q("TableFooterComponent"), h = a ? /* @__PURE__ */ N(p, {
|
|
2258
|
-
ref: c,
|
|
2259
|
-
style: {
|
|
2260
|
-
position: "sticky",
|
|
2261
|
-
top: 0,
|
|
2262
|
-
zIndex: 2
|
|
2263
|
-
},
|
|
2264
|
-
...X(p, s),
|
|
2265
|
-
children: a()
|
|
2266
|
-
}, "TableHead") : null, g = o ? /* @__PURE__ */ N(m, {
|
|
2267
|
-
ref: l,
|
|
2268
|
-
style: {
|
|
2269
|
-
bottom: 0,
|
|
2270
|
-
position: "sticky",
|
|
2271
|
-
zIndex: 1
|
|
2272
|
-
},
|
|
2273
|
-
...X(m, s),
|
|
2274
|
-
children: o()
|
|
2275
|
-
}, "TableFoot") : null;
|
|
2276
|
-
return /* @__PURE__ */ N(u, {
|
|
2277
|
-
...e,
|
|
2278
|
-
...X(u, s),
|
|
2279
|
-
children: /* @__PURE__ */ N(d, { children: /* @__PURE__ */ P(f, {
|
|
2280
|
-
style: {
|
|
2281
|
-
borderSpacing: 0,
|
|
2282
|
-
overflowAnchor: "none"
|
|
2283
|
-
},
|
|
2284
|
-
...X(f, s),
|
|
2285
|
-
children: [
|
|
2286
|
-
h,
|
|
2287
|
-
/* @__PURE__ */ N(Li, {}, "TableBody"),
|
|
2288
|
-
g
|
|
2289
|
-
]
|
|
2290
|
-
}) })
|
|
2291
|
-
});
|
|
2292
|
-
})), Ui = /* @__PURE__ */ xi({
|
|
2293
|
-
useEmitter: Vi,
|
|
2294
|
-
useEmitterValue: Q,
|
|
2295
|
-
usePublisher: Hi
|
|
2296
|
-
}), Wi = /* @__PURE__ */ Si({
|
|
2297
|
-
useEmitter: Vi,
|
|
2298
|
-
useEmitterValue: Q,
|
|
2299
|
-
usePublisher: Hi
|
|
2300
|
-
}), Gi = Bi, Ki = {
|
|
2301
|
-
bottom: 0,
|
|
2302
|
-
itemHeight: 0,
|
|
2303
|
-
items: [],
|
|
2304
|
-
itemWidth: 0,
|
|
2305
|
-
offsetBottom: 0,
|
|
2306
|
-
offsetTop: 0,
|
|
2307
|
-
top: 0
|
|
2308
|
-
}, qi = {
|
|
2309
|
-
bottom: 0,
|
|
2310
|
-
itemHeight: 0,
|
|
2311
|
-
items: [{ index: 0 }],
|
|
2312
|
-
itemWidth: 0,
|
|
2313
|
-
offsetBottom: 0,
|
|
2314
|
-
offsetTop: 0,
|
|
2315
|
-
top: 0
|
|
2316
|
-
}, { ceil: Ji, floor: Yi, max: Xi, min: Zi, round: Qi } = Math;
|
|
2317
|
-
function $i(e, t, n) {
|
|
2318
|
-
return Array.from({ length: t - e + 1 }).map((t, r) => ({
|
|
2319
|
-
data: n === null ? null : n[r + e],
|
|
2320
|
-
index: r + e
|
|
2321
|
-
}));
|
|
2322
|
-
}
|
|
2323
|
-
function ea(e) {
|
|
2324
|
-
return {
|
|
2325
|
-
...qi,
|
|
2326
|
-
items: e
|
|
2327
|
-
};
|
|
2328
|
-
}
|
|
2329
|
-
function ta(e, t) {
|
|
2330
|
-
return e !== void 0 && e.width === t.width && e.height === t.height;
|
|
2331
|
-
}
|
|
2332
|
-
function na(e, t) {
|
|
2333
|
-
return e !== void 0 && e.column === t.column && e.row === t.row;
|
|
2334
|
-
}
|
|
2335
|
-
var ra = /* @__PURE__ */ q(([{ increaseViewportBy: e, listBoundary: t, overscan: n, visibleRange: r }, { footerHeight: i, headerHeight: a, scrollBy: o, scrollContainerState: s, scrollTo: c, scrollTop: l, smoothScrollTargetReached: u, viewportHeight: d }, f, p, { didMount: m, propsReady: h }, { customScrollParent: g, useWindowScroll: _, windowScrollContainerState: v, windowScrollTo: y, windowViewportRect: b }, x]) => {
|
|
2336
|
-
let S = G(0), C = G(0), w = G(Ki), T = G({
|
|
2337
|
-
height: 0,
|
|
2338
|
-
width: 0
|
|
2339
|
-
}), E = G({
|
|
2340
|
-
height: 0,
|
|
2341
|
-
width: 0
|
|
2342
|
-
}), ee = K(), te = K(), ne = G(0), D = G(null), re = G({
|
|
2343
|
-
column: 0,
|
|
2344
|
-
row: 0
|
|
2345
|
-
}), ie = K(), ae = K(), O = G(!1), oe = G(0), se = G(!0), ce = G(!1), k = G(!1);
|
|
2346
|
-
I(U(m, W(oe), V(([e, t]) => !lr(t))), () => {
|
|
2347
|
-
L(se, !1);
|
|
2348
|
-
}), I(U(Wt(m, se, E, T, oe, ce), V(([e, t, n, r, , i]) => e && !t && n.height !== 0 && r.height !== 0 && !i)), ([, , , , e]) => {
|
|
2349
|
-
if (e === void 0) {
|
|
2350
|
-
L(se, !0);
|
|
2351
|
-
return;
|
|
2352
|
-
}
|
|
2353
|
-
L(ce, !0), sr(1, () => {
|
|
2354
|
-
L(ee, e);
|
|
2355
|
-
}), At(U(l), () => {
|
|
2356
|
-
L(t, [0, 0]), L(se, !0);
|
|
2357
|
-
});
|
|
2358
|
-
}), z(U(ae, V((e) => e != null && e.scrollTop > 0), Nt(0)), C), I(U(m, W(ae), V(([, e]) => e != null)), ([, e]) => {
|
|
2359
|
-
e && (L(T, e.viewport), L(E, e.item), L(re, e.gap), e.scrollTop > 0 && (L(O, !0), At(U(l, Ft(1)), (e) => {
|
|
2360
|
-
L(O, !1);
|
|
2361
|
-
}), L(c, { top: e.scrollTop })));
|
|
2362
|
-
}), z(U(T, H(({ height: e }) => e)), d), z(U(Wt(J(T, ta), J(E, ta), J(re, (e, t) => e !== void 0 && e.column === t.column && e.row === t.row), J(l)), H(([e, t, n, r]) => ({
|
|
2363
|
-
gap: n,
|
|
2364
|
-
item: t,
|
|
2365
|
-
scrollTop: r,
|
|
2366
|
-
viewport: e
|
|
2367
|
-
}))), ie), z(U(Wt(J(S), r, J(re, na), J(E, ta), J(T, ta), J(D), J(C), J(O), J(se), J(oe)), V(([, , , , , , , e]) => !e), H(([e, [t, n], r, i, a, o, s, , c, l]) => {
|
|
2368
|
-
let { column: u, row: d } = r, { height: f, width: p } = i, { width: m } = a;
|
|
2369
|
-
if (s === 0 && (e === 0 || m === 0)) return Ki;
|
|
2370
|
-
if (p === 0) {
|
|
2371
|
-
let t = cr(l, e);
|
|
2372
|
-
return ea($i(t, t + Math.max(s - 1, 0), o));
|
|
2373
|
-
}
|
|
2374
|
-
let h = ia(m, p, u), g, _;
|
|
2375
|
-
c ? t === 0 && n === 0 && s > 0 ? (g = 0, _ = s - 1) : (g = h * Yi((t + d) / (f + d)), _ = h * Ji((n + d) / (f + d)) - 1, _ = Zi(e - 1, Xi(_, h - 1)), g = Zi(_, Xi(0, g))) : (g = 0, _ = -1);
|
|
2376
|
-
let v = $i(g, _, o), { bottom: y, top: b } = aa(a, r, i, v), x = Ji(e / h);
|
|
2377
|
-
return {
|
|
2378
|
-
bottom: y,
|
|
2379
|
-
itemHeight: f,
|
|
2380
|
-
items: v,
|
|
2381
|
-
itemWidth: p,
|
|
2382
|
-
offsetBottom: x * f + (x - 1) * d - y,
|
|
2383
|
-
offsetTop: b,
|
|
2384
|
-
top: b
|
|
2385
|
-
};
|
|
2386
|
-
})), w), z(U(D, V((e) => e !== null), H((e) => e.length)), S), z(U(Wt(T, E, w, re), V(([e, t, { items: n }]) => n.length > 0 && t.height !== 0 && e.height !== 0), H(([e, t, { items: n }, r]) => {
|
|
2387
|
-
let { bottom: i, top: a } = aa(e, r, t, n);
|
|
2388
|
-
return [a, i];
|
|
2389
|
-
}), B(An)), t);
|
|
2390
|
-
let le = G(!1);
|
|
2391
|
-
z(U(l, W(le), H(([e, t]) => t || e !== 0)), le);
|
|
2392
|
-
let ue = Bt(U(Wt(w, S), V(([{ items: e }]) => e.length > 0), W(le), V(([[e, t], n]) => {
|
|
2393
|
-
let r = e.items[e.items.length - 1].index === t - 1;
|
|
2394
|
-
return (n || e.bottom > 0 && e.itemHeight > 0 && e.offsetBottom === 0 && e.items.length === t) && r;
|
|
2395
|
-
}), H(([[, e]]) => e - 1), B())), de = Bt(U(J(w), V(({ items: e }) => e.length > 0 && e[0].index === 0), Nt(0), B())), fe = Bt(U(J(w), W(O), V(([{ items: e }, t]) => e.length > 0 && !t), H(([{ items: e }]) => ({
|
|
2396
|
-
endIndex: e[e.length - 1].index,
|
|
2397
|
-
startIndex: e[0].index
|
|
2398
|
-
})), B(kn), It(0)));
|
|
2399
|
-
z(fe, p.scrollSeekRangeChanged), z(U(ee, W(T, E, S, re), H(([e, t, n, r, i]) => {
|
|
2400
|
-
let a = ir(e), { align: o, behavior: s, offset: c } = a, l = a.index;
|
|
2401
|
-
l === "LAST" && (l = r - 1), l = Xi(0, l, Zi(r - 1, l));
|
|
2402
|
-
let u = oa(t, i, n, l);
|
|
2403
|
-
return o === "end" ? u = Qi(u - t.height + n.height) : o === "center" && (u = Qi(u - t.height / 2 + n.height / 2)), c !== void 0 && c !== 0 && (u += c), {
|
|
2404
|
-
behavior: s,
|
|
2405
|
-
top: u
|
|
2406
|
-
};
|
|
2407
|
-
})), c);
|
|
2408
|
-
let pe = zt(U(w, H((e) => e.offsetBottom + e.bottom)), 0);
|
|
2409
|
-
return z(U(b, H((e) => ({
|
|
2410
|
-
height: e.visibleHeight,
|
|
2411
|
-
width: e.visibleWidth
|
|
2412
|
-
}))), T), {
|
|
2413
|
-
customScrollParent: g,
|
|
2414
|
-
data: D,
|
|
2415
|
-
deviation: ne,
|
|
2416
|
-
footerHeight: i,
|
|
2417
|
-
gap: re,
|
|
2418
|
-
headerHeight: a,
|
|
2419
|
-
increaseViewportBy: e,
|
|
2420
|
-
initialItemCount: C,
|
|
2421
|
-
itemDimensions: E,
|
|
2422
|
-
overscan: n,
|
|
2423
|
-
restoreStateFrom: ae,
|
|
2424
|
-
scrollBy: o,
|
|
2425
|
-
scrollContainerState: s,
|
|
2426
|
-
scrollHeight: te,
|
|
2427
|
-
scrollTo: c,
|
|
2428
|
-
scrollToIndex: ee,
|
|
2429
|
-
scrollTop: l,
|
|
2430
|
-
smoothScrollTargetReached: u,
|
|
2431
|
-
totalCount: S,
|
|
2432
|
-
useWindowScroll: _,
|
|
2433
|
-
viewportDimensions: T,
|
|
2434
|
-
windowScrollContainerState: v,
|
|
2435
|
-
windowScrollTo: y,
|
|
2436
|
-
windowViewportRect: b,
|
|
2437
|
-
...p,
|
|
2438
|
-
gridState: w,
|
|
2439
|
-
horizontalDirection: k,
|
|
2440
|
-
initialTopMostItemIndex: oe,
|
|
2441
|
-
totalListHeight: pe,
|
|
2442
|
-
...f,
|
|
2443
|
-
endReached: ue,
|
|
2444
|
-
propsReady: h,
|
|
2445
|
-
rangeChanged: fe,
|
|
2446
|
-
startReached: de,
|
|
2447
|
-
stateChanged: ie,
|
|
2448
|
-
stateRestoreInProgress: O,
|
|
2449
|
-
...x
|
|
2450
|
-
};
|
|
2451
|
-
}, F(Cr, cn, _r, Vr, nr, Hr, Yt));
|
|
2452
|
-
function ia(e, t, n) {
|
|
2453
|
-
return Xi(1, Yi((e + n) / (Yi(t) + n)));
|
|
2454
|
-
}
|
|
2455
|
-
function aa(e, t, n, r) {
|
|
2456
|
-
let { height: i } = n;
|
|
2457
|
-
if (i === void 0 || r.length === 0) return {
|
|
2458
|
-
bottom: 0,
|
|
2459
|
-
top: 0
|
|
2460
|
-
};
|
|
2461
|
-
let a = oa(e, t, n, r[0].index);
|
|
2462
|
-
return {
|
|
2463
|
-
bottom: oa(e, t, n, r[r.length - 1].index) + i,
|
|
2464
|
-
top: a
|
|
2465
|
-
};
|
|
2466
|
-
}
|
|
2467
|
-
function oa(e, t, n, r) {
|
|
2468
|
-
let i = Yi(r / ia(e.width, n.width, t.column)), a = i * n.height + Xi(0, i - 1) * t.row;
|
|
2469
|
-
return a > 0 ? a + t.row : a;
|
|
2470
|
-
}
|
|
2471
|
-
var sa = /* @__PURE__ */ q(([e, t]) => ({
|
|
2472
|
-
...e,
|
|
2473
|
-
...t
|
|
2474
|
-
}), F(ra, /* @__PURE__ */ q(() => {
|
|
2475
|
-
let e = G((e) => `Item ${e}`), t = G({}), n = G(null), r = G("virtuoso-grid-item"), i = G("virtuoso-grid-list"), a = G(oi), o = G("div"), s = G(Et), c = (e, n = null) => zt(U(t, H((t) => t[e]), B()), n), l = G(!1), u = G(!1);
|
|
2476
|
-
return z(J(u), l), {
|
|
2477
|
-
components: t,
|
|
2478
|
-
computeItemKey: a,
|
|
2479
|
-
context: n,
|
|
2480
|
-
FooterComponent: c("Footer"),
|
|
2481
|
-
HeaderComponent: c("Header"),
|
|
2482
|
-
headerFooterTag: o,
|
|
2483
|
-
itemClassName: r,
|
|
2484
|
-
ItemComponent: c("Item", "div"),
|
|
2485
|
-
itemContent: e,
|
|
2486
|
-
listClassName: i,
|
|
2487
|
-
ListComponent: c("List", "div"),
|
|
2488
|
-
readyStateChanged: l,
|
|
2489
|
-
reportReadyState: u,
|
|
2490
|
-
ScrollerComponent: c("Scroller", "div"),
|
|
2491
|
-
scrollerRef: s,
|
|
2492
|
-
ScrollSeekPlaceholder: c("ScrollSeekPlaceholder", "div")
|
|
2493
|
-
};
|
|
2494
|
-
}))), ca = /* @__PURE__ */ A.memo(function() {
|
|
2495
|
-
let e = $("gridState"), t = $("listClassName"), n = $("itemClassName"), r = $("itemContent"), i = $("computeItemKey"), a = $("isSeeking"), o = ha("scrollHeight"), s = $("ItemComponent"), c = $("ListComponent"), l = $("ScrollSeekPlaceholder"), u = $("context"), d = ha("itemDimensions"), f = ha("gap"), p = $("log"), m = $("stateRestoreInProgress"), h = ha("reportReadyState"), g = en(A.useMemo(() => (e) => {
|
|
2496
|
-
let t = e.parentElement.parentElement.scrollHeight;
|
|
2497
|
-
o(t);
|
|
2498
|
-
let n = e.firstChild;
|
|
2499
|
-
if (n !== null) {
|
|
2500
|
-
let { height: e, width: t } = n.getBoundingClientRect();
|
|
2501
|
-
d({
|
|
2502
|
-
height: e,
|
|
2503
|
-
width: t
|
|
2504
|
-
});
|
|
2505
|
-
}
|
|
2506
|
-
f({
|
|
2507
|
-
column: va("column-gap", getComputedStyle(e).columnGap, p),
|
|
2508
|
-
row: va("row-gap", getComputedStyle(e).rowGap, p)
|
|
2509
|
-
});
|
|
2510
|
-
}, [
|
|
2511
|
-
o,
|
|
2512
|
-
d,
|
|
2513
|
-
f,
|
|
2514
|
-
p
|
|
2515
|
-
]), !0, !1);
|
|
2516
|
-
return on(() => {
|
|
2517
|
-
e.itemHeight > 0 && e.itemWidth > 0 && h(!0);
|
|
2518
|
-
}, [e]), m ? null : /* @__PURE__ */ N(c, {
|
|
2519
|
-
className: t,
|
|
2520
|
-
ref: g,
|
|
2521
|
-
...X(c, u),
|
|
2522
|
-
"data-testid": "virtuoso-item-list",
|
|
2523
|
-
style: {
|
|
2524
|
-
paddingBottom: e.offsetBottom,
|
|
2525
|
-
paddingTop: e.offsetTop
|
|
2526
|
-
},
|
|
2527
|
-
children: e.items.map((t) => {
|
|
2528
|
-
let o = i(t.index, t.data, u);
|
|
2529
|
-
return a ? /* @__PURE__ */ N(l, {
|
|
2530
|
-
...X(l, u),
|
|
2531
|
-
height: e.itemHeight,
|
|
2532
|
-
index: t.index,
|
|
2533
|
-
width: e.itemWidth
|
|
2534
|
-
}, o) : /* @__PURE__ */ we(s, {
|
|
2535
|
-
...X(s, u),
|
|
2536
|
-
className: n,
|
|
2537
|
-
"data-index": t.index,
|
|
2538
|
-
key: o
|
|
2539
|
-
}, r(t.index, t.data, u));
|
|
2540
|
-
})
|
|
2541
|
-
});
|
|
2542
|
-
}), la = A.memo(function() {
|
|
2543
|
-
let e = $("HeaderComponent"), t = ha("headerHeight"), n = $("headerFooterTag"), r = en(A.useMemo(() => (e) => {
|
|
2544
|
-
t(Fn(e, "height"));
|
|
2545
|
-
}, [t]), !0, !1), i = $("context");
|
|
2546
|
-
return e == null ? null : /* @__PURE__ */ N(n, {
|
|
2547
|
-
ref: r,
|
|
2548
|
-
children: /* @__PURE__ */ N(e, { ...X(e, i) })
|
|
2549
|
-
});
|
|
2550
|
-
}), ua = A.memo(function() {
|
|
2551
|
-
let e = $("FooterComponent"), t = ha("footerHeight"), n = $("headerFooterTag"), r = en(A.useMemo(() => (e) => {
|
|
2552
|
-
t(Fn(e, "height"));
|
|
2553
|
-
}, [t]), !0, !1), i = $("context");
|
|
2554
|
-
return e == null ? null : /* @__PURE__ */ N(n, {
|
|
2555
|
-
ref: r,
|
|
2556
|
-
children: /* @__PURE__ */ N(e, { ...X(e, i) })
|
|
2557
|
-
});
|
|
2558
|
-
}), da = ({ children: e }) => {
|
|
2559
|
-
let t = A.useContext($r), n = ha("itemDimensions"), r = ha("viewportDimensions"), i = en(A.useMemo(() => (e) => {
|
|
2560
|
-
r(e.getBoundingClientRect());
|
|
2561
|
-
}, [r]), !0, !1);
|
|
2562
|
-
return A.useEffect(() => {
|
|
2563
|
-
t && (r({
|
|
2564
|
-
height: t.viewportHeight,
|
|
2565
|
-
width: t.viewportWidth
|
|
2566
|
-
}), n({
|
|
2567
|
-
height: t.itemHeight,
|
|
2568
|
-
width: t.itemWidth
|
|
2569
|
-
}));
|
|
2570
|
-
}, [
|
|
2571
|
-
t,
|
|
2572
|
-
r,
|
|
2573
|
-
n
|
|
2574
|
-
]), /* @__PURE__ */ N("div", {
|
|
2575
|
-
ref: i,
|
|
2576
|
-
style: hi(!1),
|
|
2577
|
-
children: e
|
|
2578
|
-
});
|
|
2579
|
-
}, fa = ({ children: e }) => {
|
|
2580
|
-
let t = A.useContext($r), n = ha("windowViewportRect"), r = ha("itemDimensions"), i = $("customScrollParent"), a = $("useWindowScroll"), o = sn(n, i, !1);
|
|
2581
|
-
return A.useEffect(() => {
|
|
2582
|
-
t && (r({
|
|
2583
|
-
height: t.itemHeight,
|
|
2584
|
-
width: t.itemWidth
|
|
2585
|
-
}), n({
|
|
2586
|
-
listHeight: 0,
|
|
2587
|
-
offsetTop: 0,
|
|
2588
|
-
visibleHeight: t.viewportHeight,
|
|
2589
|
-
visibleWidth: t.viewportWidth
|
|
2590
|
-
}));
|
|
2591
|
-
}, [
|
|
2592
|
-
t,
|
|
2593
|
-
n,
|
|
2594
|
-
r
|
|
2595
|
-
]), /* @__PURE__ */ N("div", {
|
|
2596
|
-
ref: o,
|
|
2597
|
-
style: gi(!1, a),
|
|
2598
|
-
children: e
|
|
2599
|
-
});
|
|
2600
|
-
}, { Component: pa, useEmitter: ma, useEmitterValue: $, usePublisher: ha } = /* @__PURE__ */ Zr(sa, {
|
|
2601
|
-
optional: {
|
|
2602
|
-
context: "context",
|
|
2603
|
-
totalCount: "totalCount",
|
|
2604
|
-
overscan: "overscan",
|
|
2605
|
-
itemContent: "itemContent",
|
|
2606
|
-
components: "components",
|
|
2607
|
-
computeItemKey: "computeItemKey",
|
|
2608
|
-
data: "data",
|
|
2609
|
-
initialItemCount: "initialItemCount",
|
|
2610
|
-
scrollSeekConfiguration: "scrollSeekConfiguration",
|
|
2611
|
-
headerFooterTag: "headerFooterTag",
|
|
2612
|
-
listClassName: "listClassName",
|
|
2613
|
-
itemClassName: "itemClassName",
|
|
2614
|
-
useWindowScroll: "useWindowScroll",
|
|
2615
|
-
customScrollParent: "customScrollParent",
|
|
2616
|
-
scrollerRef: "scrollerRef",
|
|
2617
|
-
logLevel: "logLevel",
|
|
2618
|
-
restoreStateFrom: "restoreStateFrom",
|
|
2619
|
-
initialTopMostItemIndex: "initialTopMostItemIndex",
|
|
2620
|
-
increaseViewportBy: "increaseViewportBy"
|
|
2621
|
-
},
|
|
2622
|
-
methods: {
|
|
2623
|
-
scrollTo: "scrollTo",
|
|
2624
|
-
scrollBy: "scrollBy",
|
|
2625
|
-
scrollToIndex: "scrollToIndex"
|
|
2626
|
-
},
|
|
2627
|
-
events: {
|
|
2628
|
-
isScrolling: "isScrolling",
|
|
2629
|
-
endReached: "endReached",
|
|
2630
|
-
startReached: "startReached",
|
|
2631
|
-
rangeChanged: "rangeChanged",
|
|
2632
|
-
atBottomStateChange: "atBottomStateChange",
|
|
2633
|
-
atTopStateChange: "atTopStateChange",
|
|
2634
|
-
stateChanged: "stateChanged",
|
|
2635
|
-
readyStateChanged: "readyStateChanged"
|
|
2636
|
-
}
|
|
2637
|
-
}, /* @__PURE__ */ A.memo(function({ ...e }) {
|
|
2638
|
-
let t = $("useWindowScroll"), n = $("customScrollParent"), r = n || t ? _a : ga, i = n || t ? fa : da, a = $("context");
|
|
2639
|
-
return /* @__PURE__ */ N(r, {
|
|
2640
|
-
...e,
|
|
2641
|
-
...X(r, a),
|
|
2642
|
-
children: /* @__PURE__ */ P(i, { children: [
|
|
2643
|
-
/* @__PURE__ */ N(la, {}),
|
|
2644
|
-
/* @__PURE__ */ N(ca, {}),
|
|
2645
|
-
/* @__PURE__ */ N(ua, {})
|
|
2646
|
-
] })
|
|
2647
|
-
});
|
|
2648
|
-
})), ga = /* @__PURE__ */ xi({
|
|
2649
|
-
useEmitter: ma,
|
|
2650
|
-
useEmitterValue: $,
|
|
2651
|
-
usePublisher: ha
|
|
2652
|
-
}), _a = /* @__PURE__ */ Si({
|
|
2653
|
-
useEmitter: ma,
|
|
2654
|
-
useEmitterValue: $,
|
|
2655
|
-
usePublisher: ha
|
|
2656
|
-
});
|
|
2657
|
-
function va(e, t, n) {
|
|
2658
|
-
return t !== "normal" && t?.endsWith("px") !== !0 && n(`${e} was not resolved to pixel value correctly`, t, Kt.WARN), t === "normal" ? 0 : parseInt(t ?? "0", 10);
|
|
2659
|
-
}
|
|
2660
|
-
//#endregion
|
|
18
|
+
import { NumberRangeFilterField as D } from "../components/filters/NumberRangeFilterField/index.js";
|
|
19
|
+
import { TextFilterField as O } from "../components/filters/TextFilterField/index.js";
|
|
20
|
+
import { SidebarItem as k, SidebarMenu as A, SidebarMenuItem as j } from "../components/ui/Sidebar/index.js";
|
|
21
|
+
import { WindowService as ee } from "@gen-epix/ui-core/classes/services/WindowService";
|
|
22
|
+
import { t as M } from "i18next";
|
|
23
|
+
import { Box as N, Button as te, Checkbox as ne, Divider as P, FormControlLabel as F, FormGroup as re, IconButton as ie, Menu as ae, Paper as I, Popover as oe, Tooltip as se, Typography as ce, alpha as le, darken as ue, lighten as de, styled as fe, useTheme as pe } from "@mui/material";
|
|
24
|
+
import * as me from "react";
|
|
25
|
+
import he, { Fragment as ge, createContext as L, forwardRef as _e, use as ve, useCallback as R, useEffect as z, useId as ye, useImperativeHandle as be, useLayoutEffect as xe, useMemo as B, useRef as V, useState as H } from "react";
|
|
26
|
+
import { Fragment as U, jsx as W, jsxs as G } from "react/jsx-runtime";
|
|
27
|
+
import { useTranslation as K } from "react-i18next";
|
|
28
|
+
import { TestIdUtil as q } from "@gen-epix/ui-core/utils/TestIdUtil";
|
|
29
|
+
import { TableVirtuoso as Se } from "react-virtuoso";
|
|
30
|
+
import { useScrollbarSize as Ce } from "@gen-epix/ui-core/hooks/useScrollbarSize";
|
|
31
|
+
import { visuallyHidden as we } from "@mui/utils";
|
|
32
|
+
import Te from "@mui/icons-material/ArrowDownward";
|
|
33
|
+
import Ee from "@mui/icons-material/FilterAlt";
|
|
34
|
+
import { FormProvider as J, useForm as De, useFormContext as Oe, useWatch as ke } from "react-hook-form";
|
|
35
|
+
import Y from "@mui/icons-material/MoreVert";
|
|
36
|
+
import { withDialog as Ae } from "@gen-epix/ui-core-components/hoc/withDialog";
|
|
37
|
+
import { DndContext as X, DragOverlay as Z, KeyboardSensor as je, PointerSensor as Me, defaultDropAnimationSideEffects as Ne, useSensor as Pe, useSensors as Fe } from "@dnd-kit/core";
|
|
38
|
+
import { SortableContext as Ie, arrayMove as Le, sortableKeyboardCoordinates as Re, useSortable as ze } from "@dnd-kit/sortable";
|
|
39
|
+
import { CSS as Be } from "@dnd-kit/utilities";
|
|
40
|
+
import Ve from "@mui/icons-material/DragIndicator";
|
|
41
|
+
import He from "@mui/icons-material/IndeterminateCheckBox";
|
|
42
|
+
import Ue from "@mui/icons-material/Check";
|
|
43
|
+
import We from "@mui/icons-material/RestartAlt";
|
|
44
|
+
import Ge from "@mui/icons-material/Close";
|
|
45
|
+
import { NestedDropdown as Ke } from "@gen-epix/ui-core-components/components/NestedMenu";
|
|
2661
46
|
//#region ../../node_modules/.pnpm/use-debounce@10.1.1_react@19.3.0/node_modules/use-debounce/dist/index.module.js
|
|
2662
|
-
|
|
2663
|
-
|
|
47
|
+
var qe = /* @__PURE__ */ e(c(), 1), Je = /* @__PURE__ */ e(n(), 1), Ye = /* @__PURE__ */ e(_(), 1), Xe = /* @__PURE__ */ e(v(), 1);
|
|
48
|
+
function Ze(e, t, n, r) {
|
|
49
|
+
var i = this, a = V(null), o = V(0), s = V(0), c = V(null), l = V([]), u = V(), d = V(), f = V(e), p = V(!0), m = V(), h = V();
|
|
2664
50
|
f.current = e;
|
|
2665
51
|
var g = typeof window < "u", _ = !t && t !== 0 && g;
|
|
2666
52
|
if (typeof e != "function") throw TypeError("Expected a function");
|
|
2667
53
|
t = +t || 0;
|
|
2668
|
-
var v = !!(n ||= {}).leading, y = !("trailing" in n) || !!n.trailing, b = !!n.flushOnExit && y, x = "maxWait" in n, S = "debounceOnServer" in n && !!n.debounceOnServer, C = x ? Math.max(+n.maxWait || 0, t) : null, w =
|
|
54
|
+
var v = !!(n ||= {}).leading, y = !("trailing" in n) || !!n.trailing, b = !!n.flushOnExit && y, x = "maxWait" in n, S = "debounceOnServer" in n && !!n.debounceOnServer, C = x ? Math.max(+n.maxWait || 0, t) : null, w = B(function() {
|
|
2669
55
|
var e = function(e) {
|
|
2670
56
|
var t = l.current, n = u.current;
|
|
2671
57
|
return l.current = u.current = null, o.current = e, s.current = s.current || e, d.current = f.current.apply(n, t);
|
|
@@ -2679,14 +65,14 @@ function ya(e, t, n, r) {
|
|
|
2679
65
|
return c.current = null, y && l.current ? e(t) : (l.current = u.current = null, d.current);
|
|
2680
66
|
}, E = function e() {
|
|
2681
67
|
var r = Date.now();
|
|
2682
|
-
if (v && s.current === o.current &&
|
|
68
|
+
if (v && s.current === o.current && D(), w(r)) return T(r);
|
|
2683
69
|
if (p.current) {
|
|
2684
70
|
var i = t - (r - a.current);
|
|
2685
71
|
n(e, x ? Math.min(i, C - (r - o.current)) : i);
|
|
2686
72
|
}
|
|
2687
|
-
},
|
|
73
|
+
}, D = function() {
|
|
2688
74
|
r && r({});
|
|
2689
|
-
},
|
|
75
|
+
}, O = function() {
|
|
2690
76
|
if (g || S) {
|
|
2691
77
|
var r, s = Date.now(), f = w(s);
|
|
2692
78
|
if (l.current = [].slice.call(arguments), u.current = i, a.current = s, b && !m.current && (m.current = function() {
|
|
@@ -2698,14 +84,14 @@ function ya(e, t, n, r) {
|
|
|
2698
84
|
return c.current || n(E, t), d.current;
|
|
2699
85
|
}
|
|
2700
86
|
};
|
|
2701
|
-
return
|
|
87
|
+
return O.cancel = function() {
|
|
2702
88
|
var e = c.current;
|
|
2703
89
|
e && (_ ? cancelAnimationFrame(c.current) : clearTimeout(c.current)), o.current = 0, l.current = a.current = u.current = c.current = null, e && r && r({});
|
|
2704
|
-
},
|
|
90
|
+
}, O.isPending = function() {
|
|
2705
91
|
return !!c.current;
|
|
2706
|
-
},
|
|
92
|
+
}, O.flush = function() {
|
|
2707
93
|
return c.current ? T(Date.now()) : d.current;
|
|
2708
|
-
},
|
|
94
|
+
}, O;
|
|
2709
95
|
}, [
|
|
2710
96
|
v,
|
|
2711
97
|
x,
|
|
@@ -2718,7 +104,7 @@ function ya(e, t, n, r) {
|
|
|
2718
104
|
S,
|
|
2719
105
|
r
|
|
2720
106
|
]);
|
|
2721
|
-
return h.current = w,
|
|
107
|
+
return h.current = w, z(function() {
|
|
2722
108
|
return p.current = !0, function() {
|
|
2723
109
|
var e;
|
|
2724
110
|
b && h.current.flush(), m.current &&= ((e = globalThis.document) == null || e.removeEventListener == null || e.removeEventListener("visibilitychange", m.current), null), p.current = !1;
|
|
@@ -2727,61 +113,61 @@ function ya(e, t, n, r) {
|
|
|
2727
113
|
}
|
|
2728
114
|
//#endregion
|
|
2729
115
|
//#region src/components/ui/Table/TableCellAsyncContent.tsx
|
|
2730
|
-
var
|
|
2731
|
-
let [t, n] =
|
|
2732
|
-
return
|
|
116
|
+
var Qe = ({ content: e }) => {
|
|
117
|
+
let [t, n] = H(null);
|
|
118
|
+
return z(() => {
|
|
2733
119
|
(async () => {
|
|
2734
120
|
e instanceof Promise ? n(await e) : n(e);
|
|
2735
121
|
})();
|
|
2736
|
-
}, [e]), /* @__PURE__ */
|
|
122
|
+
}, [e]), /* @__PURE__ */ W(U, { children: t });
|
|
2737
123
|
};
|
|
2738
124
|
//#endregion
|
|
2739
125
|
//#region ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
2740
|
-
function
|
|
126
|
+
function $e(e) {
|
|
2741
127
|
var t, n, r = "";
|
|
2742
128
|
if (typeof e == "string" || typeof e == "number") r += e;
|
|
2743
129
|
else if (typeof e == "object") {
|
|
2744
130
|
if (Array.isArray(e)) {
|
|
2745
131
|
var i = e.length;
|
|
2746
|
-
for (t = 0; t < i; t++) e[t] && (n =
|
|
132
|
+
for (t = 0; t < i; t++) e[t] && (n = $e(e[t])) && (r && (r += " "), r += n);
|
|
2747
133
|
} else for (n in e) e[n] && (r && (r += " "), r += n);
|
|
2748
134
|
}
|
|
2749
135
|
return r;
|
|
2750
136
|
}
|
|
2751
|
-
function
|
|
2752
|
-
for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t =
|
|
137
|
+
function et() {
|
|
138
|
+
for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = $e(e)) && (r && (r += " "), r += t);
|
|
2753
139
|
return r;
|
|
2754
140
|
}
|
|
2755
141
|
//#endregion
|
|
2756
142
|
//#region src/components/ui/Table/TableFilter.tsx
|
|
2757
|
-
var
|
|
143
|
+
var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
2758
144
|
var n = l(), r = d();
|
|
2759
145
|
function i(e) {
|
|
2760
146
|
return e && e.length ? n(e, r) : 0;
|
|
2761
147
|
}
|
|
2762
148
|
t.exports = i;
|
|
2763
|
-
})))(), 1),
|
|
2764
|
-
e instanceof s && /* @__PURE__ */
|
|
2765
|
-
e instanceof o && /* @__PURE__ */
|
|
2766
|
-
e instanceof r && /* @__PURE__ */
|
|
2767
|
-
e instanceof a && /* @__PURE__ */
|
|
2768
|
-
e instanceof S && /* @__PURE__ */
|
|
2769
|
-
e instanceof i && /* @__PURE__ */
|
|
2770
|
-
] }),
|
|
2771
|
-
let n = h(), { t: r } =
|
|
149
|
+
})))(), 1), nt = ({ filter: e }) => /* @__PURE__ */ G(U, { children: [
|
|
150
|
+
e instanceof s && /* @__PURE__ */ W(O, { filter: e }),
|
|
151
|
+
e instanceof o && /* @__PURE__ */ W(C, { filter: e }),
|
|
152
|
+
e instanceof r && /* @__PURE__ */ W(D, { filter: e }),
|
|
153
|
+
e instanceof a && /* @__PURE__ */ W(E, { filter: e }),
|
|
154
|
+
e instanceof S && /* @__PURE__ */ W(T, { filter: e }),
|
|
155
|
+
e instanceof i && /* @__PURE__ */ W(w, { filter: e })
|
|
156
|
+
] }), rt = ({ filter: e, onFilterChange: t }) => {
|
|
157
|
+
let n = h(), { t: r } = K(), i = m(n, (e) => e.setFilterValue), a = B(() => ({ [e.id]: e.initialFilterValue }), [e.id, e.initialFilterValue]), o = B(() => ({ [e.id]: e.filterValue ?? e.initialFilterValue }), [
|
|
2772
158
|
e.id,
|
|
2773
159
|
e.filterValue,
|
|
2774
160
|
e.initialFilterValue
|
|
2775
|
-
]), s =
|
|
161
|
+
]), s = De({
|
|
2776
162
|
defaultValues: a,
|
|
2777
163
|
values: o
|
|
2778
|
-
}), { formState: { isDirty: c }, handleSubmit: l } = s, u =
|
|
164
|
+
}), { formState: { isDirty: c }, handleSubmit: l } = s, u = R(async (n) => {
|
|
2779
165
|
await i(e.id, n[e.id]), t();
|
|
2780
166
|
}, [
|
|
2781
167
|
e.id,
|
|
2782
168
|
t,
|
|
2783
169
|
i
|
|
2784
|
-
]), d =
|
|
170
|
+
]), d = R(async () => {
|
|
2785
171
|
await i(e.id, e.initialFilterValue), t();
|
|
2786
172
|
}, [
|
|
2787
173
|
e.id,
|
|
@@ -2789,26 +175,26 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
2789
175
|
t,
|
|
2790
176
|
i
|
|
2791
177
|
]);
|
|
2792
|
-
return /* @__PURE__ */
|
|
178
|
+
return /* @__PURE__ */ W(J, {
|
|
2793
179
|
...s,
|
|
2794
|
-
children: /* @__PURE__ */
|
|
180
|
+
children: /* @__PURE__ */ G(N, {
|
|
2795
181
|
autoComplete: "off",
|
|
2796
182
|
component: "form",
|
|
2797
183
|
id: "Filters",
|
|
2798
184
|
onSubmit: l(u),
|
|
2799
185
|
sx: { minWidth: "400px" },
|
|
2800
|
-
children: [/* @__PURE__ */
|
|
186
|
+
children: [/* @__PURE__ */ W(nt, { filter: e }), /* @__PURE__ */ G(N, {
|
|
2801
187
|
sx: {
|
|
2802
188
|
display: "flex",
|
|
2803
189
|
gap: 1,
|
|
2804
190
|
justifyContent: "flex-end"
|
|
2805
191
|
},
|
|
2806
|
-
children: [/* @__PURE__ */
|
|
192
|
+
children: [/* @__PURE__ */ W(te, {
|
|
2807
193
|
disabled: e.isInitialFilterValue(),
|
|
2808
194
|
onClick: d,
|
|
2809
195
|
variant: "outlined",
|
|
2810
196
|
children: r`Remove filter`
|
|
2811
|
-
}), /* @__PURE__ */
|
|
197
|
+
}), /* @__PURE__ */ W(te, {
|
|
2812
198
|
disabled: !c,
|
|
2813
199
|
type: "submit",
|
|
2814
200
|
variant: "contained",
|
|
@@ -2817,28 +203,28 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
2817
203
|
})]
|
|
2818
204
|
})
|
|
2819
205
|
});
|
|
2820
|
-
},
|
|
2821
|
-
let T =
|
|
206
|
+
}, it = {}, at = ({ ariaSort: e, backgroundColor: t, canDrag: n, children: r, className: i, column: a, columnIndex: o, enabled: s, height: c, onClick: l, onCustomDrag: u, order: d, ref: p, role: g, row: _, rowIndex: v, sx: y, tabIndex: x, title: S, width: C, xOffset: w }) => {
|
|
207
|
+
let T = pe(), E = h(), D = m(E, b((e) => e.dataContext)), O = R((e) => {
|
|
2822
208
|
l({
|
|
2823
|
-
dataContext:
|
|
209
|
+
dataContext: D,
|
|
2824
210
|
id: a.id,
|
|
2825
211
|
row: _,
|
|
2826
212
|
rowIndex: v
|
|
2827
213
|
}, e.nativeEvent);
|
|
2828
214
|
}, [
|
|
2829
215
|
a.id,
|
|
2830
|
-
|
|
216
|
+
D,
|
|
2831
217
|
l,
|
|
2832
218
|
_,
|
|
2833
219
|
v
|
|
2834
|
-
]),
|
|
220
|
+
]), k = V(null), A = R((e) => {
|
|
2835
221
|
if (!u || n && !n(e)) return;
|
|
2836
222
|
let t = e.currentTarget, r = t.getBoundingClientRect().width, i = {
|
|
2837
223
|
elementOffsetX: e.clientX - t.getBoundingClientRect().left,
|
|
2838
224
|
elementWidth: r,
|
|
2839
225
|
target: t
|
|
2840
226
|
}, o = (n) => {
|
|
2841
|
-
|
|
227
|
+
k.current || (k.current = {
|
|
2842
228
|
target: t,
|
|
2843
229
|
x: e.clientX,
|
|
2844
230
|
y: e.clientY
|
|
@@ -2850,7 +236,7 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
2850
236
|
type: "start",
|
|
2851
237
|
...i
|
|
2852
238
|
}, a));
|
|
2853
|
-
let r = n.clientX -
|
|
239
|
+
let r = n.clientX - k.current.x, o = n.clientY - k.current.y;
|
|
2854
240
|
u({
|
|
2855
241
|
clientX: n.clientX,
|
|
2856
242
|
clientY: n.clientY,
|
|
@@ -2860,8 +246,8 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
2860
246
|
...i
|
|
2861
247
|
}, a);
|
|
2862
248
|
}, s = (e) => {
|
|
2863
|
-
if (e.preventDefault(),
|
|
2864
|
-
let t = e.clientX -
|
|
249
|
+
if (e.preventDefault(), k.current) {
|
|
250
|
+
let t = e.clientX - k.current.x, n = e.clientY - k.current.y;
|
|
2865
251
|
u({
|
|
2866
252
|
clientX: e.clientX,
|
|
2867
253
|
clientY: e.clientY,
|
|
@@ -2871,16 +257,16 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
2871
257
|
...i
|
|
2872
258
|
}, a);
|
|
2873
259
|
}
|
|
2874
|
-
|
|
260
|
+
k.current = null, document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", s);
|
|
2875
261
|
};
|
|
2876
262
|
document.addEventListener("mouseup", s, { once: !0 }), document.addEventListener("mousemove", o);
|
|
2877
263
|
}, [
|
|
2878
264
|
u,
|
|
2879
265
|
n,
|
|
2880
266
|
a
|
|
2881
|
-
]),
|
|
267
|
+
]), j = !a.frozen, ee = R(() => {
|
|
2882
268
|
let e = a.frozen === f.LEFT, n = a.frozen === f.RIGHT, r = e || n, i;
|
|
2883
|
-
return t && (
|
|
269
|
+
return t && (it[t] ? i = it[t] : (i = T.palette.getContrastText(t), it[t] = i)), {
|
|
2884
270
|
"*": t ?? { color: i ? `${i} !important` : void 0 },
|
|
2885
271
|
background: r ? T.palette.background.paper : t,
|
|
2886
272
|
boxSizing: "border-box",
|
|
@@ -2912,30 +298,30 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
2912
298
|
C,
|
|
2913
299
|
w
|
|
2914
300
|
]);
|
|
2915
|
-
return /* @__PURE__ */ N
|
|
301
|
+
return /* @__PURE__ */ W(N, {
|
|
2916
302
|
"aria-sort": e,
|
|
2917
303
|
className: i,
|
|
2918
304
|
"data-column-index": o,
|
|
2919
305
|
"data-frozen": +!!a.frozen,
|
|
2920
306
|
"data-id": a.id,
|
|
2921
307
|
"data-row-index": v ?? "",
|
|
2922
|
-
onClick: l && s ?
|
|
2923
|
-
onMouseDown:
|
|
308
|
+
onClick: l && s ? O : void 0,
|
|
309
|
+
onMouseDown: j && u ? A : void 0,
|
|
2924
310
|
ref: p,
|
|
2925
311
|
role: g ?? "cell",
|
|
2926
|
-
sx:
|
|
312
|
+
sx: ee(),
|
|
2927
313
|
tabIndex: x,
|
|
2928
314
|
title: S,
|
|
2929
315
|
children: r
|
|
2930
316
|
});
|
|
2931
|
-
},
|
|
317
|
+
}, Q = {
|
|
2932
318
|
columnDivider: "GENEPIX-TableHeaderCell-columnDivider",
|
|
2933
319
|
content: "GENEPIX-TableHeaderCell-content",
|
|
2934
320
|
customHeaderIcon: "GENEPIX-TableHeaderCell-customHeaderIcon",
|
|
2935
321
|
filterLabelIcon: "GENEPIX-TableHeaderCell-filterLabelIcon",
|
|
2936
322
|
root: "GENEPIX-TableHeaderCell",
|
|
2937
323
|
sortLabelIcon: "GENEPIX-TableHeaderCell-sortLabelIcon"
|
|
2938
|
-
},
|
|
324
|
+
}, $ = 18, ot = `${Q.root}--focus`, st = fe(ie, { name: "GENEPIX-TableSortLabelIcon" })(({ ownerState: e, theme: t }) => ({
|
|
2939
325
|
"&:hover": {
|
|
2940
326
|
color: t.palette.primary.main,
|
|
2941
327
|
opacity: "1 !important"
|
|
@@ -2946,40 +332,40 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
2946
332
|
},
|
|
2947
333
|
color: t.palette.text.primary,
|
|
2948
334
|
display: "none",
|
|
2949
|
-
fontSize:
|
|
2950
|
-
height: `${
|
|
335
|
+
fontSize: $,
|
|
336
|
+
height: `${$}px`,
|
|
2951
337
|
opacity: 0,
|
|
2952
338
|
padding: 0,
|
|
2953
339
|
userSelect: "none",
|
|
2954
|
-
width: `${
|
|
2955
|
-
})),
|
|
340
|
+
width: `${$}px`
|
|
341
|
+
})), ct = fe(ie, { name: "GENEPIX-TableCustomHeaderIcon" })(({ theme: e }) => ({
|
|
2956
342
|
"&:hover": {
|
|
2957
343
|
color: e.palette.primary.main,
|
|
2958
344
|
opacity: "1 !important"
|
|
2959
345
|
},
|
|
2960
346
|
display: "none",
|
|
2961
|
-
fontSize:
|
|
2962
|
-
height: `${
|
|
347
|
+
fontSize: $,
|
|
348
|
+
height: `${$}px`,
|
|
2963
349
|
opacity: 0,
|
|
2964
350
|
padding: 0,
|
|
2965
351
|
userSelect: "none",
|
|
2966
|
-
width: `${
|
|
2967
|
-
})),
|
|
352
|
+
width: `${$}px`
|
|
353
|
+
})), lt = fe(ie, { name: "GENEPIX-TableFilterLabelIcon" })(({ theme: e }) => ({
|
|
2968
354
|
"&:hover": {
|
|
2969
355
|
color: e.palette.primary.main,
|
|
2970
356
|
opacity: "1 !important"
|
|
2971
357
|
},
|
|
2972
358
|
display: "none",
|
|
2973
|
-
fontSize:
|
|
2974
|
-
height: `${
|
|
359
|
+
fontSize: $,
|
|
360
|
+
height: `${$}px`,
|
|
2975
361
|
opacity: 0,
|
|
2976
362
|
padding: 0,
|
|
2977
363
|
userSelect: "none",
|
|
2978
|
-
width: `${
|
|
2979
|
-
})),
|
|
2980
|
-
let { t } =
|
|
2981
|
-
C && (e.type === "start" && (
|
|
2982
|
-
}, [C]),
|
|
364
|
+
width: `${$}px`
|
|
365
|
+
})), ut = (e) => {
|
|
366
|
+
let { t } = K(), n = pe(), r = h(), i = m(r, (e) => e.sortByField), a = m(r, (e) => e.dataContext), o = m(r, (e) => e.sortDirection), s = m(r, (e) => e.setSorting), c = m(r, (e) => e.filters), l = V(null), u = ye(), [d, f] = H(), p = V(null), g = V(null), { column: _, columnIndex: v, dividerColor: y, height: b, onColumnDividerKeyDown: x, onColumnDividerMouseDown: S, onCustomDrag: C, order: w, width: T, xOffset: E } = e, D = V(!1), O = R((e) => _.frozen || e.button !== 0 ? !1 : e.nativeEvent.target.classList.contains(Q.content), [_.frozen]), k = R((e, t) => {
|
|
367
|
+
C && (e.type === "start" && (D.current = !0), C(e, t));
|
|
368
|
+
}, [C]), A = R(async () => {
|
|
2983
369
|
if (i === _.id) {
|
|
2984
370
|
await s(_.id, o === "asc" ? "desc" : "asc");
|
|
2985
371
|
return;
|
|
@@ -2990,59 +376,59 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
2990
376
|
s,
|
|
2991
377
|
i,
|
|
2992
378
|
o
|
|
2993
|
-
]),
|
|
2994
|
-
if (
|
|
2995
|
-
e.preventDefault(), e.stopPropagation(),
|
|
379
|
+
]), j = R(async (e) => {
|
|
380
|
+
if (D.current) {
|
|
381
|
+
e.preventDefault(), e.stopPropagation(), D.current = !1;
|
|
2996
382
|
return;
|
|
2997
383
|
}
|
|
2998
|
-
_.comparatorFactory && await
|
|
2999
|
-
}, [_.comparatorFactory,
|
|
3000
|
-
await
|
|
3001
|
-
}, [
|
|
384
|
+
_.comparatorFactory && await A();
|
|
385
|
+
}, [_.comparatorFactory, A]), ee = R(async (e) => {
|
|
386
|
+
await A();
|
|
387
|
+
}, [A]), M = R(() => {
|
|
3002
388
|
f((e) => e ? null : p.current);
|
|
3003
|
-
}, []),
|
|
389
|
+
}, []), te = R(() => {
|
|
3004
390
|
f(null);
|
|
3005
|
-
}, []),
|
|
391
|
+
}, []), ne = R((e) => {
|
|
3006
392
|
e.button === 0 && (e.preventDefault(), e.stopPropagation(), S(e, _));
|
|
3007
|
-
}, [_, S]),
|
|
393
|
+
}, [_, S]), P = R((e) => {
|
|
3008
394
|
x(e, _);
|
|
3009
|
-
}, [_, x]),
|
|
395
|
+
}, [_, x]), F = B(() => c.find((e) => e.id === _.id), [_.id, c]), re = B(() => !!F && !F.isInitialFilterValue(), [F]), ie = R(() => {
|
|
3010
396
|
_.customHeaderIcon?.onClick({
|
|
3011
397
|
column: _,
|
|
3012
398
|
dataContext: a
|
|
3013
399
|
});
|
|
3014
|
-
}, [_, a]),
|
|
400
|
+
}, [_, a]), ae = R(() => {
|
|
3015
401
|
f(null), setTimeout(() => {
|
|
3016
|
-
p.current.classList.add(
|
|
402
|
+
p.current.classList.add(ot), p.current?.focus(), g.current?.focus();
|
|
3017
403
|
});
|
|
3018
|
-
}, []),
|
|
404
|
+
}, []), ce = i === _.id, le = { direction: i === _.id ? o : "asc" }, ue = et(Q.sortLabelIcon, { [`${Q.sortLabelIcon}--active`]: ce }), de = et(Q.filterLabelIcon, { [`${Q.filterLabelIcon}--active`]: re }), fe = !!_.customHeaderIcon, me = !!_.comparatorFactory, he = !!F, ge = me || he || fe ? 0 : -1, L = +n.spacing(2).replace("px", ""), _e = B(() => {
|
|
3019
405
|
if (i === _.id) return o === "asc" ? "ascending" : "descending";
|
|
3020
406
|
}, [
|
|
3021
407
|
_.id,
|
|
3022
408
|
i,
|
|
3023
409
|
o
|
|
3024
410
|
]);
|
|
3025
|
-
return /* @__PURE__ */
|
|
3026
|
-
ariaSort:
|
|
3027
|
-
canDrag:
|
|
3028
|
-
className:
|
|
411
|
+
return /* @__PURE__ */ G(at, {
|
|
412
|
+
ariaSort: _e,
|
|
413
|
+
canDrag: O,
|
|
414
|
+
className: et(Q.root, { [ot]: !!d }),
|
|
3029
415
|
column: _,
|
|
3030
416
|
columnIndex: v,
|
|
3031
417
|
height: b,
|
|
3032
|
-
onCustomDrag:
|
|
418
|
+
onCustomDrag: k,
|
|
3033
419
|
order: w,
|
|
3034
420
|
ref: p,
|
|
3035
421
|
role: "columnheader",
|
|
3036
422
|
sx: {
|
|
3037
|
-
[`.${
|
|
3038
|
-
[`.${
|
|
423
|
+
[`.${Q.filterLabelIcon}--active`]: { color: n.palette.secondary.main },
|
|
424
|
+
[`.${Q.sortLabelIcon}--active, .${Q.filterLabelIcon}--active`]: {
|
|
3039
425
|
display: "inline-block",
|
|
3040
426
|
opacity: "1 !important"
|
|
3041
427
|
},
|
|
3042
|
-
[`.${
|
|
3043
|
-
[`&:hover, &:focus-visible, &:focus, &:focus-within, &.${
|
|
3044
|
-
[`.${
|
|
3045
|
-
[`.${
|
|
428
|
+
[`.${Q.sortLabelIcon}--active`]: { color: n.palette.text.secondary },
|
|
429
|
+
[`&:hover, &:focus-visible, &:focus, &:focus-within, &.${ot}`]: {
|
|
430
|
+
[`.${Q.columnDivider}`]: { opacity: 1 },
|
|
431
|
+
[`.${Q.sortLabelIcon}, .${Q.filterLabelIcon}, .${Q.customHeaderIcon}`]: {
|
|
3046
432
|
display: "inline-block",
|
|
3047
433
|
opacity: .5
|
|
3048
434
|
}
|
|
@@ -3053,44 +439,44 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3053
439
|
justifyContent: "flex-start",
|
|
3054
440
|
textAlign: "left"
|
|
3055
441
|
},
|
|
3056
|
-
tabIndex:
|
|
442
|
+
tabIndex: ge,
|
|
3057
443
|
width: T,
|
|
3058
444
|
xOffset: E,
|
|
3059
|
-
children: [_.type === "actions" && /* @__PURE__ */ N
|
|
3060
|
-
className:
|
|
3061
|
-
sx:
|
|
445
|
+
children: [_.type === "actions" && /* @__PURE__ */ W(N, {
|
|
446
|
+
className: Q.content,
|
|
447
|
+
sx: we,
|
|
3062
448
|
children: t`Actions`
|
|
3063
|
-
}), _.type !== "actions" && /* @__PURE__ */
|
|
449
|
+
}), _.type !== "actions" && /* @__PURE__ */ G(N, {
|
|
3064
450
|
sx: {
|
|
3065
|
-
[`&:hover .${
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
451
|
+
[`&:hover .${Q.content}`]: { maxWidth: `calc(100% + 16px - ${(0, tt.default)([
|
|
452
|
+
fe ? L : 0,
|
|
453
|
+
he ? L : 0,
|
|
454
|
+
me ? L : 0,
|
|
455
|
+
L
|
|
3070
456
|
])}px)` },
|
|
3071
457
|
alignItems: "center",
|
|
3072
458
|
display: "inline-flex",
|
|
3073
459
|
width: "100%"
|
|
3074
460
|
},
|
|
3075
461
|
children: [
|
|
3076
|
-
_.renderHeader ? /* @__PURE__ */
|
|
462
|
+
_.renderHeader ? /* @__PURE__ */ W(U, { children: _.renderHeader({
|
|
3077
463
|
column: _,
|
|
3078
464
|
dataContext: a
|
|
3079
|
-
}) }) : /* @__PURE__ */
|
|
465
|
+
}) }) : /* @__PURE__ */ W(se, {
|
|
3080
466
|
arrow: !0,
|
|
3081
467
|
placement: "top",
|
|
3082
468
|
title: _.headerTooltipContent,
|
|
3083
|
-
children: /* @__PURE__ */ N
|
|
3084
|
-
className:
|
|
3085
|
-
onClick:
|
|
469
|
+
children: /* @__PURE__ */ W(N, {
|
|
470
|
+
className: Q.content,
|
|
471
|
+
onClick: j,
|
|
3086
472
|
ref: l,
|
|
3087
473
|
sx: {
|
|
3088
474
|
cursor: "pointer",
|
|
3089
475
|
flexGrow: 1,
|
|
3090
|
-
maxWidth: `calc(100% + 16px - ${(0,
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
476
|
+
maxWidth: `calc(100% + 16px - ${(0, tt.default)([
|
|
477
|
+
ce ? L : 0,
|
|
478
|
+
re ? L : 0,
|
|
479
|
+
L
|
|
3094
480
|
])}px)`,
|
|
3095
481
|
overflow: "hidden",
|
|
3096
482
|
textOverflow: "ellipsis",
|
|
@@ -3102,57 +488,57 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3102
488
|
}) : _.headerName ?? ""
|
|
3103
489
|
})
|
|
3104
490
|
}),
|
|
3105
|
-
|
|
3106
|
-
className:
|
|
3107
|
-
onClick:
|
|
491
|
+
fe && /* @__PURE__ */ W(ct, {
|
|
492
|
+
className: Q.customHeaderIcon,
|
|
493
|
+
onClick: ie,
|
|
3108
494
|
tabIndex: 0,
|
|
3109
495
|
title: _.customHeaderIcon?.label,
|
|
3110
496
|
children: _.customHeaderIcon?.iconElement
|
|
3111
497
|
}),
|
|
3112
|
-
|
|
3113
|
-
className:
|
|
3114
|
-
onClick:
|
|
498
|
+
he && /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W(lt, {
|
|
499
|
+
className: de,
|
|
500
|
+
onClick: M,
|
|
3115
501
|
ref: g,
|
|
3116
502
|
tabIndex: 0,
|
|
3117
503
|
title: t("Show filter for {{name}}", { name: _.headerName || t("unknown") }),
|
|
3118
|
-
children: /* @__PURE__ */
|
|
3119
|
-
}), /* @__PURE__ */
|
|
504
|
+
children: /* @__PURE__ */ W(Ee, { fontSize: "inherit" })
|
|
505
|
+
}), /* @__PURE__ */ W(oe, {
|
|
3120
506
|
anchorEl: d,
|
|
3121
507
|
anchorOrigin: {
|
|
3122
508
|
horizontal: "center",
|
|
3123
509
|
vertical: "bottom"
|
|
3124
510
|
},
|
|
3125
511
|
id: u,
|
|
3126
|
-
onClose:
|
|
512
|
+
onClose: ae,
|
|
3127
513
|
open: !!d,
|
|
3128
514
|
sx: { zIndex: n.zIndex.appBar + 1 },
|
|
3129
515
|
transformOrigin: {
|
|
3130
516
|
horizontal: "center",
|
|
3131
517
|
vertical: "top"
|
|
3132
518
|
},
|
|
3133
|
-
children: /* @__PURE__ */
|
|
519
|
+
children: /* @__PURE__ */ W(I, {
|
|
3134
520
|
elevation: 4,
|
|
3135
521
|
square: !0,
|
|
3136
522
|
sx: { padding: n.spacing(3) },
|
|
3137
|
-
children: /* @__PURE__ */
|
|
3138
|
-
filter:
|
|
3139
|
-
onFilterChange:
|
|
523
|
+
children: /* @__PURE__ */ W(rt, {
|
|
524
|
+
filter: F,
|
|
525
|
+
onFilterChange: te
|
|
3140
526
|
})
|
|
3141
527
|
})
|
|
3142
528
|
})] }),
|
|
3143
|
-
|
|
3144
|
-
className:
|
|
3145
|
-
onClick:
|
|
3146
|
-
ownerState:
|
|
529
|
+
me && /* @__PURE__ */ W(U, { children: /* @__PURE__ */ W(st, {
|
|
530
|
+
className: ue,
|
|
531
|
+
onClick: ee,
|
|
532
|
+
ownerState: le,
|
|
3147
533
|
tabIndex: 0,
|
|
3148
534
|
title: t("Toggle sorting for {{name}}", { name: _.headerName || t("unknown") }),
|
|
3149
|
-
children: /* @__PURE__ */
|
|
535
|
+
children: /* @__PURE__ */ W(Te, { fontSize: "inherit" })
|
|
3150
536
|
}) }),
|
|
3151
|
-
_.resizable !== !1 && /* @__PURE__ */ N
|
|
537
|
+
_.resizable !== !1 && /* @__PURE__ */ W(N, {
|
|
3152
538
|
"aria-label": t("Resize column {{name}}, use arrow keys to adjust the size.", { name: _.headerName || t("unknown") }),
|
|
3153
|
-
className:
|
|
3154
|
-
onKeyDown:
|
|
3155
|
-
onMouseDown:
|
|
539
|
+
className: Q.columnDivider,
|
|
540
|
+
onKeyDown: P,
|
|
541
|
+
onMouseDown: ne,
|
|
3156
542
|
role: "separator",
|
|
3157
543
|
sx: {
|
|
3158
544
|
"&:focus-visible, &:focus, &:focus-within": {
|
|
@@ -3177,12 +563,12 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3177
563
|
]
|
|
3178
564
|
})]
|
|
3179
565
|
}, _.id);
|
|
3180
|
-
},
|
|
3181
|
-
let t = h(), n = m(t, b((e) => e.dataContext)), [r, i] =
|
|
566
|
+
}, dt = (e) => {
|
|
567
|
+
let t = h(), n = m(t, b((e) => e.dataContext)), [r, i] = H(null), { t: a } = K(), o = !!r, s = R((e) => {
|
|
3182
568
|
i(e.currentTarget);
|
|
3183
|
-
}, []), c =
|
|
569
|
+
}, []), c = R(() => {
|
|
3184
570
|
i(null);
|
|
3185
|
-
}, []), l =
|
|
571
|
+
}, []), l = B(() => e.column.getActions({
|
|
3186
572
|
dataContext: n,
|
|
3187
573
|
id: e.column.id,
|
|
3188
574
|
row: e.row,
|
|
@@ -3192,11 +578,11 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3192
578
|
e.column,
|
|
3193
579
|
e.row,
|
|
3194
580
|
e.rowIndex
|
|
3195
|
-
]), u =
|
|
3196
|
-
return /* @__PURE__ */
|
|
581
|
+
]), u = R(() => {}, []);
|
|
582
|
+
return /* @__PURE__ */ W(at, {
|
|
3197
583
|
...e,
|
|
3198
584
|
onClick: u,
|
|
3199
|
-
children: l.length > 0 && /* @__PURE__ */
|
|
585
|
+
children: l.length > 0 && /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W(ie, {
|
|
3200
586
|
"aria-label": a`Row actions`,
|
|
3201
587
|
onClick: s,
|
|
3202
588
|
sx: {
|
|
@@ -3205,8 +591,8 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3205
591
|
top: "50%",
|
|
3206
592
|
transform: "translateY(-50%)"
|
|
3207
593
|
},
|
|
3208
|
-
children: /* @__PURE__ */
|
|
3209
|
-
}), /* @__PURE__ */
|
|
594
|
+
children: /* @__PURE__ */ W(Y, {})
|
|
595
|
+
}), /* @__PURE__ */ W(ae, {
|
|
3210
596
|
anchorEl: r,
|
|
3211
597
|
id: "basic-menu",
|
|
3212
598
|
onClick: c,
|
|
@@ -3216,26 +602,26 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3216
602
|
children: l
|
|
3217
603
|
})] })
|
|
3218
604
|
}, e.column.id);
|
|
3219
|
-
},
|
|
3220
|
-
let t =
|
|
3221
|
-
return /* @__PURE__ */
|
|
3222
|
-
...
|
|
605
|
+
}, ft = ({ children: e }) => {
|
|
606
|
+
let t = B(() => ({ sideEffects: Ne({ styles: { active: { opacity: "0.6" } } }) }), []);
|
|
607
|
+
return /* @__PURE__ */ W(Z, {
|
|
608
|
+
...q.createAttributes("SortableOverlay"),
|
|
3223
609
|
dropAnimation: t,
|
|
3224
610
|
zIndex: 1e3,
|
|
3225
611
|
children: e
|
|
3226
612
|
});
|
|
3227
|
-
},
|
|
613
|
+
}, pt = L({
|
|
3228
614
|
attributes: void 0,
|
|
3229
615
|
listeners: void 0,
|
|
3230
616
|
ref: void 0
|
|
3231
|
-
}),
|
|
617
|
+
}), mt = (e) => {
|
|
3232
618
|
let { children: t, value: n } = e;
|
|
3233
|
-
return /* @__PURE__ */
|
|
619
|
+
return /* @__PURE__ */ W(pt, {
|
|
3234
620
|
value: n,
|
|
3235
621
|
children: t
|
|
3236
622
|
});
|
|
3237
|
-
},
|
|
3238
|
-
let r =
|
|
623
|
+
}, ht = ({ children: e, id: t, sx: n }) => {
|
|
624
|
+
let r = pe(), { attributes: i, isDragging: a, listeners: o, setActivatorNodeRef: s, setNodeRef: c, transform: l, transition: u } = ze({ id: t }), d = B(() => ({
|
|
3239
625
|
attributes: i,
|
|
3240
626
|
listeners: o,
|
|
3241
627
|
ref: s
|
|
@@ -3245,13 +631,13 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3245
631
|
s
|
|
3246
632
|
]), f = {
|
|
3247
633
|
backgroundColor: a ? r.palette.secondary.main : r.palette.background.paper,
|
|
3248
|
-
transform:
|
|
634
|
+
transform: Be.Translate.toString(l),
|
|
3249
635
|
transition: u
|
|
3250
636
|
};
|
|
3251
|
-
return /* @__PURE__ */
|
|
637
|
+
return /* @__PURE__ */ W(mt, {
|
|
3252
638
|
value: d,
|
|
3253
|
-
children: /* @__PURE__ */ N
|
|
3254
|
-
...
|
|
639
|
+
children: /* @__PURE__ */ W(N, {
|
|
640
|
+
...q.createAttributes("SortableListItem", { id: t }),
|
|
3255
641
|
component: "li",
|
|
3256
642
|
ref: c,
|
|
3257
643
|
style: f,
|
|
@@ -3270,10 +656,10 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3270
656
|
children: e
|
|
3271
657
|
})
|
|
3272
658
|
});
|
|
3273
|
-
},
|
|
3274
|
-
let t =
|
|
3275
|
-
return /* @__PURE__ */ N
|
|
3276
|
-
...
|
|
659
|
+
}, gt = ({ name: e }) => {
|
|
660
|
+
let t = pe(), { attributes: n, listeners: r, ref: i } = ve(pt);
|
|
661
|
+
return /* @__PURE__ */ W(N, {
|
|
662
|
+
...q.createAttributes("SortableListItemDragHandle"),
|
|
3277
663
|
component: "button",
|
|
3278
664
|
...n,
|
|
3279
665
|
...r,
|
|
@@ -3295,20 +681,20 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3295
681
|
outline: "none",
|
|
3296
682
|
touchAction: "none"
|
|
3297
683
|
},
|
|
3298
|
-
children: /* @__PURE__ */
|
|
684
|
+
children: /* @__PURE__ */ W(Ve, {})
|
|
3299
685
|
});
|
|
3300
|
-
},
|
|
3301
|
-
let r =
|
|
686
|
+
}, _t = ({ items: e, onChange: t, renderItemContent: n }) => {
|
|
687
|
+
let r = pe(), { t: i } = K(), [a, o] = H(null), s = B(() => e.find((e) => e.id === a?.id), [a, e]), c = Fe(Pe(Me), Pe(je, { coordinateGetter: Re })), l = R(() => {
|
|
3302
688
|
o(null);
|
|
3303
|
-
}, []), u =
|
|
689
|
+
}, []), u = R(({ active: n, over: r }) => {
|
|
3304
690
|
if (r && n.id !== r?.id) {
|
|
3305
691
|
let i = e.findIndex(({ id: e }) => e === n.id), a = e.findIndex(({ id: e }) => e === r.id);
|
|
3306
|
-
t(
|
|
692
|
+
t(Le(e, i, a));
|
|
3307
693
|
}
|
|
3308
694
|
o(null);
|
|
3309
|
-
}, [e, t]), d =
|
|
695
|
+
}, [e, t]), d = R(({ active: e }) => {
|
|
3310
696
|
o(e);
|
|
3311
|
-
}, []), f =
|
|
697
|
+
}, []), f = R((n) => {
|
|
3312
698
|
let r = n.target.getAttribute("data-id");
|
|
3313
699
|
if (!r) return;
|
|
3314
700
|
let i = n.target.checked;
|
|
@@ -3316,14 +702,14 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3316
702
|
...e,
|
|
3317
703
|
isSelected: i
|
|
3318
704
|
} : e));
|
|
3319
|
-
}, [t, e]), p =
|
|
705
|
+
}, [t, e]), p = R((e) => /* @__PURE__ */ G(ht, {
|
|
3320
706
|
id: e.id,
|
|
3321
707
|
sx: {
|
|
3322
708
|
"&:hover": { backgroundColor: r.palette.action.hover },
|
|
3323
709
|
backgroundColor: r.palette.background.paper
|
|
3324
710
|
},
|
|
3325
|
-
children: [/* @__PURE__ */
|
|
3326
|
-
control: /* @__PURE__ */
|
|
711
|
+
children: [/* @__PURE__ */ W(F, {
|
|
712
|
+
control: /* @__PURE__ */ W(ne, {
|
|
3327
713
|
checked: e.isSelected,
|
|
3328
714
|
onChange: f,
|
|
3329
715
|
size: "small",
|
|
@@ -3334,22 +720,22 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3334
720
|
flexGrow: 1,
|
|
3335
721
|
paddingLeft: r.spacing(1)
|
|
3336
722
|
}
|
|
3337
|
-
}), /* @__PURE__ */
|
|
723
|
+
}), /* @__PURE__ */ W(gt, { name: i("Drag handle for {{label}}", { label: e.label }) })]
|
|
3338
724
|
}, e.id), [
|
|
3339
725
|
f,
|
|
3340
726
|
n,
|
|
3341
727
|
i,
|
|
3342
728
|
r
|
|
3343
729
|
]);
|
|
3344
|
-
return /* @__PURE__ */
|
|
730
|
+
return /* @__PURE__ */ G(X, {
|
|
3345
731
|
onDragCancel: l,
|
|
3346
732
|
onDragEnd: u,
|
|
3347
733
|
onDragStart: d,
|
|
3348
734
|
sensors: c,
|
|
3349
|
-
children: [/* @__PURE__ */
|
|
735
|
+
children: [/* @__PURE__ */ W(Ie, {
|
|
3350
736
|
items: e,
|
|
3351
|
-
children: /* @__PURE__ */
|
|
3352
|
-
...
|
|
737
|
+
children: /* @__PURE__ */ W(re, { children: /* @__PURE__ */ W(N, {
|
|
738
|
+
...q.createAttributes("SortableList"),
|
|
3353
739
|
component: "ul",
|
|
3354
740
|
sx: {
|
|
3355
741
|
display: "flex",
|
|
@@ -3360,15 +746,15 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3360
746
|
},
|
|
3361
747
|
children: e.map((e) => p(e))
|
|
3362
748
|
}) })
|
|
3363
|
-
}), /* @__PURE__ */
|
|
749
|
+
}), /* @__PURE__ */ W(ft, { children: s ? p(s) : null })]
|
|
3364
750
|
});
|
|
3365
|
-
},
|
|
3366
|
-
let { t: i } =
|
|
751
|
+
}, vt = Ae(({ onActionsChange: e, onClose: t, onTitleChange: n, openProps: { hasCellData: r } }) => {
|
|
752
|
+
let { t: i } = K(), [a, o] = H([]), s = h(), c = m(s, b((e) => e.emitEvent)), l = m(s, b((e) => e.dataContext)), d = m(s, b((e) => e.getCurrentColumnVisualSettings())), f = m(s, b((e) => e.columns)), p = m(s, b((e) => e.sortedData)), g = B(() => {
|
|
3367
753
|
let e = /* @__PURE__ */ new Map();
|
|
3368
754
|
return f.forEach((t) => {
|
|
3369
755
|
e.set(t.id, t);
|
|
3370
756
|
}), e;
|
|
3371
|
-
}, [f]), _ =
|
|
757
|
+
}, [f]), _ = R((e) => {
|
|
3372
758
|
let t = [];
|
|
3373
759
|
e.forEach((e) => {
|
|
3374
760
|
let n = g.get(e.id);
|
|
@@ -3379,16 +765,16 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3379
765
|
});
|
|
3380
766
|
}), o(t);
|
|
3381
767
|
}, [g]);
|
|
3382
|
-
|
|
768
|
+
z(() => {
|
|
3383
769
|
_(d);
|
|
3384
770
|
}, [d, _]);
|
|
3385
|
-
let v =
|
|
771
|
+
let v = R(() => {
|
|
3386
772
|
_(u.createInitialVisualColumnSettings(f));
|
|
3387
773
|
}, [f, _]);
|
|
3388
|
-
|
|
774
|
+
z(() => {
|
|
3389
775
|
n(i`Change column order and visibility`);
|
|
3390
776
|
}, [n, i]);
|
|
3391
|
-
let y =
|
|
777
|
+
let y = R(() => {
|
|
3392
778
|
c("columnVisibilityChange", [...f.filter((e) => e.frozen).map((e) => e.id), ...a.filter((e) => e.isSelected).map((e) => e.id.toString())]);
|
|
3393
779
|
let e = f.findIndex((e) => !e.frozen), n = f.slice(0, e), r = f.slice(e + a.length);
|
|
3394
780
|
c("columnOrderChange", [
|
|
@@ -3401,7 +787,7 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3401
787
|
c,
|
|
3402
788
|
a,
|
|
3403
789
|
t
|
|
3404
|
-
]), x =
|
|
790
|
+
]), x = R((e) => {
|
|
3405
791
|
let t = u.getColumnIdsWithData({
|
|
3406
792
|
dataContext: l,
|
|
3407
793
|
hasCellData: r,
|
|
@@ -3419,25 +805,25 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3419
805
|
a,
|
|
3420
806
|
p,
|
|
3421
807
|
f
|
|
3422
|
-
]), S =
|
|
808
|
+
]), S = R(() => {
|
|
3423
809
|
x(() => !0);
|
|
3424
|
-
}, [x]), C =
|
|
810
|
+
}, [x]), C = R(() => {
|
|
3425
811
|
x((e) => e.isSelected);
|
|
3426
|
-
}, [x]), w =
|
|
812
|
+
}, [x]), w = R(() => {
|
|
3427
813
|
o((e) => e.map((e) => ({
|
|
3428
814
|
...e,
|
|
3429
815
|
isSelected: !0
|
|
3430
816
|
})));
|
|
3431
|
-
}, []), T =
|
|
817
|
+
}, []), T = R(() => {
|
|
3432
818
|
o((e) => e.map((e) => ({
|
|
3433
819
|
...e,
|
|
3434
820
|
isSelected: !1
|
|
3435
821
|
})));
|
|
3436
822
|
}, []);
|
|
3437
|
-
|
|
823
|
+
z(() => {
|
|
3438
824
|
e([
|
|
3439
825
|
{
|
|
3440
|
-
...
|
|
826
|
+
...q.createAttributes("TableColumnOrderDialog-enable-all"),
|
|
3441
827
|
autoFocus: !0,
|
|
3442
828
|
color: "secondary",
|
|
3443
829
|
label: i`Enable all`,
|
|
@@ -3445,7 +831,7 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3445
831
|
variant: "outlined"
|
|
3446
832
|
},
|
|
3447
833
|
{
|
|
3448
|
-
...
|
|
834
|
+
...q.createAttributes("TableColumnOrderDialog-enable-all-with-data"),
|
|
3449
835
|
autoFocus: !0,
|
|
3450
836
|
color: "secondary",
|
|
3451
837
|
label: i`Enable all with data`,
|
|
@@ -3453,7 +839,7 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3453
839
|
variant: "outlined"
|
|
3454
840
|
},
|
|
3455
841
|
{
|
|
3456
|
-
...
|
|
842
|
+
...q.createAttributes("TableColumnOrderDialog-disable-all"),
|
|
3457
843
|
autoFocus: !0,
|
|
3458
844
|
color: "secondary",
|
|
3459
845
|
label: i`Disable all`,
|
|
@@ -3461,7 +847,7 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3461
847
|
variant: "outlined"
|
|
3462
848
|
},
|
|
3463
849
|
{
|
|
3464
|
-
...
|
|
850
|
+
...q.createAttributes("TableColumnOrderDialog-disable-all-without-data"),
|
|
3465
851
|
autoFocus: !0,
|
|
3466
852
|
color: "secondary",
|
|
3467
853
|
label: i`Disable all without data`,
|
|
@@ -3469,7 +855,7 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3469
855
|
variant: "outlined"
|
|
3470
856
|
},
|
|
3471
857
|
{
|
|
3472
|
-
...
|
|
858
|
+
...q.createAttributes("TableColumnOrderDialog-reset"),
|
|
3473
859
|
autoFocus: !0,
|
|
3474
860
|
color: "secondary",
|
|
3475
861
|
label: i`Reset to default`,
|
|
@@ -3477,7 +863,7 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3477
863
|
variant: "outlined"
|
|
3478
864
|
},
|
|
3479
865
|
{
|
|
3480
|
-
...
|
|
866
|
+
...q.createAttributes("TableColumnOrderDialog-close"),
|
|
3481
867
|
autoFocus: !0,
|
|
3482
868
|
color: "primary",
|
|
3483
869
|
label: i`Close`,
|
|
@@ -3485,7 +871,7 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3485
871
|
variant: "outlined"
|
|
3486
872
|
},
|
|
3487
873
|
{
|
|
3488
|
-
...
|
|
874
|
+
...q.createAttributes("TableColumnOrderDialog-save"),
|
|
3489
875
|
autoFocus: !0,
|
|
3490
876
|
color: "secondary",
|
|
3491
877
|
label: i`Apply`,
|
|
@@ -3504,15 +890,15 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3504
890
|
i,
|
|
3505
891
|
C
|
|
3506
892
|
]);
|
|
3507
|
-
let E =
|
|
893
|
+
let E = R((e) => {
|
|
3508
894
|
o(e);
|
|
3509
|
-
}, []),
|
|
3510
|
-
return /* @__PURE__ */ N
|
|
895
|
+
}, []), D = R((e) => e.label, []);
|
|
896
|
+
return /* @__PURE__ */ W(N, {
|
|
3511
897
|
sx: {},
|
|
3512
|
-
children: /* @__PURE__ */
|
|
898
|
+
children: /* @__PURE__ */ W(_t, {
|
|
3513
899
|
items: a,
|
|
3514
900
|
onChange: E,
|
|
3515
|
-
renderItemContent:
|
|
901
|
+
renderItemContent: D
|
|
3516
902
|
})
|
|
3517
903
|
});
|
|
3518
904
|
}, {
|
|
@@ -3522,14 +908,14 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3522
908
|
maxWidth: "md",
|
|
3523
909
|
noCloseButton: !1,
|
|
3524
910
|
testId: "TableColumnOrderDialog"
|
|
3525
|
-
}),
|
|
3526
|
-
let { t: r } =
|
|
911
|
+
}), yt = ({ cell: e, onCheckBoxClick: t, tableColumn: n }) => {
|
|
912
|
+
let { t: r } = K(), i = h(), a = m(i, b((e) => e.idSelectorCallback)), o = m(i, b((e) => e.selectedIds)), s = m(i, b((e) => e.setSelectedIds)), c = a(e.row), l = R((e) => {
|
|
3527
913
|
e.stopPropagation(), e.shiftKey && e.preventDefault(), t(e, c);
|
|
3528
|
-
}, [t, c]), u =
|
|
914
|
+
}, [t, c]), u = R((e, t) => {
|
|
3529
915
|
let n = e.target.getAttribute("name");
|
|
3530
916
|
t && !o.includes(n) ? s([...o, n]) : t || s(o.filter((e) => e !== n));
|
|
3531
917
|
}, [o, s]);
|
|
3532
|
-
return /* @__PURE__ */
|
|
918
|
+
return /* @__PURE__ */ W(ne, {
|
|
3533
919
|
checked: o.includes(c),
|
|
3534
920
|
disabled: n.isDisabled ? n.isDisabled(e) : !1,
|
|
3535
921
|
name: a(e.row),
|
|
@@ -3541,15 +927,15 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3541
927
|
padding: 0
|
|
3542
928
|
}
|
|
3543
929
|
});
|
|
3544
|
-
},
|
|
3545
|
-
let { t } =
|
|
930
|
+
}, bt = /* @__PURE__ */ e(y(), 1), xt = ({ tableColumnParams: e }) => {
|
|
931
|
+
let { t } = K(), n = e.column, r = h(), i = m(r, b((e) => e.dataContext)), a = m(r, b((e) => e.idSelectorCallback)), o = m(r, b((e) => e.selectedIds)), s = m(r, b((e) => e.sortedData)), c = m(r, b((e) => e.setSelectedIds)), l = n.isDisabled ? s.filter((e) => n.isDisabled({
|
|
3546
932
|
dataContext: i,
|
|
3547
933
|
id: a(e),
|
|
3548
934
|
row: e,
|
|
3549
935
|
rowIndex: s.indexOf(e)
|
|
3550
|
-
}) === !1) : s, u = l.every((e) => o.includes(a(e))), d = l.some((e) => o.includes(a(e))), f =
|
|
936
|
+
}) === !1) : s, u = l.every((e) => o.includes(a(e))), d = l.some((e) => o.includes(a(e))), f = R((e) => {
|
|
3551
937
|
let t = l.map((e) => a(e));
|
|
3552
|
-
c(u ? o.filter((e) => !t.includes(e)) : (0,
|
|
938
|
+
c(u ? o.filter((e) => !t.includes(e)) : (0, bt.default)([...o, ...t]));
|
|
3553
939
|
}, [
|
|
3554
940
|
l,
|
|
3555
941
|
a,
|
|
@@ -3557,9 +943,9 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3557
943
|
o,
|
|
3558
944
|
c
|
|
3559
945
|
]);
|
|
3560
|
-
return /* @__PURE__ */
|
|
946
|
+
return /* @__PURE__ */ W(ne, {
|
|
3561
947
|
checked: d,
|
|
3562
|
-
checkedIcon: u ? void 0 : /* @__PURE__ */
|
|
948
|
+
checkedIcon: u ? void 0 : /* @__PURE__ */ W(He, {}),
|
|
3563
949
|
name: "select-all",
|
|
3564
950
|
onChange: f,
|
|
3565
951
|
slotProps: { input: { "aria-label": t`Select all` } },
|
|
@@ -3568,8 +954,8 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3568
954
|
padding: 0
|
|
3569
955
|
}
|
|
3570
956
|
});
|
|
3571
|
-
},
|
|
3572
|
-
let i =
|
|
957
|
+
}, St = ({ cell: e, getRowName: t, onReadableIndexClick: n, tableColumn: r }) => {
|
|
958
|
+
let i = R((r) => {
|
|
3573
959
|
if (n) {
|
|
3574
960
|
if (!t) throw Error("getRowName is required when onReadableIndexClick is provided");
|
|
3575
961
|
p.getInstance().config.enablePageEvents && g.getInstance().emit("click", {
|
|
@@ -3582,7 +968,7 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3582
968
|
n,
|
|
3583
969
|
e.row
|
|
3584
970
|
]);
|
|
3585
|
-
return n ? /* @__PURE__ */
|
|
971
|
+
return n ? /* @__PURE__ */ W(te, {
|
|
3586
972
|
"aria-label": r.getAriaLabel(e),
|
|
3587
973
|
color: "primary",
|
|
3588
974
|
onClick: i,
|
|
@@ -3596,12 +982,12 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3596
982
|
variant: "text",
|
|
3597
983
|
children: e.rowIndex + 1
|
|
3598
984
|
}) : e.rowIndex + 1;
|
|
3599
|
-
},
|
|
3600
|
-
let w =
|
|
985
|
+
}, Ct = ({ font: e, forceHorizontalOverflow: t, getRowName: n, headerHeight: r = 4, initialVisibleItemIndex: i, onRangeChanged: a = Xe.default, onReadableIndexClick: o, onRowClick: s, onRowMouseEnter: c = Xe.default, onRowMouseLeave: l = Xe.default, onVerticalScrollPositionChange: d, onVisibleItemIndexChange: f, overscanMain: _, overscanReverse: v, ref: y, rowHeight: x = 4, rowHighlightingSubject: S, sx: C }) => {
|
|
986
|
+
let w = pe(), { t: T } = K(), E = h(), { DEFAULT_OVERSCAN_MAIN: D, DEFAULT_OVERSCAN_REVERSE: O } = p.getInstance().config.table;
|
|
3601
987
|
m(E, b((e) => e.getCurrentColumnVisualSettings().filter((e) => e.isVisible).map((e) => e.id)));
|
|
3602
|
-
let
|
|
988
|
+
let k = m(E, b((e) => e.setCurrentColumnVisualSettings)), A = m(E, b((e) => e.sortedData)), j = m(E, b((e) => e.idSelectorCallback)), M = m(E, b((e) => e.columns)), te = m(E, b((e) => e.isInitialized)), ne = m(E, b((e) => e.isRowEnabledCallback)), P = m(E, b((e) => e.addEventListener)), F = m(E, b((e) => e.dataContext)), re = m(E, b((e) => e.isCondensed)), ie = m(E, b((e) => e.setSelectedIds)), ae = m(E, b((e) => e.columnDimensions)), I = V(null), oe = V(Xe.default), [se, ce] = H(!1), fe = B(() => de(le(w.palette.divider, 1), .1), [w.palette.divider]), me = B(() => ue(le(w.palette.divider, 1), .15), [w.palette.divider]), he = Ce(), L = V(null), ve = V(0), ye = V(null), we = V(/* @__PURE__ */ new Set()), Te = V(!1), Ee = V(null), [J, De] = H(), Oe = V(null), ke = V(null), Y = V(null);
|
|
3603
989
|
m(E, (e) => JSON.stringify(e.filters.map((e) => e.filterValue))), m(E, b((e) => e.sortByField)), m(E, b((e) => e.sortDirection));
|
|
3604
|
-
let
|
|
990
|
+
let Ae = R((e, t) => {
|
|
3605
991
|
if (s) {
|
|
3606
992
|
if (!n) throw Error("getRowName is required when onRowClick is provided");
|
|
3607
993
|
p.getInstance().config.enablePageEvents && g.getInstance().emit("click", {
|
|
@@ -3609,125 +995,125 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3609
995
|
type: "table-row"
|
|
3610
996
|
}), t.preventDefault(), t.stopPropagation(), s(e);
|
|
3611
997
|
}
|
|
3612
|
-
}, [n, s]),
|
|
3613
|
-
if (!
|
|
3614
|
-
let e = (0,
|
|
3615
|
-
|
|
3616
|
-
}, [
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
}, [
|
|
3620
|
-
let
|
|
998
|
+
}, [n, s]), X = R(() => I?.current?.filter((e) => e.isVisible) ?? [], []), Z = R(() => {
|
|
999
|
+
if (!I?.current?.length || !J) return;
|
|
1000
|
+
let e = (0, qe.default)(X(), (e) => e.calculatedWidth), t = J.querySelector("[role=table]");
|
|
1001
|
+
ve.current = e, t && (t.style.width = `${e}px`);
|
|
1002
|
+
}, [J, X]);
|
|
1003
|
+
xe(() => {
|
|
1004
|
+
Z();
|
|
1005
|
+
}, [Z]);
|
|
1006
|
+
let je = R((e, t) => /* @__PURE__ */ W(St, {
|
|
3621
1007
|
cell: t,
|
|
3622
1008
|
getRowName: n,
|
|
3623
1009
|
onReadableIndexClick: o,
|
|
3624
1010
|
tableColumn: e
|
|
3625
|
-
}, t.id), [n, o]),
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
}, [
|
|
3629
|
-
let
|
|
3630
|
-
if (!e.shiftKey || !
|
|
3631
|
-
|
|
1011
|
+
}, t.id), [n, o]), Me = R((e) => /* @__PURE__ */ W(xt, { tableColumnParams: e }), []);
|
|
1012
|
+
z(() => {
|
|
1013
|
+
ke.current = null;
|
|
1014
|
+
}, [A]);
|
|
1015
|
+
let Ne = R((e, t) => {
|
|
1016
|
+
if (!e.shiftKey || !ke.current) {
|
|
1017
|
+
ke.current = t;
|
|
3632
1018
|
return;
|
|
3633
1019
|
}
|
|
3634
|
-
let n =
|
|
1020
|
+
let n = A.findIndex((e) => j(e) === ke.current), r = A.findIndex((e) => j(e) === t);
|
|
3635
1021
|
if (n === -1 || r === -1) return;
|
|
3636
|
-
let [i, a] = n < r ? [n, r] : [r, n], o =
|
|
3637
|
-
|
|
1022
|
+
let [i, a] = n < r ? [n, r] : [r, n], o = A.slice(i, a + 1).map((e) => j(e)), s = E.getState().selectedIds, c = E.getState().selectedIds.includes(t) ? s.filter((e) => !o.includes(e)) : Array.from(/* @__PURE__ */ new Set([...s, ...o]));
|
|
1023
|
+
ie(c), ke.current = t;
|
|
3638
1024
|
}, [
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
1025
|
+
j,
|
|
1026
|
+
ie,
|
|
1027
|
+
A,
|
|
3642
1028
|
E
|
|
3643
|
-
]),
|
|
3644
|
-
let n =
|
|
3645
|
-
return /* @__PURE__ */
|
|
1029
|
+
]), Pe = R((e, t) => {
|
|
1030
|
+
let n = j(t.row);
|
|
1031
|
+
return /* @__PURE__ */ W(yt, {
|
|
3646
1032
|
cell: t,
|
|
3647
|
-
onCheckBoxClick:
|
|
1033
|
+
onCheckBoxClick: Ne,
|
|
3648
1034
|
tableColumn: e
|
|
3649
1035
|
}, n);
|
|
3650
|
-
}, [
|
|
3651
|
-
if (!
|
|
3652
|
-
let e = u.updateColumnSizesInVisualSettings(
|
|
3653
|
-
|
|
1036
|
+
}, [j, Ne]), Fe = R(() => {
|
|
1037
|
+
if (!M.length || !J) return;
|
|
1038
|
+
let e = u.updateColumnSizesInVisualSettings(J, he, A, M, I.current);
|
|
1039
|
+
se && (J.querySelectorAll("[data-column-index]").forEach((t) => {
|
|
3654
1040
|
let n = t.getAttribute("data-id");
|
|
3655
1041
|
t.style.width = `${e.get(n).calculatedWidth}px`;
|
|
3656
|
-
}),
|
|
1042
|
+
}), Z());
|
|
3657
1043
|
}, [
|
|
3658
|
-
|
|
3659
|
-
|
|
1044
|
+
M,
|
|
1045
|
+
J,
|
|
1046
|
+
he,
|
|
3660
1047
|
A,
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
Ke
|
|
1048
|
+
se,
|
|
1049
|
+
Z
|
|
3664
1050
|
]);
|
|
3665
|
-
|
|
3666
|
-
|
|
1051
|
+
z(() => {
|
|
1052
|
+
J && !se && te && (I.current = E.getState().getCurrentColumnVisualSettings(), Fe(), Z(), ce(!0));
|
|
3667
1053
|
}, [
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
1054
|
+
J,
|
|
1055
|
+
se,
|
|
1056
|
+
te,
|
|
3671
1057
|
E,
|
|
3672
|
-
|
|
3673
|
-
|
|
1058
|
+
Fe,
|
|
1059
|
+
Z
|
|
3674
1060
|
]);
|
|
3675
|
-
let
|
|
3676
|
-
|
|
3677
|
-
}, [
|
|
3678
|
-
|
|
3679
|
-
}, 500, { trailing: !0 }),
|
|
3680
|
-
e.calculatedWidth = t, e.widthPx = t, e.hasResized = !0,
|
|
3681
|
-
}, [
|
|
1061
|
+
let Ie = R(() => J?.querySelector("[data-virtuoso-scroller=true]"), [J]), Le = R(() => {
|
|
1062
|
+
k(I.current);
|
|
1063
|
+
}, [k]), Re = Ze(() => {
|
|
1064
|
+
Le();
|
|
1065
|
+
}, 500, { trailing: !0 }), ze = R((e, t) => {
|
|
1066
|
+
e.calculatedWidth = t, e.widthPx = t, e.hasResized = !0, Fe(), Re();
|
|
1067
|
+
}, [Fe, Re]), Be = R((e, t) => {
|
|
3682
1068
|
if (e.key !== "ArrowLeft" && e.key !== "ArrowRight") return;
|
|
3683
1069
|
e.preventDefault();
|
|
3684
|
-
let n =
|
|
3685
|
-
|
|
3686
|
-
}, [
|
|
1070
|
+
let n = I.current.find((e) => e.id === t.id), r = n.calculatedWidth, i = e.key === "ArrowLeft" ? Math.max(50, r - 10) : r + 10;
|
|
1071
|
+
ze(n, i);
|
|
1072
|
+
}, [ze]), Ve = R((e, t) => {
|
|
3687
1073
|
e.preventDefault();
|
|
3688
|
-
let n =
|
|
1074
|
+
let n = I.current.find((e) => e.id === t.id), r = e.clientX, i = n?.calculatedWidth, a = (e) => {
|
|
3689
1075
|
let t = e.clientX;
|
|
3690
1076
|
if (r === t) return;
|
|
3691
1077
|
let a = t - r, o = Math.max(50, i + a);
|
|
3692
|
-
i !== o &&
|
|
1078
|
+
i !== o && ze(n, o);
|
|
3693
1079
|
}, o = (e) => {
|
|
3694
|
-
|
|
1080
|
+
oe.current(), oe.current = Xe.default;
|
|
3695
1081
|
};
|
|
3696
|
-
document.addEventListener("mousemove", a), document.addEventListener("mouseup", o),
|
|
1082
|
+
document.addEventListener("mousemove", a), document.addEventListener("mouseup", o), oe.current = () => {
|
|
3697
1083
|
document.removeEventListener("mousemove", a), document.removeEventListener("mouseup", o);
|
|
3698
1084
|
};
|
|
3699
|
-
}, [
|
|
3700
|
-
|
|
3701
|
-
|
|
1085
|
+
}, [ze]);
|
|
1086
|
+
z(() => () => {
|
|
1087
|
+
oe.current();
|
|
3702
1088
|
}, []);
|
|
3703
|
-
let
|
|
3704
|
-
|
|
1089
|
+
let He = R((e, t) => u.handleMoveColumn(ae, I.current, M, e, t), [ae, M]), Ue = R(() => {
|
|
1090
|
+
J.querySelectorAll("[data-column-index]").forEach((e) => {
|
|
3705
1091
|
let t = e.getAttribute("data-id");
|
|
3706
|
-
e.style.order =
|
|
1092
|
+
e.style.order = I.current.findIndex((e) => e.id === t).toString();
|
|
3707
1093
|
});
|
|
3708
|
-
}, [
|
|
3709
|
-
|
|
1094
|
+
}, [J]);
|
|
1095
|
+
z(() => {
|
|
3710
1096
|
let e = () => {
|
|
3711
|
-
|
|
3712
|
-
}, t =
|
|
1097
|
+
Fe(), Ue();
|
|
1098
|
+
}, t = ee.getInstance();
|
|
3713
1099
|
return t.window.addEventListener("resize", e), () => {
|
|
3714
1100
|
t.window.removeEventListener("resize", e);
|
|
3715
1101
|
};
|
|
3716
|
-
}, [
|
|
3717
|
-
let
|
|
3718
|
-
let t =
|
|
1102
|
+
}, [Ue, Fe]);
|
|
1103
|
+
let We = R((e) => {
|
|
1104
|
+
let t = X();
|
|
3719
1105
|
return {
|
|
3720
1106
|
elementIndex: t.findIndex((t) => t.id === e.id),
|
|
3721
1107
|
visibleTableSettingsColumns: t,
|
|
3722
1108
|
widths: t.map((e) => e.calculatedWidth)
|
|
3723
1109
|
};
|
|
3724
|
-
}, [
|
|
3725
|
-
let n =
|
|
3726
|
-
if (e.type === "start" && (
|
|
1110
|
+
}, [X]), Ge = R((e, t) => {
|
|
1111
|
+
let n = We(t);
|
|
1112
|
+
if (e.type === "start" && (ee.getInstance().body.style.setProperty("overflow", "hidden"), J?.style.setProperty("--selection-background", "none"), e.target.style.setProperty("opacity", "0.3"), Y.current = {
|
|
3727
1113
|
clonedElement: e.target.cloneNode(!0),
|
|
3728
1114
|
elementOffsetX: n.widths.slice(0, n.elementIndex).reduce((e, t) => e + t, 0) - 15,
|
|
3729
|
-
scrollPosition:
|
|
3730
|
-
},
|
|
1115
|
+
scrollPosition: Ie().scrollLeft
|
|
1116
|
+
}, Y.current.clonedElement.style.cssText = `
|
|
3731
1117
|
font-weight: bold;
|
|
3732
1118
|
position: absolute;
|
|
3733
1119
|
top: ${e.target.getBoundingClientRect().top}px;
|
|
@@ -3736,44 +1122,44 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3736
1122
|
pointer-events: none;
|
|
3737
1123
|
filter: blur(0.5px);
|
|
3738
1124
|
box-shadow: 1px 2px 3px 0px rgba(0,0,0,0.5);
|
|
3739
|
-
`,
|
|
3740
|
-
|
|
3741
|
-
let r =
|
|
3742
|
-
(r < i &&
|
|
1125
|
+
`, ee.getInstance().body.appendChild(Y.current.clonedElement)), e.type === "end" && (ee.getInstance().body.style.removeProperty("overflow"), J?.style.setProperty("--selection-background", "highlight"), ee.getInstance().document.getSelection().empty(), Y.current.clonedElement.remove(), e.target.style.setProperty("opacity", "1")), e.type === "move") {
|
|
1126
|
+
Y.current.clonedElement.style.setProperty("left", `${e.clientX - e.elementOffsetX}px`), Y.current.clonedElement.style.setProperty("top", `${e.clientY}px`);
|
|
1127
|
+
let r = Y.current.elementOffsetX + e.deltaX + e.elementOffsetX + (Ie().scrollLeft - Y.current.scrollPosition), i = n.widths.slice(0, n.elementIndex - 1).reduce((e, t) => e + t, 0) + Math.min(16, n.widths?.[n.elementIndex - 1] ?? Infinity), a = n.widths.slice(0, n.elementIndex + 1).reduce((e, t) => e + t, 0) + Math.min(16, n.widths?.[n.elementIndex + 1] ?? Infinity);
|
|
1128
|
+
(r < i && He(t, -1) || r > a && He(t, 1)) && (Ue(), We(t));
|
|
3743
1129
|
}
|
|
3744
1130
|
}, [
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
1131
|
+
We,
|
|
1132
|
+
J?.style,
|
|
1133
|
+
Ie,
|
|
1134
|
+
He,
|
|
3749
1135
|
w.zIndex.modal,
|
|
3750
|
-
|
|
3751
|
-
]),
|
|
1136
|
+
Ue
|
|
1137
|
+
]), Ke = R(() => /* @__PURE__ */ W(N, {
|
|
3752
1138
|
"aria-rowindex": 1,
|
|
3753
1139
|
role: "row",
|
|
3754
1140
|
sx: {
|
|
3755
|
-
[`&:hover .${
|
|
1141
|
+
[`&:hover .${Q.columnDivider}`]: { opacity: 1 },
|
|
3756
1142
|
background: w.palette.background.paper,
|
|
3757
|
-
borderBottom: `1px solid ${
|
|
1143
|
+
borderBottom: `1px solid ${me}`,
|
|
3758
1144
|
display: "flex",
|
|
3759
1145
|
fontWeight: "bold",
|
|
3760
1146
|
height: w.spacing(r),
|
|
3761
1147
|
zIndex: 3
|
|
3762
1148
|
},
|
|
3763
|
-
children:
|
|
3764
|
-
let n =
|
|
3765
|
-
return n ? /* @__PURE__ */
|
|
1149
|
+
children: X().map((e, t) => {
|
|
1150
|
+
let n = M.find((t) => t.id === e.id);
|
|
1151
|
+
return n ? /* @__PURE__ */ W(ut, {
|
|
3766
1152
|
column: n.type === "selectable" ? {
|
|
3767
1153
|
...n,
|
|
3768
|
-
renderHeaderContent:
|
|
1154
|
+
renderHeaderContent: Me
|
|
3769
1155
|
} : n,
|
|
3770
1156
|
columnIndex: t,
|
|
3771
|
-
dividerColor:
|
|
1157
|
+
dividerColor: me,
|
|
3772
1158
|
height: w.spacing(r),
|
|
3773
|
-
onColumnDividerKeyDown:
|
|
3774
|
-
onColumnDividerMouseDown:
|
|
3775
|
-
onCustomDrag:
|
|
3776
|
-
order:
|
|
1159
|
+
onColumnDividerKeyDown: Be,
|
|
1160
|
+
onColumnDividerMouseDown: Ve,
|
|
1161
|
+
onCustomDrag: Ge,
|
|
1162
|
+
order: I.current.findIndex((t) => t.id === e.id),
|
|
3777
1163
|
role: "columnheader",
|
|
3778
1164
|
width: e.calculatedWidth,
|
|
3779
1165
|
xOffset: e.offsetX
|
|
@@ -3782,31 +1168,31 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3782
1168
|
}), [
|
|
3783
1169
|
w,
|
|
3784
1170
|
r,
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
]),
|
|
3793
|
-
let i =
|
|
1171
|
+
me,
|
|
1172
|
+
X,
|
|
1173
|
+
M,
|
|
1174
|
+
Me,
|
|
1175
|
+
Ve,
|
|
1176
|
+
Be,
|
|
1177
|
+
Ge
|
|
1178
|
+
]), $e = R((e, t) => /* @__PURE__ */ W(U, { children: X().map((n, r) => {
|
|
1179
|
+
let i = M.find((e) => e.id === n.id), a;
|
|
3794
1180
|
if (i.cellTitleGetter) a = i.cellTitleGetter({
|
|
3795
1181
|
column: i,
|
|
3796
|
-
dataContext:
|
|
1182
|
+
dataContext: F,
|
|
3797
1183
|
id: n.id,
|
|
3798
1184
|
row: t,
|
|
3799
1185
|
rowIndex: e
|
|
3800
1186
|
});
|
|
3801
1187
|
else if (i.type === "text") a = u.getTableTextCellValue({
|
|
3802
1188
|
column: i,
|
|
3803
|
-
dataContext:
|
|
1189
|
+
dataContext: F,
|
|
3804
1190
|
row: t,
|
|
3805
1191
|
rowIndex: e
|
|
3806
1192
|
});
|
|
3807
1193
|
else if (i.type === "boolean") a = u.getTableBooleanCellDisplayValue({
|
|
3808
1194
|
column: i,
|
|
3809
|
-
dataContext:
|
|
1195
|
+
dataContext: F,
|
|
3810
1196
|
row: t,
|
|
3811
1197
|
rowIndex: e,
|
|
3812
1198
|
t: T
|
|
@@ -3814,35 +1200,35 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3814
1200
|
else if (i.type === "number") {
|
|
3815
1201
|
let n = u.getTableNumberCellValue({
|
|
3816
1202
|
column: i,
|
|
3817
|
-
dataContext:
|
|
1203
|
+
dataContext: F,
|
|
3818
1204
|
row: t,
|
|
3819
1205
|
rowIndex: e
|
|
3820
1206
|
});
|
|
3821
|
-
a = (0,
|
|
1207
|
+
a = (0, Je.default)(n) ? n.toString() : "";
|
|
3822
1208
|
} else i.type === "date" ? a = u.getTableDateCellValue({
|
|
3823
1209
|
column: i,
|
|
3824
|
-
dataContext:
|
|
1210
|
+
dataContext: F,
|
|
3825
1211
|
row: t,
|
|
3826
1212
|
rowIndex: e
|
|
3827
1213
|
}) : i.type === "options" && (a = u.getTableOptionsCellDisplayValue({
|
|
3828
1214
|
column: i,
|
|
3829
|
-
dataContext:
|
|
1215
|
+
dataContext: F,
|
|
3830
1216
|
row: t,
|
|
3831
1217
|
rowIndex: e
|
|
3832
1218
|
}));
|
|
3833
1219
|
let o = {
|
|
3834
|
-
backgroundColor:
|
|
1220
|
+
backgroundColor: re && i.cellColorGetter ? i.cellColorGetter({
|
|
3835
1221
|
column: i,
|
|
3836
|
-
dataContext:
|
|
1222
|
+
dataContext: F,
|
|
3837
1223
|
id: n.id,
|
|
3838
1224
|
row: t,
|
|
3839
1225
|
rowIndex: e
|
|
3840
1226
|
}) : void 0,
|
|
3841
1227
|
columnIndex: r,
|
|
3842
|
-
enabled: !
|
|
1228
|
+
enabled: !ne || ne(t, F),
|
|
3843
1229
|
height: w.spacing(x),
|
|
3844
|
-
onClick:
|
|
3845
|
-
order:
|
|
1230
|
+
onClick: Ae,
|
|
1231
|
+
order: I.current.findIndex((e) => e.id === n.id),
|
|
3846
1232
|
row: t,
|
|
3847
1233
|
rowIndex: e,
|
|
3848
1234
|
sx: i.sx,
|
|
@@ -3850,66 +1236,66 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3850
1236
|
width: n.calculatedWidth,
|
|
3851
1237
|
xOffset: n.offsetX
|
|
3852
1238
|
};
|
|
3853
|
-
return i.type === "actions" ? /* @__PURE__ */
|
|
1239
|
+
return i.type === "actions" ? /* @__PURE__ */ W(dt, {
|
|
3854
1240
|
...o,
|
|
3855
1241
|
column: i
|
|
3856
|
-
}, n.id) : /* @__PURE__ */
|
|
1242
|
+
}, n.id) : /* @__PURE__ */ G(at, {
|
|
3857
1243
|
...o,
|
|
3858
1244
|
column: i,
|
|
3859
1245
|
children: [
|
|
3860
|
-
!!i.renderCell && /* @__PURE__ */
|
|
1246
|
+
!!i.renderCell && /* @__PURE__ */ W(ge, { children: i.renderCell({
|
|
3861
1247
|
column: i,
|
|
3862
|
-
dataContext:
|
|
1248
|
+
dataContext: F,
|
|
3863
1249
|
id: n.id,
|
|
3864
1250
|
row: t,
|
|
3865
1251
|
rowIndex: e
|
|
3866
1252
|
}) }, i.id),
|
|
3867
|
-
!i.renderCell && !!i.displayValueGetter && /* @__PURE__ */
|
|
1253
|
+
!i.renderCell && !!i.displayValueGetter && /* @__PURE__ */ W(ge, { children: /* @__PURE__ */ W(Qe, { content: i.displayValueGetter({
|
|
3868
1254
|
column: i,
|
|
3869
|
-
dataContext:
|
|
1255
|
+
dataContext: F,
|
|
3870
1256
|
id: n.id,
|
|
3871
1257
|
row: t,
|
|
3872
1258
|
rowIndex: e
|
|
3873
1259
|
}) }) }, i.id),
|
|
3874
1260
|
!i.displayValueGetter && !i.renderCell && i.type === "text" && u.getTableTextCellValue({
|
|
3875
1261
|
column: i,
|
|
3876
|
-
dataContext:
|
|
1262
|
+
dataContext: F,
|
|
3877
1263
|
row: t,
|
|
3878
1264
|
rowIndex: e
|
|
3879
1265
|
}),
|
|
3880
1266
|
!i.displayValueGetter && !i.renderCell && i.type === "boolean" && u.getTableBooleanCellDisplayValue({
|
|
3881
1267
|
column: i,
|
|
3882
|
-
dataContext:
|
|
1268
|
+
dataContext: F,
|
|
3883
1269
|
row: t,
|
|
3884
1270
|
rowIndex: e,
|
|
3885
1271
|
t: T
|
|
3886
1272
|
}),
|
|
3887
1273
|
!i.displayValueGetter && !i.renderCell && i.type === "number" && u.getTableNumberCellValue({
|
|
3888
1274
|
column: i,
|
|
3889
|
-
dataContext:
|
|
1275
|
+
dataContext: F,
|
|
3890
1276
|
row: t,
|
|
3891
1277
|
rowIndex: e
|
|
3892
1278
|
}),
|
|
3893
1279
|
!i.displayValueGetter && !i.renderCell && i.type === "date" && u.getTableDateCellValue({
|
|
3894
1280
|
column: i,
|
|
3895
|
-
dataContext:
|
|
1281
|
+
dataContext: F,
|
|
3896
1282
|
row: t,
|
|
3897
1283
|
rowIndex: e
|
|
3898
1284
|
}),
|
|
3899
1285
|
!i.displayValueGetter && !i.renderCell && i.type === "options" && u.getTableOptionsCellDisplayValue({
|
|
3900
1286
|
column: i,
|
|
3901
|
-
dataContext:
|
|
1287
|
+
dataContext: F,
|
|
3902
1288
|
row: t,
|
|
3903
1289
|
rowIndex: e
|
|
3904
1290
|
}),
|
|
3905
|
-
!i.displayValueGetter && !i.renderCell && i.type === "readableIndex" &&
|
|
3906
|
-
dataContext:
|
|
1291
|
+
!i.displayValueGetter && !i.renderCell && i.type === "readableIndex" && je(i, {
|
|
1292
|
+
dataContext: F,
|
|
3907
1293
|
id: n.id,
|
|
3908
1294
|
row: t,
|
|
3909
1295
|
rowIndex: e
|
|
3910
1296
|
}),
|
|
3911
|
-
!i.displayValueGetter && !i.renderCell && i.type === "selectable" &&
|
|
3912
|
-
dataContext:
|
|
1297
|
+
!i.displayValueGetter && !i.renderCell && i.type === "selectable" && Pe(i, {
|
|
1298
|
+
dataContext: F,
|
|
3913
1299
|
id: n.id,
|
|
3914
1300
|
row: t,
|
|
3915
1301
|
rowIndex: e
|
|
@@ -3917,31 +1303,31 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3917
1303
|
]
|
|
3918
1304
|
}, n.id);
|
|
3919
1305
|
}) }), [
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
1306
|
+
X,
|
|
1307
|
+
ne,
|
|
1308
|
+
Ae,
|
|
1309
|
+
Pe,
|
|
1310
|
+
je,
|
|
3925
1311
|
x,
|
|
3926
1312
|
T,
|
|
3927
|
-
|
|
1313
|
+
M,
|
|
3928
1314
|
w,
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
]),
|
|
1315
|
+
F,
|
|
1316
|
+
re
|
|
1317
|
+
]), et = R((e) => {
|
|
3932
1318
|
c(e);
|
|
3933
|
-
}, [c]),
|
|
1319
|
+
}, [c]), tt = R((e) => {
|
|
3934
1320
|
l(e);
|
|
3935
1321
|
}, [l]);
|
|
3936
|
-
|
|
3937
|
-
if (!S) return
|
|
1322
|
+
z(() => {
|
|
1323
|
+
if (!S) return Xe.default;
|
|
3938
1324
|
let e = S.subscribe((e, t) => {
|
|
3939
1325
|
t.forEach((e) => {
|
|
3940
|
-
|
|
1326
|
+
J.querySelectorAll(`[data-testid=virtuoso-item-list] [data-id='${e}']`).forEach((e) => {
|
|
3941
1327
|
e.classList.remove("highlighted");
|
|
3942
1328
|
});
|
|
3943
1329
|
}), e.forEach((e) => {
|
|
3944
|
-
|
|
1330
|
+
J.querySelectorAll(`[data-testid=virtuoso-item-list] [data-id='${e}']`).forEach((e) => {
|
|
3945
1331
|
e.classList.add("highlighted");
|
|
3946
1332
|
});
|
|
3947
1333
|
});
|
|
@@ -3951,85 +1337,85 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3951
1337
|
};
|
|
3952
1338
|
}, [
|
|
3953
1339
|
S,
|
|
3954
|
-
|
|
1340
|
+
J,
|
|
3955
1341
|
w.palette.action.hover,
|
|
3956
1342
|
w.palette.background.paper
|
|
3957
|
-
]),
|
|
1343
|
+
]), z(() => {
|
|
3958
1344
|
let e = () => {
|
|
3959
|
-
|
|
1345
|
+
Fe(), Ue(), Z(), Le();
|
|
3960
1346
|
}, t = [
|
|
3961
|
-
|
|
3962
|
-
E.getState().setIsCondensed(t),
|
|
1347
|
+
P("condensedChange", (t) => {
|
|
1348
|
+
E.getState().setIsCondensed(t), I.current = E.getState().getCurrentColumnVisualSettings(), e();
|
|
3963
1349
|
}),
|
|
3964
|
-
|
|
3965
|
-
E.getState().resetColumns(),
|
|
1350
|
+
P("reset", () => {
|
|
1351
|
+
E.getState().resetColumns(), I.current = E.getState().getCurrentColumnVisualSettings(), e();
|
|
3966
1352
|
}),
|
|
3967
|
-
|
|
3968
|
-
|
|
1353
|
+
P("columnVisibilityChange", (t) => {
|
|
1354
|
+
I.current.forEach((e) => {
|
|
3969
1355
|
e.isVisible = t.includes(e.id);
|
|
3970
1356
|
}), e();
|
|
3971
1357
|
}),
|
|
3972
|
-
|
|
3973
|
-
|
|
1358
|
+
P("columnOrderChange", (t) => {
|
|
1359
|
+
I.current.sort((e, n) => t.indexOf(e.id) - t.indexOf(n.id)), e();
|
|
3974
1360
|
}),
|
|
3975
|
-
|
|
3976
|
-
|
|
1361
|
+
P("openColumnsEditorDialog", (e) => {
|
|
1362
|
+
Oe.current.open({ hasCellData: e });
|
|
3977
1363
|
})
|
|
3978
1364
|
];
|
|
3979
1365
|
return () => {
|
|
3980
1366
|
t.forEach((e) => e());
|
|
3981
1367
|
};
|
|
3982
1368
|
}, [
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
1369
|
+
P,
|
|
1370
|
+
Le,
|
|
1371
|
+
M,
|
|
3986
1372
|
E,
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
1373
|
+
Ue,
|
|
1374
|
+
Fe,
|
|
1375
|
+
Z
|
|
3990
1376
|
]);
|
|
3991
|
-
let
|
|
3992
|
-
let e =
|
|
3993
|
-
if (e && d && d(e.scrollTop),
|
|
1377
|
+
let nt = R(() => {
|
|
1378
|
+
let e = Ie();
|
|
1379
|
+
if (e && d && d(e.scrollTop), L.current && f) {
|
|
3994
1380
|
let t = e.scrollTop, n = +w.spacing(x).replace("px", "");
|
|
3995
1381
|
f(Math.floor(t / n));
|
|
3996
1382
|
}
|
|
3997
1383
|
}, [
|
|
3998
|
-
|
|
1384
|
+
Ie,
|
|
3999
1385
|
d,
|
|
4000
1386
|
f,
|
|
4001
1387
|
w,
|
|
4002
1388
|
x
|
|
4003
|
-
]),
|
|
4004
|
-
let t =
|
|
1389
|
+
]), rt = R(() => +w.spacing(x).replace("px", ""), [x, w]), it = R((e) => {
|
|
1390
|
+
let t = Ie();
|
|
4005
1391
|
t && (t.scrollTop = e);
|
|
4006
|
-
}, [
|
|
4007
|
-
let e =
|
|
4008
|
-
|
|
4009
|
-
}, []),
|
|
4010
|
-
|
|
4011
|
-
hasRendered:
|
|
1392
|
+
}, [Ie]), $ = R(() => {
|
|
1393
|
+
let e = Ee.current;
|
|
1394
|
+
e && !Te.current && e.hasRendered && (Ee.current = null, e.onScrolledToIndex());
|
|
1395
|
+
}, []), ot = R((e, t) => {
|
|
1396
|
+
Ee.current = t ? {
|
|
1397
|
+
hasRendered: we.current.has(e),
|
|
4012
1398
|
index: e,
|
|
4013
1399
|
onScrolledToIndex: t
|
|
4014
|
-
} : null,
|
|
4015
|
-
}, [
|
|
4016
|
-
|
|
4017
|
-
scrollToIndex:
|
|
4018
|
-
setVerticalScrollPosition:
|
|
1400
|
+
} : null, L.current?.scrollToIndex(e), $();
|
|
1401
|
+
}, [$]);
|
|
1402
|
+
be(y, () => ({
|
|
1403
|
+
scrollToIndex: ot,
|
|
1404
|
+
setVerticalScrollPosition: it
|
|
4019
1405
|
}));
|
|
4020
|
-
let
|
|
4021
|
-
|
|
4022
|
-
}, [a]),
|
|
4023
|
-
|
|
4024
|
-
let t =
|
|
4025
|
-
t &&
|
|
4026
|
-
}, [
|
|
4027
|
-
|
|
4028
|
-
}, [
|
|
4029
|
-
return
|
|
4030
|
-
|
|
4031
|
-
}, [a,
|
|
4032
|
-
ref:
|
|
1406
|
+
let st = R((e) => {
|
|
1407
|
+
ye.current = e, a(e);
|
|
1408
|
+
}, [a]), ct = R((e) => {
|
|
1409
|
+
we.current = new Set(e.map((e) => e.index));
|
|
1410
|
+
let t = Ee.current;
|
|
1411
|
+
t && we.current.has(t.index) && (t.hasRendered = !0), $();
|
|
1412
|
+
}, [$]), lt = R((e) => {
|
|
1413
|
+
Te.current = e, $();
|
|
1414
|
+
}, [$]);
|
|
1415
|
+
return z(() => {
|
|
1416
|
+
ye.current && a(ye.current);
|
|
1417
|
+
}, [a, A]), /* @__PURE__ */ G(N, {
|
|
1418
|
+
ref: De,
|
|
4033
1419
|
style: { "--selection-background": "highlight" },
|
|
4034
1420
|
sx: {
|
|
4035
1421
|
"*::selection": { backgroundColor: "var(--selection-background) !important" },
|
|
@@ -4038,43 +1424,43 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
4038
1424
|
width: "100%",
|
|
4039
1425
|
...C
|
|
4040
1426
|
},
|
|
4041
|
-
children: [
|
|
4042
|
-
...
|
|
1427
|
+
children: [se && /* @__PURE__ */ W(Se, {
|
|
1428
|
+
...q.createAttributes("Table"),
|
|
4043
1429
|
components: {
|
|
4044
|
-
EmptyPlaceholder:
|
|
1430
|
+
EmptyPlaceholder: _e((e, t) => /* @__PURE__ */ W(N, {
|
|
4045
1431
|
...e,
|
|
4046
1432
|
ref: t
|
|
4047
1433
|
})),
|
|
4048
|
-
FillerRow:
|
|
1434
|
+
FillerRow: _e((e, t) => /* @__PURE__ */ W(N, {
|
|
4049
1435
|
ref: t,
|
|
4050
1436
|
style: { height: e.height }
|
|
4051
1437
|
})),
|
|
4052
|
-
Table:
|
|
1438
|
+
Table: _e((e, t) => /* @__PURE__ */ W(N, {
|
|
4053
1439
|
...e,
|
|
4054
|
-
"data-row-count":
|
|
1440
|
+
"data-row-count": A.length,
|
|
4055
1441
|
ref: t,
|
|
4056
1442
|
role: "table",
|
|
4057
1443
|
sx: {
|
|
4058
1444
|
minWidth: "100%",
|
|
4059
1445
|
position: "relative",
|
|
4060
|
-
width:
|
|
1446
|
+
width: ve.current
|
|
4061
1447
|
}
|
|
4062
1448
|
})),
|
|
4063
|
-
TableBody:
|
|
1449
|
+
TableBody: _e((t, n) => /* @__PURE__ */ W(N, {
|
|
4064
1450
|
...t,
|
|
4065
1451
|
ref: n,
|
|
4066
1452
|
sx: { font: e }
|
|
4067
1453
|
})),
|
|
4068
|
-
TableHead:
|
|
1454
|
+
TableHead: _e((e, t) => /* @__PURE__ */ W(N, {
|
|
4069
1455
|
...e,
|
|
4070
1456
|
ref: t
|
|
4071
1457
|
})),
|
|
4072
|
-
TableRow:
|
|
4073
|
-
let n = !
|
|
4074
|
-
return /* @__PURE__ */ N
|
|
4075
|
-
"data-id":
|
|
4076
|
-
onMouseEnter: () =>
|
|
4077
|
-
onMouseLeave: () =>
|
|
1458
|
+
TableRow: _e((e, t) => {
|
|
1459
|
+
let n = !ne || ne(e.item, F);
|
|
1460
|
+
return /* @__PURE__ */ W(N, {
|
|
1461
|
+
"data-id": j(e.item),
|
|
1462
|
+
onMouseEnter: () => et(e.item),
|
|
1463
|
+
onMouseLeave: () => tt(e.item),
|
|
4078
1464
|
ref: t,
|
|
4079
1465
|
role: "row",
|
|
4080
1466
|
sx: {
|
|
@@ -4088,44 +1474,44 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
4088
1474
|
backgroundColor: w.palette.grey[100],
|
|
4089
1475
|
color: `${w.palette.text.primary} !important`
|
|
4090
1476
|
},
|
|
4091
|
-
borderBottom: `1px solid ${
|
|
1477
|
+
borderBottom: `1px solid ${fe}`,
|
|
4092
1478
|
color: n ? void 0 : "text.disabled",
|
|
4093
1479
|
cursor: n && s ? "pointer" : void 0,
|
|
4094
1480
|
display: "flex",
|
|
4095
1481
|
height: w.spacing(x)
|
|
4096
1482
|
},
|
|
4097
|
-
...(0,
|
|
1483
|
+
...(0, Ye.default)(e, "item")
|
|
4098
1484
|
});
|
|
4099
1485
|
})
|
|
4100
1486
|
},
|
|
4101
|
-
data:
|
|
4102
|
-
fixedHeaderContent:
|
|
1487
|
+
data: A,
|
|
1488
|
+
fixedHeaderContent: Ke,
|
|
4103
1489
|
fixedItemHeight: +w.spacing(x).replace("px", ""),
|
|
4104
1490
|
initialTopMostItemIndex: i ?? 0,
|
|
4105
|
-
isScrolling:
|
|
4106
|
-
itemContent:
|
|
4107
|
-
itemSize:
|
|
4108
|
-
itemsRendered:
|
|
4109
|
-
onScroll:
|
|
1491
|
+
isScrolling: lt,
|
|
1492
|
+
itemContent: $e,
|
|
1493
|
+
itemSize: rt,
|
|
1494
|
+
itemsRendered: ct,
|
|
1495
|
+
onScroll: nt,
|
|
4110
1496
|
overscan: {
|
|
4111
|
-
main: _ ??
|
|
4112
|
-
reverse: v ??
|
|
1497
|
+
main: _ ?? D,
|
|
1498
|
+
reverse: v ?? O
|
|
4113
1499
|
},
|
|
4114
|
-
rangeChanged:
|
|
4115
|
-
ref:
|
|
1500
|
+
rangeChanged: st,
|
|
1501
|
+
ref: L,
|
|
4116
1502
|
style: {
|
|
4117
1503
|
height: "100%",
|
|
4118
1504
|
overflowX: t ? "scroll" : "auto"
|
|
4119
1505
|
},
|
|
4120
|
-
totalCount:
|
|
4121
|
-
}), /* @__PURE__ */
|
|
1506
|
+
totalCount: A.length
|
|
1507
|
+
}), /* @__PURE__ */ W(vt, { ref: Oe })]
|
|
4122
1508
|
});
|
|
4123
|
-
},
|
|
4124
|
-
let { t: r } =
|
|
4125
|
-
return /* @__PURE__ */
|
|
1509
|
+
}, wt = ({ caption: e, component: t = "h2", variant: n = "h2" }) => {
|
|
1510
|
+
let { t: r } = K(), i = h(), a = m(i, (e) => e.baseData.length), o = m(i, b((e) => e.sortedData.length));
|
|
1511
|
+
return /* @__PURE__ */ W(ce, {
|
|
4126
1512
|
component: t,
|
|
4127
1513
|
variant: n,
|
|
4128
|
-
children: /* @__PURE__ */
|
|
1514
|
+
children: /* @__PURE__ */ G(U, { children: [
|
|
4129
1515
|
o === 0 && (e ?? r("Items")),
|
|
4130
1516
|
o > 0 && o === a && r("{{items}} ({{count}})", {
|
|
4131
1517
|
count: o,
|
|
@@ -4139,10 +1525,10 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
4139
1525
|
})
|
|
4140
1526
|
] })
|
|
4141
1527
|
});
|
|
4142
|
-
},
|
|
4143
|
-
t.exports = { ...
|
|
4144
|
-
})),
|
|
4145
|
-
var t =
|
|
1528
|
+
}, Tt = /* @__PURE__ */ t(((e, t) => {
|
|
1529
|
+
t.exports = { ...me };
|
|
1530
|
+
})), Et = /* @__PURE__ */ t(((e) => {
|
|
1531
|
+
var t = Tt();
|
|
4146
1532
|
function n(e, t) {
|
|
4147
1533
|
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
4148
1534
|
}
|
|
@@ -4179,7 +1565,7 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
4179
1565
|
}
|
|
4180
1566
|
var d = typeof window > "u" || window.document === void 0 || window.document.createElement === void 0 ? u : c;
|
|
4181
1567
|
e.useSyncExternalStore = t.useSyncExternalStore === void 0 ? d : t.useSyncExternalStore;
|
|
4182
|
-
})),
|
|
1568
|
+
})), Dt = /* @__PURE__ */ t(((e) => {
|
|
4183
1569
|
process.env.NODE_ENV !== "production" && (function() {
|
|
4184
1570
|
function t(e, t) {
|
|
4185
1571
|
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
@@ -4222,13 +1608,13 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
4222
1608
|
return t();
|
|
4223
1609
|
}
|
|
4224
1610
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
4225
|
-
var a =
|
|
1611
|
+
var a = Tt(), o = typeof Object.is == "function" ? Object.is : t, s = a.useState, c = a.useEffect, l = a.useLayoutEffect, u = a.useDebugValue, d = !1, f = !1, p = typeof window > "u" || window.document === void 0 || window.document.createElement === void 0 ? i : n;
|
|
4226
1612
|
e.useSyncExternalStore = a.useSyncExternalStore === void 0 ? p : a.useSyncExternalStore, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
4227
1613
|
})();
|
|
4228
|
-
})),
|
|
4229
|
-
t.exports = process.env.NODE_ENV === "production" ?
|
|
4230
|
-
})),
|
|
4231
|
-
var t =
|
|
1614
|
+
})), Ot = /* @__PURE__ */ t(((e, t) => {
|
|
1615
|
+
t.exports = process.env.NODE_ENV === "production" ? Et() : Dt();
|
|
1616
|
+
})), kt = /* @__PURE__ */ t(((e) => {
|
|
1617
|
+
var t = Tt(), n = Ot();
|
|
4232
1618
|
function r(e, t) {
|
|
4233
1619
|
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
4234
1620
|
}
|
|
@@ -4272,13 +1658,13 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
4272
1658
|
f.hasValue = !0, f.value = p;
|
|
4273
1659
|
}, [p]), l(p), p;
|
|
4274
1660
|
};
|
|
4275
|
-
})),
|
|
1661
|
+
})), At = /* @__PURE__ */ t(((e) => {
|
|
4276
1662
|
process.env.NODE_ENV !== "production" && (function() {
|
|
4277
1663
|
function t(e, t) {
|
|
4278
1664
|
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
4279
1665
|
}
|
|
4280
1666
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
4281
|
-
var n =
|
|
1667
|
+
var n = Tt(), r = Ot(), i = typeof Object.is == "function" ? Object.is : t, a = r.useSyncExternalStore, o = n.useRef, s = n.useEffect, c = n.useMemo, l = n.useDebugValue;
|
|
4282
1668
|
e.useSyncExternalStoreWithSelector = function(e, t, n, r, u) {
|
|
4283
1669
|
var d = o(null);
|
|
4284
1670
|
if (d.current === null) {
|
|
@@ -4319,17 +1705,17 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
4319
1705
|
}, [p]), l(p), p;
|
|
4320
1706
|
}, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
4321
1707
|
})();
|
|
4322
|
-
})), { useSyncExternalStoreWithSelector:
|
|
4323
|
-
t.exports = process.env.NODE_ENV === "production" ?
|
|
4324
|
-
})))(), 1)).default,
|
|
4325
|
-
function
|
|
4326
|
-
let r =
|
|
4327
|
-
return
|
|
1708
|
+
})), { useSyncExternalStoreWithSelector: jt } = (/* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
1709
|
+
t.exports = process.env.NODE_ENV === "production" ? kt() : At();
|
|
1710
|
+
})))(), 1)).default, Mt = (e) => e;
|
|
1711
|
+
function Nt(e, t = Mt, n) {
|
|
1712
|
+
let r = jt(e.subscribe, e.getState, e.getInitialState, t, n);
|
|
1713
|
+
return he.useDebugValue(r), r;
|
|
4328
1714
|
}
|
|
4329
1715
|
//#endregion
|
|
4330
1716
|
//#region src/components/ui/Table/TableFiltersSidebarItem.tsx
|
|
4331
|
-
var
|
|
4332
|
-
let r =
|
|
1717
|
+
var Pt = Ee, Ft = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFilterWithinDimension: n }) => {
|
|
1718
|
+
let r = Nt(h(), (e) => e.filters, (e, t) => JSON.stringify(e.map((e) => e.filterValue)) === JSON.stringify(t.map((e) => e.filterValue))), i = e.filterIds.map((e) => r.find((t) => t.id === e)), { setValue: a } = Oe(), o = B(() => {
|
|
4333
1719
|
if (e.allowOnlyPreferredFilter || e.filterIds.length === 1) return [i.find((t) => t?.id && t.id === e.preferredFilterId)].filter((e) => !!e);
|
|
4334
1720
|
if (!e.allowMultipleVisibleFilters) {
|
|
4335
1721
|
let t = n ?? e.preferredFilterId;
|
|
@@ -4343,11 +1729,11 @@ var io = Be, ao = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
|
|
|
4343
1729
|
e.filterIds.length,
|
|
4344
1730
|
e.preferredFilterId,
|
|
4345
1731
|
n
|
|
4346
|
-
]), s =
|
|
1732
|
+
]), s = B(() => i.length > 1 && !e.allowOnlyPreferredFilter && !e.allowMultipleVisibleFilters, [
|
|
4347
1733
|
i.length,
|
|
4348
1734
|
e.allowMultipleVisibleFilters,
|
|
4349
1735
|
e.allowOnlyPreferredFilter
|
|
4350
|
-
]), c =
|
|
1736
|
+
]), c = B(() => !(i.length === 1 || e.allowOnlyPreferredFilter), [i.length, e.allowOnlyPreferredFilter]), l = B(() => s ? {
|
|
4351
1737
|
items: i.map((n) => ({
|
|
4352
1738
|
active: n === o[0],
|
|
4353
1739
|
callback: () => {
|
|
@@ -4368,23 +1754,23 @@ var io = Be, ao = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
|
|
|
4368
1754
|
t,
|
|
4369
1755
|
s
|
|
4370
1756
|
]);
|
|
4371
|
-
return o.length ? /* @__PURE__ */
|
|
1757
|
+
return o.length ? /* @__PURE__ */ G(N, {
|
|
4372
1758
|
sx: { mb: 2 },
|
|
4373
1759
|
children: [
|
|
4374
|
-
c && /* @__PURE__ */
|
|
1760
|
+
c && /* @__PURE__ */ G(N, {
|
|
4375
1761
|
sx: {
|
|
4376
1762
|
alignItems: "center",
|
|
4377
1763
|
display: "flex",
|
|
4378
1764
|
justifyContent: "space-between"
|
|
4379
1765
|
},
|
|
4380
|
-
children: [/* @__PURE__ */ N
|
|
1766
|
+
children: [/* @__PURE__ */ W(N, { children: /* @__PURE__ */ W(ce, {
|
|
4381
1767
|
sx: {
|
|
4382
1768
|
margin: 0,
|
|
4383
1769
|
padding: 0
|
|
4384
1770
|
},
|
|
4385
1771
|
variant: "h6",
|
|
4386
1772
|
children: e.label
|
|
4387
|
-
}) }), s && /* @__PURE__ */ N
|
|
1773
|
+
}) }), s && /* @__PURE__ */ W(N, { children: /* @__PURE__ */ W(Ke, {
|
|
4388
1774
|
ButtonProps: {
|
|
4389
1775
|
color: "inherit",
|
|
4390
1776
|
size: "small",
|
|
@@ -4400,26 +1786,26 @@ var io = Be, ao = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
|
|
|
4400
1786
|
menuItemsData: l
|
|
4401
1787
|
}) })]
|
|
4402
1788
|
}),
|
|
4403
|
-
o.map((e) => /* @__PURE__ */ N
|
|
1789
|
+
o.map((e) => /* @__PURE__ */ W(N, {
|
|
4404
1790
|
sx: { my: 1 },
|
|
4405
|
-
children: /* @__PURE__ */
|
|
1791
|
+
children: /* @__PURE__ */ W(nt, { filter: e })
|
|
4406
1792
|
}, e.id)),
|
|
4407
|
-
/* @__PURE__ */
|
|
1793
|
+
/* @__PURE__ */ W(P, {})
|
|
4408
1794
|
]
|
|
4409
1795
|
}, e.id) : null;
|
|
4410
|
-
},
|
|
4411
|
-
let { t } =
|
|
1796
|
+
}, It = ({ onClose: e }) => {
|
|
1797
|
+
let { t } = K(), n = h(), r = m(n, (e) => e.setFilterValues), i = m(n, (e) => e.filterDimensions), a = Nt(n, (e) => e.filters, (e, t) => JSON.stringify(e.map((e) => e.filterValue)) === JSON.stringify(t.map((e) => e.filterValue))), o = m(n, (e) => e.filters.some((e) => !e.isInitialFilterValue(e.filterValue))), s = m(n, (e) => e.resetFilters), c = m(n, (e) => e.visibleFilterWithinDimensions), l = m(n, (e) => e.setVisibleFilterWithinDimensions), [u, d] = H(c), f = B(() => Object.fromEntries(a.map((e) => [e.id, e.initialFilterValue])), [a]), p = B(() => Object.fromEntries(a.map((e) => [e.id, e.filterValue ?? e.initialFilterValue])), [a]), g = De({
|
|
4412
1798
|
defaultValues: f,
|
|
4413
1799
|
values: p
|
|
4414
|
-
}), _ =
|
|
1800
|
+
}), _ = R((e, t) => {
|
|
4415
1801
|
d((n) => ({
|
|
4416
1802
|
...n,
|
|
4417
1803
|
[e]: t
|
|
4418
1804
|
}));
|
|
4419
|
-
}, []), { control: v, formState: { isDirty: y }, handleSubmit: b, reset: x, setValue: S } = g, C =
|
|
1805
|
+
}, []), { control: v, formState: { isDirty: y }, handleSubmit: b, reset: x, setValue: S } = g, C = ke({
|
|
4420
1806
|
control: v,
|
|
4421
1807
|
defaultValue: p
|
|
4422
|
-
}), w =
|
|
1808
|
+
}), w = B(() => Object.entries(C).some(([e, t]) => !a.find((t) => t.id === e).isInitialFilterValue(t)), [a, C]), T = R(async (t) => {
|
|
4423
1809
|
await r(t), x(t), l(u), e();
|
|
4424
1810
|
}, [
|
|
4425
1811
|
u,
|
|
@@ -4427,7 +1813,7 @@ var io = Be, ao = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
|
|
|
4427
1813
|
x,
|
|
4428
1814
|
r,
|
|
4429
1815
|
l
|
|
4430
|
-
]), E =
|
|
1816
|
+
]), E = R(async () => {
|
|
4431
1817
|
x(f), await s(), l(u), e();
|
|
4432
1818
|
}, [
|
|
4433
1819
|
f,
|
|
@@ -4436,13 +1822,13 @@ var io = Be, ao = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
|
|
|
4436
1822
|
x,
|
|
4437
1823
|
s,
|
|
4438
1824
|
l
|
|
4439
|
-
]),
|
|
1825
|
+
]), D = R((e) => {
|
|
4440
1826
|
let t = a.find((t) => t.id === e);
|
|
4441
1827
|
S(e, t.initialFilterValue, { shouldDirty: !0 });
|
|
4442
|
-
}, [a, S]),
|
|
4443
|
-
return /* @__PURE__ */
|
|
1828
|
+
}, [a, S]), O = B(() => a.filter((e) => e.showInSidebar), [a]);
|
|
1829
|
+
return /* @__PURE__ */ W(U, { children: !!a && !!p && !!f && /* @__PURE__ */ W(J, {
|
|
4444
1830
|
...g,
|
|
4445
|
-
children: /* @__PURE__ */
|
|
1831
|
+
children: /* @__PURE__ */ G(N, {
|
|
4446
1832
|
autoComplete: "off",
|
|
4447
1833
|
component: "form",
|
|
4448
1834
|
id: "Filters",
|
|
@@ -4452,45 +1838,45 @@ var io = Be, ao = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
|
|
|
4452
1838
|
gridTemplateRows: "max-content auto",
|
|
4453
1839
|
height: "100%"
|
|
4454
1840
|
},
|
|
4455
|
-
children: [/* @__PURE__ */
|
|
4456
|
-
y && o && !w && /* @__PURE__ */ N
|
|
1841
|
+
children: [/* @__PURE__ */ G(N, { children: [
|
|
1842
|
+
y && o && !w && /* @__PURE__ */ W(N, {
|
|
4457
1843
|
sx: { my: 1 },
|
|
4458
1844
|
children: t`All filters have been removed, but have not yet been applied.`
|
|
4459
1845
|
}),
|
|
4460
|
-
/* @__PURE__ */ N
|
|
1846
|
+
/* @__PURE__ */ W(N, { children: Object.entries(C).map(([e, n]) => {
|
|
4461
1847
|
let r = a.find((t) => t.id === e);
|
|
4462
|
-
return r.isInitialFilterValue(C[e]) ? null : /* @__PURE__ */
|
|
1848
|
+
return r.isInitialFilterValue(C[e]) ? null : /* @__PURE__ */ G(N, {
|
|
4463
1849
|
sx: {
|
|
4464
1850
|
alignItems: "center",
|
|
4465
1851
|
display: "grid",
|
|
4466
1852
|
gap: 1,
|
|
4467
1853
|
gridTemplateColumns: "auto max-content"
|
|
4468
1854
|
},
|
|
4469
|
-
children: [/* @__PURE__ */
|
|
4470
|
-
/* @__PURE__ */ N
|
|
1855
|
+
children: [/* @__PURE__ */ G(N, { children: [
|
|
1856
|
+
/* @__PURE__ */ W(N, {
|
|
4471
1857
|
component: "span",
|
|
4472
1858
|
children: r.label
|
|
4473
1859
|
}),
|
|
4474
|
-
/* @__PURE__ */ N
|
|
1860
|
+
/* @__PURE__ */ W(N, {
|
|
4475
1861
|
component: "span",
|
|
4476
1862
|
children: ": "
|
|
4477
1863
|
}),
|
|
4478
|
-
/* @__PURE__ */ N
|
|
1864
|
+
/* @__PURE__ */ W(N, {
|
|
4479
1865
|
component: "strong",
|
|
4480
1866
|
children: r.getPresentationValue(n, t)
|
|
4481
1867
|
})
|
|
4482
|
-
] }), /* @__PURE__ */
|
|
1868
|
+
] }), /* @__PURE__ */ W(ie, {
|
|
4483
1869
|
"aria-label": t("Remove filter with label {{filterLabel}} and value {{filterValue}}", {
|
|
4484
1870
|
filterLabel: r.label,
|
|
4485
1871
|
filterValue: r.getPresentationValue(n, t)
|
|
4486
1872
|
}),
|
|
4487
|
-
onClick: () =>
|
|
1873
|
+
onClick: () => D(e),
|
|
4488
1874
|
size: "small",
|
|
4489
|
-
children: /* @__PURE__ */
|
|
1875
|
+
children: /* @__PURE__ */ W(Ge, {})
|
|
4490
1876
|
})]
|
|
4491
1877
|
}, e);
|
|
4492
1878
|
}) }),
|
|
4493
|
-
(o || y) && /* @__PURE__ */
|
|
1879
|
+
(o || y) && /* @__PURE__ */ G(N, {
|
|
4494
1880
|
sx: {
|
|
4495
1881
|
display: "flex",
|
|
4496
1882
|
gap: 1,
|
|
@@ -4498,55 +1884,55 @@ var io = Be, ao = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
|
|
|
4498
1884
|
marginRight: 1,
|
|
4499
1885
|
my: 1
|
|
4500
1886
|
},
|
|
4501
|
-
children: [/* @__PURE__ */
|
|
4502
|
-
...
|
|
1887
|
+
children: [/* @__PURE__ */ W(te, {
|
|
1888
|
+
...q.createAttributes("TableFiltersSidebarItem-reset"),
|
|
4503
1889
|
color: "primary",
|
|
4504
1890
|
onClick: E,
|
|
4505
|
-
startIcon: /* @__PURE__ */
|
|
1891
|
+
startIcon: /* @__PURE__ */ W(We, {}),
|
|
4506
1892
|
variant: "outlined",
|
|
4507
1893
|
children: t`Reset`
|
|
4508
|
-
}), /* @__PURE__ */
|
|
4509
|
-
...
|
|
1894
|
+
}), /* @__PURE__ */ W(te, {
|
|
1895
|
+
...q.createAttributes("TableFiltersSidebarItem-apply"),
|
|
4510
1896
|
color: "secondary",
|
|
4511
|
-
startIcon: /* @__PURE__ */
|
|
1897
|
+
startIcon: /* @__PURE__ */ W(Ue, {}),
|
|
4512
1898
|
type: "submit",
|
|
4513
1899
|
children: t`Apply`
|
|
4514
1900
|
})]
|
|
4515
1901
|
})
|
|
4516
|
-
] }), /* @__PURE__ */
|
|
1902
|
+
] }), /* @__PURE__ */ G(N, {
|
|
4517
1903
|
sx: {
|
|
4518
1904
|
overflowY: "auto",
|
|
4519
1905
|
paddingRight: 1
|
|
4520
1906
|
},
|
|
4521
|
-
children: [i.length > 0 && /* @__PURE__ */
|
|
1907
|
+
children: [i.length > 0 && /* @__PURE__ */ W(U, { children: i.filter((e) => e.filterIds.length).map((e) => /* @__PURE__ */ W(Ft, {
|
|
4522
1908
|
filterDimension: e,
|
|
4523
1909
|
onFilterVisibilityChange: _,
|
|
4524
1910
|
visibleFilterWithinDimension: u[e.id]
|
|
4525
|
-
}, e.id)) }), i.length === 0 && /* @__PURE__ */
|
|
1911
|
+
}, e.id)) }), i.length === 0 && /* @__PURE__ */ W(U, { children: O.map((e) => /* @__PURE__ */ G(N, {
|
|
4526
1912
|
sx: { my: 2 },
|
|
4527
|
-
children: [/* @__PURE__ */ N
|
|
1913
|
+
children: [/* @__PURE__ */ W(N, {
|
|
4528
1914
|
sx: { my: 1 },
|
|
4529
|
-
children: /* @__PURE__ */
|
|
4530
|
-
}), /* @__PURE__ */
|
|
1915
|
+
children: /* @__PURE__ */ W(nt, { filter: e })
|
|
1916
|
+
}), /* @__PURE__ */ W(P, {})]
|
|
4531
1917
|
}, e.id)) })]
|
|
4532
1918
|
})]
|
|
4533
1919
|
})
|
|
4534
1920
|
}) });
|
|
4535
|
-
},
|
|
4536
|
-
let { t: n } =
|
|
4537
|
-
return /* @__PURE__ */
|
|
4538
|
-
closeIcon: /* @__PURE__ */
|
|
1921
|
+
}, Lt = ({ onClose: e, open: t }) => {
|
|
1922
|
+
let { t: n } = K();
|
|
1923
|
+
return /* @__PURE__ */ W(k, {
|
|
1924
|
+
closeIcon: /* @__PURE__ */ W(Pt, {}),
|
|
4539
1925
|
closeIconTooltipText: n`Close filters`,
|
|
4540
1926
|
onClose: e,
|
|
4541
1927
|
open: t,
|
|
4542
1928
|
testIdAttributes: { name: "tableFiltersSidebarItem" },
|
|
4543
1929
|
title: n`Filters`,
|
|
4544
1930
|
width: 60,
|
|
4545
|
-
children: t && /* @__PURE__ */
|
|
1931
|
+
children: t && /* @__PURE__ */ W(It, { onClose: e })
|
|
4546
1932
|
});
|
|
4547
|
-
},
|
|
1933
|
+
}, Rt = ({ ContainerProps: e }) => {
|
|
4548
1934
|
let t = x({});
|
|
4549
|
-
return /* @__PURE__ */
|
|
1935
|
+
return /* @__PURE__ */ W(Ke, {
|
|
4550
1936
|
ButtonProps: {
|
|
4551
1937
|
color: "primary",
|
|
4552
1938
|
size: "small",
|
|
@@ -4556,37 +1942,37 @@ var io = Be, ao = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
|
|
|
4556
1942
|
menuItemsData: t,
|
|
4557
1943
|
MenuProps: { elevation: 3 }
|
|
4558
1944
|
});
|
|
4559
|
-
},
|
|
1945
|
+
}, zt = ({ header: e, headerComponent: t = "h3", headerVariant: n = "h5", showTableMenu: r = !0 }) => /* @__PURE__ */ G(N, {
|
|
4560
1946
|
sx: {
|
|
4561
1947
|
alignItems: "center",
|
|
4562
1948
|
display: "flex",
|
|
4563
1949
|
justifyContent: e ? "space-between" : "flex-end"
|
|
4564
1950
|
},
|
|
4565
|
-
children: [e && /* @__PURE__ */ N
|
|
1951
|
+
children: [e && /* @__PURE__ */ W(N, { children: /* @__PURE__ */ W(wt, {
|
|
4566
1952
|
caption: e,
|
|
4567
1953
|
component: t,
|
|
4568
1954
|
variant: n
|
|
4569
|
-
}) }), r && /* @__PURE__ */ N
|
|
4570
|
-
}),
|
|
4571
|
-
let t = h(), n = m(t, (e) => e.filters.filter((e) => !e.isInitialFilterValue()).length), [r, i] =
|
|
1955
|
+
}) }), r && /* @__PURE__ */ W(N, { children: /* @__PURE__ */ W(Rt, {}) })]
|
|
1956
|
+
}), Bt = ({ extraSidebarMenuItems: e }) => {
|
|
1957
|
+
let t = h(), n = m(t, (e) => e.filters.filter((e) => !e.isInitialFilterValue()).length), [r, i] = H(!1), a = R(() => {
|
|
4572
1958
|
i(!1);
|
|
4573
|
-
}, []), o =
|
|
1959
|
+
}, []), o = R(() => {
|
|
4574
1960
|
i(!0);
|
|
4575
1961
|
}, []);
|
|
4576
|
-
return /* @__PURE__ */
|
|
1962
|
+
return /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ G(A, { children: [/* @__PURE__ */ W(j, {
|
|
4577
1963
|
badgeColor: "secondary",
|
|
4578
1964
|
badgeContent: n,
|
|
4579
1965
|
first: !0,
|
|
4580
|
-
icon: /* @__PURE__ */
|
|
1966
|
+
icon: /* @__PURE__ */ W(Pt, {}),
|
|
4581
1967
|
onClick: o,
|
|
4582
1968
|
testIdAttributes: { name: "filters" },
|
|
4583
|
-
title:
|
|
4584
|
-
}), e] }), /* @__PURE__ */
|
|
1969
|
+
title: M`Open filters`
|
|
1970
|
+
}), e] }), /* @__PURE__ */ W(Lt, {
|
|
4585
1971
|
onClose: a,
|
|
4586
1972
|
open: r
|
|
4587
1973
|
})] });
|
|
4588
1974
|
};
|
|
4589
1975
|
//#endregion
|
|
4590
|
-
export {
|
|
1976
|
+
export { It as a, Ct as c, at as d, rt as f, Ze as h, Lt as i, dt as l, Qe as m, zt as n, Pt as o, nt as p, Rt as r, wt as s, Bt as t, ut as u };
|
|
4591
1977
|
|
|
4592
1978
|
//# sourceMappingURL=Table.js.map
|