@dmsi/wedgekit-react 1.0.1 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/classNames.d.ts +1 -0
- package/dist/classNames.d.ts.map +1 -1
- package/dist/classNames.js +150 -0
- package/dist/components/AccessCard.js +63 -0
- package/dist/components/AccessCardGroup.js +73 -0
- package/dist/components/AccessChangerTabItem.js +51 -0
- package/dist/components/Accordion.js +99 -0
- package/dist/components/Alert.d.ts.map +1 -1
- package/dist/components/Alert.js +78 -0
- package/dist/components/Breadcrumbs.js +111 -0
- package/dist/components/Button.js +137 -0
- package/dist/components/CalendarRange.js +405 -0
- package/dist/components/Caption.js +99 -0
- package/dist/components/Card.js +50 -0
- package/dist/components/Checkbox.js +108 -0
- package/dist/components/CompactImagesPreview.d.ts.map +1 -1
- package/dist/components/CompactImagesPreview.js +120 -0
- package/dist/components/ContentTab.js +68 -0
- package/dist/components/ContentTabs.js +96 -0
- package/dist/components/DMSiLogo.js +54 -0
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +27 -0
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +79 -0
- package/dist/components/DataGrid/PinnedColumns.d.ts +9 -2
- package/dist/components/DataGrid/PinnedColumns.d.ts.map +1 -1
- package/dist/components/DataGrid/PinnedColumns.js +165 -0
- package/dist/components/DataGrid/SummaryRow/SummaryCell.d.ts +18 -0
- package/dist/components/DataGrid/SummaryRow/SummaryCell.d.ts.map +1 -0
- package/dist/components/DataGrid/SummaryRow/SummaryCell.js +51 -0
- package/dist/components/DataGrid/SummaryRow/aggregations.d.ts +39 -0
- package/dist/components/DataGrid/SummaryRow/aggregations.d.ts.map +1 -0
- package/dist/components/DataGrid/SummaryRow/aggregations.js +55 -0
- package/dist/components/DataGrid/SummaryRow/index.d.ts +18 -0
- package/dist/components/DataGrid/SummaryRow/index.d.ts.map +1 -0
- package/dist/components/DataGrid/SummaryRow/index.js +86 -0
- package/dist/components/DataGrid/TableBody/GroupRow.d.ts +18 -0
- package/dist/components/DataGrid/TableBody/GroupRow.d.ts.map +1 -0
- package/dist/components/DataGrid/TableBody/GroupRow.js +243 -0
- package/dist/components/DataGrid/TableBody/LoadingCell.js +33 -0
- package/dist/components/DataGrid/TableBody/TableBodyRow.d.ts +3 -2
- package/dist/components/DataGrid/TableBody/TableBodyRow.d.ts.map +1 -1
- package/dist/components/DataGrid/TableBody/TableBodyRow.js +136 -0
- package/dist/components/DataGrid/TableBody/index.d.ts +3 -1
- package/dist/components/DataGrid/TableBody/index.d.ts.map +1 -1
- package/dist/components/DataGrid/TableBody/index.js +161 -0
- package/dist/components/DataGrid/index.d.ts +1 -1
- package/dist/components/DataGrid/index.d.ts.map +1 -1
- package/dist/components/DataGrid/index.js +696 -0
- package/dist/components/DataGrid/types.d.ts +141 -1
- package/dist/components/DataGrid/types.d.ts.map +1 -1
- package/dist/components/DataGrid/utils.d.ts +2 -0
- package/dist/components/DataGrid/utils.d.ts.map +1 -1
- package/dist/components/DataGrid/utils.js +20 -0
- package/dist/components/DataGridCell.d.ts +5 -2
- package/dist/components/DataGridCell.d.ts.map +1 -1
- package/dist/components/DataGridCell.js +412 -0
- package/dist/components/DataTable.js +700 -0
- package/dist/components/DateInput.js +193 -0
- package/dist/components/DateRangeInput.js +368 -0
- package/dist/components/DebugJson.js +28 -0
- package/dist/components/Display.js +46 -0
- package/dist/components/EditingContext.js +34 -0
- package/dist/components/EmblaCarousel/ArrowButtons.js +83 -0
- package/dist/components/EmblaCarousel/SelectedSnapDisplay.js +12 -0
- package/dist/components/EmblaCarousel/index.js +153 -0
- package/dist/components/EmblaCarousel/usePrevNextButtons.js +21 -0
- package/dist/components/EmblaCarousel/useSelectedSnapDisplay.js +15 -0
- package/dist/components/EmptyCartIcon.js +25 -0
- package/dist/components/FilterGroup.d.ts +5 -3
- package/dist/components/FilterGroup.d.ts.map +1 -1
- package/dist/components/FilterGroup.js +198 -0
- package/dist/components/FullViewportBox.js +19 -0
- package/dist/components/Grid.js +54 -0
- package/dist/components/Heading.js +50 -0
- package/dist/components/HorizontalDivider.js +20 -0
- package/dist/components/Icon.d.ts +5 -2
- package/dist/components/Icon.d.ts.map +1 -1
- package/dist/components/Icon.js +73 -0
- package/dist/components/ImagePlaceholder.js +22 -0
- package/dist/components/Input.d.ts +11 -9
- package/dist/components/Input.d.ts.map +1 -1
- package/dist/components/Input.js +469 -0
- package/dist/components/InputGroup.js +45 -0
- package/dist/components/Label.js +37 -0
- package/dist/components/Link.js +69 -0
- package/dist/components/List.js +12 -0
- package/dist/components/ListGroup.d.ts.map +1 -1
- package/dist/components/ListGroup.js +54 -0
- package/dist/components/LiveChatComponent.js +25 -0
- package/dist/components/LoadingScrim.js +22 -0
- package/dist/components/LogoAgilityTopBar.js +90 -0
- package/dist/components/LogoDMSiTopBar.js +54 -0
- package/dist/components/LogoMillworkTopBar.js +196 -0
- package/dist/components/MainBar.js +58 -0
- package/dist/components/MaxViewportBox.js +19 -0
- package/dist/components/Menu.d.ts.map +1 -1
- package/dist/components/Menu.js +202 -0
- package/dist/components/MenuOption.js +161 -0
- package/dist/components/MobileDataGrid/ColumnList.js +85 -0
- package/dist/components/MobileDataGrid/ColumnSelector/index.js +100 -0
- package/dist/components/MobileDataGrid/GridContextProvider/GridContext.d.ts.map +1 -1
- package/dist/components/MobileDataGrid/GridContextProvider/GridContext.js +6 -0
- package/dist/components/MobileDataGrid/GridContextProvider/index.js +80 -0
- package/dist/components/MobileDataGrid/GridContextProvider/useGridContext.js +11 -0
- package/dist/components/MobileDataGrid/MobileDataGridCard/MobileDataGridColumn.js +18 -0
- package/dist/components/MobileDataGrid/MobileDataGridCard/index.d.ts +2 -1
- package/dist/components/MobileDataGrid/MobileDataGridCard/index.d.ts.map +1 -1
- package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +130 -0
- package/dist/components/MobileDataGrid/MobileDataGridHeader.d.ts.map +1 -1
- package/dist/components/MobileDataGrid/MobileDataGridHeader.js +67 -0
- package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +42 -0
- package/dist/components/MobileDataGrid/RowDetailModalProvider/index.d.ts.map +1 -1
- package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +58 -0
- package/dist/components/MobileDataGrid/dataGridReducer.js +28 -0
- package/dist/components/MobileDataGrid/index.d.ts +1 -1
- package/dist/components/MobileDataGrid/index.d.ts.map +1 -1
- package/dist/components/MobileDataGrid/index.js +78 -0
- package/dist/components/MobileNavMenu.d.ts.map +1 -1
- package/dist/components/MobileNavMenu.js +173 -0
- package/dist/components/Modal.d.ts +1 -2
- package/dist/components/Modal.d.ts.map +1 -1
- package/dist/components/Modal.js +201 -0
- package/dist/components/ModalButtons.d.ts.map +1 -1
- package/dist/components/ModalButtons.js +57 -0
- package/dist/components/ModalContent.d.ts +1 -2
- package/dist/components/ModalContent.d.ts.map +1 -1
- package/dist/components/ModalContent.js +24 -0
- package/dist/components/ModalHeader.js +74 -0
- package/dist/components/ModalScrim.js +32 -0
- package/dist/components/NavigationTab.js +72 -0
- package/dist/components/NavigationTabs.js +45 -0
- package/dist/components/NestedMenu.d.ts.map +1 -1
- package/dist/components/NestedMenu.js +119 -0
- package/dist/components/Notification.js +91 -0
- package/dist/components/OptionPill.d.ts +2 -1
- package/dist/components/OptionPill.d.ts.map +1 -1
- package/dist/components/OptionPill.js +103 -0
- package/dist/components/OrderCheckIcon.js +28 -0
- package/dist/components/PDFViewer/DownloadIcon.js +25 -0
- package/dist/components/PDFViewer/PDFElement.js +77 -0
- package/dist/components/PDFViewer/PDFNavigation.js +64 -0
- package/dist/components/PDFViewer/PDFPage.js +28 -0
- package/dist/components/PDFViewer/index.d.ts.map +1 -1
- package/dist/components/PDFViewer/index.js +124 -0
- package/dist/components/Pagination.d.ts.map +1 -1
- package/dist/components/Pagination.js +117 -0
- package/dist/components/Paragraph.js +43 -0
- package/dist/components/Password.js +47 -0
- package/dist/components/ProductImagePreview/CarouselPagination.js +48 -0
- package/dist/components/ProductImagePreview/MobileImageCarousel.d.ts +2 -1
- package/dist/components/ProductImagePreview/MobileImageCarousel.d.ts.map +1 -1
- package/dist/components/ProductImagePreview/MobileImageCarousel.js +146 -0
- package/dist/components/ProductImagePreview/ProductPrimaryImage.d.ts +2 -1
- package/dist/components/ProductImagePreview/ProductPrimaryImage.d.ts.map +1 -1
- package/dist/components/ProductImagePreview/ProductPrimaryImage.js +138 -0
- package/dist/components/ProductImagePreview/Thumbnail.d.ts +2 -1
- package/dist/components/ProductImagePreview/Thumbnail.d.ts.map +1 -1
- package/dist/components/ProductImagePreview/Thumbnail.js +46 -0
- package/dist/components/ProductImagePreview/ZoomWindow.js +74 -0
- package/dist/components/ProductImagePreview/index.d.ts.map +1 -1
- package/dist/components/ProductImagePreview/index.js +189 -0
- package/dist/components/ProductImagePreview/useProductImagePreview.js +85 -0
- package/dist/components/ProjectBar.d.ts +1 -1
- package/dist/components/ProjectBar.js +54 -0
- package/dist/components/Radio.js +113 -0
- package/dist/components/Search.js +89 -0
- package/dist/components/SearchResultImage/index.js +26 -0
- package/dist/components/Select.js +122 -0
- package/dist/components/SideMenu.js +24 -0
- package/dist/components/SideMenuGroup.js +80 -0
- package/dist/components/SideMenuItem.js +79 -0
- package/dist/components/SimpleTable.js +60 -0
- package/dist/components/SkeletonParagraph.js +24 -0
- package/dist/components/Spinner.d.ts +1 -1
- package/dist/components/Spinner.d.ts.map +1 -1
- package/dist/components/Spinner.js +30 -0
- package/dist/components/Stack.js +174 -0
- package/dist/components/StatusPill.js +44 -0
- package/dist/components/Stepper.js +138 -0
- package/dist/components/Subheader.d.ts +2 -1
- package/dist/components/Subheader.d.ts.map +1 -1
- package/dist/components/Subheader.js +41 -0
- package/dist/components/Surface.js +30 -0
- package/dist/components/Swatch.js +1498 -0
- package/dist/components/Textarea.js +106 -0
- package/dist/components/Theme.d.ts +1 -1
- package/dist/components/Theme.d.ts.map +1 -1
- package/dist/components/Theme.js +25 -0
- package/dist/components/Time.d.ts +2 -1
- package/dist/components/Time.d.ts.map +1 -1
- package/dist/components/Time.js +225 -0
- package/dist/components/Toast.d.ts +4 -3
- package/dist/components/Toast.d.ts.map +1 -1
- package/dist/components/Toast.js +170 -0
- package/dist/components/Tooltip.js +102 -0
- package/dist/components/TopBar.d.ts.map +1 -1
- package/dist/components/TopBar.js +119 -0
- package/dist/components/Upload.js +107 -0
- package/dist/components/WorldpayIframe.d.ts.map +1 -1
- package/dist/components/WorldpayIframe.js +19 -0
- package/dist/hooks/useEditCell.js +23 -0
- package/dist/hooks/useInfiniteScroll.js +25 -0
- package/dist/hooks/useKeydown.js +20 -0
- package/dist/hooks/useMatchesMedia.js +15 -0
- package/dist/hooks/useMenuSystem.js +186 -0
- package/dist/hooks/useMounted.js +9 -0
- package/dist/hooks/useTableLayout/computeColumns.js +59 -0
- package/dist/hooks/useTableLayout/storage.js +64 -0
- package/dist/hooks/useTableLayout/useTableLayout.js +163 -0
- package/dist/index.js +249 -52864
- package/dist/lib/loadFonts.js +11 -0
- package/dist/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js +56 -0
- package/dist/node_modules/@dnd-kit/core/dist/core.esm.js +2299 -0
- package/dist/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.js +13 -0
- package/dist/node_modules/@dnd-kit/sortable/dist/sortable.esm.js +367 -0
- package/dist/node_modules/@dnd-kit/utilities/dist/utilities.esm.js +235 -0
- package/dist/node_modules/@headlessui/react/dist/components/description/description.js +45 -0
- package/dist/node_modules/@headlessui/react/dist/components/keyboard.js +4 -0
- package/dist/node_modules/@headlessui/react/dist/components/label/label.js +62 -0
- package/dist/node_modules/@headlessui/react/dist/components/switch/switch.js +56 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-active-press.js +33 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-controllable.js +10 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-default-value.js +8 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-disposables.js +9 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-event.js +9 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-iso-morphic-effect.js +8 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-latest-value.js +11 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-resolve-button-type.js +12 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-slot.js +7 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-sync-refs.js +16 -0
- package/dist/node_modules/@headlessui/react/dist/internal/disabled.js +8 -0
- package/dist/node_modules/@headlessui/react/dist/internal/form-fields.js +35 -0
- package/dist/node_modules/@headlessui/react/dist/internal/hidden.js +13 -0
- package/dist/node_modules/@headlessui/react/dist/internal/id.js +8 -0
- package/dist/node_modules/@headlessui/react/dist/utils/bugs.js +19 -0
- package/dist/node_modules/@headlessui/react/dist/utils/class-names.js +6 -0
- package/dist/node_modules/@headlessui/react/dist/utils/disposables.js +40 -0
- package/dist/node_modules/@headlessui/react/dist/utils/dom.js +34 -0
- package/dist/node_modules/@headlessui/react/dist/utils/env.js +34 -0
- package/dist/node_modules/@headlessui/react/dist/utils/form.js +32 -0
- package/dist/node_modules/@headlessui/react/dist/utils/match.js +11 -0
- package/dist/node_modules/@headlessui/react/dist/utils/micro-task.js +8 -0
- package/dist/node_modules/@headlessui/react/dist/utils/owner.js +8 -0
- package/dist/node_modules/@headlessui/react/dist/utils/render.js +126 -0
- package/dist/node_modules/@js-temporal/polyfill/dist/index.esm.js +3913 -0
- package/dist/node_modules/@mikecousins/react-pdf/dist/index.js +83 -0
- package/dist/node_modules/@react-aria/focus/dist/useFocusRing.js +38 -0
- package/dist/node_modules/@react-aria/interactions/dist/useFocus.js +31 -0
- package/dist/node_modules/@react-aria/interactions/dist/useFocusVisible.js +99 -0
- package/dist/node_modules/@react-aria/interactions/dist/useFocusWithin.js +59 -0
- package/dist/node_modules/@react-aria/interactions/dist/useHover.js +86 -0
- package/dist/node_modules/@react-aria/interactions/dist/utils.js +68 -0
- package/dist/node_modules/@react-aria/utils/dist/DOMFunctions.js +32 -0
- package/dist/node_modules/@react-aria/utils/dist/domHelpers.js +15 -0
- package/dist/node_modules/@react-aria/utils/dist/focusWithoutScrolling.js +45 -0
- package/dist/node_modules/@react-aria/utils/dist/isVirtualEvent.js +7 -0
- package/dist/node_modules/@react-aria/utils/dist/openLink.js +28 -0
- package/dist/node_modules/@react-aria/utils/dist/platform.js +47 -0
- package/dist/node_modules/@react-aria/utils/dist/useGlobalListeners.js +34 -0
- package/dist/node_modules/@react-aria/utils/dist/useLayoutEffect.js +6 -0
- package/dist/node_modules/@react-stately/flags/dist/import.js +7 -0
- package/dist/node_modules/@tanstack/react-table/build/lib/index.js +94 -0
- package/dist/node_modules/@tanstack/react-virtual/dist/esm/index.js +38 -0
- package/dist/node_modules/@tanstack/table-core/build/lib/index.js +1954 -0
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +575 -0
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js +52 -0
- package/dist/node_modules/clsx/dist/clsx.js +17 -0
- package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js +1204 -0
- package/dist/node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.js +126 -0
- package/dist/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js +24 -0
- package/dist/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +35 -0
- package/dist/node_modules/jsbi/dist/jsbi.js +1040 -0
- package/dist/node_modules/react-use/esm/usePrevious.js +10 -0
- package/dist/static/no-results-image.png.js +4 -0
- package/dist/styles.css +1 -1
- package/dist/utils/date-patch-dashes.js +28 -0
- package/dist/utils/date.js +95 -0
- package/dist/utils/formatting.js +22 -0
- package/dist/utils/index.js +4 -0
- package/dist/utils/mergeObjectArrays.js +18 -0
- package/dist/utils.js +20 -0
- package/package.json +1 -1
- /package/dist/{pdf-l6QfMa5e.js → node_modules/pdfjs-dist/build/pdf.js} +0 -0
|
@@ -0,0 +1,696 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as n, jsxs as d, Fragment as Nt } from "react/jsx-runtime";
|
|
3
|
+
import $t, { useImperativeHandle as Pt, useState as f, useCallback as H, useEffect as ie, useRef as ce, useId as kt, useLayoutEffect as Dt } from "react";
|
|
4
|
+
import { useInfiniteScroll as Lt } from "../../hooks/useInfiniteScroll.js";
|
|
5
|
+
import { useTableLayout as Et } from "../../hooks/useTableLayout/useTableLayout.js";
|
|
6
|
+
import { componentGap as Le, componentPadding as Ee } from "../../classNames.js";
|
|
7
|
+
import { Button as Me } from "../Button.js";
|
|
8
|
+
import { Checkbox as Mt } from "../Checkbox.js";
|
|
9
|
+
import { DraggableCellHeader as Tt, DataGridCell as jt } from "../DataGridCell.js";
|
|
10
|
+
import { Icon as Te } from "../Icon.js";
|
|
11
|
+
import { Label as Wt } from "../Label.js";
|
|
12
|
+
import { Menu as _t } from "../Menu.js";
|
|
13
|
+
import { MenuOption as At } from "../MenuOption.js";
|
|
14
|
+
import { Paragraph as w } from "../Paragraph.js";
|
|
15
|
+
import { Select as Ft } from "../Select.js";
|
|
16
|
+
import { Subheader as $ } from "../Subheader.js";
|
|
17
|
+
import { useReactTable as Gt, flexRender as Ot } from "../../node_modules/@tanstack/react-table/build/lib/index.js";
|
|
18
|
+
import { useSensors as Ht, useSensor as ae, DndContext as Kt, closestCenter as Vt, KeyboardSensor as Zt, TouchSensor as qt, MouseSensor as Bt } from "../../node_modules/@dnd-kit/core/dist/core.esm.js";
|
|
19
|
+
import { SortableContext as Jt, horizontalListSortingStrategy as Qt, arrayMove as Xt } from "../../node_modules/@dnd-kit/sortable/dist/sortable.esm.js";
|
|
20
|
+
import { restrictToHorizontalAxis as Yt } from "../../node_modules/@dnd-kit/modifiers/dist/modifiers.esm.js";
|
|
21
|
+
import { Notification as Ut } from "../Notification.js";
|
|
22
|
+
import { useVirtualizer as eo } from "../../node_modules/@tanstack/react-virtual/dist/esm/index.js";
|
|
23
|
+
import { clsx as S } from "../../node_modules/clsx/dist/clsx.js";
|
|
24
|
+
import { PinnedColumns as je } from "./PinnedColumns.js";
|
|
25
|
+
import { getSortIcon as We } from "./utils.js";
|
|
26
|
+
import { TableBody as to } from "./TableBody/index.js";
|
|
27
|
+
import { SummaryRow as oo } from "./SummaryRow/index.js";
|
|
28
|
+
import { Spinner as de } from "../Spinner.js";
|
|
29
|
+
import { Tooltip as _e } from "../Tooltip.js";
|
|
30
|
+
import Ae from "../../static/no-results-image.png.js";
|
|
31
|
+
import { getExpandedRowModel as no, getGroupedRowModel as ro, getFilteredRowModel as lo, getSortedRowModel as so, getCoreRowModel as io } from "../../node_modules/@tanstack/table-core/build/lib/index.js";
|
|
32
|
+
const co = [5, 10, 15, 20, 25, 30, 35], Fe = "h-[185px]";
|
|
33
|
+
function Fo({
|
|
34
|
+
id: s,
|
|
35
|
+
rowIdAccessor: v,
|
|
36
|
+
testid: l,
|
|
37
|
+
data: k,
|
|
38
|
+
columns: Ge,
|
|
39
|
+
status: D,
|
|
40
|
+
isLoadingMore: L = !1,
|
|
41
|
+
onLoadMore: Oe,
|
|
42
|
+
pagination: r,
|
|
43
|
+
showFilterRow: K = !1,
|
|
44
|
+
hasMore: V = !1,
|
|
45
|
+
sorting: me,
|
|
46
|
+
onSortingChange: He,
|
|
47
|
+
columnFilters: ue,
|
|
48
|
+
onColumnFiltersChange: Ke,
|
|
49
|
+
rowSelection: Z,
|
|
50
|
+
onRowSelectionChange: E,
|
|
51
|
+
filteredSortedData: fe,
|
|
52
|
+
totalRowCount: M,
|
|
53
|
+
hideStatusBar: Ve,
|
|
54
|
+
centerHeader: Ze,
|
|
55
|
+
enableColumnSelector: he,
|
|
56
|
+
predeterminedLeftPins: qe = [],
|
|
57
|
+
predeterminedRightPins: Be = [],
|
|
58
|
+
useMenuDefaultMinWidth: Je,
|
|
59
|
+
rowDisabled: Qe,
|
|
60
|
+
rowDisabledAccessor: Xe,
|
|
61
|
+
isLoading: h = !1,
|
|
62
|
+
loadingMessage: Ye = "Loading Results",
|
|
63
|
+
loadingDescription: ge,
|
|
64
|
+
maxHeight: T,
|
|
65
|
+
fillHeight: y = !1,
|
|
66
|
+
manualFiltering: q = !1,
|
|
67
|
+
notifications: B,
|
|
68
|
+
summaryRow: pe,
|
|
69
|
+
groupBy: j,
|
|
70
|
+
groupRowMode: J = "spanning",
|
|
71
|
+
groupDefaultExpand: Se = "none",
|
|
72
|
+
allowUserGrouping: Q,
|
|
73
|
+
groupSelectionMode: X = "row",
|
|
74
|
+
hideGroupedColumns: Ue,
|
|
75
|
+
grouping: C,
|
|
76
|
+
onGroupingChange: et,
|
|
77
|
+
expanded: W,
|
|
78
|
+
onExpandedChange: tt,
|
|
79
|
+
ref: ot
|
|
80
|
+
}) {
|
|
81
|
+
Pt(ot, () => ({
|
|
82
|
+
getSavedLayout: () => rt()
|
|
83
|
+
}));
|
|
84
|
+
const [ve, be] = f([]), [xe, we] = f([]), [nt, ye] = f({}), [Y, U] = f(null), {
|
|
85
|
+
columns: b,
|
|
86
|
+
setColumns: ee,
|
|
87
|
+
getSavedLayout: rt,
|
|
88
|
+
resetToDefaults: Ce
|
|
89
|
+
} = Et(Ge, s ?? l), [Re, te] = f(
|
|
90
|
+
b.map((e) => e.id)
|
|
91
|
+
), [ze, lt] = f(
|
|
92
|
+
Object.fromEntries(
|
|
93
|
+
b.filter((e) => !!e.id).map((e) => [e.id, e.meta?.visible ?? !0])
|
|
94
|
+
)
|
|
95
|
+
), Ie = H(
|
|
96
|
+
(e) => {
|
|
97
|
+
lt(
|
|
98
|
+
Object.fromEntries(
|
|
99
|
+
b.filter((o) => !!o.id).map((o) => [o.id, o.meta?.visible ?? !0])
|
|
100
|
+
)
|
|
101
|
+
), e && te(b.map((o) => o.id));
|
|
102
|
+
},
|
|
103
|
+
[b]
|
|
104
|
+
), st = H(() => {
|
|
105
|
+
Ce();
|
|
106
|
+
}, [Ce]);
|
|
107
|
+
ie(() => {
|
|
108
|
+
Ie(!0);
|
|
109
|
+
}, [Ie]);
|
|
110
|
+
const it = r ? me ?? ve : ve, ct = r ? (e) => {
|
|
111
|
+
const o = typeof e == "function" ? e(
|
|
112
|
+
me ?? []
|
|
113
|
+
) : e;
|
|
114
|
+
(He ?? be)(o);
|
|
115
|
+
} : be, Ne = r != null || q, at = Ne ? ue ?? xe : xe, dt = Ne ? (e) => {
|
|
116
|
+
const o = typeof e == "function" ? e(ue ?? []) : e;
|
|
117
|
+
(Ke ?? we)(o);
|
|
118
|
+
} : we, R = Z ?? nt, z = ce(R);
|
|
119
|
+
z.current = R;
|
|
120
|
+
const $e = H(
|
|
121
|
+
(e) => {
|
|
122
|
+
if (r) {
|
|
123
|
+
const o = typeof e == "function" ? e(z.current) : e;
|
|
124
|
+
z.current = o, (E ?? ye)(o);
|
|
125
|
+
} else if (Z && E) {
|
|
126
|
+
const o = typeof e == "function" ? e(z.current) : e;
|
|
127
|
+
z.current = o, E(o);
|
|
128
|
+
} else
|
|
129
|
+
ye(e);
|
|
130
|
+
},
|
|
131
|
+
[Z, E, r]
|
|
132
|
+
), [mt, Pe] = f(
|
|
133
|
+
j ?? []
|
|
134
|
+
);
|
|
135
|
+
ie(() => {
|
|
136
|
+
C === void 0 && j !== void 0 && Pe(j);
|
|
137
|
+
}, [j, C]);
|
|
138
|
+
const oe = C ?? mt, ut = C !== void 0 ? (e) => {
|
|
139
|
+
const o = typeof e == "function" ? e(
|
|
140
|
+
C
|
|
141
|
+
) : e;
|
|
142
|
+
et?.(o);
|
|
143
|
+
} : Pe, [ft, ke] = f(
|
|
144
|
+
() => Se === "all" ? !0 : {}
|
|
145
|
+
), ht = W ?? ft, gt = W !== void 0 ? (e) => {
|
|
146
|
+
const o = typeof e == "function" ? e(
|
|
147
|
+
W
|
|
148
|
+
) : e;
|
|
149
|
+
tt?.(o);
|
|
150
|
+
} : ke, pt = Ue ? {
|
|
151
|
+
...ze,
|
|
152
|
+
...Object.fromEntries(oe.map((e) => [e, !1]))
|
|
153
|
+
} : ze, St = kt(), u = ce(null), De = ce(!1), vt = H(
|
|
154
|
+
(e, o) => {
|
|
155
|
+
ee((t) => t.map((a) => a.id === e ? {
|
|
156
|
+
...a,
|
|
157
|
+
meta: {
|
|
158
|
+
...a.meta,
|
|
159
|
+
visible: o
|
|
160
|
+
}
|
|
161
|
+
} : a));
|
|
162
|
+
},
|
|
163
|
+
[ee]
|
|
164
|
+
), c = Gt({
|
|
165
|
+
columns: b,
|
|
166
|
+
data: k,
|
|
167
|
+
defaultColumn: { minSize: 50 },
|
|
168
|
+
getCoreRowModel: io(),
|
|
169
|
+
getSortedRowModel: so(),
|
|
170
|
+
getFilteredRowModel: q ? void 0 : lo(),
|
|
171
|
+
getGroupedRowModel: ro(),
|
|
172
|
+
getExpandedRowModel: no(),
|
|
173
|
+
// Grouping only ever happens client-side in this grid — there is no
|
|
174
|
+
// server-side/manual grouping mode, unlike filtering.
|
|
175
|
+
groupedColumnMode: !1,
|
|
176
|
+
// This grid never uses TanStack's own pagination feature — pagination
|
|
177
|
+
// is entirely hand-rolled via the `pagination` prop, with no
|
|
178
|
+
// getPaginationRowModel registered. TanStack's pagination feature is
|
|
179
|
+
// still core-bundled and present regardless, and by default it
|
|
180
|
+
// auto-resets its own (unused) internal page index whenever grouping/
|
|
181
|
+
// filtering/sorting state changes. Disabling that avoids a pointless
|
|
182
|
+
// internal state update on every grouping change.
|
|
183
|
+
autoResetPageIndex: !1,
|
|
184
|
+
autoResetExpanded: !1,
|
|
185
|
+
manualFiltering: q,
|
|
186
|
+
columnResizeMode: "onChange",
|
|
187
|
+
getRowId: v ? (e) => String(e[v]) : (e, o) => String(e.id ?? o + 1),
|
|
188
|
+
state: {
|
|
189
|
+
columnOrder: Re,
|
|
190
|
+
sorting: it,
|
|
191
|
+
columnFilters: at,
|
|
192
|
+
rowSelection: R,
|
|
193
|
+
columnVisibility: pt,
|
|
194
|
+
grouping: oe,
|
|
195
|
+
expanded: ht
|
|
196
|
+
},
|
|
197
|
+
initialState: {
|
|
198
|
+
columnPinning: {
|
|
199
|
+
left: qe,
|
|
200
|
+
right: Be
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
enableColumnPinning: !0,
|
|
204
|
+
onColumnOrderChange: te,
|
|
205
|
+
onSortingChange: P(ct),
|
|
206
|
+
onColumnFiltersChange: P(dt),
|
|
207
|
+
onRowSelectionChange: P($e),
|
|
208
|
+
onGroupingChange: P(ut),
|
|
209
|
+
onExpandedChange: P(gt),
|
|
210
|
+
filterFns: {
|
|
211
|
+
startsWith: (e, o, t) => {
|
|
212
|
+
const i = e?.getValue(o);
|
|
213
|
+
return !i || !t ? !0 : String(i).toLowerCase().startsWith(String(t).toLowerCase());
|
|
214
|
+
},
|
|
215
|
+
endsWith: (e, o, t) => {
|
|
216
|
+
const i = e?.getValue(o);
|
|
217
|
+
return !i || !t ? !0 : String(i).toLowerCase().endsWith(String(t).toLowerCase());
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
ie(() => {
|
|
222
|
+
if (Se !== "first" || W !== void 0)
|
|
223
|
+
return;
|
|
224
|
+
const e = {};
|
|
225
|
+
let o = c.getGroupedRowModel().rows.find((t) => t.depth === 0 && t.getIsGrouped());
|
|
226
|
+
for (; o; )
|
|
227
|
+
e[o.id] = !0, o = o.subRows.find((t) => t.getIsGrouped());
|
|
228
|
+
Object.keys(e).length > 0 && ke(e);
|
|
229
|
+
}, [oe]);
|
|
230
|
+
const _ = r ? fe?.map((e) => String(e.id)) ?? [] : Array.from(
|
|
231
|
+
{ length: M ?? k.length },
|
|
232
|
+
(e, o) => String(o + 1)
|
|
233
|
+
), ne = _.every(
|
|
234
|
+
(e) => R[e]
|
|
235
|
+
), bt = !ne && _.some((e) => R[e]), xt = () => {
|
|
236
|
+
$e((e) => {
|
|
237
|
+
if (!ne) {
|
|
238
|
+
const t = {};
|
|
239
|
+
for (const i of _)
|
|
240
|
+
t[i] = !0;
|
|
241
|
+
return { ...e, ...t };
|
|
242
|
+
} else {
|
|
243
|
+
const t = { ...e };
|
|
244
|
+
for (const i of _)
|
|
245
|
+
delete t[i];
|
|
246
|
+
return t;
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
};
|
|
250
|
+
Lt({
|
|
251
|
+
containerRef: u,
|
|
252
|
+
onLoadMore: Oe ?? (() => {
|
|
253
|
+
}),
|
|
254
|
+
isLoading: L,
|
|
255
|
+
enabled: !r
|
|
256
|
+
}), Dt(() => {
|
|
257
|
+
if (De.current || !u.current) return;
|
|
258
|
+
const e = u.current.offsetWidth;
|
|
259
|
+
if (e === 0) return;
|
|
260
|
+
const o = c.getLeftLeafColumns().reduce((p, O) => p + O.getSize(), 0), t = c.getRightLeafColumns().reduce((p, O) => p + O.getSize(), 0), i = e - o - t, a = c.getCenterLeafColumns();
|
|
261
|
+
if (a.length === 0) return;
|
|
262
|
+
const m = Math.floor(i / a.length), N = {};
|
|
263
|
+
a.forEach((p) => {
|
|
264
|
+
N[p.id] = Math.max(m, 50);
|
|
265
|
+
}), c.setColumnSizing(N), De.current = !0;
|
|
266
|
+
}, []);
|
|
267
|
+
const wt = (e) => {
|
|
268
|
+
const { active: o, over: t } = e;
|
|
269
|
+
o && t && o.id !== t.id && te((i) => {
|
|
270
|
+
const a = i.indexOf(o.id), m = i.indexOf(t.id), N = Xt(i, a, m);
|
|
271
|
+
return ee((p) => N.map((zt) => p.find((It) => It.id === zt)).filter(Boolean)), N;
|
|
272
|
+
});
|
|
273
|
+
}, yt = Ht(
|
|
274
|
+
ae(Bt),
|
|
275
|
+
ae(qt),
|
|
276
|
+
ae(Zt)
|
|
277
|
+
), re = c.getCenterLeafColumns(), Ct = re.map((e) => e.id), Rt = Re.filter(
|
|
278
|
+
(e) => Ct.includes(e)
|
|
279
|
+
), A = eo({
|
|
280
|
+
count: re.length,
|
|
281
|
+
estimateSize: (e) => re[e].getSize(),
|
|
282
|
+
getScrollElement: () => u.current,
|
|
283
|
+
horizontal: !0,
|
|
284
|
+
overscan: 8
|
|
285
|
+
}), g = A.getVirtualItems();
|
|
286
|
+
let F, I;
|
|
287
|
+
A && g?.length && (F = g[0]?.start ?? 0, I = A.getTotalSize() - (g[g.length - 1]?.end ?? 0));
|
|
288
|
+
const G = c.getRowModel().rows.length === 0, x = pe && !G ? pe : void 0, le = x ? c.getFilteredRowModel().rows.map((e) => e.original) : [], se = x ? r ? fe ?? k : k : [];
|
|
289
|
+
return /* @__PURE__ */ n(
|
|
290
|
+
Kt,
|
|
291
|
+
{
|
|
292
|
+
id: St,
|
|
293
|
+
collisionDetection: Vt,
|
|
294
|
+
modifiers: [Yt],
|
|
295
|
+
onDragEnd: wt,
|
|
296
|
+
sensors: yt,
|
|
297
|
+
children: /* @__PURE__ */ n(
|
|
298
|
+
Jt,
|
|
299
|
+
{
|
|
300
|
+
items: Rt,
|
|
301
|
+
strategy: Qt,
|
|
302
|
+
children: /* @__PURE__ */ d(
|
|
303
|
+
"div",
|
|
304
|
+
{
|
|
305
|
+
className: S(
|
|
306
|
+
"flex flex-col gap-2 w-full",
|
|
307
|
+
y ? "grow min-h-0" : "grow-0 h-fit"
|
|
308
|
+
),
|
|
309
|
+
children: [
|
|
310
|
+
B && B.length > 0 && /* @__PURE__ */ n("div", { className: "flex flex-col gap-2 shrink-0 [color:initial]", children: B.map((e, o) => /* @__PURE__ */ n(Ut, { ...e }, e.id ?? o)) }),
|
|
311
|
+
/* @__PURE__ */ d(
|
|
312
|
+
"div",
|
|
313
|
+
{
|
|
314
|
+
id: s,
|
|
315
|
+
"data-testid": l,
|
|
316
|
+
className: S(
|
|
317
|
+
"flex flex-col rounded border border-border-primary-normal overflow-hidden text-text-primary-normal",
|
|
318
|
+
y ? "flex-1 min-h-0" : "grow-0 h-fit"
|
|
319
|
+
),
|
|
320
|
+
children: [
|
|
321
|
+
/* @__PURE__ */ d(
|
|
322
|
+
"div",
|
|
323
|
+
{
|
|
324
|
+
className: S(
|
|
325
|
+
"flex overflow-auto scrollbar-thin relative contain-paint will-change-transform",
|
|
326
|
+
G ? "overflow-y-hidden" : !y && "min-h-[120px]",
|
|
327
|
+
y && "flex-1 min-h-0"
|
|
328
|
+
),
|
|
329
|
+
style: T !== void 0 ? { maxHeight: typeof T == "number" ? `${T}px` : T } : void 0,
|
|
330
|
+
ref: u,
|
|
331
|
+
inert: h || void 0,
|
|
332
|
+
"aria-busy": h || void 0,
|
|
333
|
+
children: [
|
|
334
|
+
/* @__PURE__ */ n(
|
|
335
|
+
je,
|
|
336
|
+
{
|
|
337
|
+
testid: l,
|
|
338
|
+
pinDirection: "left",
|
|
339
|
+
table: c,
|
|
340
|
+
tableContainerRef: u,
|
|
341
|
+
pagination: r,
|
|
342
|
+
isLoadingMore: L,
|
|
343
|
+
hasMore: V,
|
|
344
|
+
showFilterRow: K,
|
|
345
|
+
groupRowMode: J,
|
|
346
|
+
groupSelectionMode: X,
|
|
347
|
+
allowUserGrouping: Q,
|
|
348
|
+
hoveredRowId: Y,
|
|
349
|
+
setHoveredRowId: U,
|
|
350
|
+
summaryRow: x,
|
|
351
|
+
filteredRows: le,
|
|
352
|
+
allRows: se,
|
|
353
|
+
totalRowCount: M
|
|
354
|
+
}
|
|
355
|
+
),
|
|
356
|
+
/* @__PURE__ */ d("table", { className: "flex-1 flex flex-col min-h-min", children: [
|
|
357
|
+
/* @__PURE__ */ n("thead", { className: "sticky top-0 z-10 grid", children: c.getCenterHeaderGroups().map((e) => /* @__PURE__ */ d(
|
|
358
|
+
"tr",
|
|
359
|
+
{
|
|
360
|
+
"data-testid": l ? `${l}-header-row-${e.id}` : void 0,
|
|
361
|
+
className: "flex w-full bg-background-primary-normal",
|
|
362
|
+
"data-theme": "brand",
|
|
363
|
+
children: [
|
|
364
|
+
F ? (
|
|
365
|
+
// fake empty column to the left for virtualization scroll padding
|
|
366
|
+
/* @__PURE__ */ n(
|
|
367
|
+
"th",
|
|
368
|
+
{
|
|
369
|
+
style: { display: "flex", width: F }
|
|
370
|
+
}
|
|
371
|
+
)
|
|
372
|
+
) : null,
|
|
373
|
+
g.map((o) => {
|
|
374
|
+
const t = e.headers[o.index];
|
|
375
|
+
if (t) {
|
|
376
|
+
if (typeof t.column.columnDef.header == "string") {
|
|
377
|
+
const i = c.getRowModel().rows[0]?.getValue(t.column.id), a = t.column.columnDef.meta?.align ?? (typeof i == "number" ? "right" : "left");
|
|
378
|
+
return /* @__PURE__ */ d(
|
|
379
|
+
Tt,
|
|
380
|
+
{
|
|
381
|
+
width: `${t.column.getSize()}px`,
|
|
382
|
+
id: s ? `${s}-header-${t.id}` : void 0,
|
|
383
|
+
testid: l ? `${l}-header-${t.id}` : void 0,
|
|
384
|
+
header: t,
|
|
385
|
+
locked: t.column.columnDef.meta?.locked,
|
|
386
|
+
center: Ze,
|
|
387
|
+
allowUserGrouping: Q,
|
|
388
|
+
isLast: !I && o.index === g[g.length - 1]?.index,
|
|
389
|
+
className: S(
|
|
390
|
+
t.column.getCanSort() ? "cursor-pointer" : "cursor-grab",
|
|
391
|
+
"group",
|
|
392
|
+
{
|
|
393
|
+
"justify-start": a === "left",
|
|
394
|
+
"justify-end": a === "right"
|
|
395
|
+
}
|
|
396
|
+
),
|
|
397
|
+
useMenuDefaultMinWidth: Je,
|
|
398
|
+
children: [
|
|
399
|
+
a === "left" && /* @__PURE__ */ n(
|
|
400
|
+
_e,
|
|
401
|
+
{
|
|
402
|
+
showOnTruncation: !0,
|
|
403
|
+
message: t.column.columnDef.header,
|
|
404
|
+
position: "bottom",
|
|
405
|
+
children: /* @__PURE__ */ n($, { as: "p", addOverflow: !0, tall: !0, children: t.column.columnDef.header })
|
|
406
|
+
}
|
|
407
|
+
),
|
|
408
|
+
We(t.column.getIsSorted()),
|
|
409
|
+
!t.column.getIsSorted() && t.column.getCanSort() && !c.getState().columnSizingInfo.isResizingColumn && We(
|
|
410
|
+
t.column.getNextSortingOrder(),
|
|
411
|
+
!0
|
|
412
|
+
),
|
|
413
|
+
t.column.getSortIndex() !== -1 && c.getState().sorting.length > 1 && /* @__PURE__ */ n($, { tall: !0, children: t.column.getSortIndex() + 1 }),
|
|
414
|
+
a === "right" && /* @__PURE__ */ n(
|
|
415
|
+
_e,
|
|
416
|
+
{
|
|
417
|
+
showOnTruncation: !0,
|
|
418
|
+
message: t.column.columnDef.header,
|
|
419
|
+
position: "bottom",
|
|
420
|
+
children: /* @__PURE__ */ n($, { as: "p", addOverflow: !0, tall: !0, children: t.column.columnDef.header })
|
|
421
|
+
}
|
|
422
|
+
),
|
|
423
|
+
/* @__PURE__ */ n(
|
|
424
|
+
"div",
|
|
425
|
+
{
|
|
426
|
+
onDoubleClick: (m) => {
|
|
427
|
+
m.stopPropagation(), t.column.resetSize();
|
|
428
|
+
},
|
|
429
|
+
onMouseDown: (m) => {
|
|
430
|
+
m.stopPropagation(), t.getResizeHandler()(m);
|
|
431
|
+
},
|
|
432
|
+
onTouchStart: (m) => {
|
|
433
|
+
m.stopPropagation(), t.getResizeHandler()(m);
|
|
434
|
+
},
|
|
435
|
+
className: "absolute right-0 inset-y-0 w-4 cursor-col-resize",
|
|
436
|
+
children: /* @__PURE__ */ n("div", { className: "absolute right-0 inset-y-0 w-px bg-black pointer-events-none" })
|
|
437
|
+
}
|
|
438
|
+
)
|
|
439
|
+
]
|
|
440
|
+
},
|
|
441
|
+
t.id
|
|
442
|
+
);
|
|
443
|
+
}
|
|
444
|
+
return /* @__PURE__ */ n($t.Fragment, { children: t.column.columnDef.meta?.checkbox ? /* @__PURE__ */ n(
|
|
445
|
+
jt,
|
|
446
|
+
{
|
|
447
|
+
id: s ? `${s}-header-${t.id}` : void 0,
|
|
448
|
+
testid: l ? `${l}-header-${t.id}` : void 0,
|
|
449
|
+
type: "header",
|
|
450
|
+
component: "checkbox",
|
|
451
|
+
children: /* @__PURE__ */ n(
|
|
452
|
+
Mt,
|
|
453
|
+
{
|
|
454
|
+
id: s ? `${s}-select-all-checkbox` : void 0,
|
|
455
|
+
testid: l ? `${l}-select-all-checkbox` : void 0,
|
|
456
|
+
checked: ne,
|
|
457
|
+
indeterminate: bt,
|
|
458
|
+
onChange: xt
|
|
459
|
+
}
|
|
460
|
+
)
|
|
461
|
+
}
|
|
462
|
+
) : Ot(
|
|
463
|
+
t.column.columnDef.header,
|
|
464
|
+
t.getContext()
|
|
465
|
+
) }, t.id);
|
|
466
|
+
}
|
|
467
|
+
}),
|
|
468
|
+
I ? (
|
|
469
|
+
//fake empty column to the right for virtualization scroll padding
|
|
470
|
+
/* @__PURE__ */ n(
|
|
471
|
+
"th",
|
|
472
|
+
{
|
|
473
|
+
style: { display: "flex", width: I }
|
|
474
|
+
}
|
|
475
|
+
)
|
|
476
|
+
) : null
|
|
477
|
+
]
|
|
478
|
+
},
|
|
479
|
+
e.id
|
|
480
|
+
)) }),
|
|
481
|
+
/* @__PURE__ */ n(
|
|
482
|
+
to,
|
|
483
|
+
{
|
|
484
|
+
id: s,
|
|
485
|
+
testid: l,
|
|
486
|
+
columnVirtualizer: A,
|
|
487
|
+
table: c,
|
|
488
|
+
tableContainerRef: u,
|
|
489
|
+
virtualPaddingLeft: F,
|
|
490
|
+
virtualPaddingRight: I,
|
|
491
|
+
pagination: r,
|
|
492
|
+
isLoadingMore: L,
|
|
493
|
+
hasMore: V,
|
|
494
|
+
showFilterRow: K,
|
|
495
|
+
enableColumnSelector: he,
|
|
496
|
+
groupRowMode: J,
|
|
497
|
+
groupSelectionMode: X,
|
|
498
|
+
rowDisabled: Qe,
|
|
499
|
+
rowDisabledAccessor: Xe,
|
|
500
|
+
hoveredRowId: Y,
|
|
501
|
+
setHoveredRowId: U
|
|
502
|
+
}
|
|
503
|
+
),
|
|
504
|
+
x && /* @__PURE__ */ n(
|
|
505
|
+
oo,
|
|
506
|
+
{
|
|
507
|
+
id: s,
|
|
508
|
+
testid: l,
|
|
509
|
+
table: c,
|
|
510
|
+
summaryConfig: x,
|
|
511
|
+
filteredRows: le,
|
|
512
|
+
allRows: se,
|
|
513
|
+
totalRowCount: M,
|
|
514
|
+
locked: !1
|
|
515
|
+
}
|
|
516
|
+
)
|
|
517
|
+
] }),
|
|
518
|
+
/* @__PURE__ */ n(
|
|
519
|
+
je,
|
|
520
|
+
{
|
|
521
|
+
id: s,
|
|
522
|
+
enableColumnSelector: he,
|
|
523
|
+
toggleColumnVisibility: vt,
|
|
524
|
+
resetColumnVisibility: st,
|
|
525
|
+
testid: l,
|
|
526
|
+
pinDirection: "right",
|
|
527
|
+
table: c,
|
|
528
|
+
tableContainerRef: u,
|
|
529
|
+
pagination: r,
|
|
530
|
+
isLoadingMore: L,
|
|
531
|
+
hasMore: V,
|
|
532
|
+
showFilterRow: K,
|
|
533
|
+
groupRowMode: J,
|
|
534
|
+
groupSelectionMode: X,
|
|
535
|
+
allowUserGrouping: Q,
|
|
536
|
+
hoveredRowId: Y,
|
|
537
|
+
setHoveredRowId: U,
|
|
538
|
+
summaryRow: x,
|
|
539
|
+
filteredRows: le,
|
|
540
|
+
allRows: se,
|
|
541
|
+
totalRowCount: M
|
|
542
|
+
}
|
|
543
|
+
)
|
|
544
|
+
]
|
|
545
|
+
}
|
|
546
|
+
),
|
|
547
|
+
h && G && /* @__PURE__ */ d(
|
|
548
|
+
"div",
|
|
549
|
+
{
|
|
550
|
+
className: S(
|
|
551
|
+
Fe,
|
|
552
|
+
"flex flex-col items-center justify-center",
|
|
553
|
+
Le,
|
|
554
|
+
Ee
|
|
555
|
+
),
|
|
556
|
+
children: [
|
|
557
|
+
/* @__PURE__ */ n(de, { size: "large" }),
|
|
558
|
+
/* @__PURE__ */ n($, { color: "text-secondary-normal", children: Ye }),
|
|
559
|
+
ge && /* @__PURE__ */ n(w, { color: "text-secondary-normal", children: ge })
|
|
560
|
+
]
|
|
561
|
+
}
|
|
562
|
+
),
|
|
563
|
+
!h && G && /* @__PURE__ */ d(
|
|
564
|
+
"div",
|
|
565
|
+
{
|
|
566
|
+
className: S(
|
|
567
|
+
Fe,
|
|
568
|
+
"flex flex-col items-center justify-center",
|
|
569
|
+
Le,
|
|
570
|
+
Ee
|
|
571
|
+
),
|
|
572
|
+
"data-testid": l ? `${l}-no-results` : void 0,
|
|
573
|
+
children: [
|
|
574
|
+
/* @__PURE__ */ n(
|
|
575
|
+
"img",
|
|
576
|
+
{
|
|
577
|
+
src: Ae?.src ?? Ae,
|
|
578
|
+
alt: "No Results",
|
|
579
|
+
className: "h-30 opacity-20",
|
|
580
|
+
width: 120,
|
|
581
|
+
height: 120
|
|
582
|
+
}
|
|
583
|
+
),
|
|
584
|
+
/* @__PURE__ */ n($, { color: "text-secondary-normal", children: "No Results" }),
|
|
585
|
+
/* @__PURE__ */ n(w, { color: "text-secondary-normal", children: "To view results, enter or update your search criteria." })
|
|
586
|
+
]
|
|
587
|
+
}
|
|
588
|
+
),
|
|
589
|
+
!Ve && /* @__PURE__ */ d("div", { className: S("p-2 pt-[7px] border-t border-border-primary-normal min-h-[34px]", !y && "h-full"), children: [
|
|
590
|
+
r && /* @__PURE__ */ d("div", { className: "flex justify-between items-center", children: [
|
|
591
|
+
/* @__PURE__ */ n("div", { className: "flex items-center gap-1 w-min", children: h ? /* @__PURE__ */ d("div", { className: "flex items-center gap-2 whitespace-nowrap", children: [
|
|
592
|
+
/* @__PURE__ */ n(de, { size: "small" }),
|
|
593
|
+
/* @__PURE__ */ n(w, { children: D || "Loading..." })
|
|
594
|
+
] }) : /* @__PURE__ */ d(Nt, { children: [
|
|
595
|
+
/* @__PURE__ */ n(
|
|
596
|
+
Ft,
|
|
597
|
+
{
|
|
598
|
+
id: s ? `${s}-pagesize-select` : void 0,
|
|
599
|
+
testid: l ? `${l}-pagesize-select` : void 0,
|
|
600
|
+
wrapperClassName: "!w-20",
|
|
601
|
+
value: r.pageSize.toString(),
|
|
602
|
+
onChange: (e) => r.onPageSizeChange?.(Number(e.target.value)),
|
|
603
|
+
renderMenu: (e) => /* @__PURE__ */ n(
|
|
604
|
+
_t,
|
|
605
|
+
{
|
|
606
|
+
...e,
|
|
607
|
+
id: s ? `${s}-pagesize-menu` : void 0,
|
|
608
|
+
testid: l ? `${l}-pagesize-menu` : void 0,
|
|
609
|
+
children: co.map((o) => /* @__PURE__ */ n(
|
|
610
|
+
At,
|
|
611
|
+
{
|
|
612
|
+
id: s ? `${s}-pagesize-option-${o}` : void 0,
|
|
613
|
+
selected: r.pageSize === o,
|
|
614
|
+
onClick: () => r.onPageSizeChange?.(o),
|
|
615
|
+
children: o
|
|
616
|
+
},
|
|
617
|
+
o
|
|
618
|
+
))
|
|
619
|
+
}
|
|
620
|
+
)
|
|
621
|
+
}
|
|
622
|
+
),
|
|
623
|
+
/* @__PURE__ */ n(Wt, { children: "Per Page" })
|
|
624
|
+
] }) }),
|
|
625
|
+
/* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
|
|
626
|
+
/* @__PURE__ */ n(
|
|
627
|
+
Me,
|
|
628
|
+
{
|
|
629
|
+
id: s ? `${s}-prev-page-button` : void 0,
|
|
630
|
+
testid: l ? `${l}-prev-page-button` : void 0,
|
|
631
|
+
iconOnly: !0,
|
|
632
|
+
leftIcon: /* @__PURE__ */ n(Te, { name: "chevron_left" }),
|
|
633
|
+
onClick: () => r.onPageChange(r.pageIndex - 1),
|
|
634
|
+
variant: "tertiary",
|
|
635
|
+
disabled: r.pageIndex === 0
|
|
636
|
+
}
|
|
637
|
+
),
|
|
638
|
+
/* @__PURE__ */ d(w, { children: [
|
|
639
|
+
r.pageIndex * r.pageSize + 1,
|
|
640
|
+
" -",
|
|
641
|
+
" ",
|
|
642
|
+
Math.min(
|
|
643
|
+
(r.pageIndex + 1) * r.pageSize,
|
|
644
|
+
r.total
|
|
645
|
+
),
|
|
646
|
+
" ",
|
|
647
|
+
"of ",
|
|
648
|
+
r.total
|
|
649
|
+
] }),
|
|
650
|
+
/* @__PURE__ */ n(
|
|
651
|
+
Me,
|
|
652
|
+
{
|
|
653
|
+
id: s ? `${s}-next-page-button` : void 0,
|
|
654
|
+
testid: l ? `${l}-next-page-button` : void 0,
|
|
655
|
+
iconOnly: !0,
|
|
656
|
+
leftIcon: /* @__PURE__ */ n(Te, { name: "chevron_right" }),
|
|
657
|
+
onClick: () => r.onPageChange(r.pageIndex + 1),
|
|
658
|
+
variant: "tertiary",
|
|
659
|
+
disabled: (r.pageIndex + 1) * r.pageSize >= r.total
|
|
660
|
+
}
|
|
661
|
+
)
|
|
662
|
+
] })
|
|
663
|
+
] }),
|
|
664
|
+
!r && h && /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
|
|
665
|
+
/* @__PURE__ */ n(de, { size: "small" }),
|
|
666
|
+
/* @__PURE__ */ n(w, { testid: l ? `${l}-status-text` : void 0, children: D || "Loading..." })
|
|
667
|
+
] }),
|
|
668
|
+
!r && !h && D && /* @__PURE__ */ n(
|
|
669
|
+
w,
|
|
670
|
+
{
|
|
671
|
+
testid: l ? `${l}-status-text` : void 0,
|
|
672
|
+
children: D
|
|
673
|
+
}
|
|
674
|
+
)
|
|
675
|
+
] })
|
|
676
|
+
]
|
|
677
|
+
}
|
|
678
|
+
)
|
|
679
|
+
]
|
|
680
|
+
}
|
|
681
|
+
)
|
|
682
|
+
}
|
|
683
|
+
)
|
|
684
|
+
}
|
|
685
|
+
);
|
|
686
|
+
}
|
|
687
|
+
function P(s) {
|
|
688
|
+
return (v) => {
|
|
689
|
+
s(
|
|
690
|
+
(l) => typeof v == "function" ? v(l) : v
|
|
691
|
+
);
|
|
692
|
+
};
|
|
693
|
+
}
|
|
694
|
+
export {
|
|
695
|
+
Fo as DataGrid
|
|
696
|
+
};
|