@dmsi/wedgekit-react 2.0.0 → 2.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/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.js +78 -0
- package/dist/components/Breadcrumbs.js +111 -0
- package/dist/components/Button.js +137 -0
- package/dist/components/CalendarRange.d.ts.map +1 -1
- package/dist/components/CalendarRange.js +406 -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 +121 -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.d.ts.map +1 -1
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +28 -0
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.d.ts.map +1 -1
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +80 -0
- package/dist/components/DataGrid/PinnedColumns.js +165 -0
- package/dist/components/DataGrid/SummaryRow/SummaryCell.js +51 -0
- package/dist/components/DataGrid/SummaryRow/aggregations.js +55 -0
- package/dist/components/DataGrid/SummaryRow/index.js +86 -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.js +136 -0
- package/dist/components/DataGrid/TableBody/index.js +161 -0
- package/dist/components/DataGrid/index.js +696 -0
- package/dist/components/DataGrid/utils.js +20 -0
- package/dist/components/DataGridCell.js +412 -0
- package/dist/components/DataTable.js +700 -0
- package/dist/components/DateInput.d.ts.map +1 -1
- package/dist/components/DateInput.js +194 -0
- package/dist/components/DateRangeInput.d.ts.map +1 -1
- package/dist/components/DateRangeInput.js +369 -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.d.ts.map +1 -1
- package/dist/components/EmblaCarousel/index.js +154 -0
- package/dist/components/EmblaCarousel/usePrevNextButtons.d.ts.map +1 -1
- package/dist/components/EmblaCarousel/usePrevNextButtons.js +22 -0
- package/dist/components/EmblaCarousel/useSelectedSnapDisplay.d.ts.map +1 -1
- package/dist/components/EmblaCarousel/useSelectedSnapDisplay.js +16 -0
- package/dist/components/EmptyCartIcon.js +25 -0
- 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.js +73 -0
- package/dist/components/ImagePlaceholder.d.ts.map +1 -1
- package/dist/components/ImagePlaceholder.js +23 -0
- 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 +55 -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.js +202 -0
- package/dist/components/MenuOption.js +161 -0
- package/dist/components/MobileDataGrid/ColumnList.js +85 -0
- package/dist/components/MobileDataGrid/ColumnSelector/index.d.ts.map +1 -1
- package/dist/components/MobileDataGrid/ColumnSelector/index.js +101 -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.d.ts.map +1 -1
- package/dist/components/MobileDataGrid/GridContextProvider/index.js +81 -0
- package/dist/components/MobileDataGrid/GridContextProvider/useGridContext.d.ts.map +1 -1
- package/dist/components/MobileDataGrid/GridContextProvider/useGridContext.js +12 -0
- package/dist/components/MobileDataGrid/MobileDataGridCard/MobileDataGridColumn.js +18 -0
- package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +130 -0
- package/dist/components/MobileDataGrid/MobileDataGridHeader.js +67 -0
- package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +42 -0
- package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +58 -0
- package/dist/components/MobileDataGrid/dataGridReducer.js +28 -0
- package/dist/components/MobileDataGrid/index.js +78 -0
- package/dist/components/MobileNavMenu.js +173 -0
- package/dist/components/Modal.js +201 -0
- package/dist/components/ModalButtons.js +57 -0
- 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.js +119 -0
- package/dist/components/Notification.js +91 -0
- 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.js +124 -0
- 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.map +1 -1
- package/dist/components/ProductImagePreview/MobileImageCarousel.js +147 -0
- package/dist/components/ProductImagePreview/ProductPrimaryImage.d.ts.map +1 -1
- package/dist/components/ProductImagePreview/ProductPrimaryImage.js +139 -0
- package/dist/components/ProductImagePreview/Thumbnail.d.ts.map +1 -1
- package/dist/components/ProductImagePreview/Thumbnail.js +47 -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 +190 -0
- package/dist/components/ProductImagePreview/useProductImagePreview.d.ts.map +1 -1
- package/dist/components/ProductImagePreview/useProductImagePreview.js +86 -0
- 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.d.ts.map +1 -1
- package/dist/components/SearchResultImage/index.js +27 -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.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.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.js +25 -0
- package/dist/components/Time.d.ts.map +1 -1
- package/dist/components/Time.js +226 -0
- package/dist/components/Toast.js +170 -0
- package/dist/components/Tooltip.js +102 -0
- package/dist/components/TopBar.js +119 -0
- package/dist/components/Upload.js +107 -0
- package/dist/components/WorldpayIframe.js +19 -0
- package/dist/hooks/useEditCell.d.ts.map +1 -1
- package/dist/hooks/useEditCell.js +24 -0
- package/dist/hooks/useInfiniteScroll.js +25 -0
- package/dist/hooks/useKeydown.d.ts.map +1 -1
- package/dist/hooks/useKeydown.js +21 -0
- package/dist/hooks/useMatchesMedia.d.ts.map +1 -1
- package/dist/hooks/useMatchesMedia.js +16 -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 -53839
- 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/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.d.ts +1 -1
- 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,700 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as t, jsxs as i } from "react/jsx-runtime";
|
|
3
|
+
import T, { createContext as F, useState as h, useContext as E } from "react";
|
|
4
|
+
import { useReactTable as z, flexRender as $ } from "../node_modules/@tanstack/react-table/build/lib/index.js";
|
|
5
|
+
import { clsx as g } from "../node_modules/clsx/dist/clsx.js";
|
|
6
|
+
import { useSensors as O, useSensor as P, KeyboardSensor as A, TouchSensor as H, MouseSensor as _, DndContext as L, closestCenter as B } from "../node_modules/@dnd-kit/core/dist/core.esm.js";
|
|
7
|
+
import { restrictToHorizontalAxis as J } from "../node_modules/@dnd-kit/modifiers/dist/modifiers.esm.js";
|
|
8
|
+
import { SortableContext as R, horizontalListSortingStrategy as D, arrayMove as Q, useSortable as V } from "../node_modules/@dnd-kit/sortable/dist/sortable.esm.js";
|
|
9
|
+
import { CSS as K } from "../node_modules/@dnd-kit/utilities/dist/utilities.esm.js";
|
|
10
|
+
import { getPaginationRowModel as U, getSortedRowModel as X, getFilteredRowModel as q, getCoreRowModel as G } from "../node_modules/@tanstack/table-core/build/lib/index.js";
|
|
11
|
+
import { Switch as W } from "../node_modules/@headlessui/react/dist/components/switch/switch.js";
|
|
12
|
+
const k = [
|
|
13
|
+
{
|
|
14
|
+
header: "Order ID",
|
|
15
|
+
accessorKey: "orderId",
|
|
16
|
+
id: "orderId",
|
|
17
|
+
meta: {
|
|
18
|
+
sticky: !0
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
header: "Actions",
|
|
23
|
+
id: "actions",
|
|
24
|
+
cell: () => /* @__PURE__ */ t("div", { className: "flex flex-row gap-3", children: [
|
|
25
|
+
{
|
|
26
|
+
label: "Release",
|
|
27
|
+
icon: /* @__PURE__ */ t("i", { className: "w-3 h-3" })
|
|
28
|
+
},
|
|
29
|
+
{ label: "XML", icon: /* @__PURE__ */ t("i", { className: "w-3 h-3" }) },
|
|
30
|
+
{ label: "Copy", icon: /* @__PURE__ */ t("i", { className: "w-3 h-3" }) },
|
|
31
|
+
{ label: "Quote", icon: /* @__PURE__ */ t("i", { className: "w-3 h-3" }) },
|
|
32
|
+
{ label: "Retail", icon: /* @__PURE__ */ t("i", { className: "w-3 h-3" }) }
|
|
33
|
+
].map((r, s) => /* @__PURE__ */ i(
|
|
34
|
+
"div",
|
|
35
|
+
{
|
|
36
|
+
className: "flex flex-col items-center justify-center gap-1",
|
|
37
|
+
children: [
|
|
38
|
+
r.icon,
|
|
39
|
+
/* @__PURE__ */ t("span", { className: "text-[0.6rem] block text-neutral-500 font-semibold", children: r.label })
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
s
|
|
43
|
+
)) })
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
header: "PO ID",
|
|
47
|
+
accessorKey: "poId",
|
|
48
|
+
id: "poId"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
header: "Job ID",
|
|
52
|
+
accessorKey: "jobId",
|
|
53
|
+
id: "jobId"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
header: "Reference",
|
|
57
|
+
accessorKey: "reference",
|
|
58
|
+
id: "reference",
|
|
59
|
+
meta: {
|
|
60
|
+
className: "hidden md:table-cell"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
header: "Status",
|
|
65
|
+
accessorKey: "shipToStatus",
|
|
66
|
+
id: "shipToStatus",
|
|
67
|
+
meta: {
|
|
68
|
+
filterVariant: "select"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
header: "Ordered date",
|
|
73
|
+
accessorKey: "orderedDate",
|
|
74
|
+
id: "orderedDate"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
header: "Reference 1",
|
|
78
|
+
accessorKey: "reference1",
|
|
79
|
+
id: "reference1",
|
|
80
|
+
meta: { className: "hidden md:table-cell" }
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
header: "Reference 12",
|
|
84
|
+
accessorKey: "reference12",
|
|
85
|
+
id: "reference12",
|
|
86
|
+
meta: { className: "hidden md:table-cell" }
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
header: "Reference 13",
|
|
90
|
+
accessorKey: "reference13",
|
|
91
|
+
id: "reference13",
|
|
92
|
+
meta: { className: "hidden md:table-cell" }
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
header: "Reference 14",
|
|
96
|
+
accessorKey: "reference14",
|
|
97
|
+
id: "reference14",
|
|
98
|
+
meta: { className: "hidden md:table-cell" }
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
header: "Reference 15",
|
|
102
|
+
accessorKey: "reference15",
|
|
103
|
+
id: "reference15",
|
|
104
|
+
meta: { className: "hidden md:table-cell" }
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
header: "Reference 16",
|
|
108
|
+
accessorKey: "reference16",
|
|
109
|
+
id: "reference16",
|
|
110
|
+
meta: { className: "hidden md:table-cell" }
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
header: "Reference 17",
|
|
114
|
+
accessorKey: "reference17",
|
|
115
|
+
id: "reference17",
|
|
116
|
+
meta: { className: "hidden md:table-cell" }
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
header: "Reference 18",
|
|
120
|
+
accessorKey: "reference18",
|
|
121
|
+
id: "reference18",
|
|
122
|
+
meta: { className: "hidden md:table-cell" }
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
header: "Reference 19",
|
|
126
|
+
accessorKey: "reference19",
|
|
127
|
+
id: "reference19",
|
|
128
|
+
meta: { className: "hidden md:table-cell" }
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
header: "Reference 10",
|
|
132
|
+
accessorKey: "reference10",
|
|
133
|
+
id: "reference10",
|
|
134
|
+
meta: { className: "hidden md:table-cell" }
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
header: "Reference 11",
|
|
138
|
+
accessorKey: "reference11",
|
|
139
|
+
id: "reference11",
|
|
140
|
+
meta: { className: "hidden md:table-cell" }
|
|
141
|
+
}
|
|
142
|
+
], M = F({
|
|
143
|
+
data: [],
|
|
144
|
+
setValue: (e, r, s) => {
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
function Y({ data: e, children: r }) {
|
|
148
|
+
const [s, d] = h(e), l = {
|
|
149
|
+
data: s,
|
|
150
|
+
setValue: (c, u, p) => {
|
|
151
|
+
d((b) => {
|
|
152
|
+
const f = [...b];
|
|
153
|
+
return f[c] = {
|
|
154
|
+
...f[c],
|
|
155
|
+
[u]: p
|
|
156
|
+
}, f;
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
return /* @__PURE__ */ t(M.Provider, { value: l, children: r });
|
|
161
|
+
}
|
|
162
|
+
function fe({ id: e, data: r }) {
|
|
163
|
+
return /* @__PURE__ */ t(Y, { data: r, children: /* @__PURE__ */ t(te, { id: e }) });
|
|
164
|
+
}
|
|
165
|
+
function Z({
|
|
166
|
+
header: e,
|
|
167
|
+
id: r
|
|
168
|
+
}) {
|
|
169
|
+
const { attributes: s, isDragging: d, listeners: l, setNodeRef: c, transform: u } = V({
|
|
170
|
+
id: e.column.id
|
|
171
|
+
}), p = {
|
|
172
|
+
opacity: d ? 0.8 : 1,
|
|
173
|
+
position: "relative",
|
|
174
|
+
transform: K.Translate.toString(u),
|
|
175
|
+
transition: "width transform 0.2s ease-in-out",
|
|
176
|
+
whiteSpace: "nowrap",
|
|
177
|
+
width: e.column.getSize(),
|
|
178
|
+
zIndex: d ? 1 : 0
|
|
179
|
+
};
|
|
180
|
+
return /* @__PURE__ */ t(
|
|
181
|
+
"th",
|
|
182
|
+
{
|
|
183
|
+
id: r,
|
|
184
|
+
colSpan: e.colSpan,
|
|
185
|
+
ref: c,
|
|
186
|
+
style: p,
|
|
187
|
+
className: g(
|
|
188
|
+
e.column.columnDef.meta?.className,
|
|
189
|
+
"px-3 py-3.5 text-left text-sm font-semibold text-dmsi-white bg-dmsi-red ",
|
|
190
|
+
{
|
|
191
|
+
"sticky left-0": e.column.columnDef.meta?.sticky ?? !1
|
|
192
|
+
}
|
|
193
|
+
),
|
|
194
|
+
children: e.isPlaceholder ? null : /* @__PURE__ */ i("div", { className: "flex space-x-1 justify-start items-center", children: [
|
|
195
|
+
/* @__PURE__ */ t(
|
|
196
|
+
"button",
|
|
197
|
+
{
|
|
198
|
+
id: r ? `${r}-drag-handle` : void 0,
|
|
199
|
+
className: "cursor-grab shrink-0",
|
|
200
|
+
...s,
|
|
201
|
+
...l,
|
|
202
|
+
children: /* @__PURE__ */ t("i", { className: "w-3 h-3" })
|
|
203
|
+
}
|
|
204
|
+
),
|
|
205
|
+
/* @__PURE__ */ i(
|
|
206
|
+
"div",
|
|
207
|
+
{
|
|
208
|
+
className: g(
|
|
209
|
+
"grow",
|
|
210
|
+
e.column.getCanSort() ? "cursor-pointer select-none" : "",
|
|
211
|
+
"flex flex-col gap-1 justify-between items-start"
|
|
212
|
+
),
|
|
213
|
+
title: e.column.getCanSort() ? e.column.getNextSortingOrder() === "asc" ? "Sort ascending" : e.column.getNextSortingOrder() === "desc" ? "Sort descending" : "Clear sort" : void 0,
|
|
214
|
+
children: [
|
|
215
|
+
/* @__PURE__ */ t("div", { children: $(e.column.columnDef.header, e.getContext()) }),
|
|
216
|
+
/* @__PURE__ */ t("div", { children: e.column.getCanFilter() ? /* @__PURE__ */ t(
|
|
217
|
+
I,
|
|
218
|
+
{
|
|
219
|
+
id: r ? `${r}-filter` : void 0,
|
|
220
|
+
column: e.column
|
|
221
|
+
}
|
|
222
|
+
) : /* @__PURE__ */ t("div", { className: "invisible", children: /* @__PURE__ */ t(
|
|
223
|
+
I,
|
|
224
|
+
{
|
|
225
|
+
id: r ? `${r}-filter` : void 0,
|
|
226
|
+
column: e.column
|
|
227
|
+
}
|
|
228
|
+
) }) })
|
|
229
|
+
]
|
|
230
|
+
}
|
|
231
|
+
),
|
|
232
|
+
/* @__PURE__ */ t(
|
|
233
|
+
"div",
|
|
234
|
+
{
|
|
235
|
+
id: r ? `${r}-sort-button` : void 0,
|
|
236
|
+
className: "shrink-0 cursor-pointer",
|
|
237
|
+
onClick: e.column.getToggleSortingHandler(),
|
|
238
|
+
children: {
|
|
239
|
+
asc: /* @__PURE__ */ t("i", { className: "w-3 h-3" }),
|
|
240
|
+
desc: /* @__PURE__ */ t("i", { className: "w-3 h-3" })
|
|
241
|
+
}[e.column.getIsSorted()] ?? /* @__PURE__ */ t("i", { className: "w-3 h-3" })
|
|
242
|
+
}
|
|
243
|
+
)
|
|
244
|
+
] })
|
|
245
|
+
}
|
|
246
|
+
);
|
|
247
|
+
}
|
|
248
|
+
function ee({
|
|
249
|
+
cell: e,
|
|
250
|
+
setValue: r,
|
|
251
|
+
id: s
|
|
252
|
+
}) {
|
|
253
|
+
const { isDragging: d, setNodeRef: l, transform: c } = V({
|
|
254
|
+
id: e.column.id
|
|
255
|
+
}), u = {
|
|
256
|
+
opacity: d ? 0.8 : 1,
|
|
257
|
+
position: "relative",
|
|
258
|
+
transform: K.Translate.toString(c),
|
|
259
|
+
transition: "width transform 0.2s ease-in-out",
|
|
260
|
+
width: e.column.getSize(),
|
|
261
|
+
zIndex: d ? 1 : 0
|
|
262
|
+
};
|
|
263
|
+
return /* @__PURE__ */ t(
|
|
264
|
+
re,
|
|
265
|
+
{
|
|
266
|
+
id: s,
|
|
267
|
+
ref: l,
|
|
268
|
+
style: u,
|
|
269
|
+
cell: e,
|
|
270
|
+
className: g(
|
|
271
|
+
e.column.columnDef.meta?.className ?? "",
|
|
272
|
+
"text-sm whitespace-nowrap text-gray-900 bg-neutral-100",
|
|
273
|
+
{
|
|
274
|
+
"sticky left-0": e.column.columnDef.meta?.sticky ?? !1
|
|
275
|
+
}
|
|
276
|
+
),
|
|
277
|
+
setValue: r
|
|
278
|
+
}
|
|
279
|
+
);
|
|
280
|
+
}
|
|
281
|
+
function te({ id: e }) {
|
|
282
|
+
const { data: r, setValue: s } = E(M), [d, l] = T.useState(
|
|
283
|
+
() => k.map((n) => n.id)
|
|
284
|
+
), [c, u] = h({
|
|
285
|
+
pageIndex: 0,
|
|
286
|
+
pageSize: 10
|
|
287
|
+
}), [p, b] = h(
|
|
288
|
+
k.reduce(
|
|
289
|
+
(n, o) => ("accessorKey" in o && (n[o.accessorKey] = !0), n),
|
|
290
|
+
{}
|
|
291
|
+
)
|
|
292
|
+
), [f, y] = h([]), [N, C] = h([]), a = z({
|
|
293
|
+
columns: k,
|
|
294
|
+
data: r,
|
|
295
|
+
debugAll: !0,
|
|
296
|
+
getCoreRowModel: G(),
|
|
297
|
+
getFilteredRowModel: q(),
|
|
298
|
+
getSortedRowModel: X(),
|
|
299
|
+
getPaginationRowModel: U(),
|
|
300
|
+
onSortingChange: y,
|
|
301
|
+
onColumnFiltersChange: C,
|
|
302
|
+
onPaginationChange: u,
|
|
303
|
+
onColumnVisibilityChange: b,
|
|
304
|
+
onColumnOrderChange: l,
|
|
305
|
+
state: {
|
|
306
|
+
sorting: f,
|
|
307
|
+
columnFilters: N,
|
|
308
|
+
pagination: c,
|
|
309
|
+
columnVisibility: p,
|
|
310
|
+
columnOrder: d
|
|
311
|
+
}
|
|
312
|
+
});
|
|
313
|
+
function v(n) {
|
|
314
|
+
const { active: o, over: x } = n;
|
|
315
|
+
o && x && o.id !== x.id && l((m) => {
|
|
316
|
+
const w = m.indexOf(o.id), j = m.indexOf(x.id);
|
|
317
|
+
return Q(m, w, j);
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
const S = O(
|
|
321
|
+
P(_, {}),
|
|
322
|
+
P(H, {}),
|
|
323
|
+
P(A, {})
|
|
324
|
+
);
|
|
325
|
+
return /* @__PURE__ */ t(
|
|
326
|
+
L,
|
|
327
|
+
{
|
|
328
|
+
collisionDetection: B,
|
|
329
|
+
modifiers: [J],
|
|
330
|
+
onDragEnd: v,
|
|
331
|
+
sensors: S,
|
|
332
|
+
children: /* @__PURE__ */ i("div", { id: e, children: [
|
|
333
|
+
/* @__PURE__ */ i(
|
|
334
|
+
"div",
|
|
335
|
+
{
|
|
336
|
+
id: e ? `${e}-column-visibility` : void 0,
|
|
337
|
+
className: "border border-gray-300 rounded p-3 m-4 max-w-xl min-w-0",
|
|
338
|
+
children: [
|
|
339
|
+
/* @__PURE__ */ t("p", { className: "mb-3 font-semibold", children: "Show/Hide Columns" }),
|
|
340
|
+
/* @__PURE__ */ t("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-2", children: a.getAllColumns().map((n) => /* @__PURE__ */ i(
|
|
341
|
+
"label",
|
|
342
|
+
{
|
|
343
|
+
className: "cursor-pointer flex flex-row items-center space-x-1",
|
|
344
|
+
children: [
|
|
345
|
+
/* @__PURE__ */ t(
|
|
346
|
+
ne,
|
|
347
|
+
{
|
|
348
|
+
id: e ? `${e}-toggle-${n.id}` : void 0,
|
|
349
|
+
enabled: n.getIsVisible(),
|
|
350
|
+
onToggle: (o) => n.getToggleVisibilityHandler()({
|
|
351
|
+
target: { checked: o }
|
|
352
|
+
})
|
|
353
|
+
}
|
|
354
|
+
),
|
|
355
|
+
/* @__PURE__ */ t("span", { className: "block", children: n.columnDef.header })
|
|
356
|
+
]
|
|
357
|
+
},
|
|
358
|
+
n.id
|
|
359
|
+
)) })
|
|
360
|
+
]
|
|
361
|
+
}
|
|
362
|
+
),
|
|
363
|
+
/* @__PURE__ */ t("div", { className: "overflow-x-scroll scrollbar-thin", children: /* @__PURE__ */ i("table", { className: "min-w-full divide-x divide-neutral-500", children: [
|
|
364
|
+
/* @__PURE__ */ t("thead", { children: a.getHeaderGroups().map((n) => /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t(
|
|
365
|
+
R,
|
|
366
|
+
{
|
|
367
|
+
items: d,
|
|
368
|
+
strategy: D,
|
|
369
|
+
children: n.headers.map((o) => /* @__PURE__ */ t(
|
|
370
|
+
Z,
|
|
371
|
+
{
|
|
372
|
+
id: e ? `${e}-header-${o.id}` : void 0,
|
|
373
|
+
header: o
|
|
374
|
+
},
|
|
375
|
+
o.id
|
|
376
|
+
))
|
|
377
|
+
}
|
|
378
|
+
) }, n.id)) }),
|
|
379
|
+
/* @__PURE__ */ t("tbody", { children: a.getRowModel().rows.map((n) => /* @__PURE__ */ t(
|
|
380
|
+
"tr",
|
|
381
|
+
{
|
|
382
|
+
className: "bg-neutral-100 divide-y divide-neutral-200",
|
|
383
|
+
children: n.getVisibleCells().map((o) => /* @__PURE__ */ t(
|
|
384
|
+
R,
|
|
385
|
+
{
|
|
386
|
+
items: d,
|
|
387
|
+
strategy: D,
|
|
388
|
+
children: /* @__PURE__ */ t(
|
|
389
|
+
ee,
|
|
390
|
+
{
|
|
391
|
+
id: e ? `${e}-cell-${o.id}` : void 0,
|
|
392
|
+
cell: o,
|
|
393
|
+
setValue: s
|
|
394
|
+
},
|
|
395
|
+
o.id
|
|
396
|
+
)
|
|
397
|
+
},
|
|
398
|
+
o.id
|
|
399
|
+
))
|
|
400
|
+
},
|
|
401
|
+
n.id
|
|
402
|
+
)) })
|
|
403
|
+
] }) }),
|
|
404
|
+
/* @__PURE__ */ i(
|
|
405
|
+
"div",
|
|
406
|
+
{
|
|
407
|
+
id: e ? `${e}-pagination` : void 0,
|
|
408
|
+
className: "flex flex-col gap-6 md:flex-row items-center md:gap-2 w-full justify-between p-2",
|
|
409
|
+
children: [
|
|
410
|
+
/* @__PURE__ */ i("div", { className: "flex flex-row items-center", children: [
|
|
411
|
+
/* @__PURE__ */ t(
|
|
412
|
+
"button",
|
|
413
|
+
{
|
|
414
|
+
id: e ? `${e}-first-page` : void 0,
|
|
415
|
+
className: g(
|
|
416
|
+
"group flex items-center justify-center h-8 w-8 border border-gray-500/50 text-gray-700 rounded p-1 hover:bg-dmsi-blue hover:text-white transition-colors cursor-pointer border-r-0 rounded-r-none",
|
|
417
|
+
{
|
|
418
|
+
"pointer-events-none": !a.getCanPreviousPage()
|
|
419
|
+
}
|
|
420
|
+
),
|
|
421
|
+
onClick: () => a.setPageIndex(0),
|
|
422
|
+
disabled: !a.getCanPreviousPage(),
|
|
423
|
+
children: /* @__PURE__ */ t("i", { className: "w-4 h-4 group-disabled:stroke-gray-400" })
|
|
424
|
+
}
|
|
425
|
+
),
|
|
426
|
+
/* @__PURE__ */ t(
|
|
427
|
+
"button",
|
|
428
|
+
{
|
|
429
|
+
id: e ? `${e}-prev-page` : void 0,
|
|
430
|
+
className: g(
|
|
431
|
+
"-mr-px group flex items-center justify-center h-8 w-8 border border-gray-500/50 text-gray-700 p-1 hover:bg-dmsi-blue hover:text-white transition-colors cursor-pointer",
|
|
432
|
+
{
|
|
433
|
+
"pointer-events-none": !a.getCanPreviousPage()
|
|
434
|
+
}
|
|
435
|
+
),
|
|
436
|
+
onClick: () => a.previousPage(),
|
|
437
|
+
disabled: !a.getCanPreviousPage(),
|
|
438
|
+
children: /* @__PURE__ */ t("i", { className: "w-4 h-4 group-disabled:stroke-gray-400" })
|
|
439
|
+
}
|
|
440
|
+
),
|
|
441
|
+
Array.from({ length: Math.min(5, a.getPageCount()) }).map(
|
|
442
|
+
(n, o) => {
|
|
443
|
+
const x = a.getState().pagination.pageIndex, m = x - 2 + o, w = m === x;
|
|
444
|
+
return m < 0 || m > a.getPageCount() - 1 ? null : /* @__PURE__ */ t(
|
|
445
|
+
"button",
|
|
446
|
+
{
|
|
447
|
+
id: e ? `${e}-page-${m + 1}` : void 0,
|
|
448
|
+
className: g(
|
|
449
|
+
"group h-8 w-8 border-y border-gray-500/50 text-gray-700 p-1 hover:bg-dmsi-blue hover:text-white transition-colors cursor-pointer flex items-center justify-center",
|
|
450
|
+
{
|
|
451
|
+
"bg-neutral-200 border-x": w,
|
|
452
|
+
"border-r-0": !w
|
|
453
|
+
}
|
|
454
|
+
),
|
|
455
|
+
onClick: () => a.setPageIndex(m),
|
|
456
|
+
children: /* @__PURE__ */ t("span", { className: g({}), children: m + 1 })
|
|
457
|
+
},
|
|
458
|
+
o
|
|
459
|
+
);
|
|
460
|
+
}
|
|
461
|
+
),
|
|
462
|
+
/* @__PURE__ */ t(
|
|
463
|
+
"button",
|
|
464
|
+
{
|
|
465
|
+
id: e ? `${e}-next-page` : void 0,
|
|
466
|
+
className: g(
|
|
467
|
+
"-ml-px group flex items-center justify-center h-8 w-8 border border-gray-500/50 text-gray-700 p-1 hover:bg-dmsi-blue hover:text-white transition-colors cursor-pointer border-r-0 group",
|
|
468
|
+
{
|
|
469
|
+
"pointer-events-none": !a.getCanNextPage()
|
|
470
|
+
}
|
|
471
|
+
),
|
|
472
|
+
onClick: () => a.nextPage(),
|
|
473
|
+
disabled: !a.getCanNextPage(),
|
|
474
|
+
children: /* @__PURE__ */ t("i", { className: "w-4 h-4 group-disabled:stroke-gray-400 " })
|
|
475
|
+
}
|
|
476
|
+
),
|
|
477
|
+
/* @__PURE__ */ t(
|
|
478
|
+
"button",
|
|
479
|
+
{
|
|
480
|
+
id: e ? `${e}-last-page` : void 0,
|
|
481
|
+
className: g(
|
|
482
|
+
"group flex items-center justify-center h-8 w-8 border border-gray-500/50 text-gray-700 rounded rounded-l-none p-1 hover:bg-dmsi-blue hover:text-white transition-colors cursor-pointer",
|
|
483
|
+
{
|
|
484
|
+
"pointer-events-none": !a.getCanNextPage()
|
|
485
|
+
}
|
|
486
|
+
),
|
|
487
|
+
onClick: () => a.setPageIndex(a.getPageCount() - 1),
|
|
488
|
+
disabled: !a.getCanNextPage(),
|
|
489
|
+
children: /* @__PURE__ */ t("i", { className: "w-4 h-4 group-disabled:stroke-gray-400" })
|
|
490
|
+
}
|
|
491
|
+
)
|
|
492
|
+
] }),
|
|
493
|
+
/* @__PURE__ */ i("div", { className: "flex flex-row items-center gap-6", children: [
|
|
494
|
+
/* @__PURE__ */ i("span", { className: "flex items-center gap-1", children: [
|
|
495
|
+
/* @__PURE__ */ t("div", { children: "Page" }),
|
|
496
|
+
/* @__PURE__ */ i("strong", { children: [
|
|
497
|
+
a.getState().pagination.pageIndex + 1,
|
|
498
|
+
" of",
|
|
499
|
+
" ",
|
|
500
|
+
a.getPageCount()
|
|
501
|
+
] })
|
|
502
|
+
] }),
|
|
503
|
+
/* @__PURE__ */ i("span", { className: "flex items-center gap-2", children: [
|
|
504
|
+
"Page:",
|
|
505
|
+
/* @__PURE__ */ t(
|
|
506
|
+
"input",
|
|
507
|
+
{
|
|
508
|
+
id: e ? `${e}-page-input` : void 0,
|
|
509
|
+
type: "number",
|
|
510
|
+
min: "1",
|
|
511
|
+
max: a.getPageCount(),
|
|
512
|
+
defaultValue: a.getState().pagination.pageIndex + 1,
|
|
513
|
+
onChange: (n) => {
|
|
514
|
+
const o = n.target.value ? Number(n.target.value) - 1 : 0;
|
|
515
|
+
a.setPageIndex(o);
|
|
516
|
+
},
|
|
517
|
+
className: "border border-gray-500 px-2 py-1 rounded w-16"
|
|
518
|
+
}
|
|
519
|
+
)
|
|
520
|
+
] })
|
|
521
|
+
] }),
|
|
522
|
+
/* @__PURE__ */ t(
|
|
523
|
+
"select",
|
|
524
|
+
{
|
|
525
|
+
id: e ? `${e}-pagesize-select` : void 0,
|
|
526
|
+
className: "border border-gray-500 px-2 py-1 rounded",
|
|
527
|
+
value: a.getState().pagination.pageSize,
|
|
528
|
+
onChange: (n) => {
|
|
529
|
+
a.setPageSize(Number(n.target.value));
|
|
530
|
+
},
|
|
531
|
+
children: [10, 20, 30, 40, 50].map((n) => /* @__PURE__ */ i("option", { value: n, children: [
|
|
532
|
+
"Show ",
|
|
533
|
+
n
|
|
534
|
+
] }, n))
|
|
535
|
+
}
|
|
536
|
+
)
|
|
537
|
+
]
|
|
538
|
+
}
|
|
539
|
+
)
|
|
540
|
+
] })
|
|
541
|
+
}
|
|
542
|
+
);
|
|
543
|
+
}
|
|
544
|
+
function re({
|
|
545
|
+
className: e,
|
|
546
|
+
cell: r,
|
|
547
|
+
setValue: s,
|
|
548
|
+
style: d,
|
|
549
|
+
ref: l,
|
|
550
|
+
id: c
|
|
551
|
+
}) {
|
|
552
|
+
const [u, p] = h(!1), b = r.getValue(), f = typeof b == "string", [y, N] = h(f ? b : ""), C = () => {
|
|
553
|
+
f && p(!0);
|
|
554
|
+
}, a = (n) => {
|
|
555
|
+
N(n.target.value);
|
|
556
|
+
}, v = () => {
|
|
557
|
+
s(r.row.index, r.column.id, y), p(!1);
|
|
558
|
+
}, S = (n) => {
|
|
559
|
+
n.key === "Enter" && v();
|
|
560
|
+
};
|
|
561
|
+
return /* @__PURE__ */ i(
|
|
562
|
+
"td",
|
|
563
|
+
{
|
|
564
|
+
id: c,
|
|
565
|
+
className: g(
|
|
566
|
+
e,
|
|
567
|
+
r.column.columnDef.meta?.className ?? "",
|
|
568
|
+
"px-2 py-3 text-sm whitespace-nowrap text-gray-500"
|
|
569
|
+
),
|
|
570
|
+
style: d,
|
|
571
|
+
ref: l,
|
|
572
|
+
children: [
|
|
573
|
+
f && u && /* @__PURE__ */ i("div", { className: "flex flex-row gap-1", children: [
|
|
574
|
+
/* @__PURE__ */ t(
|
|
575
|
+
"input",
|
|
576
|
+
{
|
|
577
|
+
id: c ? `${c}-input` : void 0,
|
|
578
|
+
type: "text",
|
|
579
|
+
value: y,
|
|
580
|
+
onChange: a,
|
|
581
|
+
onKeyUp: S,
|
|
582
|
+
onBlur: v,
|
|
583
|
+
className: "border px-2 py-0.5 rounded inline min-w-0 shrink border-neutral-400 focus:outline-neutral-300 bg-white"
|
|
584
|
+
}
|
|
585
|
+
),
|
|
586
|
+
/* @__PURE__ */ t(
|
|
587
|
+
"button",
|
|
588
|
+
{
|
|
589
|
+
id: c ? `${c}-save-button` : void 0,
|
|
590
|
+
onClick: v,
|
|
591
|
+
className: "border cursor-pointer px-2 py-0.5 rounded flex items-center justify-center w-12 border-dmsi-blue text-dmsi-blue bg-white",
|
|
592
|
+
children: "Save"
|
|
593
|
+
}
|
|
594
|
+
)
|
|
595
|
+
] }),
|
|
596
|
+
!u && /* @__PURE__ */ i(
|
|
597
|
+
"div",
|
|
598
|
+
{
|
|
599
|
+
onClick: C,
|
|
600
|
+
className: "px-2 py-1 flex flex-row items-center",
|
|
601
|
+
children: [
|
|
602
|
+
$(r.column.columnDef.cell, r.getContext()),
|
|
603
|
+
/* @__PURE__ */ t("div", { className: "w-16" })
|
|
604
|
+
]
|
|
605
|
+
}
|
|
606
|
+
)
|
|
607
|
+
]
|
|
608
|
+
},
|
|
609
|
+
r.id
|
|
610
|
+
);
|
|
611
|
+
}
|
|
612
|
+
function I({ column: e, id: r }) {
|
|
613
|
+
const s = e.getFilterValue(), { filterVariant: d } = e.columnDef.meta ?? {};
|
|
614
|
+
return d === "range" ? /* @__PURE__ */ i("div", { id: r, children: [
|
|
615
|
+
/* @__PURE__ */ i("div", { className: "flex space-x-2", children: [
|
|
616
|
+
/* @__PURE__ */ t(
|
|
617
|
+
"input",
|
|
618
|
+
{
|
|
619
|
+
id: r ? `${r}-min` : void 0,
|
|
620
|
+
className: "block w-full rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline-2 focus:-outline-offset-2 focus:outline-neutral-400 sm:text-sm/6",
|
|
621
|
+
type: "number",
|
|
622
|
+
value: s?.[0] ?? "",
|
|
623
|
+
onChange: (l) => e.setFilterValue((c) => [
|
|
624
|
+
l.target.value,
|
|
625
|
+
c?.[1]
|
|
626
|
+
]),
|
|
627
|
+
autoComplete: "off",
|
|
628
|
+
placeholder: "Min"
|
|
629
|
+
}
|
|
630
|
+
),
|
|
631
|
+
/* @__PURE__ */ t(
|
|
632
|
+
"input",
|
|
633
|
+
{
|
|
634
|
+
id: r ? `${r}-max` : void 0,
|
|
635
|
+
className: "block w-full rounded-md bg-white px-3 py-0.5 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline-2 focus:-outline-offset-2 focus:outline-neutral-400 sm:text-sm/6",
|
|
636
|
+
type: "number",
|
|
637
|
+
value: s?.[1] ?? "",
|
|
638
|
+
onChange: (l) => e.setFilterValue((c) => [
|
|
639
|
+
c?.[0],
|
|
640
|
+
l.target.value
|
|
641
|
+
]),
|
|
642
|
+
autoComplete: "off",
|
|
643
|
+
placeholder: "Max"
|
|
644
|
+
}
|
|
645
|
+
)
|
|
646
|
+
] }),
|
|
647
|
+
/* @__PURE__ */ t("div", { className: "h-1" })
|
|
648
|
+
] }) : d === "select" ? /* @__PURE__ */ i(
|
|
649
|
+
"select",
|
|
650
|
+
{
|
|
651
|
+
id: r,
|
|
652
|
+
className: "block min-w-36 w-full rounded-md bg-white px-2 py-2 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline-2 focus:-outline-offset-2 focus:outline-neutral-400 sm:text-sm/6",
|
|
653
|
+
onChange: (l) => e.setFilterValue(l.target.value),
|
|
654
|
+
value: s?.toString(),
|
|
655
|
+
children: [
|
|
656
|
+
/* @__PURE__ */ t("option", { value: "", children: "Status: All" }),
|
|
657
|
+
/* @__PURE__ */ t("option", { value: "cancelled", children: "Status: Cancelled" }),
|
|
658
|
+
/* @__PURE__ */ t("option", { value: "pending", children: "Status: Pending" }),
|
|
659
|
+
/* @__PURE__ */ t("option", { value: "shipped", children: "Status: Shipped" })
|
|
660
|
+
]
|
|
661
|
+
}
|
|
662
|
+
) : /* @__PURE__ */ t(
|
|
663
|
+
"input",
|
|
664
|
+
{
|
|
665
|
+
id: r,
|
|
666
|
+
className: "block min-w-36 w-full rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline-2 focus:-outline-offset-2 focus:outline-neutral-400 sm:text-sm/6",
|
|
667
|
+
onChange: (l) => e.setFilterValue(l.target.value),
|
|
668
|
+
placeholder: e.columnDef.header?.toString() ?? "...",
|
|
669
|
+
type: "text",
|
|
670
|
+
autoComplete: "off",
|
|
671
|
+
value: s ?? ""
|
|
672
|
+
}
|
|
673
|
+
);
|
|
674
|
+
}
|
|
675
|
+
function ne({
|
|
676
|
+
enabled: e,
|
|
677
|
+
onToggle: r,
|
|
678
|
+
id: s
|
|
679
|
+
}) {
|
|
680
|
+
return /* @__PURE__ */ t(
|
|
681
|
+
W,
|
|
682
|
+
{
|
|
683
|
+
id: s,
|
|
684
|
+
checked: e,
|
|
685
|
+
onChange: r,
|
|
686
|
+
className: "group relative flex h-4 w-7 cursor-pointer rounded-full p-0.5 transition-colors duration-200 ease-in-out focus:outline-none data-[focus]:outline-1 data-[focus]:outline-white bg-neutral-900/10 data-[checked]:bg-dmsi-blue",
|
|
687
|
+
children: /* @__PURE__ */ t(
|
|
688
|
+
"span",
|
|
689
|
+
{
|
|
690
|
+
"aria-hidden": "true",
|
|
691
|
+
className: "pointer-events-none inline-block size-3 translate-x-0 rounded-full bg-white ring-0 shadow-lg transition duration-200 ease-in-out group-data-[checked]:translate-x-3 group-data-[checked]:shadow-lg"
|
|
692
|
+
}
|
|
693
|
+
)
|
|
694
|
+
}
|
|
695
|
+
);
|
|
696
|
+
}
|
|
697
|
+
export {
|
|
698
|
+
fe as DataTable,
|
|
699
|
+
Y as EditingProvider
|
|
700
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateInput.d.ts","sourceRoot":"","sources":["../../src/components/DateInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DateInput.d.ts","sourceRoot":"","sources":["../../src/components/DateInput.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAa,MAAM,SAAS,CAAC;AAapD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGjD,KAAK,cAAc,GAAG,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,GAAG;IACjD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,SAAS,KAAK,OAAO,CAAC;IACzD,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,wBAAgB,SAAS,CAAC,EACxB,EAAE,EACF,MAAM,EACN,KAAK,EACL,QAAQ,EACR,WAA0B,EAC1B,QAAQ,EACR,QAAgB,EAChB,KAAK,EACL,eAAe,EACf,kBAAkB,EAClB,KAAK,EACL,GAAG,KAAK,EACT,EAAE,cAAc,2CA+OhB"}
|