@gen-epix/ui-client-common 4.1.0 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/CrudPage.js +183 -183
- package/dist/_chunks/CrudPage.js.map +1 -1
- package/dist/_chunks/QueryClientProvider.js +1 -1
- package/dist/_chunks/QueryClientProvider.js.map +1 -1
- package/dist/_chunks/Table.js +622 -603
- package/dist/_chunks/Table.js.map +1 -1
- package/dist/_chunks/UserInvitationsAdminPage.js +97 -97
- package/dist/_chunks/chunk-BV7QT456.js +1 -1
- package/dist/_chunks/chunk-BV7QT456.js.map +1 -1
- package/dist/_chunks/middleware.js +1 -1
- package/dist/_chunks/middleware.js.map +1 -1
- package/dist/_chunks/react-oidc-context.js +1 -1
- package/dist/_chunks/react-oidc-context.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/useMutation.js +1 -1
- package/dist/_chunks/useMutation.js.map +1 -1
- package/dist/_chunks/useQueryMemo.js +4 -4
- 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 +23 -23
- package/dist/_chunks/yup.js.map +1 -1
- package/dist/components/app/App/index.js +2 -2
- package/dist/components/app/App/index.js.map +1 -1
- package/dist/components/ui/OrganizationSwitcherDialog/index.js +31 -31
- package/dist/components/ui/UserFeedbackDialog/index.js +35 -35
- package/package.json +66 -65
- package/dist/_chunks/index.esm.js +0 -1284
- package/dist/_chunks/index.esm.js.map +0 -1
package/dist/_chunks/Table.js
CHANGED
|
@@ -10,28 +10,28 @@ import { PageEventBusService as g } from "../classes/services/PageEventBusServic
|
|
|
10
10
|
import { t as _ } from "./omit.js";
|
|
11
11
|
import { r as v, t as y } from "./uniq.js";
|
|
12
12
|
import { n as b, t as x } from "./useColumnsMenu.js";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import {
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import We from "
|
|
13
|
+
import { t as S } from "./GeoFilter.js";
|
|
14
|
+
import { BooleanFilterField as C } from "../components/filters/BooleanFilterField/index.js";
|
|
15
|
+
import { DateFilterField as w } from "../components/filters/DateFilterField/index.js";
|
|
16
|
+
import { GeoFilterField as T } from "../components/filters/GeoFilterField/index.js";
|
|
17
|
+
import { MultiSelectFilterField as E } from "../components/filters/MultiSelectFilterField/index.js";
|
|
18
|
+
import { NumberRangeFilterField as ee } from "../components/filters/NumberRangeFilterField/index.js";
|
|
19
|
+
import { TextFilterField as te } from "../components/filters/TextFilterField/index.js";
|
|
20
|
+
import { SidebarItem as ne, SidebarMenu as D, SidebarMenuItem as re } from "../components/ui/Sidebar/index.js";
|
|
21
|
+
import { WindowService as ie } from "@gen-epix/ui-core/classes/services/WindowService";
|
|
22
|
+
import { t as ae } from "i18next";
|
|
23
|
+
import { Box as O, Button as oe, Checkbox as se, Divider as ce, FormControlLabel as k, FormGroup as le, IconButton as ue, Menu as de, Paper as fe, Popover as pe, Tooltip as me, Typography as he, alpha as ge, darken as _e, lighten as ve, styled as ye, useTheme as be } from "@mui/material";
|
|
24
|
+
import * as xe from "react";
|
|
25
|
+
import A, { Fragment as Se, createContext as Ce, createElement as we, forwardRef as Te, use as Ee, useCallback as j, useEffect as De, useId as Oe, useImperativeHandle as ke, useLayoutEffect as Ae, useMemo as je, useRef as M, useState as Me } from "react";
|
|
26
|
+
import { Fragment as Ne, jsx as N, jsxs as P } from "react/jsx-runtime";
|
|
27
|
+
import { useTranslation as Pe } from "react-i18next";
|
|
28
|
+
import { TestIdUtil as Fe } from "@gen-epix/ui-core/utils/TestIdUtil";
|
|
29
|
+
import Ie from "react-dom";
|
|
30
|
+
import { useScrollbarSize as Le } from "@gen-epix/ui-core/hooks/useScrollbarSize";
|
|
31
|
+
import { visuallyHidden as Re } from "@mui/utils";
|
|
32
|
+
import ze from "@mui/icons-material/ArrowDownward";
|
|
33
|
+
import Be from "@mui/icons-material/FilterAlt";
|
|
34
|
+
import { FormProvider as Ve, useForm as He, useFormContext as Ue, useWatch as We } from "react-hook-form";
|
|
35
35
|
import Ge from "@mui/icons-material/MoreVert";
|
|
36
36
|
import { withDialog as Ke } from "@gen-epix/ui-core-components/hoc/withDialog";
|
|
37
37
|
import { DndContext as qe, DragOverlay as Je, KeyboardSensor as Ye, PointerSensor as Xe, defaultDropAnimationSideEffects as Ze, useSensor as Qe, useSensors as $e } from "@dnd-kit/core";
|
|
@@ -43,7 +43,7 @@ import st from "@mui/icons-material/Check";
|
|
|
43
43
|
import ct from "@mui/icons-material/RestartAlt";
|
|
44
44
|
import lt from "@mui/icons-material/Close";
|
|
45
45
|
import { NestedDropdown as ut } from "@gen-epix/ui-core-components/components/NestedMenu";
|
|
46
|
-
//#region ../../node_modules/.pnpm/react-virtuoso@4.18.
|
|
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
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
48
|
function yt(e) {
|
|
49
49
|
return () => e;
|
|
@@ -366,7 +366,8 @@ function rn(e, t, n, r) {
|
|
|
366
366
|
function an(e, t, n) {
|
|
367
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
368
|
}
|
|
369
|
-
|
|
369
|
+
var on = typeof document > "u" ? A.useEffect : A.useLayoutEffect;
|
|
370
|
+
function sn(e, t, n) {
|
|
370
371
|
let r = A.useRef(null), i = A.useCallback((n) => {
|
|
371
372
|
if (!n?.offsetParent) return;
|
|
372
373
|
let i = n.getBoundingClientRect(), a = i.width, s, c;
|
|
@@ -406,28 +407,29 @@ function on(e, t, n) {
|
|
|
406
407
|
o
|
|
407
408
|
]), a;
|
|
408
409
|
}
|
|
409
|
-
var
|
|
410
|
-
let e = K(), t = K(), n = G(0), r = K(), i =
|
|
411
|
-
return z(U(e, H(({ scrollTop: e }) => e)), t), z(U(e, H(({ scrollHeight: e }) => e)),
|
|
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), {
|
|
412
413
|
deviation: n,
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
414
|
+
deviationCommitted: r,
|
|
415
|
+
fixedFooterHeight: u,
|
|
416
|
+
fixedHeaderHeight: l,
|
|
417
|
+
footerHeight: d,
|
|
418
|
+
headerHeight: c,
|
|
419
|
+
horizontalDirection: h,
|
|
420
|
+
scrollBy: p,
|
|
419
421
|
scrollContainerState: e,
|
|
420
|
-
scrollHeight:
|
|
421
|
-
scrollingInProgress:
|
|
422
|
-
scrollTo:
|
|
422
|
+
scrollHeight: s,
|
|
423
|
+
scrollingInProgress: m,
|
|
424
|
+
scrollTo: f,
|
|
423
425
|
scrollTop: t,
|
|
424
|
-
skipAnimationFrameInResizeObserver:
|
|
425
|
-
smoothScrollTargetReached:
|
|
426
|
-
statefulScrollTop:
|
|
427
|
-
viewportHeight:
|
|
426
|
+
skipAnimationFrameInResizeObserver: g,
|
|
427
|
+
smoothScrollTargetReached: i,
|
|
428
|
+
statefulScrollTop: a,
|
|
429
|
+
viewportHeight: o
|
|
428
430
|
};
|
|
429
|
-
}, [], { singleton: !0 }),
|
|
430
|
-
function
|
|
431
|
+
}, [], { singleton: !0 }), ln = { lvl: 0 };
|
|
432
|
+
function un(e, t) {
|
|
431
433
|
let n = e.length;
|
|
432
434
|
if (n === 0) return [];
|
|
433
435
|
let { index: r, value: i } = t(e[0]), a = [];
|
|
@@ -446,92 +448,92 @@ function ln(e, t) {
|
|
|
446
448
|
}), a;
|
|
447
449
|
}
|
|
448
450
|
function Y(e) {
|
|
449
|
-
return e ===
|
|
451
|
+
return e === ln;
|
|
450
452
|
}
|
|
451
|
-
function
|
|
452
|
-
if (!Y(e)) return t === e.k ? e.v : t < e.k ?
|
|
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);
|
|
453
455
|
}
|
|
454
|
-
function
|
|
456
|
+
function fn(e, t, n = "k") {
|
|
455
457
|
if (Y(e)) return [-1 / 0, void 0];
|
|
456
458
|
if (Number(e[n]) === t) return [e.k, e.v];
|
|
457
459
|
if (Number(e[n]) < t) {
|
|
458
|
-
let r =
|
|
460
|
+
let r = fn(e.r, t, n);
|
|
459
461
|
return r[0] === -1 / 0 ? [e.k, e.v] : r;
|
|
460
462
|
}
|
|
461
|
-
return
|
|
463
|
+
return fn(e.l, t, n);
|
|
462
464
|
}
|
|
463
|
-
function
|
|
464
|
-
return Y(e) ?
|
|
465
|
+
function pn(e, t, n) {
|
|
466
|
+
return Y(e) ? wn(t, n, 1) : t === e.k ? bn(e, {
|
|
465
467
|
k: t,
|
|
466
468
|
v: n
|
|
467
|
-
}) : t < e.k ?
|
|
469
|
+
}) : t < e.k ? Tn(bn(e, { l: pn(e.l, t, n) })) : Tn(bn(e, { r: pn(e.r, t, n) }));
|
|
468
470
|
}
|
|
469
|
-
function
|
|
470
|
-
return
|
|
471
|
+
function mn() {
|
|
472
|
+
return ln;
|
|
471
473
|
}
|
|
472
|
-
function
|
|
474
|
+
function hn(e, t, n) {
|
|
473
475
|
if (Y(e)) return [];
|
|
474
|
-
let r =
|
|
475
|
-
return
|
|
476
|
+
let r = fn(e, t)[0];
|
|
477
|
+
return On(vn(e, r, n));
|
|
476
478
|
}
|
|
477
|
-
function
|
|
478
|
-
if (Y(e)) return
|
|
479
|
+
function gn(e, t) {
|
|
480
|
+
if (Y(e)) return ln;
|
|
479
481
|
let { k: n, l: r, r: i } = e;
|
|
480
482
|
if (t === n) {
|
|
481
483
|
if (Y(r)) return i;
|
|
482
484
|
if (Y(i)) return r;
|
|
483
|
-
let [t, n] =
|
|
484
|
-
return
|
|
485
|
+
let [t, n] = Cn(r);
|
|
486
|
+
return yn(bn(e, {
|
|
485
487
|
k: t,
|
|
486
|
-
l:
|
|
488
|
+
l: xn(r),
|
|
487
489
|
v: n
|
|
488
490
|
}));
|
|
489
491
|
}
|
|
490
|
-
return
|
|
492
|
+
return yn(t < n ? bn(e, { l: gn(r, t) }) : bn(e, { r: gn(i, t) }));
|
|
491
493
|
}
|
|
492
|
-
function
|
|
494
|
+
function _n(e) {
|
|
493
495
|
return Y(e) ? [] : [
|
|
494
|
-
...
|
|
496
|
+
..._n(e.l),
|
|
495
497
|
{
|
|
496
498
|
k: e.k,
|
|
497
499
|
v: e.v
|
|
498
500
|
},
|
|
499
|
-
...
|
|
501
|
+
..._n(e.r)
|
|
500
502
|
];
|
|
501
503
|
}
|
|
502
|
-
function
|
|
504
|
+
function vn(e, t, n) {
|
|
503
505
|
if (Y(e)) return [];
|
|
504
506
|
let { k: r, l: i, r: a, v: o } = e, s = [];
|
|
505
|
-
return r > t && (s = s.concat(
|
|
507
|
+
return r > t && (s = s.concat(vn(i, t, n))), r >= t && r <= n && s.push({
|
|
506
508
|
k: r,
|
|
507
509
|
v: o
|
|
508
|
-
}), r <= n && (s = s.concat(
|
|
510
|
+
}), r <= n && (s = s.concat(vn(a, t, n))), s;
|
|
509
511
|
}
|
|
510
|
-
function
|
|
512
|
+
function yn(e) {
|
|
511
513
|
let { l: t, lvl: n, r } = e;
|
|
512
514
|
if (r.lvl >= n - 1 && t.lvl >= n - 1) return e;
|
|
513
515
|
if (n > r.lvl + 1) {
|
|
514
|
-
if (
|
|
515
|
-
if (!Y(t) && !Y(t.r)) return
|
|
516
|
-
l:
|
|
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 }),
|
|
517
519
|
lvl: n,
|
|
518
|
-
r:
|
|
520
|
+
r: bn(e, {
|
|
519
521
|
l: t.r.r,
|
|
520
522
|
lvl: n - 1
|
|
521
523
|
})
|
|
522
524
|
});
|
|
523
525
|
throw Error("Unexpected empty nodes");
|
|
524
526
|
}
|
|
525
|
-
if (
|
|
527
|
+
if (Sn(e)) return Dn(bn(e, { lvl: n - 1 }));
|
|
526
528
|
if (!Y(r) && !Y(r.l)) {
|
|
527
|
-
let t = r.l, i =
|
|
528
|
-
return
|
|
529
|
-
l:
|
|
529
|
+
let t = r.l, i = Sn(t) ? r.lvl - 1 : r.lvl;
|
|
530
|
+
return bn(t, {
|
|
531
|
+
l: bn(e, {
|
|
530
532
|
lvl: n - 1,
|
|
531
533
|
r: t.l
|
|
532
534
|
}),
|
|
533
535
|
lvl: t.lvl + 1,
|
|
534
|
-
r:
|
|
536
|
+
r: Dn(bn(r, {
|
|
535
537
|
l: t.r,
|
|
536
538
|
lvl: i
|
|
537
539
|
}))
|
|
@@ -539,19 +541,19 @@ function vn(e) {
|
|
|
539
541
|
}
|
|
540
542
|
throw Error("Unexpected empty nodes");
|
|
541
543
|
}
|
|
542
|
-
function
|
|
543
|
-
return
|
|
544
|
-
}
|
|
545
|
-
function bn(e) {
|
|
546
|
-
return Y(e.r) ? e.l : vn(yn(e, { r: bn(e.r) }));
|
|
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);
|
|
547
546
|
}
|
|
548
547
|
function xn(e) {
|
|
549
|
-
return Y(e)
|
|
548
|
+
return Y(e.r) ? e.l : yn(bn(e, { r: xn(e.r) }));
|
|
550
549
|
}
|
|
551
550
|
function Sn(e) {
|
|
552
|
-
return Y(e
|
|
551
|
+
return Y(e) || e.lvl > e.r.lvl;
|
|
553
552
|
}
|
|
554
|
-
function Cn(e
|
|
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) {
|
|
555
557
|
return {
|
|
556
558
|
k: e,
|
|
557
559
|
l: r,
|
|
@@ -560,37 +562,37 @@ function Cn(e, t, n, r = cn, i = cn) {
|
|
|
560
562
|
v: t
|
|
561
563
|
};
|
|
562
564
|
}
|
|
563
|
-
function wn(e) {
|
|
564
|
-
return En(Tn(e));
|
|
565
|
-
}
|
|
566
565
|
function Tn(e) {
|
|
567
|
-
|
|
568
|
-
return !Y(t) && t.lvl === e.lvl ? yn(t, { r: yn(e, { l: t.r }) }) : e;
|
|
566
|
+
return Dn(En(e));
|
|
569
567
|
}
|
|
570
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) {
|
|
571
573
|
let { lvl: t, r: n } = e;
|
|
572
|
-
return !Y(n) && !Y(n.r) && n.lvl === t && n.r.lvl === t ?
|
|
573
|
-
l:
|
|
574
|
+
return !Y(n) && !Y(n.r) && n.lvl === t && n.r.lvl === t ? bn(n, {
|
|
575
|
+
l: bn(e, { r: n.l }),
|
|
574
576
|
lvl: t + 1
|
|
575
577
|
}) : e;
|
|
576
578
|
}
|
|
577
|
-
function
|
|
578
|
-
return
|
|
579
|
+
function On(e) {
|
|
580
|
+
return un(e, ({ k: e, v: t }) => ({
|
|
579
581
|
index: e,
|
|
580
582
|
value: t
|
|
581
583
|
}));
|
|
582
584
|
}
|
|
583
|
-
function
|
|
585
|
+
function kn(e, t) {
|
|
584
586
|
return !!(e && e.startIndex === t.startIndex && e.endIndex === t.endIndex);
|
|
585
587
|
}
|
|
586
|
-
function
|
|
588
|
+
function An(e, t) {
|
|
587
589
|
return !!(e && e[0] === t[0] && e[1] === t[1]);
|
|
588
590
|
}
|
|
589
|
-
var
|
|
590
|
-
function
|
|
591
|
-
return e[
|
|
591
|
+
var jn = q(() => ({ recalcInProgress: G(!1) }), [], { singleton: !0 });
|
|
592
|
+
function Mn(e, t, n) {
|
|
593
|
+
return e[Nn(e, t, n)];
|
|
592
594
|
}
|
|
593
|
-
function
|
|
595
|
+
function Nn(e, t, n, r = 0) {
|
|
594
596
|
let i = e.length - 1;
|
|
595
597
|
for (; r <= i;) {
|
|
596
598
|
let a = Math.floor((r + i) / 2), o = e[a], s = n(o, t);
|
|
@@ -605,83 +607,83 @@ function Mn(e, t, n, r = 0) {
|
|
|
605
607
|
}
|
|
606
608
|
throw Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`);
|
|
607
609
|
}
|
|
608
|
-
function
|
|
609
|
-
let i =
|
|
610
|
+
function Pn(e, t, n, r) {
|
|
611
|
+
let i = Nn(e, t, r), a = Nn(e, n, r, i);
|
|
610
612
|
return e.slice(i, a + 1);
|
|
611
613
|
}
|
|
612
|
-
function
|
|
614
|
+
function Fn(e, t) {
|
|
613
615
|
return Math.round(e.getBoundingClientRect()[t]);
|
|
614
616
|
}
|
|
615
|
-
function
|
|
617
|
+
function In(e) {
|
|
616
618
|
return !Y(e.groupOffsetTree);
|
|
617
619
|
}
|
|
618
|
-
function
|
|
620
|
+
function Ln({ index: e }, t) {
|
|
619
621
|
return t === e ? 0 : t < e ? -1 : 1;
|
|
620
622
|
}
|
|
621
|
-
function
|
|
623
|
+
function Rn() {
|
|
622
624
|
return {
|
|
623
625
|
groupIndices: [],
|
|
624
|
-
groupOffsetTree:
|
|
626
|
+
groupOffsetTree: mn(),
|
|
625
627
|
lastIndex: 0,
|
|
626
628
|
lastOffset: 0,
|
|
627
629
|
lastSize: 0,
|
|
628
630
|
offsetTree: [],
|
|
629
|
-
sizeTree:
|
|
631
|
+
sizeTree: mn()
|
|
630
632
|
};
|
|
631
633
|
}
|
|
632
|
-
function
|
|
634
|
+
function zn(e, t) {
|
|
633
635
|
let n = Y(e) ? 0 : 1 / 0;
|
|
634
636
|
for (let r of t) {
|
|
635
637
|
let { endIndex: t, size: i, startIndex: a } = r;
|
|
636
638
|
if (n = Math.min(n, a), Y(e)) {
|
|
637
|
-
e =
|
|
639
|
+
e = pn(e, 0, i);
|
|
638
640
|
continue;
|
|
639
641
|
}
|
|
640
|
-
let o =
|
|
641
|
-
if (o.some(
|
|
642
|
+
let o = hn(e, a - 1, t + 1);
|
|
643
|
+
if (o.some(Zn(r))) continue;
|
|
642
644
|
let s = !1, c = !1;
|
|
643
|
-
for (let { end: n, start: r, value: a } of o) s ? (t >= r || i === a) && (e =
|
|
644
|
-
c && (e =
|
|
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));
|
|
645
647
|
}
|
|
646
648
|
return [e, n];
|
|
647
649
|
}
|
|
648
|
-
function
|
|
650
|
+
function Bn(e) {
|
|
649
651
|
return e.groupIndex !== void 0;
|
|
650
652
|
}
|
|
651
|
-
function
|
|
653
|
+
function Vn({ offset: e }, t) {
|
|
652
654
|
return t === e ? 0 : t < e ? -1 : 1;
|
|
653
655
|
}
|
|
654
|
-
function
|
|
656
|
+
function Hn(e, t, n) {
|
|
655
657
|
if (t.length === 0) return 0;
|
|
656
|
-
let { index: r, offset: i, size: a } =
|
|
658
|
+
let { index: r, offset: i, size: a } = Mn(t, e, Ln), o = e - r, s = a * o + (o - 1) * n + i;
|
|
657
659
|
return s > 0 ? s + n : s;
|
|
658
660
|
}
|
|
659
|
-
function
|
|
660
|
-
if (!
|
|
661
|
+
function Un(e, t) {
|
|
662
|
+
if (!In(t)) return e;
|
|
661
663
|
let n = 0;
|
|
662
664
|
for (; t.groupIndices[n] <= e + n;) n++;
|
|
663
665
|
return e + n;
|
|
664
666
|
}
|
|
665
|
-
function
|
|
666
|
-
if (
|
|
667
|
-
let r =
|
|
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);
|
|
668
670
|
return r = Math.max(0, Math.min(n, r)), r;
|
|
669
671
|
}
|
|
670
|
-
function
|
|
671
|
-
return r > 0 && (t = Math.max(t,
|
|
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);
|
|
672
674
|
}
|
|
673
|
-
function
|
|
675
|
+
function Kn(e, [t, n, r, i]) {
|
|
674
676
|
t.length > 0 && r("received item sizes", t, Kt.DEBUG);
|
|
675
677
|
let a = e.sizeTree, o = a, s = 0;
|
|
676
678
|
if (n.length > 0 && Y(a) && t.length === 2) {
|
|
677
679
|
let e = t[0].size, r = t[1].size;
|
|
678
|
-
o = n.reduce((t, n) =>
|
|
679
|
-
} else [o, s] =
|
|
680
|
+
o = n.reduce((t, n) => pn(pn(t, n, e), n + 1, r), o);
|
|
681
|
+
} else [o, s] = zn(o, t);
|
|
680
682
|
if (o === a) return e;
|
|
681
|
-
let { lastIndex: c, lastOffset: l, lastSize: u, offsetTree: d } =
|
|
683
|
+
let { lastIndex: c, lastOffset: l, lastSize: u, offsetTree: d } = Yn(e.offsetTree, s, o, i);
|
|
682
684
|
return {
|
|
683
685
|
groupIndices: n,
|
|
684
|
-
groupOffsetTree: n.reduce((e, t) =>
|
|
686
|
+
groupOffsetTree: n.reduce((e, t) => pn(e, t, Hn(t, d, i)), mn()),
|
|
685
687
|
lastIndex: c,
|
|
686
688
|
lastOffset: l,
|
|
687
689
|
lastSize: u,
|
|
@@ -689,8 +691,8 @@ function Gn(e, [t, n, r, i]) {
|
|
|
689
691
|
sizeTree: o
|
|
690
692
|
};
|
|
691
693
|
}
|
|
692
|
-
function
|
|
693
|
-
return
|
|
694
|
+
function qn(e) {
|
|
695
|
+
return _n(e).map(({ k: e, v: t }, n, r) => {
|
|
694
696
|
let i = r[n + 1];
|
|
695
697
|
return {
|
|
696
698
|
endIndex: i === void 0 ? 1 / 0 : i.k - 1,
|
|
@@ -699,20 +701,20 @@ function Kn(e) {
|
|
|
699
701
|
};
|
|
700
702
|
});
|
|
701
703
|
}
|
|
702
|
-
function
|
|
704
|
+
function Jn(e, t) {
|
|
703
705
|
let n = 0, r = 0;
|
|
704
706
|
for (; n < e;) n += t[r + 1] - t[r] - 1, r++;
|
|
705
707
|
return r - (n === e ? 0 : 1);
|
|
706
708
|
}
|
|
707
|
-
function
|
|
709
|
+
function Yn(e, t, n, r) {
|
|
708
710
|
let i = e, a = 0, o = 0, s = 0, c = 0;
|
|
709
711
|
if (t === 0) i = [];
|
|
710
712
|
else {
|
|
711
|
-
c =
|
|
712
|
-
let e =
|
|
713
|
-
a = e[0], o = e[1], i.length && i[c].size ===
|
|
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);
|
|
714
716
|
}
|
|
715
|
-
for (let { start: e, value: c } of
|
|
717
|
+
for (let { start: e, value: c } of hn(n, t, 1 / 0)) {
|
|
716
718
|
let t = e - a, n = t * o + s + t * r;
|
|
717
719
|
i.push({
|
|
718
720
|
index: e,
|
|
@@ -727,21 +729,21 @@ function Jn(e, t, n, r) {
|
|
|
727
729
|
offsetTree: i
|
|
728
730
|
};
|
|
729
731
|
}
|
|
730
|
-
function
|
|
732
|
+
function Xn(e) {
|
|
731
733
|
return {
|
|
732
734
|
index: e.index,
|
|
733
735
|
value: e
|
|
734
736
|
};
|
|
735
737
|
}
|
|
736
|
-
function
|
|
738
|
+
function Zn(e) {
|
|
737
739
|
let { endIndex: t, size: n, startIndex: r } = e;
|
|
738
740
|
return (e) => e.start === r && (e.end === t || e.end === 1 / 0) && e.value === n;
|
|
739
741
|
}
|
|
740
|
-
var
|
|
742
|
+
var Qn = {
|
|
741
743
|
offsetHeight: "height",
|
|
742
744
|
offsetWidth: "width"
|
|
743
|
-
},
|
|
744
|
-
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) =>
|
|
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) => ({
|
|
745
747
|
current: t,
|
|
746
748
|
prev: e.current
|
|
747
749
|
}), {
|
|
@@ -749,7 +751,7 @@ var Zn = {
|
|
|
749
751
|
prev: []
|
|
750
752
|
}), H(({ prev: e }) => e)), []);
|
|
751
753
|
z(U(c, V((e) => e.length > 0), W(_, h), H(([e, t, n]) => {
|
|
752
|
-
let r = e.reduce((e, r, i) =>
|
|
754
|
+
let r = e.reduce((e, r, i) => pn(e, r, Hn(r, t.offsetTree, n) || i), mn());
|
|
753
755
|
return {
|
|
754
756
|
...t,
|
|
755
757
|
groupIndices: e,
|
|
@@ -822,10 +824,10 @@ var Zn = {
|
|
|
822
824
|
prev: 0
|
|
823
825
|
}), H((e) => e.diff)), (e) => {
|
|
824
826
|
let { groupIndices: n } = R(_);
|
|
825
|
-
if (e > 0) L(t, !0), L(a, e +
|
|
827
|
+
if (e > 0) L(t, !0), L(a, e + Jn(e, n));
|
|
826
828
|
else if (e < 0) {
|
|
827
829
|
let t = R(v);
|
|
828
|
-
t.length > 0 && (e -=
|
|
830
|
+
t.length > 0 && (e -= Jn(-e, t)), L(o, e);
|
|
829
831
|
}
|
|
830
832
|
}), I(U(s, W(e)), ([e, t]) => {
|
|
831
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,7 +836,7 @@ var Zn = {
|
|
|
834
836
|
z(U(a, W(_), H(([e, t]) => {
|
|
835
837
|
let n = t.groupIndices.length > 0, r = [], i = t.lastSize;
|
|
836
838
|
if (n) {
|
|
837
|
-
let n =
|
|
839
|
+
let n = dn(t.sizeTree, 0), a = 0, o = 0;
|
|
838
840
|
for (; a < e;) {
|
|
839
841
|
let e = t.groupIndices[o], s = t.groupIndices.length === o + 1 ? 1 / 0 : t.groupIndices[o + 1] - e - 1;
|
|
840
842
|
r.push({
|
|
@@ -847,7 +849,7 @@ var Zn = {
|
|
|
847
849
|
startIndex: e + 1
|
|
848
850
|
}), o++, a += s + 1;
|
|
849
851
|
}
|
|
850
|
-
let s =
|
|
852
|
+
let s = _n(t.sizeTree);
|
|
851
853
|
return a !== e && s.shift(), s.reduce((t, { k: n, v: r }) => {
|
|
852
854
|
let i = t.ranges;
|
|
853
855
|
return t.prevSize !== 0 && (i = [...t.ranges, {
|
|
@@ -865,7 +867,7 @@ var Zn = {
|
|
|
865
867
|
ranges: r
|
|
866
868
|
}).ranges;
|
|
867
869
|
}
|
|
868
|
-
return
|
|
870
|
+
return _n(t.sizeTree).reduce((t, { k: n, v: r }) => ({
|
|
869
871
|
prevIndex: n + e,
|
|
870
872
|
prevSize: r,
|
|
871
873
|
ranges: [...t.ranges, {
|
|
@@ -879,33 +881,33 @@ var Zn = {
|
|
|
879
881
|
ranges: []
|
|
880
882
|
}).ranges;
|
|
881
883
|
})), n);
|
|
882
|
-
let S = Bt(U(o, W(_, h), H(([e, { offsetTree: t }, n]) =>
|
|
884
|
+
let S = Bt(U(o, W(_, h), H(([e, { offsetTree: t }, n]) => Hn(-e, t, n))));
|
|
883
885
|
return z(U(o, W(_, h), H(([e, t, n]) => {
|
|
884
886
|
if (t.groupIndices.length > 0) {
|
|
885
887
|
if (Y(t.sizeTree)) return t;
|
|
886
|
-
let r =
|
|
888
|
+
let r = mn(), i = R(v), a = 0, o = 0, s = 0;
|
|
887
889
|
for (; a < -e;) {
|
|
888
890
|
s = i[o];
|
|
889
891
|
let e = i[o + 1] - s - 1;
|
|
890
892
|
o++, a += e + 1;
|
|
891
893
|
}
|
|
892
|
-
if (r =
|
|
893
|
-
let n =
|
|
894
|
-
r =
|
|
895
|
-
let i =
|
|
896
|
-
r =
|
|
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);
|
|
897
899
|
}
|
|
898
900
|
return {
|
|
899
901
|
...t,
|
|
900
902
|
sizeTree: r,
|
|
901
|
-
...
|
|
903
|
+
...Yn(t.offsetTree, 0, r, n)
|
|
902
904
|
};
|
|
903
905
|
}
|
|
904
|
-
let r =
|
|
906
|
+
let r = _n(t.sizeTree).reduce((t, { k: n, v: r }) => pn(t, Math.max(0, n + e), r), mn());
|
|
905
907
|
return {
|
|
906
908
|
...t,
|
|
907
909
|
sizeTree: r,
|
|
908
|
-
...
|
|
910
|
+
...Yn(t.offsetTree, 0, r, n)
|
|
909
911
|
};
|
|
910
912
|
})), _), {
|
|
911
913
|
beforeUnshiftWith: x,
|
|
@@ -928,20 +930,20 @@ var Zn = {
|
|
|
928
930
|
trackItemSizes: y,
|
|
929
931
|
unshiftWith: a
|
|
930
932
|
};
|
|
931
|
-
}, F(Yt,
|
|
932
|
-
function
|
|
933
|
+
}, F(Yt, jn), { singleton: !0 });
|
|
934
|
+
function er(e) {
|
|
933
935
|
return e.reduce((e, t) => (e.groupIndices.push(e.totalCount), e.totalCount += t + 1, e), {
|
|
934
936
|
groupIndices: [],
|
|
935
937
|
totalCount: 0
|
|
936
938
|
});
|
|
937
939
|
}
|
|
938
|
-
var
|
|
939
|
-
let a = K(), o = K(), s = Bt(U(a, H(
|
|
940
|
-
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]) =>
|
|
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), {
|
|
941
943
|
groupCounts: a,
|
|
942
944
|
topItemsIndexes: o
|
|
943
945
|
};
|
|
944
|
-
}, F(
|
|
946
|
+
}, F($n, cn)), nr = q(([{ log: e }]) => {
|
|
945
947
|
let t = G(!1), n = Bt(U(t, V((e) => e), B()));
|
|
946
948
|
return I(t, (t) => {
|
|
947
949
|
t && R(e)("props updated", {}, Kt.DEBUG);
|
|
@@ -949,19 +951,19 @@ var er = q(([{ groupIndices: e, sizes: t, totalCount: n }, { headerHeight: r, sc
|
|
|
949
951
|
didMount: n,
|
|
950
952
|
propsReady: t
|
|
951
953
|
};
|
|
952
|
-
}, F(Yt), { singleton: !0 }),
|
|
953
|
-
function
|
|
954
|
+
}, F(Yt), { singleton: !0 }), rr = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
|
|
955
|
+
function ir(e) {
|
|
954
956
|
let t = typeof e == "number" ? { index: e } : { ...e };
|
|
955
|
-
return t.align ||= "start", (!t.behavior || !
|
|
957
|
+
return t.align ||= "start", (!t.behavior || !rr) && (t.behavior = "auto"), t.offset === void 0 && (t.offset = 0), t;
|
|
956
958
|
}
|
|
957
|
-
var
|
|
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 }]) => {
|
|
958
960
|
let p = K(), m = K(), h = G(0), g = null, _ = null, v = null;
|
|
959
961
|
function y() {
|
|
960
962
|
g !== null && (g(), g = null), v !== null && (v(), v = null), _ &&= (clearTimeout(_), null), L(c, !1);
|
|
961
963
|
}
|
|
962
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]) => {
|
|
963
|
-
let b =
|
|
964
|
-
x === "end" ? (E += f +
|
|
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);
|
|
965
967
|
let ee = (t) => {
|
|
966
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));
|
|
967
969
|
};
|
|
@@ -972,7 +974,7 @@ var ir = q(([{ gap: e, listRefresh: t, sizes: n, totalCount: r }, { fixedFooterH
|
|
|
972
974
|
}), g = At(u, () => {
|
|
973
975
|
ee(e);
|
|
974
976
|
});
|
|
975
|
-
} else g = At(U(t,
|
|
977
|
+
} else g = At(U(t, or(150)), ee);
|
|
976
978
|
return _ = setTimeout(() => {
|
|
977
979
|
y();
|
|
978
980
|
}, 1200), L(c, !0), l("scrolling from index to", {
|
|
@@ -988,8 +990,8 @@ var ir = q(([{ gap: e, listRefresh: t, sizes: n, totalCount: r }, { fixedFooterH
|
|
|
988
990
|
scrollToIndex: p,
|
|
989
991
|
topListHeight: h
|
|
990
992
|
};
|
|
991
|
-
}, F(
|
|
992
|
-
function
|
|
993
|
+
}, F($n, cn, Yt), { singleton: !0 });
|
|
994
|
+
function or(e) {
|
|
993
995
|
return (t) => {
|
|
994
996
|
let n = setTimeout(() => {
|
|
995
997
|
t(!1);
|
|
@@ -999,29 +1001,29 @@ function ar(e) {
|
|
|
999
1001
|
};
|
|
1000
1002
|
};
|
|
1001
1003
|
}
|
|
1002
|
-
function
|
|
1004
|
+
function sr(e, t) {
|
|
1003
1005
|
e === 0 ? t() : requestAnimationFrame(() => {
|
|
1004
|
-
|
|
1006
|
+
sr(e - 1, t);
|
|
1005
1007
|
});
|
|
1006
1008
|
}
|
|
1007
|
-
function
|
|
1009
|
+
function cr(e, t) {
|
|
1008
1010
|
if (e === void 0) return 0;
|
|
1009
1011
|
let n = t - 1, r = typeof e == "number" ? e : e.index === "LAST" ? n : e.index;
|
|
1010
1012
|
return Math.max(0, Math.min(r, n));
|
|
1011
1013
|
}
|
|
1012
|
-
function
|
|
1014
|
+
function lr(e) {
|
|
1013
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);
|
|
1014
1016
|
}
|
|
1015
|
-
var
|
|
1017
|
+
var ur = q(([{ defaultItemSize: e, listRefresh: t, sizes: n }, { scrollTop: r }, { scrollTargetReached: i, scrollToIndex: a }, { didMount: o }]) => {
|
|
1016
1018
|
let s = G(!0), c = G(0), l = G(!0);
|
|
1017
|
-
return z(U(o, W(c), V(([e, t]) => !
|
|
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]) => {
|
|
1018
1020
|
if (e === void 0) {
|
|
1019
1021
|
L(s, !0), L(l, !0);
|
|
1020
1022
|
return;
|
|
1021
1023
|
}
|
|
1022
1024
|
At(i, () => {
|
|
1023
1025
|
L(l, !0);
|
|
1024
|
-
}),
|
|
1026
|
+
}), sr(4, () => {
|
|
1025
1027
|
At(r, () => {
|
|
1026
1028
|
L(s, !0);
|
|
1027
1029
|
}), L(a, e);
|
|
@@ -1031,11 +1033,11 @@ var lr = q(([{ defaultItemSize: e, listRefresh: t, sizes: n }, { scrollTop: r },
|
|
|
1031
1033
|
initialTopMostItemIndex: c,
|
|
1032
1034
|
scrolledToInitialItem: s
|
|
1033
1035
|
};
|
|
1034
|
-
}, F(
|
|
1035
|
-
function
|
|
1036
|
+
}, F($n, cn, ar, nr), { singleton: !0 });
|
|
1037
|
+
function dr(e, t) {
|
|
1036
1038
|
return Math.abs(e - t) < 1.01;
|
|
1037
1039
|
}
|
|
1038
|
-
var
|
|
1040
|
+
var fr = "up", pr = "down", mr = "none", hr = {
|
|
1039
1041
|
atBottom: !1,
|
|
1040
1042
|
notAtBottomBecause: "NOT_SHOWING_LAST_ITEM",
|
|
1041
1043
|
state: {
|
|
@@ -1044,8 +1046,8 @@ var dr = "up", fr = "down", pr = "none", mr = {
|
|
|
1044
1046
|
scrollTop: 0,
|
|
1045
1047
|
viewportHeight: 0
|
|
1046
1048
|
}
|
|
1047
|
-
},
|
|
1048
|
-
let o = G(!1), s = G(!0), c = K(), l = K(), u = G(4), d = G(
|
|
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);
|
|
1049
1051
|
z(U(Wt(J(i), J(d)), H(([e, t]) => e <= t), B()), s), z(U(s, It(50)), l);
|
|
1050
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]) => {
|
|
1051
1053
|
let s = n + r - t > -o, c = {
|
|
@@ -1068,8 +1070,8 @@ var dr = "up", fr = "down", pr = "none", mr = {
|
|
|
1068
1070
|
notAtBottomBecause: l,
|
|
1069
1071
|
state: c
|
|
1070
1072
|
};
|
|
1071
|
-
},
|
|
1072
|
-
if (!
|
|
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)) {
|
|
1073
1075
|
let i = t - (n + r) < 1;
|
|
1074
1076
|
return e.scrollTop !== n && i ? {
|
|
1075
1077
|
changed: !0,
|
|
@@ -1096,17 +1098,17 @@ var dr = "up", fr = "down", pr = "none", mr = {
|
|
|
1096
1098
|
scrollTop: 0
|
|
1097
1099
|
}), V((e) => e.changed), H((e) => e.jump)), 0);
|
|
1098
1100
|
z(U(m, H((e) => e.atBottom)), o), z(U(o, It(50)), c);
|
|
1099
|
-
let g = G(
|
|
1101
|
+
let g = G(pr);
|
|
1100
1102
|
z(U(r, H(({ scrollTop: e }) => e), B(), Pt((e, t) => R(p) ? {
|
|
1101
1103
|
direction: e.direction,
|
|
1102
1104
|
prevScrollTop: t
|
|
1103
1105
|
} : {
|
|
1104
|
-
direction: t < e.prevScrollTop ?
|
|
1106
|
+
direction: t < e.prevScrollTop ? fr : pr,
|
|
1105
1107
|
prevScrollTop: t
|
|
1106
1108
|
}, {
|
|
1107
|
-
direction:
|
|
1109
|
+
direction: pr,
|
|
1108
1110
|
prevScrollTop: 0
|
|
1109
|
-
}), H((e) => e.direction)), g), z(U(r, It(50), Nt(
|
|
1111
|
+
}), H((e) => e.direction)), g), z(U(r, It(50), Nt(mr)), g);
|
|
1110
1112
|
let _ = G(0);
|
|
1111
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)), _), {
|
|
1112
1114
|
atBottomState: m,
|
|
@@ -1121,31 +1123,31 @@ var dr = "up", fr = "down", pr = "none", mr = {
|
|
|
1121
1123
|
scrollDirection: g,
|
|
1122
1124
|
scrollVelocity: _
|
|
1123
1125
|
};
|
|
1124
|
-
}, F(
|
|
1125
|
-
function
|
|
1126
|
-
return typeof e == "number" ? n ===
|
|
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;
|
|
1127
1129
|
}
|
|
1128
|
-
function
|
|
1130
|
+
function Sr(e, t) {
|
|
1129
1131
|
return typeof e == "number" ? e : e[t] ?? 0;
|
|
1130
1132
|
}
|
|
1131
|
-
var
|
|
1133
|
+
var Cr = q(([{ deviation: e, fixedHeaderHeight: t, headerHeight: n, scrollTop: r, viewportHeight: i }]) => {
|
|
1132
1134
|
let a = K(), o = G(0), s = G(0), c = G(0);
|
|
1133
1135
|
return {
|
|
1134
1136
|
increaseViewportBy: s,
|
|
1135
1137
|
listBoundary: a,
|
|
1136
1138
|
overscan: c,
|
|
1137
1139
|
topListHeight: o,
|
|
1138
|
-
visibleRange: zt(U(Wt(J(r), J(i), J(n), J(a,
|
|
1139
|
-
let u = e - c, d = o + s, f = Math.max(n - u, 0), p =
|
|
1140
|
-
return r -= c, r += n + s, i += n + s, i -= c, r > e + d - m && (p =
|
|
1141
|
-
}), V((e) => e !== null), B(
|
|
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])
|
|
1142
1144
|
};
|
|
1143
|
-
}, F(
|
|
1144
|
-
function
|
|
1145
|
-
if (
|
|
1146
|
-
let r =
|
|
1145
|
+
}, F(cn), { singleton: !0 });
|
|
1146
|
+
function wr(e, t, n) {
|
|
1147
|
+
if (In(t)) {
|
|
1148
|
+
let r = Un(e, t);
|
|
1147
1149
|
return [{
|
|
1148
|
-
index:
|
|
1150
|
+
index: fn(t.groupOffsetTree, r)[0],
|
|
1149
1151
|
offset: 0,
|
|
1150
1152
|
size: 0
|
|
1151
1153
|
}, {
|
|
@@ -1162,7 +1164,7 @@ function Cr(e, t, n) {
|
|
|
1162
1164
|
size: 0
|
|
1163
1165
|
}];
|
|
1164
1166
|
}
|
|
1165
|
-
var
|
|
1167
|
+
var Tr = {
|
|
1166
1168
|
bottom: 0,
|
|
1167
1169
|
firstItemIndex: 0,
|
|
1168
1170
|
items: [],
|
|
@@ -1173,7 +1175,7 @@ var wr = {
|
|
|
1173
1175
|
topListHeight: 0,
|
|
1174
1176
|
totalCount: 0
|
|
1175
1177
|
};
|
|
1176
|
-
function
|
|
1178
|
+
function Er(e, t, n, r, i, a) {
|
|
1177
1179
|
let { lastIndex: o, lastOffset: s, lastSize: c } = i, l = 0, u = 0;
|
|
1178
1180
|
if (e.length > 0) {
|
|
1179
1181
|
l = e[0].offset;
|
|
@@ -1184,37 +1186,37 @@ function Tr(e, t, n, r, i, a) {
|
|
|
1184
1186
|
return {
|
|
1185
1187
|
bottom: u,
|
|
1186
1188
|
firstItemIndex: a,
|
|
1187
|
-
items:
|
|
1189
|
+
items: Or(e, i, a),
|
|
1188
1190
|
offsetBottom: m,
|
|
1189
1191
|
offsetTop: l,
|
|
1190
1192
|
top: p,
|
|
1191
|
-
topItems:
|
|
1193
|
+
topItems: Or(t, i, a),
|
|
1192
1194
|
topListHeight: t.reduce((e, t) => t.size + e, 0),
|
|
1193
1195
|
totalCount: n
|
|
1194
1196
|
};
|
|
1195
1197
|
}
|
|
1196
|
-
function
|
|
1198
|
+
function Dr(e, t, n, r, i, a) {
|
|
1197
1199
|
let o = 0;
|
|
1198
1200
|
if (n.groupIndices.length > 0) for (let t of n.groupIndices) {
|
|
1199
1201
|
if (t - o >= e) break;
|
|
1200
1202
|
o++;
|
|
1201
1203
|
}
|
|
1202
|
-
let s = e + o, c =
|
|
1203
|
-
return
|
|
1204
|
+
let s = e + o, c = cr(t, s);
|
|
1205
|
+
return Er(Array.from({ length: s }).map((e, t) => ({
|
|
1204
1206
|
data: a[t + c],
|
|
1205
1207
|
index: t + c,
|
|
1206
1208
|
offset: 0,
|
|
1207
1209
|
size: 0
|
|
1208
1210
|
})), [], s, i, n, r);
|
|
1209
1211
|
}
|
|
1210
|
-
function
|
|
1212
|
+
function Or(e, t, n) {
|
|
1211
1213
|
if (e.length === 0) return [];
|
|
1212
|
-
if (!
|
|
1214
|
+
if (!In(t)) return e.map((e) => ({
|
|
1213
1215
|
...e,
|
|
1214
1216
|
index: e.index + n,
|
|
1215
1217
|
originalIndex: e.index
|
|
1216
1218
|
}));
|
|
1217
|
-
let r = e[0].index, i = e[e.length - 1].index, a = [], o =
|
|
1219
|
+
let r = e[0].index, i = e[e.length - 1].index, a = [], o = hn(t.groupOffsetTree, r, i), s, c = 0;
|
|
1218
1220
|
for (let r of e) {
|
|
1219
1221
|
(!s || s.end < r.index) && (s = o.shift(), c = t.groupIndices.indexOf(s.start));
|
|
1220
1222
|
let e;
|
|
@@ -1234,30 +1236,30 @@ function Dr(e, t, n) {
|
|
|
1234
1236
|
}
|
|
1235
1237
|
return a;
|
|
1236
1238
|
}
|
|
1237
|
-
function
|
|
1239
|
+
function kr(e, t) {
|
|
1238
1240
|
return e === void 0 ? 0 : typeof e == "number" ? e : e[t] ?? 0;
|
|
1239
1241
|
}
|
|
1240
|
-
var
|
|
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 }]) => {
|
|
1241
1243
|
let h = G([]), g = G(0), _ = K(), v = G(0);
|
|
1242
1244
|
z(a.topItemsIndexes, h);
|
|
1243
|
-
let y = zt(U(Wt(p, m, J(c,
|
|
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]) => {
|
|
1244
1246
|
let i = r !== void 0 && r.length !== n;
|
|
1245
1247
|
return e && !t && !i;
|
|
1246
1248
|
}), H(([, , [e, t], n, r, i, a, o, s, c, l, u]) => {
|
|
1247
1249
|
let d = r, { offsetTree: f, sizeTree: p } = d, m = R(g);
|
|
1248
1250
|
if (n === 0) return {
|
|
1249
|
-
...
|
|
1251
|
+
...Tr,
|
|
1250
1252
|
totalCount: n
|
|
1251
1253
|
};
|
|
1252
1254
|
if (e === 0 && t === 0) return m === 0 ? {
|
|
1253
|
-
...
|
|
1255
|
+
...Tr,
|
|
1254
1256
|
totalCount: n
|
|
1255
|
-
} :
|
|
1256
|
-
if (Y(p)) return m > 0 ? null :
|
|
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);
|
|
1257
1259
|
let h = [];
|
|
1258
1260
|
if (o.length > 0) {
|
|
1259
1261
|
let e = o[0], t = o[o.length - 1], n = 0;
|
|
1260
|
-
for (let r of
|
|
1262
|
+
for (let r of hn(p, e, t)) {
|
|
1261
1263
|
let i = r.value, a = Math.max(r.start, e), o = Math.min(r.end, t);
|
|
1262
1264
|
for (let e = a; e <= o; e++) h.push({
|
|
1263
1265
|
data: u?.[e],
|
|
@@ -1267,8 +1269,8 @@ var kr = q(([{ data: e, firstItemIndex: t, gap: n, sizes: r, totalCount: i }, a,
|
|
|
1267
1269
|
}), n += i;
|
|
1268
1270
|
}
|
|
1269
1271
|
}
|
|
1270
|
-
if (!a) return
|
|
1271
|
-
let _ = o.length > 0 ? o[o.length - 1] + 1 : 0, v =
|
|
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, _);
|
|
1272
1274
|
if (v.length === 0) return null;
|
|
1273
1275
|
let y = n - 1, b = Dt([], (n) => {
|
|
1274
1276
|
for (let r of v) {
|
|
@@ -1287,13 +1289,13 @@ var kr = q(([{ data: e, firstItemIndex: t, gap: n, sizes: r, totalCount: i }, a,
|
|
|
1287
1289
|
size: s
|
|
1288
1290
|
}), a += s + c;
|
|
1289
1291
|
}
|
|
1290
|
-
}), x =
|
|
1292
|
+
}), x = kr(l, vr), S = kr(l, yr);
|
|
1291
1293
|
if (b.length > 0 && (x > 0 || S > 0)) {
|
|
1292
1294
|
let e = b[0], t = b[b.length - 1];
|
|
1293
1295
|
if (x > 0 && e.index > _) {
|
|
1294
1296
|
let t = Math.min(x, e.index - _), n = [], r = e.offset;
|
|
1295
1297
|
for (let i = e.index - 1; i >= e.index - t; i--) {
|
|
1296
|
-
let t =
|
|
1298
|
+
let t = hn(p, i, i)[0]?.value ?? e.size;
|
|
1297
1299
|
r -= t + c, n.unshift({
|
|
1298
1300
|
data: u?.[i],
|
|
1299
1301
|
index: i,
|
|
@@ -1306,7 +1308,7 @@ var kr = q(([{ data: e, firstItemIndex: t, gap: n, sizes: r, totalCount: i }, a,
|
|
|
1306
1308
|
if (S > 0 && t.index < y) {
|
|
1307
1309
|
let e = Math.min(S, y - t.index), n = t.offset + t.size + c;
|
|
1308
1310
|
for (let r = t.index + 1; r <= t.index + e; r++) {
|
|
1309
|
-
let e =
|
|
1311
|
+
let e = hn(p, r, r)[0]?.value ?? t.size;
|
|
1310
1312
|
b.push({
|
|
1311
1313
|
data: u?.[r],
|
|
1312
1314
|
index: r,
|
|
@@ -1316,10 +1318,10 @@ var kr = q(([{ data: e, firstItemIndex: t, gap: n, sizes: r, totalCount: i }, a,
|
|
|
1316
1318
|
}
|
|
1317
1319
|
}
|
|
1318
1320
|
}
|
|
1319
|
-
return
|
|
1320
|
-
}), V((e) => e !== null), B()),
|
|
1321
|
+
return Er(b, h, n, c, d, s);
|
|
1322
|
+
}), V((e) => e !== null), B()), Tr);
|
|
1321
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)), _);
|
|
1322
|
-
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(
|
|
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()));
|
|
1323
1325
|
return {
|
|
1324
1326
|
endReached: b,
|
|
1325
1327
|
initialItemCount: g,
|
|
@@ -1334,24 +1336,24 @@ var kr = q(([{ data: e, firstItemIndex: t, gap: n, sizes: r, totalCount: i }, a,
|
|
|
1334
1336
|
endIndex: e[n].index,
|
|
1335
1337
|
startIndex: e[t].index
|
|
1336
1338
|
};
|
|
1337
|
-
}), B(
|
|
1339
|
+
}), B(kn))),
|
|
1338
1340
|
startReached: x,
|
|
1339
1341
|
topItemsIndexes: h,
|
|
1340
1342
|
...f
|
|
1341
1343
|
};
|
|
1342
|
-
}, F(
|
|
1344
|
+
}, F($n, tr, Cr, ur, ar, _r, nr, jn), { singleton: !0 }), jr = q(([{ fixedFooterHeight: e, fixedHeaderHeight: t, footerHeight: n, headerHeight: r }, { listState: i }]) => {
|
|
1343
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);
|
|
1344
1346
|
return z(J(o), a), {
|
|
1345
1347
|
totalListHeight: o,
|
|
1346
1348
|
totalListHeightChanged: a
|
|
1347
1349
|
};
|
|
1348
|
-
}, F(
|
|
1350
|
+
}, F(cn, Ar), { singleton: !0 }), Mr = q(([{ viewportHeight: e }, { totalListHeight: t }]) => {
|
|
1349
1351
|
let n = G(!1);
|
|
1350
1352
|
return {
|
|
1351
1353
|
alignToBottom: n,
|
|
1352
1354
|
paddingTopAddition: zt(U(Wt(n, e, t), V(([e]) => e), H(([, e, t]) => Math.max(0, e - t)), It(0), B()), 0)
|
|
1353
1355
|
};
|
|
1354
|
-
}, F(
|
|
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 ? {
|
|
1355
1357
|
...i,
|
|
1356
1358
|
align: n ?? "start",
|
|
1357
1359
|
...r === void 0 ? {} : { behavior: r }
|
|
@@ -1359,10 +1361,10 @@ var kr = q(([{ data: e, firstItemIndex: t, gap: n, sizes: r, totalCount: i }, a,
|
|
|
1359
1361
|
...i,
|
|
1360
1362
|
align: n ?? "end",
|
|
1361
1363
|
...r === void 0 ? {} : { behavior: r }
|
|
1362
|
-
} : null,
|
|
1364
|
+
} : null, Fr = q(([{ gap: e, sizes: t, totalCount: n }, { fixedFooterHeight: r, fixedHeaderHeight: i, headerHeight: a, scrollingInProgress: o, scrollTop: s, viewportHeight: c }, { scrollToIndex: l }]) => {
|
|
1363
1365
|
let u = K();
|
|
1364
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]) => {
|
|
1365
|
-
let { calculateViewLocation: u =
|
|
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({
|
|
1366
1368
|
itemBottom: h,
|
|
1367
1369
|
itemTop: m,
|
|
1368
1370
|
locationParams: f,
|
|
@@ -1371,11 +1373,11 @@ var kr = q(([{ data: e, firstItemIndex: t, gap: n, sizes: r, totalCount: i }, a,
|
|
|
1371
1373
|
});
|
|
1372
1374
|
return _ === null ? d?.() : d && At(U(o, V((e) => !e), Ft(R(o) ? 1 : 2)), d), _;
|
|
1373
1375
|
}), V((e) => e !== null)), l), { scrollIntoView: u };
|
|
1374
|
-
}, F(
|
|
1375
|
-
function
|
|
1376
|
+
}, F($n, cn, ar, Ar, Yt), { singleton: !0 });
|
|
1377
|
+
function Ir(e) {
|
|
1376
1378
|
return e === !1 ? !1 : e === "smooth" ? "smooth" : "auto";
|
|
1377
1379
|
}
|
|
1378
|
-
var
|
|
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 }]) => {
|
|
1379
1381
|
let m = G(!1), h = K(), g = null;
|
|
1380
1382
|
function _(e) {
|
|
1381
1383
|
L(o, {
|
|
@@ -1386,7 +1388,7 @@ var Ir = (e, t) => typeof e == "function" ? Fr(e(t)) : t && Fr(e), Lr = q(([{ li
|
|
|
1386
1388
|
}
|
|
1387
1389
|
I(U(Wt(U(J(t), Ft(1)), c), W(J(m), a, s, d), H(([[e, t], n, r, i, a]) => {
|
|
1388
1390
|
let o = t && i, s = "auto";
|
|
1389
|
-
return o && (s =
|
|
1391
|
+
return o && (s = Lr(n, r || a), o &&= s !== !1), {
|
|
1390
1392
|
followOutputBehavior: s,
|
|
1391
1393
|
shouldFollow: o,
|
|
1392
1394
|
totalCount: e
|
|
@@ -1433,7 +1435,7 @@ var Ir = (e, t) => typeof e == "function" ? Fr(e(t)) : t && Fr(e), Lr = q(([{ li
|
|
|
1433
1435
|
followOutput: m,
|
|
1434
1436
|
scrollIntoViewOnChange: y
|
|
1435
1437
|
};
|
|
1436
|
-
}, F(
|
|
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 }]) => {
|
|
1437
1439
|
let r = G(0);
|
|
1438
1440
|
return I(U(e, W(r), V(([, e]) => e !== 0), H(([, e]) => ({ top: e }))), (e) => {
|
|
1439
1441
|
At(U(n, Ft(1), V((e) => e.items.length > 1)), () => {
|
|
@@ -1442,7 +1444,7 @@ var Ir = (e, t) => typeof e == "function" ? Fr(e(t)) : t && Fr(e), Lr = q(([{ li
|
|
|
1442
1444
|
});
|
|
1443
1445
|
});
|
|
1444
1446
|
}), { initialScrollTop: r };
|
|
1445
|
-
}, F(
|
|
1447
|
+
}, F(nr, cn, Ar), { singleton: !0 }), Vr = q(([{ scrollVelocity: e }]) => {
|
|
1446
1448
|
let t = G(!1), n = K(), r = G(!1);
|
|
1447
1449
|
return z(U(e, W(r, t, n), V(([e, t]) => t !== !1 && t !== void 0), H(([e, t, n, r]) => {
|
|
1448
1450
|
let { enter: i, exit: a } = t;
|
|
@@ -1458,7 +1460,7 @@ var Ir = (e, t) => typeof e == "function" ? Fr(e(t)) : t && Fr(e), Lr = q(([{ li
|
|
|
1458
1460
|
scrollSeekRangeChanged: n,
|
|
1459
1461
|
scrollVelocity: e
|
|
1460
1462
|
};
|
|
1461
|
-
}, F(
|
|
1463
|
+
}, F(_r), { singleton: !0 }), Hr = q(([{ scrollContainerState: e, scrollTo: t }]) => {
|
|
1462
1464
|
let n = K(), r = K(), i = K(), a = G(!1), o = G(void 0);
|
|
1463
1465
|
return z(U(Wt(n, r), H(([{ scrollTop: e, viewportHeight: t }, { offsetTop: n, listHeight: r }]) => ({
|
|
1464
1466
|
scrollHeight: r,
|
|
@@ -1474,35 +1476,35 @@ var Ir = (e, t) => typeof e == "function" ? Fr(e(t)) : t && Fr(e), Lr = q(([{ li
|
|
|
1474
1476
|
windowScrollTo: i,
|
|
1475
1477
|
windowViewportRect: r
|
|
1476
1478
|
};
|
|
1477
|
-
}, F(
|
|
1479
|
+
}, F(cn)), Ur = q(([{ sizeRanges: e, sizes: t }, { headerHeight: n, scrollTop: r }, { initialTopMostItemIndex: i }, { didMount: a }, { useWindowScroll: o, windowScrollContainerState: s, windowViewportRect: c }]) => {
|
|
1478
1480
|
let l = K(), u = G(void 0), d = G(null), f = G(null);
|
|
1479
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]) => {
|
|
1480
|
-
let s =
|
|
1482
|
+
let s = qn(t.sizeTree);
|
|
1481
1483
|
r && i !== null && a !== null && (n = i.scrollTop - a.offsetTop), n -= o, e({
|
|
1482
1484
|
ranges: s,
|
|
1483
1485
|
scrollTop: n
|
|
1484
1486
|
});
|
|
1485
|
-
}), z(U(u, V(wt), H(
|
|
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), {
|
|
1486
1488
|
getState: l,
|
|
1487
1489
|
restoreStateFrom: u
|
|
1488
1490
|
};
|
|
1489
|
-
}, F(
|
|
1490
|
-
function
|
|
1491
|
+
}, F($n, cn, ur, nr, Hr));
|
|
1492
|
+
function Wr(e) {
|
|
1491
1493
|
return {
|
|
1492
1494
|
align: "start",
|
|
1493
1495
|
index: 0,
|
|
1494
1496
|
offset: e.scrollTop
|
|
1495
1497
|
};
|
|
1496
1498
|
}
|
|
1497
|
-
var
|
|
1499
|
+
var Gr = q(([{ topItemsIndexes: e }]) => {
|
|
1498
1500
|
let t = G(0);
|
|
1499
1501
|
return z(U(t, V((e) => e >= 0), H((e) => Array.from({ length: e }).map((e, t) => t))), e), { topItemCount: t };
|
|
1500
|
-
}, F(
|
|
1501
|
-
function
|
|
1502
|
+
}, F(Ar));
|
|
1503
|
+
function Kr(e) {
|
|
1502
1504
|
let t = !1, n;
|
|
1503
1505
|
return (() => (t || (t = !0, n = e()), n));
|
|
1504
1506
|
}
|
|
1505
|
-
var
|
|
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]) => {
|
|
1506
1508
|
let { listState: E, minOverscanItemCount: ee, topItemsIndexes: te, rangeChanged: ne, ...D } = b;
|
|
1507
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), {
|
|
1508
1510
|
data: e,
|
|
@@ -1535,8 +1537,8 @@ var Kr = Gr(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(
|
|
|
1535
1537
|
sizes: u,
|
|
1536
1538
|
...v
|
|
1537
1539
|
};
|
|
1538
|
-
}, F(
|
|
1539
|
-
let
|
|
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]) => {
|
|
1540
1542
|
let c = r + a, l = 0;
|
|
1541
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))), [
|
|
1542
1544
|
l,
|
|
@@ -1549,38 +1551,48 @@ var Kr = Gr(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(
|
|
|
1549
1551
|
[],
|
|
1550
1552
|
0,
|
|
1551
1553
|
0
|
|
1552
|
-
]), V(([e]) => e !== 0), W(
|
|
1553
|
-
function
|
|
1554
|
-
|
|
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, {
|
|
1555
1557
|
behavior: "auto",
|
|
1556
|
-
top: -
|
|
1557
|
-
}), L(e, 0)) : (L(e, 0), L(
|
|
1558
|
+
top: -t
|
|
1559
|
+
}), L(e, 0)) : (L(e, 0), L(n, {
|
|
1558
1560
|
behavior: "auto",
|
|
1559
|
-
top: -
|
|
1561
|
+
top: -t
|
|
1560
1562
|
}));
|
|
1561
1563
|
}
|
|
1562
|
-
|
|
1563
|
-
r &&
|
|
1564
|
-
}), I(U(Wt(zt(
|
|
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]) => {
|
|
1565
1578
|
function a(e) {
|
|
1566
1579
|
return e * (n + i);
|
|
1567
1580
|
}
|
|
1568
1581
|
if (t.length === 0) return a(e);
|
|
1569
|
-
let o = 0, s =
|
|
1582
|
+
let o = 0, s = dn(r, 0), c = 0, l = 0;
|
|
1570
1583
|
for (; c < e;) {
|
|
1571
1584
|
c++, o += s;
|
|
1572
1585
|
let n = t.length === l + 1 ? 1 / 0 : t[l + 1] - t[l] - 1;
|
|
1573
1586
|
c + n > e && (o -= s, n = e - c + 1), c += n, o += a(n), l++;
|
|
1574
1587
|
}
|
|
1575
1588
|
return o;
|
|
1576
|
-
})), (
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
});
|
|
1589
|
+
})), (t) => {
|
|
1590
|
+
v = {
|
|
1591
|
+
acknowledgeable: R(e) !== t,
|
|
1592
|
+
offset: t
|
|
1593
|
+
}, L(e, t), requestAnimationFrame(y);
|
|
1582
1594
|
}), { deviation: e };
|
|
1583
|
-
}, F(
|
|
1595
|
+
}, F(cn, _r, Ar, $n, Yt, jn)), Gr, tr, q(([e, t, n, r, i, a, o, s, c, l, u]) => ({
|
|
1584
1596
|
...e,
|
|
1585
1597
|
...t,
|
|
1586
1598
|
...n,
|
|
@@ -1592,15 +1604,15 @@ var Kr = Gr(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(
|
|
|
1592
1604
|
...c,
|
|
1593
1605
|
...l,
|
|
1594
1606
|
...u
|
|
1595
|
-
}), F(
|
|
1596
|
-
function
|
|
1607
|
+
}), F(Cr, zr, nr, Vr, jr, Br, Mr, Hr, Fr, Yt, Nr))));
|
|
1608
|
+
function Yr(e, t) {
|
|
1597
1609
|
let n = {}, r = {}, i = 0, a = e.length;
|
|
1598
1610
|
for (; i < a;) r[e[i]] = 1, i += 1;
|
|
1599
1611
|
for (let e in t) Object.hasOwn(r, e) || (n[e] = t[e]);
|
|
1600
1612
|
return n;
|
|
1601
1613
|
}
|
|
1602
|
-
var
|
|
1603
|
-
function
|
|
1614
|
+
var Xr = typeof document > "u" ? A.useEffect : A.useLayoutEffect;
|
|
1615
|
+
function Zr(e, t, n) {
|
|
1604
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({});
|
|
1605
1617
|
function c(e, n) {
|
|
1606
1618
|
e.propsReady !== void 0 && L(e.propsReady, !1);
|
|
@@ -1628,7 +1640,7 @@ function Xr(e, t, n) {
|
|
|
1628
1640
|
let { children: d, ...f } = t, [p] = A.useState(() => Dt(Ut(e), (e) => {
|
|
1629
1641
|
c(e, f);
|
|
1630
1642
|
})), [m] = A.useState(St(u, p));
|
|
1631
|
-
|
|
1643
|
+
Xr(() => {
|
|
1632
1644
|
for (let e of o) e in f && I(m[e], f[e]);
|
|
1633
1645
|
return () => {
|
|
1634
1646
|
Object.values(m).map(kt);
|
|
@@ -1637,14 +1649,14 @@ function Xr(e, t, n) {
|
|
|
1637
1649
|
f,
|
|
1638
1650
|
m,
|
|
1639
1651
|
p
|
|
1640
|
-
]),
|
|
1652
|
+
]), Xr(() => {
|
|
1641
1653
|
c(p, f);
|
|
1642
1654
|
}), A.useImperativeHandle(a, yt(l(p)));
|
|
1643
1655
|
let h = n;
|
|
1644
1656
|
return /* @__PURE__ */ N(s.Provider, {
|
|
1645
1657
|
value: p,
|
|
1646
1658
|
children: n === void 0 ? d : /* @__PURE__ */ N(h, {
|
|
1647
|
-
...
|
|
1659
|
+
...Yr([
|
|
1648
1660
|
...r,
|
|
1649
1661
|
...i,
|
|
1650
1662
|
...o
|
|
@@ -1655,14 +1667,14 @@ function Xr(e, t, n) {
|
|
|
1655
1667
|
}),
|
|
1656
1668
|
useEmitter: (e, t) => {
|
|
1657
1669
|
let n = A.useContext(s)[e];
|
|
1658
|
-
|
|
1670
|
+
Xr(() => I(n, t), [t, n]);
|
|
1659
1671
|
},
|
|
1660
1672
|
useEmitterValue: parseInt(A.version, 10) >= 18 ? (e) => {
|
|
1661
1673
|
let t = A.useContext(s)[e], n = A.useCallback((e) => I(t, e), [t]);
|
|
1662
1674
|
return A.useSyncExternalStore(n, () => R(t), () => R(t));
|
|
1663
1675
|
} : (e) => {
|
|
1664
1676
|
let t = A.useContext(s)[e], [n, r] = A.useState(St(R, t));
|
|
1665
|
-
return
|
|
1677
|
+
return Xr(() => I(t, (e) => {
|
|
1666
1678
|
e !== n && r(yt(e));
|
|
1667
1679
|
}), [t, n]), n;
|
|
1668
1680
|
},
|
|
@@ -1674,11 +1686,11 @@ function Xr(e, t, n) {
|
|
|
1674
1686
|
}
|
|
1675
1687
|
};
|
|
1676
1688
|
}
|
|
1677
|
-
var
|
|
1678
|
-
if (typeof document > "u") return
|
|
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;
|
|
1679
1691
|
let e = document.createElement("div");
|
|
1680
|
-
return e.style.position =
|
|
1681
|
-
})
|
|
1692
|
+
return e.style.position = ei, e.style.position === ei ? ei : ti;
|
|
1693
|
+
});
|
|
1682
1694
|
function ri(e) {
|
|
1683
1695
|
return "self" in e;
|
|
1684
1696
|
}
|
|
@@ -1699,7 +1711,7 @@ function ai(e, t, n, r = Et, i, a) {
|
|
|
1699
1711
|
viewportHeight: i
|
|
1700
1712
|
});
|
|
1701
1713
|
};
|
|
1702
|
-
n.suppressFlushSync === !0 ? u() :
|
|
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));
|
|
1703
1715
|
}, [
|
|
1704
1716
|
e,
|
|
1705
1717
|
t,
|
|
@@ -1724,14 +1736,14 @@ function ai(e, t, n, r = Et, i, a) {
|
|
|
1724
1736
|
let r = o.current;
|
|
1725
1737
|
if (!r || (a === !0 ? "offsetWidth" in r && r.offsetWidth === 0 : "offsetHeight" in r && r.offsetHeight === 0)) return;
|
|
1726
1738
|
let i = n.behavior === "smooth", l, u, d;
|
|
1727
|
-
ri(r) ? (u = Math.max(
|
|
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);
|
|
1728
1740
|
let f = u - l;
|
|
1729
1741
|
if (n.top === void 0) {
|
|
1730
1742
|
r.scrollTo(n);
|
|
1731
1743
|
return;
|
|
1732
1744
|
}
|
|
1733
1745
|
let p = Math.ceil(Math.max(Math.min(f, n.top), 0));
|
|
1734
|
-
if (n.top = p,
|
|
1746
|
+
if (n.top = p, dr(l, u) || p === d) {
|
|
1735
1747
|
e({
|
|
1736
1748
|
scrollHeight: u,
|
|
1737
1749
|
scrollTop: d,
|
|
@@ -1746,14 +1758,13 @@ function ai(e, t, n, r = Et, i, a) {
|
|
|
1746
1758
|
left: $t(r, p)
|
|
1747
1759
|
}), r.scrollTo(n);
|
|
1748
1760
|
}
|
|
1749
|
-
function d(e) {
|
|
1750
|
-
a === !0 && (e = {
|
|
1751
|
-
...e.behavior === void 0 ? {} : { behavior: e.behavior },
|
|
1752
|
-
...e.top === void 0 ? {} : { left: $t(o.current, e.top) }
|
|
1753
|
-
}), o.current.scrollBy(e);
|
|
1754
|
-
}
|
|
1755
1761
|
return {
|
|
1756
|
-
scrollByCallback:
|
|
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]),
|
|
1757
1768
|
scrollerRef: o,
|
|
1758
1769
|
scrollToCallback: u
|
|
1759
1770
|
};
|
|
@@ -1764,7 +1775,7 @@ function oi(e) {
|
|
|
1764
1775
|
var si = /* @__PURE__ */ q(([e, t]) => ({
|
|
1765
1776
|
...e,
|
|
1766
1777
|
...t
|
|
1767
|
-
}), F(
|
|
1778
|
+
}), F(Jr, /* @__PURE__ */ q(() => {
|
|
1768
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);
|
|
1769
1780
|
return {
|
|
1770
1781
|
components: n,
|
|
@@ -1785,7 +1796,7 @@ var si = /* @__PURE__ */ q(([e, t]) => ({
|
|
|
1785
1796
|
};
|
|
1786
1797
|
}))), ci = ({ height: e }) => /* @__PURE__ */ N("div", { style: { height: e } }), li = {
|
|
1787
1798
|
overflowAnchor: "none",
|
|
1788
|
-
position:
|
|
1799
|
+
position: ni(),
|
|
1789
1800
|
zIndex: 1
|
|
1790
1801
|
}, ui = { overflowAnchor: "none" }, di = {
|
|
1791
1802
|
...ui,
|
|
@@ -1796,53 +1807,57 @@ var si = /* @__PURE__ */ q(([e, t]) => ({
|
|
|
1796
1807
|
Di("deviation", (e) => {
|
|
1797
1808
|
_ !== e && v(e);
|
|
1798
1809
|
});
|
|
1799
|
-
let y =
|
|
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 ? {} : {
|
|
1800
1815
|
boxSizing: "border-box",
|
|
1801
1816
|
...h ? {
|
|
1802
1817
|
display: "inline-block",
|
|
1803
1818
|
height: "100%",
|
|
1804
|
-
marginInlineStart: _ === 0 ?
|
|
1819
|
+
marginInlineStart: _ === 0 ? te ? "auto" : 0 : _,
|
|
1805
1820
|
paddingInlineEnd: t.offsetBottom,
|
|
1806
1821
|
paddingInlineStart: t.offsetTop,
|
|
1807
1822
|
whiteSpace: "nowrap"
|
|
1808
1823
|
} : {
|
|
1809
|
-
marginTop: _ === 0 ?
|
|
1824
|
+
marginTop: _ === 0 ? te ? "auto" : 0 : _,
|
|
1810
1825
|
paddingBottom: t.offsetBottom,
|
|
1811
1826
|
paddingTop: t.offsetTop
|
|
1812
1827
|
},
|
|
1813
|
-
...
|
|
1828
|
+
...ne ? {} : { visibility: "hidden" }
|
|
1814
1829
|
};
|
|
1815
|
-
return !e && t.totalCount === 0 &&
|
|
1816
|
-
...X(
|
|
1830
|
+
return !e && t.totalCount === 0 && b != null ? /* @__PURE__ */ N(b, { ...X(b, l) }) : /* @__PURE__ */ N(S, {
|
|
1831
|
+
...X(S, l),
|
|
1817
1832
|
"data-testid": e ? "virtuoso-top-item-list" : "virtuoso-item-list",
|
|
1818
1833
|
ref: g,
|
|
1819
|
-
style:
|
|
1834
|
+
style: D,
|
|
1820
1835
|
children: (e ? t.topItems : t.items).map((e) => {
|
|
1821
|
-
let n = e.originalIndex, r =
|
|
1822
|
-
return
|
|
1823
|
-
...X(
|
|
1836
|
+
let n = e.originalIndex, r = T(n + t.firstItemIndex, e.data, l);
|
|
1837
|
+
return E ? /* @__PURE__ */ we(x, {
|
|
1838
|
+
...X(x, l),
|
|
1824
1839
|
height: e.size,
|
|
1825
1840
|
index: e.index,
|
|
1826
1841
|
key: r,
|
|
1827
1842
|
type: e.type || "item",
|
|
1828
1843
|
...e.type === "group" ? {} : { groupIndex: e.groupIndex }
|
|
1829
|
-
}) : e.type === "group" ? /* @__PURE__ */
|
|
1830
|
-
...X(
|
|
1844
|
+
}) : e.type === "group" ? /* @__PURE__ */ we(w, {
|
|
1845
|
+
...X(w, l),
|
|
1831
1846
|
"data-index": n,
|
|
1832
1847
|
"data-item-index": e.index,
|
|
1833
1848
|
"data-known-size": e.size,
|
|
1834
1849
|
key: r,
|
|
1835
1850
|
style: li
|
|
1836
|
-
}, u(e.index, l)) : /* @__PURE__ */
|
|
1837
|
-
...X(
|
|
1838
|
-
...vi(
|
|
1851
|
+
}, u(e.index, l)) : /* @__PURE__ */ we(C, {
|
|
1852
|
+
...X(C, l),
|
|
1853
|
+
...vi(C, e.data),
|
|
1839
1854
|
"data-index": n,
|
|
1840
1855
|
"data-item-group-index": e.groupIndex,
|
|
1841
1856
|
"data-item-index": e.index,
|
|
1842
1857
|
"data-known-size": e.size,
|
|
1843
1858
|
key: r,
|
|
1844
1859
|
style: h ? di : ui
|
|
1845
|
-
},
|
|
1860
|
+
}, ee ? c(e.index, e.groupIndex, e.data, l) : c(e.index, e.data, l));
|
|
1846
1861
|
})
|
|
1847
1862
|
});
|
|
1848
1863
|
}), pi = {
|
|
@@ -1869,7 +1884,7 @@ var si = /* @__PURE__ */ q(([e, t]) => ({
|
|
|
1869
1884
|
position: t ? "relative" : "absolute",
|
|
1870
1885
|
top: t ? -n : 0
|
|
1871
1886
|
}), _i = {
|
|
1872
|
-
position:
|
|
1887
|
+
position: ni(),
|
|
1873
1888
|
top: 0,
|
|
1874
1889
|
width: "100%",
|
|
1875
1890
|
zIndex: 1
|
|
@@ -1882,7 +1897,7 @@ function vi(e, t) {
|
|
|
1882
1897
|
}
|
|
1883
1898
|
var yi = /* @__PURE__ */ A.memo(function() {
|
|
1884
1899
|
let e = Z("HeaderComponent"), t = Oi("headerHeight"), n = Z("HeaderFooterTag"), r = en(A.useMemo(() => (e) => {
|
|
1885
|
-
t(
|
|
1900
|
+
t(Fn(e, "height"));
|
|
1886
1901
|
}, [t]), !0, Z("skipAnimationFrameInResizeObserver")), i = Z("context");
|
|
1887
1902
|
return e == null ? null : /* @__PURE__ */ N(n, {
|
|
1888
1903
|
ref: r,
|
|
@@ -1890,7 +1905,7 @@ var yi = /* @__PURE__ */ A.memo(function() {
|
|
|
1890
1905
|
});
|
|
1891
1906
|
}), bi = /* @__PURE__ */ A.memo(function() {
|
|
1892
1907
|
let e = Z("FooterComponent"), t = Oi("footerHeight"), n = Z("HeaderFooterTag"), r = en(A.useMemo(() => (e) => {
|
|
1893
|
-
t(
|
|
1908
|
+
t(Fn(e, "height"));
|
|
1894
1909
|
}, [t]), !0, Z("skipAnimationFrameInResizeObserver")), i = Z("context");
|
|
1895
1910
|
return e == null ? null : /* @__PURE__ */ N(n, {
|
|
1896
1911
|
ref: r,
|
|
@@ -1918,7 +1933,7 @@ function xi({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
|
|
|
1918
1933
|
function Si({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
|
|
1919
1934
|
return A.memo(function({ children: r, style: i, context: a, ...o }) {
|
|
1920
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);
|
|
1921
|
-
return
|
|
1936
|
+
return on(() => (h.current = f ?? p.current?.ownerDocument.defaultView, () => {
|
|
1922
1937
|
h.current = null;
|
|
1923
1938
|
}), [h, f]), e("windowScrollTo", g), e("scrollBy", m), /* @__PURE__ */ N(c, {
|
|
1924
1939
|
ref: p,
|
|
@@ -1935,7 +1950,7 @@ function Si({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
|
|
|
1935
1950
|
});
|
|
1936
1951
|
}
|
|
1937
1952
|
var Ci = ({ children: e }) => {
|
|
1938
|
-
let t = A.useContext(
|
|
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"));
|
|
1939
1954
|
return A.useEffect(() => {
|
|
1940
1955
|
t && (n(t.viewportHeight), r(t.itemHeight));
|
|
1941
1956
|
}, [
|
|
@@ -1949,7 +1964,7 @@ var Ci = ({ children: e }) => {
|
|
|
1949
1964
|
children: e
|
|
1950
1965
|
});
|
|
1951
1966
|
}, wi = ({ children: e }) => {
|
|
1952
|
-
let t = A.useContext(
|
|
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");
|
|
1953
1968
|
return A.useEffect(() => {
|
|
1954
1969
|
t && (r(t.itemHeight), n({
|
|
1955
1970
|
listHeight: 0,
|
|
@@ -1977,7 +1992,7 @@ var Ci = ({ children: e }) => {
|
|
|
1977
1992
|
...X(t, i),
|
|
1978
1993
|
children: e
|
|
1979
1994
|
});
|
|
1980
|
-
}, { Component: Ei, useEmitter: Di, useEmitterValue: Z, usePublisher: Oi } = /* @__PURE__ */
|
|
1995
|
+
}, { Component: Ei, useEmitter: Di, useEmitterValue: Z, usePublisher: Oi } = /* @__PURE__ */ Zr(si, {
|
|
1981
1996
|
optional: {
|
|
1982
1997
|
restoreStateFrom: "restoreStateFrom",
|
|
1983
1998
|
context: "context",
|
|
@@ -2056,7 +2071,7 @@ var Ci = ({ children: e }) => {
|
|
|
2056
2071
|
}), ji = /* @__PURE__ */ q(([e, t]) => ({
|
|
2057
2072
|
...e,
|
|
2058
2073
|
...t
|
|
2059
|
-
}), F(
|
|
2074
|
+
}), F(Jr, /* @__PURE__ */ q(() => {
|
|
2060
2075
|
let e = G((e) => /* @__PURE__ */ P("td", { children: ["Item $", e] })), t = G(null), n = G((e) => /* @__PURE__ */ P("td", {
|
|
2061
2076
|
colSpan: 1e3,
|
|
2062
2077
|
children: ["Group ", e]
|
|
@@ -2086,20 +2101,20 @@ var Ci = ({ children: e }) => {
|
|
|
2086
2101
|
height: e,
|
|
2087
2102
|
padding: 0
|
|
2088
2103
|
} }) }), Pi = { overflowAnchor: "none" }, Fi = {
|
|
2089
|
-
position:
|
|
2104
|
+
position: ni(),
|
|
2090
2105
|
zIndex: 2,
|
|
2091
2106
|
overflowAnchor: "none"
|
|
2092
2107
|
}, Ii = /* @__PURE__ */ A.memo(function({ showTopList: e = !1 }) {
|
|
2093
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), []);
|
|
2094
2109
|
return (e ? t.topItems : t.items).map((t) => {
|
|
2095
2110
|
let m = t.originalIndex, h = n(m + r, t.data, i), g = e ? m === 0 ? 0 : p[m - 1] : 0;
|
|
2096
|
-
return a ? /* @__PURE__ */
|
|
2111
|
+
return a ? /* @__PURE__ */ we(u, {
|
|
2097
2112
|
...X(u, i),
|
|
2098
2113
|
height: t.size,
|
|
2099
2114
|
index: t.index,
|
|
2100
2115
|
key: h,
|
|
2101
2116
|
type: t.type || "item"
|
|
2102
|
-
}) : t.type === "group" ? /* @__PURE__ */
|
|
2117
|
+
}) : t.type === "group" ? /* @__PURE__ */ we(d, {
|
|
2103
2118
|
...X(d, i),
|
|
2104
2119
|
"data-index": m,
|
|
2105
2120
|
"data-item-index": t.index,
|
|
@@ -2109,7 +2124,7 @@ var Ci = ({ children: e }) => {
|
|
|
2109
2124
|
...Fi,
|
|
2110
2125
|
top: o
|
|
2111
2126
|
}
|
|
2112
|
-
}, l(t.index, i)) : /* @__PURE__ */
|
|
2127
|
+
}, l(t.index, i)) : /* @__PURE__ */ we(f, {
|
|
2113
2128
|
...X(f, i),
|
|
2114
2129
|
...vi(f, t.data),
|
|
2115
2130
|
"data-index": m,
|
|
@@ -2128,28 +2143,32 @@ var Ci = ({ children: e }) => {
|
|
|
2128
2143
|
Vi("deviation", (e) => {
|
|
2129
2144
|
d !== e && (u.current.style.marginTop = `${e}px`, f(e));
|
|
2130
2145
|
});
|
|
2131
|
-
let p =
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
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,
|
|
2138
2154
|
height: x
|
|
2155
|
+
}, "padding-top") : null, w = S > 0 ? /* @__PURE__ */ N(h, {
|
|
2156
|
+
context: y,
|
|
2157
|
+
height: S
|
|
2139
2158
|
}, "padding-bottom") : null;
|
|
2140
|
-
return /* @__PURE__ */ P(
|
|
2159
|
+
return /* @__PURE__ */ P(g, {
|
|
2141
2160
|
"data-testid": "virtuoso-item-list",
|
|
2142
2161
|
ref: l,
|
|
2143
|
-
...X(
|
|
2162
|
+
...X(g, y),
|
|
2144
2163
|
children: [
|
|
2145
|
-
|
|
2164
|
+
C,
|
|
2146
2165
|
t && /* @__PURE__ */ N(Ii, { showTopList: !0 }),
|
|
2147
2166
|
/* @__PURE__ */ N(Ii, {}),
|
|
2148
|
-
|
|
2167
|
+
w
|
|
2149
2168
|
]
|
|
2150
2169
|
});
|
|
2151
2170
|
}), Ri = ({ children: e }) => {
|
|
2152
|
-
let t = A.useContext(
|
|
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"));
|
|
2153
2172
|
return A.useEffect(() => {
|
|
2154
2173
|
t && (n(t.viewportHeight), r(t.itemHeight));
|
|
2155
2174
|
}, [
|
|
@@ -2163,7 +2182,7 @@ var Ci = ({ children: e }) => {
|
|
|
2163
2182
|
children: e
|
|
2164
2183
|
});
|
|
2165
2184
|
}, zi = ({ children: e }) => {
|
|
2166
|
-
let t = A.useContext(
|
|
2185
|
+
let t = A.useContext(Qr), n = Hi("windowViewportRect"), r = Hi("fixedItemHeight"), i = Q("customScrollParent"), a = Q("useWindowScroll"), o = sn(n, i, Q("skipAnimationFrameInResizeObserver"));
|
|
2167
2186
|
return A.useEffect(() => {
|
|
2168
2187
|
t && (r(t.itemHeight), n({
|
|
2169
2188
|
listHeight: 0,
|
|
@@ -2181,7 +2200,7 @@ var Ci = ({ children: e }) => {
|
|
|
2181
2200
|
style: gi(!1, a),
|
|
2182
2201
|
children: e
|
|
2183
2202
|
});
|
|
2184
|
-
}, { Component: Bi, useEmitter: Vi, useEmitterValue: Q, usePublisher: Hi } = /* @__PURE__ */
|
|
2203
|
+
}, { Component: Bi, useEmitter: Vi, useEmitterValue: Q, usePublisher: Hi } = /* @__PURE__ */ Zr(ji, {
|
|
2185
2204
|
optional: {
|
|
2186
2205
|
restoreStateFrom: "restoreStateFrom",
|
|
2187
2206
|
context: "context",
|
|
@@ -2235,7 +2254,7 @@ var Ci = ({ children: e }) => {
|
|
|
2235
2254
|
groupIndices: "groupIndices"
|
|
2236
2255
|
}
|
|
2237
2256
|
}, /* @__PURE__ */ A.memo(function(e) {
|
|
2238
|
-
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) =>
|
|
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, {
|
|
2239
2258
|
ref: c,
|
|
2240
2259
|
style: {
|
|
2241
2260
|
position: "sticky",
|
|
@@ -2323,33 +2342,33 @@ var ra = /* @__PURE__ */ q(([{ increaseViewportBy: e, listBoundary: t, overscan:
|
|
|
2323
2342
|
}), ee = K(), te = K(), ne = G(0), D = G(null), re = G({
|
|
2324
2343
|
column: 0,
|
|
2325
2344
|
row: 0
|
|
2326
|
-
}), ie = K(), ae = K(),
|
|
2327
|
-
I(U(m, W(
|
|
2328
|
-
L(
|
|
2329
|
-
}), I(U(Wt(m,
|
|
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]) => {
|
|
2330
2349
|
if (e === void 0) {
|
|
2331
|
-
L(
|
|
2350
|
+
L(se, !0);
|
|
2332
2351
|
return;
|
|
2333
2352
|
}
|
|
2334
|
-
L(
|
|
2353
|
+
L(ce, !0), sr(1, () => {
|
|
2335
2354
|
L(ee, e);
|
|
2336
2355
|
}), At(U(l), () => {
|
|
2337
|
-
L(t, [0, 0]), L(
|
|
2356
|
+
L(t, [0, 0]), L(se, !0);
|
|
2338
2357
|
});
|
|
2339
2358
|
}), z(U(ae, V((e) => e != null && e.scrollTop > 0), Nt(0)), C), I(U(m, W(ae), V(([, e]) => e != null)), ([, e]) => {
|
|
2340
|
-
e && (L(T, e.viewport), L(E, e.item), L(re, e.gap), e.scrollTop > 0 && (L(
|
|
2341
|
-
L(
|
|
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);
|
|
2342
2361
|
}), L(c, { top: e.scrollTop })));
|
|
2343
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]) => ({
|
|
2344
2363
|
gap: n,
|
|
2345
2364
|
item: t,
|
|
2346
2365
|
scrollTop: r,
|
|
2347
2366
|
viewport: e
|
|
2348
|
-
}))), ie), z(U(Wt(J(S), r, J(re, na), J(E, ta), J(T, ta), J(D), J(C), J(
|
|
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]) => {
|
|
2349
2368
|
let { column: u, row: d } = r, { height: f, width: p } = i, { width: m } = a;
|
|
2350
2369
|
if (s === 0 && (e === 0 || m === 0)) return Ki;
|
|
2351
2370
|
if (p === 0) {
|
|
2352
|
-
let t =
|
|
2371
|
+
let t = cr(l, e);
|
|
2353
2372
|
return ea($i(t, t + Math.max(s - 1, 0), o));
|
|
2354
2373
|
}
|
|
2355
2374
|
let h = ia(m, p, u), g, _;
|
|
@@ -2367,18 +2386,18 @@ var ra = /* @__PURE__ */ q(([{ increaseViewportBy: e, listBoundary: t, overscan:
|
|
|
2367
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]) => {
|
|
2368
2387
|
let { bottom: i, top: a } = aa(e, r, t, n);
|
|
2369
2388
|
return [a, i];
|
|
2370
|
-
}), B(
|
|
2389
|
+
}), B(An)), t);
|
|
2371
2390
|
let le = G(!1);
|
|
2372
2391
|
z(U(l, W(le), H(([e, t]) => t || e !== 0)), le);
|
|
2373
2392
|
let ue = Bt(U(Wt(w, S), V(([{ items: e }]) => e.length > 0), W(le), V(([[e, t], n]) => {
|
|
2374
2393
|
let r = e.items[e.items.length - 1].index === t - 1;
|
|
2375
2394
|
return (n || e.bottom > 0 && e.itemHeight > 0 && e.offsetBottom === 0 && e.items.length === t) && r;
|
|
2376
|
-
}), 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(
|
|
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 }]) => ({
|
|
2377
2396
|
endIndex: e[e.length - 1].index,
|
|
2378
2397
|
startIndex: e[0].index
|
|
2379
|
-
})), B(
|
|
2398
|
+
})), B(kn), It(0)));
|
|
2380
2399
|
z(fe, p.scrollSeekRangeChanged), z(U(ee, W(T, E, S, re), H(([e, t, n, r, i]) => {
|
|
2381
|
-
let a =
|
|
2400
|
+
let a = ir(e), { align: o, behavior: s, offset: c } = a, l = a.index;
|
|
2382
2401
|
l === "LAST" && (l = r - 1), l = Xi(0, l, Zi(r - 1, l));
|
|
2383
2402
|
let u = oa(t, i, n, l);
|
|
2384
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), {
|
|
@@ -2418,7 +2437,7 @@ var ra = /* @__PURE__ */ q(([{ increaseViewportBy: e, listBoundary: t, overscan:
|
|
|
2418
2437
|
...p,
|
|
2419
2438
|
gridState: w,
|
|
2420
2439
|
horizontalDirection: k,
|
|
2421
|
-
initialTopMostItemIndex:
|
|
2440
|
+
initialTopMostItemIndex: oe,
|
|
2422
2441
|
totalListHeight: pe,
|
|
2423
2442
|
...f,
|
|
2424
2443
|
endReached: ue,
|
|
@@ -2426,10 +2445,10 @@ var ra = /* @__PURE__ */ q(([{ increaseViewportBy: e, listBoundary: t, overscan:
|
|
|
2426
2445
|
rangeChanged: fe,
|
|
2427
2446
|
startReached: de,
|
|
2428
2447
|
stateChanged: ie,
|
|
2429
|
-
stateRestoreInProgress:
|
|
2448
|
+
stateRestoreInProgress: O,
|
|
2430
2449
|
...x
|
|
2431
2450
|
};
|
|
2432
|
-
}, F(
|
|
2451
|
+
}, F(Cr, cn, _r, Vr, nr, Hr, Yt));
|
|
2433
2452
|
function ia(e, t, n) {
|
|
2434
2453
|
return Xi(1, Yi((e + n) / (Yi(t) + n)));
|
|
2435
2454
|
}
|
|
@@ -2494,7 +2513,7 @@ var sa = /* @__PURE__ */ q(([e, t]) => ({
|
|
|
2494
2513
|
f,
|
|
2495
2514
|
p
|
|
2496
2515
|
]), !0, !1);
|
|
2497
|
-
return
|
|
2516
|
+
return on(() => {
|
|
2498
2517
|
e.itemHeight > 0 && e.itemWidth > 0 && h(!0);
|
|
2499
2518
|
}, [e]), m ? null : /* @__PURE__ */ N(c, {
|
|
2500
2519
|
className: t,
|
|
@@ -2512,7 +2531,7 @@ var sa = /* @__PURE__ */ q(([e, t]) => ({
|
|
|
2512
2531
|
height: e.itemHeight,
|
|
2513
2532
|
index: t.index,
|
|
2514
2533
|
width: e.itemWidth
|
|
2515
|
-
}, o) : /* @__PURE__ */
|
|
2534
|
+
}, o) : /* @__PURE__ */ we(s, {
|
|
2516
2535
|
...X(s, u),
|
|
2517
2536
|
className: n,
|
|
2518
2537
|
"data-index": t.index,
|
|
@@ -2522,7 +2541,7 @@ var sa = /* @__PURE__ */ q(([e, t]) => ({
|
|
|
2522
2541
|
});
|
|
2523
2542
|
}), la = A.memo(function() {
|
|
2524
2543
|
let e = $("HeaderComponent"), t = ha("headerHeight"), n = $("headerFooterTag"), r = en(A.useMemo(() => (e) => {
|
|
2525
|
-
t(
|
|
2544
|
+
t(Fn(e, "height"));
|
|
2526
2545
|
}, [t]), !0, !1), i = $("context");
|
|
2527
2546
|
return e == null ? null : /* @__PURE__ */ N(n, {
|
|
2528
2547
|
ref: r,
|
|
@@ -2530,14 +2549,14 @@ var sa = /* @__PURE__ */ q(([e, t]) => ({
|
|
|
2530
2549
|
});
|
|
2531
2550
|
}), ua = A.memo(function() {
|
|
2532
2551
|
let e = $("FooterComponent"), t = ha("footerHeight"), n = $("headerFooterTag"), r = en(A.useMemo(() => (e) => {
|
|
2533
|
-
t(
|
|
2552
|
+
t(Fn(e, "height"));
|
|
2534
2553
|
}, [t]), !0, !1), i = $("context");
|
|
2535
2554
|
return e == null ? null : /* @__PURE__ */ N(n, {
|
|
2536
2555
|
ref: r,
|
|
2537
2556
|
children: /* @__PURE__ */ N(e, { ...X(e, i) })
|
|
2538
2557
|
});
|
|
2539
2558
|
}), da = ({ children: e }) => {
|
|
2540
|
-
let t = A.useContext(
|
|
2559
|
+
let t = A.useContext($r), n = ha("itemDimensions"), r = ha("viewportDimensions"), i = en(A.useMemo(() => (e) => {
|
|
2541
2560
|
r(e.getBoundingClientRect());
|
|
2542
2561
|
}, [r]), !0, !1);
|
|
2543
2562
|
return A.useEffect(() => {
|
|
@@ -2558,7 +2577,7 @@ var sa = /* @__PURE__ */ q(([e, t]) => ({
|
|
|
2558
2577
|
children: e
|
|
2559
2578
|
});
|
|
2560
2579
|
}, fa = ({ children: e }) => {
|
|
2561
|
-
let t = A.useContext(
|
|
2580
|
+
let t = A.useContext($r), n = ha("windowViewportRect"), r = ha("itemDimensions"), i = $("customScrollParent"), a = $("useWindowScroll"), o = sn(n, i, !1);
|
|
2562
2581
|
return A.useEffect(() => {
|
|
2563
2582
|
t && (r({
|
|
2564
2583
|
height: t.itemHeight,
|
|
@@ -2578,7 +2597,7 @@ var sa = /* @__PURE__ */ q(([e, t]) => ({
|
|
|
2578
2597
|
style: gi(!1, a),
|
|
2579
2598
|
children: e
|
|
2580
2599
|
});
|
|
2581
|
-
}, { Component: pa, useEmitter: ma, useEmitterValue: $, usePublisher: ha } = /* @__PURE__ */
|
|
2600
|
+
}, { Component: pa, useEmitter: ma, useEmitterValue: $, usePublisher: ha } = /* @__PURE__ */ Zr(sa, {
|
|
2582
2601
|
optional: {
|
|
2583
2602
|
context: "context",
|
|
2584
2603
|
totalCount: "totalCount",
|
|
@@ -2639,14 +2658,14 @@ function va(e, t, n) {
|
|
|
2639
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);
|
|
2640
2659
|
}
|
|
2641
2660
|
//#endregion
|
|
2642
|
-
//#region ../../node_modules/.pnpm/use-debounce@10.1.1_react@19.
|
|
2661
|
+
//#region ../../node_modules/.pnpm/use-debounce@10.1.1_react@19.3.0/node_modules/use-debounce/dist/index.module.js
|
|
2643
2662
|
function ya(e, t, n, r) {
|
|
2644
2663
|
var i = this, a = M(null), o = M(0), s = M(0), c = M(null), l = M([]), u = M(), d = M(), f = M(e), p = M(!0), m = M(), h = M();
|
|
2645
2664
|
f.current = e;
|
|
2646
2665
|
var g = typeof window < "u", _ = !t && t !== 0 && g;
|
|
2647
2666
|
if (typeof e != "function") throw TypeError("Expected a function");
|
|
2648
2667
|
t = +t || 0;
|
|
2649
|
-
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 =
|
|
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 = je(function() {
|
|
2650
2669
|
var e = function(e) {
|
|
2651
2670
|
var t = l.current, n = u.current;
|
|
2652
2671
|
return l.current = u.current = null, o.current = e, s.current = s.current || e, d.current = f.current.apply(n, t);
|
|
@@ -2699,7 +2718,7 @@ function ya(e, t, n, r) {
|
|
|
2699
2718
|
S,
|
|
2700
2719
|
r
|
|
2701
2720
|
]);
|
|
2702
|
-
return h.current = w,
|
|
2721
|
+
return h.current = w, De(function() {
|
|
2703
2722
|
return p.current = !0, function() {
|
|
2704
2723
|
var e;
|
|
2705
2724
|
b && h.current.flush(), m.current &&= ((e = globalThis.document) == null || e.removeEventListener == null || e.removeEventListener("visibilitychange", m.current), null), p.current = !1;
|
|
@@ -2709,12 +2728,12 @@ function ya(e, t, n, r) {
|
|
|
2709
2728
|
//#endregion
|
|
2710
2729
|
//#region src/components/ui/Table/TableCellAsyncContent.tsx
|
|
2711
2730
|
var ba = ({ content: e }) => {
|
|
2712
|
-
let [t, n] =
|
|
2713
|
-
return
|
|
2731
|
+
let [t, n] = Me(null);
|
|
2732
|
+
return De(() => {
|
|
2714
2733
|
(async () => {
|
|
2715
2734
|
e instanceof Promise ? n(await e) : n(e);
|
|
2716
2735
|
})();
|
|
2717
|
-
}, [e]), /* @__PURE__ */ N(
|
|
2736
|
+
}, [e]), /* @__PURE__ */ N(Ne, { children: t });
|
|
2718
2737
|
};
|
|
2719
2738
|
//#endregion
|
|
2720
2739
|
//#region ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
@@ -2741,19 +2760,19 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
2741
2760
|
return e && e.length ? n(e, r) : 0;
|
|
2742
2761
|
}
|
|
2743
2762
|
t.exports = i;
|
|
2744
|
-
})))(), 1), wa = ({ filter: e }) => /* @__PURE__ */ P(
|
|
2745
|
-
e instanceof s && /* @__PURE__ */ N(
|
|
2746
|
-
e instanceof o && /* @__PURE__ */ N(
|
|
2747
|
-
e instanceof r && /* @__PURE__ */ N(
|
|
2748
|
-
e instanceof a && /* @__PURE__ */ N(
|
|
2749
|
-
e instanceof
|
|
2750
|
-
e instanceof i && /* @__PURE__ */ N(
|
|
2763
|
+
})))(), 1), wa = ({ filter: e }) => /* @__PURE__ */ P(Ne, { children: [
|
|
2764
|
+
e instanceof s && /* @__PURE__ */ N(te, { filter: e }),
|
|
2765
|
+
e instanceof o && /* @__PURE__ */ N(C, { filter: e }),
|
|
2766
|
+
e instanceof r && /* @__PURE__ */ N(ee, { filter: e }),
|
|
2767
|
+
e instanceof a && /* @__PURE__ */ N(E, { filter: e }),
|
|
2768
|
+
e instanceof S && /* @__PURE__ */ N(T, { filter: e }),
|
|
2769
|
+
e instanceof i && /* @__PURE__ */ N(w, { filter: e })
|
|
2751
2770
|
] }), Ta = ({ filter: e, onFilterChange: t }) => {
|
|
2752
|
-
let n = h(), { t: r } =
|
|
2771
|
+
let n = h(), { t: r } = Pe(), i = m(n, (e) => e.setFilterValue), a = je(() => ({ [e.id]: e.initialFilterValue }), [e.id, e.initialFilterValue]), o = je(() => ({ [e.id]: e.filterValue ?? e.initialFilterValue }), [
|
|
2753
2772
|
e.id,
|
|
2754
2773
|
e.filterValue,
|
|
2755
2774
|
e.initialFilterValue
|
|
2756
|
-
]), s =
|
|
2775
|
+
]), s = He({
|
|
2757
2776
|
defaultValues: a,
|
|
2758
2777
|
values: o
|
|
2759
2778
|
}), { formState: { isDirty: c }, handleSubmit: l } = s, u = j(async (n) => {
|
|
@@ -2770,26 +2789,26 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
2770
2789
|
t,
|
|
2771
2790
|
i
|
|
2772
2791
|
]);
|
|
2773
|
-
return /* @__PURE__ */ N(
|
|
2792
|
+
return /* @__PURE__ */ N(Ve, {
|
|
2774
2793
|
...s,
|
|
2775
|
-
children: /* @__PURE__ */ P(
|
|
2794
|
+
children: /* @__PURE__ */ P(O, {
|
|
2776
2795
|
autoComplete: "off",
|
|
2777
2796
|
component: "form",
|
|
2778
2797
|
id: "Filters",
|
|
2779
2798
|
onSubmit: l(u),
|
|
2780
2799
|
sx: { minWidth: "400px" },
|
|
2781
|
-
children: [/* @__PURE__ */ N(wa, { filter: e }), /* @__PURE__ */ P(
|
|
2800
|
+
children: [/* @__PURE__ */ N(wa, { filter: e }), /* @__PURE__ */ P(O, {
|
|
2782
2801
|
sx: {
|
|
2783
2802
|
display: "flex",
|
|
2784
2803
|
gap: 1,
|
|
2785
2804
|
justifyContent: "flex-end"
|
|
2786
2805
|
},
|
|
2787
|
-
children: [/* @__PURE__ */ N(
|
|
2806
|
+
children: [/* @__PURE__ */ N(oe, {
|
|
2788
2807
|
disabled: e.isInitialFilterValue(),
|
|
2789
2808
|
onClick: d,
|
|
2790
2809
|
variant: "outlined",
|
|
2791
2810
|
children: r`Remove filter`
|
|
2792
|
-
}), /* @__PURE__ */ N(
|
|
2811
|
+
}), /* @__PURE__ */ N(oe, {
|
|
2793
2812
|
disabled: !c,
|
|
2794
2813
|
type: "submit",
|
|
2795
2814
|
variant: "contained",
|
|
@@ -2799,7 +2818,7 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
2799
2818
|
})
|
|
2800
2819
|
});
|
|
2801
2820
|
}, Ea = {}, Da = ({ 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 }) => {
|
|
2802
|
-
let T =
|
|
2821
|
+
let T = be(), E = h(), ee = m(E, b((e) => e.dataContext)), te = j((e) => {
|
|
2803
2822
|
l({
|
|
2804
2823
|
dataContext: ee,
|
|
2805
2824
|
id: a.id,
|
|
@@ -2893,7 +2912,7 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
2893
2912
|
C,
|
|
2894
2913
|
w
|
|
2895
2914
|
]);
|
|
2896
|
-
return /* @__PURE__ */ N(
|
|
2915
|
+
return /* @__PURE__ */ N(O, {
|
|
2897
2916
|
"aria-sort": e,
|
|
2898
2917
|
className: i,
|
|
2899
2918
|
"data-column-index": o,
|
|
@@ -2916,7 +2935,7 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
2916
2935
|
filterLabelIcon: "GENEPIX-TableHeaderCell-filterLabelIcon",
|
|
2917
2936
|
root: "GENEPIX-TableHeaderCell",
|
|
2918
2937
|
sortLabelIcon: "GENEPIX-TableHeaderCell-sortLabelIcon"
|
|
2919
|
-
}, ka = 18, Aa = `${Oa.root}--focus`, ja =
|
|
2938
|
+
}, ka = 18, Aa = `${Oa.root}--focus`, ja = ye(ue, { name: "GENEPIX-TableSortLabelIcon" })(({ ownerState: e, theme: t }) => ({
|
|
2920
2939
|
"&:hover": {
|
|
2921
2940
|
color: t.palette.primary.main,
|
|
2922
2941
|
opacity: "1 !important"
|
|
@@ -2933,7 +2952,7 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
2933
2952
|
padding: 0,
|
|
2934
2953
|
userSelect: "none",
|
|
2935
2954
|
width: `${ka}px`
|
|
2936
|
-
})), Ma =
|
|
2955
|
+
})), Ma = ye(ue, { name: "GENEPIX-TableCustomHeaderIcon" })(({ theme: e }) => ({
|
|
2937
2956
|
"&:hover": {
|
|
2938
2957
|
color: e.palette.primary.main,
|
|
2939
2958
|
opacity: "1 !important"
|
|
@@ -2945,7 +2964,7 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
2945
2964
|
padding: 0,
|
|
2946
2965
|
userSelect: "none",
|
|
2947
2966
|
width: `${ka}px`
|
|
2948
|
-
})), Na =
|
|
2967
|
+
})), Na = ye(ue, { name: "GENEPIX-TableFilterLabelIcon" })(({ theme: e }) => ({
|
|
2949
2968
|
"&:hover": {
|
|
2950
2969
|
color: e.palette.primary.main,
|
|
2951
2970
|
opacity: "1 !important"
|
|
@@ -2958,7 +2977,7 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
2958
2977
|
userSelect: "none",
|
|
2959
2978
|
width: `${ka}px`
|
|
2960
2979
|
})), Pa = (e) => {
|
|
2961
|
-
let { t } =
|
|
2980
|
+
let { t } = Pe(), n = be(), 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 = M(null), u = Oe(), [d, f] = Me(), p = M(null), g = M(null), { column: _, columnIndex: v, dividerColor: y, height: b, onColumnDividerKeyDown: x, onColumnDividerMouseDown: S, onCustomDrag: C, order: w, width: T, xOffset: E } = e, ee = M(!1), te = j((e) => _.frozen || e.button !== 0 ? !1 : e.nativeEvent.target.classList.contains(Oa.content), [_.frozen]), ne = j((e, t) => {
|
|
2962
2981
|
C && (e.type === "start" && (ee.current = !0), C(e, t));
|
|
2963
2982
|
}, [C]), D = j(async () => {
|
|
2964
2983
|
if (i === _.id) {
|
|
@@ -2987,7 +3006,7 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
2987
3006
|
e.button === 0 && (e.preventDefault(), e.stopPropagation(), S(e, _));
|
|
2988
3007
|
}, [_, S]), ce = j((e) => {
|
|
2989
3008
|
x(e, _);
|
|
2990
|
-
}, [_, x]),
|
|
3009
|
+
}, [_, x]), k = je(() => c.find((e) => e.id === _.id), [_.id, c]), le = je(() => !!k && !k.isInitialFilterValue(), [k]), ue = j(() => {
|
|
2991
3010
|
_.customHeaderIcon?.onClick({
|
|
2992
3011
|
column: _,
|
|
2993
3012
|
dataContext: a
|
|
@@ -2996,7 +3015,7 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
2996
3015
|
f(null), setTimeout(() => {
|
|
2997
3016
|
p.current.classList.add(Aa), p.current?.focus(), g.current?.focus();
|
|
2998
3017
|
});
|
|
2999
|
-
}, []),
|
|
3018
|
+
}, []), he = i === _.id, ge = { direction: i === _.id ? o : "asc" }, _e = Sa(Oa.sortLabelIcon, { [`${Oa.sortLabelIcon}--active`]: he }), ve = Sa(Oa.filterLabelIcon, { [`${Oa.filterLabelIcon}--active`]: le }), ye = !!_.customHeaderIcon, xe = !!_.comparatorFactory, A = !!k, Se = xe || A || ye ? 0 : -1, Ce = +n.spacing(2).replace("px", ""), we = je(() => {
|
|
3000
3019
|
if (i === _.id) return o === "asc" ? "ascending" : "descending";
|
|
3001
3020
|
}, [
|
|
3002
3021
|
_.id,
|
|
@@ -3004,7 +3023,7 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3004
3023
|
o
|
|
3005
3024
|
]);
|
|
3006
3025
|
return /* @__PURE__ */ P(Da, {
|
|
3007
|
-
ariaSort:
|
|
3026
|
+
ariaSort: we,
|
|
3008
3027
|
canDrag: te,
|
|
3009
3028
|
className: Sa(Oa.root, { [Aa]: !!d }),
|
|
3010
3029
|
column: _,
|
|
@@ -3037,16 +3056,16 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3037
3056
|
tabIndex: Se,
|
|
3038
3057
|
width: T,
|
|
3039
3058
|
xOffset: E,
|
|
3040
|
-
children: [_.type === "actions" && /* @__PURE__ */ N(
|
|
3059
|
+
children: [_.type === "actions" && /* @__PURE__ */ N(O, {
|
|
3041
3060
|
className: Oa.content,
|
|
3042
|
-
sx:
|
|
3061
|
+
sx: Re,
|
|
3043
3062
|
children: t`Actions`
|
|
3044
|
-
}), _.type !== "actions" && /* @__PURE__ */ P(
|
|
3063
|
+
}), _.type !== "actions" && /* @__PURE__ */ P(O, {
|
|
3045
3064
|
sx: {
|
|
3046
3065
|
[`&:hover .${Oa.content}`]: { maxWidth: `calc(100% + 16px - ${(0, Ca.default)([
|
|
3047
3066
|
ye ? Ce : 0,
|
|
3067
|
+
A ? Ce : 0,
|
|
3048
3068
|
xe ? Ce : 0,
|
|
3049
|
-
be ? Ce : 0,
|
|
3050
3069
|
Ce
|
|
3051
3070
|
])}px)` },
|
|
3052
3071
|
alignItems: "center",
|
|
@@ -3054,14 +3073,14 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3054
3073
|
width: "100%"
|
|
3055
3074
|
},
|
|
3056
3075
|
children: [
|
|
3057
|
-
_.renderHeader ? /* @__PURE__ */ N(
|
|
3076
|
+
_.renderHeader ? /* @__PURE__ */ N(Ne, { children: _.renderHeader({
|
|
3058
3077
|
column: _,
|
|
3059
3078
|
dataContext: a
|
|
3060
|
-
}) }) : /* @__PURE__ */ N(
|
|
3079
|
+
}) }) : /* @__PURE__ */ N(me, {
|
|
3061
3080
|
arrow: !0,
|
|
3062
3081
|
placement: "top",
|
|
3063
3082
|
title: _.headerTooltipContent,
|
|
3064
|
-
children: /* @__PURE__ */ N(
|
|
3083
|
+
children: /* @__PURE__ */ N(O, {
|
|
3065
3084
|
className: Oa.content,
|
|
3066
3085
|
onClick: re,
|
|
3067
3086
|
ref: l,
|
|
@@ -3069,7 +3088,7 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3069
3088
|
cursor: "pointer",
|
|
3070
3089
|
flexGrow: 1,
|
|
3071
3090
|
maxWidth: `calc(100% + 16px - ${(0, Ca.default)([
|
|
3072
|
-
|
|
3091
|
+
he ? Ce : 0,
|
|
3073
3092
|
le ? Ce : 0,
|
|
3074
3093
|
Ce
|
|
3075
3094
|
])}px)`,
|
|
@@ -3090,14 +3109,14 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3090
3109
|
title: _.customHeaderIcon?.label,
|
|
3091
3110
|
children: _.customHeaderIcon?.iconElement
|
|
3092
3111
|
}),
|
|
3093
|
-
|
|
3094
|
-
className:
|
|
3112
|
+
A && /* @__PURE__ */ P(Ne, { children: [/* @__PURE__ */ N(Na, {
|
|
3113
|
+
className: ve,
|
|
3095
3114
|
onClick: ae,
|
|
3096
3115
|
ref: g,
|
|
3097
3116
|
tabIndex: 0,
|
|
3098
3117
|
title: t("Show filter for {{name}}", { name: _.headerName || t("unknown") }),
|
|
3099
|
-
children: /* @__PURE__ */ N(
|
|
3100
|
-
}), /* @__PURE__ */ N(
|
|
3118
|
+
children: /* @__PURE__ */ N(Be, { fontSize: "inherit" })
|
|
3119
|
+
}), /* @__PURE__ */ N(pe, {
|
|
3101
3120
|
anchorEl: d,
|
|
3102
3121
|
anchorOrigin: {
|
|
3103
3122
|
horizontal: "center",
|
|
@@ -3111,25 +3130,25 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3111
3130
|
horizontal: "center",
|
|
3112
3131
|
vertical: "top"
|
|
3113
3132
|
},
|
|
3114
|
-
children: /* @__PURE__ */ N(
|
|
3133
|
+
children: /* @__PURE__ */ N(fe, {
|
|
3115
3134
|
elevation: 4,
|
|
3116
3135
|
square: !0,
|
|
3117
3136
|
sx: { padding: n.spacing(3) },
|
|
3118
3137
|
children: /* @__PURE__ */ N(Ta, {
|
|
3119
|
-
filter:
|
|
3138
|
+
filter: k,
|
|
3120
3139
|
onFilterChange: oe
|
|
3121
3140
|
})
|
|
3122
3141
|
})
|
|
3123
3142
|
})] }),
|
|
3124
|
-
|
|
3125
|
-
className:
|
|
3143
|
+
xe && /* @__PURE__ */ N(Ne, { children: /* @__PURE__ */ N(ja, {
|
|
3144
|
+
className: _e,
|
|
3126
3145
|
onClick: ie,
|
|
3127
|
-
ownerState:
|
|
3146
|
+
ownerState: ge,
|
|
3128
3147
|
tabIndex: 0,
|
|
3129
3148
|
title: t("Toggle sorting for {{name}}", { name: _.headerName || t("unknown") }),
|
|
3130
|
-
children: /* @__PURE__ */ N(
|
|
3149
|
+
children: /* @__PURE__ */ N(ze, { fontSize: "inherit" })
|
|
3131
3150
|
}) }),
|
|
3132
|
-
_.resizable !== !1 && /* @__PURE__ */ N(
|
|
3151
|
+
_.resizable !== !1 && /* @__PURE__ */ N(O, {
|
|
3133
3152
|
"aria-label": t("Resize column {{name}}, use arrow keys to adjust the size.", { name: _.headerName || t("unknown") }),
|
|
3134
3153
|
className: Oa.columnDivider,
|
|
3135
3154
|
onKeyDown: ce,
|
|
@@ -3159,11 +3178,11 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3159
3178
|
})]
|
|
3160
3179
|
}, _.id);
|
|
3161
3180
|
}, Fa = (e) => {
|
|
3162
|
-
let t = h(), n = m(t, b((e) => e.dataContext)), [r, i] =
|
|
3181
|
+
let t = h(), n = m(t, b((e) => e.dataContext)), [r, i] = Me(null), { t: a } = Pe(), o = !!r, s = j((e) => {
|
|
3163
3182
|
i(e.currentTarget);
|
|
3164
3183
|
}, []), c = j(() => {
|
|
3165
3184
|
i(null);
|
|
3166
|
-
}, []), l =
|
|
3185
|
+
}, []), l = je(() => e.column.getActions({
|
|
3167
3186
|
dataContext: n,
|
|
3168
3187
|
id: e.column.id,
|
|
3169
3188
|
row: e.row,
|
|
@@ -3177,7 +3196,7 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3177
3196
|
return /* @__PURE__ */ N(Da, {
|
|
3178
3197
|
...e,
|
|
3179
3198
|
onClick: u,
|
|
3180
|
-
children: l.length > 0 && /* @__PURE__ */ P(
|
|
3199
|
+
children: l.length > 0 && /* @__PURE__ */ P(Ne, { children: [/* @__PURE__ */ N(ue, {
|
|
3181
3200
|
"aria-label": a`Row actions`,
|
|
3182
3201
|
onClick: s,
|
|
3183
3202
|
sx: {
|
|
@@ -3187,7 +3206,7 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3187
3206
|
transform: "translateY(-50%)"
|
|
3188
3207
|
},
|
|
3189
3208
|
children: /* @__PURE__ */ N(Ge, {})
|
|
3190
|
-
}), /* @__PURE__ */ N(
|
|
3209
|
+
}), /* @__PURE__ */ N(de, {
|
|
3191
3210
|
anchorEl: r,
|
|
3192
3211
|
id: "basic-menu",
|
|
3193
3212
|
onClick: c,
|
|
@@ -3198,14 +3217,14 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3198
3217
|
})] })
|
|
3199
3218
|
}, e.column.id);
|
|
3200
3219
|
}, Ia = ({ children: e }) => {
|
|
3201
|
-
let t =
|
|
3220
|
+
let t = je(() => ({ sideEffects: Ze({ styles: { active: { opacity: "0.6" } } }) }), []);
|
|
3202
3221
|
return /* @__PURE__ */ N(Je, {
|
|
3203
|
-
...
|
|
3222
|
+
...Fe.createAttributes("SortableOverlay"),
|
|
3204
3223
|
dropAnimation: t,
|
|
3205
3224
|
zIndex: 1e3,
|
|
3206
3225
|
children: e
|
|
3207
3226
|
});
|
|
3208
|
-
}, La =
|
|
3227
|
+
}, La = Ce({
|
|
3209
3228
|
attributes: void 0,
|
|
3210
3229
|
listeners: void 0,
|
|
3211
3230
|
ref: void 0
|
|
@@ -3216,7 +3235,7 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3216
3235
|
children: t
|
|
3217
3236
|
});
|
|
3218
3237
|
}, za = ({ children: e, id: t, sx: n }) => {
|
|
3219
|
-
let r =
|
|
3238
|
+
let r = be(), { attributes: i, isDragging: a, listeners: o, setActivatorNodeRef: s, setNodeRef: c, transform: l, transition: u } = rt({ id: t }), d = je(() => ({
|
|
3220
3239
|
attributes: i,
|
|
3221
3240
|
listeners: o,
|
|
3222
3241
|
ref: s
|
|
@@ -3231,8 +3250,8 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3231
3250
|
};
|
|
3232
3251
|
return /* @__PURE__ */ N(Ra, {
|
|
3233
3252
|
value: d,
|
|
3234
|
-
children: /* @__PURE__ */ N(
|
|
3235
|
-
...
|
|
3253
|
+
children: /* @__PURE__ */ N(O, {
|
|
3254
|
+
...Fe.createAttributes("SortableListItem", { id: t }),
|
|
3236
3255
|
component: "li",
|
|
3237
3256
|
ref: c,
|
|
3238
3257
|
style: f,
|
|
@@ -3252,9 +3271,9 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3252
3271
|
})
|
|
3253
3272
|
});
|
|
3254
3273
|
}, Ba = ({ name: e }) => {
|
|
3255
|
-
let t =
|
|
3256
|
-
return /* @__PURE__ */ N(
|
|
3257
|
-
...
|
|
3274
|
+
let t = be(), { attributes: n, listeners: r, ref: i } = Ee(La);
|
|
3275
|
+
return /* @__PURE__ */ N(O, {
|
|
3276
|
+
...Fe.createAttributes("SortableListItemDragHandle"),
|
|
3258
3277
|
component: "button",
|
|
3259
3278
|
...n,
|
|
3260
3279
|
...r,
|
|
@@ -3279,7 +3298,7 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3279
3298
|
children: /* @__PURE__ */ N(at, {})
|
|
3280
3299
|
});
|
|
3281
3300
|
}, Va = ({ items: e, onChange: t, renderItemContent: n }) => {
|
|
3282
|
-
let r =
|
|
3301
|
+
let r = be(), { t: i } = Pe(), [a, o] = Me(null), s = je(() => e.find((e) => e.id === a?.id), [a, e]), c = $e(Qe(Xe), Qe(Ye, { coordinateGetter: nt })), l = j(() => {
|
|
3283
3302
|
o(null);
|
|
3284
3303
|
}, []), u = j(({ active: n, over: r }) => {
|
|
3285
3304
|
if (r && n.id !== r?.id) {
|
|
@@ -3303,8 +3322,8 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3303
3322
|
"&:hover": { backgroundColor: r.palette.action.hover },
|
|
3304
3323
|
backgroundColor: r.palette.background.paper
|
|
3305
3324
|
},
|
|
3306
|
-
children: [/* @__PURE__ */ N(
|
|
3307
|
-
control: /* @__PURE__ */ N(
|
|
3325
|
+
children: [/* @__PURE__ */ N(k, {
|
|
3326
|
+
control: /* @__PURE__ */ N(se, {
|
|
3308
3327
|
checked: e.isSelected,
|
|
3309
3328
|
onChange: f,
|
|
3310
3329
|
size: "small",
|
|
@@ -3329,8 +3348,8 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3329
3348
|
sensors: c,
|
|
3330
3349
|
children: [/* @__PURE__ */ N(et, {
|
|
3331
3350
|
items: e,
|
|
3332
|
-
children: /* @__PURE__ */ N(
|
|
3333
|
-
...
|
|
3351
|
+
children: /* @__PURE__ */ N(le, { children: /* @__PURE__ */ N(O, {
|
|
3352
|
+
...Fe.createAttributes("SortableList"),
|
|
3334
3353
|
component: "ul",
|
|
3335
3354
|
sx: {
|
|
3336
3355
|
display: "flex",
|
|
@@ -3344,7 +3363,7 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3344
3363
|
}), /* @__PURE__ */ N(Ia, { children: s ? p(s) : null })]
|
|
3345
3364
|
});
|
|
3346
3365
|
}, Ha = Ke(({ onActionsChange: e, onClose: t, onTitleChange: n, openProps: { hasCellData: r } }) => {
|
|
3347
|
-
let { t: i } =
|
|
3366
|
+
let { t: i } = Pe(), [a, o] = Me([]), 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 = je(() => {
|
|
3348
3367
|
let e = /* @__PURE__ */ new Map();
|
|
3349
3368
|
return f.forEach((t) => {
|
|
3350
3369
|
e.set(t.id, t);
|
|
@@ -3360,13 +3379,13 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3360
3379
|
});
|
|
3361
3380
|
}), o(t);
|
|
3362
3381
|
}, [g]);
|
|
3363
|
-
|
|
3382
|
+
De(() => {
|
|
3364
3383
|
_(d);
|
|
3365
3384
|
}, [d, _]);
|
|
3366
3385
|
let v = j(() => {
|
|
3367
3386
|
_(u.createInitialVisualColumnSettings(f));
|
|
3368
3387
|
}, [f, _]);
|
|
3369
|
-
|
|
3388
|
+
De(() => {
|
|
3370
3389
|
n(i`Change column order and visibility`);
|
|
3371
3390
|
}, [n, i]);
|
|
3372
3391
|
let y = j(() => {
|
|
@@ -3415,10 +3434,10 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3415
3434
|
isSelected: !1
|
|
3416
3435
|
})));
|
|
3417
3436
|
}, []);
|
|
3418
|
-
|
|
3437
|
+
De(() => {
|
|
3419
3438
|
e([
|
|
3420
3439
|
{
|
|
3421
|
-
...
|
|
3440
|
+
...Fe.createAttributes("TableColumnOrderDialog-enable-all"),
|
|
3422
3441
|
autoFocus: !0,
|
|
3423
3442
|
color: "secondary",
|
|
3424
3443
|
label: i`Enable all`,
|
|
@@ -3426,7 +3445,7 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3426
3445
|
variant: "outlined"
|
|
3427
3446
|
},
|
|
3428
3447
|
{
|
|
3429
|
-
...
|
|
3448
|
+
...Fe.createAttributes("TableColumnOrderDialog-enable-all-with-data"),
|
|
3430
3449
|
autoFocus: !0,
|
|
3431
3450
|
color: "secondary",
|
|
3432
3451
|
label: i`Enable all with data`,
|
|
@@ -3434,7 +3453,7 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3434
3453
|
variant: "outlined"
|
|
3435
3454
|
},
|
|
3436
3455
|
{
|
|
3437
|
-
...
|
|
3456
|
+
...Fe.createAttributes("TableColumnOrderDialog-disable-all"),
|
|
3438
3457
|
autoFocus: !0,
|
|
3439
3458
|
color: "secondary",
|
|
3440
3459
|
label: i`Disable all`,
|
|
@@ -3442,7 +3461,7 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3442
3461
|
variant: "outlined"
|
|
3443
3462
|
},
|
|
3444
3463
|
{
|
|
3445
|
-
...
|
|
3464
|
+
...Fe.createAttributes("TableColumnOrderDialog-disable-all-without-data"),
|
|
3446
3465
|
autoFocus: !0,
|
|
3447
3466
|
color: "secondary",
|
|
3448
3467
|
label: i`Disable all without data`,
|
|
@@ -3450,7 +3469,7 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3450
3469
|
variant: "outlined"
|
|
3451
3470
|
},
|
|
3452
3471
|
{
|
|
3453
|
-
...
|
|
3472
|
+
...Fe.createAttributes("TableColumnOrderDialog-reset"),
|
|
3454
3473
|
autoFocus: !0,
|
|
3455
3474
|
color: "secondary",
|
|
3456
3475
|
label: i`Reset to default`,
|
|
@@ -3458,7 +3477,7 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3458
3477
|
variant: "outlined"
|
|
3459
3478
|
},
|
|
3460
3479
|
{
|
|
3461
|
-
...
|
|
3480
|
+
...Fe.createAttributes("TableColumnOrderDialog-close"),
|
|
3462
3481
|
autoFocus: !0,
|
|
3463
3482
|
color: "primary",
|
|
3464
3483
|
label: i`Close`,
|
|
@@ -3466,7 +3485,7 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3466
3485
|
variant: "outlined"
|
|
3467
3486
|
},
|
|
3468
3487
|
{
|
|
3469
|
-
...
|
|
3488
|
+
...Fe.createAttributes("TableColumnOrderDialog-save"),
|
|
3470
3489
|
autoFocus: !0,
|
|
3471
3490
|
color: "secondary",
|
|
3472
3491
|
label: i`Apply`,
|
|
@@ -3488,7 +3507,7 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3488
3507
|
let E = j((e) => {
|
|
3489
3508
|
o(e);
|
|
3490
3509
|
}, []), ee = j((e) => e.label, []);
|
|
3491
|
-
return /* @__PURE__ */ N(
|
|
3510
|
+
return /* @__PURE__ */ N(O, {
|
|
3492
3511
|
sx: {},
|
|
3493
3512
|
children: /* @__PURE__ */ N(Va, {
|
|
3494
3513
|
items: a,
|
|
@@ -3504,13 +3523,13 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3504
3523
|
noCloseButton: !1,
|
|
3505
3524
|
testId: "TableColumnOrderDialog"
|
|
3506
3525
|
}), Ua = ({ cell: e, onCheckBoxClick: t, tableColumn: n }) => {
|
|
3507
|
-
let { t: r } =
|
|
3526
|
+
let { t: r } = Pe(), 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 = j((e) => {
|
|
3508
3527
|
e.stopPropagation(), e.shiftKey && e.preventDefault(), t(e, c);
|
|
3509
3528
|
}, [t, c]), u = j((e, t) => {
|
|
3510
3529
|
let n = e.target.getAttribute("name");
|
|
3511
3530
|
t && !o.includes(n) ? s([...o, n]) : t || s(o.filter((e) => e !== n));
|
|
3512
3531
|
}, [o, s]);
|
|
3513
|
-
return /* @__PURE__ */ N(
|
|
3532
|
+
return /* @__PURE__ */ N(se, {
|
|
3514
3533
|
checked: o.includes(c),
|
|
3515
3534
|
disabled: n.isDisabled ? n.isDisabled(e) : !1,
|
|
3516
3535
|
name: a(e.row),
|
|
@@ -3523,7 +3542,7 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3523
3542
|
}
|
|
3524
3543
|
});
|
|
3525
3544
|
}, Wa = /* @__PURE__ */ e(y(), 1), Ga = ({ tableColumnParams: e }) => {
|
|
3526
|
-
let { t } =
|
|
3545
|
+
let { t } = Pe(), 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({
|
|
3527
3546
|
dataContext: i,
|
|
3528
3547
|
id: a(e),
|
|
3529
3548
|
row: e,
|
|
@@ -3538,7 +3557,7 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3538
3557
|
o,
|
|
3539
3558
|
c
|
|
3540
3559
|
]);
|
|
3541
|
-
return /* @__PURE__ */ N(
|
|
3560
|
+
return /* @__PURE__ */ N(se, {
|
|
3542
3561
|
checked: d,
|
|
3543
3562
|
checkedIcon: u ? void 0 : /* @__PURE__ */ N(ot, {}),
|
|
3544
3563
|
name: "select-all",
|
|
@@ -3563,7 +3582,7 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3563
3582
|
n,
|
|
3564
3583
|
e.row
|
|
3565
3584
|
]);
|
|
3566
|
-
return n ? /* @__PURE__ */ N(
|
|
3585
|
+
return n ? /* @__PURE__ */ N(oe, {
|
|
3567
3586
|
"aria-label": r.getAriaLabel(e),
|
|
3568
3587
|
color: "primary",
|
|
3569
3588
|
onClick: i,
|
|
@@ -3578,9 +3597,9 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3578
3597
|
children: e.rowIndex + 1
|
|
3579
3598
|
}) : e.rowIndex + 1;
|
|
3580
3599
|
}, qa = ({ font: e, forceHorizontalOverflow: t, getRowName: n, headerHeight: r = 4, initialVisibleItemIndex: i, onRangeChanged: a = mt.default, onReadableIndexClick: o, onRowClick: s, onRowMouseEnter: c = mt.default, onRowMouseLeave: l = mt.default, onVerticalScrollPositionChange: d, onVisibleItemIndexChange: f, overscanMain: _, overscanReverse: v, ref: y, rowHeight: x = 4, rowHighlightingSubject: S, sx: C }) => {
|
|
3581
|
-
let w =
|
|
3600
|
+
let w = be(), { t: T } = Pe(), E = h(), { DEFAULT_OVERSCAN_MAIN: ee, DEFAULT_OVERSCAN_REVERSE: te } = p.getInstance().config.table;
|
|
3582
3601
|
m(E, b((e) => e.getCurrentColumnVisualSettings().filter((e) => e.isVisible).map((e) => e.id)));
|
|
3583
|
-
let ne = m(E, b((e) => e.setCurrentColumnVisualSettings)), D = m(E, b((e) => e.sortedData)), re = m(E, b((e) => e.idSelectorCallback)),
|
|
3602
|
+
let ne = m(E, b((e) => e.setCurrentColumnVisualSettings)), D = m(E, b((e) => e.sortedData)), re = m(E, b((e) => e.idSelectorCallback)), ae = m(E, b((e) => e.columns)), oe = m(E, b((e) => e.isInitialized)), se = m(E, b((e) => e.isRowEnabledCallback)), ce = m(E, b((e) => e.addEventListener)), k = m(E, b((e) => e.dataContext)), le = m(E, b((e) => e.isCondensed)), ue = m(E, b((e) => e.setSelectedIds)), de = m(E, b((e) => e.columnDimensions)), fe = M(null), pe = M(mt.default), [me, he] = Me(!1), ye = je(() => ve(ge(w.palette.divider, 1), .1), [w.palette.divider]), xe = je(() => _e(ge(w.palette.divider, 1), .15), [w.palette.divider]), A = Le(), Ce = M(null), we = M(0), Ee = M(null), Oe = M(/* @__PURE__ */ new Set()), Ie = M(!1), Re = M(null), [ze, Be] = Me(), Ve = M(null), He = M(null), Ue = M(null);
|
|
3584
3603
|
m(E, (e) => JSON.stringify(e.filters.map((e) => e.filterValue))), m(E, b((e) => e.sortByField)), m(E, b((e) => e.sortDirection));
|
|
3585
3604
|
let We = j((e, t) => {
|
|
3586
3605
|
if (s) {
|
|
@@ -3591,11 +3610,11 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3591
3610
|
}), t.preventDefault(), t.stopPropagation(), s(e);
|
|
3592
3611
|
}
|
|
3593
3612
|
}, [n, s]), Ge = j(() => fe?.current?.filter((e) => e.isVisible) ?? [], []), Ke = j(() => {
|
|
3594
|
-
if (!fe?.current?.length || !
|
|
3595
|
-
let e = (0, dt.default)(Ge(), (e) => e.calculatedWidth), t =
|
|
3596
|
-
|
|
3597
|
-
}, [
|
|
3598
|
-
|
|
3613
|
+
if (!fe?.current?.length || !ze) return;
|
|
3614
|
+
let e = (0, dt.default)(Ge(), (e) => e.calculatedWidth), t = ze.querySelector("[role=table]");
|
|
3615
|
+
we.current = e, t && (t.style.width = `${e}px`);
|
|
3616
|
+
}, [ze, Ge]);
|
|
3617
|
+
Ae(() => {
|
|
3599
3618
|
Ke();
|
|
3600
3619
|
}, [Ke]);
|
|
3601
3620
|
let qe = j((e, t) => /* @__PURE__ */ N(Ka, {
|
|
@@ -3604,7 +3623,7 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3604
3623
|
onReadableIndexClick: o,
|
|
3605
3624
|
tableColumn: e
|
|
3606
3625
|
}, t.id), [n, o]), Je = j((e) => /* @__PURE__ */ N(Ga, { tableColumnParams: e }), []);
|
|
3607
|
-
|
|
3626
|
+
De(() => {
|
|
3608
3627
|
He.current = null;
|
|
3609
3628
|
}, [D]);
|
|
3610
3629
|
let Ye = j((e, t) => {
|
|
@@ -3629,31 +3648,31 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3629
3648
|
tableColumn: e
|
|
3630
3649
|
}, n);
|
|
3631
3650
|
}, [re, Ye]), Ze = j(() => {
|
|
3632
|
-
if (!
|
|
3633
|
-
let e = u.updateColumnSizesInVisualSettings(
|
|
3634
|
-
me && (
|
|
3651
|
+
if (!ae.length || !ze) return;
|
|
3652
|
+
let e = u.updateColumnSizesInVisualSettings(ze, A, D, ae, fe.current);
|
|
3653
|
+
me && (ze.querySelectorAll("[data-column-index]").forEach((t) => {
|
|
3635
3654
|
let n = t.getAttribute("data-id");
|
|
3636
3655
|
t.style.width = `${e.get(n).calculatedWidth}px`;
|
|
3637
3656
|
}), Ke());
|
|
3638
3657
|
}, [
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3658
|
+
ae,
|
|
3659
|
+
ze,
|
|
3660
|
+
A,
|
|
3642
3661
|
D,
|
|
3643
3662
|
me,
|
|
3644
3663
|
Ke
|
|
3645
3664
|
]);
|
|
3646
|
-
|
|
3647
|
-
!
|
|
3665
|
+
De(() => {
|
|
3666
|
+
!ze || me || !oe || (fe.current = E.getState().getCurrentColumnVisualSettings(), Ze(), Ke(), he(!0));
|
|
3648
3667
|
}, [
|
|
3649
|
-
|
|
3668
|
+
ze,
|
|
3650
3669
|
me,
|
|
3651
|
-
|
|
3670
|
+
oe,
|
|
3652
3671
|
E,
|
|
3653
3672
|
Ze,
|
|
3654
3673
|
Ke
|
|
3655
3674
|
]);
|
|
3656
|
-
let Qe = j(() =>
|
|
3675
|
+
let Qe = j(() => ze?.querySelector("[data-virtuoso-scroller=true]"), [ze]), $e = j(() => {
|
|
3657
3676
|
ne(fe.current);
|
|
3658
3677
|
}, [ne]), et = ya(() => {
|
|
3659
3678
|
$e();
|
|
@@ -3678,19 +3697,19 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3678
3697
|
document.removeEventListener("mousemove", a), document.removeEventListener("mouseup", o);
|
|
3679
3698
|
};
|
|
3680
3699
|
}, [tt]);
|
|
3681
|
-
|
|
3700
|
+
De(() => () => {
|
|
3682
3701
|
pe.current();
|
|
3683
3702
|
}, []);
|
|
3684
|
-
let it = j((e, t) => u.handleMoveColumn(de, fe.current,
|
|
3685
|
-
|
|
3703
|
+
let it = j((e, t) => u.handleMoveColumn(de, fe.current, ae, e, t), [de, ae]), at = j(() => {
|
|
3704
|
+
ze.querySelectorAll("[data-column-index]").forEach((e) => {
|
|
3686
3705
|
let t = e.getAttribute("data-id");
|
|
3687
3706
|
e.style.order = fe.current.findIndex((e) => e.id === t).toString();
|
|
3688
3707
|
});
|
|
3689
|
-
}, [
|
|
3690
|
-
|
|
3708
|
+
}, [ze]);
|
|
3709
|
+
De(() => {
|
|
3691
3710
|
let e = () => {
|
|
3692
3711
|
Ze(), at();
|
|
3693
|
-
}, t =
|
|
3712
|
+
}, t = ie.getInstance();
|
|
3694
3713
|
return t.window.addEventListener("resize", e), () => {
|
|
3695
3714
|
t.window.removeEventListener("resize", e);
|
|
3696
3715
|
};
|
|
@@ -3704,7 +3723,7 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3704
3723
|
};
|
|
3705
3724
|
}, [Ge]), st = j((e, t) => {
|
|
3706
3725
|
let n = ot(t);
|
|
3707
|
-
if (e.type === "start" && (
|
|
3726
|
+
if (e.type === "start" && (ie.getInstance().body.style.setProperty("overflow", "hidden"), ze?.style.setProperty("--selection-background", "none"), e.target.style.setProperty("opacity", "0.3"), Ue.current = {
|
|
3708
3727
|
clonedElement: e.target.cloneNode(!0),
|
|
3709
3728
|
elementOffsetX: n.widths.slice(0, n.elementIndex).reduce((e, t) => e + t, 0) - 15,
|
|
3710
3729
|
scrollPosition: Qe().scrollLeft
|
|
@@ -3717,39 +3736,39 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3717
3736
|
pointer-events: none;
|
|
3718
3737
|
filter: blur(0.5px);
|
|
3719
3738
|
box-shadow: 1px 2px 3px 0px rgba(0,0,0,0.5);
|
|
3720
|
-
`,
|
|
3739
|
+
`, ie.getInstance().body.appendChild(Ue.current.clonedElement)), e.type === "end" && (ie.getInstance().body.style.removeProperty("overflow"), ze?.style.setProperty("--selection-background", "highlight"), ie.getInstance().document.getSelection().empty(), Ue.current.clonedElement.remove(), e.target.style.setProperty("opacity", "1")), e.type === "move") {
|
|
3721
3740
|
Ue.current.clonedElement.style.setProperty("left", `${e.clientX - e.elementOffsetX}px`), Ue.current.clonedElement.style.setProperty("top", `${e.clientY}px`);
|
|
3722
3741
|
let r = Ue.current.elementOffsetX + e.deltaX + e.elementOffsetX + (Qe().scrollLeft - Ue.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);
|
|
3723
3742
|
(r < i && it(t, -1) || r > a && it(t, 1)) && (at(), ot(t));
|
|
3724
3743
|
}
|
|
3725
3744
|
}, [
|
|
3726
3745
|
ot,
|
|
3727
|
-
|
|
3746
|
+
ze?.style,
|
|
3728
3747
|
Qe,
|
|
3729
3748
|
it,
|
|
3730
3749
|
w.zIndex.modal,
|
|
3731
3750
|
at
|
|
3732
|
-
]), ct = j(() => /* @__PURE__ */ N(
|
|
3751
|
+
]), ct = j(() => /* @__PURE__ */ N(O, {
|
|
3733
3752
|
"aria-rowindex": 1,
|
|
3734
3753
|
role: "row",
|
|
3735
3754
|
sx: {
|
|
3736
3755
|
[`&:hover .${Oa.columnDivider}`]: { opacity: 1 },
|
|
3737
3756
|
background: w.palette.background.paper,
|
|
3738
|
-
borderBottom: `1px solid ${
|
|
3757
|
+
borderBottom: `1px solid ${xe}`,
|
|
3739
3758
|
display: "flex",
|
|
3740
3759
|
fontWeight: "bold",
|
|
3741
3760
|
height: w.spacing(r),
|
|
3742
3761
|
zIndex: 3
|
|
3743
3762
|
},
|
|
3744
3763
|
children: Ge().map((e, t) => {
|
|
3745
|
-
let n =
|
|
3764
|
+
let n = ae.find((t) => t.id === e.id);
|
|
3746
3765
|
return n ? /* @__PURE__ */ N(Pa, {
|
|
3747
3766
|
column: n.type === "selectable" ? {
|
|
3748
3767
|
...n,
|
|
3749
3768
|
renderHeaderContent: Je
|
|
3750
3769
|
} : n,
|
|
3751
3770
|
columnIndex: t,
|
|
3752
|
-
dividerColor:
|
|
3771
|
+
dividerColor: xe,
|
|
3753
3772
|
height: w.spacing(r),
|
|
3754
3773
|
onColumnDividerKeyDown: nt,
|
|
3755
3774
|
onColumnDividerMouseDown: rt,
|
|
@@ -3763,31 +3782,31 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3763
3782
|
}), [
|
|
3764
3783
|
w,
|
|
3765
3784
|
r,
|
|
3766
|
-
|
|
3785
|
+
xe,
|
|
3767
3786
|
Ge,
|
|
3768
|
-
|
|
3787
|
+
ae,
|
|
3769
3788
|
Je,
|
|
3770
3789
|
rt,
|
|
3771
3790
|
nt,
|
|
3772
3791
|
st
|
|
3773
|
-
]), lt = j((e, t) => /* @__PURE__ */ N(
|
|
3774
|
-
let i =
|
|
3792
|
+
]), lt = j((e, t) => /* @__PURE__ */ N(Ne, { children: Ge().map((n, r) => {
|
|
3793
|
+
let i = ae.find((e) => e.id === n.id), a;
|
|
3775
3794
|
if (i.cellTitleGetter) a = i.cellTitleGetter({
|
|
3776
3795
|
column: i,
|
|
3777
|
-
dataContext:
|
|
3796
|
+
dataContext: k,
|
|
3778
3797
|
id: n.id,
|
|
3779
3798
|
row: t,
|
|
3780
3799
|
rowIndex: e
|
|
3781
3800
|
});
|
|
3782
3801
|
else if (i.type === "text") a = u.getTableTextCellValue({
|
|
3783
3802
|
column: i,
|
|
3784
|
-
dataContext:
|
|
3803
|
+
dataContext: k,
|
|
3785
3804
|
row: t,
|
|
3786
3805
|
rowIndex: e
|
|
3787
3806
|
});
|
|
3788
3807
|
else if (i.type === "boolean") a = u.getTableBooleanCellDisplayValue({
|
|
3789
3808
|
column: i,
|
|
3790
|
-
dataContext:
|
|
3809
|
+
dataContext: k,
|
|
3791
3810
|
row: t,
|
|
3792
3811
|
rowIndex: e,
|
|
3793
3812
|
t: T
|
|
@@ -3795,32 +3814,32 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3795
3814
|
else if (i.type === "number") {
|
|
3796
3815
|
let n = u.getTableNumberCellValue({
|
|
3797
3816
|
column: i,
|
|
3798
|
-
dataContext:
|
|
3817
|
+
dataContext: k,
|
|
3799
3818
|
row: t,
|
|
3800
3819
|
rowIndex: e
|
|
3801
3820
|
});
|
|
3802
3821
|
a = (0, ft.default)(n) ? n.toString() : "";
|
|
3803
3822
|
} else i.type === "date" ? a = u.getTableDateCellValue({
|
|
3804
3823
|
column: i,
|
|
3805
|
-
dataContext:
|
|
3824
|
+
dataContext: k,
|
|
3806
3825
|
row: t,
|
|
3807
3826
|
rowIndex: e
|
|
3808
3827
|
}) : i.type === "options" && (a = u.getTableOptionsCellDisplayValue({
|
|
3809
3828
|
column: i,
|
|
3810
|
-
dataContext:
|
|
3829
|
+
dataContext: k,
|
|
3811
3830
|
row: t,
|
|
3812
3831
|
rowIndex: e
|
|
3813
3832
|
}));
|
|
3814
3833
|
let o = {
|
|
3815
3834
|
backgroundColor: le && i.cellColorGetter ? i.cellColorGetter({
|
|
3816
3835
|
column: i,
|
|
3817
|
-
dataContext:
|
|
3836
|
+
dataContext: k,
|
|
3818
3837
|
id: n.id,
|
|
3819
3838
|
row: t,
|
|
3820
3839
|
rowIndex: e
|
|
3821
3840
|
}) : void 0,
|
|
3822
3841
|
columnIndex: r,
|
|
3823
|
-
enabled: !
|
|
3842
|
+
enabled: !se || se(t, k),
|
|
3824
3843
|
height: w.spacing(x),
|
|
3825
3844
|
onClick: We,
|
|
3826
3845
|
order: fe.current.findIndex((e) => e.id === n.id),
|
|
@@ -3838,59 +3857,59 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3838
3857
|
...o,
|
|
3839
3858
|
column: i,
|
|
3840
3859
|
children: [
|
|
3841
|
-
!!i.renderCell && /* @__PURE__ */ N(
|
|
3860
|
+
!!i.renderCell && /* @__PURE__ */ N(Se, { children: i.renderCell({
|
|
3842
3861
|
column: i,
|
|
3843
|
-
dataContext:
|
|
3862
|
+
dataContext: k,
|
|
3844
3863
|
id: n.id,
|
|
3845
3864
|
row: t,
|
|
3846
3865
|
rowIndex: e
|
|
3847
3866
|
}) }, i.id),
|
|
3848
|
-
!i.renderCell && !!i.displayValueGetter && /* @__PURE__ */ N(
|
|
3867
|
+
!i.renderCell && !!i.displayValueGetter && /* @__PURE__ */ N(Se, { children: /* @__PURE__ */ N(ba, { content: i.displayValueGetter({
|
|
3849
3868
|
column: i,
|
|
3850
|
-
dataContext:
|
|
3869
|
+
dataContext: k,
|
|
3851
3870
|
id: n.id,
|
|
3852
3871
|
row: t,
|
|
3853
3872
|
rowIndex: e
|
|
3854
3873
|
}) }) }, i.id),
|
|
3855
3874
|
!i.displayValueGetter && !i.renderCell && i.type === "text" && u.getTableTextCellValue({
|
|
3856
3875
|
column: i,
|
|
3857
|
-
dataContext:
|
|
3876
|
+
dataContext: k,
|
|
3858
3877
|
row: t,
|
|
3859
3878
|
rowIndex: e
|
|
3860
3879
|
}),
|
|
3861
3880
|
!i.displayValueGetter && !i.renderCell && i.type === "boolean" && u.getTableBooleanCellDisplayValue({
|
|
3862
3881
|
column: i,
|
|
3863
|
-
dataContext:
|
|
3882
|
+
dataContext: k,
|
|
3864
3883
|
row: t,
|
|
3865
3884
|
rowIndex: e,
|
|
3866
3885
|
t: T
|
|
3867
3886
|
}),
|
|
3868
3887
|
!i.displayValueGetter && !i.renderCell && i.type === "number" && u.getTableNumberCellValue({
|
|
3869
3888
|
column: i,
|
|
3870
|
-
dataContext:
|
|
3889
|
+
dataContext: k,
|
|
3871
3890
|
row: t,
|
|
3872
3891
|
rowIndex: e
|
|
3873
3892
|
}),
|
|
3874
3893
|
!i.displayValueGetter && !i.renderCell && i.type === "date" && u.getTableDateCellValue({
|
|
3875
3894
|
column: i,
|
|
3876
|
-
dataContext:
|
|
3895
|
+
dataContext: k,
|
|
3877
3896
|
row: t,
|
|
3878
3897
|
rowIndex: e
|
|
3879
3898
|
}),
|
|
3880
3899
|
!i.displayValueGetter && !i.renderCell && i.type === "options" && u.getTableOptionsCellDisplayValue({
|
|
3881
3900
|
column: i,
|
|
3882
|
-
dataContext:
|
|
3901
|
+
dataContext: k,
|
|
3883
3902
|
row: t,
|
|
3884
3903
|
rowIndex: e
|
|
3885
3904
|
}),
|
|
3886
3905
|
!i.displayValueGetter && !i.renderCell && i.type === "readableIndex" && qe(i, {
|
|
3887
|
-
dataContext:
|
|
3906
|
+
dataContext: k,
|
|
3888
3907
|
id: n.id,
|
|
3889
3908
|
row: t,
|
|
3890
3909
|
rowIndex: e
|
|
3891
3910
|
}),
|
|
3892
3911
|
!i.displayValueGetter && !i.renderCell && i.type === "selectable" && Xe(i, {
|
|
3893
|
-
dataContext:
|
|
3912
|
+
dataContext: k,
|
|
3894
3913
|
id: n.id,
|
|
3895
3914
|
row: t,
|
|
3896
3915
|
rowIndex: e
|
|
@@ -3899,30 +3918,30 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3899
3918
|
}, n.id);
|
|
3900
3919
|
}) }), [
|
|
3901
3920
|
Ge,
|
|
3902
|
-
|
|
3921
|
+
se,
|
|
3903
3922
|
We,
|
|
3904
3923
|
Xe,
|
|
3905
3924
|
qe,
|
|
3906
3925
|
x,
|
|
3907
3926
|
T,
|
|
3908
|
-
|
|
3927
|
+
ae,
|
|
3909
3928
|
w,
|
|
3910
|
-
|
|
3929
|
+
k,
|
|
3911
3930
|
le
|
|
3912
3931
|
]), ut = j((e) => {
|
|
3913
3932
|
c(e);
|
|
3914
3933
|
}, [c]), ht = j((e) => {
|
|
3915
3934
|
l(e);
|
|
3916
3935
|
}, [l]);
|
|
3917
|
-
|
|
3936
|
+
De(() => {
|
|
3918
3937
|
if (!S) return mt.default;
|
|
3919
3938
|
let e = S.subscribe((e, t) => {
|
|
3920
3939
|
t.forEach((e) => {
|
|
3921
|
-
|
|
3940
|
+
ze.querySelectorAll(`[data-testid=virtuoso-item-list] [data-id='${e}']`).forEach((e) => {
|
|
3922
3941
|
e.classList.remove("highlighted");
|
|
3923
3942
|
});
|
|
3924
3943
|
}), e.forEach((e) => {
|
|
3925
|
-
|
|
3944
|
+
ze.querySelectorAll(`[data-testid=virtuoso-item-list] [data-id='${e}']`).forEach((e) => {
|
|
3926
3945
|
e.classList.add("highlighted");
|
|
3927
3946
|
});
|
|
3928
3947
|
});
|
|
@@ -3932,38 +3951,38 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3932
3951
|
};
|
|
3933
3952
|
}, [
|
|
3934
3953
|
S,
|
|
3935
|
-
|
|
3954
|
+
ze,
|
|
3936
3955
|
w.palette.action.hover,
|
|
3937
3956
|
w.palette.background.paper
|
|
3938
|
-
]),
|
|
3957
|
+
]), De(() => {
|
|
3939
3958
|
let e = () => {
|
|
3940
3959
|
Ze(), at(), Ke(), $e();
|
|
3941
3960
|
}, t = [
|
|
3942
|
-
|
|
3961
|
+
ce("condensedChange", (t) => {
|
|
3943
3962
|
E.getState().setIsCondensed(t), fe.current = E.getState().getCurrentColumnVisualSettings(), e();
|
|
3944
3963
|
}),
|
|
3945
|
-
|
|
3964
|
+
ce("reset", () => {
|
|
3946
3965
|
E.getState().resetColumns(), fe.current = E.getState().getCurrentColumnVisualSettings(), e();
|
|
3947
3966
|
}),
|
|
3948
|
-
|
|
3967
|
+
ce("columnVisibilityChange", (t) => {
|
|
3949
3968
|
fe.current.forEach((e) => {
|
|
3950
3969
|
e.isVisible = t.includes(e.id);
|
|
3951
3970
|
}), e();
|
|
3952
3971
|
}),
|
|
3953
|
-
|
|
3972
|
+
ce("columnOrderChange", (t) => {
|
|
3954
3973
|
fe.current.sort((e, n) => t.indexOf(e.id) - t.indexOf(n.id)), e();
|
|
3955
3974
|
}),
|
|
3956
|
-
|
|
3957
|
-
|
|
3975
|
+
ce("openColumnsEditorDialog", (e) => {
|
|
3976
|
+
Ve.current.open({ hasCellData: e });
|
|
3958
3977
|
})
|
|
3959
3978
|
];
|
|
3960
3979
|
return () => {
|
|
3961
3980
|
t.forEach((e) => e());
|
|
3962
3981
|
};
|
|
3963
3982
|
}, [
|
|
3964
|
-
|
|
3983
|
+
ce,
|
|
3965
3984
|
$e,
|
|
3966
|
-
|
|
3985
|
+
ae,
|
|
3967
3986
|
E,
|
|
3968
3987
|
at,
|
|
3969
3988
|
Ze,
|
|
@@ -3971,7 +3990,7 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3971
3990
|
]);
|
|
3972
3991
|
let gt = j(() => {
|
|
3973
3992
|
let e = Qe();
|
|
3974
|
-
if (e && d && d(e.scrollTop),
|
|
3993
|
+
if (e && d && d(e.scrollTop), Ce.current && f) {
|
|
3975
3994
|
let t = e.scrollTop, n = +w.spacing(x).replace("px", "");
|
|
3976
3995
|
f(Math.floor(t / n));
|
|
3977
3996
|
}
|
|
@@ -3985,32 +4004,32 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3985
4004
|
let t = Qe();
|
|
3986
4005
|
t && (t.scrollTop = e);
|
|
3987
4006
|
}, [Qe]), yt = j(() => {
|
|
3988
|
-
let e =
|
|
3989
|
-
!e ||
|
|
4007
|
+
let e = Re.current;
|
|
4008
|
+
!e || Ie.current || !e.hasRendered || (Re.current = null, e.onScrolledToIndex());
|
|
3990
4009
|
}, []), bt = j((e, t) => {
|
|
3991
|
-
|
|
3992
|
-
hasRendered:
|
|
4010
|
+
Re.current = t ? {
|
|
4011
|
+
hasRendered: Oe.current.has(e),
|
|
3993
4012
|
index: e,
|
|
3994
4013
|
onScrolledToIndex: t
|
|
3995
|
-
} : null,
|
|
4014
|
+
} : null, Ce.current?.scrollToIndex(e), yt();
|
|
3996
4015
|
}, [yt]);
|
|
3997
|
-
|
|
4016
|
+
ke(y, () => ({
|
|
3998
4017
|
scrollToIndex: bt,
|
|
3999
4018
|
setVerticalScrollPosition: vt
|
|
4000
4019
|
}));
|
|
4001
4020
|
let xt = j((e) => {
|
|
4002
|
-
|
|
4021
|
+
Ee.current = e, a(e);
|
|
4003
4022
|
}, [a]), St = j((e) => {
|
|
4004
|
-
|
|
4005
|
-
let t =
|
|
4006
|
-
t &&
|
|
4023
|
+
Oe.current = new Set(e.map((e) => e.index));
|
|
4024
|
+
let t = Re.current;
|
|
4025
|
+
t && Oe.current.has(t.index) && (t.hasRendered = !0), yt();
|
|
4007
4026
|
}, [yt]), Ct = j((e) => {
|
|
4008
|
-
|
|
4027
|
+
Ie.current = e, yt();
|
|
4009
4028
|
}, [yt]);
|
|
4010
|
-
return
|
|
4011
|
-
|
|
4012
|
-
}, [a, D]), /* @__PURE__ */ P(
|
|
4013
|
-
ref:
|
|
4029
|
+
return De(() => {
|
|
4030
|
+
Ee.current && a(Ee.current);
|
|
4031
|
+
}, [a, D]), /* @__PURE__ */ P(O, {
|
|
4032
|
+
ref: Be,
|
|
4014
4033
|
style: { "--selection-background": "highlight" },
|
|
4015
4034
|
sx: {
|
|
4016
4035
|
"*::selection": { backgroundColor: "var(--selection-background) !important" },
|
|
@@ -4020,17 +4039,17 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
4020
4039
|
...C
|
|
4021
4040
|
},
|
|
4022
4041
|
children: [me && /* @__PURE__ */ N(Gi, {
|
|
4023
|
-
...
|
|
4042
|
+
...Fe.createAttributes("Table"),
|
|
4024
4043
|
components: {
|
|
4025
|
-
EmptyPlaceholder:
|
|
4044
|
+
EmptyPlaceholder: Te((e, t) => /* @__PURE__ */ N(O, {
|
|
4026
4045
|
...e,
|
|
4027
4046
|
ref: t
|
|
4028
4047
|
})),
|
|
4029
|
-
FillerRow:
|
|
4048
|
+
FillerRow: Te((e, t) => /* @__PURE__ */ N(O, {
|
|
4030
4049
|
ref: t,
|
|
4031
4050
|
style: { height: e.height }
|
|
4032
4051
|
})),
|
|
4033
|
-
Table:
|
|
4052
|
+
Table: Te((e, t) => /* @__PURE__ */ N(O, {
|
|
4034
4053
|
...e,
|
|
4035
4054
|
"data-row-count": D.length,
|
|
4036
4055
|
ref: t,
|
|
@@ -4038,21 +4057,21 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
4038
4057
|
sx: {
|
|
4039
4058
|
minWidth: "100%",
|
|
4040
4059
|
position: "relative",
|
|
4041
|
-
width:
|
|
4060
|
+
width: we.current
|
|
4042
4061
|
}
|
|
4043
4062
|
})),
|
|
4044
|
-
TableBody:
|
|
4063
|
+
TableBody: Te((t, n) => /* @__PURE__ */ N(O, {
|
|
4045
4064
|
...t,
|
|
4046
4065
|
ref: n,
|
|
4047
4066
|
sx: { font: e }
|
|
4048
4067
|
})),
|
|
4049
|
-
TableHead:
|
|
4068
|
+
TableHead: Te((e, t) => /* @__PURE__ */ N(O, {
|
|
4050
4069
|
...e,
|
|
4051
4070
|
ref: t
|
|
4052
4071
|
})),
|
|
4053
|
-
TableRow:
|
|
4054
|
-
let n = !
|
|
4055
|
-
return /* @__PURE__ */ N(
|
|
4072
|
+
TableRow: Te((e, t) => {
|
|
4073
|
+
let n = !se || se(e.item, k);
|
|
4074
|
+
return /* @__PURE__ */ N(O, {
|
|
4056
4075
|
"data-id": re(e.item),
|
|
4057
4076
|
onMouseEnter: () => ut(e.item),
|
|
4058
4077
|
onMouseLeave: () => ht(e.item),
|
|
@@ -4069,7 +4088,7 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
4069
4088
|
backgroundColor: w.palette.grey[100],
|
|
4070
4089
|
color: `${w.palette.text.primary} !important`
|
|
4071
4090
|
},
|
|
4072
|
-
borderBottom: `1px solid ${
|
|
4091
|
+
borderBottom: `1px solid ${ye}`,
|
|
4073
4092
|
color: n ? void 0 : "text.disabled",
|
|
4074
4093
|
cursor: n && s ? "pointer" : void 0,
|
|
4075
4094
|
display: "flex",
|
|
@@ -4093,20 +4112,20 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
4093
4112
|
reverse: v ?? te
|
|
4094
4113
|
},
|
|
4095
4114
|
rangeChanged: xt,
|
|
4096
|
-
ref:
|
|
4115
|
+
ref: Ce,
|
|
4097
4116
|
style: {
|
|
4098
4117
|
height: "100%",
|
|
4099
4118
|
overflowX: t ? "scroll" : "auto"
|
|
4100
4119
|
},
|
|
4101
4120
|
totalCount: D.length
|
|
4102
|
-
}), /* @__PURE__ */ N(Ha, { ref:
|
|
4121
|
+
}), /* @__PURE__ */ N(Ha, { ref: Ve })]
|
|
4103
4122
|
});
|
|
4104
4123
|
}, Ja = ({ caption: e, component: t = "h2", variant: n = "h2" }) => {
|
|
4105
|
-
let { t: r } =
|
|
4106
|
-
return /* @__PURE__ */ N(
|
|
4124
|
+
let { t: r } = Pe(), i = h(), a = m(i, (e) => e.baseData.length), o = m(i, b((e) => e.sortedData.length));
|
|
4125
|
+
return /* @__PURE__ */ N(he, {
|
|
4107
4126
|
component: t,
|
|
4108
4127
|
variant: n,
|
|
4109
|
-
children: /* @__PURE__ */ P(
|
|
4128
|
+
children: /* @__PURE__ */ P(Ne, { children: [
|
|
4110
4129
|
o === 0 && (e ?? r("Items")),
|
|
4111
4130
|
o > 0 && o === a && r("{{items}} ({{count}})", {
|
|
4112
4131
|
count: o,
|
|
@@ -4121,7 +4140,7 @@ var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
4121
4140
|
] })
|
|
4122
4141
|
});
|
|
4123
4142
|
}, Ya = /* @__PURE__ */ t(((e, t) => {
|
|
4124
|
-
t.exports = { ...
|
|
4143
|
+
t.exports = { ...xe };
|
|
4125
4144
|
})), Xa = /* @__PURE__ */ t(((e) => {
|
|
4126
4145
|
var t = Ya();
|
|
4127
4146
|
function n(e, t) {
|
|
@@ -4309,8 +4328,8 @@ function ro(e, t = no, n) {
|
|
|
4309
4328
|
}
|
|
4310
4329
|
//#endregion
|
|
4311
4330
|
//#region src/components/ui/Table/TableFiltersSidebarItem.tsx
|
|
4312
|
-
var io =
|
|
4313
|
-
let r = ro(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 } =
|
|
4331
|
+
var io = Be, ao = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFilterWithinDimension: n }) => {
|
|
4332
|
+
let r = ro(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 } = Ue(), o = je(() => {
|
|
4314
4333
|
if (e.allowOnlyPreferredFilter || e.filterIds.length === 1) return [i.find((t) => t?.id && t.id === e.preferredFilterId)].filter((e) => !!e);
|
|
4315
4334
|
if (!e.allowMultipleVisibleFilters) {
|
|
4316
4335
|
let t = n ?? e.preferredFilterId;
|
|
@@ -4324,11 +4343,11 @@ var io = We, ao = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
|
|
|
4324
4343
|
e.filterIds.length,
|
|
4325
4344
|
e.preferredFilterId,
|
|
4326
4345
|
n
|
|
4327
|
-
]), s =
|
|
4346
|
+
]), s = je(() => i.length > 1 && !e.allowOnlyPreferredFilter && !e.allowMultipleVisibleFilters, [
|
|
4328
4347
|
i.length,
|
|
4329
4348
|
e.allowMultipleVisibleFilters,
|
|
4330
4349
|
e.allowOnlyPreferredFilter
|
|
4331
|
-
]), c =
|
|
4350
|
+
]), c = je(() => !(i.length === 1 || e.allowOnlyPreferredFilter), [i.length, e.allowOnlyPreferredFilter]), l = je(() => s ? {
|
|
4332
4351
|
items: i.map((n) => ({
|
|
4333
4352
|
active: n === o[0],
|
|
4334
4353
|
callback: () => {
|
|
@@ -4349,23 +4368,23 @@ var io = We, ao = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
|
|
|
4349
4368
|
t,
|
|
4350
4369
|
s
|
|
4351
4370
|
]);
|
|
4352
|
-
return o.length ? /* @__PURE__ */ P(
|
|
4371
|
+
return o.length ? /* @__PURE__ */ P(O, {
|
|
4353
4372
|
sx: { mb: 2 },
|
|
4354
4373
|
children: [
|
|
4355
|
-
c && /* @__PURE__ */ P(
|
|
4374
|
+
c && /* @__PURE__ */ P(O, {
|
|
4356
4375
|
sx: {
|
|
4357
4376
|
alignItems: "center",
|
|
4358
4377
|
display: "flex",
|
|
4359
4378
|
justifyContent: "space-between"
|
|
4360
4379
|
},
|
|
4361
|
-
children: [/* @__PURE__ */ N(
|
|
4380
|
+
children: [/* @__PURE__ */ N(O, { children: /* @__PURE__ */ N(he, {
|
|
4362
4381
|
sx: {
|
|
4363
4382
|
margin: 0,
|
|
4364
4383
|
padding: 0
|
|
4365
4384
|
},
|
|
4366
4385
|
variant: "h6",
|
|
4367
4386
|
children: e.label
|
|
4368
|
-
}) }), s && /* @__PURE__ */ N(
|
|
4387
|
+
}) }), s && /* @__PURE__ */ N(O, { children: /* @__PURE__ */ N(ut, {
|
|
4369
4388
|
ButtonProps: {
|
|
4370
4389
|
color: "inherit",
|
|
4371
4390
|
size: "small",
|
|
@@ -4381,15 +4400,15 @@ var io = We, ao = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
|
|
|
4381
4400
|
menuItemsData: l
|
|
4382
4401
|
}) })]
|
|
4383
4402
|
}),
|
|
4384
|
-
o.map((e) => /* @__PURE__ */ N(
|
|
4403
|
+
o.map((e) => /* @__PURE__ */ N(O, {
|
|
4385
4404
|
sx: { my: 1 },
|
|
4386
4405
|
children: /* @__PURE__ */ N(wa, { filter: e })
|
|
4387
4406
|
}, e.id)),
|
|
4388
|
-
/* @__PURE__ */ N(
|
|
4407
|
+
/* @__PURE__ */ N(ce, {})
|
|
4389
4408
|
]
|
|
4390
4409
|
}, e.id) : null;
|
|
4391
4410
|
}, oo = ({ onClose: e }) => {
|
|
4392
|
-
let { t } =
|
|
4411
|
+
let { t } = Pe(), n = h(), r = m(n, (e) => e.setFilterValues), i = m(n, (e) => e.filterDimensions), a = ro(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] = Me(c), f = je(() => Object.fromEntries(a.map((e) => [e.id, e.initialFilterValue])), [a]), p = je(() => Object.fromEntries(a.map((e) => [e.id, e.filterValue ?? e.initialFilterValue])), [a]), g = He({
|
|
4393
4412
|
defaultValues: f,
|
|
4394
4413
|
values: p
|
|
4395
4414
|
}), _ = j((e, t) => {
|
|
@@ -4397,10 +4416,10 @@ var io = We, ao = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
|
|
|
4397
4416
|
...n,
|
|
4398
4417
|
[e]: t
|
|
4399
4418
|
}));
|
|
4400
|
-
}, []), { control: v, formState: { isDirty: y }, handleSubmit: b, reset: x, setValue:
|
|
4419
|
+
}, []), { control: v, formState: { isDirty: y }, handleSubmit: b, reset: x, setValue: S } = g, C = We({
|
|
4401
4420
|
control: v,
|
|
4402
4421
|
defaultValue: p
|
|
4403
|
-
}),
|
|
4422
|
+
}), w = je(() => Object.entries(C).some(([e, t]) => !a.find((t) => t.id === e).isInitialFilterValue(t)), [a, C]), T = j(async (t) => {
|
|
4404
4423
|
await r(t), x(t), l(u), e();
|
|
4405
4424
|
}, [
|
|
4406
4425
|
u,
|
|
@@ -4408,7 +4427,7 @@ var io = We, ao = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
|
|
|
4408
4427
|
x,
|
|
4409
4428
|
r,
|
|
4410
4429
|
l
|
|
4411
|
-
]),
|
|
4430
|
+
]), E = j(async () => {
|
|
4412
4431
|
x(f), await s(), l(u), e();
|
|
4413
4432
|
}, [
|
|
4414
4433
|
f,
|
|
@@ -4417,61 +4436,61 @@ var io = We, ao = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
|
|
|
4417
4436
|
x,
|
|
4418
4437
|
s,
|
|
4419
4438
|
l
|
|
4420
|
-
]),
|
|
4439
|
+
]), ee = j((e) => {
|
|
4421
4440
|
let t = a.find((t) => t.id === e);
|
|
4422
|
-
|
|
4423
|
-
}, [a,
|
|
4424
|
-
return /* @__PURE__ */ N(
|
|
4441
|
+
S(e, t.initialFilterValue, { shouldDirty: !0 });
|
|
4442
|
+
}, [a, S]), te = je(() => a.filter((e) => e.showInSidebar), [a]);
|
|
4443
|
+
return /* @__PURE__ */ N(Ne, { children: !!a && !!p && !!f && /* @__PURE__ */ N(Ve, {
|
|
4425
4444
|
...g,
|
|
4426
|
-
children: /* @__PURE__ */ P(
|
|
4445
|
+
children: /* @__PURE__ */ P(O, {
|
|
4427
4446
|
autoComplete: "off",
|
|
4428
4447
|
component: "form",
|
|
4429
4448
|
id: "Filters",
|
|
4430
|
-
onSubmit: b(
|
|
4449
|
+
onSubmit: b(T),
|
|
4431
4450
|
sx: {
|
|
4432
4451
|
display: "grid",
|
|
4433
4452
|
gridTemplateRows: "max-content auto",
|
|
4434
4453
|
height: "100%"
|
|
4435
4454
|
},
|
|
4436
|
-
children: [/* @__PURE__ */ P(
|
|
4437
|
-
y && o && !
|
|
4455
|
+
children: [/* @__PURE__ */ P(O, { children: [
|
|
4456
|
+
y && o && !w && /* @__PURE__ */ N(O, {
|
|
4438
4457
|
sx: { my: 1 },
|
|
4439
4458
|
children: t`All filters have been removed, but have not yet been applied.`
|
|
4440
4459
|
}),
|
|
4441
|
-
/* @__PURE__ */ N(
|
|
4460
|
+
/* @__PURE__ */ N(O, { children: Object.entries(C).map(([e, n]) => {
|
|
4442
4461
|
let r = a.find((t) => t.id === e);
|
|
4443
|
-
return r.isInitialFilterValue(
|
|
4462
|
+
return r.isInitialFilterValue(C[e]) ? null : /* @__PURE__ */ P(O, {
|
|
4444
4463
|
sx: {
|
|
4445
4464
|
alignItems: "center",
|
|
4446
4465
|
display: "grid",
|
|
4447
4466
|
gap: 1,
|
|
4448
4467
|
gridTemplateColumns: "auto max-content"
|
|
4449
4468
|
},
|
|
4450
|
-
children: [/* @__PURE__ */ P(
|
|
4451
|
-
/* @__PURE__ */ N(
|
|
4469
|
+
children: [/* @__PURE__ */ P(O, { children: [
|
|
4470
|
+
/* @__PURE__ */ N(O, {
|
|
4452
4471
|
component: "span",
|
|
4453
4472
|
children: r.label
|
|
4454
4473
|
}),
|
|
4455
|
-
/* @__PURE__ */ N(
|
|
4474
|
+
/* @__PURE__ */ N(O, {
|
|
4456
4475
|
component: "span",
|
|
4457
4476
|
children: ": "
|
|
4458
4477
|
}),
|
|
4459
|
-
/* @__PURE__ */ N(
|
|
4478
|
+
/* @__PURE__ */ N(O, {
|
|
4460
4479
|
component: "strong",
|
|
4461
4480
|
children: r.getPresentationValue(n, t)
|
|
4462
4481
|
})
|
|
4463
|
-
] }), /* @__PURE__ */ N(
|
|
4482
|
+
] }), /* @__PURE__ */ N(ue, {
|
|
4464
4483
|
"aria-label": t("Remove filter with label {{filterLabel}} and value {{filterValue}}", {
|
|
4465
4484
|
filterLabel: r.label,
|
|
4466
4485
|
filterValue: r.getPresentationValue(n, t)
|
|
4467
4486
|
}),
|
|
4468
|
-
onClick: () =>
|
|
4487
|
+
onClick: () => ee(e),
|
|
4469
4488
|
size: "small",
|
|
4470
4489
|
children: /* @__PURE__ */ N(lt, {})
|
|
4471
4490
|
})]
|
|
4472
4491
|
}, e);
|
|
4473
4492
|
}) }),
|
|
4474
|
-
(o || y) && /* @__PURE__ */ P(
|
|
4493
|
+
(o || y) && /* @__PURE__ */ P(O, {
|
|
4475
4494
|
sx: {
|
|
4476
4495
|
display: "flex",
|
|
4477
4496
|
gap: 1,
|
|
@@ -4479,43 +4498,43 @@ var io = We, ao = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
|
|
|
4479
4498
|
marginRight: 1,
|
|
4480
4499
|
my: 1
|
|
4481
4500
|
},
|
|
4482
|
-
children: [/* @__PURE__ */ N(
|
|
4483
|
-
...
|
|
4501
|
+
children: [/* @__PURE__ */ N(oe, {
|
|
4502
|
+
...Fe.createAttributes("TableFiltersSidebarItem-reset"),
|
|
4484
4503
|
color: "primary",
|
|
4485
|
-
onClick:
|
|
4504
|
+
onClick: E,
|
|
4486
4505
|
startIcon: /* @__PURE__ */ N(ct, {}),
|
|
4487
4506
|
variant: "outlined",
|
|
4488
4507
|
children: t`Reset`
|
|
4489
|
-
}), /* @__PURE__ */ N(
|
|
4490
|
-
...
|
|
4508
|
+
}), /* @__PURE__ */ N(oe, {
|
|
4509
|
+
...Fe.createAttributes("TableFiltersSidebarItem-apply"),
|
|
4491
4510
|
color: "secondary",
|
|
4492
4511
|
startIcon: /* @__PURE__ */ N(st, {}),
|
|
4493
4512
|
type: "submit",
|
|
4494
4513
|
children: t`Apply`
|
|
4495
4514
|
})]
|
|
4496
4515
|
})
|
|
4497
|
-
] }), /* @__PURE__ */ P(
|
|
4516
|
+
] }), /* @__PURE__ */ P(O, {
|
|
4498
4517
|
sx: {
|
|
4499
4518
|
overflowY: "auto",
|
|
4500
4519
|
paddingRight: 1
|
|
4501
4520
|
},
|
|
4502
|
-
children: [i.length > 0 && /* @__PURE__ */ N(
|
|
4521
|
+
children: [i.length > 0 && /* @__PURE__ */ N(Ne, { children: i.filter((e) => e.filterIds.length).map((e) => /* @__PURE__ */ N(ao, {
|
|
4503
4522
|
filterDimension: e,
|
|
4504
4523
|
onFilterVisibilityChange: _,
|
|
4505
4524
|
visibleFilterWithinDimension: u[e.id]
|
|
4506
|
-
}, e.id)) }), i.length === 0 && /* @__PURE__ */ N(
|
|
4525
|
+
}, e.id)) }), i.length === 0 && /* @__PURE__ */ N(Ne, { children: te.map((e) => /* @__PURE__ */ P(O, {
|
|
4507
4526
|
sx: { my: 2 },
|
|
4508
|
-
children: [/* @__PURE__ */ N(
|
|
4527
|
+
children: [/* @__PURE__ */ N(O, {
|
|
4509
4528
|
sx: { my: 1 },
|
|
4510
4529
|
children: /* @__PURE__ */ N(wa, { filter: e })
|
|
4511
|
-
}), /* @__PURE__ */ N(
|
|
4530
|
+
}), /* @__PURE__ */ N(ce, {})]
|
|
4512
4531
|
}, e.id)) })]
|
|
4513
4532
|
})]
|
|
4514
4533
|
})
|
|
4515
4534
|
}) });
|
|
4516
4535
|
}, so = ({ onClose: e, open: t }) => {
|
|
4517
|
-
let { t: n } =
|
|
4518
|
-
return /* @__PURE__ */ N(
|
|
4536
|
+
let { t: n } = Pe();
|
|
4537
|
+
return /* @__PURE__ */ N(ne, {
|
|
4519
4538
|
closeIcon: /* @__PURE__ */ N(io, {}),
|
|
4520
4539
|
closeIconTooltipText: n`Close filters`,
|
|
4521
4540
|
onClose: e,
|
|
@@ -4537,31 +4556,31 @@ var io = We, ao = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
|
|
|
4537
4556
|
menuItemsData: t,
|
|
4538
4557
|
MenuProps: { elevation: 3 }
|
|
4539
4558
|
});
|
|
4540
|
-
}, lo = ({ header: e, headerComponent: t = "h3", headerVariant: n = "h5", showTableMenu: r = !0 }) => /* @__PURE__ */ P(
|
|
4559
|
+
}, lo = ({ header: e, headerComponent: t = "h3", headerVariant: n = "h5", showTableMenu: r = !0 }) => /* @__PURE__ */ P(O, {
|
|
4541
4560
|
sx: {
|
|
4542
4561
|
alignItems: "center",
|
|
4543
4562
|
display: "flex",
|
|
4544
4563
|
justifyContent: e ? "space-between" : "flex-end"
|
|
4545
4564
|
},
|
|
4546
|
-
children: [e && /* @__PURE__ */ N(
|
|
4565
|
+
children: [e && /* @__PURE__ */ N(O, { children: /* @__PURE__ */ N(Ja, {
|
|
4547
4566
|
caption: e,
|
|
4548
4567
|
component: t,
|
|
4549
4568
|
variant: n
|
|
4550
|
-
}) }), r && /* @__PURE__ */ N(
|
|
4569
|
+
}) }), r && /* @__PURE__ */ N(O, { children: /* @__PURE__ */ N(co, {}) })]
|
|
4551
4570
|
}), uo = ({ extraSidebarMenuItems: e }) => {
|
|
4552
|
-
let t = h(), n = m(t, (e) => e.filters.filter((e) => !e.isInitialFilterValue()).length), [r, i] =
|
|
4571
|
+
let t = h(), n = m(t, (e) => e.filters.filter((e) => !e.isInitialFilterValue()).length), [r, i] = Me(!1), a = j(() => {
|
|
4553
4572
|
i(!1);
|
|
4554
4573
|
}, []), o = j(() => {
|
|
4555
4574
|
i(!0);
|
|
4556
4575
|
}, []);
|
|
4557
|
-
return /* @__PURE__ */ P(
|
|
4576
|
+
return /* @__PURE__ */ P(Ne, { children: [/* @__PURE__ */ P(D, { children: [/* @__PURE__ */ N(re, {
|
|
4558
4577
|
badgeColor: "secondary",
|
|
4559
4578
|
badgeContent: n,
|
|
4560
4579
|
first: !0,
|
|
4561
4580
|
icon: /* @__PURE__ */ N(io, {}),
|
|
4562
4581
|
onClick: o,
|
|
4563
4582
|
testIdAttributes: { name: "filters" },
|
|
4564
|
-
title:
|
|
4583
|
+
title: ae`Open filters`
|
|
4565
4584
|
}), e] }), /* @__PURE__ */ N(so, {
|
|
4566
4585
|
onClose: a,
|
|
4567
4586
|
open: r
|