@gen-epix/ui-client-common 4.0.0 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/{ui.d.ts → ui-client-common.d.ts} +1 -1
- package/dist/_chunks/ApplicationFooter.js +1 -1
- package/dist/_chunks/ApplicationFooter.js.map +1 -1
- package/dist/_chunks/Breadcrumbs.js +1 -1
- package/dist/_chunks/Breadcrumbs.js.map +1 -1
- package/dist/_chunks/CrudPage.js +293 -293
- package/dist/_chunks/CrudPage.js.map +1 -1
- package/dist/_chunks/GeoFilter.js +1 -1
- package/dist/_chunks/GeoFilter.js.map +1 -1
- package/dist/_chunks/Notifications.js.map +1 -1
- package/dist/_chunks/OutageList.js.map +1 -1
- package/dist/_chunks/QueryClientProvider.js +1 -1
- package/dist/_chunks/QueryClientProvider.js.map +1 -1
- package/dist/_chunks/QueryClientService.js +79 -66
- package/dist/_chunks/QueryClientService.js.map +1 -1
- package/dist/_chunks/Table.js +953 -945
- package/dist/_chunks/Table.js.map +1 -1
- package/dist/_chunks/TableUtil.js.map +1 -1
- package/dist/_chunks/TextFilter.js +4 -4
- package/dist/_chunks/TextFilter.js.map +1 -1
- package/dist/_chunks/UserInvitationsAdminPage.js +110 -110
- package/dist/_chunks/UserInvitationsAdminPage.js.map +1 -1
- package/dist/_chunks/_baseFlatten.js +1 -1
- package/dist/_chunks/_baseGet.js +26 -26
- package/dist/_chunks/_baseGet.js.map +1 -1
- package/dist/_chunks/_baseIteratee.js +25 -26
- package/dist/_chunks/_baseIteratee.js.map +1 -1
- package/dist/_chunks/_setToString.js.map +1 -1
- package/dist/_chunks/{chunk-KS7C4IRE.js → chunk-BV7QT456.js} +1041 -1128
- package/dist/_chunks/chunk-BV7QT456.js.map +1 -0
- package/dist/_chunks/format.js +199 -198
- package/dist/_chunks/format.js.map +1 -1
- package/dist/_chunks/index.esm.js +797 -692
- package/dist/_chunks/index.esm.js.map +1 -1
- package/dist/_chunks/isArrayLike.js +1 -2
- package/dist/_chunks/isArrayLike.js.map +1 -1
- package/dist/_chunks/isObject.js +38 -2
- package/dist/_chunks/isObject.js.map +1 -1
- package/dist/_chunks/isSymbol.js +2 -2
- package/dist/_chunks/middleware.js +11 -9
- package/dist/_chunks/middleware.js.map +1 -1
- package/dist/_chunks/oidc-client-ts.js +12 -9
- package/dist/_chunks/oidc-client-ts.js.map +1 -1
- package/dist/_chunks/omit.js +38 -39
- package/dist/_chunks/omit.js.map +1 -1
- package/dist/_chunks/query.js +210 -228
- package/dist/_chunks/query.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/rolldown-runtime.js +2 -2
- package/dist/_chunks/tableStore.js +79 -78
- package/dist/_chunks/tableStore.js.map +1 -1
- package/dist/_chunks/toDate.js +1 -1
- package/dist/_chunks/toDate.js.map +1 -1
- package/dist/_chunks/uniq.js +1 -1
- package/dist/_chunks/uniq.js.map +1 -1
- package/dist/_chunks/useColumnsMenu.js +7 -6
- package/dist/_chunks/useColumnsMenu.js.map +1 -1
- package/dist/_chunks/useMutation.js +19 -16
- package/dist/_chunks/useMutation.js.map +1 -1
- package/dist/_chunks/useQueryMemo.js +156 -169
- 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 +5 -5
- package/dist/_chunks/yup.js.map +1 -1
- package/dist/classes/filters/GeoFilter.d.ts +1 -1
- package/dist/classes/filters/MultiSelectFilter.d.ts +1 -1
- package/dist/classes/services/AuthenticationService/index.js +41 -44
- package/dist/classes/services/AuthenticationService/index.js.map +1 -1
- package/dist/classes/services/BreadcrumbService/index.js.map +1 -1
- package/dist/classes/services/InactivityService/index.js +10 -11
- package/dist/classes/services/InactivityService/index.js.map +1 -1
- package/dist/classes/services/RouterService/index.js +1 -1
- package/dist/components/app/App/index.js +48 -38
- package/dist/components/app/App/index.js.map +1 -1
- package/dist/components/app/ApplicationBootstrap/index.js +54 -54
- package/dist/components/app/ApplicationBootstrap/index.js.map +1 -1
- package/dist/components/app/AuthenticationWrapper/index.js +45 -45
- package/dist/components/app/AuthenticationWrapper/index.js.map +1 -1
- package/dist/components/app/AuthorizationWrapper/index.js +7 -7
- package/dist/components/app/AuthorizationWrapper/index.js.map +1 -1
- package/dist/components/app/RouterRoot/index.js +53 -53
- package/dist/components/app/RouterRoot/index.js.map +1 -1
- package/dist/components/epi/EpiContactDetailsDialog/EpiContactDetailsDialog.d.ts +2 -2
- package/dist/components/epi/EpiContactDetailsDialog/index.js +28 -26
- package/dist/components/epi/EpiContactDetailsDialog/index.js.map +1 -1
- package/dist/components/filters/BooleanFilterField/index.js +1 -1
- package/dist/components/filters/BooleanFilterField/index.js.map +1 -1
- package/dist/components/filters/DateFilterField/index.js +1 -1
- package/dist/components/filters/DateFilterField/index.js.map +1 -1
- package/dist/components/filters/GeoFilterField/index.js +2 -2
- package/dist/components/filters/GeoFilterField/index.js.map +1 -1
- package/dist/components/filters/MultiSelectFilterField/index.js +2 -2
- package/dist/components/filters/MultiSelectFilterField/index.js.map +1 -1
- package/dist/components/filters/NumberRangeFilterField/index.js +1 -1
- package/dist/components/filters/NumberRangeFilterField/index.js.map +1 -1
- package/dist/components/filters/TextFilterField/index.js +1 -1
- package/dist/components/filters/TextFilterField/index.js.map +1 -1
- package/dist/components/ui/ApplicationBar/index.js +132 -132
- package/dist/components/ui/ApplicationBar/index.js.map +1 -1
- package/dist/components/ui/ConsentDialog/ConsentDialog.d.ts +2 -2
- package/dist/components/ui/ConsentDialog/index.js +11 -11
- package/dist/components/ui/ConsentDialog/index.js.map +1 -1
- package/dist/components/ui/GenericErrorMessage/index.js +1 -1
- package/dist/components/ui/GenericErrorMessage/index.js.map +1 -1
- package/dist/components/ui/LicensesDialog/LicensesDialog.d.ts +2 -2
- package/dist/components/ui/LicensesDialog/index.js +40 -40
- package/dist/components/ui/LicensesDialog/index.js.map +1 -1
- package/dist/components/ui/MyPermissionsDialog/MyPermissionsDialog.d.ts +2 -2
- package/dist/components/ui/MyPermissionsDialog/index.js +21 -21
- package/dist/components/ui/MyPermissionsDialog/index.js.map +1 -1
- package/dist/components/ui/NavLink/index.js +1 -1
- package/dist/components/ui/NavLink/index.js.map +1 -1
- package/dist/components/ui/OrganizationSwitcherDialog/OrganizationSwitcherDialog.d.ts +2 -2
- package/dist/components/ui/OrganizationSwitcherDialog/index.js +43 -43
- package/dist/components/ui/OrganizationSwitcherDialog/index.js.map +1 -1
- package/dist/components/ui/OutagesDialog/OutagesDialog.d.ts +2 -2
- package/dist/components/ui/OutagesDialog/index.js +14 -14
- package/dist/components/ui/OutagesDialog/index.js.map +1 -1
- package/dist/components/ui/PageContainer/index.js +2 -2
- package/dist/components/ui/PageContainer/index.js.map +1 -1
- package/dist/components/ui/ResponseHandler/index.js +8 -8
- package/dist/components/ui/ResponseHandler/index.js.map +1 -1
- package/dist/components/ui/Sidebar/index.js.map +1 -1
- package/dist/components/ui/Table/TableColumnsEditorDialog.d.ts +2 -2
- package/dist/components/ui/UserFeedbackDialog/UserFeedbackDialog.d.ts +2 -2
- package/dist/components/ui/UserFeedbackDialog/index.js +38 -38
- package/dist/components/ui/UserFeedbackDialog/index.js.map +1 -1
- package/dist/components/ui/UserInactivityConfirmation/index.js +14 -14
- package/dist/components/ui/UserInactivityConfirmation/index.js.map +1 -1
- package/dist/context/uiClientCommonConfigContext/UiClientCommonConfigContext.d.ts +5 -0
- package/dist/context/uiClientCommonConfigContext/UiClientCommonConfigContextProvider.d.ts +6 -0
- package/dist/context/uiClientCommonConfigContext/index.d.ts +3 -0
- package/dist/context/uiClientCommonConfigContext/index.js +18 -0
- package/dist/context/uiClientCommonConfigContext/index.js.map +1 -0
- package/dist/context/uiClientCommonConfigContext/useUiClientCommonConfigContext.d.ts +2 -0
- package/dist/dataHooks/useIdentifierIssuerOwnOrganizationQuery/index.js +4 -4
- package/dist/dataHooks/useIdentifierIssuerQuery/index.js +4 -4
- package/dist/dataHooks/useInviteUserConstraintsQuery/index.js +4 -4
- package/dist/dataHooks/useOrganizationAdminPoliciesQuery/index.js +4 -4
- package/dist/dataHooks/useOrganizationIdentifierIssuerLinksQuery/index.js +4 -4
- package/dist/dataHooks/useOrganizationsQuery/index.js +4 -4
- package/dist/dataHooks/useUsersQuery/index.js +4 -4
- package/dist/hooks/useColumnsMenu/useColumnsMenu.d.ts +1 -1
- package/dist/hooks/useEditMutation/index.js +6 -6
- package/dist/hooks/useEditMutation/index.js.map +1 -1
- package/dist/hooks/useItemQuery/index.js +8 -8
- package/dist/hooks/useItemQuery/index.js.map +1 -1
- package/dist/locale/en.json +0 -10
- package/dist/locale/nl.json +0 -10
- package/dist/models/dataHooks.d.ts +1 -1
- package/dist/models/table.d.ts +1 -1
- package/dist/models/table.js.map +1 -1
- package/dist/pages/AcceptInvitationPage/index.js +5 -5
- package/dist/pages/AcceptInvitationPage/index.js.map +1 -1
- package/dist/pages/AdminPage/index.js +1 -1
- package/dist/pages/AdminPage/index.js.map +1 -1
- package/dist/pages/ChooseIdentityProviderPage/index.js.map +1 -1
- package/dist/pages/CrudPage/CrudPage.d.ts +2 -2
- package/dist/pages/CrudPage/CrudPageDeleteDialog.d.ts +2 -2
- package/dist/pages/CrudPage/CrudPageEditDialog.d.ts +4 -4
- package/dist/pages/ErrorPage/index.js.map +1 -1
- package/dist/pages/IdentifierIssuersAdminPage/index.js +2 -2
- package/dist/pages/IdentifierIssuersAdminPage/index.js.map +1 -1
- package/dist/pages/OrganizationAdminPoliciesAdminPage/index.js +1 -1
- package/dist/pages/OrganizationAdminPoliciesAdminPage/index.js.map +1 -1
- package/dist/pages/OrganizationContactsAdminPage/index.js +3 -3
- package/dist/pages/OrganizationContactsAdminPage/index.js.map +1 -1
- package/dist/pages/OrganizationSitesAdminPage/index.js +3 -3
- package/dist/pages/OrganizationSitesAdminPage/index.js.map +1 -1
- package/dist/pages/OrganizationsAdminPage/index.js +2 -2
- package/dist/pages/OrganizationsAdminPage/index.js.map +1 -1
- package/dist/pages/OutagesAdminPage/index.js +2 -2
- package/dist/pages/OutagesAdminPage/index.js.map +1 -1
- package/dist/pages/PostLoginPage/index.js.map +1 -1
- package/dist/pages/PostLogoutPage/index.js.map +1 -1
- package/dist/pages/RouterErrorPage/index.js +1 -1
- package/dist/pages/RouterErrorPage/index.js.map +1 -1
- package/dist/pages/UserInvitationsAdminPage/UserInvitationConsumeDialog.d.ts +2 -2
- package/dist/pages/UserInvitationsAdminPage/UserInvitationShareDialog.d.ts +2 -2
- package/dist/pages/UsersAdminPage/index.js +47 -47
- package/dist/pages/UsersAdminPage/index.js.map +1 -1
- package/dist/setup/setup.js +1 -1
- package/dist/setup/setup.js.map +1 -1
- package/dist/utils/MenuDataUtil/MenuDataUtil.d.ts +1 -1
- package/dist/utils/MenuDataUtil/index.js.map +1 -1
- package/dist/utils/StandardConfigUtil/index.js +4 -4
- package/dist/utils/StandardConfigUtil/index.js.map +1 -1
- package/dist/utils/TableUtil/TableUtil.d.ts +1 -1
- package/package.json +7 -7
- package/dist/_chunks/chunk-KS7C4IRE.js.map +0 -1
- package/dist/_chunks/isObjectLike.js +0 -43
- package/dist/_chunks/isObjectLike.js.map +0 -1
- package/dist/components/ui/BackdropSpinner/BackdropSpinner.d.ts +0 -5
- package/dist/components/ui/BackdropSpinner/index.d.ts +0 -1
- package/dist/components/ui/BackdropSpinner/index.js +0 -19
- package/dist/components/ui/BackdropSpinner/index.js.map +0 -1
- package/dist/components/ui/Confirmation/Confirmation.d.ts +0 -2
- package/dist/components/ui/Confirmation/ConfirmationRender.d.ts +0 -11
- package/dist/components/ui/Confirmation/index.d.ts +0 -2
- package/dist/components/ui/Confirmation/index.js +0 -58
- package/dist/components/ui/Confirmation/index.js.map +0 -1
- package/dist/components/ui/CopyToClipboardButton/CopyToClipboardButton.d.ts +0 -13
- package/dist/components/ui/CopyToClipboardButton/index.d.ts +0 -1
- package/dist/components/ui/CopyToClipboardButton/index.js +0 -101
- package/dist/components/ui/CopyToClipboardButton/index.js.map +0 -1
- package/dist/components/ui/Dialog/Dialog.d.ts +0 -27
- package/dist/components/ui/Dialog/index.d.ts +0 -1
- package/dist/components/ui/Dialog/index.js +0 -83
- package/dist/components/ui/Dialog/index.js.map +0 -1
- package/dist/components/ui/LinearProgressWithLabel/LinearProgressWithLabel.d.ts +0 -5
- package/dist/components/ui/LinearProgressWithLabel/index.d.ts +0 -1
- package/dist/components/ui/LinearProgressWithLabel/index.js +0 -31
- package/dist/components/ui/LinearProgressWithLabel/index.js.map +0 -1
- package/dist/components/ui/LoadingIndicator/LoadingIndicator.d.ts +0 -2
- package/dist/components/ui/LoadingIndicator/index.d.ts +0 -1
- package/dist/components/ui/LoadingIndicator/index.js +0 -12
- package/dist/components/ui/LoadingIndicator/index.js.map +0 -1
- package/dist/components/ui/NestedMenu/IconMenuItem.d.ts +0 -18
- package/dist/components/ui/NestedMenu/NestedDropdown.d.ts +0 -17
- package/dist/components/ui/NestedMenu/NestedMenuItem.d.ts +0 -22
- package/dist/components/ui/NestedMenu/index.d.ts +0 -4
- package/dist/components/ui/NestedMenu/index.js +0 -240
- package/dist/components/ui/NestedMenu/index.js.map +0 -1
- package/dist/components/ui/NestedMenu/nestedMenuItemsFromObject.d.ts +0 -11
- package/dist/components/ui/Spinner/Spinner.d.ts +0 -11
- package/dist/components/ui/Spinner/index.d.ts +0 -1
- package/dist/components/ui/Spinner/index.js +0 -63
- package/dist/components/ui/Spinner/index.js.map +0 -1
- package/dist/components/ui/Stepper/Stepper.d.ts +0 -17
- package/dist/components/ui/Stepper/index.d.ts +0 -2
- package/dist/components/ui/Stepper/index.js +0 -126
- package/dist/components/ui/Stepper/index.js.map +0 -1
- package/dist/components/ui/Stepper/stepperModel.d.ts +0 -4
- package/dist/hoc/withDialog/index.d.ts +0 -1
- package/dist/hoc/withDialog/index.js +0 -69
- package/dist/hoc/withDialog/index.js.map +0 -1
- package/dist/hoc/withDialog/withDialog.d.ts +0 -33
- package/dist/models/nestedMenu.d.ts +0 -17
- package/dist/models/nestedMenu.js +0 -0
package/dist/_chunks/Table.js
CHANGED
|
@@ -15,35 +15,35 @@ import { t as E } from "./GeoFilter.js";
|
|
|
15
15
|
import { BooleanFilterField as ee } from "../components/filters/BooleanFilterField/index.js";
|
|
16
16
|
import { DateFilterField as te } from "../components/filters/DateFilterField/index.js";
|
|
17
17
|
import { GeoFilterField as ne } from "../components/filters/GeoFilterField/index.js";
|
|
18
|
-
import { MultiSelectFilterField as
|
|
19
|
-
import { NumberRangeFilterField as
|
|
20
|
-
import { TextFilterField as
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import
|
|
29
|
-
import {
|
|
30
|
-
import
|
|
31
|
-
import {
|
|
32
|
-
import He from "
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import Ge from "@mui/icons-material/
|
|
36
|
-
import Ke from "@
|
|
37
|
-
import qe from "@
|
|
38
|
-
import
|
|
39
|
-
import {
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import st from "@mui/icons-material/
|
|
43
|
-
import ct from "@mui/icons-material/
|
|
44
|
-
import lt from "@mui/icons-material/
|
|
45
|
-
import ut from "@
|
|
46
|
-
//#region ../../node_modules/.pnpm/react-virtuoso@4.18.
|
|
18
|
+
import { MultiSelectFilterField as D } from "../components/filters/MultiSelectFilterField/index.js";
|
|
19
|
+
import { NumberRangeFilterField as re } from "../components/filters/NumberRangeFilterField/index.js";
|
|
20
|
+
import { TextFilterField as ie } from "../components/filters/TextFilterField/index.js";
|
|
21
|
+
import { SidebarItem as ae, SidebarMenu as oe, SidebarMenuItem as se } from "../components/ui/Sidebar/index.js";
|
|
22
|
+
import { WindowService as ce } from "@gen-epix/ui-core/classes/services/WindowService";
|
|
23
|
+
import { t as O } from "i18next";
|
|
24
|
+
import { Box as k, Button as le, Checkbox as ue, Divider as de, FormControlLabel as fe, FormGroup as pe, IconButton as me, Menu as he, Paper as ge, Popover as _e, Tooltip as ve, Typography as ye, alpha as be, darken as xe, lighten as Se, styled as Ce, useTheme as we } from "@mui/material";
|
|
25
|
+
import * as Te from "react";
|
|
26
|
+
import A, { Fragment as Ee, createContext as De, createElement as Oe, forwardRef as ke, use as Ae, useCallback as j, useEffect as je, useId as Me, useImperativeHandle as Ne, useLayoutEffect as Pe, useMemo as Fe, useRef as M, useState as Ie } from "react";
|
|
27
|
+
import { Fragment as Le, jsx as N, jsxs as P } from "react/jsx-runtime";
|
|
28
|
+
import { useTranslation as Re } from "react-i18next";
|
|
29
|
+
import { TestIdUtil as ze } from "@gen-epix/ui-core/utils/TestIdUtil";
|
|
30
|
+
import Be from "react-dom";
|
|
31
|
+
import { useScrollbarSize as Ve } from "@gen-epix/ui-core/hooks/useScrollbarSize";
|
|
32
|
+
import { visuallyHidden as He } from "@mui/utils";
|
|
33
|
+
import Ue from "@mui/icons-material/ArrowDownward";
|
|
34
|
+
import We from "@mui/icons-material/FilterAlt";
|
|
35
|
+
import Ge from "@mui/icons-material/MoreVert";
|
|
36
|
+
import { withDialog as Ke } from "@gen-epix/ui-core-components/hoc/withDialog";
|
|
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";
|
|
38
|
+
import { SortableContext as et, arrayMove as tt, sortableKeyboardCoordinates as nt, useSortable as rt } from "@dnd-kit/sortable";
|
|
39
|
+
import { CSS as it } from "@dnd-kit/utilities";
|
|
40
|
+
import at from "@mui/icons-material/DragIndicator";
|
|
41
|
+
import ot from "@mui/icons-material/IndeterminateCheckBox";
|
|
42
|
+
import st from "@mui/icons-material/Check";
|
|
43
|
+
import ct from "@mui/icons-material/RestartAlt";
|
|
44
|
+
import lt from "@mui/icons-material/Close";
|
|
45
|
+
import { NestedDropdown as ut } from "@gen-epix/ui-core-components/components/NestedMenu";
|
|
46
|
+
//#region ../../node_modules/.pnpm/react-virtuoso@4.18.12_react-dom@19.2.8_react@19.2.8__react@19.2.8/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;
|
|
@@ -291,30 +291,24 @@ var Kt = {
|
|
|
291
291
|
}),
|
|
292
292
|
logLevel: e
|
|
293
293
|
};
|
|
294
|
-
}, [], { singleton: !0 })
|
|
295
|
-
function
|
|
294
|
+
}, [], { singleton: !0 });
|
|
295
|
+
function Xt(e) {
|
|
296
296
|
return "self" in e ? e.document.documentElement : e;
|
|
297
297
|
}
|
|
298
|
-
function
|
|
299
|
-
let t =
|
|
300
|
-
|
|
301
|
-
let r = t.ownerDocument.defaultView.getComputedStyle(t).direction === "rtl";
|
|
302
|
-
return Xt.set(t, r), r;
|
|
303
|
-
}
|
|
304
|
-
function $t(e) {
|
|
305
|
-
Xt.delete(Zt(e));
|
|
298
|
+
function Zt(e) {
|
|
299
|
+
let t = Xt(e);
|
|
300
|
+
return t.ownerDocument.defaultView.getComputedStyle(t).direction === "rtl";
|
|
306
301
|
}
|
|
307
|
-
function
|
|
308
|
-
return
|
|
302
|
+
function Qt(e, t) {
|
|
303
|
+
return Zt(e) ? -t : t;
|
|
309
304
|
}
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
return en(e, t);
|
|
305
|
+
function $t(e, t) {
|
|
306
|
+
return Zt(e) ? -t : t;
|
|
313
307
|
}
|
|
314
|
-
function
|
|
315
|
-
return
|
|
308
|
+
function en(e, t, n) {
|
|
309
|
+
return tn(e, t, n).callbackRef;
|
|
316
310
|
}
|
|
317
|
-
function
|
|
311
|
+
function tn(e, t, n) {
|
|
318
312
|
let r = A.useRef(null), i = (e) => {}, a = A.useMemo(() => typeof ResizeObserver < "u" ? new ResizeObserver((t) => {
|
|
319
313
|
let r = () => {
|
|
320
314
|
let n = t[0].target;
|
|
@@ -329,18 +323,18 @@ function an(e, t, n) {
|
|
|
329
323
|
ref: r
|
|
330
324
|
};
|
|
331
325
|
}
|
|
332
|
-
function
|
|
333
|
-
return
|
|
334
|
-
let c =
|
|
326
|
+
function nn(e, t, n, r, i, a, o, s, c) {
|
|
327
|
+
return tn(A.useCallback((n) => {
|
|
328
|
+
let c = rn(n.children, t, s ? "offsetWidth" : "offsetHeight", i), l = n.parentElement;
|
|
335
329
|
for (; l.dataset.virtuosoScroller === void 0;) l = l.parentElement;
|
|
336
330
|
let u = l.lastElementChild?.dataset.viewportType === "window", d;
|
|
337
331
|
u && (d = l.ownerDocument.defaultView);
|
|
338
|
-
let f = o ? s ? o.scrollWidth : o.scrollHeight : u ? s ? d.document.documentElement.scrollWidth : d.document.documentElement.scrollHeight : s ? l.scrollWidth : l.scrollHeight, p = o ? s ? o.offsetWidth : o.offsetHeight : u ? s ? d.innerWidth : d.innerHeight : s ? l.offsetWidth : l.offsetHeight, m = o ? s ?
|
|
332
|
+
let f = o ? s ? o.scrollWidth : o.scrollHeight : u ? s ? d.document.documentElement.scrollWidth : d.document.documentElement.scrollHeight : s ? l.scrollWidth : l.scrollHeight, p = o ? s ? o.offsetWidth : o.offsetHeight : u ? s ? d.innerWidth : d.innerHeight : s ? l.offsetWidth : l.offsetHeight, m = o ? s ? Qt(o, o.scrollLeft) : o.scrollTop : u ? s ? Qt(d, d.scrollX || d.document.documentElement.scrollLeft) : d.scrollY || d.document.documentElement.scrollTop : s ? Qt(l, l.scrollLeft) : l.scrollTop;
|
|
339
333
|
r({
|
|
340
334
|
scrollHeight: f,
|
|
341
335
|
scrollTop: Math.max(m, 0),
|
|
342
336
|
viewportHeight: p
|
|
343
|
-
}), a?.(s ?
|
|
337
|
+
}), a?.(s ? an("column-gap", getComputedStyle(n).columnGap, i) : an("row-gap", getComputedStyle(n).rowGap, i)), c !== null && e(c);
|
|
344
338
|
}, [
|
|
345
339
|
e,
|
|
346
340
|
t,
|
|
@@ -351,7 +345,7 @@ function on(e, t, n, r, i, a, o, s, c) {
|
|
|
351
345
|
s
|
|
352
346
|
]), n, c);
|
|
353
347
|
}
|
|
354
|
-
function
|
|
348
|
+
function rn(e, t, n, r) {
|
|
355
349
|
let i = e.length;
|
|
356
350
|
if (i === 0) return null;
|
|
357
351
|
let a = [];
|
|
@@ -369,10 +363,10 @@ function sn(e, t, n, r) {
|
|
|
369
363
|
}
|
|
370
364
|
return a;
|
|
371
365
|
}
|
|
372
|
-
function
|
|
366
|
+
function an(e, t, n) {
|
|
373
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);
|
|
374
368
|
}
|
|
375
|
-
function
|
|
369
|
+
function on(e, t, n) {
|
|
376
370
|
let r = A.useRef(null), i = A.useCallback((n) => {
|
|
377
371
|
if (!n?.offsetParent) return;
|
|
378
372
|
let i = n.getBoundingClientRect(), a = i.width, s, c;
|
|
@@ -389,7 +383,7 @@ function ln(e, t, n) {
|
|
|
389
383
|
visibleHeight: c,
|
|
390
384
|
visibleWidth: a
|
|
391
385
|
}, e(r.current);
|
|
392
|
-
}, [e, t]), { callbackRef: a, ref: o } =
|
|
386
|
+
}, [e, t]), { callbackRef: a, ref: o } = tn(i, !0, n), s = A.useCallback(() => {
|
|
393
387
|
i(o.current);
|
|
394
388
|
}, [i, o]);
|
|
395
389
|
return A.useEffect(() => {
|
|
@@ -412,7 +406,7 @@ function ln(e, t, n) {
|
|
|
412
406
|
o
|
|
413
407
|
]), a;
|
|
414
408
|
}
|
|
415
|
-
var
|
|
409
|
+
var sn = q(() => {
|
|
416
410
|
let e = K(), t = K(), n = G(0), r = K(), i = G(0), a = K(), o = K(), s = G(0), c = G(0), l = G(0), u = G(0), d = K(), f = K(), p = G(!1), m = G(!1), h = G(!1);
|
|
417
411
|
return z(U(e, H(({ scrollTop: e }) => e)), t), z(U(e, H(({ scrollHeight: e }) => e)), o), z(t, i), {
|
|
418
412
|
deviation: n,
|
|
@@ -432,8 +426,8 @@ var un = q(() => {
|
|
|
432
426
|
statefulScrollTop: i,
|
|
433
427
|
viewportHeight: a
|
|
434
428
|
};
|
|
435
|
-
}, [], { singleton: !0 }),
|
|
436
|
-
function
|
|
429
|
+
}, [], { singleton: !0 }), cn = { lvl: 0 };
|
|
430
|
+
function ln(e, t) {
|
|
437
431
|
let n = e.length;
|
|
438
432
|
if (n === 0) return [];
|
|
439
433
|
let { index: r, value: i } = t(e[0]), a = [];
|
|
@@ -446,98 +440,98 @@ function fn(e, t) {
|
|
|
446
440
|
}), r = n, i = s;
|
|
447
441
|
}
|
|
448
442
|
return a.push({
|
|
449
|
-
end:
|
|
443
|
+
end: 1 / 0,
|
|
450
444
|
start: r,
|
|
451
445
|
value: i
|
|
452
446
|
}), a;
|
|
453
447
|
}
|
|
454
448
|
function Y(e) {
|
|
455
|
-
return e ===
|
|
449
|
+
return e === cn;
|
|
456
450
|
}
|
|
457
|
-
function
|
|
458
|
-
if (!Y(e)) return t === e.k ? e.v : t < e.k ?
|
|
451
|
+
function un(e, t) {
|
|
452
|
+
if (!Y(e)) return t === e.k ? e.v : t < e.k ? un(e.l, t) : un(e.r, t);
|
|
459
453
|
}
|
|
460
|
-
function
|
|
461
|
-
if (Y(e)) return [-
|
|
454
|
+
function dn(e, t, n = "k") {
|
|
455
|
+
if (Y(e)) return [-1 / 0, void 0];
|
|
462
456
|
if (Number(e[n]) === t) return [e.k, e.v];
|
|
463
457
|
if (Number(e[n]) < t) {
|
|
464
|
-
let r =
|
|
465
|
-
return r[0] === -
|
|
458
|
+
let r = dn(e.r, t, n);
|
|
459
|
+
return r[0] === -1 / 0 ? [e.k, e.v] : r;
|
|
466
460
|
}
|
|
467
|
-
return
|
|
461
|
+
return dn(e.l, t, n);
|
|
468
462
|
}
|
|
469
|
-
function
|
|
470
|
-
return Y(e) ?
|
|
463
|
+
function fn(e, t, n) {
|
|
464
|
+
return Y(e) ? Cn(t, n, 1) : t === e.k ? yn(e, {
|
|
471
465
|
k: t,
|
|
472
466
|
v: n
|
|
473
|
-
}) : t < e.k ?
|
|
467
|
+
}) : t < e.k ? wn(yn(e, { l: fn(e.l, t, n) })) : wn(yn(e, { r: fn(e.r, t, n) }));
|
|
474
468
|
}
|
|
475
|
-
function
|
|
476
|
-
return
|
|
469
|
+
function pn() {
|
|
470
|
+
return cn;
|
|
477
471
|
}
|
|
478
|
-
function
|
|
472
|
+
function mn(e, t, n) {
|
|
479
473
|
if (Y(e)) return [];
|
|
480
|
-
let r =
|
|
481
|
-
return
|
|
474
|
+
let r = dn(e, t)[0];
|
|
475
|
+
return Dn(_n(e, r, n));
|
|
482
476
|
}
|
|
483
|
-
function
|
|
484
|
-
if (Y(e)) return
|
|
477
|
+
function hn(e, t) {
|
|
478
|
+
if (Y(e)) return cn;
|
|
485
479
|
let { k: n, l: r, r: i } = e;
|
|
486
480
|
if (t === n) {
|
|
487
481
|
if (Y(r)) return i;
|
|
488
482
|
if (Y(i)) return r;
|
|
489
|
-
let [t, n] =
|
|
490
|
-
return
|
|
483
|
+
let [t, n] = Sn(r);
|
|
484
|
+
return vn(yn(e, {
|
|
491
485
|
k: t,
|
|
492
|
-
l:
|
|
486
|
+
l: bn(r),
|
|
493
487
|
v: n
|
|
494
488
|
}));
|
|
495
489
|
}
|
|
496
|
-
return
|
|
490
|
+
return vn(t < n ? yn(e, { l: hn(r, t) }) : yn(e, { r: hn(i, t) }));
|
|
497
491
|
}
|
|
498
|
-
function
|
|
492
|
+
function gn(e) {
|
|
499
493
|
return Y(e) ? [] : [
|
|
500
|
-
...
|
|
494
|
+
...gn(e.l),
|
|
501
495
|
{
|
|
502
496
|
k: e.k,
|
|
503
497
|
v: e.v
|
|
504
498
|
},
|
|
505
|
-
...
|
|
499
|
+
...gn(e.r)
|
|
506
500
|
];
|
|
507
501
|
}
|
|
508
|
-
function
|
|
502
|
+
function _n(e, t, n) {
|
|
509
503
|
if (Y(e)) return [];
|
|
510
504
|
let { k: r, l: i, r: a, v: o } = e, s = [];
|
|
511
|
-
return r > t && (s = s.concat(
|
|
505
|
+
return r > t && (s = s.concat(_n(i, t, n))), r >= t && r <= n && s.push({
|
|
512
506
|
k: r,
|
|
513
507
|
v: o
|
|
514
|
-
}), r <= n && (s = s.concat(
|
|
508
|
+
}), r <= n && (s = s.concat(_n(a, t, n))), s;
|
|
515
509
|
}
|
|
516
|
-
function
|
|
510
|
+
function vn(e) {
|
|
517
511
|
let { l: t, lvl: n, r } = e;
|
|
518
512
|
if (r.lvl >= n - 1 && t.lvl >= n - 1) return e;
|
|
519
513
|
if (n > r.lvl + 1) {
|
|
520
|
-
if (
|
|
521
|
-
if (!Y(t) && !Y(t.r)) return
|
|
522
|
-
l:
|
|
514
|
+
if (xn(t)) return Tn(yn(e, { lvl: n - 1 }));
|
|
515
|
+
if (!Y(t) && !Y(t.r)) return yn(t.r, {
|
|
516
|
+
l: yn(t, { r: t.r.l }),
|
|
523
517
|
lvl: n,
|
|
524
|
-
r:
|
|
518
|
+
r: yn(e, {
|
|
525
519
|
l: t.r.r,
|
|
526
520
|
lvl: n - 1
|
|
527
521
|
})
|
|
528
522
|
});
|
|
529
523
|
throw Error("Unexpected empty nodes");
|
|
530
524
|
}
|
|
531
|
-
if (
|
|
525
|
+
if (xn(e)) return En(yn(e, { lvl: n - 1 }));
|
|
532
526
|
if (!Y(r) && !Y(r.l)) {
|
|
533
|
-
let t = r.l, i =
|
|
534
|
-
return
|
|
535
|
-
l:
|
|
527
|
+
let t = r.l, i = xn(t) ? r.lvl - 1 : r.lvl;
|
|
528
|
+
return yn(t, {
|
|
529
|
+
l: yn(e, {
|
|
536
530
|
lvl: n - 1,
|
|
537
531
|
r: t.l
|
|
538
532
|
}),
|
|
539
533
|
lvl: t.lvl + 1,
|
|
540
|
-
r:
|
|
534
|
+
r: En(yn(r, {
|
|
541
535
|
l: t.r,
|
|
542
536
|
lvl: i
|
|
543
537
|
}))
|
|
@@ -545,19 +539,19 @@ function xn(e) {
|
|
|
545
539
|
}
|
|
546
540
|
throw Error("Unexpected empty nodes");
|
|
547
541
|
}
|
|
548
|
-
function
|
|
549
|
-
return
|
|
542
|
+
function yn(e, t) {
|
|
543
|
+
return Cn(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);
|
|
550
544
|
}
|
|
551
|
-
function
|
|
552
|
-
return Y(e.r) ? e.l :
|
|
545
|
+
function bn(e) {
|
|
546
|
+
return Y(e.r) ? e.l : vn(yn(e, { r: bn(e.r) }));
|
|
553
547
|
}
|
|
554
|
-
function
|
|
548
|
+
function xn(e) {
|
|
555
549
|
return Y(e) || e.lvl > e.r.lvl;
|
|
556
550
|
}
|
|
557
|
-
function
|
|
558
|
-
return Y(e.r) ? [e.k, e.v] :
|
|
551
|
+
function Sn(e) {
|
|
552
|
+
return Y(e.r) ? [e.k, e.v] : Sn(e.r);
|
|
559
553
|
}
|
|
560
|
-
function
|
|
554
|
+
function Cn(e, t, n, r = cn, i = cn) {
|
|
561
555
|
return {
|
|
562
556
|
k: e,
|
|
563
557
|
l: r,
|
|
@@ -566,37 +560,37 @@ function En(e, t, n, r = dn, i = dn) {
|
|
|
566
560
|
v: t
|
|
567
561
|
};
|
|
568
562
|
}
|
|
569
|
-
function
|
|
570
|
-
return
|
|
563
|
+
function wn(e) {
|
|
564
|
+
return En(Tn(e));
|
|
571
565
|
}
|
|
572
|
-
function
|
|
566
|
+
function Tn(e) {
|
|
573
567
|
let { l: t } = e;
|
|
574
|
-
return !Y(t) && t.lvl === e.lvl ?
|
|
568
|
+
return !Y(t) && t.lvl === e.lvl ? yn(t, { r: yn(e, { l: t.r }) }) : e;
|
|
575
569
|
}
|
|
576
|
-
function
|
|
570
|
+
function En(e) {
|
|
577
571
|
let { lvl: t, r: n } = e;
|
|
578
|
-
return !Y(n) && !Y(n.r) && n.lvl === t && n.r.lvl === t ?
|
|
579
|
-
l:
|
|
572
|
+
return !Y(n) && !Y(n.r) && n.lvl === t && n.r.lvl === t ? yn(n, {
|
|
573
|
+
l: yn(e, { r: n.l }),
|
|
580
574
|
lvl: t + 1
|
|
581
575
|
}) : e;
|
|
582
576
|
}
|
|
583
|
-
function
|
|
584
|
-
return
|
|
577
|
+
function Dn(e) {
|
|
578
|
+
return ln(e, ({ k: e, v: t }) => ({
|
|
585
579
|
index: e,
|
|
586
580
|
value: t
|
|
587
581
|
}));
|
|
588
582
|
}
|
|
589
|
-
function
|
|
583
|
+
function On(e, t) {
|
|
590
584
|
return !!(e && e.startIndex === t.startIndex && e.endIndex === t.endIndex);
|
|
591
585
|
}
|
|
592
|
-
function
|
|
586
|
+
function kn(e, t) {
|
|
593
587
|
return !!(e && e[0] === t[0] && e[1] === t[1]);
|
|
594
588
|
}
|
|
595
|
-
var
|
|
596
|
-
function
|
|
597
|
-
return e[
|
|
589
|
+
var An = q(() => ({ recalcInProgress: G(!1) }), [], { singleton: !0 });
|
|
590
|
+
function jn(e, t, n) {
|
|
591
|
+
return e[Mn(e, t, n)];
|
|
598
592
|
}
|
|
599
|
-
function
|
|
593
|
+
function Mn(e, t, n, r = 0) {
|
|
600
594
|
let i = e.length - 1;
|
|
601
595
|
for (; r <= i;) {
|
|
602
596
|
let a = Math.floor((r + i) / 2), o = e[a], s = n(o, t);
|
|
@@ -611,83 +605,83 @@ function Fn(e, t, n, r = 0) {
|
|
|
611
605
|
}
|
|
612
606
|
throw Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`);
|
|
613
607
|
}
|
|
614
|
-
function
|
|
615
|
-
let i =
|
|
608
|
+
function Nn(e, t, n, r) {
|
|
609
|
+
let i = Mn(e, t, r), a = Mn(e, n, r, i);
|
|
616
610
|
return e.slice(i, a + 1);
|
|
617
611
|
}
|
|
618
|
-
function
|
|
612
|
+
function Pn(e, t) {
|
|
619
613
|
return Math.round(e.getBoundingClientRect()[t]);
|
|
620
614
|
}
|
|
621
|
-
function
|
|
615
|
+
function Fn(e) {
|
|
622
616
|
return !Y(e.groupOffsetTree);
|
|
623
617
|
}
|
|
624
|
-
function
|
|
618
|
+
function In({ index: e }, t) {
|
|
625
619
|
return t === e ? 0 : t < e ? -1 : 1;
|
|
626
620
|
}
|
|
627
|
-
function
|
|
621
|
+
function Ln() {
|
|
628
622
|
return {
|
|
629
623
|
groupIndices: [],
|
|
630
|
-
groupOffsetTree:
|
|
624
|
+
groupOffsetTree: pn(),
|
|
631
625
|
lastIndex: 0,
|
|
632
626
|
lastOffset: 0,
|
|
633
627
|
lastSize: 0,
|
|
634
628
|
offsetTree: [],
|
|
635
|
-
sizeTree:
|
|
629
|
+
sizeTree: pn()
|
|
636
630
|
};
|
|
637
631
|
}
|
|
638
|
-
function
|
|
639
|
-
let n = Y(e) ? 0 :
|
|
632
|
+
function Rn(e, t) {
|
|
633
|
+
let n = Y(e) ? 0 : 1 / 0;
|
|
640
634
|
for (let r of t) {
|
|
641
635
|
let { endIndex: t, size: i, startIndex: a } = r;
|
|
642
636
|
if (n = Math.min(n, a), Y(e)) {
|
|
643
|
-
e =
|
|
637
|
+
e = fn(e, 0, i);
|
|
644
638
|
continue;
|
|
645
639
|
}
|
|
646
|
-
let o =
|
|
647
|
-
if (o.some(
|
|
640
|
+
let o = mn(e, a - 1, t + 1);
|
|
641
|
+
if (o.some(Xn(r))) continue;
|
|
648
642
|
let s = !1, c = !1;
|
|
649
|
-
for (let { end: n, start: r, value: a } of o) s ? (t >= r || i === a) && (e =
|
|
650
|
-
c && (e =
|
|
643
|
+
for (let { end: n, start: r, value: a } of o) s ? (t >= r || i === a) && (e = hn(e, r)) : (c = a !== i, s = !0), n > t && t >= r && a !== i && (e = fn(e, t + 1, a));
|
|
644
|
+
c && (e = fn(e, a, i));
|
|
651
645
|
}
|
|
652
646
|
return [e, n];
|
|
653
647
|
}
|
|
654
|
-
function
|
|
648
|
+
function zn(e) {
|
|
655
649
|
return e.groupIndex !== void 0;
|
|
656
650
|
}
|
|
657
|
-
function
|
|
651
|
+
function Bn({ offset: e }, t) {
|
|
658
652
|
return t === e ? 0 : t < e ? -1 : 1;
|
|
659
653
|
}
|
|
660
|
-
function
|
|
654
|
+
function Vn(e, t, n) {
|
|
661
655
|
if (t.length === 0) return 0;
|
|
662
|
-
let { index: r, offset: i, size: a } =
|
|
656
|
+
let { index: r, offset: i, size: a } = jn(t, e, In), o = e - r, s = a * o + (o - 1) * n + i;
|
|
663
657
|
return s > 0 ? s + n : s;
|
|
664
658
|
}
|
|
665
|
-
function
|
|
666
|
-
if (!
|
|
659
|
+
function Hn(e, t) {
|
|
660
|
+
if (!Fn(t)) return e;
|
|
667
661
|
let n = 0;
|
|
668
662
|
for (; t.groupIndices[n] <= e + n;) n++;
|
|
669
663
|
return e + n;
|
|
670
664
|
}
|
|
671
|
-
function
|
|
672
|
-
if (
|
|
673
|
-
let r =
|
|
665
|
+
function Un(e, t, n) {
|
|
666
|
+
if (zn(e)) return t.groupIndices[e.groupIndex] + 1;
|
|
667
|
+
let r = Hn(e.index === "LAST" ? n : e.index, t);
|
|
674
668
|
return r = Math.max(0, Math.min(n, r)), r;
|
|
675
669
|
}
|
|
676
|
-
function
|
|
677
|
-
return r > 0 && (t = Math.max(t,
|
|
670
|
+
function Wn(e, t, n, r = 0) {
|
|
671
|
+
return r > 0 && (t = Math.max(t, jn(e, r, In).offset)), ln(Nn(e, t, n, Bn), Yn);
|
|
678
672
|
}
|
|
679
|
-
function
|
|
673
|
+
function Gn(e, [t, n, r, i]) {
|
|
680
674
|
t.length > 0 && r("received item sizes", t, Kt.DEBUG);
|
|
681
675
|
let a = e.sizeTree, o = a, s = 0;
|
|
682
676
|
if (n.length > 0 && Y(a) && t.length === 2) {
|
|
683
677
|
let e = t[0].size, r = t[1].size;
|
|
684
|
-
o = n.reduce((t, n) =>
|
|
685
|
-
} else [o, s] =
|
|
678
|
+
o = n.reduce((t, n) => fn(fn(t, n, e), n + 1, r), o);
|
|
679
|
+
} else [o, s] = Rn(o, t);
|
|
686
680
|
if (o === a) return e;
|
|
687
|
-
let { lastIndex: c, lastOffset: l, lastSize: u, offsetTree: d } =
|
|
681
|
+
let { lastIndex: c, lastOffset: l, lastSize: u, offsetTree: d } = Jn(e.offsetTree, s, o, i);
|
|
688
682
|
return {
|
|
689
683
|
groupIndices: n,
|
|
690
|
-
groupOffsetTree: n.reduce((e, t) =>
|
|
684
|
+
groupOffsetTree: n.reduce((e, t) => fn(e, t, Vn(t, d, i)), pn()),
|
|
691
685
|
lastIndex: c,
|
|
692
686
|
lastOffset: l,
|
|
693
687
|
lastSize: u,
|
|
@@ -695,30 +689,30 @@ function Jn(e, [t, n, r, i]) {
|
|
|
695
689
|
sizeTree: o
|
|
696
690
|
};
|
|
697
691
|
}
|
|
698
|
-
function
|
|
699
|
-
return
|
|
692
|
+
function Kn(e) {
|
|
693
|
+
return gn(e).map(({ k: e, v: t }, n, r) => {
|
|
700
694
|
let i = r[n + 1];
|
|
701
695
|
return {
|
|
702
|
-
endIndex: i === void 0 ?
|
|
696
|
+
endIndex: i === void 0 ? 1 / 0 : i.k - 1,
|
|
703
697
|
size: t,
|
|
704
698
|
startIndex: e
|
|
705
699
|
};
|
|
706
700
|
});
|
|
707
701
|
}
|
|
708
|
-
function
|
|
702
|
+
function qn(e, t) {
|
|
709
703
|
let n = 0, r = 0;
|
|
710
704
|
for (; n < e;) n += t[r + 1] - t[r] - 1, r++;
|
|
711
705
|
return r - (n === e ? 0 : 1);
|
|
712
706
|
}
|
|
713
|
-
function
|
|
707
|
+
function Jn(e, t, n, r) {
|
|
714
708
|
let i = e, a = 0, o = 0, s = 0, c = 0;
|
|
715
709
|
if (t === 0) i = [];
|
|
716
710
|
else {
|
|
717
|
-
c =
|
|
718
|
-
let e =
|
|
719
|
-
a = e[0], o = e[1], i.length && i[c].size ===
|
|
711
|
+
c = Mn(i, t - 1, In), s = i[c].offset;
|
|
712
|
+
let e = dn(n, t - 1);
|
|
713
|
+
a = e[0], o = e[1], i.length && i[c].size === dn(n, t)[1] && --c, i = i.slice(0, c + 1);
|
|
720
714
|
}
|
|
721
|
-
for (let { start: e, value: c } of
|
|
715
|
+
for (let { start: e, value: c } of mn(n, t, 1 / 0)) {
|
|
722
716
|
let t = e - a, n = t * o + s + t * r;
|
|
723
717
|
i.push({
|
|
724
718
|
index: e,
|
|
@@ -733,21 +727,21 @@ function Zn(e, t, n, r) {
|
|
|
733
727
|
offsetTree: i
|
|
734
728
|
};
|
|
735
729
|
}
|
|
736
|
-
function
|
|
730
|
+
function Yn(e) {
|
|
737
731
|
return {
|
|
738
732
|
index: e.index,
|
|
739
733
|
value: e
|
|
740
734
|
};
|
|
741
735
|
}
|
|
742
|
-
function
|
|
736
|
+
function Xn(e) {
|
|
743
737
|
let { endIndex: t, size: n, startIndex: r } = e;
|
|
744
|
-
return (e) => e.start === r && (e.end === t || e.end ===
|
|
738
|
+
return (e) => e.start === r && (e.end === t || e.end === 1 / 0) && e.value === n;
|
|
745
739
|
}
|
|
746
|
-
var
|
|
740
|
+
var Zn = {
|
|
747
741
|
offsetHeight: "height",
|
|
748
742
|
offsetWidth: "width"
|
|
749
|
-
},
|
|
750
|
-
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) =>
|
|
743
|
+
}, Qn = q(([{ log: e }, { recalcInProgress: t }]) => {
|
|
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) => Pn(e, Zn[t])), m = G(void 0), h = G(0), g = Ln(), _ = zt(U(n, W(c, e, h), Pt(Gn, g), B()), g), v = zt(U(c, B(), Pt((e, t) => ({
|
|
751
745
|
current: t,
|
|
752
746
|
prev: e.current
|
|
753
747
|
}), {
|
|
@@ -755,7 +749,7 @@ var er = {
|
|
|
755
749
|
prev: []
|
|
756
750
|
}), H(({ prev: e }) => e)), []);
|
|
757
751
|
z(U(c, V((e) => e.length > 0), W(_, h), H(([e, t, n]) => {
|
|
758
|
-
let r = e.reduce((e, r, i) =>
|
|
752
|
+
let r = e.reduce((e, r, i) => fn(e, r, Vn(r, t.offsetTree, n) || i), pn());
|
|
759
753
|
return {
|
|
760
754
|
...t,
|
|
761
755
|
groupIndices: e,
|
|
@@ -828,10 +822,10 @@ var er = {
|
|
|
828
822
|
prev: 0
|
|
829
823
|
}), H((e) => e.diff)), (e) => {
|
|
830
824
|
let { groupIndices: n } = R(_);
|
|
831
|
-
if (e > 0) L(t, !0), L(a, e +
|
|
825
|
+
if (e > 0) L(t, !0), L(a, e + qn(e, n));
|
|
832
826
|
else if (e < 0) {
|
|
833
827
|
let t = R(v);
|
|
834
|
-
t.length > 0 && (e -=
|
|
828
|
+
t.length > 0 && (e -= qn(-e, t)), L(o, e);
|
|
835
829
|
}
|
|
836
830
|
}), I(U(s, W(e)), ([e, t]) => {
|
|
837
831
|
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);
|
|
@@ -840,9 +834,9 @@ var er = {
|
|
|
840
834
|
z(U(a, W(_), H(([e, t]) => {
|
|
841
835
|
let n = t.groupIndices.length > 0, r = [], i = t.lastSize;
|
|
842
836
|
if (n) {
|
|
843
|
-
let n =
|
|
837
|
+
let n = un(t.sizeTree, 0), a = 0, o = 0;
|
|
844
838
|
for (; a < e;) {
|
|
845
|
-
let e = t.groupIndices[o], s = t.groupIndices.length === o + 1 ?
|
|
839
|
+
let e = t.groupIndices[o], s = t.groupIndices.length === o + 1 ? 1 / 0 : t.groupIndices[o + 1] - e - 1;
|
|
846
840
|
r.push({
|
|
847
841
|
endIndex: e,
|
|
848
842
|
size: n,
|
|
@@ -853,7 +847,7 @@ var er = {
|
|
|
853
847
|
startIndex: e + 1
|
|
854
848
|
}), o++, a += s + 1;
|
|
855
849
|
}
|
|
856
|
-
let s =
|
|
850
|
+
let s = gn(t.sizeTree);
|
|
857
851
|
return a !== e && s.shift(), s.reduce((t, { k: n, v: r }) => {
|
|
858
852
|
let i = t.ranges;
|
|
859
853
|
return t.prevSize !== 0 && (i = [...t.ranges, {
|
|
@@ -871,7 +865,7 @@ var er = {
|
|
|
871
865
|
ranges: r
|
|
872
866
|
}).ranges;
|
|
873
867
|
}
|
|
874
|
-
return
|
|
868
|
+
return gn(t.sizeTree).reduce((t, { k: n, v: r }) => ({
|
|
875
869
|
prevIndex: n + e,
|
|
876
870
|
prevSize: r,
|
|
877
871
|
ranges: [...t.ranges, {
|
|
@@ -885,33 +879,33 @@ var er = {
|
|
|
885
879
|
ranges: []
|
|
886
880
|
}).ranges;
|
|
887
881
|
})), n);
|
|
888
|
-
let S = Bt(U(o, W(_, h), H(([e, { offsetTree: t }, n]) =>
|
|
882
|
+
let S = Bt(U(o, W(_, h), H(([e, { offsetTree: t }, n]) => Vn(-e, t, n))));
|
|
889
883
|
return z(U(o, W(_, h), H(([e, t, n]) => {
|
|
890
884
|
if (t.groupIndices.length > 0) {
|
|
891
885
|
if (Y(t.sizeTree)) return t;
|
|
892
|
-
let r =
|
|
886
|
+
let r = pn(), i = R(v), a = 0, o = 0, s = 0;
|
|
893
887
|
for (; a < -e;) {
|
|
894
888
|
s = i[o];
|
|
895
889
|
let e = i[o + 1] - s - 1;
|
|
896
890
|
o++, a += e + 1;
|
|
897
891
|
}
|
|
898
|
-
if (r =
|
|
899
|
-
let n =
|
|
900
|
-
r =
|
|
901
|
-
let i =
|
|
902
|
-
r =
|
|
892
|
+
if (r = gn(t.sizeTree).reduce((t, { k: n, v: r }) => fn(t, Math.max(0, n + e), r), r), a !== -e) {
|
|
893
|
+
let n = un(t.sizeTree, s);
|
|
894
|
+
r = fn(r, 0, n);
|
|
895
|
+
let i = dn(t.sizeTree, -e + 1)[1];
|
|
896
|
+
r = fn(r, 1, i);
|
|
903
897
|
}
|
|
904
898
|
return {
|
|
905
899
|
...t,
|
|
906
900
|
sizeTree: r,
|
|
907
|
-
...
|
|
901
|
+
...Jn(t.offsetTree, 0, r, n)
|
|
908
902
|
};
|
|
909
903
|
}
|
|
910
|
-
let r =
|
|
904
|
+
let r = gn(t.sizeTree).reduce((t, { k: n, v: r }) => fn(t, Math.max(0, n + e), r), pn());
|
|
911
905
|
return {
|
|
912
906
|
...t,
|
|
913
907
|
sizeTree: r,
|
|
914
|
-
...
|
|
908
|
+
...Jn(t.offsetTree, 0, r, n)
|
|
915
909
|
};
|
|
916
910
|
})), _), {
|
|
917
911
|
beforeUnshiftWith: x,
|
|
@@ -934,20 +928,20 @@ var er = {
|
|
|
934
928
|
trackItemSizes: y,
|
|
935
929
|
unshiftWith: a
|
|
936
930
|
};
|
|
937
|
-
}, F(Yt,
|
|
938
|
-
function
|
|
931
|
+
}, F(Yt, An), { singleton: !0 });
|
|
932
|
+
function $n(e) {
|
|
939
933
|
return e.reduce((e, t) => (e.groupIndices.push(e.totalCount), e.totalCount += t + 1, e), {
|
|
940
934
|
groupIndices: [],
|
|
941
935
|
totalCount: 0
|
|
942
936
|
});
|
|
943
937
|
}
|
|
944
|
-
var
|
|
945
|
-
let a = K(), o = K(), s = Bt(U(a, H(
|
|
946
|
-
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]) =>
|
|
938
|
+
var er = q(([{ groupIndices: e, sizes: t, totalCount: n }, { headerHeight: r, scrollTop: i }]) => {
|
|
939
|
+
let a = K(), o = K(), s = Bt(U(a, H($n)));
|
|
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]) => Fn(t)), H(([e, t, n]) => dn(t.groupOffsetTree, Math.max(e - n, 0), "v")[0]), B(), H((e) => [e])), o), {
|
|
947
941
|
groupCounts: a,
|
|
948
942
|
topItemsIndexes: o
|
|
949
943
|
};
|
|
950
|
-
}, F(
|
|
944
|
+
}, F(Qn, sn)), tr = q(([{ log: e }]) => {
|
|
951
945
|
let t = G(!1), n = Bt(U(t, V((e) => e), B()));
|
|
952
946
|
return I(t, (t) => {
|
|
953
947
|
t && R(e)("props updated", {}, Kt.DEBUG);
|
|
@@ -955,19 +949,19 @@ var rr = q(([{ groupIndices: e, sizes: t, totalCount: n }, { headerHeight: r, sc
|
|
|
955
949
|
didMount: n,
|
|
956
950
|
propsReady: t
|
|
957
951
|
};
|
|
958
|
-
}, F(Yt), { singleton: !0 }),
|
|
959
|
-
function
|
|
952
|
+
}, F(Yt), { singleton: !0 }), nr = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
|
|
953
|
+
function rr(e) {
|
|
960
954
|
let t = typeof e == "number" ? { index: e } : { ...e };
|
|
961
|
-
return t.align ||= "start", (!t.behavior || !
|
|
955
|
+
return t.align ||= "start", (!t.behavior || !nr) && (t.behavior = "auto"), t.offset === void 0 && (t.offset = 0), t;
|
|
962
956
|
}
|
|
963
|
-
var
|
|
957
|
+
var ir = 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 }]) => {
|
|
964
958
|
let p = K(), m = K(), h = G(0), g = null, _ = null, v = null;
|
|
965
959
|
function y() {
|
|
966
960
|
g !== null && (g(), g = null), v !== null && (v(), v = null), _ &&= (clearTimeout(_), null), L(c, !1);
|
|
967
961
|
}
|
|
968
962
|
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]) => {
|
|
969
|
-
let b =
|
|
970
|
-
x === "end" ? (E += f +
|
|
963
|
+
let b = rr(e), { align: x, behavior: S, offset: C } = b, w = i - 1, T = Un(b, n, w), E = Vn(T, n.offsetTree, d) + o;
|
|
964
|
+
x === "end" ? (E += f + dn(n.sizeTree, T)[1] - r + h, T === w && (E += s)) : x === "center" ? E += (f + dn(n.sizeTree, T)[1] - r + h) / 2 : E -= a, C !== void 0 && C !== 0 && (E += C);
|
|
971
965
|
let ee = (t) => {
|
|
972
966
|
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));
|
|
973
967
|
};
|
|
@@ -978,7 +972,7 @@ var sr = q(([{ gap: e, listRefresh: t, sizes: n, totalCount: r }, { fixedFooterH
|
|
|
978
972
|
}), g = At(u, () => {
|
|
979
973
|
ee(e);
|
|
980
974
|
});
|
|
981
|
-
} else g = At(U(t,
|
|
975
|
+
} else g = At(U(t, ar(150)), ee);
|
|
982
976
|
return _ = setTimeout(() => {
|
|
983
977
|
y();
|
|
984
978
|
}, 1200), L(c, !0), l("scrolling from index to", {
|
|
@@ -994,8 +988,8 @@ var sr = q(([{ gap: e, listRefresh: t, sizes: n, totalCount: r }, { fixedFooterH
|
|
|
994
988
|
scrollToIndex: p,
|
|
995
989
|
topListHeight: h
|
|
996
990
|
};
|
|
997
|
-
}, F(
|
|
998
|
-
function
|
|
991
|
+
}, F(Qn, sn, Yt), { singleton: !0 });
|
|
992
|
+
function ar(e) {
|
|
999
993
|
return (t) => {
|
|
1000
994
|
let n = setTimeout(() => {
|
|
1001
995
|
t(!1);
|
|
@@ -1005,29 +999,29 @@ function cr(e) {
|
|
|
1005
999
|
};
|
|
1006
1000
|
};
|
|
1007
1001
|
}
|
|
1008
|
-
function
|
|
1002
|
+
function or(e, t) {
|
|
1009
1003
|
e === 0 ? t() : requestAnimationFrame(() => {
|
|
1010
|
-
|
|
1004
|
+
or(e - 1, t);
|
|
1011
1005
|
});
|
|
1012
1006
|
}
|
|
1013
|
-
function
|
|
1007
|
+
function sr(e, t) {
|
|
1014
1008
|
if (e === void 0) return 0;
|
|
1015
1009
|
let n = t - 1, r = typeof e == "number" ? e : e.index === "LAST" ? n : e.index;
|
|
1016
1010
|
return Math.max(0, Math.min(r, n));
|
|
1017
1011
|
}
|
|
1018
|
-
function
|
|
1012
|
+
function cr(e) {
|
|
1019
1013
|
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);
|
|
1020
1014
|
}
|
|
1021
|
-
var
|
|
1015
|
+
var lr = q(([{ defaultItemSize: e, listRefresh: t, sizes: n }, { scrollTop: r }, { scrollTargetReached: i, scrollToIndex: a }, { didMount: o }]) => {
|
|
1022
1016
|
let s = G(!0), c = G(0), l = G(!0);
|
|
1023
|
-
return z(U(o, W(c), V(([e, t]) => !
|
|
1017
|
+
return z(U(o, W(c), V(([e, t]) => !cr(t)), Nt(!1)), s), z(U(o, W(c), V(([e, t]) => !cr(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]) => {
|
|
1024
1018
|
if (e === void 0) {
|
|
1025
1019
|
L(s, !0), L(l, !0);
|
|
1026
1020
|
return;
|
|
1027
1021
|
}
|
|
1028
1022
|
At(i, () => {
|
|
1029
1023
|
L(l, !0);
|
|
1030
|
-
}),
|
|
1024
|
+
}), or(4, () => {
|
|
1031
1025
|
At(r, () => {
|
|
1032
1026
|
L(s, !0);
|
|
1033
1027
|
}), L(a, e);
|
|
@@ -1037,11 +1031,11 @@ var fr = q(([{ defaultItemSize: e, listRefresh: t, sizes: n }, { scrollTop: r },
|
|
|
1037
1031
|
initialTopMostItemIndex: c,
|
|
1038
1032
|
scrolledToInitialItem: s
|
|
1039
1033
|
};
|
|
1040
|
-
}, F(
|
|
1041
|
-
function
|
|
1034
|
+
}, F(Qn, sn, ir, tr), { singleton: !0 });
|
|
1035
|
+
function ur(e, t) {
|
|
1042
1036
|
return Math.abs(e - t) < 1.01;
|
|
1043
1037
|
}
|
|
1044
|
-
var
|
|
1038
|
+
var dr = "up", fr = "down", pr = "none", mr = {
|
|
1045
1039
|
atBottom: !1,
|
|
1046
1040
|
notAtBottomBecause: "NOT_SHOWING_LAST_ITEM",
|
|
1047
1041
|
state: {
|
|
@@ -1050,8 +1044,8 @@ var mr = "up", hr = "down", gr = "none", _r = {
|
|
|
1050
1044
|
scrollTop: 0,
|
|
1051
1045
|
viewportHeight: 0
|
|
1052
1046
|
}
|
|
1053
|
-
},
|
|
1054
|
-
let o = G(!1), s = G(!0), c = K(), l = K(), u = G(4), d = G(
|
|
1047
|
+
}, hr = 0, gr = q(([{ footerHeight: e, headerHeight: t, scrollBy: n, scrollContainerState: r, scrollTop: i, viewportHeight: a }]) => {
|
|
1048
|
+
let o = G(!1), s = G(!0), c = K(), l = K(), u = G(4), d = G(hr), 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);
|
|
1055
1049
|
z(U(Wt(J(i), J(d)), H(([e, t]) => e <= t), B()), s), z(U(s, It(50)), l);
|
|
1056
1050
|
let m = Bt(U(Wt(r, J(a), J(t), J(e), J(u)), Pt((e, [{ scrollHeight: t, scrollTop: n }, r, i, a, o]) => {
|
|
1057
1051
|
let s = n + r - t > -o, c = {
|
|
@@ -1074,8 +1068,8 @@ var mr = "up", hr = "down", gr = "none", _r = {
|
|
|
1074
1068
|
notAtBottomBecause: l,
|
|
1075
1069
|
state: c
|
|
1076
1070
|
};
|
|
1077
|
-
},
|
|
1078
|
-
if (!
|
|
1071
|
+
}, mr), B((e, t) => e !== void 0 && e.atBottom === t.atBottom))), h = zt(U(r, Pt((e, { scrollHeight: t, scrollTop: n, viewportHeight: r }) => {
|
|
1072
|
+
if (!ur(e.scrollHeight, t)) {
|
|
1079
1073
|
let i = t - (n + r) < 1;
|
|
1080
1074
|
return e.scrollTop !== n && i ? {
|
|
1081
1075
|
changed: !0,
|
|
@@ -1102,17 +1096,17 @@ var mr = "up", hr = "down", gr = "none", _r = {
|
|
|
1102
1096
|
scrollTop: 0
|
|
1103
1097
|
}), V((e) => e.changed), H((e) => e.jump)), 0);
|
|
1104
1098
|
z(U(m, H((e) => e.atBottom)), o), z(U(o, It(50)), c);
|
|
1105
|
-
let g = G(
|
|
1099
|
+
let g = G(fr);
|
|
1106
1100
|
z(U(r, H(({ scrollTop: e }) => e), B(), Pt((e, t) => R(p) ? {
|
|
1107
1101
|
direction: e.direction,
|
|
1108
1102
|
prevScrollTop: t
|
|
1109
1103
|
} : {
|
|
1110
|
-
direction: t < e.prevScrollTop ?
|
|
1104
|
+
direction: t < e.prevScrollTop ? dr : fr,
|
|
1111
1105
|
prevScrollTop: t
|
|
1112
1106
|
}, {
|
|
1113
|
-
direction:
|
|
1107
|
+
direction: fr,
|
|
1114
1108
|
prevScrollTop: 0
|
|
1115
|
-
}), H((e) => e.direction)), g), z(U(r, It(50), Nt(
|
|
1109
|
+
}), H((e) => e.direction)), g), z(U(r, It(50), Nt(pr)), g);
|
|
1116
1110
|
let _ = G(0);
|
|
1117
1111
|
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)), _), {
|
|
1118
1112
|
atBottomState: m,
|
|
@@ -1127,31 +1121,31 @@ var mr = "up", hr = "down", gr = "none", _r = {
|
|
|
1127
1121
|
scrollDirection: g,
|
|
1128
1122
|
scrollVelocity: _
|
|
1129
1123
|
};
|
|
1130
|
-
}, F(
|
|
1131
|
-
function
|
|
1132
|
-
return typeof e == "number" ? n ===
|
|
1124
|
+
}, F(sn)), _r = "top", vr = "bottom", yr = "none";
|
|
1125
|
+
function br(e, t, n) {
|
|
1126
|
+
return typeof e == "number" ? n === dr && t === _r || n === fr && t === vr ? e : 0 : n === dr ? t === _r ? e.main : e.reverse : t === vr ? e.main : e.reverse;
|
|
1133
1127
|
}
|
|
1134
|
-
function
|
|
1128
|
+
function xr(e, t) {
|
|
1135
1129
|
return typeof e == "number" ? e : e[t] ?? 0;
|
|
1136
1130
|
}
|
|
1137
|
-
var
|
|
1131
|
+
var Sr = q(([{ deviation: e, fixedHeaderHeight: t, headerHeight: n, scrollTop: r, viewportHeight: i }]) => {
|
|
1138
1132
|
let a = K(), o = G(0), s = G(0), c = G(0);
|
|
1139
1133
|
return {
|
|
1140
1134
|
increaseViewportBy: s,
|
|
1141
1135
|
listBoundary: a,
|
|
1142
1136
|
overscan: c,
|
|
1143
1137
|
topListHeight: o,
|
|
1144
|
-
visibleRange: zt(U(Wt(J(r), J(i), J(n), J(a,
|
|
1145
|
-
let u = e - c, d = o + s, f = Math.max(n - u, 0), p =
|
|
1146
|
-
return r -= c, r += n + s, i += n + s, i -= c, r > e + d - m && (p =
|
|
1147
|
-
}), V((e) => e !== null), B(
|
|
1138
|
+
visibleRange: zt(U(Wt(J(r), J(i), J(n), J(a, kn), J(c), J(o), J(t), J(e), J(s)), H(([e, t, n, [r, i], a, o, s, c, l]) => {
|
|
1139
|
+
let u = e - c, d = o + s, f = Math.max(n - u, 0), p = yr, m = xr(l, _r), h = xr(l, vr);
|
|
1140
|
+
return r -= c, r += n + s, i += n + s, i -= c, r > e + d - m && (p = dr), i < e - f + t + h && (p = fr), p === yr ? null : [Math.max(u - n - br(a, _r, p) - m, 0), u - f - s + t + br(a, vr, p) + h];
|
|
1141
|
+
}), V((e) => e !== null), B(kn)), [0, 0])
|
|
1148
1142
|
};
|
|
1149
|
-
}, F(
|
|
1150
|
-
function
|
|
1151
|
-
if (
|
|
1152
|
-
let r =
|
|
1143
|
+
}, F(sn), { singleton: !0 });
|
|
1144
|
+
function Cr(e, t, n) {
|
|
1145
|
+
if (Fn(t)) {
|
|
1146
|
+
let r = Hn(e, t);
|
|
1153
1147
|
return [{
|
|
1154
|
-
index:
|
|
1148
|
+
index: dn(t.groupOffsetTree, r)[0],
|
|
1155
1149
|
offset: 0,
|
|
1156
1150
|
size: 0
|
|
1157
1151
|
}, {
|
|
@@ -1168,7 +1162,7 @@ function Er(e, t, n) {
|
|
|
1168
1162
|
size: 0
|
|
1169
1163
|
}];
|
|
1170
1164
|
}
|
|
1171
|
-
var
|
|
1165
|
+
var wr = {
|
|
1172
1166
|
bottom: 0,
|
|
1173
1167
|
firstItemIndex: 0,
|
|
1174
1168
|
items: [],
|
|
@@ -1179,7 +1173,7 @@ var Dr = {
|
|
|
1179
1173
|
topListHeight: 0,
|
|
1180
1174
|
totalCount: 0
|
|
1181
1175
|
};
|
|
1182
|
-
function
|
|
1176
|
+
function Tr(e, t, n, r, i, a) {
|
|
1183
1177
|
let { lastIndex: o, lastOffset: s, lastSize: c } = i, l = 0, u = 0;
|
|
1184
1178
|
if (e.length > 0) {
|
|
1185
1179
|
l = e[0].offset;
|
|
@@ -1190,37 +1184,37 @@ function Or(e, t, n, r, i, a) {
|
|
|
1190
1184
|
return {
|
|
1191
1185
|
bottom: u,
|
|
1192
1186
|
firstItemIndex: a,
|
|
1193
|
-
items:
|
|
1187
|
+
items: Dr(e, i, a),
|
|
1194
1188
|
offsetBottom: m,
|
|
1195
1189
|
offsetTop: l,
|
|
1196
1190
|
top: p,
|
|
1197
|
-
topItems:
|
|
1191
|
+
topItems: Dr(t, i, a),
|
|
1198
1192
|
topListHeight: t.reduce((e, t) => t.size + e, 0),
|
|
1199
1193
|
totalCount: n
|
|
1200
1194
|
};
|
|
1201
1195
|
}
|
|
1202
|
-
function
|
|
1196
|
+
function Er(e, t, n, r, i, a) {
|
|
1203
1197
|
let o = 0;
|
|
1204
1198
|
if (n.groupIndices.length > 0) for (let t of n.groupIndices) {
|
|
1205
1199
|
if (t - o >= e) break;
|
|
1206
1200
|
o++;
|
|
1207
1201
|
}
|
|
1208
|
-
let s = e + o, c =
|
|
1209
|
-
return
|
|
1202
|
+
let s = e + o, c = sr(t, s);
|
|
1203
|
+
return Tr(Array.from({ length: s }).map((e, t) => ({
|
|
1210
1204
|
data: a[t + c],
|
|
1211
1205
|
index: t + c,
|
|
1212
1206
|
offset: 0,
|
|
1213
1207
|
size: 0
|
|
1214
1208
|
})), [], s, i, n, r);
|
|
1215
1209
|
}
|
|
1216
|
-
function
|
|
1210
|
+
function Dr(e, t, n) {
|
|
1217
1211
|
if (e.length === 0) return [];
|
|
1218
|
-
if (!
|
|
1212
|
+
if (!Fn(t)) return e.map((e) => ({
|
|
1219
1213
|
...e,
|
|
1220
1214
|
index: e.index + n,
|
|
1221
1215
|
originalIndex: e.index
|
|
1222
1216
|
}));
|
|
1223
|
-
let r = e[0].index, i = e[e.length - 1].index, a = [], o =
|
|
1217
|
+
let r = e[0].index, i = e[e.length - 1].index, a = [], o = mn(t.groupOffsetTree, r, i), s, c = 0;
|
|
1224
1218
|
for (let r of e) {
|
|
1225
1219
|
(!s || s.end < r.index) && (s = o.shift(), c = t.groupIndices.indexOf(s.start));
|
|
1226
1220
|
let e;
|
|
@@ -1240,30 +1234,30 @@ function Ar(e, t, n) {
|
|
|
1240
1234
|
}
|
|
1241
1235
|
return a;
|
|
1242
1236
|
}
|
|
1243
|
-
function
|
|
1237
|
+
function Or(e, t) {
|
|
1244
1238
|
return e === void 0 ? 0 : typeof e == "number" ? e : e[t] ?? 0;
|
|
1245
1239
|
}
|
|
1246
|
-
var
|
|
1240
|
+
var kr = 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 }]) => {
|
|
1247
1241
|
let h = G([]), g = G(0), _ = K(), v = G(0);
|
|
1248
1242
|
z(a.topItemsIndexes, h);
|
|
1249
|
-
let y = zt(U(Wt(p, m, J(c,
|
|
1243
|
+
let y = zt(U(Wt(p, m, J(c, kn), J(i), J(r), J(l), u, J(h), J(t), J(n), J(v), e), V(([e, t, , n, , , , , , , , r]) => {
|
|
1250
1244
|
let i = r !== void 0 && r.length !== n;
|
|
1251
1245
|
return e && !t && !i;
|
|
1252
1246
|
}), H(([, , [e, t], n, r, i, a, o, s, c, l, u]) => {
|
|
1253
1247
|
let d = r, { offsetTree: f, sizeTree: p } = d, m = R(g);
|
|
1254
1248
|
if (n === 0) return {
|
|
1255
|
-
...
|
|
1249
|
+
...wr,
|
|
1256
1250
|
totalCount: n
|
|
1257
1251
|
};
|
|
1258
1252
|
if (e === 0 && t === 0) return m === 0 ? {
|
|
1259
|
-
...
|
|
1253
|
+
...wr,
|
|
1260
1254
|
totalCount: n
|
|
1261
|
-
} :
|
|
1262
|
-
if (Y(p)) return m > 0 ? null :
|
|
1255
|
+
} : Er(m, i, r, s, c, u || []);
|
|
1256
|
+
if (Y(p)) return m > 0 ? null : Tr(Cr(sr(i, n), d, u), [], n, c, d, s);
|
|
1263
1257
|
let h = [];
|
|
1264
1258
|
if (o.length > 0) {
|
|
1265
1259
|
let e = o[0], t = o[o.length - 1], n = 0;
|
|
1266
|
-
for (let r of
|
|
1260
|
+
for (let r of mn(p, e, t)) {
|
|
1267
1261
|
let i = r.value, a = Math.max(r.start, e), o = Math.min(r.end, t);
|
|
1268
1262
|
for (let e = a; e <= o; e++) h.push({
|
|
1269
1263
|
data: u?.[e],
|
|
@@ -1273,8 +1267,8 @@ var Mr = q(([{ data: e, firstItemIndex: t, gap: n, sizes: r, totalCount: i }, a,
|
|
|
1273
1267
|
}), n += i;
|
|
1274
1268
|
}
|
|
1275
1269
|
}
|
|
1276
|
-
if (!a) return
|
|
1277
|
-
let _ = o.length > 0 ? o[o.length - 1] + 1 : 0, v =
|
|
1270
|
+
if (!a) return Tr([], h, n, c, d, s);
|
|
1271
|
+
let _ = o.length > 0 ? o[o.length - 1] + 1 : 0, v = Wn(f, e, t, _);
|
|
1278
1272
|
if (v.length === 0) return null;
|
|
1279
1273
|
let y = n - 1, b = Dt([], (n) => {
|
|
1280
1274
|
for (let r of v) {
|
|
@@ -1293,13 +1287,13 @@ var Mr = q(([{ data: e, firstItemIndex: t, gap: n, sizes: r, totalCount: i }, a,
|
|
|
1293
1287
|
size: s
|
|
1294
1288
|
}), a += s + c;
|
|
1295
1289
|
}
|
|
1296
|
-
}), x =
|
|
1290
|
+
}), x = Or(l, _r), S = Or(l, vr);
|
|
1297
1291
|
if (b.length > 0 && (x > 0 || S > 0)) {
|
|
1298
1292
|
let e = b[0], t = b[b.length - 1];
|
|
1299
1293
|
if (x > 0 && e.index > _) {
|
|
1300
1294
|
let t = Math.min(x, e.index - _), n = [], r = e.offset;
|
|
1301
1295
|
for (let i = e.index - 1; i >= e.index - t; i--) {
|
|
1302
|
-
let t =
|
|
1296
|
+
let t = mn(p, i, i)[0]?.value ?? e.size;
|
|
1303
1297
|
r -= t + c, n.unshift({
|
|
1304
1298
|
data: u?.[i],
|
|
1305
1299
|
index: i,
|
|
@@ -1312,7 +1306,7 @@ var Mr = q(([{ data: e, firstItemIndex: t, gap: n, sizes: r, totalCount: i }, a,
|
|
|
1312
1306
|
if (S > 0 && t.index < y) {
|
|
1313
1307
|
let e = Math.min(S, y - t.index), n = t.offset + t.size + c;
|
|
1314
1308
|
for (let r = t.index + 1; r <= t.index + e; r++) {
|
|
1315
|
-
let e =
|
|
1309
|
+
let e = mn(p, r, r)[0]?.value ?? t.size;
|
|
1316
1310
|
b.push({
|
|
1317
1311
|
data: u?.[r],
|
|
1318
1312
|
index: r,
|
|
@@ -1322,10 +1316,10 @@ var Mr = q(([{ data: e, firstItemIndex: t, gap: n, sizes: r, totalCount: i }, a,
|
|
|
1322
1316
|
}
|
|
1323
1317
|
}
|
|
1324
1318
|
}
|
|
1325
|
-
return
|
|
1326
|
-
}), V((e) => e !== null), B()),
|
|
1319
|
+
return Tr(b, h, n, c, d, s);
|
|
1320
|
+
}), V((e) => e !== null), B()), wr);
|
|
1327
1321
|
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)), _);
|
|
1328
|
-
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(
|
|
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(kn), 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()));
|
|
1329
1323
|
return {
|
|
1330
1324
|
endReached: b,
|
|
1331
1325
|
initialItemCount: g,
|
|
@@ -1340,24 +1334,24 @@ var Mr = q(([{ data: e, firstItemIndex: t, gap: n, sizes: r, totalCount: i }, a,
|
|
|
1340
1334
|
endIndex: e[n].index,
|
|
1341
1335
|
startIndex: e[t].index
|
|
1342
1336
|
};
|
|
1343
|
-
}), B(
|
|
1337
|
+
}), B(On))),
|
|
1344
1338
|
startReached: x,
|
|
1345
1339
|
topItemsIndexes: h,
|
|
1346
1340
|
...f
|
|
1347
1341
|
};
|
|
1348
|
-
}, F(
|
|
1342
|
+
}, F(Qn, er, Sr, lr, ir, gr, tr, An), { singleton: !0 }), Ar = q(([{ fixedFooterHeight: e, fixedHeaderHeight: t, footerHeight: n, headerHeight: r }, { listState: i }]) => {
|
|
1349
1343
|
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);
|
|
1350
1344
|
return z(J(o), a), {
|
|
1351
1345
|
totalListHeight: o,
|
|
1352
1346
|
totalListHeightChanged: a
|
|
1353
1347
|
};
|
|
1354
|
-
}, F(
|
|
1348
|
+
}, F(sn, kr), { singleton: !0 }), jr = q(([{ viewportHeight: e }, { totalListHeight: t }]) => {
|
|
1355
1349
|
let n = G(!1);
|
|
1356
1350
|
return {
|
|
1357
1351
|
alignToBottom: n,
|
|
1358
1352
|
paddingTopAddition: zt(U(Wt(n, e, t), V(([e]) => e), H(([, e, t]) => Math.max(0, e - t)), It(0), B()), 0)
|
|
1359
1353
|
};
|
|
1360
|
-
}, F(
|
|
1354
|
+
}, F(sn, Ar), { singleton: !0 }), Mr = q(() => ({ context: G(null) })), Nr = ({ itemBottom: e, itemTop: t, locationParams: { align: n, behavior: r, ...i }, viewportBottom: a, viewportTop: o }) => t < o ? {
|
|
1361
1355
|
...i,
|
|
1362
1356
|
align: n ?? "start",
|
|
1363
1357
|
...r === void 0 ? {} : { behavior: r }
|
|
@@ -1365,10 +1359,10 @@ var Mr = q(([{ data: e, firstItemIndex: t, gap: n, sizes: r, totalCount: i }, a,
|
|
|
1365
1359
|
...i,
|
|
1366
1360
|
align: n ?? "end",
|
|
1367
1361
|
...r === void 0 ? {} : { behavior: r }
|
|
1368
|
-
} : null,
|
|
1362
|
+
} : null, Pr = q(([{ gap: e, sizes: t, totalCount: n }, { fixedFooterHeight: r, fixedHeaderHeight: i, headerHeight: a, scrollingInProgress: o, scrollTop: s, viewportHeight: c }, { scrollToIndex: l }]) => {
|
|
1369
1363
|
let u = K();
|
|
1370
1364
|
return z(U(u, W(t, c, n, a, i, r, s), W(e), H(([[e, t, n, r, i, a, s, c], l]) => {
|
|
1371
|
-
let { calculateViewLocation: u =
|
|
1365
|
+
let { calculateViewLocation: u = Nr, done: d, ...f } = e, p = Un(e, t, r - 1), m = Vn(p, t.offsetTree, l) + i + a, h = m + dn(t.sizeTree, p)[1], g = c + a, _ = u({
|
|
1372
1366
|
itemBottom: h,
|
|
1373
1367
|
itemTop: m,
|
|
1374
1368
|
locationParams: f,
|
|
@@ -1377,11 +1371,11 @@ var Mr = q(([{ data: e, firstItemIndex: t, gap: n, sizes: r, totalCount: i }, a,
|
|
|
1377
1371
|
});
|
|
1378
1372
|
return _ === null ? d?.() : d && At(U(o, V((e) => !e), Ft(R(o) ? 1 : 2)), d), _;
|
|
1379
1373
|
}), V((e) => e !== null)), l), { scrollIntoView: u };
|
|
1380
|
-
}, F(
|
|
1381
|
-
function
|
|
1374
|
+
}, F(Qn, sn, ir, kr, Yt), { singleton: !0 });
|
|
1375
|
+
function Fr(e) {
|
|
1382
1376
|
return e === !1 ? !1 : e === "smooth" ? "smooth" : "auto";
|
|
1383
1377
|
}
|
|
1384
|
-
var
|
|
1378
|
+
var Ir = (e, t) => typeof e == "function" ? Fr(e(t)) : t && Fr(e), Lr = 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 }]) => {
|
|
1385
1379
|
let m = G(!1), h = K(), g = null;
|
|
1386
1380
|
function _(e) {
|
|
1387
1381
|
L(o, {
|
|
@@ -1392,7 +1386,7 @@ var zr = (e, t) => typeof e == "function" ? Rr(e(t)) : t && Rr(e), Br = q(([{ li
|
|
|
1392
1386
|
}
|
|
1393
1387
|
I(U(Wt(U(J(t), Ft(1)), c), W(J(m), a, s, d), H(([[e, t], n, r, i, a]) => {
|
|
1394
1388
|
let o = t && i, s = "auto";
|
|
1395
|
-
return o && (s =
|
|
1389
|
+
return o && (s = Ir(n, r || a), o &&= s !== !1), {
|
|
1396
1390
|
followOutputBehavior: s,
|
|
1397
1391
|
shouldFollow: o,
|
|
1398
1392
|
totalCount: e
|
|
@@ -1439,7 +1433,7 @@ var zr = (e, t) => typeof e == "function" ? Rr(e(t)) : t && Rr(e), Br = q(([{ li
|
|
|
1439
1433
|
followOutput: m,
|
|
1440
1434
|
scrollIntoViewOnChange: y
|
|
1441
1435
|
};
|
|
1442
|
-
}, F(
|
|
1436
|
+
}, F(Qn, gr, ir, lr, tr, Yt, sn, Mr, Pr)), Rr = 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 = []]) => Er(e, t, n, r, i, a))), o), {}), F(Qn, lr, kr, tr), { singleton: !0 }), zr = q(([{ didMount: e }, { scrollTo: t }, { listState: n }]) => {
|
|
1443
1437
|
let r = G(0);
|
|
1444
1438
|
return I(U(e, W(r), V(([, e]) => e !== 0), H(([, e]) => ({ top: e }))), (e) => {
|
|
1445
1439
|
At(U(n, Ft(1), V((e) => e.items.length > 1)), () => {
|
|
@@ -1448,7 +1442,7 @@ var zr = (e, t) => typeof e == "function" ? Rr(e(t)) : t && Rr(e), Br = q(([{ li
|
|
|
1448
1442
|
});
|
|
1449
1443
|
});
|
|
1450
1444
|
}), { initialScrollTop: r };
|
|
1451
|
-
}, F(
|
|
1445
|
+
}, F(tr, sn, kr), { singleton: !0 }), Br = q(([{ scrollVelocity: e }]) => {
|
|
1452
1446
|
let t = G(!1), n = K(), r = G(!1);
|
|
1453
1447
|
return z(U(e, W(r, t, n), V(([e, t]) => t !== !1 && t !== void 0), H(([e, t, n, r]) => {
|
|
1454
1448
|
let { enter: i, exit: a } = t;
|
|
@@ -1464,7 +1458,7 @@ var zr = (e, t) => typeof e == "function" ? Rr(e(t)) : t && Rr(e), Br = q(([{ li
|
|
|
1464
1458
|
scrollSeekRangeChanged: n,
|
|
1465
1459
|
scrollVelocity: e
|
|
1466
1460
|
};
|
|
1467
|
-
}, F(
|
|
1461
|
+
}, F(gr), { singleton: !0 }), Vr = q(([{ scrollContainerState: e, scrollTo: t }]) => {
|
|
1468
1462
|
let n = K(), r = K(), i = K(), a = G(!1), o = G(void 0);
|
|
1469
1463
|
return z(U(Wt(n, r), H(([{ scrollTop: e, viewportHeight: t }, { offsetTop: n, listHeight: r }]) => ({
|
|
1470
1464
|
scrollHeight: r,
|
|
@@ -1480,37 +1474,37 @@ var zr = (e, t) => typeof e == "function" ? Rr(e(t)) : t && Rr(e), Br = q(([{ li
|
|
|
1480
1474
|
windowScrollTo: i,
|
|
1481
1475
|
windowViewportRect: r
|
|
1482
1476
|
};
|
|
1483
|
-
}, F(
|
|
1477
|
+
}, F(sn)), Hr = q(([{ sizeRanges: e, sizes: t }, { headerHeight: n, scrollTop: r }, { initialTopMostItemIndex: i }, { didMount: a }, { useWindowScroll: o, windowScrollContainerState: s, windowViewportRect: c }]) => {
|
|
1484
1478
|
let l = K(), u = G(void 0), d = G(null), f = G(null);
|
|
1485
1479
|
return z(s, d), z(c, f), I(U(l, W(t, r, o, d, f, n)), ([e, t, n, r, i, a, o]) => {
|
|
1486
|
-
let s =
|
|
1480
|
+
let s = Kn(t.sizeTree);
|
|
1487
1481
|
r && i !== null && a !== null && (n = i.scrollTop - a.offsetTop), n -= o, e({
|
|
1488
1482
|
ranges: s,
|
|
1489
1483
|
scrollTop: n
|
|
1490
1484
|
});
|
|
1491
|
-
}), z(U(u, V(wt), H(
|
|
1485
|
+
}), z(U(u, V(wt), H(Ur)), i), z(U(a, W(u), V(([, e]) => e !== void 0), B(), H(([, e]) => e.ranges)), e), {
|
|
1492
1486
|
getState: l,
|
|
1493
1487
|
restoreStateFrom: u
|
|
1494
1488
|
};
|
|
1495
|
-
}, F(
|
|
1496
|
-
function
|
|
1489
|
+
}, F(Qn, sn, lr, tr, Vr));
|
|
1490
|
+
function Ur(e) {
|
|
1497
1491
|
return {
|
|
1498
1492
|
align: "start",
|
|
1499
1493
|
index: 0,
|
|
1500
1494
|
offset: e.scrollTop
|
|
1501
1495
|
};
|
|
1502
1496
|
}
|
|
1503
|
-
var
|
|
1497
|
+
var Wr = q(([{ topItemsIndexes: e }]) => {
|
|
1504
1498
|
let t = G(0);
|
|
1505
1499
|
return z(U(t, V((e) => e >= 0), H((e) => Array.from({ length: e }).map((e, t) => t))), e), { topItemCount: t };
|
|
1506
|
-
}, F(
|
|
1507
|
-
function
|
|
1500
|
+
}, F(kr));
|
|
1501
|
+
function Gr(e) {
|
|
1508
1502
|
let t = !1, n;
|
|
1509
1503
|
return (() => (t || (t = !0, n = e()), n));
|
|
1510
1504
|
}
|
|
1511
|
-
var
|
|
1512
|
-
let { listState: E, minOverscanItemCount: ee, topItemsIndexes: te, rangeChanged: ne, ...
|
|
1513
|
-
return z(ne, T.scrollSeekRangeChanged), z(U(T.windowViewportRect, H((e) => e.visibleHeight)), _.viewportHeight), {
|
|
1505
|
+
var Kr = Gr(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(navigator.userAgent)), qr = 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
|
+
let { listState: E, minOverscanItemCount: ee, topItemsIndexes: te, rangeChanged: ne, ...D } = b;
|
|
1507
|
+
return z(ne, T.scrollSeekRangeChanged), z(U(Wt(T.windowViewportRect, _.headerHeight, _.fixedHeaderHeight), H(([e, t, n]) => Math.max(t + n + 1, e.visibleHeight))), _.viewportHeight), {
|
|
1514
1508
|
data: e,
|
|
1515
1509
|
defaultItemHeight: t,
|
|
1516
1510
|
firstItemIndex: n,
|
|
@@ -1535,13 +1529,13 @@ var Yr = Jr(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(
|
|
|
1535
1529
|
statefulTotalCount: d,
|
|
1536
1530
|
trackItemSizes: p,
|
|
1537
1531
|
rangeChanged: ne,
|
|
1538
|
-
...
|
|
1532
|
+
...D,
|
|
1539
1533
|
...T,
|
|
1540
1534
|
..._,
|
|
1541
1535
|
sizes: u,
|
|
1542
1536
|
...v
|
|
1543
1537
|
};
|
|
1544
|
-
}, F(
|
|
1538
|
+
}, F(Qn, lr, sn, Hr, Lr, kr, ir, q(([{ deviation: e, scrollBy: t, scrollingInProgress: n, scrollTop: r }, { isAtBottom: i, isScrolling: a, lastJumpDueToItemResize: o, scrollDirection: s }, { listState: c }, { beforeUnshiftWith: l, gap: u, shiftWithOffset: d, sizes: f }, { log: p }, { recalcInProgress: m }]) => {
|
|
1545
1539
|
let h = Bt(U(c, W(o), Pt(([, e, t, n], [{ bottom: r, items: i, offsetBottom: a, totalCount: o }, s]) => {
|
|
1546
1540
|
let c = r + a, l = 0;
|
|
1547
1541
|
return t === o && e.length > 0 && i.length > 0 && (i[0].originalIndex === 0 && e[0].originalIndex === 0 || (l = c - n, l !== 0 && (l += s))), [
|
|
@@ -1555,7 +1549,7 @@ var Yr = Jr(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(
|
|
|
1555
1549
|
[],
|
|
1556
1550
|
0,
|
|
1557
1551
|
0
|
|
1558
|
-
]), V(([e]) => e !== 0), W(r, s, n, i, p, m), V(([, e, t, n, , , r]) => !r && !n && e !== 0 && t ===
|
|
1552
|
+
]), V(([e]) => e !== 0), W(r, s, n, i, p, m), V(([, e, t, n, , , r]) => !r && !n && e !== 0 && t === dr), H(([[e], , , , , t]) => (t("Upward scrolling compensation", { amount: e }, Kt.DEBUG), e))));
|
|
1559
1553
|
function g(n) {
|
|
1560
1554
|
n > 0 ? (L(t, {
|
|
1561
1555
|
behavior: "auto",
|
|
@@ -1566,16 +1560,16 @@ var Yr = Jr(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(
|
|
|
1566
1560
|
}));
|
|
1567
1561
|
}
|
|
1568
1562
|
return I(U(h, W(e, a)), ([t, n, r]) => {
|
|
1569
|
-
r &&
|
|
1563
|
+
r && Kr() ? L(e, n - t) : g(-t);
|
|
1570
1564
|
}), I(U(Wt(zt(a, !1), e, m), V(([e, t, n]) => !e && !n && t !== 0), H(([e, t]) => t), It(1)), g), z(U(d, H((e) => ({ top: -e }))), t), I(U(l, W(f, u), H(([e, { groupIndices: t, lastSize: n, sizeTree: r }, i]) => {
|
|
1571
1565
|
function a(e) {
|
|
1572
1566
|
return e * (n + i);
|
|
1573
1567
|
}
|
|
1574
1568
|
if (t.length === 0) return a(e);
|
|
1575
|
-
let o = 0, s =
|
|
1569
|
+
let o = 0, s = un(r, 0), c = 0, l = 0;
|
|
1576
1570
|
for (; c < e;) {
|
|
1577
1571
|
c++, o += s;
|
|
1578
|
-
let n = t.length === l + 1 ?
|
|
1572
|
+
let n = t.length === l + 1 ? 1 / 0 : t[l + 1] - t[l] - 1;
|
|
1579
1573
|
c + n > e && (o -= s, n = e - c + 1), c += n, o += a(n), l++;
|
|
1580
1574
|
}
|
|
1581
1575
|
return o;
|
|
@@ -1586,7 +1580,7 @@ var Yr = Jr(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(
|
|
|
1586
1580
|
});
|
|
1587
1581
|
});
|
|
1588
1582
|
}), { deviation: e };
|
|
1589
|
-
}, F(
|
|
1583
|
+
}, F(sn, gr, kr, Qn, Yt, An)), Wr, er, q(([e, t, n, r, i, a, o, s, c, l, u]) => ({
|
|
1590
1584
|
...e,
|
|
1591
1585
|
...t,
|
|
1592
1586
|
...n,
|
|
@@ -1598,15 +1592,15 @@ var Yr = Jr(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(
|
|
|
1598
1592
|
...c,
|
|
1599
1593
|
...l,
|
|
1600
1594
|
...u
|
|
1601
|
-
}), F(
|
|
1602
|
-
function
|
|
1595
|
+
}), F(Sr, Rr, tr, Br, Ar, zr, jr, Vr, Pr, Yt, Mr))));
|
|
1596
|
+
function Jr(e, t) {
|
|
1603
1597
|
let n = {}, r = {}, i = 0, a = e.length;
|
|
1604
1598
|
for (; i < a;) r[e[i]] = 1, i += 1;
|
|
1605
1599
|
for (let e in t) Object.hasOwn(r, e) || (n[e] = t[e]);
|
|
1606
1600
|
return n;
|
|
1607
1601
|
}
|
|
1608
|
-
var
|
|
1609
|
-
function
|
|
1602
|
+
var Yr = typeof document > "u" ? A.useEffect : A.useLayoutEffect;
|
|
1603
|
+
function Xr(e, t, n) {
|
|
1610
1604
|
let r = Object.keys(t.required || {}), i = Object.keys(t.optional || {}), a = Object.keys(t.methods || {}), o = Object.keys(t.events || {}), s = A.createContext({});
|
|
1611
1605
|
function c(e, n) {
|
|
1612
1606
|
e.propsReady !== void 0 && L(e.propsReady, !1);
|
|
@@ -1634,7 +1628,7 @@ function $r(e, t, n) {
|
|
|
1634
1628
|
let { children: d, ...f } = t, [p] = A.useState(() => Dt(Ut(e), (e) => {
|
|
1635
1629
|
c(e, f);
|
|
1636
1630
|
})), [m] = A.useState(St(u, p));
|
|
1637
|
-
|
|
1631
|
+
Yr(() => {
|
|
1638
1632
|
for (let e of o) e in f && I(m[e], f[e]);
|
|
1639
1633
|
return () => {
|
|
1640
1634
|
Object.values(m).map(kt);
|
|
@@ -1643,14 +1637,14 @@ function $r(e, t, n) {
|
|
|
1643
1637
|
f,
|
|
1644
1638
|
m,
|
|
1645
1639
|
p
|
|
1646
|
-
]),
|
|
1640
|
+
]), Yr(() => {
|
|
1647
1641
|
c(p, f);
|
|
1648
1642
|
}), A.useImperativeHandle(a, yt(l(p)));
|
|
1649
1643
|
let h = n;
|
|
1650
1644
|
return /* @__PURE__ */ N(s.Provider, {
|
|
1651
1645
|
value: p,
|
|
1652
1646
|
children: n === void 0 ? d : /* @__PURE__ */ N(h, {
|
|
1653
|
-
...
|
|
1647
|
+
...Jr([
|
|
1654
1648
|
...r,
|
|
1655
1649
|
...i,
|
|
1656
1650
|
...o
|
|
@@ -1661,14 +1655,14 @@ function $r(e, t, n) {
|
|
|
1661
1655
|
}),
|
|
1662
1656
|
useEmitter: (e, t) => {
|
|
1663
1657
|
let n = A.useContext(s)[e];
|
|
1664
|
-
|
|
1658
|
+
Yr(() => I(n, t), [t, n]);
|
|
1665
1659
|
},
|
|
1666
1660
|
useEmitterValue: parseInt(A.version, 10) >= 18 ? (e) => {
|
|
1667
1661
|
let t = A.useContext(s)[e], n = A.useCallback((e) => I(t, e), [t]);
|
|
1668
1662
|
return A.useSyncExternalStore(n, () => R(t), () => R(t));
|
|
1669
1663
|
} : (e) => {
|
|
1670
1664
|
let t = A.useContext(s)[e], [n, r] = A.useState(St(R, t));
|
|
1671
|
-
return
|
|
1665
|
+
return Yr(() => I(t, (e) => {
|
|
1672
1666
|
e !== n && r(yt(e));
|
|
1673
1667
|
}), [t, n]), n;
|
|
1674
1668
|
},
|
|
@@ -1680,24 +1674,24 @@ function $r(e, t, n) {
|
|
|
1680
1674
|
}
|
|
1681
1675
|
};
|
|
1682
1676
|
}
|
|
1683
|
-
var
|
|
1684
|
-
if (typeof document > "u") return
|
|
1677
|
+
var Zr = A.createContext(void 0), Qr = A.createContext(void 0), $r = "-webkit-sticky", ei = "sticky", ti = Gr(() => {
|
|
1678
|
+
if (typeof document > "u") return ei;
|
|
1685
1679
|
let e = document.createElement("div");
|
|
1686
|
-
return e.style.position =
|
|
1687
|
-
}),
|
|
1688
|
-
function
|
|
1680
|
+
return e.style.position = $r, e.style.position === $r ? $r : ei;
|
|
1681
|
+
}), ni = typeof document > "u" ? A.useEffect : A.useLayoutEffect;
|
|
1682
|
+
function ri(e) {
|
|
1689
1683
|
return "self" in e;
|
|
1690
1684
|
}
|
|
1691
|
-
function
|
|
1685
|
+
function ii(e) {
|
|
1692
1686
|
return "body" in e;
|
|
1693
1687
|
}
|
|
1694
|
-
function
|
|
1688
|
+
function ai(e, t, n, r = Et, i, a) {
|
|
1695
1689
|
let o = A.useRef(null), s = A.useRef(null), c = A.useRef(null), l = A.useCallback((n) => {
|
|
1696
1690
|
let r, i, o, l = n.target;
|
|
1697
|
-
if (
|
|
1698
|
-
let e =
|
|
1699
|
-
o = a === !0 ?
|
|
1700
|
-
} else o = a === !0 ?
|
|
1691
|
+
if (ii(l) || ri(l)) {
|
|
1692
|
+
let e = ri(l) ? l : l.defaultView;
|
|
1693
|
+
o = a === !0 ? Qt(e, e.scrollX) : e.scrollY, r = a === !0 ? e.document.documentElement.scrollWidth : e.document.documentElement.scrollHeight, i = a === !0 ? e.innerWidth : e.innerHeight;
|
|
1694
|
+
} else o = a === !0 ? Qt(l, l.scrollLeft) : l.scrollTop, r = a === !0 ? l.scrollWidth : l.scrollHeight, i = a === !0 ? l.offsetWidth : l.offsetHeight;
|
|
1701
1695
|
let u = () => {
|
|
1702
1696
|
e({
|
|
1703
1697
|
scrollHeight: r,
|
|
@@ -1705,7 +1699,7 @@ function ci(e, t, n, r = Et, i, a) {
|
|
|
1705
1699
|
viewportHeight: i
|
|
1706
1700
|
});
|
|
1707
1701
|
};
|
|
1708
|
-
n.suppressFlushSync === !0 ? u() :
|
|
1702
|
+
n.suppressFlushSync === !0 ? u() : Be.flushSync(u), s.current !== null && (o === s.current || o <= 0 || o === r - i) && (s.current = null, t(!0), c.current &&= (clearTimeout(c.current), null));
|
|
1709
1703
|
}, [
|
|
1710
1704
|
e,
|
|
1711
1705
|
t,
|
|
@@ -1713,11 +1707,11 @@ function ci(e, t, n, r = Et, i, a) {
|
|
|
1713
1707
|
]);
|
|
1714
1708
|
A.useEffect(() => {
|
|
1715
1709
|
let e = i ?? o.current;
|
|
1716
|
-
return
|
|
1710
|
+
return r(i ?? o.current), l({
|
|
1717
1711
|
suppressFlushSync: !0,
|
|
1718
1712
|
target: e
|
|
1719
1713
|
}), e.addEventListener("scroll", l, { passive: !0 }), () => {
|
|
1720
|
-
|
|
1714
|
+
r(null), e.removeEventListener("scroll", l);
|
|
1721
1715
|
};
|
|
1722
1716
|
}, [
|
|
1723
1717
|
o,
|
|
@@ -1730,14 +1724,14 @@ function ci(e, t, n, r = Et, i, a) {
|
|
|
1730
1724
|
let r = o.current;
|
|
1731
1725
|
if (!r || (a === !0 ? "offsetWidth" in r && r.offsetWidth === 0 : "offsetHeight" in r && r.offsetHeight === 0)) return;
|
|
1732
1726
|
let i = n.behavior === "smooth", l, u, d;
|
|
1733
|
-
|
|
1727
|
+
ri(r) ? (u = Math.max(Pn(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 = Pn(r, a === !0 ? "width" : "height"), d = a === !0 ? Qt(r, r.scrollLeft) : r.scrollTop);
|
|
1734
1728
|
let f = u - l;
|
|
1735
1729
|
if (n.top === void 0) {
|
|
1736
1730
|
r.scrollTo(n);
|
|
1737
1731
|
return;
|
|
1738
1732
|
}
|
|
1739
1733
|
let p = Math.ceil(Math.max(Math.min(f, n.top), 0));
|
|
1740
|
-
if (n.top = p,
|
|
1734
|
+
if (n.top = p, ur(l, u) || p === d) {
|
|
1741
1735
|
e({
|
|
1742
1736
|
scrollHeight: u,
|
|
1743
1737
|
scrollTop: d,
|
|
@@ -1749,13 +1743,13 @@ function ci(e, t, n, r = Et, i, a) {
|
|
|
1749
1743
|
c.current = null, s.current = null, t(!0);
|
|
1750
1744
|
}, 1e3)) : s.current = null, a === !0 && (n = {
|
|
1751
1745
|
...n.behavior === void 0 ? {} : { behavior: n.behavior },
|
|
1752
|
-
left:
|
|
1746
|
+
left: $t(r, p)
|
|
1753
1747
|
}), r.scrollTo(n);
|
|
1754
1748
|
}
|
|
1755
1749
|
function d(e) {
|
|
1756
1750
|
a === !0 && (e = {
|
|
1757
1751
|
...e.behavior === void 0 ? {} : { behavior: e.behavior },
|
|
1758
|
-
...e.top === void 0 ? {} : { left:
|
|
1752
|
+
...e.top === void 0 ? {} : { left: $t(o.current, e.top) }
|
|
1759
1753
|
}), o.current.scrollBy(e);
|
|
1760
1754
|
}
|
|
1761
1755
|
return {
|
|
@@ -1764,14 +1758,14 @@ function ci(e, t, n, r = Et, i, a) {
|
|
|
1764
1758
|
scrollToCallback: u
|
|
1765
1759
|
};
|
|
1766
1760
|
}
|
|
1767
|
-
function
|
|
1761
|
+
function oi(e) {
|
|
1768
1762
|
return e;
|
|
1769
1763
|
}
|
|
1770
|
-
var
|
|
1764
|
+
var si = /* @__PURE__ */ q(([e, t]) => ({
|
|
1771
1765
|
...e,
|
|
1772
1766
|
...t
|
|
1773
|
-
}), F(
|
|
1774
|
-
let e = G((e) => `Item ${e}`), t = G((e) => `Group ${e}`), n = G({}), r = G(
|
|
1767
|
+
}), F(qr, /* @__PURE__ */ q(() => {
|
|
1768
|
+
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);
|
|
1775
1769
|
return {
|
|
1776
1770
|
components: n,
|
|
1777
1771
|
computeItemKey: r,
|
|
@@ -1789,20 +1783,20 @@ var ui = /* @__PURE__ */ q(([e, t]) => ({
|
|
|
1789
1783
|
ScrollSeekPlaceholder: o("ScrollSeekPlaceholder"),
|
|
1790
1784
|
TopItemListComponent: o("TopItemList")
|
|
1791
1785
|
};
|
|
1792
|
-
}))),
|
|
1786
|
+
}))), ci = ({ height: e }) => /* @__PURE__ */ N("div", { style: { height: e } }), li = {
|
|
1793
1787
|
overflowAnchor: "none",
|
|
1794
|
-
position:
|
|
1788
|
+
position: ti(),
|
|
1795
1789
|
zIndex: 1
|
|
1796
|
-
},
|
|
1797
|
-
...
|
|
1790
|
+
}, ui = { overflowAnchor: "none" }, di = {
|
|
1791
|
+
...ui,
|
|
1798
1792
|
display: "inline-block",
|
|
1799
1793
|
height: "100%"
|
|
1800
|
-
},
|
|
1801
|
-
let t = Z("listState"), n =
|
|
1802
|
-
|
|
1794
|
+
}, fi = /* @__PURE__ */ A.memo(function({ showTopList: e = !1 }) {
|
|
1795
|
+
let t = Z("listState"), n = Oi("sizeRanges"), r = Z("useWindowScroll"), i = Z("customScrollParent"), a = Oi("windowScrollContainerState"), o = Oi("scrollContainerState"), s = i || r ? a : o, c = Z("itemContent"), l = Z("context"), u = Z("groupContent"), d = Z("trackItemSizes"), f = Z("itemSize"), p = Z("log"), m = Oi("gap"), h = Z("horizontalDirection"), { callbackRef: g } = nn(n, f, d, e ? Et : s, p, m, i, h, Z("skipAnimationFrameInResizeObserver")), [_, v] = A.useState(0);
|
|
1796
|
+
Di("deviation", (e) => {
|
|
1803
1797
|
_ !== e && v(e);
|
|
1804
1798
|
});
|
|
1805
|
-
let y = Z("EmptyPlaceholder"), b = Z("ScrollSeekPlaceholder") ??
|
|
1799
|
+
let y = Z("EmptyPlaceholder"), b = Z("ScrollSeekPlaceholder") ?? ci, x = Z("ListComponent"), S = Z("ItemComponent"), C = Z("GroupComponent"), w = Z("computeItemKey"), T = Z("isSeeking"), E = Z("groupIndices").length > 0, ee = Z("alignToBottom"), te = Z("initialItemFinalLocationReached"), ne = e ? {} : {
|
|
1806
1800
|
boxSizing: "border-box",
|
|
1807
1801
|
...h ? {
|
|
1808
1802
|
display: "inline-block",
|
|
@@ -1825,43 +1819,43 @@ var ui = /* @__PURE__ */ q(([e, t]) => ({
|
|
|
1825
1819
|
style: ne,
|
|
1826
1820
|
children: (e ? t.topItems : t.items).map((e) => {
|
|
1827
1821
|
let n = e.originalIndex, r = w(n + t.firstItemIndex, e.data, l);
|
|
1828
|
-
return T ? /* @__PURE__ */
|
|
1822
|
+
return T ? /* @__PURE__ */ Oe(b, {
|
|
1829
1823
|
...X(b, l),
|
|
1830
1824
|
height: e.size,
|
|
1831
1825
|
index: e.index,
|
|
1832
1826
|
key: r,
|
|
1833
1827
|
type: e.type || "item",
|
|
1834
1828
|
...e.type === "group" ? {} : { groupIndex: e.groupIndex }
|
|
1835
|
-
}) : e.type === "group" ? /* @__PURE__ */
|
|
1829
|
+
}) : e.type === "group" ? /* @__PURE__ */ Oe(C, {
|
|
1836
1830
|
...X(C, l),
|
|
1837
1831
|
"data-index": n,
|
|
1838
1832
|
"data-item-index": e.index,
|
|
1839
1833
|
"data-known-size": e.size,
|
|
1840
1834
|
key: r,
|
|
1841
|
-
style:
|
|
1842
|
-
}, u(e.index, l)) : /* @__PURE__ */
|
|
1835
|
+
style: li
|
|
1836
|
+
}, u(e.index, l)) : /* @__PURE__ */ Oe(S, {
|
|
1843
1837
|
...X(S, l),
|
|
1844
|
-
...
|
|
1838
|
+
...vi(S, e.data),
|
|
1845
1839
|
"data-index": n,
|
|
1846
1840
|
"data-item-group-index": e.groupIndex,
|
|
1847
1841
|
"data-item-index": e.index,
|
|
1848
1842
|
"data-known-size": e.size,
|
|
1849
1843
|
key: r,
|
|
1850
|
-
style: h ?
|
|
1844
|
+
style: h ? di : ui
|
|
1851
1845
|
}, E ? c(e.index, e.groupIndex, e.data, l) : c(e.index, e.data, l));
|
|
1852
1846
|
})
|
|
1853
1847
|
});
|
|
1854
|
-
}),
|
|
1848
|
+
}), pi = {
|
|
1855
1849
|
height: "100%",
|
|
1856
1850
|
outline: "none",
|
|
1857
1851
|
overflowY: "auto",
|
|
1858
1852
|
position: "relative",
|
|
1859
1853
|
WebkitOverflowScrolling: "touch"
|
|
1860
|
-
},
|
|
1854
|
+
}, mi = {
|
|
1861
1855
|
outline: "none",
|
|
1862
1856
|
overflowX: "auto",
|
|
1863
1857
|
position: "relative"
|
|
1864
|
-
},
|
|
1858
|
+
}, hi = (e) => ({
|
|
1865
1859
|
height: "100%",
|
|
1866
1860
|
position: "absolute",
|
|
1867
1861
|
top: 0,
|
|
@@ -1870,12 +1864,12 @@ var ui = /* @__PURE__ */ q(([e, t]) => ({
|
|
|
1870
1864
|
display: "flex",
|
|
1871
1865
|
flexDirection: "column"
|
|
1872
1866
|
} : void 0
|
|
1873
|
-
}),
|
|
1874
|
-
...
|
|
1867
|
+
}), gi = (e, t, n = 0) => ({
|
|
1868
|
+
...hi(e),
|
|
1875
1869
|
position: t ? "relative" : "absolute",
|
|
1876
1870
|
top: t ? -n : 0
|
|
1877
|
-
}),
|
|
1878
|
-
position:
|
|
1871
|
+
}), _i = {
|
|
1872
|
+
position: ti(),
|
|
1879
1873
|
top: 0,
|
|
1880
1874
|
width: "100%",
|
|
1881
1875
|
zIndex: 1
|
|
@@ -1883,35 +1877,35 @@ var ui = /* @__PURE__ */ q(([e, t]) => ({
|
|
|
1883
1877
|
function X(e, t) {
|
|
1884
1878
|
if (typeof e != "string") return { context: t };
|
|
1885
1879
|
}
|
|
1886
|
-
function
|
|
1880
|
+
function vi(e, t) {
|
|
1887
1881
|
return { item: typeof e == "string" ? void 0 : t };
|
|
1888
1882
|
}
|
|
1889
|
-
var
|
|
1890
|
-
let e = Z("HeaderComponent"), t =
|
|
1891
|
-
t(
|
|
1883
|
+
var yi = /* @__PURE__ */ A.memo(function() {
|
|
1884
|
+
let e = Z("HeaderComponent"), t = Oi("headerHeight"), n = Z("HeaderFooterTag"), r = en(A.useMemo(() => (e) => {
|
|
1885
|
+
t(Pn(e, "height"));
|
|
1892
1886
|
}, [t]), !0, Z("skipAnimationFrameInResizeObserver")), i = Z("context");
|
|
1893
1887
|
return e == null ? null : /* @__PURE__ */ N(n, {
|
|
1894
1888
|
ref: r,
|
|
1895
1889
|
children: /* @__PURE__ */ N(e, { ...X(e, i) })
|
|
1896
1890
|
});
|
|
1897
|
-
}),
|
|
1898
|
-
let e = Z("FooterComponent"), t =
|
|
1899
|
-
t(
|
|
1891
|
+
}), bi = /* @__PURE__ */ A.memo(function() {
|
|
1892
|
+
let e = Z("FooterComponent"), t = Oi("footerHeight"), n = Z("HeaderFooterTag"), r = en(A.useMemo(() => (e) => {
|
|
1893
|
+
t(Pn(e, "height"));
|
|
1900
1894
|
}, [t]), !0, Z("skipAnimationFrameInResizeObserver")), i = Z("context");
|
|
1901
1895
|
return e == null ? null : /* @__PURE__ */ N(n, {
|
|
1902
1896
|
ref: r,
|
|
1903
1897
|
children: /* @__PURE__ */ N(e, { ...X(e, i) })
|
|
1904
1898
|
});
|
|
1905
1899
|
});
|
|
1906
|
-
function
|
|
1900
|
+
function xi({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
|
|
1907
1901
|
return A.memo(function({ children: r, style: i, context: a, ...o }) {
|
|
1908
|
-
let s = n("scrollContainerState"), c = t("ScrollerComponent"), l = n("smoothScrollTargetReached"), u = t("scrollerRef"), d = t("horizontalDirection") || !1, { scrollByCallback: f, scrollerRef: p, scrollToCallback: m } =
|
|
1902
|
+
let s = n("scrollContainerState"), c = t("ScrollerComponent"), l = n("smoothScrollTargetReached"), u = t("scrollerRef"), d = t("horizontalDirection") || !1, { scrollByCallback: f, scrollerRef: p, scrollToCallback: m } = ai(s, l, c, u, void 0, d);
|
|
1909
1903
|
return e("scrollTo", m), e("scrollBy", f), /* @__PURE__ */ N(c, {
|
|
1910
1904
|
"data-testid": "virtuoso-scroller",
|
|
1911
1905
|
"data-virtuoso-scroller": !0,
|
|
1912
1906
|
ref: p,
|
|
1913
1907
|
style: {
|
|
1914
|
-
...d ?
|
|
1908
|
+
...d ? mi : pi,
|
|
1915
1909
|
...i
|
|
1916
1910
|
},
|
|
1917
1911
|
tabIndex: 0,
|
|
@@ -1921,10 +1915,10 @@ function wi({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
|
|
|
1921
1915
|
});
|
|
1922
1916
|
});
|
|
1923
1917
|
}
|
|
1924
|
-
function
|
|
1918
|
+
function Si({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
|
|
1925
1919
|
return A.memo(function({ children: r, style: i, context: a, ...o }) {
|
|
1926
|
-
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 } =
|
|
1927
|
-
return
|
|
1920
|
+
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 ni(() => (h.current = f ?? p.current?.ownerDocument.defaultView, () => {
|
|
1928
1922
|
h.current = null;
|
|
1929
1923
|
}), [h, f]), e("windowScrollTo", g), e("scrollBy", m), /* @__PURE__ */ N(c, {
|
|
1930
1924
|
ref: p,
|
|
@@ -1940,8 +1934,8 @@ function Ti({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
|
|
|
1940
1934
|
});
|
|
1941
1935
|
});
|
|
1942
1936
|
}
|
|
1943
|
-
var
|
|
1944
|
-
let t = A.useContext(
|
|
1937
|
+
var Ci = ({ children: e }) => {
|
|
1938
|
+
let t = A.useContext(Zr), n = Oi("viewportHeight"), r = Oi("fixedItemHeight"), i = Z("alignToBottom"), a = Z("horizontalDirection"), o = en(A.useMemo(() => xt(n, (e) => Pn(e, a ? "width" : "height")), [n, a]), !0, Z("skipAnimationFrameInResizeObserver"));
|
|
1945
1939
|
return A.useEffect(() => {
|
|
1946
1940
|
t && (n(t.viewportHeight), r(t.itemHeight));
|
|
1947
1941
|
}, [
|
|
@@ -1951,11 +1945,11 @@ var Ei = ({ children: e }) => {
|
|
|
1951
1945
|
]), /* @__PURE__ */ N("div", {
|
|
1952
1946
|
"data-viewport-type": "element",
|
|
1953
1947
|
ref: o,
|
|
1954
|
-
style:
|
|
1948
|
+
style: hi(i),
|
|
1955
1949
|
children: e
|
|
1956
1950
|
});
|
|
1957
|
-
},
|
|
1958
|
-
let t = A.useContext(
|
|
1951
|
+
}, wi = ({ children: e }) => {
|
|
1952
|
+
let t = A.useContext(Zr), n = Oi("windowViewportRect"), r = Oi("fixedItemHeight"), i = Z("customScrollParent"), a = Z("useWindowScroll"), o = Z("topListHeight"), s = on(n, i, Z("skipAnimationFrameInResizeObserver")), c = Z("alignToBottom");
|
|
1959
1953
|
return A.useEffect(() => {
|
|
1960
1954
|
t && (r(t.itemHeight), n({
|
|
1961
1955
|
listHeight: 0,
|
|
@@ -1970,20 +1964,20 @@ var Ei = ({ children: e }) => {
|
|
|
1970
1964
|
]), /* @__PURE__ */ N("div", {
|
|
1971
1965
|
"data-viewport-type": "window",
|
|
1972
1966
|
ref: s,
|
|
1973
|
-
style:
|
|
1967
|
+
style: gi(c, a, o),
|
|
1974
1968
|
children: e
|
|
1975
1969
|
});
|
|
1976
|
-
},
|
|
1977
|
-
let t = Z("TopItemListComponent") ?? "div", n = Z("headerHeight")
|
|
1970
|
+
}, Ti = ({ children: e }) => {
|
|
1971
|
+
let t = Z("TopItemListComponent") ?? "div", n = Z("headerHeight"), r = {
|
|
1972
|
+
..._i,
|
|
1973
|
+
marginTop: `${n}px`
|
|
1974
|
+
}, i = Z("context");
|
|
1978
1975
|
return /* @__PURE__ */ N(t, {
|
|
1979
|
-
style:
|
|
1980
|
-
|
|
1981
|
-
marginTop: `${n}px`
|
|
1982
|
-
},
|
|
1983
|
-
...X(t, Z("context")),
|
|
1976
|
+
style: r,
|
|
1977
|
+
...X(t, i),
|
|
1984
1978
|
children: e
|
|
1985
1979
|
});
|
|
1986
|
-
}, { Component:
|
|
1980
|
+
}, { Component: Ei, useEmitter: Di, useEmitterValue: Z, usePublisher: Oi } = /* @__PURE__ */ Xr(si, {
|
|
1987
1981
|
optional: {
|
|
1988
1982
|
restoreStateFrom: "restoreStateFrom",
|
|
1989
1983
|
context: "context",
|
|
@@ -2042,31 +2036,31 @@ var Ei = ({ children: e }) => {
|
|
|
2042
2036
|
}
|
|
2043
2037
|
}, /* @__PURE__ */ A.memo(function(e) {
|
|
2044
2038
|
let t = Z("useWindowScroll"), n = Z("topItemsIndexes").length > 0, r = Z("customScrollParent"), i = Z("context");
|
|
2045
|
-
return /* @__PURE__ */ P(r || t ?
|
|
2039
|
+
return /* @__PURE__ */ P(r || t ? Ai : ki, {
|
|
2046
2040
|
...e,
|
|
2047
2041
|
context: i,
|
|
2048
|
-
children: [n && /* @__PURE__ */ N(
|
|
2049
|
-
/* @__PURE__ */ N(
|
|
2050
|
-
/* @__PURE__ */ N(
|
|
2051
|
-
/* @__PURE__ */ N(
|
|
2042
|
+
children: [n && /* @__PURE__ */ N(Ti, { children: /* @__PURE__ */ N(fi, { showTopList: !0 }) }), /* @__PURE__ */ P(r || t ? wi : Ci, { children: [
|
|
2043
|
+
/* @__PURE__ */ N(yi, {}),
|
|
2044
|
+
/* @__PURE__ */ N(fi, {}),
|
|
2045
|
+
/* @__PURE__ */ N(bi, {})
|
|
2052
2046
|
] })]
|
|
2053
2047
|
});
|
|
2054
|
-
})),
|
|
2055
|
-
useEmitter:
|
|
2048
|
+
})), ki = /* @__PURE__ */ xi({
|
|
2049
|
+
useEmitter: Di,
|
|
2056
2050
|
useEmitterValue: Z,
|
|
2057
|
-
usePublisher:
|
|
2058
|
-
}),
|
|
2059
|
-
useEmitter:
|
|
2051
|
+
usePublisher: Oi
|
|
2052
|
+
}), Ai = /* @__PURE__ */ Si({
|
|
2053
|
+
useEmitter: Di,
|
|
2060
2054
|
useEmitterValue: Z,
|
|
2061
|
-
usePublisher:
|
|
2062
|
-
}),
|
|
2055
|
+
usePublisher: Oi
|
|
2056
|
+
}), ji = /* @__PURE__ */ q(([e, t]) => ({
|
|
2063
2057
|
...e,
|
|
2064
2058
|
...t
|
|
2065
|
-
}), F(
|
|
2059
|
+
}), F(qr, /* @__PURE__ */ q(() => {
|
|
2066
2060
|
let e = G((e) => /* @__PURE__ */ P("td", { children: ["Item $", e] })), t = G(null), n = G((e) => /* @__PURE__ */ P("td", {
|
|
2067
2061
|
colSpan: 1e3,
|
|
2068
2062
|
children: ["Group ", e]
|
|
2069
|
-
})), r = G(null), i = G(null), a = G({}), o = G(
|
|
2063
|
+
})), r = G(null), i = G(null), a = G({}), o = G(oi), s = G(Et), c = (e, t = null) => zt(U(a, H((t) => t[e]), B()), t);
|
|
2070
2064
|
return {
|
|
2071
2065
|
components: a,
|
|
2072
2066
|
computeItemKey: o,
|
|
@@ -2087,54 +2081,54 @@ var Ei = ({ children: e }) => {
|
|
|
2087
2081
|
TableRowComponent: c("TableRow", "tr"),
|
|
2088
2082
|
GroupComponent: c("Group", "tr")
|
|
2089
2083
|
};
|
|
2090
|
-
}))),
|
|
2084
|
+
}))), Mi = ({ height: e }) => /* @__PURE__ */ N("tr", { children: /* @__PURE__ */ N("td", { style: { height: e } }) }), Ni = ({ height: e }) => /* @__PURE__ */ N("tr", { children: /* @__PURE__ */ N("td", { style: {
|
|
2091
2085
|
border: 0,
|
|
2092
2086
|
height: e,
|
|
2093
2087
|
padding: 0
|
|
2094
|
-
} }) }),
|
|
2095
|
-
position:
|
|
2088
|
+
} }) }), Pi = { overflowAnchor: "none" }, Fi = {
|
|
2089
|
+
position: ti(),
|
|
2096
2090
|
zIndex: 2,
|
|
2097
2091
|
overflowAnchor: "none"
|
|
2098
|
-
},
|
|
2099
|
-
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") ??
|
|
2092
|
+
}, Ii = /* @__PURE__ */ A.memo(function({ showTopList: e = !1 }) {
|
|
2093
|
+
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), []);
|
|
2100
2094
|
return (e ? t.topItems : t.items).map((t) => {
|
|
2101
2095
|
let m = t.originalIndex, h = n(m + r, t.data, i), g = e ? m === 0 ? 0 : p[m - 1] : 0;
|
|
2102
|
-
return a ? /* @__PURE__ */
|
|
2096
|
+
return a ? /* @__PURE__ */ Oe(u, {
|
|
2103
2097
|
...X(u, i),
|
|
2104
2098
|
height: t.size,
|
|
2105
2099
|
index: t.index,
|
|
2106
2100
|
key: h,
|
|
2107
2101
|
type: t.type || "item"
|
|
2108
|
-
}) : t.type === "group" ? /* @__PURE__ */
|
|
2102
|
+
}) : t.type === "group" ? /* @__PURE__ */ Oe(d, {
|
|
2109
2103
|
...X(d, i),
|
|
2110
2104
|
"data-index": m,
|
|
2111
2105
|
"data-item-index": t.index,
|
|
2112
2106
|
"data-known-size": t.size,
|
|
2113
2107
|
key: h,
|
|
2114
2108
|
style: {
|
|
2115
|
-
...
|
|
2109
|
+
...Fi,
|
|
2116
2110
|
top: o
|
|
2117
2111
|
}
|
|
2118
|
-
}, l(t.index, i)) : /* @__PURE__ */
|
|
2112
|
+
}, l(t.index, i)) : /* @__PURE__ */ Oe(f, {
|
|
2119
2113
|
...X(f, i),
|
|
2120
|
-
...
|
|
2114
|
+
...vi(f, t.data),
|
|
2121
2115
|
"data-index": m,
|
|
2122
2116
|
"data-item-index": t.index,
|
|
2123
2117
|
"data-known-size": t.size,
|
|
2124
2118
|
"data-item-group-index": t.groupIndex,
|
|
2125
2119
|
key: h,
|
|
2126
2120
|
style: e ? {
|
|
2127
|
-
...
|
|
2121
|
+
...Fi,
|
|
2128
2122
|
top: o + g
|
|
2129
|
-
} :
|
|
2123
|
+
} : Pi
|
|
2130
2124
|
}, s ? c(t.index, t.groupIndex, t.data, i) : c(t.index, t.data, i));
|
|
2131
2125
|
});
|
|
2132
|
-
}),
|
|
2133
|
-
let e = Q("listState"), t = Q("topItemsIndexes").length > 0, n =
|
|
2134
|
-
|
|
2126
|
+
}), Li = /* @__PURE__ */ A.memo(function() {
|
|
2127
|
+
let e = Q("listState"), t = Q("topItemsIndexes").length > 0, n = Hi("sizeRanges"), r = Q("useWindowScroll"), i = Q("customScrollParent"), a = Hi("windowScrollContainerState"), o = Hi("scrollContainerState"), s = i || r ? a : o, c = Q("trackItemSizes"), { callbackRef: l, ref: u } = nn(n, Q("itemSize"), c, s, Q("log"), void 0, i, !1, Q("skipAnimationFrameInResizeObserver")), [d, f] = A.useState(0);
|
|
2128
|
+
Vi("deviation", (e) => {
|
|
2135
2129
|
d !== e && (u.current.style.marginTop = `${e}px`, f(e));
|
|
2136
2130
|
});
|
|
2137
|
-
let p = Q("EmptyPlaceholder"), m = Q("FillerRow") ??
|
|
2131
|
+
let p = Q("EmptyPlaceholder"), m = Q("FillerRow") ?? Ni, h = Q("TableBodyComponent"), g = Q("paddingTopAddition"), _ = Q("statefulTotalCount"), v = Q("context");
|
|
2138
2132
|
if (_ === 0 && p != null) return /* @__PURE__ */ N(p, { ...X(p, v) });
|
|
2139
2133
|
let y = (t ? e.topItems : []).reduce((e, t) => e + t.size, 0), b = e.offsetTop + g + d - y, x = e.offsetBottom, S = b > 0 ? /* @__PURE__ */ N(m, {
|
|
2140
2134
|
context: v,
|
|
@@ -2149,13 +2143,13 @@ var Ei = ({ children: e }) => {
|
|
|
2149
2143
|
...X(h, v),
|
|
2150
2144
|
children: [
|
|
2151
2145
|
S,
|
|
2152
|
-
t && /* @__PURE__ */ N(
|
|
2153
|
-
/* @__PURE__ */ N(
|
|
2146
|
+
t && /* @__PURE__ */ N(Ii, { showTopList: !0 }),
|
|
2147
|
+
/* @__PURE__ */ N(Ii, {}),
|
|
2154
2148
|
C
|
|
2155
2149
|
]
|
|
2156
2150
|
});
|
|
2157
|
-
}),
|
|
2158
|
-
let t = A.useContext(
|
|
2151
|
+
}), Ri = ({ children: e }) => {
|
|
2152
|
+
let t = A.useContext(Zr), n = Hi("viewportHeight"), r = Hi("fixedItemHeight"), i = en(A.useMemo(() => xt(n, (e) => Pn(e, "height")), [n]), !0, Q("skipAnimationFrameInResizeObserver"));
|
|
2159
2153
|
return A.useEffect(() => {
|
|
2160
2154
|
t && (n(t.viewportHeight), r(t.itemHeight));
|
|
2161
2155
|
}, [
|
|
@@ -2165,11 +2159,11 @@ var Ei = ({ children: e }) => {
|
|
|
2165
2159
|
]), /* @__PURE__ */ N("div", {
|
|
2166
2160
|
"data-viewport-type": "element",
|
|
2167
2161
|
ref: i,
|
|
2168
|
-
style:
|
|
2162
|
+
style: hi(!1),
|
|
2169
2163
|
children: e
|
|
2170
2164
|
});
|
|
2171
|
-
},
|
|
2172
|
-
let t = A.useContext(
|
|
2165
|
+
}, zi = ({ children: e }) => {
|
|
2166
|
+
let t = A.useContext(Zr), n = Hi("windowViewportRect"), r = Hi("fixedItemHeight"), i = Q("customScrollParent"), a = Q("useWindowScroll"), o = on(n, i, Q("skipAnimationFrameInResizeObserver"));
|
|
2173
2167
|
return A.useEffect(() => {
|
|
2174
2168
|
t && (r(t.itemHeight), n({
|
|
2175
2169
|
listHeight: 0,
|
|
@@ -2184,10 +2178,10 @@ var Ei = ({ children: e }) => {
|
|
|
2184
2178
|
]), /* @__PURE__ */ N("div", {
|
|
2185
2179
|
"data-viewport-type": "window",
|
|
2186
2180
|
ref: o,
|
|
2187
|
-
style:
|
|
2181
|
+
style: gi(!1, a),
|
|
2188
2182
|
children: e
|
|
2189
2183
|
});
|
|
2190
|
-
}, { Component:
|
|
2184
|
+
}, { Component: Bi, useEmitter: Vi, useEmitterValue: Q, usePublisher: Hi } = /* @__PURE__ */ Xr(ji, {
|
|
2191
2185
|
optional: {
|
|
2192
2186
|
restoreStateFrom: "restoreStateFrom",
|
|
2193
2187
|
context: "context",
|
|
@@ -2241,7 +2235,7 @@ var Ei = ({ children: e }) => {
|
|
|
2241
2235
|
groupIndices: "groupIndices"
|
|
2242
2236
|
}
|
|
2243
2237
|
}, /* @__PURE__ */ A.memo(function(e) {
|
|
2244
|
-
let t = Q("useWindowScroll"), n = Q("customScrollParent"), r =
|
|
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) => Pn(e, "height")), [r]), !0, Q("skipAnimationFrameInResizeObserver")), l = en(A.useMemo(() => xt(i, (e) => Pn(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, {
|
|
2245
2239
|
ref: c,
|
|
2246
2240
|
style: {
|
|
2247
2241
|
position: "sticky",
|
|
@@ -2271,20 +2265,20 @@ var Ei = ({ children: e }) => {
|
|
|
2271
2265
|
...X(f, s),
|
|
2272
2266
|
children: [
|
|
2273
2267
|
h,
|
|
2274
|
-
/* @__PURE__ */ N(
|
|
2268
|
+
/* @__PURE__ */ N(Li, {}, "TableBody"),
|
|
2275
2269
|
g
|
|
2276
2270
|
]
|
|
2277
2271
|
}) })
|
|
2278
2272
|
});
|
|
2279
|
-
})),
|
|
2280
|
-
useEmitter:
|
|
2273
|
+
})), Ui = /* @__PURE__ */ xi({
|
|
2274
|
+
useEmitter: Vi,
|
|
2281
2275
|
useEmitterValue: Q,
|
|
2282
|
-
usePublisher:
|
|
2283
|
-
}),
|
|
2284
|
-
useEmitter:
|
|
2276
|
+
usePublisher: Hi
|
|
2277
|
+
}), Wi = /* @__PURE__ */ Si({
|
|
2278
|
+
useEmitter: Vi,
|
|
2285
2279
|
useEmitterValue: Q,
|
|
2286
|
-
usePublisher:
|
|
2287
|
-
}),
|
|
2280
|
+
usePublisher: Hi
|
|
2281
|
+
}), Gi = Bi, Ki = {
|
|
2288
2282
|
bottom: 0,
|
|
2289
2283
|
itemHeight: 0,
|
|
2290
2284
|
items: [],
|
|
@@ -2292,7 +2286,7 @@ var Ei = ({ children: e }) => {
|
|
|
2292
2286
|
offsetBottom: 0,
|
|
2293
2287
|
offsetTop: 0,
|
|
2294
2288
|
top: 0
|
|
2295
|
-
},
|
|
2289
|
+
}, qi = {
|
|
2296
2290
|
bottom: 0,
|
|
2297
2291
|
itemHeight: 0,
|
|
2298
2292
|
items: [{ index: 0 }],
|
|
@@ -2300,67 +2294,67 @@ var Ei = ({ children: e }) => {
|
|
|
2300
2294
|
offsetBottom: 0,
|
|
2301
2295
|
offsetTop: 0,
|
|
2302
2296
|
top: 0
|
|
2303
|
-
}, { ceil:
|
|
2304
|
-
function
|
|
2297
|
+
}, { ceil: Ji, floor: Yi, max: Xi, min: Zi, round: Qi } = Math;
|
|
2298
|
+
function $i(e, t, n) {
|
|
2305
2299
|
return Array.from({ length: t - e + 1 }).map((t, r) => ({
|
|
2306
2300
|
data: n === null ? null : n[r + e],
|
|
2307
2301
|
index: r + e
|
|
2308
2302
|
}));
|
|
2309
2303
|
}
|
|
2310
|
-
function
|
|
2304
|
+
function ea(e) {
|
|
2311
2305
|
return {
|
|
2312
|
-
...
|
|
2306
|
+
...qi,
|
|
2313
2307
|
items: e
|
|
2314
2308
|
};
|
|
2315
2309
|
}
|
|
2316
|
-
function
|
|
2310
|
+
function ta(e, t) {
|
|
2317
2311
|
return e !== void 0 && e.width === t.width && e.height === t.height;
|
|
2318
2312
|
}
|
|
2319
|
-
function
|
|
2313
|
+
function na(e, t) {
|
|
2320
2314
|
return e !== void 0 && e.column === t.column && e.row === t.row;
|
|
2321
2315
|
}
|
|
2322
|
-
var
|
|
2323
|
-
let S = G(0), C = G(0), w = G(
|
|
2316
|
+
var ra = /* @__PURE__ */ q(([{ increaseViewportBy: e, listBoundary: t, overscan: n, visibleRange: r }, { footerHeight: i, headerHeight: a, scrollBy: o, scrollContainerState: s, scrollTo: c, scrollTop: l, smoothScrollTargetReached: u, viewportHeight: d }, f, p, { didMount: m, propsReady: h }, { customScrollParent: g, useWindowScroll: _, windowScrollContainerState: v, windowScrollTo: y, windowViewportRect: b }, x]) => {
|
|
2317
|
+
let S = G(0), C = G(0), w = G(Ki), T = G({
|
|
2324
2318
|
height: 0,
|
|
2325
2319
|
width: 0
|
|
2326
2320
|
}), E = G({
|
|
2327
2321
|
height: 0,
|
|
2328
2322
|
width: 0
|
|
2329
|
-
}), ee = K(), te = K(), ne = G(0),
|
|
2323
|
+
}), ee = K(), te = K(), ne = G(0), D = G(null), re = G({
|
|
2330
2324
|
column: 0,
|
|
2331
2325
|
row: 0
|
|
2332
|
-
}),
|
|
2333
|
-
I(U(m, W(
|
|
2334
|
-
L(
|
|
2335
|
-
}), I(U(Wt(m,
|
|
2326
|
+
}), ie = K(), ae = K(), oe = G(!1), se = G(0), ce = G(!0), O = G(!1), k = G(!1);
|
|
2327
|
+
I(U(m, W(se), V(([e, t]) => !cr(t))), () => {
|
|
2328
|
+
L(ce, !1);
|
|
2329
|
+
}), I(U(Wt(m, ce, E, T, se, O), V(([e, t, n, r, , i]) => e && !t && n.height !== 0 && r.height !== 0 && !i)), ([, , , , e]) => {
|
|
2336
2330
|
if (e === void 0) {
|
|
2337
|
-
L(
|
|
2331
|
+
L(ce, !0);
|
|
2338
2332
|
return;
|
|
2339
2333
|
}
|
|
2340
|
-
L(
|
|
2334
|
+
L(O, !0), or(1, () => {
|
|
2341
2335
|
L(ee, e);
|
|
2342
2336
|
}), At(U(l), () => {
|
|
2343
|
-
L(t, [0, 0]), L(
|
|
2337
|
+
L(t, [0, 0]), L(ce, !0);
|
|
2344
2338
|
});
|
|
2345
|
-
}), z(U(
|
|
2346
|
-
e && (L(T, e.viewport), L(E, e.item), L(
|
|
2347
|
-
L(
|
|
2339
|
+
}), 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(oe, !0), At(U(l, Ft(1)), (e) => {
|
|
2341
|
+
L(oe, !1);
|
|
2348
2342
|
}), L(c, { top: e.scrollTop })));
|
|
2349
|
-
}), z(U(T, H(({ height: e }) => e)), d), z(U(Wt(J(T,
|
|
2343
|
+
}), 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]) => ({
|
|
2350
2344
|
gap: n,
|
|
2351
2345
|
item: t,
|
|
2352
2346
|
scrollTop: r,
|
|
2353
2347
|
viewport: e
|
|
2354
|
-
}))),
|
|
2348
|
+
}))), ie), z(U(Wt(J(S), r, J(re, na), J(E, ta), J(T, ta), J(D), J(C), J(oe), J(ce), J(se)), V(([, , , , , , , e]) => !e), H(([e, [t, n], r, i, a, o, s, , c, l]) => {
|
|
2355
2349
|
let { column: u, row: d } = r, { height: f, width: p } = i, { width: m } = a;
|
|
2356
|
-
if (s === 0 && (e === 0 || m === 0)) return
|
|
2350
|
+
if (s === 0 && (e === 0 || m === 0)) return Ki;
|
|
2357
2351
|
if (p === 0) {
|
|
2358
|
-
let t =
|
|
2359
|
-
return
|
|
2352
|
+
let t = sr(l, e);
|
|
2353
|
+
return ea($i(t, t + Math.max(s - 1, 0), o));
|
|
2360
2354
|
}
|
|
2361
|
-
let h =
|
|
2362
|
-
c ? t === 0 && n === 0 && s > 0 ? (g = 0, _ = s - 1) : (g = h *
|
|
2363
|
-
let v =
|
|
2355
|
+
let h = ia(m, p, u), g, _;
|
|
2356
|
+
c ? t === 0 && n === 0 && s > 0 ? (g = 0, _ = s - 1) : (g = h * Yi((t + d) / (f + d)), _ = h * Ji((n + d) / (f + d)) - 1, _ = Zi(e - 1, Xi(_, h - 1)), g = Zi(_, Xi(0, g))) : (g = 0, _ = -1);
|
|
2357
|
+
let v = $i(g, _, o), { bottom: y, top: b } = aa(a, r, i, v), x = Ji(e / h);
|
|
2364
2358
|
return {
|
|
2365
2359
|
bottom: y,
|
|
2366
2360
|
itemHeight: f,
|
|
@@ -2370,24 +2364,24 @@ var oa = /* @__PURE__ */ q(([{ increaseViewportBy: e, listBoundary: t, overscan:
|
|
|
2370
2364
|
offsetTop: b,
|
|
2371
2365
|
top: b
|
|
2372
2366
|
};
|
|
2373
|
-
})), w), z(U(
|
|
2374
|
-
let { bottom: i, top: a } =
|
|
2367
|
+
})), 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
|
+
let { bottom: i, top: a } = aa(e, r, t, n);
|
|
2375
2369
|
return [a, i];
|
|
2376
|
-
}), B(
|
|
2377
|
-
let
|
|
2378
|
-
z(U(l, W(
|
|
2379
|
-
let
|
|
2370
|
+
}), B(kn)), t);
|
|
2371
|
+
let le = G(!1);
|
|
2372
|
+
z(U(l, W(le), H(([e, t]) => t || e !== 0)), le);
|
|
2373
|
+
let ue = Bt(U(Wt(w, S), V(([{ items: e }]) => e.length > 0), W(le), V(([[e, t], n]) => {
|
|
2380
2374
|
let r = e.items[e.items.length - 1].index === t - 1;
|
|
2381
2375
|
return (n || e.bottom > 0 && e.itemHeight > 0 && e.offsetBottom === 0 && e.items.length === t) && r;
|
|
2382
|
-
}), H(([[, e]]) => e - 1), B())),
|
|
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(oe), V(([{ items: e }, t]) => e.length > 0 && !t), H(([{ items: e }]) => ({
|
|
2383
2377
|
endIndex: e[e.length - 1].index,
|
|
2384
2378
|
startIndex: e[0].index
|
|
2385
|
-
})), B(
|
|
2386
|
-
z(
|
|
2387
|
-
let a =
|
|
2388
|
-
l === "LAST" && (l = r - 1), l =
|
|
2389
|
-
let u =
|
|
2390
|
-
return o === "end" ? u =
|
|
2379
|
+
})), B(On), It(0)));
|
|
2380
|
+
z(fe, p.scrollSeekRangeChanged), z(U(ee, W(T, E, S, re), H(([e, t, n, r, i]) => {
|
|
2381
|
+
let a = rr(e), { align: o, behavior: s, offset: c } = a, l = a.index;
|
|
2382
|
+
l === "LAST" && (l = r - 1), l = Xi(0, l, Zi(r - 1, l));
|
|
2383
|
+
let u = oa(t, i, n, l);
|
|
2384
|
+
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), {
|
|
2391
2385
|
behavior: s,
|
|
2392
2386
|
top: u
|
|
2393
2387
|
};
|
|
@@ -2398,16 +2392,16 @@ var oa = /* @__PURE__ */ q(([{ increaseViewportBy: e, listBoundary: t, overscan:
|
|
|
2398
2392
|
width: e.visibleWidth
|
|
2399
2393
|
}))), T), {
|
|
2400
2394
|
customScrollParent: g,
|
|
2401
|
-
data:
|
|
2395
|
+
data: D,
|
|
2402
2396
|
deviation: ne,
|
|
2403
2397
|
footerHeight: i,
|
|
2404
|
-
gap:
|
|
2398
|
+
gap: re,
|
|
2405
2399
|
headerHeight: a,
|
|
2406
2400
|
increaseViewportBy: e,
|
|
2407
2401
|
initialItemCount: C,
|
|
2408
2402
|
itemDimensions: E,
|
|
2409
2403
|
overscan: n,
|
|
2410
|
-
restoreStateFrom:
|
|
2404
|
+
restoreStateFrom: ae,
|
|
2411
2405
|
scrollBy: o,
|
|
2412
2406
|
scrollContainerState: s,
|
|
2413
2407
|
scrollHeight: te,
|
|
@@ -2423,43 +2417,43 @@ var oa = /* @__PURE__ */ q(([{ increaseViewportBy: e, listBoundary: t, overscan:
|
|
|
2423
2417
|
windowViewportRect: b,
|
|
2424
2418
|
...p,
|
|
2425
2419
|
gridState: w,
|
|
2426
|
-
horizontalDirection:
|
|
2427
|
-
initialTopMostItemIndex:
|
|
2420
|
+
horizontalDirection: k,
|
|
2421
|
+
initialTopMostItemIndex: se,
|
|
2428
2422
|
totalListHeight: pe,
|
|
2429
2423
|
...f,
|
|
2430
|
-
endReached:
|
|
2424
|
+
endReached: ue,
|
|
2431
2425
|
propsReady: h,
|
|
2432
|
-
rangeChanged:
|
|
2433
|
-
startReached:
|
|
2434
|
-
stateChanged:
|
|
2435
|
-
stateRestoreInProgress:
|
|
2426
|
+
rangeChanged: fe,
|
|
2427
|
+
startReached: de,
|
|
2428
|
+
stateChanged: ie,
|
|
2429
|
+
stateRestoreInProgress: oe,
|
|
2436
2430
|
...x
|
|
2437
2431
|
};
|
|
2438
|
-
}, F(
|
|
2439
|
-
function
|
|
2440
|
-
return
|
|
2432
|
+
}, F(Sr, sn, gr, Br, tr, Vr, Yt));
|
|
2433
|
+
function ia(e, t, n) {
|
|
2434
|
+
return Xi(1, Yi((e + n) / (Yi(t) + n)));
|
|
2441
2435
|
}
|
|
2442
|
-
function
|
|
2436
|
+
function aa(e, t, n, r) {
|
|
2443
2437
|
let { height: i } = n;
|
|
2444
2438
|
if (i === void 0 || r.length === 0) return {
|
|
2445
2439
|
bottom: 0,
|
|
2446
2440
|
top: 0
|
|
2447
2441
|
};
|
|
2448
|
-
let a =
|
|
2442
|
+
let a = oa(e, t, n, r[0].index);
|
|
2449
2443
|
return {
|
|
2450
|
-
bottom:
|
|
2444
|
+
bottom: oa(e, t, n, r[r.length - 1].index) + i,
|
|
2451
2445
|
top: a
|
|
2452
2446
|
};
|
|
2453
2447
|
}
|
|
2454
|
-
function
|
|
2455
|
-
let i =
|
|
2448
|
+
function oa(e, t, n, r) {
|
|
2449
|
+
let i = Yi(r / ia(e.width, n.width, t.column)), a = i * n.height + Xi(0, i - 1) * t.row;
|
|
2456
2450
|
return a > 0 ? a + t.row : a;
|
|
2457
2451
|
}
|
|
2458
|
-
var
|
|
2452
|
+
var sa = /* @__PURE__ */ q(([e, t]) => ({
|
|
2459
2453
|
...e,
|
|
2460
2454
|
...t
|
|
2461
|
-
}), F(
|
|
2462
|
-
let e = G((e) => `Item ${e}`), t = G({}), n = G(null), r = G("virtuoso-grid-item"), i = G("virtuoso-grid-list"), a = G(
|
|
2455
|
+
}), F(ra, /* @__PURE__ */ q(() => {
|
|
2456
|
+
let e = G((e) => `Item ${e}`), t = G({}), n = G(null), r = G("virtuoso-grid-item"), i = G("virtuoso-grid-list"), a = G(oi), o = G("div"), s = G(Et), c = (e, n = null) => zt(U(t, H((t) => t[e]), B()), n), l = G(!1), u = G(!1);
|
|
2463
2457
|
return z(J(u), l), {
|
|
2464
2458
|
components: t,
|
|
2465
2459
|
computeItemKey: a,
|
|
@@ -2478,8 +2472,8 @@ var ua = /* @__PURE__ */ q(([e, t]) => ({
|
|
|
2478
2472
|
scrollerRef: s,
|
|
2479
2473
|
ScrollSeekPlaceholder: c("ScrollSeekPlaceholder", "div")
|
|
2480
2474
|
};
|
|
2481
|
-
}))),
|
|
2482
|
-
let e = $("gridState"), t = $("listClassName"), n = $("itemClassName"), r = $("itemContent"), i = $("computeItemKey"), a = $("isSeeking"), o =
|
|
2475
|
+
}))), ca = /* @__PURE__ */ A.memo(function() {
|
|
2476
|
+
let e = $("gridState"), t = $("listClassName"), n = $("itemClassName"), r = $("itemContent"), i = $("computeItemKey"), a = $("isSeeking"), o = ha("scrollHeight"), s = $("ItemComponent"), c = $("ListComponent"), l = $("ScrollSeekPlaceholder"), u = $("context"), d = ha("itemDimensions"), f = ha("gap"), p = $("log"), m = $("stateRestoreInProgress"), h = ha("reportReadyState"), g = en(A.useMemo(() => (e) => {
|
|
2483
2477
|
let t = e.parentElement.parentElement.scrollHeight;
|
|
2484
2478
|
o(t);
|
|
2485
2479
|
let n = e.firstChild;
|
|
@@ -2491,8 +2485,8 @@ var ua = /* @__PURE__ */ q(([e, t]) => ({
|
|
|
2491
2485
|
});
|
|
2492
2486
|
}
|
|
2493
2487
|
f({
|
|
2494
|
-
column:
|
|
2495
|
-
row:
|
|
2488
|
+
column: va("column-gap", getComputedStyle(e).columnGap, p),
|
|
2489
|
+
row: va("row-gap", getComputedStyle(e).rowGap, p)
|
|
2496
2490
|
});
|
|
2497
2491
|
}, [
|
|
2498
2492
|
o,
|
|
@@ -2500,7 +2494,7 @@ var ua = /* @__PURE__ */ q(([e, t]) => ({
|
|
|
2500
2494
|
f,
|
|
2501
2495
|
p
|
|
2502
2496
|
]), !0, !1);
|
|
2503
|
-
return
|
|
2497
|
+
return ni(() => {
|
|
2504
2498
|
e.itemHeight > 0 && e.itemWidth > 0 && h(!0);
|
|
2505
2499
|
}, [e]), m ? null : /* @__PURE__ */ N(c, {
|
|
2506
2500
|
className: t,
|
|
@@ -2518,7 +2512,7 @@ var ua = /* @__PURE__ */ q(([e, t]) => ({
|
|
|
2518
2512
|
height: e.itemHeight,
|
|
2519
2513
|
index: t.index,
|
|
2520
2514
|
width: e.itemWidth
|
|
2521
|
-
}, o) : /* @__PURE__ */
|
|
2515
|
+
}, o) : /* @__PURE__ */ Oe(s, {
|
|
2522
2516
|
...X(s, u),
|
|
2523
2517
|
className: n,
|
|
2524
2518
|
"data-index": t.index,
|
|
@@ -2526,24 +2520,24 @@ var ua = /* @__PURE__ */ q(([e, t]) => ({
|
|
|
2526
2520
|
}, r(t.index, t.data, u));
|
|
2527
2521
|
})
|
|
2528
2522
|
});
|
|
2529
|
-
}),
|
|
2530
|
-
let e = $("HeaderComponent"), t =
|
|
2531
|
-
t(
|
|
2523
|
+
}), la = A.memo(function() {
|
|
2524
|
+
let e = $("HeaderComponent"), t = ha("headerHeight"), n = $("headerFooterTag"), r = en(A.useMemo(() => (e) => {
|
|
2525
|
+
t(Pn(e, "height"));
|
|
2532
2526
|
}, [t]), !0, !1), i = $("context");
|
|
2533
2527
|
return e == null ? null : /* @__PURE__ */ N(n, {
|
|
2534
2528
|
ref: r,
|
|
2535
2529
|
children: /* @__PURE__ */ N(e, { ...X(e, i) })
|
|
2536
2530
|
});
|
|
2537
|
-
}),
|
|
2538
|
-
let e = $("FooterComponent"), t =
|
|
2539
|
-
t(
|
|
2531
|
+
}), ua = A.memo(function() {
|
|
2532
|
+
let e = $("FooterComponent"), t = ha("footerHeight"), n = $("headerFooterTag"), r = en(A.useMemo(() => (e) => {
|
|
2533
|
+
t(Pn(e, "height"));
|
|
2540
2534
|
}, [t]), !0, !1), i = $("context");
|
|
2541
2535
|
return e == null ? null : /* @__PURE__ */ N(n, {
|
|
2542
2536
|
ref: r,
|
|
2543
2537
|
children: /* @__PURE__ */ N(e, { ...X(e, i) })
|
|
2544
2538
|
});
|
|
2545
|
-
}),
|
|
2546
|
-
let t = A.useContext(
|
|
2539
|
+
}), da = ({ children: e }) => {
|
|
2540
|
+
let t = A.useContext(Qr), n = ha("itemDimensions"), r = ha("viewportDimensions"), i = en(A.useMemo(() => (e) => {
|
|
2547
2541
|
r(e.getBoundingClientRect());
|
|
2548
2542
|
}, [r]), !0, !1);
|
|
2549
2543
|
return A.useEffect(() => {
|
|
@@ -2560,11 +2554,11 @@ var ua = /* @__PURE__ */ q(([e, t]) => ({
|
|
|
2560
2554
|
n
|
|
2561
2555
|
]), /* @__PURE__ */ N("div", {
|
|
2562
2556
|
ref: i,
|
|
2563
|
-
style:
|
|
2557
|
+
style: hi(!1),
|
|
2564
2558
|
children: e
|
|
2565
2559
|
});
|
|
2566
|
-
},
|
|
2567
|
-
let t = A.useContext(
|
|
2560
|
+
}, fa = ({ children: e }) => {
|
|
2561
|
+
let t = A.useContext(Qr), n = ha("windowViewportRect"), r = ha("itemDimensions"), i = $("customScrollParent"), a = $("useWindowScroll"), o = on(n, i, !1);
|
|
2568
2562
|
return A.useEffect(() => {
|
|
2569
2563
|
t && (r({
|
|
2570
2564
|
height: t.itemHeight,
|
|
@@ -2581,10 +2575,10 @@ var ua = /* @__PURE__ */ q(([e, t]) => ({
|
|
|
2581
2575
|
r
|
|
2582
2576
|
]), /* @__PURE__ */ N("div", {
|
|
2583
2577
|
ref: o,
|
|
2584
|
-
style:
|
|
2578
|
+
style: gi(!1, a),
|
|
2585
2579
|
children: e
|
|
2586
2580
|
});
|
|
2587
|
-
}, { Component:
|
|
2581
|
+
}, { Component: pa, useEmitter: ma, useEmitterValue: $, usePublisher: ha } = /* @__PURE__ */ Xr(sa, {
|
|
2588
2582
|
optional: {
|
|
2589
2583
|
context: "context",
|
|
2590
2584
|
totalCount: "totalCount",
|
|
@@ -2622,37 +2616,37 @@ var ua = /* @__PURE__ */ q(([e, t]) => ({
|
|
|
2622
2616
|
readyStateChanged: "readyStateChanged"
|
|
2623
2617
|
}
|
|
2624
2618
|
}, /* @__PURE__ */ A.memo(function({ ...e }) {
|
|
2625
|
-
let t = $("useWindowScroll"), n = $("customScrollParent"), r = n || t ?
|
|
2619
|
+
let t = $("useWindowScroll"), n = $("customScrollParent"), r = n || t ? _a : ga, i = n || t ? fa : da, a = $("context");
|
|
2626
2620
|
return /* @__PURE__ */ N(r, {
|
|
2627
2621
|
...e,
|
|
2628
2622
|
...X(r, a),
|
|
2629
2623
|
children: /* @__PURE__ */ P(i, { children: [
|
|
2630
|
-
/* @__PURE__ */ N(
|
|
2631
|
-
/* @__PURE__ */ N(
|
|
2632
|
-
/* @__PURE__ */ N(
|
|
2624
|
+
/* @__PURE__ */ N(la, {}),
|
|
2625
|
+
/* @__PURE__ */ N(ca, {}),
|
|
2626
|
+
/* @__PURE__ */ N(ua, {})
|
|
2633
2627
|
] })
|
|
2634
2628
|
});
|
|
2635
|
-
})),
|
|
2636
|
-
useEmitter:
|
|
2629
|
+
})), ga = /* @__PURE__ */ xi({
|
|
2630
|
+
useEmitter: ma,
|
|
2637
2631
|
useEmitterValue: $,
|
|
2638
|
-
usePublisher:
|
|
2639
|
-
}),
|
|
2640
|
-
useEmitter:
|
|
2632
|
+
usePublisher: ha
|
|
2633
|
+
}), _a = /* @__PURE__ */ Si({
|
|
2634
|
+
useEmitter: ma,
|
|
2641
2635
|
useEmitterValue: $,
|
|
2642
|
-
usePublisher:
|
|
2636
|
+
usePublisher: ha
|
|
2643
2637
|
});
|
|
2644
|
-
function
|
|
2638
|
+
function va(e, t, n) {
|
|
2645
2639
|
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);
|
|
2646
2640
|
}
|
|
2647
2641
|
//#endregion
|
|
2648
|
-
//#region ../../node_modules/.pnpm/use-debounce@10.1.1_react@19.2.
|
|
2649
|
-
function
|
|
2642
|
+
//#region ../../node_modules/.pnpm/use-debounce@10.1.1_react@19.2.8/node_modules/use-debounce/dist/index.module.js
|
|
2643
|
+
function ya(e, t, n, r) {
|
|
2650
2644
|
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();
|
|
2651
2645
|
f.current = e;
|
|
2652
2646
|
var g = typeof window < "u", _ = !t && t !== 0 && g;
|
|
2653
2647
|
if (typeof e != "function") throw TypeError("Expected a function");
|
|
2654
2648
|
t = +t || 0;
|
|
2655
|
-
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 =
|
|
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 = Fe(function() {
|
|
2656
2650
|
var e = function(e) {
|
|
2657
2651
|
var t = l.current, n = u.current;
|
|
2658
2652
|
return l.current = u.current = null, o.current = e, s.current = s.current || e, d.current = f.current.apply(n, t);
|
|
@@ -2705,7 +2699,7 @@ function Sa(e, t, n, r) {
|
|
|
2705
2699
|
S,
|
|
2706
2700
|
r
|
|
2707
2701
|
]);
|
|
2708
|
-
return h.current = w,
|
|
2702
|
+
return h.current = w, je(function() {
|
|
2709
2703
|
return p.current = !0, function() {
|
|
2710
2704
|
var e;
|
|
2711
2705
|
b && h.current.flush(), m.current &&= ((e = globalThis.document) == null || e.removeEventListener == null || e.removeEventListener("visibilitychange", m.current), null), p.current = !1;
|
|
@@ -2714,59 +2708,61 @@ function Sa(e, t, n, r) {
|
|
|
2714
2708
|
}
|
|
2715
2709
|
//#endregion
|
|
2716
2710
|
//#region src/components/ui/Table/TableCellAsyncContent.tsx
|
|
2717
|
-
var
|
|
2718
|
-
let [t, n] =
|
|
2719
|
-
return
|
|
2711
|
+
var ba = ({ content: e }) => {
|
|
2712
|
+
let [t, n] = Ie(null);
|
|
2713
|
+
return je(() => {
|
|
2720
2714
|
(async () => {
|
|
2721
2715
|
e instanceof Promise ? n(await e) : n(e);
|
|
2722
2716
|
})();
|
|
2723
|
-
}, [e]), /* @__PURE__ */ N(
|
|
2717
|
+
}, [e]), /* @__PURE__ */ N(Le, { children: t });
|
|
2724
2718
|
};
|
|
2725
2719
|
//#endregion
|
|
2726
2720
|
//#region ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
2727
|
-
function
|
|
2721
|
+
function xa(e) {
|
|
2728
2722
|
var t, n, r = "";
|
|
2729
2723
|
if (typeof e == "string" || typeof e == "number") r += e;
|
|
2730
|
-
else if (typeof e == "object")
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2724
|
+
else if (typeof e == "object") {
|
|
2725
|
+
if (Array.isArray(e)) {
|
|
2726
|
+
var i = e.length;
|
|
2727
|
+
for (t = 0; t < i; t++) e[t] && (n = xa(e[t])) && (r && (r += " "), r += n);
|
|
2728
|
+
} else for (n in e) e[n] && (r && (r += " "), r += n);
|
|
2729
|
+
}
|
|
2734
2730
|
return r;
|
|
2735
2731
|
}
|
|
2736
|
-
function
|
|
2737
|
-
for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t =
|
|
2732
|
+
function Sa() {
|
|
2733
|
+
for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = xa(e)) && (r && (r += " "), r += t);
|
|
2738
2734
|
return r;
|
|
2739
2735
|
}
|
|
2740
2736
|
//#endregion
|
|
2741
2737
|
//#region src/components/ui/Table/TableFilter.tsx
|
|
2742
|
-
var
|
|
2738
|
+
var Ca = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
2743
2739
|
var n = l(), r = d();
|
|
2744
2740
|
function i(e) {
|
|
2745
2741
|
return e && e.length ? n(e, r) : 0;
|
|
2746
2742
|
}
|
|
2747
2743
|
t.exports = i;
|
|
2748
|
-
})))(), 1),
|
|
2749
|
-
e instanceof s && /* @__PURE__ */ N(
|
|
2744
|
+
})))(), 1), wa = ({ filter: e }) => /* @__PURE__ */ P(Le, { children: [
|
|
2745
|
+
e instanceof s && /* @__PURE__ */ N(ie, { filter: e }),
|
|
2750
2746
|
e instanceof o && /* @__PURE__ */ N(ee, { filter: e }),
|
|
2751
|
-
e instanceof r && /* @__PURE__ */ N(
|
|
2752
|
-
e instanceof a && /* @__PURE__ */ N(
|
|
2747
|
+
e instanceof r && /* @__PURE__ */ N(re, { filter: e }),
|
|
2748
|
+
e instanceof a && /* @__PURE__ */ N(D, { filter: e }),
|
|
2753
2749
|
e instanceof E && /* @__PURE__ */ N(ne, { filter: e }),
|
|
2754
2750
|
e instanceof i && /* @__PURE__ */ N(te, { filter: e })
|
|
2755
|
-
] }),
|
|
2756
|
-
let n = h(), { t: r } =
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
}), { formState: { isDirty:
|
|
2751
|
+
] }), Ta = ({ filter: e, onFilterChange: t }) => {
|
|
2752
|
+
let n = h(), { t: r } = Re(), i = m(n, (e) => e.setFilterValue), a = Fe(() => ({ [e.id]: e.initialFilterValue }), [e.id, e.initialFilterValue]), o = Fe(() => ({ [e.id]: e.filterValue ?? e.initialFilterValue }), [
|
|
2753
|
+
e.id,
|
|
2754
|
+
e.filterValue,
|
|
2755
|
+
e.initialFilterValue
|
|
2756
|
+
]), s = S({
|
|
2757
|
+
defaultValues: a,
|
|
2758
|
+
values: o
|
|
2759
|
+
}), { formState: { isDirty: c }, handleSubmit: l } = s, u = j(async (n) => {
|
|
2764
2760
|
await i(e.id, n[e.id]), t();
|
|
2765
2761
|
}, [
|
|
2766
2762
|
e.id,
|
|
2767
2763
|
t,
|
|
2768
2764
|
i
|
|
2769
|
-
]),
|
|
2765
|
+
]), d = j(async () => {
|
|
2770
2766
|
await i(e.id, e.initialFilterValue), t();
|
|
2771
2767
|
}, [
|
|
2772
2768
|
e.id,
|
|
@@ -2775,26 +2771,26 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
2775
2771
|
i
|
|
2776
2772
|
]);
|
|
2777
2773
|
return /* @__PURE__ */ N(T, {
|
|
2778
|
-
...
|
|
2779
|
-
children: /* @__PURE__ */ P(
|
|
2774
|
+
...s,
|
|
2775
|
+
children: /* @__PURE__ */ P(k, {
|
|
2780
2776
|
autoComplete: "off",
|
|
2781
2777
|
component: "form",
|
|
2782
2778
|
id: "Filters",
|
|
2783
|
-
onSubmit:
|
|
2779
|
+
onSubmit: l(u),
|
|
2784
2780
|
sx: { minWidth: "400px" },
|
|
2785
|
-
children: [/* @__PURE__ */ N(
|
|
2781
|
+
children: [/* @__PURE__ */ N(wa, { filter: e }), /* @__PURE__ */ P(k, {
|
|
2786
2782
|
sx: {
|
|
2787
2783
|
display: "flex",
|
|
2788
2784
|
gap: 1,
|
|
2789
2785
|
justifyContent: "flex-end"
|
|
2790
2786
|
},
|
|
2791
|
-
children: [/* @__PURE__ */ N(
|
|
2787
|
+
children: [/* @__PURE__ */ N(le, {
|
|
2792
2788
|
disabled: e.isInitialFilterValue(),
|
|
2793
|
-
onClick:
|
|
2789
|
+
onClick: d,
|
|
2794
2790
|
variant: "outlined",
|
|
2795
2791
|
children: r`Remove filter`
|
|
2796
|
-
}), /* @__PURE__ */ N(
|
|
2797
|
-
disabled: !
|
|
2792
|
+
}), /* @__PURE__ */ N(le, {
|
|
2793
|
+
disabled: !c,
|
|
2798
2794
|
type: "submit",
|
|
2799
2795
|
variant: "contained",
|
|
2800
2796
|
children: r`Apply`
|
|
@@ -2802,28 +2798,28 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
2802
2798
|
})]
|
|
2803
2799
|
})
|
|
2804
2800
|
});
|
|
2805
|
-
},
|
|
2806
|
-
let T =
|
|
2801
|
+
}, 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 = we(), E = h(), ee = m(E, b((e) => e.dataContext)), te = j((e) => {
|
|
2807
2803
|
l({
|
|
2808
|
-
dataContext:
|
|
2804
|
+
dataContext: ee,
|
|
2809
2805
|
id: a.id,
|
|
2810
2806
|
row: _,
|
|
2811
2807
|
rowIndex: v
|
|
2812
2808
|
}, e.nativeEvent);
|
|
2813
2809
|
}, [
|
|
2814
2810
|
a.id,
|
|
2815
|
-
|
|
2811
|
+
ee,
|
|
2816
2812
|
l,
|
|
2817
2813
|
_,
|
|
2818
2814
|
v
|
|
2819
|
-
]),
|
|
2815
|
+
]), ne = M(null), D = j((e) => {
|
|
2820
2816
|
if (!u || n && !n(e)) return;
|
|
2821
2817
|
let t = e.currentTarget, r = t.getBoundingClientRect().width, i = {
|
|
2822
2818
|
elementOffsetX: e.clientX - t.getBoundingClientRect().left,
|
|
2823
2819
|
elementWidth: r,
|
|
2824
2820
|
target: t
|
|
2825
2821
|
}, o = (n) => {
|
|
2826
|
-
|
|
2822
|
+
ne.current || (ne.current = {
|
|
2827
2823
|
target: t,
|
|
2828
2824
|
x: e.clientX,
|
|
2829
2825
|
y: e.clientY
|
|
@@ -2835,7 +2831,7 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
2835
2831
|
type: "start",
|
|
2836
2832
|
...i
|
|
2837
2833
|
}, a));
|
|
2838
|
-
let r = n.clientX -
|
|
2834
|
+
let r = n.clientX - ne.current.x, o = n.clientY - ne.current.y;
|
|
2839
2835
|
u({
|
|
2840
2836
|
clientX: n.clientX,
|
|
2841
2837
|
clientY: n.clientY,
|
|
@@ -2845,8 +2841,8 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
2845
2841
|
...i
|
|
2846
2842
|
}, a);
|
|
2847
2843
|
}, s = (e) => {
|
|
2848
|
-
if (e.preventDefault(),
|
|
2849
|
-
let t = e.clientX -
|
|
2844
|
+
if (e.preventDefault(), ne.current) {
|
|
2845
|
+
let t = e.clientX - ne.current.x, n = e.clientY - ne.current.y;
|
|
2850
2846
|
u({
|
|
2851
2847
|
clientX: e.clientX,
|
|
2852
2848
|
clientY: e.clientY,
|
|
@@ -2856,7 +2852,7 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
2856
2852
|
...i
|
|
2857
2853
|
}, a);
|
|
2858
2854
|
}
|
|
2859
|
-
|
|
2855
|
+
ne.current = null, document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", s);
|
|
2860
2856
|
};
|
|
2861
2857
|
document.addEventListener("mouseup", s, { once: !0 }), document.addEventListener("mousemove", o);
|
|
2862
2858
|
}, [
|
|
@@ -2865,7 +2861,7 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
2865
2861
|
a
|
|
2866
2862
|
]), re = !a.frozen, ie = j(() => {
|
|
2867
2863
|
let e = a.frozen === f.LEFT, n = a.frozen === f.RIGHT, r = e || n, i;
|
|
2868
|
-
return t && (
|
|
2864
|
+
return t && (Ea[t] ? i = Ea[t] : (i = T.palette.getContrastText(t), Ea[t] = i)), {
|
|
2869
2865
|
"*": t ?? { color: i ? `${i} !important` : void 0 },
|
|
2870
2866
|
background: r ? T.palette.background.paper : t,
|
|
2871
2867
|
boxSizing: "border-box",
|
|
@@ -2897,15 +2893,15 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
2897
2893
|
C,
|
|
2898
2894
|
w
|
|
2899
2895
|
]);
|
|
2900
|
-
return /* @__PURE__ */ N(
|
|
2896
|
+
return /* @__PURE__ */ N(k, {
|
|
2901
2897
|
"aria-sort": e,
|
|
2902
2898
|
className: i,
|
|
2903
2899
|
"data-column-index": o,
|
|
2904
2900
|
"data-frozen": +!!a.frozen,
|
|
2905
2901
|
"data-id": a.id,
|
|
2906
2902
|
"data-row-index": v ?? "",
|
|
2907
|
-
onClick: l && s ?
|
|
2908
|
-
onMouseDown: re && u ?
|
|
2903
|
+
onClick: l && s ? te : void 0,
|
|
2904
|
+
onMouseDown: re && u ? D : void 0,
|
|
2909
2905
|
ref: p,
|
|
2910
2906
|
role: g ?? "cell",
|
|
2911
2907
|
sx: ie(),
|
|
@@ -2913,14 +2909,14 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
2913
2909
|
title: S,
|
|
2914
2910
|
children: r
|
|
2915
2911
|
});
|
|
2916
|
-
},
|
|
2912
|
+
}, Oa = {
|
|
2917
2913
|
columnDivider: "GENEPIX-TableHeaderCell-columnDivider",
|
|
2918
2914
|
content: "GENEPIX-TableHeaderCell-content",
|
|
2919
2915
|
customHeaderIcon: "GENEPIX-TableHeaderCell-customHeaderIcon",
|
|
2920
2916
|
filterLabelIcon: "GENEPIX-TableHeaderCell-filterLabelIcon",
|
|
2921
2917
|
root: "GENEPIX-TableHeaderCell",
|
|
2922
2918
|
sortLabelIcon: "GENEPIX-TableHeaderCell-sortLabelIcon"
|
|
2923
|
-
},
|
|
2919
|
+
}, ka = 18, Aa = `${Oa.root}--focus`, ja = Ce(me, { name: "GENEPIX-TableSortLabelIcon" })(({ ownerState: e, theme: t }) => ({
|
|
2924
2920
|
"&:hover": {
|
|
2925
2921
|
color: t.palette.primary.main,
|
|
2926
2922
|
opacity: "1 !important"
|
|
@@ -2931,40 +2927,40 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
2931
2927
|
},
|
|
2932
2928
|
color: t.palette.text.primary,
|
|
2933
2929
|
display: "none",
|
|
2934
|
-
fontSize:
|
|
2935
|
-
height: `${
|
|
2930
|
+
fontSize: ka,
|
|
2931
|
+
height: `${ka}px`,
|
|
2936
2932
|
opacity: 0,
|
|
2937
2933
|
padding: 0,
|
|
2938
2934
|
userSelect: "none",
|
|
2939
|
-
width: `${
|
|
2940
|
-
})),
|
|
2935
|
+
width: `${ka}px`
|
|
2936
|
+
})), Ma = Ce(me, { name: "GENEPIX-TableCustomHeaderIcon" })(({ theme: e }) => ({
|
|
2941
2937
|
"&:hover": {
|
|
2942
2938
|
color: e.palette.primary.main,
|
|
2943
2939
|
opacity: "1 !important"
|
|
2944
2940
|
},
|
|
2945
2941
|
display: "none",
|
|
2946
|
-
fontSize:
|
|
2947
|
-
height: `${
|
|
2942
|
+
fontSize: ka,
|
|
2943
|
+
height: `${ka}px`,
|
|
2948
2944
|
opacity: 0,
|
|
2949
2945
|
padding: 0,
|
|
2950
2946
|
userSelect: "none",
|
|
2951
|
-
width: `${
|
|
2952
|
-
})),
|
|
2947
|
+
width: `${ka}px`
|
|
2948
|
+
})), Na = Ce(me, { name: "GENEPIX-TableFilterLabelIcon" })(({ theme: e }) => ({
|
|
2953
2949
|
"&:hover": {
|
|
2954
2950
|
color: e.palette.primary.main,
|
|
2955
2951
|
opacity: "1 !important"
|
|
2956
2952
|
},
|
|
2957
2953
|
display: "none",
|
|
2958
|
-
fontSize:
|
|
2959
|
-
height: `${
|
|
2954
|
+
fontSize: ka,
|
|
2955
|
+
height: `${ka}px`,
|
|
2960
2956
|
opacity: 0,
|
|
2961
2957
|
padding: 0,
|
|
2962
2958
|
userSelect: "none",
|
|
2963
|
-
width: `${
|
|
2964
|
-
})),
|
|
2965
|
-
let { t } =
|
|
2959
|
+
width: `${ka}px`
|
|
2960
|
+
})), Pa = (e) => {
|
|
2961
|
+
let { t } = Re(), n = we(), 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 = Me(), [d, f] = Ie(), 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) => {
|
|
2966
2962
|
C && (e.type === "start" && (ee.current = !0), C(e, t));
|
|
2967
|
-
}, [C]),
|
|
2963
|
+
}, [C]), D = j(async () => {
|
|
2968
2964
|
if (i === _.id) {
|
|
2969
2965
|
await s(_.id, o === "asc" ? "desc" : "asc");
|
|
2970
2966
|
return;
|
|
@@ -2975,42 +2971,42 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
2975
2971
|
s,
|
|
2976
2972
|
i,
|
|
2977
2973
|
o
|
|
2978
|
-
]),
|
|
2974
|
+
]), re = j(async (e) => {
|
|
2979
2975
|
if (ee.current) {
|
|
2980
2976
|
e.preventDefault(), e.stopPropagation(), ee.current = !1;
|
|
2981
2977
|
return;
|
|
2982
2978
|
}
|
|
2983
|
-
_.comparatorFactory && await
|
|
2984
|
-
}, [_.comparatorFactory,
|
|
2985
|
-
await
|
|
2986
|
-
}, [
|
|
2979
|
+
_.comparatorFactory && await D();
|
|
2980
|
+
}, [_.comparatorFactory, D]), ie = j(async (e) => {
|
|
2981
|
+
await D();
|
|
2982
|
+
}, [D]), ae = j(() => {
|
|
2987
2983
|
f((e) => e ? null : p.current);
|
|
2988
|
-
}, []),
|
|
2984
|
+
}, []), oe = j(() => {
|
|
2989
2985
|
f(null);
|
|
2990
|
-
}, []),
|
|
2986
|
+
}, []), se = j((e) => {
|
|
2991
2987
|
e.button === 0 && (e.preventDefault(), e.stopPropagation(), S(e, _));
|
|
2992
|
-
}, [_, S]),
|
|
2988
|
+
}, [_, S]), ce = j((e) => {
|
|
2993
2989
|
x(e, _);
|
|
2994
|
-
}, [_, x]),
|
|
2990
|
+
}, [_, x]), O = Fe(() => c.find((e) => e.id === _.id), [_.id, c]), le = Fe(() => !!O && !O.isInitialFilterValue(), [O]), ue = j(() => {
|
|
2995
2991
|
_.customHeaderIcon?.onClick({
|
|
2996
2992
|
column: _,
|
|
2997
2993
|
dataContext: a
|
|
2998
2994
|
});
|
|
2999
|
-
}, [_, a]),
|
|
2995
|
+
}, [_, a]), de = j(() => {
|
|
3000
2996
|
f(null), setTimeout(() => {
|
|
3001
|
-
p.current.classList.add(
|
|
2997
|
+
p.current.classList.add(Aa), p.current?.focus(), g.current?.focus();
|
|
3002
2998
|
});
|
|
3003
|
-
}, []),
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
2999
|
+
}, []), fe = i === _.id, pe = { direction: i === _.id ? o : "asc" }, me = Sa(Oa.sortLabelIcon, { [`${Oa.sortLabelIcon}--active`]: fe }), he = Sa(Oa.filterLabelIcon, { [`${Oa.filterLabelIcon}--active`]: le }), ye = !!_.customHeaderIcon, be = !!_.comparatorFactory, xe = !!O, Se = be || xe || ye ? 0 : -1, Ce = +n.spacing(2).replace("px", ""), Te = Fe(() => {
|
|
3000
|
+
if (i === _.id) return o === "asc" ? "ascending" : "descending";
|
|
3001
|
+
}, [
|
|
3002
|
+
_.id,
|
|
3003
|
+
i,
|
|
3004
|
+
o
|
|
3005
|
+
]);
|
|
3006
|
+
return /* @__PURE__ */ P(Da, {
|
|
3007
|
+
ariaSort: Te,
|
|
3012
3008
|
canDrag: te,
|
|
3013
|
-
className:
|
|
3009
|
+
className: Sa(Oa.root, { [Aa]: !!d }),
|
|
3014
3010
|
column: _,
|
|
3015
3011
|
columnIndex: v,
|
|
3016
3012
|
height: b,
|
|
@@ -3019,15 +3015,15 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3019
3015
|
ref: p,
|
|
3020
3016
|
role: "columnheader",
|
|
3021
3017
|
sx: {
|
|
3022
|
-
[`.${
|
|
3023
|
-
[`.${
|
|
3018
|
+
[`.${Oa.filterLabelIcon}--active`]: { color: n.palette.secondary.main },
|
|
3019
|
+
[`.${Oa.sortLabelIcon}--active, .${Oa.filterLabelIcon}--active`]: {
|
|
3024
3020
|
display: "inline-block",
|
|
3025
3021
|
opacity: "1 !important"
|
|
3026
3022
|
},
|
|
3027
|
-
[`.${
|
|
3028
|
-
[`&:hover, &:focus-visible, &:focus, &:focus-within, &.${
|
|
3029
|
-
[`.${
|
|
3030
|
-
[`.${
|
|
3023
|
+
[`.${Oa.sortLabelIcon}--active`]: { color: n.palette.text.secondary },
|
|
3024
|
+
[`&:hover, &:focus-visible, &:focus, &:focus-within, &.${Aa}`]: {
|
|
3025
|
+
[`.${Oa.columnDivider}`]: { opacity: 1 },
|
|
3026
|
+
[`.${Oa.sortLabelIcon}, .${Oa.filterLabelIcon}, .${Oa.customHeaderIcon}`]: {
|
|
3031
3027
|
display: "inline-block",
|
|
3032
3028
|
opacity: .5
|
|
3033
3029
|
}
|
|
@@ -3041,16 +3037,16 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3041
3037
|
tabIndex: Se,
|
|
3042
3038
|
width: T,
|
|
3043
3039
|
xOffset: E,
|
|
3044
|
-
children: [_.type === "actions" && /* @__PURE__ */ N(
|
|
3045
|
-
className:
|
|
3046
|
-
sx:
|
|
3040
|
+
children: [_.type === "actions" && /* @__PURE__ */ N(k, {
|
|
3041
|
+
className: Oa.content,
|
|
3042
|
+
sx: He,
|
|
3047
3043
|
children: t`Actions`
|
|
3048
|
-
}), _.type !== "actions" && /* @__PURE__ */ P(
|
|
3044
|
+
}), _.type !== "actions" && /* @__PURE__ */ P(k, {
|
|
3049
3045
|
sx: {
|
|
3050
|
-
[`&:hover .${
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3046
|
+
[`&:hover .${Oa.content}`]: { maxWidth: `calc(100% + 16px - ${(0, Ca.default)([
|
|
3047
|
+
ye ? Ce : 0,
|
|
3048
|
+
xe ? Ce : 0,
|
|
3049
|
+
be ? Ce : 0,
|
|
3054
3050
|
Ce
|
|
3055
3051
|
])}px)` },
|
|
3056
3052
|
alignItems: "center",
|
|
@@ -3058,23 +3054,23 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3058
3054
|
width: "100%"
|
|
3059
3055
|
},
|
|
3060
3056
|
children: [
|
|
3061
|
-
_.renderHeader ? /* @__PURE__ */ N(
|
|
3057
|
+
_.renderHeader ? /* @__PURE__ */ N(Le, { children: _.renderHeader({
|
|
3062
3058
|
column: _,
|
|
3063
3059
|
dataContext: a
|
|
3064
|
-
}) }) : /* @__PURE__ */ N(
|
|
3060
|
+
}) }) : /* @__PURE__ */ N(ve, {
|
|
3065
3061
|
arrow: !0,
|
|
3066
3062
|
placement: "top",
|
|
3067
3063
|
title: _.headerTooltipContent,
|
|
3068
|
-
children: /* @__PURE__ */ N(
|
|
3069
|
-
className:
|
|
3070
|
-
onClick:
|
|
3064
|
+
children: /* @__PURE__ */ N(k, {
|
|
3065
|
+
className: Oa.content,
|
|
3066
|
+
onClick: re,
|
|
3071
3067
|
ref: l,
|
|
3072
3068
|
sx: {
|
|
3073
3069
|
cursor: "pointer",
|
|
3074
3070
|
flexGrow: 1,
|
|
3075
|
-
maxWidth: `calc(100% + 16px - ${(0,
|
|
3076
|
-
|
|
3077
|
-
|
|
3071
|
+
maxWidth: `calc(100% + 16px - ${(0, Ca.default)([
|
|
3072
|
+
fe ? Ce : 0,
|
|
3073
|
+
le ? Ce : 0,
|
|
3078
3074
|
Ce
|
|
3079
3075
|
])}px)`,
|
|
3080
3076
|
overflow: "hidden",
|
|
@@ -3087,57 +3083,57 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3087
3083
|
}) : _.headerName ?? ""
|
|
3088
3084
|
})
|
|
3089
3085
|
}),
|
|
3090
|
-
|
|
3091
|
-
className:
|
|
3092
|
-
onClick:
|
|
3086
|
+
ye && /* @__PURE__ */ N(Ma, {
|
|
3087
|
+
className: Oa.customHeaderIcon,
|
|
3088
|
+
onClick: ue,
|
|
3093
3089
|
tabIndex: 0,
|
|
3094
3090
|
title: _.customHeaderIcon?.label,
|
|
3095
3091
|
children: _.customHeaderIcon?.iconElement
|
|
3096
3092
|
}),
|
|
3097
|
-
|
|
3093
|
+
xe && /* @__PURE__ */ P(Le, { children: [/* @__PURE__ */ N(Na, {
|
|
3098
3094
|
className: he,
|
|
3099
|
-
onClick:
|
|
3095
|
+
onClick: ae,
|
|
3100
3096
|
ref: g,
|
|
3101
3097
|
tabIndex: 0,
|
|
3102
3098
|
title: t("Show filter for {{name}}", { name: _.headerName || t("unknown") }),
|
|
3103
|
-
children: /* @__PURE__ */ N(
|
|
3104
|
-
}), /* @__PURE__ */ N(
|
|
3099
|
+
children: /* @__PURE__ */ N(We, { fontSize: "inherit" })
|
|
3100
|
+
}), /* @__PURE__ */ N(_e, {
|
|
3105
3101
|
anchorEl: d,
|
|
3106
3102
|
anchorOrigin: {
|
|
3107
3103
|
horizontal: "center",
|
|
3108
3104
|
vertical: "bottom"
|
|
3109
3105
|
},
|
|
3110
3106
|
id: u,
|
|
3111
|
-
onClose:
|
|
3107
|
+
onClose: de,
|
|
3112
3108
|
open: !!d,
|
|
3113
3109
|
sx: { zIndex: n.zIndex.appBar + 1 },
|
|
3114
3110
|
transformOrigin: {
|
|
3115
3111
|
horizontal: "center",
|
|
3116
3112
|
vertical: "top"
|
|
3117
3113
|
},
|
|
3118
|
-
children: /* @__PURE__ */ N(
|
|
3114
|
+
children: /* @__PURE__ */ N(ge, {
|
|
3119
3115
|
elevation: 4,
|
|
3120
3116
|
square: !0,
|
|
3121
3117
|
sx: { padding: n.spacing(3) },
|
|
3122
|
-
children: /* @__PURE__ */ N(
|
|
3123
|
-
filter:
|
|
3124
|
-
onFilterChange:
|
|
3118
|
+
children: /* @__PURE__ */ N(Ta, {
|
|
3119
|
+
filter: O,
|
|
3120
|
+
onFilterChange: oe
|
|
3125
3121
|
})
|
|
3126
3122
|
})
|
|
3127
3123
|
})] }),
|
|
3128
|
-
|
|
3124
|
+
be && /* @__PURE__ */ N(Le, { children: /* @__PURE__ */ N(ja, {
|
|
3129
3125
|
className: me,
|
|
3130
|
-
onClick:
|
|
3126
|
+
onClick: ie,
|
|
3131
3127
|
ownerState: pe,
|
|
3132
3128
|
tabIndex: 0,
|
|
3133
3129
|
title: t("Toggle sorting for {{name}}", { name: _.headerName || t("unknown") }),
|
|
3134
|
-
children: /* @__PURE__ */ N(
|
|
3130
|
+
children: /* @__PURE__ */ N(Ue, { fontSize: "inherit" })
|
|
3135
3131
|
}) }),
|
|
3136
|
-
_.resizable !== !1 && /* @__PURE__ */ N(
|
|
3132
|
+
_.resizable !== !1 && /* @__PURE__ */ N(k, {
|
|
3137
3133
|
"aria-label": t("Resize column {{name}}, use arrow keys to adjust the size.", { name: _.headerName || t("unknown") }),
|
|
3138
|
-
className:
|
|
3139
|
-
onKeyDown:
|
|
3140
|
-
onMouseDown:
|
|
3134
|
+
className: Oa.columnDivider,
|
|
3135
|
+
onKeyDown: ce,
|
|
3136
|
+
onMouseDown: se,
|
|
3141
3137
|
role: "separator",
|
|
3142
3138
|
sx: {
|
|
3143
3139
|
"&:focus-visible, &:focus, &:focus-within": {
|
|
@@ -3162,65 +3158,65 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3162
3158
|
]
|
|
3163
3159
|
})]
|
|
3164
3160
|
}, _.id);
|
|
3165
|
-
},
|
|
3166
|
-
let t =
|
|
3167
|
-
|
|
3168
|
-
}, []),
|
|
3169
|
-
|
|
3170
|
-
}, []),
|
|
3171
|
-
dataContext:
|
|
3161
|
+
}, Fa = (e) => {
|
|
3162
|
+
let t = h(), n = m(t, b((e) => e.dataContext)), [r, i] = Ie(null), { t: a } = Re(), o = !!r, s = j((e) => {
|
|
3163
|
+
i(e.currentTarget);
|
|
3164
|
+
}, []), c = j(() => {
|
|
3165
|
+
i(null);
|
|
3166
|
+
}, []), l = Fe(() => e.column.getActions({
|
|
3167
|
+
dataContext: n,
|
|
3172
3168
|
id: e.column.id,
|
|
3173
3169
|
row: e.row,
|
|
3174
3170
|
rowIndex: e.rowIndex
|
|
3175
3171
|
}), [
|
|
3176
|
-
|
|
3172
|
+
n,
|
|
3177
3173
|
e.column,
|
|
3178
3174
|
e.row,
|
|
3179
3175
|
e.rowIndex
|
|
3180
|
-
]),
|
|
3181
|
-
return /* @__PURE__ */ N(
|
|
3176
|
+
]), u = j(() => {}, []);
|
|
3177
|
+
return /* @__PURE__ */ N(Da, {
|
|
3182
3178
|
...e,
|
|
3183
|
-
onClick:
|
|
3184
|
-
children:
|
|
3185
|
-
"aria-label":
|
|
3186
|
-
onClick:
|
|
3179
|
+
onClick: u,
|
|
3180
|
+
children: l.length > 0 && /* @__PURE__ */ P(Le, { children: [/* @__PURE__ */ N(me, {
|
|
3181
|
+
"aria-label": a`Row actions`,
|
|
3182
|
+
onClick: s,
|
|
3187
3183
|
sx: {
|
|
3188
3184
|
"& svg": { fontSize: 18 },
|
|
3189
3185
|
position: "absolute",
|
|
3190
3186
|
top: "50%",
|
|
3191
3187
|
transform: "translateY(-50%)"
|
|
3192
3188
|
},
|
|
3193
|
-
children: /* @__PURE__ */ N(
|
|
3194
|
-
}), /* @__PURE__ */ N(
|
|
3195
|
-
anchorEl:
|
|
3189
|
+
children: /* @__PURE__ */ N(Ge, {})
|
|
3190
|
+
}), /* @__PURE__ */ N(he, {
|
|
3191
|
+
anchorEl: r,
|
|
3196
3192
|
id: "basic-menu",
|
|
3197
|
-
onClick:
|
|
3198
|
-
onClose:
|
|
3199
|
-
open:
|
|
3193
|
+
onClick: c,
|
|
3194
|
+
onClose: c,
|
|
3195
|
+
open: o,
|
|
3200
3196
|
slotProps: { list: { "aria-labelledby": "basic-button" } },
|
|
3201
|
-
children:
|
|
3197
|
+
children: l
|
|
3202
3198
|
})] })
|
|
3203
3199
|
}, e.column.id);
|
|
3204
|
-
},
|
|
3205
|
-
let t =
|
|
3206
|
-
return /* @__PURE__ */ N(
|
|
3207
|
-
...
|
|
3200
|
+
}, Ia = ({ children: e }) => {
|
|
3201
|
+
let t = Fe(() => ({ sideEffects: Ze({ styles: { active: { opacity: "0.6" } } }) }), []);
|
|
3202
|
+
return /* @__PURE__ */ N(Je, {
|
|
3203
|
+
...ze.createAttributes("SortableOverlay"),
|
|
3208
3204
|
dropAnimation: t,
|
|
3209
3205
|
zIndex: 1e3,
|
|
3210
3206
|
children: e
|
|
3211
3207
|
});
|
|
3212
|
-
},
|
|
3208
|
+
}, La = De({
|
|
3213
3209
|
attributes: void 0,
|
|
3214
3210
|
listeners: void 0,
|
|
3215
3211
|
ref: void 0
|
|
3216
|
-
}),
|
|
3212
|
+
}), Ra = (e) => {
|
|
3217
3213
|
let { children: t, value: n } = e;
|
|
3218
|
-
return /* @__PURE__ */ N(
|
|
3214
|
+
return /* @__PURE__ */ N(La, {
|
|
3219
3215
|
value: n,
|
|
3220
3216
|
children: t
|
|
3221
3217
|
});
|
|
3222
|
-
},
|
|
3223
|
-
let r =
|
|
3218
|
+
}, za = ({ children: e, id: t, sx: n }) => {
|
|
3219
|
+
let r = we(), { attributes: i, isDragging: a, listeners: o, setActivatorNodeRef: s, setNodeRef: c, transform: l, transition: u } = rt({ id: t }), d = Fe(() => ({
|
|
3224
3220
|
attributes: i,
|
|
3225
3221
|
listeners: o,
|
|
3226
3222
|
ref: s
|
|
@@ -3230,13 +3226,13 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3230
3226
|
s
|
|
3231
3227
|
]), f = {
|
|
3232
3228
|
backgroundColor: a ? r.palette.secondary.main : r.palette.background.paper,
|
|
3233
|
-
transform:
|
|
3229
|
+
transform: it.Translate.toString(l),
|
|
3234
3230
|
transition: u
|
|
3235
3231
|
};
|
|
3236
|
-
return /* @__PURE__ */ N(
|
|
3232
|
+
return /* @__PURE__ */ N(Ra, {
|
|
3237
3233
|
value: d,
|
|
3238
|
-
children: /* @__PURE__ */ N(
|
|
3239
|
-
...
|
|
3234
|
+
children: /* @__PURE__ */ N(k, {
|
|
3235
|
+
...ze.createAttributes("SortableListItem", { id: t }),
|
|
3240
3236
|
component: "li",
|
|
3241
3237
|
ref: c,
|
|
3242
3238
|
style: f,
|
|
@@ -3255,10 +3251,10 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3255
3251
|
children: e
|
|
3256
3252
|
})
|
|
3257
3253
|
});
|
|
3258
|
-
},
|
|
3259
|
-
let t =
|
|
3260
|
-
return /* @__PURE__ */ N(
|
|
3261
|
-
...
|
|
3254
|
+
}, Ba = ({ name: e }) => {
|
|
3255
|
+
let t = we(), { attributes: n, listeners: r, ref: i } = Ae(La);
|
|
3256
|
+
return /* @__PURE__ */ N(k, {
|
|
3257
|
+
...ze.createAttributes("SortableListItemDragHandle"),
|
|
3262
3258
|
component: "button",
|
|
3263
3259
|
...n,
|
|
3264
3260
|
...r,
|
|
@@ -3280,13 +3276,17 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3280
3276
|
outline: "none",
|
|
3281
3277
|
touchAction: "none"
|
|
3282
3278
|
},
|
|
3283
|
-
children: /* @__PURE__ */ N(
|
|
3279
|
+
children: /* @__PURE__ */ N(at, {})
|
|
3284
3280
|
});
|
|
3285
|
-
},
|
|
3286
|
-
let r =
|
|
3281
|
+
}, Va = ({ items: e, onChange: t, renderItemContent: n }) => {
|
|
3282
|
+
let r = we(), { t: i } = Re(), [a, o] = Ie(null), s = Fe(() => e.find((e) => e.id === a?.id), [a, e]), c = $e(Qe(Xe), Qe(Ye, { coordinateGetter: nt })), l = j(() => {
|
|
3287
3283
|
o(null);
|
|
3288
3284
|
}, []), u = j(({ active: n, over: r }) => {
|
|
3289
|
-
r && n.id !== r?.id
|
|
3285
|
+
if (r && n.id !== r?.id) {
|
|
3286
|
+
let i = e.findIndex(({ id: e }) => e === n.id), a = e.findIndex(({ id: e }) => e === r.id);
|
|
3287
|
+
t(tt(e, i, a));
|
|
3288
|
+
}
|
|
3289
|
+
o(null);
|
|
3290
3290
|
}, [e, t]), d = j(({ active: e }) => {
|
|
3291
3291
|
o(e);
|
|
3292
3292
|
}, []), f = j((n) => {
|
|
@@ -3297,14 +3297,14 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3297
3297
|
...e,
|
|
3298
3298
|
isSelected: i
|
|
3299
3299
|
} : e));
|
|
3300
|
-
}, [t, e]), p = j((e) => /* @__PURE__ */ P(
|
|
3300
|
+
}, [t, e]), p = j((e) => /* @__PURE__ */ P(za, {
|
|
3301
3301
|
id: e.id,
|
|
3302
3302
|
sx: {
|
|
3303
3303
|
"&:hover": { backgroundColor: r.palette.action.hover },
|
|
3304
3304
|
backgroundColor: r.palette.background.paper
|
|
3305
3305
|
},
|
|
3306
|
-
children: [/* @__PURE__ */ N(
|
|
3307
|
-
control: /* @__PURE__ */ N(
|
|
3306
|
+
children: [/* @__PURE__ */ N(fe, {
|
|
3307
|
+
control: /* @__PURE__ */ N(ue, {
|
|
3308
3308
|
checked: e.isSelected,
|
|
3309
3309
|
onChange: f,
|
|
3310
3310
|
size: "small",
|
|
@@ -3315,22 +3315,22 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3315
3315
|
flexGrow: 1,
|
|
3316
3316
|
paddingLeft: r.spacing(1)
|
|
3317
3317
|
}
|
|
3318
|
-
}), /* @__PURE__ */ N(
|
|
3318
|
+
}), /* @__PURE__ */ N(Ba, { name: i("Drag handle for {{label}}", { label: e.label }) })]
|
|
3319
3319
|
}, e.id), [
|
|
3320
3320
|
f,
|
|
3321
3321
|
n,
|
|
3322
3322
|
i,
|
|
3323
3323
|
r
|
|
3324
3324
|
]);
|
|
3325
|
-
return /* @__PURE__ */ P(
|
|
3325
|
+
return /* @__PURE__ */ P(qe, {
|
|
3326
3326
|
onDragCancel: l,
|
|
3327
3327
|
onDragEnd: u,
|
|
3328
3328
|
onDragStart: d,
|
|
3329
3329
|
sensors: c,
|
|
3330
|
-
children: [/* @__PURE__ */ N(
|
|
3330
|
+
children: [/* @__PURE__ */ N(et, {
|
|
3331
3331
|
items: e,
|
|
3332
|
-
children: /* @__PURE__ */ N(
|
|
3333
|
-
...
|
|
3332
|
+
children: /* @__PURE__ */ N(pe, { children: /* @__PURE__ */ N(k, {
|
|
3333
|
+
...ze.createAttributes("SortableList"),
|
|
3334
3334
|
component: "ul",
|
|
3335
3335
|
sx: {
|
|
3336
3336
|
display: "flex",
|
|
@@ -3341,10 +3341,10 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3341
3341
|
},
|
|
3342
3342
|
children: e.map((e) => p(e))
|
|
3343
3343
|
}) })
|
|
3344
|
-
}), /* @__PURE__ */ N(
|
|
3344
|
+
}), /* @__PURE__ */ N(Ia, { children: s ? p(s) : null })]
|
|
3345
3345
|
});
|
|
3346
|
-
},
|
|
3347
|
-
let { t: i } =
|
|
3346
|
+
}, Ha = Ke(({ onActionsChange: e, onClose: t, onTitleChange: n, openProps: { hasCellData: r } }) => {
|
|
3347
|
+
let { t: i } = Re(), [a, o] = Ie([]), 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 = Fe(() => {
|
|
3348
3348
|
let e = /* @__PURE__ */ new Map();
|
|
3349
3349
|
return f.forEach((t) => {
|
|
3350
3350
|
e.set(t.id, t);
|
|
@@ -3360,13 +3360,13 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3360
3360
|
});
|
|
3361
3361
|
}), o(t);
|
|
3362
3362
|
}, [g]);
|
|
3363
|
-
|
|
3363
|
+
je(() => {
|
|
3364
3364
|
_(d);
|
|
3365
3365
|
}, [d, _]);
|
|
3366
3366
|
let v = j(() => {
|
|
3367
3367
|
_(u.createInitialVisualColumnSettings(f));
|
|
3368
3368
|
}, [f, _]);
|
|
3369
|
-
|
|
3369
|
+
je(() => {
|
|
3370
3370
|
n(i`Change column order and visibility`);
|
|
3371
3371
|
}, [n, i]);
|
|
3372
3372
|
let y = j(() => {
|
|
@@ -3415,10 +3415,10 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3415
3415
|
isSelected: !1
|
|
3416
3416
|
})));
|
|
3417
3417
|
}, []);
|
|
3418
|
-
|
|
3418
|
+
je(() => {
|
|
3419
3419
|
e([
|
|
3420
3420
|
{
|
|
3421
|
-
...
|
|
3421
|
+
...ze.createAttributes("TableColumnOrderDialog-enable-all"),
|
|
3422
3422
|
autoFocus: !0,
|
|
3423
3423
|
color: "secondary",
|
|
3424
3424
|
label: i`Enable all`,
|
|
@@ -3426,7 +3426,7 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3426
3426
|
variant: "outlined"
|
|
3427
3427
|
},
|
|
3428
3428
|
{
|
|
3429
|
-
...
|
|
3429
|
+
...ze.createAttributes("TableColumnOrderDialog-enable-all-with-data"),
|
|
3430
3430
|
autoFocus: !0,
|
|
3431
3431
|
color: "secondary",
|
|
3432
3432
|
label: i`Enable all with data`,
|
|
@@ -3434,7 +3434,7 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3434
3434
|
variant: "outlined"
|
|
3435
3435
|
},
|
|
3436
3436
|
{
|
|
3437
|
-
...
|
|
3437
|
+
...ze.createAttributes("TableColumnOrderDialog-disable-all"),
|
|
3438
3438
|
autoFocus: !0,
|
|
3439
3439
|
color: "secondary",
|
|
3440
3440
|
label: i`Disable all`,
|
|
@@ -3442,7 +3442,7 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3442
3442
|
variant: "outlined"
|
|
3443
3443
|
},
|
|
3444
3444
|
{
|
|
3445
|
-
...
|
|
3445
|
+
...ze.createAttributes("TableColumnOrderDialog-disable-all-without-data"),
|
|
3446
3446
|
autoFocus: !0,
|
|
3447
3447
|
color: "secondary",
|
|
3448
3448
|
label: i`Disable all without data`,
|
|
@@ -3450,7 +3450,7 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3450
3450
|
variant: "outlined"
|
|
3451
3451
|
},
|
|
3452
3452
|
{
|
|
3453
|
-
...
|
|
3453
|
+
...ze.createAttributes("TableColumnOrderDialog-reset"),
|
|
3454
3454
|
autoFocus: !0,
|
|
3455
3455
|
color: "secondary",
|
|
3456
3456
|
label: i`Reset to default`,
|
|
@@ -3458,7 +3458,7 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3458
3458
|
variant: "outlined"
|
|
3459
3459
|
},
|
|
3460
3460
|
{
|
|
3461
|
-
...
|
|
3461
|
+
...ze.createAttributes("TableColumnOrderDialog-close"),
|
|
3462
3462
|
autoFocus: !0,
|
|
3463
3463
|
color: "primary",
|
|
3464
3464
|
label: i`Close`,
|
|
@@ -3466,7 +3466,7 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3466
3466
|
variant: "outlined"
|
|
3467
3467
|
},
|
|
3468
3468
|
{
|
|
3469
|
-
...
|
|
3469
|
+
...ze.createAttributes("TableColumnOrderDialog-save"),
|
|
3470
3470
|
autoFocus: !0,
|
|
3471
3471
|
color: "secondary",
|
|
3472
3472
|
label: i`Apply`,
|
|
@@ -3484,14 +3484,16 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3484
3484
|
w,
|
|
3485
3485
|
i,
|
|
3486
3486
|
C
|
|
3487
|
-
])
|
|
3487
|
+
]);
|
|
3488
|
+
let E = j((e) => {
|
|
3489
|
+
o(e);
|
|
3490
|
+
}, []), ee = j((e) => e.label, []);
|
|
3491
|
+
return /* @__PURE__ */ N(k, {
|
|
3488
3492
|
sx: {},
|
|
3489
|
-
children: /* @__PURE__ */ N(
|
|
3493
|
+
children: /* @__PURE__ */ N(Va, {
|
|
3490
3494
|
items: a,
|
|
3491
|
-
onChange:
|
|
3492
|
-
|
|
3493
|
-
}, []),
|
|
3494
|
-
renderItemContent: j((e) => e.label, [])
|
|
3495
|
+
onChange: E,
|
|
3496
|
+
renderItemContent: ee
|
|
3495
3497
|
})
|
|
3496
3498
|
});
|
|
3497
3499
|
}, {
|
|
@@ -3501,14 +3503,14 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3501
3503
|
maxWidth: "md",
|
|
3502
3504
|
noCloseButton: !1,
|
|
3503
3505
|
testId: "TableColumnOrderDialog"
|
|
3504
|
-
}),
|
|
3505
|
-
let { t: r } =
|
|
3506
|
+
}), Ua = ({ cell: e, onCheckBoxClick: t, tableColumn: n }) => {
|
|
3507
|
+
let { t: r } = Re(), 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) => {
|
|
3506
3508
|
e.stopPropagation(), e.shiftKey && e.preventDefault(), t(e, c);
|
|
3507
3509
|
}, [t, c]), u = j((e, t) => {
|
|
3508
3510
|
let n = e.target.getAttribute("name");
|
|
3509
3511
|
t && !o.includes(n) ? s([...o, n]) : t || s(o.filter((e) => e !== n));
|
|
3510
3512
|
}, [o, s]);
|
|
3511
|
-
return /* @__PURE__ */ N(
|
|
3513
|
+
return /* @__PURE__ */ N(ue, {
|
|
3512
3514
|
checked: o.includes(c),
|
|
3513
3515
|
disabled: n.isDisabled ? n.isDisabled(e) : !1,
|
|
3514
3516
|
name: a(e.row),
|
|
@@ -3520,15 +3522,15 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3520
3522
|
padding: 0
|
|
3521
3523
|
}
|
|
3522
3524
|
});
|
|
3523
|
-
},
|
|
3524
|
-
let { t } =
|
|
3525
|
+
}, Wa = /* @__PURE__ */ e(y(), 1), Ga = ({ tableColumnParams: e }) => {
|
|
3526
|
+
let { t } = Re(), 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({
|
|
3525
3527
|
dataContext: i,
|
|
3526
3528
|
id: a(e),
|
|
3527
3529
|
row: e,
|
|
3528
3530
|
rowIndex: s.indexOf(e)
|
|
3529
3531
|
}) === !1) : s, u = l.every((e) => o.includes(a(e))), d = l.some((e) => o.includes(a(e))), f = j((e) => {
|
|
3530
3532
|
let t = l.map((e) => a(e));
|
|
3531
|
-
c(u ? o.filter((e) => !t.includes(e)) : (0,
|
|
3533
|
+
c(u ? o.filter((e) => !t.includes(e)) : (0, Wa.default)([...o, ...t]));
|
|
3532
3534
|
}, [
|
|
3533
3535
|
l,
|
|
3534
3536
|
a,
|
|
@@ -3536,9 +3538,9 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3536
3538
|
o,
|
|
3537
3539
|
c
|
|
3538
3540
|
]);
|
|
3539
|
-
return /* @__PURE__ */ N(
|
|
3541
|
+
return /* @__PURE__ */ N(ue, {
|
|
3540
3542
|
checked: d,
|
|
3541
|
-
checkedIcon: u ? void 0 : /* @__PURE__ */ N(
|
|
3543
|
+
checkedIcon: u ? void 0 : /* @__PURE__ */ N(ot, {}),
|
|
3542
3544
|
name: "select-all",
|
|
3543
3545
|
onChange: f,
|
|
3544
3546
|
slotProps: { input: { "aria-label": t`Select all` } },
|
|
@@ -3547,7 +3549,7 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3547
3549
|
padding: 0
|
|
3548
3550
|
}
|
|
3549
3551
|
});
|
|
3550
|
-
},
|
|
3552
|
+
}, Ka = ({ cell: e, getRowName: t, onReadableIndexClick: n, tableColumn: r }) => {
|
|
3551
3553
|
let i = j((r) => {
|
|
3552
3554
|
if (n) {
|
|
3553
3555
|
if (!t) throw Error("getRowName is required when onReadableIndexClick is provided");
|
|
@@ -3561,7 +3563,7 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3561
3563
|
n,
|
|
3562
3564
|
e.row
|
|
3563
3565
|
]);
|
|
3564
|
-
return n ? /* @__PURE__ */ N(
|
|
3566
|
+
return n ? /* @__PURE__ */ N(le, {
|
|
3565
3567
|
"aria-label": r.getAriaLabel(e),
|
|
3566
3568
|
color: "primary",
|
|
3567
3569
|
onClick: i,
|
|
@@ -3575,12 +3577,12 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3575
3577
|
variant: "text",
|
|
3576
3578
|
children: e.rowIndex + 1
|
|
3577
3579
|
}) : e.rowIndex + 1;
|
|
3578
|
-
},
|
|
3579
|
-
let w =
|
|
3580
|
+
}, 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 = we(), { t: T } = Re(), E = h(), { DEFAULT_OVERSCAN_MAIN: ee, DEFAULT_OVERSCAN_REVERSE: te } = p.getInstance().config.table;
|
|
3580
3582
|
m(E, b((e) => e.getCurrentColumnVisualSettings().filter((e) => e.isVisible).map((e) => e.id)));
|
|
3581
|
-
let ne = m(E, b((e) => e.setCurrentColumnVisualSettings)),
|
|
3583
|
+
let ne = m(E, b((e) => e.setCurrentColumnVisualSettings)), D = m(E, b((e) => e.sortedData)), re = m(E, b((e) => e.idSelectorCallback)), ie = m(E, b((e) => e.columns)), ae = m(E, b((e) => e.isInitialized)), oe = m(E, b((e) => e.isRowEnabledCallback)), se = m(E, b((e) => e.addEventListener)), O = 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] = Ie(!1), ge = Fe(() => Se(be(w.palette.divider, 1), .1), [w.palette.divider]), _e = Fe(() => xe(be(w.palette.divider, 1), .15), [w.palette.divider]), ve = Ve(), ye = M(null), Ce = M(0), Te = M(null), A = M(/* @__PURE__ */ new Set()), De = M(!1), Oe = M(null), [Ae, Me] = Ie(), Be = M(null), He = M(null), Ue = M(null);
|
|
3582
3584
|
m(E, (e) => JSON.stringify(e.filters.map((e) => e.filterValue))), m(E, b((e) => e.sortByField)), m(E, b((e) => e.sortDirection));
|
|
3583
|
-
let
|
|
3585
|
+
let We = j((e, t) => {
|
|
3584
3586
|
if (s) {
|
|
3585
3587
|
if (!n) throw Error("getRowName is required when onRowClick is provided");
|
|
3586
3588
|
p.getInstance().config.enablePageEvents && g.getInstance().emit("click", {
|
|
@@ -3588,83 +3590,83 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3588
3590
|
type: "table-row"
|
|
3589
3591
|
}), t.preventDefault(), t.stopPropagation(), s(e);
|
|
3590
3592
|
}
|
|
3591
|
-
}, [n, s]), Ge = j(() =>
|
|
3592
|
-
if (!
|
|
3593
|
-
let e = (0, dt.default)(Ge(), (e) => e.calculatedWidth), t =
|
|
3594
|
-
|
|
3595
|
-
}, [
|
|
3596
|
-
|
|
3593
|
+
}, [n, s]), Ge = j(() => fe?.current?.filter((e) => e.isVisible) ?? [], []), Ke = j(() => {
|
|
3594
|
+
if (!fe?.current?.length || !Ae) return;
|
|
3595
|
+
let e = (0, dt.default)(Ge(), (e) => e.calculatedWidth), t = Ae.querySelector("[role=table]");
|
|
3596
|
+
Ce.current = e, t && (t.style.width = `${e}px`);
|
|
3597
|
+
}, [Ae, Ge]);
|
|
3598
|
+
Pe(() => {
|
|
3597
3599
|
Ke();
|
|
3598
3600
|
}, [Ke]);
|
|
3599
|
-
let qe = j((e, t) => /* @__PURE__ */ N(
|
|
3601
|
+
let qe = j((e, t) => /* @__PURE__ */ N(Ka, {
|
|
3600
3602
|
cell: t,
|
|
3601
3603
|
getRowName: n,
|
|
3602
3604
|
onReadableIndexClick: o,
|
|
3603
3605
|
tableColumn: e
|
|
3604
|
-
}, t.id), [n, o]), Je = j((e) => /* @__PURE__ */ N(
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
}, [
|
|
3606
|
+
}, t.id), [n, o]), Je = j((e) => /* @__PURE__ */ N(Ga, { tableColumnParams: e }), []);
|
|
3607
|
+
je(() => {
|
|
3608
|
+
He.current = null;
|
|
3609
|
+
}, [D]);
|
|
3608
3610
|
let Ye = j((e, t) => {
|
|
3609
|
-
if (!e.shiftKey || !
|
|
3610
|
-
|
|
3611
|
+
if (!e.shiftKey || !He.current) {
|
|
3612
|
+
He.current = t;
|
|
3611
3613
|
return;
|
|
3612
3614
|
}
|
|
3613
|
-
let n =
|
|
3615
|
+
let n = D.findIndex((e) => re(e) === He.current), r = D.findIndex((e) => re(e) === t);
|
|
3614
3616
|
if (n === -1 || r === -1) return;
|
|
3615
|
-
let [i, a] = n < r ? [n, r] : [r, n], o =
|
|
3616
|
-
ue(
|
|
3617
|
+
let [i, a] = n < r ? [n, r] : [r, n], o = D.slice(i, a + 1).map((e) => re(e)), s = E.getState().selectedIds, c = E.getState().selectedIds.includes(t) ? s.filter((e) => !o.includes(e)) : Array.from(/* @__PURE__ */ new Set([...s, ...o]));
|
|
3618
|
+
ue(c), He.current = t;
|
|
3617
3619
|
}, [
|
|
3618
|
-
ie,
|
|
3619
|
-
ue,
|
|
3620
3620
|
re,
|
|
3621
|
+
ue,
|
|
3622
|
+
D,
|
|
3621
3623
|
E
|
|
3622
3624
|
]), Xe = j((e, t) => {
|
|
3623
|
-
let n =
|
|
3624
|
-
return /* @__PURE__ */ N(
|
|
3625
|
+
let n = re(t.row);
|
|
3626
|
+
return /* @__PURE__ */ N(Ua, {
|
|
3625
3627
|
cell: t,
|
|
3626
3628
|
onCheckBoxClick: Ye,
|
|
3627
3629
|
tableColumn: e
|
|
3628
3630
|
}, n);
|
|
3629
|
-
}, [
|
|
3630
|
-
if (!
|
|
3631
|
-
let e = u.updateColumnSizesInVisualSettings(
|
|
3632
|
-
me && (
|
|
3631
|
+
}, [re, Ye]), Ze = j(() => {
|
|
3632
|
+
if (!ie.length || !Ae) return;
|
|
3633
|
+
let e = u.updateColumnSizesInVisualSettings(Ae, ve, D, ie, fe.current);
|
|
3634
|
+
me && (Ae.querySelectorAll("[data-column-index]").forEach((t) => {
|
|
3633
3635
|
let n = t.getAttribute("data-id");
|
|
3634
3636
|
t.style.width = `${e.get(n).calculatedWidth}px`;
|
|
3635
3637
|
}), Ke());
|
|
3636
3638
|
}, [
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
+
ie,
|
|
3640
|
+
Ae,
|
|
3639
3641
|
ve,
|
|
3640
|
-
|
|
3642
|
+
D,
|
|
3641
3643
|
me,
|
|
3642
3644
|
Ke
|
|
3643
3645
|
]);
|
|
3644
|
-
|
|
3645
|
-
!
|
|
3646
|
+
je(() => {
|
|
3647
|
+
!Ae || me || !ae || (fe.current = E.getState().getCurrentColumnVisualSettings(), Ze(), Ke(), he(!0));
|
|
3646
3648
|
}, [
|
|
3647
|
-
|
|
3649
|
+
Ae,
|
|
3648
3650
|
me,
|
|
3649
|
-
|
|
3651
|
+
ae,
|
|
3650
3652
|
E,
|
|
3651
3653
|
Ze,
|
|
3652
3654
|
Ke
|
|
3653
3655
|
]);
|
|
3654
|
-
let Qe = j(() =>
|
|
3655
|
-
ne(
|
|
3656
|
-
}, [ne]), et =
|
|
3656
|
+
let Qe = j(() => Ae?.querySelector("[data-virtuoso-scroller=true]"), [Ae]), $e = j(() => {
|
|
3657
|
+
ne(fe.current);
|
|
3658
|
+
}, [ne]), et = ya(() => {
|
|
3657
3659
|
$e();
|
|
3658
3660
|
}, 500, { trailing: !0 }), tt = j((e, t) => {
|
|
3659
3661
|
e.calculatedWidth = t, e.widthPx = t, e.hasResized = !0, Ze(), et();
|
|
3660
3662
|
}, [Ze, et]), nt = j((e, t) => {
|
|
3661
3663
|
if (e.key !== "ArrowLeft" && e.key !== "ArrowRight") return;
|
|
3662
3664
|
e.preventDefault();
|
|
3663
|
-
let n =
|
|
3664
|
-
tt(n,
|
|
3665
|
+
let n = fe.current.find((e) => e.id === t.id), r = n.calculatedWidth, i = e.key === "ArrowLeft" ? Math.max(50, r - 10) : r + 10;
|
|
3666
|
+
tt(n, i);
|
|
3665
3667
|
}, [tt]), rt = j((e, t) => {
|
|
3666
3668
|
e.preventDefault();
|
|
3667
|
-
let n =
|
|
3669
|
+
let n = fe.current.find((e) => e.id === t.id), r = e.clientX, i = n?.calculatedWidth, a = (e) => {
|
|
3668
3670
|
let t = e.clientX;
|
|
3669
3671
|
if (r === t) return;
|
|
3670
3672
|
let a = t - r, o = Math.max(50, i + a);
|
|
@@ -3676,19 +3678,19 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3676
3678
|
document.removeEventListener("mousemove", a), document.removeEventListener("mouseup", o);
|
|
3677
3679
|
};
|
|
3678
3680
|
}, [tt]);
|
|
3679
|
-
|
|
3681
|
+
je(() => () => {
|
|
3680
3682
|
pe.current();
|
|
3681
3683
|
}, []);
|
|
3682
|
-
let it = j((e, t) => u.handleMoveColumn(
|
|
3683
|
-
|
|
3684
|
+
let it = j((e, t) => u.handleMoveColumn(de, fe.current, ie, e, t), [de, ie]), at = j(() => {
|
|
3685
|
+
Ae.querySelectorAll("[data-column-index]").forEach((e) => {
|
|
3684
3686
|
let t = e.getAttribute("data-id");
|
|
3685
|
-
e.style.order =
|
|
3687
|
+
e.style.order = fe.current.findIndex((e) => e.id === t).toString();
|
|
3686
3688
|
});
|
|
3687
|
-
}, [
|
|
3688
|
-
|
|
3689
|
+
}, [Ae]);
|
|
3690
|
+
je(() => {
|
|
3689
3691
|
let e = () => {
|
|
3690
3692
|
Ze(), at();
|
|
3691
|
-
}, t =
|
|
3693
|
+
}, t = ce.getInstance();
|
|
3692
3694
|
return t.window.addEventListener("resize", e), () => {
|
|
3693
3695
|
t.window.removeEventListener("resize", e);
|
|
3694
3696
|
};
|
|
@@ -3702,11 +3704,11 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3702
3704
|
};
|
|
3703
3705
|
}, [Ge]), st = j((e, t) => {
|
|
3704
3706
|
let n = ot(t);
|
|
3705
|
-
if (e.type === "start" && (
|
|
3707
|
+
if (e.type === "start" && (ce.getInstance().body.style.setProperty("overflow", "hidden"), Ae?.style.setProperty("--selection-background", "none"), e.target.style.setProperty("opacity", "0.3"), Ue.current = {
|
|
3706
3708
|
clonedElement: e.target.cloneNode(!0),
|
|
3707
3709
|
elementOffsetX: n.widths.slice(0, n.elementIndex).reduce((e, t) => e + t, 0) - 15,
|
|
3708
3710
|
scrollPosition: Qe().scrollLeft
|
|
3709
|
-
},
|
|
3711
|
+
}, Ue.current.clonedElement.style.cssText = `
|
|
3710
3712
|
font-weight: bold;
|
|
3711
3713
|
position: absolute;
|
|
3712
3714
|
top: ${e.target.getBoundingClientRect().top}px;
|
|
@@ -3715,23 +3717,23 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3715
3717
|
pointer-events: none;
|
|
3716
3718
|
filter: blur(0.5px);
|
|
3717
3719
|
box-shadow: 1px 2px 3px 0px rgba(0,0,0,0.5);
|
|
3718
|
-
`,
|
|
3719
|
-
|
|
3720
|
-
let r =
|
|
3720
|
+
`, ce.getInstance().body.appendChild(Ue.current.clonedElement)), e.type === "end" && (ce.getInstance().body.style.removeProperty("overflow"), Ae?.style.setProperty("--selection-background", "highlight"), ce.getInstance().document.getSelection().empty(), Ue.current.clonedElement.remove(), e.target.style.setProperty("opacity", "1")), e.type === "move") {
|
|
3721
|
+
Ue.current.clonedElement.style.setProperty("left", `${e.clientX - e.elementOffsetX}px`), Ue.current.clonedElement.style.setProperty("top", `${e.clientY}px`);
|
|
3722
|
+
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);
|
|
3721
3723
|
(r < i && it(t, -1) || r > a && it(t, 1)) && (at(), ot(t));
|
|
3722
3724
|
}
|
|
3723
3725
|
}, [
|
|
3724
3726
|
ot,
|
|
3725
|
-
|
|
3727
|
+
Ae?.style,
|
|
3726
3728
|
Qe,
|
|
3727
3729
|
it,
|
|
3728
3730
|
w.zIndex.modal,
|
|
3729
3731
|
at
|
|
3730
|
-
]), ct = j(() => /* @__PURE__ */ N(
|
|
3732
|
+
]), ct = j(() => /* @__PURE__ */ N(k, {
|
|
3731
3733
|
"aria-rowindex": 1,
|
|
3732
3734
|
role: "row",
|
|
3733
3735
|
sx: {
|
|
3734
|
-
[`&:hover .${
|
|
3736
|
+
[`&:hover .${Oa.columnDivider}`]: { opacity: 1 },
|
|
3735
3737
|
background: w.palette.background.paper,
|
|
3736
3738
|
borderBottom: `1px solid ${_e}`,
|
|
3737
3739
|
display: "flex",
|
|
@@ -3740,8 +3742,8 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3740
3742
|
zIndex: 3
|
|
3741
3743
|
},
|
|
3742
3744
|
children: Ge().map((e, t) => {
|
|
3743
|
-
let n =
|
|
3744
|
-
return n ? /* @__PURE__ */ N(
|
|
3745
|
+
let n = ie.find((t) => t.id === e.id);
|
|
3746
|
+
return n ? /* @__PURE__ */ N(Pa, {
|
|
3745
3747
|
column: n.type === "selectable" ? {
|
|
3746
3748
|
...n,
|
|
3747
3749
|
renderHeaderContent: Je
|
|
@@ -3752,7 +3754,7 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3752
3754
|
onColumnDividerKeyDown: nt,
|
|
3753
3755
|
onColumnDividerMouseDown: rt,
|
|
3754
3756
|
onCustomDrag: st,
|
|
3755
|
-
order:
|
|
3757
|
+
order: fe.current.findIndex((t) => t.id === e.id),
|
|
3756
3758
|
role: "columnheader",
|
|
3757
3759
|
width: e.calculatedWidth,
|
|
3758
3760
|
xOffset: e.offsetX
|
|
@@ -3763,29 +3765,29 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3763
3765
|
r,
|
|
3764
3766
|
_e,
|
|
3765
3767
|
Ge,
|
|
3766
|
-
|
|
3768
|
+
ie,
|
|
3767
3769
|
Je,
|
|
3768
3770
|
rt,
|
|
3769
3771
|
nt,
|
|
3770
3772
|
st
|
|
3771
|
-
]), lt = j((e, t) => /* @__PURE__ */ N(
|
|
3772
|
-
let i =
|
|
3773
|
+
]), lt = j((e, t) => /* @__PURE__ */ N(Le, { children: Ge().map((n, r) => {
|
|
3774
|
+
let i = ie.find((e) => e.id === n.id), a;
|
|
3773
3775
|
if (i.cellTitleGetter) a = i.cellTitleGetter({
|
|
3774
3776
|
column: i,
|
|
3775
|
-
dataContext:
|
|
3777
|
+
dataContext: O,
|
|
3776
3778
|
id: n.id,
|
|
3777
3779
|
row: t,
|
|
3778
3780
|
rowIndex: e
|
|
3779
3781
|
});
|
|
3780
3782
|
else if (i.type === "text") a = u.getTableTextCellValue({
|
|
3781
3783
|
column: i,
|
|
3782
|
-
dataContext:
|
|
3784
|
+
dataContext: O,
|
|
3783
3785
|
row: t,
|
|
3784
3786
|
rowIndex: e
|
|
3785
3787
|
});
|
|
3786
3788
|
else if (i.type === "boolean") a = u.getTableBooleanCellDisplayValue({
|
|
3787
3789
|
column: i,
|
|
3788
|
-
dataContext:
|
|
3790
|
+
dataContext: O,
|
|
3789
3791
|
row: t,
|
|
3790
3792
|
rowIndex: e,
|
|
3791
3793
|
t: T
|
|
@@ -3793,35 +3795,35 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3793
3795
|
else if (i.type === "number") {
|
|
3794
3796
|
let n = u.getTableNumberCellValue({
|
|
3795
3797
|
column: i,
|
|
3796
|
-
dataContext:
|
|
3798
|
+
dataContext: O,
|
|
3797
3799
|
row: t,
|
|
3798
3800
|
rowIndex: e
|
|
3799
3801
|
});
|
|
3800
3802
|
a = (0, ft.default)(n) ? n.toString() : "";
|
|
3801
3803
|
} else i.type === "date" ? a = u.getTableDateCellValue({
|
|
3802
3804
|
column: i,
|
|
3803
|
-
dataContext:
|
|
3805
|
+
dataContext: O,
|
|
3804
3806
|
row: t,
|
|
3805
3807
|
rowIndex: e
|
|
3806
3808
|
}) : i.type === "options" && (a = u.getTableOptionsCellDisplayValue({
|
|
3807
3809
|
column: i,
|
|
3808
|
-
dataContext:
|
|
3810
|
+
dataContext: O,
|
|
3809
3811
|
row: t,
|
|
3810
3812
|
rowIndex: e
|
|
3811
3813
|
}));
|
|
3812
3814
|
let o = {
|
|
3813
3815
|
backgroundColor: le && i.cellColorGetter ? i.cellColorGetter({
|
|
3814
3816
|
column: i,
|
|
3815
|
-
dataContext:
|
|
3817
|
+
dataContext: O,
|
|
3816
3818
|
id: n.id,
|
|
3817
3819
|
row: t,
|
|
3818
3820
|
rowIndex: e
|
|
3819
3821
|
}) : void 0,
|
|
3820
3822
|
columnIndex: r,
|
|
3821
|
-
enabled:
|
|
3823
|
+
enabled: !oe || oe(t, O),
|
|
3822
3824
|
height: w.spacing(x),
|
|
3823
|
-
onClick:
|
|
3824
|
-
order:
|
|
3825
|
+
onClick: We,
|
|
3826
|
+
order: fe.current.findIndex((e) => e.id === n.id),
|
|
3825
3827
|
row: t,
|
|
3826
3828
|
rowIndex: e,
|
|
3827
3829
|
sx: i.sx,
|
|
@@ -3829,66 +3831,66 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3829
3831
|
width: n.calculatedWidth,
|
|
3830
3832
|
xOffset: n.offsetX
|
|
3831
3833
|
};
|
|
3832
|
-
return i.type === "actions" ? /* @__PURE__ */ N(
|
|
3834
|
+
return i.type === "actions" ? /* @__PURE__ */ N(Fa, {
|
|
3833
3835
|
...o,
|
|
3834
3836
|
column: i
|
|
3835
|
-
}, n.id) : /* @__PURE__ */ P(
|
|
3837
|
+
}, n.id) : /* @__PURE__ */ P(Da, {
|
|
3836
3838
|
...o,
|
|
3837
3839
|
column: i,
|
|
3838
3840
|
children: [
|
|
3839
|
-
!!i.renderCell && /* @__PURE__ */ N(
|
|
3841
|
+
!!i.renderCell && /* @__PURE__ */ N(Ee, { children: i.renderCell({
|
|
3840
3842
|
column: i,
|
|
3841
|
-
dataContext:
|
|
3843
|
+
dataContext: O,
|
|
3842
3844
|
id: n.id,
|
|
3843
3845
|
row: t,
|
|
3844
3846
|
rowIndex: e
|
|
3845
3847
|
}) }, i.id),
|
|
3846
|
-
!i.renderCell && !!i.displayValueGetter && /* @__PURE__ */ N(
|
|
3848
|
+
!i.renderCell && !!i.displayValueGetter && /* @__PURE__ */ N(Ee, { children: /* @__PURE__ */ N(ba, { content: i.displayValueGetter({
|
|
3847
3849
|
column: i,
|
|
3848
|
-
dataContext:
|
|
3850
|
+
dataContext: O,
|
|
3849
3851
|
id: n.id,
|
|
3850
3852
|
row: t,
|
|
3851
3853
|
rowIndex: e
|
|
3852
3854
|
}) }) }, i.id),
|
|
3853
3855
|
!i.displayValueGetter && !i.renderCell && i.type === "text" && u.getTableTextCellValue({
|
|
3854
3856
|
column: i,
|
|
3855
|
-
dataContext:
|
|
3857
|
+
dataContext: O,
|
|
3856
3858
|
row: t,
|
|
3857
3859
|
rowIndex: e
|
|
3858
3860
|
}),
|
|
3859
3861
|
!i.displayValueGetter && !i.renderCell && i.type === "boolean" && u.getTableBooleanCellDisplayValue({
|
|
3860
3862
|
column: i,
|
|
3861
|
-
dataContext:
|
|
3863
|
+
dataContext: O,
|
|
3862
3864
|
row: t,
|
|
3863
3865
|
rowIndex: e,
|
|
3864
3866
|
t: T
|
|
3865
3867
|
}),
|
|
3866
3868
|
!i.displayValueGetter && !i.renderCell && i.type === "number" && u.getTableNumberCellValue({
|
|
3867
3869
|
column: i,
|
|
3868
|
-
dataContext:
|
|
3870
|
+
dataContext: O,
|
|
3869
3871
|
row: t,
|
|
3870
3872
|
rowIndex: e
|
|
3871
3873
|
}),
|
|
3872
3874
|
!i.displayValueGetter && !i.renderCell && i.type === "date" && u.getTableDateCellValue({
|
|
3873
3875
|
column: i,
|
|
3874
|
-
dataContext:
|
|
3876
|
+
dataContext: O,
|
|
3875
3877
|
row: t,
|
|
3876
3878
|
rowIndex: e
|
|
3877
3879
|
}),
|
|
3878
3880
|
!i.displayValueGetter && !i.renderCell && i.type === "options" && u.getTableOptionsCellDisplayValue({
|
|
3879
3881
|
column: i,
|
|
3880
|
-
dataContext:
|
|
3882
|
+
dataContext: O,
|
|
3881
3883
|
row: t,
|
|
3882
3884
|
rowIndex: e
|
|
3883
3885
|
}),
|
|
3884
3886
|
!i.displayValueGetter && !i.renderCell && i.type === "readableIndex" && qe(i, {
|
|
3885
|
-
dataContext:
|
|
3887
|
+
dataContext: O,
|
|
3886
3888
|
id: n.id,
|
|
3887
3889
|
row: t,
|
|
3888
3890
|
rowIndex: e
|
|
3889
3891
|
}),
|
|
3890
3892
|
!i.displayValueGetter && !i.renderCell && i.type === "selectable" && Xe(i, {
|
|
3891
|
-
dataContext:
|
|
3893
|
+
dataContext: O,
|
|
3892
3894
|
id: n.id,
|
|
3893
3895
|
row: t,
|
|
3894
3896
|
rowIndex: e
|
|
@@ -3897,30 +3899,30 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3897
3899
|
}, n.id);
|
|
3898
3900
|
}) }), [
|
|
3899
3901
|
Ge,
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
+
oe,
|
|
3903
|
+
We,
|
|
3902
3904
|
Xe,
|
|
3903
3905
|
qe,
|
|
3904
3906
|
x,
|
|
3905
3907
|
T,
|
|
3906
|
-
|
|
3908
|
+
ie,
|
|
3907
3909
|
w,
|
|
3908
|
-
|
|
3910
|
+
O,
|
|
3909
3911
|
le
|
|
3910
3912
|
]), ut = j((e) => {
|
|
3911
3913
|
c(e);
|
|
3912
3914
|
}, [c]), ht = j((e) => {
|
|
3913
3915
|
l(e);
|
|
3914
3916
|
}, [l]);
|
|
3915
|
-
|
|
3917
|
+
je(() => {
|
|
3916
3918
|
if (!S) return mt.default;
|
|
3917
3919
|
let e = S.subscribe((e, t) => {
|
|
3918
3920
|
t.forEach((e) => {
|
|
3919
|
-
|
|
3921
|
+
Ae.querySelectorAll(`[data-testid=virtuoso-item-list] [data-id='${e}']`).forEach((e) => {
|
|
3920
3922
|
e.classList.remove("highlighted");
|
|
3921
3923
|
});
|
|
3922
3924
|
}), e.forEach((e) => {
|
|
3923
|
-
|
|
3925
|
+
Ae.querySelectorAll(`[data-testid=virtuoso-item-list] [data-id='${e}']`).forEach((e) => {
|
|
3924
3926
|
e.classList.add("highlighted");
|
|
3925
3927
|
});
|
|
3926
3928
|
});
|
|
@@ -3930,38 +3932,38 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3930
3932
|
};
|
|
3931
3933
|
}, [
|
|
3932
3934
|
S,
|
|
3933
|
-
|
|
3935
|
+
Ae,
|
|
3934
3936
|
w.palette.action.hover,
|
|
3935
3937
|
w.palette.background.paper
|
|
3936
|
-
]),
|
|
3938
|
+
]), je(() => {
|
|
3937
3939
|
let e = () => {
|
|
3938
3940
|
Ze(), at(), Ke(), $e();
|
|
3939
3941
|
}, t = [
|
|
3940
|
-
|
|
3941
|
-
E.getState().setIsCondensed(t),
|
|
3942
|
+
se("condensedChange", (t) => {
|
|
3943
|
+
E.getState().setIsCondensed(t), fe.current = E.getState().getCurrentColumnVisualSettings(), e();
|
|
3942
3944
|
}),
|
|
3943
|
-
|
|
3944
|
-
E.getState().resetColumns(),
|
|
3945
|
+
se("reset", () => {
|
|
3946
|
+
E.getState().resetColumns(), fe.current = E.getState().getCurrentColumnVisualSettings(), e();
|
|
3945
3947
|
}),
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
+
se("columnVisibilityChange", (t) => {
|
|
3949
|
+
fe.current.forEach((e) => {
|
|
3948
3950
|
e.isVisible = t.includes(e.id);
|
|
3949
3951
|
}), e();
|
|
3950
3952
|
}),
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
+
se("columnOrderChange", (t) => {
|
|
3954
|
+
fe.current.sort((e, n) => t.indexOf(e.id) - t.indexOf(n.id)), e();
|
|
3953
3955
|
}),
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
+
se("openColumnsEditorDialog", (e) => {
|
|
3957
|
+
Be.current.open({ hasCellData: e });
|
|
3956
3958
|
})
|
|
3957
3959
|
];
|
|
3958
3960
|
return () => {
|
|
3959
3961
|
t.forEach((e) => e());
|
|
3960
3962
|
};
|
|
3961
3963
|
}, [
|
|
3962
|
-
|
|
3964
|
+
se,
|
|
3963
3965
|
$e,
|
|
3964
|
-
|
|
3966
|
+
ie,
|
|
3965
3967
|
E,
|
|
3966
3968
|
at,
|
|
3967
3969
|
Ze,
|
|
@@ -3983,32 +3985,32 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
3983
3985
|
let t = Qe();
|
|
3984
3986
|
t && (t.scrollTop = e);
|
|
3985
3987
|
}, [Qe]), yt = j(() => {
|
|
3986
|
-
let e =
|
|
3987
|
-
!e ||
|
|
3988
|
+
let e = Oe.current;
|
|
3989
|
+
!e || De.current || !e.hasRendered || (Oe.current = null, e.onScrolledToIndex());
|
|
3988
3990
|
}, []), bt = j((e, t) => {
|
|
3989
|
-
|
|
3990
|
-
hasRendered:
|
|
3991
|
+
Oe.current = t ? {
|
|
3992
|
+
hasRendered: A.current.has(e),
|
|
3991
3993
|
index: e,
|
|
3992
3994
|
onScrolledToIndex: t
|
|
3993
3995
|
} : null, ye.current?.scrollToIndex(e), yt();
|
|
3994
3996
|
}, [yt]);
|
|
3995
|
-
|
|
3997
|
+
Ne(y, () => ({
|
|
3996
3998
|
scrollToIndex: bt,
|
|
3997
3999
|
setVerticalScrollPosition: vt
|
|
3998
4000
|
}));
|
|
3999
4001
|
let xt = j((e) => {
|
|
4000
|
-
|
|
4002
|
+
Te.current = e, a(e);
|
|
4001
4003
|
}, [a]), St = j((e) => {
|
|
4002
|
-
|
|
4003
|
-
let t =
|
|
4004
|
-
t &&
|
|
4004
|
+
A.current = new Set(e.map((e) => e.index));
|
|
4005
|
+
let t = Oe.current;
|
|
4006
|
+
t && A.current.has(t.index) && (t.hasRendered = !0), yt();
|
|
4005
4007
|
}, [yt]), Ct = j((e) => {
|
|
4006
|
-
|
|
4008
|
+
De.current = e, yt();
|
|
4007
4009
|
}, [yt]);
|
|
4008
|
-
return
|
|
4009
|
-
|
|
4010
|
-
}, [a,
|
|
4011
|
-
ref:
|
|
4010
|
+
return je(() => {
|
|
4011
|
+
Te.current && a(Te.current);
|
|
4012
|
+
}, [a, D]), /* @__PURE__ */ P(k, {
|
|
4013
|
+
ref: Me,
|
|
4012
4014
|
style: { "--selection-background": "highlight" },
|
|
4013
4015
|
sx: {
|
|
4014
4016
|
"*::selection": { backgroundColor: "var(--selection-background) !important" },
|
|
@@ -4017,41 +4019,41 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
4017
4019
|
width: "100%",
|
|
4018
4020
|
...C
|
|
4019
4021
|
},
|
|
4020
|
-
children: [me && /* @__PURE__ */ N(
|
|
4021
|
-
...
|
|
4022
|
+
children: [me && /* @__PURE__ */ N(Gi, {
|
|
4023
|
+
...ze.createAttributes("Table"),
|
|
4022
4024
|
components: {
|
|
4023
|
-
EmptyPlaceholder:
|
|
4025
|
+
EmptyPlaceholder: ke((e, t) => /* @__PURE__ */ N(k, {
|
|
4024
4026
|
...e,
|
|
4025
4027
|
ref: t
|
|
4026
4028
|
})),
|
|
4027
|
-
FillerRow:
|
|
4029
|
+
FillerRow: ke((e, t) => /* @__PURE__ */ N(k, {
|
|
4028
4030
|
ref: t,
|
|
4029
4031
|
style: { height: e.height }
|
|
4030
4032
|
})),
|
|
4031
|
-
Table:
|
|
4033
|
+
Table: ke((e, t) => /* @__PURE__ */ N(k, {
|
|
4032
4034
|
...e,
|
|
4033
|
-
"data-row-count":
|
|
4035
|
+
"data-row-count": D.length,
|
|
4034
4036
|
ref: t,
|
|
4035
4037
|
role: "table",
|
|
4036
4038
|
sx: {
|
|
4037
4039
|
minWidth: "100%",
|
|
4038
4040
|
position: "relative",
|
|
4039
|
-
width:
|
|
4041
|
+
width: Ce.current
|
|
4040
4042
|
}
|
|
4041
4043
|
})),
|
|
4042
|
-
TableBody:
|
|
4044
|
+
TableBody: ke((t, n) => /* @__PURE__ */ N(k, {
|
|
4043
4045
|
...t,
|
|
4044
4046
|
ref: n,
|
|
4045
4047
|
sx: { font: e }
|
|
4046
4048
|
})),
|
|
4047
|
-
TableHead:
|
|
4049
|
+
TableHead: ke((e, t) => /* @__PURE__ */ N(k, {
|
|
4048
4050
|
...e,
|
|
4049
4051
|
ref: t
|
|
4050
4052
|
})),
|
|
4051
|
-
TableRow:
|
|
4052
|
-
let n =
|
|
4053
|
-
return /* @__PURE__ */ N(
|
|
4054
|
-
"data-id":
|
|
4053
|
+
TableRow: ke((e, t) => {
|
|
4054
|
+
let n = !oe || oe(e.item, O);
|
|
4055
|
+
return /* @__PURE__ */ N(k, {
|
|
4056
|
+
"data-id": re(e.item),
|
|
4055
4057
|
onMouseEnter: () => ut(e.item),
|
|
4056
4058
|
onMouseLeave: () => ht(e.item),
|
|
4057
4059
|
ref: t,
|
|
@@ -4077,7 +4079,7 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
4077
4079
|
});
|
|
4078
4080
|
})
|
|
4079
4081
|
},
|
|
4080
|
-
data:
|
|
4082
|
+
data: D,
|
|
4081
4083
|
fixedHeaderContent: ct,
|
|
4082
4084
|
fixedItemHeight: +w.spacing(x).replace("px", ""),
|
|
4083
4085
|
initialTopMostItemIndex: i ?? 0,
|
|
@@ -4096,15 +4098,15 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
4096
4098
|
height: "100%",
|
|
4097
4099
|
overflowX: t ? "scroll" : "auto"
|
|
4098
4100
|
},
|
|
4099
|
-
totalCount:
|
|
4100
|
-
}), /* @__PURE__ */ N(
|
|
4101
|
+
totalCount: D.length
|
|
4102
|
+
}), /* @__PURE__ */ N(Ha, { ref: Be })]
|
|
4101
4103
|
});
|
|
4102
|
-
},
|
|
4103
|
-
let { t: r } =
|
|
4104
|
-
return /* @__PURE__ */ N(
|
|
4104
|
+
}, Ja = ({ caption: e, component: t = "h2", variant: n = "h2" }) => {
|
|
4105
|
+
let { t: r } = Re(), i = h(), a = m(i, (e) => e.baseData.length), o = m(i, b((e) => e.sortedData.length));
|
|
4106
|
+
return /* @__PURE__ */ N(ye, {
|
|
4105
4107
|
component: t,
|
|
4106
4108
|
variant: n,
|
|
4107
|
-
children: /* @__PURE__ */ P(
|
|
4109
|
+
children: /* @__PURE__ */ P(Le, { children: [
|
|
4108
4110
|
o === 0 && (e ?? r("Items")),
|
|
4109
4111
|
o > 0 && o === a && r("{{items}} ({{count}})", {
|
|
4110
4112
|
count: o,
|
|
@@ -4118,8 +4120,10 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
4118
4120
|
})
|
|
4119
4121
|
] })
|
|
4120
4122
|
});
|
|
4121
|
-
},
|
|
4122
|
-
|
|
4123
|
+
}, Ya = /* @__PURE__ */ t(((e, t) => {
|
|
4124
|
+
t.exports = { ...Te };
|
|
4125
|
+
})), Xa = /* @__PURE__ */ t(((e) => {
|
|
4126
|
+
var t = Ya();
|
|
4123
4127
|
function n(e, t) {
|
|
4124
4128
|
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
4125
4129
|
}
|
|
@@ -4156,7 +4160,7 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
4156
4160
|
}
|
|
4157
4161
|
var d = typeof window > "u" || window.document === void 0 || window.document.createElement === void 0 ? u : c;
|
|
4158
4162
|
e.useSyncExternalStore = t.useSyncExternalStore === void 0 ? d : t.useSyncExternalStore;
|
|
4159
|
-
})),
|
|
4163
|
+
})), Za = /* @__PURE__ */ t(((e) => {
|
|
4160
4164
|
process.env.NODE_ENV !== "production" && (function() {
|
|
4161
4165
|
function t(e, t) {
|
|
4162
4166
|
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
@@ -4199,13 +4203,13 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
4199
4203
|
return t();
|
|
4200
4204
|
}
|
|
4201
4205
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
4202
|
-
var a =
|
|
4206
|
+
var a = Ya(), o = typeof Object.is == "function" ? Object.is : t, s = a.useState, c = a.useEffect, l = a.useLayoutEffect, u = a.useDebugValue, d = !1, f = !1, p = typeof window > "u" || window.document === void 0 || window.document.createElement === void 0 ? i : n;
|
|
4203
4207
|
e.useSyncExternalStore = a.useSyncExternalStore === void 0 ? p : a.useSyncExternalStore, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
4204
4208
|
})();
|
|
4205
|
-
})),
|
|
4206
|
-
process.env.NODE_ENV === "production" ?
|
|
4207
|
-
})),
|
|
4208
|
-
var t =
|
|
4209
|
+
})), Qa = /* @__PURE__ */ t(((e, t) => {
|
|
4210
|
+
t.exports = process.env.NODE_ENV === "production" ? Xa() : Za();
|
|
4211
|
+
})), $a = /* @__PURE__ */ t(((e) => {
|
|
4212
|
+
var t = Ya(), n = Qa();
|
|
4209
4213
|
function r(e, t) {
|
|
4210
4214
|
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
4211
4215
|
}
|
|
@@ -4249,13 +4253,13 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
4249
4253
|
f.hasValue = !0, f.value = p;
|
|
4250
4254
|
}, [p]), l(p), p;
|
|
4251
4255
|
};
|
|
4252
|
-
})),
|
|
4256
|
+
})), eo = /* @__PURE__ */ t(((e) => {
|
|
4253
4257
|
process.env.NODE_ENV !== "production" && (function() {
|
|
4254
4258
|
function t(e, t) {
|
|
4255
4259
|
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
4256
4260
|
}
|
|
4257
4261
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
4258
|
-
var n =
|
|
4262
|
+
var n = Ya(), r = Qa(), i = typeof Object.is == "function" ? Object.is : t, a = r.useSyncExternalStore, o = n.useRef, s = n.useEffect, c = n.useMemo, l = n.useDebugValue;
|
|
4259
4263
|
e.useSyncExternalStoreWithSelector = function(e, t, n, r, u) {
|
|
4260
4264
|
var d = o(null);
|
|
4261
4265
|
if (d.current === null) {
|
|
@@ -4296,17 +4300,17 @@ var Ea = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
4296
4300
|
}, [p]), l(p), p;
|
|
4297
4301
|
}, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
4298
4302
|
})();
|
|
4299
|
-
})), { useSyncExternalStoreWithSelector:
|
|
4300
|
-
process.env.NODE_ENV === "production" ?
|
|
4301
|
-
})))(), 1)).default,
|
|
4302
|
-
function
|
|
4303
|
-
let r =
|
|
4303
|
+
})), { useSyncExternalStoreWithSelector: to } = (/* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
4304
|
+
t.exports = process.env.NODE_ENV === "production" ? $a() : eo();
|
|
4305
|
+
})))(), 1)).default, no = (e) => e;
|
|
4306
|
+
function ro(e, t = no, n) {
|
|
4307
|
+
let r = to(e.subscribe, e.getState, e.getInitialState, t, n);
|
|
4304
4308
|
return A.useDebugValue(r), r;
|
|
4305
4309
|
}
|
|
4306
4310
|
//#endregion
|
|
4307
4311
|
//#region src/components/ui/Table/TableFiltersSidebarItem.tsx
|
|
4308
|
-
var
|
|
4309
|
-
let r =
|
|
4312
|
+
var io = We, ao = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFilterWithinDimension: n }) => {
|
|
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 } = C(), o = Fe(() => {
|
|
4310
4314
|
if (e.allowOnlyPreferredFilter || e.filterIds.length === 1) return [i.find((t) => t?.id && t.id === e.preferredFilterId)].filter((e) => !!e);
|
|
4311
4315
|
if (!e.allowMultipleVisibleFilters) {
|
|
4312
4316
|
let t = n ?? e.preferredFilterId;
|
|
@@ -4320,11 +4324,11 @@ var oo = Ke, so = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
|
|
|
4320
4324
|
e.filterIds.length,
|
|
4321
4325
|
e.preferredFilterId,
|
|
4322
4326
|
n
|
|
4323
|
-
]), s =
|
|
4327
|
+
]), s = Fe(() => i.length > 1 && !e.allowOnlyPreferredFilter && !e.allowMultipleVisibleFilters, [
|
|
4324
4328
|
i.length,
|
|
4325
4329
|
e.allowMultipleVisibleFilters,
|
|
4326
4330
|
e.allowOnlyPreferredFilter
|
|
4327
|
-
]), c =
|
|
4331
|
+
]), c = Fe(() => !(i.length === 1 || e.allowOnlyPreferredFilter), [i.length, e.allowOnlyPreferredFilter]), l = Fe(() => s ? {
|
|
4328
4332
|
items: i.map((n) => ({
|
|
4329
4333
|
active: n === o[0],
|
|
4330
4334
|
callback: () => {
|
|
@@ -4345,23 +4349,23 @@ var oo = Ke, so = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
|
|
|
4345
4349
|
t,
|
|
4346
4350
|
s
|
|
4347
4351
|
]);
|
|
4348
|
-
return o.length ? /* @__PURE__ */ P(
|
|
4352
|
+
return o.length ? /* @__PURE__ */ P(k, {
|
|
4349
4353
|
sx: { mb: 2 },
|
|
4350
4354
|
children: [
|
|
4351
|
-
c && /* @__PURE__ */ P(
|
|
4355
|
+
c && /* @__PURE__ */ P(k, {
|
|
4352
4356
|
sx: {
|
|
4353
4357
|
alignItems: "center",
|
|
4354
4358
|
display: "flex",
|
|
4355
4359
|
justifyContent: "space-between"
|
|
4356
4360
|
},
|
|
4357
|
-
children: [/* @__PURE__ */ N(
|
|
4361
|
+
children: [/* @__PURE__ */ N(k, { children: /* @__PURE__ */ N(ye, {
|
|
4358
4362
|
sx: {
|
|
4359
4363
|
margin: 0,
|
|
4360
4364
|
padding: 0
|
|
4361
4365
|
},
|
|
4362
4366
|
variant: "h6",
|
|
4363
4367
|
children: e.label
|
|
4364
|
-
}) }), s && /* @__PURE__ */ N(
|
|
4368
|
+
}) }), s && /* @__PURE__ */ N(k, { children: /* @__PURE__ */ N(ut, {
|
|
4365
4369
|
ButtonProps: {
|
|
4366
4370
|
color: "inherit",
|
|
4367
4371
|
size: "small",
|
|
@@ -4377,15 +4381,15 @@ var oo = Ke, so = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
|
|
|
4377
4381
|
menuItemsData: l
|
|
4378
4382
|
}) })]
|
|
4379
4383
|
}),
|
|
4380
|
-
o.map((e) => /* @__PURE__ */ N(
|
|
4384
|
+
o.map((e) => /* @__PURE__ */ N(k, {
|
|
4381
4385
|
sx: { my: 1 },
|
|
4382
|
-
children: /* @__PURE__ */ N(
|
|
4386
|
+
children: /* @__PURE__ */ N(wa, { filter: e })
|
|
4383
4387
|
}, e.id)),
|
|
4384
|
-
/* @__PURE__ */ N(
|
|
4388
|
+
/* @__PURE__ */ N(de, {})
|
|
4385
4389
|
]
|
|
4386
4390
|
}, e.id) : null;
|
|
4387
|
-
},
|
|
4388
|
-
let { t } =
|
|
4391
|
+
}, oo = ({ onClose: e }) => {
|
|
4392
|
+
let { t } = Re(), 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] = Ie(c), f = Fe(() => Object.fromEntries(a.map((e) => [e.id, e.initialFilterValue])), [a]), p = Fe(() => Object.fromEntries(a.map((e) => [e.id, e.filterValue ?? e.initialFilterValue])), [a]), g = S({
|
|
4389
4393
|
defaultValues: f,
|
|
4390
4394
|
values: p
|
|
4391
4395
|
}), _ = j((e, t) => {
|
|
@@ -4396,7 +4400,7 @@ var oo = Ke, so = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
|
|
|
4396
4400
|
}, []), { control: v, formState: { isDirty: y }, handleSubmit: b, reset: x, setValue: C } = g, E = w({
|
|
4397
4401
|
control: v,
|
|
4398
4402
|
defaultValue: p
|
|
4399
|
-
}), ee =
|
|
4403
|
+
}), ee = Fe(() => Object.entries(E).some(([e, t]) => !a.find((t) => t.id === e).isInitialFilterValue(t)), [a, E]), te = j(async (t) => {
|
|
4400
4404
|
await r(t), x(t), l(u), e();
|
|
4401
4405
|
}, [
|
|
4402
4406
|
u,
|
|
@@ -4413,12 +4417,13 @@ var oo = Ke, so = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
|
|
|
4413
4417
|
x,
|
|
4414
4418
|
s,
|
|
4415
4419
|
l
|
|
4416
|
-
]),
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
+
]), D = j((e) => {
|
|
4421
|
+
let t = a.find((t) => t.id === e);
|
|
4422
|
+
C(e, t.initialFilterValue, { shouldDirty: !0 });
|
|
4423
|
+
}, [a, C]), re = Fe(() => a.filter((e) => e.showInSidebar), [a]);
|
|
4424
|
+
return /* @__PURE__ */ N(Le, { children: !!a && !!p && !!f && /* @__PURE__ */ N(T, {
|
|
4420
4425
|
...g,
|
|
4421
|
-
children: /* @__PURE__ */ P(
|
|
4426
|
+
children: /* @__PURE__ */ P(k, {
|
|
4422
4427
|
autoComplete: "off",
|
|
4423
4428
|
component: "form",
|
|
4424
4429
|
id: "Filters",
|
|
@@ -4428,45 +4433,45 @@ var oo = Ke, so = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
|
|
|
4428
4433
|
gridTemplateRows: "max-content auto",
|
|
4429
4434
|
height: "100%"
|
|
4430
4435
|
},
|
|
4431
|
-
children: [/* @__PURE__ */ P(
|
|
4432
|
-
y && o && !ee && /* @__PURE__ */ N(
|
|
4436
|
+
children: [/* @__PURE__ */ P(k, { children: [
|
|
4437
|
+
y && o && !ee && /* @__PURE__ */ N(k, {
|
|
4433
4438
|
sx: { my: 1 },
|
|
4434
4439
|
children: t`All filters have been removed, but have not yet been applied.`
|
|
4435
4440
|
}),
|
|
4436
|
-
/* @__PURE__ */ N(
|
|
4441
|
+
/* @__PURE__ */ N(k, { children: Object.entries(E).map(([e, n]) => {
|
|
4437
4442
|
let r = a.find((t) => t.id === e);
|
|
4438
|
-
return r.isInitialFilterValue(E[e]) ? null : /* @__PURE__ */ P(
|
|
4443
|
+
return r.isInitialFilterValue(E[e]) ? null : /* @__PURE__ */ P(k, {
|
|
4439
4444
|
sx: {
|
|
4440
4445
|
alignItems: "center",
|
|
4441
4446
|
display: "grid",
|
|
4442
4447
|
gap: 1,
|
|
4443
4448
|
gridTemplateColumns: "auto max-content"
|
|
4444
4449
|
},
|
|
4445
|
-
children: [/* @__PURE__ */ P(
|
|
4446
|
-
/* @__PURE__ */ N(
|
|
4450
|
+
children: [/* @__PURE__ */ P(k, { children: [
|
|
4451
|
+
/* @__PURE__ */ N(k, {
|
|
4447
4452
|
component: "span",
|
|
4448
4453
|
children: r.label
|
|
4449
4454
|
}),
|
|
4450
|
-
/* @__PURE__ */ N(
|
|
4455
|
+
/* @__PURE__ */ N(k, {
|
|
4451
4456
|
component: "span",
|
|
4452
4457
|
children: ": "
|
|
4453
4458
|
}),
|
|
4454
|
-
/* @__PURE__ */ N(
|
|
4459
|
+
/* @__PURE__ */ N(k, {
|
|
4455
4460
|
component: "strong",
|
|
4456
4461
|
children: r.getPresentationValue(n, t)
|
|
4457
4462
|
})
|
|
4458
|
-
] }), /* @__PURE__ */ N(
|
|
4463
|
+
] }), /* @__PURE__ */ N(me, {
|
|
4459
4464
|
"aria-label": t("Remove filter with label {{filterLabel}} and value {{filterValue}}", {
|
|
4460
4465
|
filterLabel: r.label,
|
|
4461
4466
|
filterValue: r.getPresentationValue(n, t)
|
|
4462
4467
|
}),
|
|
4463
|
-
onClick: () =>
|
|
4468
|
+
onClick: () => D(e),
|
|
4464
4469
|
size: "small",
|
|
4465
|
-
children: /* @__PURE__ */ N(
|
|
4470
|
+
children: /* @__PURE__ */ N(lt, {})
|
|
4466
4471
|
})]
|
|
4467
4472
|
}, e);
|
|
4468
4473
|
}) }),
|
|
4469
|
-
(o || y) && /* @__PURE__ */ P(
|
|
4474
|
+
(o || y) && /* @__PURE__ */ P(k, {
|
|
4470
4475
|
sx: {
|
|
4471
4476
|
display: "flex",
|
|
4472
4477
|
gap: 1,
|
|
@@ -4474,92 +4479,95 @@ var oo = Ke, so = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
|
|
|
4474
4479
|
marginRight: 1,
|
|
4475
4480
|
my: 1
|
|
4476
4481
|
},
|
|
4477
|
-
children: [/* @__PURE__ */ N(
|
|
4478
|
-
...
|
|
4482
|
+
children: [/* @__PURE__ */ N(le, {
|
|
4483
|
+
...ze.createAttributes("TableFiltersSidebarItem-reset"),
|
|
4479
4484
|
color: "primary",
|
|
4480
4485
|
onClick: ne,
|
|
4481
|
-
startIcon: /* @__PURE__ */ N(
|
|
4486
|
+
startIcon: /* @__PURE__ */ N(ct, {}),
|
|
4482
4487
|
variant: "outlined",
|
|
4483
4488
|
children: t`Reset`
|
|
4484
|
-
}), /* @__PURE__ */ N(
|
|
4485
|
-
...
|
|
4489
|
+
}), /* @__PURE__ */ N(le, {
|
|
4490
|
+
...ze.createAttributes("TableFiltersSidebarItem-apply"),
|
|
4486
4491
|
color: "secondary",
|
|
4487
|
-
startIcon: /* @__PURE__ */ N(
|
|
4492
|
+
startIcon: /* @__PURE__ */ N(st, {}),
|
|
4488
4493
|
type: "submit",
|
|
4489
4494
|
children: t`Apply`
|
|
4490
4495
|
})]
|
|
4491
4496
|
})
|
|
4492
|
-
] }), /* @__PURE__ */ P(
|
|
4497
|
+
] }), /* @__PURE__ */ P(k, {
|
|
4493
4498
|
sx: {
|
|
4494
4499
|
overflowY: "auto",
|
|
4495
4500
|
paddingRight: 1
|
|
4496
4501
|
},
|
|
4497
|
-
children: [i.length > 0 && /* @__PURE__ */ N(
|
|
4502
|
+
children: [i.length > 0 && /* @__PURE__ */ N(Le, { children: i.filter((e) => e.filterIds.length).map((e) => /* @__PURE__ */ N(ao, {
|
|
4498
4503
|
filterDimension: e,
|
|
4499
4504
|
onFilterVisibilityChange: _,
|
|
4500
4505
|
visibleFilterWithinDimension: u[e.id]
|
|
4501
|
-
}, e.id)) }), i.length === 0 && /* @__PURE__ */ N(
|
|
4506
|
+
}, e.id)) }), i.length === 0 && /* @__PURE__ */ N(Le, { children: re.map((e) => /* @__PURE__ */ P(k, {
|
|
4502
4507
|
sx: { my: 2 },
|
|
4503
|
-
children: [/* @__PURE__ */ N(
|
|
4508
|
+
children: [/* @__PURE__ */ N(k, {
|
|
4504
4509
|
sx: { my: 1 },
|
|
4505
|
-
children: /* @__PURE__ */ N(
|
|
4506
|
-
}), /* @__PURE__ */ N(
|
|
4510
|
+
children: /* @__PURE__ */ N(wa, { filter: e })
|
|
4511
|
+
}), /* @__PURE__ */ N(de, {})]
|
|
4507
4512
|
}, e.id)) })]
|
|
4508
4513
|
})]
|
|
4509
4514
|
})
|
|
4510
4515
|
}) });
|
|
4511
|
-
},
|
|
4512
|
-
let { t: n } =
|
|
4513
|
-
return /* @__PURE__ */ N(
|
|
4514
|
-
closeIcon: /* @__PURE__ */ N(
|
|
4516
|
+
}, so = ({ onClose: e, open: t }) => {
|
|
4517
|
+
let { t: n } = Re();
|
|
4518
|
+
return /* @__PURE__ */ N(ae, {
|
|
4519
|
+
closeIcon: /* @__PURE__ */ N(io, {}),
|
|
4515
4520
|
closeIconTooltipText: n`Close filters`,
|
|
4516
4521
|
onClose: e,
|
|
4517
4522
|
open: t,
|
|
4518
4523
|
testIdAttributes: { name: "tableFiltersSidebarItem" },
|
|
4519
4524
|
title: n`Filters`,
|
|
4520
4525
|
width: 60,
|
|
4521
|
-
children: t && /* @__PURE__ */ N(
|
|
4526
|
+
children: t && /* @__PURE__ */ N(oo, { onClose: e })
|
|
4522
4527
|
});
|
|
4523
|
-
},
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
-
|
|
4528
|
+
}, co = ({ ContainerProps: e }) => {
|
|
4529
|
+
let t = x({});
|
|
4530
|
+
return /* @__PURE__ */ N(ut, {
|
|
4531
|
+
ButtonProps: {
|
|
4532
|
+
color: "primary",
|
|
4533
|
+
size: "small",
|
|
4534
|
+
variant: "text"
|
|
4535
|
+
},
|
|
4536
|
+
ContainerProps: e,
|
|
4537
|
+
menuItemsData: t,
|
|
4538
|
+
MenuProps: { elevation: 3 }
|
|
4539
|
+
});
|
|
4540
|
+
}, lo = ({ header: e, headerComponent: t = "h3", headerVariant: n = "h5", showTableMenu: r = !0 }) => /* @__PURE__ */ P(k, {
|
|
4533
4541
|
sx: {
|
|
4534
4542
|
alignItems: "center",
|
|
4535
4543
|
display: "flex",
|
|
4536
4544
|
justifyContent: e ? "space-between" : "flex-end"
|
|
4537
4545
|
},
|
|
4538
|
-
children: [e && /* @__PURE__ */ N(
|
|
4546
|
+
children: [e && /* @__PURE__ */ N(k, { children: /* @__PURE__ */ N(Ja, {
|
|
4539
4547
|
caption: e,
|
|
4540
4548
|
component: t,
|
|
4541
4549
|
variant: n
|
|
4542
|
-
}) }), r && /* @__PURE__ */ N(
|
|
4543
|
-
}),
|
|
4544
|
-
let t =
|
|
4545
|
-
|
|
4546
|
-
}, []),
|
|
4547
|
-
|
|
4550
|
+
}) }), r && /* @__PURE__ */ N(k, { children: /* @__PURE__ */ N(co, {}) })]
|
|
4551
|
+
}), uo = ({ extraSidebarMenuItems: e }) => {
|
|
4552
|
+
let t = h(), n = m(t, (e) => e.filters.filter((e) => !e.isInitialFilterValue()).length), [r, i] = Ie(!1), a = j(() => {
|
|
4553
|
+
i(!1);
|
|
4554
|
+
}, []), o = j(() => {
|
|
4555
|
+
i(!0);
|
|
4548
4556
|
}, []);
|
|
4549
|
-
return /* @__PURE__ */ P(
|
|
4557
|
+
return /* @__PURE__ */ P(Le, { children: [/* @__PURE__ */ P(oe, { children: [/* @__PURE__ */ N(se, {
|
|
4550
4558
|
badgeColor: "secondary",
|
|
4551
|
-
badgeContent:
|
|
4559
|
+
badgeContent: n,
|
|
4552
4560
|
first: !0,
|
|
4553
|
-
icon: /* @__PURE__ */ N(
|
|
4554
|
-
onClick:
|
|
4561
|
+
icon: /* @__PURE__ */ N(io, {}),
|
|
4562
|
+
onClick: o,
|
|
4555
4563
|
testIdAttributes: { name: "filters" },
|
|
4556
|
-
title:
|
|
4557
|
-
}), e] }), /* @__PURE__ */ N(
|
|
4558
|
-
onClose:
|
|
4559
|
-
open:
|
|
4564
|
+
title: O`Open filters`
|
|
4565
|
+
}), e] }), /* @__PURE__ */ N(so, {
|
|
4566
|
+
onClose: a,
|
|
4567
|
+
open: r
|
|
4560
4568
|
})] });
|
|
4561
4569
|
};
|
|
4562
4570
|
//#endregion
|
|
4563
|
-
export {
|
|
4571
|
+
export { oo as a, qa as c, Da as d, Ta as f, ya as h, so as i, Fa as l, ba as m, lo as n, io as o, wa as p, co as r, Ja as s, uo as t, Pa as u };
|
|
4564
4572
|
|
|
4565
4573
|
//# sourceMappingURL=Table.js.map
|