@nivaro/react 0.3.136 → 0.3.138
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/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +95 -4
- package/dist/index.js +748 -743
- package/dist/shared/components/CollectionBrowserView.js +392 -389
- package/dist/shared/components/DelegateCoverLine.js +80 -87
- package/dist/shared/components/ItemEditForm.js +589 -588
- package/dist/shared/components/MyWorkView.js +284 -286
- package/dist/shared/components/NotificationBell.js +251 -205
- package/dist/shared/components/ai/AiAnalyticsView.js +878 -417
- package/dist/shared/components/ai/AiPlanCard.js +164 -122
- package/dist/shared/components/ai/AiPlanUndo.js +291 -0
- package/dist/shared/components/ai/call-log/CallDrawer.js +357 -0
- package/dist/shared/components/ai/call-log/RawJson.js +126 -0
- package/dist/shared/components/ai/call-log/ThreadView.js +223 -0
- package/dist/shared/components/ai/call-log/TranscriptView.js +227 -0
- package/dist/shared/components/ai/call-log/controls.js +364 -0
- package/dist/shared/components/ai/call-log/format.js +46 -0
- package/dist/shared/components/ai/call-log/url.js +105 -0
- package/dist/shared/components/chat/ChatPanel.js +86 -86
- package/dist/shared/components/chat/chat-core.js +422 -346
- package/dist/shared/components/integrations/IntegrationObligationsView.js +98 -98
- package/dist/shared/components/integrations/RecordIntegrationPreview.js +102 -93
- package/dist/shared/components/integrations/console/api.js +11 -1
- package/dist/shared/components/item-edit/HeaderRollupExplainer.js +5 -1
- package/dist/shared/components/item-edit/RecordLiveSync.js +241 -229
- package/dist/shared/components/item-edit/RecordRecapChanges.js +166 -0
- package/dist/shared/components/item-edit/RecordRecapStrip.js +254 -84
- package/dist/shared/components/item-edit/live-related.js +34 -18
- package/dist/shared/components/panels/RevisionsPanel.js +735 -683
- package/dist/shared/components/queue/QueueWorklist.js +323 -316
- package/dist/shared/components/support/SupportRequestDialog.js +198 -181
- package/dist/shared/components/trackers/use-tracker-link.js +74 -65
- package/dist/shared/lib/config-update-refresh.js +34 -0
- package/dist/shared/lib/config-watch.js +17 -17
- package/dist/shared/lib/gap-refresh.js +49 -0
- package/dist/shared/lib/integration-dots.js +8 -8
- package/dist/shared/lib/live-ops.js +26 -23
- package/dist/shared/lib/live-pickers.js +1 -1
- package/dist/shared/lib/live-queries.js +223 -195
- package/dist/shared/lib/live.js +56 -51
- package/dist/shared/lib/obligation-banner.js +11 -10
- package/dist/shared/lib/obligation-filters.js +22 -18
- package/dist/shared/lib/obligation-reason-text.js +18 -8
- package/dist/shared/lib/presence-hooks.js +133 -132
- package/dist/shared/lib/reconnect-resync.js +90 -0
- package/dist/shared/lib/record-room-holds.js +43 -0
- package/dist/shared/lib/socket-realtime.js +116 -105
- package/dist/shared/lib/user-sync.js +1 -6
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as d, Fragment as Ce, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { useSensors as
|
|
2
|
+
import { useSensors as Is, useSensor as Js, PointerSensor as Ys, DndContext as zs, closestCenter as Xs } from "@dnd-kit/core";
|
|
3
3
|
import { SortableContext as Zs, verticalListSortingStrategy as ei, arrayMove as ti, useSortable as ni } from "@dnd-kit/sortable";
|
|
4
4
|
import { CSS as ri } from "@dnd-kit/utilities";
|
|
5
5
|
import { useQueryClient as ai, useQuery as ne, useMutation as Qe, useQueries as nt } from "@tanstack/react-query";
|
|
@@ -7,103 +7,104 @@ import { AlertTriangle as oi, RefreshCw as li, Plus as qn, ChevronDown as Vo, Fi
|
|
|
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 dl, useItemEditAuth as
|
|
10
|
+
import { useNivaroClient as dl, useItemEditAuth as Ho, useItemNavigation as Si, useNavigation as Ci, useOverlayState as $i } from "../../context.js";
|
|
11
11
|
import { useDebounced as Ri } from "../../hooks/useDebounced.js";
|
|
12
12
|
import { useElapsedLoading as Ti } from "../../hooks/useElapsedLoading.js";
|
|
13
13
|
import { useSlowReason as Li } from "../../hooks/useSlowReason.js";
|
|
14
14
|
import { useBulkProgressFeed as Oi } from "../../lib/bulk-progress.js";
|
|
15
|
-
import { get as D, post as ge, patch as
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
15
|
+
import { get as D, post as ge, patch as Io, del as Er, put as Fi } from "../../lib/commands.js";
|
|
16
|
+
import { useConfigUpdateRefresh as Ai } from "../../lib/config-update-refresh.js";
|
|
17
|
+
import { useDeadlineNow as qi, liveDeadlineStatus as Ei, dueInText as Pi } from "../../lib/deadline-ticker.js";
|
|
18
|
+
import { deepenForLightSurface as Ki } from "../../lib/display-prefs.js";
|
|
19
|
+
import { evaluateExpression as Di } from "../../lib/expression.js";
|
|
20
|
+
import { clauseFromControlValue as Mi, filterSentence as Bi } from "../../lib/filter-sentence.js";
|
|
21
|
+
import { releaseLiveOwner as ji, deliverLive as Qi } from "../../lib/focus-mode.js";
|
|
21
22
|
import { formatMultiValue as rt } from "../../lib/format-value.js";
|
|
22
23
|
import { QUEUE_IN_STEP_COLUMN as Pr, queueServerSort as Kr } from "../../lib/in-step.js";
|
|
23
|
-
import { createCursorBook as
|
|
24
|
-
import { normalizeInlineEdit as
|
|
25
|
-
import { sanitizeQueueLinkState as
|
|
26
|
-
import { arrivedByListReturn as
|
|
27
|
-
import { peekListAway as
|
|
28
|
-
import { useLiveEvent as
|
|
29
|
-
import { useSteadyGroups as
|
|
30
|
-
import { useRowChanges as
|
|
31
|
-
import { useLiveBurst as
|
|
32
|
-
import { listTrailDetail as
|
|
33
|
-
import { OPEN_IN_TABS_CAP as
|
|
34
|
-
import { isOwnWrite as
|
|
35
|
-
import { usePrefetchIntent as
|
|
36
|
-
import { useRowPresence as
|
|
37
|
-
import { queryKeys as
|
|
38
|
-
import { buildGroups as
|
|
39
|
-
import { cascadeFilter as
|
|
40
|
-
import { useOptionalRealtime as
|
|
24
|
+
import { createCursorBook as Ui, pageRequest as Vi, noteNextCursor as Gi } from "../../lib/keyset-pager.js";
|
|
25
|
+
import { normalizeInlineEdit as Wi, inlineM2oTarget as Hi, inlineChoices as Ii, inlineEditFor as Ji, nextInlineKey as Yi } from "../../lib/list-inline-edit.js";
|
|
26
|
+
import { sanitizeQueueLinkState as zi, readListLinkFromLocation as Xi, dropListLinkParam as Zi, encodeListLink as ec, replaceListLinkParam as tc } from "../../lib/list-link.js";
|
|
27
|
+
import { arrivedByListReturn as nc, historyKey as rc, ensureHistoryKey as Jo } from "../../lib/list-page-memory.js";
|
|
28
|
+
import { peekListAway as ac, planListReturn as Yo, takeListAway as oc, standbyListAway as lc, returnRowFor as sc, markReturnRow as ic, noteListOpen as cc } from "../../lib/list-return.js";
|
|
29
|
+
import { useLiveEvent as dc, expandCoalesced as uc, LIVE_ASPECTS as at } from "../../lib/live.js";
|
|
30
|
+
import { useSteadyGroups as mc, useRowGlide as pc, movingRowTitle as fc } from "../../lib/live-groups.js";
|
|
31
|
+
import { useRowChanges as bc, useRowLocksByCollection as zo, lockLabel as hc } from "../../lib/live-list.js";
|
|
32
|
+
import { useLiveBurst as yc, useLivePause as gc, useSteadyRows as xc, GONE_ROW_CLASS as kc, GONE_ROW_TITLE as vc, resumeAsRefetch as wc } from "../../lib/live-list-flow.js";
|
|
33
|
+
import { listTrailDetail as _c, setTrailDetail as Nc } from "../../lib/nav-trail.js";
|
|
34
|
+
import { OPEN_IN_TABS_CAP as Sc, openInTabs as Cc, openInTabsMessage as Xo } from "../../lib/open-in-tabs.js";
|
|
35
|
+
import { isOwnWrite as $c } from "../../lib/own-writes.js";
|
|
36
|
+
import { usePrefetchIntent as Rc } from "../../lib/prefetch.js";
|
|
37
|
+
import { useRowPresence as Tc, rowPresenceKey as Zo } from "../../lib/presence-hooks.js";
|
|
38
|
+
import { queryKeys as Lc } from "../../lib/query-keys.js";
|
|
39
|
+
import { buildGroups as Oc } from "../../lib/queue-grouping.js";
|
|
40
|
+
import { cascadeFilter as Fc, fetchCascadeRelations as Ac } from "../../lib/quick-filter-cascade.js";
|
|
41
|
+
import { useOptionalRealtime as qc } from "../../lib/realtime.js";
|
|
41
42
|
import { copyIdText as el } from "../../lib/record-ref.js";
|
|
42
|
-
import { rowHighlightTextClass as
|
|
43
|
+
import { rowHighlightTextClass as Ec, rowHighlightClass as Pc } from "../../lib/row-highlight.js";
|
|
43
44
|
import { userErrorMessage as Ct } from "../../lib/safe-error.js";
|
|
44
|
-
import { useSelectionPicks as
|
|
45
|
-
import { listViewInput as
|
|
46
|
-
import { useTableDensity as
|
|
47
|
-
import { useMyScopes as
|
|
48
|
-
import { useNewItemLayouts as
|
|
49
|
-
import { formatNumber as ae, cn as F, formatDateTime as tl, titleCase as Mr, humanHours as
|
|
50
|
-
import { usePublishAskContext as
|
|
51
|
-
import { useBuiltinGate as
|
|
52
|
-
import { BulkCompareButton as
|
|
53
|
-
import { BulkFieldUpdateButton as
|
|
54
|
-
import { BulkRowMark as
|
|
55
|
-
import { BulkSelectionNotices as
|
|
56
|
-
import { BulkMessageButton as
|
|
57
|
-
import { compareCell as
|
|
58
|
-
import { ColumnHeaderMenu as
|
|
59
|
-
import { loadTotalOverridesAt as nl, shownTotals as
|
|
60
|
-
import { DataTable as
|
|
61
|
-
import { EmptyState as
|
|
62
|
-
import { FocusModeToggle as
|
|
63
|
-
import { FulfilmentPill as
|
|
64
|
-
import { InStepCell as
|
|
65
|
-
import { ImportFromFileButton as
|
|
66
|
-
import { IntegrationDots as
|
|
67
|
-
import { IntegrationsFilterPill as
|
|
68
|
-
import { readQueueReturn as
|
|
69
|
-
import { ListLoadError as
|
|
45
|
+
import { useSelectionPicks as Kc, splitSelKey as Dr, useSelectionLiveMarks as Dc, useSelectionChanges as Mc, useSelectedRowMemory as Bc, selectionSums as jc } from "../../lib/selection-watch.js";
|
|
46
|
+
import { listViewInput as Qc } from "../../lib/send-view.js";
|
|
47
|
+
import { useTableDensity as Uc } from "../../lib/table-density.js";
|
|
48
|
+
import { useMyScopes as Vc, matchScopeDimension as Gc } from "../../lib/use-my-scopes.js";
|
|
49
|
+
import { useNewItemLayouts as Wc } from "../../lib/use-new-item-layouts.js";
|
|
50
|
+
import { formatNumber as ae, cn as F, formatDateTime as tl, titleCase as Mr, humanHours as Hc, formatRelative as Ic, formatDate as Jc } from "../../lib/utils.js";
|
|
51
|
+
import { usePublishAskContext as Yc, useAskRecordDrag as zc } from "../ai/ask-context.js";
|
|
52
|
+
import { useBuiltinGate as Xc, BulkActionButtons as Zc } from "../bulk/BulkActionButtons.js";
|
|
53
|
+
import { BulkCompareButton as ed } from "../bulk/BulkCompareButton.js";
|
|
54
|
+
import { BulkFieldUpdateButton as td } from "../bulk/BulkFieldUpdateButton.js";
|
|
55
|
+
import { BulkRowMark as nd } from "../bulk/BulkRowMark.js";
|
|
56
|
+
import { BulkSelectionNotices as rd, SelectionFigures as ad } from "../bulk/BulkSelectionNotices.js";
|
|
57
|
+
import { BulkMessageButton as od } from "../bulk/MessageStakeholders.js";
|
|
58
|
+
import { compareCell as ld, RowActionsMenu as sd, roleMayUpdate as id } from "../CollectionBrowserView.js";
|
|
59
|
+
import { ColumnHeaderMenu as cd } from "../cbv/ColumnHeaderMenu.js";
|
|
60
|
+
import { loadTotalOverridesAt as nl, shownTotals as dd, overridesAfterSave as ud, rememberTotalOverridesAt as rl, formatTotal as al, isTotalFn as md, setOverride as pd } from "../cbv/column-totals.js";
|
|
61
|
+
import { DataTable as fd } from "../DataTable.js";
|
|
62
|
+
import { EmptyState as bd } from "../EmptyState.js";
|
|
63
|
+
import { FocusModeToggle as hd } from "../FocusModeToggle.js";
|
|
64
|
+
import { FulfilmentPill as yd, FULFILMENT_FILTER_OPTIONS as gd } from "../FulfilmentPill.js";
|
|
65
|
+
import { InStepCell as xd } from "../InStep.js";
|
|
66
|
+
import { ImportFromFileButton as kd } from "../import/ImportFromFileButton.js";
|
|
67
|
+
import { IntegrationDots as vd, INTEGRATIONS_FILTER_OPTIONS as wd } from "../integrations/IntegrationDots.js";
|
|
68
|
+
import { IntegrationsFilterPill as _d } from "../integrations/IntegrationsFilterPill.js";
|
|
69
|
+
import { readQueueReturn as Nd, queueReturnApplies as Sd, writeQueueReturn as ol } from "../item-edit/QueueReturnChip.js";
|
|
70
|
+
import { ListLoadError as Cd } from "../ListLoadError.js";
|
|
70
71
|
import { LiveCount as Br } from "../LiveCount.js";
|
|
71
|
-
import { LivePauseButton as
|
|
72
|
-
import { LiveRowMark as
|
|
73
|
-
import { CopyListLinkButton as
|
|
74
|
-
import { useInlineEdit as
|
|
72
|
+
import { LivePauseButton as $d, LiveBurstPill as Rd } from "../LiveListControls.js";
|
|
73
|
+
import { LiveRowMark as Td, MovingRowChip as Ld } from "../LiveRowMark.js";
|
|
74
|
+
import { CopyListLinkButton as Od } from "../list/CopyListLinkButton.js";
|
|
75
|
+
import { useInlineEdit as Fd, InlineEditCell as Ad } from "../list/InlineEdit.js";
|
|
75
76
|
import { ListViewers as ll } from "../list/ListViewers.js";
|
|
76
|
-
import { OverflowRail as
|
|
77
|
-
import { usePickerExcludedRows as
|
|
78
|
-
import { RealtimeStaleMark as
|
|
79
|
-
import { RecordDrilldownSheet as
|
|
80
|
-
import { RowHighlightLegend as
|
|
81
|
-
import { RowPresence as
|
|
82
|
-
import { SendViewButton as
|
|
83
|
-
import { UnseenDot as
|
|
84
|
-
import { Badge as
|
|
77
|
+
import { OverflowRail as qd } from "../OverflowRail.js";
|
|
78
|
+
import { usePickerExcludedRows as Ed, PICKER_EXCLUDED_ROW_CLASS as Pd, PICKER_EXCLUDED_TITLE as Kd } from "../PickerExcludedRows.js";
|
|
79
|
+
import { RealtimeStaleMark as Dd } from "../RealtimeStatusBanner.js";
|
|
80
|
+
import { RecordDrilldownSheet as Md } from "../RecordDrilldownSheet.js";
|
|
81
|
+
import { RowHighlightLegend as Bd } from "../RowHighlightLegend.js";
|
|
82
|
+
import { RowPresence as jd } from "../RowPresence.js";
|
|
83
|
+
import { SendViewButton as Qd } from "../send-view/SendViewButton.js";
|
|
84
|
+
import { UnseenDot as Ud } from "../UnseenDot.js";
|
|
85
|
+
import { Badge as Vd } from "../ui/badge.js";
|
|
85
86
|
import { Checkbox as Ur } from "../ui/checkbox.js";
|
|
86
|
-
import { Command as sl, CommandInput as
|
|
87
|
-
import { Label as
|
|
87
|
+
import { Command as sl, CommandInput as Gd, CommandList as il, CommandEmpty as Wd, CommandItem as sn } from "../ui/command.js";
|
|
88
|
+
import { Label as Hd } from "../ui/label.js";
|
|
88
89
|
import { Popover as $t, PopoverTrigger as Rt, PopoverContent as Tt } from "../ui/popover.js";
|
|
89
90
|
import { Skeleton as ul } from "../ui/skeleton.js";
|
|
90
91
|
import { dedupeChooserKeys as Id } from "./column-chooser.js";
|
|
91
|
-
import { groupSumPathsFor as
|
|
92
|
-
import { offscreenPill as
|
|
93
|
-
import { OwnerAvatars as
|
|
94
|
-
import { pathHeader as
|
|
95
|
-
import { QueueBulkBar as
|
|
96
|
-
import { QueueBulkMove as
|
|
97
|
-
import { QueueItemSheet as
|
|
98
|
-
import { QueueKanbanBoard as
|
|
99
|
-
import { QueueQuickFilters as
|
|
100
|
-
import { QueueTeamStrip as
|
|
101
|
-
import { QueueWorkloadView as
|
|
102
|
-
import { queueTotalColumns as
|
|
103
|
-
import { useTransitionNote as
|
|
104
|
-
import { worklistCsv as
|
|
105
|
-
import { extraChoiceText as cn, formulaColumnKeys as
|
|
106
|
-
function
|
|
92
|
+
import { groupSumPathsFor as Jd } from "./group-sums.js";
|
|
93
|
+
import { offscreenPill as Yd, statsOutrunRows as zd, stateAspectEffect as Xd } from "./live-state-aspect.js";
|
|
94
|
+
import { OwnerAvatars as Zd } from "./OwnerAvatars.js";
|
|
95
|
+
import { pathHeader as eu } from "./path-label.js";
|
|
96
|
+
import { QueueBulkBar as tu } from "./QueueBulkBar.js";
|
|
97
|
+
import { QueueBulkMove as nu } from "./QueueBulkMove.js";
|
|
98
|
+
import { QueueItemSheet as ru } from "./QueueItemSheet.js";
|
|
99
|
+
import { QueueKanbanBoard as au } from "./QueueKanbanBoard.js";
|
|
100
|
+
import { QueueQuickFilters as ou } from "./QueueQuickFilters.js";
|
|
101
|
+
import { QueueTeamStrip as lu } from "./QueueTeamStrip.js";
|
|
102
|
+
import { QueueWorkloadView as su } from "./QueueWorkloadView.js";
|
|
103
|
+
import { queueTotalColumns as iu, queueTotalPaths as cu, queueTotalValue as du, formulaTotalFormat as uu, queueTotalTip as mu, queueTotalsEligibleKey as jr, queueTotalsStoreKey as En, queueTotalsSupport as pu } from "./queue-totals.js";
|
|
104
|
+
import { useTransitionNote as fu, needsTransitionNote as bu } from "./transition-note.js";
|
|
105
|
+
import { worklistCsv as hu, worklistCsvName as yu } from "./worklist-csv.js";
|
|
106
|
+
import { extraChoiceText as cn, formulaColumnKeys as gu, atRiskBreakdown as cl, queuePinKeepRank as xu, worklistKeyTarget as ku } from "./worklist-helpers.js";
|
|
107
|
+
function vu({ summary: l }) {
|
|
107
108
|
if (!l || l.count === 0)
|
|
108
109
|
return /* @__PURE__ */ a("span", { className: "text-slate-300 dark:text-muted-foreground", children: "—" });
|
|
109
110
|
const S = [l.last_from, l.last_to].filter(Boolean).join(" → "), q = [
|
|
@@ -130,15 +131,15 @@ function ku({ summary: l }) {
|
|
|
130
131
|
}
|
|
131
132
|
);
|
|
132
133
|
}
|
|
133
|
-
const
|
|
134
|
+
const wu = 50, _u = [], Lt = "nivaro_addendums", Qr = [
|
|
134
135
|
{ value: "mine", label: "My Items" },
|
|
135
136
|
{ value: "unowned", label: "No Owners" },
|
|
136
137
|
{ value: "claimed", label: "Claimed by me" },
|
|
137
138
|
{ value: "all", label: "All Items" }
|
|
138
139
|
];
|
|
139
|
-
function
|
|
140
|
+
function Nu({ summary: l }) {
|
|
140
141
|
if (!l || l.total === 0) return /* @__PURE__ */ a("span", { className: "text-slate-300", children: "—" });
|
|
141
|
-
const S = l.active > 0, q = l.latest_status === "review" ? "in review" : l.latest_status ?? "active", M = l.cost_impact,
|
|
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;
|
|
142
143
|
return /* @__PURE__ */ d(
|
|
143
144
|
"span",
|
|
144
145
|
{
|
|
@@ -159,25 +160,25 @@ function _u({ summary: l }) {
|
|
|
159
160
|
}
|
|
160
161
|
),
|
|
161
162
|
S ? `${l.active} ${l.active === 1 ? "addendum" : "addendums"} ${q}` : `${l.total} ${q}`,
|
|
162
|
-
|
|
163
|
+
I && /* @__PURE__ */ d("span", { className: "tabular-nums opacity-80", children: [
|
|
163
164
|
"· ",
|
|
164
|
-
|
|
165
|
+
I
|
|
165
166
|
] })
|
|
166
167
|
]
|
|
167
168
|
}
|
|
168
169
|
);
|
|
169
170
|
}
|
|
170
|
-
function
|
|
171
|
-
return
|
|
171
|
+
function Su(l) {
|
|
172
|
+
return Hc(l);
|
|
172
173
|
}
|
|
173
|
-
function
|
|
174
|
+
function Cu({
|
|
174
175
|
status: l,
|
|
175
176
|
warningAt: S,
|
|
176
177
|
dueAt: q
|
|
177
178
|
}) {
|
|
178
|
-
const M = { warning_at: S ?? null, due_at: q ?? null },
|
|
179
|
+
const M = { warning_at: S ?? null, due_at: q ?? null }, I = !!l && !!q, B = qi(I), y = I ? Ei(M, B) : null, f = y ? y === "on_track" ? "ok" : y : l;
|
|
179
180
|
if (!f) return /* @__PURE__ */ a("span", { className: "text-slate-300", children: "—" });
|
|
180
|
-
const z =
|
|
181
|
+
const z = I ? Pi(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";
|
|
181
182
|
return /* @__PURE__ */ a(
|
|
182
183
|
"span",
|
|
183
184
|
{
|
|
@@ -191,9 +192,9 @@ function Su({
|
|
|
191
192
|
}
|
|
192
193
|
);
|
|
193
194
|
}
|
|
194
|
-
function
|
|
195
|
+
function $u({ points: l, inline: S = !1 }) {
|
|
195
196
|
if (l.length < 2) return null;
|
|
196
|
-
const q = S ? 40 : 64, M = S ? 14 : 18,
|
|
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(
|
|
197
198
|
(Q, $e) => `${$e === 0 ? "M" : "L"}${($e * f).toFixed(1)},${(M - 2 - (Q - B) / y * (M - 4)).toFixed(1)}`
|
|
198
199
|
).join(" ");
|
|
199
200
|
return /* @__PURE__ */ a(
|
|
@@ -212,7 +213,7 @@ function dn({
|
|
|
212
213
|
count: S,
|
|
213
214
|
filteredCount: q,
|
|
214
215
|
active: M,
|
|
215
|
-
isLoading:
|
|
216
|
+
isLoading: I,
|
|
216
217
|
tone: B,
|
|
217
218
|
trend: y,
|
|
218
219
|
delta: f,
|
|
@@ -237,7 +238,7 @@ function dn({
|
|
|
237
238
|
"grow justify-center sm:justify-start",
|
|
238
239
|
M && "bg-nvr-cyan/5 ring-1 ring-inset ring-nvr-cyan dark:bg-nvr-cyan/10"
|
|
239
240
|
),
|
|
240
|
-
children:
|
|
241
|
+
children: I ? /* @__PURE__ */ a(ul, { className: "h-5 w-16 rounded" }) : /* @__PURE__ */ d(Ce, { children: [
|
|
241
242
|
/* @__PURE__ */ a(
|
|
242
243
|
"span",
|
|
243
244
|
{
|
|
@@ -285,17 +286,17 @@ function dn({
|
|
|
285
286
|
]
|
|
286
287
|
}
|
|
287
288
|
),
|
|
288
|
-
y && S > 0 && /* @__PURE__ */ a(
|
|
289
|
+
y && S > 0 && /* @__PURE__ */ a($u, { points: y, inline: !0 })
|
|
289
290
|
] })
|
|
290
291
|
}
|
|
291
292
|
);
|
|
292
293
|
}
|
|
293
|
-
function
|
|
294
|
+
function Ru({
|
|
294
295
|
label: l,
|
|
295
296
|
count: S,
|
|
296
297
|
filteredCount: q,
|
|
297
298
|
color: M,
|
|
298
|
-
active:
|
|
299
|
+
active: I,
|
|
299
300
|
onClick: B
|
|
300
301
|
}) {
|
|
301
302
|
return /* @__PURE__ */ d(
|
|
@@ -305,7 +306,7 @@ function $u({
|
|
|
305
306
|
onClick: B,
|
|
306
307
|
className: F(
|
|
307
308
|
"flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-[12px] font-medium transition-colors",
|
|
308
|
-
|
|
309
|
+
I ? "border-nvr-cyan bg-nvr-cyan/10 text-nvr-navy dark:text-nvr-cyan" : "border-slate-200 bg-white text-slate-600 hover:border-slate-300 hover:bg-slate-50 dark:border-border dark:bg-card dark:text-slate-300"
|
|
309
310
|
),
|
|
310
311
|
children: [
|
|
311
312
|
/* @__PURE__ */ a(
|
|
@@ -327,14 +328,14 @@ function $u({
|
|
|
327
328
|
}
|
|
328
329
|
);
|
|
329
330
|
}
|
|
330
|
-
const Ue =
|
|
331
|
-
function
|
|
331
|
+
const Ue = eu;
|
|
332
|
+
function Tu({
|
|
332
333
|
id: l,
|
|
333
334
|
label: S,
|
|
334
335
|
checked: q,
|
|
335
336
|
onCheckedChange: M
|
|
336
337
|
}) {
|
|
337
|
-
const { attributes:
|
|
338
|
+
const { attributes: I, listeners: B, setNodeRef: y, transform: f, transition: z, isDragging: Q } = ni({
|
|
338
339
|
id: l
|
|
339
340
|
}), $e = {
|
|
340
341
|
transform: ri.Transform.toString(f),
|
|
@@ -345,49 +346,55 @@ function Ru({
|
|
|
345
346
|
/* @__PURE__ */ a(
|
|
346
347
|
"span",
|
|
347
348
|
{
|
|
348
|
-
...
|
|
349
|
+
...I,
|
|
349
350
|
...B,
|
|
350
351
|
className: "cursor-grab text-slate-300 hover:text-slate-500 dark:text-muted-foreground",
|
|
351
352
|
children: /* @__PURE__ */ a(Ni, { className: "h-3.5 w-3.5" })
|
|
352
353
|
}
|
|
353
354
|
),
|
|
354
355
|
/* @__PURE__ */ a(Ur, { id: b, checked: q, onCheckedChange: M }),
|
|
355
|
-
/* @__PURE__ */ a(
|
|
356
|
+
/* @__PURE__ */ a(Hd, { htmlFor: b, className: "cursor-pointer text-[12px] font-normal", children: S })
|
|
356
357
|
] });
|
|
357
358
|
}
|
|
358
|
-
function
|
|
359
|
+
function Ap({
|
|
359
360
|
queueId: l,
|
|
360
361
|
realtime: S,
|
|
361
362
|
renderError: q,
|
|
362
363
|
hideCreateActions: M = !1,
|
|
363
|
-
viewersInHeader:
|
|
364
|
+
viewersInHeader: I = !1,
|
|
364
365
|
onAsk: B
|
|
365
366
|
}) {
|
|
366
367
|
var No, So, Co, $o, Ro, To, Lo, Oo, Fo, Ao, qo, Eo, Po, Ko, Do, Mo, Bo, jo, Qo, Uo;
|
|
367
|
-
const y = ai(), f = dl(), { userId: z } =
|
|
368
|
+
const y = ai(), f = dl(), { userId: z } = Ho(), Q = Si(), { navigate: $e } = Ci(), [b, me] = N("all"), [se, j] = N(1), Vr = O(Ui()), [Ot, ml] = Uc(), [C, ot] = N("table"), [U, lt] = N(""), [x, V] = N({}), [Ft, Gr] = N(() => /* @__PURE__ */ new Set()), [R, At] = N(null), [xe, Pn] = N(/* @__PURE__ */ new Set()), [qt, Kn] = N(null), [st, Dn] = N(null), [Wr, un] = N({}), [Hr, Mn] = N(
|
|
368
369
|
() => nl(En(l), jr)
|
|
369
|
-
),
|
|
370
|
-
|
|
370
|
+
), Ir = O(l);
|
|
371
|
+
Ir.current !== l && (Ir.current = l, Mn(nl(En(l), jr)), un({}));
|
|
371
372
|
const it = W(
|
|
372
|
-
() =>
|
|
373
|
-
[Wr,
|
|
373
|
+
() => dd(Wr, Hr),
|
|
374
|
+
[Wr, Hr]
|
|
374
375
|
), pl = (e, t) => Mn((n) => {
|
|
375
|
-
const r =
|
|
376
|
+
const r = pd(n, e, t);
|
|
376
377
|
return rl(En(l), r), r;
|
|
377
|
-
}), [Bn, mn] = N(0), jn = O(0), be =
|
|
378
|
+
}), [Bn, mn] = N(0), jn = O(0), be = bc(), ct = qc(), Qn = O({}).current, Jr = O(/* @__PURE__ */ new Set()), [Yr, fl] = N(0), [zr, bl] = N(0), he = O(!1), Et = O(null), Pt = O([]), Xr = O(null), Un = O(!1), Vn = O(0), Gn = O("table");
|
|
378
379
|
Gn.current = C;
|
|
379
380
|
const Wn = O(!1);
|
|
380
381
|
Wn.current = C === "table" && !!R;
|
|
381
|
-
const Kt =
|
|
382
|
+
const Kt = yc(), Dt = O(Kt);
|
|
382
383
|
Dt.current = Kt;
|
|
383
|
-
const pn = O(null), Ke =
|
|
384
|
-
if (!
|
|
384
|
+
const pn = O(null), Ke = gc(l ? `queue:${l}` : null, (e) => {
|
|
385
|
+
if (!wc(e) && pn.current) return pn.current(e);
|
|
385
386
|
Ta();
|
|
386
|
-
}),
|
|
387
|
+
}), Hn = Ke.gate, fn = 25, { data: s, error: bn } = ne({
|
|
387
388
|
queryKey: ["queue-meta", l],
|
|
388
389
|
queryFn: () => f.request(D(`/queues/${l}`)).then((e) => e.data),
|
|
389
390
|
enabled: !!l
|
|
390
|
-
})
|
|
391
|
+
});
|
|
392
|
+
Ai(
|
|
393
|
+
((s == null ? void 0 : s.sources) ?? []).map((e) => e.collection),
|
|
394
|
+
[["queue-meta", l]],
|
|
395
|
+
{ enabled: !!l }
|
|
396
|
+
);
|
|
397
|
+
const { scopes: hn, ready: Zr } = Vc(), ea = O(!1), [ta, na] = N(!1), [Re, hl] = N({}), ke = O({});
|
|
391
398
|
P(() => {
|
|
392
399
|
if (ea.current || !Zr || !s) return;
|
|
393
400
|
ea.current = !0;
|
|
@@ -414,7 +421,7 @@ function Op({
|
|
|
414
421
|
];
|
|
415
422
|
};
|
|
416
423
|
for (const o of e) {
|
|
417
|
-
const c =
|
|
424
|
+
const c = Gc(hn, { collection: o.target_collection });
|
|
418
425
|
if (!c) continue;
|
|
419
426
|
const u = `extra.${o.path}`;
|
|
420
427
|
try {
|
|
@@ -442,9 +449,9 @@ function Op({
|
|
|
442
449
|
for (const n of (s == null ? void 0 : s.sources) ?? [])
|
|
443
450
|
n.type !== "collection" || !n.collection || e.has(n.collection) || (e.add(n.collection), t.push(n.collection));
|
|
444
451
|
return t;
|
|
445
|
-
}, [s == null ? void 0 : s.sources]), yn =
|
|
452
|
+
}, [s == null ? void 0 : s.sources]), yn = Wc(
|
|
446
453
|
pe.length === 1 ? pe[0] : null
|
|
447
|
-
),
|
|
454
|
+
), In = 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"], yl = (p == null ? void 0 : p.work_next) !== !1, gn = (p == null ? void 0 : p.bulk_actions) !== !1, Ge = Xc(
|
|
448
455
|
[
|
|
449
456
|
...new Set(
|
|
450
457
|
((s == null ? void 0 : s.sources) ?? []).filter((e) => e.type === "collection" && e.collection).map((e) => e.collection)
|
|
@@ -490,7 +497,7 @@ function Op({
|
|
|
490
497
|
const h = ($) => {
|
|
491
498
|
let w = !1, Z = 0, de = !1;
|
|
492
499
|
const Se = $.flatMap(
|
|
493
|
-
(_) => _ ?
|
|
500
|
+
(_) => _ ? uc(_) : [_]
|
|
494
501
|
), ue = (_) => {
|
|
495
502
|
var le;
|
|
496
503
|
return !!_ && !_.action && !!((le = _.changed_fields) != null && le.length) && _.changed_fields.every((St) => St.startsWith("$"));
|
|
@@ -504,7 +511,7 @@ function Op({
|
|
|
504
511
|
if (An && !ue(_)) continue;
|
|
505
512
|
if (_ && !_.action && (le != null && le.length) && le.every((je) => je.startsWith("$"))) {
|
|
506
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) && fl((je) => je + 1), le.includes(at.sla) && (de = !0), le.includes(at.owners) && Ar && (w = !0), le.includes(at.state)) {
|
|
507
|
-
const je =
|
|
514
|
+
const je = Xd(
|
|
508
515
|
Ar,
|
|
509
516
|
Gn.current === "kanban" || Wn.current
|
|
510
517
|
);
|
|
@@ -518,17 +525,17 @@ function Op({
|
|
|
518
525
|
continue;
|
|
519
526
|
}
|
|
520
527
|
de = !0;
|
|
521
|
-
const
|
|
522
|
-
St && (Ar || (_ == null ? void 0 : _.action) === "create" || Gn.current === "kanban" || Wn.current) ? (w = !0,
|
|
528
|
+
const Hs = (_ == null ? void 0 : _.collection) != null && $c(_.collection, _.item);
|
|
529
|
+
St && (Ar || (_ == null ? void 0 : _.action) === "create" || Gn.current === "kanban" || Wn.current) ? (w = !0, Hs || Pt.current.push({ key: St, by: null })) : Z += 1;
|
|
523
530
|
}
|
|
524
531
|
Z > 0 && (jn.current += Z), w && m(), de && u();
|
|
525
|
-
}, T = ($) =>
|
|
532
|
+
}, T = ($) => Qi(Qn, $, h);
|
|
526
533
|
pn.current = T;
|
|
527
|
-
const v = e(t, ($) =>
|
|
534
|
+
const v = e(t, ($) => Hn([$ ?? {}], T));
|
|
528
535
|
return () => {
|
|
529
|
-
Et.current = null, v(), pn.current = null,
|
|
536
|
+
Et.current = null, v(), pn.current = null, ji(Qn), r && clearTimeout(r), o && clearTimeout(o), c && clearTimeout(c);
|
|
530
537
|
};
|
|
531
|
-
}, [ct, S, s == null ? void 0 : s.sources, y, l, z, Qn,
|
|
538
|
+
}, [ct, S, s == null ? void 0 : s.sources, y, l, z, Qn, Hn]), dc(
|
|
532
539
|
"owners:changed",
|
|
533
540
|
(e) => {
|
|
534
541
|
var t;
|
|
@@ -538,7 +545,7 @@ function Op({
|
|
|
538
545
|
},
|
|
539
546
|
{ debounceMs: 600 }
|
|
540
547
|
);
|
|
541
|
-
const ve = Ri(x, 350), xl = JSON.stringify(ve) === JSON.stringify(x), Jn = O(!1), ie = C === "table" && !!R, oa =
|
|
548
|
+
const ve = Ri(x, 350), xl = JSON.stringify(ve) === JSON.stringify(x), Jn = O(!1), ie = C === "table" && !!R, oa = Jd(s), kl = W(
|
|
542
549
|
() => {
|
|
543
550
|
var e;
|
|
544
551
|
return {
|
|
@@ -552,7 +559,7 @@ function Op({
|
|
|
552
559
|
};
|
|
553
560
|
},
|
|
554
561
|
[s]
|
|
555
|
-
), Mt = (e) =>
|
|
562
|
+
), Mt = (e) => pu(e, kl), ut = iu(it, Mt), la = C === "table" && !ie && ut.length > 0, Bt = la ? cu(ut, Mt) : [], Le = (() => {
|
|
556
563
|
const e = {};
|
|
557
564
|
for (const [t, n] of Object.entries(ve))
|
|
558
565
|
if (n) {
|
|
@@ -654,7 +661,7 @@ function Op({
|
|
|
654
661
|
).then(() => {
|
|
655
662
|
y.invalidateQueries({ queryKey: ["queue-items", l] }), y.invalidateQueries({ queryKey: ["queue-triage-labels", l] });
|
|
656
663
|
}).catch((n) => K.error(Ct(n, "Label failed")));
|
|
657
|
-
}, [Ol] = N(() =>
|
|
664
|
+
}, [Ol] = N(() => ac(`queue:${l}`)), [Fl, Al] = N(
|
|
658
665
|
() => Yo(Ol) !== "fresh"
|
|
659
666
|
), {
|
|
660
667
|
data: i,
|
|
@@ -677,7 +684,7 @@ function Op({
|
|
|
677
684
|
Bt.join(",")
|
|
678
685
|
],
|
|
679
686
|
queryFn: async () => {
|
|
680
|
-
const e = !ie && C === "table", t = JSON.stringify([l, b, U, Le, fn]), n = e ?
|
|
687
|
+
const e = !ie && C === "table", t = JSON.stringify([l, b, U, Le, fn]), n = e ? Vi(Vr.current, t, se, "").after : void 0, r = await f.request(
|
|
681
688
|
D(`/queues/${l}/items`, {
|
|
682
689
|
scope: b,
|
|
683
690
|
// Last State Change is Aging read the other way round: the newest
|
|
@@ -693,7 +700,7 @@ function Op({
|
|
|
693
700
|
...Bt.length ? { totals: Bt.join(",") } : {}
|
|
694
701
|
})
|
|
695
702
|
);
|
|
696
|
-
return n &&
|
|
703
|
+
return n && Gi(Vr.current, t, se, r.next_cursor), r;
|
|
697
704
|
},
|
|
698
705
|
// Wait for display_config AND scope seeding so the first fetch uses the
|
|
699
706
|
// configured defaults and already carries the viewer's restricted filters.
|
|
@@ -757,11 +764,11 @@ function Op({
|
|
|
757
764
|
const o = r.indexOf(":");
|
|
758
765
|
return { collection: r.slice(0, o), item: r.slice(o + 1) };
|
|
759
766
|
});
|
|
760
|
-
}, [ie, i == null ? void 0 : i.data, X, ee]), ya =
|
|
767
|
+
}, [ie, i == null ? void 0 : i.data, X, ee]), ya = Tc(Kl), kn = fu(), ga = Ti(jt && !he.current), Dl = Li({
|
|
761
768
|
pending: jt && !he.current,
|
|
762
769
|
request: l != null ? { method: "GET", url: `/queues/${l}/items` } : null,
|
|
763
770
|
noun: "items"
|
|
764
|
-
}), Ml =
|
|
771
|
+
}), Ml = Rc();
|
|
765
772
|
async function xa(e, t) {
|
|
766
773
|
var m;
|
|
767
774
|
const r = (await f.request(D(`/pipelines/instance/${e.collection}/${e.item_id}`))).data;
|
|
@@ -774,7 +781,7 @@ function Op({
|
|
|
774
781
|
);
|
|
775
782
|
if (!c) throw new Error("No transition available to move this item here");
|
|
776
783
|
let u = null;
|
|
777
|
-
if (
|
|
784
|
+
if (bu(c) && (u = await kn.ask(((m = c.label) == null ? void 0 : m.trim()) || "Move"), !u))
|
|
778
785
|
throw new Error("Not moved — this move needs a note");
|
|
779
786
|
await f.request(
|
|
780
787
|
ge(`/pipelines/instance/${e.collection}/${e.item_id}/transition`, {
|
|
@@ -793,7 +800,7 @@ function Op({
|
|
|
793
800
|
onError: (e) => {
|
|
794
801
|
K.error(Ct(e, "Failed to move item")), y.invalidateQueries({ queryKey: ["queue-items", l, b] });
|
|
795
802
|
}
|
|
796
|
-
}),
|
|
803
|
+
}), He = Qe({
|
|
797
804
|
mutationFn: (e) => f.request(
|
|
798
805
|
ge(`/queues/${l}/claim`, {
|
|
799
806
|
source_collection: e.collection,
|
|
@@ -842,7 +849,7 @@ function Op({
|
|
|
842
849
|
group_by: R,
|
|
843
850
|
group_key: e,
|
|
844
851
|
page: t,
|
|
845
|
-
limit:
|
|
852
|
+
limit: wu
|
|
846
853
|
})
|
|
847
854
|
).then((n) => ({ key: e, rows: n.data })),
|
|
848
855
|
enabled: !!i && ie,
|
|
@@ -860,7 +867,7 @@ function Op({
|
|
|
860
867
|
}, [Ql, wn.map((e) => `${e.key}\0${e.page}`).join("")]), Ul = new Set(
|
|
861
868
|
_n.flatMap((e, t) => e.isFetching ? [wn[t].key] : [])
|
|
862
869
|
), L = Fe ? [...nr.values()].flat() : (i == null ? void 0 : i.data) ?? [];
|
|
863
|
-
|
|
870
|
+
Yc(
|
|
864
871
|
l ? {
|
|
865
872
|
queue: {
|
|
866
873
|
id: l,
|
|
@@ -871,7 +878,7 @@ function Op({
|
|
|
871
878
|
}
|
|
872
879
|
} : null
|
|
873
880
|
);
|
|
874
|
-
const Vl =
|
|
881
|
+
const Vl = zc(), Ut = L.some((e) => e.fulfilment !== void 0), Vt = L.some((e) => e.send_backs !== void 0), { data: re, dataUpdatedAt: wa } = ne({
|
|
875
882
|
queryKey: ["queue-live-stats", l, b, ve, zr],
|
|
876
883
|
// The totals row ticks with the tiles (#13): the same read totals the whole result as the
|
|
877
884
|
// viewer (it reads every row for the stats already), coalesced by the stats tick.
|
|
@@ -891,14 +898,14 @@ function Op({
|
|
|
891
898
|
}), Gt = !!re && wa > ce, g = Gt ? re.stats : i == null ? void 0 : i.stats, J = Gt ? re.filtered_stats ?? null : (i == null ? void 0 : i.filtered_stats) ?? null, _a = Gt ? re.state_counts : i == null ? void 0 : i.state_counts;
|
|
892
899
|
P(() => {
|
|
893
900
|
if (!Gt) return;
|
|
894
|
-
const e = Vn.current > 0 || Un.current, t =
|
|
901
|
+
const e = Vn.current > 0 || Un.current, t = Yd({
|
|
895
902
|
pending: jn.current,
|
|
896
903
|
liveTotal: re.total,
|
|
897
904
|
rowsTotal: i == null ? void 0 : i.total,
|
|
898
905
|
// Only a table re-reads its rows quietly; the other views keep the pill.
|
|
899
906
|
busy: e || C !== "table"
|
|
900
907
|
});
|
|
901
|
-
jn.current = 0, t > 0 && mn((r) => r + t),
|
|
908
|
+
jn.current = 0, t > 0 && mn((r) => r + t), zd({
|
|
902
909
|
liveTotal: re.total,
|
|
903
910
|
rowsTotal: i == null ? void 0 : i.total,
|
|
904
911
|
// Grouped tables too (army 8 b08-N6): their headers count the whole set, and
|
|
@@ -915,10 +922,10 @@ function Op({
|
|
|
915
922
|
!x.aging_hours && rr && (Na.current = rr);
|
|
916
923
|
const Wt = x.aging_hours ? Na.current ?? (g == null ? void 0 : g.aging) : rr ?? (g == null ? void 0 : g.aging);
|
|
917
924
|
Jr.current = new Set(L.map((e) => `${e.collection}:${e.item_id}`));
|
|
918
|
-
const
|
|
925
|
+
const Ht = zo(
|
|
919
926
|
L.map((e) => ({ collection: e.collection, id: e.item_id })),
|
|
920
927
|
Yr
|
|
921
|
-
), Sa =
|
|
928
|
+
), Sa = xc(
|
|
922
929
|
L,
|
|
923
930
|
(e) => `${e.collection}:${e.item_id}`,
|
|
924
931
|
be.rootRef,
|
|
@@ -943,16 +950,16 @@ function Op({
|
|
|
943
950
|
}
|
|
944
951
|
Xr.current = e;
|
|
945
952
|
}, [ce]);
|
|
946
|
-
const ar = O(null),
|
|
953
|
+
const ar = O(null), It = [
|
|
947
954
|
...new Set(
|
|
948
955
|
((s == null ? void 0 : s.sources) ?? []).filter((e) => e.type === "collection" && e.collection).map((e) => e.collection)
|
|
949
956
|
)
|
|
950
957
|
].join(",");
|
|
951
958
|
P(() => {
|
|
952
|
-
if (!
|
|
953
|
-
const e =
|
|
954
|
-
return e && !ar.current && (ar.current = e),
|
|
955
|
-
}, [ct, l,
|
|
959
|
+
if (!It) return;
|
|
960
|
+
const e = oc(`queue:${l}`);
|
|
961
|
+
return e && !ar.current && (ar.current = e), lc(ct, `queue:${l}`, It.split(","));
|
|
962
|
+
}, [ct, l, It]), P(() => {
|
|
956
963
|
mn(0), Dt.current.clear();
|
|
957
964
|
}, [ce]);
|
|
958
965
|
function Ra() {
|
|
@@ -994,7 +1001,7 @@ function Op({
|
|
|
994
1001
|
],
|
|
995
1002
|
[s == null ? void 0 : s.sources]
|
|
996
1003
|
), { data: Gl } = ne({
|
|
997
|
-
queryKey:
|
|
1004
|
+
queryKey: Lc.collections(),
|
|
998
1005
|
queryFn: () => f.request(D("/collections")).then((e) => e.data),
|
|
999
1006
|
staleTime: 300 * 1e3
|
|
1000
1007
|
}), gt = nt({
|
|
@@ -1033,7 +1040,7 @@ function Op({
|
|
|
1033
1040
|
).then((t) => t.data ?? {}).catch(() => ({})),
|
|
1034
1041
|
staleTime: 3e4
|
|
1035
1042
|
}))
|
|
1036
|
-
}), Wl = Oa.map((e) => e.dataUpdatedAt).join(","),
|
|
1043
|
+
}), Wl = Oa.map((e) => e.dataUpdatedAt).join(","), Hl = W(() => {
|
|
1037
1044
|
const e = {};
|
|
1038
1045
|
return La.forEach((t, n) => {
|
|
1039
1046
|
var o;
|
|
@@ -1058,13 +1065,13 @@ function Op({
|
|
|
1058
1065
|
).then((t) => t.data ?? {}).catch(() => ({})),
|
|
1059
1066
|
staleTime: 3e4
|
|
1060
1067
|
}))
|
|
1061
|
-
}),
|
|
1068
|
+
}), Il = Fa.map((e) => e.dataUpdatedAt).join(","), Jl = W(() => {
|
|
1062
1069
|
const e = {};
|
|
1063
1070
|
return ir.forEach((t, n) => {
|
|
1064
1071
|
var r;
|
|
1065
1072
|
for (const [o, c] of Object.entries(((r = Fa[n]) == null ? void 0 : r.data) ?? {})) e[`${t}:${o}`] = c;
|
|
1066
1073
|
}), e;
|
|
1067
|
-
}, [
|
|
1074
|
+
}, [Il]), Aa = ir.length > 0, qa = nt({
|
|
1068
1075
|
queries: Yt.map((e) => ({
|
|
1069
1076
|
queryKey: ["queue-collection-risk-rules", e],
|
|
1070
1077
|
queryFn: () => f.request(
|
|
@@ -1112,7 +1119,7 @@ function Op({
|
|
|
1112
1119
|
const e = {};
|
|
1113
1120
|
for (const [t, n] of Object.entries(Be)) e[t] = n.label;
|
|
1114
1121
|
return e;
|
|
1115
|
-
}, [Be]), Pe = (e) => e ? e === "none" ? "No State" : cr[e] ?? Ka(e) : "—",
|
|
1122
|
+
}, [Be]), Pe = (e) => e ? e === "none" ? "No State" : cr[e] ?? Ka(e) : "—", Ie = (e) => {
|
|
1116
1123
|
if (e === Lt) return "Addendums";
|
|
1117
1124
|
const t = (Gl ?? []).find((n) => n.collection === e);
|
|
1118
1125
|
return (t == null ? void 0 : t.display_name) || (t == null ? void 0 : t.plural) || Ka(e);
|
|
@@ -1123,7 +1130,7 @@ function Op({
|
|
|
1123
1130
|
atRisk: e.at_risk,
|
|
1124
1131
|
count: e.count,
|
|
1125
1132
|
sums: e.sums ?? {}
|
|
1126
|
-
})) :
|
|
1133
|
+
})) : Oc(L, R).map((e) => ({ ...e, count: e.rows.length, sums: {} })) : null, [L, R, Fe, nr]), dr = O(null);
|
|
1127
1134
|
P(() => {
|
|
1128
1135
|
if (!R || !we) {
|
|
1129
1136
|
dr.current = null;
|
|
@@ -1164,7 +1171,7 @@ function Op({
|
|
|
1164
1171
|
if (s) {
|
|
1165
1172
|
if (e) {
|
|
1166
1173
|
const n = C === "table" && !ie, r = !L.some((o) => o.collection === Lt);
|
|
1167
|
-
|
|
1174
|
+
cc({
|
|
1168
1175
|
list: `queue:${l}`,
|
|
1169
1176
|
label: s.name,
|
|
1170
1177
|
rows: L.filter((o) => o.collection !== Lt).map((o) => ({ collection: o.collection, id: String(o.item_id) })),
|
|
@@ -1193,16 +1200,16 @@ function Op({
|
|
|
1193
1200
|
itemId: e.itemId,
|
|
1194
1201
|
layoutSlug: n ? (p == null ? void 0 : p.item_layout) ?? null : null
|
|
1195
1202
|
});
|
|
1196
|
-
}, [
|
|
1203
|
+
}, [H, Zt] = N(
|
|
1197
1204
|
null
|
|
1198
1205
|
);
|
|
1199
1206
|
P(() => {
|
|
1200
|
-
if (!
|
|
1207
|
+
if (!H) return;
|
|
1201
1208
|
const e = () => Zt(null);
|
|
1202
1209
|
return window.addEventListener("mousedown", e), window.addEventListener("scroll", e, !0), () => {
|
|
1203
1210
|
window.removeEventListener("mousedown", e), window.removeEventListener("scroll", e, !0);
|
|
1204
1211
|
};
|
|
1205
|
-
}, [
|
|
1212
|
+
}, [H]);
|
|
1206
1213
|
const fr = (e) => {
|
|
1207
1214
|
Xt(k(e));
|
|
1208
1215
|
const t = (p == null ? void 0 : p.row_click) ?? "preview";
|
|
@@ -1234,7 +1241,7 @@ function Op({
|
|
|
1234
1241
|
ur(!1), Ye(null), K.info("Nothing left to work on — queue clear!");
|
|
1235
1242
|
return;
|
|
1236
1243
|
}
|
|
1237
|
-
if (Xt(k(n)), Te && !n.claimed_by &&
|
|
1244
|
+
if (Xt(k(n)), Te && !n.claimed_by && He.mutate(n), (p == null ? void 0 : p.row_click) === "full") {
|
|
1238
1245
|
xt(n);
|
|
1239
1246
|
return;
|
|
1240
1247
|
}
|
|
@@ -1244,7 +1251,7 @@ function Op({
|
|
|
1244
1251
|
if (C !== "table") return;
|
|
1245
1252
|
function e(t) {
|
|
1246
1253
|
var o;
|
|
1247
|
-
if (t.metaKey || t.ctrlKey || t.altKey || !
|
|
1254
|
+
if (t.metaKey || t.ctrlKey || t.altKey || !ku(t.target)) return;
|
|
1248
1255
|
const n = zt ? _e.findIndex((c) => k(c) === zt) : -1, r = (c) => {
|
|
1249
1256
|
Xt(k(c));
|
|
1250
1257
|
const u = k(c), m = [...document.querySelectorAll("tr[data-row-key]")].find(
|
|
@@ -1263,11 +1270,11 @@ function Op({
|
|
|
1263
1270
|
} else if (t.key === "c" && n >= 0 && Te) {
|
|
1264
1271
|
t.preventDefault();
|
|
1265
1272
|
const c = _e[n];
|
|
1266
|
-
((o = c.claimed_by) == null ? void 0 : o.id) === z ? bt.mutate(c) :
|
|
1273
|
+
((o = c.claimed_by) == null ? void 0 : o.id) === z ? bt.mutate(c) : He.mutate(c);
|
|
1267
1274
|
} else t.key === "o" && n >= 0 && (t.preventDefault(), xt(_e[n]));
|
|
1268
1275
|
}
|
|
1269
1276
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
1270
|
-
}, [C, _e, zt, Je, z,
|
|
1277
|
+
}, [C, _e, zt, Je, z, He, bt, Te]);
|
|
1271
1278
|
const { data: E } = ne({
|
|
1272
1279
|
queryKey: ["queue-views", l],
|
|
1273
1280
|
queryFn: () => f.request(D(`/queues/${l}/views`)),
|
|
@@ -1279,7 +1286,7 @@ function Op({
|
|
|
1279
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), vn(t.columns ?? null), Dn(t.pins ?? null), un(
|
|
1280
1287
|
Object.fromEntries(
|
|
1281
1288
|
Object.entries(t.totals ?? {}).filter(
|
|
1282
|
-
([r, o]) => jr(r) &&
|
|
1289
|
+
([r, o]) => jr(r) && md(o)
|
|
1283
1290
|
)
|
|
1284
1291
|
)
|
|
1285
1292
|
), t.view && ot(Ve.includes(t.view) ? t.view : Ve[0]), j(1), ze(e.id);
|
|
@@ -1301,37 +1308,37 @@ function Op({
|
|
|
1301
1308
|
const Sn = O(null), Cn = O(null);
|
|
1302
1309
|
P(() => {
|
|
1303
1310
|
if (!G) return;
|
|
1304
|
-
const e =
|
|
1305
|
-
if (!e || !
|
|
1311
|
+
const e = Nd();
|
|
1312
|
+
if (!e || !Sd(e, l, rc(), nc())) return;
|
|
1306
1313
|
ol({ ...e, restore: !1 });
|
|
1307
1314
|
const t = e.state ?? {};
|
|
1308
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), Cn.current = e.scroll ?? 0;
|
|
1309
|
-
const n =
|
|
1316
|
+
const n = sc(`queue:${l}`);
|
|
1310
1317
|
if (n) {
|
|
1311
1318
|
const r = `${n.collection}:${n.id}`;
|
|
1312
1319
|
Xt(r), mr.current = r;
|
|
1313
1320
|
}
|
|
1314
1321
|
Y && Y.length > 0 && _t.back(Y.length);
|
|
1315
1322
|
}, [G, l]);
|
|
1316
|
-
const Wa = O(!1), [
|
|
1323
|
+
const Wa = O(!1), [Ha, rs] = N(0);
|
|
1317
1324
|
P(() => {
|
|
1318
|
-
if (Wa.current || !G || !
|
|
1319
|
-
if (
|
|
1325
|
+
if (Wa.current || !G || !It) return;
|
|
1326
|
+
if (Ha === 0) {
|
|
1320
1327
|
rs(1);
|
|
1321
1328
|
return;
|
|
1322
1329
|
}
|
|
1323
1330
|
if (!i || Zn) return;
|
|
1324
1331
|
Wa.current = !0;
|
|
1325
1332
|
const e = ar.current, n = !!e && ce > 0 && ce <= e.leftAt ? Yo(e) : "fresh";
|
|
1326
|
-
n === "replay" && e && Ke.paused ?
|
|
1333
|
+
n === "replay" && e && Ke.paused ? Hn(e.events.filter((o) => !o.own), () => {
|
|
1327
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({
|
|
1328
1335
|
queryKey: ie ? ["queue-items", l] : ["queue-items", l, b]
|
|
1329
1336
|
}).finally(() => {
|
|
1330
1337
|
he.current = !1;
|
|
1331
1338
|
})), Al(!1);
|
|
1332
1339
|
const r = mr.current;
|
|
1333
|
-
mr.current = null, r && setTimeout(() =>
|
|
1334
|
-
}, [i, Zn, G,
|
|
1340
|
+
mr.current = null, r && setTimeout(() => ic(be.rootRef.current, r), 260);
|
|
1341
|
+
}, [i, Zn, G, It, Ha]), P(() => {
|
|
1335
1342
|
var c;
|
|
1336
1343
|
if (!G || typeof window > "u") return;
|
|
1337
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";
|
|
@@ -1358,8 +1365,8 @@ function Op({
|
|
|
1358
1365
|
const hr = O(null);
|
|
1359
1366
|
P(() => {
|
|
1360
1367
|
if (!G) return;
|
|
1361
|
-
const e =
|
|
1362
|
-
e && (
|
|
1368
|
+
const e = zi(Xi(`queue:${l}`));
|
|
1369
|
+
e && (Zi(), en({
|
|
1363
1370
|
id: -1,
|
|
1364
1371
|
// Saved views type filters loosely as strings; multi-selects ride as arrays there too.
|
|
1365
1372
|
state: e
|
|
@@ -1368,7 +1375,7 @@ function Op({
|
|
|
1368
1375
|
const e = hr.current;
|
|
1369
1376
|
e == null || !(E != null && E.data) || (hr.current = null, E.data.some((t) => t.id === e) && ze(e));
|
|
1370
1377
|
}, [E, G]);
|
|
1371
|
-
const
|
|
1378
|
+
const Ia = () => {
|
|
1372
1379
|
var r;
|
|
1373
1380
|
const e = [], t = (r = Qr.find((o) => o.value === b)) == null ? void 0 : r.label;
|
|
1374
1381
|
t && e.push(t);
|
|
@@ -1391,17 +1398,17 @@ function Op({
|
|
|
1391
1398
|
P(() => {
|
|
1392
1399
|
Cn.current == null || L.length === 0 || !Sn.current || (Sn.current.scrollTop = Cn.current, Cn.current = null);
|
|
1393
1400
|
}, [L]);
|
|
1394
|
-
const { isAdmin: Xe } =
|
|
1401
|
+
const { isAdmin: Xe } = Ho(), as = L.map((e) => `${e.collection}|${e.item_id}`).join(","), os = W(
|
|
1395
1402
|
() => L.map((e) => ({ collection: e.collection, id: e.item_id })),
|
|
1396
1403
|
[as]
|
|
1397
|
-
), Ja =
|
|
1404
|
+
), Ja = Ed(os, Xe), ls = (e) => zt === k(e) ? (
|
|
1398
1405
|
// Pinned sticky cells use bg-inherit — the highlight must be
|
|
1399
1406
|
// OPAQUE (nvr-cyan/5-over-white equivalents) or horizontally
|
|
1400
1407
|
// scrolled content bleeds through the pinned columns. Same
|
|
1401
1408
|
// pair DataTable uses for selected rows when pins are active.
|
|
1402
1409
|
"bg-[#f2fdff] dark:bg-[#20303a]"
|
|
1403
|
-
) : e.at_risk ?
|
|
1404
|
-
mutationFn: ({ viewId: e, on: t }) => f.request(
|
|
1410
|
+
) : e.at_risk ? Pc(e.at_risk_color ?? "red") : void 0, tn = Xe || (s == null ? void 0 : s.owner) != null && s.owner === z, ss = Qe({
|
|
1411
|
+
mutationFn: ({ viewId: e, on: t }) => f.request(Io(`/queues/views/${e}`, { is_default: t })),
|
|
1405
1412
|
onSuccess: () => {
|
|
1406
1413
|
y.invalidateQueries({ queryKey: ["queue-views", l] }), K.success("Queue default view updated");
|
|
1407
1414
|
},
|
|
@@ -1430,7 +1437,7 @@ function Op({
|
|
|
1430
1437
|
onError: () => K.error("Failed to save view")
|
|
1431
1438
|
}), [Ya, za] = N(null), Ze = Qe({
|
|
1432
1439
|
mutationFn: (e) => f.request(
|
|
1433
|
-
|
|
1440
|
+
Io(`/queues/views/${e.id}`, {
|
|
1434
1441
|
state: {
|
|
1435
1442
|
// The queue default stores layout only (the server drops these too).
|
|
1436
1443
|
...e.is_default ? {} : { scope: b, filters: x },
|
|
@@ -1494,15 +1501,15 @@ function Op({
|
|
|
1494
1501
|
if (r) return r;
|
|
1495
1502
|
}
|
|
1496
1503
|
return null;
|
|
1497
|
-
}, Ne = X ? ee :
|
|
1504
|
+
}, Ne = X ? ee : _u, Tn = Kc(Ne), ds = W(
|
|
1498
1505
|
() => [...new Set(Ne.map((e) => Dr(e).collection))],
|
|
1499
1506
|
[Ne]
|
|
1500
|
-
), kr =
|
|
1507
|
+
), kr = Dc(ds, Tn.picks), [vr, eo] = N(!1);
|
|
1501
1508
|
vr && Ne.length === 0 && eo(!1);
|
|
1502
1509
|
const us = W(
|
|
1503
1510
|
() => vr ? Ne : Ne.filter((e) => kr.marked.has(e)),
|
|
1504
1511
|
[vr, Ne, kr.marked]
|
|
1505
|
-
), ms =
|
|
1512
|
+
), ms = Mc(us, Tn.picks).rows.filter((e) => Tn.picks.has(e.key)), ps = zo(
|
|
1506
1513
|
Ne.map((e) => {
|
|
1507
1514
|
const { collection: t, id: n } = Dr(e);
|
|
1508
1515
|
return { collection: t, id: n };
|
|
@@ -1516,7 +1523,7 @@ function Op({
|
|
|
1516
1523
|
viewerCount: (r == null ? void 0 : r.count) ?? 0,
|
|
1517
1524
|
lockName: o && !o.is_mine ? o.locked_by_name ?? "someone" : null
|
|
1518
1525
|
};
|
|
1519
|
-
}).filter((e) => e.viewerCount > 0 || !!e.lockName), bs =
|
|
1526
|
+
}).filter((e) => e.viewerCount > 0 || !!e.lockName), bs = Bc(
|
|
1520
1527
|
L,
|
|
1521
1528
|
(e) => `${e.collection}:${e.item_id}`,
|
|
1522
1529
|
Ne
|
|
@@ -1525,7 +1532,7 @@ function Op({
|
|
|
1525
1532
|
var t;
|
|
1526
1533
|
return it[e] === "sum" && ((t = Mt(e)) == null ? void 0 : t.kind) === "server" && e.startsWith("extra.");
|
|
1527
1534
|
}
|
|
1528
|
-
), to =
|
|
1535
|
+
), to = jc(
|
|
1529
1536
|
bs,
|
|
1530
1537
|
hs,
|
|
1531
1538
|
(e, t) => {
|
|
@@ -1534,7 +1541,7 @@ function Op({
|
|
|
1534
1541
|
}
|
|
1535
1542
|
), no = (e) => {
|
|
1536
1543
|
if (R === "state") return e === "No state" ? e : Pe(e);
|
|
1537
|
-
if (R === "collection") return
|
|
1544
|
+
if (R === "collection") return Ie(e);
|
|
1538
1545
|
if (R != null && R.startsWith("extra.") && e !== "—") {
|
|
1539
1546
|
const t = R.slice(6), n = ye(t);
|
|
1540
1547
|
return n ? rt(e, n) : cn(
|
|
@@ -1543,7 +1550,7 @@ function Op({
|
|
|
1543
1550
|
);
|
|
1544
1551
|
}
|
|
1545
1552
|
return e;
|
|
1546
|
-
}, nn =
|
|
1553
|
+
}, nn = mc(
|
|
1547
1554
|
(we ?? []).map((e) => ({ ...e, rows: xe.has(e.key) ? [] : e.rows })),
|
|
1548
1555
|
k,
|
|
1549
1556
|
be.rootRef,
|
|
@@ -1560,7 +1567,7 @@ function Op({
|
|
|
1560
1567
|
])
|
|
1561
1568
|
}
|
|
1562
1569
|
);
|
|
1563
|
-
|
|
1570
|
+
pc(
|
|
1564
1571
|
be.rootRef,
|
|
1565
1572
|
nn.groups.map((e) => `§${e.key}${e.rows.map(k).join("")}`).join(""),
|
|
1566
1573
|
{
|
|
@@ -1628,13 +1635,13 @@ function Op({
|
|
|
1628
1635
|
" at risk"
|
|
1629
1636
|
] })
|
|
1630
1637
|
] })
|
|
1631
|
-
})), _r = (((To = i == null ? void 0 : i.available_values.collection) == null ? void 0 : To.length) ?? 0) > 1, ro = L.some((e) => !!e.unseen) ||
|
|
1638
|
+
})), _r = (((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 = [
|
|
1632
1639
|
..._r ? [
|
|
1633
1640
|
{
|
|
1634
1641
|
key: "collection",
|
|
1635
1642
|
header: A("collection", "Collection"),
|
|
1636
1643
|
sortable: !0,
|
|
1637
|
-
render: (e) => /* @__PURE__ */ a(
|
|
1644
|
+
render: (e) => /* @__PURE__ */ a(Vd, { variant: "outline", children: Ie(e.collection) })
|
|
1638
1645
|
}
|
|
1639
1646
|
] : [],
|
|
1640
1647
|
{
|
|
@@ -1649,17 +1656,17 @@ function Op({
|
|
|
1649
1656
|
// a whole, but nothing on it said so — an underline is the one
|
|
1650
1657
|
// convention people already read as "this goes somewhere".
|
|
1651
1658
|
/* @__PURE__ */ d("span", { className: "flex items-center gap-1.5", children: [
|
|
1652
|
-
|
|
1653
|
-
|
|
1659
|
+
Ht.get(k(e)) || be.isNew(k(e)) || Ln(k(e)) || wt(k(e)) != null ? /* @__PURE__ */ a(
|
|
1660
|
+
Td,
|
|
1654
1661
|
{
|
|
1655
|
-
lock:
|
|
1662
|
+
lock: Ht.get(k(e)),
|
|
1656
1663
|
isNew: be.isNew(k(e)),
|
|
1657
1664
|
gone: Ln(k(e)),
|
|
1658
1665
|
movingTo: wt(k(e)),
|
|
1659
1666
|
dataAttr: "data-queue-live-mark",
|
|
1660
1667
|
hang: !0
|
|
1661
1668
|
}
|
|
1662
|
-
) : /* @__PURE__ */ a(
|
|
1669
|
+
) : /* @__PURE__ */ a(Ud, { change: e.unseen, dataAttr: "data-queue-unseen", hang: !0 }),
|
|
1663
1670
|
/* @__PURE__ */ a(
|
|
1664
1671
|
"span",
|
|
1665
1672
|
{
|
|
@@ -1668,7 +1675,7 @@ function Op({
|
|
|
1668
1675
|
children: e.label
|
|
1669
1676
|
}
|
|
1670
1677
|
),
|
|
1671
|
-
wt(k(e)) != null && /* @__PURE__ */ a(
|
|
1678
|
+
wt(k(e)) != null && /* @__PURE__ */ a(Ld, { to: wt(k(e)) }),
|
|
1672
1679
|
(e.labels ?? []).slice(0, 3).map((t) => /* @__PURE__ */ a(
|
|
1673
1680
|
"span",
|
|
1674
1681
|
{
|
|
@@ -1679,7 +1686,7 @@ function Op({
|
|
|
1679
1686
|
t
|
|
1680
1687
|
)),
|
|
1681
1688
|
/* @__PURE__ */ a(
|
|
1682
|
-
|
|
1689
|
+
jd,
|
|
1683
1690
|
{
|
|
1684
1691
|
viewers: ya[Zo(e.collection, e.item_id)],
|
|
1685
1692
|
dataAttr: "data-queue-presence"
|
|
@@ -1701,7 +1708,7 @@ function Op({
|
|
|
1701
1708
|
),
|
|
1702
1709
|
style: e.state_color ? {
|
|
1703
1710
|
backgroundColor: `${e.state_color}1a`,
|
|
1704
|
-
"--nvr-state-ink":
|
|
1711
|
+
"--nvr-state-ink": Ki(e.state_color),
|
|
1705
1712
|
"--nvr-state-ink-dark": e.state_color
|
|
1706
1713
|
} : void 0,
|
|
1707
1714
|
title: e.via_addendum ? `Addendum "${e.via_addendum.title ?? ""}" — ${Pe(e.state)}` : Pe(e.state),
|
|
@@ -1716,13 +1723,13 @@ function Op({
|
|
|
1716
1723
|
key: "owners",
|
|
1717
1724
|
header: A("owners", "Owners"),
|
|
1718
1725
|
sortable: !0,
|
|
1719
|
-
render: (e) => /* @__PURE__ */ a(
|
|
1726
|
+
render: (e) => /* @__PURE__ */ a(Zd, { owners: e.owners })
|
|
1720
1727
|
},
|
|
1721
1728
|
{
|
|
1722
1729
|
key: "aging_hours",
|
|
1723
1730
|
header: A("aging_hours", "Aging"),
|
|
1724
1731
|
sortable: !0,
|
|
1725
|
-
render: (e) =>
|
|
1732
|
+
render: (e) => Su(e.aging_hours)
|
|
1726
1733
|
},
|
|
1727
1734
|
{
|
|
1728
1735
|
// rt8 — the step and how long it has been there, ticking on the page clock; sorts on
|
|
@@ -1733,7 +1740,7 @@ function Op({
|
|
|
1733
1740
|
// A bounded box: the table sizes columns to their content, so without a max width the
|
|
1734
1741
|
// step name ran on under the pinned State column instead of ending in "…".
|
|
1735
1742
|
render: (e) => /* @__PURE__ */ a("div", { className: "min-w-0 max-w-[240px]", children: /* @__PURE__ */ a(
|
|
1736
|
-
|
|
1743
|
+
xd,
|
|
1737
1744
|
{
|
|
1738
1745
|
stepLabel: e.state ? Pe(e.state) : null,
|
|
1739
1746
|
enteredAt: e.state_entered_at
|
|
@@ -1752,7 +1759,7 @@ function Op({
|
|
|
1752
1759
|
key: "sla_status",
|
|
1753
1760
|
header: A("sla_status", "SLA"),
|
|
1754
1761
|
sortable: !0,
|
|
1755
|
-
render: (e) => /* @__PURE__ */ a(
|
|
1762
|
+
render: (e) => /* @__PURE__ */ a(Cu, { status: e.sla_status, warningAt: e.sla_warning_at, dueAt: e.sla_due_at })
|
|
1756
1763
|
},
|
|
1757
1764
|
{
|
|
1758
1765
|
key: "at_risk",
|
|
@@ -1760,7 +1767,7 @@ function Op({
|
|
|
1760
1767
|
sortable: !0,
|
|
1761
1768
|
render: (e) => {
|
|
1762
1769
|
var t;
|
|
1763
|
-
return e.at_risk ? /* @__PURE__ */ d("span", { className:
|
|
1770
|
+
return e.at_risk ? /* @__PURE__ */ d("span", { className: Ec(e.at_risk_color ?? "red"), children: [
|
|
1764
1771
|
"⚑ ",
|
|
1765
1772
|
((t = e.at_risk_rule) == null ? void 0 : t.name) ?? "At risk"
|
|
1766
1773
|
] }) : e.predicted_risk ? /* @__PURE__ */ a("span", { className: "text-amber-500", title: e.predicted_note ?? void 0, children: "⚑ Predicted" }) : null;
|
|
@@ -1771,7 +1778,7 @@ function Op({
|
|
|
1771
1778
|
key: "addendums",
|
|
1772
1779
|
header: A("addendums", "Addendums"),
|
|
1773
1780
|
sortable: !1,
|
|
1774
|
-
render: (e) => /* @__PURE__ */ a(
|
|
1781
|
+
render: (e) => /* @__PURE__ */ a(Nu, { summary: e.addendums })
|
|
1775
1782
|
}
|
|
1776
1783
|
] : [],
|
|
1777
1784
|
...Ut ? [
|
|
@@ -1780,7 +1787,7 @@ function Op({
|
|
|
1780
1787
|
header: A("fulfilment", "Shipped"),
|
|
1781
1788
|
sortable: !0,
|
|
1782
1789
|
render: (e) => /* @__PURE__ */ a(
|
|
1783
|
-
|
|
1790
|
+
yd,
|
|
1784
1791
|
{
|
|
1785
1792
|
collection: e.collection,
|
|
1786
1793
|
itemId: e.item_id,
|
|
@@ -1794,7 +1801,7 @@ function Op({
|
|
|
1794
1801
|
key: "integrations",
|
|
1795
1802
|
header: A("integrations", "Integrations"),
|
|
1796
1803
|
sortable: !1,
|
|
1797
|
-
render: (e) => /* @__PURE__ */ a(
|
|
1804
|
+
render: (e) => /* @__PURE__ */ a(vd, { rows: Hl[`${e.collection}:${e.item_id}`] })
|
|
1798
1805
|
}
|
|
1799
1806
|
] : [],
|
|
1800
1807
|
...Aa ? [
|
|
@@ -1823,7 +1830,7 @@ function Op({
|
|
|
1823
1830
|
key: "send_backs",
|
|
1824
1831
|
header: A("send_backs", "Sent back"),
|
|
1825
1832
|
sortable: !0,
|
|
1826
|
-
render: (e) => /* @__PURE__ */ a(
|
|
1833
|
+
render: (e) => /* @__PURE__ */ a(vu, { summary: e.send_backs })
|
|
1827
1834
|
}
|
|
1828
1835
|
] : []
|
|
1829
1836
|
], xs = {
|
|
@@ -1844,7 +1851,7 @@ function Op({
|
|
|
1844
1851
|
{
|
|
1845
1852
|
type: "button",
|
|
1846
1853
|
onClick: (t) => {
|
|
1847
|
-
t.stopPropagation(),
|
|
1854
|
+
t.stopPropagation(), He.mutate(e);
|
|
1848
1855
|
},
|
|
1849
1856
|
className: "text-[11px] font-medium text-nvr-navy underline dark:text-nvr-cyan",
|
|
1850
1857
|
children: "Claim"
|
|
@@ -1854,12 +1861,12 @@ function Op({
|
|
|
1854
1861
|
P(() => {
|
|
1855
1862
|
var r;
|
|
1856
1863
|
if (!G || !l) return;
|
|
1857
|
-
const e = `queue:${l}`, t = yr(), n =
|
|
1864
|
+
const e = `queue:${l}`, t = yr(), n = ec(e, t);
|
|
1858
1865
|
if (((r = Nr.current) == null ? void 0 : r.queue) !== l) {
|
|
1859
1866
|
Nr.current = { queue: l, enc: n };
|
|
1860
1867
|
return;
|
|
1861
1868
|
}
|
|
1862
|
-
|
|
1869
|
+
tc(e, n === Nr.current.enc ? null : t);
|
|
1863
1870
|
}, [
|
|
1864
1871
|
G,
|
|
1865
1872
|
l,
|
|
@@ -1874,7 +1881,7 @@ function Op({
|
|
|
1874
1881
|
fe,
|
|
1875
1882
|
Y
|
|
1876
1883
|
]);
|
|
1877
|
-
const ks = ((Oo = (Lo = E == null ? void 0 : E.data) == null ? void 0 : Lo.find((e) => e.id === fe)) == null ? void 0 : Oo.name) ?? null, lo =
|
|
1884
|
+
const ks = ((Oo = (Lo = E == null ? void 0 : E.data) == null ? void 0 : Lo.find((e) => e.id === fe)) == null ? void 0 : Oo.name) ?? null, lo = _c({
|
|
1878
1885
|
view: ks ?? (b !== "all" ? ((Fo = Qr.find((e) => e.value === b)) == null ? void 0 : Fo.label) ?? null : null),
|
|
1879
1886
|
filters: Object.values(x).filter(
|
|
1880
1887
|
(e) => Array.isArray(e) ? e.length > 0 : String(e ?? "").trim() !== ""
|
|
@@ -1882,7 +1889,7 @@ function Op({
|
|
|
1882
1889
|
page: se
|
|
1883
1890
|
});
|
|
1884
1891
|
P(() => {
|
|
1885
|
-
G && l &&
|
|
1892
|
+
G && l && Nc(lo);
|
|
1886
1893
|
}, [G, l, lo]);
|
|
1887
1894
|
const vs = (e) => {
|
|
1888
1895
|
var t;
|
|
@@ -1910,13 +1917,13 @@ function Op({
|
|
|
1910
1917
|
if (!Number.isNaN(t.getTime()))
|
|
1911
1918
|
return {
|
|
1912
1919
|
// The one read-only date style (army 11), the full stamp on hover.
|
|
1913
|
-
text:
|
|
1920
|
+
text: Jc(t),
|
|
1914
1921
|
title: tl(t)
|
|
1915
1922
|
};
|
|
1916
1923
|
}
|
|
1917
1924
|
return { text: e, title: e };
|
|
1918
1925
|
}
|
|
1919
|
-
const Sr =
|
|
1926
|
+
const Sr = Wi(p == null ? void 0 : p.inline_edit), so = Sr.enabled ? [
|
|
1920
1927
|
...new Set(
|
|
1921
1928
|
((s == null ? void 0 : s.sources) ?? []).filter((e) => e.type === "collection" && e.collection).map((e) => e.collection)
|
|
1922
1929
|
)
|
|
@@ -1941,24 +1948,24 @@ function Op({
|
|
|
1941
1948
|
queryFn: () => f.request(D("/security/my/permissions")).then((e) => e.data),
|
|
1942
1949
|
enabled: Sr.enabled && !Xe,
|
|
1943
1950
|
staleTime: 5 * 6e4
|
|
1944
|
-
}), io =
|
|
1951
|
+
}), io = Fd(), co = (e, t) => {
|
|
1945
1952
|
if (t.includes(".")) return null;
|
|
1946
1953
|
const n = Cr.get(e.collection);
|
|
1947
1954
|
if (!n) return null;
|
|
1948
|
-
const r =
|
|
1949
|
-
return r && !r.is_mine ? null :
|
|
1955
|
+
const r = Ht.get(k(e));
|
|
1956
|
+
return r && !r.is_mine ? null : Ji({
|
|
1950
1957
|
config: Sr,
|
|
1951
1958
|
key: t,
|
|
1952
1959
|
field: n.fields.get(t),
|
|
1953
1960
|
collection: e.collection,
|
|
1954
1961
|
relations: n.relations,
|
|
1955
|
-
mayUpdate: Xe ||
|
|
1962
|
+
mayUpdate: Xe || id($s, e.collection)
|
|
1956
1963
|
});
|
|
1957
1964
|
}, uo = (e, t, n) => {
|
|
1958
1965
|
var r, o, c;
|
|
1959
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;
|
|
1960
1967
|
}, Rs = (e, t, n, r, o) => {
|
|
1961
|
-
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 :
|
|
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 : Yi(u, t, o), h = (v) => v.collection === e.collection && v.item_id === e.item_id, T = (v) => h(v) ? n === "m2o" ? {
|
|
1962
1969
|
...v,
|
|
1963
1970
|
extra_ids: { ...v.extra_ids ?? {}, [t]: r == null ? [] : [String(r)] }
|
|
1964
1971
|
} : { ...v, extra: { ...v.extra ?? {}, [t]: r } } : v;
|
|
@@ -1988,7 +1995,7 @@ function Op({
|
|
|
1988
1995
|
if (!r) return n;
|
|
1989
1996
|
const o = Cr.get(e.collection), c = o == null ? void 0 : o.fields.get(t);
|
|
1990
1997
|
return /* @__PURE__ */ a(
|
|
1991
|
-
|
|
1998
|
+
Ad,
|
|
1992
1999
|
{
|
|
1993
2000
|
controller: io,
|
|
1994
2001
|
cellKey: `${k(e)}|${t}`,
|
|
@@ -1996,7 +2003,7 @@ function Op({
|
|
|
1996
2003
|
value: uo(e, t, r),
|
|
1997
2004
|
label: A(`extra.${t}`, Ue(t)),
|
|
1998
2005
|
choices: c ? Ii(c) : void 0,
|
|
1999
|
-
target: r === "m2o" && o ?
|
|
2006
|
+
target: r === "m2o" && o ? Hi(o.relations, e.collection, t) : null,
|
|
2000
2007
|
collection: e.collection,
|
|
2001
2008
|
itemId: e.item_id,
|
|
2002
2009
|
field: t,
|
|
@@ -2047,7 +2054,7 @@ function Op({
|
|
|
2047
2054
|
) : /* @__PURE__ */ a("span", { className: "block max-w-[200px] truncate text-[12px]", title: T, children: h });
|
|
2048
2055
|
}
|
|
2049
2056
|
}
|
|
2050
|
-
const mo =
|
|
2057
|
+
const mo = gu(p == null ? void 0 : p.formula_columns), po = [
|
|
2051
2058
|
..._r ? ["collection"] : [],
|
|
2052
2059
|
"state",
|
|
2053
2060
|
"owners",
|
|
@@ -2085,7 +2092,7 @@ function Op({
|
|
|
2085
2092
|
const an = [
|
|
2086
2093
|
...($r ?? []).filter((e) => po.includes(e)),
|
|
2087
2094
|
...po.filter((e) => !($r ?? []).includes(e))
|
|
2088
|
-
], Es =
|
|
2095
|
+
], Es = Is(Js(Ys, { activationConstraint: { distance: 4 } }));
|
|
2089
2096
|
function Ps(e) {
|
|
2090
2097
|
const { active: t, over: n } = e;
|
|
2091
2098
|
if (!n || t.id === n.id) return;
|
|
@@ -2097,7 +2104,7 @@ function Op({
|
|
|
2097
2104
|
const fo = ao.find((e) => e.key === "label"), Ks = {
|
|
2098
2105
|
...fo,
|
|
2099
2106
|
render: (e, ...t) => /* @__PURE__ */ d("span", { className: "inline-flex min-w-0 items-center gap-1.5", children: [
|
|
2100
|
-
/* @__PURE__ */ a(
|
|
2107
|
+
/* @__PURE__ */ a(nd, { rowId: e.item_id }),
|
|
2101
2108
|
fo.render(e, ...t)
|
|
2102
2109
|
] })
|
|
2103
2110
|
}, Ds = ((p == null ? void 0 : p.formula_columns) ?? []).map(
|
|
@@ -2108,7 +2115,7 @@ function Op({
|
|
|
2108
2115
|
const n = {
|
|
2109
2116
|
...t,
|
|
2110
2117
|
...t.extra ? Object.fromEntries(Object.entries(t.extra).map(([c, u]) => [`extra.${c}`, u])) : {}
|
|
2111
|
-
}, r =
|
|
2118
|
+
}, r = Di(e.formula, (c) => {
|
|
2112
2119
|
const u = n[c] ?? (t.extra ? t.extra[c] : void 0), m = Number(u);
|
|
2113
2120
|
return Number.isFinite(m) ? m : u ?? null;
|
|
2114
2121
|
});
|
|
@@ -2129,7 +2136,7 @@ function Op({
|
|
|
2129
2136
|
key: "__actions__",
|
|
2130
2137
|
header: "",
|
|
2131
2138
|
render: (e) => e.collection === "tasks" || e.collection === Lt ? null : /* @__PURE__ */ a("span", { onClick: (t) => t.stopPropagation(), children: /* @__PURE__ */ a(
|
|
2132
|
-
|
|
2139
|
+
sd,
|
|
2133
2140
|
{
|
|
2134
2141
|
collection: e.collection,
|
|
2135
2142
|
id: e.item_id,
|
|
@@ -2163,7 +2170,7 @@ function Op({
|
|
|
2163
2170
|
} : { fn: it[e.key] ?? null, onChange: n };
|
|
2164
2171
|
return {
|
|
2165
2172
|
...e,
|
|
2166
|
-
headerMenu: /* @__PURE__ */ a(
|
|
2173
|
+
headerMenu: /* @__PURE__ */ a(cd, { label: Tr(e), selectedCount: 0, totals: r })
|
|
2167
2174
|
};
|
|
2168
2175
|
}, et = [
|
|
2169
2176
|
Ks,
|
|
@@ -2180,12 +2187,12 @@ function Op({
|
|
|
2180
2187
|
const o = Mt(r.key), c = it[r.key];
|
|
2181
2188
|
if (!o || o.kind === "none" || !c) continue;
|
|
2182
2189
|
t = !0;
|
|
2183
|
-
const u =
|
|
2190
|
+
const u = du(On, o, c), m = r.key.startsWith("formula.") ? ((p == null ? void 0 : p.formula_columns) ?? []).find((Z) => `formula.${Z.key}` === r.key) : null, h = m ? uu(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 : mu({
|
|
2184
2191
|
fn: c,
|
|
2185
2192
|
label: Tr(r),
|
|
2186
2193
|
rows: (i == null ? void 0 : i.total) ?? null,
|
|
2187
2194
|
byCollection: o.kind === "server" ? (n = On == null ? void 0 : On[o.path]) == null ? void 0 : n.by_collection : void 0,
|
|
2188
|
-
collectionLabel:
|
|
2195
|
+
collectionLabel: Ie,
|
|
2189
2196
|
format: T,
|
|
2190
2197
|
partial: go,
|
|
2191
2198
|
derivedText: o.kind === "derived" ? ho(o.terms) : void 0
|
|
@@ -2205,7 +2212,7 @@ function Op({
|
|
|
2205
2212
|
};
|
|
2206
2213
|
})(), on = () => Object.fromEntries(ut.map((e) => [e, it[e]])), xo = (e) => {
|
|
2207
2214
|
un(e), Mn((t) => {
|
|
2208
|
-
const n =
|
|
2215
|
+
const n = ud(t, e);
|
|
2209
2216
|
return rl(En(l), n), n;
|
|
2210
2217
|
});
|
|
2211
2218
|
}, [Nt, ko] = N(!1);
|
|
@@ -2226,7 +2233,7 @@ function Op({
|
|
|
2226
2233
|
), T = h.data ?? [];
|
|
2227
2234
|
if (t.push(...T), T.length < 100 || t.length >= (h.total ?? 0)) break;
|
|
2228
2235
|
}
|
|
2229
|
-
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 = hu(
|
|
2230
2237
|
t.slice(0, 1e4),
|
|
2231
2238
|
et.map((m) => ({
|
|
2232
2239
|
key: m.key,
|
|
@@ -2234,7 +2241,7 @@ function Op({
|
|
|
2234
2241
|
})),
|
|
2235
2242
|
{
|
|
2236
2243
|
stateLabel: Pe,
|
|
2237
|
-
collectionLabel:
|
|
2244
|
+
collectionLabel: Ie,
|
|
2238
2245
|
extraText: (m, h) => {
|
|
2239
2246
|
const T = ye(m);
|
|
2240
2247
|
return T && T.type !== "number" ? rt(h, T) : cn(n(m), h);
|
|
@@ -2245,7 +2252,7 @@ function Op({
|
|
|
2245
2252
|
}
|
|
2246
2253
|
}
|
|
2247
2254
|
), o = new Blob([r], { type: "text/csv;charset=utf-8" }), c = URL.createObjectURL(o), u = document.createElement("a");
|
|
2248
|
-
u.href = c, u.download =
|
|
2255
|
+
u.href = c, u.download = yu(s.name), document.body.appendChild(u), u.click(), u.remove(), setTimeout(() => URL.revokeObjectURL(c), 1e3), K.success(
|
|
2249
2256
|
t.length >= 1e4 ? `Exported the first ${1e4.toLocaleString("en-US")} rows` : `Exported ${t.length.toLocaleString("en-US")} ${t.length === 1 ? "row" : "rows"}`
|
|
2250
2257
|
);
|
|
2251
2258
|
} catch (e) {
|
|
@@ -2280,9 +2287,9 @@ function Op({
|
|
|
2280
2287
|
const te = Fn.get(Se);
|
|
2281
2288
|
!(te != null && te.target_collection) || !te.display_field || o.some((An) => An.collection === te.target_collection) || c.push({ collection: te.target_collection, field: te.display_field, values: ue });
|
|
2282
2289
|
}
|
|
2283
|
-
const u = [...o, ...c], m = u.length ?
|
|
2290
|
+
const u = [...o, ...c], m = u.length ? Fc(
|
|
2284
2291
|
e.target_collection,
|
|
2285
|
-
await
|
|
2292
|
+
await Ac(f, y, e.target_collection),
|
|
2286
2293
|
u
|
|
2287
2294
|
) : null, h = [
|
|
2288
2295
|
...t.trim() ? [{ [e.display_field]: { _contains: t.trim() } }] : [],
|
|
@@ -2306,7 +2313,7 @@ function Op({
|
|
|
2306
2313
|
type: "combobox",
|
|
2307
2314
|
multi: !0,
|
|
2308
2315
|
options: ((i == null ? void 0 : i.available_values.collection) ?? []).map((e) => ({
|
|
2309
|
-
label:
|
|
2316
|
+
label: Ie(e),
|
|
2310
2317
|
value: e
|
|
2311
2318
|
}))
|
|
2312
2319
|
},
|
|
@@ -2381,7 +2388,7 @@ function Op({
|
|
|
2381
2388
|
key: "integrations",
|
|
2382
2389
|
placeholder: A("integrations", "Integrations"),
|
|
2383
2390
|
type: "select",
|
|
2384
|
-
options:
|
|
2391
|
+
options: wd.map((e) => ({ label: e.label, value: e.value }))
|
|
2385
2392
|
}
|
|
2386
2393
|
] : [],
|
|
2387
2394
|
...Ut ? [
|
|
@@ -2389,7 +2396,7 @@ function Op({
|
|
|
2389
2396
|
key: "fulfilment",
|
|
2390
2397
|
placeholder: "Shipped",
|
|
2391
2398
|
type: "select",
|
|
2392
|
-
options:
|
|
2399
|
+
options: gd
|
|
2393
2400
|
}
|
|
2394
2401
|
] : [],
|
|
2395
2402
|
...Vt ? [
|
|
@@ -2477,7 +2484,7 @@ function Op({
|
|
|
2477
2484
|
const e = [];
|
|
2478
2485
|
for (const [o, c] of Object.entries(ve)) {
|
|
2479
2486
|
if (!c || Array.isArray(c) && c.length === 0) continue;
|
|
2480
|
-
const u = tt.find((v) => v.key === o), m = o.startsWith("extra.") ? o.slice(6) : null, h = m ? ye(m) : null, T =
|
|
2487
|
+
const u = tt.find((v) => v.key === o), m = o.startsWith("extra.") ? o.slice(6) : null, h = m ? ye(m) : null, T = Mi({
|
|
2481
2488
|
field: Or(o),
|
|
2482
2489
|
type: (u == null ? void 0 : u.type) ?? "select",
|
|
2483
2490
|
value: c,
|
|
@@ -2491,7 +2498,7 @@ function Op({
|
|
|
2491
2498
|
T && e.push(T);
|
|
2492
2499
|
}
|
|
2493
2500
|
const t = i == null ? void 0 : i.total;
|
|
2494
|
-
return
|
|
2501
|
+
return Bi({
|
|
2495
2502
|
noun: "items",
|
|
2496
2503
|
scope: b === "mine" ? "you own" : b === "unowned" ? "with no owners" : b === "claimed" ? "you claimed" : null,
|
|
2497
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,
|
|
@@ -2693,7 +2700,7 @@ function Op({
|
|
|
2693
2700
|
e.value
|
|
2694
2701
|
)) })
|
|
2695
2702
|
) : /* @__PURE__ */ a("div", { className: "h-8 w-40 animate-pulse rounded-md bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" }),
|
|
2696
|
-
/* @__PURE__ */ a(
|
|
2703
|
+
/* @__PURE__ */ a(Dd, { className: "h-8" }),
|
|
2697
2704
|
Bn > 0 && !Kt.label && /* @__PURE__ */ d(
|
|
2698
2705
|
"button",
|
|
2699
2706
|
{
|
|
@@ -2710,11 +2717,11 @@ function Op({
|
|
|
2710
2717
|
}
|
|
2711
2718
|
),
|
|
2712
2719
|
/* @__PURE__ */ a(
|
|
2713
|
-
|
|
2720
|
+
qd,
|
|
2714
2721
|
{
|
|
2715
2722
|
leadMinWidth: "siblings",
|
|
2716
2723
|
moreLabel: "More queue actions",
|
|
2717
|
-
lead: !
|
|
2724
|
+
lead: !I && C === "workload" ? /* @__PURE__ */ a(ll, { kind: "queue", id: l }) : void 0,
|
|
2718
2725
|
items: [
|
|
2719
2726
|
{
|
|
2720
2727
|
key: "unseen",
|
|
@@ -2772,7 +2779,7 @@ function Op({
|
|
|
2772
2779
|
priority: x.integrations ? 90 : 38,
|
|
2773
2780
|
active: !!x.integrations,
|
|
2774
2781
|
node: /* @__PURE__ */ a(
|
|
2775
|
-
|
|
2782
|
+
_d,
|
|
2776
2783
|
{
|
|
2777
2784
|
label: A("integrations", "Integrations"),
|
|
2778
2785
|
value: x.integrations,
|
|
@@ -2784,14 +2791,14 @@ function Op({
|
|
|
2784
2791
|
)
|
|
2785
2792
|
}
|
|
2786
2793
|
] : [],
|
|
2787
|
-
{ key: "focus", priority: 30, label: "Focus mode", node: /* @__PURE__ */ a(
|
|
2794
|
+
{ key: "focus", priority: 30, label: "Focus mode", node: /* @__PURE__ */ a(hd, {}) },
|
|
2788
2795
|
...(ct || S) && l ? [
|
|
2789
2796
|
{
|
|
2790
2797
|
key: "live-pause",
|
|
2791
2798
|
priority: Ke.paused ? 90 : 45,
|
|
2792
2799
|
active: Ke.paused,
|
|
2793
2800
|
node: /* @__PURE__ */ a(
|
|
2794
|
-
|
|
2801
|
+
$d,
|
|
2795
2802
|
{
|
|
2796
2803
|
paused: Ke.paused,
|
|
2797
2804
|
held: Ke.held,
|
|
@@ -2821,9 +2828,9 @@ function Op({
|
|
|
2821
2828
|
}
|
|
2822
2829
|
) }),
|
|
2823
2830
|
/* @__PURE__ */ a(Tt, { className: "w-[200px] p-0", align: "start", children: /* @__PURE__ */ d(sl, { children: [
|
|
2824
|
-
/* @__PURE__ */ a(
|
|
2831
|
+
/* @__PURE__ */ a(Gd, { placeholder: "Group by…", className: "h-8 text-[12px]" }),
|
|
2825
2832
|
/* @__PURE__ */ d(il, { children: [
|
|
2826
|
-
/* @__PURE__ */ a(
|
|
2833
|
+
/* @__PURE__ */ a(Wd, { children: "No attribute found." }),
|
|
2827
2834
|
/* @__PURE__ */ d(sn, { value: "__none__", onSelect: () => At(null), children: [
|
|
2828
2835
|
/* @__PURE__ */ a(
|
|
2829
2836
|
qr,
|
|
@@ -2963,24 +2970,24 @@ function Op({
|
|
|
2963
2970
|
key: "copy-link",
|
|
2964
2971
|
priority: 25,
|
|
2965
2972
|
label: "Copy link",
|
|
2966
|
-
node: /* @__PURE__ */ a(
|
|
2973
|
+
node: /* @__PURE__ */ a(Od, { listKey: `queue:${l}`, getState: yr })
|
|
2967
2974
|
},
|
|
2968
2975
|
{
|
|
2969
2976
|
key: "send-view",
|
|
2970
2977
|
priority: 20,
|
|
2971
2978
|
label: "Send this view",
|
|
2972
2979
|
node: /* @__PURE__ */ a(
|
|
2973
|
-
|
|
2980
|
+
Qd,
|
|
2974
2981
|
{
|
|
2975
|
-
getView: () =>
|
|
2982
|
+
getView: () => Qc(
|
|
2976
2983
|
"queue",
|
|
2977
2984
|
l,
|
|
2978
2985
|
`queue:${l}`,
|
|
2979
2986
|
yr(),
|
|
2980
|
-
|
|
2987
|
+
Ia()
|
|
2981
2988
|
),
|
|
2982
2989
|
describe: () => {
|
|
2983
|
-
const e =
|
|
2990
|
+
const e = Ia(), t = (s == null ? void 0 : s.name) ?? "This queue";
|
|
2984
2991
|
return e ? `${t} — ${e}` : t;
|
|
2985
2992
|
}
|
|
2986
2993
|
}
|
|
@@ -3070,7 +3077,7 @@ function Op({
|
|
|
3070
3077
|
children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: bo.map((e) => {
|
|
3071
3078
|
const t = Rr.find((n) => n.key === e);
|
|
3072
3079
|
return /* @__PURE__ */ a(
|
|
3073
|
-
|
|
3080
|
+
Tu,
|
|
3074
3081
|
{
|
|
3075
3082
|
id: e,
|
|
3076
3083
|
label: typeof (t == null ? void 0 : t.header) == "string" ? t.header : e,
|
|
@@ -3151,7 +3158,7 @@ function Op({
|
|
|
3151
3158
|
] : []
|
|
3152
3159
|
],
|
|
3153
3160
|
trail: /* @__PURE__ */ d(Ce, { children: [
|
|
3154
|
-
!
|
|
3161
|
+
!In && pe.length === 1 && (yn ? /* @__PURE__ */ d($t, { children: [
|
|
3155
3162
|
/* @__PURE__ */ a(Rt, { asChild: !0, children: /* @__PURE__ */ d(
|
|
3156
3163
|
"button",
|
|
3157
3164
|
{
|
|
@@ -3217,7 +3224,7 @@ function Op({
|
|
|
3217
3224
|
]
|
|
3218
3225
|
}
|
|
3219
3226
|
)),
|
|
3220
|
-
!
|
|
3227
|
+
!In && pe.length > 1 && /* @__PURE__ */ d($t, { children: [
|
|
3221
3228
|
/* @__PURE__ */ a(Rt, { asChild: !0, children: /* @__PURE__ */ d(
|
|
3222
3229
|
"button",
|
|
3223
3230
|
{
|
|
@@ -3248,8 +3255,8 @@ function Op({
|
|
|
3248
3255
|
e
|
|
3249
3256
|
)) })
|
|
3250
3257
|
] }),
|
|
3251
|
-
!
|
|
3252
|
-
|
|
3258
|
+
!In && dt && $e && /* @__PURE__ */ a(
|
|
3259
|
+
kd,
|
|
3253
3260
|
{
|
|
3254
3261
|
collection: dt,
|
|
3255
3262
|
onParsed: (e, t) => $e(`/collections/${dt}/new`, {
|
|
@@ -3395,7 +3402,7 @@ function Op({
|
|
|
3395
3402
|
Da.length > 0 && /* @__PURE__ */ a("div", { className: "flex min-w-0 flex-wrap items-center gap-1.5", children: Da.map(([e, t]) => {
|
|
3396
3403
|
var n;
|
|
3397
3404
|
return /* @__PURE__ */ a(
|
|
3398
|
-
|
|
3405
|
+
Ru,
|
|
3399
3406
|
{
|
|
3400
3407
|
label: Pe(e),
|
|
3401
3408
|
count: t,
|
|
@@ -3411,14 +3418,14 @@ function Op({
|
|
|
3411
3418
|
}
|
|
3412
3419
|
),
|
|
3413
3420
|
C !== "workload" && /* @__PURE__ */ a(
|
|
3414
|
-
|
|
3421
|
+
lu,
|
|
3415
3422
|
{
|
|
3416
3423
|
queueId: l,
|
|
3417
|
-
right:
|
|
3424
|
+
right: I ? void 0 : /* @__PURE__ */ a(ll, { kind: "queue", id: l, variant: "header" })
|
|
3418
3425
|
}
|
|
3419
3426
|
),
|
|
3420
3427
|
C !== "workload" && /* @__PURE__ */ a(
|
|
3421
|
-
|
|
3428
|
+
ou,
|
|
3422
3429
|
{
|
|
3423
3430
|
defs: Us,
|
|
3424
3431
|
values: x,
|
|
@@ -3719,7 +3726,7 @@ function Op({
|
|
|
3719
3726
|
)
|
|
3720
3727
|
] }),
|
|
3721
3728
|
/* @__PURE__ */ d("div", { ref: Sn, className: "flex min-h-0 flex-1 flex-col overflow-y-auto px-4 pb-4 pt-3", children: [
|
|
3722
|
-
da && /* @__PURE__ */ a(
|
|
3729
|
+
da && /* @__PURE__ */ a(Cd, { error: ql, onRetry: () => void El(), className: "mb-3" }),
|
|
3723
3730
|
Fr && /* @__PURE__ */ a(
|
|
3724
3731
|
"p",
|
|
3725
3732
|
{
|
|
@@ -3741,7 +3748,7 @@ function Op({
|
|
|
3741
3748
|
"aria-busy": ba || void 0,
|
|
3742
3749
|
children: [
|
|
3743
3750
|
Kt.label && /* @__PURE__ */ a(
|
|
3744
|
-
|
|
3751
|
+
Rd,
|
|
3745
3752
|
{
|
|
3746
3753
|
label: Kt.label,
|
|
3747
3754
|
onShow: Ta,
|
|
@@ -3755,7 +3762,7 @@ function Op({
|
|
|
3755
3762
|
"s"
|
|
3756
3763
|
] }),
|
|
3757
3764
|
/* @__PURE__ */ a(
|
|
3758
|
-
|
|
3765
|
+
fd,
|
|
3759
3766
|
{
|
|
3760
3767
|
fillHeight: !0,
|
|
3761
3768
|
enterKey: Ca.current,
|
|
@@ -3781,16 +3788,16 @@ function Op({
|
|
|
3781
3788
|
t.preventDefault(), Zt({ x: t.clientX, y: t.clientY, row: e });
|
|
3782
3789
|
},
|
|
3783
3790
|
rowTitle: (e) => {
|
|
3784
|
-
const t =
|
|
3785
|
-
return (Ln(k(e)) ?
|
|
3791
|
+
const t = Ht.get(k(e));
|
|
3792
|
+
return (Ln(k(e)) ? vc : void 0) ?? (wt(k(e)) != null ? fc(wt(k(e))) : void 0) ?? be.titleFor(k(e)) ?? (t && !t.is_mine ? hc(t) : void 0) ?? (Ja(e.collection, e.item_id) ? Kd : void 0);
|
|
3786
3793
|
},
|
|
3787
3794
|
rowClassName: (e) => F(
|
|
3788
3795
|
ls(e),
|
|
3789
|
-
Ja(e.collection, e.item_id) &&
|
|
3790
|
-
Ln(k(e)) &&
|
|
3796
|
+
Ja(e.collection, e.item_id) && Pd,
|
|
3797
|
+
Ln(k(e)) && kc
|
|
3791
3798
|
),
|
|
3792
3799
|
emptyMessage: da ? /* @__PURE__ */ a("span", { className: "sr-only", children: "The list did not load." }) : /* @__PURE__ */ a(
|
|
3793
|
-
|
|
3800
|
+
bd,
|
|
3794
3801
|
{
|
|
3795
3802
|
icon: _i,
|
|
3796
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",
|
|
@@ -3857,7 +3864,7 @@ function Op({
|
|
|
3857
3864
|
hideFilterRow: !0,
|
|
3858
3865
|
nowrapCells: !0,
|
|
3859
3866
|
columnPins: vo,
|
|
3860
|
-
pinKeepRank:
|
|
3867
|
+
pinKeepRank: xu,
|
|
3861
3868
|
pinRightShare: 0.45,
|
|
3862
3869
|
onColumnPinChange: (e, t) => {
|
|
3863
3870
|
Dn((n) => {
|
|
@@ -3869,7 +3876,7 @@ function Op({
|
|
|
3869
3876
|
hScrollProxy: !0,
|
|
3870
3877
|
totalsRow: js,
|
|
3871
3878
|
footer: /* @__PURE__ */ a(
|
|
3872
|
-
|
|
3879
|
+
Bd,
|
|
3873
3880
|
{
|
|
3874
3881
|
collections: Yt,
|
|
3875
3882
|
selectedIds: String(x.at_risk_rule ?? "").split(",").map((e) => Number(e)).filter((e) => Number.isFinite(e) && e > 0),
|
|
@@ -3888,25 +3895,25 @@ function Op({
|
|
|
3888
3895
|
]
|
|
3889
3896
|
}
|
|
3890
3897
|
) }) }) : C === "kanban" ? /* @__PURE__ */ a(
|
|
3891
|
-
|
|
3898
|
+
au,
|
|
3892
3899
|
{
|
|
3893
3900
|
items: L,
|
|
3894
3901
|
onCardClick: (e) => fr(e),
|
|
3895
3902
|
onDrop: (e, t) => Bl.mutate({ item: e, targetState: t }),
|
|
3896
|
-
onClaim: (e) =>
|
|
3903
|
+
onClaim: (e) => He.mutate(e),
|
|
3897
3904
|
onRelease: (e) => bt.mutate(e),
|
|
3898
3905
|
swimlaneBy: qt,
|
|
3899
3906
|
stateLabels: cr,
|
|
3900
|
-
laneLabel: qt === "collection" ?
|
|
3907
|
+
laneLabel: qt === "collection" ? Ie : void 0,
|
|
3901
3908
|
claimsEnabled: Te,
|
|
3902
3909
|
onDraggingChange: (e) => {
|
|
3903
3910
|
Un.current = e;
|
|
3904
3911
|
}
|
|
3905
3912
|
}
|
|
3906
|
-
) : /* @__PURE__ */ a(
|
|
3913
|
+
) : /* @__PURE__ */ a(su, { queueId: l })
|
|
3907
3914
|
] }),
|
|
3908
3915
|
gn && X && /* @__PURE__ */ d(
|
|
3909
|
-
|
|
3916
|
+
tu,
|
|
3910
3917
|
{
|
|
3911
3918
|
count: ee.length,
|
|
3912
3919
|
claimsEnabled: Te,
|
|
@@ -3940,7 +3947,7 @@ function Op({
|
|
|
3940
3947
|
onClear: () => De([]),
|
|
3941
3948
|
onActionIntent: () => eo(!0),
|
|
3942
3949
|
figures: /* @__PURE__ */ a(
|
|
3943
|
-
|
|
3950
|
+
ad,
|
|
3944
3951
|
{
|
|
3945
3952
|
tone: "light",
|
|
3946
3953
|
total: ee.length,
|
|
@@ -3958,7 +3965,7 @@ function Op({
|
|
|
3958
3965
|
}
|
|
3959
3966
|
),
|
|
3960
3967
|
notices: /* @__PURE__ */ a(
|
|
3961
|
-
|
|
3968
|
+
rd,
|
|
3962
3969
|
{
|
|
3963
3970
|
tone: "light",
|
|
3964
3971
|
framed: !0,
|
|
@@ -3982,13 +3989,13 @@ function Op({
|
|
|
3982
3989
|
{
|
|
3983
3990
|
type: "button",
|
|
3984
3991
|
onClick: () => {
|
|
3985
|
-
const e =
|
|
3992
|
+
const e = Cc(
|
|
3986
3993
|
L.filter((t) => ee.includes(k(t)) && t.collection !== "tasks").map((t) => Q.urlFor(pr(t)))
|
|
3987
3994
|
);
|
|
3988
3995
|
e.blocked > 0 || e.capped > 0 ? K.warning(Xo(e)) : K.success(Xo(e));
|
|
3989
3996
|
},
|
|
3990
3997
|
"data-bulk-open-tabs": !0,
|
|
3991
|
-
title: `Open the selected records in new tabs (up to ${
|
|
3998
|
+
title: `Open the selected records in new tabs (up to ${Sc})`,
|
|
3992
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",
|
|
3993
4000
|
children: "Open in tabs"
|
|
3994
4001
|
}
|
|
@@ -3998,7 +4005,7 @@ function Op({
|
|
|
3998
4005
|
(n) => ee.includes(k(n)) && n.collection !== "tasks"
|
|
3999
4006
|
), t = [...new Set(e.map((n) => n.collection))];
|
|
4000
4007
|
return e.length > 0 ? /* @__PURE__ */ a(
|
|
4001
|
-
|
|
4008
|
+
nu,
|
|
4002
4009
|
{
|
|
4003
4010
|
collection: t.length === 1 ? t[0] : null,
|
|
4004
4011
|
ids: e.map((n) => n.item_id),
|
|
@@ -4010,7 +4017,7 @@ function Op({
|
|
|
4010
4017
|
) : null;
|
|
4011
4018
|
})(),
|
|
4012
4019
|
/* @__PURE__ */ a(
|
|
4013
|
-
|
|
4020
|
+
Zc,
|
|
4014
4021
|
{
|
|
4015
4022
|
targets: L.filter((e) => ee.includes(k(e)) && e.collection !== "tasks").map((e) => ({ collection: e.collection, id: e.item_id, label: e.label })),
|
|
4016
4023
|
enabledKeys: (p == null ? void 0 : p.bulk_action_keys) ?? null,
|
|
@@ -4022,7 +4029,7 @@ function Op({
|
|
|
4022
4029
|
}
|
|
4023
4030
|
),
|
|
4024
4031
|
Ge("update-field") && /* @__PURE__ */ a(
|
|
4025
|
-
|
|
4032
|
+
td,
|
|
4026
4033
|
{
|
|
4027
4034
|
targets: L.filter((e) => ee.includes(k(e)) && e.collection !== "tasks").map((e) => ({ collection: e.collection, id: e.item_id })),
|
|
4028
4035
|
disabled: vt,
|
|
@@ -4031,12 +4038,12 @@ function Op({
|
|
|
4031
4038
|
}
|
|
4032
4039
|
),
|
|
4033
4040
|
Ge("compare") && /* @__PURE__ */ a(
|
|
4034
|
-
|
|
4041
|
+
ed,
|
|
4035
4042
|
{
|
|
4036
4043
|
targets: L.filter((e) => ee.includes(k(e)) && e.collection !== "tasks").map((e) => ({ collection: e.collection, id: e.item_id })),
|
|
4037
4044
|
renderValue: (e, t, n, r) => {
|
|
4038
4045
|
var o;
|
|
4039
|
-
return
|
|
4046
|
+
return ld(
|
|
4040
4047
|
((o = L.find((c) => ee.includes(k(c)))) == null ? void 0 : o.collection) ?? "",
|
|
4041
4048
|
e,
|
|
4042
4049
|
t,
|
|
@@ -4049,7 +4056,7 @@ function Op({
|
|
|
4049
4056
|
}
|
|
4050
4057
|
),
|
|
4051
4058
|
Ge("message") && /* @__PURE__ */ a(
|
|
4052
|
-
|
|
4059
|
+
od,
|
|
4053
4060
|
{
|
|
4054
4061
|
targets: L.filter((e) => ee.includes(k(e)) && e.collection !== "tasks").map((e) => ({ collection: e.collection, id: e.item_id })),
|
|
4055
4062
|
disabled: vt,
|
|
@@ -4060,7 +4067,7 @@ function Op({
|
|
|
4060
4067
|
}
|
|
4061
4068
|
),
|
|
4062
4069
|
Y != null && Y.length ? /* @__PURE__ */ a(
|
|
4063
|
-
|
|
4070
|
+
Md,
|
|
4064
4071
|
{
|
|
4065
4072
|
collection: Y[0].collection,
|
|
4066
4073
|
itemId: Y[0].itemId,
|
|
@@ -4075,14 +4082,14 @@ function Op({
|
|
|
4075
4082
|
onOpenRecord: Zl
|
|
4076
4083
|
}
|
|
4077
4084
|
) : null,
|
|
4078
|
-
|
|
4085
|
+
H && Wo(
|
|
4079
4086
|
/* @__PURE__ */ d(
|
|
4080
4087
|
"div",
|
|
4081
4088
|
{
|
|
4082
4089
|
style: {
|
|
4083
4090
|
position: "fixed",
|
|
4084
|
-
left: Math.min(
|
|
4085
|
-
top: Math.min(
|
|
4091
|
+
left: Math.min(H.x, window.innerWidth - 200),
|
|
4092
|
+
top: Math.min(H.y, window.innerHeight - 260),
|
|
4086
4093
|
zIndex: 125
|
|
4087
4094
|
},
|
|
4088
4095
|
className: "w-48 overflow-hidden rounded-lg border border-slate-200 bg-white py-1 shadow-xl dark:border-slate-700 dark:bg-slate-900",
|
|
@@ -4090,23 +4097,23 @@ function Op({
|
|
|
4090
4097
|
"data-queue-row-menu": !0,
|
|
4091
4098
|
children: [
|
|
4092
4099
|
[
|
|
4093
|
-
{ label: "Open", run: () => fr(
|
|
4100
|
+
{ label: "Open", run: () => fr(H.row) },
|
|
4094
4101
|
{
|
|
4095
4102
|
label: "Open full record",
|
|
4096
|
-
run: () => xt(
|
|
4103
|
+
run: () => xt(H.row)
|
|
4097
4104
|
},
|
|
4098
|
-
{ label: "Peek", run: () => Ye(
|
|
4105
|
+
{ label: "Peek", run: () => Ye(H.row) },
|
|
4099
4106
|
...Te ? [
|
|
4100
|
-
((Uo =
|
|
4107
|
+
((Uo = H.row.claimed_by) == null ? void 0 : Uo.id) === z ? { label: "Release claim", run: () => bt.mutate(H.row) } : { label: "Claim", run: () => He.mutate(H.row) }
|
|
4101
4108
|
] : [],
|
|
4102
4109
|
// The friendly id (PW26-76166), never the row id (army 6 M52);
|
|
4103
4110
|
// a record with no number has nothing to copy.
|
|
4104
|
-
...el(
|
|
4111
|
+
...el(H.row) ? [
|
|
4105
4112
|
{
|
|
4106
4113
|
label: "Copy ID",
|
|
4107
4114
|
run: () => {
|
|
4108
4115
|
var e;
|
|
4109
|
-
return void ((e = navigator.clipboard) == null ? void 0 : e.writeText(el(
|
|
4116
|
+
return void ((e = navigator.clipboard) == null ? void 0 : e.writeText(el(H.row) ?? ""));
|
|
4110
4117
|
}
|
|
4111
4118
|
}
|
|
4112
4119
|
] : [],
|
|
@@ -4115,14 +4122,14 @@ function Op({
|
|
|
4115
4122
|
run: () => {
|
|
4116
4123
|
var e;
|
|
4117
4124
|
return void ((e = navigator.clipboard) == null ? void 0 : e.writeText(
|
|
4118
|
-
`${window.location.origin}${Q.urlFor(pr(
|
|
4125
|
+
`${window.location.origin}${Q.urlFor(pr(H.row))}`
|
|
4119
4126
|
));
|
|
4120
4127
|
}
|
|
4121
4128
|
},
|
|
4122
4129
|
// Custom actions (#125): the record's registered actions, right here.
|
|
4123
|
-
...Tl(
|
|
4130
|
+
...Tl(H.row.collection).map((e) => ({
|
|
4124
4131
|
label: e.label,
|
|
4125
|
-
run: () => Ll(e,
|
|
4132
|
+
run: () => Ll(e, H.row)
|
|
4126
4133
|
}))
|
|
4127
4134
|
].map((e) => /* @__PURE__ */ a(
|
|
4128
4135
|
"button",
|
|
@@ -4136,16 +4143,16 @@ function Op({
|
|
|
4136
4143
|
},
|
|
4137
4144
|
e.label
|
|
4138
4145
|
)),
|
|
4139
|
-
|
|
4146
|
+
H.row.collection !== "tasks" && /* @__PURE__ */ d("div", { className: "mt-1 border-t border-slate-100 pt-1 dark:border-border/60", children: [
|
|
4140
4147
|
/* @__PURE__ */ a("p", { className: "px-3 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-slate-400", children: "Triage labels" }),
|
|
4141
4148
|
Xn.slice(0, 8).map((e) => {
|
|
4142
|
-
const t = (
|
|
4149
|
+
const t = (H.row.labels ?? []).includes(e);
|
|
4143
4150
|
return /* @__PURE__ */ d(
|
|
4144
4151
|
"button",
|
|
4145
4152
|
{
|
|
4146
4153
|
type: "button",
|
|
4147
4154
|
onClick: () => {
|
|
4148
|
-
ia(
|
|
4155
|
+
ia(H.row, e), Zt(null);
|
|
4149
4156
|
},
|
|
4150
4157
|
className: "flex w-full items-center gap-2 px-3 py-1.5 text-left text-[12px] text-slate-700 hover:bg-slate-50 dark:text-slate-200 dark:hover:bg-slate-800",
|
|
4151
4158
|
children: [
|
|
@@ -4169,7 +4176,7 @@ function Op({
|
|
|
4169
4176
|
const n = e.target.elements.namedItem(
|
|
4170
4177
|
"newlabel"
|
|
4171
4178
|
).value.trim();
|
|
4172
|
-
n && (ia(
|
|
4179
|
+
n && (ia(H.row, n), Zt(null));
|
|
4173
4180
|
},
|
|
4174
4181
|
className: "px-3 py-1",
|
|
4175
4182
|
children: /* @__PURE__ */ a(
|
|
@@ -4192,7 +4199,7 @@ function Op({
|
|
|
4192
4199
|
),
|
|
4193
4200
|
sa && Wo(
|
|
4194
4201
|
/* @__PURE__ */ a(
|
|
4195
|
-
|
|
4202
|
+
Lu,
|
|
4196
4203
|
{
|
|
4197
4204
|
queueId: l,
|
|
4198
4205
|
drill: sa,
|
|
@@ -4205,11 +4212,11 @@ function Op({
|
|
|
4205
4212
|
document.body
|
|
4206
4213
|
),
|
|
4207
4214
|
/* @__PURE__ */ a(
|
|
4208
|
-
|
|
4215
|
+
ru,
|
|
4209
4216
|
{
|
|
4210
4217
|
item: Je,
|
|
4211
4218
|
stateLabels: cr,
|
|
4212
|
-
collectionLabel:
|
|
4219
|
+
collectionLabel: Ie,
|
|
4213
4220
|
claimsEnabled: Te,
|
|
4214
4221
|
columnFormats: ws,
|
|
4215
4222
|
fieldLabel: (e) => A(`extra.${e}`, Ue(e)),
|
|
@@ -4219,7 +4226,7 @@ function Op({
|
|
|
4219
4226
|
onOpenChange: (e) => {
|
|
4220
4227
|
e || (Ye(null), ur(!1));
|
|
4221
4228
|
},
|
|
4222
|
-
onClaim: (e) =>
|
|
4229
|
+
onClaim: (e) => He.mutate(e),
|
|
4223
4230
|
onRelease: (e) => bt.mutate(e),
|
|
4224
4231
|
workNextActive: Xl,
|
|
4225
4232
|
onNext: () => Je && ja(Je),
|
|
@@ -4229,15 +4236,15 @@ function Op({
|
|
|
4229
4236
|
kn.dialog
|
|
4230
4237
|
] });
|
|
4231
4238
|
}
|
|
4232
|
-
function
|
|
4239
|
+
function Lu({
|
|
4233
4240
|
queueId: l,
|
|
4234
4241
|
drill: S,
|
|
4235
4242
|
onClose: q,
|
|
4236
4243
|
onOpenRecord: M
|
|
4237
4244
|
}) {
|
|
4238
|
-
const
|
|
4245
|
+
const I = dl(), { data: B, isLoading: y } = ne({
|
|
4239
4246
|
queryKey: ["queue-agg-rows", l, S.row.collection, S.row.item_id, S.path],
|
|
4240
|
-
queryFn: () =>
|
|
4247
|
+
queryFn: () => I.request(
|
|
4241
4248
|
D(`/queues/${l}/aggregate-rows`, {
|
|
4242
4249
|
collection: S.row.collection,
|
|
4243
4250
|
item_id: S.row.item_id,
|
|
@@ -4296,5 +4303,5 @@ function Tu({
|
|
|
4296
4303
|
);
|
|
4297
4304
|
}
|
|
4298
4305
|
export {
|
|
4299
|
-
|
|
4306
|
+
Ap as QueueWorklist
|
|
4300
4307
|
};
|