@nivaro/react 0.3.138 → 0.3.140
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/InlineGridField.js +95 -92
- package/dist/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +36 -2
- package/dist/shared/components/AudienceConfirmPanel.js +19 -19
- package/dist/shared/components/BroadcastView.js +213 -211
- package/dist/shared/components/CollectionBrowserView.js +2677 -2658
- package/dist/shared/components/ConfigHistory.js +45 -45
- package/dist/shared/components/ConformanceView.js +110 -110
- package/dist/shared/components/DataTable.js +51 -51
- package/dist/shared/components/FilePreviewLightbox.js +26 -25
- package/dist/shared/components/ItemEditForm.js +3038 -3027
- package/dist/shared/components/LiveCount.js +27 -23
- package/dist/shared/components/LiveTraceView.js +62 -61
- package/dist/shared/components/PageRenderer.js +422 -410
- package/dist/shared/components/ProfileView.js +199 -199
- package/dist/shared/components/QualityRulesView.js +70 -70
- package/dist/shared/components/QueryTable.js +131 -130
- package/dist/shared/components/RecordGraph.js +98 -98
- package/dist/shared/components/RecordReadView.js +287 -288
- package/dist/shared/components/ReportView.js +1279 -1259
- package/dist/shared/components/SlaRulesView.js +73 -74
- package/dist/shared/components/WidgetSlot.js +73 -73
- package/dist/shared/components/ai/AiChart.js +36 -32
- package/dist/shared/components/ai/AiMarkdown.js +136 -129
- package/dist/shared/components/ai/TaskDo.js +87 -87
- package/dist/shared/components/ai/answer-formats.js +37 -30
- package/dist/shared/components/ai/call-log/format.js +17 -16
- package/dist/shared/components/bulk/BulkActionButtons.js +66 -66
- package/dist/shared/components/bulk/BulkFieldUpdate.js +59 -59
- package/dist/shared/components/bulk/BulkSelectionNotices.js +34 -34
- package/dist/shared/components/bulk/MessageStakeholders.js +31 -29
- package/dist/shared/components/bulk/PushBulkButtons.js +83 -82
- package/dist/shared/components/bulk/bulk-field-options.js +10 -10
- package/dist/shared/components/cbv/column-totals.js +53 -51
- package/dist/shared/components/chat/ChatAnalyticsView.js +87 -87
- package/dist/shared/components/collections-directory/CollectionsToolbar.js +18 -18
- package/dist/shared/components/command-center/announce.js +7 -6
- package/dist/shared/components/command-center/panels/AttentionPanel.js +32 -31
- package/dist/shared/components/command-center/panels/FlowPanel.js +29 -28
- package/dist/shared/components/command-center/panels/PeoplePanel.js +39 -39
- package/dist/shared/components/delegation/DelegationConsoleView.js +27 -27
- package/dist/shared/components/imports/RunDetailSheet.js +1 -1
- package/dist/shared/components/integrations/IntegrationObligationsView.js +119 -119
- package/dist/shared/components/integrations/console/EventsView.js +35 -35
- package/dist/shared/components/integrations/console/FirefightView.js +15 -14
- package/dist/shared/components/integrations/console/PartnerDetail.js +78 -78
- package/dist/shared/components/integrations/console/ReadyToSendView.js +103 -103
- package/dist/shared/components/integrations/console/SignalCard.js +67 -67
- package/dist/shared/components/item-edit/CatalogPickerField.js +536 -527
- package/dist/shared/components/item-edit/ChangesTray.js +88 -74
- package/dist/shared/components/item-edit/FilePickerField.js +123 -123
- package/dist/shared/components/item-edit/GroupSection.js +301 -292
- package/dist/shared/components/item-edit/HeaderSummaryChip.js +54 -54
- package/dist/shared/components/item-edit/InlineGridField.js +45 -36
- package/dist/shared/components/item-edit/InlineTableField.js +1167 -1153
- package/dist/shared/components/item-edit/NestedRelationEditor.js +106 -99
- package/dist/shared/components/item-edit/RecordChatMentionsChip.js +11 -11
- package/dist/shared/components/layout-editor/ai-forms/SlimPanel.js +43 -44
- package/dist/shared/components/monitoring/ApiRequestLog.js +35 -35
- package/dist/shared/components/notifications/NotificationCenterView.js +268 -268
- package/dist/shared/components/ops-report/format.js +37 -36
- package/dist/shared/components/panels/ReferencedByPanel.js +21 -20
- package/dist/shared/components/panels/RevisionsPanel.js +306 -305
- package/dist/shared/components/pipeline/OwnerMatrixVersionsCard.js +12 -12
- package/dist/shared/components/pipeline/PipelineEditorView.js +483 -482
- package/dist/shared/components/pipeline/PipelineHealthCards.js +33 -32
- package/dist/shared/components/pipeline/TeamsView.js +189 -130
- package/dist/shared/components/profile/AgentsPanel.js +6 -6
- package/dist/shared/components/profile/DelegationCard.js +13 -12
- package/dist/shared/components/profile/PersonActivity.js +48 -48
- package/dist/shared/components/profile/PersonExtras.js +107 -107
- package/dist/shared/components/profile/PersonWeek.js +9 -9
- package/dist/shared/components/queue/QueueBulkBar.js +19 -18
- package/dist/shared/components/queue/QueueBulkMove.js +21 -20
- package/dist/shared/components/queue/QueueItemSheet.js +136 -131
- package/dist/shared/components/queue/QueueWorklist.js +671 -670
- package/dist/shared/components/queue/worklist-helpers.js +36 -21
- package/dist/shared/components/support/RequestList.js +121 -121
- package/dist/shared/components/support/SupportAnalytics.js +29 -29
- package/dist/shared/lib/activity-sentence.js +316 -278
- package/dist/shared/lib/format-value.js +5 -4
- package/dist/shared/lib/number-format.js +87 -0
- package/dist/shared/lib/number-kind.js +133 -0
- package/dist/shared/lib/utils.js +24 -20
- package/dist/shared/lib/watch-list.js +1 -1
- package/dist/shared/lib/widget-value-format.js +26 -12
- package/package.json +1 -1
|
@@ -1,115 +1,115 @@
|
|
|
1
1
|
import { jsxs as d, Fragment as Ce, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { useSensors as
|
|
3
|
-
import { SortableContext as
|
|
4
|
-
import { CSS as
|
|
5
|
-
import { useQueryClient as
|
|
6
|
-
import { AlertTriangle as
|
|
2
|
+
import { useSensors as Js, useSensor as Ys, PointerSensor as zs, DndContext as Xs, closestCenter as Zs } from "@dnd-kit/core";
|
|
3
|
+
import { SortableContext as ei, verticalListSortingStrategy as ti, arrayMove as ni, useSortable as ri } from "@dnd-kit/sortable";
|
|
4
|
+
import { CSS as ai } from "@dnd-kit/utilities";
|
|
5
|
+
import { useQueryClient as oi, useQuery as re, useMutation as Qe, useQueries as nt } from "@tanstack/react-query";
|
|
6
|
+
import { AlertTriangle as li, RefreshCw as si, Plus as An, ChevronDown as Vo, FileDiff as ii, Group as ci, Check as Ar, Flame as di, Rows3 as ui, Sparkles as mi, Loader2 as Go, Download as pi, BarChart3 as fi, SlidersHorizontal as bi, ListChecks as hi, Rows4 as yi, Rows2 as gi, Play as xi, Star as ki, Pin as vi, Save as wi, Bell as _i, Inbox as Ni, GripVertical as Si } from "lucide-react";
|
|
7
7
|
import { useState as N, useRef as O, useMemo as W, useEffect as P } from "react";
|
|
8
8
|
import { createPortal as Wo } from "react-dom";
|
|
9
9
|
import { toast as K } from "sonner";
|
|
10
|
-
import { useNivaroClient as
|
|
11
|
-
import { useDebounced as
|
|
12
|
-
import { useElapsedLoading as
|
|
13
|
-
import { useSlowReason as
|
|
14
|
-
import { useBulkProgressFeed as
|
|
15
|
-
import { get as D, post as ge, patch as Io, del as
|
|
16
|
-
import { useConfigUpdateRefresh as
|
|
17
|
-
import { useDeadlineNow as
|
|
18
|
-
import { deepenForLightSurface as
|
|
19
|
-
import { evaluateExpression as
|
|
20
|
-
import { clauseFromControlValue as
|
|
21
|
-
import { releaseLiveOwner as
|
|
10
|
+
import { useNivaroClient as ul, useItemEditAuth as Ho, useItemNavigation as Ci, useNavigation as $i, useOverlayState as Ri } from "../../context.js";
|
|
11
|
+
import { useDebounced as Ti } from "../../hooks/useDebounced.js";
|
|
12
|
+
import { useElapsedLoading as Li } from "../../hooks/useElapsedLoading.js";
|
|
13
|
+
import { useSlowReason as Oi } from "../../hooks/useSlowReason.js";
|
|
14
|
+
import { useBulkProgressFeed as Fi } from "../../lib/bulk-progress.js";
|
|
15
|
+
import { get as D, post as ge, patch as Io, del as qr, put as Ai } from "../../lib/commands.js";
|
|
16
|
+
import { useConfigUpdateRefresh as qi } from "../../lib/config-update-refresh.js";
|
|
17
|
+
import { useDeadlineNow as Ei, liveDeadlineStatus as Pi, dueInText as Ki } from "../../lib/deadline-ticker.js";
|
|
18
|
+
import { deepenForLightSurface as Di } from "../../lib/display-prefs.js";
|
|
19
|
+
import { evaluateExpression as Mi } from "../../lib/expression.js";
|
|
20
|
+
import { clauseFromControlValue as Bi, filterSentence as ji } from "../../lib/filter-sentence.js";
|
|
21
|
+
import { releaseLiveOwner as Qi, deliverLive as Ui } from "../../lib/focus-mode.js";
|
|
22
22
|
import { formatMultiValue as rt } from "../../lib/format-value.js";
|
|
23
|
-
import { QUEUE_IN_STEP_COLUMN as
|
|
24
|
-
import { createCursorBook as
|
|
25
|
-
import { normalizeInlineEdit as
|
|
26
|
-
import { sanitizeQueueLinkState as
|
|
27
|
-
import { arrivedByListReturn as
|
|
28
|
-
import { peekListAway as
|
|
29
|
-
import { useLiveEvent as
|
|
30
|
-
import { useSteadyGroups as
|
|
31
|
-
import { useRowChanges as
|
|
32
|
-
import { useLiveBurst as
|
|
33
|
-
import { listTrailDetail as
|
|
34
|
-
import { OPEN_IN_TABS_CAP as
|
|
35
|
-
import { isOwnWrite as
|
|
36
|
-
import { usePrefetchIntent as
|
|
37
|
-
import { useRowPresence as
|
|
38
|
-
import { queryKeys as
|
|
39
|
-
import { buildGroups as
|
|
40
|
-
import { cascadeFilter as
|
|
41
|
-
import { useOptionalRealtime as
|
|
23
|
+
import { QUEUE_IN_STEP_COLUMN as Er, queueServerSort as Pr } from "../../lib/in-step.js";
|
|
24
|
+
import { createCursorBook as Vi, pageRequest as Gi, noteNextCursor as Wi } from "../../lib/keyset-pager.js";
|
|
25
|
+
import { normalizeInlineEdit as Hi, inlineM2oTarget as Ii, inlineChoices as Ji, inlineEditFor as Yi, nextInlineKey as zi } from "../../lib/list-inline-edit.js";
|
|
26
|
+
import { sanitizeQueueLinkState as Xi, readListLinkFromLocation as Zi, dropListLinkParam as ec, encodeListLink as tc, replaceListLinkParam as nc } from "../../lib/list-link.js";
|
|
27
|
+
import { arrivedByListReturn as rc, historyKey as ac, ensureHistoryKey as Jo } from "../../lib/list-page-memory.js";
|
|
28
|
+
import { peekListAway as oc, planListReturn as Yo, takeListAway as lc, standbyListAway as sc, returnRowFor as ic, markReturnRow as cc, noteListOpen as dc } from "../../lib/list-return.js";
|
|
29
|
+
import { useLiveEvent as uc, expandCoalesced as mc, LIVE_ASPECTS as at } from "../../lib/live.js";
|
|
30
|
+
import { useSteadyGroups as pc, useRowGlide as fc, movingRowTitle as bc } from "../../lib/live-groups.js";
|
|
31
|
+
import { useRowChanges as hc, useRowLocksByCollection as zo, lockLabel as yc } from "../../lib/live-list.js";
|
|
32
|
+
import { useLiveBurst as gc, useLivePause as xc, useSteadyRows as kc, GONE_ROW_CLASS as vc, GONE_ROW_TITLE as wc, resumeAsRefetch as _c } from "../../lib/live-list-flow.js";
|
|
33
|
+
import { listTrailDetail as Nc, setTrailDetail as Sc } from "../../lib/nav-trail.js";
|
|
34
|
+
import { OPEN_IN_TABS_CAP as Cc, openInTabs as $c, openInTabsMessage as Xo } from "../../lib/open-in-tabs.js";
|
|
35
|
+
import { isOwnWrite as Rc } from "../../lib/own-writes.js";
|
|
36
|
+
import { usePrefetchIntent as Tc } from "../../lib/prefetch.js";
|
|
37
|
+
import { useRowPresence as Lc, rowPresenceKey as Zo } from "../../lib/presence-hooks.js";
|
|
38
|
+
import { queryKeys as Oc } from "../../lib/query-keys.js";
|
|
39
|
+
import { buildGroups as Fc } from "../../lib/queue-grouping.js";
|
|
40
|
+
import { cascadeFilter as Ac, fetchCascadeRelations as qc } from "../../lib/quick-filter-cascade.js";
|
|
41
|
+
import { useOptionalRealtime as Ec } from "../../lib/realtime.js";
|
|
42
42
|
import { copyIdText as el } from "../../lib/record-ref.js";
|
|
43
|
-
import { rowHighlightTextClass as
|
|
43
|
+
import { rowHighlightTextClass as Pc, rowHighlightClass as Kc } from "../../lib/row-highlight.js";
|
|
44
44
|
import { userErrorMessage as Ct } from "../../lib/safe-error.js";
|
|
45
|
-
import { useSelectionPicks as
|
|
46
|
-
import { listViewInput as
|
|
47
|
-
import { useTableDensity as
|
|
48
|
-
import { useMyScopes as
|
|
49
|
-
import { useNewItemLayouts as
|
|
50
|
-
import { formatNumber as
|
|
51
|
-
import { usePublishAskContext as
|
|
52
|
-
import { useBuiltinGate as
|
|
53
|
-
import { BulkCompareButton as
|
|
54
|
-
import { BulkFieldUpdateButton as
|
|
55
|
-
import { BulkRowMark as
|
|
56
|
-
import { BulkSelectionNotices as
|
|
57
|
-
import { BulkMessageButton as
|
|
58
|
-
import { compareCell as
|
|
59
|
-
import { ColumnHeaderMenu as
|
|
60
|
-
import { loadTotalOverridesAt as nl, shownTotals as
|
|
61
|
-
import { DataTable as
|
|
62
|
-
import { EmptyState as
|
|
63
|
-
import { FocusModeToggle as
|
|
64
|
-
import { FulfilmentPill as
|
|
65
|
-
import { InStepCell as
|
|
66
|
-
import { ImportFromFileButton as
|
|
67
|
-
import { IntegrationDots as
|
|
68
|
-
import { IntegrationsFilterPill as
|
|
69
|
-
import { readQueueReturn as
|
|
70
|
-
import { ListLoadError as
|
|
71
|
-
import { LiveCount as
|
|
72
|
-
import { LivePauseButton as
|
|
73
|
-
import { LiveRowMark as
|
|
74
|
-
import { CopyListLinkButton as
|
|
75
|
-
import { useInlineEdit as
|
|
45
|
+
import { useSelectionPicks as Dc, splitSelKey as Kr, useSelectionLiveMarks as Mc, useSelectionChanges as Bc, useSelectedRowMemory as jc, selectionSums as Qc } from "../../lib/selection-watch.js";
|
|
46
|
+
import { listViewInput as Uc } from "../../lib/send-view.js";
|
|
47
|
+
import { useTableDensity as Vc } from "../../lib/table-density.js";
|
|
48
|
+
import { useMyScopes as Gc, matchScopeDimension as Wc } from "../../lib/use-my-scopes.js";
|
|
49
|
+
import { useNewItemLayouts as Hc } from "../../lib/use-new-item-layouts.js";
|
|
50
|
+
import { formatNumber as ne, cn as F, formatDateTime as tl, titleCase as Dr, humanHours as Ic, formatRelative as Jc, formatDate as Yc } from "../../lib/utils.js";
|
|
51
|
+
import { usePublishAskContext as zc, useAskRecordDrag as Xc } from "../ai/ask-context.js";
|
|
52
|
+
import { useBuiltinGate as Zc, BulkActionButtons as ed } from "../bulk/BulkActionButtons.js";
|
|
53
|
+
import { BulkCompareButton as td } from "../bulk/BulkCompareButton.js";
|
|
54
|
+
import { BulkFieldUpdateButton as nd } from "../bulk/BulkFieldUpdateButton.js";
|
|
55
|
+
import { BulkRowMark as rd } from "../bulk/BulkRowMark.js";
|
|
56
|
+
import { BulkSelectionNotices as ad, SelectionFigures as od } from "../bulk/BulkSelectionNotices.js";
|
|
57
|
+
import { BulkMessageButton as ld } from "../bulk/MessageStakeholders.js";
|
|
58
|
+
import { compareCell as sd, RowActionsMenu as id, roleMayUpdate as cd } from "../CollectionBrowserView.js";
|
|
59
|
+
import { ColumnHeaderMenu as dd } from "../cbv/ColumnHeaderMenu.js";
|
|
60
|
+
import { loadTotalOverridesAt as nl, shownTotals as ud, overridesAfterSave as md, rememberTotalOverridesAt as rl, formatTotal as al, isTotalFn as pd, setOverride as fd } from "../cbv/column-totals.js";
|
|
61
|
+
import { DataTable as bd } from "../DataTable.js";
|
|
62
|
+
import { EmptyState as hd } from "../EmptyState.js";
|
|
63
|
+
import { FocusModeToggle as yd } from "../FocusModeToggle.js";
|
|
64
|
+
import { FulfilmentPill as gd, FULFILMENT_FILTER_OPTIONS as xd } from "../FulfilmentPill.js";
|
|
65
|
+
import { InStepCell as kd } from "../InStep.js";
|
|
66
|
+
import { ImportFromFileButton as vd } from "../import/ImportFromFileButton.js";
|
|
67
|
+
import { IntegrationDots as wd, INTEGRATIONS_FILTER_OPTIONS as _d } from "../integrations/IntegrationDots.js";
|
|
68
|
+
import { IntegrationsFilterPill as Nd } from "../integrations/IntegrationsFilterPill.js";
|
|
69
|
+
import { readQueueReturn as Sd, queueReturnApplies as Cd, writeQueueReturn as ol } from "../item-edit/QueueReturnChip.js";
|
|
70
|
+
import { ListLoadError as $d } from "../ListLoadError.js";
|
|
71
|
+
import { LiveCount as Mr } from "../LiveCount.js";
|
|
72
|
+
import { LivePauseButton as Rd, LiveBurstPill as Td } from "../LiveListControls.js";
|
|
73
|
+
import { LiveRowMark as Ld, MovingRowChip as Od } from "../LiveRowMark.js";
|
|
74
|
+
import { CopyListLinkButton as Fd } from "../list/CopyListLinkButton.js";
|
|
75
|
+
import { useInlineEdit as Ad, InlineEditCell as qd } from "../list/InlineEdit.js";
|
|
76
76
|
import { ListViewers as ll } from "../list/ListViewers.js";
|
|
77
|
-
import { OverflowRail as
|
|
78
|
-
import { usePickerExcludedRows as
|
|
79
|
-
import { RealtimeStaleMark as
|
|
80
|
-
import { RecordDrilldownSheet as
|
|
81
|
-
import { RowHighlightLegend as
|
|
82
|
-
import { RowPresence as
|
|
83
|
-
import { SendViewButton as
|
|
84
|
-
import { UnseenDot as
|
|
85
|
-
import { Badge as
|
|
77
|
+
import { OverflowRail as Ed } from "../OverflowRail.js";
|
|
78
|
+
import { usePickerExcludedRows as Pd, PICKER_EXCLUDED_ROW_CLASS as Kd, PICKER_EXCLUDED_TITLE as Dd } from "../PickerExcludedRows.js";
|
|
79
|
+
import { RealtimeStaleMark as Md } from "../RealtimeStatusBanner.js";
|
|
80
|
+
import { RecordDrilldownSheet as Bd } from "../RecordDrilldownSheet.js";
|
|
81
|
+
import { RowHighlightLegend as jd } from "../RowHighlightLegend.js";
|
|
82
|
+
import { RowPresence as Qd } from "../RowPresence.js";
|
|
83
|
+
import { SendViewButton as Ud } from "../send-view/SendViewButton.js";
|
|
84
|
+
import { UnseenDot as Vd } from "../UnseenDot.js";
|
|
85
|
+
import { Badge as Gd } from "../ui/badge.js";
|
|
86
86
|
import { Checkbox as Ur } from "../ui/checkbox.js";
|
|
87
|
-
import { Command as sl, CommandInput as
|
|
88
|
-
import { Label as
|
|
87
|
+
import { Command as sl, CommandInput as Wd, CommandList as il, CommandEmpty as Hd, CommandItem as sn } from "../ui/command.js";
|
|
88
|
+
import { Label as Id } from "../ui/label.js";
|
|
89
89
|
import { Popover as $t, PopoverTrigger as Rt, PopoverContent as Tt } from "../ui/popover.js";
|
|
90
|
-
import { Skeleton as
|
|
91
|
-
import { dedupeChooserKeys as
|
|
92
|
-
import { groupSumPathsFor as
|
|
93
|
-
import { offscreenPill as
|
|
94
|
-
import { OwnerAvatars as
|
|
95
|
-
import { pathHeader as
|
|
96
|
-
import { QueueBulkBar as
|
|
97
|
-
import { QueueBulkMove as
|
|
98
|
-
import { QueueItemSheet as
|
|
99
|
-
import { QueueKanbanBoard as
|
|
100
|
-
import { QueueQuickFilters as
|
|
101
|
-
import { QueueTeamStrip as
|
|
102
|
-
import { QueueWorkloadView as
|
|
103
|
-
import { queueTotalColumns as
|
|
104
|
-
import { useTransitionNote as
|
|
105
|
-
import { worklistCsv as
|
|
106
|
-
import {
|
|
107
|
-
function
|
|
90
|
+
import { Skeleton as ml } from "../ui/skeleton.js";
|
|
91
|
+
import { dedupeChooserKeys as Jd } from "./column-chooser.js";
|
|
92
|
+
import { groupSumPathsFor as Yd } from "./group-sums.js";
|
|
93
|
+
import { offscreenPill as zd, statsOutrunRows as Xd, stateAspectEffect as Zd } from "./live-state-aspect.js";
|
|
94
|
+
import { OwnerAvatars as eu } from "./OwnerAvatars.js";
|
|
95
|
+
import { pathHeader as tu } from "./path-label.js";
|
|
96
|
+
import { QueueBulkBar as nu } from "./QueueBulkBar.js";
|
|
97
|
+
import { QueueBulkMove as ru } from "./QueueBulkMove.js";
|
|
98
|
+
import { QueueItemSheet as au } from "./QueueItemSheet.js";
|
|
99
|
+
import { QueueKanbanBoard as ou } from "./QueueKanbanBoard.js";
|
|
100
|
+
import { QueueQuickFilters as lu } from "./QueueQuickFilters.js";
|
|
101
|
+
import { QueueTeamStrip as su } from "./QueueTeamStrip.js";
|
|
102
|
+
import { QueueWorkloadView as iu } from "./QueueWorkloadView.js";
|
|
103
|
+
import { queueTotalColumns as cu, queueTotalPaths as du, queueTotalValue as uu, formulaTotalFormat as mu, queueTotalTip as pu, queueTotalsEligibleKey as Br, queueTotalsStoreKey as qn, queueTotalsSupport as fu } from "./queue-totals.js";
|
|
104
|
+
import { useTransitionNote as bu, needsTransitionNote as hu } from "./transition-note.js";
|
|
105
|
+
import { worklistCsv as yu, worklistCsvName as gu } from "./worklist-csv.js";
|
|
106
|
+
import { extraValueText as cl, formulaColumnKeys as xu, extraChoiceText as jr, atRiskBreakdown as dl, queuePinKeepRank as ku, worklistKeyTarget as vu } from "./worklist-helpers.js";
|
|
107
|
+
function wu({ summary: l }) {
|
|
108
108
|
if (!l || l.count === 0)
|
|
109
109
|
return /* @__PURE__ */ a("span", { className: "text-slate-300 dark:text-muted-foreground", children: "—" });
|
|
110
110
|
const S = [l.last_from, l.last_to].filter(Boolean).join(" → "), q = [
|
|
111
111
|
S ? `Last: ${S}` : null,
|
|
112
|
-
l.last_at ?
|
|
112
|
+
l.last_at ? Jc(l.last_at) : null,
|
|
113
113
|
l.last_reason ? `“${l.last_reason}”` : "no reason given"
|
|
114
114
|
].filter(Boolean).join(" · ");
|
|
115
115
|
return /* @__PURE__ */ d(
|
|
@@ -131,13 +131,13 @@ function vu({ summary: l }) {
|
|
|
131
131
|
}
|
|
132
132
|
);
|
|
133
133
|
}
|
|
134
|
-
const
|
|
134
|
+
const _u = 50, Nu = [], Lt = "nivaro_addendums", Qr = [
|
|
135
135
|
{ value: "mine", label: "My Items" },
|
|
136
136
|
{ value: "unowned", label: "No Owners" },
|
|
137
137
|
{ value: "claimed", label: "Claimed by me" },
|
|
138
138
|
{ value: "all", label: "All Items" }
|
|
139
139
|
];
|
|
140
|
-
function
|
|
140
|
+
function Su({ summary: l }) {
|
|
141
141
|
if (!l || l.total === 0) return /* @__PURE__ */ a("span", { className: "text-slate-300", children: "—" });
|
|
142
142
|
const S = l.active > 0, q = l.latest_status === "review" ? "in review" : l.latest_status ?? "active", M = l.cost_impact, I = M != null && M !== 0 ? `${M > 0 ? "+" : "−"}$${Math.abs(M).toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : null;
|
|
143
143
|
return /* @__PURE__ */ d(
|
|
@@ -168,17 +168,17 @@ function Nu({ summary: l }) {
|
|
|
168
168
|
}
|
|
169
169
|
);
|
|
170
170
|
}
|
|
171
|
-
function
|
|
172
|
-
return
|
|
171
|
+
function Cu(l) {
|
|
172
|
+
return Ic(l);
|
|
173
173
|
}
|
|
174
|
-
function
|
|
174
|
+
function $u({
|
|
175
175
|
status: l,
|
|
176
176
|
warningAt: S,
|
|
177
177
|
dueAt: q
|
|
178
178
|
}) {
|
|
179
|
-
const M = { warning_at: S ?? null, due_at: q ?? null }, I = !!l && !!q, B =
|
|
179
|
+
const M = { warning_at: S ?? null, due_at: q ?? null }, I = !!l && !!q, B = Ei(I), y = I ? Pi(M, B) : null, f = y ? y === "on_track" ? "ok" : y : l;
|
|
180
180
|
if (!f) return /* @__PURE__ */ a("span", { className: "text-slate-300", children: "—" });
|
|
181
|
-
const z = I ?
|
|
181
|
+
const z = I ? Ki(M, B) : null, Q = f === "breached" ? "bg-red-50 text-red-600 dark:bg-red-500/10 dark:text-red-400" : f === "warning" ? "bg-amber-50 text-amber-600 dark:bg-amber-500/10 dark:text-amber-400" : "bg-emerald-50 text-emerald-600 dark:bg-emerald-500/10 dark:text-emerald-400";
|
|
182
182
|
return /* @__PURE__ */ a(
|
|
183
183
|
"span",
|
|
184
184
|
{
|
|
@@ -192,7 +192,7 @@ function Cu({
|
|
|
192
192
|
}
|
|
193
193
|
);
|
|
194
194
|
}
|
|
195
|
-
function
|
|
195
|
+
function Ru({ points: l, inline: S = !1 }) {
|
|
196
196
|
if (l.length < 2) return null;
|
|
197
197
|
const q = S ? 40 : 64, M = S ? 14 : 18, I = Math.max(...l), B = Math.min(...l), y = I - B || 1, f = q / (l.length - 1), z = l.map(
|
|
198
198
|
(Q, $e) => `${$e === 0 ? "M" : "L"}${($e * f).toFixed(1)},${(M - 2 - (Q - B) / y * (M - 4)).toFixed(1)}`
|
|
@@ -208,7 +208,7 @@ function $u({ points: l, inline: S = !1 }) {
|
|
|
208
208
|
}
|
|
209
209
|
);
|
|
210
210
|
}
|
|
211
|
-
function
|
|
211
|
+
function cn({
|
|
212
212
|
label: l,
|
|
213
213
|
count: S,
|
|
214
214
|
filteredCount: q,
|
|
@@ -228,9 +228,9 @@ function dn({
|
|
|
228
228
|
onClick: $e,
|
|
229
229
|
"aria-pressed": M,
|
|
230
230
|
"aria-label": [
|
|
231
|
-
q != null ? `${
|
|
231
|
+
q != null ? `${ne(q)} of ${ne(S)} ${l}` : `${ne(S)} ${l}`,
|
|
232
232
|
Q || null,
|
|
233
|
-
f != null && f !== 0 ? `${f > 0 ? "up" : "down"} ${
|
|
233
|
+
f != null && f !== 0 ? `${f > 0 ? "up" : "down"} ${ne(Math.abs(f))} since the last daily count` : null
|
|
234
234
|
].filter(Boolean).join(", "),
|
|
235
235
|
className: F(
|
|
236
236
|
"nvr-section-enter flex items-center gap-1.5 bg-white px-3 py-2 text-left transition-colors hover:bg-slate-50 dark:bg-card dark:hover:bg-card/80",
|
|
@@ -238,7 +238,7 @@ function dn({
|
|
|
238
238
|
"grow justify-center sm:justify-start",
|
|
239
239
|
M && "bg-nvr-cyan/5 ring-1 ring-inset ring-nvr-cyan dark:bg-nvr-cyan/10"
|
|
240
240
|
),
|
|
241
|
-
children: I ? /* @__PURE__ */ a(
|
|
241
|
+
children: I ? /* @__PURE__ */ a(ml, { className: "h-5 w-16 rounded" }) : /* @__PURE__ */ d(Ce, { children: [
|
|
242
242
|
/* @__PURE__ */ a(
|
|
243
243
|
"span",
|
|
244
244
|
{
|
|
@@ -247,12 +247,12 @@ function dn({
|
|
|
247
247
|
S === 0 && !M ? "text-slate-500 dark:text-slate-400" : "text-slate-900 dark:text-foreground"
|
|
248
248
|
),
|
|
249
249
|
children: q != null ? /* @__PURE__ */ d(Ce, { children: [
|
|
250
|
-
/* @__PURE__ */ a("span", { className: "text-nvr-navy dark:text-nvr-cyan", children: /* @__PURE__ */ a(
|
|
250
|
+
/* @__PURE__ */ a("span", { className: "text-nvr-navy dark:text-nvr-cyan", children: /* @__PURE__ */ a(Mr, { value: q, format: (b) => ne(Number(b)) }) }),
|
|
251
251
|
/* @__PURE__ */ d("span", { className: "text-[11px] font-medium text-slate-500 dark:text-slate-400", children: [
|
|
252
252
|
"/ ",
|
|
253
|
-
/* @__PURE__ */ a(
|
|
253
|
+
/* @__PURE__ */ a(Mr, { value: S, format: (b) => ne(Number(b)) })
|
|
254
254
|
] })
|
|
255
|
-
] }) : /* @__PURE__ */ a(
|
|
255
|
+
] }) : /* @__PURE__ */ a(Mr, { value: S, format: (b) => ne(Number(b)) })
|
|
256
256
|
}
|
|
257
257
|
),
|
|
258
258
|
/* @__PURE__ */ a(
|
|
@@ -282,16 +282,16 @@ function dn({
|
|
|
282
282
|
),
|
|
283
283
|
children: [
|
|
284
284
|
f > 0 ? "↑" : "↓",
|
|
285
|
-
|
|
285
|
+
ne(Math.abs(f))
|
|
286
286
|
]
|
|
287
287
|
}
|
|
288
288
|
),
|
|
289
|
-
y && S > 0 && /* @__PURE__ */ a(
|
|
289
|
+
y && S > 0 && /* @__PURE__ */ a(Ru, { points: y, inline: !0 })
|
|
290
290
|
] })
|
|
291
291
|
}
|
|
292
292
|
);
|
|
293
293
|
}
|
|
294
|
-
function
|
|
294
|
+
function Tu({
|
|
295
295
|
label: l,
|
|
296
296
|
count: S,
|
|
297
297
|
filteredCount: q,
|
|
@@ -318,27 +318,27 @@ function Ru({
|
|
|
318
318
|
),
|
|
319
319
|
l,
|
|
320
320
|
/* @__PURE__ */ a("span", { className: "font-semibold tabular-nums text-slate-900 dark:text-foreground", children: q != null ? /* @__PURE__ */ d(Ce, { children: [
|
|
321
|
-
/* @__PURE__ */ a("span", { className: "text-nvr-navy dark:text-nvr-cyan", children:
|
|
321
|
+
/* @__PURE__ */ a("span", { className: "text-nvr-navy dark:text-nvr-cyan", children: ne(q) }),
|
|
322
322
|
/* @__PURE__ */ d("span", { className: "font-normal text-slate-400", children: [
|
|
323
323
|
" / ",
|
|
324
|
-
|
|
324
|
+
ne(S)
|
|
325
325
|
] })
|
|
326
|
-
] }) :
|
|
326
|
+
] }) : ne(S) })
|
|
327
327
|
]
|
|
328
328
|
}
|
|
329
329
|
);
|
|
330
330
|
}
|
|
331
|
-
const Ue =
|
|
332
|
-
function
|
|
331
|
+
const Ue = tu;
|
|
332
|
+
function Lu({
|
|
333
333
|
id: l,
|
|
334
334
|
label: S,
|
|
335
335
|
checked: q,
|
|
336
336
|
onCheckedChange: M
|
|
337
337
|
}) {
|
|
338
|
-
const { attributes: I, listeners: B, setNodeRef: y, transform: f, transition: z, isDragging: Q } =
|
|
338
|
+
const { attributes: I, listeners: B, setNodeRef: y, transform: f, transition: z, isDragging: Q } = ri({
|
|
339
339
|
id: l
|
|
340
340
|
}), $e = {
|
|
341
|
-
transform:
|
|
341
|
+
transform: ai.Transform.toString(f),
|
|
342
342
|
transition: z,
|
|
343
343
|
opacity: Q ? 0.4 : 1
|
|
344
344
|
}, b = `col-toggle-${l}`;
|
|
@@ -349,14 +349,14 @@ function Tu({
|
|
|
349
349
|
...I,
|
|
350
350
|
...B,
|
|
351
351
|
className: "cursor-grab text-slate-300 hover:text-slate-500 dark:text-muted-foreground",
|
|
352
|
-
children: /* @__PURE__ */ a(
|
|
352
|
+
children: /* @__PURE__ */ a(Si, { className: "h-3.5 w-3.5" })
|
|
353
353
|
}
|
|
354
354
|
),
|
|
355
355
|
/* @__PURE__ */ a(Ur, { id: b, checked: q, onCheckedChange: M }),
|
|
356
|
-
/* @__PURE__ */ a(
|
|
356
|
+
/* @__PURE__ */ a(Id, { htmlFor: b, className: "cursor-pointer text-[12px] font-normal", children: S })
|
|
357
357
|
] });
|
|
358
358
|
}
|
|
359
|
-
function
|
|
359
|
+
function qp({
|
|
360
360
|
queueId: l,
|
|
361
361
|
realtime: S,
|
|
362
362
|
renderError: q,
|
|
@@ -365,43 +365,43 @@ function Ap({
|
|
|
365
365
|
onAsk: B
|
|
366
366
|
}) {
|
|
367
367
|
var No, So, Co, $o, Ro, To, Lo, Oo, Fo, Ao, qo, Eo, Po, Ko, Do, Mo, Bo, jo, Qo, Uo;
|
|
368
|
-
const y =
|
|
369
|
-
() => nl(
|
|
368
|
+
const y = oi(), f = ul(), { userId: z } = Ho(), Q = Ci(), { navigate: $e } = $i(), [b, me] = N("all"), [se, j] = N(1), Vr = O(Vi()), [Ot, pl] = Vc(), [C, ot] = N("table"), [U, lt] = N(""), [x, V] = N({}), [Ft, Gr] = N(() => /* @__PURE__ */ new Set()), [R, At] = N(null), [xe, En] = N(/* @__PURE__ */ new Set()), [qt, Pn] = N(null), [st, Kn] = N(null), [Wr, dn] = N({}), [Hr, Dn] = N(
|
|
369
|
+
() => nl(qn(l), Br)
|
|
370
370
|
), Ir = O(l);
|
|
371
|
-
Ir.current !== l && (Ir.current = l,
|
|
371
|
+
Ir.current !== l && (Ir.current = l, Dn(nl(qn(l), Br)), dn({}));
|
|
372
372
|
const it = W(
|
|
373
|
-
() =>
|
|
373
|
+
() => ud(Wr, Hr),
|
|
374
374
|
[Wr, Hr]
|
|
375
|
-
),
|
|
376
|
-
const r =
|
|
377
|
-
return rl(
|
|
378
|
-
}), [
|
|
379
|
-
|
|
380
|
-
const
|
|
381
|
-
|
|
382
|
-
const Kt =
|
|
375
|
+
), fl = (e, t) => Dn((n) => {
|
|
376
|
+
const r = fd(n, e, t);
|
|
377
|
+
return rl(qn(l), r), r;
|
|
378
|
+
}), [Mn, un] = N(0), Bn = O(0), be = hc(), ct = Ec(), jn = O({}).current, Jr = O(/* @__PURE__ */ new Set()), [Yr, bl] = N(0), [zr, hl] = N(0), he = O(!1), Et = O(null), Pt = O([]), Xr = O(null), Qn = O(!1), Un = O(0), Vn = O("table");
|
|
379
|
+
Vn.current = C;
|
|
380
|
+
const Gn = O(!1);
|
|
381
|
+
Gn.current = C === "table" && !!R;
|
|
382
|
+
const Kt = gc(), Dt = O(Kt);
|
|
383
383
|
Dt.current = Kt;
|
|
384
|
-
const
|
|
385
|
-
if (!
|
|
384
|
+
const mn = O(null), Ke = xc(l ? `queue:${l}` : null, (e) => {
|
|
385
|
+
if (!_c(e) && mn.current) return mn.current(e);
|
|
386
386
|
Ta();
|
|
387
|
-
}),
|
|
387
|
+
}), Wn = Ke.gate, pn = 25, { data: s, error: fn } = re({
|
|
388
388
|
queryKey: ["queue-meta", l],
|
|
389
389
|
queryFn: () => f.request(D(`/queues/${l}`)).then((e) => e.data),
|
|
390
390
|
enabled: !!l
|
|
391
391
|
});
|
|
392
|
-
|
|
392
|
+
qi(
|
|
393
393
|
((s == null ? void 0 : s.sources) ?? []).map((e) => e.collection),
|
|
394
394
|
[["queue-meta", l]],
|
|
395
395
|
{ enabled: !!l }
|
|
396
396
|
);
|
|
397
|
-
const { scopes:
|
|
397
|
+
const { scopes: bn, ready: Zr } = Gc(), ea = O(!1), [ta, na] = N(!1), [Re, yl] = N({}), ke = O({});
|
|
398
398
|
P(() => {
|
|
399
399
|
if (ea.current || !Zr || !s) return;
|
|
400
400
|
ea.current = !0;
|
|
401
401
|
const e = (s.extra_field_meta ?? []).filter(
|
|
402
402
|
(t) => t.kind === "relation" && t.target_collection && t.display_field
|
|
403
403
|
);
|
|
404
|
-
if (e.length === 0 || !
|
|
404
|
+
if (e.length === 0 || !bn) {
|
|
405
405
|
na(!0);
|
|
406
406
|
return;
|
|
407
407
|
}
|
|
@@ -421,11 +421,11 @@ function Ap({
|
|
|
421
421
|
];
|
|
422
422
|
};
|
|
423
423
|
for (const o of e) {
|
|
424
|
-
const c =
|
|
424
|
+
const c = Wc(bn, { collection: o.target_collection });
|
|
425
425
|
if (!c) continue;
|
|
426
426
|
const u = `extra.${o.path}`;
|
|
427
427
|
try {
|
|
428
|
-
const m =
|
|
428
|
+
const m = bn.restricted[c.name] ?? [];
|
|
429
429
|
if (m.length > 0) {
|
|
430
430
|
const h = await r(o, m);
|
|
431
431
|
h.length > 0 && (n[u.slice(6)] = h);
|
|
@@ -433,10 +433,10 @@ function Ap({
|
|
|
433
433
|
} catch {
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
|
-
Object.keys(n).length > 0 &&
|
|
436
|
+
Object.keys(n).length > 0 && yl(n), Object.keys(t).length > 0 && (ke.current = t, V((o) => ({ ...o, ...t }))), na(!0);
|
|
437
437
|
})();
|
|
438
|
-
}, [Zr,
|
|
439
|
-
const dt = ((So = (No = s == null ? void 0 : s.sources) == null ? void 0 : No.find((e) => e.type === "collection")) == null ? void 0 : So.collection) ?? null, { data: ra = [] } =
|
|
438
|
+
}, [Zr, bn, s]);
|
|
439
|
+
const dt = ((So = (No = s == null ? void 0 : s.sources) == null ? void 0 : No.find((e) => e.type === "collection")) == null ? void 0 : So.collection) ?? null, { data: ra = [] } = re({
|
|
440
440
|
queryKey: ["queue-browser-quick-filters", dt],
|
|
441
441
|
queryFn: () => f.request(D(`/collections/${dt}`)).then((e) => {
|
|
442
442
|
var t, n;
|
|
@@ -449,9 +449,9 @@ function Ap({
|
|
|
449
449
|
for (const n of (s == null ? void 0 : s.sources) ?? [])
|
|
450
450
|
n.type !== "collection" || !n.collection || e.has(n.collection) || (e.add(n.collection), t.push(n.collection));
|
|
451
451
|
return t;
|
|
452
|
-
}, [s == null ? void 0 : s.sources]),
|
|
452
|
+
}, [s == null ? void 0 : s.sources]), hn = Hc(
|
|
453
453
|
pe.length === 1 ? pe[0] : null
|
|
454
|
-
),
|
|
454
|
+
), Hn = M === !0 || Array.isArray(M) && pe.length > 0 && pe.every((e) => M.includes(e)), Te = (s == null ? void 0 : s.claims_enabled) !== !1, p = s == null ? void 0 : s.display_config, Ve = (p == null ? void 0 : p.views) ?? ["table", "kanban", "workload"], gl = (p == null ? void 0 : p.work_next) !== !1, yn = (p == null ? void 0 : p.bulk_actions) !== !1, Ge = Zc(
|
|
455
455
|
[
|
|
456
456
|
...new Set(
|
|
457
457
|
((s == null ? void 0 : s.sources) ?? []).filter((e) => e.type === "collection" && e.collection).map((e) => e.collection)
|
|
@@ -465,7 +465,7 @@ function Ap({
|
|
|
465
465
|
P(() => {
|
|
466
466
|
!s || aa.current || (aa.current = !0, lt("-priority"));
|
|
467
467
|
}, [s]);
|
|
468
|
-
const [G,
|
|
468
|
+
const [G, xl] = N(!1);
|
|
469
469
|
P(() => {
|
|
470
470
|
s != null && s.display_config && !Ve.includes(C) && ot(Ve[0]);
|
|
471
471
|
}, [s, C, Ve]), P(() => {
|
|
@@ -482,12 +482,12 @@ function Ap({
|
|
|
482
482
|
let r = null, o = null, c = null;
|
|
483
483
|
const u = () => {
|
|
484
484
|
c || (c = setTimeout(() => {
|
|
485
|
-
c = null,
|
|
485
|
+
c = null, hl(($) => $ + 1);
|
|
486
486
|
}, 2500));
|
|
487
487
|
}, m = () => {
|
|
488
488
|
o || (o = setTimeout(() => {
|
|
489
|
-
if (o = null,
|
|
490
|
-
Pt.current = [],
|
|
489
|
+
if (o = null, Un.current > 0 || Qn.current) {
|
|
490
|
+
Pt.current = [], un(($) => $ + 1);
|
|
491
491
|
return;
|
|
492
492
|
}
|
|
493
493
|
he.current = !0, y.invalidateQueries({ queryKey: ["queue-items", l] }), y.invalidateQueries({ queryKey: ["queue-workload", l] });
|
|
@@ -497,23 +497,23 @@ function Ap({
|
|
|
497
497
|
const h = ($) => {
|
|
498
498
|
let w = !1, Z = 0, de = !1;
|
|
499
499
|
const Se = $.flatMap(
|
|
500
|
-
(_) => _ ?
|
|
500
|
+
(_) => _ ? mc(_) : [_]
|
|
501
501
|
), ue = (_) => {
|
|
502
502
|
var le;
|
|
503
503
|
return !!_ && !_.action && !!((le = _.changed_fields) != null && le.length) && _.changed_fields.every((St) => St.startsWith("$"));
|
|
504
504
|
}, te = Se.filter((_) => _ && !ue(_)).map((_) => ({
|
|
505
505
|
..._,
|
|
506
506
|
item: String((_ == null ? void 0 : _.item) ?? "*") === "*" ? "*" : `${_ == null ? void 0 : _.collection}:${String(_ == null ? void 0 : _.item)}`
|
|
507
|
-
})),
|
|
508
|
-
|
|
507
|
+
})), Fn = te.length > 0 && Dt.current.tracker.push(te);
|
|
508
|
+
Fn && Dt.current.publish();
|
|
509
509
|
for (const _ of Se) {
|
|
510
|
-
const le = _ == null ? void 0 : _.changed_fields, St = (_ == null ? void 0 : _.collection) != null ? `${_.collection}:${String(_.item)}` : null,
|
|
511
|
-
if (
|
|
510
|
+
const le = _ == null ? void 0 : _.changed_fields, St = (_ == null ? void 0 : _.collection) != null ? `${_.collection}:${String(_.item)}` : null, Fr = St != null && Jr.current.has(St);
|
|
511
|
+
if (Fn && !ue(_)) continue;
|
|
512
512
|
if (_ && !_.action && (le != null && le.length) && le.every((je) => je.startsWith("$"))) {
|
|
513
|
-
if (le.includes(at.tasks) && n.add("queue-task-counts"), le.includes(at.integrations) && n.add("queue-integrations-summary"), le.includes(at.addendums) && n.add("queue-collection-addendums"), le.includes(at.lock) &&
|
|
514
|
-
const je =
|
|
515
|
-
|
|
516
|
-
|
|
513
|
+
if (le.includes(at.tasks) && n.add("queue-task-counts"), le.includes(at.integrations) && n.add("queue-integrations-summary"), le.includes(at.addendums) && n.add("queue-collection-addendums"), le.includes(at.lock) && bl((je) => je + 1), le.includes(at.sla) && (de = !0), le.includes(at.owners) && Fr && (w = !0), le.includes(at.state)) {
|
|
514
|
+
const je = Zd(
|
|
515
|
+
Fr,
|
|
516
|
+
Vn.current === "kanban" || Gn.current
|
|
517
517
|
);
|
|
518
518
|
de = !0, je.refresh && (w = !0), Z += je.pill;
|
|
519
519
|
}
|
|
@@ -525,17 +525,17 @@ function Ap({
|
|
|
525
525
|
continue;
|
|
526
526
|
}
|
|
527
527
|
de = !0;
|
|
528
|
-
const
|
|
529
|
-
St && (
|
|
528
|
+
const Is = (_ == null ? void 0 : _.collection) != null && Rc(_.collection, _.item);
|
|
529
|
+
St && (Fr || (_ == null ? void 0 : _.action) === "create" || Vn.current === "kanban" || Gn.current) ? (w = !0, Is || Pt.current.push({ key: St, by: null })) : Z += 1;
|
|
530
530
|
}
|
|
531
|
-
Z > 0 && (
|
|
532
|
-
}, T = ($) =>
|
|
533
|
-
|
|
534
|
-
const v = e(t, ($) =>
|
|
531
|
+
Z > 0 && (Bn.current += Z), w && m(), de && u();
|
|
532
|
+
}, T = ($) => Ui(jn, $, h);
|
|
533
|
+
mn.current = T;
|
|
534
|
+
const v = e(t, ($) => Wn([$ ?? {}], T));
|
|
535
535
|
return () => {
|
|
536
|
-
Et.current = null, v(),
|
|
536
|
+
Et.current = null, v(), mn.current = null, Qi(jn), r && clearTimeout(r), o && clearTimeout(o), c && clearTimeout(c);
|
|
537
537
|
};
|
|
538
|
-
}, [ct, S, s == null ? void 0 : s.sources, y, l, z,
|
|
538
|
+
}, [ct, S, s == null ? void 0 : s.sources, y, l, z, jn, Wn]), uc(
|
|
539
539
|
"owners:changed",
|
|
540
540
|
(e) => {
|
|
541
541
|
var t;
|
|
@@ -545,7 +545,7 @@ function Ap({
|
|
|
545
545
|
},
|
|
546
546
|
{ debounceMs: 600 }
|
|
547
547
|
);
|
|
548
|
-
const ve =
|
|
548
|
+
const ve = Ti(x, 350), kl = JSON.stringify(ve) === JSON.stringify(x), In = O(!1), ie = C === "table" && !!R, oa = Yd(s), vl = W(
|
|
549
549
|
() => {
|
|
550
550
|
var e;
|
|
551
551
|
return {
|
|
@@ -559,7 +559,7 @@ function Ap({
|
|
|
559
559
|
};
|
|
560
560
|
},
|
|
561
561
|
[s]
|
|
562
|
-
), Mt = (e) =>
|
|
562
|
+
), Mt = (e) => fu(e, vl), ut = cu(it, Mt), la = C === "table" && !ie && ut.length > 0, Bt = la ? du(ut, Mt) : [], Le = (() => {
|
|
563
563
|
const e = {};
|
|
564
564
|
for (const [t, n] of Object.entries(ve))
|
|
565
565
|
if (n) {
|
|
@@ -579,17 +579,17 @@ function Ap({
|
|
|
579
579
|
function mt(e, t) {
|
|
580
580
|
V((n) => ({ ...n, [e]: n[e] === t ? "" : t })), j(1);
|
|
581
581
|
}
|
|
582
|
-
function
|
|
582
|
+
function wl(e) {
|
|
583
583
|
V((t) => {
|
|
584
584
|
const n = t.state, r = Array.isArray(n) ? n : n ? [n] : [], o = r.includes(e) ? r.filter((c) => c !== e) : [...r, e];
|
|
585
585
|
return { ...t, state: o };
|
|
586
586
|
}), j(1);
|
|
587
587
|
}
|
|
588
|
-
const
|
|
589
|
-
function
|
|
588
|
+
const _l = Array.isArray(x.state) ? x.state : x.state ? [x.state] : [], Nl = (e) => !e || Array.isArray(e) && e.length === 0;
|
|
589
|
+
function Sl() {
|
|
590
590
|
V({ ...ke.current }), me("all"), j(1);
|
|
591
591
|
}
|
|
592
|
-
const [We,
|
|
592
|
+
const [We, Cl] = N(() => {
|
|
593
593
|
try {
|
|
594
594
|
return localStorage.getItem("nvr_queue_insights_open") === "1";
|
|
595
595
|
} catch {
|
|
@@ -602,13 +602,13 @@ function Ap({
|
|
|
602
602
|
} catch {
|
|
603
603
|
}
|
|
604
604
|
}, [We]);
|
|
605
|
-
const { data:
|
|
605
|
+
const { data: $l = [] } = re({
|
|
606
606
|
queryKey: ["queue-view-subs", l],
|
|
607
607
|
queryFn: () => f.request(D("/notification-subscriptions")).then((e) => (e.data ?? []).filter((t) => t.queue_id === l)).catch(() => []),
|
|
608
608
|
staleTime: 3e4
|
|
609
|
-
}),
|
|
610
|
-
const t =
|
|
611
|
-
(t ? f.request(
|
|
609
|
+
}), gn = (e) => $l.find((t) => t.queue_view_id === e), Rl = (e) => {
|
|
610
|
+
const t = gn(e);
|
|
611
|
+
(t ? f.request(qr(`/notification-subscriptions/${t.id}`)) : f.request(
|
|
612
612
|
ge("/notification-subscriptions", {
|
|
613
613
|
queue_id: l,
|
|
614
614
|
queue_view_id: e,
|
|
@@ -619,15 +619,15 @@ function Ap({
|
|
|
619
619
|
t ? "Unsubscribed" : "Subscribed — new arrivals in this view notify you"
|
|
620
620
|
), y.invalidateQueries({ queryKey: ["queue-view-subs", l] });
|
|
621
621
|
}).catch((r) => K.error(Ct(r, "Failed")));
|
|
622
|
-
}, [sa,
|
|
622
|
+
}, [sa, Jn] = N(null), Yn = [
|
|
623
623
|
...new Set(
|
|
624
624
|
((s == null ? void 0 : s.sources) ?? []).filter((e) => e.type === "collection" && e.collection).map((e) => e.collection)
|
|
625
625
|
)
|
|
626
|
-
], { data:
|
|
627
|
-
queryKey: ["queue-custom-actions", l,
|
|
626
|
+
], { data: Tl = {} } = re({
|
|
627
|
+
queryKey: ["queue-custom-actions", l, Yn.join(",")],
|
|
628
628
|
queryFn: async () => {
|
|
629
629
|
const e = {};
|
|
630
|
-
for (const t of
|
|
630
|
+
for (const t of Yn.slice(0, 6))
|
|
631
631
|
try {
|
|
632
632
|
const n = await f.request(
|
|
633
633
|
D("/custom-actions", { collection: t })
|
|
@@ -638,16 +638,16 @@ function Ap({
|
|
|
638
638
|
}
|
|
639
639
|
return e;
|
|
640
640
|
},
|
|
641
|
-
enabled:
|
|
641
|
+
enabled: Yn.length > 0,
|
|
642
642
|
staleTime: 6e4
|
|
643
|
-
}),
|
|
643
|
+
}), Ll = (e) => Tl[e] ?? [], Ol = (e, t) => {
|
|
644
644
|
f.request(ge(`/custom-actions/${e.id}/execute`, { item: t.item_id })).then(() => {
|
|
645
645
|
K.success(`${e.label} ran`), y.invalidateQueries({ queryKey: ["queue-items", l] });
|
|
646
646
|
}).catch((n) => {
|
|
647
647
|
const r = n.response;
|
|
648
648
|
K.error((r == null ? void 0 : r.error) ?? Ct(n, `${e.label} failed`));
|
|
649
649
|
});
|
|
650
|
-
}, { data:
|
|
650
|
+
}, { data: zn = [] } = re({
|
|
651
651
|
queryKey: ["queue-triage-labels", l],
|
|
652
652
|
queryFn: () => f.request(D(`/queues/${l}/triage-labels`)).then((e) => e.data ?? []).catch(() => []),
|
|
653
653
|
staleTime: 3e4
|
|
@@ -661,18 +661,18 @@ function Ap({
|
|
|
661
661
|
).then(() => {
|
|
662
662
|
y.invalidateQueries({ queryKey: ["queue-items", l] }), y.invalidateQueries({ queryKey: ["queue-triage-labels", l] });
|
|
663
663
|
}).catch((n) => K.error(Ct(n, "Label failed")));
|
|
664
|
-
}, [
|
|
665
|
-
() => Yo(
|
|
664
|
+
}, [Fl] = N(() => oc(`queue:${l}`)), [Al, ql] = N(
|
|
665
|
+
() => Yo(Fl) !== "fresh"
|
|
666
666
|
), {
|
|
667
667
|
data: i,
|
|
668
668
|
isLoading: ca,
|
|
669
669
|
isFetching: jt,
|
|
670
|
-
isPlaceholderData:
|
|
670
|
+
isPlaceholderData: Xn,
|
|
671
671
|
dataUpdatedAt: ce,
|
|
672
672
|
isError: da,
|
|
673
|
-
error:
|
|
674
|
-
refetch:
|
|
675
|
-
} =
|
|
673
|
+
error: El,
|
|
674
|
+
refetch: Pl
|
|
675
|
+
} = re({
|
|
676
676
|
queryKey: [
|
|
677
677
|
"queue-items",
|
|
678
678
|
l,
|
|
@@ -684,23 +684,23 @@ function Ap({
|
|
|
684
684
|
Bt.join(",")
|
|
685
685
|
],
|
|
686
686
|
queryFn: async () => {
|
|
687
|
-
const e = !ie && C === "table", t = JSON.stringify([l, b, U, Le,
|
|
687
|
+
const e = !ie && C === "table", t = JSON.stringify([l, b, U, Le, pn]), n = e ? Gi(Vr.current, t, se, "").after : void 0, r = await f.request(
|
|
688
688
|
D(`/queues/${l}/items`, {
|
|
689
689
|
scope: b,
|
|
690
690
|
// Last State Change is Aging read the other way round: the newest
|
|
691
691
|
// move is the least aged.
|
|
692
|
-
sort:
|
|
692
|
+
sort: Pr(U),
|
|
693
693
|
filters: JSON.stringify(Le),
|
|
694
694
|
// Table + group: headers only (rows load per group on expand, #741).
|
|
695
695
|
// Kanban renders the full matching set, grouped client-side.
|
|
696
696
|
...ie ? {
|
|
697
697
|
group_by: R,
|
|
698
698
|
...oa.length ? { group_sums: oa.join(",") } : {}
|
|
699
|
-
} : C === "table" ? { page: se, limit:
|
|
699
|
+
} : C === "table" ? { page: se, limit: pn, ...n ? { after: n } : {} } : {},
|
|
700
700
|
...Bt.length ? { totals: Bt.join(",") } : {}
|
|
701
701
|
})
|
|
702
702
|
);
|
|
703
|
-
return n &&
|
|
703
|
+
return n && Wi(Vr.current, t, se, r.next_cursor), r;
|
|
704
704
|
},
|
|
705
705
|
// Wait for display_config AND scope seeding so the first fetch uses the
|
|
706
706
|
// configured defaults and already carries the viewer's restricted filters.
|
|
@@ -709,14 +709,14 @@ function Ap({
|
|
|
709
709
|
// first fetch went out WITHOUT the seeded scope and refired ~350ms later
|
|
710
710
|
// with it (3.3s + 8.7s of work for one page). The first fetch now also
|
|
711
711
|
// waits for the debounced copy to settle; later typing still debounces.
|
|
712
|
-
enabled: !!l && G && ta && (
|
|
712
|
+
enabled: !!l && G && ta && (In.current || kl),
|
|
713
713
|
// Keep the previous page rendered while a sort/filter/page change refetches —
|
|
714
714
|
// swapping to skeletons collapsed the table height and jittered the page.
|
|
715
715
|
placeholderData: (e) => e,
|
|
716
716
|
gcTime: 20 * 6e4,
|
|
717
|
-
...
|
|
717
|
+
...Al ? { staleTime: Number.POSITIVE_INFINITY } : {}
|
|
718
718
|
});
|
|
719
|
-
i && !
|
|
719
|
+
i && !In.current && (In.current = !0);
|
|
720
720
|
const pt = Object.entries(ke.current).filter(
|
|
721
721
|
([e, t]) => {
|
|
722
722
|
var n;
|
|
@@ -724,7 +724,7 @@ function Ap({
|
|
|
724
724
|
}
|
|
725
725
|
).map(([e]) => e), ua = pt.length > 0 && Object.keys(Le).every((e) => pt.includes(e)), ma = Object.fromEntries(
|
|
726
726
|
Object.entries(Le).filter(([e]) => !pt.includes(e))
|
|
727
|
-
), { data:
|
|
727
|
+
), { data: Kl } = re({
|
|
728
728
|
queryKey: ["queue-default-hidden", l, b, ma],
|
|
729
729
|
enabled: !!l && !!i && !jt && i.total === 0 && ((Co = i.empty) == null ? void 0 : Co.reason) === "filters" && pt.length > 0 && !ua,
|
|
730
730
|
staleTime: 3e4,
|
|
@@ -737,7 +737,7 @@ function Ap({
|
|
|
737
737
|
limit: 1
|
|
738
738
|
})
|
|
739
739
|
).then((e) => Number(e.total ?? 0))
|
|
740
|
-
}), Oe = ua ? Math.max(0, ((($o = i == null ? void 0 : i.stats) == null ? void 0 : $o.total) ?? 0) - ((i == null ? void 0 : i.total) ?? 0)) :
|
|
740
|
+
}), Oe = ua ? Math.max(0, ((($o = i == null ? void 0 : i.stats) == null ? void 0 : $o.total) ?? 0) - ((i == null ? void 0 : i.total) ?? 0)) : Kl ?? 0, pa = (e) => pt.map(e).join(" and "), fa = () => {
|
|
741
741
|
V((e) => {
|
|
742
742
|
const t = { ...e };
|
|
743
743
|
for (const n of pt) delete t[n];
|
|
@@ -758,17 +758,17 @@ function Ap({
|
|
|
758
758
|
}, r = t.find((o) => o.queue === l);
|
|
759
759
|
t.push(n), t.length > 50 && t.shift(), r && r !== n && ce - Number(r.at) < 2e3 && t.filter((o) => o.queue === l).length === 2 && console.warn("[queue] duplicate first fetch", { first: r, second: n });
|
|
760
760
|
}, [ce]);
|
|
761
|
-
const ft = ca && !i || !G || !ta && !i, ba = (jt && !ca ||
|
|
761
|
+
const ft = ca && !i || !G || !ta && !i, ba = (jt && !ca || Xn && jt) && !he.current, [ee, De] = N([]), [X, ha] = N(!1), Dl = W(() => {
|
|
762
762
|
const e = (ie ? [] : (i == null ? void 0 : i.data) ?? []).slice(0, 100).map((r) => `${r.collection}:${r.item_id}`), t = new Set(e), n = X ? ee.filter((r) => !t.has(r)).slice(0, 100) : [];
|
|
763
763
|
return [...e, ...n].map((r) => {
|
|
764
764
|
const o = r.indexOf(":");
|
|
765
765
|
return { collection: r.slice(0, o), item: r.slice(o + 1) };
|
|
766
766
|
});
|
|
767
|
-
}, [ie, i == null ? void 0 : i.data, X, ee]), ya =
|
|
767
|
+
}, [ie, i == null ? void 0 : i.data, X, ee]), ya = Lc(Dl), xn = bu(), ga = Li(jt && !he.current), Ml = Oi({
|
|
768
768
|
pending: jt && !he.current,
|
|
769
769
|
request: l != null ? { method: "GET", url: `/queues/${l}/items` } : null,
|
|
770
770
|
noun: "items"
|
|
771
|
-
}),
|
|
771
|
+
}), Bl = Tc();
|
|
772
772
|
async function xa(e, t) {
|
|
773
773
|
var m;
|
|
774
774
|
const r = (await f.request(D(`/pipelines/instance/${e.collection}/${e.item_id}`))).data;
|
|
@@ -781,7 +781,7 @@ function Ap({
|
|
|
781
781
|
);
|
|
782
782
|
if (!c) throw new Error("No transition available to move this item here");
|
|
783
783
|
let u = null;
|
|
784
|
-
if (
|
|
784
|
+
if (hu(c) && (u = await xn.ask(((m = c.label) == null ? void 0 : m.trim()) || "Move"), !u))
|
|
785
785
|
throw new Error("Not moved — this move needs a note");
|
|
786
786
|
await f.request(
|
|
787
787
|
ge(`/pipelines/instance/${e.collection}/${e.item_id}/transition`, {
|
|
@@ -790,7 +790,7 @@ function Ap({
|
|
|
790
790
|
})
|
|
791
791
|
);
|
|
792
792
|
}
|
|
793
|
-
const
|
|
793
|
+
const jl = Qe({
|
|
794
794
|
mutationFn: async ({ item: e, targetState: t }) => {
|
|
795
795
|
await xa(e, t);
|
|
796
796
|
},
|
|
@@ -818,18 +818,18 @@ function Ap({
|
|
|
818
818
|
),
|
|
819
819
|
onSuccess: () => y.invalidateQueries({ queryKey: ["queue-items", l, b] }),
|
|
820
820
|
onError: () => K.error("Failed to release item")
|
|
821
|
-
}), { data: ht } =
|
|
821
|
+
}), { data: ht } = re({
|
|
822
822
|
queryKey: ["queue-column-prefs", l],
|
|
823
823
|
queryFn: () => f.request(D(`/queues/${l}/column-prefs`)),
|
|
824
824
|
enabled: !!l
|
|
825
|
-
}), [Qt,
|
|
825
|
+
}), [Qt, kn] = N(null), [yt, Zn] = N(null);
|
|
826
826
|
P(() => {
|
|
827
|
-
ht &&
|
|
827
|
+
ht && Zn(ht.data.default_view_id);
|
|
828
828
|
}, [ht]);
|
|
829
|
-
const [ka, va] = N({}), Fe = ie ? (i == null ? void 0 : i.groups) ?? null : null,
|
|
829
|
+
const [ka, va] = N({}), Fe = ie ? (i == null ? void 0 : i.groups) ?? null : null, vn = (Fe ?? []).filter((e) => !xe.has(e.key)).map((e) => e.key).flatMap(
|
|
830
830
|
(e) => Array.from({ length: ka[e] ?? 1 }, (t, n) => ({ key: e, page: n + 1 }))
|
|
831
|
-
),
|
|
832
|
-
queries:
|
|
831
|
+
), wn = nt({
|
|
832
|
+
queries: vn.map(({ key: e, page: t }) => ({
|
|
833
833
|
queryKey: [
|
|
834
834
|
"queue-items",
|
|
835
835
|
l,
|
|
@@ -844,30 +844,30 @@ function Ap({
|
|
|
844
844
|
queryFn: () => f.request(
|
|
845
845
|
D(`/queues/${l}/items`, {
|
|
846
846
|
scope: b,
|
|
847
|
-
sort:
|
|
847
|
+
sort: Pr(U),
|
|
848
848
|
filters: JSON.stringify(Le),
|
|
849
849
|
group_by: R,
|
|
850
850
|
group_key: e,
|
|
851
851
|
page: t,
|
|
852
|
-
limit:
|
|
852
|
+
limit: _u
|
|
853
853
|
})
|
|
854
854
|
).then((n) => ({ key: e, rows: n.data })),
|
|
855
855
|
enabled: !!i && ie,
|
|
856
856
|
placeholderData: (n) => n
|
|
857
857
|
}))
|
|
858
|
-
}),
|
|
859
|
-
(!
|
|
860
|
-
const
|
|
858
|
+
}), Ql = wn.some((e) => e.isFetching), er = O("");
|
|
859
|
+
(!Ql || !er.current) && (er.current = wn.map((e) => e.dataUpdatedAt).join(","));
|
|
860
|
+
const Ul = er.current, tr = W(() => {
|
|
861
861
|
const e = /* @__PURE__ */ new Map();
|
|
862
|
-
return
|
|
862
|
+
return wn.forEach((t, n) => {
|
|
863
863
|
if (!t.data) return;
|
|
864
|
-
const r =
|
|
864
|
+
const r = vn[n].key;
|
|
865
865
|
e.set(r, [...e.get(r) ?? [], ...t.data.rows]);
|
|
866
866
|
}), e;
|
|
867
|
-
}, [
|
|
868
|
-
|
|
869
|
-
), L = Fe ? [...
|
|
870
|
-
|
|
867
|
+
}, [Ul, vn.map((e) => `${e.key}\0${e.page}`).join("")]), Vl = new Set(
|
|
868
|
+
wn.flatMap((e, t) => e.isFetching ? [vn[t].key] : [])
|
|
869
|
+
), L = Fe ? [...tr.values()].flat() : (i == null ? void 0 : i.data) ?? [];
|
|
870
|
+
zc(
|
|
871
871
|
l ? {
|
|
872
872
|
queue: {
|
|
873
873
|
id: l,
|
|
@@ -878,7 +878,7 @@ function Ap({
|
|
|
878
878
|
}
|
|
879
879
|
} : null
|
|
880
880
|
);
|
|
881
|
-
const
|
|
881
|
+
const Gl = Xc(), Ut = L.some((e) => e.fulfilment !== void 0), Vt = L.some((e) => e.send_backs !== void 0), { data: ae, dataUpdatedAt: wa } = re({
|
|
882
882
|
queryKey: ["queue-live-stats", l, b, ve, zr],
|
|
883
883
|
// The totals row ticks with the tiles (#13): the same read totals the whole result as the
|
|
884
884
|
// viewer (it reads every row for the stats already), coalesced by the stats tick.
|
|
@@ -895,18 +895,18 @@ function Ap({
|
|
|
895
895
|
staleTime: Number.POSITIVE_INFINITY,
|
|
896
896
|
placeholderData: (e) => e,
|
|
897
897
|
retry: !1
|
|
898
|
-
}), Gt = !!
|
|
898
|
+
}), Gt = !!ae && wa > ce, g = Gt ? ae.stats : i == null ? void 0 : i.stats, J = Gt ? ae.filtered_stats ?? null : (i == null ? void 0 : i.filtered_stats) ?? null, _a = Gt ? ae.state_counts : i == null ? void 0 : i.state_counts;
|
|
899
899
|
P(() => {
|
|
900
900
|
if (!Gt) return;
|
|
901
|
-
const e =
|
|
902
|
-
pending:
|
|
903
|
-
liveTotal:
|
|
901
|
+
const e = Un.current > 0 || Qn.current, t = zd({
|
|
902
|
+
pending: Bn.current,
|
|
903
|
+
liveTotal: ae.total,
|
|
904
904
|
rowsTotal: i == null ? void 0 : i.total,
|
|
905
905
|
// Only a table re-reads its rows quietly; the other views keep the pill.
|
|
906
906
|
busy: e || C !== "table"
|
|
907
907
|
});
|
|
908
|
-
|
|
909
|
-
liveTotal:
|
|
908
|
+
Bn.current = 0, t > 0 && un((r) => r + t), Xd({
|
|
909
|
+
liveTotal: ae.total,
|
|
910
910
|
rowsTotal: i == null ? void 0 : i.total,
|
|
911
911
|
// Grouped tables too (army 8 b08-N6): their headers count the whole set, and
|
|
912
912
|
// nothing else re-read them — "37 of 38" with the strip at 38 for minutes.
|
|
@@ -918,14 +918,14 @@ function Ap({
|
|
|
918
918
|
he.current = !1;
|
|
919
919
|
}));
|
|
920
920
|
}, [wa]);
|
|
921
|
-
const
|
|
922
|
-
!x.aging_hours &&
|
|
923
|
-
const Wt = x.aging_hours ? Na.current ?? (g == null ? void 0 : g.aging) :
|
|
921
|
+
const nr = (Ro = J ?? g) == null ? void 0 : Ro.aging, Na = O(void 0);
|
|
922
|
+
!x.aging_hours && nr && (Na.current = nr);
|
|
923
|
+
const Wt = x.aging_hours ? Na.current ?? (g == null ? void 0 : g.aging) : nr ?? (g == null ? void 0 : g.aging);
|
|
924
924
|
Jr.current = new Set(L.map((e) => `${e.collection}:${e.item_id}`));
|
|
925
925
|
const Ht = zo(
|
|
926
926
|
L.map((e) => ({ collection: e.collection, id: e.item_id })),
|
|
927
927
|
Yr
|
|
928
|
-
), Sa =
|
|
928
|
+
), Sa = kc(
|
|
929
929
|
L,
|
|
930
930
|
(e) => `${e.collection}:${e.item_id}`,
|
|
931
931
|
be.rootRef,
|
|
@@ -950,30 +950,30 @@ function Ap({
|
|
|
950
950
|
}
|
|
951
951
|
Xr.current = e;
|
|
952
952
|
}, [ce]);
|
|
953
|
-
const
|
|
953
|
+
const rr = O(null), It = [
|
|
954
954
|
...new Set(
|
|
955
955
|
((s == null ? void 0 : s.sources) ?? []).filter((e) => e.type === "collection" && e.collection).map((e) => e.collection)
|
|
956
956
|
)
|
|
957
957
|
].join(",");
|
|
958
958
|
P(() => {
|
|
959
959
|
if (!It) return;
|
|
960
|
-
const e =
|
|
961
|
-
return e && !
|
|
960
|
+
const e = lc(`queue:${l}`);
|
|
961
|
+
return e && !rr.current && (rr.current = e), sc(ct, `queue:${l}`, It.split(","));
|
|
962
962
|
}, [ct, l, It]), P(() => {
|
|
963
|
-
|
|
963
|
+
un(0), Dt.current.clear();
|
|
964
964
|
}, [ce]);
|
|
965
965
|
function Ra() {
|
|
966
|
-
y.invalidateQueries({ queryKey: ["queue-items", l] }), y.invalidateQueries({ queryKey: ["queue-workload", l] }),
|
|
966
|
+
y.invalidateQueries({ queryKey: ["queue-items", l] }), y.invalidateQueries({ queryKey: ["queue-workload", l] }), un(0);
|
|
967
967
|
}
|
|
968
968
|
function Ta() {
|
|
969
969
|
Dt.current.clear(), Ke.dropHeld(), Ra();
|
|
970
970
|
}
|
|
971
|
-
const { data: Ae } =
|
|
971
|
+
const { data: Ae } = re({
|
|
972
972
|
queryKey: ["queue-trends", l],
|
|
973
973
|
queryFn: () => f.request(D(`/queues/${l}/trends`, { days: 14 })),
|
|
974
974
|
enabled: !!l,
|
|
975
975
|
staleTime: 300 * 1e3
|
|
976
|
-
}), { data: qe } =
|
|
976
|
+
}), { data: qe } = re({
|
|
977
977
|
queryKey: ["queue-trends", l, "mine"],
|
|
978
978
|
queryFn: () => f.request(D(`/queues/${l}/trends`, { days: 14, scope: "mine" })),
|
|
979
979
|
enabled: !!l && b === "mine",
|
|
@@ -1000,8 +1000,8 @@ function Ap({
|
|
|
1000
1000
|
)
|
|
1001
1001
|
],
|
|
1002
1002
|
[s == null ? void 0 : s.sources]
|
|
1003
|
-
), { data:
|
|
1004
|
-
queryKey:
|
|
1003
|
+
), { data: Wl } = re({
|
|
1004
|
+
queryKey: Oc.collections(),
|
|
1005
1005
|
queryFn: () => f.request(D("/collections")).then((e) => e.data),
|
|
1006
1006
|
staleTime: 300 * 1e3
|
|
1007
1007
|
}), gt = nt({
|
|
@@ -1015,39 +1015,39 @@ function Ap({
|
|
|
1015
1015
|
}).catch(() => !1),
|
|
1016
1016
|
staleTime: 300 * 1e3
|
|
1017
1017
|
}))
|
|
1018
|
-
}).some((e) => e.data === !0), { data:
|
|
1018
|
+
}).some((e) => e.data === !0), { data: ar = [] } = re({
|
|
1019
1019
|
queryKey: ["queue-integrations-collections"],
|
|
1020
1020
|
queryFn: () => f.request(D("/integration-obligations/collections")).then((e) => e.data ?? []).catch(() => []),
|
|
1021
1021
|
staleTime: 300 * 1e3
|
|
1022
|
-
}), Me = Yt.some((e) =>
|
|
1022
|
+
}), Me = Yt.some((e) => ar.includes(e)), or = W(() => {
|
|
1023
1023
|
var t;
|
|
1024
1024
|
const e = {};
|
|
1025
1025
|
if (!Me) return e;
|
|
1026
1026
|
for (const n of L) {
|
|
1027
|
-
if (!
|
|
1027
|
+
if (!ar.includes(n.collection)) continue;
|
|
1028
1028
|
const r = e[t = n.collection] ?? (e[t] = []);
|
|
1029
1029
|
r.length < 500 && r.push(n.item_id);
|
|
1030
1030
|
}
|
|
1031
1031
|
return e;
|
|
1032
|
-
}, [L,
|
|
1032
|
+
}, [L, ar, Me]), La = Object.keys(or), Oa = nt({
|
|
1033
1033
|
queries: La.map((e) => ({
|
|
1034
|
-
queryKey: ["queue-integrations-summary", e,
|
|
1034
|
+
queryKey: ["queue-integrations-summary", e, or[e].join(",")],
|
|
1035
1035
|
queryFn: () => f.request(
|
|
1036
1036
|
ge("/integration-obligations/summary", {
|
|
1037
1037
|
collection: e,
|
|
1038
|
-
ids:
|
|
1038
|
+
ids: or[e]
|
|
1039
1039
|
})
|
|
1040
1040
|
).then((t) => t.data ?? {}).catch(() => ({})),
|
|
1041
1041
|
staleTime: 3e4
|
|
1042
1042
|
}))
|
|
1043
|
-
}),
|
|
1043
|
+
}), Hl = Oa.map((e) => e.dataUpdatedAt).join(","), Il = W(() => {
|
|
1044
1044
|
const e = {};
|
|
1045
1045
|
return La.forEach((t, n) => {
|
|
1046
1046
|
var o;
|
|
1047
1047
|
const r = ((o = Oa[n]) == null ? void 0 : o.data) ?? {};
|
|
1048
1048
|
for (const [c, u] of Object.entries(r)) e[`${t}:${c}`] = u;
|
|
1049
1049
|
}), e;
|
|
1050
|
-
}, [
|
|
1050
|
+
}, [Hl]), lr = W(() => {
|
|
1051
1051
|
var t;
|
|
1052
1052
|
const e = {};
|
|
1053
1053
|
for (const n of L) {
|
|
@@ -1057,21 +1057,21 @@ function Ap({
|
|
|
1057
1057
|
r.length < 500 && r.push(n.item_id);
|
|
1058
1058
|
}
|
|
1059
1059
|
return e;
|
|
1060
|
-
}, [L]),
|
|
1061
|
-
queries:
|
|
1062
|
-
queryKey: ["queue-task-counts", e,
|
|
1060
|
+
}, [L]), sr = Object.keys(lr), Fa = nt({
|
|
1061
|
+
queries: sr.map((e) => ({
|
|
1062
|
+
queryKey: ["queue-task-counts", e, lr[e].join(",")],
|
|
1063
1063
|
queryFn: () => f.request(
|
|
1064
|
-
ge("/tasks/counts", { collection: e, ids:
|
|
1064
|
+
ge("/tasks/counts", { collection: e, ids: lr[e] })
|
|
1065
1065
|
).then((t) => t.data ?? {}).catch(() => ({})),
|
|
1066
1066
|
staleTime: 3e4
|
|
1067
1067
|
}))
|
|
1068
|
-
}),
|
|
1068
|
+
}), Jl = Fa.map((e) => e.dataUpdatedAt).join(","), Yl = W(() => {
|
|
1069
1069
|
const e = {};
|
|
1070
|
-
return
|
|
1070
|
+
return sr.forEach((t, n) => {
|
|
1071
1071
|
var r;
|
|
1072
1072
|
for (const [o, c] of Object.entries(((r = Fa[n]) == null ? void 0 : r.data) ?? {})) e[`${t}:${o}`] = c;
|
|
1073
1073
|
}), e;
|
|
1074
|
-
}, [
|
|
1074
|
+
}, [Jl]), Aa = sr.length > 0, qa = nt({
|
|
1075
1075
|
queries: Yt.map((e) => ({
|
|
1076
1076
|
queryKey: ["queue-collection-risk-rules", e],
|
|
1077
1077
|
queryFn: () => f.request(
|
|
@@ -1079,7 +1079,7 @@ function Ap({
|
|
|
1079
1079
|
).then((t) => t.data ?? []).catch(() => []),
|
|
1080
1080
|
staleTime: 300 * 1e3
|
|
1081
1081
|
}))
|
|
1082
|
-
}),
|
|
1082
|
+
}), zl = qa.map((e) => e.dataUpdatedAt).join(","), Ea = W(() => {
|
|
1083
1083
|
const e = /* @__PURE__ */ new Map();
|
|
1084
1084
|
for (const t of qa)
|
|
1085
1085
|
for (const n of t.data ?? []) {
|
|
@@ -1090,7 +1090,7 @@ function Ap({
|
|
|
1090
1090
|
});
|
|
1091
1091
|
}
|
|
1092
1092
|
return [...e.values()];
|
|
1093
|
-
}, [
|
|
1093
|
+
}, [zl]), Pa = nt({
|
|
1094
1094
|
queries: Yt.map((e) => ({
|
|
1095
1095
|
queryKey: ["queue-collection-states", e],
|
|
1096
1096
|
queryFn: () => f.request(
|
|
@@ -1115,39 +1115,39 @@ function Ap({
|
|
|
1115
1115
|
var r, o;
|
|
1116
1116
|
return (((r = Be[t]) == null ? void 0 : r.sort) ?? Number.MAX_SAFE_INTEGER) - (((o = Be[n]) == null ? void 0 : o.sort) ?? Number.MAX_SAFE_INTEGER);
|
|
1117
1117
|
}
|
|
1118
|
-
),
|
|
1118
|
+
), ir = W(() => {
|
|
1119
1119
|
const e = {};
|
|
1120
1120
|
for (const [t, n] of Object.entries(Be)) e[t] = n.label;
|
|
1121
1121
|
return e;
|
|
1122
|
-
}, [Be]), Pe = (e) => e ? e === "none" ? "No State" :
|
|
1122
|
+
}, [Be]), Pe = (e) => e ? e === "none" ? "No State" : ir[e] ?? Ka(e) : "—", Ie = (e) => {
|
|
1123
1123
|
if (e === Lt) return "Addendums";
|
|
1124
|
-
const t = (
|
|
1124
|
+
const t = (Wl ?? []).find((n) => n.collection === e);
|
|
1125
1125
|
return (t == null ? void 0 : t.display_name) || (t == null ? void 0 : t.plural) || Ka(e);
|
|
1126
1126
|
}, we = W(() => R ? Fe ? Fe.map((e) => ({
|
|
1127
1127
|
key: e.key,
|
|
1128
|
-
rows:
|
|
1128
|
+
rows: tr.get(e.key) ?? [],
|
|
1129
1129
|
breached: e.breached,
|
|
1130
1130
|
atRisk: e.at_risk,
|
|
1131
1131
|
count: e.count,
|
|
1132
1132
|
sums: e.sums ?? {}
|
|
1133
|
-
})) :
|
|
1133
|
+
})) : Fc(L, R).map((e) => ({ ...e, count: e.rows.length, sums: {} })) : null, [L, R, Fe, tr]), cr = O(null);
|
|
1134
1134
|
P(() => {
|
|
1135
1135
|
if (!R || !we) {
|
|
1136
|
-
|
|
1136
|
+
cr.current = null;
|
|
1137
1137
|
return;
|
|
1138
1138
|
}
|
|
1139
|
-
if (ie && !Fe ||
|
|
1140
|
-
|
|
1139
|
+
if (ie && !Fe || cr.current === R) return;
|
|
1140
|
+
cr.current = R;
|
|
1141
1141
|
const e = we.reduce((t, n) => t + n.count, 0);
|
|
1142
|
-
|
|
1142
|
+
En(e > 200 ? new Set(we.map((t) => t.key)) : /* @__PURE__ */ new Set()), va({});
|
|
1143
1143
|
}, [R, Fe]);
|
|
1144
|
-
function
|
|
1145
|
-
|
|
1144
|
+
function Xl(e) {
|
|
1145
|
+
En((t) => {
|
|
1146
1146
|
const n = new Set(t);
|
|
1147
1147
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
1148
1148
|
});
|
|
1149
1149
|
}
|
|
1150
|
-
const _e = W(() => we ? we.filter((e) => !xe.has(e.key)).flatMap((e) => e.rows) : L, [we, L, xe]), k = (e) => `${e.collection}:${e.item_id}`, [Je, Ye] = N(null), [
|
|
1150
|
+
const _e = W(() => we ? we.filter((e) => !xe.has(e.key)).flatMap((e) => e.rows) : L, [we, L, xe]), k = (e) => `${e.collection}:${e.item_id}`, [Je, Ye] = N(null), [Zl, dr] = N(!1), [zt, Xt] = N(null), ur = O(null), mr = (e) => {
|
|
1151
1151
|
if (e.collection === Lt && e.url) {
|
|
1152
1152
|
const t = e.url.match(/^\/collections\/([^/?]+)\/([^/?]+)(?:\?(.*))?$/);
|
|
1153
1153
|
if (t) {
|
|
@@ -1171,13 +1171,13 @@ function Ap({
|
|
|
1171
1171
|
if (s) {
|
|
1172
1172
|
if (e) {
|
|
1173
1173
|
const n = C === "table" && !ie, r = !L.some((o) => o.collection === Lt);
|
|
1174
|
-
|
|
1174
|
+
dc({
|
|
1175
1175
|
list: `queue:${l}`,
|
|
1176
1176
|
label: s.name,
|
|
1177
1177
|
rows: L.filter((o) => o.collection !== Lt).map((o) => ({ collection: o.collection, id: String(o.item_id) })),
|
|
1178
1178
|
opened: e,
|
|
1179
1179
|
entry: Jo(),
|
|
1180
|
-
...n && r && typeof (i == null ? void 0 : i.total) == "number" ? { total: i.total, offset: (se - 1) *
|
|
1180
|
+
...n && r && typeof (i == null ? void 0 : i.total) == "number" ? { total: i.total, offset: (se - 1) * pn } : {}
|
|
1181
1181
|
});
|
|
1182
1182
|
}
|
|
1183
1183
|
ol({
|
|
@@ -1185,14 +1185,14 @@ function Ap({
|
|
|
1185
1185
|
name: s.name,
|
|
1186
1186
|
path: `${window.location.pathname}${window.location.search}`,
|
|
1187
1187
|
at: Date.now(),
|
|
1188
|
-
scroll: ((t =
|
|
1188
|
+
scroll: ((t = Nn.current) == null ? void 0 : t.scrollTop) ?? 0,
|
|
1189
1189
|
state: { scope: b, page: se, sort: U, filters: x, group_by: R, view: C },
|
|
1190
1190
|
entry: Jo()
|
|
1191
1191
|
});
|
|
1192
1192
|
}
|
|
1193
1193
|
}, xt = (e) => {
|
|
1194
|
-
Ba({ collection: e.collection, id: String(e.item_id) }), Q.open(
|
|
1195
|
-
},
|
|
1194
|
+
Ba({ collection: e.collection, id: String(e.item_id) }), Q.open(mr(e));
|
|
1195
|
+
}, es = (e) => {
|
|
1196
1196
|
Ba({ collection: e.collection, id: String(e.itemId) });
|
|
1197
1197
|
const t = Y == null ? void 0 : Y[0], n = !!t && t.collection === e.collection && String(t.itemId) === e.itemId;
|
|
1198
1198
|
Q.open({
|
|
@@ -1210,7 +1210,7 @@ function Ap({
|
|
|
1210
1210
|
window.removeEventListener("mousedown", e), window.removeEventListener("scroll", e, !0);
|
|
1211
1211
|
};
|
|
1212
1212
|
}, [H]);
|
|
1213
|
-
const
|
|
1213
|
+
const pr = (e) => {
|
|
1214
1214
|
Xt(k(e));
|
|
1215
1215
|
const t = (p == null ? void 0 : p.row_click) ?? "preview";
|
|
1216
1216
|
if (t === "full" || e.collection === Lt) {
|
|
@@ -1234,24 +1234,24 @@ function Ap({
|
|
|
1234
1234
|
const e = L.find((t) => k(t) === k(Je));
|
|
1235
1235
|
e && e !== Je && Ye(e);
|
|
1236
1236
|
}, [L]);
|
|
1237
|
-
const
|
|
1237
|
+
const ts = (e) => !e.claimed_by || e.claimed_by.id === z;
|
|
1238
1238
|
function ja(e) {
|
|
1239
|
-
const t = e ? _e.findIndex((r) => k(r) === k(e)) + 1 : 0, n = _e.slice(t).find(
|
|
1239
|
+
const t = e ? _e.findIndex((r) => k(r) === k(e)) + 1 : 0, n = _e.slice(t).find(ts);
|
|
1240
1240
|
if (!n) {
|
|
1241
|
-
|
|
1241
|
+
dr(!1), Ye(null), K.info("Nothing left to work on — queue clear!");
|
|
1242
1242
|
return;
|
|
1243
1243
|
}
|
|
1244
1244
|
if (Xt(k(n)), Te && !n.claimed_by && He.mutate(n), (p == null ? void 0 : p.row_click) === "full") {
|
|
1245
1245
|
xt(n);
|
|
1246
1246
|
return;
|
|
1247
1247
|
}
|
|
1248
|
-
|
|
1248
|
+
dr(!0), Ye(n);
|
|
1249
1249
|
}
|
|
1250
1250
|
P(() => {
|
|
1251
1251
|
if (C !== "table") return;
|
|
1252
1252
|
function e(t) {
|
|
1253
1253
|
var o;
|
|
1254
|
-
if (t.metaKey || t.ctrlKey || t.altKey || !
|
|
1254
|
+
if (t.metaKey || t.ctrlKey || t.altKey || !vu(t.target)) return;
|
|
1255
1255
|
const n = zt ? _e.findIndex((c) => k(c) === zt) : -1, r = (c) => {
|
|
1256
1256
|
Xt(k(c));
|
|
1257
1257
|
const u = k(c), m = [...document.querySelectorAll("tr[data-row-key]")].find(
|
|
@@ -1275,70 +1275,70 @@ function Ap({
|
|
|
1275
1275
|
}
|
|
1276
1276
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
1277
1277
|
}, [C, _e, zt, Je, z, He, bt, Te]);
|
|
1278
|
-
const { data: E } =
|
|
1278
|
+
const { data: E } = re({
|
|
1279
1279
|
queryKey: ["queue-views", l],
|
|
1280
1280
|
queryFn: () => f.request(D(`/queues/${l}/views`)),
|
|
1281
1281
|
enabled: !!l
|
|
1282
|
-
}), [fe, ze] = N(null), [
|
|
1282
|
+
}), [fe, ze] = N(null), [ns, fr] = N(!1), [_n, Qa] = N(""), [Ua, Va] = N(!1), [kt, Ga] = N(!1);
|
|
1283
1283
|
function en(e) {
|
|
1284
1284
|
var n;
|
|
1285
1285
|
const t = e.state ?? {};
|
|
1286
|
-
e.is_default ? (me(((n = s == null ? void 0 : s.display_config) == null ? void 0 : n.default_scope) ?? "all"), V({ ...ke.current })) : (me(t.scope ?? "all"), V({ ...ke.current, ...t.filters ?? {} })), lt(t.sort ?? ""), At(t.group_by ?? null),
|
|
1286
|
+
e.is_default ? (me(((n = s == null ? void 0 : s.display_config) == null ? void 0 : n.default_scope) ?? "all"), V({ ...ke.current })) : (me(t.scope ?? "all"), V({ ...ke.current, ...t.filters ?? {} })), lt(t.sort ?? ""), At(t.group_by ?? null), kn(t.columns ?? null), Kn(t.pins ?? null), dn(
|
|
1287
1287
|
Object.fromEntries(
|
|
1288
1288
|
Object.entries(t.totals ?? {}).filter(
|
|
1289
|
-
([r, o]) =>
|
|
1289
|
+
([r, o]) => Br(r) && pd(o)
|
|
1290
1290
|
)
|
|
1291
1291
|
)
|
|
1292
1292
|
), t.view && ot(Ve.includes(t.view) ? t.view : Ve[0]), j(1), ze(e.id);
|
|
1293
1293
|
}
|
|
1294
|
-
function
|
|
1294
|
+
function rs() {
|
|
1295
1295
|
var t, n;
|
|
1296
1296
|
const e = E == null ? void 0 : E.data.find((r) => r.is_default);
|
|
1297
1297
|
if (e) {
|
|
1298
1298
|
en(e);
|
|
1299
1299
|
return;
|
|
1300
1300
|
}
|
|
1301
|
-
me(((t = s == null ? void 0 : s.display_config) == null ? void 0 : t.default_scope) ?? "all"), V({ ...ke.current }), lt(""), At(null),
|
|
1301
|
+
me(((t = s == null ? void 0 : s.display_config) == null ? void 0 : t.default_scope) ?? "all"), V({ ...ke.current }), lt(""), At(null), kn(null), Kn(null), dn({}), (n = s == null ? void 0 : s.display_config) != null && n.default_view && ot(s.display_config.default_view), j(1), ze(null);
|
|
1302
1302
|
}
|
|
1303
1303
|
P(() => {
|
|
1304
1304
|
if (G || !(s != null && s.display_config) || ht === void 0 || E === void 0) return;
|
|
1305
1305
|
const e = ht.data.default_view_id, t = e != null ? E.data.find((r) => r.id === e) : void 0, n = E.data.find((r) => r.is_default);
|
|
1306
|
-
t ? en(t) : n ? en(n) : (ot(s.display_config.default_view), me(s.display_config.default_scope)),
|
|
1306
|
+
t ? en(t) : n ? en(n) : (ot(s.display_config.default_view), me(s.display_config.default_scope)), xl(!0);
|
|
1307
1307
|
}, [s, ht, E, G]);
|
|
1308
|
-
const
|
|
1308
|
+
const Nn = O(null), Sn = O(null);
|
|
1309
1309
|
P(() => {
|
|
1310
1310
|
if (!G) return;
|
|
1311
|
-
const e =
|
|
1312
|
-
if (!e || !
|
|
1311
|
+
const e = Sd();
|
|
1312
|
+
if (!e || !Cd(e, l, ac(), rc())) return;
|
|
1313
1313
|
ol({ ...e, restore: !1 });
|
|
1314
1314
|
const t = e.state ?? {};
|
|
1315
|
-
t.scope && me(t.scope), t.filters && V({ ...ke.current, ...t.filters }), t.sort != null && lt(t.sort), At(t.group_by ?? null), t.view && ot(t.view), t.page && j(t.page),
|
|
1316
|
-
const n =
|
|
1315
|
+
t.scope && me(t.scope), t.filters && V({ ...ke.current, ...t.filters }), t.sort != null && lt(t.sort), At(t.group_by ?? null), t.view && ot(t.view), t.page && j(t.page), Sn.current = e.scroll ?? 0;
|
|
1316
|
+
const n = ic(`queue:${l}`);
|
|
1317
1317
|
if (n) {
|
|
1318
1318
|
const r = `${n.collection}:${n.id}`;
|
|
1319
|
-
Xt(r),
|
|
1319
|
+
Xt(r), ur.current = r;
|
|
1320
1320
|
}
|
|
1321
1321
|
Y && Y.length > 0 && _t.back(Y.length);
|
|
1322
1322
|
}, [G, l]);
|
|
1323
|
-
const Wa = O(!1), [Ha,
|
|
1323
|
+
const Wa = O(!1), [Ha, as] = N(0);
|
|
1324
1324
|
P(() => {
|
|
1325
1325
|
if (Wa.current || !G || !It) return;
|
|
1326
1326
|
if (Ha === 0) {
|
|
1327
|
-
|
|
1327
|
+
as(1);
|
|
1328
1328
|
return;
|
|
1329
1329
|
}
|
|
1330
|
-
if (!i ||
|
|
1330
|
+
if (!i || Xn) return;
|
|
1331
1331
|
Wa.current = !0;
|
|
1332
|
-
const e =
|
|
1333
|
-
n === "replay" && e && Ke.paused ?
|
|
1332
|
+
const e = rr.current, n = !!e && ce > 0 && ce <= e.leftAt ? Yo(e) : "fresh";
|
|
1333
|
+
n === "replay" && e && Ke.paused ? Wn(e.events.filter((o) => !o.own), () => {
|
|
1334
1334
|
}) : (n === "replay" || n === "refetch") && (Pt.current = ((e == null ? void 0 : e.events) ?? []).filter((o) => !o.own).map((o) => ({ key: `${o.collection}:${String(o.item)}`, by: null })), he.current = !0, y.invalidateQueries({
|
|
1335
1335
|
queryKey: ie ? ["queue-items", l] : ["queue-items", l, b]
|
|
1336
1336
|
}).finally(() => {
|
|
1337
1337
|
he.current = !1;
|
|
1338
|
-
})),
|
|
1339
|
-
const r =
|
|
1340
|
-
|
|
1341
|
-
}, [i,
|
|
1338
|
+
})), ql(!1);
|
|
1339
|
+
const r = ur.current;
|
|
1340
|
+
ur.current = null, r && setTimeout(() => cc(be.rootRef.current, r), 260);
|
|
1341
|
+
}, [i, Xn, G, It, Ha]), P(() => {
|
|
1342
1342
|
var c;
|
|
1343
1343
|
if (!G || typeof window > "u") return;
|
|
1344
1344
|
const e = new URLSearchParams(window.location.search), t = e.get("scope"), n = ((c = e.get("state")) == null ? void 0 : c.trim()) || null, r = t === "all" || t === "mine";
|
|
@@ -1362,18 +1362,18 @@ function Ap({
|
|
|
1362
1362
|
`${window.location.pathname}${n ? `?${n}` : ""}${window.location.hash}`
|
|
1363
1363
|
), me("all"), V((r) => ({ ...r, owners: [t] })), ze(null), j(1);
|
|
1364
1364
|
}, [G]);
|
|
1365
|
-
const
|
|
1365
|
+
const br = O(null);
|
|
1366
1366
|
P(() => {
|
|
1367
1367
|
if (!G) return;
|
|
1368
|
-
const e =
|
|
1369
|
-
e && (
|
|
1368
|
+
const e = Xi(Zi(`queue:${l}`));
|
|
1369
|
+
e && (ec(), en({
|
|
1370
1370
|
id: -1,
|
|
1371
1371
|
// Saved views type filters loosely as strings; multi-selects ride as arrays there too.
|
|
1372
1372
|
state: e
|
|
1373
|
-
}), ze(null), e.page && j(e.page), e.view_id && (
|
|
1373
|
+
}), ze(null), e.page && j(e.page), e.view_id && (br.current = e.view_id));
|
|
1374
1374
|
}, [G]), P(() => {
|
|
1375
|
-
const e =
|
|
1376
|
-
e == null || !(E != null && E.data) || (
|
|
1375
|
+
const e = br.current;
|
|
1376
|
+
e == null || !(E != null && E.data) || (br.current = null, E.data.some((t) => t.id === e) && ze(e));
|
|
1377
1377
|
}, [E, G]);
|
|
1378
1378
|
const Ia = () => {
|
|
1379
1379
|
var r;
|
|
@@ -1383,7 +1383,7 @@ function Ap({
|
|
|
1383
1383
|
(o) => Array.isArray(o) ? o.length > 0 : o !== "" && o != null
|
|
1384
1384
|
).length;
|
|
1385
1385
|
return n > 0 && e.push(`${n} filter${n === 1 ? "" : "s"}`), e.length ? e.join(", ") : null;
|
|
1386
|
-
},
|
|
1386
|
+
}, hr = () => ({
|
|
1387
1387
|
scope: b,
|
|
1388
1388
|
filters: x,
|
|
1389
1389
|
sort: U,
|
|
@@ -1396,27 +1396,27 @@ function Ap({
|
|
|
1396
1396
|
...fe != null && fe > 0 ? { view_id: fe } : {}
|
|
1397
1397
|
});
|
|
1398
1398
|
P(() => {
|
|
1399
|
-
|
|
1399
|
+
Sn.current == null || L.length === 0 || !Nn.current || (Nn.current.scrollTop = Sn.current, Sn.current = null);
|
|
1400
1400
|
}, [L]);
|
|
1401
|
-
const { isAdmin: Xe } = Ho(),
|
|
1401
|
+
const { isAdmin: Xe } = Ho(), os = L.map((e) => `${e.collection}|${e.item_id}`).join(","), ls = W(
|
|
1402
1402
|
() => L.map((e) => ({ collection: e.collection, id: e.item_id })),
|
|
1403
|
-
[
|
|
1404
|
-
), Ja =
|
|
1403
|
+
[os]
|
|
1404
|
+
), Ja = Pd(ls, Xe), ss = (e) => zt === k(e) ? (
|
|
1405
1405
|
// Pinned sticky cells use bg-inherit — the highlight must be
|
|
1406
1406
|
// OPAQUE (nvr-cyan/5-over-white equivalents) or horizontally
|
|
1407
1407
|
// scrolled content bleeds through the pinned columns. Same
|
|
1408
1408
|
// pair DataTable uses for selected rows when pins are active.
|
|
1409
1409
|
"bg-[#f2fdff] dark:bg-[#20303a]"
|
|
1410
|
-
) : e.at_risk ?
|
|
1410
|
+
) : e.at_risk ? Kc(e.at_risk_color ?? "red") : void 0, tn = Xe || (s == null ? void 0 : s.owner) != null && s.owner === z, is = Qe({
|
|
1411
1411
|
mutationFn: ({ viewId: e, on: t }) => f.request(Io(`/queues/views/${e}`, { is_default: t })),
|
|
1412
1412
|
onSuccess: () => {
|
|
1413
1413
|
y.invalidateQueries({ queryKey: ["queue-views", l] }), K.success("Queue default view updated");
|
|
1414
1414
|
},
|
|
1415
1415
|
onError: () => K.error("Could not update the queue default view")
|
|
1416
|
-
}),
|
|
1416
|
+
}), Cn = Qe({
|
|
1417
1417
|
mutationFn: () => f.request(
|
|
1418
1418
|
ge(`/queues/${l}/views`, {
|
|
1419
|
-
name:
|
|
1419
|
+
name: _n.trim(),
|
|
1420
1420
|
is_shared: tn && (Ua || kt),
|
|
1421
1421
|
is_default: kt,
|
|
1422
1422
|
state: {
|
|
@@ -1432,7 +1432,7 @@ function Ap({
|
|
|
1432
1432
|
})
|
|
1433
1433
|
),
|
|
1434
1434
|
onSuccess: (e) => {
|
|
1435
|
-
xo(on()),
|
|
1435
|
+
xo(on()), fr(!1), Qa(""), Va(!1), Ga(!1), ze(e.data.id), y.invalidateQueries({ queryKey: ["queue-views", l] }), K.success("View saved");
|
|
1436
1436
|
},
|
|
1437
1437
|
onError: () => K.error("Failed to save view")
|
|
1438
1438
|
}), [Ya, za] = N(null), Ze = Qe({
|
|
@@ -1456,21 +1456,21 @@ function Ap({
|
|
|
1456
1456
|
);
|
|
1457
1457
|
},
|
|
1458
1458
|
onError: () => K.error("Failed to update view")
|
|
1459
|
-
}), [
|
|
1459
|
+
}), [yr, $n] = N(null);
|
|
1460
1460
|
P(() => {
|
|
1461
|
-
if (
|
|
1462
|
-
const e = setTimeout(() =>
|
|
1461
|
+
if (yr == null) return;
|
|
1462
|
+
const e = setTimeout(() => $n(null), 5e3);
|
|
1463
1463
|
return () => clearTimeout(e);
|
|
1464
|
-
}, [
|
|
1464
|
+
}, [yr]);
|
|
1465
1465
|
const Xa = Qe({
|
|
1466
|
-
mutationFn: (e) => f.request(
|
|
1466
|
+
mutationFn: (e) => f.request(qr(`/queues/views/${e}`)),
|
|
1467
1467
|
onSuccess: (e, t) => {
|
|
1468
|
-
|
|
1468
|
+
$n(null), y.invalidateQueries({ queryKey: ["queue-views", l] }), ze(null), yt === t && Zn(null);
|
|
1469
1469
|
},
|
|
1470
1470
|
onError: () => K.error("Failed to delete view")
|
|
1471
|
-
}),
|
|
1472
|
-
mutationFn: (e) => f.request(
|
|
1473
|
-
onMutate: (e) =>
|
|
1471
|
+
}), cs = Qe({
|
|
1472
|
+
mutationFn: (e) => f.request(Ai(`/queues/${l}/default-view`, { view_id: e })),
|
|
1473
|
+
onMutate: (e) => Zn(e),
|
|
1474
1474
|
onSuccess: (e, t) => {
|
|
1475
1475
|
y.invalidateQueries({ queryKey: ["queue-column-prefs", l] }), K.success(
|
|
1476
1476
|
t === null ? "Reverted to the general default" : "Set as your default view"
|
|
@@ -1479,18 +1479,18 @@ function Ap({
|
|
|
1479
1479
|
onError: () => {
|
|
1480
1480
|
y.invalidateQueries({ queryKey: ["queue-column-prefs", l] }), K.error("Failed to update default view");
|
|
1481
1481
|
}
|
|
1482
|
-
}),
|
|
1482
|
+
}), ds = () => {
|
|
1483
1483
|
X && De([]), ha(!X);
|
|
1484
1484
|
};
|
|
1485
1485
|
P(() => {
|
|
1486
1486
|
C !== "table" && X && (ha(!1), De([]));
|
|
1487
|
-
}, [C, X]),
|
|
1487
|
+
}, [C, X]), Fi(), Un.current = ee.length;
|
|
1488
1488
|
const [vt, Za] = N(!1);
|
|
1489
|
-
async function
|
|
1489
|
+
async function gr(e, t) {
|
|
1490
1490
|
const n = L.filter((u) => ee.includes(k(u)));
|
|
1491
|
-
Za(!0),
|
|
1491
|
+
Za(!0), xn.beginBatch();
|
|
1492
1492
|
const r = await Promise.allSettled(n.map(t));
|
|
1493
|
-
|
|
1493
|
+
xn.endBatch();
|
|
1494
1494
|
const o = r.filter((u) => u.status === "fulfilled").length, c = r.length - o;
|
|
1495
1495
|
Za(!1), De([]), y.invalidateQueries({ queryKey: ["queue-items", l] }), c ? K.warning(`${e}: ${o} succeeded, ${c} failed`) : K.success(`${e}: ${o} succeeded`);
|
|
1496
1496
|
}
|
|
@@ -1501,40 +1501,40 @@ function Ap({
|
|
|
1501
1501
|
if (r) return r;
|
|
1502
1502
|
}
|
|
1503
1503
|
return null;
|
|
1504
|
-
}, Ne = X ? ee :
|
|
1505
|
-
() => [...new Set(Ne.map((e) =>
|
|
1504
|
+
}, Ne = X ? ee : Nu, Rn = Dc(Ne), us = W(
|
|
1505
|
+
() => [...new Set(Ne.map((e) => Kr(e).collection))],
|
|
1506
1506
|
[Ne]
|
|
1507
|
-
),
|
|
1508
|
-
|
|
1509
|
-
const
|
|
1510
|
-
() =>
|
|
1511
|
-
[
|
|
1512
|
-
),
|
|
1507
|
+
), xr = Mc(us, Rn.picks), [kr, eo] = N(!1);
|
|
1508
|
+
kr && Ne.length === 0 && eo(!1);
|
|
1509
|
+
const ms = W(
|
|
1510
|
+
() => kr ? Ne : Ne.filter((e) => xr.marked.has(e)),
|
|
1511
|
+
[kr, Ne, xr.marked]
|
|
1512
|
+
), ps = Bc(ms, Rn.picks).rows.filter((e) => Rn.picks.has(e.key)), fs = zo(
|
|
1513
1513
|
Ne.map((e) => {
|
|
1514
|
-
const { collection: t, id: n } =
|
|
1514
|
+
const { collection: t, id: n } = Kr(e);
|
|
1515
1515
|
return { collection: t, id: n };
|
|
1516
1516
|
}),
|
|
1517
1517
|
Yr
|
|
1518
|
-
),
|
|
1519
|
-
const { collection: t, id: n } =
|
|
1518
|
+
), bs = Ne.map((e) => {
|
|
1519
|
+
const { collection: t, id: n } = Kr(e), r = ya[Zo(t, n)], o = fs.get(e);
|
|
1520
1520
|
return {
|
|
1521
1521
|
key: e,
|
|
1522
1522
|
viewerIds: (r == null ? void 0 : r.ids) ?? [],
|
|
1523
1523
|
viewerCount: (r == null ? void 0 : r.count) ?? 0,
|
|
1524
1524
|
lockName: o && !o.is_mine ? o.locked_by_name ?? "someone" : null
|
|
1525
1525
|
};
|
|
1526
|
-
}).filter((e) => e.viewerCount > 0 || !!e.lockName),
|
|
1526
|
+
}).filter((e) => e.viewerCount > 0 || !!e.lockName), hs = jc(
|
|
1527
1527
|
L,
|
|
1528
1528
|
(e) => `${e.collection}:${e.item_id}`,
|
|
1529
1529
|
Ne
|
|
1530
|
-
),
|
|
1530
|
+
), ys = ut.filter(
|
|
1531
1531
|
(e) => {
|
|
1532
1532
|
var t;
|
|
1533
1533
|
return it[e] === "sum" && ((t = Mt(e)) == null ? void 0 : t.kind) === "server" && e.startsWith("extra.");
|
|
1534
1534
|
}
|
|
1535
|
-
), to =
|
|
1536
|
-
bs,
|
|
1535
|
+
), to = Qc(
|
|
1537
1536
|
hs,
|
|
1537
|
+
ys,
|
|
1538
1538
|
(e, t) => {
|
|
1539
1539
|
var n;
|
|
1540
1540
|
return (n = e.extra) == null ? void 0 : n[t.slice(6)];
|
|
@@ -1544,13 +1544,13 @@ function Ap({
|
|
|
1544
1544
|
if (R === "collection") return Ie(e);
|
|
1545
1545
|
if (R != null && R.startsWith("extra.") && e !== "—") {
|
|
1546
1546
|
const t = R.slice(6), n = ye(t);
|
|
1547
|
-
return n ? rt(e, n) :
|
|
1547
|
+
return n ? rt(e, n) : cl(
|
|
1548
1548
|
((s == null ? void 0 : s.extra_field_meta) ?? []).find((r) => r.path === t),
|
|
1549
1549
|
e
|
|
1550
1550
|
);
|
|
1551
1551
|
}
|
|
1552
1552
|
return e;
|
|
1553
|
-
}, nn =
|
|
1553
|
+
}, nn = pc(
|
|
1554
1554
|
(we ?? []).map((e) => ({ ...e, rows: xe.has(e.key) ? [] : e.rows })),
|
|
1555
1555
|
k,
|
|
1556
1556
|
be.rootRef,
|
|
@@ -1567,7 +1567,7 @@ function Ap({
|
|
|
1567
1567
|
])
|
|
1568
1568
|
}
|
|
1569
1569
|
);
|
|
1570
|
-
|
|
1570
|
+
fc(
|
|
1571
1571
|
be.rootRef,
|
|
1572
1572
|
nn.groups.map((e) => `§${e.key}${e.rows.map(k).join("")}`).join(""),
|
|
1573
1573
|
{
|
|
@@ -1575,19 +1575,19 @@ function Ap({
|
|
|
1575
1575
|
resetKey: JSON.stringify([l, b, U, ve, R])
|
|
1576
1576
|
}
|
|
1577
1577
|
);
|
|
1578
|
-
const
|
|
1578
|
+
const Tn = (e) => Sa.isGone(e) || nn.isGone(e), wt = (e) => {
|
|
1579
1579
|
const t = nn.movingTo(e);
|
|
1580
1580
|
return t == null ? null : no(t);
|
|
1581
|
-
},
|
|
1581
|
+
}, gs = new Map(nn.groups.map((e) => [e.key, e.rows])), vr = we ? nn.groups.map(
|
|
1582
1582
|
(e) => e.group ?? { key: e.key, rows: [], breached: 0, atRisk: 0, count: 0, sums: {} }
|
|
1583
|
-
) : null,
|
|
1583
|
+
) : null, xs = vr == null ? void 0 : vr.map((e) => ({
|
|
1584
1584
|
key: e.key,
|
|
1585
|
-
rows:
|
|
1585
|
+
rows: gs.get(e.key) ?? [],
|
|
1586
1586
|
header: /* @__PURE__ */ d(Ce, { children: [
|
|
1587
1587
|
/* @__PURE__ */ a("span", { children: no(e.key) }),
|
|
1588
1588
|
/* @__PURE__ */ d("span", { className: "font-normal text-slate-400", children: [
|
|
1589
1589
|
"(",
|
|
1590
|
-
|
|
1590
|
+
ne(e.count),
|
|
1591
1591
|
")"
|
|
1592
1592
|
] }),
|
|
1593
1593
|
Object.entries(e.sums).map(([t, n]) => {
|
|
@@ -1601,13 +1601,13 @@ function Ap({
|
|
|
1601
1601
|
A(`extra.${t}`, Ue(t)),
|
|
1602
1602
|
":",
|
|
1603
1603
|
" ",
|
|
1604
|
-
r ? rt(String(n), r) :
|
|
1604
|
+
r ? rt(String(n), r) : ne(n)
|
|
1605
1605
|
]
|
|
1606
1606
|
},
|
|
1607
1607
|
t
|
|
1608
1608
|
);
|
|
1609
1609
|
}),
|
|
1610
|
-
Fe && !xe.has(e.key) &&
|
|
1610
|
+
Fe && !xe.has(e.key) && Vl.has(e.key) && /* @__PURE__ */ a("span", { className: "font-normal text-slate-400", children: "loading…" }),
|
|
1611
1611
|
Fe && !xe.has(e.key) && e.rows.length > 0 && e.rows.length < e.count && /* @__PURE__ */ d(
|
|
1612
1612
|
"button",
|
|
1613
1613
|
{
|
|
@@ -1619,9 +1619,9 @@ function Ap({
|
|
|
1619
1619
|
className: "rounded px-1.5 py-0.5 text-[11px] font-medium text-nvr-navy hover:bg-nvr-cyan/10 dark:text-nvr-cyan",
|
|
1620
1620
|
children: [
|
|
1621
1621
|
"Showing ",
|
|
1622
|
-
|
|
1622
|
+
ne(e.rows.length),
|
|
1623
1623
|
" of ",
|
|
1624
|
-
|
|
1624
|
+
ne(e.count),
|
|
1625
1625
|
" · Show more"
|
|
1626
1626
|
]
|
|
1627
1627
|
}
|
|
@@ -1635,13 +1635,13 @@ function Ap({
|
|
|
1635
1635
|
" at risk"
|
|
1636
1636
|
] })
|
|
1637
1637
|
] })
|
|
1638
|
-
})),
|
|
1639
|
-
...
|
|
1638
|
+
})), wr = (((To = i == null ? void 0 : i.available_values.collection) == null ? void 0 : To.length) ?? 0) > 1, ro = L.some((e) => !!e.unseen) || Ht.size > 0 || L.some((e) => be.isNew(k(e))), ao = [
|
|
1639
|
+
...wr ? [
|
|
1640
1640
|
{
|
|
1641
1641
|
key: "collection",
|
|
1642
1642
|
header: A("collection", "Collection"),
|
|
1643
1643
|
sortable: !0,
|
|
1644
|
-
render: (e) => /* @__PURE__ */ a(
|
|
1644
|
+
render: (e) => /* @__PURE__ */ a(Gd, { variant: "outline", children: Ie(e.collection) })
|
|
1645
1645
|
}
|
|
1646
1646
|
] : [],
|
|
1647
1647
|
{
|
|
@@ -1656,17 +1656,17 @@ function Ap({
|
|
|
1656
1656
|
// a whole, but nothing on it said so — an underline is the one
|
|
1657
1657
|
// convention people already read as "this goes somewhere".
|
|
1658
1658
|
/* @__PURE__ */ d("span", { className: "flex items-center gap-1.5", children: [
|
|
1659
|
-
Ht.get(k(e)) || be.isNew(k(e)) ||
|
|
1660
|
-
|
|
1659
|
+
Ht.get(k(e)) || be.isNew(k(e)) || Tn(k(e)) || wt(k(e)) != null ? /* @__PURE__ */ a(
|
|
1660
|
+
Ld,
|
|
1661
1661
|
{
|
|
1662
1662
|
lock: Ht.get(k(e)),
|
|
1663
1663
|
isNew: be.isNew(k(e)),
|
|
1664
|
-
gone:
|
|
1664
|
+
gone: Tn(k(e)),
|
|
1665
1665
|
movingTo: wt(k(e)),
|
|
1666
1666
|
dataAttr: "data-queue-live-mark",
|
|
1667
1667
|
hang: !0
|
|
1668
1668
|
}
|
|
1669
|
-
) : /* @__PURE__ */ a(
|
|
1669
|
+
) : /* @__PURE__ */ a(Vd, { change: e.unseen, dataAttr: "data-queue-unseen", hang: !0 }),
|
|
1670
1670
|
/* @__PURE__ */ a(
|
|
1671
1671
|
"span",
|
|
1672
1672
|
{
|
|
@@ -1675,7 +1675,7 @@ function Ap({
|
|
|
1675
1675
|
children: e.label
|
|
1676
1676
|
}
|
|
1677
1677
|
),
|
|
1678
|
-
wt(k(e)) != null && /* @__PURE__ */ a(
|
|
1678
|
+
wt(k(e)) != null && /* @__PURE__ */ a(Od, { to: wt(k(e)) }),
|
|
1679
1679
|
(e.labels ?? []).slice(0, 3).map((t) => /* @__PURE__ */ a(
|
|
1680
1680
|
"span",
|
|
1681
1681
|
{
|
|
@@ -1686,7 +1686,7 @@ function Ap({
|
|
|
1686
1686
|
t
|
|
1687
1687
|
)),
|
|
1688
1688
|
/* @__PURE__ */ a(
|
|
1689
|
-
|
|
1689
|
+
Qd,
|
|
1690
1690
|
{
|
|
1691
1691
|
viewers: ya[Zo(e.collection, e.item_id)],
|
|
1692
1692
|
dataAttr: "data-queue-presence"
|
|
@@ -1708,7 +1708,7 @@ function Ap({
|
|
|
1708
1708
|
),
|
|
1709
1709
|
style: e.state_color ? {
|
|
1710
1710
|
backgroundColor: `${e.state_color}1a`,
|
|
1711
|
-
"--nvr-state-ink":
|
|
1711
|
+
"--nvr-state-ink": Di(e.state_color),
|
|
1712
1712
|
"--nvr-state-ink-dark": e.state_color
|
|
1713
1713
|
} : void 0,
|
|
1714
1714
|
title: e.via_addendum ? `Addendum "${e.via_addendum.title ?? ""}" — ${Pe(e.state)}` : Pe(e.state),
|
|
@@ -1723,24 +1723,24 @@ function Ap({
|
|
|
1723
1723
|
key: "owners",
|
|
1724
1724
|
header: A("owners", "Owners"),
|
|
1725
1725
|
sortable: !0,
|
|
1726
|
-
render: (e) => /* @__PURE__ */ a(
|
|
1726
|
+
render: (e) => /* @__PURE__ */ a(eu, { owners: e.owners })
|
|
1727
1727
|
},
|
|
1728
1728
|
{
|
|
1729
1729
|
key: "aging_hours",
|
|
1730
1730
|
header: A("aging_hours", "Aging"),
|
|
1731
1731
|
sortable: !0,
|
|
1732
|
-
render: (e) =>
|
|
1732
|
+
render: (e) => Cu(e.aging_hours)
|
|
1733
1733
|
},
|
|
1734
1734
|
{
|
|
1735
1735
|
// rt8 — the step and how long it has been there, ticking on the page clock; sorts on
|
|
1736
1736
|
// the server as Aging. Off unless the viewer adds it.
|
|
1737
|
-
key:
|
|
1738
|
-
header: A(
|
|
1737
|
+
key: Er,
|
|
1738
|
+
header: A(Er, "In step"),
|
|
1739
1739
|
sortable: !0,
|
|
1740
1740
|
// A bounded box: the table sizes columns to their content, so without a max width the
|
|
1741
1741
|
// step name ran on under the pinned State column instead of ending in "…".
|
|
1742
1742
|
render: (e) => /* @__PURE__ */ a("div", { className: "min-w-0 max-w-[240px]", children: /* @__PURE__ */ a(
|
|
1743
|
-
|
|
1743
|
+
kd,
|
|
1744
1744
|
{
|
|
1745
1745
|
stepLabel: e.state ? Pe(e.state) : null,
|
|
1746
1746
|
enteredAt: e.state_entered_at
|
|
@@ -1759,7 +1759,7 @@ function Ap({
|
|
|
1759
1759
|
key: "sla_status",
|
|
1760
1760
|
header: A("sla_status", "SLA"),
|
|
1761
1761
|
sortable: !0,
|
|
1762
|
-
render: (e) => /* @__PURE__ */ a(
|
|
1762
|
+
render: (e) => /* @__PURE__ */ a($u, { status: e.sla_status, warningAt: e.sla_warning_at, dueAt: e.sla_due_at })
|
|
1763
1763
|
},
|
|
1764
1764
|
{
|
|
1765
1765
|
key: "at_risk",
|
|
@@ -1767,7 +1767,7 @@ function Ap({
|
|
|
1767
1767
|
sortable: !0,
|
|
1768
1768
|
render: (e) => {
|
|
1769
1769
|
var t;
|
|
1770
|
-
return e.at_risk ? /* @__PURE__ */ d("span", { className:
|
|
1770
|
+
return e.at_risk ? /* @__PURE__ */ d("span", { className: Pc(e.at_risk_color ?? "red"), children: [
|
|
1771
1771
|
"⚑ ",
|
|
1772
1772
|
((t = e.at_risk_rule) == null ? void 0 : t.name) ?? "At risk"
|
|
1773
1773
|
] }) : e.predicted_risk ? /* @__PURE__ */ a("span", { className: "text-amber-500", title: e.predicted_note ?? void 0, children: "⚑ Predicted" }) : null;
|
|
@@ -1778,7 +1778,7 @@ function Ap({
|
|
|
1778
1778
|
key: "addendums",
|
|
1779
1779
|
header: A("addendums", "Addendums"),
|
|
1780
1780
|
sortable: !1,
|
|
1781
|
-
render: (e) => /* @__PURE__ */ a(
|
|
1781
|
+
render: (e) => /* @__PURE__ */ a(Su, { summary: e.addendums })
|
|
1782
1782
|
}
|
|
1783
1783
|
] : [],
|
|
1784
1784
|
...Ut ? [
|
|
@@ -1787,7 +1787,7 @@ function Ap({
|
|
|
1787
1787
|
header: A("fulfilment", "Shipped"),
|
|
1788
1788
|
sortable: !0,
|
|
1789
1789
|
render: (e) => /* @__PURE__ */ a(
|
|
1790
|
-
|
|
1790
|
+
gd,
|
|
1791
1791
|
{
|
|
1792
1792
|
collection: e.collection,
|
|
1793
1793
|
itemId: e.item_id,
|
|
@@ -1801,7 +1801,7 @@ function Ap({
|
|
|
1801
1801
|
key: "integrations",
|
|
1802
1802
|
header: A("integrations", "Integrations"),
|
|
1803
1803
|
sortable: !1,
|
|
1804
|
-
render: (e) => /* @__PURE__ */ a(
|
|
1804
|
+
render: (e) => /* @__PURE__ */ a(wd, { rows: Il[`${e.collection}:${e.item_id}`] })
|
|
1805
1805
|
}
|
|
1806
1806
|
] : [],
|
|
1807
1807
|
...Aa ? [
|
|
@@ -1810,7 +1810,7 @@ function Ap({
|
|
|
1810
1810
|
header: A("tasks", "Tasks"),
|
|
1811
1811
|
sortable: !1,
|
|
1812
1812
|
render: (e) => {
|
|
1813
|
-
const t =
|
|
1813
|
+
const t = Yl[`${e.collection}:${e.item_id}`];
|
|
1814
1814
|
return !t || t.open === 0 ? /* @__PURE__ */ a("span", { className: "text-[11px] text-slate-400", children: "—" }) : /* @__PURE__ */ d(
|
|
1815
1815
|
"span",
|
|
1816
1816
|
{
|
|
@@ -1830,10 +1830,10 @@ function Ap({
|
|
|
1830
1830
|
key: "send_backs",
|
|
1831
1831
|
header: A("send_backs", "Sent back"),
|
|
1832
1832
|
sortable: !0,
|
|
1833
|
-
render: (e) => /* @__PURE__ */ a(
|
|
1833
|
+
render: (e) => /* @__PURE__ */ a(wu, { summary: e.send_backs })
|
|
1834
1834
|
}
|
|
1835
1835
|
] : []
|
|
1836
|
-
],
|
|
1836
|
+
], ks = {
|
|
1837
1837
|
key: "claim",
|
|
1838
1838
|
header: "",
|
|
1839
1839
|
render: (e) => e.claimed_by ? /* @__PURE__ */ a(
|
|
@@ -1857,16 +1857,16 @@ function Ap({
|
|
|
1857
1857
|
children: "Claim"
|
|
1858
1858
|
}
|
|
1859
1859
|
)
|
|
1860
|
-
}, rn = (s == null ? void 0 : s.available_extra_fields) ?? [], _t =
|
|
1860
|
+
}, rn = (s == null ? void 0 : s.available_extra_fields) ?? [], _t = Ri("drill.queue"), Y = _t.value, oo = (e) => _t.push([e]), _r = O(null);
|
|
1861
1861
|
P(() => {
|
|
1862
1862
|
var r;
|
|
1863
1863
|
if (!G || !l) return;
|
|
1864
|
-
const e = `queue:${l}`, t =
|
|
1865
|
-
if (((r =
|
|
1866
|
-
|
|
1864
|
+
const e = `queue:${l}`, t = hr(), n = tc(e, t);
|
|
1865
|
+
if (((r = _r.current) == null ? void 0 : r.queue) !== l) {
|
|
1866
|
+
_r.current = { queue: l, enc: n };
|
|
1867
1867
|
return;
|
|
1868
1868
|
}
|
|
1869
|
-
|
|
1869
|
+
nc(e, n === _r.current.enc ? null : t);
|
|
1870
1870
|
}, [
|
|
1871
1871
|
G,
|
|
1872
1872
|
l,
|
|
@@ -1881,17 +1881,17 @@ function Ap({
|
|
|
1881
1881
|
fe,
|
|
1882
1882
|
Y
|
|
1883
1883
|
]);
|
|
1884
|
-
const
|
|
1885
|
-
view:
|
|
1884
|
+
const vs = ((Oo = (Lo = E == null ? void 0 : E.data) == null ? void 0 : Lo.find((e) => e.id === fe)) == null ? void 0 : Oo.name) ?? null, lo = Nc({
|
|
1885
|
+
view: vs ?? (b !== "all" ? ((Fo = Qr.find((e) => e.value === b)) == null ? void 0 : Fo.label) ?? null : null),
|
|
1886
1886
|
filters: Object.values(x).filter(
|
|
1887
1887
|
(e) => Array.isArray(e) ? e.length > 0 : String(e ?? "").trim() !== ""
|
|
1888
1888
|
).length,
|
|
1889
1889
|
page: se
|
|
1890
1890
|
});
|
|
1891
1891
|
P(() => {
|
|
1892
|
-
G && l &&
|
|
1892
|
+
G && l && Sc(lo);
|
|
1893
1893
|
}, [G, l, lo]);
|
|
1894
|
-
const
|
|
1894
|
+
const ws = (e) => {
|
|
1895
1895
|
var t;
|
|
1896
1896
|
for (const n of (s == null ? void 0 : s.sources) ?? []) {
|
|
1897
1897
|
const r = (t = n.drilldown) == null ? void 0 : t[e];
|
|
@@ -1903,69 +1903,69 @@ function Ap({
|
|
|
1903
1903
|
};
|
|
1904
1904
|
}
|
|
1905
1905
|
return { enabled: !0, layout_id: null, width: null };
|
|
1906
|
-
},
|
|
1906
|
+
}, _s = W(() => {
|
|
1907
1907
|
const e = {};
|
|
1908
1908
|
for (const t of (s == null ? void 0 : s.sources) ?? [])
|
|
1909
1909
|
for (const [n, r] of Object.entries(t.column_formats ?? {}))
|
|
1910
1910
|
n in e || (e[n] = r);
|
|
1911
1911
|
return e;
|
|
1912
|
-
}, [s == null ? void 0 : s.sources]),
|
|
1913
|
-
function
|
|
1914
|
-
if (
|
|
1915
|
-
if (
|
|
1912
|
+
}, [s == null ? void 0 : s.sources]), Ns = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Ss = /^\d{4}-\d{2}-\d{2}T\d{2}:/;
|
|
1913
|
+
function Cs(e) {
|
|
1914
|
+
if (Ns.test(e)) return { text: e.split("@")[0], title: e };
|
|
1915
|
+
if (Ss.test(e)) {
|
|
1916
1916
|
const t = new Date(e);
|
|
1917
1917
|
if (!Number.isNaN(t.getTime()))
|
|
1918
1918
|
return {
|
|
1919
1919
|
// The one read-only date style (army 11), the full stamp on hover.
|
|
1920
|
-
text:
|
|
1920
|
+
text: Yc(t),
|
|
1921
1921
|
title: tl(t)
|
|
1922
1922
|
};
|
|
1923
1923
|
}
|
|
1924
1924
|
return { text: e, title: e };
|
|
1925
1925
|
}
|
|
1926
|
-
const
|
|
1926
|
+
const Nr = Hi(p == null ? void 0 : p.inline_edit), so = Nr.enabled ? [
|
|
1927
1927
|
...new Set(
|
|
1928
1928
|
((s == null ? void 0 : s.sources) ?? []).filter((e) => e.type === "collection" && e.collection).map((e) => e.collection)
|
|
1929
1929
|
)
|
|
1930
|
-
] : [],
|
|
1930
|
+
] : [], $s = nt({
|
|
1931
1931
|
queries: so.map((e) => ({
|
|
1932
1932
|
queryKey: ["cbv-collection-meta", e],
|
|
1933
1933
|
queryFn: () => f.request(D(`/collections/${e}`)).then((t) => t.data),
|
|
1934
1934
|
staleTime: 10 * 6e4,
|
|
1935
1935
|
retry: !1
|
|
1936
1936
|
}))
|
|
1937
|
-
}),
|
|
1937
|
+
}), Sr = /* @__PURE__ */ new Map();
|
|
1938
1938
|
so.forEach((e, t) => {
|
|
1939
1939
|
var r;
|
|
1940
|
-
const n = (r =
|
|
1941
|
-
n &&
|
|
1940
|
+
const n = (r = $s[t]) == null ? void 0 : r.data;
|
|
1941
|
+
n && Sr.set(e, {
|
|
1942
1942
|
fields: new Map((n.fields ?? []).map((o) => [o.field, o])),
|
|
1943
1943
|
relations: n.relations ?? []
|
|
1944
1944
|
});
|
|
1945
1945
|
});
|
|
1946
|
-
const { data:
|
|
1946
|
+
const { data: Rs } = re({
|
|
1947
1947
|
queryKey: ["my-permissions"],
|
|
1948
1948
|
queryFn: () => f.request(D("/security/my/permissions")).then((e) => e.data),
|
|
1949
|
-
enabled:
|
|
1949
|
+
enabled: Nr.enabled && !Xe,
|
|
1950
1950
|
staleTime: 5 * 6e4
|
|
1951
|
-
}), io =
|
|
1951
|
+
}), io = Ad(), co = (e, t) => {
|
|
1952
1952
|
if (t.includes(".")) return null;
|
|
1953
|
-
const n =
|
|
1953
|
+
const n = Sr.get(e.collection);
|
|
1954
1954
|
if (!n) return null;
|
|
1955
1955
|
const r = Ht.get(k(e));
|
|
1956
|
-
return r && !r.is_mine ? null :
|
|
1957
|
-
config:
|
|
1956
|
+
return r && !r.is_mine ? null : Yi({
|
|
1957
|
+
config: Nr,
|
|
1958
1958
|
key: t,
|
|
1959
1959
|
field: n.fields.get(t),
|
|
1960
1960
|
collection: e.collection,
|
|
1961
1961
|
relations: n.relations,
|
|
1962
|
-
mayUpdate: Xe ||
|
|
1962
|
+
mayUpdate: Xe || cd(Rs, e.collection)
|
|
1963
1963
|
});
|
|
1964
1964
|
}, uo = (e, t, n) => {
|
|
1965
1965
|
var r, o, c;
|
|
1966
1966
|
return n === "m2o" ? ((o = (r = e.extra_ids) == null ? void 0 : r[t]) == null ? void 0 : o[0]) ?? null : ((c = e.extra) == null ? void 0 : c[t]) ?? null;
|
|
1967
|
-
},
|
|
1968
|
-
const c = (v) => `${k(e)}|${v}`, u = [...oe].filter((v) => v.startsWith("extra.")).map((v) => v.slice(6)).filter((v) => !!co(e, v)), m = o === 0 ? null :
|
|
1967
|
+
}, Ts = (e, t, n, r, o) => {
|
|
1968
|
+
const c = (v) => `${k(e)}|${v}`, u = [...oe].filter((v) => v.startsWith("extra.")).map((v) => v.slice(6)).filter((v) => !!co(e, v)), m = o === 0 ? null : zi(u, t, o), h = (v) => v.collection === e.collection && v.item_id === e.item_id, T = (v) => h(v) ? n === "m2o" ? {
|
|
1969
1969
|
...v,
|
|
1970
1970
|
extra_ids: { ...v.extra_ids ?? {}, [t]: r == null ? [] : [String(r)] }
|
|
1971
1971
|
} : { ...v, extra: { ...v.extra ?? {}, [t]: r } } : v;
|
|
@@ -1990,39 +1990,39 @@ function Ap({
|
|
|
1990
1990
|
// Labels, rollups and the row's place in the queue follow the server.
|
|
1991
1991
|
onSaved: () => void y.invalidateQueries({ queryKey: ["queue-items", l] })
|
|
1992
1992
|
});
|
|
1993
|
-
},
|
|
1993
|
+
}, Ls = (e, t, n) => {
|
|
1994
1994
|
const r = co(e, t);
|
|
1995
1995
|
if (!r) return n;
|
|
1996
|
-
const o =
|
|
1996
|
+
const o = Sr.get(e.collection), c = o == null ? void 0 : o.fields.get(t);
|
|
1997
1997
|
return /* @__PURE__ */ a(
|
|
1998
|
-
|
|
1998
|
+
qd,
|
|
1999
1999
|
{
|
|
2000
2000
|
controller: io,
|
|
2001
2001
|
cellKey: `${k(e)}|${t}`,
|
|
2002
2002
|
kind: r,
|
|
2003
2003
|
value: uo(e, t, r),
|
|
2004
2004
|
label: A(`extra.${t}`, Ue(t)),
|
|
2005
|
-
choices: c ?
|
|
2006
|
-
target: r === "m2o" && o ?
|
|
2005
|
+
choices: c ? Ji(c) : void 0,
|
|
2006
|
+
target: r === "m2o" && o ? Ii(o.relations, e.collection, t) : null,
|
|
2007
2007
|
collection: e.collection,
|
|
2008
2008
|
itemId: e.item_id,
|
|
2009
2009
|
field: t,
|
|
2010
|
-
onCommit: (u, m) =>
|
|
2010
|
+
onCommit: (u, m) => Ts(e, t, r, u, m),
|
|
2011
2011
|
children: n
|
|
2012
2012
|
}
|
|
2013
2013
|
);
|
|
2014
|
-
},
|
|
2014
|
+
}, Os = rn.map((e) => ({
|
|
2015
2015
|
key: `extra.${e}`,
|
|
2016
2016
|
header: A(`extra.${e}`, Ue(e)),
|
|
2017
2017
|
sortable: !0,
|
|
2018
|
-
render: (t) =>
|
|
2018
|
+
render: (t) => Ls(t, e, Fs(t, e))
|
|
2019
2019
|
}));
|
|
2020
|
-
function
|
|
2020
|
+
function Fs(e, t) {
|
|
2021
2021
|
var n, r;
|
|
2022
2022
|
{
|
|
2023
2023
|
const o = (n = e.extra) == null ? void 0 : n[t];
|
|
2024
2024
|
if (o == null || o === "") return /* @__PURE__ */ a("span", { className: "text-slate-300", children: "—" });
|
|
2025
|
-
const c = ye(t), u = ((s == null ? void 0 : s.extra_field_meta) ?? []).find((w) => w.path === t), m = c ? rt(String(o), c) :
|
|
2025
|
+
const c = ye(t), u = ((s == null ? void 0 : s.extra_field_meta) ?? []).find((w) => w.path === t), m = c ? rt(String(o), c) : cl(u, String(o)), { text: h, title: T } = Cs(m), v = ((r = e.extra_ids) == null ? void 0 : r[t]) ?? [], $ = ws(t);
|
|
2026
2026
|
return (u == null ? void 0 : u.kind) === "relation" && u.target_collection && v.length > 0 && $.enabled && !u.aggregate ? /* @__PURE__ */ a(
|
|
2027
2027
|
"button",
|
|
2028
2028
|
{
|
|
@@ -2045,7 +2045,7 @@ function Ap({
|
|
|
2045
2045
|
{
|
|
2046
2046
|
type: "button",
|
|
2047
2047
|
onClick: (w) => {
|
|
2048
|
-
w.stopPropagation(),
|
|
2048
|
+
w.stopPropagation(), Jn({ row: e, path: t, value: m });
|
|
2049
2049
|
},
|
|
2050
2050
|
title: "Show the rows behind this number",
|
|
2051
2051
|
className: "block max-w-[200px] truncate text-left text-[12px] tabular-nums underline decoration-slate-300 decoration-dotted underline-offset-2 hover:text-nvr-navy hover:decoration-nvr-cyan dark:hover:text-nvr-cyan",
|
|
@@ -2054,13 +2054,13 @@ function Ap({
|
|
|
2054
2054
|
) : /* @__PURE__ */ a("span", { className: "block max-w-[200px] truncate text-[12px]", title: T, children: h });
|
|
2055
2055
|
}
|
|
2056
2056
|
}
|
|
2057
|
-
const mo =
|
|
2058
|
-
...
|
|
2057
|
+
const mo = xu(p == null ? void 0 : p.formula_columns), po = [
|
|
2058
|
+
...wr ? ["collection"] : [],
|
|
2059
2059
|
"state",
|
|
2060
2060
|
"owners",
|
|
2061
2061
|
"aging_hours",
|
|
2062
2062
|
"state_entered",
|
|
2063
|
-
|
|
2063
|
+
Er,
|
|
2064
2064
|
"sla_status",
|
|
2065
2065
|
"at_risk",
|
|
2066
2066
|
...gt ? ["addendums"] : [],
|
|
@@ -2072,8 +2072,8 @@ function Ap({
|
|
|
2072
2072
|
// Formula columns (#133) were built but never offered here, so no one could show them
|
|
2073
2073
|
// (found 2026-11-14 with the queue totals row).
|
|
2074
2074
|
...mo
|
|
2075
|
-
],
|
|
2076
|
-
...
|
|
2075
|
+
], As = [
|
|
2076
|
+
...wr ? ["collection"] : [],
|
|
2077
2077
|
"state",
|
|
2078
2078
|
"owners",
|
|
2079
2079
|
...gt ? ["addendums"] : [],
|
|
@@ -2084,30 +2084,30 @@ function Ap({
|
|
|
2084
2084
|
"sla_status",
|
|
2085
2085
|
"at_risk",
|
|
2086
2086
|
...rn.slice(0, 2).map((e) => `extra.${e}`)
|
|
2087
|
-
],
|
|
2087
|
+
], qs = (p == null ? void 0 : p.default_columns) ?? null, Cr = Qt ?? qs, oe = new Set(Cr ?? As);
|
|
2088
2088
|
gt && !Ft.has("addendums") && oe.add("addendums"), Ut && !Ft.has("fulfilment") && oe.add("fulfilment"), Me && !Ft.has("integrations") && oe.add("integrations"), Vt && !Ft.has("send_backs") && oe.add("send_backs");
|
|
2089
2089
|
for (const e of mo) Ft.has(e) || oe.add(e);
|
|
2090
|
-
const
|
|
2091
|
-
for (const e of
|
|
2090
|
+
const Es = new Set(Xe ? [] : (p == null ? void 0 : p.admin_only_columns) ?? []);
|
|
2091
|
+
for (const e of Es) oe.delete(e);
|
|
2092
2092
|
const an = [
|
|
2093
|
-
...(
|
|
2094
|
-
...po.filter((e) => !(
|
|
2095
|
-
],
|
|
2096
|
-
function
|
|
2093
|
+
...(Cr ?? []).filter((e) => po.includes(e)),
|
|
2094
|
+
...po.filter((e) => !(Cr ?? []).includes(e))
|
|
2095
|
+
], Ps = Js(Ys(zs, { activationConstraint: { distance: 4 } }));
|
|
2096
|
+
function Ks(e) {
|
|
2097
2097
|
const { active: t, over: n } = e;
|
|
2098
2098
|
if (!n || t.id === n.id) return;
|
|
2099
2099
|
const r = an.indexOf(String(t.id)), o = an.indexOf(String(n.id));
|
|
2100
|
-
r === -1 || o === -1 ||
|
|
2101
|
-
|
|
2100
|
+
r === -1 || o === -1 || kn(
|
|
2101
|
+
ni(an, r, o).filter((c) => oe.has(c))
|
|
2102
2102
|
);
|
|
2103
2103
|
}
|
|
2104
|
-
const fo = ao.find((e) => e.key === "label"),
|
|
2104
|
+
const fo = ao.find((e) => e.key === "label"), Ds = {
|
|
2105
2105
|
...fo,
|
|
2106
2106
|
render: (e, ...t) => /* @__PURE__ */ d("span", { className: "inline-flex min-w-0 items-center gap-1.5", children: [
|
|
2107
|
-
/* @__PURE__ */ a(
|
|
2107
|
+
/* @__PURE__ */ a(rd, { rowId: e.item_id }),
|
|
2108
2108
|
fo.render(e, ...t)
|
|
2109
2109
|
] })
|
|
2110
|
-
},
|
|
2110
|
+
}, Ms = ((p == null ? void 0 : p.formula_columns) ?? []).map(
|
|
2111
2111
|
(e) => ({
|
|
2112
2112
|
key: `formula.${e.key}`,
|
|
2113
2113
|
header: e.label,
|
|
@@ -2115,7 +2115,7 @@ function Ap({
|
|
|
2115
2115
|
const n = {
|
|
2116
2116
|
...t,
|
|
2117
2117
|
...t.extra ? Object.fromEntries(Object.entries(t.extra).map(([c, u]) => [`extra.${c}`, u])) : {}
|
|
2118
|
-
}, r =
|
|
2118
|
+
}, r = Mi(e.formula, (c) => {
|
|
2119
2119
|
const u = n[c] ?? (t.extra ? t.extra[c] : void 0), m = Number(u);
|
|
2120
2120
|
return Number.isFinite(m) ? m : u ?? null;
|
|
2121
2121
|
});
|
|
@@ -2124,19 +2124,19 @@ function Ap({
|
|
|
2124
2124
|
return Number.isFinite(o) ? /* @__PURE__ */ a("span", { className: "tabular-nums", children: e.format === "currency" ? o.toLocaleString(void 0, { style: "currency", currency: "USD" }) : o.toLocaleString() }) : /* @__PURE__ */ a("span", { children: String(r) });
|
|
2125
2125
|
}
|
|
2126
2126
|
})
|
|
2127
|
-
),
|
|
2127
|
+
), $r = [...ao, ...Os, ...Ms], bo = Jd(
|
|
2128
2128
|
an,
|
|
2129
2129
|
(e) => {
|
|
2130
2130
|
var n;
|
|
2131
|
-
const t = (n =
|
|
2131
|
+
const t = (n = $r.find((r) => r.key === e)) == null ? void 0 : n.header;
|
|
2132
2132
|
return typeof t == "string" ? t : e;
|
|
2133
2133
|
},
|
|
2134
2134
|
oe
|
|
2135
|
-
),
|
|
2135
|
+
), Bs = {
|
|
2136
2136
|
key: "__actions__",
|
|
2137
2137
|
header: "",
|
|
2138
2138
|
render: (e) => e.collection === "tasks" || e.collection === Lt ? null : /* @__PURE__ */ a("span", { onClick: (t) => t.stopPropagation(), children: /* @__PURE__ */ a(
|
|
2139
|
-
|
|
2139
|
+
id,
|
|
2140
2140
|
{
|
|
2141
2141
|
collection: e.collection,
|
|
2142
2142
|
id: e.item_id,
|
|
@@ -2146,7 +2146,7 @@ function Ap({
|
|
|
2146
2146
|
onPeek: () => Ye(e),
|
|
2147
2147
|
urlFor: Q.urlFor,
|
|
2148
2148
|
onDeleted: () => {
|
|
2149
|
-
f.request(
|
|
2149
|
+
f.request(qr(`/items/${e.collection}/${e.item_id}`)).then(() => {
|
|
2150
2150
|
K.success("Moved to trash"), y.invalidateQueries({ queryKey: ["queue-items", l] });
|
|
2151
2151
|
}).catch((t) => K.error(Ct(t, "Delete failed")));
|
|
2152
2152
|
},
|
|
@@ -2155,14 +2155,14 @@ function Ap({
|
|
|
2155
2155
|
disabled: X
|
|
2156
2156
|
}
|
|
2157
2157
|
) })
|
|
2158
|
-
},
|
|
2158
|
+
}, Rr = (e) => typeof e.header == "string" ? e.header : e.key, ho = (e) => e.map((t, n) => {
|
|
2159
2159
|
const r = A(`extra.${t.field}`, Ue(t.field));
|
|
2160
2160
|
return `${n === 0 ? t.sign < 0 ? "− " : "" : t.sign < 0 ? " − " : " + "}${r}`;
|
|
2161
|
-
}).join(""),
|
|
2161
|
+
}).join(""), js = (e) => {
|
|
2162
2162
|
if (C !== "table" || ie) return e;
|
|
2163
2163
|
const t = Mt(e.key);
|
|
2164
2164
|
if (!t) return e;
|
|
2165
|
-
const n = (o) =>
|
|
2165
|
+
const n = (o) => fl(e.key, o), r = t.kind === "none" ? { fn: null, onChange: n, unavailable: t.why } : t.kind === "derived" ? {
|
|
2166
2166
|
fn: it[e.key] === "sum" ? "sum" : null,
|
|
2167
2167
|
onChange: n,
|
|
2168
2168
|
only: ["sum"],
|
|
@@ -2170,14 +2170,14 @@ function Ap({
|
|
|
2170
2170
|
} : { fn: it[e.key] ?? null, onChange: n };
|
|
2171
2171
|
return {
|
|
2172
2172
|
...e,
|
|
2173
|
-
headerMenu: /* @__PURE__ */ a(
|
|
2173
|
+
headerMenu: /* @__PURE__ */ a(dd, { label: Rr(e), selectedCount: 0, totals: r })
|
|
2174
2174
|
};
|
|
2175
2175
|
}, et = [
|
|
2176
|
-
|
|
2177
|
-
...an.filter((e) => oe.has(e)).map((e) =>
|
|
2178
|
-
...Te ? [
|
|
2179
|
-
|
|
2180
|
-
], yo = Gt && !!(
|
|
2176
|
+
Ds,
|
|
2177
|
+
...an.filter((e) => oe.has(e)).map((e) => $r.find((t) => t.key === e)).filter((e) => e !== void 0).map(js),
|
|
2178
|
+
...Te ? [ks] : [],
|
|
2179
|
+
Bs
|
|
2180
|
+
], yo = Gt && !!(ae != null && ae.totals), Ln = yo ? { ...i == null ? void 0 : i.totals, ...ae == null ? void 0 : ae.totals } : i == null ? void 0 : i.totals, go = yo ? (ae == null ? void 0 : ae.totals_partial) === !0 : (i == null ? void 0 : i.totals_partial) === !0, Qs = (() => {
|
|
2181
2181
|
var n;
|
|
2182
2182
|
if (!la) return;
|
|
2183
2183
|
const e = {};
|
|
@@ -2187,11 +2187,11 @@ function Ap({
|
|
|
2187
2187
|
const o = Mt(r.key), c = it[r.key];
|
|
2188
2188
|
if (!o || o.kind === "none" || !c) continue;
|
|
2189
2189
|
t = !0;
|
|
2190
|
-
const u =
|
|
2190
|
+
const u = uu(Ln, o, c), m = r.key.startsWith("formula.") ? ((p == null ? void 0 : p.formula_columns) ?? []).find((Z) => `formula.${Z.key}` === r.key) : null, h = m ? mu(m.format) : ye(r.key.slice(6)), T = (Z) => al(Z, c, (h == null ? void 0 : h.type) === "number" ? h : null), v = { sum: "Sum", avg: "Avg", min: "Min", max: "Max", count: "Count" }[c], $ = u === void 0, w = $ ? void 0 : pu({
|
|
2191
2191
|
fn: c,
|
|
2192
|
-
label:
|
|
2192
|
+
label: Rr(r),
|
|
2193
2193
|
rows: (i == null ? void 0 : i.total) ?? null,
|
|
2194
|
-
byCollection: o.kind === "server" ? (n =
|
|
2194
|
+
byCollection: o.kind === "server" ? (n = Ln == null ? void 0 : Ln[o.path]) == null ? void 0 : n.by_collection : void 0,
|
|
2195
2195
|
collectionLabel: Ie,
|
|
2196
2196
|
format: T,
|
|
2197
2197
|
partial: go,
|
|
@@ -2199,7 +2199,7 @@ function Ap({
|
|
|
2199
2199
|
});
|
|
2200
2200
|
e[r.key] = /* @__PURE__ */ d("span", { className: "inline-flex items-baseline gap-1.5", "data-tip": w, "data-queue-total": c, children: [
|
|
2201
2201
|
/* @__PURE__ */ a("span", { className: "text-[10px] font-semibold uppercase tracking-wide text-slate-400 dark:text-slate-500", children: v }),
|
|
2202
|
-
$ ? /* @__PURE__ */ a(
|
|
2202
|
+
$ ? /* @__PURE__ */ a(ml, { className: "inline-block h-3 w-12 align-middle" }) : /* @__PURE__ */ d("span", { className: "text-slate-700 dark:text-slate-200", children: [
|
|
2203
2203
|
u == null ? "—" : T(u),
|
|
2204
2204
|
go ? "*" : ""
|
|
2205
2205
|
] })
|
|
@@ -2211,12 +2211,12 @@ function Ap({
|
|
|
2211
2211
|
label: /* @__PURE__ */ a("span", { className: "text-[10.5px] font-semibold uppercase tracking-wide text-slate-400 dark:text-slate-500", children: "Σ totals" })
|
|
2212
2212
|
};
|
|
2213
2213
|
})(), on = () => Object.fromEntries(ut.map((e) => [e, it[e]])), xo = (e) => {
|
|
2214
|
-
|
|
2215
|
-
const n =
|
|
2216
|
-
return rl(
|
|
2214
|
+
dn(e), Dn((t) => {
|
|
2215
|
+
const n = md(t, e);
|
|
2216
|
+
return rl(qn(l), n), n;
|
|
2217
2217
|
});
|
|
2218
2218
|
}, [Nt, ko] = N(!1);
|
|
2219
|
-
async function
|
|
2219
|
+
async function Us() {
|
|
2220
2220
|
if (!(!s || Nt)) {
|
|
2221
2221
|
ko(!0);
|
|
2222
2222
|
try {
|
|
@@ -2225,7 +2225,7 @@ function Ap({
|
|
|
2225
2225
|
const h = await f.request(
|
|
2226
2226
|
D(`/queues/${l}/items`, {
|
|
2227
2227
|
scope: b,
|
|
2228
|
-
sort:
|
|
2228
|
+
sort: Pr(U),
|
|
2229
2229
|
filters: JSON.stringify(Le),
|
|
2230
2230
|
page: m,
|
|
2231
2231
|
limit: 100
|
|
@@ -2233,7 +2233,7 @@ function Ap({
|
|
|
2233
2233
|
), T = h.data ?? [];
|
|
2234
2234
|
if (t.push(...T), T.length < 100 || t.length >= (h.total ?? 0)) break;
|
|
2235
2235
|
}
|
|
2236
|
-
const n = (m) => (s.extra_field_meta ?? []).find((h) => h.path === m), r =
|
|
2236
|
+
const n = (m) => (s.extra_field_meta ?? []).find((h) => h.path === m), r = yu(
|
|
2237
2237
|
t.slice(0, 1e4),
|
|
2238
2238
|
et.map((m) => ({
|
|
2239
2239
|
key: m.key,
|
|
@@ -2244,7 +2244,7 @@ function Ap({
|
|
|
2244
2244
|
collectionLabel: Ie,
|
|
2245
2245
|
extraText: (m, h) => {
|
|
2246
2246
|
const T = ye(m);
|
|
2247
|
-
return T && T.type !== "number" ? rt(h, T) :
|
|
2247
|
+
return T && T.type !== "number" ? rt(h, T) : jr(n(m), h);
|
|
2248
2248
|
},
|
|
2249
2249
|
extraIsNumber: (m) => {
|
|
2250
2250
|
var h;
|
|
@@ -2252,7 +2252,7 @@ function Ap({
|
|
|
2252
2252
|
}
|
|
2253
2253
|
}
|
|
2254
2254
|
), o = new Blob([r], { type: "text/csv;charset=utf-8" }), c = URL.createObjectURL(o), u = document.createElement("a");
|
|
2255
|
-
u.href = c, u.download =
|
|
2255
|
+
u.href = c, u.download = gu(s.name), document.body.appendChild(u), u.click(), u.remove(), setTimeout(() => URL.revokeObjectURL(c), 1e3), K.success(
|
|
2256
2256
|
t.length >= 1e4 ? `Exported the first ${1e4.toLocaleString("en-US")} rows` : `Exported ${t.length.toLocaleString("en-US")} ${t.length === 1 ? "row" : "rows"}`
|
|
2257
2257
|
);
|
|
2258
2258
|
} catch (e) {
|
|
@@ -2284,12 +2284,12 @@ function Ap({
|
|
|
2284
2284
|
}, o = (n == null ? void 0 : n.narrowBy) ?? [], c = [];
|
|
2285
2285
|
for (const [Se, ue] of Object.entries(Re)) {
|
|
2286
2286
|
if (Se === e.path || ue.length === 0) continue;
|
|
2287
|
-
const te =
|
|
2288
|
-
!(te != null && te.target_collection) || !te.display_field || o.some((
|
|
2287
|
+
const te = On.get(Se);
|
|
2288
|
+
!(te != null && te.target_collection) || !te.display_field || o.some((Fn) => Fn.collection === te.target_collection) || c.push({ collection: te.target_collection, field: te.display_field, values: ue });
|
|
2289
2289
|
}
|
|
2290
|
-
const u = [...o, ...c], m = u.length ?
|
|
2290
|
+
const u = [...o, ...c], m = u.length ? Ac(
|
|
2291
2291
|
e.target_collection,
|
|
2292
|
-
await
|
|
2292
|
+
await qc(f, y, e.target_collection),
|
|
2293
2293
|
u
|
|
2294
2294
|
) : null, h = [
|
|
2295
2295
|
...t.trim() ? [{ [e.display_field]: { _contains: t.trim() } }] : [],
|
|
@@ -2306,7 +2306,7 @@ function Ap({
|
|
|
2306
2306
|
Z.has(te) || w && !w.has(te) || (Z.add(te), de.push({ label: $ ? rt(te, $) : te, value: te }));
|
|
2307
2307
|
}
|
|
2308
2308
|
return de;
|
|
2309
|
-
},
|
|
2309
|
+
}, On = new Map(((s == null ? void 0 : s.extra_field_meta) ?? []).map((e) => [e.path, e])), tt = [
|
|
2310
2310
|
{
|
|
2311
2311
|
key: "collection",
|
|
2312
2312
|
placeholder: A("collection", "Collection"),
|
|
@@ -2388,7 +2388,7 @@ function Ap({
|
|
|
2388
2388
|
key: "integrations",
|
|
2389
2389
|
placeholder: A("integrations", "Integrations"),
|
|
2390
2390
|
type: "select",
|
|
2391
|
-
options:
|
|
2391
|
+
options: _d.map((e) => ({ label: e.label, value: e.value }))
|
|
2392
2392
|
}
|
|
2393
2393
|
] : [],
|
|
2394
2394
|
...Ut ? [
|
|
@@ -2396,7 +2396,7 @@ function Ap({
|
|
|
2396
2396
|
key: "fulfilment",
|
|
2397
2397
|
placeholder: "Shipped",
|
|
2398
2398
|
type: "select",
|
|
2399
|
-
options:
|
|
2399
|
+
options: xd
|
|
2400
2400
|
}
|
|
2401
2401
|
] : [],
|
|
2402
2402
|
...Vt ? [
|
|
@@ -2411,13 +2411,13 @@ function Ap({
|
|
|
2411
2411
|
]
|
|
2412
2412
|
}
|
|
2413
2413
|
] : [],
|
|
2414
|
-
...
|
|
2414
|
+
...zn.length > 0 ? [
|
|
2415
2415
|
{
|
|
2416
2416
|
key: "labels",
|
|
2417
2417
|
placeholder: "Triage label",
|
|
2418
2418
|
type: "combobox",
|
|
2419
2419
|
multi: !0,
|
|
2420
|
-
options:
|
|
2420
|
+
options: zn.map((e) => ({ label: e, value: e }))
|
|
2421
2421
|
}
|
|
2422
2422
|
] : [],
|
|
2423
2423
|
{
|
|
@@ -2442,7 +2442,7 @@ function Ap({
|
|
|
2442
2442
|
},
|
|
2443
2443
|
...rn.map((e) => {
|
|
2444
2444
|
var u, m, h;
|
|
2445
|
-
const t =
|
|
2445
|
+
const t = On.get(e), n = A(`extra.${e}`, Ue(e)), r = { key: `extra.${e}`, placeholder: n }, o = ye(e);
|
|
2446
2446
|
if ((o == null ? void 0 : o.type) === "datetime") return { ...r, type: "date" };
|
|
2447
2447
|
if ((o == null ? void 0 : o.type) === "number") return { ...r, type: "number" };
|
|
2448
2448
|
if ((o == null ? void 0 : o.type) === "boolean")
|
|
@@ -2463,7 +2463,7 @@ function Ap({
|
|
|
2463
2463
|
// not only on an empty one (army 11 Q2-1).
|
|
2464
2464
|
restricted: !!((m = Re[e]) != null && m.length),
|
|
2465
2465
|
options: c.map((T) => ({
|
|
2466
|
-
label: o ? rt(T, o) :
|
|
2466
|
+
label: o ? rt(T, o) : jr(t, T),
|
|
2467
2467
|
value: T
|
|
2468
2468
|
}))
|
|
2469
2469
|
} : (t == null ? void 0 : t.kind) === "relation" ? {
|
|
@@ -2474,18 +2474,18 @@ function Ap({
|
|
|
2474
2474
|
loadOptions: _o(t)
|
|
2475
2475
|
} : { ...r, placeholder: `Search ${n}…`, type: "text" };
|
|
2476
2476
|
})
|
|
2477
|
-
],
|
|
2477
|
+
], Tr = tt.filter(
|
|
2478
2478
|
(e) => oe.has(e.key) || e.key === "label" || e.key === "owners"
|
|
2479
|
-
),
|
|
2479
|
+
), Lr = (e) => {
|
|
2480
2480
|
var t;
|
|
2481
2481
|
return (((t = tt.find((n) => n.key === e)) == null ? void 0 : t.placeholder) ?? e).replace(/^Search\s+/, "").replace(/…$/, "");
|
|
2482
|
-
},
|
|
2482
|
+
}, Or = (() => {
|
|
2483
2483
|
var n, r;
|
|
2484
2484
|
const e = [];
|
|
2485
2485
|
for (const [o, c] of Object.entries(ve)) {
|
|
2486
2486
|
if (!c || Array.isArray(c) && c.length === 0) continue;
|
|
2487
|
-
const u = tt.find((v) => v.key === o), m = o.startsWith("extra.") ? o.slice(6) : null, h = m ? ye(m) : null, T =
|
|
2488
|
-
field:
|
|
2487
|
+
const u = tt.find((v) => v.key === o), m = o.startsWith("extra.") ? o.slice(6) : null, h = m ? ye(m) : null, T = Bi({
|
|
2488
|
+
field: Lr(o),
|
|
2489
2489
|
type: (u == null ? void 0 : u.type) ?? "select",
|
|
2490
2490
|
value: c,
|
|
2491
2491
|
optionLabel: (v) => {
|
|
@@ -2498,7 +2498,7 @@ function Ap({
|
|
|
2498
2498
|
T && e.push(T);
|
|
2499
2499
|
}
|
|
2500
2500
|
const t = i == null ? void 0 : i.total;
|
|
2501
|
-
return
|
|
2501
|
+
return ji({
|
|
2502
2502
|
noun: "items",
|
|
2503
2503
|
scope: b === "mine" ? "you own" : b === "unowned" ? "with no owners" : b === "claimed" ? "you claimed" : null,
|
|
2504
2504
|
viewName: ((r = (n = E == null ? void 0 : E.data) == null ? void 0 : n.find((o) => o.id === fe)) == null ? void 0 : r.name) ?? null,
|
|
@@ -2506,7 +2506,7 @@ function Ap({
|
|
|
2506
2506
|
shown: typeof t == "number" ? t : null,
|
|
2507
2507
|
of: (g == null ? void 0 : g.total) ?? null
|
|
2508
2508
|
});
|
|
2509
|
-
})(), ln = new Set(Object.keys(ke.current)),
|
|
2509
|
+
})(), ln = new Set(Object.keys(ke.current)), Vs = ((e) => {
|
|
2510
2510
|
var n;
|
|
2511
2511
|
if (e.some((r) => r.key === "state")) return e;
|
|
2512
2512
|
const t = tt.find((r) => r.key === "state");
|
|
@@ -2518,7 +2518,7 @@ function Ap({
|
|
|
2518
2518
|
var Z, de, Se;
|
|
2519
2519
|
if (!c.key.startsWith("extra.")) return null;
|
|
2520
2520
|
if (c.type === "combobox") return c;
|
|
2521
|
-
const u = c.key.slice(6), m =
|
|
2521
|
+
const u = c.key.slice(6), m = On.get(u), h = ln.has(c.key);
|
|
2522
2522
|
if ((m == null ? void 0 : m.kind) !== "relation" && !h) return null;
|
|
2523
2523
|
const T = ye(u), v = (Z = i == null ? void 0 : i.available_values.extra) == null ? void 0 : Z[u], $ = c.placeholder.replace(/^Search (.*)…$/, "$1"), w = (m == null ? void 0 : m.kind) === "relation" && m.target_collection && m.display_field ? { collection: m.target_collection, field: m.display_field } : void 0;
|
|
2524
2524
|
return v != null && v.length ? {
|
|
@@ -2529,7 +2529,7 @@ function Ap({
|
|
|
2529
2529
|
cascade: w,
|
|
2530
2530
|
restricted: !!((de = Re[u]) != null && de.length),
|
|
2531
2531
|
options: v.map((ue) => ({
|
|
2532
|
-
label: T && T.type !== "number" ? rt(ue, T) :
|
|
2532
|
+
label: T && T.type !== "number" ? rt(ue, T) : jr(m, ue),
|
|
2533
2533
|
value: ue
|
|
2534
2534
|
}))
|
|
2535
2535
|
} : (m == null ? void 0 : m.kind) === "relation" ? {
|
|
@@ -2554,7 +2554,7 @@ function Ap({
|
|
|
2554
2554
|
var de;
|
|
2555
2555
|
if (!w.key.startsWith("extra.") || u.has(w.key)) return !1;
|
|
2556
2556
|
const Z = w.key.slice(6);
|
|
2557
|
-
return ((de =
|
|
2557
|
+
return ((de = On.get(Z)) == null ? void 0 : de.target_collection) === m.collection;
|
|
2558
2558
|
}), $ = v.find((w) => w.key.slice(6).startsWith(`${h}.`)) ?? v[0];
|
|
2559
2559
|
T = $ ? e($) : null;
|
|
2560
2560
|
}
|
|
@@ -2564,13 +2564,13 @@ function Ap({
|
|
|
2564
2564
|
m && !u.has(m.key) && (ln.has(m.key) || m.restricted) && c.push(m);
|
|
2565
2565
|
if (c.length > 0) return c;
|
|
2566
2566
|
}
|
|
2567
|
-
const t =
|
|
2567
|
+
const t = Tr.map(e).filter((c) => c !== null), r = [
|
|
2568
2568
|
...t.filter((c) => ln.has(c.key) || c.restricted),
|
|
2569
2569
|
...t.filter((c) => !ln.has(c.key) && !c.restricted)
|
|
2570
2570
|
].slice(0, 6);
|
|
2571
|
-
return r.length > 0 ? r :
|
|
2571
|
+
return r.length > 0 ? r : Tr.filter((c) => c.key === "state" || c.key === "owners");
|
|
2572
2572
|
})()
|
|
2573
|
-
),
|
|
2573
|
+
), Gs = (g == null ? void 0 : g.sla_tracked) !== 0 || x.sla_status === "warning" || x.sla_status === "breached", Ws = (() => {
|
|
2574
2574
|
if (!g) return null;
|
|
2575
2575
|
const e = J ?? g, t = [
|
|
2576
2576
|
{
|
|
@@ -2642,17 +2642,17 @@ function Ap({
|
|
|
2642
2642
|
}
|
|
2643
2643
|
);
|
|
2644
2644
|
})();
|
|
2645
|
-
function
|
|
2645
|
+
function Hs(e) {
|
|
2646
2646
|
const t = new Set(oe);
|
|
2647
2647
|
t.has(e) ? (t.delete(e), (e === "addendums" || e === "integrations") && Gr((n) => new Set(n).add(e))) : (t.add(e), (e === "addendums" || e === "integrations") && Gr((n) => {
|
|
2648
2648
|
const r = new Set(n);
|
|
2649
2649
|
return r.delete(e), r;
|
|
2650
|
-
})),
|
|
2650
|
+
})), kn([...t]);
|
|
2651
2651
|
}
|
|
2652
|
-
return
|
|
2652
|
+
return fn ? (q == null ? void 0 : q((fn == null ? void 0 : fn.status) ?? 500)) ?? null : /* @__PURE__ */ d("div", { className: "flex flex-1 min-h-0 flex-col", children: [
|
|
2653
2653
|
/* @__PURE__ */ d("div", { className: "shrink-0", children: [
|
|
2654
2654
|
(i == null ? void 0 : i.truncated) && /* @__PURE__ */ d("div", { className: "mx-4 mt-3 flex items-center gap-2 rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 text-[12px] text-amber-800 dark:border-amber-900 dark:bg-amber-950/40 dark:text-amber-300", children: [
|
|
2655
|
-
/* @__PURE__ */ a(
|
|
2655
|
+
/* @__PURE__ */ a(li, { className: "h-4 w-4 shrink-0" }),
|
|
2656
2656
|
/* @__PURE__ */ a("span", { children: "This view hit the row safety limit — the table below may not include every matching item, but the totals above are exact. Narrow the filters (or clear the priority sort on a large queue) to browse everything." })
|
|
2657
2657
|
] }),
|
|
2658
2658
|
/* @__PURE__ */ d(
|
|
@@ -2700,24 +2700,24 @@ function Ap({
|
|
|
2700
2700
|
e.value
|
|
2701
2701
|
)) })
|
|
2702
2702
|
) : /* @__PURE__ */ a("div", { className: "h-8 w-40 animate-pulse rounded-md bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" }),
|
|
2703
|
-
/* @__PURE__ */ a(
|
|
2704
|
-
|
|
2703
|
+
/* @__PURE__ */ a(Md, { className: "h-8" }),
|
|
2704
|
+
Mn > 0 && !Kt.label && /* @__PURE__ */ d(
|
|
2705
2705
|
"button",
|
|
2706
2706
|
{
|
|
2707
2707
|
type: "button",
|
|
2708
2708
|
onClick: Ra,
|
|
2709
2709
|
className: "nvr-pop-in flex h-8 items-center gap-1 rounded-full border border-nvr-cyan/40 bg-nvr-cyan/[0.08] px-2.5 text-[12px] font-medium transition-colors text-nvr-navy hover:bg-nvr-cyan/20 dark:text-nvr-cyan",
|
|
2710
2710
|
children: [
|
|
2711
|
-
/* @__PURE__ */ a(
|
|
2712
|
-
|
|
2711
|
+
/* @__PURE__ */ a(si, { className: "h-3 w-3" }),
|
|
2712
|
+
ne(Mn),
|
|
2713
2713
|
" update",
|
|
2714
|
-
|
|
2714
|
+
Mn === 1 ? "" : "s",
|
|
2715
2715
|
" · Refresh"
|
|
2716
2716
|
]
|
|
2717
2717
|
}
|
|
2718
2718
|
),
|
|
2719
2719
|
/* @__PURE__ */ a(
|
|
2720
|
-
|
|
2720
|
+
Ed,
|
|
2721
2721
|
{
|
|
2722
2722
|
leadMinWidth: "siblings",
|
|
2723
2723
|
moreLabel: "More queue actions",
|
|
@@ -2765,7 +2765,7 @@ function Ap({
|
|
|
2765
2765
|
}),
|
|
2766
2766
|
className: `flex h-8 items-center gap-1.5 rounded-full border px-2.5 text-[12px] font-medium transition-colors ${x.addendums === "active" ? "border-amber-400 bg-amber-50 text-amber-800 dark:border-amber-500/60 dark:bg-amber-500/10 dark:text-amber-300" : "border-slate-200 bg-white text-slate-600 hover:border-slate-300 dark:border-border dark:bg-card dark:text-slate-300"}`,
|
|
2767
2767
|
children: [
|
|
2768
|
-
/* @__PURE__ */ a(
|
|
2768
|
+
/* @__PURE__ */ a(ii, { className: "h-3.5 w-3.5" }),
|
|
2769
2769
|
"Active addendums"
|
|
2770
2770
|
]
|
|
2771
2771
|
}
|
|
@@ -2779,7 +2779,7 @@ function Ap({
|
|
|
2779
2779
|
priority: x.integrations ? 90 : 38,
|
|
2780
2780
|
active: !!x.integrations,
|
|
2781
2781
|
node: /* @__PURE__ */ a(
|
|
2782
|
-
|
|
2782
|
+
Nd,
|
|
2783
2783
|
{
|
|
2784
2784
|
label: A("integrations", "Integrations"),
|
|
2785
2785
|
value: x.integrations,
|
|
@@ -2791,14 +2791,14 @@ function Ap({
|
|
|
2791
2791
|
)
|
|
2792
2792
|
}
|
|
2793
2793
|
] : [],
|
|
2794
|
-
{ key: "focus", priority: 30, label: "Focus mode", node: /* @__PURE__ */ a(
|
|
2794
|
+
{ key: "focus", priority: 30, label: "Focus mode", node: /* @__PURE__ */ a(yd, {}) },
|
|
2795
2795
|
...(ct || S) && l ? [
|
|
2796
2796
|
{
|
|
2797
2797
|
key: "live-pause",
|
|
2798
2798
|
priority: Ke.paused ? 90 : 45,
|
|
2799
2799
|
active: Ke.paused,
|
|
2800
2800
|
node: /* @__PURE__ */ a(
|
|
2801
|
-
|
|
2801
|
+
Rd,
|
|
2802
2802
|
{
|
|
2803
2803
|
paused: Ke.paused,
|
|
2804
2804
|
held: Ke.held,
|
|
@@ -2822,18 +2822,18 @@ function Ap({
|
|
|
2822
2822
|
R ? "border-nvr-cyan/40 bg-nvr-cyan/10 text-slate-900 dark:text-white" : "border-slate-200 text-slate-600 hover:bg-slate-50 dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800"
|
|
2823
2823
|
),
|
|
2824
2824
|
children: [
|
|
2825
|
-
/* @__PURE__ */ a(
|
|
2825
|
+
/* @__PURE__ */ a(ci, { className: "h-3.5 w-3.5" }),
|
|
2826
2826
|
R ? `Group: ${((Ao = wo.find((e) => e.value === R)) == null ? void 0 : Ao.label) ?? R}` : "Group"
|
|
2827
2827
|
]
|
|
2828
2828
|
}
|
|
2829
2829
|
) }),
|
|
2830
2830
|
/* @__PURE__ */ a(Tt, { className: "w-[200px] p-0", align: "start", children: /* @__PURE__ */ d(sl, { children: [
|
|
2831
|
-
/* @__PURE__ */ a(
|
|
2831
|
+
/* @__PURE__ */ a(Wd, { placeholder: "Group by…", className: "h-8 text-[12px]" }),
|
|
2832
2832
|
/* @__PURE__ */ d(il, { children: [
|
|
2833
|
-
/* @__PURE__ */ a(
|
|
2833
|
+
/* @__PURE__ */ a(Hd, { children: "No attribute found." }),
|
|
2834
2834
|
/* @__PURE__ */ d(sn, { value: "__none__", onSelect: () => At(null), children: [
|
|
2835
2835
|
/* @__PURE__ */ a(
|
|
2836
|
-
|
|
2836
|
+
Ar,
|
|
2837
2837
|
{
|
|
2838
2838
|
"aria-hidden": !0,
|
|
2839
2839
|
className: F(
|
|
@@ -2851,7 +2851,7 @@ function Ap({
|
|
|
2851
2851
|
onSelect: () => At(e.value),
|
|
2852
2852
|
children: [
|
|
2853
2853
|
/* @__PURE__ */ a(
|
|
2854
|
-
|
|
2854
|
+
Ar,
|
|
2855
2855
|
{
|
|
2856
2856
|
"aria-hidden": !0,
|
|
2857
2857
|
className: F(
|
|
@@ -2888,7 +2888,7 @@ function Ap({
|
|
|
2888
2888
|
U === "-priority" ? "border-nvr-cyan/40 bg-nvr-cyan/10 text-slate-900 dark:text-white" : "border-slate-200 text-slate-600 hover:bg-slate-50 dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800"
|
|
2889
2889
|
),
|
|
2890
2890
|
children: [
|
|
2891
|
-
/* @__PURE__ */ a(
|
|
2891
|
+
/* @__PURE__ */ a(di, { className: "h-3.5 w-3.5" }),
|
|
2892
2892
|
"Priority"
|
|
2893
2893
|
]
|
|
2894
2894
|
}
|
|
@@ -2903,7 +2903,7 @@ function Ap({
|
|
|
2903
2903
|
"button",
|
|
2904
2904
|
{
|
|
2905
2905
|
type: "button",
|
|
2906
|
-
onClick: () =>
|
|
2906
|
+
onClick: () => En(
|
|
2907
2907
|
xe.size > 0 ? /* @__PURE__ */ new Set() : new Set(we.map((e) => e.key))
|
|
2908
2908
|
),
|
|
2909
2909
|
className: "flex h-8 items-center rounded-md px-2 text-[12px] text-slate-500 hover:text-slate-700 dark:text-slate-400 dark:hover:text-slate-200",
|
|
@@ -2926,22 +2926,22 @@ function Ap({
|
|
|
2926
2926
|
qt ? "border-nvr-cyan/40 bg-nvr-cyan/10 text-slate-900 dark:text-white" : "border-slate-200 text-slate-600 hover:bg-slate-50 dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800"
|
|
2927
2927
|
),
|
|
2928
2928
|
children: [
|
|
2929
|
-
/* @__PURE__ */ a(
|
|
2929
|
+
/* @__PURE__ */ a(ui, { className: "h-3.5 w-3.5" }),
|
|
2930
2930
|
qt ? `Lanes: ${qt === "collection" ? "Collection" : "Owner"}` : "Lanes"
|
|
2931
2931
|
]
|
|
2932
2932
|
}
|
|
2933
2933
|
) }),
|
|
2934
2934
|
/* @__PURE__ */ a(Tt, { className: "w-[180px] p-0", align: "start", children: /* @__PURE__ */ a(sl, { children: /* @__PURE__ */ d(il, { children: [
|
|
2935
|
-
/* @__PURE__ */ a(sn, { value: "none", onSelect: () =>
|
|
2935
|
+
/* @__PURE__ */ a(sn, { value: "none", onSelect: () => Pn(null), children: "None" }),
|
|
2936
2936
|
/* @__PURE__ */ a(
|
|
2937
2937
|
sn,
|
|
2938
2938
|
{
|
|
2939
2939
|
value: "collection",
|
|
2940
|
-
onSelect: () =>
|
|
2940
|
+
onSelect: () => Pn("collection"),
|
|
2941
2941
|
children: "Collection"
|
|
2942
2942
|
}
|
|
2943
2943
|
),
|
|
2944
|
-
/* @__PURE__ */ a(sn, { value: "owner", onSelect: () =>
|
|
2944
|
+
/* @__PURE__ */ a(sn, { value: "owner", onSelect: () => Pn("owners"), children: "Owner" })
|
|
2945
2945
|
] }) }) })
|
|
2946
2946
|
] })
|
|
2947
2947
|
}
|
|
@@ -2959,7 +2959,7 @@ function Ap({
|
|
|
2959
2959
|
className: "flex h-8 items-center gap-1 rounded-md border border-slate-200 px-2.5 text-[12px] font-medium text-slate-600 hover:bg-slate-50 dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800",
|
|
2960
2960
|
"data-queue-ask": !0,
|
|
2961
2961
|
children: [
|
|
2962
|
-
/* @__PURE__ */ a(
|
|
2962
|
+
/* @__PURE__ */ a(mi, { className: "h-3.5 w-3.5 text-nvr-cyan" }),
|
|
2963
2963
|
"Ask about this queue"
|
|
2964
2964
|
]
|
|
2965
2965
|
}
|
|
@@ -2970,20 +2970,20 @@ function Ap({
|
|
|
2970
2970
|
key: "copy-link",
|
|
2971
2971
|
priority: 25,
|
|
2972
2972
|
label: "Copy link",
|
|
2973
|
-
node: /* @__PURE__ */ a(
|
|
2973
|
+
node: /* @__PURE__ */ a(Fd, { listKey: `queue:${l}`, getState: hr })
|
|
2974
2974
|
},
|
|
2975
2975
|
{
|
|
2976
2976
|
key: "send-view",
|
|
2977
2977
|
priority: 20,
|
|
2978
2978
|
label: "Send this view",
|
|
2979
2979
|
node: /* @__PURE__ */ a(
|
|
2980
|
-
|
|
2980
|
+
Ud,
|
|
2981
2981
|
{
|
|
2982
|
-
getView: () =>
|
|
2982
|
+
getView: () => Uc(
|
|
2983
2983
|
"queue",
|
|
2984
2984
|
l,
|
|
2985
2985
|
`queue:${l}`,
|
|
2986
|
-
|
|
2986
|
+
hr(),
|
|
2987
2987
|
Ia()
|
|
2988
2988
|
),
|
|
2989
2989
|
describe: () => {
|
|
@@ -3002,7 +3002,7 @@ function Ap({
|
|
|
3002
3002
|
"button",
|
|
3003
3003
|
{
|
|
3004
3004
|
type: "button",
|
|
3005
|
-
onClick: () => void
|
|
3005
|
+
onClick: () => void Us(),
|
|
3006
3006
|
disabled: Nt || !i || (i.total ?? 0) === 0,
|
|
3007
3007
|
"data-tip": "Download the rows on this tab, with these filters and columns, as a spreadsheet (CSV)",
|
|
3008
3008
|
"aria-label": Nt ? "Exporting to CSV" : "Export to CSV",
|
|
@@ -3010,7 +3010,7 @@ function Ap({
|
|
|
3010
3010
|
className: "flex h-8 items-center gap-1 rounded-md border border-slate-200 px-2.5 text-[12px] font-medium text-slate-600 hover:bg-slate-50 disabled:cursor-not-allowed disabled:opacity-50 dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800",
|
|
3011
3011
|
"data-queue-export": !0,
|
|
3012
3012
|
children: [
|
|
3013
|
-
Nt ? /* @__PURE__ */ a(Go, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ a(
|
|
3013
|
+
Nt ? /* @__PURE__ */ a(Go, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ a(pi, { className: "h-3.5 w-3.5" }),
|
|
3014
3014
|
"Export"
|
|
3015
3015
|
]
|
|
3016
3016
|
}
|
|
@@ -3025,7 +3025,7 @@ function Ap({
|
|
|
3025
3025
|
"button",
|
|
3026
3026
|
{
|
|
3027
3027
|
type: "button",
|
|
3028
|
-
onClick: () =>
|
|
3028
|
+
onClick: () => Cl((e) => !e),
|
|
3029
3029
|
"aria-expanded": We,
|
|
3030
3030
|
title: "Trends, aging, pace and states",
|
|
3031
3031
|
className: F(
|
|
@@ -3034,7 +3034,7 @@ function Ap({
|
|
|
3034
3034
|
),
|
|
3035
3035
|
"data-queue-insights-toggle": !0,
|
|
3036
3036
|
children: [
|
|
3037
|
-
/* @__PURE__ */ a(
|
|
3037
|
+
/* @__PURE__ */ a(fi, { className: "h-3.5 w-3.5" }),
|
|
3038
3038
|
"Insights"
|
|
3039
3039
|
]
|
|
3040
3040
|
}
|
|
@@ -3051,7 +3051,7 @@ function Ap({
|
|
|
3051
3051
|
type: "button",
|
|
3052
3052
|
className: "flex h-8 items-center gap-1 rounded-md border border-slate-200 px-2.5 text-[12px] font-medium text-slate-600 hover:bg-slate-50 dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800",
|
|
3053
3053
|
children: [
|
|
3054
|
-
/* @__PURE__ */ a(
|
|
3054
|
+
/* @__PURE__ */ a(bi, { className: "h-3.5 w-3.5" }),
|
|
3055
3055
|
"Columns"
|
|
3056
3056
|
]
|
|
3057
3057
|
}
|
|
@@ -3064,25 +3064,25 @@ function Ap({
|
|
|
3064
3064
|
collisionPadding: 16,
|
|
3065
3065
|
"data-queue-columns-chooser": "",
|
|
3066
3066
|
children: /* @__PURE__ */ a(
|
|
3067
|
-
|
|
3067
|
+
Xs,
|
|
3068
3068
|
{
|
|
3069
|
-
sensors:
|
|
3070
|
-
collisionDetection:
|
|
3071
|
-
onDragEnd:
|
|
3069
|
+
sensors: Ps,
|
|
3070
|
+
collisionDetection: Zs,
|
|
3071
|
+
onDragEnd: Ks,
|
|
3072
3072
|
children: /* @__PURE__ */ a(
|
|
3073
|
-
|
|
3073
|
+
ei,
|
|
3074
3074
|
{
|
|
3075
3075
|
items: bo,
|
|
3076
|
-
strategy:
|
|
3076
|
+
strategy: ti,
|
|
3077
3077
|
children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: bo.map((e) => {
|
|
3078
|
-
const t =
|
|
3078
|
+
const t = $r.find((n) => n.key === e);
|
|
3079
3079
|
return /* @__PURE__ */ a(
|
|
3080
|
-
|
|
3080
|
+
Lu,
|
|
3081
3081
|
{
|
|
3082
3082
|
id: e,
|
|
3083
3083
|
label: typeof (t == null ? void 0 : t.header) == "string" ? t.header : e,
|
|
3084
3084
|
checked: oe.has(e),
|
|
3085
|
-
onCheckedChange: () =>
|
|
3085
|
+
onCheckedChange: () => Hs(e)
|
|
3086
3086
|
},
|
|
3087
3087
|
e
|
|
3088
3088
|
);
|
|
@@ -3096,7 +3096,7 @@ function Ap({
|
|
|
3096
3096
|
] })
|
|
3097
3097
|
}
|
|
3098
3098
|
] : [],
|
|
3099
|
-
...C === "table" &&
|
|
3099
|
+
...C === "table" && yn ? [
|
|
3100
3100
|
{
|
|
3101
3101
|
key: "bulk",
|
|
3102
3102
|
priority: X ? 95 : 58,
|
|
@@ -3105,13 +3105,13 @@ function Ap({
|
|
|
3105
3105
|
"button",
|
|
3106
3106
|
{
|
|
3107
3107
|
type: "button",
|
|
3108
|
-
onClick:
|
|
3108
|
+
onClick: ds,
|
|
3109
3109
|
"aria-pressed": X,
|
|
3110
3110
|
"data-queue-bulk-mode": X ? "on" : "off",
|
|
3111
3111
|
"data-tip": X ? "Leave bulk mode — clears the selection and turns row actions back on" : "Select rows to act on several at once",
|
|
3112
3112
|
className: `flex h-8 items-center gap-1.5 rounded-md border px-2.5 text-[12px] font-medium shadow-sm ${X ? "border-nvr-cyan bg-nvr-cyan/10 text-slate-800 dark:text-slate-100" : "border-slate-200 bg-white text-slate-500 hover:bg-slate-50 hover:text-slate-700 dark:border-border dark:bg-card dark:text-slate-400 dark:hover:bg-muted"}`,
|
|
3113
3113
|
children: [
|
|
3114
|
-
/* @__PURE__ */ a(
|
|
3114
|
+
/* @__PURE__ */ a(hi, { className: "h-3.5 w-3.5" }),
|
|
3115
3115
|
X ? "Done" : "Bulk select"
|
|
3116
3116
|
]
|
|
3117
3117
|
}
|
|
@@ -3128,17 +3128,17 @@ function Ap({
|
|
|
3128
3128
|
{
|
|
3129
3129
|
type: "button",
|
|
3130
3130
|
onClick: () => {
|
|
3131
|
-
|
|
3131
|
+
pl(Ot === "compact" ? "comfortable" : "compact");
|
|
3132
3132
|
},
|
|
3133
3133
|
"aria-label": "Row density",
|
|
3134
3134
|
title: Ot === "compact" ? "Switch to comfortable rows" : "Switch to compact rows",
|
|
3135
3135
|
className: "flex h-8 w-8 items-center justify-center rounded-md border border-slate-200 bg-white text-slate-500 shadow-sm hover:bg-slate-50 hover:text-slate-700 dark:border-border dark:bg-card dark:text-slate-400 dark:hover:bg-muted",
|
|
3136
|
-
children: Ot === "compact" ? /* @__PURE__ */ a(
|
|
3136
|
+
children: Ot === "compact" ? /* @__PURE__ */ a(yi, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ a(gi, { className: "h-3.5 w-3.5" })
|
|
3137
3137
|
}
|
|
3138
3138
|
)
|
|
3139
3139
|
}
|
|
3140
3140
|
] : [],
|
|
3141
|
-
...C === "table" &&
|
|
3141
|
+
...C === "table" && gl && _e.length > 0 ? [
|
|
3142
3142
|
{
|
|
3143
3143
|
key: "work-next",
|
|
3144
3144
|
priority: 70,
|
|
@@ -3149,7 +3149,7 @@ function Ap({
|
|
|
3149
3149
|
onClick: () => ja(),
|
|
3150
3150
|
className: "flex h-8 items-center gap-1.5 rounded-md bg-nvr-cyan px-3 text-[12px] font-semibold text-white hover:brightness-110",
|
|
3151
3151
|
children: [
|
|
3152
|
-
/* @__PURE__ */ a(
|
|
3152
|
+
/* @__PURE__ */ a(xi, { className: "h-3 w-3 fill-current" }),
|
|
3153
3153
|
"Work Next"
|
|
3154
3154
|
]
|
|
3155
3155
|
}
|
|
@@ -3158,16 +3158,16 @@ function Ap({
|
|
|
3158
3158
|
] : []
|
|
3159
3159
|
],
|
|
3160
3160
|
trail: /* @__PURE__ */ d(Ce, { children: [
|
|
3161
|
-
!
|
|
3161
|
+
!Hn && pe.length === 1 && (hn ? /* @__PURE__ */ d($t, { children: [
|
|
3162
3162
|
/* @__PURE__ */ a(Rt, { asChild: !0, children: /* @__PURE__ */ d(
|
|
3163
3163
|
"button",
|
|
3164
3164
|
{
|
|
3165
3165
|
type: "button",
|
|
3166
3166
|
className: "flex h-8 items-center gap-1.5 rounded-md border border-slate-200 bg-white px-2.5 text-[12px] font-medium text-slate-700 hover:bg-slate-50 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-200 dark:hover:bg-slate-800",
|
|
3167
3167
|
children: [
|
|
3168
|
-
/* @__PURE__ */ a(
|
|
3168
|
+
/* @__PURE__ */ a(An, { className: "h-3.5 w-3.5" }),
|
|
3169
3169
|
"New ",
|
|
3170
|
-
|
|
3170
|
+
Dr(pe[0]),
|
|
3171
3171
|
/* @__PURE__ */ a(Vo, { className: "h-3 w-3 opacity-60" })
|
|
3172
3172
|
]
|
|
3173
3173
|
}
|
|
@@ -3185,12 +3185,12 @@ function Ap({
|
|
|
3185
3185
|
}),
|
|
3186
3186
|
className: "flex w-full items-center rounded px-2 py-1.5 text-left text-[12px] text-slate-700 hover:bg-slate-100 dark:text-slate-200 dark:hover:bg-muted",
|
|
3187
3187
|
children: [
|
|
3188
|
-
((qo =
|
|
3188
|
+
((qo = hn.active) == null ? void 0 : qo.create_label) ?? ((Eo = hn.active) == null ? void 0 : Eo.name) ?? "Default layout",
|
|
3189
3189
|
/* @__PURE__ */ a("span", { className: "ml-auto pl-3 text-[10px] text-slate-400 dark:text-slate-500", children: "default" })
|
|
3190
3190
|
]
|
|
3191
3191
|
}
|
|
3192
3192
|
),
|
|
3193
|
-
|
|
3193
|
+
hn.options.map((e) => /* @__PURE__ */ a(
|
|
3194
3194
|
"button",
|
|
3195
3195
|
{
|
|
3196
3196
|
type: "button",
|
|
@@ -3218,20 +3218,20 @@ function Ap({
|
|
|
3218
3218
|
}),
|
|
3219
3219
|
className: "flex h-8 items-center gap-1.5 rounded-md border border-slate-200 bg-white px-2.5 text-[12px] font-medium text-slate-700 hover:bg-slate-50 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-200 dark:hover:bg-slate-800",
|
|
3220
3220
|
children: [
|
|
3221
|
-
/* @__PURE__ */ a(
|
|
3221
|
+
/* @__PURE__ */ a(An, { className: "h-3.5 w-3.5" }),
|
|
3222
3222
|
"New ",
|
|
3223
|
-
|
|
3223
|
+
Dr(pe[0])
|
|
3224
3224
|
]
|
|
3225
3225
|
}
|
|
3226
3226
|
)),
|
|
3227
|
-
!
|
|
3227
|
+
!Hn && pe.length > 1 && /* @__PURE__ */ d($t, { children: [
|
|
3228
3228
|
/* @__PURE__ */ a(Rt, { asChild: !0, children: /* @__PURE__ */ d(
|
|
3229
3229
|
"button",
|
|
3230
3230
|
{
|
|
3231
3231
|
type: "button",
|
|
3232
3232
|
className: "flex h-8 items-center gap-1.5 rounded-md border border-slate-200 bg-white px-2.5 text-[12px] font-medium text-slate-700 hover:bg-slate-50 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-200 dark:hover:bg-slate-800",
|
|
3233
3233
|
children: [
|
|
3234
|
-
/* @__PURE__ */ a(
|
|
3234
|
+
/* @__PURE__ */ a(An, { className: "h-3.5 w-3.5" }),
|
|
3235
3235
|
"New",
|
|
3236
3236
|
/* @__PURE__ */ a(Vo, { className: "h-3 w-3 opacity-60" })
|
|
3237
3237
|
]
|
|
@@ -3248,15 +3248,15 @@ function Ap({
|
|
|
3248
3248
|
}),
|
|
3249
3249
|
className: "flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-[12px] text-slate-700 hover:bg-slate-100 dark:text-slate-200 dark:hover:bg-muted",
|
|
3250
3250
|
children: [
|
|
3251
|
-
/* @__PURE__ */ a(
|
|
3252
|
-
|
|
3251
|
+
/* @__PURE__ */ a(An, { className: "h-3 w-3 opacity-60" }),
|
|
3252
|
+
Dr(e)
|
|
3253
3253
|
]
|
|
3254
3254
|
},
|
|
3255
3255
|
e
|
|
3256
3256
|
)) })
|
|
3257
3257
|
] }),
|
|
3258
|
-
!
|
|
3259
|
-
|
|
3258
|
+
!Hn && dt && $e && /* @__PURE__ */ a(
|
|
3259
|
+
vd,
|
|
3260
3260
|
{
|
|
3261
3261
|
collection: dt,
|
|
3262
3262
|
onParsed: (e, t) => $e(`/collections/${dt}/new`, {
|
|
@@ -3278,20 +3278,20 @@ function Ap({
|
|
|
3278
3278
|
children: [
|
|
3279
3279
|
/* @__PURE__ */ d("div", { className: "nvr-stagger-direct flex max-w-full flex-wrap gap-px overflow-hidden rounded-lg border border-slate-200 bg-slate-200 dark:border-border dark:bg-border", children: [
|
|
3280
3280
|
/* @__PURE__ */ a(
|
|
3281
|
-
|
|
3281
|
+
cn,
|
|
3282
3282
|
{
|
|
3283
3283
|
label: "Total",
|
|
3284
3284
|
count: (g == null ? void 0 : g.total) ?? 0,
|
|
3285
3285
|
filteredCount: J ? J.total : null,
|
|
3286
|
-
active: Object.values(x).every(
|
|
3286
|
+
active: Object.values(x).every(Nl) && b === "all",
|
|
3287
3287
|
isLoading: ft,
|
|
3288
3288
|
...Jt("total"),
|
|
3289
|
-
onClick:
|
|
3289
|
+
onClick: Sl
|
|
3290
3290
|
}
|
|
3291
3291
|
),
|
|
3292
|
-
|
|
3292
|
+
Gs && /* @__PURE__ */ d(Ce, { children: [
|
|
3293
3293
|
/* @__PURE__ */ a(
|
|
3294
|
-
|
|
3294
|
+
cn,
|
|
3295
3295
|
{
|
|
3296
3296
|
label: "Warning",
|
|
3297
3297
|
count: (g == null ? void 0 : g.sla_warning) ?? 0,
|
|
@@ -3305,7 +3305,7 @@ function Ap({
|
|
|
3305
3305
|
}
|
|
3306
3306
|
),
|
|
3307
3307
|
/* @__PURE__ */ a(
|
|
3308
|
-
|
|
3308
|
+
cn,
|
|
3309
3309
|
{
|
|
3310
3310
|
label: "Breached",
|
|
3311
3311
|
count: (g == null ? void 0 : g.sla_breached) ?? 0,
|
|
@@ -3320,10 +3320,10 @@ function Ap({
|
|
|
3320
3320
|
)
|
|
3321
3321
|
] }),
|
|
3322
3322
|
/* @__PURE__ */ a(
|
|
3323
|
-
|
|
3323
|
+
cn,
|
|
3324
3324
|
{
|
|
3325
3325
|
label: "At Risk",
|
|
3326
|
-
breakdown: J ?
|
|
3326
|
+
breakdown: J ? dl(J.at_risk_by_rule) : dl(g == null ? void 0 : g.at_risk_by_rule),
|
|
3327
3327
|
count: (g == null ? void 0 : g.at_risk) ?? 0,
|
|
3328
3328
|
filteredCount: J ? J.at_risk : null,
|
|
3329
3329
|
tone: "red",
|
|
@@ -3335,7 +3335,7 @@ function Ap({
|
|
|
3335
3335
|
}
|
|
3336
3336
|
),
|
|
3337
3337
|
/* @__PURE__ */ a(
|
|
3338
|
-
|
|
3338
|
+
cn,
|
|
3339
3339
|
{
|
|
3340
3340
|
label: "Unowned",
|
|
3341
3341
|
count: (g == null ? void 0 : g.unowned) ?? 0,
|
|
@@ -3373,7 +3373,7 @@ function Ap({
|
|
|
3373
3373
|
children: [
|
|
3374
3374
|
e,
|
|
3375
3375
|
" · ",
|
|
3376
|
-
n
|
|
3376
|
+
ne(n)
|
|
3377
3377
|
]
|
|
3378
3378
|
},
|
|
3379
3379
|
e
|
|
@@ -3402,14 +3402,14 @@ function Ap({
|
|
|
3402
3402
|
Da.length > 0 && /* @__PURE__ */ a("div", { className: "flex min-w-0 flex-wrap items-center gap-1.5", children: Da.map(([e, t]) => {
|
|
3403
3403
|
var n;
|
|
3404
3404
|
return /* @__PURE__ */ a(
|
|
3405
|
-
|
|
3405
|
+
Tu,
|
|
3406
3406
|
{
|
|
3407
3407
|
label: Pe(e),
|
|
3408
3408
|
count: t,
|
|
3409
3409
|
filteredCount: J ? J.by_state[e] ?? 0 : null,
|
|
3410
3410
|
color: ((n = Be[e]) == null ? void 0 : n.color) ?? null,
|
|
3411
|
-
active:
|
|
3412
|
-
onClick: () =>
|
|
3411
|
+
active: _l.includes(e),
|
|
3412
|
+
onClick: () => wl(e)
|
|
3413
3413
|
},
|
|
3414
3414
|
e
|
|
3415
3415
|
);
|
|
@@ -3418,16 +3418,16 @@ function Ap({
|
|
|
3418
3418
|
}
|
|
3419
3419
|
),
|
|
3420
3420
|
C !== "workload" && /* @__PURE__ */ a(
|
|
3421
|
-
|
|
3421
|
+
su,
|
|
3422
3422
|
{
|
|
3423
3423
|
queueId: l,
|
|
3424
3424
|
right: I ? void 0 : /* @__PURE__ */ a(ll, { kind: "queue", id: l, variant: "header" })
|
|
3425
3425
|
}
|
|
3426
3426
|
),
|
|
3427
3427
|
C !== "workload" && /* @__PURE__ */ a(
|
|
3428
|
-
|
|
3428
|
+
lu,
|
|
3429
3429
|
{
|
|
3430
|
-
defs:
|
|
3430
|
+
defs: Vs,
|
|
3431
3431
|
values: x,
|
|
3432
3432
|
seededKeys: ln,
|
|
3433
3433
|
onApply: (e) => {
|
|
@@ -3436,7 +3436,7 @@ function Ap({
|
|
|
3436
3436
|
onClear: () => {
|
|
3437
3437
|
V({ ...ke.current }), j(1);
|
|
3438
3438
|
},
|
|
3439
|
-
right:
|
|
3439
|
+
right: Ws
|
|
3440
3440
|
}
|
|
3441
3441
|
),
|
|
3442
3442
|
/* @__PURE__ */ d(
|
|
@@ -3452,7 +3452,7 @@ function Ap({
|
|
|
3452
3452
|
className: "inline-flex h-6 items-center gap-1 rounded-full border border-nvr-cyan/40 bg-nvr-cyan/[0.06] px-2.5 text-[12px] text-slate-700 dark:text-slate-200",
|
|
3453
3453
|
children: [
|
|
3454
3454
|
"Your default ",
|
|
3455
|
-
pa(
|
|
3455
|
+
pa(Lr),
|
|
3456
3456
|
" filter is hiding",
|
|
3457
3457
|
" ",
|
|
3458
3458
|
Oe.toLocaleString("en-US"),
|
|
@@ -3510,7 +3510,7 @@ function Ap({
|
|
|
3510
3510
|
"button",
|
|
3511
3511
|
{
|
|
3512
3512
|
type: "button",
|
|
3513
|
-
onClick:
|
|
3513
|
+
onClick: rs,
|
|
3514
3514
|
title: "Revert to the queue default (filters, columns and sort cleared)",
|
|
3515
3515
|
className: F(
|
|
3516
3516
|
"inline-flex h-6 items-center rounded-full border px-2.5 text-[12px] transition-colors",
|
|
@@ -3534,13 +3534,13 @@ function Ap({
|
|
|
3534
3534
|
{
|
|
3535
3535
|
type: "button",
|
|
3536
3536
|
title: yt === e.id ? "Your default view — click to revert to the general default" : "Set as your default view",
|
|
3537
|
-
onClick: () =>
|
|
3537
|
+
onClick: () => cs.mutate(yt === e.id ? null : e.id),
|
|
3538
3538
|
className: F(
|
|
3539
3539
|
"shrink-0",
|
|
3540
3540
|
yt === e.id ? "text-amber-400" : "text-slate-300 hover:text-amber-400 dark:text-slate-600"
|
|
3541
3541
|
),
|
|
3542
3542
|
children: /* @__PURE__ */ a(
|
|
3543
|
-
|
|
3543
|
+
ki,
|
|
3544
3544
|
{
|
|
3545
3545
|
className: F("h-3 w-3", yt === e.id && "fill-current"),
|
|
3546
3546
|
"aria-label": yt === e.id ? "Default view" : "Set as default"
|
|
@@ -3556,14 +3556,14 @@ function Ap({
|
|
|
3556
3556
|
"button",
|
|
3557
3557
|
{
|
|
3558
3558
|
type: "button",
|
|
3559
|
-
onClick: () =>
|
|
3559
|
+
onClick: () => is.mutate({ viewId: e.id, on: !e.is_default }),
|
|
3560
3560
|
title: e.is_default ? "Queue default — click to unset" : "Set as the default view for everyone on this queue",
|
|
3561
3561
|
className: F(
|
|
3562
3562
|
"shrink-0",
|
|
3563
3563
|
e.is_default ? "text-nvr-cyan" : "invisible text-slate-300 hover:text-nvr-cyan group-hover:visible dark:text-slate-600"
|
|
3564
3564
|
),
|
|
3565
3565
|
"aria-label": e.is_default ? "Unset queue default" : "Set queue default",
|
|
3566
|
-
children: /* @__PURE__ */ a(
|
|
3566
|
+
children: /* @__PURE__ */ a(vi, { className: F("h-3 w-3", e.is_default && "fill-current") })
|
|
3567
3567
|
}
|
|
3568
3568
|
),
|
|
3569
3569
|
(e.user === z || Xe) && fe === e.id && /* @__PURE__ */ a(
|
|
@@ -3577,29 +3577,29 @@ function Ap({
|
|
|
3577
3577
|
"aria-label": `Update view ${e.name}`,
|
|
3578
3578
|
"data-view-update-state": Ze.isPending ? "saving" : Ya === e.id ? "saved" : "idle",
|
|
3579
3579
|
children: Ze.isPending && ((t = Ze.variables) == null ? void 0 : t.id) === e.id ? /* @__PURE__ */ a(Go, { className: "h-3 w-3 animate-spin" }) : Ya === e.id ? /* @__PURE__ */ a(
|
|
3580
|
-
|
|
3580
|
+
Ar,
|
|
3581
3581
|
{
|
|
3582
3582
|
className: "h-3 w-3 text-emerald-600 dark:text-emerald-400",
|
|
3583
3583
|
strokeWidth: 3
|
|
3584
3584
|
}
|
|
3585
|
-
) : /* @__PURE__ */ a(
|
|
3585
|
+
) : /* @__PURE__ */ a(wi, { className: "h-3 w-3" })
|
|
3586
3586
|
}
|
|
3587
3587
|
),
|
|
3588
3588
|
fe === e.id && /* @__PURE__ */ a(
|
|
3589
3589
|
"button",
|
|
3590
3590
|
{
|
|
3591
3591
|
type: "button",
|
|
3592
|
-
onClick: () =>
|
|
3593
|
-
title:
|
|
3592
|
+
onClick: () => Rl(e.id),
|
|
3593
|
+
title: gn(e.id) ? "Subscribed to new arrivals in this view — click to unsubscribe" : "Notify me when items enter this view (checked every 5 min)",
|
|
3594
3594
|
className: F(
|
|
3595
3595
|
"shrink-0",
|
|
3596
|
-
|
|
3596
|
+
gn(e.id) ? "text-nvr-cyan" : "invisible text-slate-300 hover:text-nvr-cyan group-hover:visible dark:text-slate-600"
|
|
3597
3597
|
),
|
|
3598
3598
|
"aria-label": `Subscribe to view ${e.name}`,
|
|
3599
|
-
children: /* @__PURE__ */ a(
|
|
3599
|
+
children: /* @__PURE__ */ a(_i, { className: F("h-3 w-3", gn(e.id) && "fill-current") })
|
|
3600
3600
|
}
|
|
3601
3601
|
),
|
|
3602
|
-
e.user === z && (
|
|
3602
|
+
e.user === z && (yr === e.id ? /* @__PURE__ */ d(
|
|
3603
3603
|
"span",
|
|
3604
3604
|
{
|
|
3605
3605
|
className: "flex shrink-0 items-center gap-1",
|
|
@@ -3621,7 +3621,7 @@ function Ap({
|
|
|
3621
3621
|
"button",
|
|
3622
3622
|
{
|
|
3623
3623
|
type: "button",
|
|
3624
|
-
onClick: () =>
|
|
3624
|
+
onClick: () => $n(null),
|
|
3625
3625
|
className: "text-slate-500 hover:underline dark:text-slate-400",
|
|
3626
3626
|
"aria-label": `Keep view ${e.name}`,
|
|
3627
3627
|
children: "No"
|
|
@@ -3633,7 +3633,7 @@ function Ap({
|
|
|
3633
3633
|
"button",
|
|
3634
3634
|
{
|
|
3635
3635
|
type: "button",
|
|
3636
|
-
onClick: () =>
|
|
3636
|
+
onClick: () => $n(e.id),
|
|
3637
3637
|
className: "invisible text-slate-400 hover:text-red-500 group-hover:visible",
|
|
3638
3638
|
"aria-label": `Delete view ${e.name}`,
|
|
3639
3639
|
children: "×"
|
|
@@ -3644,7 +3644,7 @@ function Ap({
|
|
|
3644
3644
|
e.id
|
|
3645
3645
|
);
|
|
3646
3646
|
}),
|
|
3647
|
-
/* @__PURE__ */ d($t, { open:
|
|
3647
|
+
/* @__PURE__ */ d($t, { open: ns, onOpenChange: fr, children: [
|
|
3648
3648
|
/* @__PURE__ */ a(Rt, { asChild: !0, children: /* @__PURE__ */ a(
|
|
3649
3649
|
"button",
|
|
3650
3650
|
{
|
|
@@ -3663,7 +3663,7 @@ function Ap({
|
|
|
3663
3663
|
type: "button",
|
|
3664
3664
|
disabled: Ze.isPending,
|
|
3665
3665
|
onClick: () => {
|
|
3666
|
-
Ze.mutate(e),
|
|
3666
|
+
Ze.mutate(e), fr(!1);
|
|
3667
3667
|
},
|
|
3668
3668
|
className: "mb-2 w-full rounded-md border border-nvr-cyan/40 bg-nvr-cyan/5 px-2 py-1.5 text-[12px] font-medium text-nvr-navy hover:bg-nvr-cyan/10 disabled:opacity-50 dark:text-nvr-cyan",
|
|
3669
3669
|
children: [
|
|
@@ -3677,10 +3677,10 @@ function Ap({
|
|
|
3677
3677
|
/* @__PURE__ */ a(
|
|
3678
3678
|
"input",
|
|
3679
3679
|
{
|
|
3680
|
-
value:
|
|
3680
|
+
value: _n,
|
|
3681
3681
|
onChange: (e) => Qa(e.target.value),
|
|
3682
3682
|
onKeyDown: (e) => {
|
|
3683
|
-
e.key !== "Enter" || e.nativeEvent.isComposing || (e.preventDefault(),
|
|
3683
|
+
e.key !== "Enter" || e.nativeEvent.isComposing || (e.preventDefault(), _n.trim() && !Cn.isPending && Cn.mutate());
|
|
3684
3684
|
},
|
|
3685
3685
|
placeholder: "View name",
|
|
3686
3686
|
"aria-label": "View name",
|
|
@@ -3713,8 +3713,8 @@ function Ap({
|
|
|
3713
3713
|
"button",
|
|
3714
3714
|
{
|
|
3715
3715
|
type: "button",
|
|
3716
|
-
disabled: !
|
|
3717
|
-
onClick: () =>
|
|
3716
|
+
disabled: !_n.trim() || Cn.isPending,
|
|
3717
|
+
onClick: () => Cn.mutate(),
|
|
3718
3718
|
className: "w-full rounded-md bg-nvr-cyan px-2 py-1.5 text-[12px] font-semibold text-white hover:bg-nvr-cyan/90 disabled:opacity-50",
|
|
3719
3719
|
children: "Save current view"
|
|
3720
3720
|
}
|
|
@@ -3725,16 +3725,16 @@ function Ap({
|
|
|
3725
3725
|
}
|
|
3726
3726
|
)
|
|
3727
3727
|
] }),
|
|
3728
|
-
/* @__PURE__ */ d("div", { ref:
|
|
3729
|
-
da && /* @__PURE__ */ a(
|
|
3730
|
-
|
|
3728
|
+
/* @__PURE__ */ d("div", { ref: Nn, className: "flex min-h-0 flex-1 flex-col overflow-y-auto px-4 pb-4 pt-3", children: [
|
|
3729
|
+
da && /* @__PURE__ */ a($d, { error: El, onRetry: () => void Pl(), className: "mb-3" }),
|
|
3730
|
+
Or && /* @__PURE__ */ a(
|
|
3731
3731
|
"p",
|
|
3732
3732
|
{
|
|
3733
3733
|
"data-filter-sentence": !0,
|
|
3734
|
-
"data-tip":
|
|
3734
|
+
"data-tip": Or,
|
|
3735
3735
|
"aria-live": "polite",
|
|
3736
3736
|
className: "mb-1.5 shrink-0 truncate px-0.5 text-[11.5px] text-slate-500 dark:text-slate-400",
|
|
3737
|
-
children:
|
|
3737
|
+
children: Or
|
|
3738
3738
|
}
|
|
3739
3739
|
),
|
|
3740
3740
|
C === "table" ? /* @__PURE__ */ a(Ce, { children: /* @__PURE__ */ a("div", { className: "flex min-h-0 flex-1", children: /* @__PURE__ */ d(
|
|
@@ -3748,7 +3748,7 @@ function Ap({
|
|
|
3748
3748
|
"aria-busy": ba || void 0,
|
|
3749
3749
|
children: [
|
|
3750
3750
|
Kt.label && /* @__PURE__ */ a(
|
|
3751
|
-
|
|
3751
|
+
Td,
|
|
3752
3752
|
{
|
|
3753
3753
|
label: Kt.label,
|
|
3754
3754
|
onShow: Ta,
|
|
@@ -3756,13 +3756,13 @@ function Ap({
|
|
|
3756
3756
|
}
|
|
3757
3757
|
),
|
|
3758
3758
|
ga != null && /* @__PURE__ */ d("span", { className: "nvr-slide-up-centered absolute left-1/2 top-6 z-[6] -translate-x-1/2 rounded-full border border-slate-200 bg-white px-3 py-1.5 text-[12px] font-medium text-slate-600 shadow-lg dark:border-border dark:bg-card dark:text-slate-300", children: [
|
|
3759
|
-
|
|
3759
|
+
Ml.text ?? "Still working",
|
|
3760
3760
|
" — ",
|
|
3761
3761
|
ga,
|
|
3762
3762
|
"s"
|
|
3763
3763
|
] }),
|
|
3764
3764
|
/* @__PURE__ */ a(
|
|
3765
|
-
|
|
3765
|
+
bd,
|
|
3766
3766
|
{
|
|
3767
3767
|
fillHeight: !0,
|
|
3768
3768
|
enterKey: Ca.current,
|
|
@@ -3773,35 +3773,35 @@ function Ap({
|
|
|
3773
3773
|
rowKey: (e) => `${e.collection}:${e.item_id}`,
|
|
3774
3774
|
total: (i == null ? void 0 : i.total) ?? 0,
|
|
3775
3775
|
page: se,
|
|
3776
|
-
limit:
|
|
3776
|
+
limit: pn,
|
|
3777
3777
|
isLoading: ft,
|
|
3778
3778
|
onPageChange: j,
|
|
3779
|
-
onRowClick: (e) =>
|
|
3779
|
+
onRowClick: (e) => pr(e),
|
|
3780
3780
|
onRowFocus: (e) => Xt(k(e)),
|
|
3781
3781
|
activeRowKey: zt,
|
|
3782
3782
|
rowAriaLabel: (e) => e.label || void 0,
|
|
3783
3783
|
rowDragProps: (e) => ({
|
|
3784
|
-
...
|
|
3785
|
-
...
|
|
3784
|
+
...Gl({ collection: e.collection, id: e.item_id }),
|
|
3785
|
+
...Bl.record(e.collection, e.item_id)
|
|
3786
3786
|
}),
|
|
3787
3787
|
onRowContextMenu: (e, t) => {
|
|
3788
3788
|
t.preventDefault(), Zt({ x: t.clientX, y: t.clientY, row: e });
|
|
3789
3789
|
},
|
|
3790
3790
|
rowTitle: (e) => {
|
|
3791
3791
|
const t = Ht.get(k(e));
|
|
3792
|
-
return (
|
|
3792
|
+
return (Tn(k(e)) ? wc : void 0) ?? (wt(k(e)) != null ? bc(wt(k(e))) : void 0) ?? be.titleFor(k(e)) ?? (t && !t.is_mine ? yc(t) : void 0) ?? (Ja(e.collection, e.item_id) ? Dd : void 0);
|
|
3793
3793
|
},
|
|
3794
3794
|
rowClassName: (e) => F(
|
|
3795
|
-
|
|
3796
|
-
Ja(e.collection, e.item_id) &&
|
|
3797
|
-
|
|
3795
|
+
ss(e),
|
|
3796
|
+
Ja(e.collection, e.item_id) && Kd,
|
|
3797
|
+
Tn(k(e)) && vc
|
|
3798
3798
|
),
|
|
3799
3799
|
emptyMessage: da ? /* @__PURE__ */ a("span", { className: "sr-only", children: "The list did not load." }) : /* @__PURE__ */ a(
|
|
3800
|
-
|
|
3800
|
+
hd,
|
|
3801
3801
|
{
|
|
3802
|
-
icon:
|
|
3802
|
+
icon: Ni,
|
|
3803
3803
|
title: ((Po = i == null ? void 0 : i.empty) == null ? void 0 : Po.reason) === "not_permitted" ? "You cannot read this queue’s records" : ((Ko = i == null ? void 0 : i.empty) == null ? void 0 : Ko.reason) === "scope_mine" ? "Nothing waiting on you" : ((Do = i == null ? void 0 : i.empty) == null ? void 0 : Do.reason) === "filters" ? "No records match these filters" : "Nothing in this queue",
|
|
3804
|
-
detail: ((Mo = i == null ? void 0 : i.empty) == null ? void 0 : Mo.reason) === "filters" && Oe > 0 ? `Your default ${pa(
|
|
3804
|
+
detail: ((Mo = i == null ? void 0 : i.empty) == null ? void 0 : Mo.reason) === "filters" && Oe > 0 ? `Your default ${pa(Lr)} filter is hiding ${Oe.toLocaleString("en-US")} item${Oe === 1 ? "" : "s"} here.` : ((Bo = i == null ? void 0 : i.empty) == null ? void 0 : Bo.reason) === "filters" ? b !== "all" ? "Your filters and the current tab leave nothing to show. Widen a filter or look across all items." : "Widen or clear a filter to see more of the queue." : ((jo = i == null ? void 0 : i.empty) == null ? void 0 : jo.message) ?? "Records land here when they match the queue sources — a state change or new record can appear at any moment.",
|
|
3805
3805
|
action: ((Qo = i == null ? void 0 : i.empty) == null ? void 0 : Qo.reason) === "filters" ? /* @__PURE__ */ d("div", { className: "flex items-center justify-center gap-2", children: [
|
|
3806
3806
|
Oe > 0 && /* @__PURE__ */ d(
|
|
3807
3807
|
"button",
|
|
@@ -3851,32 +3851,32 @@ function Ap({
|
|
|
3851
3851
|
onSortChange: (e) => {
|
|
3852
3852
|
lt(e), j(1);
|
|
3853
3853
|
},
|
|
3854
|
-
filterDefs:
|
|
3854
|
+
filterDefs: Tr,
|
|
3855
3855
|
filterValues: x,
|
|
3856
3856
|
onFilterChange: (e, t) => {
|
|
3857
3857
|
V((n) => ({ ...n, [e]: t })), j(1);
|
|
3858
3858
|
},
|
|
3859
|
-
rowGroups:
|
|
3859
|
+
rowGroups: xs ?? void 0,
|
|
3860
3860
|
collapsedGroups: xe,
|
|
3861
|
-
onToggleGroup:
|
|
3862
|
-
selectedIds:
|
|
3863
|
-
onSelectionChange:
|
|
3861
|
+
onToggleGroup: Xl,
|
|
3862
|
+
selectedIds: yn && X ? ee : void 0,
|
|
3863
|
+
onSelectionChange: yn && X ? De : void 0,
|
|
3864
3864
|
hideFilterRow: !0,
|
|
3865
3865
|
nowrapCells: !0,
|
|
3866
3866
|
columnPins: vo,
|
|
3867
|
-
pinKeepRank:
|
|
3867
|
+
pinKeepRank: ku,
|
|
3868
3868
|
pinRightShare: 0.45,
|
|
3869
3869
|
onColumnPinChange: (e, t) => {
|
|
3870
|
-
|
|
3870
|
+
Kn((n) => {
|
|
3871
3871
|
const r = { ...n ?? vo };
|
|
3872
3872
|
return t ? r[e] = t : delete r[e], r;
|
|
3873
3873
|
});
|
|
3874
3874
|
},
|
|
3875
3875
|
columnFilterRow: !0,
|
|
3876
3876
|
hScrollProxy: !0,
|
|
3877
|
-
totalsRow:
|
|
3877
|
+
totalsRow: Qs,
|
|
3878
3878
|
footer: /* @__PURE__ */ a(
|
|
3879
|
-
|
|
3879
|
+
jd,
|
|
3880
3880
|
{
|
|
3881
3881
|
collections: Yt,
|
|
3882
3882
|
selectedIds: String(x.at_risk_rule ?? "").split(",").map((e) => Number(e)).filter((e) => Number.isFinite(e) && e > 0),
|
|
@@ -3895,25 +3895,25 @@ function Ap({
|
|
|
3895
3895
|
]
|
|
3896
3896
|
}
|
|
3897
3897
|
) }) }) : C === "kanban" ? /* @__PURE__ */ a(
|
|
3898
|
-
|
|
3898
|
+
ou,
|
|
3899
3899
|
{
|
|
3900
3900
|
items: L,
|
|
3901
|
-
onCardClick: (e) =>
|
|
3902
|
-
onDrop: (e, t) =>
|
|
3901
|
+
onCardClick: (e) => pr(e),
|
|
3902
|
+
onDrop: (e, t) => jl.mutate({ item: e, targetState: t }),
|
|
3903
3903
|
onClaim: (e) => He.mutate(e),
|
|
3904
3904
|
onRelease: (e) => bt.mutate(e),
|
|
3905
3905
|
swimlaneBy: qt,
|
|
3906
|
-
stateLabels:
|
|
3906
|
+
stateLabels: ir,
|
|
3907
3907
|
laneLabel: qt === "collection" ? Ie : void 0,
|
|
3908
3908
|
claimsEnabled: Te,
|
|
3909
3909
|
onDraggingChange: (e) => {
|
|
3910
|
-
|
|
3910
|
+
Qn.current = e;
|
|
3911
3911
|
}
|
|
3912
3912
|
}
|
|
3913
|
-
) : /* @__PURE__ */ a(
|
|
3913
|
+
) : /* @__PURE__ */ a(iu, { queueId: l })
|
|
3914
3914
|
] }),
|
|
3915
|
-
|
|
3916
|
-
|
|
3915
|
+
yn && X && /* @__PURE__ */ d(
|
|
3916
|
+
nu,
|
|
3917
3917
|
{
|
|
3918
3918
|
count: ee.length,
|
|
3919
3919
|
claimsEnabled: Te,
|
|
@@ -3925,7 +3925,7 @@ function Ap({
|
|
|
3925
3925
|
label: Pe(e)
|
|
3926
3926
|
})),
|
|
3927
3927
|
busy: vt,
|
|
3928
|
-
onClaim: () =>
|
|
3928
|
+
onClaim: () => gr(
|
|
3929
3929
|
"Claim",
|
|
3930
3930
|
(e) => f.request(
|
|
3931
3931
|
ge(`/queues/${l}/claim`, {
|
|
@@ -3934,7 +3934,7 @@ function Ap({
|
|
|
3934
3934
|
})
|
|
3935
3935
|
)
|
|
3936
3936
|
),
|
|
3937
|
-
onRelease: () =>
|
|
3937
|
+
onRelease: () => gr(
|
|
3938
3938
|
"Release",
|
|
3939
3939
|
(e) => f.request(
|
|
3940
3940
|
ge(`/queues/${l}/release`, {
|
|
@@ -3943,11 +3943,11 @@ function Ap({
|
|
|
3943
3943
|
})
|
|
3944
3944
|
)
|
|
3945
3945
|
),
|
|
3946
|
-
onTransition: (e) =>
|
|
3946
|
+
onTransition: (e) => gr("Transition", (t) => xa(t, e)),
|
|
3947
3947
|
onClear: () => De([]),
|
|
3948
3948
|
onActionIntent: () => eo(!0),
|
|
3949
3949
|
figures: /* @__PURE__ */ a(
|
|
3950
|
-
|
|
3950
|
+
od,
|
|
3951
3951
|
{
|
|
3952
3952
|
tone: "light",
|
|
3953
3953
|
total: ee.length,
|
|
@@ -3956,7 +3956,7 @@ function Ap({
|
|
|
3956
3956
|
noun: "row",
|
|
3957
3957
|
labelOf: (e) => {
|
|
3958
3958
|
const t = et.find((n) => n.key === e);
|
|
3959
|
-
return t ?
|
|
3959
|
+
return t ? Rr(t) : e;
|
|
3960
3960
|
},
|
|
3961
3961
|
format: (e, t) => {
|
|
3962
3962
|
const n = ye(e.slice(6));
|
|
@@ -3965,20 +3965,20 @@ function Ap({
|
|
|
3965
3965
|
}
|
|
3966
3966
|
),
|
|
3967
3967
|
notices: /* @__PURE__ */ a(
|
|
3968
|
-
|
|
3968
|
+
ad,
|
|
3969
3969
|
{
|
|
3970
3970
|
tone: "light",
|
|
3971
3971
|
framed: !0,
|
|
3972
3972
|
total: ee.length,
|
|
3973
|
-
open:
|
|
3974
|
-
changed:
|
|
3973
|
+
open: bs,
|
|
3974
|
+
changed: ps,
|
|
3975
3975
|
labelOf: (e) => {
|
|
3976
3976
|
var t;
|
|
3977
3977
|
return ((t = L.find((n) => k(n) === e)) == null ? void 0 : t.label) ?? null;
|
|
3978
3978
|
},
|
|
3979
3979
|
onSkip: (e) => De((t) => t.filter((n) => !e.includes(n))),
|
|
3980
3980
|
onAcknowledgeChanged: (e) => {
|
|
3981
|
-
|
|
3981
|
+
Rn.restamp(e), xr.clear(e);
|
|
3982
3982
|
},
|
|
3983
3983
|
onOpenRecord: ({ collection: e, id: t }) => window.open(Q.urlFor({ collection: e, itemId: t }), "_blank", "noopener")
|
|
3984
3984
|
}
|
|
@@ -3989,13 +3989,13 @@ function Ap({
|
|
|
3989
3989
|
{
|
|
3990
3990
|
type: "button",
|
|
3991
3991
|
onClick: () => {
|
|
3992
|
-
const e =
|
|
3993
|
-
L.filter((t) => ee.includes(k(t)) && t.collection !== "tasks").map((t) => Q.urlFor(
|
|
3992
|
+
const e = $c(
|
|
3993
|
+
L.filter((t) => ee.includes(k(t)) && t.collection !== "tasks").map((t) => Q.urlFor(mr(t)))
|
|
3994
3994
|
);
|
|
3995
3995
|
e.blocked > 0 || e.capped > 0 ? K.warning(Xo(e)) : K.success(Xo(e));
|
|
3996
3996
|
},
|
|
3997
3997
|
"data-bulk-open-tabs": !0,
|
|
3998
|
-
title: `Open the selected records in new tabs (up to ${
|
|
3998
|
+
title: `Open the selected records in new tabs (up to ${Cc})`,
|
|
3999
3999
|
className: "h-8 rounded-md border border-white/20 px-3 text-[12.5px] font-medium hover:bg-white/10 dark:border-border dark:hover:bg-muted",
|
|
4000
4000
|
children: "Open in tabs"
|
|
4001
4001
|
}
|
|
@@ -4005,7 +4005,7 @@ function Ap({
|
|
|
4005
4005
|
(n) => ee.includes(k(n)) && n.collection !== "tasks"
|
|
4006
4006
|
), t = [...new Set(e.map((n) => n.collection))];
|
|
4007
4007
|
return e.length > 0 ? /* @__PURE__ */ a(
|
|
4008
|
-
|
|
4008
|
+
ru,
|
|
4009
4009
|
{
|
|
4010
4010
|
collection: t.length === 1 ? t[0] : null,
|
|
4011
4011
|
ids: e.map((n) => n.item_id),
|
|
@@ -4017,7 +4017,7 @@ function Ap({
|
|
|
4017
4017
|
) : null;
|
|
4018
4018
|
})(),
|
|
4019
4019
|
/* @__PURE__ */ a(
|
|
4020
|
-
|
|
4020
|
+
ed,
|
|
4021
4021
|
{
|
|
4022
4022
|
targets: L.filter((e) => ee.includes(k(e)) && e.collection !== "tasks").map((e) => ({ collection: e.collection, id: e.item_id, label: e.label })),
|
|
4023
4023
|
enabledKeys: (p == null ? void 0 : p.bulk_action_keys) ?? null,
|
|
@@ -4029,7 +4029,7 @@ function Ap({
|
|
|
4029
4029
|
}
|
|
4030
4030
|
),
|
|
4031
4031
|
Ge("update-field") && /* @__PURE__ */ a(
|
|
4032
|
-
|
|
4032
|
+
nd,
|
|
4033
4033
|
{
|
|
4034
4034
|
targets: L.filter((e) => ee.includes(k(e)) && e.collection !== "tasks").map((e) => ({ collection: e.collection, id: e.item_id })),
|
|
4035
4035
|
disabled: vt,
|
|
@@ -4038,12 +4038,12 @@ function Ap({
|
|
|
4038
4038
|
}
|
|
4039
4039
|
),
|
|
4040
4040
|
Ge("compare") && /* @__PURE__ */ a(
|
|
4041
|
-
|
|
4041
|
+
td,
|
|
4042
4042
|
{
|
|
4043
4043
|
targets: L.filter((e) => ee.includes(k(e)) && e.collection !== "tasks").map((e) => ({ collection: e.collection, id: e.item_id })),
|
|
4044
4044
|
renderValue: (e, t, n, r) => {
|
|
4045
4045
|
var o;
|
|
4046
|
-
return
|
|
4046
|
+
return sd(
|
|
4047
4047
|
((o = L.find((c) => ee.includes(k(c)))) == null ? void 0 : o.collection) ?? "",
|
|
4048
4048
|
e,
|
|
4049
4049
|
t,
|
|
@@ -4056,7 +4056,7 @@ function Ap({
|
|
|
4056
4056
|
}
|
|
4057
4057
|
),
|
|
4058
4058
|
Ge("message") && /* @__PURE__ */ a(
|
|
4059
|
-
|
|
4059
|
+
ld,
|
|
4060
4060
|
{
|
|
4061
4061
|
targets: L.filter((e) => ee.includes(k(e)) && e.collection !== "tasks").map((e) => ({ collection: e.collection, id: e.item_id })),
|
|
4062
4062
|
disabled: vt,
|
|
@@ -4067,7 +4067,7 @@ function Ap({
|
|
|
4067
4067
|
}
|
|
4068
4068
|
),
|
|
4069
4069
|
Y != null && Y.length ? /* @__PURE__ */ a(
|
|
4070
|
-
|
|
4070
|
+
Bd,
|
|
4071
4071
|
{
|
|
4072
4072
|
collection: Y[0].collection,
|
|
4073
4073
|
itemId: Y[0].itemId,
|
|
@@ -4079,7 +4079,7 @@ function Ap({
|
|
|
4079
4079
|
onPush: (e) => _t.push([...Y, e]),
|
|
4080
4080
|
onPop: () => _t.back(),
|
|
4081
4081
|
onClose: () => _t.back(Y.length),
|
|
4082
|
-
onOpenRecord:
|
|
4082
|
+
onOpenRecord: es
|
|
4083
4083
|
}
|
|
4084
4084
|
) : null,
|
|
4085
4085
|
H && Wo(
|
|
@@ -4097,7 +4097,7 @@ function Ap({
|
|
|
4097
4097
|
"data-queue-row-menu": !0,
|
|
4098
4098
|
children: [
|
|
4099
4099
|
[
|
|
4100
|
-
{ label: "Open", run: () =>
|
|
4100
|
+
{ label: "Open", run: () => pr(H.row) },
|
|
4101
4101
|
{
|
|
4102
4102
|
label: "Open full record",
|
|
4103
4103
|
run: () => xt(H.row)
|
|
@@ -4122,14 +4122,14 @@ function Ap({
|
|
|
4122
4122
|
run: () => {
|
|
4123
4123
|
var e;
|
|
4124
4124
|
return void ((e = navigator.clipboard) == null ? void 0 : e.writeText(
|
|
4125
|
-
`${window.location.origin}${Q.urlFor(
|
|
4125
|
+
`${window.location.origin}${Q.urlFor(mr(H.row))}`
|
|
4126
4126
|
));
|
|
4127
4127
|
}
|
|
4128
4128
|
},
|
|
4129
4129
|
// Custom actions (#125): the record's registered actions, right here.
|
|
4130
|
-
...
|
|
4130
|
+
...Ll(H.row.collection).map((e) => ({
|
|
4131
4131
|
label: e.label,
|
|
4132
|
-
run: () =>
|
|
4132
|
+
run: () => Ol(e, H.row)
|
|
4133
4133
|
}))
|
|
4134
4134
|
].map((e) => /* @__PURE__ */ a(
|
|
4135
4135
|
"button",
|
|
@@ -4145,7 +4145,7 @@ function Ap({
|
|
|
4145
4145
|
)),
|
|
4146
4146
|
H.row.collection !== "tasks" && /* @__PURE__ */ d("div", { className: "mt-1 border-t border-slate-100 pt-1 dark:border-border/60", children: [
|
|
4147
4147
|
/* @__PURE__ */ a("p", { className: "px-3 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-slate-400", children: "Triage labels" }),
|
|
4148
|
-
|
|
4148
|
+
zn.slice(0, 8).map((e) => {
|
|
4149
4149
|
const t = (H.row.labels ?? []).includes(e);
|
|
4150
4150
|
return /* @__PURE__ */ d(
|
|
4151
4151
|
"button",
|
|
@@ -4199,50 +4199,51 @@ function Ap({
|
|
|
4199
4199
|
),
|
|
4200
4200
|
sa && Wo(
|
|
4201
4201
|
/* @__PURE__ */ a(
|
|
4202
|
-
|
|
4202
|
+
Ou,
|
|
4203
4203
|
{
|
|
4204
4204
|
queueId: l,
|
|
4205
4205
|
drill: sa,
|
|
4206
|
-
onClose: () =>
|
|
4206
|
+
onClose: () => Jn(null),
|
|
4207
4207
|
onOpenRecord: (e, t) => {
|
|
4208
|
-
|
|
4208
|
+
Jn(null), Q.open({ collection: e, itemId: t, layoutSlug: null });
|
|
4209
4209
|
}
|
|
4210
4210
|
}
|
|
4211
4211
|
),
|
|
4212
4212
|
document.body
|
|
4213
4213
|
),
|
|
4214
4214
|
/* @__PURE__ */ a(
|
|
4215
|
-
|
|
4215
|
+
au,
|
|
4216
4216
|
{
|
|
4217
4217
|
item: Je,
|
|
4218
|
-
stateLabels:
|
|
4218
|
+
stateLabels: ir,
|
|
4219
4219
|
collectionLabel: Ie,
|
|
4220
4220
|
claimsEnabled: Te,
|
|
4221
|
-
columnFormats:
|
|
4221
|
+
columnFormats: _s,
|
|
4222
|
+
extraMeta: s == null ? void 0 : s.extra_field_meta,
|
|
4222
4223
|
fieldLabel: (e) => A(`extra.${e}`, Ue(e)),
|
|
4223
4224
|
width: p == null ? void 0 : p.sheet_width,
|
|
4224
4225
|
itemLayout: p == null ? void 0 : p.item_layout,
|
|
4225
4226
|
onOpenRecord: (e) => xt(e),
|
|
4226
4227
|
onOpenChange: (e) => {
|
|
4227
|
-
e || (Ye(null),
|
|
4228
|
+
e || (Ye(null), dr(!1));
|
|
4228
4229
|
},
|
|
4229
4230
|
onClaim: (e) => He.mutate(e),
|
|
4230
4231
|
onRelease: (e) => bt.mutate(e),
|
|
4231
|
-
workNextActive:
|
|
4232
|
+
workNextActive: Zl,
|
|
4232
4233
|
onNext: () => Je && ja(Je),
|
|
4233
4234
|
refetchItems: () => y.invalidateQueries({ queryKey: ["queue-items", l] })
|
|
4234
4235
|
}
|
|
4235
4236
|
),
|
|
4236
|
-
|
|
4237
|
+
xn.dialog
|
|
4237
4238
|
] });
|
|
4238
4239
|
}
|
|
4239
|
-
function
|
|
4240
|
+
function Ou({
|
|
4240
4241
|
queueId: l,
|
|
4241
4242
|
drill: S,
|
|
4242
4243
|
onClose: q,
|
|
4243
4244
|
onOpenRecord: M
|
|
4244
4245
|
}) {
|
|
4245
|
-
const I =
|
|
4246
|
+
const I = ul(), { data: B, isLoading: y } = re({
|
|
4246
4247
|
queryKey: ["queue-agg-rows", l, S.row.collection, S.row.item_id, S.path],
|
|
4247
4248
|
queryFn: () => I.request(
|
|
4248
4249
|
D(`/queues/${l}/aggregate-rows`, {
|
|
@@ -4303,5 +4304,5 @@ function Lu({
|
|
|
4303
4304
|
);
|
|
4304
4305
|
}
|
|
4305
4306
|
export {
|
|
4306
|
-
|
|
4307
|
+
qp as QueueWorklist
|
|
4307
4308
|
};
|