@nivaro/react 0.3.140 → 0.3.141
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 +3 -0
- package/dist/shared/components/CollectionBrowserView.js +842 -830
- package/dist/shared/components/ItemEditForm.js +825 -819
- package/dist/shared/components/RowPresence.js +83 -76
- package/dist/shared/components/UnseenDot.js +183 -22
- package/dist/shared/components/delivery-analytics/drill.js +32 -32
- package/dist/shared/components/item-edit/InlineTableField.js +338 -338
- package/dist/shared/components/item-edit/RecordRecapChanges.js +116 -74
- package/dist/shared/components/item-edit/RecordRecapStrip.js +148 -160
- package/dist/shared/components/item-edit/summary-layout-request.js +15 -0
- package/dist/shared/components/layout-editor/parity-keys.json.js +1 -1
- package/dist/shared/components/layout-editor/settings/ResolveSettings.js +226 -157
- package/dist/shared/components/layout-editor/settings/WhoSection.js +53 -52
- package/dist/shared/components/layout-editor/settings/controls.js +98 -90
- package/dist/shared/components/layout-editor/settings/settings-registry.js +8 -0
- package/dist/shared/components/queue/QueueWorklist.js +556 -545
- package/dist/shared/components/support/RequestList.js +2 -2
- package/dist/shared/lib/layout-resolve.js +64 -48
- package/package.json +1 -1
|
@@ -2,25 +2,25 @@ import { jsxs as d, Fragment as Ce, jsx as a } from "react/jsx-runtime";
|
|
|
2
2
|
import { useSensors as Js, useSensor as Ys, PointerSensor as zs, DndContext as Xs, closestCenter as Zs } from "@dnd-kit/core";
|
|
3
3
|
import { SortableContext as ei, verticalListSortingStrategy as ti, arrayMove as ni, useSortable as ri } from "@dnd-kit/sortable";
|
|
4
4
|
import { CSS as ai } from "@dnd-kit/utilities";
|
|
5
|
-
import { useQueryClient as oi, useQuery as re, useMutation as
|
|
6
|
-
import { AlertTriangle as li, RefreshCw as si, Plus as
|
|
7
|
-
import { useState as N, useRef as
|
|
5
|
+
import { useQueryClient as oi, useQuery as re, useMutation as je, useQueries as nt } from "@tanstack/react-query";
|
|
6
|
+
import { AlertTriangle as li, RefreshCw as si, Plus as qn, 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
|
+
import { useState as N, useRef as L, useMemo as W, useEffect as K } from "react";
|
|
8
8
|
import { createPortal as Wo } from "react-dom";
|
|
9
|
-
import { toast as
|
|
9
|
+
import { toast as P } from "sonner";
|
|
10
10
|
import { useNivaroClient as ul, useItemEditAuth as Ho, useItemNavigation as Ci, useNavigation as $i, useOverlayState as Ri } from "../../context.js";
|
|
11
11
|
import { useDebounced as Ti } from "../../hooks/useDebounced.js";
|
|
12
|
-
import { useElapsedLoading as
|
|
13
|
-
import { useSlowReason as
|
|
12
|
+
import { useElapsedLoading as Oi } from "../../hooks/useElapsedLoading.js";
|
|
13
|
+
import { useSlowReason as Li } from "../../hooks/useSlowReason.js";
|
|
14
14
|
import { useBulkProgressFeed as Fi } from "../../lib/bulk-progress.js";
|
|
15
15
|
import { get as D, post as ge, patch as Io, del as qr, put as Ai } from "../../lib/commands.js";
|
|
16
16
|
import { useConfigUpdateRefresh as qi } from "../../lib/config-update-refresh.js";
|
|
17
|
-
import { useDeadlineNow as Ei, liveDeadlineStatus as
|
|
17
|
+
import { useDeadlineNow as Ei, liveDeadlineStatus as Ki, dueInText as Pi } from "../../lib/deadline-ticker.js";
|
|
18
18
|
import { deepenForLightSurface as Di } from "../../lib/display-prefs.js";
|
|
19
19
|
import { evaluateExpression as Mi } from "../../lib/expression.js";
|
|
20
|
-
import { clauseFromControlValue as Bi, filterSentence as
|
|
21
|
-
import { releaseLiveOwner as
|
|
20
|
+
import { clauseFromControlValue as Bi, filterSentence as Qi } from "../../lib/filter-sentence.js";
|
|
21
|
+
import { releaseLiveOwner as ji, 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 Er, queueServerSort as
|
|
23
|
+
import { QUEUE_IN_STEP_COLUMN as Er, queueServerSort as Kr } from "../../lib/in-step.js";
|
|
24
24
|
import { createCursorBook as Vi, pageRequest as Gi, noteNextCursor as Wi } from "../../lib/keyset-pager.js";
|
|
25
25
|
import { normalizeInlineEdit as Hi, inlineM2oTarget as Ii, inlineChoices as Ji, inlineEditFor as Yi, nextInlineKey as zi } from "../../lib/list-inline-edit.js";
|
|
26
26
|
import { sanitizeQueueLinkState as Xi, readListLinkFromLocation as Zi, dropListLinkParam as ec, encodeListLink as tc, replaceListLinkParam as nc } from "../../lib/list-link.js";
|
|
@@ -34,15 +34,15 @@ import { listTrailDetail as Nc, setTrailDetail as Sc } from "../../lib/nav-trail
|
|
|
34
34
|
import { OPEN_IN_TABS_CAP as Cc, openInTabs as $c, openInTabsMessage as Xo } from "../../lib/open-in-tabs.js";
|
|
35
35
|
import { isOwnWrite as Rc } from "../../lib/own-writes.js";
|
|
36
36
|
import { usePrefetchIntent as Tc } from "../../lib/prefetch.js";
|
|
37
|
-
import { useRowPresence as
|
|
38
|
-
import { queryKeys as
|
|
37
|
+
import { useRowPresence as Oc, rowPresenceKey as Zo } from "../../lib/presence-hooks.js";
|
|
38
|
+
import { queryKeys as Lc } from "../../lib/query-keys.js";
|
|
39
39
|
import { buildGroups as Fc } from "../../lib/queue-grouping.js";
|
|
40
40
|
import { cascadeFilter as Ac, fetchCascadeRelations as qc } from "../../lib/quick-filter-cascade.js";
|
|
41
41
|
import { useOptionalRealtime as Ec } from "../../lib/realtime.js";
|
|
42
42
|
import { copyIdText as el } from "../../lib/record-ref.js";
|
|
43
|
-
import { rowHighlightTextClass as
|
|
44
|
-
import { userErrorMessage as
|
|
45
|
-
import { useSelectionPicks as Dc, splitSelKey as
|
|
43
|
+
import { rowHighlightTextClass as Kc, rowHighlightClass as Pc } from "../../lib/row-highlight.js";
|
|
44
|
+
import { userErrorMessage as $t } from "../../lib/safe-error.js";
|
|
45
|
+
import { useSelectionPicks as Dc, splitSelKey as Pr, useSelectionLiveMarks as Mc, useSelectionChanges as Bc, useSelectedRowMemory as Qc, selectionSums as jc } from "../../lib/selection-watch.js";
|
|
46
46
|
import { listViewInput as Uc } from "../../lib/send-view.js";
|
|
47
47
|
import { useTableDensity as Vc } from "../../lib/table-density.js";
|
|
48
48
|
import { useMyScopes as Gc, matchScopeDimension as Wc } from "../../lib/use-my-scopes.js";
|
|
@@ -70,23 +70,23 @@ import { readQueueReturn as Sd, queueReturnApplies as Cd, writeQueueReturn as ol
|
|
|
70
70
|
import { ListLoadError as $d } from "../ListLoadError.js";
|
|
71
71
|
import { LiveCount as Mr } from "../LiveCount.js";
|
|
72
72
|
import { LivePauseButton as Rd, LiveBurstPill as Td } from "../LiveListControls.js";
|
|
73
|
-
import { LiveRowMark as
|
|
73
|
+
import { LiveRowMark as Od, MovingRowChip as Ld } from "../LiveRowMark.js";
|
|
74
74
|
import { CopyListLinkButton as Fd } from "../list/CopyListLinkButton.js";
|
|
75
75
|
import { useInlineEdit as Ad, InlineEditCell as qd } from "../list/InlineEdit.js";
|
|
76
76
|
import { ListViewers as ll } from "../list/ListViewers.js";
|
|
77
77
|
import { OverflowRail as Ed } from "../OverflowRail.js";
|
|
78
|
-
import { usePickerExcludedRows as
|
|
78
|
+
import { usePickerExcludedRows as Kd, PICKER_EXCLUDED_ROW_CLASS as Pd, PICKER_EXCLUDED_TITLE as Dd } from "../PickerExcludedRows.js";
|
|
79
79
|
import { RealtimeStaleMark as Md } from "../RealtimeStatusBanner.js";
|
|
80
80
|
import { RecordDrilldownSheet as Bd } from "../RecordDrilldownSheet.js";
|
|
81
|
-
import { RowHighlightLegend as
|
|
82
|
-
import { RowPresence as
|
|
81
|
+
import { RowHighlightLegend as Qd } from "../RowHighlightLegend.js";
|
|
82
|
+
import { RowPresence as jd } from "../RowPresence.js";
|
|
83
83
|
import { SendViewButton as Ud } from "../send-view/SendViewButton.js";
|
|
84
84
|
import { UnseenDot as Vd } from "../UnseenDot.js";
|
|
85
85
|
import { Badge as Gd } from "../ui/badge.js";
|
|
86
86
|
import { Checkbox as Ur } from "../ui/checkbox.js";
|
|
87
87
|
import { Command as sl, CommandInput as Wd, CommandList as il, CommandEmpty as Hd, CommandItem as sn } from "../ui/command.js";
|
|
88
88
|
import { Label as Id } from "../ui/label.js";
|
|
89
|
-
import { Popover as
|
|
89
|
+
import { Popover as Rt, PopoverTrigger as Tt, PopoverContent as Ot } from "../ui/popover.js";
|
|
90
90
|
import { Skeleton as ml } from "../ui/skeleton.js";
|
|
91
91
|
import { dedupeChooserKeys as Jd } from "./column-chooser.js";
|
|
92
92
|
import { groupSumPathsFor as Yd } from "./group-sums.js";
|
|
@@ -100,10 +100,10 @@ import { QueueKanbanBoard as ou } from "./QueueKanbanBoard.js";
|
|
|
100
100
|
import { QueueQuickFilters as lu } from "./QueueQuickFilters.js";
|
|
101
101
|
import { QueueTeamStrip as su } from "./QueueTeamStrip.js";
|
|
102
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
|
|
103
|
+
import { queueTotalColumns as cu, queueTotalPaths as du, queueTotalValue as uu, formulaTotalFormat as mu, queueTotalTip as pu, queueTotalsEligibleKey as Br, queueTotalsStoreKey as En, queueTotalsSupport as fu } from "./queue-totals.js";
|
|
104
104
|
import { useTransitionNote as bu, needsTransitionNote as hu } from "./transition-note.js";
|
|
105
105
|
import { worklistCsv as yu, worklistCsvName as gu } from "./worklist-csv.js";
|
|
106
|
-
import { extraValueText as cl, formulaColumnKeys as xu, extraChoiceText as
|
|
106
|
+
import { extraValueText as cl, formulaColumnKeys as xu, extraChoiceText as Qr, atRiskBreakdown as dl, queuePinKeepRank as ku, worklistKeyTarget as vu } from "./worklist-helpers.js";
|
|
107
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: "—" });
|
|
@@ -131,7 +131,7 @@ function wu({ summary: l }) {
|
|
|
131
131
|
}
|
|
132
132
|
);
|
|
133
133
|
}
|
|
134
|
-
const _u = 50, Nu = [],
|
|
134
|
+
const _u = 50, Nu = [], ot = "nivaro_addendums", jr = [
|
|
135
135
|
{ value: "mine", label: "My Items" },
|
|
136
136
|
{ value: "unowned", label: "No Owners" },
|
|
137
137
|
{ value: "claimed", label: "Claimed by me" },
|
|
@@ -176,9 +176,9 @@ function $u({
|
|
|
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 = Ei(I), y = I ?
|
|
179
|
+
const M = { warning_at: S ?? null, due_at: q ?? null }, I = !!l && !!q, B = Ei(I), y = I ? Ki(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 ? Pi(M, B) : null, j = 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
|
{
|
|
@@ -186,7 +186,7 @@ function $u({
|
|
|
186
186
|
"data-tip": z ? `SLA ${f === "ok" ? "on track" : f}` : void 0,
|
|
187
187
|
className: F(
|
|
188
188
|
"whitespace-nowrap rounded px-1.5 py-0.5 text-[11px] font-medium tabular-nums transition-colors duration-500",
|
|
189
|
-
|
|
189
|
+
j
|
|
190
190
|
),
|
|
191
191
|
children: z ?? f
|
|
192
192
|
}
|
|
@@ -195,7 +195,7 @@ function $u({
|
|
|
195
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
|
+
(j, $e) => `${$e === 0 ? "M" : "L"}${($e * f).toFixed(1)},${(M - 2 - (j - B) / y * (M - 4)).toFixed(1)}`
|
|
199
199
|
).join(" ");
|
|
200
200
|
return /* @__PURE__ */ a(
|
|
201
201
|
"svg",
|
|
@@ -218,7 +218,7 @@ function cn({
|
|
|
218
218
|
trend: y,
|
|
219
219
|
delta: f,
|
|
220
220
|
deltaBadIsUp: z,
|
|
221
|
-
breakdown:
|
|
221
|
+
breakdown: j,
|
|
222
222
|
onClick: $e
|
|
223
223
|
}) {
|
|
224
224
|
return /* @__PURE__ */ a(
|
|
@@ -229,7 +229,7 @@ function cn({
|
|
|
229
229
|
"aria-pressed": M,
|
|
230
230
|
"aria-label": [
|
|
231
231
|
q != null ? `${ne(q)} of ${ne(S)} ${l}` : `${ne(S)} ${l}`,
|
|
232
|
-
|
|
232
|
+
j || null,
|
|
233
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(
|
|
@@ -265,12 +265,12 @@ function cn({
|
|
|
265
265
|
children: l
|
|
266
266
|
}
|
|
267
267
|
),
|
|
268
|
-
|
|
268
|
+
j && /* @__PURE__ */ a(
|
|
269
269
|
"span",
|
|
270
270
|
{
|
|
271
271
|
"data-stat-breakdown": !0,
|
|
272
272
|
className: "whitespace-nowrap text-[11px] leading-none text-slate-600 dark:text-slate-300",
|
|
273
|
-
children:
|
|
273
|
+
children: j
|
|
274
274
|
}
|
|
275
275
|
),
|
|
276
276
|
f != null && f !== 0 && /* @__PURE__ */ d(
|
|
@@ -329,18 +329,18 @@ function Tu({
|
|
|
329
329
|
);
|
|
330
330
|
}
|
|
331
331
|
const Ue = tu;
|
|
332
|
-
function
|
|
332
|
+
function Ou({
|
|
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:
|
|
338
|
+
const { attributes: I, listeners: B, setNodeRef: y, transform: f, transition: z, isDragging: j } = ri({
|
|
339
339
|
id: l
|
|
340
340
|
}), $e = {
|
|
341
341
|
transform: ai.Transform.toString(f),
|
|
342
342
|
transition: z,
|
|
343
|
-
opacity:
|
|
343
|
+
opacity: j ? 0.4 : 1
|
|
344
344
|
}, b = `col-toggle-${l}`;
|
|
345
345
|
return /* @__PURE__ */ d("div", { ref: y, style: $e, className: "flex items-center gap-2 text-[12px]", children: [
|
|
346
346
|
/* @__PURE__ */ a(
|
|
@@ -364,27 +364,27 @@ function qp({
|
|
|
364
364
|
viewersInHeader: I = !1,
|
|
365
365
|
onAsk: B
|
|
366
366
|
}) {
|
|
367
|
-
var No, So, Co, $o, Ro, To,
|
|
368
|
-
const y = oi(), f = ul(), { userId: z } = Ho(),
|
|
369
|
-
() => nl(
|
|
370
|
-
), Ir =
|
|
371
|
-
Ir.current !== l && (Ir.current = l,
|
|
372
|
-
const
|
|
367
|
+
var No, So, Co, $o, Ro, To, Oo, Lo, Fo, Ao, qo, Eo, Ko, Po, Do, Mo, Bo, Qo, jo, Uo;
|
|
368
|
+
const y = oi(), f = ul(), { userId: z } = Ho(), j = Ci(), { navigate: $e } = $i(), [b, me] = N("all"), [se, Q] = N(1), Vr = L(Vi()), [Lt, pl] = Vc(), [C, lt] = N("table"), [U, st] = N(""), [x, V] = N({}), [Ft, Gr] = N(() => /* @__PURE__ */ new Set()), [R, At] = N(null), [xe, Kn] = N(/* @__PURE__ */ new Set()), [qt, Pn] = N(null), [it, Dn] = N(null), [Wr, dn] = N({}), [Hr, Mn] = N(
|
|
369
|
+
() => nl(En(l), Br)
|
|
370
|
+
), Ir = L(l);
|
|
371
|
+
Ir.current !== l && (Ir.current = l, Mn(nl(En(l), Br)), dn({}));
|
|
372
|
+
const ct = W(
|
|
373
373
|
() => ud(Wr, Hr),
|
|
374
374
|
[Wr, Hr]
|
|
375
|
-
), fl = (e, t) =>
|
|
375
|
+
), fl = (e, t) => Mn((n) => {
|
|
376
376
|
const r = fd(n, e, t);
|
|
377
|
-
return rl(
|
|
378
|
-
}), [
|
|
379
|
-
|
|
380
|
-
const
|
|
381
|
-
|
|
382
|
-
const
|
|
383
|
-
Dt.current =
|
|
384
|
-
const mn =
|
|
377
|
+
return rl(En(l), r), r;
|
|
378
|
+
}), [Bn, un] = N(0), Qn = L(0), be = hc(), dt = Ec(), jn = L({}).current, Jr = L(/* @__PURE__ */ new Set()), [Yr, bl] = N(0), [zr, hl] = N(0), he = L(!1), Et = L(null), Kt = L([]), Xr = L(null), Un = L(!1), Vn = L(0), Gn = L("table");
|
|
379
|
+
Gn.current = C;
|
|
380
|
+
const Wn = L(!1);
|
|
381
|
+
Wn.current = C === "table" && !!R;
|
|
382
|
+
const Pt = gc(), Dt = L(Pt);
|
|
383
|
+
Dt.current = Pt;
|
|
384
|
+
const mn = L(null), Pe = xc(l ? `queue:${l}` : null, (e) => {
|
|
385
385
|
if (!_c(e) && mn.current) return mn.current(e);
|
|
386
386
|
Ta();
|
|
387
|
-
}),
|
|
387
|
+
}), Hn = Pe.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
|
|
@@ -394,8 +394,8 @@ function qp({
|
|
|
394
394
|
[["queue-meta", l]],
|
|
395
395
|
{ enabled: !!l }
|
|
396
396
|
);
|
|
397
|
-
const { scopes: bn, ready: Zr } = Gc(), ea =
|
|
398
|
-
|
|
397
|
+
const { scopes: bn, ready: Zr } = Gc(), ea = L(!1), [ta, na] = N(!1), [Re, yl] = N({}), ke = L({});
|
|
398
|
+
K(() => {
|
|
399
399
|
if (ea.current || !Zr || !s) return;
|
|
400
400
|
ea.current = !0;
|
|
401
401
|
const e = (s.extra_field_meta ?? []).filter(
|
|
@@ -436,13 +436,13 @@ function qp({
|
|
|
436
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
438
|
}, [Zr, bn, s]);
|
|
439
|
-
const
|
|
440
|
-
queryKey: ["queue-browser-quick-filters",
|
|
441
|
-
queryFn: () => f.request(D(`/collections/${
|
|
439
|
+
const ut = ((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
|
+
queryKey: ["queue-browser-quick-filters", ut],
|
|
441
|
+
queryFn: () => f.request(D(`/collections/${ut}`)).then((e) => {
|
|
442
442
|
var t, n;
|
|
443
443
|
return ((n = (t = e.data) == null ? void 0 : t.browser_config) == null ? void 0 : n.quick_filters) ?? [];
|
|
444
444
|
}).catch(() => []),
|
|
445
|
-
enabled: !!
|
|
445
|
+
enabled: !!ut,
|
|
446
446
|
staleTime: 3e5
|
|
447
447
|
}), pe = W(() => {
|
|
448
448
|
const e = /* @__PURE__ */ new Set(), t = [];
|
|
@@ -451,7 +451,7 @@ function qp({
|
|
|
451
451
|
return t;
|
|
452
452
|
}, [s == null ? void 0 : s.sources]), hn = Hc(
|
|
453
453
|
pe.length === 1 ? pe[0] : null
|
|
454
|
-
),
|
|
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"], 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)
|
|
@@ -461,16 +461,16 @@ function qp({
|
|
|
461
461
|
), A = (e, t) => {
|
|
462
462
|
var n, r;
|
|
463
463
|
return ((r = (n = s == null ? void 0 : s.column_aliases) == null ? void 0 : n[e]) == null ? void 0 : r.trim()) || t;
|
|
464
|
-
}, aa =
|
|
465
|
-
|
|
466
|
-
!s || aa.current || (aa.current = !0,
|
|
464
|
+
}, aa = L(!1);
|
|
465
|
+
K(() => {
|
|
466
|
+
!s || aa.current || (aa.current = !0, st("-priority"));
|
|
467
467
|
}, [s]);
|
|
468
468
|
const [G, xl] = N(!1);
|
|
469
|
-
|
|
470
|
-
s != null && s.display_config && !Ve.includes(C) &&
|
|
471
|
-
}, [s, C, Ve]),
|
|
469
|
+
K(() => {
|
|
470
|
+
s != null && s.display_config && !Ve.includes(C) && lt(Ve[0]);
|
|
471
|
+
}, [s, C, Ve]), K(() => {
|
|
472
472
|
if (!(s != null && s.sources)) return;
|
|
473
|
-
const e =
|
|
473
|
+
const e = dt ? ($, w) => dt.subscribeCollections($, w) : S == null ? void 0 : S.subscribe;
|
|
474
474
|
if (!e) return;
|
|
475
475
|
const t = [
|
|
476
476
|
...new Set(
|
|
@@ -486,8 +486,8 @@ function qp({
|
|
|
486
486
|
}, 2500));
|
|
487
487
|
}, m = () => {
|
|
488
488
|
o || (o = setTimeout(() => {
|
|
489
|
-
if (o = null,
|
|
490
|
-
|
|
489
|
+
if (o = null, Vn.current > 0 || Un.current) {
|
|
490
|
+
Kt.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] });
|
|
@@ -500,42 +500,42 @@ function qp({
|
|
|
500
500
|
(_) => _ ? mc(_) : [_]
|
|
501
501
|
), ue = (_) => {
|
|
502
502
|
var le;
|
|
503
|
-
return !!_ && !_.action && !!((le = _.changed_fields) != null && le.length) && _.changed_fields.every((
|
|
503
|
+
return !!_ && !_.action && !!((le = _.changed_fields) != null && le.length) && _.changed_fields.every((Ct) => Ct.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
|
+
})), An = te.length > 0 && Dt.current.tracker.push(te);
|
|
508
|
+
An && Dt.current.publish();
|
|
509
509
|
for (const _ of Se) {
|
|
510
|
-
const le = _ == null ? void 0 : _.changed_fields,
|
|
511
|
-
if (
|
|
512
|
-
if (_ && !_.action && (le != null && le.length) && le.every((
|
|
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((
|
|
514
|
-
const
|
|
510
|
+
const le = _ == null ? void 0 : _.changed_fields, Ct = (_ == null ? void 0 : _.collection) != null ? `${_.collection}:${String(_.item)}` : null, Fr = Ct != null && Jr.current.has(Ct);
|
|
511
|
+
if (An && !ue(_)) continue;
|
|
512
|
+
if (_ && !_.action && (le != null && le.length) && le.every((Qe) => Qe.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) && bl((Qe) => Qe + 1), le.includes(at.sla) && (de = !0), le.includes(at.owners) && Fr && (w = !0), le.includes(at.state)) {
|
|
514
|
+
const Qe = Zd(
|
|
515
515
|
Fr,
|
|
516
|
-
|
|
516
|
+
Gn.current === "kanban" || Wn.current
|
|
517
517
|
);
|
|
518
|
-
de = !0,
|
|
518
|
+
de = !0, Qe.refresh && (w = !0), Z += Qe.pill;
|
|
519
519
|
}
|
|
520
520
|
r || (r = setTimeout(() => {
|
|
521
521
|
r = null;
|
|
522
|
-
for (const
|
|
522
|
+
for (const Qe of n) y.invalidateQueries({ queryKey: [Qe] });
|
|
523
523
|
n.clear();
|
|
524
524
|
}, 300));
|
|
525
525
|
continue;
|
|
526
526
|
}
|
|
527
527
|
de = !0;
|
|
528
528
|
const Is = (_ == null ? void 0 : _.collection) != null && Rc(_.collection, _.item);
|
|
529
|
-
|
|
529
|
+
Ct && (Fr || (_ == null ? void 0 : _.action) === "create" || Gn.current === "kanban" || Wn.current) ? (w = !0, Is || Kt.current.push({ key: Ct, by: null })) : Z += 1;
|
|
530
530
|
}
|
|
531
|
-
Z > 0 && (
|
|
531
|
+
Z > 0 && (Qn.current += Z), w && m(), de && u();
|
|
532
532
|
}, T = ($) => Ui(jn, $, h);
|
|
533
533
|
mn.current = T;
|
|
534
|
-
const v = e(t, ($) =>
|
|
534
|
+
const v = e(t, ($) => Hn([$ ?? {}], T));
|
|
535
535
|
return () => {
|
|
536
|
-
Et.current = null, v(), mn.current = null,
|
|
536
|
+
Et.current = null, v(), mn.current = null, ji(jn), r && clearTimeout(r), o && clearTimeout(o), c && clearTimeout(c);
|
|
537
537
|
};
|
|
538
|
-
}, [
|
|
538
|
+
}, [dt, S, s == null ? void 0 : s.sources, y, l, z, jn, Hn]), uc(
|
|
539
539
|
"owners:changed",
|
|
540
540
|
(e) => {
|
|
541
541
|
var t;
|
|
@@ -545,7 +545,7 @@ function qp({
|
|
|
545
545
|
},
|
|
546
546
|
{ debounceMs: 600 }
|
|
547
547
|
);
|
|
548
|
-
const ve = Ti(x, 350), kl = JSON.stringify(ve) === JSON.stringify(x),
|
|
548
|
+
const ve = Ti(x, 350), kl = JSON.stringify(ve) === JSON.stringify(x), Jn = L(!1), ie = C === "table" && !!R, oa = Yd(s), vl = W(
|
|
549
549
|
() => {
|
|
550
550
|
var e;
|
|
551
551
|
return {
|
|
@@ -559,7 +559,7 @@ function qp({
|
|
|
559
559
|
};
|
|
560
560
|
},
|
|
561
561
|
[s]
|
|
562
|
-
), Mt = (e) => fu(e, vl),
|
|
562
|
+
), Mt = (e) => fu(e, vl), mt = cu(ct, Mt), la = C === "table" && !ie && mt.length > 0, Bt = la ? du(mt, Mt) : [], Oe = (() => {
|
|
563
563
|
const e = {};
|
|
564
564
|
for (const [t, n] of Object.entries(ve))
|
|
565
565
|
if (n) {
|
|
@@ -576,18 +576,18 @@ function qp({
|
|
|
576
576
|
}
|
|
577
577
|
return e;
|
|
578
578
|
})();
|
|
579
|
-
function
|
|
580
|
-
V((n) => ({ ...n, [e]: n[e] === t ? "" : t })),
|
|
579
|
+
function pt(e, t) {
|
|
580
|
+
V((n) => ({ ...n, [e]: n[e] === t ? "" : t })), Q(1);
|
|
581
581
|
}
|
|
582
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
|
+
}), Q(1);
|
|
587
587
|
}
|
|
588
588
|
const _l = Array.isArray(x.state) ? x.state : x.state ? [x.state] : [], Nl = (e) => !e || Array.isArray(e) && e.length === 0;
|
|
589
589
|
function Sl() {
|
|
590
|
-
V({ ...ke.current }), me("all"),
|
|
590
|
+
V({ ...ke.current }), me("all"), Q(1);
|
|
591
591
|
}
|
|
592
592
|
const [We, Cl] = N(() => {
|
|
593
593
|
try {
|
|
@@ -596,7 +596,7 @@ function qp({
|
|
|
596
596
|
return !1;
|
|
597
597
|
}
|
|
598
598
|
});
|
|
599
|
-
|
|
599
|
+
K(() => {
|
|
600
600
|
try {
|
|
601
601
|
localStorage.setItem("nvr_queue_insights_open", We ? "1" : "0");
|
|
602
602
|
} catch {
|
|
@@ -615,19 +615,19 @@ function qp({
|
|
|
615
615
|
digest_frequency: "instant"
|
|
616
616
|
})
|
|
617
617
|
)).then(() => {
|
|
618
|
-
|
|
618
|
+
P.success(
|
|
619
619
|
t ? "Unsubscribed" : "Subscribed — new arrivals in this view notify you"
|
|
620
620
|
), y.invalidateQueries({ queryKey: ["queue-view-subs", l] });
|
|
621
|
-
}).catch((r) =>
|
|
622
|
-
}, [sa,
|
|
621
|
+
}).catch((r) => P.error($t(r, "Failed")));
|
|
622
|
+
}, [sa, Yn] = N(null), zn = [
|
|
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
626
|
], { data: Tl = {} } = re({
|
|
627
|
-
queryKey: ["queue-custom-actions", l,
|
|
627
|
+
queryKey: ["queue-custom-actions", l, zn.join(",")],
|
|
628
628
|
queryFn: async () => {
|
|
629
629
|
const e = {};
|
|
630
|
-
for (const t of
|
|
630
|
+
for (const t of zn.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 qp({
|
|
|
638
638
|
}
|
|
639
639
|
return e;
|
|
640
640
|
},
|
|
641
|
-
enabled:
|
|
641
|
+
enabled: zn.length > 0,
|
|
642
642
|
staleTime: 6e4
|
|
643
|
-
}),
|
|
643
|
+
}), Ol = (e) => Tl[e] ?? [], Ll = (e, t) => {
|
|
644
644
|
f.request(ge(`/custom-actions/${e.id}/execute`, { item: t.item_id })).then(() => {
|
|
645
|
-
|
|
645
|
+
P.success(`${e.label} ran`), y.invalidateQueries({ queryKey: ["queue-items", l] });
|
|
646
646
|
}).catch((n) => {
|
|
647
647
|
const r = n.response;
|
|
648
|
-
|
|
648
|
+
P.error((r == null ? void 0 : r.error) ?? $t(n, `${e.label} failed`));
|
|
649
649
|
});
|
|
650
|
-
}, { data:
|
|
650
|
+
}, { data: Xn = [] } = 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
|
|
@@ -660,18 +660,18 @@ function qp({
|
|
|
660
660
|
})
|
|
661
661
|
).then(() => {
|
|
662
662
|
y.invalidateQueries({ queryKey: ["queue-items", l] }), y.invalidateQueries({ queryKey: ["queue-triage-labels", l] });
|
|
663
|
-
}).catch((n) =>
|
|
663
|
+
}).catch((n) => P.error($t(n, "Label failed")));
|
|
664
664
|
}, [Fl] = N(() => oc(`queue:${l}`)), [Al, ql] = N(
|
|
665
665
|
() => Yo(Fl) !== "fresh"
|
|
666
666
|
), {
|
|
667
667
|
data: i,
|
|
668
668
|
isLoading: ca,
|
|
669
|
-
isFetching:
|
|
670
|
-
isPlaceholderData:
|
|
669
|
+
isFetching: Qt,
|
|
670
|
+
isPlaceholderData: Zn,
|
|
671
671
|
dataUpdatedAt: ce,
|
|
672
672
|
isError: da,
|
|
673
673
|
error: El,
|
|
674
|
-
refetch:
|
|
674
|
+
refetch: Kl
|
|
675
675
|
} = re({
|
|
676
676
|
queryKey: [
|
|
677
677
|
"queue-items",
|
|
@@ -684,13 +684,13 @@ function qp({
|
|
|
684
684
|
Bt.join(",")
|
|
685
685
|
],
|
|
686
686
|
queryFn: async () => {
|
|
687
|
-
const e = !ie && C === "table", t = JSON.stringify([l, b, U,
|
|
687
|
+
const e = !ie && C === "table", t = JSON.stringify([l, b, U, Oe, 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:
|
|
693
|
-
filters: JSON.stringify(
|
|
692
|
+
sort: Kr(U),
|
|
693
|
+
filters: JSON.stringify(Oe),
|
|
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 ? {
|
|
@@ -709,24 +709,24 @@ function qp({
|
|
|
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 && (Jn.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 && !
|
|
720
|
-
const
|
|
719
|
+
i && !Jn.current && (Jn.current = !0);
|
|
720
|
+
const ft = Object.entries(ke.current).filter(
|
|
721
721
|
([e, t]) => {
|
|
722
722
|
var n;
|
|
723
|
-
return !((n = Re[e.slice(6)]) != null && n.length) && JSON.stringify(
|
|
723
|
+
return !((n = Re[e.slice(6)]) != null && n.length) && JSON.stringify(Oe[e] ?? null) === JSON.stringify(t);
|
|
724
724
|
}
|
|
725
|
-
).map(([e]) => e), ua =
|
|
726
|
-
Object.entries(
|
|
727
|
-
), { data:
|
|
725
|
+
).map(([e]) => e), ua = ft.length > 0 && Object.keys(Oe).every((e) => ft.includes(e)), ma = Object.fromEntries(
|
|
726
|
+
Object.entries(Oe).filter(([e]) => !ft.includes(e))
|
|
727
|
+
), { data: Pl } = re({
|
|
728
728
|
queryKey: ["queue-default-hidden", l, b, ma],
|
|
729
|
-
enabled: !!l && !!i && !
|
|
729
|
+
enabled: !!l && !!i && !Qt && i.total === 0 && ((Co = i.empty) == null ? void 0 : Co.reason) === "filters" && ft.length > 0 && !ua,
|
|
730
730
|
staleTime: 3e4,
|
|
731
731
|
retry: !1,
|
|
732
732
|
queryFn: () => f.request(
|
|
@@ -737,14 +737,14 @@ function qp({
|
|
|
737
737
|
limit: 1
|
|
738
738
|
})
|
|
739
739
|
).then((e) => Number(e.total ?? 0))
|
|
740
|
-
}),
|
|
740
|
+
}), Le = ua ? Math.max(0, ((($o = i == null ? void 0 : i.stats) == null ? void 0 : $o.total) ?? 0) - ((i == null ? void 0 : i.total) ?? 0)) : Pl ?? 0, pa = (e) => ft.map(e).join(" and "), fa = () => {
|
|
741
741
|
V((e) => {
|
|
742
742
|
const t = { ...e };
|
|
743
|
-
for (const n of
|
|
743
|
+
for (const n of ft) delete t[n];
|
|
744
744
|
return t;
|
|
745
|
-
}),
|
|
745
|
+
}), Q(1);
|
|
746
746
|
};
|
|
747
|
-
|
|
747
|
+
K(() => {
|
|
748
748
|
if (typeof window > "u" || !ce) return;
|
|
749
749
|
const e = window;
|
|
750
750
|
e.__nvrQueueTrace || (e.__nvrQueueTrace = []);
|
|
@@ -758,14 +758,14 @@ function qp({
|
|
|
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
|
|
761
|
+
const bt = ca && !i || !G || !ta && !i, ba = (Qt && !ca || Zn && Qt) && !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 =
|
|
768
|
-
pending:
|
|
767
|
+
}, [ie, i == null ? void 0 : i.data, X, ee]), ya = Oc(Dl), xn = bu(), ga = Oi(Qt && !he.current), Ml = Li({
|
|
768
|
+
pending: Qt && !he.current,
|
|
769
769
|
request: l != null ? { method: "GET", url: `/queues/${l}/items` } : null,
|
|
770
770
|
noun: "items"
|
|
771
771
|
}), Bl = Tc();
|
|
@@ -790,7 +790,7 @@ function qp({
|
|
|
790
790
|
})
|
|
791
791
|
);
|
|
792
792
|
}
|
|
793
|
-
const
|
|
793
|
+
const Ql = je({
|
|
794
794
|
mutationFn: async ({ item: e, targetState: t }) => {
|
|
795
795
|
await xa(e, t);
|
|
796
796
|
},
|
|
@@ -798,9 +798,9 @@ function qp({
|
|
|
798
798
|
y.invalidateQueries({ queryKey: ["queue-items", l, b] });
|
|
799
799
|
},
|
|
800
800
|
onError: (e) => {
|
|
801
|
-
|
|
801
|
+
P.error($t(e, "Failed to move item")), y.invalidateQueries({ queryKey: ["queue-items", l, b] });
|
|
802
802
|
}
|
|
803
|
-
}), He =
|
|
803
|
+
}), He = je({
|
|
804
804
|
mutationFn: (e) => f.request(
|
|
805
805
|
ge(`/queues/${l}/claim`, {
|
|
806
806
|
source_collection: e.collection,
|
|
@@ -808,8 +808,8 @@ function qp({
|
|
|
808
808
|
})
|
|
809
809
|
),
|
|
810
810
|
onSuccess: () => y.invalidateQueries({ queryKey: ["queue-items", l, b] }),
|
|
811
|
-
onError: () =>
|
|
812
|
-
}),
|
|
811
|
+
onError: () => P.error("Failed to claim item")
|
|
812
|
+
}), ht = je({
|
|
813
813
|
mutationFn: (e) => f.request(
|
|
814
814
|
ge(`/queues/${l}/release`, {
|
|
815
815
|
source_collection: e.collection,
|
|
@@ -817,15 +817,15 @@ function qp({
|
|
|
817
817
|
})
|
|
818
818
|
),
|
|
819
819
|
onSuccess: () => y.invalidateQueries({ queryKey: ["queue-items", l, b] }),
|
|
820
|
-
onError: () =>
|
|
821
|
-
}), { data:
|
|
820
|
+
onError: () => P.error("Failed to release item")
|
|
821
|
+
}), { data: yt } = re({
|
|
822
822
|
queryKey: ["queue-column-prefs", l],
|
|
823
823
|
queryFn: () => f.request(D(`/queues/${l}/column-prefs`)),
|
|
824
824
|
enabled: !!l
|
|
825
|
-
}), [
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
}, [
|
|
825
|
+
}), [jt, kn] = N(null), [gt, er] = N(null);
|
|
826
|
+
K(() => {
|
|
827
|
+
yt && er(yt.data.default_view_id);
|
|
828
|
+
}, [yt]);
|
|
829
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
831
|
), wn = nt({
|
|
@@ -844,8 +844,8 @@ function qp({
|
|
|
844
844
|
queryFn: () => f.request(
|
|
845
845
|
D(`/queues/${l}/items`, {
|
|
846
846
|
scope: b,
|
|
847
|
-
sort:
|
|
848
|
-
filters: JSON.stringify(
|
|
847
|
+
sort: Kr(U),
|
|
848
|
+
filters: JSON.stringify(Oe),
|
|
849
849
|
group_by: R,
|
|
850
850
|
group_key: e,
|
|
851
851
|
page: t,
|
|
@@ -855,9 +855,9 @@ function qp({
|
|
|
855
855
|
enabled: !!i && ie,
|
|
856
856
|
placeholderData: (n) => n
|
|
857
857
|
}))
|
|
858
|
-
}),
|
|
859
|
-
(!
|
|
860
|
-
const Ul =
|
|
858
|
+
}), jl = wn.some((e) => e.isFetching), tr = L("");
|
|
859
|
+
(!jl || !tr.current) && (tr.current = wn.map((e) => e.dataUpdatedAt).join(","));
|
|
860
|
+
const Ul = tr.current, nr = W(() => {
|
|
861
861
|
const e = /* @__PURE__ */ new Map();
|
|
862
862
|
return wn.forEach((t, n) => {
|
|
863
863
|
if (!t.data) return;
|
|
@@ -866,26 +866,26 @@ function qp({
|
|
|
866
866
|
}), e;
|
|
867
867
|
}, [Ul, vn.map((e) => `${e.key}\0${e.page}`).join("")]), Vl = new Set(
|
|
868
868
|
wn.flatMap((e, t) => e.isFetching ? [vn[t].key] : [])
|
|
869
|
-
),
|
|
869
|
+
), O = Fe ? [...nr.values()].flat() : (i == null ? void 0 : i.data) ?? [];
|
|
870
870
|
zc(
|
|
871
871
|
l ? {
|
|
872
872
|
queue: {
|
|
873
873
|
id: l,
|
|
874
874
|
label: s == null ? void 0 : s.name,
|
|
875
875
|
scope: b,
|
|
876
|
-
filters: JSON.stringify(
|
|
877
|
-
items:
|
|
876
|
+
filters: JSON.stringify(Oe),
|
|
877
|
+
items: O.slice(0, 100).map((e) => ({ collection: e.collection, id: e.item_id }))
|
|
878
878
|
}
|
|
879
879
|
} : null
|
|
880
880
|
);
|
|
881
|
-
const Gl = Xc(), Ut =
|
|
881
|
+
const Gl = Xc(), Ut = O.some((e) => e.fulfilment !== void 0), Vt = O.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.
|
|
885
885
|
queryFn: () => f.request(
|
|
886
886
|
D(`/queues/${l}/items`, {
|
|
887
887
|
scope: b,
|
|
888
|
-
filters: JSON.stringify(
|
|
888
|
+
filters: JSON.stringify(Oe),
|
|
889
889
|
page: 1,
|
|
890
890
|
limit: 1,
|
|
891
891
|
...Bt.length ? { totals: Bt.join(",") } : {}
|
|
@@ -896,16 +896,16 @@ function qp({
|
|
|
896
896
|
placeholderData: (e) => e,
|
|
897
897
|
retry: !1
|
|
898
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
|
+
K(() => {
|
|
900
900
|
if (!Gt) return;
|
|
901
|
-
const e =
|
|
902
|
-
pending:
|
|
901
|
+
const e = Vn.current > 0 || Un.current, t = zd({
|
|
902
|
+
pending: Qn.current,
|
|
903
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
|
-
|
|
908
|
+
Qn.current = 0, t > 0 && un((r) => r + t), Xd({
|
|
909
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
|
|
@@ -918,28 +918,28 @@ function qp({
|
|
|
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) :
|
|
924
|
-
Jr.current = new Set(
|
|
921
|
+
const rr = (Ro = J ?? g) == null ? void 0 : Ro.aging, Na = L(void 0);
|
|
922
|
+
!x.aging_hours && rr && (Na.current = rr);
|
|
923
|
+
const Wt = x.aging_hours ? Na.current ?? (g == null ? void 0 : g.aging) : rr ?? (g == null ? void 0 : g.aging);
|
|
924
|
+
Jr.current = new Set(O.map((e) => `${e.collection}:${e.item_id}`));
|
|
925
925
|
const Ht = zo(
|
|
926
|
-
|
|
926
|
+
O.map((e) => ({ collection: e.collection, id: e.item_id })),
|
|
927
927
|
Yr
|
|
928
928
|
), Sa = kc(
|
|
929
|
-
|
|
929
|
+
O,
|
|
930
930
|
(e) => `${e.collection}:${e.item_id}`,
|
|
931
931
|
be.rootRef,
|
|
932
932
|
{
|
|
933
933
|
enabled: C === "table" && !ie,
|
|
934
934
|
resetKey: JSON.stringify([l, b, se, U, ve])
|
|
935
935
|
}
|
|
936
|
-
), Ca =
|
|
937
|
-
!he.current && ce !== $a.current && (Ca.current = ce),
|
|
938
|
-
const e = new Set(
|
|
936
|
+
), Ca = L(ce), $a = L(0);
|
|
937
|
+
!he.current && ce !== $a.current && (Ca.current = ce), K(() => {
|
|
938
|
+
const e = new Set(O.map((t) => `${t.collection}:${t.item_id}`));
|
|
939
939
|
if (he.current) {
|
|
940
940
|
he.current = !1, $a.current = ce;
|
|
941
|
-
const t =
|
|
942
|
-
|
|
941
|
+
const t = Kt.current;
|
|
942
|
+
Kt.current = [];
|
|
943
943
|
const n = Xr.current, r = /* @__PURE__ */ new Set();
|
|
944
944
|
for (const o of t)
|
|
945
945
|
!e.has(o.key) || r.has(o.key) || (r.add(o.key), be.note([o.key], o.by, n && !n.has(o.key) ? "create" : "update"));
|
|
@@ -950,23 +950,23 @@ function qp({
|
|
|
950
950
|
}
|
|
951
951
|
Xr.current = e;
|
|
952
952
|
}, [ce]);
|
|
953
|
-
const
|
|
953
|
+
const ar = L(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
|
+
K(() => {
|
|
959
959
|
if (!It) return;
|
|
960
960
|
const e = lc(`queue:${l}`);
|
|
961
|
-
return e && !
|
|
962
|
-
}, [
|
|
961
|
+
return e && !ar.current && (ar.current = e), sc(dt, `queue:${l}`, It.split(","));
|
|
962
|
+
}, [dt, l, It]), K(() => {
|
|
963
963
|
un(0), Dt.current.clear();
|
|
964
964
|
}, [ce]);
|
|
965
965
|
function Ra() {
|
|
966
966
|
y.invalidateQueries({ queryKey: ["queue-items", l] }), y.invalidateQueries({ queryKey: ["queue-workload", l] }), un(0);
|
|
967
967
|
}
|
|
968
968
|
function Ta() {
|
|
969
|
-
Dt.current.clear(),
|
|
969
|
+
Dt.current.clear(), Pe.dropHeld(), Ra();
|
|
970
970
|
}
|
|
971
971
|
const { data: Ae } = re({
|
|
972
972
|
queryKey: ["queue-trends", l],
|
|
@@ -1001,10 +1001,10 @@ function qp({
|
|
|
1001
1001
|
],
|
|
1002
1002
|
[s == null ? void 0 : s.sources]
|
|
1003
1003
|
), { data: Wl } = re({
|
|
1004
|
-
queryKey:
|
|
1004
|
+
queryKey: Lc.collections(),
|
|
1005
1005
|
queryFn: () => f.request(D("/collections")).then((e) => e.data),
|
|
1006
1006
|
staleTime: 300 * 1e3
|
|
1007
|
-
}),
|
|
1007
|
+
}), xt = nt({
|
|
1008
1008
|
queries: Yt.map((e) => ({
|
|
1009
1009
|
queryKey: ["queue-collection-addendums", e],
|
|
1010
1010
|
queryFn: () => f.request(
|
|
@@ -1015,63 +1015,63 @@ function qp({
|
|
|
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: or = [] } = 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) => or.includes(e)), lr = W(() => {
|
|
1023
1023
|
var t;
|
|
1024
1024
|
const e = {};
|
|
1025
1025
|
if (!Me) return e;
|
|
1026
|
-
for (const n of
|
|
1027
|
-
if (!
|
|
1026
|
+
for (const n of O) {
|
|
1027
|
+
if (!or.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
|
-
}, [
|
|
1033
|
-
queries:
|
|
1034
|
-
queryKey: ["queue-integrations-summary", e,
|
|
1032
|
+
}, [O, or, Me]), Oa = Object.keys(lr), La = nt({
|
|
1033
|
+
queries: Oa.map((e) => ({
|
|
1034
|
+
queryKey: ["queue-integrations-summary", e, lr[e].join(",")],
|
|
1035
1035
|
queryFn: () => f.request(
|
|
1036
1036
|
ge("/integration-obligations/summary", {
|
|
1037
1037
|
collection: e,
|
|
1038
|
-
ids:
|
|
1038
|
+
ids: lr[e]
|
|
1039
1039
|
})
|
|
1040
1040
|
).then((t) => t.data ?? {}).catch(() => ({})),
|
|
1041
1041
|
staleTime: 3e4
|
|
1042
1042
|
}))
|
|
1043
|
-
}), Hl =
|
|
1043
|
+
}), Hl = La.map((e) => e.dataUpdatedAt).join(","), Il = W(() => {
|
|
1044
1044
|
const e = {};
|
|
1045
|
-
return
|
|
1045
|
+
return Oa.forEach((t, n) => {
|
|
1046
1046
|
var o;
|
|
1047
|
-
const r = ((o =
|
|
1047
|
+
const r = ((o = La[n]) == null ? void 0 : o.data) ?? {};
|
|
1048
1048
|
for (const [c, u] of Object.entries(r)) e[`${t}:${c}`] = u;
|
|
1049
1049
|
}), e;
|
|
1050
|
-
}, [Hl]),
|
|
1050
|
+
}, [Hl]), sr = W(() => {
|
|
1051
1051
|
var t;
|
|
1052
1052
|
const e = {};
|
|
1053
|
-
for (const n of
|
|
1053
|
+
for (const n of O) {
|
|
1054
1054
|
if (!n.collection || n.collection === "tasks" || n.collection.startsWith("nivaro_"))
|
|
1055
1055
|
continue;
|
|
1056
1056
|
const r = e[t = n.collection] ?? (e[t] = []);
|
|
1057
1057
|
r.length < 500 && r.push(n.item_id);
|
|
1058
1058
|
}
|
|
1059
1059
|
return e;
|
|
1060
|
-
}, [
|
|
1061
|
-
queries:
|
|
1062
|
-
queryKey: ["queue-task-counts", e,
|
|
1060
|
+
}, [O]), ir = Object.keys(sr), Fa = nt({
|
|
1061
|
+
queries: ir.map((e) => ({
|
|
1062
|
+
queryKey: ["queue-task-counts", e, sr[e].join(",")],
|
|
1063
1063
|
queryFn: () => f.request(
|
|
1064
|
-
ge("/tasks/counts", { collection: e, ids:
|
|
1064
|
+
ge("/tasks/counts", { collection: e, ids: sr[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 ir.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
|
-
}, [Jl]), Aa =
|
|
1074
|
+
}, [Jl]), Aa = ir.length > 0, qa = nt({
|
|
1075
1075
|
queries: Yt.map((e) => ({
|
|
1076
1076
|
queryKey: ["queue-collection-risk-rules", e],
|
|
1077
1077
|
queryFn: () => f.request(
|
|
@@ -1090,7 +1090,7 @@ function qp({
|
|
|
1090
1090
|
});
|
|
1091
1091
|
}
|
|
1092
1092
|
return [...e.values()];
|
|
1093
|
-
}, [zl]),
|
|
1093
|
+
}, [zl]), Ka = nt({
|
|
1094
1094
|
queries: Yt.map((e) => ({
|
|
1095
1095
|
queryKey: ["queue-collection-states", e],
|
|
1096
1096
|
queryFn: () => f.request(
|
|
@@ -1098,14 +1098,14 @@ function qp({
|
|
|
1098
1098
|
).then((t) => t.data),
|
|
1099
1099
|
staleTime: 300 * 1e3
|
|
1100
1100
|
}))
|
|
1101
|
-
}),
|
|
1101
|
+
}), Pa = (e) => e.replace(/_/g, " ").replace(/\b\w/g, (t) => t.toUpperCase()), Be = W(() => {
|
|
1102
1102
|
const e = {};
|
|
1103
|
-
for (const t of
|
|
1103
|
+
for (const t of Ka)
|
|
1104
1104
|
(t.data ?? []).forEach((n, r) => {
|
|
1105
1105
|
e[n.key] = { label: n.label, color: n.color, sort: r };
|
|
1106
1106
|
});
|
|
1107
1107
|
return e;
|
|
1108
|
-
}, [
|
|
1108
|
+
}, [Ka.map((e) => e.data)]), Da = g ? Object.entries(g.by_state).sort(
|
|
1109
1109
|
(e, t) => {
|
|
1110
1110
|
var n, r;
|
|
1111
1111
|
return (((n = Be[e[0]]) == null ? void 0 : n.sort) ?? Number.MAX_SAFE_INTEGER) - (((r = Be[t[0]]) == null ? void 0 : r.sort) ?? Number.MAX_SAFE_INTEGER);
|
|
@@ -1115,40 +1115,40 @@ function qp({
|
|
|
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
|
+
), cr = 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]),
|
|
1123
|
-
if (e ===
|
|
1122
|
+
}, [Be]), Ke = (e) => e ? e === "none" ? "No State" : cr[e] ?? Pa(e) : "—", Ie = (e) => {
|
|
1123
|
+
if (e === ot) return "Addendums";
|
|
1124
1124
|
const t = (Wl ?? []).find((n) => n.collection === e);
|
|
1125
|
-
return (t == null ? void 0 : t.display_name) || (t == null ? void 0 : t.plural) ||
|
|
1125
|
+
return (t == null ? void 0 : t.display_name) || (t == null ? void 0 : t.plural) || Pa(e);
|
|
1126
1126
|
}, we = W(() => R ? Fe ? Fe.map((e) => ({
|
|
1127
1127
|
key: e.key,
|
|
1128
|
-
rows:
|
|
1128
|
+
rows: nr.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
|
-
})) : Fc(
|
|
1134
|
-
|
|
1133
|
+
})) : Fc(O, R).map((e) => ({ ...e, count: e.rows.length, sums: {} })) : null, [O, R, Fe, nr]), dr = L(null);
|
|
1134
|
+
K(() => {
|
|
1135
1135
|
if (!R || !we) {
|
|
1136
|
-
|
|
1136
|
+
dr.current = null;
|
|
1137
1137
|
return;
|
|
1138
1138
|
}
|
|
1139
|
-
if (ie && !Fe ||
|
|
1140
|
-
|
|
1139
|
+
if (ie && !Fe || dr.current === R) return;
|
|
1140
|
+
dr.current = R;
|
|
1141
1141
|
const e = we.reduce((t, n) => t + n.count, 0);
|
|
1142
|
-
|
|
1142
|
+
Kn(e > 200 ? new Set(we.map((t) => t.key)) : /* @__PURE__ */ new Set()), va({});
|
|
1143
1143
|
}, [R, Fe]);
|
|
1144
1144
|
function Xl(e) {
|
|
1145
|
-
|
|
1145
|
+
Kn((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) :
|
|
1151
|
-
if (e.collection ===
|
|
1150
|
+
const _e = W(() => we ? we.filter((e) => !xe.has(e.key)).flatMap((e) => e.rows) : O, [we, O, xe]), k = (e) => `${e.collection}:${e.item_id}`, [Je, Ye] = N(null), [Zl, ur] = N(!1), [zt, Xt] = N(null), mr = L(null), pr = (e) => {
|
|
1151
|
+
if (e.collection === ot && e.url) {
|
|
1152
1152
|
const t = e.url.match(/^\/collections\/([^/?]+)\/([^/?]+)(?:\?(.*))?$/);
|
|
1153
1153
|
if (t) {
|
|
1154
1154
|
const n = {};
|
|
@@ -1170,11 +1170,11 @@ function qp({
|
|
|
1170
1170
|
var t;
|
|
1171
1171
|
if (s) {
|
|
1172
1172
|
if (e) {
|
|
1173
|
-
const n = C === "table" && !ie, r = !
|
|
1173
|
+
const n = C === "table" && !ie, r = !O.some((o) => o.collection === ot);
|
|
1174
1174
|
dc({
|
|
1175
1175
|
list: `queue:${l}`,
|
|
1176
1176
|
label: s.name,
|
|
1177
|
-
rows:
|
|
1177
|
+
rows: O.filter((o) => o.collection !== ot).map((o) => ({ collection: o.collection, id: String(o.item_id) })),
|
|
1178
1178
|
opened: e,
|
|
1179
1179
|
entry: Jo(),
|
|
1180
1180
|
...n && r && typeof (i == null ? void 0 : i.total) == "number" ? { total: i.total, offset: (se - 1) * pn } : {}
|
|
@@ -1185,17 +1185,17 @@ function qp({
|
|
|
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 = Sn.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
|
-
},
|
|
1194
|
-
Ba({ collection: e.collection, id: String(e.item_id) }),
|
|
1193
|
+
}, kt = (e) => {
|
|
1194
|
+
Ba({ collection: e.collection, id: String(e.item_id) }), j.open(pr(e));
|
|
1195
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
|
+
j.open({
|
|
1199
1199
|
collection: e.collection,
|
|
1200
1200
|
itemId: e.itemId,
|
|
1201
1201
|
layoutSlug: n ? (p == null ? void 0 : p.item_layout) ?? null : null
|
|
@@ -1203,18 +1203,18 @@ function qp({
|
|
|
1203
1203
|
}, [H, Zt] = N(
|
|
1204
1204
|
null
|
|
1205
1205
|
);
|
|
1206
|
-
|
|
1206
|
+
K(() => {
|
|
1207
1207
|
if (!H) return;
|
|
1208
1208
|
const e = () => Zt(null);
|
|
1209
1209
|
return window.addEventListener("mousedown", e), window.addEventListener("scroll", e, !0), () => {
|
|
1210
1210
|
window.removeEventListener("mousedown", e), window.removeEventListener("scroll", e, !0);
|
|
1211
1211
|
};
|
|
1212
1212
|
}, [H]);
|
|
1213
|
-
const
|
|
1213
|
+
const _n = (e) => {
|
|
1214
1214
|
Xt(k(e));
|
|
1215
1215
|
const t = (p == null ? void 0 : p.row_click) ?? "preview";
|
|
1216
|
-
if (t === "full" || e.collection ===
|
|
1217
|
-
|
|
1216
|
+
if (t === "full" || e.collection === ot) {
|
|
1217
|
+
kt(e);
|
|
1218
1218
|
return;
|
|
1219
1219
|
}
|
|
1220
1220
|
if (t === "layout") {
|
|
@@ -1229,25 +1229,25 @@ function qp({
|
|
|
1229
1229
|
}
|
|
1230
1230
|
Ye(e);
|
|
1231
1231
|
};
|
|
1232
|
-
|
|
1232
|
+
K(() => {
|
|
1233
1233
|
if (!Je) return;
|
|
1234
|
-
const e =
|
|
1234
|
+
const e = O.find((t) => k(t) === k(Je));
|
|
1235
1235
|
e && e !== Je && Ye(e);
|
|
1236
|
-
}, [
|
|
1236
|
+
}, [O]);
|
|
1237
1237
|
const ts = (e) => !e.claimed_by || e.claimed_by.id === z;
|
|
1238
|
-
function
|
|
1238
|
+
function Qa(e) {
|
|
1239
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
|
+
ur(!1), Ye(null), P.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
|
+
kt(n);
|
|
1246
1246
|
return;
|
|
1247
1247
|
}
|
|
1248
|
-
|
|
1248
|
+
ur(!0), Ye(n);
|
|
1249
1249
|
}
|
|
1250
|
-
|
|
1250
|
+
K(() => {
|
|
1251
1251
|
if (C !== "table") return;
|
|
1252
1252
|
function e(t) {
|
|
1253
1253
|
var o;
|
|
@@ -1270,26 +1270,26 @@ function qp({
|
|
|
1270
1270
|
} else if (t.key === "c" && n >= 0 && Te) {
|
|
1271
1271
|
t.preventDefault();
|
|
1272
1272
|
const c = _e[n];
|
|
1273
|
-
((o = c.claimed_by) == null ? void 0 : o.id) === z ?
|
|
1274
|
-
} else t.key === "o" && n >= 0 && (t.preventDefault(),
|
|
1273
|
+
((o = c.claimed_by) == null ? void 0 : o.id) === z ? ht.mutate(c) : He.mutate(c);
|
|
1274
|
+
} else t.key === "o" && n >= 0 && (t.preventDefault(), kt(_e[n]));
|
|
1275
1275
|
}
|
|
1276
1276
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
1277
|
-
}, [C, _e, zt, Je, z, He,
|
|
1277
|
+
}, [C, _e, zt, Je, z, He, ht, Te]);
|
|
1278
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), [ns, fr] = N(!1), [
|
|
1282
|
+
}), [fe, ze] = N(null), [ns, fr] = N(!1), [Nn, ja] = N(""), [Ua, Va] = N(!1), [vt, 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 ?? {} })),
|
|
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 ?? {} })), st(t.sort ?? ""), At(t.group_by ?? null), kn(t.columns ?? null), Dn(t.pins ?? null), dn(
|
|
1287
1287
|
Object.fromEntries(
|
|
1288
1288
|
Object.entries(t.totals ?? {}).filter(
|
|
1289
1289
|
([r, o]) => Br(r) && pd(o)
|
|
1290
1290
|
)
|
|
1291
1291
|
)
|
|
1292
|
-
), t.view &&
|
|
1292
|
+
), t.view && lt(Ve.includes(t.view) ? t.view : Ve[0]), Q(1), ze(e.id);
|
|
1293
1293
|
}
|
|
1294
1294
|
function rs() {
|
|
1295
1295
|
var t, n;
|
|
@@ -1298,47 +1298,47 @@ function qp({
|
|
|
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 }),
|
|
1301
|
+
me(((t = s == null ? void 0 : s.display_config) == null ? void 0 : t.default_scope) ?? "all"), V({ ...ke.current }), st(""), At(null), kn(null), Dn(null), dn({}), (n = s == null ? void 0 : s.display_config) != null && n.default_view && lt(s.display_config.default_view), Q(1), ze(null);
|
|
1302
1302
|
}
|
|
1303
|
-
|
|
1304
|
-
if (G || !(s != null && s.display_config) ||
|
|
1305
|
-
const e =
|
|
1306
|
-
t ? en(t) : n ? en(n) : (
|
|
1307
|
-
}, [s,
|
|
1308
|
-
const
|
|
1309
|
-
|
|
1303
|
+
K(() => {
|
|
1304
|
+
if (G || !(s != null && s.display_config) || yt === void 0 || E === void 0) return;
|
|
1305
|
+
const e = yt.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) : (lt(s.display_config.default_view), me(s.display_config.default_scope)), xl(!0);
|
|
1307
|
+
}, [s, yt, E, G]);
|
|
1308
|
+
const Sn = L(null), Cn = L(null);
|
|
1309
|
+
K(() => {
|
|
1310
1310
|
if (!G) return;
|
|
1311
1311
|
const e = Sd();
|
|
1312
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 &&
|
|
1315
|
+
t.scope && me(t.scope), t.filters && V({ ...ke.current, ...t.filters }), t.sort != null && st(t.sort), At(t.group_by ?? null), t.view && lt(t.view), t.page && Q(t.page), Cn.current = e.scroll ?? 0;
|
|
1316
1316
|
const n = ic(`queue:${l}`);
|
|
1317
1317
|
if (n) {
|
|
1318
1318
|
const r = `${n.collection}:${n.id}`;
|
|
1319
|
-
Xt(r),
|
|
1319
|
+
Xt(r), mr.current = r;
|
|
1320
1320
|
}
|
|
1321
|
-
Y && Y.length > 0 &&
|
|
1321
|
+
Y && Y.length > 0 && Nt.back(Y.length);
|
|
1322
1322
|
}, [G, l]);
|
|
1323
|
-
const Wa =
|
|
1324
|
-
|
|
1323
|
+
const Wa = L(!1), [Ha, as] = N(0);
|
|
1324
|
+
K(() => {
|
|
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 || Zn) return;
|
|
1331
1331
|
Wa.current = !0;
|
|
1332
|
-
const e =
|
|
1333
|
-
n === "replay" && e &&
|
|
1334
|
-
}) : (n === "replay" || n === "refetch") && (
|
|
1332
|
+
const e = ar.current, n = !!e && ce > 0 && ce <= e.leftAt ? Yo(e) : "fresh";
|
|
1333
|
+
n === "replay" && e && Pe.paused ? Hn(e.events.filter((o) => !o.own), () => {
|
|
1334
|
+
}) : (n === "replay" || n === "refetch") && (Kt.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
1338
|
})), ql(!1);
|
|
1339
|
-
const r =
|
|
1340
|
-
|
|
1341
|
-
}, [i,
|
|
1339
|
+
const r = mr.current;
|
|
1340
|
+
mr.current = null, r && setTimeout(() => cc(be.rootRef.current, r), 260);
|
|
1341
|
+
}, [i, Zn, G, It, Ha]), K(() => {
|
|
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";
|
|
@@ -1349,8 +1349,8 @@ function qp({
|
|
|
1349
1349
|
window.history.state,
|
|
1350
1350
|
"",
|
|
1351
1351
|
`${window.location.pathname}${o ? `?${o}` : ""}${window.location.hash}`
|
|
1352
|
-
), r && me(t), n && V((u) => ({ ...u, state: [n] })),
|
|
1353
|
-
}, [G]),
|
|
1352
|
+
), r && me(t), n && V((u) => ({ ...u, state: [n] })), Q(1);
|
|
1353
|
+
}, [G]), K(() => {
|
|
1354
1354
|
if (!G || typeof window > "u") return;
|
|
1355
1355
|
const e = new URLSearchParams(window.location.search), t = e.get("owner");
|
|
1356
1356
|
if (!t) return;
|
|
@@ -1360,24 +1360,24 @@ function qp({
|
|
|
1360
1360
|
window.history.state,
|
|
1361
1361
|
"",
|
|
1362
1362
|
`${window.location.pathname}${n ? `?${n}` : ""}${window.location.hash}`
|
|
1363
|
-
), me("all"), V((r) => ({ ...r, owners: [t] })), ze(null),
|
|
1363
|
+
), me("all"), V((r) => ({ ...r, owners: [t] })), ze(null), Q(1);
|
|
1364
1364
|
}, [G]);
|
|
1365
|
-
const br =
|
|
1366
|
-
|
|
1365
|
+
const br = L(null);
|
|
1366
|
+
K(() => {
|
|
1367
1367
|
if (!G) return;
|
|
1368
1368
|
const e = Xi(Zi(`queue:${l}`));
|
|
1369
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 &&
|
|
1374
|
-
}, [G]),
|
|
1373
|
+
}), ze(null), e.page && Q(e.page), e.view_id && (br.current = e.view_id));
|
|
1374
|
+
}, [G]), K(() => {
|
|
1375
1375
|
const e = br.current;
|
|
1376
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;
|
|
1380
|
-
const e = [], t = (r =
|
|
1380
|
+
const e = [], t = (r = jr.find((o) => o.value === b)) == null ? void 0 : r.label;
|
|
1381
1381
|
t && e.push(t);
|
|
1382
1382
|
const n = Object.values(x).filter(
|
|
1383
1383
|
(o) => Array.isArray(o) ? o.length > 0 : o !== "" && o != null
|
|
@@ -1389,53 +1389,53 @@ function qp({
|
|
|
1389
1389
|
sort: U,
|
|
1390
1390
|
group_by: R,
|
|
1391
1391
|
view: C,
|
|
1392
|
-
columns:
|
|
1393
|
-
pins:
|
|
1394
|
-
...
|
|
1392
|
+
columns: jt,
|
|
1393
|
+
pins: it,
|
|
1394
|
+
...mt.length ? { totals: on() } : {},
|
|
1395
1395
|
...se > 1 ? { page: se } : {},
|
|
1396
1396
|
...fe != null && fe > 0 ? { view_id: fe } : {}
|
|
1397
1397
|
});
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
}, [
|
|
1401
|
-
const { isAdmin: Xe } = Ho(), os =
|
|
1402
|
-
() =>
|
|
1398
|
+
K(() => {
|
|
1399
|
+
Cn.current == null || O.length === 0 || !Sn.current || (Sn.current.scrollTop = Cn.current, Cn.current = null);
|
|
1400
|
+
}, [O]);
|
|
1401
|
+
const { isAdmin: Xe } = Ho(), os = O.map((e) => `${e.collection}|${e.item_id}`).join(","), ls = W(
|
|
1402
|
+
() => O.map((e) => ({ collection: e.collection, id: e.item_id })),
|
|
1403
1403
|
[os]
|
|
1404
|
-
), Ja =
|
|
1404
|
+
), Ja = Kd(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 ? Pc(e.at_risk_color ?? "red") : void 0, tn = Xe || (s == null ? void 0 : s.owner) != null && s.owner === z, is = je({
|
|
1411
1411
|
mutationFn: ({ viewId: e, on: t }) => f.request(Io(`/queues/views/${e}`, { is_default: t })),
|
|
1412
1412
|
onSuccess: () => {
|
|
1413
|
-
y.invalidateQueries({ queryKey: ["queue-views", l] }),
|
|
1413
|
+
y.invalidateQueries({ queryKey: ["queue-views", l] }), P.success("Queue default view updated");
|
|
1414
1414
|
},
|
|
1415
|
-
onError: () =>
|
|
1416
|
-
}),
|
|
1415
|
+
onError: () => P.error("Could not update the queue default view")
|
|
1416
|
+
}), $n = je({
|
|
1417
1417
|
mutationFn: () => f.request(
|
|
1418
1418
|
ge(`/queues/${l}/views`, {
|
|
1419
|
-
name:
|
|
1420
|
-
is_shared: tn && (Ua ||
|
|
1421
|
-
is_default:
|
|
1419
|
+
name: Nn.trim(),
|
|
1420
|
+
is_shared: tn && (Ua || vt),
|
|
1421
|
+
is_default: vt,
|
|
1422
1422
|
state: {
|
|
1423
1423
|
scope: b,
|
|
1424
1424
|
filters: x,
|
|
1425
1425
|
sort: U,
|
|
1426
1426
|
group_by: R,
|
|
1427
1427
|
view: C,
|
|
1428
|
-
columns:
|
|
1429
|
-
pins:
|
|
1428
|
+
columns: jt,
|
|
1429
|
+
pins: it,
|
|
1430
1430
|
totals: on()
|
|
1431
1431
|
}
|
|
1432
1432
|
})
|
|
1433
1433
|
),
|
|
1434
1434
|
onSuccess: (e) => {
|
|
1435
|
-
xo(on()), fr(!1),
|
|
1435
|
+
xo(on()), fr(!1), ja(""), Va(!1), Ga(!1), ze(e.data.id), y.invalidateQueries({ queryKey: ["queue-views", l] }), P.success("View saved");
|
|
1436
1436
|
},
|
|
1437
|
-
onError: () =>
|
|
1438
|
-
}), [Ya, za] = N(null), Ze =
|
|
1437
|
+
onError: () => P.error("Failed to save view")
|
|
1438
|
+
}), [Ya, za] = N(null), Ze = je({
|
|
1439
1439
|
mutationFn: (e) => f.request(
|
|
1440
1440
|
Io(`/queues/views/${e.id}`, {
|
|
1441
1441
|
state: {
|
|
@@ -1444,55 +1444,55 @@ function qp({
|
|
|
1444
1444
|
sort: U,
|
|
1445
1445
|
group_by: R,
|
|
1446
1446
|
view: C,
|
|
1447
|
-
columns:
|
|
1448
|
-
pins:
|
|
1447
|
+
columns: jt,
|
|
1448
|
+
pins: it,
|
|
1449
1449
|
totals: on()
|
|
1450
1450
|
}
|
|
1451
1451
|
})
|
|
1452
1452
|
),
|
|
1453
1453
|
onSuccess: (e, t) => {
|
|
1454
|
-
t.id === fe && xo(on()), y.invalidateQueries({ queryKey: ["queue-views", l] }), za(t.id), setTimeout(() => za((n) => n === t.id ? null : n), 2e3),
|
|
1454
|
+
t.id === fe && xo(on()), y.invalidateQueries({ queryKey: ["queue-views", l] }), za(t.id), setTimeout(() => za((n) => n === t.id ? null : n), 2e3), P.success(
|
|
1455
1455
|
t.is_default ? `Saved "${t.name}" with the current columns, sort and totals. Filters stay each person's own.` : `Saved "${t.name}" with the current filters, scope and sort`
|
|
1456
1456
|
);
|
|
1457
1457
|
},
|
|
1458
|
-
onError: () =>
|
|
1459
|
-
}), [yr,
|
|
1460
|
-
|
|
1458
|
+
onError: () => P.error("Failed to update view")
|
|
1459
|
+
}), [yr, Rn] = N(null);
|
|
1460
|
+
K(() => {
|
|
1461
1461
|
if (yr == null) return;
|
|
1462
|
-
const e = setTimeout(() =>
|
|
1462
|
+
const e = setTimeout(() => Rn(null), 5e3);
|
|
1463
1463
|
return () => clearTimeout(e);
|
|
1464
1464
|
}, [yr]);
|
|
1465
|
-
const Xa =
|
|
1465
|
+
const Xa = je({
|
|
1466
1466
|
mutationFn: (e) => f.request(qr(`/queues/views/${e}`)),
|
|
1467
1467
|
onSuccess: (e, t) => {
|
|
1468
|
-
|
|
1468
|
+
Rn(null), y.invalidateQueries({ queryKey: ["queue-views", l] }), ze(null), gt === t && er(null);
|
|
1469
1469
|
},
|
|
1470
|
-
onError: () =>
|
|
1471
|
-
}), cs =
|
|
1470
|
+
onError: () => P.error("Failed to delete view")
|
|
1471
|
+
}), cs = je({
|
|
1472
1472
|
mutationFn: (e) => f.request(Ai(`/queues/${l}/default-view`, { view_id: e })),
|
|
1473
|
-
onMutate: (e) =>
|
|
1473
|
+
onMutate: (e) => er(e),
|
|
1474
1474
|
onSuccess: (e, t) => {
|
|
1475
|
-
y.invalidateQueries({ queryKey: ["queue-column-prefs", l] }),
|
|
1475
|
+
y.invalidateQueries({ queryKey: ["queue-column-prefs", l] }), P.success(
|
|
1476
1476
|
t === null ? "Reverted to the general default" : "Set as your default view"
|
|
1477
1477
|
);
|
|
1478
1478
|
},
|
|
1479
1479
|
onError: () => {
|
|
1480
|
-
y.invalidateQueries({ queryKey: ["queue-column-prefs", l] }),
|
|
1480
|
+
y.invalidateQueries({ queryKey: ["queue-column-prefs", l] }), P.error("Failed to update default view");
|
|
1481
1481
|
}
|
|
1482
1482
|
}), ds = () => {
|
|
1483
1483
|
X && De([]), ha(!X);
|
|
1484
1484
|
};
|
|
1485
|
-
|
|
1485
|
+
K(() => {
|
|
1486
1486
|
C !== "table" && X && (ha(!1), De([]));
|
|
1487
|
-
}, [C, X]), Fi(),
|
|
1488
|
-
const [
|
|
1487
|
+
}, [C, X]), Fi(), Vn.current = ee.length;
|
|
1488
|
+
const [wt, Za] = N(!1);
|
|
1489
1489
|
async function gr(e, t) {
|
|
1490
|
-
const n =
|
|
1490
|
+
const n = O.filter((u) => ee.includes(k(u)));
|
|
1491
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
|
-
Za(!1), De([]), y.invalidateQueries({ queryKey: ["queue-items", l] }), c ?
|
|
1495
|
+
Za(!1), De([]), y.invalidateQueries({ queryKey: ["queue-items", l] }), c ? P.warning(`${e}: ${o} succeeded, ${c} failed`) : P.success(`${e}: ${o} succeeded`);
|
|
1496
1496
|
}
|
|
1497
1497
|
const ye = (e) => {
|
|
1498
1498
|
var t;
|
|
@@ -1501,38 +1501,38 @@ function qp({
|
|
|
1501
1501
|
if (r) return r;
|
|
1502
1502
|
}
|
|
1503
1503
|
return null;
|
|
1504
|
-
}, Ne = X ? ee : Nu,
|
|
1505
|
-
() => [...new Set(Ne.map((e) =>
|
|
1504
|
+
}, Ne = X ? ee : Nu, Tn = Dc(Ne), us = W(
|
|
1505
|
+
() => [...new Set(Ne.map((e) => Pr(e).collection))],
|
|
1506
1506
|
[Ne]
|
|
1507
|
-
), xr = Mc(us,
|
|
1507
|
+
), xr = Mc(us, Tn.picks), [kr, eo] = N(!1);
|
|
1508
1508
|
kr && Ne.length === 0 && eo(!1);
|
|
1509
1509
|
const ms = W(
|
|
1510
1510
|
() => kr ? Ne : Ne.filter((e) => xr.marked.has(e)),
|
|
1511
1511
|
[kr, Ne, xr.marked]
|
|
1512
|
-
), ps = Bc(ms,
|
|
1512
|
+
), ps = Bc(ms, Tn.picks).rows.filter((e) => Tn.picks.has(e.key)), fs = zo(
|
|
1513
1513
|
Ne.map((e) => {
|
|
1514
|
-
const { collection: t, id: n } =
|
|
1514
|
+
const { collection: t, id: n } = Pr(e);
|
|
1515
1515
|
return { collection: t, id: n };
|
|
1516
1516
|
}),
|
|
1517
1517
|
Yr
|
|
1518
1518
|
), bs = Ne.map((e) => {
|
|
1519
|
-
const { collection: t, id: n } =
|
|
1519
|
+
const { collection: t, id: n } = Pr(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), hs =
|
|
1527
|
-
|
|
1526
|
+
}).filter((e) => e.viewerCount > 0 || !!e.lockName), hs = Qc(
|
|
1527
|
+
O,
|
|
1528
1528
|
(e) => `${e.collection}:${e.item_id}`,
|
|
1529
1529
|
Ne
|
|
1530
|
-
), ys =
|
|
1530
|
+
), ys = mt.filter(
|
|
1531
1531
|
(e) => {
|
|
1532
1532
|
var t;
|
|
1533
|
-
return
|
|
1533
|
+
return ct[e] === "sum" && ((t = Mt(e)) == null ? void 0 : t.kind) === "server" && e.startsWith("extra.");
|
|
1534
1534
|
}
|
|
1535
|
-
), to =
|
|
1535
|
+
), to = jc(
|
|
1536
1536
|
hs,
|
|
1537
1537
|
ys,
|
|
1538
1538
|
(e, t) => {
|
|
@@ -1540,7 +1540,7 @@ function qp({
|
|
|
1540
1540
|
return (n = e.extra) == null ? void 0 : n[t.slice(6)];
|
|
1541
1541
|
}
|
|
1542
1542
|
), no = (e) => {
|
|
1543
|
-
if (R === "state") return e === "No state" ? e :
|
|
1543
|
+
if (R === "state") return e === "No state" ? e : Ke(e);
|
|
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);
|
|
@@ -1575,7 +1575,7 @@ function qp({
|
|
|
1575
1575
|
resetKey: JSON.stringify([l, b, U, ve, R])
|
|
1576
1576
|
}
|
|
1577
1577
|
);
|
|
1578
|
-
const
|
|
1578
|
+
const On = (e) => Sa.isGone(e) || nn.isGone(e), _t = (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(
|
|
@@ -1635,7 +1635,7 @@ function qp({
|
|
|
1635
1635
|
" at risk"
|
|
1636
1636
|
] })
|
|
1637
1637
|
] })
|
|
1638
|
-
})), wr = (((To = i == null ? void 0 : i.available_values.collection) == null ? void 0 : To.length) ?? 0) > 1, ro =
|
|
1638
|
+
})), wr = (((To = i == null ? void 0 : i.available_values.collection) == null ? void 0 : To.length) ?? 0) > 1, ro = O.some((e) => !!e.unseen) || Ht.size > 0 || O.some((e) => be.isNew(k(e))), ao = [
|
|
1639
1639
|
...wr ? [
|
|
1640
1640
|
{
|
|
1641
1641
|
key: "collection",
|
|
@@ -1656,17 +1656,28 @@ function qp({
|
|
|
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)) || On(k(e)) || _t(k(e)) != null ? /* @__PURE__ */ a(
|
|
1660
|
+
Od,
|
|
1661
1661
|
{
|
|
1662
1662
|
lock: Ht.get(k(e)),
|
|
1663
1663
|
isNew: be.isNew(k(e)),
|
|
1664
|
-
gone:
|
|
1665
|
-
movingTo:
|
|
1664
|
+
gone: On(k(e)),
|
|
1665
|
+
movingTo: _t(k(e)),
|
|
1666
1666
|
dataAttr: "data-queue-live-mark",
|
|
1667
1667
|
hang: !0
|
|
1668
1668
|
}
|
|
1669
|
-
) : /* @__PURE__ */ a(
|
|
1669
|
+
) : /* @__PURE__ */ a(
|
|
1670
|
+
Vd,
|
|
1671
|
+
{
|
|
1672
|
+
change: e.unseen,
|
|
1673
|
+
dataAttr: "data-queue-unseen",
|
|
1674
|
+
hang: !0,
|
|
1675
|
+
collection: e.collection === ot ? void 0 : e.collection,
|
|
1676
|
+
itemId: e.item_id,
|
|
1677
|
+
onOpen: () => _n(e),
|
|
1678
|
+
onSeen: () => void y.invalidateQueries({ queryKey: ["queue-items", l] })
|
|
1679
|
+
}
|
|
1680
|
+
),
|
|
1670
1681
|
/* @__PURE__ */ a(
|
|
1671
1682
|
"span",
|
|
1672
1683
|
{
|
|
@@ -1675,7 +1686,7 @@ function qp({
|
|
|
1675
1686
|
children: e.label
|
|
1676
1687
|
}
|
|
1677
1688
|
),
|
|
1678
|
-
|
|
1689
|
+
_t(k(e)) != null && /* @__PURE__ */ a(Ld, { to: _t(k(e)) }),
|
|
1679
1690
|
(e.labels ?? []).slice(0, 3).map((t) => /* @__PURE__ */ a(
|
|
1680
1691
|
"span",
|
|
1681
1692
|
{
|
|
@@ -1686,7 +1697,7 @@ function qp({
|
|
|
1686
1697
|
t
|
|
1687
1698
|
)),
|
|
1688
1699
|
/* @__PURE__ */ a(
|
|
1689
|
-
|
|
1700
|
+
jd,
|
|
1690
1701
|
{
|
|
1691
1702
|
viewers: ya[Zo(e.collection, e.item_id)],
|
|
1692
1703
|
dataAttr: "data-queue-presence"
|
|
@@ -1711,9 +1722,9 @@ function qp({
|
|
|
1711
1722
|
"--nvr-state-ink": Di(e.state_color),
|
|
1712
1723
|
"--nvr-state-ink-dark": e.state_color
|
|
1713
1724
|
} : void 0,
|
|
1714
|
-
title: e.via_addendum ? `Addendum "${e.via_addendum.title ?? ""}" — ${
|
|
1725
|
+
title: e.via_addendum ? `Addendum "${e.via_addendum.title ?? ""}" — ${Ke(e.state)}` : Ke(e.state),
|
|
1715
1726
|
children: [
|
|
1716
|
-
|
|
1727
|
+
Ke(e.state),
|
|
1717
1728
|
e.via_addendum && /* @__PURE__ */ a("span", { className: "ml-1 rounded-sm bg-amber-500/15 px-1 text-[9px] font-bold uppercase tracking-wide text-amber-700 dark:text-amber-300", children: "Addendum" })
|
|
1718
1729
|
]
|
|
1719
1730
|
}
|
|
@@ -1742,7 +1753,7 @@ function qp({
|
|
|
1742
1753
|
render: (e) => /* @__PURE__ */ a("div", { className: "min-w-0 max-w-[240px]", children: /* @__PURE__ */ a(
|
|
1743
1754
|
kd,
|
|
1744
1755
|
{
|
|
1745
|
-
stepLabel: e.state ?
|
|
1756
|
+
stepLabel: e.state ? Ke(e.state) : null,
|
|
1746
1757
|
enteredAt: e.state_entered_at
|
|
1747
1758
|
}
|
|
1748
1759
|
) })
|
|
@@ -1767,13 +1778,13 @@ function qp({
|
|
|
1767
1778
|
sortable: !0,
|
|
1768
1779
|
render: (e) => {
|
|
1769
1780
|
var t;
|
|
1770
|
-
return e.at_risk ? /* @__PURE__ */ d("span", { className:
|
|
1781
|
+
return e.at_risk ? /* @__PURE__ */ d("span", { className: Kc(e.at_risk_color ?? "red"), children: [
|
|
1771
1782
|
"⚑ ",
|
|
1772
1783
|
((t = e.at_risk_rule) == null ? void 0 : t.name) ?? "At risk"
|
|
1773
1784
|
] }) : e.predicted_risk ? /* @__PURE__ */ a("span", { className: "text-amber-500", title: e.predicted_note ?? void 0, children: "⚑ Predicted" }) : null;
|
|
1774
1785
|
}
|
|
1775
1786
|
},
|
|
1776
|
-
...
|
|
1787
|
+
...xt ? [
|
|
1777
1788
|
{
|
|
1778
1789
|
key: "addendums",
|
|
1779
1790
|
header: A("addendums", "Addendums"),
|
|
@@ -1841,7 +1852,7 @@ function qp({
|
|
|
1841
1852
|
{
|
|
1842
1853
|
type: "button",
|
|
1843
1854
|
onClick: (t) => {
|
|
1844
|
-
t.stopPropagation(),
|
|
1855
|
+
t.stopPropagation(), ht.mutate(e);
|
|
1845
1856
|
},
|
|
1846
1857
|
className: "text-[11px] text-slate-400 underline hover:text-slate-600",
|
|
1847
1858
|
children: "Release"
|
|
@@ -1857,8 +1868,8 @@ function qp({
|
|
|
1857
1868
|
children: "Claim"
|
|
1858
1869
|
}
|
|
1859
1870
|
)
|
|
1860
|
-
}, rn = (s == null ? void 0 : s.available_extra_fields) ?? [],
|
|
1861
|
-
|
|
1871
|
+
}, rn = (s == null ? void 0 : s.available_extra_fields) ?? [], Nt = Ri("drill.queue"), Y = Nt.value, oo = (e) => Nt.push([e]), _r = L(null);
|
|
1872
|
+
K(() => {
|
|
1862
1873
|
var r;
|
|
1863
1874
|
if (!G || !l) return;
|
|
1864
1875
|
const e = `queue:${l}`, t = hr(), n = tc(e, t);
|
|
@@ -1875,20 +1886,20 @@ function qp({
|
|
|
1875
1886
|
U,
|
|
1876
1887
|
R,
|
|
1877
1888
|
C,
|
|
1878
|
-
|
|
1879
|
-
|
|
1889
|
+
jt,
|
|
1890
|
+
it,
|
|
1880
1891
|
se,
|
|
1881
1892
|
fe,
|
|
1882
1893
|
Y
|
|
1883
1894
|
]);
|
|
1884
|
-
const vs = ((
|
|
1885
|
-
view: vs ?? (b !== "all" ? ((Fo =
|
|
1895
|
+
const vs = ((Lo = (Oo = E == null ? void 0 : E.data) == null ? void 0 : Oo.find((e) => e.id === fe)) == null ? void 0 : Lo.name) ?? null, lo = Nc({
|
|
1896
|
+
view: vs ?? (b !== "all" ? ((Fo = jr.find((e) => e.value === b)) == null ? void 0 : Fo.label) ?? null : null),
|
|
1886
1897
|
filters: Object.values(x).filter(
|
|
1887
1898
|
(e) => Array.isArray(e) ? e.length > 0 : String(e ?? "").trim() !== ""
|
|
1888
1899
|
).length,
|
|
1889
1900
|
page: se
|
|
1890
1901
|
});
|
|
1891
|
-
|
|
1902
|
+
K(() => {
|
|
1892
1903
|
G && l && Sc(lo);
|
|
1893
1904
|
}, [G, l, lo]);
|
|
1894
1905
|
const ws = (e) => {
|
|
@@ -1990,7 +2001,7 @@ function qp({
|
|
|
1990
2001
|
// Labels, rollups and the row's place in the queue follow the server.
|
|
1991
2002
|
onSaved: () => void y.invalidateQueries({ queryKey: ["queue-items", l] })
|
|
1992
2003
|
});
|
|
1993
|
-
},
|
|
2004
|
+
}, Os = (e, t, n) => {
|
|
1994
2005
|
const r = co(e, t);
|
|
1995
2006
|
if (!r) return n;
|
|
1996
2007
|
const o = Sr.get(e.collection), c = o == null ? void 0 : o.fields.get(t);
|
|
@@ -2011,11 +2022,11 @@ function qp({
|
|
|
2011
2022
|
children: n
|
|
2012
2023
|
}
|
|
2013
2024
|
);
|
|
2014
|
-
},
|
|
2025
|
+
}, Ls = rn.map((e) => ({
|
|
2015
2026
|
key: `extra.${e}`,
|
|
2016
2027
|
header: A(`extra.${e}`, Ue(e)),
|
|
2017
2028
|
sortable: !0,
|
|
2018
|
-
render: (t) =>
|
|
2029
|
+
render: (t) => Os(t, e, Fs(t, e))
|
|
2019
2030
|
}));
|
|
2020
2031
|
function Fs(e, t) {
|
|
2021
2032
|
var n, r;
|
|
@@ -2045,7 +2056,7 @@ function qp({
|
|
|
2045
2056
|
{
|
|
2046
2057
|
type: "button",
|
|
2047
2058
|
onClick: (w) => {
|
|
2048
|
-
w.stopPropagation(),
|
|
2059
|
+
w.stopPropagation(), Yn({ row: e, path: t, value: m });
|
|
2049
2060
|
},
|
|
2050
2061
|
title: "Show the rows behind this number",
|
|
2051
2062
|
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",
|
|
@@ -2063,7 +2074,7 @@ function qp({
|
|
|
2063
2074
|
Er,
|
|
2064
2075
|
"sla_status",
|
|
2065
2076
|
"at_risk",
|
|
2066
|
-
...
|
|
2077
|
+
...xt ? ["addendums"] : [],
|
|
2067
2078
|
...Ut ? ["fulfilment"] : [],
|
|
2068
2079
|
...Me ? ["integrations"] : [],
|
|
2069
2080
|
...Vt ? ["send_backs"] : [],
|
|
@@ -2076,7 +2087,7 @@ function qp({
|
|
|
2076
2087
|
...wr ? ["collection"] : [],
|
|
2077
2088
|
"state",
|
|
2078
2089
|
"owners",
|
|
2079
|
-
...
|
|
2090
|
+
...xt ? ["addendums"] : [],
|
|
2080
2091
|
...Ut ? ["fulfilment"] : [],
|
|
2081
2092
|
...Me ? ["integrations"] : [],
|
|
2082
2093
|
...Vt ? ["send_backs"] : [],
|
|
@@ -2084,16 +2095,16 @@ function qp({
|
|
|
2084
2095
|
"sla_status",
|
|
2085
2096
|
"at_risk",
|
|
2086
2097
|
...rn.slice(0, 2).map((e) => `extra.${e}`)
|
|
2087
|
-
], qs = (p == null ? void 0 : p.default_columns) ?? null, Cr =
|
|
2088
|
-
|
|
2098
|
+
], qs = (p == null ? void 0 : p.default_columns) ?? null, Cr = jt ?? qs, oe = new Set(Cr ?? As);
|
|
2099
|
+
xt && !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
2100
|
for (const e of mo) Ft.has(e) || oe.add(e);
|
|
2090
2101
|
const Es = new Set(Xe ? [] : (p == null ? void 0 : p.admin_only_columns) ?? []);
|
|
2091
2102
|
for (const e of Es) oe.delete(e);
|
|
2092
2103
|
const an = [
|
|
2093
2104
|
...(Cr ?? []).filter((e) => po.includes(e)),
|
|
2094
2105
|
...po.filter((e) => !(Cr ?? []).includes(e))
|
|
2095
|
-
],
|
|
2096
|
-
function
|
|
2106
|
+
], Ks = Js(Ys(zs, { activationConstraint: { distance: 4 } }));
|
|
2107
|
+
function Ps(e) {
|
|
2097
2108
|
const { active: t, over: n } = e;
|
|
2098
2109
|
if (!n || t.id === n.id) return;
|
|
2099
2110
|
const r = an.indexOf(String(t.id)), o = an.indexOf(String(n.id));
|
|
@@ -2124,7 +2135,7 @@ function qp({
|
|
|
2124
2135
|
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
2136
|
}
|
|
2126
2137
|
})
|
|
2127
|
-
), $r = [...ao, ...
|
|
2138
|
+
), $r = [...ao, ...Ls, ...Ms], bo = Jd(
|
|
2128
2139
|
an,
|
|
2129
2140
|
(e) => {
|
|
2130
2141
|
var n;
|
|
@@ -2135,20 +2146,20 @@ function qp({
|
|
|
2135
2146
|
), Bs = {
|
|
2136
2147
|
key: "__actions__",
|
|
2137
2148
|
header: "",
|
|
2138
|
-
render: (e) => e.collection === "tasks" || e.collection ===
|
|
2149
|
+
render: (e) => e.collection === "tasks" || e.collection === ot ? null : /* @__PURE__ */ a("span", { onClick: (t) => t.stopPropagation(), children: /* @__PURE__ */ a(
|
|
2139
2150
|
id,
|
|
2140
2151
|
{
|
|
2141
2152
|
collection: e.collection,
|
|
2142
2153
|
id: e.item_id,
|
|
2143
2154
|
label: e.label,
|
|
2144
2155
|
hasPipeline: e.state != null,
|
|
2145
|
-
onOpen: () =>
|
|
2156
|
+
onOpen: () => kt(e),
|
|
2146
2157
|
onPeek: () => Ye(e),
|
|
2147
|
-
urlFor:
|
|
2158
|
+
urlFor: j.urlFor,
|
|
2148
2159
|
onDeleted: () => {
|
|
2149
2160
|
f.request(qr(`/items/${e.collection}/${e.item_id}`)).then(() => {
|
|
2150
|
-
|
|
2151
|
-
}).catch((t) =>
|
|
2161
|
+
P.success("Moved to trash"), y.invalidateQueries({ queryKey: ["queue-items", l] });
|
|
2162
|
+
}).catch((t) => P.error($t(t, "Delete failed")));
|
|
2152
2163
|
},
|
|
2153
2164
|
onAfterTransition: () => void y.invalidateQueries({ queryKey: ["queue-items", l] }),
|
|
2154
2165
|
bulkEnabledKeys: (p == null ? void 0 : p.bulk_action_keys) ?? null,
|
|
@@ -2158,33 +2169,33 @@ function qp({
|
|
|
2158
2169
|
}, Rr = (e) => typeof e.header == "string" ? e.header : e.key, ho = (e) => e.map((t, n) => {
|
|
2159
2170
|
const r = A(`extra.${t.field}`, Ue(t.field));
|
|
2160
2171
|
return `${n === 0 ? t.sign < 0 ? "− " : "" : t.sign < 0 ? " − " : " + "}${r}`;
|
|
2161
|
-
}).join(""),
|
|
2172
|
+
}).join(""), Qs = (e) => {
|
|
2162
2173
|
if (C !== "table" || ie) return e;
|
|
2163
2174
|
const t = Mt(e.key);
|
|
2164
2175
|
if (!t) return e;
|
|
2165
2176
|
const n = (o) => fl(e.key, o), r = t.kind === "none" ? { fn: null, onChange: n, unavailable: t.why } : t.kind === "derived" ? {
|
|
2166
|
-
fn:
|
|
2177
|
+
fn: ct[e.key] === "sum" ? "sum" : null,
|
|
2167
2178
|
onChange: n,
|
|
2168
2179
|
only: ["sum"],
|
|
2169
2180
|
note: `Sum only: worked out as ${ho(t.terms)}.`
|
|
2170
|
-
} : { fn:
|
|
2181
|
+
} : { fn: ct[e.key] ?? null, onChange: n };
|
|
2171
2182
|
return {
|
|
2172
2183
|
...e,
|
|
2173
2184
|
headerMenu: /* @__PURE__ */ a(dd, { label: Rr(e), selectedCount: 0, totals: r })
|
|
2174
2185
|
};
|
|
2175
2186
|
}, et = [
|
|
2176
2187
|
Ds,
|
|
2177
|
-
...an.filter((e) => oe.has(e)).map((e) => $r.find((t) => t.key === e)).filter((e) => e !== void 0).map(
|
|
2188
|
+
...an.filter((e) => oe.has(e)).map((e) => $r.find((t) => t.key === e)).filter((e) => e !== void 0).map(Qs),
|
|
2178
2189
|
...Te ? [ks] : [],
|
|
2179
2190
|
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,
|
|
2191
|
+
], 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, js = (() => {
|
|
2181
2192
|
var n;
|
|
2182
2193
|
if (!la) return;
|
|
2183
2194
|
const e = {};
|
|
2184
2195
|
let t = !1;
|
|
2185
2196
|
for (const r of et) {
|
|
2186
|
-
if (!
|
|
2187
|
-
const o = Mt(r.key), c =
|
|
2197
|
+
if (!mt.includes(r.key)) continue;
|
|
2198
|
+
const o = Mt(r.key), c = ct[r.key];
|
|
2188
2199
|
if (!o || o.kind === "none" || !c) continue;
|
|
2189
2200
|
t = !0;
|
|
2190
2201
|
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({
|
|
@@ -2210,14 +2221,14 @@ function qp({
|
|
|
2210
2221
|
cells: e,
|
|
2211
2222
|
label: /* @__PURE__ */ a("span", { className: "text-[10.5px] font-semibold uppercase tracking-wide text-slate-400 dark:text-slate-500", children: "Σ totals" })
|
|
2212
2223
|
};
|
|
2213
|
-
})(), on = () => Object.fromEntries(
|
|
2214
|
-
dn(e),
|
|
2224
|
+
})(), on = () => Object.fromEntries(mt.map((e) => [e, ct[e]])), xo = (e) => {
|
|
2225
|
+
dn(e), Mn((t) => {
|
|
2215
2226
|
const n = md(t, e);
|
|
2216
|
-
return rl(
|
|
2227
|
+
return rl(En(l), n), n;
|
|
2217
2228
|
});
|
|
2218
|
-
}, [
|
|
2229
|
+
}, [St, ko] = N(!1);
|
|
2219
2230
|
async function Us() {
|
|
2220
|
-
if (!(!s ||
|
|
2231
|
+
if (!(!s || St)) {
|
|
2221
2232
|
ko(!0);
|
|
2222
2233
|
try {
|
|
2223
2234
|
const t = [];
|
|
@@ -2225,8 +2236,8 @@ function qp({
|
|
|
2225
2236
|
const h = await f.request(
|
|
2226
2237
|
D(`/queues/${l}/items`, {
|
|
2227
2238
|
scope: b,
|
|
2228
|
-
sort:
|
|
2229
|
-
filters: JSON.stringify(
|
|
2239
|
+
sort: Kr(U),
|
|
2240
|
+
filters: JSON.stringify(Oe),
|
|
2230
2241
|
page: m,
|
|
2231
2242
|
limit: 100
|
|
2232
2243
|
})
|
|
@@ -2240,11 +2251,11 @@ function qp({
|
|
|
2240
2251
|
header: typeof m.header == "string" ? m.header : m.key === "label" ? "Item" : ""
|
|
2241
2252
|
})),
|
|
2242
2253
|
{
|
|
2243
|
-
stateLabel:
|
|
2254
|
+
stateLabel: Ke,
|
|
2244
2255
|
collectionLabel: Ie,
|
|
2245
2256
|
extraText: (m, h) => {
|
|
2246
2257
|
const T = ye(m);
|
|
2247
|
-
return T && T.type !== "number" ? rt(h, T) :
|
|
2258
|
+
return T && T.type !== "number" ? rt(h, T) : Qr(n(m), h);
|
|
2248
2259
|
},
|
|
2249
2260
|
extraIsNumber: (m) => {
|
|
2250
2261
|
var h;
|
|
@@ -2252,11 +2263,11 @@ function qp({
|
|
|
2252
2263
|
}
|
|
2253
2264
|
}
|
|
2254
2265
|
), o = new Blob([r], { type: "text/csv;charset=utf-8" }), c = URL.createObjectURL(o), u = document.createElement("a");
|
|
2255
|
-
u.href = c, u.download = gu(s.name), document.body.appendChild(u), u.click(), u.remove(), setTimeout(() => URL.revokeObjectURL(c), 1e3),
|
|
2266
|
+
u.href = c, u.download = gu(s.name), document.body.appendChild(u), u.click(), u.remove(), setTimeout(() => URL.revokeObjectURL(c), 1e3), P.success(
|
|
2256
2267
|
t.length >= 1e4 ? `Exported the first ${1e4.toLocaleString("en-US")} rows` : `Exported ${t.length.toLocaleString("en-US")} ${t.length === 1 ? "row" : "rows"}`
|
|
2257
2268
|
);
|
|
2258
2269
|
} catch (e) {
|
|
2259
|
-
|
|
2270
|
+
P.error($t(e, "Could not export this worklist"));
|
|
2260
2271
|
} finally {
|
|
2261
2272
|
ko(!1);
|
|
2262
2273
|
}
|
|
@@ -2264,9 +2275,9 @@ function qp({
|
|
|
2264
2275
|
}
|
|
2265
2276
|
const vo = W(() => {
|
|
2266
2277
|
var r;
|
|
2267
|
-
const e = p == null ? void 0 : p.default_pins, t =
|
|
2278
|
+
const e = p == null ? void 0 : p.default_pins, t = it ?? (e && Object.keys(e).length > 0 ? e : { [((r = et[0]) == null ? void 0 : r.key) ?? "label"]: "left" }), n = new Set(et.map((o) => o.key));
|
|
2268
2279
|
return Object.fromEntries(Object.entries(t).filter(([o]) => n.has(o)));
|
|
2269
|
-
}, [
|
|
2280
|
+
}, [it, p == null ? void 0 : p.default_pins, et.map((e) => e.key).join("|")]), wo = [
|
|
2270
2281
|
{ value: "state", label: "State" },
|
|
2271
2282
|
{ value: "collection", label: "Collection" },
|
|
2272
2283
|
{ value: "sla_status", label: "SLA status" },
|
|
@@ -2284,8 +2295,8 @@ function qp({
|
|
|
2284
2295
|
}, o = (n == null ? void 0 : n.narrowBy) ?? [], c = [];
|
|
2285
2296
|
for (const [Se, ue] of Object.entries(Re)) {
|
|
2286
2297
|
if (Se === e.path || ue.length === 0) continue;
|
|
2287
|
-
const te =
|
|
2288
|
-
!(te != null && te.target_collection) || !te.display_field || o.some((
|
|
2298
|
+
const te = Fn.get(Se);
|
|
2299
|
+
!(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 });
|
|
2289
2300
|
}
|
|
2290
2301
|
const u = [...o, ...c], m = u.length ? Ac(
|
|
2291
2302
|
e.target_collection,
|
|
@@ -2306,7 +2317,7 @@ function qp({
|
|
|
2306
2317
|
Z.has(te) || w && !w.has(te) || (Z.add(te), de.push({ label: $ ? rt(te, $) : te, value: te }));
|
|
2307
2318
|
}
|
|
2308
2319
|
return de;
|
|
2309
|
-
},
|
|
2320
|
+
}, Fn = new Map(((s == null ? void 0 : s.extra_field_meta) ?? []).map((e) => [e.path, e])), tt = [
|
|
2310
2321
|
{
|
|
2311
2322
|
key: "collection",
|
|
2312
2323
|
placeholder: A("collection", "Collection"),
|
|
@@ -2329,7 +2340,7 @@ function qp({
|
|
|
2329
2340
|
).map((e) => {
|
|
2330
2341
|
var t;
|
|
2331
2342
|
return {
|
|
2332
|
-
label:
|
|
2343
|
+
label: Ke(e),
|
|
2333
2344
|
value: e,
|
|
2334
2345
|
// How many rows sit in it under the other active filters (the State
|
|
2335
2346
|
// filter itself left out, or every other state would read 0).
|
|
@@ -2370,7 +2381,7 @@ function qp({
|
|
|
2370
2381
|
type: "range",
|
|
2371
2382
|
range_unit: "h"
|
|
2372
2383
|
},
|
|
2373
|
-
...
|
|
2384
|
+
...xt ? [
|
|
2374
2385
|
{
|
|
2375
2386
|
key: "addendums",
|
|
2376
2387
|
placeholder: "Addendums",
|
|
@@ -2411,13 +2422,13 @@ function qp({
|
|
|
2411
2422
|
]
|
|
2412
2423
|
}
|
|
2413
2424
|
] : [],
|
|
2414
|
-
...
|
|
2425
|
+
...Xn.length > 0 ? [
|
|
2415
2426
|
{
|
|
2416
2427
|
key: "labels",
|
|
2417
2428
|
placeholder: "Triage label",
|
|
2418
2429
|
type: "combobox",
|
|
2419
2430
|
multi: !0,
|
|
2420
|
-
options:
|
|
2431
|
+
options: Xn.map((e) => ({ label: e, value: e }))
|
|
2421
2432
|
}
|
|
2422
2433
|
] : [],
|
|
2423
2434
|
{
|
|
@@ -2442,7 +2453,7 @@ function qp({
|
|
|
2442
2453
|
},
|
|
2443
2454
|
...rn.map((e) => {
|
|
2444
2455
|
var u, m, h;
|
|
2445
|
-
const t =
|
|
2456
|
+
const t = Fn.get(e), n = A(`extra.${e}`, Ue(e)), r = { key: `extra.${e}`, placeholder: n }, o = ye(e);
|
|
2446
2457
|
if ((o == null ? void 0 : o.type) === "datetime") return { ...r, type: "date" };
|
|
2447
2458
|
if ((o == null ? void 0 : o.type) === "number") return { ...r, type: "number" };
|
|
2448
2459
|
if ((o == null ? void 0 : o.type) === "boolean")
|
|
@@ -2463,7 +2474,7 @@ function qp({
|
|
|
2463
2474
|
// not only on an empty one (army 11 Q2-1).
|
|
2464
2475
|
restricted: !!((m = Re[e]) != null && m.length),
|
|
2465
2476
|
options: c.map((T) => ({
|
|
2466
|
-
label: o ? rt(T, o) :
|
|
2477
|
+
label: o ? rt(T, o) : Qr(t, T),
|
|
2467
2478
|
value: T
|
|
2468
2479
|
}))
|
|
2469
2480
|
} : (t == null ? void 0 : t.kind) === "relation" ? {
|
|
@@ -2476,16 +2487,16 @@ function qp({
|
|
|
2476
2487
|
})
|
|
2477
2488
|
], Tr = tt.filter(
|
|
2478
2489
|
(e) => oe.has(e.key) || e.key === "label" || e.key === "owners"
|
|
2479
|
-
),
|
|
2490
|
+
), Or = (e) => {
|
|
2480
2491
|
var t;
|
|
2481
2492
|
return (((t = tt.find((n) => n.key === e)) == null ? void 0 : t.placeholder) ?? e).replace(/^Search\s+/, "").replace(/…$/, "");
|
|
2482
|
-
},
|
|
2493
|
+
}, Lr = (() => {
|
|
2483
2494
|
var n, r;
|
|
2484
2495
|
const e = [];
|
|
2485
2496
|
for (const [o, c] of Object.entries(ve)) {
|
|
2486
2497
|
if (!c || Array.isArray(c) && c.length === 0) continue;
|
|
2487
2498
|
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:
|
|
2499
|
+
field: Or(o),
|
|
2489
2500
|
type: (u == null ? void 0 : u.type) ?? "select",
|
|
2490
2501
|
value: c,
|
|
2491
2502
|
optionLabel: (v) => {
|
|
@@ -2498,7 +2509,7 @@ function qp({
|
|
|
2498
2509
|
T && e.push(T);
|
|
2499
2510
|
}
|
|
2500
2511
|
const t = i == null ? void 0 : i.total;
|
|
2501
|
-
return
|
|
2512
|
+
return Qi({
|
|
2502
2513
|
noun: "items",
|
|
2503
2514
|
scope: b === "mine" ? "you own" : b === "unowned" ? "with no owners" : b === "claimed" ? "you claimed" : null,
|
|
2504
2515
|
viewName: ((r = (n = E == null ? void 0 : E.data) == null ? void 0 : n.find((o) => o.id === fe)) == null ? void 0 : r.name) ?? null,
|
|
@@ -2518,7 +2529,7 @@ function qp({
|
|
|
2518
2529
|
var Z, de, Se;
|
|
2519
2530
|
if (!c.key.startsWith("extra.")) return null;
|
|
2520
2531
|
if (c.type === "combobox") return c;
|
|
2521
|
-
const u = c.key.slice(6), m =
|
|
2532
|
+
const u = c.key.slice(6), m = Fn.get(u), h = ln.has(c.key);
|
|
2522
2533
|
if ((m == null ? void 0 : m.kind) !== "relation" && !h) return null;
|
|
2523
2534
|
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
2535
|
return v != null && v.length ? {
|
|
@@ -2529,7 +2540,7 @@ function qp({
|
|
|
2529
2540
|
cascade: w,
|
|
2530
2541
|
restricted: !!((de = Re[u]) != null && de.length),
|
|
2531
2542
|
options: v.map((ue) => ({
|
|
2532
|
-
label: T && T.type !== "number" ? rt(ue, T) :
|
|
2543
|
+
label: T && T.type !== "number" ? rt(ue, T) : Qr(m, ue),
|
|
2533
2544
|
value: ue
|
|
2534
2545
|
}))
|
|
2535
2546
|
} : (m == null ? void 0 : m.kind) === "relation" ? {
|
|
@@ -2554,7 +2565,7 @@ function qp({
|
|
|
2554
2565
|
var de;
|
|
2555
2566
|
if (!w.key.startsWith("extra.") || u.has(w.key)) return !1;
|
|
2556
2567
|
const Z = w.key.slice(6);
|
|
2557
|
-
return ((de =
|
|
2568
|
+
return ((de = Fn.get(Z)) == null ? void 0 : de.target_collection) === m.collection;
|
|
2558
2569
|
}), $ = v.find((w) => w.key.slice(6).startsWith(`${h}.`)) ?? v[0];
|
|
2559
2570
|
T = $ ? e($) : null;
|
|
2560
2571
|
}
|
|
@@ -2579,7 +2590,7 @@ function qp({
|
|
|
2579
2590
|
label: "past SLA",
|
|
2580
2591
|
tone: "text-red-600 dark:text-red-400",
|
|
2581
2592
|
on: x.sla_status === "breached",
|
|
2582
|
-
toggle: () =>
|
|
2593
|
+
toggle: () => pt("sla_status", "breached")
|
|
2583
2594
|
},
|
|
2584
2595
|
{
|
|
2585
2596
|
key: "warning",
|
|
@@ -2587,7 +2598,7 @@ function qp({
|
|
|
2587
2598
|
label: "SLA soon",
|
|
2588
2599
|
tone: "text-amber-700 dark:text-amber-400",
|
|
2589
2600
|
on: x.sla_status === "warning",
|
|
2590
|
-
toggle: () =>
|
|
2601
|
+
toggle: () => pt("sla_status", "warning")
|
|
2591
2602
|
},
|
|
2592
2603
|
{
|
|
2593
2604
|
key: "at_risk",
|
|
@@ -2595,7 +2606,7 @@ function qp({
|
|
|
2595
2606
|
label: "at risk",
|
|
2596
2607
|
tone: "text-red-600 dark:text-red-400",
|
|
2597
2608
|
on: x.at_risk === "yes",
|
|
2598
|
-
toggle: () =>
|
|
2609
|
+
toggle: () => pt("at_risk", "yes")
|
|
2599
2610
|
},
|
|
2600
2611
|
{
|
|
2601
2612
|
key: "unowned",
|
|
@@ -2604,7 +2615,7 @@ function qp({
|
|
|
2604
2615
|
tone: "text-slate-600 dark:text-slate-300",
|
|
2605
2616
|
on: b === "unowned",
|
|
2606
2617
|
toggle: () => {
|
|
2607
|
-
me(b === "unowned" ? "all" : "unowned"),
|
|
2618
|
+
me(b === "unowned" ? "all" : "unowned"), Q(1);
|
|
2608
2619
|
}
|
|
2609
2620
|
}
|
|
2610
2621
|
].filter((n) => n.n > 0 || n.on);
|
|
@@ -2661,13 +2672,13 @@ function qp({
|
|
|
2661
2672
|
className: "flex flex-wrap items-center gap-2 border-b border-slate-200 bg-white px-4 py-2.5 dark:border-slate-700 dark:bg-slate-900",
|
|
2662
2673
|
"data-queue-toolbar": !0,
|
|
2663
2674
|
children: [
|
|
2664
|
-
G ? /* @__PURE__ */ a("div", { className: "flex overflow-hidden rounded-md border border-slate-200 dark:border-border", children:
|
|
2675
|
+
G ? /* @__PURE__ */ a("div", { className: "flex overflow-hidden rounded-md border border-slate-200 dark:border-border", children: jr.filter((e) => Te || e.value !== "claimed").map(
|
|
2665
2676
|
(e, t) => /* @__PURE__ */ a(
|
|
2666
2677
|
"button",
|
|
2667
2678
|
{
|
|
2668
2679
|
type: "button",
|
|
2669
2680
|
onClick: () => {
|
|
2670
|
-
me(e.value),
|
|
2681
|
+
me(e.value), Q(1);
|
|
2671
2682
|
},
|
|
2672
2683
|
className: F(
|
|
2673
2684
|
"flex h-8 items-center px-3 text-[12px] font-medium transition-colors",
|
|
@@ -2689,7 +2700,7 @@ function qp({
|
|
|
2689
2700
|
"button",
|
|
2690
2701
|
{
|
|
2691
2702
|
type: "button",
|
|
2692
|
-
onClick: () =>
|
|
2703
|
+
onClick: () => lt(e.value),
|
|
2693
2704
|
className: F(
|
|
2694
2705
|
"flex h-8 items-center px-3 text-[12px] font-medium transition-colors",
|
|
2695
2706
|
t > 0 && "border-l border-slate-200 dark:border-border",
|
|
@@ -2701,7 +2712,7 @@ function qp({
|
|
|
2701
2712
|
)) })
|
|
2702
2713
|
) : /* @__PURE__ */ a("div", { className: "h-8 w-40 animate-pulse rounded-md bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" }),
|
|
2703
2714
|
/* @__PURE__ */ a(Md, { className: "h-8" }),
|
|
2704
|
-
|
|
2715
|
+
Bn > 0 && !Pt.label && /* @__PURE__ */ d(
|
|
2705
2716
|
"button",
|
|
2706
2717
|
{
|
|
2707
2718
|
type: "button",
|
|
@@ -2709,9 +2720,9 @@ function qp({
|
|
|
2709
2720
|
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
2721
|
children: [
|
|
2711
2722
|
/* @__PURE__ */ a(si, { className: "h-3 w-3" }),
|
|
2712
|
-
ne(
|
|
2723
|
+
ne(Bn),
|
|
2713
2724
|
" update",
|
|
2714
|
-
|
|
2725
|
+
Bn === 1 ? "" : "s",
|
|
2715
2726
|
" · Refresh"
|
|
2716
2727
|
]
|
|
2717
2728
|
}
|
|
@@ -2747,7 +2758,7 @@ function qp({
|
|
|
2747
2758
|
}
|
|
2748
2759
|
)
|
|
2749
2760
|
},
|
|
2750
|
-
...
|
|
2761
|
+
...xt ? [
|
|
2751
2762
|
{
|
|
2752
2763
|
key: "addendums",
|
|
2753
2764
|
kind: "filter",
|
|
@@ -2792,17 +2803,17 @@ function qp({
|
|
|
2792
2803
|
}
|
|
2793
2804
|
] : [],
|
|
2794
2805
|
{ key: "focus", priority: 30, label: "Focus mode", node: /* @__PURE__ */ a(yd, {}) },
|
|
2795
|
-
...(
|
|
2806
|
+
...(dt || S) && l ? [
|
|
2796
2807
|
{
|
|
2797
2808
|
key: "live-pause",
|
|
2798
|
-
priority:
|
|
2799
|
-
active:
|
|
2809
|
+
priority: Pe.paused ? 90 : 45,
|
|
2810
|
+
active: Pe.paused,
|
|
2800
2811
|
node: /* @__PURE__ */ a(
|
|
2801
2812
|
Rd,
|
|
2802
2813
|
{
|
|
2803
|
-
paused:
|
|
2804
|
-
held:
|
|
2805
|
-
onToggle:
|
|
2814
|
+
paused: Pe.paused,
|
|
2815
|
+
held: Pe.held,
|
|
2816
|
+
onToggle: Pe.toggle
|
|
2806
2817
|
}
|
|
2807
2818
|
)
|
|
2808
2819
|
}
|
|
@@ -2812,8 +2823,8 @@ function qp({
|
|
|
2812
2823
|
key: "group",
|
|
2813
2824
|
priority: R ? 80 : 52,
|
|
2814
2825
|
active: !!R,
|
|
2815
|
-
node: /* @__PURE__ */ d(
|
|
2816
|
-
/* @__PURE__ */ a(
|
|
2826
|
+
node: /* @__PURE__ */ d(Rt, { children: [
|
|
2827
|
+
/* @__PURE__ */ a(Tt, { asChild: !0, children: /* @__PURE__ */ d(
|
|
2817
2828
|
"button",
|
|
2818
2829
|
{
|
|
2819
2830
|
type: "button",
|
|
@@ -2827,7 +2838,7 @@ function qp({
|
|
|
2827
2838
|
]
|
|
2828
2839
|
}
|
|
2829
2840
|
) }),
|
|
2830
|
-
/* @__PURE__ */ a(
|
|
2841
|
+
/* @__PURE__ */ a(Ot, { className: "w-[200px] p-0", align: "start", children: /* @__PURE__ */ d(sl, { children: [
|
|
2831
2842
|
/* @__PURE__ */ a(Wd, { placeholder: "Group by…", className: "h-8 text-[12px]" }),
|
|
2832
2843
|
/* @__PURE__ */ d(il, { children: [
|
|
2833
2844
|
/* @__PURE__ */ a(Hd, { children: "No attribute found." }),
|
|
@@ -2880,7 +2891,7 @@ function qp({
|
|
|
2880
2891
|
{
|
|
2881
2892
|
type: "button",
|
|
2882
2893
|
onClick: () => {
|
|
2883
|
-
|
|
2894
|
+
st(U === "-priority" ? "" : "-priority"), Q(1);
|
|
2884
2895
|
},
|
|
2885
2896
|
"aria-pressed": U === "-priority",
|
|
2886
2897
|
className: F(
|
|
@@ -2903,7 +2914,7 @@ function qp({
|
|
|
2903
2914
|
"button",
|
|
2904
2915
|
{
|
|
2905
2916
|
type: "button",
|
|
2906
|
-
onClick: () =>
|
|
2917
|
+
onClick: () => Kn(
|
|
2907
2918
|
xe.size > 0 ? /* @__PURE__ */ new Set() : new Set(we.map((e) => e.key))
|
|
2908
2919
|
),
|
|
2909
2920
|
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",
|
|
@@ -2916,8 +2927,8 @@ function qp({
|
|
|
2916
2927
|
{
|
|
2917
2928
|
key: "lanes",
|
|
2918
2929
|
priority: 60,
|
|
2919
|
-
node: /* @__PURE__ */ d(
|
|
2920
|
-
/* @__PURE__ */ a(
|
|
2930
|
+
node: /* @__PURE__ */ d(Rt, { children: [
|
|
2931
|
+
/* @__PURE__ */ a(Tt, { asChild: !0, children: /* @__PURE__ */ d(
|
|
2921
2932
|
"button",
|
|
2922
2933
|
{
|
|
2923
2934
|
type: "button",
|
|
@@ -2931,7 +2942,7 @@ function qp({
|
|
|
2931
2942
|
]
|
|
2932
2943
|
}
|
|
2933
2944
|
) }),
|
|
2934
|
-
/* @__PURE__ */ a(
|
|
2945
|
+
/* @__PURE__ */ a(Ot, { className: "w-[180px] p-0", align: "start", children: /* @__PURE__ */ a(sl, { children: /* @__PURE__ */ d(il, { children: [
|
|
2935
2946
|
/* @__PURE__ */ a(sn, { value: "none", onSelect: () => Pn(null), children: "None" }),
|
|
2936
2947
|
/* @__PURE__ */ a(
|
|
2937
2948
|
sn,
|
|
@@ -2997,20 +3008,20 @@ function qp({
|
|
|
2997
3008
|
{
|
|
2998
3009
|
key: "export",
|
|
2999
3010
|
priority: 65,
|
|
3000
|
-
active:
|
|
3011
|
+
active: St,
|
|
3001
3012
|
node: /* @__PURE__ */ d(
|
|
3002
3013
|
"button",
|
|
3003
3014
|
{
|
|
3004
3015
|
type: "button",
|
|
3005
3016
|
onClick: () => void Us(),
|
|
3006
|
-
disabled:
|
|
3017
|
+
disabled: St || !i || (i.total ?? 0) === 0,
|
|
3007
3018
|
"data-tip": "Download the rows on this tab, with these filters and columns, as a spreadsheet (CSV)",
|
|
3008
|
-
"aria-label":
|
|
3009
|
-
"aria-busy":
|
|
3019
|
+
"aria-label": St ? "Exporting to CSV" : "Export to CSV",
|
|
3020
|
+
"aria-busy": St || void 0,
|
|
3010
3021
|
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
3022
|
"data-queue-export": !0,
|
|
3012
3023
|
children: [
|
|
3013
|
-
|
|
3024
|
+
St ? /* @__PURE__ */ a(Go, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ a(pi, { className: "h-3.5 w-3.5" }),
|
|
3014
3025
|
"Export"
|
|
3015
3026
|
]
|
|
3016
3027
|
}
|
|
@@ -3044,8 +3055,8 @@ function qp({
|
|
|
3044
3055
|
{
|
|
3045
3056
|
key: "columns",
|
|
3046
3057
|
priority: 62,
|
|
3047
|
-
node: /* @__PURE__ */ d(
|
|
3048
|
-
/* @__PURE__ */ a(
|
|
3058
|
+
node: /* @__PURE__ */ d(Rt, { children: [
|
|
3059
|
+
/* @__PURE__ */ a(Tt, { asChild: !0, children: /* @__PURE__ */ d(
|
|
3049
3060
|
"button",
|
|
3050
3061
|
{
|
|
3051
3062
|
type: "button",
|
|
@@ -3057,7 +3068,7 @@ function qp({
|
|
|
3057
3068
|
}
|
|
3058
3069
|
) }),
|
|
3059
3070
|
/* @__PURE__ */ a(
|
|
3060
|
-
|
|
3071
|
+
Ot,
|
|
3061
3072
|
{
|
|
3062
3073
|
className: "max-h-[var(--radix-popover-content-available-height)] w-[min(240px,calc(100vw-2rem))] overflow-y-auto overscroll-contain p-2",
|
|
3063
3074
|
align: "end",
|
|
@@ -3066,9 +3077,9 @@ function qp({
|
|
|
3066
3077
|
children: /* @__PURE__ */ a(
|
|
3067
3078
|
Xs,
|
|
3068
3079
|
{
|
|
3069
|
-
sensors:
|
|
3080
|
+
sensors: Ks,
|
|
3070
3081
|
collisionDetection: Zs,
|
|
3071
|
-
onDragEnd:
|
|
3082
|
+
onDragEnd: Ps,
|
|
3072
3083
|
children: /* @__PURE__ */ a(
|
|
3073
3084
|
ei,
|
|
3074
3085
|
{
|
|
@@ -3077,7 +3088,7 @@ function qp({
|
|
|
3077
3088
|
children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: bo.map((e) => {
|
|
3078
3089
|
const t = $r.find((n) => n.key === e);
|
|
3079
3090
|
return /* @__PURE__ */ a(
|
|
3080
|
-
|
|
3091
|
+
Ou,
|
|
3081
3092
|
{
|
|
3082
3093
|
id: e,
|
|
3083
3094
|
label: typeof (t == null ? void 0 : t.header) == "string" ? t.header : e,
|
|
@@ -3122,18 +3133,18 @@ function qp({
|
|
|
3122
3133
|
{
|
|
3123
3134
|
key: "density",
|
|
3124
3135
|
priority: 22,
|
|
3125
|
-
label:
|
|
3136
|
+
label: Lt === "compact" ? "Comfortable rows" : "Compact rows",
|
|
3126
3137
|
node: /* @__PURE__ */ a(
|
|
3127
3138
|
"button",
|
|
3128
3139
|
{
|
|
3129
3140
|
type: "button",
|
|
3130
3141
|
onClick: () => {
|
|
3131
|
-
pl(
|
|
3142
|
+
pl(Lt === "compact" ? "comfortable" : "compact");
|
|
3132
3143
|
},
|
|
3133
3144
|
"aria-label": "Row density",
|
|
3134
|
-
title:
|
|
3145
|
+
title: Lt === "compact" ? "Switch to comfortable rows" : "Switch to compact rows",
|
|
3135
3146
|
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:
|
|
3147
|
+
children: Lt === "compact" ? /* @__PURE__ */ a(yi, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ a(gi, { className: "h-3.5 w-3.5" })
|
|
3137
3148
|
}
|
|
3138
3149
|
)
|
|
3139
3150
|
}
|
|
@@ -3146,7 +3157,7 @@ function qp({
|
|
|
3146
3157
|
"button",
|
|
3147
3158
|
{
|
|
3148
3159
|
type: "button",
|
|
3149
|
-
onClick: () =>
|
|
3160
|
+
onClick: () => Qa(),
|
|
3150
3161
|
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
3162
|
children: [
|
|
3152
3163
|
/* @__PURE__ */ a(xi, { className: "h-3 w-3 fill-current" }),
|
|
@@ -3158,26 +3169,26 @@ function qp({
|
|
|
3158
3169
|
] : []
|
|
3159
3170
|
],
|
|
3160
3171
|
trail: /* @__PURE__ */ d(Ce, { children: [
|
|
3161
|
-
!
|
|
3162
|
-
/* @__PURE__ */ a(
|
|
3172
|
+
!In && pe.length === 1 && (hn ? /* @__PURE__ */ d(Rt, { children: [
|
|
3173
|
+
/* @__PURE__ */ a(Tt, { asChild: !0, children: /* @__PURE__ */ d(
|
|
3163
3174
|
"button",
|
|
3164
3175
|
{
|
|
3165
3176
|
type: "button",
|
|
3166
3177
|
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
3178
|
children: [
|
|
3168
|
-
/* @__PURE__ */ a(
|
|
3179
|
+
/* @__PURE__ */ a(qn, { className: "h-3.5 w-3.5" }),
|
|
3169
3180
|
"New ",
|
|
3170
3181
|
Dr(pe[0]),
|
|
3171
3182
|
/* @__PURE__ */ a(Vo, { className: "h-3 w-3 opacity-60" })
|
|
3172
3183
|
]
|
|
3173
3184
|
}
|
|
3174
3185
|
) }),
|
|
3175
|
-
/* @__PURE__ */ d(
|
|
3186
|
+
/* @__PURE__ */ d(Ot, { align: "end", className: "w-60 p-1", children: [
|
|
3176
3187
|
/* @__PURE__ */ d(
|
|
3177
3188
|
"button",
|
|
3178
3189
|
{
|
|
3179
3190
|
type: "button",
|
|
3180
|
-
onClick: () =>
|
|
3191
|
+
onClick: () => j.open({
|
|
3181
3192
|
collection: pe[0],
|
|
3182
3193
|
itemId: "new",
|
|
3183
3194
|
// Same layout the queue opens existing records with.
|
|
@@ -3194,7 +3205,7 @@ function qp({
|
|
|
3194
3205
|
"button",
|
|
3195
3206
|
{
|
|
3196
3207
|
type: "button",
|
|
3197
|
-
onClick: () =>
|
|
3208
|
+
onClick: () => j.open({
|
|
3198
3209
|
collection: pe[0],
|
|
3199
3210
|
itemId: "new",
|
|
3200
3211
|
layoutSlug: e.slug
|
|
@@ -3209,7 +3220,7 @@ function qp({
|
|
|
3209
3220
|
"button",
|
|
3210
3221
|
{
|
|
3211
3222
|
type: "button",
|
|
3212
|
-
onClick: () =>
|
|
3223
|
+
onClick: () => j.open({
|
|
3213
3224
|
collection: pe[0],
|
|
3214
3225
|
itemId: "new",
|
|
3215
3226
|
// Open a new record on the same layout the queue opens
|
|
@@ -3218,48 +3229,48 @@ function qp({
|
|
|
3218
3229
|
}),
|
|
3219
3230
|
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
3231
|
children: [
|
|
3221
|
-
/* @__PURE__ */ a(
|
|
3232
|
+
/* @__PURE__ */ a(qn, { className: "h-3.5 w-3.5" }),
|
|
3222
3233
|
"New ",
|
|
3223
3234
|
Dr(pe[0])
|
|
3224
3235
|
]
|
|
3225
3236
|
}
|
|
3226
3237
|
)),
|
|
3227
|
-
!
|
|
3228
|
-
/* @__PURE__ */ a(
|
|
3238
|
+
!In && pe.length > 1 && /* @__PURE__ */ d(Rt, { children: [
|
|
3239
|
+
/* @__PURE__ */ a(Tt, { asChild: !0, children: /* @__PURE__ */ d(
|
|
3229
3240
|
"button",
|
|
3230
3241
|
{
|
|
3231
3242
|
type: "button",
|
|
3232
3243
|
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
3244
|
children: [
|
|
3234
|
-
/* @__PURE__ */ a(
|
|
3245
|
+
/* @__PURE__ */ a(qn, { className: "h-3.5 w-3.5" }),
|
|
3235
3246
|
"New",
|
|
3236
3247
|
/* @__PURE__ */ a(Vo, { className: "h-3 w-3 opacity-60" })
|
|
3237
3248
|
]
|
|
3238
3249
|
}
|
|
3239
3250
|
) }),
|
|
3240
|
-
/* @__PURE__ */ a(
|
|
3251
|
+
/* @__PURE__ */ a(Ot, { align: "end", className: "w-56 p-1", children: pe.map((e) => /* @__PURE__ */ d(
|
|
3241
3252
|
"button",
|
|
3242
3253
|
{
|
|
3243
3254
|
type: "button",
|
|
3244
|
-
onClick: () =>
|
|
3255
|
+
onClick: () => j.open({
|
|
3245
3256
|
collection: e,
|
|
3246
3257
|
itemId: "new",
|
|
3247
3258
|
layoutSlug: (p == null ? void 0 : p.item_layout) ?? null
|
|
3248
3259
|
}),
|
|
3249
3260
|
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
3261
|
children: [
|
|
3251
|
-
/* @__PURE__ */ a(
|
|
3262
|
+
/* @__PURE__ */ a(qn, { className: "h-3 w-3 opacity-60" }),
|
|
3252
3263
|
Dr(e)
|
|
3253
3264
|
]
|
|
3254
3265
|
},
|
|
3255
3266
|
e
|
|
3256
3267
|
)) })
|
|
3257
3268
|
] }),
|
|
3258
|
-
!
|
|
3269
|
+
!In && ut && $e && /* @__PURE__ */ a(
|
|
3259
3270
|
vd,
|
|
3260
3271
|
{
|
|
3261
|
-
collection:
|
|
3262
|
-
onParsed: (e, t) => $e(`/collections/${
|
|
3272
|
+
collection: ut,
|
|
3273
|
+
onParsed: (e, t) => $e(`/collections/${ut}/new`, {
|
|
3263
3274
|
state: { importResult: e, importTemplateId: t.id }
|
|
3264
3275
|
})
|
|
3265
3276
|
}
|
|
@@ -3284,7 +3295,7 @@ function qp({
|
|
|
3284
3295
|
count: (g == null ? void 0 : g.total) ?? 0,
|
|
3285
3296
|
filteredCount: J ? J.total : null,
|
|
3286
3297
|
active: Object.values(x).every(Nl) && b === "all",
|
|
3287
|
-
isLoading:
|
|
3298
|
+
isLoading: bt,
|
|
3288
3299
|
...Jt("total"),
|
|
3289
3300
|
onClick: Sl
|
|
3290
3301
|
}
|
|
@@ -3298,10 +3309,10 @@ function qp({
|
|
|
3298
3309
|
filteredCount: J ? J.sla_warning : null,
|
|
3299
3310
|
tone: "amber",
|
|
3300
3311
|
active: x.sla_status === "warning",
|
|
3301
|
-
isLoading:
|
|
3312
|
+
isLoading: bt,
|
|
3302
3313
|
deltaBadIsUp: !0,
|
|
3303
3314
|
...Jt("sla_warning"),
|
|
3304
|
-
onClick: () =>
|
|
3315
|
+
onClick: () => pt("sla_status", "warning")
|
|
3305
3316
|
}
|
|
3306
3317
|
),
|
|
3307
3318
|
/* @__PURE__ */ a(
|
|
@@ -3312,10 +3323,10 @@ function qp({
|
|
|
3312
3323
|
filteredCount: J ? J.sla_breached : null,
|
|
3313
3324
|
tone: "red",
|
|
3314
3325
|
active: x.sla_status === "breached",
|
|
3315
|
-
isLoading:
|
|
3326
|
+
isLoading: bt,
|
|
3316
3327
|
deltaBadIsUp: !0,
|
|
3317
3328
|
...Jt("sla_breached"),
|
|
3318
|
-
onClick: () =>
|
|
3329
|
+
onClick: () => pt("sla_status", "breached")
|
|
3319
3330
|
}
|
|
3320
3331
|
)
|
|
3321
3332
|
] }),
|
|
@@ -3328,10 +3339,10 @@ function qp({
|
|
|
3328
3339
|
filteredCount: J ? J.at_risk : null,
|
|
3329
3340
|
tone: "red",
|
|
3330
3341
|
active: x.at_risk === "yes",
|
|
3331
|
-
isLoading:
|
|
3342
|
+
isLoading: bt,
|
|
3332
3343
|
deltaBadIsUp: !0,
|
|
3333
3344
|
...Jt("at_risk"),
|
|
3334
|
-
onClick: () =>
|
|
3345
|
+
onClick: () => pt("at_risk", "yes")
|
|
3335
3346
|
}
|
|
3336
3347
|
),
|
|
3337
3348
|
/* @__PURE__ */ a(
|
|
@@ -3341,11 +3352,11 @@ function qp({
|
|
|
3341
3352
|
count: (g == null ? void 0 : g.unowned) ?? 0,
|
|
3342
3353
|
filteredCount: J ? J.unowned : null,
|
|
3343
3354
|
active: b === "unowned",
|
|
3344
|
-
isLoading:
|
|
3355
|
+
isLoading: bt,
|
|
3345
3356
|
deltaBadIsUp: !0,
|
|
3346
3357
|
...Jt("unowned"),
|
|
3347
3358
|
onClick: () => {
|
|
3348
|
-
me(b === "unowned" ? "all" : "unowned"),
|
|
3359
|
+
me(b === "unowned" ? "all" : "unowned"), Q(1);
|
|
3349
3360
|
}
|
|
3350
3361
|
}
|
|
3351
3362
|
)
|
|
@@ -3363,7 +3374,7 @@ function qp({
|
|
|
3363
3374
|
V((r) => ({
|
|
3364
3375
|
...r,
|
|
3365
3376
|
aging_hours: r.aging_hours === t ? "" : t
|
|
3366
|
-
})),
|
|
3377
|
+
})), Q(1);
|
|
3367
3378
|
},
|
|
3368
3379
|
className: F(
|
|
3369
3380
|
"rounded-md border px-2 py-1 tabular-nums transition-colors",
|
|
@@ -3404,7 +3415,7 @@ function qp({
|
|
|
3404
3415
|
return /* @__PURE__ */ a(
|
|
3405
3416
|
Tu,
|
|
3406
3417
|
{
|
|
3407
|
-
label:
|
|
3418
|
+
label: Ke(e),
|
|
3408
3419
|
count: t,
|
|
3409
3420
|
filteredCount: J ? J.by_state[e] ?? 0 : null,
|
|
3410
3421
|
color: ((n = Be[e]) == null ? void 0 : n.color) ?? null,
|
|
@@ -3431,10 +3442,10 @@ function qp({
|
|
|
3431
3442
|
values: x,
|
|
3432
3443
|
seededKeys: ln,
|
|
3433
3444
|
onApply: (e) => {
|
|
3434
|
-
V((t) => ({ ...t, ...e })),
|
|
3445
|
+
V((t) => ({ ...t, ...e })), Q(1);
|
|
3435
3446
|
},
|
|
3436
3447
|
onClear: () => {
|
|
3437
|
-
V({ ...ke.current }),
|
|
3448
|
+
V({ ...ke.current }), Q(1);
|
|
3438
3449
|
},
|
|
3439
3450
|
right: Ws
|
|
3440
3451
|
}
|
|
@@ -3445,19 +3456,19 @@ function qp({
|
|
|
3445
3456
|
className: "flex shrink-0 flex-wrap items-center gap-1.5 border-b border-slate-100 bg-white px-4 py-1.5 dark:border-slate-800 dark:bg-slate-900",
|
|
3446
3457
|
"data-queue-saved-views": !0,
|
|
3447
3458
|
children: [
|
|
3448
|
-
((i == null ? void 0 : i.total) ?? 0) > 0 &&
|
|
3459
|
+
((i == null ? void 0 : i.total) ?? 0) > 0 && Le > 0 && /* @__PURE__ */ d(
|
|
3449
3460
|
"span",
|
|
3450
3461
|
{
|
|
3451
|
-
"data-queue-default-hiding":
|
|
3462
|
+
"data-queue-default-hiding": Le,
|
|
3452
3463
|
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
3464
|
children: [
|
|
3454
3465
|
"Your default ",
|
|
3455
|
-
pa(
|
|
3466
|
+
pa(Or),
|
|
3456
3467
|
" filter is hiding",
|
|
3457
3468
|
" ",
|
|
3458
|
-
|
|
3469
|
+
Le.toLocaleString("en-US"),
|
|
3459
3470
|
" item",
|
|
3460
|
-
|
|
3471
|
+
Le === 1 ? "" : "s",
|
|
3461
3472
|
" ·",
|
|
3462
3473
|
/* @__PURE__ */ a(
|
|
3463
3474
|
"button",
|
|
@@ -3497,7 +3508,7 @@ function qp({
|
|
|
3497
3508
|
V((e) => {
|
|
3498
3509
|
const { owners: t, ...n } = e;
|
|
3499
3510
|
return n;
|
|
3500
|
-
}),
|
|
3511
|
+
}), Q(1);
|
|
3501
3512
|
},
|
|
3502
3513
|
className: "flex h-4 w-4 items-center justify-center rounded-full text-[10px] hover:bg-black/10 dark:hover:bg-white/10",
|
|
3503
3514
|
children: "✕"
|
|
@@ -3533,17 +3544,17 @@ function qp({
|
|
|
3533
3544
|
"button",
|
|
3534
3545
|
{
|
|
3535
3546
|
type: "button",
|
|
3536
|
-
title:
|
|
3537
|
-
onClick: () => cs.mutate(
|
|
3547
|
+
title: gt === e.id ? "Your default view — click to revert to the general default" : "Set as your default view",
|
|
3548
|
+
onClick: () => cs.mutate(gt === e.id ? null : e.id),
|
|
3538
3549
|
className: F(
|
|
3539
3550
|
"shrink-0",
|
|
3540
|
-
|
|
3551
|
+
gt === e.id ? "text-amber-400" : "text-slate-300 hover:text-amber-400 dark:text-slate-600"
|
|
3541
3552
|
),
|
|
3542
3553
|
children: /* @__PURE__ */ a(
|
|
3543
3554
|
ki,
|
|
3544
3555
|
{
|
|
3545
|
-
className: F("h-3 w-3",
|
|
3546
|
-
"aria-label":
|
|
3556
|
+
className: F("h-3 w-3", gt === e.id && "fill-current"),
|
|
3557
|
+
"aria-label": gt === e.id ? "Default view" : "Set as default"
|
|
3547
3558
|
}
|
|
3548
3559
|
)
|
|
3549
3560
|
}
|
|
@@ -3621,7 +3632,7 @@ function qp({
|
|
|
3621
3632
|
"button",
|
|
3622
3633
|
{
|
|
3623
3634
|
type: "button",
|
|
3624
|
-
onClick: () =>
|
|
3635
|
+
onClick: () => Rn(null),
|
|
3625
3636
|
className: "text-slate-500 hover:underline dark:text-slate-400",
|
|
3626
3637
|
"aria-label": `Keep view ${e.name}`,
|
|
3627
3638
|
children: "No"
|
|
@@ -3633,7 +3644,7 @@ function qp({
|
|
|
3633
3644
|
"button",
|
|
3634
3645
|
{
|
|
3635
3646
|
type: "button",
|
|
3636
|
-
onClick: () =>
|
|
3647
|
+
onClick: () => Rn(e.id),
|
|
3637
3648
|
className: "invisible text-slate-400 hover:text-red-500 group-hover:visible",
|
|
3638
3649
|
"aria-label": `Delete view ${e.name}`,
|
|
3639
3650
|
children: "×"
|
|
@@ -3644,8 +3655,8 @@ function qp({
|
|
|
3644
3655
|
e.id
|
|
3645
3656
|
);
|
|
3646
3657
|
}),
|
|
3647
|
-
/* @__PURE__ */ d(
|
|
3648
|
-
/* @__PURE__ */ a(
|
|
3658
|
+
/* @__PURE__ */ d(Rt, { open: ns, onOpenChange: fr, children: [
|
|
3659
|
+
/* @__PURE__ */ a(Tt, { asChild: !0, children: /* @__PURE__ */ a(
|
|
3649
3660
|
"button",
|
|
3650
3661
|
{
|
|
3651
3662
|
type: "button",
|
|
@@ -3654,7 +3665,7 @@ function qp({
|
|
|
3654
3665
|
children: "☆ Save view"
|
|
3655
3666
|
}
|
|
3656
3667
|
) }),
|
|
3657
|
-
/* @__PURE__ */ d(
|
|
3668
|
+
/* @__PURE__ */ d(Ot, { className: "w-[240px] p-3", align: "end", children: [
|
|
3658
3669
|
(() => {
|
|
3659
3670
|
const e = E == null ? void 0 : E.data.find((t) => t.id === fe);
|
|
3660
3671
|
return !e || e.user !== z && !Xe ? null : /* @__PURE__ */ d(
|
|
@@ -3677,10 +3688,10 @@ function qp({
|
|
|
3677
3688
|
/* @__PURE__ */ a(
|
|
3678
3689
|
"input",
|
|
3679
3690
|
{
|
|
3680
|
-
value:
|
|
3681
|
-
onChange: (e) =>
|
|
3691
|
+
value: Nn,
|
|
3692
|
+
onChange: (e) => ja(e.target.value),
|
|
3682
3693
|
onKeyDown: (e) => {
|
|
3683
|
-
e.key !== "Enter" || e.nativeEvent.isComposing || (e.preventDefault(),
|
|
3694
|
+
e.key !== "Enter" || e.nativeEvent.isComposing || (e.preventDefault(), Nn.trim() && !$n.isPending && $n.mutate());
|
|
3684
3695
|
},
|
|
3685
3696
|
placeholder: "View name",
|
|
3686
3697
|
"aria-label": "View name",
|
|
@@ -3691,8 +3702,8 @@ function qp({
|
|
|
3691
3702
|
/* @__PURE__ */ a(
|
|
3692
3703
|
Ur,
|
|
3693
3704
|
{
|
|
3694
|
-
checked: Ua ||
|
|
3695
|
-
disabled:
|
|
3705
|
+
checked: Ua || vt,
|
|
3706
|
+
disabled: vt,
|
|
3696
3707
|
onCheckedChange: (e) => Va(e === !0)
|
|
3697
3708
|
}
|
|
3698
3709
|
),
|
|
@@ -3702,19 +3713,19 @@ function qp({
|
|
|
3702
3713
|
/* @__PURE__ */ a(
|
|
3703
3714
|
Ur,
|
|
3704
3715
|
{
|
|
3705
|
-
checked:
|
|
3716
|
+
checked: vt,
|
|
3706
3717
|
onCheckedChange: (e) => Ga(e === !0)
|
|
3707
3718
|
}
|
|
3708
3719
|
),
|
|
3709
3720
|
"Set as queue default (everyone starts here)"
|
|
3710
3721
|
] }),
|
|
3711
|
-
tn &&
|
|
3722
|
+
tn && vt && /* @__PURE__ */ a("p", { className: "-mt-1 mb-2 pl-6 text-[11px] text-slate-500 dark:text-slate-400", children: "Saves columns, sort and totals. Filters stay each person's own." }),
|
|
3712
3723
|
/* @__PURE__ */ a(
|
|
3713
3724
|
"button",
|
|
3714
3725
|
{
|
|
3715
3726
|
type: "button",
|
|
3716
|
-
disabled: !
|
|
3717
|
-
onClick: () =>
|
|
3727
|
+
disabled: !Nn.trim() || $n.isPending,
|
|
3728
|
+
onClick: () => $n.mutate(),
|
|
3718
3729
|
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
3730
|
children: "Save current view"
|
|
3720
3731
|
}
|
|
@@ -3725,16 +3736,16 @@ function qp({
|
|
|
3725
3736
|
}
|
|
3726
3737
|
)
|
|
3727
3738
|
] }),
|
|
3728
|
-
/* @__PURE__ */ d("div", { ref:
|
|
3729
|
-
da && /* @__PURE__ */ a($d, { error: El, onRetry: () => void
|
|
3730
|
-
|
|
3739
|
+
/* @__PURE__ */ d("div", { ref: Sn, className: "flex min-h-0 flex-1 flex-col overflow-y-auto px-4 pb-4 pt-3", children: [
|
|
3740
|
+
da && /* @__PURE__ */ a($d, { error: El, onRetry: () => void Kl(), className: "mb-3" }),
|
|
3741
|
+
Lr && /* @__PURE__ */ a(
|
|
3731
3742
|
"p",
|
|
3732
3743
|
{
|
|
3733
3744
|
"data-filter-sentence": !0,
|
|
3734
|
-
"data-tip":
|
|
3745
|
+
"data-tip": Lr,
|
|
3735
3746
|
"aria-live": "polite",
|
|
3736
3747
|
className: "mb-1.5 shrink-0 truncate px-0.5 text-[11.5px] text-slate-500 dark:text-slate-400",
|
|
3737
|
-
children:
|
|
3748
|
+
children: Lr
|
|
3738
3749
|
}
|
|
3739
3750
|
),
|
|
3740
3751
|
C === "table" ? /* @__PURE__ */ a(Ce, { children: /* @__PURE__ */ a("div", { className: "flex min-h-0 flex-1", children: /* @__PURE__ */ d(
|
|
@@ -3747,10 +3758,10 @@ function qp({
|
|
|
3747
3758
|
),
|
|
3748
3759
|
"aria-busy": ba || void 0,
|
|
3749
3760
|
children: [
|
|
3750
|
-
|
|
3761
|
+
Pt.label && /* @__PURE__ */ a(
|
|
3751
3762
|
Td,
|
|
3752
3763
|
{
|
|
3753
|
-
label:
|
|
3764
|
+
label: Pt.label,
|
|
3754
3765
|
onShow: Ta,
|
|
3755
3766
|
className: "bottom-28"
|
|
3756
3767
|
}
|
|
@@ -3766,7 +3777,7 @@ function qp({
|
|
|
3766
3777
|
{
|
|
3767
3778
|
fillHeight: !0,
|
|
3768
3779
|
enterKey: Ca.current,
|
|
3769
|
-
density:
|
|
3780
|
+
density: Lt,
|
|
3770
3781
|
minBodyHeight: 360,
|
|
3771
3782
|
columns: et,
|
|
3772
3783
|
rows: Sa.rows,
|
|
@@ -3774,9 +3785,9 @@ function qp({
|
|
|
3774
3785
|
total: (i == null ? void 0 : i.total) ?? 0,
|
|
3775
3786
|
page: se,
|
|
3776
3787
|
limit: pn,
|
|
3777
|
-
isLoading:
|
|
3778
|
-
onPageChange:
|
|
3779
|
-
onRowClick: (e) =>
|
|
3788
|
+
isLoading: bt,
|
|
3789
|
+
onPageChange: Q,
|
|
3790
|
+
onRowClick: (e) => _n(e),
|
|
3780
3791
|
onRowFocus: (e) => Xt(k(e)),
|
|
3781
3792
|
activeRowKey: zt,
|
|
3782
3793
|
rowAriaLabel: (e) => e.label || void 0,
|
|
@@ -3789,21 +3800,21 @@ function qp({
|
|
|
3789
3800
|
},
|
|
3790
3801
|
rowTitle: (e) => {
|
|
3791
3802
|
const t = Ht.get(k(e));
|
|
3792
|
-
return (
|
|
3803
|
+
return (On(k(e)) ? wc : void 0) ?? (_t(k(e)) != null ? bc(_t(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
3804
|
},
|
|
3794
3805
|
rowClassName: (e) => F(
|
|
3795
3806
|
ss(e),
|
|
3796
|
-
Ja(e.collection, e.item_id) &&
|
|
3797
|
-
|
|
3807
|
+
Ja(e.collection, e.item_id) && Pd,
|
|
3808
|
+
On(k(e)) && vc
|
|
3798
3809
|
),
|
|
3799
3810
|
emptyMessage: da ? /* @__PURE__ */ a("span", { className: "sr-only", children: "The list did not load." }) : /* @__PURE__ */ a(
|
|
3800
3811
|
hd,
|
|
3801
3812
|
{
|
|
3802
3813
|
icon: Ni,
|
|
3803
|
-
title: ((
|
|
3804
|
-
detail: ((Mo = i == null ? void 0 : i.empty) == null ? void 0 : Mo.reason) === "filters" &&
|
|
3805
|
-
action: ((
|
|
3806
|
-
|
|
3814
|
+
title: ((Ko = i == null ? void 0 : i.empty) == null ? void 0 : Ko.reason) === "not_permitted" ? "You cannot read this queue’s records" : ((Po = i == null ? void 0 : i.empty) == null ? void 0 : Po.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",
|
|
3815
|
+
detail: ((Mo = i == null ? void 0 : i.empty) == null ? void 0 : Mo.reason) === "filters" && Le > 0 ? `Your default ${pa(Or)} filter is hiding ${Le.toLocaleString("en-US")} item${Le === 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." : ((Qo = i == null ? void 0 : i.empty) == null ? void 0 : Qo.message) ?? "Records land here when they match the queue sources — a state change or new record can appear at any moment.",
|
|
3816
|
+
action: ((jo = i == null ? void 0 : i.empty) == null ? void 0 : jo.reason) === "filters" ? /* @__PURE__ */ d("div", { className: "flex items-center justify-center gap-2", children: [
|
|
3817
|
+
Le > 0 && /* @__PURE__ */ d(
|
|
3807
3818
|
"button",
|
|
3808
3819
|
{
|
|
3809
3820
|
type: "button",
|
|
@@ -3812,7 +3823,7 @@ function qp({
|
|
|
3812
3823
|
"data-queue-empty-defaults": !0,
|
|
3813
3824
|
children: [
|
|
3814
3825
|
"Show all ",
|
|
3815
|
-
|
|
3826
|
+
Le.toLocaleString("en-US")
|
|
3816
3827
|
]
|
|
3817
3828
|
}
|
|
3818
3829
|
),
|
|
@@ -3825,7 +3836,7 @@ function qp({
|
|
|
3825
3836
|
const e = {};
|
|
3826
3837
|
for (const [n, r] of Object.entries(ke.current))
|
|
3827
3838
|
(t = Re[n.slice(6)]) != null && t.length && (e[n] = r);
|
|
3828
|
-
V(e),
|
|
3839
|
+
V(e), Q(1);
|
|
3829
3840
|
},
|
|
3830
3841
|
className: "h-7 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",
|
|
3831
3842
|
"data-queue-empty-clear": !0,
|
|
@@ -3837,7 +3848,7 @@ function qp({
|
|
|
3837
3848
|
{
|
|
3838
3849
|
type: "button",
|
|
3839
3850
|
onClick: () => {
|
|
3840
|
-
me("all"),
|
|
3851
|
+
me("all"), Q(1);
|
|
3841
3852
|
},
|
|
3842
3853
|
className: "h-7 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",
|
|
3843
3854
|
"data-queue-empty-all": !0,
|
|
@@ -3849,12 +3860,12 @@ function qp({
|
|
|
3849
3860
|
),
|
|
3850
3861
|
sort: U,
|
|
3851
3862
|
onSortChange: (e) => {
|
|
3852
|
-
|
|
3863
|
+
st(e), Q(1);
|
|
3853
3864
|
},
|
|
3854
3865
|
filterDefs: Tr,
|
|
3855
3866
|
filterValues: x,
|
|
3856
3867
|
onFilterChange: (e, t) => {
|
|
3857
|
-
V((n) => ({ ...n, [e]: t })),
|
|
3868
|
+
V((n) => ({ ...n, [e]: t })), Q(1);
|
|
3858
3869
|
},
|
|
3859
3870
|
rowGroups: xs ?? void 0,
|
|
3860
3871
|
collapsedGroups: xe,
|
|
@@ -3867,16 +3878,16 @@ function qp({
|
|
|
3867
3878
|
pinKeepRank: ku,
|
|
3868
3879
|
pinRightShare: 0.45,
|
|
3869
3880
|
onColumnPinChange: (e, t) => {
|
|
3870
|
-
|
|
3881
|
+
Dn((n) => {
|
|
3871
3882
|
const r = { ...n ?? vo };
|
|
3872
3883
|
return t ? r[e] = t : delete r[e], r;
|
|
3873
3884
|
});
|
|
3874
3885
|
},
|
|
3875
3886
|
columnFilterRow: !0,
|
|
3876
3887
|
hScrollProxy: !0,
|
|
3877
|
-
totalsRow:
|
|
3888
|
+
totalsRow: js,
|
|
3878
3889
|
footer: /* @__PURE__ */ a(
|
|
3879
|
-
|
|
3890
|
+
Qd,
|
|
3880
3891
|
{
|
|
3881
3892
|
collections: Yt,
|
|
3882
3893
|
selectedIds: String(x.at_risk_rule ?? "").split(",").map((e) => Number(e)).filter((e) => Number.isFinite(e) && e > 0),
|
|
@@ -3885,7 +3896,7 @@ function qp({
|
|
|
3885
3896
|
V((n) => ({
|
|
3886
3897
|
...n,
|
|
3887
3898
|
at_risk_rule: n.at_risk_rule === t ? "" : t
|
|
3888
|
-
})),
|
|
3899
|
+
})), Q(1);
|
|
3889
3900
|
},
|
|
3890
3901
|
className: "shrink-0 border-t border-slate-100 bg-white px-3 py-1.5 dark:border-slate-800 dark:bg-slate-900"
|
|
3891
3902
|
}
|
|
@@ -3897,17 +3908,17 @@ function qp({
|
|
|
3897
3908
|
) }) }) : C === "kanban" ? /* @__PURE__ */ a(
|
|
3898
3909
|
ou,
|
|
3899
3910
|
{
|
|
3900
|
-
items:
|
|
3901
|
-
onCardClick: (e) =>
|
|
3902
|
-
onDrop: (e, t) =>
|
|
3911
|
+
items: O,
|
|
3912
|
+
onCardClick: (e) => _n(e),
|
|
3913
|
+
onDrop: (e, t) => Ql.mutate({ item: e, targetState: t }),
|
|
3903
3914
|
onClaim: (e) => He.mutate(e),
|
|
3904
|
-
onRelease: (e) =>
|
|
3915
|
+
onRelease: (e) => ht.mutate(e),
|
|
3905
3916
|
swimlaneBy: qt,
|
|
3906
|
-
stateLabels:
|
|
3917
|
+
stateLabels: cr,
|
|
3907
3918
|
laneLabel: qt === "collection" ? Ie : void 0,
|
|
3908
3919
|
claimsEnabled: Te,
|
|
3909
3920
|
onDraggingChange: (e) => {
|
|
3910
|
-
|
|
3921
|
+
Un.current = e;
|
|
3911
3922
|
}
|
|
3912
3923
|
}
|
|
3913
3924
|
) : /* @__PURE__ */ a(iu, { queueId: l })
|
|
@@ -3922,9 +3933,9 @@ function qp({
|
|
|
3922
3933
|
showTransition: Ge("transition"),
|
|
3923
3934
|
states: Ma((i == null ? void 0 : i.available_values.state) ?? []).map((e) => ({
|
|
3924
3935
|
value: e,
|
|
3925
|
-
label:
|
|
3936
|
+
label: Ke(e)
|
|
3926
3937
|
})),
|
|
3927
|
-
busy:
|
|
3938
|
+
busy: wt,
|
|
3928
3939
|
onClaim: () => gr(
|
|
3929
3940
|
"Claim",
|
|
3930
3941
|
(e) => f.request(
|
|
@@ -3974,13 +3985,13 @@ function qp({
|
|
|
3974
3985
|
changed: ps,
|
|
3975
3986
|
labelOf: (e) => {
|
|
3976
3987
|
var t;
|
|
3977
|
-
return ((t =
|
|
3988
|
+
return ((t = O.find((n) => k(n) === e)) == null ? void 0 : t.label) ?? null;
|
|
3978
3989
|
},
|
|
3979
3990
|
onSkip: (e) => De((t) => t.filter((n) => !e.includes(n))),
|
|
3980
3991
|
onAcknowledgeChanged: (e) => {
|
|
3981
|
-
|
|
3992
|
+
Tn.restamp(e), xr.clear(e);
|
|
3982
3993
|
},
|
|
3983
|
-
onOpenRecord: ({ collection: e, id: t }) => window.open(
|
|
3994
|
+
onOpenRecord: ({ collection: e, id: t }) => window.open(j.urlFor({ collection: e, itemId: t }), "_blank", "noopener")
|
|
3984
3995
|
}
|
|
3985
3996
|
),
|
|
3986
3997
|
children: [
|
|
@@ -3990,9 +4001,9 @@ function qp({
|
|
|
3990
4001
|
type: "button",
|
|
3991
4002
|
onClick: () => {
|
|
3992
4003
|
const e = $c(
|
|
3993
|
-
|
|
4004
|
+
O.filter((t) => ee.includes(k(t)) && t.collection !== "tasks").map((t) => j.urlFor(pr(t)))
|
|
3994
4005
|
);
|
|
3995
|
-
e.blocked > 0 || e.capped > 0 ?
|
|
4006
|
+
e.blocked > 0 || e.capped > 0 ? P.warning(Xo(e)) : P.success(Xo(e));
|
|
3996
4007
|
},
|
|
3997
4008
|
"data-bulk-open-tabs": !0,
|
|
3998
4009
|
title: `Open the selected records in new tabs (up to ${Cc})`,
|
|
@@ -4001,7 +4012,7 @@ function qp({
|
|
|
4001
4012
|
}
|
|
4002
4013
|
),
|
|
4003
4014
|
Ge("transition") && (() => {
|
|
4004
|
-
const e =
|
|
4015
|
+
const e = O.filter(
|
|
4005
4016
|
(n) => ee.includes(k(n)) && n.collection !== "tasks"
|
|
4006
4017
|
), t = [...new Set(e.map((n) => n.collection))];
|
|
4007
4018
|
return e.length > 0 ? /* @__PURE__ */ a(
|
|
@@ -4009,7 +4020,7 @@ function qp({
|
|
|
4009
4020
|
{
|
|
4010
4021
|
collection: t.length === 1 ? t[0] : null,
|
|
4011
4022
|
ids: e.map((n) => n.item_id),
|
|
4012
|
-
disabled:
|
|
4023
|
+
disabled: wt,
|
|
4013
4024
|
onDone: () => {
|
|
4014
4025
|
De([]), y.invalidateQueries({ queryKey: ["queue-items", l] });
|
|
4015
4026
|
}
|
|
@@ -4019,10 +4030,10 @@ function qp({
|
|
|
4019
4030
|
/* @__PURE__ */ a(
|
|
4020
4031
|
ed,
|
|
4021
4032
|
{
|
|
4022
|
-
targets:
|
|
4033
|
+
targets: O.filter((e) => ee.includes(k(e)) && e.collection !== "tasks").map((e) => ({ collection: e.collection, id: e.item_id, label: e.label })),
|
|
4023
4034
|
enabledKeys: (p == null ? void 0 : p.bulk_action_keys) ?? null,
|
|
4024
4035
|
tone: "light",
|
|
4025
|
-
disabled:
|
|
4036
|
+
disabled: wt,
|
|
4026
4037
|
onDone: (e) => {
|
|
4027
4038
|
e.failed === 0 && De([]), y.invalidateQueries({ queryKey: ["queue-items", l] });
|
|
4028
4039
|
}
|
|
@@ -4031,8 +4042,8 @@ function qp({
|
|
|
4031
4042
|
Ge("update-field") && /* @__PURE__ */ a(
|
|
4032
4043
|
nd,
|
|
4033
4044
|
{
|
|
4034
|
-
targets:
|
|
4035
|
-
disabled:
|
|
4045
|
+
targets: O.filter((e) => ee.includes(k(e)) && e.collection !== "tasks").map((e) => ({ collection: e.collection, id: e.item_id })),
|
|
4046
|
+
disabled: wt,
|
|
4036
4047
|
onDone: () => void y.invalidateQueries({ queryKey: ["queue-items", l] }),
|
|
4037
4048
|
className: "rounded-md px-2.5 py-1 text-[12px] font-medium text-slate-600 hover:bg-slate-100 disabled:opacity-50 dark:text-slate-300 dark:hover:bg-muted"
|
|
4038
4049
|
}
|
|
@@ -4040,26 +4051,26 @@ function qp({
|
|
|
4040
4051
|
Ge("compare") && /* @__PURE__ */ a(
|
|
4041
4052
|
td,
|
|
4042
4053
|
{
|
|
4043
|
-
targets:
|
|
4054
|
+
targets: O.filter((e) => ee.includes(k(e)) && e.collection !== "tasks").map((e) => ({ collection: e.collection, id: e.item_id })),
|
|
4044
4055
|
renderValue: (e, t, n, r) => {
|
|
4045
4056
|
var o;
|
|
4046
4057
|
return sd(
|
|
4047
|
-
((o =
|
|
4058
|
+
((o = O.find((c) => ee.includes(k(c)))) == null ? void 0 : o.collection) ?? "",
|
|
4048
4059
|
e,
|
|
4049
4060
|
t,
|
|
4050
4061
|
n,
|
|
4051
4062
|
r
|
|
4052
4063
|
);
|
|
4053
4064
|
},
|
|
4054
|
-
disabled:
|
|
4065
|
+
disabled: wt,
|
|
4055
4066
|
className: "rounded-md px-2.5 py-1 text-[12px] font-medium text-slate-600 hover:bg-slate-100 disabled:opacity-50 dark:text-slate-300 dark:hover:bg-muted"
|
|
4056
4067
|
}
|
|
4057
4068
|
),
|
|
4058
4069
|
Ge("message") && /* @__PURE__ */ a(
|
|
4059
4070
|
ld,
|
|
4060
4071
|
{
|
|
4061
|
-
targets:
|
|
4062
|
-
disabled:
|
|
4072
|
+
targets: O.filter((e) => ee.includes(k(e)) && e.collection !== "tasks").map((e) => ({ collection: e.collection, id: e.item_id })),
|
|
4073
|
+
disabled: wt,
|
|
4063
4074
|
className: "rounded-md px-2.5 py-1 text-[12px] font-medium text-slate-600 hover:bg-slate-100 disabled:opacity-50 dark:text-slate-300 dark:hover:bg-muted"
|
|
4064
4075
|
}
|
|
4065
4076
|
)
|
|
@@ -4076,9 +4087,9 @@ function qp({
|
|
|
4076
4087
|
width: Y[0].width,
|
|
4077
4088
|
title: Y[0].title,
|
|
4078
4089
|
stack: Y,
|
|
4079
|
-
onPush: (e) =>
|
|
4080
|
-
onPop: () =>
|
|
4081
|
-
onClose: () =>
|
|
4090
|
+
onPush: (e) => Nt.push([...Y, e]),
|
|
4091
|
+
onPop: () => Nt.back(),
|
|
4092
|
+
onClose: () => Nt.back(Y.length),
|
|
4082
4093
|
onOpenRecord: es
|
|
4083
4094
|
}
|
|
4084
4095
|
) : null,
|
|
@@ -4097,14 +4108,14 @@ function qp({
|
|
|
4097
4108
|
"data-queue-row-menu": !0,
|
|
4098
4109
|
children: [
|
|
4099
4110
|
[
|
|
4100
|
-
{ label: "Open", run: () =>
|
|
4111
|
+
{ label: "Open", run: () => _n(H.row) },
|
|
4101
4112
|
{
|
|
4102
4113
|
label: "Open full record",
|
|
4103
|
-
run: () =>
|
|
4114
|
+
run: () => kt(H.row)
|
|
4104
4115
|
},
|
|
4105
4116
|
{ label: "Peek", run: () => Ye(H.row) },
|
|
4106
4117
|
...Te ? [
|
|
4107
|
-
((Uo = H.row.claimed_by) == null ? void 0 : Uo.id) === z ? { label: "Release claim", run: () =>
|
|
4118
|
+
((Uo = H.row.claimed_by) == null ? void 0 : Uo.id) === z ? { label: "Release claim", run: () => ht.mutate(H.row) } : { label: "Claim", run: () => He.mutate(H.row) }
|
|
4108
4119
|
] : [],
|
|
4109
4120
|
// The friendly id (PW26-76166), never the row id (army 6 M52);
|
|
4110
4121
|
// a record with no number has nothing to copy.
|
|
@@ -4122,14 +4133,14 @@ function qp({
|
|
|
4122
4133
|
run: () => {
|
|
4123
4134
|
var e;
|
|
4124
4135
|
return void ((e = navigator.clipboard) == null ? void 0 : e.writeText(
|
|
4125
|
-
`${window.location.origin}${
|
|
4136
|
+
`${window.location.origin}${j.urlFor(pr(H.row))}`
|
|
4126
4137
|
));
|
|
4127
4138
|
}
|
|
4128
4139
|
},
|
|
4129
4140
|
// Custom actions (#125): the record's registered actions, right here.
|
|
4130
|
-
...
|
|
4141
|
+
...Ol(H.row.collection).map((e) => ({
|
|
4131
4142
|
label: e.label,
|
|
4132
|
-
run: () =>
|
|
4143
|
+
run: () => Ll(e, H.row)
|
|
4133
4144
|
}))
|
|
4134
4145
|
].map((e) => /* @__PURE__ */ a(
|
|
4135
4146
|
"button",
|
|
@@ -4145,7 +4156,7 @@ function qp({
|
|
|
4145
4156
|
)),
|
|
4146
4157
|
H.row.collection !== "tasks" && /* @__PURE__ */ d("div", { className: "mt-1 border-t border-slate-100 pt-1 dark:border-border/60", children: [
|
|
4147
4158
|
/* @__PURE__ */ a("p", { className: "px-3 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-slate-400", children: "Triage labels" }),
|
|
4148
|
-
|
|
4159
|
+
Xn.slice(0, 8).map((e) => {
|
|
4149
4160
|
const t = (H.row.labels ?? []).includes(e);
|
|
4150
4161
|
return /* @__PURE__ */ d(
|
|
4151
4162
|
"button",
|
|
@@ -4199,13 +4210,13 @@ function qp({
|
|
|
4199
4210
|
),
|
|
4200
4211
|
sa && Wo(
|
|
4201
4212
|
/* @__PURE__ */ a(
|
|
4202
|
-
|
|
4213
|
+
Lu,
|
|
4203
4214
|
{
|
|
4204
4215
|
queueId: l,
|
|
4205
4216
|
drill: sa,
|
|
4206
|
-
onClose: () =>
|
|
4217
|
+
onClose: () => Yn(null),
|
|
4207
4218
|
onOpenRecord: (e, t) => {
|
|
4208
|
-
|
|
4219
|
+
Yn(null), j.open({ collection: e, itemId: t, layoutSlug: null });
|
|
4209
4220
|
}
|
|
4210
4221
|
}
|
|
4211
4222
|
),
|
|
@@ -4215,7 +4226,7 @@ function qp({
|
|
|
4215
4226
|
au,
|
|
4216
4227
|
{
|
|
4217
4228
|
item: Je,
|
|
4218
|
-
stateLabels:
|
|
4229
|
+
stateLabels: cr,
|
|
4219
4230
|
collectionLabel: Ie,
|
|
4220
4231
|
claimsEnabled: Te,
|
|
4221
4232
|
columnFormats: _s,
|
|
@@ -4223,21 +4234,21 @@ function qp({
|
|
|
4223
4234
|
fieldLabel: (e) => A(`extra.${e}`, Ue(e)),
|
|
4224
4235
|
width: p == null ? void 0 : p.sheet_width,
|
|
4225
4236
|
itemLayout: p == null ? void 0 : p.item_layout,
|
|
4226
|
-
onOpenRecord: (e) =>
|
|
4237
|
+
onOpenRecord: (e) => kt(e),
|
|
4227
4238
|
onOpenChange: (e) => {
|
|
4228
|
-
e || (Ye(null),
|
|
4239
|
+
e || (Ye(null), ur(!1));
|
|
4229
4240
|
},
|
|
4230
4241
|
onClaim: (e) => He.mutate(e),
|
|
4231
|
-
onRelease: (e) =>
|
|
4242
|
+
onRelease: (e) => ht.mutate(e),
|
|
4232
4243
|
workNextActive: Zl,
|
|
4233
|
-
onNext: () => Je &&
|
|
4244
|
+
onNext: () => Je && Qa(Je),
|
|
4234
4245
|
refetchItems: () => y.invalidateQueries({ queryKey: ["queue-items", l] })
|
|
4235
4246
|
}
|
|
4236
4247
|
),
|
|
4237
4248
|
xn.dialog
|
|
4238
4249
|
] });
|
|
4239
4250
|
}
|
|
4240
|
-
function
|
|
4251
|
+
function Lu({
|
|
4241
4252
|
queueId: l,
|
|
4242
4253
|
drill: S,
|
|
4243
4254
|
onClose: q,
|