@nivaro/react 0.1.101 → 0.1.103
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/index.js +320 -294
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as e, jsxs as r, Fragment as
|
|
1
|
+
import { jsx as e, jsxs as r, Fragment as tt } from "react/jsx-runtime";
|
|
2
2
|
import * as fh from "lucide-react";
|
|
3
3
|
import { RefreshCw as Fl, ChevronDown as bn, Check as Cn, X as rn, LayoutGrid as u0, Bell as $s, BellRing as Ri, Clock as ti, ChartColumn as ag, History as Tl, FlaskConical as m0, Activity as np, Plus as ir, Gauge as hh, Users as Ii, Lock as No, Pencil as po, Trash2 as Cs, Siren as p0, Copy as bl, ChevronsLeft as sg, ChevronsRight as lg, Minus as Pc, ChevronRight as xa, AlertCircle as ni, MoreVertical as ig, MoreHorizontal as rp, Clipboard as bh, Calendar as og, Paperclip as fo, Folder as dg, File as ym, FileText as lc, Phone as hc, MessageSquare as Kc, Mail as go, UserCheck as xh, UserPlus as gh, User as bc, Zap as yh, Power as cg, Search as Xa, Filter as ap, Sliders as ug, Settings as vh, RotateCcw as wd, Pause as mg, Play as sp, HelpCircle as kh, Info as _o, AlertTriangle as Ta, Flag as pg, Bookmark as wh, Heart as fg, Star as dd, Unlock as hg, EyeOff as bg, Eye as lp, Send as Ic, Upload as Al, Download as zi, Save as xc, Edit2 as xg, Edit as gg, XCircle as yg, CheckCircle as vg, Share2 as kg, Link as Nh, ExternalLink as So, ArrowUpRight as wg, ArrowDown as Ng, ArrowUp as _g, ArrowLeft as yo, ArrowRight as Ia, MapPin as Sg, MessageSquareWarning as Cg, Loader2 as Ut, SmilePlus as ip, GripVertical as vm, FileVideo as $g, FileAudio as qg, FileSpreadsheet as op, FileCode as Tg, Bold as Fg, Italic as Ag, UnderlineIcon as jg, Strikethrough as Lg, Heading1 as Rg, Heading2 as Og, Heading3 as Mg, List as Dg, ListOrdered as Eg, Quote as Pg, Code as Kg, Link2Off as Ig, Sparkles as ho, SlidersHorizontal as _h, Sigma as Sh, Building2 as Ch, MessageCircle as dp, FileDiff as zg, ClipboardPlus as $h, CheckCircle2 as Ug, Clock3 as Bg, Code2 as Wg, Satellite as f0, CopyPlus as Qg, GitBranch as xu, Link2 as qh, ClipboardList as Vg, ChevronsUpDown as Qi, GitFork as h0, UploadCloud as Jg, Wrench as Th, ShieldAlert as Hg, FileDown as Yg, ChevronLeft as Oi, RotateCw as gu, Map as Gg, Rows3 as gc, Rows2 as Fh, BellOff as yc, Pin as cd, Hash as km, PlayCircle as Xg, LogOut as Ah, Video as Zg, CheckCheck as ey, Inbox as vc, ChevronUp as jh, FileUp as ty, KeyRound as Lh, Braces as Rh, Ban as cp, ScrollText as ny, FileBarChart as ry, Camera as ud, Undo2 as Oh, UserRound as wm, ShieldCheck as ay, Flame as sy, Rows4 as ly, PanelLeftClose as iy, Settings2 as Mh, Table as oy, StickyNote as dy, TrendingUp as cy, TrendingDown as uy } from "lucide-react";
|
|
4
4
|
import * as jn from "react";
|
|
5
5
|
import Qs, { createContext as ia, useContext as qr, useState as S, useCallback as an, useSyncExternalStore as my, useEffect as De, useMemo as ke, useRef as Be, Fragment as Bs, useLayoutEffect as Nd, useId as kc, memo as Dh } from "react";
|
|
6
|
-
import { QueryClientContext as py, QueryClient as fy, QueryClientProvider as hy, useQuery as pe, useQueryClient as Mt, useMutation as
|
|
6
|
+
import { QueryClientContext as py, QueryClient as fy, QueryClientProvider as hy, useQuery as pe, useQueryClient as Mt, useMutation as nt, useQueries as Zr } from "@tanstack/react-query";
|
|
7
7
|
import { readItems as Mi, readMyScopes as Eh, listNotificationSubscriptions as by, deleteNotificationSubscription as xy, listImportTemplates as gy, readUser as yy, readUserCard as vy, updateUser as b0, setMyDelegate as ky, saveMyScopeDefaults as wy, readReportWidgetData as yu, listReportAlerts as Ny, createReportAlert as _y, toggleReportAlert as Sy, deleteReportAlert as Cy, readReportAlertLog as $y, resolveReportAlert as qy, readReportFilterOptions as Ty, executeCustomQuery as Fy, saveReportFilterPreset as x0, listReportFilterPresets as Ay, deleteReportFilterPreset as jy, readReport as Ly, aiReportFilters as Ry, endSessionRecording as g0, sessionRecordingEnabled as Oy, appendSessionRecordingEvents as y0, startSessionRecording as v0 } from "@nivaro/sdk";
|
|
8
8
|
import { clsx as My } from "clsx";
|
|
9
9
|
import { twMerge as Dy } from "tailwind-merge";
|
|
@@ -704,7 +704,7 @@ function xv({
|
|
|
704
704
|
open: t,
|
|
705
705
|
title: a ? "Edit Alert Rule" : "Create Alert Rule",
|
|
706
706
|
onClose: i,
|
|
707
|
-
footer: /* @__PURE__ */ r(
|
|
707
|
+
footer: /* @__PURE__ */ r(tt, { children: [
|
|
708
708
|
/* @__PURE__ */ e("button", { type: "button", className: vp, onClick: i, children: "Cancel" }),
|
|
709
709
|
/* @__PURE__ */ e(
|
|
710
710
|
"button",
|
|
@@ -851,7 +851,7 @@ function gv({
|
|
|
851
851
|
open: t,
|
|
852
852
|
title: "Edit Notification Subscription",
|
|
853
853
|
onClose: a,
|
|
854
|
-
footer: /* @__PURE__ */ r(
|
|
854
|
+
footer: /* @__PURE__ */ r(tt, { children: [
|
|
855
855
|
/* @__PURE__ */ e("button", { type: "button", className: vp, onClick: a, children: "Cancel" }),
|
|
856
856
|
/* @__PURE__ */ e("button", { type: "button", className: yp, disabled: l, onClick: () => {
|
|
857
857
|
let C = null;
|
|
@@ -897,7 +897,7 @@ function gv({
|
|
|
897
897
|
}
|
|
898
898
|
)
|
|
899
899
|
] }),
|
|
900
|
-
!F && /* @__PURE__ */ r(
|
|
900
|
+
!F && /* @__PURE__ */ r(tt, { children: [
|
|
901
901
|
/* @__PURE__ */ r("div", { className: "flex gap-3", children: [
|
|
902
902
|
/* @__PURE__ */ r("div", { className: "flex-1", children: [
|
|
903
903
|
/* @__PURE__ */ e(ha, { children: n.event_type === "workflow_transition" ? "State filter field" : "Filter field" }),
|
|
@@ -990,7 +990,7 @@ function yv({
|
|
|
990
990
|
open: t,
|
|
991
991
|
title: a ? "Edit Anomaly Rule" : "New Anomaly Rule",
|
|
992
992
|
onClose: s,
|
|
993
|
-
footer: /* @__PURE__ */ r(
|
|
993
|
+
footer: /* @__PURE__ */ r(tt, { children: [
|
|
994
994
|
/* @__PURE__ */ e("button", { type: "button", className: vp, onClick: s, children: "Cancel" }),
|
|
995
995
|
/* @__PURE__ */ e(
|
|
996
996
|
"button",
|
|
@@ -1349,12 +1349,12 @@ function f4({
|
|
|
1349
1349
|
}), { data: $ = [], isLoading: B } = pe({
|
|
1350
1350
|
queryKey: ["nvr-ma-notif-subs"],
|
|
1351
1351
|
queryFn: () => l.request(by()).then((ee) => ee.data)
|
|
1352
|
-
}), R =
|
|
1352
|
+
}), R = nt({
|
|
1353
1353
|
// Raw PATCH — the route accepts label/filter_field/filter_value/filters/
|
|
1354
1354
|
// digest_frequency/is_active; the typed SDK command covers a subset.
|
|
1355
1355
|
mutationFn: ({ id: ee, patch: Ke }) => f("PATCH", `/notification-subscriptions/${ee}`, Ke),
|
|
1356
1356
|
onSuccess: () => y("nvr-ma-notif-subs")
|
|
1357
|
-
}), O =
|
|
1357
|
+
}), O = nt({
|
|
1358
1358
|
mutationFn: (ee) => l.request(xy(ee)),
|
|
1359
1359
|
onSuccess: () => y("nvr-ma-notif-subs")
|
|
1360
1360
|
}), P = n.includes("widget_alerts"), { data: M = [], isLoading: q } = pe({
|
|
@@ -1480,7 +1480,7 @@ function f4({
|
|
|
1480
1480
|
} catch {
|
|
1481
1481
|
p("Failed to delete widget alert");
|
|
1482
1482
|
}
|
|
1483
|
-
}, pn =
|
|
1483
|
+
}, pn = nt({
|
|
1484
1484
|
mutationFn: (ee) => f("POST", `/report-studio/${ee.report_id}/alerts/${ee.alert}/resolve`),
|
|
1485
1485
|
onSuccess: () => y("nvr-ma-report-alerts-log", "nvr-ma-report-alerts")
|
|
1486
1486
|
}), sn = ke(() => {
|
|
@@ -1734,7 +1734,7 @@ function f4({
|
|
|
1734
1734
|
children: Ke ? /* @__PURE__ */ e(Ri, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ e($s, { className: "h-3.5 w-3.5" })
|
|
1735
1735
|
}
|
|
1736
1736
|
),
|
|
1737
|
-
_t && /* @__PURE__ */ r(
|
|
1737
|
+
_t && /* @__PURE__ */ r(tt, { children: [
|
|
1738
1738
|
/* @__PURE__ */ e(
|
|
1739
1739
|
"button",
|
|
1740
1740
|
{
|
|
@@ -2965,7 +2965,7 @@ function $o({
|
|
|
2965
2965
|
className: `shrink-0 rounded-full object-cover ${a ?? ""}`,
|
|
2966
2966
|
draggable: !1
|
|
2967
2967
|
}
|
|
2968
|
-
) : /* @__PURE__ */ e(
|
|
2968
|
+
) : /* @__PURE__ */ e(tt, { children: n });
|
|
2969
2969
|
}
|
|
2970
2970
|
const Mv = ["👍", "✅", "👀", "🎉", "❤️", "😂"], fb = ia(null);
|
|
2971
2971
|
function Ea() {
|
|
@@ -3036,7 +3036,7 @@ function Pv(t) {
|
|
|
3036
3036
|
function Kv(t) {
|
|
3037
3037
|
Ea();
|
|
3038
3038
|
const n = Ee(), a = Mt();
|
|
3039
|
-
return
|
|
3039
|
+
return nt({
|
|
3040
3040
|
mutationFn: async (s) => {
|
|
3041
3041
|
const { text: l, mentions: i, attachments: d } = typeof s == "string" ? { text: s, mentions: [], attachments: [] } : s;
|
|
3042
3042
|
await n.request(
|
|
@@ -3110,16 +3110,16 @@ function Iv(t) {
|
|
|
3110
3110
|
function wp() {
|
|
3111
3111
|
const t = Ee(), n = Mt(), a = () => {
|
|
3112
3112
|
n.invalidateQueries({ queryKey: ["nvr-chat-rooms"] }), n.invalidateQueries({ queryKey: ["nvr-chat-directory"] });
|
|
3113
|
-
}, s =
|
|
3113
|
+
}, s = nt({
|
|
3114
3114
|
mutationFn: (o) => t.request(He(`/chat/rooms/${encodeURIComponent(o)}/join`)),
|
|
3115
3115
|
onSuccess: a
|
|
3116
|
-
}), l =
|
|
3116
|
+
}), l = nt({
|
|
3117
3117
|
mutationFn: (o) => t.request(An(`/chat/rooms/${encodeURIComponent(o)}/join`)),
|
|
3118
3118
|
onSuccess: a
|
|
3119
|
-
}), i =
|
|
3119
|
+
}), i = nt({
|
|
3120
3120
|
mutationFn: ({ room: o, muted: u }) => t.request(qn(`/chat/rooms/${encodeURIComponent(o)}`, { muted: u })),
|
|
3121
3121
|
onSuccess: a
|
|
3122
|
-
}), d =
|
|
3122
|
+
}), d = nt({
|
|
3123
3123
|
mutationFn: ({ room: o, mode: u }) => t.request(
|
|
3124
3124
|
qn(`/chat/rooms/${encodeURIComponent(o)}`, {
|
|
3125
3125
|
notify_mode: u === "mentions" ? "mentions" : null
|
|
@@ -3143,13 +3143,13 @@ function zv(t) {
|
|
|
3143
3143
|
function Uv(t) {
|
|
3144
3144
|
const n = Ee(), a = Mt(), s = () => {
|
|
3145
3145
|
a.invalidateQueries({ queryKey: ["nvr-chat-members", t] }), a.invalidateQueries({ queryKey: ["nvr-chat-rooms"] }), a.invalidateQueries({ queryKey: ["nvr-chat-directory"] });
|
|
3146
|
-
}, l =
|
|
3146
|
+
}, l = nt({
|
|
3147
3147
|
mutationFn: (o) => n.request(qn(`/chat/channels/${t}`, o)),
|
|
3148
3148
|
onSuccess: s
|
|
3149
|
-
}), i =
|
|
3149
|
+
}), i = nt({
|
|
3150
3150
|
mutationFn: (o) => n.request(He(`/chat/channels/${t}/members`, { user_id: o })),
|
|
3151
3151
|
onSuccess: s
|
|
3152
|
-
}), d =
|
|
3152
|
+
}), d = nt({
|
|
3153
3153
|
mutationFn: (o) => n.request(An(`/chat/channels/${t}/members/${o}`)),
|
|
3154
3154
|
onSuccess: s
|
|
3155
3155
|
});
|
|
@@ -3181,7 +3181,7 @@ function xb(t, n) {
|
|
|
3181
3181
|
}
|
|
3182
3182
|
function Bv() {
|
|
3183
3183
|
const t = Ee(), n = Mt();
|
|
3184
|
-
return
|
|
3184
|
+
return nt({
|
|
3185
3185
|
mutationFn: (a) => t.request(He("/chat/channels", a)),
|
|
3186
3186
|
onSuccess: () => {
|
|
3187
3187
|
n.invalidateQueries({ queryKey: ["nvr-chat-rooms"] }), n.invalidateQueries({ queryKey: ["nvr-chat-directory"] });
|
|
@@ -3227,7 +3227,7 @@ function h4(t, n) {
|
|
|
3227
3227
|
}
|
|
3228
3228
|
function Wv() {
|
|
3229
3229
|
const t = Ee(), n = Mt();
|
|
3230
|
-
return
|
|
3230
|
+
return nt({
|
|
3231
3231
|
mutationFn: (a) => t.request(He(`/chat/rooms/${encodeURIComponent(a)}/read`)),
|
|
3232
3232
|
onSuccess: () => void n.invalidateQueries({ queryKey: ["nvr-chat-rooms"] })
|
|
3233
3233
|
});
|
|
@@ -3337,21 +3337,21 @@ function Xv(t) {
|
|
|
3337
3337
|
}
|
|
3338
3338
|
function Zv(t) {
|
|
3339
3339
|
const n = Ee(), a = Mt();
|
|
3340
|
-
return
|
|
3340
|
+
return nt({
|
|
3341
3341
|
mutationFn: ({ messageId: s, emoji: l }) => n.request(He(`/chat/messages/${s}/reactions`, { emoji: l })),
|
|
3342
3342
|
onSuccess: () => void a.invalidateQueries({ queryKey: ["nvr-chat", t] })
|
|
3343
3343
|
});
|
|
3344
3344
|
}
|
|
3345
3345
|
function e1(t) {
|
|
3346
3346
|
const n = Ee(), a = Mt();
|
|
3347
|
-
return
|
|
3347
|
+
return nt({
|
|
3348
3348
|
mutationFn: ({ messageId: s, text: l }) => n.request(qn(`/chat/messages/${s}`, { message: l })),
|
|
3349
3349
|
onSuccess: () => void a.invalidateQueries({ queryKey: ["nvr-chat", t] })
|
|
3350
3350
|
});
|
|
3351
3351
|
}
|
|
3352
3352
|
function t1(t) {
|
|
3353
3353
|
const n = Ee(), a = Mt();
|
|
3354
|
-
return
|
|
3354
|
+
return nt({
|
|
3355
3355
|
mutationFn: (s) => n.request(An(`/chat/messages/${s}`)),
|
|
3356
3356
|
onSuccess: () => {
|
|
3357
3357
|
a.invalidateQueries({ queryKey: ["nvr-chat", t] }), a.invalidateQueries({ queryKey: ["nvr-chat-rooms"] });
|
|
@@ -3371,7 +3371,7 @@ function n1(t) {
|
|
|
3371
3371
|
}
|
|
3372
3372
|
function r1() {
|
|
3373
3373
|
const t = Ee(), n = Mt();
|
|
3374
|
-
return
|
|
3374
|
+
return nt({
|
|
3375
3375
|
mutationFn: async (a) => (await t.request(He("/chat/group-dm", a))).data,
|
|
3376
3376
|
onSuccess: () => void n.invalidateQueries({ queryKey: ["nvr-chat-rooms"] })
|
|
3377
3377
|
});
|
|
@@ -3400,7 +3400,7 @@ function s1(t) {
|
|
|
3400
3400
|
}
|
|
3401
3401
|
function l1(t) {
|
|
3402
3402
|
const n = Ee(), a = Mt();
|
|
3403
|
-
return
|
|
3403
|
+
return nt({
|
|
3404
3404
|
mutationFn: (s) => n.request(He(`/chat/messages/${s}/pin`)),
|
|
3405
3405
|
onSuccess: () => void a.invalidateQueries({ queryKey: ["nvr-chat-pins", t] })
|
|
3406
3406
|
});
|
|
@@ -4347,7 +4347,7 @@ function wb({
|
|
|
4347
4347
|
)) })
|
|
4348
4348
|
] }),
|
|
4349
4349
|
/* @__PURE__ */ e("div", { className: D ? "min-h-0 flex-1 overflow-auto" : "overflow-x-auto", children: /* @__PURE__ */ r("table", { className: "w-full text-[12px]", children: [
|
|
4350
|
-
/* @__PURE__ */ e("thead", { children: T ? /* @__PURE__ */ r(
|
|
4350
|
+
/* @__PURE__ */ e("thead", { children: T ? /* @__PURE__ */ r(tt, { children: [
|
|
4351
4351
|
/* @__PURE__ */ r("tr", { children: [
|
|
4352
4352
|
(() => {
|
|
4353
4353
|
const J = [];
|
|
@@ -4471,7 +4471,7 @@ function wb({
|
|
|
4471
4471
|
] });
|
|
4472
4472
|
}
|
|
4473
4473
|
function j0({ header: t, children: n }) {
|
|
4474
|
-
return /* @__PURE__ */ r(
|
|
4474
|
+
return /* @__PURE__ */ r(tt, { children: [
|
|
4475
4475
|
t,
|
|
4476
4476
|
n
|
|
4477
4477
|
] });
|
|
@@ -5233,7 +5233,7 @@ function ju({
|
|
|
5233
5233
|
{
|
|
5234
5234
|
className: `animate-pulse inline-block h-3 w-14 rounded ${s ? "bg-slate-600" : "bg-slate-200 dark:bg-[hsl(var(--nvr-skeleton))]"}`
|
|
5235
5235
|
}
|
|
5236
|
-
) : /* @__PURE__ */ r(
|
|
5236
|
+
) : /* @__PURE__ */ r(tt, { children: [
|
|
5237
5237
|
i && /* @__PURE__ */ e("span", { className: `text-[10px] ${s ? "text-slate-400" : "text-slate-500"}`, children: i }),
|
|
5238
5238
|
o,
|
|
5239
5239
|
d && /* @__PURE__ */ e("span", { className: `text-[10px] ${s ? "text-slate-400" : "text-slate-500"}`, children: d })
|
|
@@ -5817,7 +5817,7 @@ function co({
|
|
|
5817
5817
|
) : be;
|
|
5818
5818
|
}
|
|
5819
5819
|
}
|
|
5820
|
-
return w ? /* @__PURE__ */ e("div", { className: "animate-pulse h-4 w-20 rounded bg-slate-200 dark:bg-[hsl(var(--nvr-skeleton))]" }) : /* @__PURE__ */ e("div", { className: "flex items-center gap-1.5", children: A ? /* @__PURE__ */ e("div", { className: "flex items-baseline gap-1", children: /* @__PURE__ */ e("div", { className: "animate-pulse h-5 w-20 rounded bg-slate-200 dark:bg-[hsl(var(--nvr-skeleton))]" }) }) : v && x && /* @__PURE__ */ r(
|
|
5820
|
+
return w ? /* @__PURE__ */ e("div", { className: "animate-pulse h-4 w-20 rounded bg-slate-200 dark:bg-[hsl(var(--nvr-skeleton))]" }) : /* @__PURE__ */ e("div", { className: "flex items-center gap-1.5", children: A ? /* @__PURE__ */ e("div", { className: "flex items-baseline gap-1", children: /* @__PURE__ */ e("div", { className: "animate-pulse h-5 w-20 rounded bg-slate-200 dark:bg-[hsl(var(--nvr-skeleton))]" }) }) : v && x && /* @__PURE__ */ r(tt, { children: [
|
|
5821
5821
|
(x.widget_type === "stat" || x.widget_type === "custom-query" && "value" in v) && /* @__PURE__ */ e(E0, { data: v }),
|
|
5822
5822
|
x.widget_type === "custom-query" && "values" in v && /* @__PURE__ */ e(P0, { data: v }),
|
|
5823
5823
|
x.widget_type === "action-buttons" && /* @__PURE__ */ e(
|
|
@@ -5874,7 +5874,7 @@ function co({
|
|
|
5874
5874
|
] });
|
|
5875
5875
|
function Le() {
|
|
5876
5876
|
var H;
|
|
5877
|
-
return !v || !x ? null : /* @__PURE__ */ r(
|
|
5877
|
+
return !v || !x ? null : /* @__PURE__ */ r(tt, { children: [
|
|
5878
5878
|
(x.widget_type === "stat" || x.widget_type === "custom-query" && "value" in v) && /* @__PURE__ */ e(E0, { data: v }),
|
|
5879
5879
|
x.widget_type === "custom-query" && "values" in v && /* @__PURE__ */ e(P0, { data: v }),
|
|
5880
5880
|
x.widget_type === "list" && /* @__PURE__ */ e(W1, { data: v }),
|
|
@@ -7082,10 +7082,10 @@ function xd({
|
|
|
7082
7082
|
}
|
|
7083
7083
|
}
|
|
7084
7084
|
}
|
|
7085
|
-
const v = ($) => a ? a($) : $.button_label, C = h[0] ? (A = v(h[0])) == null ? void 0 : A.trim() : void 0, w = C && h.every(($) => v($) === v(h[0])) ? C : null, _ = f ? /* @__PURE__ */ r(
|
|
7085
|
+
const v = ($) => a ? a($) : $.button_label, C = h[0] ? (A = v(h[0])) == null ? void 0 : A.trim() : void 0, w = C && h.every(($) => v($) === v(h[0])) ? C : null, _ = f ? /* @__PURE__ */ r(tt, { children: [
|
|
7086
7086
|
/* @__PURE__ */ e(Ut, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
7087
7087
|
" Importing…"
|
|
7088
|
-
] }) : /* @__PURE__ */ r(
|
|
7088
|
+
] }) : /* @__PURE__ */ r(tt, { children: [
|
|
7089
7089
|
/* @__PURE__ */ e(Al, { className: "h-3.5 w-3.5" }),
|
|
7090
7090
|
" ",
|
|
7091
7091
|
w ?? "Import from file"
|
|
@@ -7206,20 +7206,20 @@ function Ck({
|
|
|
7206
7206
|
)
|
|
7207
7207
|
),
|
|
7208
7208
|
enabled: f
|
|
7209
|
-
}), k =
|
|
7209
|
+
}), k = nt({
|
|
7210
7210
|
mutationFn: (x) => s.request(He("/comments", { collection: t, item: n, text: x })),
|
|
7211
7211
|
onSuccess: () => {
|
|
7212
7212
|
c(""), l.invalidateQueries({ queryKey: ["comments", t, n] }), l.invalidateQueries({ queryKey: ["row-comment-counts", t] }), l.invalidateQueries({ queryKey: ["comments-related"] });
|
|
7213
7213
|
},
|
|
7214
7214
|
onError: () => Ze.error("Failed to post comment")
|
|
7215
|
-
}), y =
|
|
7215
|
+
}), y = nt({
|
|
7216
7216
|
mutationFn: ({ id: x, emoji: F }) => s.request(He(`/comments/${x}/reactions`, { emoji: F })),
|
|
7217
7217
|
onSuccess: () => {
|
|
7218
7218
|
p(null), l.invalidateQueries({ queryKey: ["comments", t, n] });
|
|
7219
7219
|
},
|
|
7220
7220
|
onError: () => Ze.error("Failed to react")
|
|
7221
7221
|
});
|
|
7222
|
-
return /* @__PURE__ */ r(
|
|
7222
|
+
return /* @__PURE__ */ r(tt, { children: [
|
|
7223
7223
|
/* @__PURE__ */ r(
|
|
7224
7224
|
"button",
|
|
7225
7225
|
{
|
|
@@ -7246,7 +7246,7 @@ function Ck({
|
|
|
7246
7246
|
}
|
|
7247
7247
|
),
|
|
7248
7248
|
f && d && Dr(
|
|
7249
|
-
/* @__PURE__ */ r(
|
|
7249
|
+
/* @__PURE__ */ r(tt, { children: [
|
|
7250
7250
|
/* @__PURE__ */ e("div", { className: "fixed inset-0 z-[100]", onClick: () => o(null) }),
|
|
7251
7251
|
/* @__PURE__ */ r(
|
|
7252
7252
|
"div",
|
|
@@ -8436,7 +8436,7 @@ function Ok({
|
|
|
8436
8436
|
const I = R.get(String(N.id)), D = Number((I == null ? void 0 : I[t.value_field]) ?? 0) || 0;
|
|
8437
8437
|
return M(t.value_max, N, { __input__: D, __saved__: D });
|
|
8438
8438
|
}
|
|
8439
|
-
return /* @__PURE__ */ r(
|
|
8439
|
+
return /* @__PURE__ */ r(tt, { children: [
|
|
8440
8440
|
/* @__PURE__ */ e(
|
|
8441
8441
|
"button",
|
|
8442
8442
|
{
|
|
@@ -10544,7 +10544,7 @@ function Ek({
|
|
|
10544
10544
|
!wt && !We ? nn ? "bg-red-50/70 hover:bg-red-50 cursor-pointer dark:bg-red-900/15" : re % 2 === 0 ? "bg-white hover:bg-slate-50/80 dark:bg-card dark:hover:bg-muted cursor-pointer" : "bg-slate-50/50 hover:bg-slate-100/60 cursor-pointer" : ""
|
|
10545
10545
|
),
|
|
10546
10546
|
children: [
|
|
10547
|
-
!(We && !wt && cr === "panel") && /* @__PURE__ */ r(
|
|
10547
|
+
!(We && !wt && cr === "panel") && /* @__PURE__ */ r(tt, { children: [
|
|
10548
10548
|
m && (Xt || Ye) && /* @__PURE__ */ e("td", { className: "w-6 px-1 align-middle", onClick: (Gt) => Gt.stopPropagation(), children: Xt && /* @__PURE__ */ e(vm, { className: "h-3 w-3 text-slate-300 cursor-grab" }) }),
|
|
10549
10549
|
c && /* @__PURE__ */ e("td", { className: "w-8 px-2 align-middle text-slate-400 text-[11px] select-none", children: re + 1 }),
|
|
10550
10550
|
Ye && /* @__PURE__ */ e("td", { className: "px-3 py-1 align-middle w-20", children: wt ? /* @__PURE__ */ e("span", { className: "inline-flex text-[10px] font-medium text-red-600 bg-red-50 border border-red-200 rounded px-1.5 py-0.5", children: "Delete" }) : rt ? /* @__PURE__ */ e("span", { className: "inline-flex text-[10px] font-medium text-amber-600 bg-amber-50 border border-amber-200 dark:text-amber-400 dark:bg-amber-500/10 dark:border-amber-500/40 rounded px-1.5 py-0.5", children: "Edited" }) : null })
|
|
@@ -10608,7 +10608,7 @@ function Ek({
|
|
|
10608
10608
|
className: "rounded px-1.5 py-0.5 text-[10px] text-red-500 hover:text-red-700 border border-red-200 hover:border-red-400",
|
|
10609
10609
|
children: "Undo"
|
|
10610
10610
|
}
|
|
10611
|
-
) : /* @__PURE__ */ r(
|
|
10611
|
+
) : /* @__PURE__ */ r(tt, { children: [
|
|
10612
10612
|
rt && /* @__PURE__ */ e(
|
|
10613
10613
|
"button",
|
|
10614
10614
|
{
|
|
@@ -10696,7 +10696,7 @@ function Ek({
|
|
|
10696
10696
|
] }, ue);
|
|
10697
10697
|
}),
|
|
10698
10698
|
gs && /* @__PURE__ */ r("tr", { className: "border-b border-slate-100 bg-[#f0fbff] dark:bg-nvr-cyan/5", children: [
|
|
10699
|
-
cr !== "panel" && /* @__PURE__ */ r(
|
|
10699
|
+
cr !== "panel" && /* @__PURE__ */ r(tt, { children: [
|
|
10700
10700
|
(Xt || V || Ye) && /* @__PURE__ */ e("td", { className: "w-6" }),
|
|
10701
10701
|
c && /* @__PURE__ */ e("td", { className: "w-8 px-2 align-middle text-slate-400 text-[11px] select-none", children: ln.length + ft.length + 1 }),
|
|
10702
10702
|
(V || Ye) && /* @__PURE__ */ e("td", { className: "px-3 py-1.5" })
|
|
@@ -10810,7 +10810,7 @@ function Ek({
|
|
|
10810
10810
|
fe ? "bg-[#f0fbff] dark:bg-nvr-cyan/5 cursor-default" : Ie ? "hover:bg-slate-50 dark:hover:bg-muted cursor-pointer" : "bg-amber-50/40 hover:bg-amber-50/70 dark:bg-amber-400/10 dark:hover:bg-amber-400/15 cursor-pointer"
|
|
10811
10811
|
),
|
|
10812
10812
|
children: [
|
|
10813
|
-
!(fe && cr === "panel") && /* @__PURE__ */ r(
|
|
10813
|
+
!(fe && cr === "panel") && /* @__PURE__ */ r(tt, { children: [
|
|
10814
10814
|
m && /* @__PURE__ */ e("td", { className: "w-6 px-1 align-middle", onClick: (We) => We.stopPropagation(), children: /* @__PURE__ */ e(vm, { className: "h-3 w-3 text-slate-300 cursor-grab" }) }),
|
|
10815
10815
|
c && /* @__PURE__ */ e("td", { className: "w-8 px-2 align-middle text-slate-400 text-[11px] select-none", children: ln.length + re + 1 }),
|
|
10816
10816
|
/* @__PURE__ */ r("td", { className: "px-3 py-1 align-middle w-16", children: [
|
|
@@ -11434,7 +11434,7 @@ function Ik({
|
|
|
11434
11434
|
if (de == null || de === "") return "—";
|
|
11435
11435
|
const Me = Number(de);
|
|
11436
11436
|
return we === "currency" ? Number.isNaN(Me) ? String(de) : Me.toLocaleString(void 0, { style: "currency", currency: "USD" }) : we === "number" ? Number.isNaN(Me) ? String(de) : Me.toLocaleString(void 0, { maximumFractionDigits: 2 }) : String(de);
|
|
11437
|
-
}, Gn = (de, we) => /* @__PURE__ */ r(
|
|
11437
|
+
}, Gn = (de, we) => /* @__PURE__ */ r(tt, { children: [
|
|
11438
11438
|
pn.map((Me) => /* @__PURE__ */ e(
|
|
11439
11439
|
"span",
|
|
11440
11440
|
{
|
|
@@ -12154,7 +12154,7 @@ function zk({
|
|
|
12154
12154
|
w.field
|
|
12155
12155
|
);
|
|
12156
12156
|
}),
|
|
12157
|
-
/* @__PURE__ */ e("div", { className: "flex min-h-[28px] flex-1 items-center gap-2", children: v && C ? /* @__PURE__ */ r(
|
|
12157
|
+
/* @__PURE__ */ e("div", { className: "flex min-h-[28px] flex-1 items-center gap-2", children: v && C ? /* @__PURE__ */ r(tt, { children: [
|
|
12158
12158
|
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-slate-700 dark:text-slate-200", children: nr(l, C) }),
|
|
12159
12159
|
(d(v) ?? 0) > 0 && /* @__PURE__ */ e("span", { className: "rounded bg-[#00ceff1a] px-1.5 py-0.5 text-[10px] font-semibold text-[#009abe]", children: "picked" }),
|
|
12160
12160
|
i(v, C)
|
|
@@ -12582,11 +12582,11 @@ function Vk({
|
|
|
12582
12582
|
}
|
|
12583
12583
|
)
|
|
12584
12584
|
] }),
|
|
12585
|
-
/* @__PURE__ */ e("div", { className: "flex flex-wrap items-center gap-x-2 mt-0.5", children: O ? /* @__PURE__ */ r(
|
|
12585
|
+
/* @__PURE__ */ e("div", { className: "flex flex-wrap items-center gap-x-2 mt-0.5", children: O ? /* @__PURE__ */ r(tt, { children: [
|
|
12586
12586
|
k.type && /* @__PURE__ */ e("span", { className: "text-[10px] text-slate-400", children: k.type }),
|
|
12587
12587
|
/* @__PURE__ */ e("span", { className: "text-[10px] text-slate-400", children: qc(k.size) }),
|
|
12588
12588
|
/* @__PURE__ */ e("span", { className: "text-[10px] text-amber-500", children: "Pending upload" })
|
|
12589
|
-
] }) : /* @__PURE__ */ r(
|
|
12589
|
+
] }) : /* @__PURE__ */ r(tt, { children: [
|
|
12590
12590
|
(_ == null ? void 0 : _.type) && /* @__PURE__ */ e("span", { className: "text-[10px] text-slate-400", children: _.type }),
|
|
12591
12591
|
(_ == null ? void 0 : _.filesize) != null && /* @__PURE__ */ e("span", { className: "text-[10px] text-slate-400", children: qc(_.filesize) }),
|
|
12592
12592
|
(_ == null ? void 0 : _.uploaded_on) && /* @__PURE__ */ e("span", { className: "text-[10px] text-slate-400", children: Db(_.uploaded_on) }),
|
|
@@ -12615,7 +12615,7 @@ function Vk({
|
|
|
12615
12615
|
children: "Replace"
|
|
12616
12616
|
}
|
|
12617
12617
|
),
|
|
12618
|
-
s && /* @__PURE__ */ r(
|
|
12618
|
+
s && /* @__PURE__ */ r(tt, { children: [
|
|
12619
12619
|
/* @__PURE__ */ r(
|
|
12620
12620
|
"button",
|
|
12621
12621
|
{
|
|
@@ -12655,7 +12655,7 @@ function Vk({
|
|
|
12655
12655
|
children: "Select file…"
|
|
12656
12656
|
}
|
|
12657
12657
|
),
|
|
12658
|
-
s && !a && /* @__PURE__ */ r(
|
|
12658
|
+
s && !a && /* @__PURE__ */ r(tt, { children: [
|
|
12659
12659
|
/* @__PURE__ */ r(
|
|
12660
12660
|
"button",
|
|
12661
12661
|
{
|
|
@@ -12985,7 +12985,7 @@ function Jk({
|
|
|
12985
12985
|
}
|
|
12986
12986
|
)
|
|
12987
12987
|
] }),
|
|
12988
|
-
l && /* @__PURE__ */ r(
|
|
12988
|
+
l && /* @__PURE__ */ r(tt, { children: [
|
|
12989
12989
|
/* @__PURE__ */ r(
|
|
12990
12990
|
"button",
|
|
12991
12991
|
{
|
|
@@ -13264,7 +13264,7 @@ function Zk({
|
|
|
13264
13264
|
f,
|
|
13265
13265
|
(ge, ye) => b((Ae) => ({ ...Ae, [ge]: ye }))
|
|
13266
13266
|
) : T(se, ne[se.field]) }, se.field)),
|
|
13267
|
-
/* @__PURE__ */ e("td", { className: "px-2 py-1.5", children: /* @__PURE__ */ e("div", { className: "flex items-center gap-1 justify-end", children: xe ? /* @__PURE__ */ r(
|
|
13267
|
+
/* @__PURE__ */ e("td", { className: "px-2 py-1.5", children: /* @__PURE__ */ e("div", { className: "flex items-center gap-1 justify-end", children: xe ? /* @__PURE__ */ r(tt, { children: [
|
|
13268
13268
|
/* @__PURE__ */ e(
|
|
13269
13269
|
"button",
|
|
13270
13270
|
{
|
|
@@ -13284,7 +13284,7 @@ function Zk({
|
|
|
13284
13284
|
children: "Cancel"
|
|
13285
13285
|
}
|
|
13286
13286
|
)
|
|
13287
|
-
] }) : /* @__PURE__ */ r(
|
|
13287
|
+
] }) : /* @__PURE__ */ r(tt, { children: [
|
|
13288
13288
|
/* @__PURE__ */ e(
|
|
13289
13289
|
"button",
|
|
13290
13290
|
{
|
|
@@ -14253,7 +14253,7 @@ function sw({
|
|
|
14253
14253
|
s && "opacity-60"
|
|
14254
14254
|
),
|
|
14255
14255
|
children: [
|
|
14256
|
-
!s && /* @__PURE__ */ r(
|
|
14256
|
+
!s && /* @__PURE__ */ r(tt, { children: [
|
|
14257
14257
|
/* @__PURE__ */ r("div", { className: "flex flex-wrap items-center gap-0.5 border-b border-slate-200 bg-slate-50 px-2 py-1.5", children: [
|
|
14258
14258
|
/* @__PURE__ */ e(
|
|
14259
14259
|
Ja,
|
|
@@ -15249,7 +15249,7 @@ function hw({
|
|
|
15249
15249
|
).then((m) => m.data ?? []).catch(() => []),
|
|
15250
15250
|
enabled: !!(i != null && i.enabled),
|
|
15251
15251
|
staleTime: 6e4
|
|
15252
|
-
}), u = o.includes(a), c =
|
|
15252
|
+
}), u = o.includes(a), c = nt({
|
|
15253
15253
|
mutationFn: () => u ? s.request(
|
|
15254
15254
|
An(
|
|
15255
15255
|
`/field-watches/self?collection=${encodeURIComponent(t)}&field=${encodeURIComponent(a)}&item_id=${encodeURIComponent(n)}`
|
|
@@ -17109,7 +17109,7 @@ function Lw({
|
|
|
17109
17109
|
queryKey: u,
|
|
17110
17110
|
queryFn: () => a.request(le(`/pipelines/instance/nivaro_addendums/${t}`)).then((v) => v.data),
|
|
17111
17111
|
staleTime: 1e4
|
|
17112
|
-
}), p =
|
|
17112
|
+
}), p = nt({
|
|
17113
17113
|
mutationFn: ({ transitionId: v, note: C }) => {
|
|
17114
17114
|
var w;
|
|
17115
17115
|
return a.request(
|
|
@@ -17342,7 +17342,7 @@ function Rw({
|
|
|
17342
17342
|
})
|
|
17343
17343
|
}),
|
|
17344
17344
|
[B, O, M]
|
|
17345
|
-
), N =
|
|
17345
|
+
), N = nt({
|
|
17346
17346
|
mutationFn: () => {
|
|
17347
17347
|
const I = { ...w };
|
|
17348
17348
|
for (const D of p) {
|
|
@@ -17635,7 +17635,7 @@ function Dw({
|
|
|
17635
17635
|
g[O].field,
|
|
17636
17636
|
R.data ?? null
|
|
17637
17637
|
])
|
|
17638
|
-
), h =
|
|
17638
|
+
), h = nt({
|
|
17639
17639
|
mutationFn: () => u.request(He(`/addendums/${t.id}/approve`)),
|
|
17640
17640
|
onSuccess: () => {
|
|
17641
17641
|
a(), Ze.success("Addendum approved — changes applied to record");
|
|
@@ -17645,13 +17645,13 @@ function Dw({
|
|
|
17645
17645
|
const O = (M = (P = R == null ? void 0 : R.response) == null ? void 0 : P.data) == null ? void 0 : M.error;
|
|
17646
17646
|
Ze.error(O ?? "Failed to approve");
|
|
17647
17647
|
}
|
|
17648
|
-
}), x =
|
|
17648
|
+
}), x = nt({
|
|
17649
17649
|
mutationFn: () => u.request(He(`/addendums/${t.id}/reject`)),
|
|
17650
17650
|
onSuccess: () => {
|
|
17651
17651
|
a(), Ze.success("Addendum rejected");
|
|
17652
17652
|
},
|
|
17653
17653
|
onError: () => Ze.error("Failed to reject")
|
|
17654
|
-
}), F =
|
|
17654
|
+
}), F = nt({
|
|
17655
17655
|
mutationFn: () => u.request(He(`/addendums/${t.id}/submit`)),
|
|
17656
17656
|
onSuccess: () => {
|
|
17657
17657
|
a(), Ze.success("Submitted for review");
|
|
@@ -17755,7 +17755,7 @@ function Dw({
|
|
|
17755
17755
|
return /* @__PURE__ */ r("div", { className: "flex items-baseline gap-2 text-[12px]", children: [
|
|
17756
17756
|
/* @__PURE__ */ e("span", { className: "min-w-[80px] shrink-0 text-slate-500 dark:text-slate-400", children: "Amount" }),
|
|
17757
17757
|
/* @__PURE__ */ e("span", { className: "font-mono text-[11px] text-slate-700 dark:text-slate-300 bg-slate-50 dark:bg-muted/50 rounded px-1.5 py-0.5", children: /* @__PURE__ */ r("span", { className: "inline-flex flex-wrap items-baseline gap-1.5", children: [
|
|
17758
|
-
R != null && R !== O && /* @__PURE__ */ r(
|
|
17758
|
+
R != null && R !== O && /* @__PURE__ */ r(tt, { children: [
|
|
17759
17759
|
/* @__PURE__ */ e("span", { className: "tabular-nums text-slate-400 line-through dark:text-slate-500", children: Wo.format(R) }),
|
|
17760
17760
|
/* @__PURE__ */ e("span", { className: "text-slate-400", children: "→" })
|
|
17761
17761
|
] }),
|
|
@@ -17801,7 +17801,7 @@ function Dw({
|
|
|
17801
17801
|
else if (_(R.field, O)) {
|
|
17802
17802
|
const q = Number(O), j = w == null ? void 0 : w[R.field], T = j != null && j !== "" && !Number.isNaN(Number(j)) ? Number(j) : null, N = T != null ? q - T : null;
|
|
17803
17803
|
P = /* @__PURE__ */ r("span", { className: "inline-flex flex-wrap items-baseline gap-1.5", children: [
|
|
17804
|
-
T != null && T !== q && /* @__PURE__ */ r(
|
|
17804
|
+
T != null && T !== q && /* @__PURE__ */ r(tt, { children: [
|
|
17805
17805
|
/* @__PURE__ */ e("span", { className: "tabular-nums text-slate-400 line-through dark:text-slate-500", children: $(R.field, T) }),
|
|
17806
17806
|
/* @__PURE__ */ e("span", { className: "text-slate-400", children: "→" })
|
|
17807
17807
|
] }),
|
|
@@ -17845,7 +17845,7 @@ function Dw({
|
|
|
17845
17845
|
children: F.isPending ? "Submitting…" : "Submit for Review"
|
|
17846
17846
|
}
|
|
17847
17847
|
),
|
|
17848
|
-
t.status === "review" && !t.workflow_template_id && /* @__PURE__ */ r(
|
|
17848
|
+
t.status === "review" && !t.workflow_template_id && /* @__PURE__ */ r(tt, { children: [
|
|
17849
17849
|
/* @__PURE__ */ e(
|
|
17850
17850
|
vt,
|
|
17851
17851
|
{
|
|
@@ -17934,7 +17934,7 @@ function zd({
|
|
|
17934
17934
|
return R.current = l, De(() => {
|
|
17935
17935
|
var O;
|
|
17936
17936
|
(O = R.current) == null || O.call(R, B);
|
|
17937
|
-
}, [B]), !s && (g || b.length === 0) ? null : /* @__PURE__ */ r(
|
|
17937
|
+
}, [B]), !s && (g || b.length === 0) ? null : /* @__PURE__ */ r(tt, { children: [
|
|
17938
17938
|
/* @__PURE__ */ r(
|
|
17939
17939
|
"div",
|
|
17940
17940
|
{
|
|
@@ -18078,7 +18078,7 @@ function Iw({ token: t }) {
|
|
|
18078
18078
|
enabled: s.length > 0,
|
|
18079
18079
|
staleTime: 10 * 6e4
|
|
18080
18080
|
});
|
|
18081
|
-
if (!l) return /* @__PURE__ */ e(
|
|
18081
|
+
if (!l) return /* @__PURE__ */ e(tt, { children: t });
|
|
18082
18082
|
const i = { collection: l.collection, itemId: String(l.id) };
|
|
18083
18083
|
return /* @__PURE__ */ r(
|
|
18084
18084
|
"button",
|
|
@@ -18135,7 +18135,7 @@ function Uw({ collection: t, id: n, raw: a }) {
|
|
|
18135
18135
|
},
|
|
18136
18136
|
staleTime: 10 * 6e4
|
|
18137
18137
|
});
|
|
18138
|
-
if (!i) return /* @__PURE__ */ e(
|
|
18138
|
+
if (!i) return /* @__PURE__ */ e(tt, { children: a });
|
|
18139
18139
|
const d = { collection: t, itemId: n };
|
|
18140
18140
|
return /* @__PURE__ */ e(
|
|
18141
18141
|
"button",
|
|
@@ -18163,7 +18163,7 @@ function Wb({ text: t }) {
|
|
|
18163
18163
|
}
|
|
18164
18164
|
return i < t.length && l.push({ kind: "text", text: t.slice(i) }), l;
|
|
18165
18165
|
}, [t]);
|
|
18166
|
-
return n.length === 1 && ((a = n[0]) == null ? void 0 : a.kind) === "text" ? /* @__PURE__ */ e(
|
|
18166
|
+
return n.length === 1 && ((a = n[0]) == null ? void 0 : a.kind) === "text" ? /* @__PURE__ */ e(tt, { children: t }) : /* @__PURE__ */ e(tt, { children: n.map(
|
|
18167
18167
|
(s, l) => s.kind === "entity" ? /* @__PURE__ */ e(Iw, { token: s.text }, `${s.text}-${l}`) : s.kind === "path" ? /* @__PURE__ */ e(Uw, { collection: s.collection, id: s.id, raw: s.text }, `${s.text}-${l}`) : (
|
|
18168
18168
|
// biome-ignore lint/suspicious/noArrayIndexKey: static segment list
|
|
18169
18169
|
/* @__PURE__ */ e("span", { children: s.text }, l)
|
|
@@ -18364,7 +18364,7 @@ function Pu({
|
|
|
18364
18364
|
] });
|
|
18365
18365
|
}
|
|
18366
18366
|
function Vw({ note: t }) {
|
|
18367
|
-
const n = Gs(), a = Ee(), s = Mt(), [l, i] = S(!1), d =
|
|
18367
|
+
const n = Gs(), a = Ee(), s = Mt(), [l, i] = S(!1), d = nt({
|
|
18368
18368
|
mutationFn: (c) => a.request(He(`/comments/${t.comment_id}/reactions`, { emoji: c })),
|
|
18369
18369
|
onSuccess: () => {
|
|
18370
18370
|
i(!1), s.invalidateQueries({ queryKey: ["comments-related"] }), s.invalidateQueries({ queryKey: ["row-comment-counts"] });
|
|
@@ -18477,27 +18477,27 @@ function Ud({
|
|
|
18477
18477
|
}), P = O ?? [], M = ke(() => {
|
|
18478
18478
|
const Q = R.map((oe) => ({ kind: "comment", at: oe.created_at, comment: oe })), ne = P.map((oe) => ({ kind: "related", at: oe.created_at, note: oe }));
|
|
18479
18479
|
return [...Q, ...ne].sort((oe, G) => new Date(G.at).getTime() - new Date(oe.at).getTime());
|
|
18480
|
-
}, [R, P]), q =
|
|
18480
|
+
}, [R, P]), q = nt({
|
|
18481
18481
|
mutationFn: (Q) => d.request(He("/comments", { collection: t, item: n, text: Q })),
|
|
18482
18482
|
onSuccess: () => {
|
|
18483
18483
|
u.invalidateQueries({ queryKey: _ }), b("");
|
|
18484
18484
|
},
|
|
18485
18485
|
onError: () => Ze.error("Failed to post comment")
|
|
18486
|
-
}), j =
|
|
18486
|
+
}), j = nt({
|
|
18487
18487
|
mutationFn: ({ id: Q, text: ne }) => d.request(qn(`/comments/${Q}`, { text: ne })),
|
|
18488
18488
|
onSuccess: () => {
|
|
18489
18489
|
u.invalidateQueries({ queryKey: _ }), F(null), C("");
|
|
18490
18490
|
},
|
|
18491
18491
|
onError: () => Ze.error("Failed to update comment")
|
|
18492
|
-
}), T =
|
|
18492
|
+
}), T = nt({
|
|
18493
18493
|
mutationFn: (Q) => d.request(An(`/comments/${Q}`)),
|
|
18494
18494
|
onSuccess: () => u.invalidateQueries({ queryKey: _ }),
|
|
18495
18495
|
onError: () => Ze.error("Failed to delete comment")
|
|
18496
|
-
}), N =
|
|
18496
|
+
}), N = nt({
|
|
18497
18497
|
mutationFn: ({ id: Q, emoji: ne }) => d.request(He(`/comments/${Q}/reactions`, { emoji: ne })),
|
|
18498
18498
|
onSuccess: () => u.invalidateQueries({ queryKey: _ }),
|
|
18499
18499
|
onError: () => Ze.error("Failed to react")
|
|
18500
|
-
}), [I, D] = S(null), ie =
|
|
18500
|
+
}), [I, D] = S(null), ie = nt({
|
|
18501
18501
|
mutationFn: (Q) => d.request(
|
|
18502
18502
|
He("/tasks", {
|
|
18503
18503
|
collection: t,
|
|
@@ -18586,7 +18586,7 @@ function Ud({
|
|
|
18586
18586
|
ne
|
|
18587
18587
|
))
|
|
18588
18588
|
] })
|
|
18589
|
-
] }) : /* @__PURE__ */ r(
|
|
18589
|
+
] }) : /* @__PURE__ */ r(tt, { children: [
|
|
18590
18590
|
/* @__PURE__ */ r("form", { onSubmit: V, className: "space-y-2", children: [
|
|
18591
18591
|
/* @__PURE__ */ e(
|
|
18592
18592
|
Pu,
|
|
@@ -18644,7 +18644,7 @@ function Ud({
|
|
|
18644
18644
|
children: /* @__PURE__ */ e($h, { className: "h-3 w-3" })
|
|
18645
18645
|
}
|
|
18646
18646
|
),
|
|
18647
|
-
oe && /* @__PURE__ */ r(
|
|
18647
|
+
oe && /* @__PURE__ */ r(tt, { children: [
|
|
18648
18648
|
/* @__PURE__ */ e(
|
|
18649
18649
|
"button",
|
|
18650
18650
|
{
|
|
@@ -18825,7 +18825,7 @@ function Yw({
|
|
|
18825
18825
|
itemId: n,
|
|
18826
18826
|
onBack: a
|
|
18827
18827
|
}) {
|
|
18828
|
-
const s = Ee(), [l, i] = S(!1), d =
|
|
18828
|
+
const s = Ee(), [l, i] = S(!1), d = nt({
|
|
18829
18829
|
mutationFn: () => s.request(He("/access-requests", { collection: t, item: String(n) })),
|
|
18830
18830
|
onSuccess: () => {
|
|
18831
18831
|
i(!0), Ze.success("Access request sent — an administrator has been notified");
|
|
@@ -18850,7 +18850,7 @@ function Yw({
|
|
|
18850
18850
|
] })
|
|
18851
18851
|
] })
|
|
18852
18852
|
] }),
|
|
18853
|
-
/* @__PURE__ */ e("div", { className: "mt-5 space-y-2.5", children: u ? /* @__PURE__ */ r(
|
|
18853
|
+
/* @__PURE__ */ e("div", { className: "mt-5 space-y-2.5", children: u ? /* @__PURE__ */ r(tt, { children: [
|
|
18854
18854
|
/* @__PURE__ */ e("div", { className: "animate-pulse h-4 w-3/4 rounded bg-slate-200 dark:bg-[hsl(var(--nvr-skeleton))]" }),
|
|
18855
18855
|
/* @__PURE__ */ e("div", { className: "animate-pulse h-4 w-1/2 rounded bg-slate-200 dark:bg-[hsl(var(--nvr-skeleton))]" })
|
|
18856
18856
|
] }) : c.length > 0 ? c.map((p, f) => /* @__PURE__ */ e(
|
|
@@ -18870,10 +18870,10 @@ function Yw({
|
|
|
18870
18870
|
onClick: () => d.mutate(),
|
|
18871
18871
|
className: "mt-3 inline-flex items-center gap-1.5 rounded-md bg-nvr-cyan px-3 py-1.5 text-[12px] font-medium text-white hover:brightness-110 disabled:opacity-50",
|
|
18872
18872
|
"data-request-access": !0,
|
|
18873
|
-
children: l ? /* @__PURE__ */ r(
|
|
18873
|
+
children: l ? /* @__PURE__ */ r(tt, { children: [
|
|
18874
18874
|
/* @__PURE__ */ e(Cn, { className: "h-3.5 w-3.5" }),
|
|
18875
18875
|
" Request sent"
|
|
18876
|
-
] }) : /* @__PURE__ */ r(
|
|
18876
|
+
] }) : /* @__PURE__ */ r(tt, { children: [
|
|
18877
18877
|
/* @__PURE__ */ e(Ic, { className: "h-3.5 w-3.5" }),
|
|
18878
18878
|
d.isPending ? "Sending…" : "Request access"
|
|
18879
18879
|
] })
|
|
@@ -18966,7 +18966,7 @@ function v4({
|
|
|
18966
18966
|
enabled: !!t && !!n,
|
|
18967
18967
|
staleTime: 15e3,
|
|
18968
18968
|
refetchInterval: 6e4
|
|
18969
|
-
}), o =
|
|
18969
|
+
}), o = nt({
|
|
18970
18970
|
mutationFn: (m) => a.request(He(`/erp-submissions/${m}/retry`)),
|
|
18971
18971
|
onSuccess: (m) => {
|
|
18972
18972
|
var f;
|
|
@@ -19167,7 +19167,7 @@ function eN({
|
|
|
19167
19167
|
enabled: !!t && !!n,
|
|
19168
19168
|
staleTime: 15e3,
|
|
19169
19169
|
refetchInterval: 6e4
|
|
19170
|
-
}), o =
|
|
19170
|
+
}), o = nt({
|
|
19171
19171
|
mutationFn: (f) => a.request(He(`/erp-submissions/${f}/retry`)),
|
|
19172
19172
|
onSuccess: (f) => {
|
|
19173
19173
|
var g;
|
|
@@ -19178,7 +19178,7 @@ function eN({
|
|
|
19178
19178
|
}), u = d ?? [];
|
|
19179
19179
|
if (u.length === 0) return null;
|
|
19180
19180
|
const c = u.filter((f) => f.status === "accepted").length, m = u.filter((f) => f.status === "failed").length, p = u.length - c - m;
|
|
19181
|
-
return /* @__PURE__ */ r(
|
|
19181
|
+
return /* @__PURE__ */ r(tt, { children: [
|
|
19182
19182
|
/* @__PURE__ */ r(
|
|
19183
19183
|
"button",
|
|
19184
19184
|
{
|
|
@@ -19218,7 +19218,7 @@ function tN({
|
|
|
19218
19218
|
queryKey: ["item-actions", t],
|
|
19219
19219
|
queryFn: () => a.request(le("/item-actions/registered", { collection: t })).then((u) => u.data ?? []),
|
|
19220
19220
|
staleTime: 5 * 6e4
|
|
19221
|
-
}), o =
|
|
19221
|
+
}), o = nt({
|
|
19222
19222
|
mutationFn: (u) => a.request(
|
|
19223
19223
|
He(`/item-actions/${u.id}/execute`, { collection: t, itemId: n })
|
|
19224
19224
|
),
|
|
@@ -19232,7 +19232,7 @@ function tN({
|
|
|
19232
19232
|
},
|
|
19233
19233
|
onSettled: () => i(null)
|
|
19234
19234
|
});
|
|
19235
|
-
return !d || d.length === 0 ? null : /* @__PURE__ */ e(
|
|
19235
|
+
return !d || d.length === 0 ? null : /* @__PURE__ */ e(tt, { children: d.map((u) => /* @__PURE__ */ r(
|
|
19236
19236
|
vt,
|
|
19237
19237
|
{
|
|
19238
19238
|
type: "button",
|
|
@@ -19282,7 +19282,7 @@ function rN({
|
|
|
19282
19282
|
queryKey: ["custom-actions", t],
|
|
19283
19283
|
queryFn: () => s.request(le("/custom-actions", { collection: t })).then((b) => b.data ?? []).catch(() => []),
|
|
19284
19284
|
staleTime: 5 * 6e4
|
|
19285
|
-
}), m =
|
|
19285
|
+
}), m = nt({
|
|
19286
19286
|
mutationFn: (b) => s.request(He(`/custom-actions/${b.id}/execute`, { item: n })),
|
|
19287
19287
|
onSuccess: (b, g) => {
|
|
19288
19288
|
Ze.success(`${g.label} completed`), l.invalidateQueries({ queryKey: ["item", t, String(n)] }), l.invalidateQueries({ queryKey: ["o2m-rows"] });
|
|
@@ -19297,7 +19297,7 @@ function rN({
|
|
|
19297
19297
|
const f = (b) => {
|
|
19298
19298
|
d(null), u(b.id), m.mutate(b);
|
|
19299
19299
|
};
|
|
19300
|
-
return /* @__PURE__ */ e(
|
|
19300
|
+
return /* @__PURE__ */ e(tt, { children: p.map(
|
|
19301
19301
|
(b) => (i == null ? void 0 : i.id) === b.id ? /* @__PURE__ */ r(
|
|
19302
19302
|
"span",
|
|
19303
19303
|
{
|
|
@@ -20657,7 +20657,7 @@ function bN({
|
|
|
20657
20657
|
staleTime: 3e4
|
|
20658
20658
|
}), F = new Set((k ?? []).map((O) => O.user)), v = s ? (((B = h == null ? void 0 : h[s]) == null ? void 0 : B.owners) ?? []).filter((O) => !F.has(O.id)) : [], C = () => {
|
|
20659
20659
|
i.invalidateQueries({ queryKey: g }), i.invalidateQueries({ queryKey: ["pipeline-instance", t, n] });
|
|
20660
|
-
}, w =
|
|
20660
|
+
}, w = nt({
|
|
20661
20661
|
mutationFn: () => l.request(
|
|
20662
20662
|
He(`/pipelines/instance/${t}/${n}/owners`, {
|
|
20663
20663
|
user: u,
|
|
@@ -20668,7 +20668,7 @@ function bN({
|
|
|
20668
20668
|
C(), c(""), p(""), o(!1), Ze.success("Owner added");
|
|
20669
20669
|
},
|
|
20670
20670
|
onError: () => Ze.error("Failed to add owner")
|
|
20671
|
-
}), _ =
|
|
20671
|
+
}), _ = nt({
|
|
20672
20672
|
mutationFn: (O) => l.request(An(`/pipelines/instance-owners/${O}`)),
|
|
20673
20673
|
onSuccess: () => {
|
|
20674
20674
|
C(), Ze.success("Owner removed");
|
|
@@ -20949,7 +20949,7 @@ function Gb({ collection: t, item: n }) {
|
|
|
20949
20949
|
s.days_in_state,
|
|
20950
20950
|
"d ago):",
|
|
20951
20951
|
" ",
|
|
20952
|
-
s.changed_total === 0 && s.comments === 0 && s.addendums.count === 0 ? /* @__PURE__ */ e("span", { children: "no changes to this record." }) : /* @__PURE__ */ r(
|
|
20952
|
+
s.changed_total === 0 && s.comments === 0 && s.addendums.count === 0 ? /* @__PURE__ */ e("span", { children: "no changes to this record." }) : /* @__PURE__ */ r(tt, { children: [
|
|
20953
20953
|
s.changed_total > 0 && /* @__PURE__ */ r("span", { children: [
|
|
20954
20954
|
s.changed_total,
|
|
20955
20955
|
" field",
|
|
@@ -20977,7 +20977,7 @@ function Gb({ collection: t, item: n }) {
|
|
|
20977
20977
|
i.field,
|
|
20978
20978
|
":",
|
|
20979
20979
|
" ",
|
|
20980
|
-
i.old !== void 0 && /* @__PURE__ */ r(
|
|
20980
|
+
i.old !== void 0 && /* @__PURE__ */ r(tt, { children: [
|
|
20981
20981
|
/* @__PURE__ */ e("span", { className: "text-red-600 line-through dark:text-red-400", children: l(i.old) }),
|
|
20982
20982
|
" "
|
|
20983
20983
|
] }),
|
|
@@ -21059,13 +21059,13 @@ function gN({
|
|
|
21059
21059
|
for (const [se, ge] of Object.entries($))
|
|
21060
21060
|
ge.skipped && xe.set(se, ge.skip_reasons ?? []);
|
|
21061
21061
|
return xe;
|
|
21062
|
-
}, [$]), O =
|
|
21062
|
+
}, [$]), O = nt({
|
|
21063
21063
|
mutationFn: () => u.request(He(`/pipelines/instance/${t}/${n}/start`, {})),
|
|
21064
21064
|
onSuccess: () => {
|
|
21065
21065
|
c.invalidateQueries({ queryKey: w }), Ze.success("Pipeline started");
|
|
21066
21066
|
},
|
|
21067
21067
|
onError: () => Ze.error("Failed to start pipeline")
|
|
21068
|
-
}), P =
|
|
21068
|
+
}), P = nt({
|
|
21069
21069
|
mutationFn: ({ transition_id: xe, comment: se }) => u.request(
|
|
21070
21070
|
He(`/pipelines/instance/${t}/${n}/transition`, { transition_id: xe, comment: se })
|
|
21071
21071
|
),
|
|
@@ -21200,7 +21200,7 @@ function gN({
|
|
|
21200
21200
|
transition_id: f,
|
|
21201
21201
|
comment: m.trim() || void 0
|
|
21202
21202
|
}),
|
|
21203
|
-
children: P.isPending ? /* @__PURE__ */ e(Ut, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ r(
|
|
21203
|
+
children: P.isPending ? /* @__PURE__ */ e(Ut, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ r(tt, { children: [
|
|
21204
21204
|
/* @__PURE__ */ e("span", { children: "Confirm" }),
|
|
21205
21205
|
/* @__PURE__ */ e(Cn, { className: "h-3 w-3" })
|
|
21206
21206
|
] })
|
|
@@ -21208,7 +21208,7 @@ function gN({
|
|
|
21208
21208
|
)
|
|
21209
21209
|
] })
|
|
21210
21210
|
] });
|
|
21211
|
-
return /* @__PURE__ */ r(
|
|
21211
|
+
return /* @__PURE__ */ r(tt, { children: [
|
|
21212
21212
|
/* @__PURE__ */ r("div", { className: `overflow-hidden rounded-xl border bg-white dark:bg-card ${o ? "border-amber-300 dark:border-amber-600/50" : "border-slate-200 dark:border-border"}`, children: [
|
|
21213
21213
|
/* @__PURE__ */ r(
|
|
21214
21214
|
"div",
|
|
@@ -21420,7 +21420,7 @@ function yN({
|
|
|
21420
21420
|
}
|
|
21421
21421
|
),
|
|
21422
21422
|
staleTime: 1e4
|
|
21423
|
-
}), g =
|
|
21423
|
+
}), g = nt({
|
|
21424
21424
|
mutationFn: ({ transition_id: C, comment: w }) => s.request(
|
|
21425
21425
|
He(`/pipelines/instance/${t}/${n}/transition`, { transition_id: C, comment: w })
|
|
21426
21426
|
),
|
|
@@ -21550,7 +21550,7 @@ function yN({
|
|
|
21550
21550
|
transition_id: o,
|
|
21551
21551
|
comment: i.trim() || void 0
|
|
21552
21552
|
}),
|
|
21553
|
-
children: g.isPending ? /* @__PURE__ */ e(Ut, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ r(
|
|
21553
|
+
children: g.isPending ? /* @__PURE__ */ e(Ut, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ r(tt, { children: [
|
|
21554
21554
|
/* @__PURE__ */ e("span", { children: "Confirm" }),
|
|
21555
21555
|
/* @__PURE__ */ e(Cn, { className: "h-3 w-3" })
|
|
21556
21556
|
] })
|
|
@@ -21764,7 +21764,7 @@ function qN({
|
|
|
21764
21764
|
onRollback: a,
|
|
21765
21765
|
inlineTableFields: s
|
|
21766
21766
|
}) {
|
|
21767
|
-
const l = Ee(), [i, d] = S(!1), [o, u] = S(!1), [c, m] = S("side"), [p, f] = S(null), b = t.action === "update", g = t.action === "create", k = t.action === "delete", y = k ? t.data ?? {} : g ? {} : n ?? {}, h = k ? {} : t.data ?? {}, x = t.delta ? Object.keys(t.delta).length : 0, F = b || g, [v, C] = S(null), w =
|
|
21767
|
+
const l = Ee(), [i, d] = S(!1), [o, u] = S(!1), [c, m] = S("side"), [p, f] = S(null), b = t.action === "update", g = t.action === "create", k = t.action === "delete", y = k ? t.data ?? {} : g ? {} : n ?? {}, h = k ? {} : t.data ?? {}, x = t.delta ? Object.keys(t.delta).length : 0, F = b || g, [v, C] = S(null), w = nt({
|
|
21768
21768
|
mutationFn: () => l.request(He(`/revisions/${t.id}/rollback`, {})),
|
|
21769
21769
|
onSuccess: () => {
|
|
21770
21770
|
u(!1), Ze.success("Rolled back to this revision"), s != null && s.length && t.timestamp && C(t.timestamp), a == null || a();
|
|
@@ -21833,7 +21833,7 @@ function qN({
|
|
|
21833
21833
|
)) })
|
|
21834
21834
|
] }),
|
|
21835
21835
|
c === "side" ? /* @__PURE__ */ e(NN, { before: y, after: h }) : b && t.delta ? /* @__PURE__ */ e(CN, { delta: t.delta }) : /* @__PURE__ */ e($N, { data: t.data }),
|
|
21836
|
-
F && /* @__PURE__ */ e("div", { className: "flex items-center justify-end gap-2 pt-1", children: o ? /* @__PURE__ */ r(
|
|
21836
|
+
F && /* @__PURE__ */ e("div", { className: "flex items-center justify-end gap-2 pt-1", children: o ? /* @__PURE__ */ r(tt, { children: [
|
|
21837
21837
|
/* @__PURE__ */ e("span", { className: "text-[11px] text-slate-500", children: "Restore this revision?" }),
|
|
21838
21838
|
/* @__PURE__ */ e(
|
|
21839
21839
|
vt,
|
|
@@ -22113,7 +22113,7 @@ function FN({ collection: t, item: n }) {
|
|
|
22113
22113
|
"“",
|
|
22114
22114
|
i,
|
|
22115
22115
|
"” never appears in this record’s recorded changes."
|
|
22116
|
-
] }) : /* @__PURE__ */ r(
|
|
22116
|
+
] }) : /* @__PURE__ */ r(tt, { children: [
|
|
22117
22117
|
o == null ? void 0 : o.matches.map((c) => /* @__PURE__ */ r("div", { className: "text-[11.5px]", children: [
|
|
22118
22118
|
/* @__PURE__ */ e("p", { className: "text-slate-600 dark:text-slate-300", children: c.fields.map((m) => /* @__PURE__ */ r("span", { children: [
|
|
22119
22119
|
/* @__PURE__ */ e("span", { className: "font-mono text-[10.5px]", children: m.field }),
|
|
@@ -22142,7 +22142,7 @@ function AN({ revisionId: t }) {
|
|
|
22142
22142
|
le("/comments", { collection: "nivaro_revisions", item: String(t) })
|
|
22143
22143
|
).then((o) => o.data ?? []).catch(() => []),
|
|
22144
22144
|
staleTime: 3e4
|
|
22145
|
-
}), d =
|
|
22145
|
+
}), d = nt({
|
|
22146
22146
|
mutationFn: () => n.request(
|
|
22147
22147
|
He("/comments", { collection: "nivaro_revisions", item: String(t), text: s })
|
|
22148
22148
|
),
|
|
@@ -22275,7 +22275,7 @@ function pf({
|
|
|
22275
22275
|
),
|
|
22276
22276
|
enabled: u,
|
|
22277
22277
|
staleTime: 5 * 6e4
|
|
22278
|
-
}), v =
|
|
22278
|
+
}), v = nt({
|
|
22279
22279
|
mutationFn: () => s.request(
|
|
22280
22280
|
He("/record-links", {
|
|
22281
22281
|
from_collection: t,
|
|
@@ -22294,7 +22294,7 @@ function pf({
|
|
|
22294
22294
|
((_ = w.response) == null ? void 0 : _.error) ?? "Could not link"
|
|
22295
22295
|
);
|
|
22296
22296
|
}
|
|
22297
|
-
}), C =
|
|
22297
|
+
}), C = nt({
|
|
22298
22298
|
mutationFn: (w) => s.request(An(`/record-links/${w}`)),
|
|
22299
22299
|
onSuccess: () => void l.invalidateQueries({ queryKey: ["record-links"] })
|
|
22300
22300
|
});
|
|
@@ -22518,7 +22518,7 @@ function Qd({
|
|
|
22518
22518
|
}), { data: w = [] } = pe({
|
|
22519
22519
|
queryKey: ["users", "combobox"],
|
|
22520
22520
|
queryFn: () => d.request(le("/users", { limit: 200 })).then((T) => T.data)
|
|
22521
|
-
}), _ = () => o.invalidateQueries({ queryKey: ["tasks", t, n] }), A =
|
|
22521
|
+
}), _ = () => o.invalidateQueries({ queryKey: ["tasks", t, n] }), A = nt({
|
|
22522
22522
|
mutationFn: () => d.request(
|
|
22523
22523
|
He("/tasks", {
|
|
22524
22524
|
collection: t,
|
|
@@ -22532,13 +22532,13 @@ function Qd({
|
|
|
22532
22532
|
_(), f(!1), y(""), x(null), v(""), Ze.success("Task created");
|
|
22533
22533
|
},
|
|
22534
22534
|
onError: () => Ze.error("Failed to create task")
|
|
22535
|
-
}), $ =
|
|
22535
|
+
}), $ = nt({
|
|
22536
22536
|
mutationFn: (T) => d.request(He(`/tasks/${T}/complete`, {})),
|
|
22537
22537
|
onSuccess: () => {
|
|
22538
22538
|
_(), Ze.success("Task completed");
|
|
22539
22539
|
},
|
|
22540
22540
|
onError: () => Ze.error("Failed to complete task")
|
|
22541
|
-
}), B =
|
|
22541
|
+
}), B = nt({
|
|
22542
22542
|
mutationFn: (T) => d.request(An(`/tasks/${T}`)),
|
|
22543
22543
|
onSuccess: () => {
|
|
22544
22544
|
_(), Ze.success("Task deleted");
|
|
@@ -22904,7 +22904,7 @@ function ON({ collection: t, item: n }) {
|
|
|
22904
22904
|
}
|
|
22905
22905
|
}), c = () => {
|
|
22906
22906
|
s.invalidateQueries({ queryKey: d }), s.invalidateQueries({ queryKey: ["pipeline-instance", t, n] });
|
|
22907
|
-
}, m =
|
|
22907
|
+
}, m = nt({
|
|
22908
22908
|
mutationFn: (y) => {
|
|
22909
22909
|
var h;
|
|
22910
22910
|
return a.request(
|
|
@@ -22923,7 +22923,7 @@ function ON({ collection: t, item: n }) {
|
|
|
22923
22923
|
((x = (h = y == null ? void 0 : y.response) == null ? void 0 : h.data) == null ? void 0 : x.error) ?? "Failed to split workflow"
|
|
22924
22924
|
);
|
|
22925
22925
|
}
|
|
22926
|
-
}), p =
|
|
22926
|
+
}), p = nt({
|
|
22927
22927
|
mutationFn: ({
|
|
22928
22928
|
branchInstanceId: y,
|
|
22929
22929
|
transitionId: h,
|
|
@@ -22966,7 +22966,7 @@ function ON({ collection: t, item: n }) {
|
|
|
22966
22966
|
" branches"
|
|
22967
22967
|
] })
|
|
22968
22968
|
] }),
|
|
22969
|
-
o.active ? /* @__PURE__ */ r(
|
|
22969
|
+
o.active ? /* @__PURE__ */ r(tt, { children: [
|
|
22970
22970
|
/* @__PURE__ */ e("div", { className: "space-y-2", children: o.branches.map((y, h) => /* @__PURE__ */ e(
|
|
22971
22971
|
RN,
|
|
22972
22972
|
{
|
|
@@ -23590,7 +23590,7 @@ function GN({
|
|
|
23590
23590
|
queryFn: async () => ((await a.request(le("/chat/rooms"))).data ?? []).filter((x) => x.kind !== "entity"),
|
|
23591
23591
|
enabled: s,
|
|
23592
23592
|
staleTime: 3e4
|
|
23593
|
-
}), g =
|
|
23593
|
+
}), g = nt({
|
|
23594
23594
|
mutationFn: () => a.request(
|
|
23595
23595
|
He("/chat/messages", {
|
|
23596
23596
|
room: i,
|
|
@@ -23818,7 +23818,7 @@ function e_({ collection: t, itemId: n }) {
|
|
|
23818
23818
|
queryFn: () => a.request(le(`/sla/status/${t}/${n}`)).then((f) => f).catch(() => null),
|
|
23819
23819
|
enabled: !!n,
|
|
23820
23820
|
staleTime: 6e4
|
|
23821
|
-
}), c =
|
|
23821
|
+
}), c = nt({
|
|
23822
23822
|
mutationFn: () => a.request(He("/sla/ack", { collection: t, item: n, note: l.trim() || void 0 })),
|
|
23823
23823
|
onSuccess: () => {
|
|
23824
23824
|
o(!1), s.invalidateQueries({ queryKey: ["sla-breach", t, n] });
|
|
@@ -23835,7 +23835,7 @@ function e_({ collection: t, itemId: n }) {
|
|
|
23835
23835
|
"h past the limit",
|
|
23836
23836
|
u.acknowledged ? ` · acknowledged by ${u.acknowledged.by || "someone"}` : u.has_ladder ? " · escalating until acknowledged" : ""
|
|
23837
23837
|
] }),
|
|
23838
|
-
!u.acknowledged && /* @__PURE__ */ r(
|
|
23838
|
+
!u.acknowledged && /* @__PURE__ */ r(tt, { children: [
|
|
23839
23839
|
d && /* @__PURE__ */ e(
|
|
23840
23840
|
"input",
|
|
23841
23841
|
{
|
|
@@ -23883,7 +23883,7 @@ function t_({
|
|
|
23883
23883
|
}).catch(() => !1),
|
|
23884
23884
|
enabled: i,
|
|
23885
23885
|
staleTime: 3e4
|
|
23886
|
-
}), p =
|
|
23886
|
+
}), p = nt({
|
|
23887
23887
|
mutationFn: () => s.request(
|
|
23888
23888
|
He(`/notifications/mutes/${t}/${n}/toggle`, {})
|
|
23889
23889
|
).then((x) => {
|
|
@@ -23902,7 +23902,7 @@ function t_({
|
|
|
23902
23902
|
}), g = f.length > 0, k = f.some((x) => x.event_type !== "workflow_transition") ? "all" : "state", y = ke(
|
|
23903
23903
|
() => `Watching ${Et(t)} ${a || `#${n}`}`.slice(0, 255),
|
|
23904
23904
|
[t, a, n]
|
|
23905
|
-
), h =
|
|
23905
|
+
), h = nt({
|
|
23906
23906
|
mutationFn: async (x) => {
|
|
23907
23907
|
const F = x !== "off", v = x === "all", C = f.some((_) => _.event_type === "workflow_transition"), w = f.filter((_) => _.event_type !== "workflow_transition");
|
|
23908
23908
|
if (F && !C && await s.request(
|
|
@@ -23937,7 +23937,7 @@ function t_({
|
|
|
23937
23937
|
Ze.error((F == null ? void 0 : F.error) ?? "Could not update subscription");
|
|
23938
23938
|
}
|
|
23939
23939
|
});
|
|
23940
|
-
return /* @__PURE__ */ r(
|
|
23940
|
+
return /* @__PURE__ */ r(tt, { children: [
|
|
23941
23941
|
/* @__PURE__ */ e(
|
|
23942
23942
|
vt,
|
|
23943
23943
|
{
|
|
@@ -24148,35 +24148,61 @@ function r_({ collection: t, itemId: n }) {
|
|
|
24148
24148
|
function a_({ collection: t, itemId: n }) {
|
|
24149
24149
|
const a = Ee(), { data: s, isLoading: l } = pe({
|
|
24150
24150
|
queryKey: ["record-integrations", t, n],
|
|
24151
|
-
queryFn: () => a.request(le(`/record-integrations/${t}/${n}`)).then((
|
|
24151
|
+
queryFn: () => a.request(le(`/record-integrations/${t}/${n}`)).then((d) => d.data),
|
|
24152
24152
|
staleTime: 3e4
|
|
24153
|
+
}), { data: i = [] } = pe({
|
|
24154
|
+
queryKey: ["record-external-ids", t, n],
|
|
24155
|
+
queryFn: () => a.request(le(`/items/${t}/${n}`)).then((d) => {
|
|
24156
|
+
const o = d.data ?? {}, u = /(external|nuvolo|mwf|oracle|sap|erp|legacy|fusion|mdsi).*(id|number|ref)|^(order_number|requisition_id|sales_order_id)$/i;
|
|
24157
|
+
return Object.entries(o).filter(([c, m]) => c !== "id" && m != null && m !== "" && u.test(c)).map(([c, m]) => ({ field: c, value: String(m).slice(0, 60) })).slice(0, 12);
|
|
24158
|
+
}).catch(() => []),
|
|
24159
|
+
staleTime: 6e4
|
|
24153
24160
|
});
|
|
24154
|
-
return l ? /* @__PURE__ */ e("p", { className: "text-[12px] text-slate-400", children: "Loading…" }) : ((s == null ? void 0 : s.erp.length) ?? 0) + ((s == null ? void 0 : s.webhooks.length) ?? 0) === 0 ? /* @__PURE__ */ e("p", { className: "text-[12px] text-slate-400", children: "No integration activity for this record." }) : /* @__PURE__ */ r(
|
|
24155
|
-
|
|
24156
|
-
/* @__PURE__ */ e("
|
|
24157
|
-
/* @__PURE__ */ r(
|
|
24161
|
+
return l ? /* @__PURE__ */ e("p", { className: "text-[12px] text-slate-400", children: "Loading…" }) : ((s == null ? void 0 : s.erp.length) ?? 0) + ((s == null ? void 0 : s.webhooks.length) ?? 0) === 0 ? /* @__PURE__ */ e("p", { className: "text-[12px] text-slate-400", children: "No integration activity for this record." }) : /* @__PURE__ */ r(tt, { children: [
|
|
24162
|
+
i.length > 0 && /* @__PURE__ */ r("div", { className: "border-b border-slate-100 px-3 py-2 dark:border-border/50", children: [
|
|
24163
|
+
/* @__PURE__ */ e("p", { className: "text-[10px] font-semibold uppercase tracking-wide text-slate-400", children: "External identifiers" }),
|
|
24164
|
+
/* @__PURE__ */ e("div", { className: "mt-1 flex flex-wrap gap-1.5", children: i.map((d) => /* @__PURE__ */ r(
|
|
24158
24165
|
"span",
|
|
24159
24166
|
{
|
|
24160
|
-
className:
|
|
24167
|
+
className: "inline-flex items-center gap-1 rounded border border-slate-200 bg-slate-50 px-1.5 py-0.5 text-[11px] dark:border-border dark:bg-muted/40",
|
|
24161
24168
|
children: [
|
|
24162
|
-
|
|
24163
|
-
|
|
24164
|
-
|
|
24169
|
+
/* @__PURE__ */ r("span", { className: "text-slate-400", children: [
|
|
24170
|
+
d.field,
|
|
24171
|
+
":"
|
|
24172
|
+
] }),
|
|
24173
|
+
/* @__PURE__ */ e("span", { className: "font-mono text-slate-700 dark:text-slate-200", children: d.value })
|
|
24165
24174
|
]
|
|
24166
|
-
}
|
|
24167
|
-
|
|
24168
|
-
|
|
24169
|
-
|
|
24170
|
-
|
|
24171
|
-
|
|
24172
|
-
|
|
24173
|
-
|
|
24174
|
-
|
|
24175
|
-
|
|
24176
|
-
|
|
24177
|
-
|
|
24178
|
-
|
|
24179
|
-
|
|
24175
|
+
},
|
|
24176
|
+
d.field
|
|
24177
|
+
)) })
|
|
24178
|
+
] }),
|
|
24179
|
+
/* @__PURE__ */ r("div", { className: "max-h-72 space-y-1 overflow-y-auto text-[12px]", children: [
|
|
24180
|
+
s == null ? void 0 : s.erp.map((d) => /* @__PURE__ */ r("p", { className: "flex items-baseline justify-between gap-2", children: [
|
|
24181
|
+
/* @__PURE__ */ e("span", { className: "min-w-0 truncate text-slate-700 dark:text-slate-200", children: d.target ?? d.endpoint_path ?? "ERP push" }),
|
|
24182
|
+
/* @__PURE__ */ r(
|
|
24183
|
+
"span",
|
|
24184
|
+
{
|
|
24185
|
+
className: d.status === "failed" ? "shrink-0 text-red-500" : d.status === "accepted" ? "shrink-0 text-emerald-600" : "shrink-0 text-slate-400",
|
|
24186
|
+
children: [
|
|
24187
|
+
d.status,
|
|
24188
|
+
" · ",
|
|
24189
|
+
new Date(d.created_at).toLocaleDateString()
|
|
24190
|
+
]
|
|
24191
|
+
}
|
|
24192
|
+
)
|
|
24193
|
+
] }, `e${d.id}`)),
|
|
24194
|
+
s == null ? void 0 : s.webhooks.map((d) => /* @__PURE__ */ r("p", { className: "flex items-baseline justify-between gap-2", children: [
|
|
24195
|
+
/* @__PURE__ */ r("span", { className: "min-w-0 truncate text-slate-700 dark:text-slate-200", children: [
|
|
24196
|
+
"webhook: ",
|
|
24197
|
+
d.webhook
|
|
24198
|
+
] }),
|
|
24199
|
+
/* @__PURE__ */ r("span", { className: "shrink-0 text-slate-400", children: [
|
|
24200
|
+
d.response_status,
|
|
24201
|
+
" · ",
|
|
24202
|
+
new Date(d.created_at).toLocaleDateString()
|
|
24203
|
+
] })
|
|
24204
|
+
] }, `w${d.id}`))
|
|
24205
|
+
] })
|
|
24180
24206
|
] });
|
|
24181
24207
|
}
|
|
24182
24208
|
function s_({ collection: t, itemId: n }) {
|
|
@@ -24391,7 +24417,7 @@ function m_({ collection: t, itemId: n }) {
|
|
|
24391
24417
|
]
|
|
24392
24418
|
}
|
|
24393
24419
|
),
|
|
24394
|
-
s && /* @__PURE__ */ r(
|
|
24420
|
+
s && /* @__PURE__ */ r(tt, { children: [
|
|
24395
24421
|
/* @__PURE__ */ e(
|
|
24396
24422
|
"button",
|
|
24397
24423
|
{
|
|
@@ -27145,7 +27171,7 @@ ${ae.join(`
|
|
|
27145
27171
|
ml.mutate();
|
|
27146
27172
|
})();
|
|
27147
27173
|
}
|
|
27148
|
-
const ml =
|
|
27174
|
+
const ml = nt({
|
|
27149
27175
|
mutationFn: async () => {
|
|
27150
27176
|
var la, Gr;
|
|
27151
27177
|
function L(ut) {
|
|
@@ -27562,7 +27588,7 @@ ${ae.join(`
|
|
|
27562
27588
|
},
|
|
27563
27589
|
onError: () => {
|
|
27564
27590
|
}
|
|
27565
|
-
}), cu =
|
|
27591
|
+
}), cu = nt({
|
|
27566
27592
|
mutationFn: () => R.request(An(`/items/${t}/${j}`)),
|
|
27567
27593
|
onSuccess: () => {
|
|
27568
27594
|
Ze.success("Record deleted"), q.invalidateQueries({ queryKey: ["item", t] }), i == null || i();
|
|
@@ -29087,7 +29113,7 @@ ${ae.join(`
|
|
|
29087
29113
|
},
|
|
29088
29114
|
L.id
|
|
29089
29115
|
)),
|
|
29090
|
-
re && !T || Te && !T && P || l0 ? /* @__PURE__ */ r(
|
|
29116
|
+
re && !T || Te && !T && P || l0 ? /* @__PURE__ */ r(tt, { children: [
|
|
29091
29117
|
re && !T && /* @__PURE__ */ e(
|
|
29092
29118
|
Zb,
|
|
29093
29119
|
{
|
|
@@ -29131,7 +29157,7 @@ ${ae.join(`
|
|
|
29131
29157
|
}
|
|
29132
29158
|
}
|
|
29133
29159
|
),
|
|
29134
|
-
P && !T && j && /* @__PURE__ */ r(
|
|
29160
|
+
P && !T && j && /* @__PURE__ */ r(tt, { children: [
|
|
29135
29161
|
/* @__PURE__ */ r(
|
|
29136
29162
|
vt,
|
|
29137
29163
|
{
|
|
@@ -29173,7 +29199,7 @@ ${ae.join(`
|
|
|
29173
29199
|
onSuccess: (L) => l == null ? void 0 : l(String(L))
|
|
29174
29200
|
}
|
|
29175
29201
|
),
|
|
29176
|
-
l0 && (Xx ? /* @__PURE__ */ r(
|
|
29202
|
+
l0 && (Xx ? /* @__PURE__ */ r(tt, { children: [
|
|
29177
29203
|
/* @__PURE__ */ e("span", { className: "text-sm text-muted-foreground", children: "Delete?" }),
|
|
29178
29204
|
/* @__PURE__ */ e(
|
|
29179
29205
|
vt,
|
|
@@ -29864,7 +29890,7 @@ function ox({ collection: t, id: n }) {
|
|
|
29864
29890
|
className: "text-left underline decoration-slate-300 underline-offset-2 transition-colors hover:text-[#0284c7] hover:decoration-[#0284c7] dark:decoration-slate-600",
|
|
29865
29891
|
children: d
|
|
29866
29892
|
}
|
|
29867
|
-
) : /* @__PURE__ */ e(
|
|
29893
|
+
) : /* @__PURE__ */ e(tt, { children: d });
|
|
29868
29894
|
}
|
|
29869
29895
|
function I_({
|
|
29870
29896
|
collection: t,
|
|
@@ -30471,7 +30497,7 @@ function cx({
|
|
|
30471
30497
|
}
|
|
30472
30498
|
(T !== b.x || N !== b.y) && g({ x: T, y: N });
|
|
30473
30499
|
}, [p, b, A, x.length]);
|
|
30474
|
-
const O =
|
|
30500
|
+
const O = nt({
|
|
30475
30501
|
mutationFn: ({ transitionId: q, comment: j }) => c.request(
|
|
30476
30502
|
He(`/pipelines/instance/${t}/${n}/transition`, {
|
|
30477
30503
|
transition_id: q,
|
|
@@ -30491,7 +30517,7 @@ function cx({
|
|
|
30491
30517
|
children: q
|
|
30492
30518
|
}
|
|
30493
30519
|
), M = /* @__PURE__ */ e("div", { className: "my-1 border-t border-slate-100 dark:border-slate-800" });
|
|
30494
|
-
return /* @__PURE__ */ r(
|
|
30520
|
+
return /* @__PURE__ */ r(tt, { children: [
|
|
30495
30521
|
/* @__PURE__ */ r(
|
|
30496
30522
|
"button",
|
|
30497
30523
|
{
|
|
@@ -30583,7 +30609,7 @@ function cx({
|
|
|
30583
30609
|
}
|
|
30584
30610
|
)
|
|
30585
30611
|
] })
|
|
30586
|
-
] }) : /* @__PURE__ */ r(
|
|
30612
|
+
] }) : /* @__PURE__ */ r(tt, { children: [
|
|
30587
30613
|
P("Open", () => {
|
|
30588
30614
|
f(!1), s();
|
|
30589
30615
|
}),
|
|
@@ -30596,7 +30622,7 @@ function cx({
|
|
|
30596
30622
|
i && P("Audit log", () => {
|
|
30597
30623
|
f(!1), i();
|
|
30598
30624
|
}),
|
|
30599
|
-
a && C.length > 0 && /* @__PURE__ */ r(
|
|
30625
|
+
a && C.length > 0 && /* @__PURE__ */ r(tt, { children: [
|
|
30600
30626
|
M,
|
|
30601
30627
|
/* @__PURE__ */ e("p", { className: "px-3 pb-0.5 pt-1 text-[9.5px] font-bold uppercase tracking-wider text-slate-400", children: "Transitions" }),
|
|
30602
30628
|
C.map((q) => {
|
|
@@ -31175,7 +31201,7 @@ function Mp({
|
|
|
31175
31201
|
if (!u)
|
|
31176
31202
|
return /* @__PURE__ */ e("div", { className: "px-3 py-1.5", style: { paddingLeft: `${0.5 + n}rem` }, children: /* @__PURE__ */ e("span", { className: "inline-block h-3 w-20 animate-pulse rounded bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" }) });
|
|
31177
31203
|
const p = n < 2;
|
|
31178
|
-
return /* @__PURE__ */ e(
|
|
31204
|
+
return /* @__PURE__ */ e(tt, { children: u.fields.filter((f) => !f.hidden && (!l || f.field.includes(l))).map((f) => {
|
|
31179
31205
|
const b = p ? Ya(u.relations, t, f.field) : void 0, g = p && i ? vd(u.relations, t, f.field) : void 0, k = (b == null ? void 0 : b.one_collection) ?? null, y = c.has(f.field);
|
|
31180
31206
|
return /* @__PURE__ */ r("div", { children: [
|
|
31181
31207
|
/* @__PURE__ */ r(
|
|
@@ -31366,7 +31392,7 @@ function t5({
|
|
|
31366
31392
|
}
|
|
31367
31393
|
}
|
|
31368
31394
|
const y = [...g, ...k.slice(0, 12)];
|
|
31369
|
-
return y.length === 0 ? /* @__PURE__ */ e("p", { className: "px-3 py-2 text-[12px] text-slate-400", children: "No matching fields" }) : /* @__PURE__ */ e(
|
|
31395
|
+
return y.length === 0 ? /* @__PURE__ */ e("p", { className: "px-3 py-2 text-[12px] text-slate-400", children: "No matching fields" }) : /* @__PURE__ */ e(tt, { children: y.map((h) => /* @__PURE__ */ r(
|
|
31370
31396
|
"div",
|
|
31371
31397
|
{
|
|
31372
31398
|
className: "group/frow flex w-full items-center gap-1 px-1.5 hover:bg-slate-50 dark:hover:bg-slate-800",
|
|
@@ -31626,7 +31652,7 @@ function a5({
|
|
|
31626
31652
|
children: "+ Add Filter"
|
|
31627
31653
|
}
|
|
31628
31654
|
),
|
|
31629
|
-
d && /* @__PURE__ */ e("div", { className: "absolute left-0 top-full z-50 mt-1 w-80 overflow-hidden rounded-xl border border-slate-200 bg-white shadow-xl dark:border-slate-700 dark:bg-slate-900", children: f == null ? /* @__PURE__ */ r(
|
|
31655
|
+
d && /* @__PURE__ */ e("div", { className: "absolute left-0 top-full z-50 mt-1 w-80 overflow-hidden rounded-xl border border-slate-200 bg-white shadow-xl dark:border-slate-700 dark:bg-slate-900", children: f == null ? /* @__PURE__ */ r(tt, { children: [
|
|
31630
31656
|
m.path.length > 0 && /* @__PURE__ */ r(
|
|
31631
31657
|
"button",
|
|
31632
31658
|
{
|
|
@@ -31700,7 +31726,7 @@ function a5({
|
|
|
31700
31726
|
}
|
|
31701
31727
|
)
|
|
31702
31728
|
] })
|
|
31703
|
-
] }) : /* @__PURE__ */ r(
|
|
31729
|
+
] }) : /* @__PURE__ */ r(tt, { children: [
|
|
31704
31730
|
/* @__PURE__ */ r(
|
|
31705
31731
|
"button",
|
|
31706
31732
|
{
|
|
@@ -31855,7 +31881,7 @@ function a5({
|
|
|
31855
31881
|
className: "h-8 min-w-0 flex-1 rounded-md border border-slate-200 bg-white px-2.5 text-[13px] outline-none focus:border-[#00ceff80] dark:border-slate-700 dark:bg-slate-800 dark:text-slate-100"
|
|
31856
31882
|
}
|
|
31857
31883
|
),
|
|
31858
|
-
T === "number" && g === "_between" && /* @__PURE__ */ r(
|
|
31884
|
+
T === "number" && g === "_between" && /* @__PURE__ */ r(tt, { children: [
|
|
31859
31885
|
/* @__PURE__ */ e("span", { className: "text-[11px] text-slate-400", children: "to" }),
|
|
31860
31886
|
/* @__PURE__ */ e(
|
|
31861
31887
|
"input",
|
|
@@ -32512,7 +32538,7 @@ function k4({
|
|
|
32512
32538
|
E ? localStorage.setItem(`nvr_cbv_group_${t}`, E) : localStorage.removeItem(`nvr_cbv_group_${t}`);
|
|
32513
32539
|
} catch {
|
|
32514
32540
|
}
|
|
32515
|
-
}, [fn, Gn] = S(!1), [Tn, Mn] = S(""), [Fe, ee] = S(null), Ke =
|
|
32541
|
+
}, [fn, Gn] = S(!1), [Tn, Mn] = S(""), [Fe, ee] = S(null), Ke = nt({
|
|
32516
32542
|
mutationFn: (E) => p.request(He("/ai/query", { collection: t, prompt: E, limit: 200 })),
|
|
32517
32543
|
onSuccess: (E) => {
|
|
32518
32544
|
var me;
|
|
@@ -33131,20 +33157,20 @@ function k4({
|
|
|
33131
33157
|
}, K = (E) => {
|
|
33132
33158
|
const me = new URLSearchParams();
|
|
33133
33159
|
F && me.set("search", F), Bn && me.set("conditions", Bn), w && me.set("sort", w), window.open(`/api/export-presets/${E}/run?${me.toString()}`, "_blank");
|
|
33134
|
-
}, Ne =
|
|
33160
|
+
}, Ne = nt({
|
|
33135
33161
|
mutationFn: () => p.request(
|
|
33136
33162
|
He("/saved-views", { collection: t, name: de.trim(), ...xs() })
|
|
33137
33163
|
),
|
|
33138
33164
|
onSuccess: (E) => {
|
|
33139
33165
|
Oe(!1), we(""), Vt(E.data.id), hs();
|
|
33140
33166
|
}
|
|
33141
|
-
}), Xe =
|
|
33167
|
+
}), Xe = nt({
|
|
33142
33168
|
mutationFn: (E) => p.request(qn(`/saved-views/${E}`, xs())),
|
|
33143
33169
|
onSuccess: hs
|
|
33144
|
-
}), yt =
|
|
33170
|
+
}), yt = nt({
|
|
33145
33171
|
mutationFn: ({ id: E, on: me }) => p.request(qn(`/saved-views/${E}`, { is_default: me })),
|
|
33146
33172
|
onSuccess: hs
|
|
33147
|
-
}), Ft =
|
|
33173
|
+
}), Ft = nt({
|
|
33148
33174
|
mutationFn: () => {
|
|
33149
33175
|
const E = wr.find((me) => me.is_default);
|
|
33150
33176
|
return E ? p.request(qn(`/saved-views/${E.id}`, { ...xs(), is_default: !0 })) : p.request(
|
|
@@ -33154,10 +33180,10 @@ function k4({
|
|
|
33154
33180
|
onSuccess: () => {
|
|
33155
33181
|
et(!1), hs();
|
|
33156
33182
|
}
|
|
33157
|
-
}), Jt =
|
|
33183
|
+
}), Jt = nt({
|
|
33158
33184
|
mutationFn: (E) => p.request(An(`/items/${t}/${E}`)),
|
|
33159
33185
|
onSuccess: () => void f.invalidateQueries({ queryKey: ["cbv-items", t] })
|
|
33160
|
-
}), yn =
|
|
33186
|
+
}), yn = nt({
|
|
33161
33187
|
mutationFn: (E) => p.request(An(`/saved-views/${E}`)),
|
|
33162
33188
|
onSuccess: (E, me) => {
|
|
33163
33189
|
mt === me && bs(), hs();
|
|
@@ -33166,7 +33192,7 @@ function k4({
|
|
|
33166
33192
|
queryKey: ["cbv-view-subs"],
|
|
33167
33193
|
queryFn: () => p.request(le("/view-subscriptions")).then((E) => E.data ?? []).catch(() => []),
|
|
33168
33194
|
staleTime: 6e4
|
|
33169
|
-
}), Hr = (E) => Vn.find((me) => me.view_id === E), Yr =
|
|
33195
|
+
}), Hr = (E) => Vn.find((me) => me.view_id === E), Yr = nt({
|
|
33170
33196
|
mutationFn: async (E) => {
|
|
33171
33197
|
const me = Hr(E);
|
|
33172
33198
|
return me ? p.request(An(`/view-subscriptions/${me.id}`)) : p.request(He("/view-subscriptions", { view_id: E, digest: "daily" }));
|
|
@@ -33534,7 +33560,7 @@ function k4({
|
|
|
33534
33560
|
]
|
|
33535
33561
|
}
|
|
33536
33562
|
),
|
|
33537
|
-
ht.row.id != null && /* @__PURE__ */ r(
|
|
33563
|
+
ht.row.id != null && /* @__PURE__ */ r(tt, { children: [
|
|
33538
33564
|
/* @__PURE__ */ e("div", { className: "my-1 border-t border-slate-100 dark:border-slate-700" }),
|
|
33539
33565
|
[
|
|
33540
33566
|
{
|
|
@@ -34328,7 +34354,7 @@ ${qe}`).then(() => {
|
|
|
34328
34354
|
E.is_default && /* @__PURE__ */ e("span", { title: "Collection default view", className: "text-[#00a5cc]", children: "★" }),
|
|
34329
34355
|
E.is_shared && !E.is_default && /* @__PURE__ */ e("span", { title: "Shared", children: "⚭" }),
|
|
34330
34356
|
/* @__PURE__ */ e("button", { type: "button", onClick: () => Va(E), children: E.name }),
|
|
34331
|
-
mt === E.id && /* @__PURE__ */ r(
|
|
34357
|
+
mt === E.id && /* @__PURE__ */ r(tt, { children: [
|
|
34332
34358
|
/* @__PURE__ */ e(
|
|
34333
34359
|
"button",
|
|
34334
34360
|
{
|
|
@@ -34410,7 +34436,7 @@ ${qe}`).then(() => {
|
|
|
34410
34436
|
}
|
|
34411
34437
|
) }) : null,
|
|
34412
34438
|
/* @__PURE__ */ e("div", { className: va && ts ? "hidden" : "flex min-h-0 flex-1 flex-col p-4 pt-3", children: /* @__PURE__ */ r("div", { className: "relative flex min-h-0 flex-1 flex-col overflow-hidden rounded-lg border border-slate-200 bg-white dark:border-slate-700 dark:bg-slate-900", children: [
|
|
34413
|
-
wa && !tl && /* @__PURE__ */ r(
|
|
34439
|
+
wa && !tl && /* @__PURE__ */ r(tt, { children: [
|
|
34414
34440
|
/* @__PURE__ */ e("div", { className: "cbv-progress pointer-events-none absolute inset-x-0 top-0 z-[6] h-[3px] overflow-hidden" }),
|
|
34415
34441
|
/* @__PURE__ */ e("div", { className: "cbv-overlay pointer-events-none absolute inset-0 z-[5] flex items-start justify-center bg-white/40 pt-24 dark:bg-slate-950/35", children: /* @__PURE__ */ r("span", { className: "flex items-center gap-2 rounded-full border border-slate-200 bg-white px-3 py-1.5 text-[12px] font-medium text-slate-600 shadow-lg dark:border-slate-700 dark:bg-slate-900 dark:text-slate-300", children: [
|
|
34416
34442
|
/* @__PURE__ */ e(gu, { "aria-hidden": !0, className: "h-3.5 w-3.5 animate-spin text-[#00a5cc]" }),
|
|
@@ -35210,7 +35236,7 @@ function c5({ token: t, url: n, mine: a }) {
|
|
|
35210
35236
|
}
|
|
35211
35237
|
function u5({ text: t, mine: n }) {
|
|
35212
35238
|
const a = Ea(), s = Xs(), l = ke(() => Jv(t, a.entityPattern), [t, a.entityPattern]);
|
|
35213
|
-
return /* @__PURE__ */ e(
|
|
35239
|
+
return /* @__PURE__ */ e(tt, { children: l.map((i, d) => {
|
|
35214
35240
|
if (i.entity) {
|
|
35215
35241
|
const o = a.entityUrl(i.entity);
|
|
35216
35242
|
return /* @__PURE__ */ e(c5, { token: i.text, url: o, mine: n }, d);
|
|
@@ -35378,10 +35404,10 @@ function h5({
|
|
|
35378
35404
|
queryKey: ["chat-saved"],
|
|
35379
35405
|
queryFn: () => u.request(le("/chat/saved")).then((Oe) => Oe.data ?? []).catch(() => []),
|
|
35380
35406
|
staleTime: 6e4
|
|
35381
|
-
}), A = ke(() => new Set(_.map((Oe) => Oe.id)), [_]), $ =
|
|
35407
|
+
}), A = ke(() => new Set(_.map((Oe) => Oe.id)), [_]), $ = nt({
|
|
35382
35408
|
mutationFn: (Oe) => u.request(He(`/chat/messages/${Oe}/save`, {})),
|
|
35383
35409
|
onSuccess: () => void P.invalidateQueries({ queryKey: ["chat-saved"] })
|
|
35384
|
-
}), [B, R] = S(null), O =
|
|
35410
|
+
}), [B, R] = S(null), O = nt({
|
|
35385
35411
|
mutationFn: () => u.request(
|
|
35386
35412
|
He("/chat/rooms/summary", { room: t })
|
|
35387
35413
|
).then((Oe) => Oe.data),
|
|
@@ -35390,7 +35416,7 @@ function h5({
|
|
|
35390
35416
|
}), P = Mt(), M = P.getQueryData([
|
|
35391
35417
|
"nvr-chat-room-card",
|
|
35392
35418
|
t
|
|
35393
|
-
]), q =
|
|
35419
|
+
]), q = nt({
|
|
35394
35420
|
mutationFn: async (Oe) => {
|
|
35395
35421
|
if (!M || !c) throw new Error("no record");
|
|
35396
35422
|
await u.request(
|
|
@@ -35710,7 +35736,7 @@ function h5({
|
|
|
35710
35736
|
] }, Oe.pin_id)) })
|
|
35711
35737
|
] }),
|
|
35712
35738
|
/* @__PURE__ */ r("div", { className: "min-h-0 flex-1 space-y-2.5 overflow-y-auto px-3 py-3", "data-chat-messages": !0, children: [
|
|
35713
|
-
p ? /* @__PURE__ */ e("p", { className: "py-6 text-center text-[12px] text-slate-400", children: "Loading…" }) : Ct.length === 0 ? /* @__PURE__ */ e("div", { className: "py-6 text-center text-[12px] text-slate-400", children: tn ? "No messages match." : /* @__PURE__ */ r(
|
|
35739
|
+
p ? /* @__PURE__ */ e("p", { className: "py-6 text-center text-[12px] text-slate-400", children: "Loading…" }) : Ct.length === 0 ? /* @__PURE__ */ e("div", { className: "py-6 text-center text-[12px] text-slate-400", children: tn ? "No messages match." : /* @__PURE__ */ r(tt, { children: [
|
|
35714
35740
|
/* @__PURE__ */ e("p", { children: "No messages yet — say hello." }),
|
|
35715
35741
|
/* @__PURE__ */ r("p", { className: "mt-1 text-[11px]", children: [
|
|
35716
35742
|
"Tip: @ mentions someone",
|
|
@@ -35808,7 +35834,7 @@ function h5({
|
|
|
35808
35834
|
children: /* @__PURE__ */ e(wh, { className: "h-3 w-3" })
|
|
35809
35835
|
}
|
|
35810
35836
|
),
|
|
35811
|
-
Ye && /* @__PURE__ */ r(
|
|
35837
|
+
Ye && /* @__PURE__ */ r(tt, { children: [
|
|
35812
35838
|
/* @__PURE__ */ e(
|
|
35813
35839
|
"button",
|
|
35814
35840
|
{
|
|
@@ -36148,7 +36174,7 @@ function x5({
|
|
|
36148
36174
|
] })
|
|
36149
36175
|
] }),
|
|
36150
36176
|
/* @__PURE__ */ r("div", { className: "min-h-0 flex-1 space-y-4 overflow-y-auto p-3", children: [
|
|
36151
|
-
A ? /* @__PURE__ */ r(
|
|
36177
|
+
A ? /* @__PURE__ */ r(tt, { children: [
|
|
36152
36178
|
/* @__PURE__ */ r("label", { className: "block", children: [
|
|
36153
36179
|
/* @__PURE__ */ e("span", { className: "mb-1 block text-[11px] font-medium text-slate-400", children: "Name" }),
|
|
36154
36180
|
/* @__PURE__ */ e(
|
|
@@ -36607,7 +36633,7 @@ function y5({
|
|
|
36607
36633
|
] });
|
|
36608
36634
|
}
|
|
36609
36635
|
function v5({ myStatus: t }) {
|
|
36610
|
-
const n = Xs(), a = Ee(), s = Mt(), [l, i] = S(!1), [d, o] = S(""), [u, c] = S(""), [m, p] = S("60"), f = ["📅", "🍽️", "🏠", "✈️", "🤒", "🎯", "☕"], b =
|
|
36636
|
+
const n = Xs(), a = Ee(), s = Mt(), [l, i] = S(!1), [d, o] = S(""), [u, c] = S(""), [m, p] = S("60"), f = ["📅", "🍽️", "🏠", "✈️", "🤒", "🎯", "☕"], b = nt({
|
|
36611
36637
|
mutationFn: (k) => a.request(qn("/users/me/preferences", { custom_status: k })),
|
|
36612
36638
|
onSuccess: () => {
|
|
36613
36639
|
i(!1), s.invalidateQueries({ queryKey: ["presence-online"] });
|
|
@@ -37375,7 +37401,7 @@ function Wm({
|
|
|
37375
37401
|
className: "[&_button]:!border-amber-400 [&_input]:!border-amber-400 dark:[&_button]:!border-amber-500/60 dark:[&_input]:!border-amber-500/60",
|
|
37376
37402
|
children: c
|
|
37377
37403
|
}
|
|
37378
|
-
) : /* @__PURE__ */ e(
|
|
37404
|
+
) : /* @__PURE__ */ e(tt, { children: c });
|
|
37379
37405
|
}
|
|
37380
37406
|
function Qm(t) {
|
|
37381
37407
|
return t.placeholder.replace(/^Search\s+/i, "").replace(/[…]|\.{3}$/g, "");
|
|
@@ -37544,7 +37570,7 @@ function Ep({
|
|
|
37544
37570
|
je
|
|
37545
37571
|
);
|
|
37546
37572
|
};
|
|
37547
|
-
return /* @__PURE__ */ r(
|
|
37573
|
+
return /* @__PURE__ */ r(tt, { children: [
|
|
37548
37574
|
/* @__PURE__ */ e(ib, {}),
|
|
37549
37575
|
o && u && /* @__PURE__ */ e("div", { className: "mb-4 rounded-md border border-red-200 bg-red-50 px-4 py-2.5 text-[13px] text-red-700", children: u }),
|
|
37550
37576
|
/* @__PURE__ */ r(
|
|
@@ -37586,7 +37612,7 @@ function Ep({
|
|
|
37586
37612
|
className: W("h-4 rounded", _e.className ? void 0 : "flex-1")
|
|
37587
37613
|
},
|
|
37588
37614
|
_e.key
|
|
37589
|
-
)) }, te)) }) : /* @__PURE__ */ r(
|
|
37615
|
+
)) }, te)) }) : /* @__PURE__ */ r(tt, { children: [
|
|
37590
37616
|
/* @__PURE__ */ e(
|
|
37591
37617
|
"div",
|
|
37592
37618
|
{
|
|
@@ -38148,13 +38174,13 @@ function R5({
|
|
|
38148
38174
|
[k]
|
|
38149
38175
|
), x = u === "all" ? k : k.filter(($) => $.status === u), F = x.slice((m - 1) * Gu, m * Gu);
|
|
38150
38176
|
De(() => p(1), [u]);
|
|
38151
|
-
const v =
|
|
38177
|
+
const v = nt({
|
|
38152
38178
|
mutationFn: ($) => a.request(An(`/imports/${$}`)),
|
|
38153
38179
|
onSuccess: () => {
|
|
38154
38180
|
b(null), s.invalidateQueries({ queryKey: ["collection-import-jobs"] });
|
|
38155
38181
|
},
|
|
38156
38182
|
onError: ($) => b($.message)
|
|
38157
|
-
}), C =
|
|
38183
|
+
}), C = nt({
|
|
38158
38184
|
mutationFn: ($) => a.request(He(`/imports/${$}/rollback`, {})),
|
|
38159
38185
|
onSuccess: () => {
|
|
38160
38186
|
b(null), s.invalidateQueries({ queryKey: ["collection-import-jobs"] });
|
|
@@ -38465,7 +38491,7 @@ function O5({
|
|
|
38465
38491
|
),
|
|
38466
38492
|
enabled: !!g,
|
|
38467
38493
|
staleTime: 6e4
|
|
38468
|
-
}).data) == null ? void 0 : Z.data) == null ? void 0 : H.fields) ?? []).filter((X) => !X.hidden).map((X) => X.field), ne =
|
|
38494
|
+
}).data) == null ? void 0 : Z.data) == null ? void 0 : H.fields) ?? []).filter((X) => !X.hidden).map((X) => X.field), ne = nt({
|
|
38469
38495
|
mutationFn: (X) => a.request(
|
|
38470
38496
|
He("/imports/from-url", {
|
|
38471
38497
|
url: X,
|
|
@@ -38476,7 +38502,7 @@ function O5({
|
|
|
38476
38502
|
$(null), o(X.data.csv_data), p(X.data.file_name);
|
|
38477
38503
|
},
|
|
38478
38504
|
onError: (X) => $(X.message)
|
|
38479
|
-
}), oe =
|
|
38505
|
+
}), oe = nt({
|
|
38480
38506
|
mutationFn: () => a.request(
|
|
38481
38507
|
He("/ai/map-columns", {
|
|
38482
38508
|
collection: g,
|
|
@@ -38494,7 +38520,7 @@ function O5({
|
|
|
38494
38520
|
onError: (X) => $(
|
|
38495
38521
|
X.status === 503 ? "AI mapping needs an Anthropic API key — add one in Settings, or map the columns by hand." : X.message
|
|
38496
38522
|
)
|
|
38497
|
-
}), G =
|
|
38523
|
+
}), G = nt({
|
|
38498
38524
|
mutationFn: () => a.request(
|
|
38499
38525
|
He("/imports", {
|
|
38500
38526
|
collection: g,
|
|
@@ -38963,7 +38989,7 @@ val1,val2,val3`,
|
|
|
38963
38989
|
l < Xu.length - 1 ? /* @__PURE__ */ r(vt, { size: "sm", disabled: !Se, onClick: () => i((X) => X + 1), children: [
|
|
38964
38990
|
"Next ",
|
|
38965
38991
|
/* @__PURE__ */ e(Ia, { className: "h-3.5 w-3.5" })
|
|
38966
|
-
] }) : /* @__PURE__ */ e(vt, { size: "sm", disabled: G.isPending, onClick: () => G.mutate(), children: G.isPending ? /* @__PURE__ */ r(
|
|
38992
|
+
] }) : /* @__PURE__ */ e(vt, { size: "sm", disabled: G.isPending, onClick: () => G.mutate(), children: G.isPending ? /* @__PURE__ */ r(tt, { children: [
|
|
38967
38993
|
/* @__PURE__ */ e(Ut, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
38968
38994
|
" Starting…"
|
|
38969
38995
|
] }) : "Start import" })
|
|
@@ -39136,7 +39162,7 @@ function E5({
|
|
|
39136
39162
|
le(`/imports/${t}/failed-rows`)
|
|
39137
39163
|
).then((p) => p.data ?? []),
|
|
39138
39164
|
staleTime: 3e4
|
|
39139
|
-
}), u = o ?? [], c = u[0] ? Object.keys(u[0].values) : [], m =
|
|
39165
|
+
}), u = o ?? [], c = u[0] ? Object.keys(u[0].values) : [], m = nt({
|
|
39140
39166
|
mutationFn: ({ row: p, values: f }) => a.request(He(`/imports/${t}/repair-row`, { values: f })).then(() => p),
|
|
39141
39167
|
onSuccess: (p) => d((f) => ({ ...f, [p]: "ok" })),
|
|
39142
39168
|
onError: (p, f) => d((b) => ({ ...b, [f.row]: p.message }))
|
|
@@ -39710,7 +39736,7 @@ function I5({
|
|
|
39710
39736
|
] });
|
|
39711
39737
|
}
|
|
39712
39738
|
function z5({ children: t }) {
|
|
39713
|
-
return /* @__PURE__ */ e(
|
|
39739
|
+
return /* @__PURE__ */ e(tt, { children: t });
|
|
39714
39740
|
}
|
|
39715
39741
|
function Vm({
|
|
39716
39742
|
collection: t,
|
|
@@ -40360,7 +40386,7 @@ function Y5({
|
|
|
40360
40386
|
return A ? t.filter(
|
|
40361
40387
|
($) => [$.key, $.label, $.staging_table, $.procedure].filter(Boolean).some((B) => String(B).toLowerCase().includes(A))
|
|
40362
40388
|
) : t;
|
|
40363
|
-
}, [t, o]), k =
|
|
40389
|
+
}, [t, o]), k = nt({
|
|
40364
40390
|
mutationFn: async () => {
|
|
40365
40391
|
const A = {
|
|
40366
40392
|
label: c.label.trim() || null,
|
|
@@ -40466,7 +40492,7 @@ function Y5({
|
|
|
40466
40492
|
/* @__PURE__ */ e("h3", { className: "truncate text-[15px] font-semibold text-slate-900 dark:text-foreground", children: i === Es ? "New import definition" : wo(b) }),
|
|
40467
40493
|
b && /* @__PURE__ */ r("p", { className: "mt-0.5 font-mono text-[11px] text-slate-400", children: [
|
|
40468
40494
|
b.staging_table || `staging_${b.key}`,
|
|
40469
|
-
b.procedure && /* @__PURE__ */ r(
|
|
40495
|
+
b.procedure && /* @__PURE__ */ r(tt, { children: [
|
|
40470
40496
|
" ",
|
|
40471
40497
|
/* @__PURE__ */ e(Ia, { className: "inline h-3 w-3 -translate-y-px" }),
|
|
40472
40498
|
" ",
|
|
@@ -40619,7 +40645,7 @@ function Y5({
|
|
|
40619
40645
|
}
|
|
40620
40646
|
),
|
|
40621
40647
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-3", children: [
|
|
40622
|
-
/* @__PURE__ */ e(vt, { size: "sm", disabled: !_ || k.isPending, onClick: () => k.mutate(), children: k.isPending ? /* @__PURE__ */ r(
|
|
40648
|
+
/* @__PURE__ */ e(vt, { size: "sm", disabled: !_ || k.isPending, onClick: () => k.mutate(), children: k.isPending ? /* @__PURE__ */ r(tt, { children: [
|
|
40623
40649
|
/* @__PURE__ */ e(Ut, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
40624
40650
|
" Saving…"
|
|
40625
40651
|
] }) : i === Es ? "Create definition" : "Save changes" }),
|
|
@@ -40637,7 +40663,7 @@ function G5({
|
|
|
40637
40663
|
stagingColsProblem: s,
|
|
40638
40664
|
validationProblem: l
|
|
40639
40665
|
}) {
|
|
40640
|
-
const i = Ee(), d = Mt(), [o, u] = S(!!(t.procedure_body || t.validation || t.staging_columns)), [c, m] = S(null), p =
|
|
40666
|
+
const i = Ee(), d = Mt(), [o, u] = S(!!(t.procedure_body || t.validation || t.staging_columns)), [c, m] = S(null), p = nt({
|
|
40641
40667
|
mutationFn: () => i.request(
|
|
40642
40668
|
He(`/staged-imports/definitions/${t.id}/suggest-validation`, {})
|
|
40643
40669
|
),
|
|
@@ -40647,7 +40673,7 @@ function G5({
|
|
|
40647
40673
|
x && (a((v) => ({ ...v, validation: JSON.stringify(x, null, 2) })), m("Suggestion loaded from the live procedure — review, adjust, then Save."));
|
|
40648
40674
|
},
|
|
40649
40675
|
onError: (h) => m(h.message)
|
|
40650
|
-
}), f =
|
|
40676
|
+
}), f = nt({
|
|
40651
40677
|
mutationFn: () => i.request(
|
|
40652
40678
|
le(`/staged-imports/definitions/${t.id}/procedure`)
|
|
40653
40679
|
),
|
|
@@ -40657,7 +40683,7 @@ function G5({
|
|
|
40657
40683
|
x ? (a((v) => ({ ...v, procedure_body: x })), m("Live procedure body loaded — Save to take ownership, Deploy to push edits back.")) : m("The procedure does not exist in the database yet.");
|
|
40658
40684
|
},
|
|
40659
40685
|
onError: (h) => m(h.message)
|
|
40660
|
-
}), b =
|
|
40686
|
+
}), b = nt({
|
|
40661
40687
|
mutationFn: () => i.request(He(`/staged-imports/definitions/${t.id}/deploy`, {})),
|
|
40662
40688
|
onSuccess: () => {
|
|
40663
40689
|
m("Deployed."), d.invalidateQueries({ queryKey: ["staged-import-definitions"] });
|
|
@@ -40670,7 +40696,7 @@ function G5({
|
|
|
40670
40696
|
).then((h) => h.data ?? []),
|
|
40671
40697
|
enabled: o,
|
|
40672
40698
|
staleTime: 15e3
|
|
40673
|
-
}), k =
|
|
40699
|
+
}), k = nt({
|
|
40674
40700
|
mutationFn: (h) => i.request(
|
|
40675
40701
|
He(`/staged-imports/definitions/${t.id}/versions/${h}/restore`, {})
|
|
40676
40702
|
),
|
|
@@ -40856,7 +40882,7 @@ function Z5({ def: t }) {
|
|
|
40856
40882
|
const n = t.staging_table || `staging_${t.key}`;
|
|
40857
40883
|
return /* @__PURE__ */ r("span", { className: "flex min-w-0 items-center gap-1.5 font-mono text-[11px] text-slate-500 dark:text-muted-foreground", children: [
|
|
40858
40884
|
/* @__PURE__ */ e("span", { className: "truncate", children: n }),
|
|
40859
|
-
t.procedure ? /* @__PURE__ */ r(
|
|
40885
|
+
t.procedure ? /* @__PURE__ */ r(tt, { children: [
|
|
40860
40886
|
/* @__PURE__ */ e(Ia, { className: "h-3 w-3 shrink-0 text-slate-300 dark:text-slate-600" }),
|
|
40861
40887
|
/* @__PURE__ */ e("span", { className: "truncate", children: t.procedure })
|
|
40862
40888
|
] }) : /* @__PURE__ */ e("span", { className: "shrink-0 font-sans text-slate-400", children: "· load only" })
|
|
@@ -40904,13 +40930,13 @@ function e2({
|
|
|
40904
40930
|
if (o.trim()) return { frequent: [], rest: j };
|
|
40905
40931
|
const T = [...v].filter((I) => (s[I.key] ?? 0) > 0).sort((I, D) => (s[D.key] ?? 0) - (s[I.key] ?? 0)).slice(0, 5), N = new Set(T.map((I) => I.key));
|
|
40906
40932
|
return { frequent: T, rest: j.filter((I) => !N.has(I.key)) };
|
|
40907
|
-
}, [v, s, o]), w =
|
|
40933
|
+
}, [v, s, o]), w = nt({
|
|
40908
40934
|
mutationFn: async ({ f: j, key: T }) => {
|
|
40909
40935
|
const N = new FormData();
|
|
40910
40936
|
return N.append("import_key", T), N.append("file", j, j.name), i("/staged-imports/preview", N);
|
|
40911
40937
|
},
|
|
40912
40938
|
onError: (j) => x(j.message)
|
|
40913
|
-
}), _ =
|
|
40939
|
+
}), _ = nt({
|
|
40914
40940
|
mutationFn: async () => {
|
|
40915
40941
|
const j = new FormData();
|
|
40916
40942
|
return j.append("import_key", c ?? ""), j.append("sort", b || "0"), j.append("file", p, p.name), i("/staged-imports", j);
|
|
@@ -40965,8 +40991,8 @@ function e2({
|
|
|
40965
40991
|
"No import matches “",
|
|
40966
40992
|
o,
|
|
40967
40993
|
"”."
|
|
40968
|
-
] }) : /* @__PURE__ */ r(
|
|
40969
|
-
C.frequent.length > 0 && /* @__PURE__ */ r(
|
|
40994
|
+
] }) : /* @__PURE__ */ r(tt, { children: [
|
|
40995
|
+
C.frequent.length > 0 && /* @__PURE__ */ r(tt, { children: [
|
|
40970
40996
|
/* @__PURE__ */ e("p", { className: "border-b border-slate-100 bg-slate-50/80 px-3 py-1 text-[10px] font-semibold uppercase tracking-wide text-slate-400 dark:border-border/60 dark:bg-muted/30 dark:text-muted-foreground", children: "Frequently used" }),
|
|
40971
40997
|
C.frequent.map((j) => /* @__PURE__ */ e(
|
|
40972
40998
|
Mf,
|
|
@@ -41166,7 +41192,7 @@ function e2({
|
|
|
41166
41192
|
),
|
|
41167
41193
|
/* @__PURE__ */ e("span", { className: "text-[11px] text-slate-400", children: "lower runs first" })
|
|
41168
41194
|
] }),
|
|
41169
|
-
F && /* @__PURE__ */ e("p", { className: "min-w-0 text-[11.5px] text-slate-500 dark:text-muted-foreground", children: F.procedure ? /* @__PURE__ */ r(
|
|
41195
|
+
F && /* @__PURE__ */ e("p", { className: "min-w-0 text-[11.5px] text-slate-500 dark:text-muted-foreground", children: F.procedure ? /* @__PURE__ */ r(tt, { children: [
|
|
41170
41196
|
"Will load into",
|
|
41171
41197
|
" ",
|
|
41172
41198
|
/* @__PURE__ */ e("span", { className: "font-mono text-slate-700 dark:text-foreground", children: F.staging_table || `staging_${F.key}` }),
|
|
@@ -41174,7 +41200,7 @@ function e2({
|
|
|
41174
41200
|
" ",
|
|
41175
41201
|
/* @__PURE__ */ e("span", { className: "font-mono text-slate-700 dark:text-foreground", children: F.procedure }),
|
|
41176
41202
|
"."
|
|
41177
|
-
] }) : /* @__PURE__ */ r(
|
|
41203
|
+
] }) : /* @__PURE__ */ r(tt, { children: [
|
|
41178
41204
|
"Will load into",
|
|
41179
41205
|
" ",
|
|
41180
41206
|
/* @__PURE__ */ e("span", { className: "font-mono text-slate-700 dark:text-foreground", children: F.staging_table || `staging_${F.key}` }),
|
|
@@ -41189,7 +41215,7 @@ function e2({
|
|
|
41189
41215
|
size: "sm",
|
|
41190
41216
|
disabled: !F || !p || _.isPending || w.isPending || (((q = (M = w.data) == null ? void 0 : M.validation) == null ? void 0 : q.errors.length) ?? 0) > 0,
|
|
41191
41217
|
onClick: () => _.mutate(),
|
|
41192
|
-
children: _.isPending ? /* @__PURE__ */ r(
|
|
41218
|
+
children: _.isPending ? /* @__PURE__ */ r(tt, { children: [
|
|
41193
41219
|
/* @__PURE__ */ e(Ut, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
41194
41220
|
" Queueing…"
|
|
41195
41221
|
] }) : "Queue import"
|
|
@@ -41375,13 +41401,13 @@ function S4({
|
|
|
41375
41401
|
})), ne.current();
|
|
41376
41402
|
});
|
|
41377
41403
|
}, [t]);
|
|
41378
|
-
const oe = (N == null ? void 0 : N.by_status) ?? {}, G = (N == null ? void 0 : N.active) ?? [], xe = G.find((te) => te.status === "running") ?? G[0], se = G.filter((te) => te.id !== (xe == null ? void 0 : xe.id)).length, ge = (N == null ? void 0 : N.by_key) ?? {}, ye =
|
|
41404
|
+
const oe = (N == null ? void 0 : N.by_status) ?? {}, G = (N == null ? void 0 : N.active) ?? [], xe = G.find((te) => te.status === "running") ?? G[0], se = G.filter((te) => te.id !== (xe == null ? void 0 : xe.id)).length, ge = (N == null ? void 0 : N.by_key) ?? {}, ye = nt({
|
|
41379
41405
|
mutationFn: (te) => l.request(He(`/staged-imports/${te}/requeue`)),
|
|
41380
41406
|
onSuccess: () => {
|
|
41381
41407
|
R(null), Q();
|
|
41382
41408
|
},
|
|
41383
41409
|
onError: (te) => R(te.message)
|
|
41384
|
-
}), Ae =
|
|
41410
|
+
}), Ae = nt({
|
|
41385
41411
|
mutationFn: (te) => l.request(He(`/staged-imports/${te}/cancel`)),
|
|
41386
41412
|
onSuccess: () => {
|
|
41387
41413
|
R(null), Q();
|
|
@@ -41561,7 +41587,7 @@ function S4({
|
|
|
41561
41587
|
runCounts: ge,
|
|
41562
41588
|
isLoading: q.isLoading
|
|
41563
41589
|
}
|
|
41564
|
-
) : /* @__PURE__ */ r(
|
|
41590
|
+
) : /* @__PURE__ */ r(tt, { children: [
|
|
41565
41591
|
xe && /* @__PURE__ */ e(
|
|
41566
41592
|
a2,
|
|
41567
41593
|
{
|
|
@@ -41784,7 +41810,7 @@ function s2({
|
|
|
41784
41810
|
/* @__PURE__ */ r("div", { className: "rounded-md border border-slate-200 bg-slate-50 px-3 py-2.5 dark:border-border dark:bg-muted/30", children: [
|
|
41785
41811
|
/* @__PURE__ */ r("p", { className: "flex flex-wrap items-center gap-1.5 font-mono text-[12px] text-slate-800 dark:text-foreground", children: [
|
|
41786
41812
|
/* @__PURE__ */ e("span", { children: c.staging_table || `staging_${c.import_key}` }),
|
|
41787
|
-
c.procedure ? /* @__PURE__ */ r(
|
|
41813
|
+
c.procedure ? /* @__PURE__ */ r(tt, { children: [
|
|
41788
41814
|
/* @__PURE__ */ e(Ia, { className: "h-3.5 w-3.5 text-slate-400" }),
|
|
41789
41815
|
/* @__PURE__ */ e("span", { children: c.procedure })
|
|
41790
41816
|
] }) : /* @__PURE__ */ e("span", { className: "font-sans text-[11.5px] text-slate-500", children: "· load only, no procedure" })
|
|
@@ -42139,7 +42165,7 @@ function o2({
|
|
|
42139
42165
|
] });
|
|
42140
42166
|
}
|
|
42141
42167
|
function d2({ header: t, children: n }) {
|
|
42142
|
-
return /* @__PURE__ */ r(
|
|
42168
|
+
return /* @__PURE__ */ r(tt, { children: [
|
|
42143
42169
|
t,
|
|
42144
42170
|
n
|
|
42145
42171
|
] });
|
|
@@ -42625,7 +42651,7 @@ function qx({
|
|
|
42625
42651
|
]
|
|
42626
42652
|
}
|
|
42627
42653
|
) : null,
|
|
42628
|
-
children: !H && /* @__PURE__ */ r(
|
|
42654
|
+
children: !H && /* @__PURE__ */ r(tt, { children: [
|
|
42629
42655
|
t.option_section ? T.map((Ge) => {
|
|
42630
42656
|
const St = `s:${Z.id}|${Ge.name}`, ot = b.has(St), kt = Ge.rows.reduce(
|
|
42631
42657
|
(sn, at) => {
|
|
@@ -42696,7 +42722,7 @@ function Pf({
|
|
|
42696
42722
|
header: t,
|
|
42697
42723
|
children: n
|
|
42698
42724
|
}) {
|
|
42699
|
-
return /* @__PURE__ */ r(
|
|
42725
|
+
return /* @__PURE__ */ r(tt, { children: [
|
|
42700
42726
|
t,
|
|
42701
42727
|
n
|
|
42702
42728
|
] });
|
|
@@ -42722,7 +42748,7 @@ function mc({
|
|
|
42722
42748
|
l(b >= 1 ? t : Math.round(c + m * g)), b < 1 && (d.current = requestAnimationFrame(p));
|
|
42723
42749
|
};
|
|
42724
42750
|
return cancelAnimationFrame(d.current), d.current = requestAnimationFrame(p), () => cancelAnimationFrame(d.current);
|
|
42725
|
-
}, [t, a]), /* @__PURE__ */ e(
|
|
42751
|
+
}, [t, a]), /* @__PURE__ */ e(tt, { children: n ? n(s) : s.toLocaleString() });
|
|
42726
42752
|
}
|
|
42727
42753
|
const c2 = /* @__PURE__ */ new Set([
|
|
42728
42754
|
"nivaro_metric_alert_log",
|
|
@@ -42826,7 +42852,7 @@ function C4({
|
|
|
42826
42852
|
v - m.current < 3e4 || (m.current = v, c(!0));
|
|
42827
42853
|
});
|
|
42828
42854
|
}, [o, k]);
|
|
42829
|
-
const y =
|
|
42855
|
+
const y = nt({
|
|
42830
42856
|
mutationFn: (v) => fetch(`${a}/tasks/${v}`, {
|
|
42831
42857
|
method: "PATCH",
|
|
42832
42858
|
headers: { ...s, "content-type": "application/json" },
|
|
@@ -42834,7 +42860,7 @@ function C4({
|
|
|
42834
42860
|
body: JSON.stringify({ status: "done" })
|
|
42835
42861
|
}),
|
|
42836
42862
|
onSuccess: () => d.invalidateQueries({ queryKey: ["my-work"] })
|
|
42837
|
-
}), h =
|
|
42863
|
+
}), h = nt({
|
|
42838
42864
|
mutationFn: (v) => fetch(`${a}/notifications/mark-read`, {
|
|
42839
42865
|
method: "POST",
|
|
42840
42866
|
headers: { ...s, "content-type": "application/json" },
|
|
@@ -43147,13 +43173,13 @@ function y2() {
|
|
|
43147
43173
|
queryFn: () => t.request(le("/users/me/notification-history", { limit: 200 })).then((N) => N.data),
|
|
43148
43174
|
enabled: a === "history",
|
|
43149
43175
|
staleTime: 6e4
|
|
43150
|
-
}), x = () => void n.invalidateQueries({ queryKey: ["me-notification-sources"] }), F =
|
|
43176
|
+
}), x = () => void n.invalidateQueries({ queryKey: ["me-notification-sources"] }), F = nt({
|
|
43151
43177
|
mutationFn: (N) => t.request(An(N)),
|
|
43152
43178
|
onSuccess: x
|
|
43153
|
-
}), v =
|
|
43179
|
+
}), v = nt({
|
|
43154
43180
|
mutationFn: ({ path: N, body: I }) => t.request(qn(N, I)),
|
|
43155
43181
|
onSuccess: x
|
|
43156
|
-
}), C =
|
|
43182
|
+
}), C = nt({
|
|
43157
43183
|
mutationFn: ({ reportId: N, body: I }) => t.request(Bc(`/report-studio/${N}/subscription`, I)),
|
|
43158
43184
|
onSuccess: x
|
|
43159
43185
|
});
|
|
@@ -43219,7 +43245,7 @@ function y2() {
|
|
|
43219
43245
|
N.key
|
|
43220
43246
|
)) })
|
|
43221
43247
|
] }),
|
|
43222
|
-
a === "sources" && /* @__PURE__ */ r(
|
|
43248
|
+
a === "sources" && /* @__PURE__ */ r(tt, { children: [
|
|
43223
43249
|
y.some((N) => N.unread >= 25) && /* @__PURE__ */ r("div", { className: "mb-3 space-y-1.5 rounded-md border border-amber-200 bg-amber-50 px-3 py-2 dark:border-amber-500/30 dark:bg-amber-400/10", children: [
|
|
43224
43250
|
/* @__PURE__ */ e("p", { className: "text-[11.5px] font-medium text-amber-800 dark:text-amber-300", children: "Unread piles — the important ones drown under these:" }),
|
|
43225
43251
|
y.filter((N) => N.unread >= 25).slice(0, 4).map((N) => /* @__PURE__ */ r("p", { className: "text-[11.5px] text-amber-700 dark:text-amber-200/90", children: [
|
|
@@ -44795,7 +44821,7 @@ function E2({
|
|
|
44795
44821
|
}) {
|
|
44796
44822
|
const s = Object.entries(t.params);
|
|
44797
44823
|
return Dr(
|
|
44798
|
-
/* @__PURE__ */ r(
|
|
44824
|
+
/* @__PURE__ */ r(tt, { children: [
|
|
44799
44825
|
/* @__PURE__ */ e(
|
|
44800
44826
|
"div",
|
|
44801
44827
|
{
|
|
@@ -44817,7 +44843,7 @@ function E2({
|
|
|
44817
44843
|
/* @__PURE__ */ e("dt", { className: "text-slate-500 dark:text-slate-400", children: Et(l) }),
|
|
44818
44844
|
/* @__PURE__ */ e("dd", { className: "ml-auto font-medium tabular-nums text-slate-800 dark:text-slate-100", children: String(i) })
|
|
44819
44845
|
] }, l)) }),
|
|
44820
|
-
t.phase === "confirm" && /* @__PURE__ */ r(
|
|
44846
|
+
t.phase === "confirm" && /* @__PURE__ */ r(tt, { children: [
|
|
44821
44847
|
/* @__PURE__ */ e("p", { className: "mt-2 text-[12.5px] text-slate-600 dark:text-slate-300", children: t.confirmText }),
|
|
44822
44848
|
/* @__PURE__ */ r("div", { className: "mt-3 flex gap-2", children: [
|
|
44823
44849
|
/* @__PURE__ */ e(
|
|
@@ -44845,7 +44871,7 @@ function E2({
|
|
|
44845
44871
|
"Running… ",
|
|
44846
44872
|
/* @__PURE__ */ e("span", { className: "tabular-nums", children: pc(t.elapsedMs) })
|
|
44847
44873
|
] }),
|
|
44848
|
-
t.phase === "done" && /* @__PURE__ */ r(
|
|
44874
|
+
t.phase === "done" && /* @__PURE__ */ r(tt, { children: [
|
|
44849
44875
|
/* @__PURE__ */ r("p", { className: "mt-2 text-[12.5px] font-medium text-emerald-600 dark:text-emerald-400", children: [
|
|
44850
44876
|
t.action.success_message ?? "Completed",
|
|
44851
44877
|
" · ",
|
|
@@ -44872,7 +44898,7 @@ function E2({
|
|
|
44872
44898
|
}
|
|
44873
44899
|
)
|
|
44874
44900
|
] }),
|
|
44875
|
-
t.phase === "error" && /* @__PURE__ */ r(
|
|
44901
|
+
t.phase === "error" && /* @__PURE__ */ r(tt, { children: [
|
|
44876
44902
|
/* @__PURE__ */ r("p", { className: "mt-2 text-[12.5px] font-medium text-red-600 dark:text-red-400", children: [
|
|
44877
44903
|
"Failed after ",
|
|
44878
44904
|
pc(t.elapsedMs),
|
|
@@ -44956,7 +44982,7 @@ function $4({ slug: t, hideHeader: n, className: a }) {
|
|
|
44956
44982
|
return (w = C.config) == null ? void 0 : w.full_height;
|
|
44957
44983
|
}), x = /* @__PURE__ */ r("div", { className: `flex h-full min-h-0 flex-col ${a ?? ""}`, children: [
|
|
44958
44984
|
!n && /* @__PURE__ */ e("div", { className: "shrink-0 pb-4", children: /* @__PURE__ */ e("h1", { className: "text-lg font-semibold text-slate-900 dark:text-slate-100", children: o.name }) }),
|
|
44959
|
-
/* @__PURE__ */ e("div", { className: `min-h-0 flex-1 overflow-y-auto ${h ? "flex flex-col" : ""}`, children: p.length === 0 ? /* @__PURE__ */ e("p", { className: "p-6 text-center text-[13px] text-slate-400", children: "This page has no widgets yet." }) : /* @__PURE__ */ r(
|
|
44985
|
+
/* @__PURE__ */ e("div", { className: `min-h-0 flex-1 overflow-y-auto ${h ? "flex flex-col" : ""}`, children: p.length === 0 ? /* @__PURE__ */ e("p", { className: "p-6 text-center text-[13px] text-slate-400", children: "This page has no widgets yet." }) : /* @__PURE__ */ r(tt, { children: [
|
|
44960
44986
|
g.map((C) => /* @__PURE__ */ e("div", { className: "mb-3 flex shrink-0 flex-wrap items-center gap-2", children: C.items.map((w) => /* @__PURE__ */ e(Bf, { slug: o.slug, widget: w }, w.id)) }, C.y)),
|
|
44961
44987
|
/* @__PURE__ */ e(
|
|
44962
44988
|
"div",
|
|
@@ -45145,10 +45171,10 @@ function U2() {
|
|
|
45145
45171
|
var x;
|
|
45146
45172
|
return ((x = h.data) == null ? void 0 : x.preferences) ?? {};
|
|
45147
45173
|
})
|
|
45148
|
-
}), s = (a == null ? void 0 : a.notification_prefs) ?? {}, [l, i] = S(null), [d, o] = S(null), u = l ?? s.quiet_start ?? "", c = d ?? s.quiet_end ?? "", m =
|
|
45174
|
+
}), s = (a == null ? void 0 : a.notification_prefs) ?? {}, [l, i] = S(null), [d, o] = S(null), u = l ?? s.quiet_start ?? "", c = d ?? s.quiet_end ?? "", m = nt({
|
|
45149
45175
|
mutationFn: (h) => t.request(qn("/users/me/preferences", { notification_prefs: h })),
|
|
45150
45176
|
onSuccess: () => void n.invalidateQueries({ queryKey: ["nvr-profile-prefs"] })
|
|
45151
|
-
}), p =
|
|
45177
|
+
}), p = nt({
|
|
45152
45178
|
mutationFn: (h) => t.request(qn("/users/me/preferences", h)),
|
|
45153
45179
|
onSuccess: () => void n.invalidateQueries({ queryKey: ["nvr-profile-prefs"] })
|
|
45154
45180
|
}), f = (h) => {
|
|
@@ -45327,7 +45353,7 @@ function B2() {
|
|
|
45327
45353
|
var p;
|
|
45328
45354
|
return ((p = m.data) == null ? void 0 : p.preferences) ?? {};
|
|
45329
45355
|
})
|
|
45330
|
-
}), o = typeof (d == null ? void 0 : d.timezone) == "string" ? d.timezone : null, u =
|
|
45356
|
+
}), o = typeof (d == null ? void 0 : d.timezone) == "string" ? d.timezone : null, u = nt({
|
|
45331
45357
|
mutationFn: (m) => t.request(qn("/users/me/preferences", { timezone: m })),
|
|
45332
45358
|
onSuccess: (m, p) => {
|
|
45333
45359
|
fv(p), s(""), n.invalidateQueries({ queryKey: ["nvr-profile-prefs"] });
|
|
@@ -45383,13 +45409,13 @@ function W2() {
|
|
|
45383
45409
|
var b;
|
|
45384
45410
|
return ((b = f.data) == null ? void 0 : b.preferences) ?? {};
|
|
45385
45411
|
})
|
|
45386
|
-
}), s = (a == null ? void 0 : a.email_digest) === "daily" ? "daily" : "instant", l =
|
|
45412
|
+
}), s = (a == null ? void 0 : a.email_digest) === "daily" ? "daily" : "instant", l = nt({
|
|
45387
45413
|
mutationFn: (f) => t.request(qn("/users/me/preferences", { email_digest: f })),
|
|
45388
45414
|
onSuccess: () => void n.invalidateQueries({ queryKey: ["nvr-profile-prefs"] })
|
|
45389
|
-
}), i = Number.isInteger(Number(a == null ? void 0 : a.digest_hour)) ? Number(a == null ? void 0 : a.digest_hour) : 7, d =
|
|
45415
|
+
}), i = Number.isInteger(Number(a == null ? void 0 : a.digest_hour)) ? Number(a == null ? void 0 : a.digest_hour) : 7, d = nt({
|
|
45390
45416
|
mutationFn: (f) => t.request(qn("/users/me/preferences", { digest_hour: f })),
|
|
45391
45417
|
onSuccess: () => void n.invalidateQueries({ queryKey: ["nvr-profile-prefs"] })
|
|
45392
|
-
}), [o, u] = S(null), c =
|
|
45418
|
+
}), [o, u] = S(null), c = nt({
|
|
45393
45419
|
mutationFn: () => t.request(He("/users/me/digest-test", {})),
|
|
45394
45420
|
onSuccess: (f) => u(f.data.note),
|
|
45395
45421
|
onError: () => u("Test send failed — try again.")
|
|
@@ -45488,7 +45514,7 @@ function Q2() {
|
|
|
45488
45514
|
const t = Ee(), n = Mt(), { data: a } = pe({
|
|
45489
45515
|
queryKey: ["nvr-profile-scopes"],
|
|
45490
45516
|
queryFn: () => t.request(Eh()).then((l) => l.data)
|
|
45491
|
-
}), s =
|
|
45517
|
+
}), s = nt({
|
|
45492
45518
|
mutationFn: ({ dimension: l, values: i }) => t.request(wy(l, i)),
|
|
45493
45519
|
onSuccess: () => void n.invalidateQueries({ queryKey: ["nvr-profile-scopes"] })
|
|
45494
45520
|
});
|
|
@@ -45677,10 +45703,10 @@ function J2() {
|
|
|
45677
45703
|
}), n = (t == null ? void 0 : t.two_factor_enabled) !== !1, a = Ee(), s = Mt(), [l, i] = S(null), [d, o] = S(""), [u, c] = S(null), { data: m } = pe({
|
|
45678
45704
|
queryKey: ["nvr-profile-totp"],
|
|
45679
45705
|
queryFn: () => a.request({ _method: "GET", _path: "/two-factor/status" }).then((x) => x.data)
|
|
45680
|
-
}), p = () => void s.invalidateQueries({ queryKey: ["nvr-profile-totp"] }), f =
|
|
45706
|
+
}), p = () => void s.invalidateQueries({ queryKey: ["nvr-profile-totp"] }), f = nt({
|
|
45681
45707
|
mutationFn: () => a.request({ _method: "POST", _path: "/two-factor/setup" }).then((x) => x.data),
|
|
45682
45708
|
onSuccess: (x) => i(x)
|
|
45683
|
-
}), b =
|
|
45709
|
+
}), b = nt({
|
|
45684
45710
|
mutationFn: (x) => a.request({
|
|
45685
45711
|
_method: "POST",
|
|
45686
45712
|
_path: "/two-factor/verify",
|
|
@@ -45689,7 +45715,7 @@ function J2() {
|
|
|
45689
45715
|
onSuccess: () => {
|
|
45690
45716
|
i(null), o(""), p();
|
|
45691
45717
|
}
|
|
45692
|
-
}), g =
|
|
45718
|
+
}), g = nt({
|
|
45693
45719
|
mutationFn: (x) => a.request({
|
|
45694
45720
|
_method: "POST",
|
|
45695
45721
|
_path: "/two-factor/disable",
|
|
@@ -45698,13 +45724,13 @@ function J2() {
|
|
|
45698
45724
|
onSuccess: () => {
|
|
45699
45725
|
o(""), p();
|
|
45700
45726
|
}
|
|
45701
|
-
}), k =
|
|
45727
|
+
}), k = nt({
|
|
45702
45728
|
mutationFn: () => a.request({ _method: "POST", _path: "/users/me/token" }).then((x) => x.data),
|
|
45703
45729
|
onSuccess: (x) => c(x.token)
|
|
45704
|
-
}), y =
|
|
45730
|
+
}), y = nt({
|
|
45705
45731
|
mutationFn: () => a.request({ _method: "DELETE", _path: "/users/me/token" }),
|
|
45706
45732
|
onSuccess: () => c(null)
|
|
45707
|
-
}), h =
|
|
45733
|
+
}), h = nt({
|
|
45708
45734
|
mutationFn: () => a.request({ _method: "POST", _path: "/auth/logout-all" }),
|
|
45709
45735
|
onSuccess: () => window.location.assign("/login")
|
|
45710
45736
|
});
|
|
@@ -45877,7 +45903,7 @@ function H2({ user: t, onSaved: n }) {
|
|
|
45877
45903
|
).then((A) => A.data),
|
|
45878
45904
|
enabled: !!o && (s || !!f && !!g),
|
|
45879
45905
|
staleTime: 6e4
|
|
45880
|
-
}), [F, v] = S([]), C =
|
|
45906
|
+
}), [F, v] = S([]), C = nt({
|
|
45881
45907
|
mutationFn: () => a.request(
|
|
45882
45908
|
ky({
|
|
45883
45909
|
is_out_of_office: s,
|
|
@@ -45951,14 +45977,14 @@ function H2({ user: t, onSaved: n }) {
|
|
|
45951
45977
|
/* @__PURE__ */ e("span", { className: "font-semibold", children: "No delegate is set." }),
|
|
45952
45978
|
" While you're out,",
|
|
45953
45979
|
" ",
|
|
45954
|
-
i.owned_open_records > 0 && /* @__PURE__ */ r(
|
|
45980
|
+
i.owned_open_records > 0 && /* @__PURE__ */ r(tt, { children: [
|
|
45955
45981
|
/* @__PURE__ */ e("span", { className: "font-semibold", children: i.owned_open_records }),
|
|
45956
45982
|
" open record",
|
|
45957
45983
|
i.owned_open_records === 1 ? "" : "s",
|
|
45958
45984
|
" you own"
|
|
45959
45985
|
] }),
|
|
45960
45986
|
i.owned_open_records > 0 && i.sla_escalations > 0 && " and ",
|
|
45961
|
-
i.sla_escalations > 0 && /* @__PURE__ */ r(
|
|
45987
|
+
i.sla_escalations > 0 && /* @__PURE__ */ r(tt, { children: [
|
|
45962
45988
|
/* @__PURE__ */ e("span", { className: "font-semibold", children: i.sla_escalations }),
|
|
45963
45989
|
" SLA escalation rule",
|
|
45964
45990
|
i.sla_escalations === 1 ? "" : "s",
|
|
@@ -46060,12 +46086,12 @@ function q4({ userId: t, className: n }) {
|
|
|
46060
46086
|
phone: (o == null ? void 0 : o.phone) ?? ""
|
|
46061
46087
|
}),
|
|
46062
46088
|
[o]
|
|
46063
|
-
), b = m ?? f, g = JSON.stringify(b) !== JSON.stringify(f), k =
|
|
46089
|
+
), b = m ?? f, g = JSON.stringify(b) !== JSON.stringify(f), k = nt({
|
|
46064
46090
|
mutationFn: () => a.request(b0(o.id, b)),
|
|
46065
46091
|
onSuccess: () => {
|
|
46066
46092
|
p(null), s.invalidateQueries({ queryKey: ["nvr-profile-user"] }), s.invalidateQueries({ queryKey: ["nvr-profile-card"] });
|
|
46067
46093
|
}
|
|
46068
|
-
}), y = Be(null), h =
|
|
46094
|
+
}), y = Be(null), h = nt({
|
|
46069
46095
|
mutationFn: async (C) => {
|
|
46070
46096
|
const w = await new Promise((_, A) => {
|
|
46071
46097
|
const $ = new Image(), B = URL.createObjectURL(C);
|
|
@@ -46124,7 +46150,7 @@ function q4({ userId: t, className: n }) {
|
|
|
46124
46150
|
title: v ? "Active" : x.status
|
|
46125
46151
|
}
|
|
46126
46152
|
),
|
|
46127
|
-
i && /* @__PURE__ */ r(
|
|
46153
|
+
i && /* @__PURE__ */ r(tt, { children: [
|
|
46128
46154
|
/* @__PURE__ */ e(
|
|
46129
46155
|
"button",
|
|
46130
46156
|
{
|
|
@@ -46416,7 +46442,7 @@ function G2({
|
|
|
46416
46442
|
t,
|
|
46417
46443
|
" selected"
|
|
46418
46444
|
] }),
|
|
46419
|
-
s && /* @__PURE__ */ r(
|
|
46445
|
+
s && /* @__PURE__ */ r(tt, { children: [
|
|
46420
46446
|
/* @__PURE__ */ e(
|
|
46421
46447
|
"button",
|
|
46422
46448
|
{
|
|
@@ -46517,7 +46543,7 @@ function eS({
|
|
|
46517
46543
|
queryKey: ["queue-sheet-comments", v, C],
|
|
46518
46544
|
queryFn: () => g.request(le("/comments", { collection: v, item: C })).catch(() => ({ data: [] })),
|
|
46519
46545
|
enabled: !!v && !!C
|
|
46520
|
-
}), A =
|
|
46546
|
+
}), A = nt({
|
|
46521
46547
|
mutationFn: (P) => g.request(
|
|
46522
46548
|
He(`/pipelines/instance/${v}/${C}/transition`, {
|
|
46523
46549
|
transition_id: P
|
|
@@ -46538,7 +46564,7 @@ function eS({
|
|
|
46538
46564
|
}
|
|
46539
46565
|
Ze.error(P instanceof Error ? P.message : "Transition failed");
|
|
46540
46566
|
}
|
|
46541
|
-
}), $ =
|
|
46567
|
+
}), $ = nt({
|
|
46542
46568
|
mutationFn: (P) => g.request(He("/comments", { collection: v, item: C, text: P })),
|
|
46543
46569
|
onSuccess: () => {
|
|
46544
46570
|
h(""), b.invalidateQueries({ queryKey: ["queue-sheet-comments", v, C] });
|
|
@@ -46552,7 +46578,7 @@ function eS({
|
|
|
46552
46578
|
side: "right",
|
|
46553
46579
|
className: "flex max-w-full flex-col gap-0 p-0",
|
|
46554
46580
|
style: { width: p ?? 480, maxWidth: "96vw" },
|
|
46555
|
-
children: t && /* @__PURE__ */ r(
|
|
46581
|
+
children: t && /* @__PURE__ */ r(tt, { children: [
|
|
46556
46582
|
/* @__PURE__ */ e(Ll, { className: "shrink-0 border-b border-slate-200 px-5 py-4 dark:border-border", children: /* @__PURE__ */ r("div", { className: "flex items-start justify-between gap-3 pr-6", children: [
|
|
46557
46583
|
/* @__PURE__ */ r("div", { className: "min-w-0", children: [
|
|
46558
46584
|
/* @__PURE__ */ e(Rl, { className: "truncate text-[15px] font-semibold", children: t.label }),
|
|
@@ -47019,8 +47045,8 @@ function Io({
|
|
|
47019
47045
|
s && "bg-nvr-cyan/5 ring-1 ring-inset ring-nvr-cyan dark:bg-nvr-cyan/10",
|
|
47020
47046
|
!s && !l && n === 0 && "opacity-50"
|
|
47021
47047
|
),
|
|
47022
|
-
children: l ? /* @__PURE__ */ e(Ir, { className: "h-5 w-16 rounded" }) : /* @__PURE__ */ r(
|
|
47023
|
-
/* @__PURE__ */ e("span", { className: "flex items-baseline gap-1 text-[15px] font-semibold leading-none tabular-nums text-slate-900 dark:text-foreground", children: a != null ? /* @__PURE__ */ r(
|
|
47048
|
+
children: l ? /* @__PURE__ */ e(Ir, { className: "h-5 w-16 rounded" }) : /* @__PURE__ */ r(tt, { children: [
|
|
47049
|
+
/* @__PURE__ */ e("span", { className: "flex items-baseline gap-1 text-[15px] font-semibold leading-none tabular-nums text-slate-900 dark:text-foreground", children: a != null ? /* @__PURE__ */ r(tt, { children: [
|
|
47024
47050
|
/* @__PURE__ */ e("span", { className: "text-nvr-navy dark:text-nvr-cyan", children: /* @__PURE__ */ e(mc, { value: a, format: wn }) }),
|
|
47025
47051
|
/* @__PURE__ */ r("span", { className: "text-[11px] font-medium text-slate-400", children: [
|
|
47026
47052
|
"/ ",
|
|
@@ -47081,7 +47107,7 @@ function pS({
|
|
|
47081
47107
|
}
|
|
47082
47108
|
),
|
|
47083
47109
|
t,
|
|
47084
|
-
/* @__PURE__ */ e("span", { className: "font-semibold tabular-nums text-slate-900 dark:text-foreground", children: a != null ? /* @__PURE__ */ r(
|
|
47110
|
+
/* @__PURE__ */ e("span", { className: "font-semibold tabular-nums text-slate-900 dark:text-foreground", children: a != null ? /* @__PURE__ */ r(tt, { children: [
|
|
47085
47111
|
/* @__PURE__ */ e("span", { className: "text-nvr-navy dark:text-nvr-cyan", children: wn(a) }),
|
|
47086
47112
|
/* @__PURE__ */ r("span", { className: "font-normal text-slate-400", children: [
|
|
47087
47113
|
" / ",
|
|
@@ -47369,7 +47395,7 @@ function T4({ queueId: t, realtime: n, renderError: a }) {
|
|
|
47369
47395
|
})
|
|
47370
47396
|
);
|
|
47371
47397
|
}
|
|
47372
|
-
const Dt =
|
|
47398
|
+
const Dt = nt({
|
|
47373
47399
|
mutationFn: async ({ item: K, targetState: Ne }) => {
|
|
47374
47400
|
await Ct(K, Ne);
|
|
47375
47401
|
},
|
|
@@ -47379,7 +47405,7 @@ function T4({ queueId: t, realtime: n, renderError: a }) {
|
|
|
47379
47405
|
onError: (K) => {
|
|
47380
47406
|
Ze.error(K instanceof Error ? K.message : "Failed to move item"), s.invalidateQueries({ queryKey: ["queue-items", t, u] });
|
|
47381
47407
|
}
|
|
47382
|
-
}), mt =
|
|
47408
|
+
}), mt = nt({
|
|
47383
47409
|
mutationFn: (K) => l.request(
|
|
47384
47410
|
He(`/queues/${t}/claim`, {
|
|
47385
47411
|
source_collection: K.collection,
|
|
@@ -47388,7 +47414,7 @@ function T4({ queueId: t, realtime: n, renderError: a }) {
|
|
|
47388
47414
|
),
|
|
47389
47415
|
onSuccess: () => s.invalidateQueries({ queryKey: ["queue-items", t, u] }),
|
|
47390
47416
|
onError: () => Ze.error("Failed to claim item")
|
|
47391
|
-
}), Vt =
|
|
47417
|
+
}), Vt = nt({
|
|
47392
47418
|
mutationFn: (K) => l.request(
|
|
47393
47419
|
He(`/queues/${t}/release`, {
|
|
47394
47420
|
source_collection: K.collection,
|
|
@@ -47582,13 +47608,13 @@ function T4({ queueId: t, realtime: n, renderError: a }) {
|
|
|
47582
47608
|
const K = Xt.data.default_view_id, Ne = K != null ? Un.data.find((yt) => yt.id === K) : void 0, Xe = Un.data.find((yt) => yt.is_default);
|
|
47583
47609
|
Ne ? Bn(Ne) : Xe ? Bn(Xe) : (k(q.display_config.default_view), c(q.display_config.default_scope)), H(!0);
|
|
47584
47610
|
}, [q, Xt, Un, Z]);
|
|
47585
|
-
const { isAdmin: va } = qs(), el = va || (q == null ? void 0 : q.owner) != null && q.owner === i, us =
|
|
47611
|
+
const { isAdmin: va } = qs(), el = va || (q == null ? void 0 : q.owner) != null && q.owner === i, us = nt({
|
|
47586
47612
|
mutationFn: ({ viewId: K, on: Ne }) => l.request(qn(`/queues/views/${K}`, { is_default: Ne })),
|
|
47587
47613
|
onSuccess: () => {
|
|
47588
47614
|
s.invalidateQueries({ queryKey: ["queue-views", t] }), Ze.success("Queue default view updated");
|
|
47589
47615
|
},
|
|
47590
47616
|
onError: () => Ze.error("Could not update the queue default view")
|
|
47591
|
-
}), Ua =
|
|
47617
|
+
}), Ua = nt({
|
|
47592
47618
|
mutationFn: () => l.request(
|
|
47593
47619
|
He(`/queues/${t}/views`, {
|
|
47594
47620
|
name: Pn.trim(),
|
|
@@ -47609,7 +47635,7 @@ function T4({ queueId: t, realtime: n, renderError: a }) {
|
|
|
47609
47635
|
or(!1), Zs(""), xn(!1), Qr(!1), Wr(K.data.id), s.invalidateQueries({ queryKey: ["queue-views", t] }), Ze.success("View saved");
|
|
47610
47636
|
},
|
|
47611
47637
|
onError: () => Ze.error("Failed to save view")
|
|
47612
|
-
}), ja =
|
|
47638
|
+
}), ja = nt({
|
|
47613
47639
|
mutationFn: (K) => l.request(
|
|
47614
47640
|
qn(`/queues/views/${K.id}`, {
|
|
47615
47641
|
state: {
|
|
@@ -47627,13 +47653,13 @@ function T4({ queueId: t, realtime: n, renderError: a }) {
|
|
|
47627
47653
|
s.invalidateQueries({ queryKey: ["queue-views", t] }), Ze.success("View updated");
|
|
47628
47654
|
},
|
|
47629
47655
|
onError: () => Ze.error("Failed to update view")
|
|
47630
|
-
}), ka =
|
|
47656
|
+
}), ka = nt({
|
|
47631
47657
|
mutationFn: (K) => l.request(An(`/queues/views/${K}`)),
|
|
47632
47658
|
onSuccess: (K, Ne) => {
|
|
47633
47659
|
s.invalidateQueries({ queryKey: ["queue-views", t] }), Wr(null), we === Ne && Me(null);
|
|
47634
47660
|
},
|
|
47635
47661
|
onError: () => Ze.error("Failed to delete view")
|
|
47636
|
-
}), tl =
|
|
47662
|
+
}), tl = nt({
|
|
47637
47663
|
mutationFn: (K) => l.request(Bc(`/queues/${t}/default-view`, { view_id: K })),
|
|
47638
47664
|
onMutate: (K) => Me(K),
|
|
47639
47665
|
onSuccess: (K, Ne) => {
|
|
@@ -47669,7 +47695,7 @@ function T4({ queueId: t, realtime: n, renderError: a }) {
|
|
|
47669
47695
|
}, nl = fr == null ? void 0 : fr.map((K) => ({
|
|
47670
47696
|
key: K.key,
|
|
47671
47697
|
rows: K.rows,
|
|
47672
|
-
header: /* @__PURE__ */ r(
|
|
47698
|
+
header: /* @__PURE__ */ r(tt, { children: [
|
|
47673
47699
|
/* @__PURE__ */ e("span", { children: Wa(K.key) }),
|
|
47674
47700
|
/* @__PURE__ */ r("span", { className: "font-normal text-slate-400", children: [
|
|
47675
47701
|
"(",
|
|
@@ -48192,7 +48218,7 @@ function T4({ queueId: t, realtime: n, renderError: a }) {
|
|
|
48192
48218
|
"data-queue-burndown": !0,
|
|
48193
48219
|
className: `inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-[11.5px] font-medium ${Kt.dir === "down" ? "border-emerald-200 bg-emerald-50 text-emerald-700 dark:border-emerald-500/30 dark:bg-emerald-500/10 dark:text-emerald-400" : Kt.dir === "up" ? "border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-500/30 dark:bg-amber-500/10 dark:text-amber-400" : "border-slate-200 bg-slate-50 text-slate-500 dark:border-border dark:bg-muted dark:text-muted-foreground"}`,
|
|
48194
48220
|
"data-tip": "Average net change per day over the last 14 days of snapshots",
|
|
48195
|
-
children: Kt.dir === "down" ? /* @__PURE__ */ r(
|
|
48221
|
+
children: Kt.dir === "down" ? /* @__PURE__ */ r(tt, { children: [
|
|
48196
48222
|
"▼ ",
|
|
48197
48223
|
Math.abs(Kt.pace).toFixed(1),
|
|
48198
48224
|
"/day — clears in ~",
|
|
@@ -48200,11 +48226,11 @@ function T4({ queueId: t, realtime: n, renderError: a }) {
|
|
|
48200
48226
|
" day",
|
|
48201
48227
|
Kt.days === 1 ? "" : "s",
|
|
48202
48228
|
" at this pace"
|
|
48203
|
-
] }) : Kt.dir === "up" ? /* @__PURE__ */ r(
|
|
48229
|
+
] }) : Kt.dir === "up" ? /* @__PURE__ */ r(tt, { children: [
|
|
48204
48230
|
"▲ Growing ",
|
|
48205
48231
|
Kt.pace.toFixed(1),
|
|
48206
48232
|
"/day"
|
|
48207
|
-
] }) : /* @__PURE__ */ e(
|
|
48233
|
+
] }) : /* @__PURE__ */ e(tt, { children: "→ Holding steady" })
|
|
48208
48234
|
}
|
|
48209
48235
|
),
|
|
48210
48236
|
Ln.length > 0 && /* @__PURE__ */ e("div", { className: "flex min-w-0 flex-wrap items-center gap-1.5", children: Ln.map(([K, Ne]) => {
|
|
@@ -48723,7 +48749,7 @@ function T4({ queueId: t, realtime: n, renderError: a }) {
|
|
|
48723
48749
|
] })
|
|
48724
48750
|
] })
|
|
48725
48751
|
] }),
|
|
48726
|
-
/* @__PURE__ */ e("div", { className: "flex min-h-0 flex-1 flex-col overflow-y-auto px-6 pb-6", children: g === "table" ? /* @__PURE__ */ r(
|
|
48752
|
+
/* @__PURE__ */ e("div", { className: "flex min-h-0 flex-1 flex-col overflow-y-auto px-6 pb-6", children: g === "table" ? /* @__PURE__ */ r(tt, { children: [
|
|
48727
48753
|
!et && St > 0 && /* @__PURE__ */ r("div", { className: "mb-3 flex flex-wrap items-center gap-1.5", children: [
|
|
48728
48754
|
wr.filter((K) => !_e(x[K.key])).map((K) => /* @__PURE__ */ r(
|
|
48729
48755
|
"span",
|
|
@@ -49524,7 +49550,7 @@ function kS({
|
|
|
49524
49550
|
)
|
|
49525
49551
|
] })
|
|
49526
49552
|
] }),
|
|
49527
|
-
t.type === "table" && /* @__PURE__ */ r(
|
|
49553
|
+
t.type === "table" && /* @__PURE__ */ r(tt, { children: [
|
|
49528
49554
|
/* @__PURE__ */ r("label", { className: "block space-y-1", children: [
|
|
49529
49555
|
/* @__PURE__ */ e("span", { className: "text-[11.5px] font-medium text-slate-600 dark:text-slate-300", children: "Columns (comma-separated fields)" }),
|
|
49530
49556
|
/* @__PURE__ */ e(
|
|
@@ -49572,7 +49598,7 @@ function kS({
|
|
|
49572
49598
|
)
|
|
49573
49599
|
] })
|
|
49574
49600
|
] }),
|
|
49575
|
-
t.type === "calc" && /* @__PURE__ */ r(
|
|
49601
|
+
t.type === "calc" && /* @__PURE__ */ r(tt, { children: [
|
|
49576
49602
|
/* @__PURE__ */ r("label", { className: "block space-y-1", children: [
|
|
49577
49603
|
/* @__PURE__ */ e("span", { className: "text-[11.5px] font-medium text-slate-600 dark:text-slate-300", children: "Formula" }),
|
|
49578
49604
|
/* @__PURE__ */ e(
|
|
@@ -49635,7 +49661,7 @@ function kS({
|
|
|
49635
49661
|
/* @__PURE__ */ e("p", { className: "text-[10.5px] text-amber-600 dark:text-amber-400", children: "Save before previewing — calc widgets resolve against saved siblings." })
|
|
49636
49662
|
] })
|
|
49637
49663
|
] }),
|
|
49638
|
-
t.type === "query" && /* @__PURE__ */ r(
|
|
49664
|
+
t.type === "query" && /* @__PURE__ */ r(tt, { children: [
|
|
49639
49665
|
/* @__PURE__ */ r("label", { className: "block space-y-1", children: [
|
|
49640
49666
|
/* @__PURE__ */ e("span", { className: "text-[11.5px] font-medium text-slate-600 dark:text-slate-300", children: "Query slug" }),
|
|
49641
49667
|
/* @__PURE__ */ e(
|
|
@@ -49696,7 +49722,7 @@ function kS({
|
|
|
49696
49722
|
),
|
|
49697
49723
|
"Shade the typical range from the prior 4 periods"
|
|
49698
49724
|
] }),
|
|
49699
|
-
t.type === "narrative" && /* @__PURE__ */ r(
|
|
49725
|
+
t.type === "narrative" && /* @__PURE__ */ r(tt, { children: [
|
|
49700
49726
|
/* @__PURE__ */ r("label", { className: "block space-y-1", children: [
|
|
49701
49727
|
/* @__PURE__ */ r("span", { className: "text-[11.5px] font-medium text-slate-600 dark:text-slate-300", children: [
|
|
49702
49728
|
"Text (",
|
|
@@ -50530,7 +50556,7 @@ function RS({
|
|
|
50530
50556
|
layout: R ? "vertical" : "horizontal",
|
|
50531
50557
|
margin: { top: 6, right: 8, left: R ? 30 : -6, bottom: 0 },
|
|
50532
50558
|
children: [
|
|
50533
|
-
R ? /* @__PURE__ */ r(
|
|
50559
|
+
R ? /* @__PURE__ */ r(tt, { children: [
|
|
50534
50560
|
/* @__PURE__ */ e(
|
|
50535
50561
|
Wl,
|
|
50536
50562
|
{
|
|
@@ -50550,7 +50576,7 @@ function RS({
|
|
|
50550
50576
|
width: 120
|
|
50551
50577
|
}
|
|
50552
50578
|
)
|
|
50553
|
-
] }) : /* @__PURE__ */ r(
|
|
50579
|
+
] }) : /* @__PURE__ */ r(tt, { children: [
|
|
50554
50580
|
/* @__PURE__ */ e(
|
|
50555
50581
|
Wl,
|
|
50556
50582
|
{
|
|
@@ -50627,7 +50653,7 @@ function ES({ reportId: t, alert: n }) {
|
|
|
50627
50653
|
queryKey: ["nivaro-report-alert-log", t, n.id],
|
|
50628
50654
|
queryFn: () => a.request($y(t, n.id)).then((d) => d.data),
|
|
50629
50655
|
staleTime: 3e4
|
|
50630
|
-
}), i =
|
|
50656
|
+
}), i = nt({
|
|
50631
50657
|
mutationFn: () => a.request(qy(t, n.id)),
|
|
50632
50658
|
onSuccess: () => {
|
|
50633
50659
|
s.invalidateQueries({ queryKey: ["nivaro-report-alert-log", t, n.id] }), s.invalidateQueries({ queryKey: ["nivaro-report-alerts", t] });
|
|
@@ -50674,7 +50700,7 @@ function PS({
|
|
|
50674
50700
|
}), F = x.filter((R) => R.widget === n.id), v = () => void l.invalidateQueries({ queryKey: ["nivaro-report-alerts", t] }), C = () => c.filter((R) => R.value.trim() !== "" && !Number.isNaN(Number(R.value))).map((R) => {
|
|
50675
50701
|
const O = h.find((M) => M.value === R.field);
|
|
50676
50702
|
return { field: O != null && O.aggregatable && R.agg !== "sum" ? `${R.agg}:${R.field}` : R.field, op: R.op, value: Number(R.value) };
|
|
50677
|
-
}), w =
|
|
50703
|
+
}), w = nt({
|
|
50678
50704
|
mutationFn: () => {
|
|
50679
50705
|
const R = C(), O = R.map((P) => Jf(P, h)).join(" & ");
|
|
50680
50706
|
return s.request(
|
|
@@ -50691,10 +50717,10 @@ function PS({
|
|
|
50691
50717
|
onSuccess: () => {
|
|
50692
50718
|
u(""), m([{ field: "value", agg: "sum", op: "gt", value: "" }]), f([]), v();
|
|
50693
50719
|
}
|
|
50694
|
-
}), _ =
|
|
50720
|
+
}), _ = nt({
|
|
50695
50721
|
mutationFn: (R) => s.request(Sy(t, R.id, !R.is_active)),
|
|
50696
50722
|
onSuccess: v
|
|
50697
|
-
}), A =
|
|
50723
|
+
}), A = nt({
|
|
50698
50724
|
mutationFn: (R) => s.request(Cy(t, R.id)),
|
|
50699
50725
|
onSuccess: v
|
|
50700
50726
|
}), $ = C().length > 0, B = F.some((R) => R.firing);
|
|
@@ -51648,7 +51674,7 @@ const Xf = Dh(function({
|
|
|
51648
51674
|
layout: Ct ? "vertical" : "horizontal",
|
|
51649
51675
|
margin: { top: 6, right: 8, left: Ct ? 30 : -10, bottom: 0 },
|
|
51650
51676
|
children: [
|
|
51651
|
-
Ct ? /* @__PURE__ */ r(
|
|
51677
|
+
Ct ? /* @__PURE__ */ r(tt, { children: [
|
|
51652
51678
|
/* @__PURE__ */ e(Wl, { type: "number", tick: { fontSize: 10 }, stroke: "#94a3b8" }),
|
|
51653
51679
|
/* @__PURE__ */ e(
|
|
51654
51680
|
Ks,
|
|
@@ -51660,7 +51686,7 @@ const Xf = Dh(function({
|
|
|
51660
51686
|
width: 90
|
|
51661
51687
|
}
|
|
51662
51688
|
)
|
|
51663
|
-
] }) : /* @__PURE__ */ r(
|
|
51689
|
+
] }) : /* @__PURE__ */ r(tt, { children: [
|
|
51664
51690
|
/* @__PURE__ */ e(
|
|
51665
51691
|
Wl,
|
|
51666
51692
|
{
|
|
@@ -52064,7 +52090,7 @@ function F4({
|
|
|
52064
52090
|
return u.request(Ay(t)).then((he) => he.data);
|
|
52065
52091
|
},
|
|
52066
52092
|
staleTime: 6e4
|
|
52067
|
-
}), P = () => void R.invalidateQueries({ queryKey: ["nivaro-report-presets", t] }), M =
|
|
52093
|
+
}), P = () => void R.invalidateQueries({ queryKey: ["nivaro-report-presets", t] }), M = nt({
|
|
52068
52094
|
mutationFn: (he) => u.request(
|
|
52069
52095
|
x0(t, {
|
|
52070
52096
|
name: he,
|
|
@@ -52073,7 +52099,7 @@ function F4({
|
|
|
52073
52099
|
})
|
|
52074
52100
|
),
|
|
52075
52101
|
onSuccess: P
|
|
52076
|
-
}), q =
|
|
52102
|
+
}), q = nt({
|
|
52077
52103
|
mutationFn: (he) => u.request(jy(t, he)),
|
|
52078
52104
|
onSuccess: P
|
|
52079
52105
|
}), [j, T] = S(""), [N, I] = S(!1), [D, ie] = S(null), [V, Q] = S(!1), { data: ne = [] } = pe({
|
|
@@ -52091,7 +52117,7 @@ function F4({
|
|
|
52091
52117
|
enabled: D != null,
|
|
52092
52118
|
staleTime: 5 * 6e4,
|
|
52093
52119
|
retry: !1
|
|
52094
|
-
}), G =
|
|
52120
|
+
}), G = nt({
|
|
52095
52121
|
mutationFn: () => u.request(He(`/report-studio/${t}/snapshots`, {})),
|
|
52096
52122
|
onSuccess: () => void R.invalidateQueries({ queryKey: ["nvr-report-snaps", t] })
|
|
52097
52123
|
}), { data: xe = [] } = pe({
|
|
@@ -52099,10 +52125,10 @@ function F4({
|
|
|
52099
52125
|
queryFn: () => u.request(le(`/report-studio/${t}/annotations`)).then((he) => he.data ?? []),
|
|
52100
52126
|
staleTime: 6e4,
|
|
52101
52127
|
retry: !1
|
|
52102
|
-
}), se = () => void R.invalidateQueries({ queryKey: ["nvr-report-notes", t] }), ge =
|
|
52128
|
+
}), se = () => void R.invalidateQueries({ queryKey: ["nvr-report-notes", t] }), ge = nt({
|
|
52103
52129
|
mutationFn: (he) => u.request(He(`/report-studio/${t}/annotations`, he)),
|
|
52104
52130
|
onSuccess: se
|
|
52105
|
-
}), ye =
|
|
52131
|
+
}), ye = nt({
|
|
52106
52132
|
mutationFn: (he) => u.request(An(`/report-studio/${t}/annotations/${he}`)),
|
|
52107
52133
|
onSuccess: se
|
|
52108
52134
|
}), Ae = an((he, Ye, ft) => {
|
|
@@ -52112,7 +52138,7 @@ function F4({
|
|
|
52112
52138
|
labels: [ft]
|
|
52113
52139
|
};
|
|
52114
52140
|
y((Kt) => [...Kt.filter((Yt) => Yt.field !== he), xt]), v((Kt) => [...Kt.filter((Yt) => Yt.field !== he), xt]);
|
|
52115
|
-
}, []), [Se, Le] = S(!1), [J, Z] = S(null), [H, X] = S(null), be =
|
|
52141
|
+
}, []), [Se, Le] = S(!1), [J, Z] = S(null), [H, X] = S(null), be = nt({
|
|
52116
52142
|
mutationFn: (he) => u.request(
|
|
52117
52143
|
Bc(`/report-studio/${t}/widgets`, {
|
|
52118
52144
|
widgets: he.map((Ye, ft) => ({ ...Ye, sort: ft }))
|
|
@@ -52537,7 +52563,7 @@ function F4({
|
|
|
52537
52563
|
},
|
|
52538
52564
|
he.field
|
|
52539
52565
|
)) }),
|
|
52540
|
-
(_t == null ? void 0 : _t.editable) && /* @__PURE__ */ e("div", { className: "mb-2 flex items-center gap-1.5", children: Se ? /* @__PURE__ */ r(
|
|
52566
|
+
(_t == null ? void 0 : _t.editable) && /* @__PURE__ */ e("div", { className: "mb-2 flex items-center gap-1.5", children: Se ? /* @__PURE__ */ r(tt, { children: [
|
|
52541
52567
|
/* @__PURE__ */ e(
|
|
52542
52568
|
"button",
|
|
52543
52569
|
{
|
|
@@ -52612,7 +52638,7 @@ function F4({
|
|
|
52612
52638
|
onDrill: f
|
|
52613
52639
|
}
|
|
52614
52640
|
)
|
|
52615
|
-
] }, xt)) }) : /* @__PURE__ */ r(
|
|
52641
|
+
] }, xt)) }) : /* @__PURE__ */ r(tt, { children: [
|
|
52616
52642
|
Se && /* @__PURE__ */ e(
|
|
52617
52643
|
yS,
|
|
52618
52644
|
{
|
|
@@ -52774,7 +52800,7 @@ function j4({ className: t }) {
|
|
|
52774
52800
|
...R.length > 0 ? { roles: R } : {}
|
|
52775
52801
|
}),
|
|
52776
52802
|
[D, R]
|
|
52777
|
-
), V =
|
|
52803
|
+
), V = nt({
|
|
52778
52804
|
mutationFn: () => n.request(
|
|
52779
52805
|
He("/announcements", {
|
|
52780
52806
|
subject: s.trim() || void 0,
|
|
@@ -52801,7 +52827,7 @@ function j4({ className: t }) {
|
|
|
52801
52827
|
le("/announcements/templates")
|
|
52802
52828
|
).then((H) => H.data ?? []).catch(() => []),
|
|
52803
52829
|
staleTime: 6e4
|
|
52804
|
-
}), oe =
|
|
52830
|
+
}), oe = nt({
|
|
52805
52831
|
mutationFn: (H) => n.request(
|
|
52806
52832
|
He("/announcements/templates", {
|
|
52807
52833
|
name: H,
|
|
@@ -52812,7 +52838,7 @@ function j4({ className: t }) {
|
|
|
52812
52838
|
}), G = (H) => {
|
|
52813
52839
|
const X = H.snapshot ?? {};
|
|
52814
52840
|
typeof X.subject == "string" && l(X.subject), typeof X.message == "string" && d(X.message);
|
|
52815
|
-
}, [xe, se] = S(""), [ge, ye] = S(!1), Ae =
|
|
52841
|
+
}, [xe, se] = S(""), [ge, ye] = S(!1), Ae = nt({
|
|
52816
52842
|
mutationFn: () => n.request(
|
|
52817
52843
|
He("/announcements/test-send", {
|
|
52818
52844
|
subject: s.trim() || void 0,
|
|
@@ -52824,12 +52850,12 @@ function j4({ className: t }) {
|
|
|
52824
52850
|
`Test sent to you — ${Object.entries(H.data ?? {}).map(([X, be]) => `${X}: ${be}`).join(", ")}`
|
|
52825
52851
|
),
|
|
52826
52852
|
onError: (H) => M(H.message)
|
|
52827
|
-
}), Se = (/* @__PURE__ */ new Date()).getHours(), Le = !C && (Se >= 21 || Se < 7), J =
|
|
52853
|
+
}), Se = (/* @__PURE__ */ new Date()).getHours(), Le = !C && (Se >= 21 || Se < 7), J = nt({
|
|
52828
52854
|
mutationFn: ({ id: H, body: X }) => n.request(qn(`/announcements/${H}`, X)),
|
|
52829
52855
|
onSuccess: () => {
|
|
52830
52856
|
a.invalidateQueries({ queryKey: ["broadcasts"] }), a.invalidateQueries({ queryKey: ["announcements-active"] });
|
|
52831
52857
|
}
|
|
52832
|
-
}), Z =
|
|
52858
|
+
}), Z = nt({
|
|
52833
52859
|
mutationFn: (H) => n.request(An(`/announcements/${H}`)),
|
|
52834
52860
|
onSuccess: () => {
|
|
52835
52861
|
a.invalidateQueries({ queryKey: ["broadcasts"] }), a.invalidateQueries({ queryKey: ["announcements-active"] });
|
|
@@ -52966,7 +52992,7 @@ function j4({ className: t }) {
|
|
|
52966
52992
|
),
|
|
52967
52993
|
"Text (SMS)"
|
|
52968
52994
|
] }),
|
|
52969
|
-
b && k === "banner" && /* @__PURE__ */ r(
|
|
52995
|
+
b && k === "banner" && /* @__PURE__ */ r(tt, { children: [
|
|
52970
52996
|
/* @__PURE__ */ r("label", { className: "flex cursor-pointer items-center gap-1.5 text-[12px] text-slate-600 dark:text-slate-300", children: [
|
|
52971
52997
|
/* @__PURE__ */ e(
|
|
52972
52998
|
"input",
|
|
@@ -53383,7 +53409,7 @@ function Px({
|
|
|
53383
53409
|
a,
|
|
53384
53410
|
": ",
|
|
53385
53411
|
/* @__PURE__ */ e("span", { className: "font-medium", children: "Everyone" })
|
|
53386
|
-
] }) : /* @__PURE__ */ r(
|
|
53412
|
+
] }) : /* @__PURE__ */ r(tt, { children: [
|
|
53387
53413
|
/* @__PURE__ */ r(
|
|
53388
53414
|
"button",
|
|
53389
53415
|
{
|
|
@@ -54123,7 +54149,7 @@ function eh({
|
|
|
54123
54149
|
className: W(zo, "col-span-full font-mono")
|
|
54124
54150
|
}
|
|
54125
54151
|
),
|
|
54126
|
-
u === "range" && /* @__PURE__ */ r(
|
|
54152
|
+
u === "range" && /* @__PURE__ */ r(tt, { children: [
|
|
54127
54153
|
/* @__PURE__ */ e("input", { value: y, onChange: ($) => h($.target.value), type: "number", placeholder: "Min (optional)", className: zo }),
|
|
54128
54154
|
/* @__PURE__ */ e("input", { value: x, onChange: ($) => F($.target.value), type: "number", placeholder: "Max (optional)", className: zo })
|
|
54129
54155
|
] })
|
|
@@ -54221,20 +54247,20 @@ function R4({ className: t }) {
|
|
|
54221
54247
|
queryKey: ["dqv-runs", l],
|
|
54222
54248
|
queryFn: () => n.request(le("/data-quality/runs", { collection: l })).then((_) => _.data ?? []),
|
|
54223
54249
|
enabled: !!l
|
|
54224
|
-
}), h = () => void s.invalidateQueries({ queryKey: ["dqv-rules", l] }), x =
|
|
54250
|
+
}), h = () => void s.invalidateQueries({ queryKey: ["dqv-rules", l] }), x = nt({
|
|
54225
54251
|
mutationFn: (_) => n.request(He("/data-quality/rules", { ..._, collection: l })),
|
|
54226
54252
|
onSuccess: () => {
|
|
54227
54253
|
o(!1), h();
|
|
54228
54254
|
}
|
|
54229
|
-
}), F =
|
|
54255
|
+
}), F = nt({
|
|
54230
54256
|
mutationFn: ({ id: _, body: A }) => n.request(qn(`/data-quality/rules/${_}`, A)),
|
|
54231
54257
|
onSuccess: () => {
|
|
54232
54258
|
c(null), h();
|
|
54233
54259
|
}
|
|
54234
|
-
}), v =
|
|
54260
|
+
}), v = nt({
|
|
54235
54261
|
mutationFn: (_) => n.request(An(`/data-quality/rules/${_}`)),
|
|
54236
54262
|
onSuccess: h
|
|
54237
|
-
}), C =
|
|
54263
|
+
}), C = nt({
|
|
54238
54264
|
mutationFn: () => n.request(He(`/data-quality/run/${l}`, {})),
|
|
54239
54265
|
onSuccess: (_) => {
|
|
54240
54266
|
p(_.data.id), s.invalidateQueries({ queryKey: ["dqv-runs", l] });
|
|
@@ -55506,7 +55532,7 @@ function g3({
|
|
|
55506
55532
|
/* @__PURE__ */ e("span", { "data-nf-comment-author": !0, children: b3($.user) }),
|
|
55507
55533
|
/* @__PURE__ */ e("span", { "data-nf-comment-time": !0, children: x3($.created_at) }),
|
|
55508
55534
|
R && /* @__PURE__ */ e("span", { "data-nf-comment-edited": !0, children: "(edited)" }),
|
|
55509
|
-
/* @__PURE__ */ e("div", { "data-nf-comment-actions": !0, children: !B && /* @__PURE__ */ r(
|
|
55535
|
+
/* @__PURE__ */ e("div", { "data-nf-comment-actions": !0, children: !B && /* @__PURE__ */ r(tt, { children: [
|
|
55510
55536
|
/* @__PURE__ */ e(
|
|
55511
55537
|
"button",
|
|
55512
55538
|
{
|
|
@@ -55953,7 +55979,7 @@ function k3({
|
|
|
55953
55979
|
(f) => f.from_state === m && f.to_state === p || f.from_state === p && f.to_state === m
|
|
55954
55980
|
).sort((f, b) => new Date(f.timestamp).getTime() - new Date(b.timestamp).getTime());
|
|
55955
55981
|
}
|
|
55956
|
-
return /* @__PURE__ */ r(
|
|
55982
|
+
return /* @__PURE__ */ r(tt, { children: [
|
|
55957
55983
|
i && Dr(
|
|
55958
55984
|
/* @__PURE__ */ r(
|
|
55959
55985
|
"div",
|
|
@@ -56932,13 +56958,13 @@ function K4({
|
|
|
56932
56958
|
return Se.sort((J, Z) => J.sort - Z.sort);
|
|
56933
56959
|
}
|
|
56934
56960
|
function se() {
|
|
56935
|
-
return /* @__PURE__ */ e(
|
|
56961
|
+
return /* @__PURE__ */ e(tt, { children: xe().map((Se) => /* @__PURE__ */ e(Qs.Fragment, { children: Se.render() }, Se.key)) });
|
|
56936
56962
|
}
|
|
56937
56963
|
function ge() {
|
|
56938
56964
|
const Se = h.ungroupedSort != null && h.ungroupedSort >= h.groups.length, Le = h.slotAssignments.filter(
|
|
56939
56965
|
(J) => J.isVisible && J.groupKey == null && !!((c == null ? void 0 : c[J.slot]) ?? xm[J.slot])
|
|
56940
56966
|
);
|
|
56941
|
-
return /* @__PURE__ */ r(
|
|
56967
|
+
return /* @__PURE__ */ r(tt, { children: [
|
|
56942
56968
|
!Se && oe(),
|
|
56943
56969
|
/* @__PURE__ */ r("div", { className: i, "data-nivaro-tab-strip": !0, role: "tablist", children: [
|
|
56944
56970
|
j.map((J) => /* @__PURE__ */ e(
|
|
@@ -56989,7 +57015,7 @@ function K4({
|
|
|
56989
57015
|
), X = h.ungroupedSort, be = ie.length > 0 && (X == null || X >= j.length) ? Le === Se - 1 : !1;
|
|
56990
57016
|
return (t.fieldsByGroup.get((J == null ? void 0 : J.key) ?? "") ?? []).filter(
|
|
56991
57017
|
($e) => C($e.field)
|
|
56992
|
-
), /* @__PURE__ */ r(
|
|
57018
|
+
), /* @__PURE__ */ r(tt, { children: [
|
|
56993
57019
|
H && G(H),
|
|
56994
57020
|
/* @__PURE__ */ e("div", { className: p, "data-nf-stepper": !0, "data-nf-steps": Se, children: j.map(($e, Re) => /* @__PURE__ */ r(Qs.Fragment, { children: [
|
|
56995
57021
|
Re > 0 && /* @__PURE__ */ e(
|
|
@@ -57060,7 +57086,7 @@ function K4({
|
|
|
57060
57086
|
onClick: () => R(($e) => Math.min(Se - 1, $e + 1)),
|
|
57061
57087
|
children: "Next"
|
|
57062
57088
|
}
|
|
57063
|
-
) : /* @__PURE__ */ r(
|
|
57089
|
+
) : /* @__PURE__ */ r(tt, { children: [
|
|
57064
57090
|
k,
|
|
57065
57091
|
/* @__PURE__ */ e(
|
|
57066
57092
|
"button",
|
|
@@ -57104,7 +57130,7 @@ function I4({
|
|
|
57104
57130
|
);
|
|
57105
57131
|
return s ? /* @__PURE__ */ e(Qs.Fragment, { children: s(h, x) }, h.field) : x();
|
|
57106
57132
|
}, k = (h, x) => {
|
|
57107
|
-
const F = /* @__PURE__ */ e(
|
|
57133
|
+
const F = /* @__PURE__ */ e(tt, { children: x.map((v) => g(v)) });
|
|
57108
57134
|
if (l) {
|
|
57109
57135
|
const v = (h == null ? void 0 : h.key) ?? "__ungrouped__";
|
|
57110
57136
|
return /* @__PURE__ */ e(Qs.Fragment, { children: l(h, F) }, v);
|
|
@@ -57116,7 +57142,7 @@ function I4({
|
|
|
57116
57142
|
}, y = () => {
|
|
57117
57143
|
if (!o) return null;
|
|
57118
57144
|
const h = t.fieldsByGroup.get(null) ?? [];
|
|
57119
|
-
return /* @__PURE__ */ r(
|
|
57145
|
+
return /* @__PURE__ */ r(tt, { children: [
|
|
57120
57146
|
h.length > 0 ? k(null, h) : null,
|
|
57121
57147
|
t.visibleGroups.map((x) => k(x, t.fieldsByGroup.get(x.key) ?? []))
|
|
57122
57148
|
] });
|