@nivaro/react 0.3.114 → 0.3.116
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/components/ScreenShareHost.js +24 -0
- package/dist/full.css +50 -2
- package/dist/hooks/useSessionRecorder.js +61 -60
- package/dist/index.d.ts +1728 -22
- package/dist/index.js +1091 -950
- package/dist/shared/components/ActivityEntry.js +209 -97
- package/dist/shared/components/AgentPresenceChip.js +51 -0
- package/dist/shared/components/AnnouncementBanner.js +56 -41
- package/dist/shared/components/AutolinkedText.js +98 -85
- package/dist/shared/components/BroadcastView.js +149 -141
- package/dist/shared/components/CacheStamp.js +78 -30
- package/dist/shared/components/CollectionBrowserView.js +4909 -4182
- package/dist/shared/components/ConfigChangeStrip.js +63 -0
- package/dist/shared/components/ConfigReachNote.js +107 -0
- package/dist/shared/components/ConformanceView.js +389 -319
- package/dist/shared/components/DataTable.js +612 -551
- package/dist/shared/components/DelegateCoverLine.js +164 -0
- package/dist/shared/components/EnvironmentNotice.js +56 -65
- package/dist/shared/components/FilePreviewLightbox.js +89 -43
- package/dist/shared/components/FindingFixedMark.js +23 -0
- package/dist/shared/components/GridPresenceLine.js +100 -0
- package/dist/shared/components/IdleReloadWatcher.js +82 -43
- package/dist/shared/components/InStep.js +46 -0
- package/dist/shared/components/ItemEditForm.js +5504 -4889
- package/dist/shared/components/LiveAnnouncer.js +62 -0
- package/dist/shared/components/LiveCount.js +54 -0
- package/dist/shared/components/LiveFigure.js +28 -0
- package/dist/shared/components/LiveListControls.js +114 -0
- package/dist/shared/components/LiveNewMatchesPill.js +25 -0
- package/dist/shared/components/LiveOffNote.js +44 -0
- package/dist/shared/components/LivePreferenceHost.js +42 -0
- package/dist/shared/components/LiveRowMark.js +25 -20
- package/dist/shared/components/LiveTraceView.js +257 -0
- package/dist/shared/components/MapView.js +30 -29
- package/dist/shared/components/MatrixEditor.js +497 -462
- package/dist/shared/components/MyWorkView.js +346 -272
- package/dist/shared/components/NotificationBell.js +215 -201
- package/dist/shared/components/OverflowRail.js +326 -0
- package/dist/shared/components/PageRenderer.js +636 -599
- package/dist/shared/components/PresenceDot.js +21 -0
- package/dist/shared/components/ProfileView.js +656 -536
- package/dist/shared/components/RealtimeStatusBanner.js +25 -25
- package/dist/shared/components/RecentRecordsRail.js +51 -48
- package/dist/shared/components/RecordCompare.js +241 -150
- package/dist/shared/components/RecordDrilldownSheet.js +66 -64
- package/dist/shared/components/RecordGridEditor.js +350 -311
- package/dist/shared/components/RecordHoverCard.js +147 -0
- package/dist/shared/components/RecordPeekHost.js +111 -0
- package/dist/shared/components/RecordReadView.js +414 -412
- package/dist/shared/components/RelativeTime.js +16 -0
- package/dist/shared/components/ReportView.js +1396 -1304
- package/dist/shared/components/ScreenRefreshButton.js +77 -0
- package/dist/shared/components/TabCountHost.js +10 -0
- package/dist/shared/components/TickerNumber.js +19 -18
- package/dist/shared/components/TipLayer.js +70 -58
- package/dist/shared/components/WidgetImageMenu.js +59 -0
- package/dist/shared/components/WidgetSlot.js +571 -524
- package/dist/shared/components/activity/RecordActivityStream.js +317 -0
- package/dist/shared/components/bulk/BulkSelectionNotices.js +220 -0
- package/dist/shared/components/cbv/approval-changed.js +20 -0
- package/dist/shared/components/cbv/changed-by-others.js +251 -0
- package/dist/shared/components/change-proposals/ChangeProposalsPanel.js +320 -0
- package/dist/shared/components/change-proposals/ProposalValue.js +28 -0
- package/dist/shared/components/change-proposals/ProposeChangeButton.js +44 -0
- package/dist/shared/components/change-proposals/ProposeChangeDialog.js +359 -0
- package/dist/shared/components/change-proposals/types.js +4 -0
- package/dist/shared/components/chat/ChatPanel.js +1571 -1528
- package/dist/shared/components/chat/Composer.js +276 -298
- package/dist/shared/components/chat/room-due.js +13 -0
- package/dist/shared/components/collections-directory/CollectionRow.js +76 -75
- package/dist/shared/components/collections-directory/CollectionsDirectory.js +415 -395
- package/dist/shared/components/collections-directory/directory-data.js +75 -63
- package/dist/shared/components/imports/ImportConsole.js +159 -155
- package/dist/shared/components/imports/ImportDuplicatesNotice.js +46 -31
- package/dist/shared/components/integrations/SendStatus.js +202 -0
- package/dist/shared/components/integrations/console/IntegrationsConsole.js +45 -36
- package/dist/shared/components/integrations/console/ReadyToSendView.js +453 -0
- package/dist/shared/components/integrations/console/SignalCard.js +84 -77
- package/dist/shared/components/integrations/console/api.js +161 -117
- package/dist/shared/components/integrations/console/tone.js +15 -12
- package/dist/shared/components/item-edit/CatalogPickerField.js +1353 -1245
- package/dist/shared/components/item-edit/ChangedAfterApprovalBadge.js +162 -0
- package/dist/shared/components/item-edit/CloneDialog.js +208 -206
- package/dist/shared/components/item-edit/DerivedCauseNote.js +57 -0
- package/dist/shared/components/item-edit/DraftRecoveryBanner.js +81 -70
- package/dist/shared/components/item-edit/DuplicateNotice.js +169 -101
- package/dist/shared/components/item-edit/FieldAffordances.js +294 -385
- package/dist/shared/components/item-edit/FieldComments.js +159 -116
- package/dist/shared/components/item-edit/FieldPointer.js +132 -0
- package/dist/shared/components/item-edit/FieldRenderer.js +277 -273
- package/dist/shared/components/item-edit/FieldRow.js +519 -439
- package/dist/shared/components/item-edit/FieldSourceBadge.js +88 -0
- package/dist/shared/components/item-edit/FilePickerField.js +454 -369
- package/dist/shared/components/item-edit/GroupSection.js +618 -567
- package/dist/shared/components/item-edit/HeldEditsChip.js +113 -0
- package/dist/shared/components/item-edit/InlineTableField.js +2891 -2723
- package/dist/shared/components/item-edit/ListNeighborNav.js +79 -0
- package/dist/shared/components/item-edit/LiveTraceSheet.js +26 -0
- package/dist/shared/components/item-edit/M2MCombobox.js +284 -273
- package/dist/shared/components/item-edit/OutboxReviewTray.js +313 -0
- package/dist/shared/components/item-edit/PickerBadges.js +52 -0
- package/dist/shared/components/item-edit/PlanGrid.js +434 -439
- package/dist/shared/components/item-edit/RecalcValue.js +55 -0
- package/dist/shared/components/item-edit/RecordChatActions.js +76 -64
- package/dist/shared/components/item-edit/RecordChatMentionsChip.js +103 -0
- package/dist/shared/components/item-edit/RecordGrantTools.js +87 -86
- package/dist/shared/components/item-edit/RecordHelpChip.js +70 -0
- package/dist/shared/components/item-edit/RecordLiveSync.js +230 -217
- package/dist/shared/components/item-edit/RecordOutbox.js +53 -52
- package/dist/shared/components/item-edit/RecordRecapStrip.js +109 -36
- package/dist/shared/components/item-edit/RelationCombobox.js +229 -217
- package/dist/shared/components/item-edit/RelationGroupedCombobox.js +105 -100
- package/dist/shared/components/item-edit/RemoteChangeUi.js +454 -0
- package/dist/shared/components/item-edit/RemoteUploads.js +55 -0
- package/dist/shared/components/item-edit/RemovedLineNote.js +92 -0
- package/dist/shared/components/item-edit/RichTextEditorImpl.js +298 -223
- package/dist/shared/components/item-edit/ScheduledChangeChip.js +244 -0
- package/dist/shared/components/item-edit/SectionPresence.js +78 -0
- package/dist/shared/components/item-edit/SplitLinesButton.js +166 -0
- package/dist/shared/components/item-edit/catalog-line-watch.js +94 -0
- package/dist/shared/components/item-edit/coedit/collab.js +84 -0
- package/dist/shared/components/item-edit/coedit/context.js +24 -0
- package/dist/shared/components/item-edit/coedit/cursors.js +103 -0
- package/dist/shared/components/item-edit/coedit/safe-link.js +15 -0
- package/dist/shared/components/item-edit/coedit/session.js +382 -0
- package/dist/shared/components/item-edit/coedit/useCoedit.js +49 -0
- package/dist/shared/components/item-edit/file-live.js +77 -0
- package/dist/shared/components/item-edit/file-processing.js +87 -0
- package/dist/shared/components/item-edit/layout-switch.js +148 -0
- package/dist/shared/components/item-edit/live-related.js +23 -0
- package/dist/shared/components/item-edit/live-title.js +66 -0
- package/dist/shared/components/item-edit/partner-needs.js +142 -0
- package/dist/shared/components/item-edit/removed-line.js +58 -0
- package/dist/shared/components/item-edit/render-stability.js +70 -59
- package/dist/shared/components/layout-editor/ChangeNote.js +36 -34
- package/dist/shared/components/layout-editor/CollabParts.js +72 -70
- package/dist/shared/components/layout-editor/LayoutEditor.js +306 -303
- package/dist/shared/components/list/InlineEdit.js +504 -208
- package/dist/shared/components/list/ListViewers.js +81 -0
- package/dist/shared/components/list/PhonePager.js +50 -0
- package/dist/shared/components/merge/MergeRecordsDialog.js +1227 -0
- package/dist/shared/components/merge/MergeWithFlow.js +290 -0
- package/dist/shared/components/merge/merge-values.js +110 -0
- package/dist/shared/components/monitoring/InactiveUserLinksView.js +285 -258
- package/dist/shared/components/notifications/NotificationCenterView.js +389 -323
- package/dist/shared/components/notifications/NotificationDetailBits.js +205 -130
- package/dist/shared/components/notifications/NotificationRulesEditor.js +72 -52
- package/dist/shared/components/notifications/bundles.js +21 -19
- package/dist/shared/components/notifications/resolved-line.js +25 -0
- package/dist/shared/components/ops/OpsTasksView.js +45 -44
- package/dist/shared/components/panels/AccessGrantedNote.js +85 -0
- package/dist/shared/components/panels/AlertBanners.js +132 -0
- package/dist/shared/components/panels/AsyncUserPicker.js +54 -45
- package/dist/shared/components/panels/BranchLanes.js +82 -54
- package/dist/shared/components/panels/CommentAwareness.js +332 -0
- package/dist/shared/components/panels/CommentImages.js +219 -0
- package/dist/shared/components/panels/CommentPanel.js +649 -530
- package/dist/shared/components/panels/ExternalRequestsChip.js +98 -80
- package/dist/shared/components/panels/NewSinceChip.js +16 -0
- package/dist/shared/components/panels/OwnerOpenedLine.js +85 -0
- package/dist/shared/components/panels/PipelinePanel.js +1644 -1494
- package/dist/shared/components/panels/ResubmissionDiff.js +293 -0
- package/dist/shared/components/panels/SlaBreachBanner.js +30 -29
- package/dist/shared/components/panels/SlaClock.js +130 -99
- package/dist/shared/components/panels/TaskPanel.js +308 -287
- package/dist/shared/components/panels/unseen-move-check.js +101 -0
- package/dist/shared/components/pipeline/OwnerMatrix.js +80 -71
- package/dist/shared/components/pipeline/OwnerMatrixSheet.js +495 -0
- package/dist/shared/components/pipeline/PipelineEditorView.js +2050 -1942
- package/dist/shared/components/profile/AgentNameField.js +141 -0
- package/dist/shared/components/profile/AgentsPanel.js +55 -46
- package/dist/shared/components/profile/PersonAccess.js +398 -330
- package/dist/shared/components/profile/PersonAdminTools.js +127 -113
- package/dist/shared/components/profile/PersonProfile.js +81 -73
- package/dist/shared/components/profile/SignInTroubleshooter.js +361 -0
- package/dist/shared/components/queue/OwnerAvatars.js +9 -9
- package/dist/shared/components/queue/QueueBulkBar.js +101 -84
- package/dist/shared/components/queue/QueueItemSheet.js +66 -66
- package/dist/shared/components/queue/QueueTeamStrip.js +279 -0
- package/dist/shared/components/queue/QueueWorklist.js +2407 -1950
- package/dist/shared/components/queue/worklist-helpers.js +10 -6
- package/dist/shared/components/send-view/SendViewButton.js +136 -0
- package/dist/shared/components/send-view/SentViewCards.js +147 -0
- package/dist/shared/components/support/ReportProblem.js +1 -0
- package/dist/shared/components/support/ScreenShare.js +554 -0
- package/dist/shared/components/support/SupportView.js +160 -129
- package/dist/shared/components/support/TicketDetailSheet.js +101 -89
- package/dist/shared/components/ui/popover.js +53 -29
- package/dist/shared/components/watch-list/WatchDock.js +1044 -0
- package/dist/shared/components/watch-list/WatchExtras.js +723 -0
- package/dist/shared/components/watch-list/WatchListButton.js +46 -0
- package/dist/shared/components/watch-list/WatchPinButton.js +67 -0
- package/dist/shared/components/watch-list/WatchRows.js +348 -0
- package/dist/shared/lib/activity-sentence.js +87 -75
- package/dist/shared/lib/agent-presence.js +46 -0
- package/dist/shared/lib/approval-progress.js +49 -0
- package/dist/shared/lib/attention-prefs.js +27 -0
- package/dist/shared/lib/cell-locks.js +56 -0
- package/dist/shared/lib/co-edit.js +166 -0
- package/dist/shared/lib/coedit-registry.js +44 -0
- package/dist/shared/lib/comment-awareness.js +124 -0
- package/dist/shared/lib/comment-images.js +45 -0
- package/dist/shared/lib/config-watch.js +94 -0
- package/dist/shared/lib/copy-rules.js +65 -0
- package/dist/shared/lib/count-step.js +30 -0
- package/dist/shared/lib/deadline-ticker.js +68 -0
- package/dist/shared/lib/derived-causes.js +115 -0
- package/dist/shared/lib/draft-store.js +114 -85
- package/dist/shared/lib/error-hints.js +1 -0
- package/dist/shared/lib/field-merge.js +126 -0
- package/dist/shared/lib/filter-sentence.js +10 -10
- package/dist/shared/lib/focus-mode.js +16 -12
- package/dist/shared/lib/grid-cursors.js +77 -0
- package/dist/shared/lib/grid-presence.js +182 -0
- package/dist/shared/lib/idle-reload.js +100 -73
- package/dist/shared/lib/in-step.js +45 -0
- package/dist/shared/lib/integration-chip.js +19 -18
- package/dist/shared/lib/keep-row-focus.js +43 -0
- package/dist/shared/lib/line-locks.js +141 -0
- package/dist/shared/lib/line-split.js +41 -0
- package/dist/shared/lib/linked-changes.js +150 -0
- package/dist/shared/lib/list-return.js +231 -0
- package/dist/shared/lib/list-viewers.js +52 -0
- package/dist/shared/lib/live-announcer.js +86 -0
- package/dist/shared/lib/live-counts.js +85 -0
- package/dist/shared/lib/live-data-changed.js +108 -0
- package/dist/shared/lib/live-deltas.js +81 -0
- package/dist/shared/lib/live-findings.js +113 -0
- package/dist/shared/lib/live-groups.js +122 -0
- package/dist/shared/lib/live-link-labels.js +162 -0
- package/dist/shared/lib/live-list-flow.js +334 -0
- package/dist/shared/lib/live-list.js +143 -129
- package/dist/shared/lib/live-moves.js +51 -0
- package/dist/shared/lib/live-ops.js +26 -26
- package/dist/shared/lib/live-pickers.js +7 -0
- package/dist/shared/lib/live-preference.js +184 -0
- package/dist/shared/lib/live-queries.js +226 -181
- package/dist/shared/lib/live-screen.js +333 -0
- package/dist/shared/lib/live-search.js +108 -0
- package/dist/shared/lib/live-seen.js +35 -0
- package/dist/shared/lib/live-views.js +100 -0
- package/dist/shared/lib/live.js +159 -133
- package/dist/shared/lib/missed-updates.js +198 -0
- package/dist/shared/lib/newer-file.js +56 -0
- package/dist/shared/lib/notification-sound.js +42 -20
- package/dist/shared/lib/obligation-banner.js +17 -17
- package/dist/shared/lib/own-writes.js +59 -41
- package/dist/shared/lib/picker-badges.js +94 -0
- package/dist/shared/lib/presence-signals.js +131 -84
- package/dist/shared/lib/rail-menu-context.js +9 -0
- package/dist/shared/lib/realtime.js +49 -24
- package/dist/shared/lib/record-gaps.js +85 -0
- package/dist/shared/lib/record-outbox.js +369 -222
- package/dist/shared/lib/record-peek.js +75 -0
- package/dist/shared/lib/record-tabs.js +92 -72
- package/dist/shared/lib/relative-ticker.js +42 -0
- package/dist/shared/lib/request-gate.js +119 -119
- package/dist/shared/lib/rollup-recalc.js +107 -0
- package/dist/shared/lib/room-gaps.js +40 -36
- package/dist/shared/lib/row-surface.js +7 -0
- package/dist/shared/lib/rum.js +137 -87
- package/dist/shared/lib/save-progress.js +20 -0
- package/dist/shared/lib/scheduled-countdown.js +67 -0
- package/dist/shared/lib/screen-refresh.js +160 -0
- package/dist/shared/lib/screen-share.js +234 -0
- package/dist/shared/lib/seen-since.js +74 -0
- package/dist/shared/lib/selection-watch.js +205 -0
- package/dist/shared/lib/send-status.js +132 -0
- package/dist/shared/lib/send-view.js +23 -0
- package/dist/shared/lib/socket-liveness.js +155 -0
- package/dist/shared/lib/socket-realtime.js +168 -140
- package/dist/shared/lib/state-census.js +53 -0
- package/dist/shared/lib/summary-mode.js +61 -39
- package/dist/shared/lib/tab-attention.js +143 -32
- package/dist/shared/lib/table-density.js +64 -0
- package/dist/shared/lib/table-pins.js +20 -18
- package/dist/shared/lib/track-travel.js +40 -0
- package/dist/shared/lib/unseen-changes.js +68 -0
- package/dist/shared/lib/upload-file.js +62 -0
- package/dist/shared/lib/upload-presence.js +127 -0
- package/dist/shared/lib/urgent-chime.js +65 -0
- package/dist/shared/lib/use-below-md.js +29 -0
- package/dist/shared/lib/use-online-users.js +32 -11
- package/dist/shared/lib/user-sync.js +155 -39
- package/dist/shared/lib/waiting-count.js +44 -0
- package/dist/shared/lib/watch-desktop.js +83 -0
- package/dist/shared/lib/watch-list.js +447 -0
- package/dist/shared/lib/widget-image-render.js +64 -0
- package/dist/shared/lib/widget-image.js +111 -0
- package/dist/shared/lib/worker-socket.js +130 -104
- package/dist/shared/lib/write-to-screen.js +133 -0
- package/package.json +1 -1
- package/styles.css +49 -1
|
@@ -1,58 +1,62 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Search as
|
|
3
|
-
import
|
|
4
|
-
import { parseDateFilter as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
import { jsxs as s, Fragment as U, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { Search as gt, Pin as kt, ChevronDown as vt, Inbox as Nt, ChevronsUpDown as be, ChevronUp as wt, X as pe, Check as _t, CalendarDays as Ot } from "lucide-react";
|
|
3
|
+
import St, { useState as $, useMemo as Qe, useRef as oe, useEffect as re, useLayoutEffect as $t } from "react";
|
|
4
|
+
import { parseDateFilter as Ye, describeDateFilter as zt, DATE_FILTER_OPS as Et, formatDateFilter as Ct } from "../lib/date-filter.js";
|
|
5
|
+
import { useKeepRowCheckboxFocus as Mt } from "../lib/keep-row-focus.js";
|
|
6
|
+
import { parseNumberFilter as Ze, describeNumberFilter as Tt, NUMBER_FILTER_OPS as At, formatNumberFilter as jt } from "../lib/number-filter.js";
|
|
7
|
+
import { ROW_SURFACE_SELECTED as Vt, ROW_SURFACE as Wt, ROW_SURFACE_HOVER as Bt } from "../lib/row-surface.js";
|
|
8
|
+
import { fitPins as Lt } from "../lib/table-pins.js";
|
|
9
|
+
import { useBelowMd as Ft } from "../lib/use-below-md.js";
|
|
10
|
+
import { cn as h, formatNumber as Y } from "../lib/utils.js";
|
|
11
|
+
import { CellCopyLayer as Rt } from "./CellCopyLayer.js";
|
|
12
|
+
import { EmptyState as qt } from "./EmptyState.js";
|
|
13
|
+
import { HScrollProxy as Ht } from "./HScrollProxy.js";
|
|
14
|
+
import { PhonePager as Ut } from "./list/PhonePager.js";
|
|
15
|
+
import { TableSkeletonRows as Dt } from "./Skeletons.js";
|
|
16
|
+
import { Button as de } from "./ui/button.js";
|
|
17
|
+
import { Checkbox as Ie } from "./ui/checkbox.js";
|
|
18
|
+
import { Command as Jt, CommandInput as Xt, CommandList as Qt, CommandEmpty as Yt, CommandItem as Zt } from "./ui/command.js";
|
|
19
|
+
import { Input as q } from "./ui/input.js";
|
|
20
|
+
import { Popover as me, PopoverTrigger as he, PopoverContent as ue } from "./ui/popover.js";
|
|
21
|
+
import { Select as It, SelectTrigger as Kt, SelectValue as Pt, SelectContent as Gt, SelectItem as Ke } from "./ui/select.js";
|
|
22
|
+
import { Table as Pe, TableHeader as Ge, TableRow as Z, TableHead as I, TableBody as et, TableCell as ce } from "./ui/table.js";
|
|
23
|
+
const er = [1, 2, 3, 4, 5, 6, 7, 8];
|
|
24
|
+
function ze(r) {
|
|
25
|
+
var d;
|
|
26
|
+
return r == null || typeof r == "boolean" ? "" : typeof r == "string" || typeof r == "number" ? String(r) : Array.isArray(r) ? r.map(ze).join("") : typeof r == "object" && "props" in r ? ze((d = r.props) == null ? void 0 : d.children) : "";
|
|
23
27
|
}
|
|
24
|
-
function
|
|
25
|
-
const
|
|
26
|
-
if (
|
|
28
|
+
function tr(r) {
|
|
29
|
+
const d = ze(r.header).replace(/\s+/g, " ").trim();
|
|
30
|
+
if (d) return d;
|
|
27
31
|
const c = (r.key.split(".").pop() ?? r.key).replace(/_/g, " ").trim();
|
|
28
32
|
return c ? c[0].toUpperCase() + c.slice(1) : r.key;
|
|
29
33
|
}
|
|
30
|
-
function
|
|
34
|
+
function Ee(r) {
|
|
31
35
|
return r.startsWith("-") ? r.slice(1) : r;
|
|
32
36
|
}
|
|
33
|
-
function
|
|
37
|
+
function Ce(r) {
|
|
34
38
|
return r ? r.startsWith("-") ? "desc" : "asc" : null;
|
|
35
39
|
}
|
|
36
|
-
function
|
|
37
|
-
const o =
|
|
38
|
-
return o !==
|
|
40
|
+
function rr(r, d) {
|
|
41
|
+
const o = Ee(r), c = Ce(r);
|
|
42
|
+
return o !== d || !r ? d : c === "asc" ? `-${d}` : "";
|
|
39
43
|
}
|
|
40
|
-
function
|
|
41
|
-
const o =
|
|
44
|
+
function ar(r, d) {
|
|
45
|
+
const o = d.trim().toLowerCase().split(/\s+/).filter(Boolean);
|
|
42
46
|
if (o.length === 0) return 1;
|
|
43
47
|
const c = r.toLowerCase();
|
|
44
|
-
return o.every((
|
|
48
|
+
return o.every((b) => c.includes(b)) ? 1 : 0;
|
|
45
49
|
}
|
|
46
|
-
function
|
|
47
|
-
return !r ||
|
|
50
|
+
function lr(r, d) {
|
|
51
|
+
return !r || Ee(r) !== d ? "none" : Ce(r) === "desc" ? "descending" : "ascending";
|
|
48
52
|
}
|
|
49
|
-
function
|
|
53
|
+
function $e(r) {
|
|
50
54
|
return typeof r == "string" || typeof r == "number";
|
|
51
55
|
}
|
|
52
|
-
function
|
|
53
|
-
const o =
|
|
54
|
-
return o !== r || !
|
|
55
|
-
|
|
56
|
+
function tt({ field: r, sort: d }) {
|
|
57
|
+
const o = Ee(d), c = Ce(d);
|
|
58
|
+
return o !== r || !d ? /* @__PURE__ */ t(be, { className: "ml-1 inline h-3 w-3 shrink-0 text-slate-300" }) : /* @__PURE__ */ t(
|
|
59
|
+
wt,
|
|
56
60
|
{
|
|
57
61
|
className: h(
|
|
58
62
|
"ml-1 inline h-3 w-3 shrink-0 text-nvr-cyan transition-transform duration-200",
|
|
@@ -61,54 +65,54 @@ function Je({ field: r, sort: i }) {
|
|
|
61
65
|
}
|
|
62
66
|
);
|
|
63
67
|
}
|
|
64
|
-
function
|
|
68
|
+
function nr({
|
|
65
69
|
def: r,
|
|
66
|
-
value:
|
|
70
|
+
value: d,
|
|
67
71
|
onChange: o
|
|
68
72
|
}) {
|
|
69
|
-
const [c,
|
|
70
|
-
|
|
71
|
-
if (!
|
|
73
|
+
const [c, b] = $(!1), [n, p] = $(""), [k, v] = $([]), [N, f] = $(!1), [m, w] = $({}), a = oe(0), E = !!r.loadOptions, O = Array.isArray(d) ? d : d === "" ? [] : [d];
|
|
74
|
+
re(() => {
|
|
75
|
+
if (!E || !c) return;
|
|
72
76
|
const x = ++a.current;
|
|
73
|
-
|
|
74
|
-
const
|
|
77
|
+
f(!0);
|
|
78
|
+
const M = setTimeout(
|
|
75
79
|
() => {
|
|
76
|
-
var
|
|
77
|
-
(
|
|
78
|
-
a.current === x &&
|
|
80
|
+
var A;
|
|
81
|
+
(A = r.loadOptions) == null || A.call(r, n).then((F) => {
|
|
82
|
+
a.current === x && v(F);
|
|
79
83
|
}).catch(() => {
|
|
80
|
-
a.current === x &&
|
|
84
|
+
a.current === x && v([]);
|
|
81
85
|
}).finally(() => {
|
|
82
|
-
a.current === x &&
|
|
86
|
+
a.current === x && f(!1);
|
|
83
87
|
});
|
|
84
88
|
},
|
|
85
89
|
n ? 250 : 0
|
|
86
90
|
);
|
|
87
|
-
return () => clearTimeout(
|
|
88
|
-
}, [n, c,
|
|
89
|
-
const
|
|
90
|
-
var
|
|
91
|
-
return ((
|
|
92
|
-
},
|
|
93
|
-
return /* @__PURE__ */
|
|
94
|
-
|
|
91
|
+
return () => clearTimeout(M);
|
|
92
|
+
}, [n, c, E]);
|
|
93
|
+
const K = E ? k : r.options ?? [], ae = (x) => {
|
|
94
|
+
var M, A;
|
|
95
|
+
return ((M = K.find((F) => F.value === x)) == null ? void 0 : M.label) ?? ((A = (r.options ?? []).find((F) => F.value === x)) == null ? void 0 : A.label) ?? m[x] ?? x;
|
|
96
|
+
}, T = O.length === 0 ? null : O.length === 1 ? ae(O[0]) : `${ae(O[0])} +${O.length - 1}`;
|
|
97
|
+
return /* @__PURE__ */ s(
|
|
98
|
+
me,
|
|
95
99
|
{
|
|
96
100
|
open: c,
|
|
97
101
|
onOpenChange: (x) => {
|
|
98
|
-
|
|
102
|
+
b(x), x || p("");
|
|
99
103
|
},
|
|
100
104
|
children: [
|
|
101
|
-
/* @__PURE__ */ t(
|
|
105
|
+
/* @__PURE__ */ t(he, { asChild: !0, children: /* @__PURE__ */ s(
|
|
102
106
|
"button",
|
|
103
107
|
{
|
|
104
108
|
type: "button",
|
|
105
109
|
className: h(
|
|
106
110
|
"flex h-8 w-40 items-center justify-between rounded-md border border-slate-200 bg-slate-50 px-2.5 text-[13px] dark:border-border dark:bg-muted/40",
|
|
107
|
-
|
|
111
|
+
T ? "text-slate-800 dark:text-foreground" : "text-slate-500"
|
|
108
112
|
),
|
|
109
113
|
children: [
|
|
110
|
-
/* @__PURE__ */ t("span", { className: "truncate", children:
|
|
111
|
-
/* @__PURE__ */
|
|
114
|
+
/* @__PURE__ */ t("span", { className: "truncate", children: T ?? r.placeholder }),
|
|
115
|
+
/* @__PURE__ */ s("span", { className: "ml-1 flex shrink-0 items-center gap-0.5", children: [
|
|
112
116
|
O.length > 0 && // biome-ignore lint/a11y/useKeyWithClickEvents: auxiliary clear affordance; Esc + reselect cover keyboard
|
|
113
117
|
/* @__PURE__ */ t(
|
|
114
118
|
"span",
|
|
@@ -120,40 +124,40 @@ function Bt({
|
|
|
120
124
|
x.stopPropagation(), o(r.multi ? [] : "");
|
|
121
125
|
},
|
|
122
126
|
className: "rounded p-0.5 text-slate-400 hover:text-slate-600",
|
|
123
|
-
children: /* @__PURE__ */ t(
|
|
127
|
+
children: /* @__PURE__ */ t(pe, { className: "h-3 w-3" })
|
|
124
128
|
}
|
|
125
129
|
),
|
|
126
|
-
/* @__PURE__ */ t(
|
|
130
|
+
/* @__PURE__ */ t(be, { className: "h-3 w-3 text-slate-400" })
|
|
127
131
|
] })
|
|
128
132
|
]
|
|
129
133
|
}
|
|
130
134
|
) }),
|
|
131
|
-
/* @__PURE__ */ t(
|
|
135
|
+
/* @__PURE__ */ t(ue, { className: "w-[240px] p-0", align: "start", children: /* @__PURE__ */ s(Jt, { shouldFilter: !E, filter: ar, children: [
|
|
132
136
|
/* @__PURE__ */ t(
|
|
133
|
-
|
|
137
|
+
Xt,
|
|
134
138
|
{
|
|
135
139
|
placeholder: "Search…",
|
|
136
140
|
className: "h-8 text-[12px]",
|
|
137
141
|
value: n,
|
|
138
|
-
onValueChange:
|
|
142
|
+
onValueChange: p
|
|
139
143
|
}
|
|
140
144
|
),
|
|
141
|
-
/* @__PURE__ */
|
|
142
|
-
/* @__PURE__ */ t(
|
|
143
|
-
|
|
144
|
-
const
|
|
145
|
-
return /* @__PURE__ */
|
|
146
|
-
|
|
145
|
+
/* @__PURE__ */ s(Qt, { children: [
|
|
146
|
+
/* @__PURE__ */ t(Yt, { className: "py-3 text-center text-[12px] text-slate-400", children: N ? "Searching…" : "No results" }),
|
|
147
|
+
K.map((x) => {
|
|
148
|
+
const M = O.includes(x.value);
|
|
149
|
+
return /* @__PURE__ */ s(
|
|
150
|
+
Zt,
|
|
147
151
|
{
|
|
148
|
-
value:
|
|
152
|
+
value: E ? x.value : x.label,
|
|
149
153
|
onSelect: () => {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
) : (o(
|
|
154
|
+
w((A) => ({ ...A, [x.value]: x.label })), r.multi ? o(
|
|
155
|
+
M ? O.filter((A) => A !== x.value) : [...O, x.value]
|
|
156
|
+
) : (o(M ? "" : x.value), b(!1));
|
|
153
157
|
},
|
|
154
158
|
className: "text-[12px]",
|
|
155
159
|
children: [
|
|
156
|
-
/* @__PURE__ */ t(
|
|
160
|
+
/* @__PURE__ */ t(_t, { className: h("mr-2 h-3 w-3", M ? "opacity-100" : "opacity-0") }),
|
|
157
161
|
x.label
|
|
158
162
|
]
|
|
159
163
|
},
|
|
@@ -166,80 +170,80 @@ function Bt({
|
|
|
166
170
|
}
|
|
167
171
|
);
|
|
168
172
|
}
|
|
169
|
-
function
|
|
173
|
+
function sr({
|
|
170
174
|
value: r,
|
|
171
|
-
placeholder:
|
|
175
|
+
placeholder: d,
|
|
172
176
|
onChange: o
|
|
173
177
|
}) {
|
|
174
|
-
const [c,
|
|
175
|
-
|
|
178
|
+
const [c, b] = $(!1), n = Ye(r), [p, k] = $((n == null ? void 0 : n.op) ?? "on"), [v, N] = $((n == null ? void 0 : n.from) ?? ""), [f, m] = $((n == null ? void 0 : n.to) ?? "");
|
|
179
|
+
re(() => {
|
|
176
180
|
if (!c) return;
|
|
177
|
-
const a =
|
|
178
|
-
|
|
181
|
+
const a = Ye(r);
|
|
182
|
+
k((a == null ? void 0 : a.op) ?? "on"), N((a == null ? void 0 : a.from) ?? ""), m((a == null ? void 0 : a.to) ?? "");
|
|
179
183
|
}, [c, r]);
|
|
180
|
-
const
|
|
181
|
-
|
|
184
|
+
const w = (a, E, O) => {
|
|
185
|
+
E && (o(Ct({ op: a, from: E, to: O || E })), (a !== "between" || O) && b(!1));
|
|
182
186
|
};
|
|
183
|
-
return /* @__PURE__ */
|
|
184
|
-
/* @__PURE__ */ t(
|
|
187
|
+
return /* @__PURE__ */ s(me, { open: c, onOpenChange: b, children: [
|
|
188
|
+
/* @__PURE__ */ t(he, { asChild: !0, children: /* @__PURE__ */ s(
|
|
185
189
|
"button",
|
|
186
190
|
{
|
|
187
191
|
type: "button",
|
|
188
192
|
"data-date-filter": !0,
|
|
189
193
|
className: "flex h-8 w-full items-center justify-between gap-1 rounded-md border border-slate-200 bg-slate-50 px-2 text-left text-[12px] dark:border-border dark:bg-muted",
|
|
190
194
|
children: [
|
|
191
|
-
/* @__PURE__ */ t("span", { className: h("truncate", !n && "text-slate-500 dark:text-muted-foreground"), children: n ?
|
|
195
|
+
/* @__PURE__ */ t("span", { className: h("truncate", !n && "text-slate-500 dark:text-muted-foreground"), children: n ? zt(n) : d }),
|
|
192
196
|
n ? /* @__PURE__ */ t(
|
|
193
|
-
|
|
197
|
+
pe,
|
|
194
198
|
{
|
|
195
199
|
className: "h-3 w-3 shrink-0 text-slate-400 hover:text-slate-700",
|
|
196
200
|
onClick: (a) => {
|
|
197
201
|
a.stopPropagation(), o(null);
|
|
198
202
|
}
|
|
199
203
|
}
|
|
200
|
-
) : /* @__PURE__ */ t(
|
|
204
|
+
) : /* @__PURE__ */ t(Ot, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" })
|
|
201
205
|
]
|
|
202
206
|
}
|
|
203
207
|
) }),
|
|
204
|
-
/* @__PURE__ */
|
|
205
|
-
/* @__PURE__ */ t("div", { className: "grid grid-cols-3 gap-1", children:
|
|
208
|
+
/* @__PURE__ */ s(ue, { align: "start", className: "w-[248px] space-y-2 p-2", children: [
|
|
209
|
+
/* @__PURE__ */ t("div", { className: "grid grid-cols-3 gap-1", children: Et.map((a) => /* @__PURE__ */ t(
|
|
206
210
|
"button",
|
|
207
211
|
{
|
|
208
212
|
type: "button",
|
|
209
213
|
"data-date-op": a.op,
|
|
210
|
-
"aria-pressed":
|
|
214
|
+
"aria-pressed": p === a.op,
|
|
211
215
|
onClick: () => {
|
|
212
|
-
|
|
216
|
+
k(a.op), v && w(a.op, v, f);
|
|
213
217
|
},
|
|
214
218
|
className: h(
|
|
215
219
|
"rounded border px-1 py-1 text-[11px] leading-tight transition-colors",
|
|
216
|
-
|
|
220
|
+
p === a.op ? "border-nvr-cyan/40 bg-nvr-cyan/10 font-medium" : "border-slate-200 text-slate-600 hover:bg-muted dark:border-border dark:text-muted-foreground"
|
|
217
221
|
),
|
|
218
222
|
children: a.label
|
|
219
223
|
},
|
|
220
224
|
a.op
|
|
221
225
|
)) }),
|
|
222
|
-
/* @__PURE__ */
|
|
226
|
+
/* @__PURE__ */ s("div", { className: "flex items-center gap-1", children: [
|
|
223
227
|
/* @__PURE__ */ t(
|
|
224
228
|
"input",
|
|
225
229
|
{
|
|
226
230
|
type: "date",
|
|
227
|
-
value:
|
|
231
|
+
value: v,
|
|
228
232
|
onChange: (a) => {
|
|
229
|
-
|
|
233
|
+
N(a.target.value), p !== "between" && w(p, a.target.value, "");
|
|
230
234
|
},
|
|
231
235
|
className: "h-7 flex-1 rounded border border-slate-200 bg-background px-1 text-[12px] dark:border-border"
|
|
232
236
|
}
|
|
233
237
|
),
|
|
234
|
-
|
|
238
|
+
p === "between" && /* @__PURE__ */ s(U, { children: [
|
|
235
239
|
/* @__PURE__ */ t("span", { className: "text-[11px] text-slate-400", children: "to" }),
|
|
236
240
|
/* @__PURE__ */ t(
|
|
237
241
|
"input",
|
|
238
242
|
{
|
|
239
243
|
type: "date",
|
|
240
|
-
value:
|
|
244
|
+
value: f,
|
|
241
245
|
onChange: (a) => {
|
|
242
|
-
|
|
246
|
+
m(a.target.value), w("between", v, a.target.value);
|
|
243
247
|
},
|
|
244
248
|
className: "h-7 flex-1 rounded border border-slate-200 bg-background px-1 text-[12px] dark:border-border"
|
|
245
249
|
}
|
|
@@ -249,15 +253,15 @@ function Ut({
|
|
|
249
253
|
] })
|
|
250
254
|
] });
|
|
251
255
|
}
|
|
252
|
-
function
|
|
256
|
+
function ir({
|
|
253
257
|
value: r,
|
|
254
|
-
placeholder:
|
|
258
|
+
placeholder: d,
|
|
255
259
|
unit: o,
|
|
256
260
|
onChange: c
|
|
257
261
|
}) {
|
|
258
|
-
const [
|
|
259
|
-
return /* @__PURE__ */
|
|
260
|
-
/* @__PURE__ */ t(
|
|
262
|
+
const [b, n] = $(!1), [p, k] = r.split(":"), v = o ?? "", N = p && k ? `${p}–${k}${v}` : p ? `${p}${v}+` : k ? `≤ ${k}${v}` : d, f = (m, w) => c(m === "" && w === "" ? null : `${m}:${w}`);
|
|
263
|
+
return /* @__PURE__ */ s(me, { open: b, onOpenChange: n, children: [
|
|
264
|
+
/* @__PURE__ */ t(he, { asChild: !0, children: /* @__PURE__ */ s(
|
|
261
265
|
"button",
|
|
262
266
|
{
|
|
263
267
|
type: "button",
|
|
@@ -267,45 +271,45 @@ function Dt({
|
|
|
267
271
|
/* @__PURE__ */ t(
|
|
268
272
|
"span",
|
|
269
273
|
{
|
|
270
|
-
className: h("truncate", !
|
|
271
|
-
children:
|
|
274
|
+
className: h("truncate", !p && !k && "text-slate-500 dark:text-muted-foreground"),
|
|
275
|
+
children: N
|
|
272
276
|
}
|
|
273
277
|
),
|
|
274
|
-
|
|
275
|
-
|
|
278
|
+
p || k ? /* @__PURE__ */ t(
|
|
279
|
+
pe,
|
|
276
280
|
{
|
|
277
281
|
className: "h-3 w-3 shrink-0 text-slate-400 hover:text-slate-700",
|
|
278
|
-
onClick: (
|
|
279
|
-
|
|
282
|
+
onClick: (m) => {
|
|
283
|
+
m.stopPropagation(), c(null);
|
|
280
284
|
}
|
|
281
285
|
}
|
|
282
|
-
) : /* @__PURE__ */ t(
|
|
286
|
+
) : /* @__PURE__ */ t(be, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" })
|
|
283
287
|
]
|
|
284
288
|
}
|
|
285
289
|
) }),
|
|
286
|
-
/* @__PURE__ */
|
|
287
|
-
/* @__PURE__ */ t("p", { className: "pb-1 text-[10px] font-semibold uppercase tracking-wide text-slate-400", children:
|
|
288
|
-
/* @__PURE__ */
|
|
290
|
+
/* @__PURE__ */ s(ue, { align: "start", className: "w-[200px] p-2", children: [
|
|
291
|
+
/* @__PURE__ */ t("p", { className: "pb-1 text-[10px] font-semibold uppercase tracking-wide text-slate-400", children: d }),
|
|
292
|
+
/* @__PURE__ */ s("div", { className: "flex items-center gap-1", children: [
|
|
289
293
|
/* @__PURE__ */ t(
|
|
290
|
-
|
|
294
|
+
q,
|
|
291
295
|
{
|
|
292
296
|
type: "number",
|
|
293
|
-
"aria-label": `Minimum ${
|
|
297
|
+
"aria-label": `Minimum ${d}`,
|
|
294
298
|
placeholder: "Min",
|
|
295
|
-
value:
|
|
296
|
-
onChange: (
|
|
299
|
+
value: p ?? "",
|
|
300
|
+
onChange: (m) => f(m.target.value, k ?? ""),
|
|
297
301
|
className: "h-7 text-[12px]"
|
|
298
302
|
}
|
|
299
303
|
),
|
|
300
304
|
/* @__PURE__ */ t("span", { className: "text-[11px] text-slate-400", children: "–" }),
|
|
301
305
|
/* @__PURE__ */ t(
|
|
302
|
-
|
|
306
|
+
q,
|
|
303
307
|
{
|
|
304
308
|
type: "number",
|
|
305
|
-
"aria-label": `Maximum ${
|
|
309
|
+
"aria-label": `Maximum ${d}`,
|
|
306
310
|
placeholder: "Max",
|
|
307
|
-
value:
|
|
308
|
-
onChange: (
|
|
311
|
+
value: k ?? "",
|
|
312
|
+
onChange: (m) => f(p ?? "", m.target.value),
|
|
309
313
|
className: "h-7 text-[12px]"
|
|
310
314
|
}
|
|
311
315
|
)
|
|
@@ -313,80 +317,80 @@ function Dt({
|
|
|
313
317
|
] })
|
|
314
318
|
] });
|
|
315
319
|
}
|
|
316
|
-
function
|
|
320
|
+
function dr({
|
|
317
321
|
value: r,
|
|
318
|
-
placeholder:
|
|
322
|
+
placeholder: d,
|
|
319
323
|
onChange: o
|
|
320
324
|
}) {
|
|
321
|
-
const [c,
|
|
322
|
-
|
|
325
|
+
const [c, b] = $(!1), n = Ze(r), [p, k] = $((n == null ? void 0 : n.op) ?? "eq"), [v, N] = $(n ? String(n.a) : ""), [f, m] = $((n == null ? void 0 : n.b) != null ? String(n.b) : "");
|
|
326
|
+
re(() => {
|
|
323
327
|
if (!c) return;
|
|
324
|
-
const a =
|
|
325
|
-
|
|
328
|
+
const a = Ze(r);
|
|
329
|
+
k((a == null ? void 0 : a.op) ?? "eq"), N(a ? String(a.a) : ""), m((a == null ? void 0 : a.b) != null ? String(a.b) : "");
|
|
326
330
|
}, [c, r]);
|
|
327
|
-
const
|
|
328
|
-
|
|
331
|
+
const w = (a, E, O) => {
|
|
332
|
+
E === "" || Number.isNaN(Number(E)) || a === "between" && (O === "" || Number.isNaN(Number(O))) || o(jt({ op: a, a: Number(E), b: O === "" ? void 0 : Number(O) }));
|
|
329
333
|
};
|
|
330
|
-
return /* @__PURE__ */
|
|
331
|
-
/* @__PURE__ */ t(
|
|
334
|
+
return /* @__PURE__ */ s(me, { open: c, onOpenChange: b, children: [
|
|
335
|
+
/* @__PURE__ */ t(he, { asChild: !0, children: /* @__PURE__ */ s(
|
|
332
336
|
"button",
|
|
333
337
|
{
|
|
334
338
|
type: "button",
|
|
335
339
|
"data-number-filter": !0,
|
|
336
340
|
className: "flex h-8 w-full items-center justify-between gap-1 rounded-md border border-slate-200 bg-slate-50 px-2 text-left text-[12px] dark:border-border dark:bg-muted",
|
|
337
341
|
children: [
|
|
338
|
-
/* @__PURE__ */ t("span", { className: h("truncate", !n && "text-slate-500 dark:text-muted-foreground"), children: n ?
|
|
342
|
+
/* @__PURE__ */ t("span", { className: h("truncate", !n && "text-slate-500 dark:text-muted-foreground"), children: n ? Tt(n) : d }),
|
|
339
343
|
n ? /* @__PURE__ */ t(
|
|
340
|
-
|
|
344
|
+
pe,
|
|
341
345
|
{
|
|
342
346
|
className: "h-3 w-3 shrink-0 text-slate-400 hover:text-slate-700",
|
|
343
347
|
onClick: (a) => {
|
|
344
348
|
a.stopPropagation(), o(null);
|
|
345
349
|
}
|
|
346
350
|
}
|
|
347
|
-
) : /* @__PURE__ */ t(
|
|
351
|
+
) : /* @__PURE__ */ t(be, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" })
|
|
348
352
|
]
|
|
349
353
|
}
|
|
350
354
|
) }),
|
|
351
|
-
/* @__PURE__ */
|
|
352
|
-
/* @__PURE__ */ t("div", { className: "grid grid-cols-4 gap-1", children:
|
|
355
|
+
/* @__PURE__ */ s(ue, { align: "start", className: "w-[220px] space-y-2 p-2", children: [
|
|
356
|
+
/* @__PURE__ */ t("div", { className: "grid grid-cols-4 gap-1", children: At.map((a) => /* @__PURE__ */ t(
|
|
353
357
|
"button",
|
|
354
358
|
{
|
|
355
359
|
type: "button",
|
|
356
360
|
"data-number-op": a.op,
|
|
357
|
-
"aria-pressed":
|
|
361
|
+
"aria-pressed": p === a.op,
|
|
358
362
|
onClick: () => {
|
|
359
|
-
|
|
363
|
+
k(a.op), w(a.op, v, f);
|
|
360
364
|
},
|
|
361
365
|
className: h(
|
|
362
366
|
"rounded border px-1 py-1 text-[11px] transition-colors",
|
|
363
|
-
|
|
367
|
+
p === a.op ? "border-nvr-cyan/40 bg-nvr-cyan/10 font-medium" : "border-slate-200 text-slate-600 hover:bg-muted dark:border-border dark:text-muted-foreground"
|
|
364
368
|
),
|
|
365
369
|
children: a.symbol
|
|
366
370
|
},
|
|
367
371
|
a.op
|
|
368
372
|
)) }),
|
|
369
|
-
/* @__PURE__ */
|
|
373
|
+
/* @__PURE__ */ s("div", { className: "flex items-center gap-1", children: [
|
|
370
374
|
/* @__PURE__ */ t(
|
|
371
|
-
|
|
375
|
+
q,
|
|
372
376
|
{
|
|
373
377
|
type: "number",
|
|
374
|
-
value:
|
|
378
|
+
value: v,
|
|
375
379
|
onChange: (a) => {
|
|
376
|
-
|
|
380
|
+
N(a.target.value), w(p, a.target.value, f);
|
|
377
381
|
},
|
|
378
382
|
className: "h-7 text-[12px]"
|
|
379
383
|
}
|
|
380
384
|
),
|
|
381
|
-
|
|
385
|
+
p === "between" && /* @__PURE__ */ s(U, { children: [
|
|
382
386
|
/* @__PURE__ */ t("span", { className: "text-[11px] text-slate-400", children: "–" }),
|
|
383
387
|
/* @__PURE__ */ t(
|
|
384
|
-
|
|
388
|
+
q,
|
|
385
389
|
{
|
|
386
390
|
type: "number",
|
|
387
|
-
value:
|
|
391
|
+
value: f,
|
|
388
392
|
onChange: (a) => {
|
|
389
|
-
|
|
393
|
+
m(a.target.value), w(p, v, a.target.value);
|
|
390
394
|
},
|
|
391
395
|
className: "h-7 text-[12px]"
|
|
392
396
|
}
|
|
@@ -396,107 +400,107 @@ function Jt({
|
|
|
396
400
|
] })
|
|
397
401
|
] });
|
|
398
402
|
}
|
|
399
|
-
function
|
|
403
|
+
function rt({
|
|
400
404
|
def: r,
|
|
401
|
-
value:
|
|
405
|
+
value: d,
|
|
402
406
|
onChange: o,
|
|
403
407
|
layout: c = "inline"
|
|
404
408
|
}) {
|
|
405
|
-
const
|
|
406
|
-
let
|
|
409
|
+
const b = c === "stacked", n = c === "cell", p = typeof d == "string" ? d : "", k = b || n ? "w-full" : "w-40", v = n ? "h-7 text-[12px]" : "text-[13px]";
|
|
410
|
+
let N;
|
|
407
411
|
if (r.type === "text")
|
|
408
|
-
|
|
409
|
-
|
|
412
|
+
N = /* @__PURE__ */ t(
|
|
413
|
+
q,
|
|
410
414
|
{
|
|
411
|
-
className: h("h-8 border-slate-200 bg-slate-50",
|
|
415
|
+
className: h("h-8 border-slate-200 bg-slate-50", v, k),
|
|
412
416
|
placeholder: r.placeholder,
|
|
413
|
-
value:
|
|
414
|
-
onChange: (
|
|
417
|
+
value: p,
|
|
418
|
+
onChange: (f) => o(f.target.value)
|
|
415
419
|
}
|
|
416
420
|
);
|
|
417
421
|
else if (r.type === "combobox")
|
|
418
|
-
|
|
422
|
+
N = /* @__PURE__ */ t(
|
|
419
423
|
"div",
|
|
420
424
|
{
|
|
421
425
|
className: h(
|
|
422
|
-
(
|
|
426
|
+
(b || n) && "[&>button]:w-full",
|
|
423
427
|
n && "[&>button]:h-7 [&>button]:min-w-[88px] [&>button]:px-1.5 [&>button]:text-[12px]"
|
|
424
428
|
),
|
|
425
|
-
children: /* @__PURE__ */ t(
|
|
429
|
+
children: /* @__PURE__ */ t(nr, { def: r, value: d, onChange: o })
|
|
426
430
|
}
|
|
427
431
|
);
|
|
428
432
|
else if (r.type === "date")
|
|
429
|
-
|
|
430
|
-
|
|
433
|
+
N = /* @__PURE__ */ t("div", { className: h(n && "[&>div>button]:h-7 [&>div>button]:text-[12px]", k), children: /* @__PURE__ */ t(
|
|
434
|
+
sr,
|
|
431
435
|
{
|
|
432
|
-
value:
|
|
436
|
+
value: p,
|
|
433
437
|
placeholder: r.placeholder,
|
|
434
|
-
onChange: (
|
|
438
|
+
onChange: (f) => o(f ?? "")
|
|
435
439
|
}
|
|
436
440
|
) });
|
|
437
441
|
else if (r.type === "number")
|
|
438
|
-
|
|
439
|
-
|
|
442
|
+
N = /* @__PURE__ */ t("div", { className: h(n && "[&>div>button]:h-7 [&>div>button]:text-[12px]", k), children: /* @__PURE__ */ t(
|
|
443
|
+
dr,
|
|
440
444
|
{
|
|
441
|
-
value:
|
|
445
|
+
value: p,
|
|
442
446
|
placeholder: r.placeholder,
|
|
443
|
-
onChange: (
|
|
447
|
+
onChange: (f) => o(f ?? "")
|
|
444
448
|
}
|
|
445
449
|
) });
|
|
446
450
|
else if (r.type === "range" && n)
|
|
447
|
-
|
|
448
|
-
|
|
451
|
+
N = /* @__PURE__ */ t("div", { className: "[&>div>button]:h-7 [&>div>button]:text-[12px] w-full", children: /* @__PURE__ */ t(
|
|
452
|
+
ir,
|
|
449
453
|
{
|
|
450
|
-
value:
|
|
454
|
+
value: p,
|
|
451
455
|
placeholder: r.placeholder,
|
|
452
456
|
unit: r.range_unit,
|
|
453
|
-
onChange: (
|
|
457
|
+
onChange: (f) => o(f ?? "")
|
|
454
458
|
}
|
|
455
459
|
) });
|
|
456
460
|
else if (r.type === "range") {
|
|
457
|
-
const [
|
|
458
|
-
|
|
461
|
+
const [f, m] = p.split(":");
|
|
462
|
+
N = /* @__PURE__ */ s("div", { className: "flex items-center gap-1", children: [
|
|
459
463
|
/* @__PURE__ */ t(
|
|
460
|
-
|
|
464
|
+
q,
|
|
461
465
|
{
|
|
462
466
|
type: "number",
|
|
463
467
|
className: h(
|
|
464
468
|
"h-8 border-slate-200 bg-slate-50",
|
|
465
|
-
|
|
466
|
-
|
|
469
|
+
v,
|
|
470
|
+
b || n ? "w-full min-w-[48px]" : "w-20"
|
|
467
471
|
),
|
|
468
472
|
placeholder: "Min",
|
|
469
|
-
value:
|
|
470
|
-
onChange: (
|
|
473
|
+
value: f ?? "",
|
|
474
|
+
onChange: (w) => o(`${w.target.value}:${m ?? ""}`)
|
|
471
475
|
}
|
|
472
476
|
),
|
|
473
477
|
/* @__PURE__ */ t("span", { className: "text-[12px] text-slate-400", children: "–" }),
|
|
474
478
|
/* @__PURE__ */ t(
|
|
475
|
-
|
|
479
|
+
q,
|
|
476
480
|
{
|
|
477
481
|
type: "number",
|
|
478
482
|
className: h(
|
|
479
483
|
"h-8 border-slate-200 bg-slate-50",
|
|
480
|
-
|
|
481
|
-
|
|
484
|
+
v,
|
|
485
|
+
b || n ? "w-full min-w-[48px]" : "w-20"
|
|
482
486
|
),
|
|
483
487
|
placeholder: "Max",
|
|
484
|
-
value:
|
|
485
|
-
onChange: (
|
|
488
|
+
value: m ?? "",
|
|
489
|
+
onChange: (w) => o(`${f ?? ""}:${w.target.value}`)
|
|
486
490
|
}
|
|
487
491
|
)
|
|
488
492
|
] });
|
|
489
493
|
} else
|
|
490
|
-
|
|
491
|
-
/* @__PURE__ */ t(
|
|
492
|
-
/* @__PURE__ */
|
|
493
|
-
/* @__PURE__ */ t(
|
|
494
|
-
(r.options ?? []).filter((
|
|
494
|
+
N = /* @__PURE__ */ s(It, { value: p === "" ? "__all__" : p, onValueChange: (m) => o(m === "__all__" ? "" : m), children: [
|
|
495
|
+
/* @__PURE__ */ t(Kt, { className: h("h-8 border-slate-200 bg-slate-50", v, k), children: /* @__PURE__ */ t(Pt, { placeholder: r.placeholder }) }),
|
|
496
|
+
/* @__PURE__ */ s(Gt, { children: [
|
|
497
|
+
/* @__PURE__ */ t(Ke, { value: "__all__", children: r.placeholder }),
|
|
498
|
+
(r.options ?? []).filter((m) => m.value !== "").map((m) => /* @__PURE__ */ t(Ke, { value: m.value, children: m.label }, m.value))
|
|
495
499
|
] })
|
|
496
500
|
] });
|
|
497
|
-
return
|
|
498
|
-
/* @__PURE__ */
|
|
499
|
-
|
|
501
|
+
return b ? /* @__PURE__ */ s("div", { className: "space-y-1", children: [
|
|
502
|
+
/* @__PURE__ */ s("span", { className: "flex items-center gap-1.5 text-[11px] font-medium text-slate-500 dark:text-muted-foreground", children: [
|
|
503
|
+
cr(r),
|
|
500
504
|
r.restricted && /* @__PURE__ */ t(
|
|
501
505
|
"span",
|
|
502
506
|
{
|
|
@@ -506,249 +510,278 @@ function He({
|
|
|
506
510
|
}
|
|
507
511
|
)
|
|
508
512
|
] }),
|
|
509
|
-
|
|
513
|
+
N
|
|
510
514
|
] }) : r.restricted ? /* @__PURE__ */ t(
|
|
511
515
|
"div",
|
|
512
516
|
{
|
|
513
517
|
title: "Options limited to your restricted scope",
|
|
514
518
|
className: "[&_button]:!border-amber-400 [&_input]:!border-amber-400 dark:[&_button]:!border-amber-500/60 dark:[&_input]:!border-amber-500/60",
|
|
515
|
-
children:
|
|
519
|
+
children: N
|
|
516
520
|
}
|
|
517
|
-
) : /* @__PURE__ */ t(
|
|
521
|
+
) : /* @__PURE__ */ t(U, { children: N });
|
|
518
522
|
}
|
|
519
|
-
function
|
|
523
|
+
function cr(r) {
|
|
520
524
|
return r.placeholder.replace(/^Search\s+/i, "").replace(/[…]|\.{3}$/g, "");
|
|
521
525
|
}
|
|
522
|
-
function
|
|
526
|
+
function Tr(r, d) {
|
|
523
527
|
const o = (c) => {
|
|
524
|
-
var
|
|
525
|
-
return ((n = (
|
|
528
|
+
var b, n;
|
|
529
|
+
return ((n = (b = r.options) == null ? void 0 : b.find((p) => p.value === c)) == null ? void 0 : n.label) ?? c;
|
|
526
530
|
};
|
|
527
|
-
if (Array.isArray(
|
|
528
|
-
const c =
|
|
531
|
+
if (Array.isArray(d)) {
|
|
532
|
+
const c = d.map(o);
|
|
529
533
|
return c.slice(0, 2).join(", ") + (c.length > 2 ? ` +${c.length - 2}` : "");
|
|
530
534
|
}
|
|
531
535
|
if (r.type === "range") {
|
|
532
|
-
const [c,
|
|
533
|
-
return [c && `≥${c}`,
|
|
536
|
+
const [c, b] = d.split(":");
|
|
537
|
+
return [c && `≥${c}`, b && `≤${b}`].filter(Boolean).join(" ");
|
|
534
538
|
}
|
|
535
|
-
return o(
|
|
539
|
+
return o(d);
|
|
536
540
|
}
|
|
537
|
-
function
|
|
541
|
+
function Ar({
|
|
538
542
|
columns: r,
|
|
539
|
-
rows:
|
|
543
|
+
rows: d,
|
|
540
544
|
rowKey: o,
|
|
541
545
|
total: c,
|
|
542
|
-
page:
|
|
546
|
+
page: b,
|
|
543
547
|
limit: n = 25,
|
|
544
|
-
isLoading:
|
|
545
|
-
isError:
|
|
546
|
-
errorMessage:
|
|
547
|
-
onRetry:
|
|
548
|
-
sort:
|
|
549
|
-
onSortChange:
|
|
550
|
-
onPageChange:
|
|
548
|
+
isLoading: p,
|
|
549
|
+
isError: k,
|
|
550
|
+
errorMessage: v,
|
|
551
|
+
onRetry: N,
|
|
552
|
+
sort: f = "",
|
|
553
|
+
onSortChange: m,
|
|
554
|
+
onPageChange: w,
|
|
551
555
|
onRowClick: a,
|
|
552
|
-
onRowContextMenu:
|
|
556
|
+
onRowContextMenu: E,
|
|
553
557
|
searchValue: O,
|
|
554
|
-
onSearchChange:
|
|
555
|
-
searchPlaceholder:
|
|
556
|
-
filterDefs:
|
|
558
|
+
onSearchChange: K,
|
|
559
|
+
searchPlaceholder: ae = "Search…",
|
|
560
|
+
filterDefs: T,
|
|
557
561
|
filterValues: x = {},
|
|
558
|
-
onFilterChange:
|
|
559
|
-
toolbarRight:
|
|
560
|
-
emptyMessage:
|
|
561
|
-
minBodyHeight:
|
|
562
|
-
fillHeight:
|
|
563
|
-
footer:
|
|
564
|
-
hideFilterRow:
|
|
565
|
-
nowrapCells:
|
|
566
|
-
density:
|
|
562
|
+
onFilterChange: M,
|
|
563
|
+
toolbarRight: A,
|
|
564
|
+
emptyMessage: F = "No records found.",
|
|
565
|
+
minBodyHeight: at,
|
|
566
|
+
fillHeight: le = !1,
|
|
567
|
+
footer: lt,
|
|
568
|
+
hideFilterRow: nt = !1,
|
|
569
|
+
nowrapCells: st = !1,
|
|
570
|
+
density: fe = "comfortable",
|
|
567
571
|
pinFirstColumn: j = !1,
|
|
568
|
-
columnPins:
|
|
569
|
-
onColumnPinChange:
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
572
|
+
columnPins: g,
|
|
573
|
+
onColumnPinChange: xe,
|
|
574
|
+
pinKeepRank: ye,
|
|
575
|
+
pinRightShare: it,
|
|
576
|
+
columnFilterRow: dt = !1,
|
|
577
|
+
hScrollProxy: Me = !1,
|
|
578
|
+
selectedIds: V,
|
|
579
|
+
onSelectionChange: C,
|
|
580
|
+
rowClassName: ge,
|
|
581
|
+
rowDragProps: ke,
|
|
582
|
+
rowTitle: ve,
|
|
583
|
+
enterKey: ct,
|
|
584
|
+
rowGroups: W,
|
|
585
|
+
collapsedGroups: D,
|
|
586
|
+
onToggleGroup: Ne,
|
|
587
|
+
onRowFocus: J,
|
|
588
|
+
activeRowKey: ne,
|
|
589
|
+
rowAriaLabel: we,
|
|
590
|
+
totalsRow: P
|
|
585
591
|
}) {
|
|
586
|
-
const
|
|
587
|
-
!e.sortable || !
|
|
588
|
-
},
|
|
589
|
-
if (!
|
|
590
|
-
const e =
|
|
591
|
-
return [...
|
|
592
|
-
}, [r,
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
const
|
|
592
|
+
const G = Math.ceil(c / n), Te = (b - 1) * n + 1, Ae = Math.min(b * n, c), je = !nt && T && T.length > 0, ot = O !== void 0 || je || A !== void 0, Ve = (e) => {
|
|
593
|
+
!e.sortable || !m || m(rr(f, e.key));
|
|
594
|
+
}, _ = g !== void 0, [We, bt] = $([]), R = Qe(() => {
|
|
595
|
+
if (!_ || !g) return r;
|
|
596
|
+
const e = new Set(We), l = (S) => g[S] === "right" && !e.has(S), i = r.filter((S) => g[S.key] === "left"), z = r.filter((S) => l(S.key)), B = r.filter((S) => g[S.key] !== "left" && !l(S.key));
|
|
597
|
+
return [...i, ...B, ...z];
|
|
598
|
+
}, [r, g, _, We]), Be = oe({}), H = oe(null);
|
|
599
|
+
Mt(H);
|
|
600
|
+
const Le = oe(null), Fe = !p && (W ? W.length === 0 : d.length === 0), [Re, pt] = $(null);
|
|
601
|
+
re(() => {
|
|
602
|
+
const e = H.current;
|
|
603
|
+
if (!Fe || !e) return;
|
|
604
|
+
const l = () => pt(e.clientWidth);
|
|
597
605
|
if (l(), typeof ResizeObserver > "u") return;
|
|
598
|
-
const
|
|
599
|
-
return
|
|
600
|
-
}, [
|
|
601
|
-
const [
|
|
602
|
-
|
|
603
|
-
const e =
|
|
604
|
-
if (!
|
|
605
|
-
const l = new ResizeObserver(() =>
|
|
606
|
+
const i = new ResizeObserver(l);
|
|
607
|
+
return i.observe(e), () => i.disconnect();
|
|
608
|
+
}, [Fe]);
|
|
609
|
+
const [ee, mt] = $({}), [, ht] = $(0), _e = Ft(), X = le && _e ? void 0 : at;
|
|
610
|
+
re(() => {
|
|
611
|
+
const e = H.current;
|
|
612
|
+
if (!_ || !e || typeof ResizeObserver > "u") return;
|
|
613
|
+
const l = new ResizeObserver(() => ht(e.clientWidth));
|
|
606
614
|
return l.observe(e), () => l.disconnect();
|
|
607
|
-
}, [
|
|
608
|
-
var
|
|
609
|
-
if (!
|
|
610
|
-
const e = (
|
|
611
|
-
var
|
|
612
|
-
return ((
|
|
613
|
-
}, l =
|
|
614
|
-
|
|
615
|
-
|
|
615
|
+
}, [_, p]), $t(() => {
|
|
616
|
+
var De, Je;
|
|
617
|
+
if (!_ || !g) return;
|
|
618
|
+
const e = (u) => {
|
|
619
|
+
var L;
|
|
620
|
+
return ((L = Be.current[u]) == null ? void 0 : L.getBoundingClientRect().width) ?? 120;
|
|
621
|
+
}, l = C ? ((De = Le.current) == null ? void 0 : De.getBoundingClientRect().width) ?? 40 : 0;
|
|
622
|
+
let i = null;
|
|
623
|
+
const z = (u) => {
|
|
624
|
+
var Xe;
|
|
625
|
+
i ?? (i = [
|
|
626
|
+
...((Xe = H.current) == null ? void 0 : Xe.querySelectorAll("tbody td[data-dt-col]")) ?? []
|
|
627
|
+
]);
|
|
628
|
+
const L = i.filter((te) => te.dataset.dtCol === u);
|
|
629
|
+
if (L.length === 0) return !1;
|
|
630
|
+
for (const te of L) {
|
|
631
|
+
if (te.querySelector("[data-cell-empty]")) continue;
|
|
632
|
+
if (te.querySelector("img, svg, button, input, a")) return !1;
|
|
633
|
+
const Se = (te.textContent ?? "").trim();
|
|
634
|
+
if (Se !== "" && Se !== "—" && Se !== "-") return !1;
|
|
635
|
+
}
|
|
636
|
+
return !0;
|
|
637
|
+
}, B = r.filter((u) => g[u.key] === "right").map((u) => u.key), { left: S, right: y } = Lt(
|
|
638
|
+
R.filter((u) => g[u.key] === "left").map((u) => u.key),
|
|
639
|
+
B,
|
|
616
640
|
e,
|
|
617
641
|
l,
|
|
618
|
-
((
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
642
|
+
((Je = H.current) == null ? void 0 : Je.clientWidth) ?? 0,
|
|
643
|
+
{
|
|
644
|
+
compact: _e,
|
|
645
|
+
rightShare: it,
|
|
646
|
+
rank: ye ? (u) => z(u) ? -1e6 : ye(u) : void 0
|
|
647
|
+
}
|
|
648
|
+
), Q = ye && !_e ? B.filter((u) => !y.includes(u)) : [];
|
|
649
|
+
bt((u) => u.join("|") === Q.join("|") ? u : Q);
|
|
650
|
+
const ie = {};
|
|
651
|
+
let He = l;
|
|
652
|
+
S.forEach((u, L) => {
|
|
653
|
+
ie[u] = { side: "left", offset: Math.floor(He), seam: L === S.length - 1 }, He += e(u);
|
|
623
654
|
});
|
|
624
|
-
let
|
|
625
|
-
for (let
|
|
626
|
-
const
|
|
627
|
-
L
|
|
655
|
+
let Ue = 0;
|
|
656
|
+
for (let u = y.length - 1; u >= 0; u--) {
|
|
657
|
+
const L = y[u];
|
|
658
|
+
ie[L] = { side: "right", offset: Math.floor(Ue), seam: u === 0 }, Ue += e(L);
|
|
628
659
|
}
|
|
629
|
-
|
|
660
|
+
mt((u) => JSON.stringify(u) === JSON.stringify(ie) ? u : ie);
|
|
630
661
|
});
|
|
631
|
-
const
|
|
632
|
-
const l =
|
|
633
|
-
if (!(!
|
|
662
|
+
const se = (e) => {
|
|
663
|
+
const l = ee[e];
|
|
664
|
+
if (!(!_ || !l))
|
|
634
665
|
return l.side === "left" ? { left: l.offset } : { right: l.offset };
|
|
635
|
-
},
|
|
636
|
-
const
|
|
637
|
-
if (!(!
|
|
666
|
+
}, Oe = (e, l) => {
|
|
667
|
+
const i = ee[e];
|
|
668
|
+
if (!(!_ || !i))
|
|
638
669
|
return h(
|
|
639
670
|
// dt-pinned: pinned headers offset via inline style (not left-0), so the
|
|
640
671
|
// fillHeight wrapper's z variants need a CLASS to elevate them above the
|
|
641
672
|
// other header cells — same-z siblings paint in DOM order and a later
|
|
642
673
|
// header scrolls OVER the pinned one otherwise.
|
|
643
674
|
l ? "dt-pinned sticky z-[2]" : "sticky z-[1] bg-inherit",
|
|
644
|
-
|
|
645
|
-
|
|
675
|
+
i.side === "left" && i.seam && "border-r border-slate-200 dark:border-border",
|
|
676
|
+
i.side === "right" && i.seam && "border-l border-slate-200 dark:border-border"
|
|
646
677
|
);
|
|
647
|
-
},
|
|
648
|
-
if (!
|
|
649
|
-
const l = (
|
|
650
|
-
|
|
651
|
-
},
|
|
678
|
+
}, ut = (e) => {
|
|
679
|
+
if (!xe) return;
|
|
680
|
+
const l = (g == null ? void 0 : g[e]) ?? null;
|
|
681
|
+
xe(e, l === null ? "left" : l === "left" ? "right" : null);
|
|
682
|
+
}, ft = Qe(() => {
|
|
652
683
|
const e = /* @__PURE__ */ new Map();
|
|
653
|
-
for (const l of
|
|
684
|
+
for (const l of T ?? []) e.set(l.key, l);
|
|
654
685
|
return e;
|
|
655
|
-
}, [
|
|
656
|
-
if (!
|
|
657
|
-
const e =
|
|
658
|
-
return
|
|
659
|
-
})(),
|
|
660
|
-
const
|
|
661
|
-
return /* @__PURE__ */
|
|
662
|
-
|
|
686
|
+
}, [T]), xt = dt && ((T == null ? void 0 : T.length) ?? 0) > 0, yt = (() => {
|
|
687
|
+
if (!J) return null;
|
|
688
|
+
const e = W ? W.flatMap((i) => D != null && D.has(i.key) ? [] : i.rows) : d, l = (i, z) => o ? o(i, z) : String(z);
|
|
689
|
+
return ne && e.some((i, z) => l(i, z) === ne) ? ne : e.length > 0 ? l(e[0], 0) : null;
|
|
690
|
+
})(), qe = (e, l) => {
|
|
691
|
+
const i = o ? o(e, l) : String(l), z = (V == null ? void 0 : V.includes(i)) ?? !1, B = !!J, S = B && i === yt;
|
|
692
|
+
return /* @__PURE__ */ s(
|
|
693
|
+
Z,
|
|
663
694
|
{
|
|
664
|
-
...
|
|
695
|
+
...ke == null ? void 0 : ke(e),
|
|
665
696
|
className: h(
|
|
666
697
|
// NAMED group: queue cells already use bare `group-hover:` against
|
|
667
698
|
// their own local group, and claiming the unnamed one here would
|
|
668
699
|
// make those reveal on row hover instead.
|
|
669
700
|
"group/row nvr-row-enter border-slate-100 transition-colors duration-150",
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
701
|
+
J && "focus-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-nvr-cyan",
|
|
702
|
+
// Pinned: opaque surface AND opaque hover (the base row's hover:bg-muted/50 is
|
|
703
|
+
// translucent, so the pinned cells would go see-through under the pointer).
|
|
704
|
+
(j || _) && `${Wt} ${Bt}`,
|
|
705
|
+
a && (j || _ ? "cursor-pointer" : "cursor-pointer hover:bg-slate-50/80"),
|
|
706
|
+
ge == null ? void 0 : ge(e),
|
|
674
707
|
// Pinned sticky cells use bg-inherit, so a selected row's bg must be
|
|
675
708
|
// OPAQUE or horizontally-scrolled content bleeds through the pinned
|
|
676
|
-
// column
|
|
677
|
-
|
|
678
|
-
w && (j || N ? "bg-[#f2fdff] dark:bg-[#20303a]" : "bg-nvr-cyan/5")
|
|
709
|
+
// column (lib/row-surface.ts: the accent mixed over the card).
|
|
710
|
+
z && (j || _ ? Vt : "bg-nvr-cyan/5")
|
|
679
711
|
),
|
|
680
712
|
style: { animationDelay: `${Math.min(l, 14) * 16}ms` },
|
|
681
|
-
"data-row-key":
|
|
682
|
-
title:
|
|
713
|
+
"data-row-key": i,
|
|
714
|
+
title: ve == null ? void 0 : ve(e),
|
|
683
715
|
onClick: () => a == null ? void 0 : a(e),
|
|
684
|
-
onContextMenu:
|
|
685
|
-
...
|
|
686
|
-
tabIndex:
|
|
687
|
-
"aria-current":
|
|
688
|
-
"aria-label":
|
|
689
|
-
onFocus: (
|
|
690
|
-
|
|
716
|
+
onContextMenu: E ? (y) => E(e, y) : void 0,
|
|
717
|
+
...B ? {
|
|
718
|
+
tabIndex: S ? 0 : -1,
|
|
719
|
+
"aria-current": S && ne === i ? "true" : void 0,
|
|
720
|
+
"aria-label": we == null ? void 0 : we(e),
|
|
721
|
+
onFocus: (y) => {
|
|
722
|
+
y.target === y.currentTarget && (J == null || J(e));
|
|
691
723
|
},
|
|
692
|
-
onKeyDown: (
|
|
693
|
-
|
|
724
|
+
onKeyDown: (y) => {
|
|
725
|
+
y.key !== "Enter" || y.target !== y.currentTarget || !a || (y.preventDefault(), a(e));
|
|
694
726
|
}
|
|
695
727
|
} : {},
|
|
696
728
|
children: [
|
|
697
|
-
|
|
698
|
-
|
|
729
|
+
C && /* @__PURE__ */ t(
|
|
730
|
+
ce,
|
|
699
731
|
{
|
|
700
732
|
className: h(
|
|
701
733
|
"w-9 px-3",
|
|
702
|
-
|
|
703
|
-
(j ||
|
|
734
|
+
fe === "compact" ? "py-1" : "py-2",
|
|
735
|
+
(j || _) && "sticky left-0 z-[1] min-w-[40px] bg-inherit"
|
|
704
736
|
),
|
|
705
|
-
onClick: (
|
|
706
|
-
|
|
737
|
+
onClick: (y) => {
|
|
738
|
+
y.stopPropagation(), C(z ? (V == null ? void 0 : V.filter((Q) => Q !== i)) ?? [] : [...V ?? [], i]);
|
|
707
739
|
},
|
|
708
|
-
children: /* @__PURE__ */ t(
|
|
740
|
+
children: /* @__PURE__ */ t(Ie, { checked: z, "aria-label": "Select row" })
|
|
709
741
|
}
|
|
710
742
|
),
|
|
711
|
-
|
|
712
|
-
|
|
743
|
+
R.map((y, Q) => /* @__PURE__ */ t(
|
|
744
|
+
ce,
|
|
713
745
|
{
|
|
714
|
-
|
|
746
|
+
"data-dt-col": y.key,
|
|
747
|
+
style: se(y.key),
|
|
715
748
|
className: h(
|
|
716
749
|
"px-3",
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
!
|
|
750
|
+
fe === "compact" ? "py-1" : "py-2",
|
|
751
|
+
st && "whitespace-nowrap",
|
|
752
|
+
!_ && j && Q === 0 && h(
|
|
720
753
|
"sticky z-[1] border-r border-slate-100 bg-inherit dark:border-border",
|
|
721
|
-
|
|
754
|
+
C ? "left-[39px]" : "left-0"
|
|
722
755
|
),
|
|
723
|
-
|
|
724
|
-
|
|
756
|
+
Oe(y.key, !1),
|
|
757
|
+
y.className
|
|
725
758
|
),
|
|
726
|
-
children:
|
|
759
|
+
children: y.render ? y.render(e, l) : String(e[y.key] ?? "—")
|
|
727
760
|
},
|
|
728
|
-
|
|
761
|
+
y.key
|
|
729
762
|
))
|
|
730
763
|
]
|
|
731
764
|
},
|
|
732
|
-
|
|
765
|
+
i
|
|
733
766
|
);
|
|
734
767
|
};
|
|
735
|
-
return /* @__PURE__ */
|
|
736
|
-
/* @__PURE__ */ t(
|
|
737
|
-
|
|
768
|
+
return /* @__PURE__ */ s(U, { children: [
|
|
769
|
+
/* @__PURE__ */ t(Rt, {}),
|
|
770
|
+
k && v && /* @__PURE__ */ s(
|
|
738
771
|
"div",
|
|
739
772
|
{
|
|
740
773
|
role: "alert",
|
|
741
774
|
className: "mb-4 flex flex-wrap items-center gap-x-3 gap-y-1 rounded-md border border-red-200 bg-red-50 px-4 py-2.5 text-[13px] text-red-700 dark:border-red-500/30 dark:bg-red-500/10 dark:text-red-300",
|
|
742
775
|
children: [
|
|
743
|
-
/* @__PURE__ */
|
|
744
|
-
|
|
745
|
-
|
|
776
|
+
/* @__PURE__ */ s("span", { children: [
|
|
777
|
+
v,
|
|
778
|
+
d.length > 0 && " Showing the last list that loaded."
|
|
746
779
|
] }),
|
|
747
|
-
|
|
780
|
+
N && /* @__PURE__ */ t(
|
|
748
781
|
"button",
|
|
749
782
|
{
|
|
750
783
|
type: "button",
|
|
751
|
-
onClick:
|
|
784
|
+
onClick: N,
|
|
752
785
|
className: "font-medium underline underline-offset-2 hover:text-red-900 dark:hover:text-red-200",
|
|
753
786
|
children: "Try again"
|
|
754
787
|
}
|
|
@@ -756,40 +789,40 @@ function or({
|
|
|
756
789
|
]
|
|
757
790
|
}
|
|
758
791
|
),
|
|
759
|
-
/* @__PURE__ */
|
|
792
|
+
/* @__PURE__ */ s(
|
|
760
793
|
"div",
|
|
761
794
|
{
|
|
762
795
|
className: h(
|
|
763
796
|
"overflow-hidden rounded-lg border border-slate-200 bg-white",
|
|
764
|
-
|
|
797
|
+
le && "flex h-full min-h-0 flex-col"
|
|
765
798
|
),
|
|
766
799
|
children: [
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
/* @__PURE__ */ t(
|
|
800
|
+
ot && /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-2 border-b border-slate-100 px-3 py-2.5", children: [
|
|
801
|
+
K !== void 0 && /* @__PURE__ */ s("div", { className: "relative min-w-0 max-w-full", children: [
|
|
802
|
+
/* @__PURE__ */ t(gt, { className: "absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-slate-400" }),
|
|
770
803
|
/* @__PURE__ */ t(
|
|
771
|
-
|
|
804
|
+
q,
|
|
772
805
|
{
|
|
773
806
|
className: "h-8 w-56 max-w-full border-slate-200 bg-slate-50 pl-8 text-[13px]",
|
|
774
|
-
placeholder:
|
|
807
|
+
placeholder: ae,
|
|
775
808
|
value: O ?? "",
|
|
776
|
-
onChange: (e) =>
|
|
809
|
+
onChange: (e) => K(e.target.value)
|
|
777
810
|
}
|
|
778
811
|
)
|
|
779
812
|
] }),
|
|
780
|
-
|
|
781
|
-
|
|
813
|
+
je && (T == null ? void 0 : T.map((e) => /* @__PURE__ */ t(
|
|
814
|
+
rt,
|
|
782
815
|
{
|
|
783
816
|
def: e,
|
|
784
817
|
value: x[e.key] ?? "",
|
|
785
|
-
onChange: (l) =>
|
|
818
|
+
onChange: (l) => M == null ? void 0 : M(e.key, l)
|
|
786
819
|
},
|
|
787
820
|
e.key
|
|
788
821
|
))),
|
|
789
822
|
/* @__PURE__ */ t("div", { className: "flex-1" }),
|
|
790
|
-
|
|
823
|
+
A
|
|
791
824
|
] }),
|
|
792
|
-
|
|
825
|
+
p ? (
|
|
793
826
|
// #3229 — the real header (same labels, h-9) over rows with the real cell padding
|
|
794
827
|
// and line height for this density, in the body's real minimum height: the table
|
|
795
828
|
// keeps its shape when the rows land.
|
|
@@ -798,13 +831,13 @@ function or({
|
|
|
798
831
|
{
|
|
799
832
|
"data-skeleton": "table",
|
|
800
833
|
"aria-busy": "true",
|
|
801
|
-
className: h(
|
|
802
|
-
style:
|
|
803
|
-
children: /* @__PURE__ */
|
|
804
|
-
/* @__PURE__ */ t(
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
834
|
+
className: h(le && "min-h-0 flex-1 overflow-hidden"),
|
|
835
|
+
style: X ? { minHeight: X } : void 0,
|
|
836
|
+
children: /* @__PURE__ */ s(Pe, { className: "border-separate border-spacing-0", children: [
|
|
837
|
+
/* @__PURE__ */ t(Ge, { children: /* @__PURE__ */ s(Z, { className: "border-b border-slate-200 hover:bg-transparent", children: [
|
|
838
|
+
C && /* @__PURE__ */ t(I, { className: "h-9 w-9 border-b border-slate-200 bg-slate-50 px-3 py-0 dark:border-border dark:bg-muted" }),
|
|
839
|
+
R.map((e) => /* @__PURE__ */ t(
|
|
840
|
+
I,
|
|
808
841
|
{
|
|
809
842
|
className: h(
|
|
810
843
|
"h-9 whitespace-nowrap border-b border-slate-200 bg-slate-50 px-3 py-0 text-[11px] font-medium text-slate-500 dark:border-border dark:bg-muted",
|
|
@@ -815,59 +848,59 @@ function or({
|
|
|
815
848
|
e.key
|
|
816
849
|
))
|
|
817
850
|
] }) }),
|
|
818
|
-
/* @__PURE__ */ t(
|
|
819
|
-
|
|
851
|
+
/* @__PURE__ */ t(et, { children: /* @__PURE__ */ t(
|
|
852
|
+
Dt,
|
|
820
853
|
{
|
|
821
|
-
columns:
|
|
822
|
-
rows: Math.min(Math.max(n ??
|
|
854
|
+
columns: R.map((e) => ({ key: e.key })),
|
|
855
|
+
rows: Math.min(Math.max(n ?? er.length, 1), 15),
|
|
823
856
|
rowClassName: "",
|
|
824
|
-
cellClassName: h("px-3",
|
|
825
|
-
leadingCells:
|
|
857
|
+
cellClassName: h("px-3", fe === "compact" ? "py-1" : "py-2"),
|
|
858
|
+
leadingCells: C ? 1 : 0
|
|
826
859
|
}
|
|
827
860
|
) })
|
|
828
861
|
] })
|
|
829
862
|
}
|
|
830
863
|
)
|
|
831
|
-
) : /* @__PURE__ */
|
|
864
|
+
) : /* @__PURE__ */ s(U, { children: [
|
|
832
865
|
/* @__PURE__ */ t(
|
|
833
866
|
"div",
|
|
834
867
|
{
|
|
835
|
-
ref:
|
|
868
|
+
ref: H,
|
|
836
869
|
className: h(
|
|
837
|
-
|
|
870
|
+
Me && "overflow-x-hidden [&>div]:overflow-visible",
|
|
838
871
|
// Bounded mode: rows scroll here under a sticky header. Header
|
|
839
872
|
// cells sit above pinned body cells (z-[1/2]); the pinned
|
|
840
873
|
// header corner (left-0) tops the other header cells so
|
|
841
874
|
// horizontal scroll cannot bleed through it.
|
|
842
|
-
|
|
875
|
+
le && "min-h-0 flex-1 overflow-y-auto [&_thead_th]:sticky [&_thead_th]:top-0 [&_thead_th]:z-[5] [&_thead_th.left-0]:z-[6] [&_thead_th.dt-pinned]:z-[6]"
|
|
843
876
|
),
|
|
844
|
-
style:
|
|
845
|
-
children: /* @__PURE__ */
|
|
846
|
-
|
|
877
|
+
style: X ? { minHeight: X } : void 0,
|
|
878
|
+
children: /* @__PURE__ */ s(
|
|
879
|
+
Pe,
|
|
847
880
|
{
|
|
848
881
|
"data-copy-cells": "",
|
|
849
882
|
className: "border-separate border-spacing-0 [&>tbody>tr.border-b:not(:last-child)>td]:border-b [&>tbody>tr.border-b:not(:last-child)>td]:[border-bottom-color:inherit] [&>thead>tr.border-b>th]:border-b [&>thead>tr.border-b>th]:[border-bottom-color:inherit]",
|
|
850
883
|
children: [
|
|
851
|
-
/* @__PURE__ */
|
|
852
|
-
/* @__PURE__ */
|
|
853
|
-
|
|
854
|
-
|
|
884
|
+
/* @__PURE__ */ s(Ge, { children: [
|
|
885
|
+
/* @__PURE__ */ s(Z, { className: "border-b border-slate-200 hover:bg-transparent", children: [
|
|
886
|
+
C && /* @__PURE__ */ t(
|
|
887
|
+
I,
|
|
855
888
|
{
|
|
856
|
-
ref:
|
|
889
|
+
ref: Le,
|
|
857
890
|
className: h(
|
|
858
891
|
"h-9 w-9 bg-slate-50 px-3 py-0",
|
|
859
|
-
(j ||
|
|
892
|
+
(j || _) && "sticky left-0 z-[2] min-w-[40px]"
|
|
860
893
|
),
|
|
861
894
|
children: /* @__PURE__ */ t(
|
|
862
|
-
|
|
895
|
+
Ie,
|
|
863
896
|
{
|
|
864
|
-
checked:
|
|
865
|
-
const
|
|
866
|
-
return
|
|
897
|
+
checked: d.length > 0 && d.every((e, l) => {
|
|
898
|
+
const i = o ? o(e, l) : String(l);
|
|
899
|
+
return V == null ? void 0 : V.includes(i);
|
|
867
900
|
}),
|
|
868
901
|
onCheckedChange: (e) => {
|
|
869
|
-
|
|
870
|
-
e ?
|
|
902
|
+
C(
|
|
903
|
+
e ? d.map((l, i) => o ? o(l, i) : String(i)) : []
|
|
871
904
|
);
|
|
872
905
|
},
|
|
873
906
|
"aria-label": "Select all"
|
|
@@ -875,32 +908,32 @@ function or({
|
|
|
875
908
|
)
|
|
876
909
|
}
|
|
877
910
|
),
|
|
878
|
-
|
|
879
|
-
|
|
911
|
+
R.map((e, l) => /* @__PURE__ */ t(
|
|
912
|
+
I,
|
|
880
913
|
{
|
|
881
|
-
ref: (
|
|
882
|
-
|
|
914
|
+
ref: (i) => {
|
|
915
|
+
Be.current[e.key] = i;
|
|
883
916
|
},
|
|
884
|
-
style:
|
|
917
|
+
style: se(e.key),
|
|
885
918
|
className: h(
|
|
886
919
|
"group/th group/hcell h-9 whitespace-nowrap bg-slate-50 px-3 py-0 text-[11px] font-medium text-slate-500",
|
|
887
|
-
e.sortable &&
|
|
888
|
-
!
|
|
920
|
+
e.sortable && m && "cursor-pointer select-none hover:text-slate-600",
|
|
921
|
+
!_ && j && l === 0 && h(
|
|
889
922
|
"sticky z-[2] border-r border-slate-200 dark:border-border",
|
|
890
|
-
|
|
923
|
+
C ? "left-[39px]" : "left-0"
|
|
891
924
|
),
|
|
892
|
-
|
|
893
|
-
|
|
925
|
+
_ && "bg-slate-50 dark:bg-muted",
|
|
926
|
+
Oe(e.key, !0),
|
|
894
927
|
e.headerClassName
|
|
895
928
|
),
|
|
896
|
-
onClick: () =>
|
|
897
|
-
"aria-sort": e.sortable &&
|
|
898
|
-
tabIndex: e.sortable &&
|
|
899
|
-
onKeyDown: e.sortable &&
|
|
900
|
-
|
|
929
|
+
onClick: () => Ve(e),
|
|
930
|
+
"aria-sort": e.sortable && m ? lr(f, e.key) : void 0,
|
|
931
|
+
tabIndex: e.sortable && m && !$e(e.header) ? 0 : void 0,
|
|
932
|
+
onKeyDown: e.sortable && m && !$e(e.header) ? (i) => {
|
|
933
|
+
i.target === i.currentTarget && (i.key === "Enter" || i.key === " ") && (i.preventDefault(), Ve(e));
|
|
901
934
|
} : void 0,
|
|
902
|
-
children: /* @__PURE__ */
|
|
903
|
-
e.sortable &&
|
|
935
|
+
children: /* @__PURE__ */ s("span", { className: "inline-flex items-center", children: [
|
|
936
|
+
e.sortable && m && $e(e.header) ? /* @__PURE__ */ s(
|
|
904
937
|
"button",
|
|
905
938
|
{
|
|
906
939
|
type: "button",
|
|
@@ -908,32 +941,32 @@ function or({
|
|
|
908
941
|
"data-dt-sort": e.key,
|
|
909
942
|
children: [
|
|
910
943
|
e.header,
|
|
911
|
-
/* @__PURE__ */ t(
|
|
944
|
+
/* @__PURE__ */ t(tt, { field: e.key, sort: f })
|
|
912
945
|
]
|
|
913
946
|
}
|
|
914
|
-
) : /* @__PURE__ */
|
|
947
|
+
) : /* @__PURE__ */ s(U, { children: [
|
|
915
948
|
e.header,
|
|
916
|
-
e.sortable &&
|
|
949
|
+
e.sortable && m && /* @__PURE__ */ t(tt, { field: e.key, sort: f })
|
|
917
950
|
] }),
|
|
918
|
-
|
|
951
|
+
_ && xe && e.key !== "claim" && /* @__PURE__ */ t(
|
|
919
952
|
"button",
|
|
920
953
|
{
|
|
921
954
|
type: "button",
|
|
922
|
-
onClick: (
|
|
923
|
-
|
|
955
|
+
onClick: (i) => {
|
|
956
|
+
i.stopPropagation(), ut(e.key);
|
|
924
957
|
},
|
|
925
|
-
"aria-label": `Pin column ${
|
|
926
|
-
title: (
|
|
958
|
+
"aria-label": `Pin column ${tr(e)}`,
|
|
959
|
+
title: (g == null ? void 0 : g[e.key]) === "left" ? "Pinned left — click to pin right" : (g == null ? void 0 : g[e.key]) === "right" ? "Pinned right — click to unpin" : "Pin column",
|
|
927
960
|
className: h(
|
|
928
961
|
"ml-1 rounded p-0.5 transition-opacity",
|
|
929
|
-
|
|
962
|
+
g != null && g[e.key] ? "text-nvr-cyan opacity-100" : "text-slate-300 opacity-0 hover:text-slate-500 group-hover/th:opacity-100"
|
|
930
963
|
),
|
|
931
964
|
children: /* @__PURE__ */ t(
|
|
932
|
-
|
|
965
|
+
kt,
|
|
933
966
|
{
|
|
934
967
|
className: h(
|
|
935
968
|
"h-3 w-3",
|
|
936
|
-
(
|
|
969
|
+
(g == null ? void 0 : g[e.key]) === "right" && "rotate-90"
|
|
937
970
|
)
|
|
938
971
|
}
|
|
939
972
|
)
|
|
@@ -945,33 +978,33 @@ function or({
|
|
|
945
978
|
e.key
|
|
946
979
|
))
|
|
947
980
|
] }),
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
981
|
+
xt && /* @__PURE__ */ s(Z, { className: "border-b border-slate-200 hover:bg-transparent", children: [
|
|
982
|
+
C && /* @__PURE__ */ t(
|
|
983
|
+
I,
|
|
951
984
|
{
|
|
952
985
|
className: h(
|
|
953
986
|
"h-9 w-9 bg-slate-50 px-3 py-1",
|
|
954
|
-
(j ||
|
|
987
|
+
(j || _) && "sticky left-0 z-[2] min-w-[40px]"
|
|
955
988
|
)
|
|
956
989
|
}
|
|
957
990
|
),
|
|
958
|
-
|
|
959
|
-
const l =
|
|
991
|
+
R.map((e) => {
|
|
992
|
+
const l = ft.get(e.key);
|
|
960
993
|
return /* @__PURE__ */ t(
|
|
961
|
-
|
|
994
|
+
I,
|
|
962
995
|
{
|
|
963
|
-
style:
|
|
996
|
+
style: se(e.key),
|
|
964
997
|
className: h(
|
|
965
998
|
"h-9 bg-slate-50 px-1.5 py-1 align-middle",
|
|
966
|
-
|
|
967
|
-
|
|
999
|
+
_ && "bg-slate-50 dark:bg-muted",
|
|
1000
|
+
Oe(e.key, !0)
|
|
968
1001
|
),
|
|
969
|
-
children: l &&
|
|
970
|
-
|
|
1002
|
+
children: l && M ? /* @__PURE__ */ t(
|
|
1003
|
+
rt,
|
|
971
1004
|
{
|
|
972
1005
|
def: l,
|
|
973
1006
|
value: x[l.key] ?? "",
|
|
974
|
-
onChange: (
|
|
1007
|
+
onChange: (i) => M(l.key, i),
|
|
975
1008
|
layout: "cell"
|
|
976
1009
|
}
|
|
977
1010
|
) : null
|
|
@@ -981,23 +1014,24 @@ function or({
|
|
|
981
1014
|
})
|
|
982
1015
|
] })
|
|
983
1016
|
] }),
|
|
984
|
-
/* @__PURE__ */
|
|
985
|
-
|
|
986
|
-
const l = (
|
|
987
|
-
return /* @__PURE__ */
|
|
1017
|
+
/* @__PURE__ */ s(et, { className: "tabular-nums", children: [
|
|
1018
|
+
W ? W.map((e) => {
|
|
1019
|
+
const l = (D == null ? void 0 : D.has(e.key)) ?? !1;
|
|
1020
|
+
return /* @__PURE__ */ s(St.Fragment, { children: [
|
|
988
1021
|
/* @__PURE__ */ t(
|
|
989
|
-
|
|
1022
|
+
Z,
|
|
990
1023
|
{
|
|
1024
|
+
"data-group-key": e.key,
|
|
991
1025
|
className: "nvr-row-enter cursor-pointer border-slate-200 bg-slate-50/80 transition-colors hover:bg-slate-100/80 dark:bg-muted/40",
|
|
992
|
-
onClick: () =>
|
|
1026
|
+
onClick: () => Ne == null ? void 0 : Ne(e.key),
|
|
993
1027
|
children: /* @__PURE__ */ t(
|
|
994
|
-
|
|
1028
|
+
ce,
|
|
995
1029
|
{
|
|
996
|
-
colSpan: r.length + (
|
|
1030
|
+
colSpan: r.length + (C ? 1 : 0),
|
|
997
1031
|
className: "px-3 py-1.5",
|
|
998
|
-
children: /* @__PURE__ */
|
|
1032
|
+
children: /* @__PURE__ */ s("span", { className: "flex items-center gap-1.5 text-[12px] font-medium text-slate-600 dark:text-foreground", children: [
|
|
999
1033
|
/* @__PURE__ */ t(
|
|
1000
|
-
|
|
1034
|
+
vt,
|
|
1001
1035
|
{
|
|
1002
1036
|
className: h(
|
|
1003
1037
|
"h-3.5 w-3.5 text-slate-400 transition-transform duration-200",
|
|
@@ -1011,58 +1045,58 @@ function or({
|
|
|
1011
1045
|
)
|
|
1012
1046
|
}
|
|
1013
1047
|
),
|
|
1014
|
-
!l && e.rows.map((
|
|
1048
|
+
!l && e.rows.map((i, z) => qe(i, z))
|
|
1015
1049
|
] }, e.key);
|
|
1016
|
-
}) :
|
|
1017
|
-
(
|
|
1018
|
-
|
|
1050
|
+
}) : d.map((e, l) => qe(e, l)),
|
|
1051
|
+
(W ? W.length === 0 : d.length === 0) && /* @__PURE__ */ t(Z, { children: /* @__PURE__ */ t(
|
|
1052
|
+
ce,
|
|
1019
1053
|
{
|
|
1020
|
-
colSpan: r.length + (
|
|
1054
|
+
colSpan: r.length + (C ? 1 : 0),
|
|
1021
1055
|
className: "nvr-fade-in p-0 text-center align-middle text-[13px] text-slate-400",
|
|
1022
|
-
style:
|
|
1056
|
+
style: X ? { height: Math.max(96, X - 56) } : void 0,
|
|
1023
1057
|
children: /* @__PURE__ */ t(
|
|
1024
1058
|
"div",
|
|
1025
1059
|
{
|
|
1026
1060
|
className: "sticky left-0 py-12",
|
|
1027
|
-
style:
|
|
1061
|
+
style: Re ? { width: Re } : void 0,
|
|
1028
1062
|
"data-table-empty": !0,
|
|
1029
|
-
children: typeof
|
|
1063
|
+
children: typeof F == "string" ? /* @__PURE__ */ t(qt, { icon: Nt, title: F }) : F
|
|
1030
1064
|
}
|
|
1031
1065
|
)
|
|
1032
1066
|
}
|
|
1033
1067
|
) })
|
|
1034
|
-
] },
|
|
1035
|
-
|
|
1036
|
-
/* @__PURE__ */ t("tfoot", { className: "text-[12px] tabular-nums", "data-dt-totals": !0, children: /* @__PURE__ */
|
|
1037
|
-
|
|
1068
|
+
] }, ct),
|
|
1069
|
+
P && !W && d.length > 0 && // Sticky per cell (not per row): a pinned cell sticks left/right AND bottom.
|
|
1070
|
+
/* @__PURE__ */ t("tfoot", { className: "text-[12px] tabular-nums", "data-dt-totals": !0, children: /* @__PURE__ */ s("tr", { children: [
|
|
1071
|
+
C && /* @__PURE__ */ t(
|
|
1038
1072
|
"td",
|
|
1039
1073
|
{
|
|
1040
1074
|
className: h(
|
|
1041
1075
|
"sticky bottom-0 z-[3] border-t-2 border-slate-200 bg-slate-50 px-3 py-1.5 dark:border-border dark:bg-muted",
|
|
1042
|
-
(j ||
|
|
1076
|
+
(j || _) && "left-0 z-[4]"
|
|
1043
1077
|
)
|
|
1044
1078
|
}
|
|
1045
1079
|
),
|
|
1046
1080
|
(() => {
|
|
1047
|
-
const e =
|
|
1048
|
-
(l) =>
|
|
1081
|
+
const e = R.findIndex(
|
|
1082
|
+
(l) => P.cells[l.key] == null
|
|
1049
1083
|
);
|
|
1050
|
-
return
|
|
1051
|
-
var
|
|
1052
|
-
const
|
|
1084
|
+
return R.map((l, i) => {
|
|
1085
|
+
var S, y;
|
|
1086
|
+
const z = _ && !!ee[l.key], B = P.cells[l.key];
|
|
1053
1087
|
return /* @__PURE__ */ t(
|
|
1054
1088
|
"td",
|
|
1055
1089
|
{
|
|
1056
|
-
style:
|
|
1057
|
-
"data-dt-total-cell":
|
|
1090
|
+
style: se(l.key),
|
|
1091
|
+
"data-dt-total-cell": B != null ? l.key : void 0,
|
|
1058
1092
|
className: h(
|
|
1059
1093
|
"sticky bottom-0 z-[3] whitespace-nowrap border-t-2 border-slate-200 bg-slate-50 px-3 py-1.5 font-medium dark:border-border dark:bg-muted",
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
!
|
|
1063
|
-
!
|
|
1094
|
+
z && "z-[4]",
|
|
1095
|
+
z && ((S = ee[l.key]) == null ? void 0 : S.seam) && (((y = ee[l.key]) == null ? void 0 : y.side) === "left" ? "border-r" : "border-l"),
|
|
1096
|
+
!_ && j && i === 0 && "z-[4]",
|
|
1097
|
+
!_ && j && i === 0 && (C ? "left-[39px]" : "left-0")
|
|
1064
1098
|
),
|
|
1065
|
-
children:
|
|
1099
|
+
children: B ?? (i === e && P.label != null ? P.label : null)
|
|
1066
1100
|
},
|
|
1067
1101
|
l.key
|
|
1068
1102
|
);
|
|
@@ -1074,73 +1108,100 @@ function or({
|
|
|
1074
1108
|
)
|
|
1075
1109
|
}
|
|
1076
1110
|
),
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
!
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
"
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
"
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1111
|
+
Me && /* @__PURE__ */ t(Ht, { scrollerRef: H }),
|
|
1112
|
+
lt,
|
|
1113
|
+
!W && c > n && /* @__PURE__ */ s(
|
|
1114
|
+
"div",
|
|
1115
|
+
{
|
|
1116
|
+
className: "flex items-center justify-between border-t border-slate-100 py-1.5 pl-2 dark:border-border md:py-2.5 md:pl-4",
|
|
1117
|
+
style: { paddingRight: "calc(0.5rem + var(--nvr-corner-float, 0px))" },
|
|
1118
|
+
children: [
|
|
1119
|
+
/* @__PURE__ */ t(
|
|
1120
|
+
Ut,
|
|
1121
|
+
{
|
|
1122
|
+
className: "w-full",
|
|
1123
|
+
range: /* @__PURE__ */ s(U, { children: [
|
|
1124
|
+
/* @__PURE__ */ s("span", { className: "font-semibold text-slate-700 dark:text-slate-200", children: [
|
|
1125
|
+
Y(Te),
|
|
1126
|
+
"–",
|
|
1127
|
+
Y(Ae)
|
|
1128
|
+
] }),
|
|
1129
|
+
" ",
|
|
1130
|
+
"of ",
|
|
1131
|
+
Y(c)
|
|
1132
|
+
] }),
|
|
1133
|
+
prevDisabled: b <= 1,
|
|
1134
|
+
nextDisabled: b >= G,
|
|
1135
|
+
onPrev: () => w(b - 1),
|
|
1136
|
+
onNext: () => w(b + 1)
|
|
1137
|
+
}
|
|
1138
|
+
),
|
|
1139
|
+
/* @__PURE__ */ s("p", { className: "hidden text-[12px] text-slate-400 md:block", children: [
|
|
1140
|
+
Y(Te),
|
|
1141
|
+
"–",
|
|
1142
|
+
Y(Ae),
|
|
1143
|
+
" of ",
|
|
1144
|
+
Y(c),
|
|
1145
|
+
" records"
|
|
1146
|
+
] }),
|
|
1147
|
+
/* @__PURE__ */ s("div", { className: "hidden items-center gap-1 md:flex", children: [
|
|
1148
|
+
/* @__PURE__ */ t(
|
|
1149
|
+
de,
|
|
1150
|
+
{
|
|
1151
|
+
variant: "ghost",
|
|
1152
|
+
size: "sm",
|
|
1153
|
+
className: "h-7 px-2 text-[12px] text-slate-600",
|
|
1154
|
+
disabled: b <= 1,
|
|
1155
|
+
onClick: () => w(1),
|
|
1156
|
+
"aria-label": "First page",
|
|
1157
|
+
"data-tip": "First page",
|
|
1158
|
+
children: "«"
|
|
1159
|
+
}
|
|
1160
|
+
),
|
|
1161
|
+
/* @__PURE__ */ t(
|
|
1162
|
+
de,
|
|
1163
|
+
{
|
|
1164
|
+
variant: "ghost",
|
|
1165
|
+
size: "sm",
|
|
1166
|
+
className: "h-7 px-2.5 text-[12px] text-slate-600",
|
|
1167
|
+
disabled: b <= 1,
|
|
1168
|
+
onClick: () => w(b - 1),
|
|
1169
|
+
children: "← Prev"
|
|
1170
|
+
}
|
|
1171
|
+
),
|
|
1172
|
+
/* @__PURE__ */ s("span", { className: "px-2 text-[12px] text-slate-400", children: [
|
|
1173
|
+
b,
|
|
1174
|
+
" / ",
|
|
1175
|
+
G
|
|
1176
|
+
] }),
|
|
1177
|
+
/* @__PURE__ */ t(
|
|
1178
|
+
de,
|
|
1179
|
+
{
|
|
1180
|
+
variant: "ghost",
|
|
1181
|
+
size: "sm",
|
|
1182
|
+
className: "h-7 px-2.5 text-[12px] text-slate-600",
|
|
1183
|
+
disabled: b >= G,
|
|
1184
|
+
onClick: () => w(b + 1),
|
|
1185
|
+
children: "Next →"
|
|
1186
|
+
}
|
|
1187
|
+
),
|
|
1188
|
+
/* @__PURE__ */ t(
|
|
1189
|
+
de,
|
|
1190
|
+
{
|
|
1191
|
+
variant: "ghost",
|
|
1192
|
+
size: "sm",
|
|
1193
|
+
className: "h-7 px-2 text-[12px] text-slate-600",
|
|
1194
|
+
disabled: b >= G,
|
|
1195
|
+
onClick: () => w(G),
|
|
1196
|
+
"aria-label": "Last page",
|
|
1197
|
+
"data-tip": "Last page",
|
|
1198
|
+
children: "»"
|
|
1199
|
+
}
|
|
1200
|
+
)
|
|
1201
|
+
] })
|
|
1202
|
+
]
|
|
1203
|
+
}
|
|
1204
|
+
)
|
|
1144
1205
|
] })
|
|
1145
1206
|
]
|
|
1146
1207
|
}
|
|
@@ -1148,11 +1209,11 @@ function or({
|
|
|
1148
1209
|
] });
|
|
1149
1210
|
}
|
|
1150
1211
|
export {
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1212
|
+
Ar as DataTable,
|
|
1213
|
+
rt as FilterControl,
|
|
1214
|
+
lr as ariaSortFor,
|
|
1215
|
+
ar as containsFilter,
|
|
1216
|
+
cr as filterDefLabel,
|
|
1217
|
+
Tr as filterValueDisplay,
|
|
1218
|
+
tr as pinColumnName
|
|
1158
1219
|
};
|