@nivaro/react 0.3.64 → 0.3.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +62 -8
- package/dist/shared/components/CollectionBrowserView.js +3127 -3204
- package/dist/shared/components/ConformanceView.js +235 -221
- package/dist/shared/components/DataTable.js +478 -459
- package/dist/shared/components/ItemEditForm.js +4842 -4500
- package/dist/shared/components/MyWorkView.js +124 -113
- package/dist/shared/components/PageRenderer.js +146 -138
- package/dist/shared/components/ProfileView.js +483 -472
- package/dist/shared/components/RecordDrilldownSheet.js +73 -65
- package/dist/shared/components/ReportView.js +1100 -1094
- package/dist/shared/components/bulk/BulkActionButtons.js +72 -72
- package/dist/shared/components/bulk/BulkCompareButton.js +62 -0
- package/dist/shared/components/bulk/BulkFieldUpdate.js +114 -103
- package/dist/shared/components/bulk/BulkFieldUpdateButton.js +73 -0
- package/dist/shared/components/bulk/MessageStakeholders.js +235 -0
- package/dist/shared/components/bulk/bulk-field-options.js +29 -23
- package/dist/shared/components/integrations/IntegrationObligationsView.js +191 -173
- package/dist/shared/components/integrations/IntegrationStatusLines.js +101 -85
- package/dist/shared/components/integrations/RecordIntegrationPreview.js +11 -9
- package/dist/shared/components/integrations/SendCurrentData.js +126 -0
- package/dist/shared/components/item-edit/CatalogPickerField.js +1535 -1440
- package/dist/shared/components/item-edit/FieldRenderer.js +49 -45
- package/dist/shared/components/item-edit/FieldRow.js +413 -403
- package/dist/shared/components/item-edit/GroupSection.js +555 -538
- package/dist/shared/components/item-edit/InlineTableField.js +2903 -2816
- package/dist/shared/components/item-edit/M2MCombobox.js +407 -338
- package/dist/shared/components/item-edit/MidairCollisionDialog.js +367 -116
- package/dist/shared/components/item-edit/NestedRelationEditor.js +171 -163
- package/dist/shared/components/item-edit/PlanGrid.js +783 -724
- package/dist/shared/components/item-edit/QuickCreateButton.js +291 -224
- package/dist/shared/components/item-edit/RecordInsights.js +113 -111
- package/dist/shared/components/item-edit/RecordLiveSync.js +4 -1
- package/dist/shared/components/item-edit/RelationCombobox.js +398 -364
- package/dist/shared/components/item-edit/SummaryPanel.js +146 -144
- package/dist/shared/components/item-edit/UserChip.js +264 -229
- package/dist/shared/components/item-edit/cascade-clear-notice.js +56 -0
- package/dist/shared/components/item-edit/collision-format.js +37 -0
- package/dist/shared/components/item-edit/field-a11y.js +25 -0
- package/dist/shared/components/item-edit/header-path-preview.js +52 -0
- package/dist/shared/components/item-edit/line-merge.js +84 -0
- package/dist/shared/components/item-edit/line-midair.js +94 -87
- package/dist/shared/components/item-edit/move-guard.js +17 -0
- package/dist/shared/components/item-edit/picker-search.js +27 -16
- package/dist/shared/components/item-edit/rail-width.js +8 -0
- package/dist/shared/components/monitoring/InactiveUserLinksView.js +126 -124
- package/dist/shared/components/panels/AccessDeniedPanel.js +96 -55
- package/dist/shared/components/panels/CommentPanel.js +142 -136
- package/dist/shared/components/panels/ItemLockBanner.js +246 -240
- package/dist/shared/components/panels/PipelinePanel.js +1366 -1194
- package/dist/shared/components/panels/RevisionsPanel.js +106 -102
- package/dist/shared/components/panels/SlaBreachBanner.js +16 -20
- package/dist/shared/components/panels/SlaClock.js +90 -68
- package/dist/shared/components/queue/QueueItemSheet.js +94 -87
- package/dist/shared/components/queue/QueueWorklist.js +1522 -1347
- package/dist/shared/components/queue/worklist-csv.js +75 -0
- package/dist/shared/components/queue/worklist-helpers.js +20 -0
- package/dist/shared/components/widgets/ReviewListWidget.js +226 -207
- package/dist/shared/lib/bulk-copy.js +17 -0
- package/dist/shared/lib/cbv-export.js +122 -0
- package/dist/shared/lib/delete-offer.js +13 -0
- package/dist/shared/lib/error-hints.js +1 -0
- package/dist/shared/lib/leave-guard.js +41 -26
- package/dist/shared/lib/list-link.js +72 -56
- package/dist/shared/lib/live-queries.js +32 -30
- package/dist/shared/lib/moved-notice.js +25 -0
- package/dist/shared/lib/notification-target.js +56 -54
- package/dist/shared/lib/obligation-banner.js +11 -8
- package/dist/shared/lib/obligation-reason-text.js +6 -6
- package/dist/shared/lib/quick-filter-cascade.js +29 -19
- package/dist/shared/lib/sort-cycle.js +6 -0
- package/dist/shared/lib/summary-mode.js +59 -41
- package/package.json +1 -1
|
@@ -1,138 +1,161 @@
|
|
|
1
1
|
import { jsx as t, jsxs as l } from "react/jsx-runtime";
|
|
2
|
-
import { useQuery as
|
|
3
|
-
import { UserCheck as
|
|
4
|
-
import R, { useState as
|
|
5
|
-
import { createPortal as
|
|
6
|
-
import { useOptionalNivaroClient as
|
|
7
|
-
import { get as B, post as
|
|
8
|
-
import { userCardQuery as
|
|
9
|
-
import { cn as
|
|
10
|
-
import { canOpenDm as
|
|
11
|
-
import { HuddlePresenceLine as
|
|
12
|
-
import { useHuddleLive as
|
|
13
|
-
import { MailSuppressedPill as
|
|
14
|
-
import { useReloadTheirTabs as
|
|
15
|
-
import { useCardPresence as
|
|
16
|
-
import { UserAvatar as
|
|
17
|
-
import { Popover as
|
|
18
|
-
function E(e, n,
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
const d =
|
|
22
|
-
d.current =
|
|
2
|
+
import { useQuery as _ } from "@tanstack/react-query";
|
|
3
|
+
import { UserCheck as q, Mail as D, Phone as F, Building2 as z, User as L, Clock as K, MessageCircle as W, ExternalLink as H, RefreshCw as J, LogOut as Z } from "lucide-react";
|
|
4
|
+
import R, { useState as S, useRef as C, useEffect as $ } from "react";
|
|
5
|
+
import { createPortal as V } from "react-dom";
|
|
6
|
+
import { useOptionalNivaroClient as T, useNavigation as G, useItemEditAuth as X } from "../../context.js";
|
|
7
|
+
import { get as B, post as Y } from "../../lib/commands.js";
|
|
8
|
+
import { userCardQuery as M } from "../../lib/user-cards.js";
|
|
9
|
+
import { cn as P } from "../../lib/utils.js";
|
|
10
|
+
import { canOpenDm as A, openDmWith as I } from "../chat/chat-core.js";
|
|
11
|
+
import { HuddlePresenceLine as Q } from "../chat/huddle/HuddleLiveBadge.js";
|
|
12
|
+
import { useHuddleLive as ee } from "../chat/huddle/huddle-live.js";
|
|
13
|
+
import { MailSuppressedPill as te } from "../profile/MailSuppressedPill.js";
|
|
14
|
+
import { useReloadTheirTabs as ae, useSignOutEverywhere as ne } from "../profile/session-actions.js";
|
|
15
|
+
import { useCardPresence as re } from "../profile/usePersonPresence.js";
|
|
16
|
+
import { UserAvatar as j } from "../UserAvatar.js";
|
|
17
|
+
import { Popover as le, PopoverTrigger as ie, PopoverContent as se } from "../ui/popover.js";
|
|
18
|
+
function E(e, n, s) {
|
|
19
|
+
const i = C(n);
|
|
20
|
+
i.current = n;
|
|
21
|
+
const d = C(s);
|
|
22
|
+
d.current = s, $(() => {
|
|
23
23
|
if (!e) return;
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
},
|
|
28
|
-
return document.addEventListener("pointerdown",
|
|
29
|
-
document.removeEventListener("pointerdown",
|
|
24
|
+
const o = (r) => {
|
|
25
|
+
const p = r.target;
|
|
26
|
+
p && i.current(p) || d.current();
|
|
27
|
+
}, c = () => d.current();
|
|
28
|
+
return document.addEventListener("pointerdown", o, !0), window.addEventListener("blur", c), () => {
|
|
29
|
+
document.removeEventListener("pointerdown", o, !0), window.removeEventListener("blur", c);
|
|
30
30
|
};
|
|
31
31
|
}, [e]);
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function oe(e) {
|
|
34
34
|
const n = String(e ?? "").trim();
|
|
35
|
-
return !n || /^redacted\b/i.test(n) ? "" : n.split(/\s+/).map((
|
|
35
|
+
return !n || /^redacted\b/i.test(n) ? "" : n.split(/\s+/).map((s) => s[0]).filter(Boolean).slice(0, 2).join("").toUpperCase();
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
const
|
|
39
|
-
return
|
|
37
|
+
function de(e, n) {
|
|
38
|
+
const s = String(e ?? "").trim();
|
|
39
|
+
return s || [n == null ? void 0 : n.first_name, n == null ? void 0 : n.last_name].filter(Boolean).join(" ").trim();
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function ce({
|
|
42
42
|
user: e,
|
|
43
43
|
avatarCls: n
|
|
44
44
|
}) {
|
|
45
|
-
const
|
|
46
|
-
...
|
|
47
|
-
enabled: !!
|
|
45
|
+
const s = T(), { data: i } = _({
|
|
46
|
+
...M(s, e.id),
|
|
47
|
+
enabled: !!s && !!e.id && !String(e.name ?? "").trim(),
|
|
48
48
|
staleTime: 30 * 6e4,
|
|
49
49
|
retry: !1
|
|
50
|
-
}), d =
|
|
50
|
+
}), d = de(e.name, i), o = oe(d), c = /^redacted\b/i.test(d);
|
|
51
51
|
return /* @__PURE__ */ t(
|
|
52
52
|
"span",
|
|
53
53
|
{
|
|
54
54
|
className: "inline-flex",
|
|
55
|
-
"data-tip":
|
|
55
|
+
"data-tip": c ? "Former user (account redacted)" : d || void 0,
|
|
56
56
|
children: /* @__PURE__ */ t(
|
|
57
|
-
|
|
57
|
+
j,
|
|
58
58
|
{
|
|
59
59
|
userId: e.id,
|
|
60
60
|
className: "h-6 w-6 border-2 border-white dark:border-slate-900",
|
|
61
|
-
fallback: /* @__PURE__ */ t("span", { "data-copy-skip": !0, "aria-hidden": "true", className: n, children:
|
|
61
|
+
fallback: /* @__PURE__ */ t("span", { "data-copy-skip": !0, "aria-hidden": "true", className: n, children: o || /* @__PURE__ */ t(L, { className: "h-3 w-3", "aria-hidden": !0 }) })
|
|
62
62
|
}
|
|
63
63
|
)
|
|
64
64
|
}
|
|
65
65
|
);
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function me(e) {
|
|
68
|
+
if (e.length === 0) return null;
|
|
69
|
+
const n = e.find((s) => !s.inactive) ?? e[0];
|
|
70
|
+
return { name: n.name, more: e.length - 1, mark: n.inactive ?? null };
|
|
71
|
+
}
|
|
72
|
+
function pe({
|
|
68
73
|
users: e,
|
|
69
|
-
showSingleName: n = !0
|
|
74
|
+
showSingleName: n = !0,
|
|
75
|
+
nameLabel: s = !1
|
|
70
76
|
}) {
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
},
|
|
74
|
-
var
|
|
77
|
+
const i = C(null), d = C(null), o = C(null), [c, r] = S(null), [p, u] = S({ x: 0, y: 0 }), b = () => {
|
|
78
|
+
o.current && clearTimeout(o.current), o.current = null;
|
|
79
|
+
}, y = (a) => {
|
|
80
|
+
var h;
|
|
75
81
|
b();
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
},
|
|
79
|
-
b(),
|
|
82
|
+
const x = (h = i.current) == null ? void 0 : h.getBoundingClientRect();
|
|
83
|
+
x && u({ x: x.left, y: x.bottom + 6 }), r((f) => f === "pin" ? "pin" : a);
|
|
84
|
+
}, m = () => {
|
|
85
|
+
b(), o.current = setTimeout(() => r((a) => a === "pin" ? a : null), 160);
|
|
80
86
|
};
|
|
81
87
|
if (R.useLayoutEffect(() => {
|
|
82
|
-
var
|
|
88
|
+
var g;
|
|
83
89
|
if (!c) return;
|
|
84
|
-
const
|
|
85
|
-
if (!
|
|
86
|
-
const
|
|
87
|
-
let { x, y:
|
|
88
|
-
if (
|
|
89
|
-
const
|
|
90
|
-
|
|
90
|
+
const a = d.current;
|
|
91
|
+
if (!a) return;
|
|
92
|
+
const x = a.getBoundingClientRect();
|
|
93
|
+
let { x: h, y: f } = p;
|
|
94
|
+
if (x.right > window.innerWidth - 8 && (h = Math.max(8, window.innerWidth - x.width - 8)), x.bottom > window.innerHeight - 8) {
|
|
95
|
+
const k = (g = i.current) == null ? void 0 : g.getBoundingClientRect();
|
|
96
|
+
f = Math.max(8, ((k == null ? void 0 : k.top) ?? f) - x.height - 6);
|
|
91
97
|
}
|
|
92
|
-
(
|
|
93
|
-
}, [c,
|
|
98
|
+
(h !== p.x || f !== p.y) && u({ x: h, y: f });
|
|
99
|
+
}, [c, p]), E(
|
|
94
100
|
!!c,
|
|
95
|
-
(
|
|
96
|
-
var
|
|
101
|
+
(a) => {
|
|
102
|
+
var x, h, f;
|
|
97
103
|
return (
|
|
98
104
|
// Clicks inside the user-card popover (portaled by Radix) keep the
|
|
99
105
|
// roster mounted — closing would unmount the card mid-click.
|
|
100
|
-
!!((
|
|
106
|
+
!!((x = a.closest) != null && x.call(a, "[data-radix-popper-content-wrapper]")) || !!((h = d.current) != null && h.contains(a)) || !!((f = i.current) != null && f.contains(a))
|
|
101
107
|
);
|
|
102
108
|
},
|
|
103
|
-
() =>
|
|
109
|
+
() => r(null)
|
|
104
110
|
), e.length === 0)
|
|
105
111
|
return /* @__PURE__ */ t("span", { className: "text-[11px] text-slate-400", "data-roster-empty": !0, children: "—" });
|
|
106
|
-
const
|
|
112
|
+
const w = e.slice(0, 4), v = e.length - w.length, N = "flex h-6 w-6 items-center justify-center rounded-full border-2 border-white bg-[#c7f0fb] text-[10px] font-bold leading-none text-[#04516b] dark:border-slate-900 dark:bg-[#0c3b4a] dark:text-[#7dd8f2]";
|
|
107
113
|
return /* @__PURE__ */ l(
|
|
108
114
|
"span",
|
|
109
115
|
{
|
|
110
|
-
ref:
|
|
111
|
-
onMouseEnter: () =>
|
|
112
|
-
onMouseLeave:
|
|
113
|
-
onClick: (
|
|
114
|
-
|
|
116
|
+
ref: i,
|
|
117
|
+
onMouseEnter: () => y("hover"),
|
|
118
|
+
onMouseLeave: m,
|
|
119
|
+
onClick: (a) => {
|
|
120
|
+
a.stopPropagation(), y("pin");
|
|
115
121
|
},
|
|
116
122
|
className: "inline-flex cursor-pointer items-center",
|
|
117
123
|
children: [
|
|
118
|
-
/* @__PURE__ */ t("span", { className: "flex -space-x-2", children:
|
|
124
|
+
/* @__PURE__ */ t("span", { className: "flex -space-x-2", children: w.map((a) => /* @__PURE__ */ t(ce, { user: a, avatarCls: N }, a.id)) }),
|
|
119
125
|
v > 0 && /* @__PURE__ */ l("span", { className: "ml-1 rounded-full bg-slate-200 px-1.5 py-0.5 text-[10.5px] font-bold leading-none text-slate-600 dark:bg-slate-700 dark:text-slate-300", children: [
|
|
120
126
|
"+",
|
|
121
127
|
v
|
|
122
128
|
] }),
|
|
123
|
-
|
|
124
|
-
|
|
129
|
+
s ? (() => {
|
|
130
|
+
const a = me(e);
|
|
131
|
+
return a ? /* @__PURE__ */ l(
|
|
132
|
+
"span",
|
|
133
|
+
{
|
|
134
|
+
"data-roster-label": "",
|
|
135
|
+
className: "ml-1.5 inline-flex max-w-[170px] items-baseline gap-1 text-[12px] font-medium text-slate-700 dark:text-slate-200",
|
|
136
|
+
children: [
|
|
137
|
+
/* @__PURE__ */ t("span", { className: "truncate", children: a.name }),
|
|
138
|
+
a.mark && /* @__PURE__ */ t(O, { mark: a.mark }),
|
|
139
|
+
a.more > 0 && /* @__PURE__ */ l("span", { className: "shrink-0 text-slate-500 dark:text-slate-400", children: [
|
|
140
|
+
"+",
|
|
141
|
+
a.more
|
|
142
|
+
] })
|
|
143
|
+
]
|
|
144
|
+
}
|
|
145
|
+
) : null;
|
|
146
|
+
})() : n && e.length === 1 && /* @__PURE__ */ t("span", { className: "ml-1.5 max-w-[130px] truncate text-[12px] font-medium text-slate-700 dark:text-slate-200", children: e[0].name }),
|
|
147
|
+
c && V(
|
|
125
148
|
/* @__PURE__ */ l(
|
|
126
149
|
"div",
|
|
127
150
|
{
|
|
128
|
-
ref:
|
|
129
|
-
style:
|
|
151
|
+
ref: d,
|
|
152
|
+
style: xe(i.current, p),
|
|
130
153
|
onMouseEnter: b,
|
|
131
|
-
onMouseLeave:
|
|
132
|
-
onMouseDown: (
|
|
133
|
-
|
|
154
|
+
onMouseLeave: m,
|
|
155
|
+
onMouseDown: (a) => {
|
|
156
|
+
a.stopPropagation(), r("pin");
|
|
134
157
|
},
|
|
135
|
-
onClick: (
|
|
158
|
+
onClick: (a) => a.stopPropagation(),
|
|
136
159
|
className: "w-max min-w-[190px] max-w-[300px] rounded-lg border border-slate-200 bg-white py-1.5 shadow-xl dark:border-slate-600 dark:bg-slate-800",
|
|
137
160
|
children: [
|
|
138
161
|
/* @__PURE__ */ l("p", { className: "px-3 pb-1 text-[10px] font-bold uppercase tracking-wide text-slate-400", children: [
|
|
@@ -140,141 +163,152 @@ function ce({
|
|
|
140
163
|
" user",
|
|
141
164
|
e.length === 1 ? "" : "s"
|
|
142
165
|
] }),
|
|
143
|
-
e.map((
|
|
166
|
+
e.map((a) => /* @__PURE__ */ l("div", { className: "flex items-center gap-1.5 px-2 py-0.5", children: [
|
|
167
|
+
/* @__PURE__ */ t(be, { userId: a.id, size: "compact" }),
|
|
168
|
+
a.inactive && /* @__PURE__ */ t(O, { mark: a.inactive })
|
|
169
|
+
] }, a.id))
|
|
144
170
|
]
|
|
145
171
|
}
|
|
146
172
|
),
|
|
147
|
-
|
|
173
|
+
U(i.current)
|
|
148
174
|
)
|
|
149
175
|
]
|
|
150
176
|
}
|
|
151
177
|
);
|
|
152
178
|
}
|
|
153
|
-
function
|
|
179
|
+
function O({ mark: e }) {
|
|
180
|
+
return /* @__PURE__ */ t(
|
|
181
|
+
"span",
|
|
182
|
+
{
|
|
183
|
+
"data-roster-inactive": e,
|
|
184
|
+
className: "shrink-0 rounded border border-amber-300 px-1 text-[10px] font-medium leading-tight text-amber-700 dark:border-amber-500/50 dark:text-amber-300",
|
|
185
|
+
children: e === "suspended" ? "suspended" : "former"
|
|
186
|
+
}
|
|
187
|
+
);
|
|
188
|
+
}
|
|
189
|
+
function U(e) {
|
|
154
190
|
return (e == null ? void 0 : e.closest('[role="dialog"]')) ?? document.body;
|
|
155
191
|
}
|
|
156
|
-
function
|
|
157
|
-
const
|
|
158
|
-
if (
|
|
159
|
-
const
|
|
160
|
-
return { position: "absolute", left: n.x -
|
|
192
|
+
function xe(e, n) {
|
|
193
|
+
const s = U(e);
|
|
194
|
+
if (s === document.body) return { position: "fixed", left: n.x, top: n.y, zIndex: 50 };
|
|
195
|
+
const i = s.getBoundingClientRect();
|
|
196
|
+
return { position: "absolute", left: n.x - i.left, top: n.y - i.top, zIndex: 120 };
|
|
161
197
|
}
|
|
162
|
-
function
|
|
198
|
+
function Be({
|
|
163
199
|
collection: e,
|
|
164
200
|
itemId: n
|
|
165
201
|
}) {
|
|
166
|
-
const
|
|
167
|
-
data:
|
|
202
|
+
const s = T(), {
|
|
203
|
+
data: i = [],
|
|
168
204
|
isLoading: d,
|
|
169
|
-
isFetching:
|
|
170
|
-
} =
|
|
205
|
+
isFetching: o
|
|
206
|
+
} = _({
|
|
171
207
|
queryKey: ["pipeline-owners-resolved", e, n],
|
|
172
|
-
queryFn: () =>
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
var a;
|
|
176
|
-
return ((a = m.data) == null ? void 0 : a[n]) ?? [];
|
|
208
|
+
queryFn: () => s.request(Y(`/pipelines/instance/${e}/owners/batch`, { ids: [n] })).then((c) => {
|
|
209
|
+
var r;
|
|
210
|
+
return ((r = c.data) == null ? void 0 : r[n]) ?? [];
|
|
177
211
|
}),
|
|
178
|
-
enabled: !!
|
|
212
|
+
enabled: !!s && !!e && !!n && n !== "new",
|
|
179
213
|
staleTime: 3e4,
|
|
180
214
|
// Keep this RECORD's last answer while a move re-asks (the tile used to go
|
|
181
215
|
// blank for ~2 s after Submit) — never another record's (b01-N15).
|
|
182
|
-
placeholderData: (
|
|
216
|
+
placeholderData: (c, r) => (r == null ? void 0 : r.queryKey[1]) === e && String(r == null ? void 0 : r.queryKey[2]) === String(n) ? c : void 0
|
|
183
217
|
});
|
|
184
|
-
return d ||
|
|
218
|
+
return d || o && i.length === 0 ? /* @__PURE__ */ t("span", { className: "animate-pulse h-3 w-20 rounded bg-slate-200 dark:bg-[hsl(var(--nvr-skeleton))] inline-block" }) : /* @__PURE__ */ t(pe, { users: i, nameLabel: !0 });
|
|
185
219
|
}
|
|
186
|
-
function
|
|
220
|
+
function Me({
|
|
187
221
|
collection: e,
|
|
188
222
|
itemId: n,
|
|
189
|
-
label:
|
|
223
|
+
label: s
|
|
190
224
|
}) {
|
|
191
|
-
const
|
|
225
|
+
const i = T(), { data: d = [] } = _({
|
|
192
226
|
queryKey: ["pipeline-instance-owners", e, n],
|
|
193
|
-
queryFn: () =>
|
|
194
|
-
enabled: !!
|
|
227
|
+
queryFn: () => i.request(B(`/pipelines/instance/${e}/${n}/owners`)).then((r) => r.data ?? []),
|
|
228
|
+
enabled: !!i && !!e && !!n && n !== "new",
|
|
195
229
|
staleTime: 3e4
|
|
196
|
-
}),
|
|
230
|
+
}), o = (r) => [r.first_name, r.last_name].filter(Boolean).join(" ") || r.email, c = (r) => o(r).split(" ").map((p) => p[0]).filter(Boolean).slice(0, 2).join("").toUpperCase();
|
|
197
231
|
return /* @__PURE__ */ l("div", { children: [
|
|
198
|
-
/* @__PURE__ */ t("p", { className: "text-[11px] font-medium text-slate-400 mb-1.5", children:
|
|
199
|
-
d.length === 0 ? /* @__PURE__ */ t("p", { className: "text-[13px] text-slate-400", children: "—" }) : /* @__PURE__ */ t("div", { className: "flex flex-wrap gap-2", children: d.map((
|
|
232
|
+
/* @__PURE__ */ t("p", { className: "text-[11px] font-medium text-slate-400 mb-1.5", children: s }),
|
|
233
|
+
d.length === 0 ? /* @__PURE__ */ t("p", { className: "text-[13px] text-slate-400", children: "—" }) : /* @__PURE__ */ t("div", { className: "flex flex-wrap gap-2", children: d.map((r) => /* @__PURE__ */ l(
|
|
200
234
|
"div",
|
|
201
235
|
{
|
|
202
236
|
className: "flex items-center gap-1.5 rounded-full border border-slate-200 bg-slate-50 py-0.5 pl-0.5 pr-2.5",
|
|
203
237
|
children: [
|
|
204
238
|
/* @__PURE__ */ t(
|
|
205
|
-
|
|
239
|
+
j,
|
|
206
240
|
{
|
|
207
|
-
userId:
|
|
241
|
+
userId: r.id,
|
|
208
242
|
className: "h-6 w-6",
|
|
209
|
-
fallback: /* @__PURE__ */ t("span", { className: "flex h-6 w-6 items-center justify-center rounded-full bg-nvr-cyan/15 text-[10px] font-semibold text-nvr-navy dark:text-nvr-cyan", children:
|
|
243
|
+
fallback: /* @__PURE__ */ t("span", { className: "flex h-6 w-6 items-center justify-center rounded-full bg-nvr-cyan/15 text-[10px] font-semibold text-nvr-navy dark:text-nvr-cyan", children: c(r) })
|
|
210
244
|
}
|
|
211
245
|
),
|
|
212
|
-
/* @__PURE__ */ t("span", { className: "text-[12px] text-slate-700", children:
|
|
246
|
+
/* @__PURE__ */ t("span", { className: "text-[12px] text-slate-700", children: o(r) })
|
|
213
247
|
]
|
|
214
248
|
},
|
|
215
|
-
|
|
249
|
+
r.id
|
|
216
250
|
)) })
|
|
217
251
|
] });
|
|
218
252
|
}
|
|
219
|
-
function
|
|
253
|
+
function fe({
|
|
220
254
|
user: e,
|
|
221
255
|
userId: n,
|
|
222
|
-
initials:
|
|
223
|
-
navigate:
|
|
256
|
+
initials: s,
|
|
257
|
+
navigate: i,
|
|
224
258
|
profileUrl: d,
|
|
225
|
-
online:
|
|
226
|
-
cardId:
|
|
227
|
-
onAction:
|
|
228
|
-
open:
|
|
259
|
+
online: o,
|
|
260
|
+
cardId: c,
|
|
261
|
+
onAction: r,
|
|
262
|
+
open: p = !1
|
|
229
263
|
}) {
|
|
230
264
|
var h;
|
|
231
|
-
const { isAdmin:
|
|
232
|
-
const
|
|
233
|
-
if (!
|
|
265
|
+
const { isAdmin: u, userId: b } = X(), y = !!b && b.toUpperCase() === n.toUpperCase(), m = re(n, p), w = ee().roomOf(n), v = ((h = e == null ? void 0 : e.manager_name) == null ? void 0 : h.trim()) || null, N = (() => {
|
|
266
|
+
const f = e == null ? void 0 : e.timezone;
|
|
267
|
+
if (!f) return null;
|
|
234
268
|
try {
|
|
235
269
|
const g = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
236
|
-
return
|
|
270
|
+
return f === g ? null : new Intl.DateTimeFormat(void 0, {
|
|
237
271
|
hour: "numeric",
|
|
238
272
|
minute: "2-digit",
|
|
239
|
-
timeZone:
|
|
273
|
+
timeZone: f
|
|
240
274
|
}).format(/* @__PURE__ */ new Date());
|
|
241
275
|
} catch {
|
|
242
276
|
return null;
|
|
243
277
|
}
|
|
244
|
-
})(), x = !!
|
|
245
|
-
const
|
|
278
|
+
})(), x = !!o || !!m.word ? m.word ? null : "Just now" : e != null && e.last_access ? (() => {
|
|
279
|
+
const f = Date.now() - new Date(e.last_access).getTime(), g = Math.floor(f / 6e4);
|
|
246
280
|
if (g < 2) return "Just now";
|
|
247
281
|
if (g < 60) return `${g}m ago`;
|
|
248
|
-
const
|
|
249
|
-
return
|
|
282
|
+
const k = Math.floor(g / 60);
|
|
283
|
+
return k < 24 ? `${k}h ago` : `${Math.floor(k / 24)}d ago`;
|
|
250
284
|
})() : null;
|
|
251
285
|
return /* @__PURE__ */ l(
|
|
252
286
|
se,
|
|
253
287
|
{
|
|
254
288
|
align: "start",
|
|
255
289
|
className: "w-72 p-0 overflow-hidden",
|
|
256
|
-
"data-nvr-user-card":
|
|
290
|
+
"data-nvr-user-card": c ?? "",
|
|
257
291
|
children: [
|
|
258
292
|
/* @__PURE__ */ l("div", { className: "flex items-center gap-3 p-4 bg-gradient-to-br from-nvr-cyan/8 to-nvr-cyan/4 dark:from-nvr-cyan/10 dark:to-transparent border-b border-slate-100 dark:border-border", children: [
|
|
259
293
|
/* @__PURE__ */ t(
|
|
260
|
-
|
|
294
|
+
j,
|
|
261
295
|
{
|
|
262
296
|
userId: n,
|
|
263
297
|
className: "h-12 w-12 ring-2 ring-white shadow-sm dark:ring-card",
|
|
264
|
-
fallback: /* @__PURE__ */ t("span", { className: "flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-nvr-cyan/20 text-[15px] font-bold text-nvr-navy dark:text-nvr-cyan ring-2 ring-white dark:ring-card shadow-sm", children:
|
|
298
|
+
fallback: /* @__PURE__ */ t("span", { className: "flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-nvr-cyan/20 text-[15px] font-bold text-nvr-navy dark:text-nvr-cyan ring-2 ring-white dark:ring-card shadow-sm", children: s })
|
|
265
299
|
}
|
|
266
300
|
),
|
|
267
301
|
/* @__PURE__ */ l("div", { className: "min-w-0 flex-1", children: [
|
|
268
302
|
/* @__PURE__ */ l("div", { className: "flex items-center gap-1.5", children: [
|
|
269
|
-
(
|
|
303
|
+
(o || m.word) && /* @__PURE__ */ t(
|
|
270
304
|
"span",
|
|
271
305
|
{
|
|
272
|
-
"data-card-presence":
|
|
273
|
-
className:
|
|
306
|
+
"data-card-presence": m.word ?? "online",
|
|
307
|
+
className: P(
|
|
274
308
|
"h-2 w-2 shrink-0 rounded-full ring-2 ring-white dark:ring-card",
|
|
275
|
-
|
|
309
|
+
m.word === "away" ? "bg-white ring-amber-400 dark:bg-card" : m.word === "idle" ? "bg-amber-400" : "bg-emerald-400"
|
|
276
310
|
),
|
|
277
|
-
title:
|
|
311
|
+
title: m.word === "away" ? "Away" : m.word === "idle" ? "Idle" : "Online"
|
|
278
312
|
}
|
|
279
313
|
),
|
|
280
314
|
/* @__PURE__ */ t("p", { className: "text-[13px] font-semibold text-slate-800 dark:text-slate-100 truncate", children: e ? [e.first_name, e.last_name].filter(Boolean).join(" ") || e.email : n }),
|
|
@@ -287,32 +321,32 @@ function pe({
|
|
|
287
321
|
)
|
|
288
322
|
] }),
|
|
289
323
|
((e == null ? void 0 : e.title) || (e == null ? void 0 : e.department)) && /* @__PURE__ */ t("p", { className: "text-[11px] text-slate-500 dark:text-slate-400 truncate mt-0.5", children: [e.title, e.department].filter(Boolean).join(" · ") }),
|
|
290
|
-
|
|
324
|
+
m.word && /* @__PURE__ */ l(
|
|
291
325
|
"p",
|
|
292
326
|
{
|
|
293
327
|
className: "mt-0.5 truncate text-[11px] text-slate-500 dark:text-slate-400",
|
|
294
328
|
"data-card-presence-line": !0,
|
|
295
329
|
children: [
|
|
296
|
-
|
|
297
|
-
|
|
330
|
+
m.word === "away" ? "Away" : m.word === "idle" ? `Idle${m.minutes ? ` · ${m.minutes}m` : ""}` : "Online now",
|
|
331
|
+
m.page ? ` · on ${m.page}` : ""
|
|
298
332
|
]
|
|
299
333
|
}
|
|
300
334
|
),
|
|
301
|
-
/* @__PURE__ */ t(
|
|
302
|
-
|
|
335
|
+
/* @__PURE__ */ t(Q, { label: (w == null ? void 0 : w.label) ?? null, className: "mt-0.5" }),
|
|
336
|
+
N && /* @__PURE__ */ l("p", { className: "mt-0.5 text-[11px] text-slate-500 dark:text-slate-400", children: [
|
|
303
337
|
"Local time: ",
|
|
304
|
-
|
|
338
|
+
N
|
|
305
339
|
] }),
|
|
306
340
|
(e == null ? void 0 : e.is_out_of_office) && /* @__PURE__ */ l("span", { className: "mt-1 inline-flex items-center gap-1 rounded-full bg-amber-100 dark:bg-amber-900/30 px-1.5 py-px text-[10px] font-medium text-amber-700 dark:text-amber-400", children: [
|
|
307
|
-
/* @__PURE__ */ t(
|
|
341
|
+
/* @__PURE__ */ t(q, { className: "h-2.5 w-2.5" }),
|
|
308
342
|
" Out of office"
|
|
309
343
|
] }),
|
|
310
344
|
/* @__PURE__ */ t(
|
|
311
|
-
|
|
345
|
+
te,
|
|
312
346
|
{
|
|
313
347
|
email: e == null ? void 0 : e.email,
|
|
314
|
-
enabled:
|
|
315
|
-
canClear:
|
|
348
|
+
enabled: p,
|
|
349
|
+
canClear: u,
|
|
316
350
|
className: "mt-1"
|
|
317
351
|
}
|
|
318
352
|
)
|
|
@@ -325,7 +359,7 @@ function pe({
|
|
|
325
359
|
href: `mailto:${e.email}`,
|
|
326
360
|
className: "flex items-center gap-2 text-[12px] text-slate-600 dark:text-slate-300 hover:text-nvr-navy dark:hover:text-nvr-cyan transition-colors truncate group",
|
|
327
361
|
children: [
|
|
328
|
-
/* @__PURE__ */ t(
|
|
362
|
+
/* @__PURE__ */ t(D, { className: "h-3.5 w-3.5 shrink-0 text-slate-400 group-hover:text-nvr-cyan transition-colors" }),
|
|
329
363
|
/* @__PURE__ */ t("span", { className: "truncate", children: e.email })
|
|
330
364
|
]
|
|
331
365
|
}
|
|
@@ -336,27 +370,27 @@ function pe({
|
|
|
336
370
|
href: `tel:${e.phone}`,
|
|
337
371
|
className: "flex items-center gap-2 text-[12px] text-slate-600 dark:text-slate-300 hover:text-nvr-navy dark:hover:text-nvr-cyan transition-colors group",
|
|
338
372
|
children: [
|
|
339
|
-
/* @__PURE__ */ t(
|
|
373
|
+
/* @__PURE__ */ t(F, { className: "h-3.5 w-3.5 shrink-0 text-slate-400 group-hover:text-nvr-cyan transition-colors" }),
|
|
340
374
|
/* @__PURE__ */ t("span", { children: e.phone })
|
|
341
375
|
]
|
|
342
376
|
}
|
|
343
377
|
)
|
|
344
378
|
] }),
|
|
345
|
-
((e == null ? void 0 : e.role_name) ||
|
|
379
|
+
((e == null ? void 0 : e.role_name) || v || x) && /* @__PURE__ */ l("div", { className: "px-4 py-3 space-y-1.5 border-b border-slate-100 dark:border-border", children: [
|
|
346
380
|
(e == null ? void 0 : e.role_name) && /* @__PURE__ */ l("div", { className: "flex items-center gap-2 text-[11px] text-slate-500 dark:text-slate-400", children: [
|
|
347
|
-
/* @__PURE__ */ t(
|
|
381
|
+
/* @__PURE__ */ t(z, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
348
382
|
/* @__PURE__ */ t("span", { children: e.role_name })
|
|
349
383
|
] }),
|
|
350
|
-
|
|
351
|
-
/* @__PURE__ */ t(
|
|
384
|
+
v && /* @__PURE__ */ l("div", { className: "flex items-center gap-2 text-[11px] text-slate-500 dark:text-slate-400", children: [
|
|
385
|
+
/* @__PURE__ */ t(L, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
352
386
|
/* @__PURE__ */ l("span", { children: [
|
|
353
387
|
"Reports to",
|
|
354
388
|
" ",
|
|
355
|
-
/* @__PURE__ */ t("span", { className: "font-medium text-slate-600 dark:text-slate-300", children:
|
|
389
|
+
/* @__PURE__ */ t("span", { className: "font-medium text-slate-600 dark:text-slate-300", children: v })
|
|
356
390
|
] })
|
|
357
391
|
] }),
|
|
358
392
|
x && /* @__PURE__ */ l("div", { className: "flex items-center gap-2 text-[11px] text-slate-400", children: [
|
|
359
|
-
/* @__PURE__ */ t(
|
|
393
|
+
/* @__PURE__ */ t(K, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
360
394
|
/* @__PURE__ */ l("span", { children: [
|
|
361
395
|
"Last seen ",
|
|
362
396
|
x
|
|
@@ -369,28 +403,28 @@ function pe({
|
|
|
369
403
|
{
|
|
370
404
|
type: "button",
|
|
371
405
|
onClick: () => {
|
|
372
|
-
|
|
406
|
+
r == null || r(), i(d);
|
|
373
407
|
},
|
|
374
408
|
className: "flex flex-1 items-center justify-center gap-1.5 whitespace-nowrap rounded-md px-2 py-1.5 text-[11px] font-medium text-slate-600 dark:text-slate-300 hover:bg-slate-100 dark:hover:bg-accent transition-colors",
|
|
375
409
|
children: [
|
|
376
|
-
/* @__PURE__ */ t(
|
|
410
|
+
/* @__PURE__ */ t(L, { className: "h-3.5 w-3.5" }),
|
|
377
411
|
" View profile"
|
|
378
412
|
]
|
|
379
413
|
}
|
|
380
414
|
),
|
|
381
|
-
|
|
415
|
+
A() && /* @__PURE__ */ l(
|
|
382
416
|
"button",
|
|
383
417
|
{
|
|
384
418
|
type: "button",
|
|
385
419
|
onClick: () => {
|
|
386
|
-
|
|
420
|
+
r == null || r(), I(
|
|
387
421
|
n,
|
|
388
422
|
e ? [e.first_name, e.last_name].filter(Boolean).join(" ") || e.email : void 0
|
|
389
423
|
);
|
|
390
424
|
},
|
|
391
425
|
className: "flex flex-1 items-center justify-center gap-1.5 whitespace-nowrap rounded-md px-2 py-1.5 text-[11px] font-medium text-slate-600 dark:text-slate-300 hover:bg-slate-100 dark:hover:bg-accent transition-colors",
|
|
392
426
|
children: [
|
|
393
|
-
/* @__PURE__ */ t(
|
|
427
|
+
/* @__PURE__ */ t(W, { className: "h-3.5 w-3.5" }),
|
|
394
428
|
" Message"
|
|
395
429
|
]
|
|
396
430
|
}
|
|
@@ -400,40 +434,40 @@ function pe({
|
|
|
400
434
|
{
|
|
401
435
|
type: "button",
|
|
402
436
|
onClick: () => {
|
|
403
|
-
|
|
437
|
+
r == null || r(), window.location.href = `mailto:${e.email}`;
|
|
404
438
|
},
|
|
405
439
|
className: "flex flex-1 items-center justify-center gap-1.5 whitespace-nowrap rounded-md px-2 py-1.5 text-[11px] font-medium text-slate-600 dark:text-slate-300 hover:bg-slate-100 dark:hover:bg-accent transition-colors",
|
|
406
440
|
children: [
|
|
407
|
-
/* @__PURE__ */ t(
|
|
441
|
+
/* @__PURE__ */ t(H, { className: "h-3.5 w-3.5" }),
|
|
408
442
|
" Email"
|
|
409
443
|
]
|
|
410
444
|
}
|
|
411
445
|
)
|
|
412
446
|
] }),
|
|
413
|
-
|
|
414
|
-
|
|
447
|
+
u && !y && /* @__PURE__ */ t(
|
|
448
|
+
he,
|
|
415
449
|
{
|
|
416
450
|
userId: n,
|
|
417
451
|
name: e ? [e.first_name, e.last_name].filter(Boolean).join(" ") || e.email : n,
|
|
418
|
-
onDone:
|
|
452
|
+
onDone: r
|
|
419
453
|
}
|
|
420
454
|
)
|
|
421
455
|
]
|
|
422
456
|
}
|
|
423
457
|
);
|
|
424
458
|
}
|
|
425
|
-
function
|
|
459
|
+
function he({
|
|
426
460
|
userId: e,
|
|
427
461
|
name: n,
|
|
428
|
-
onDone:
|
|
462
|
+
onDone: s
|
|
429
463
|
}) {
|
|
430
|
-
const [
|
|
464
|
+
const [i, d] = S(!1);
|
|
431
465
|
$(() => {
|
|
432
|
-
if (!
|
|
433
|
-
const
|
|
434
|
-
return () => clearTimeout(
|
|
435
|
-
}, [
|
|
436
|
-
const
|
|
466
|
+
if (!i) return;
|
|
467
|
+
const p = setTimeout(() => d(!1), 4e3);
|
|
468
|
+
return () => clearTimeout(p);
|
|
469
|
+
}, [i]);
|
|
470
|
+
const o = ae(e, { onDone: s }), c = ne(e, n, { onDone: s }), r = "flex flex-1 items-center justify-center gap-1.5 rounded-md px-2 py-1.5 text-[11px] font-medium transition-colors disabled:opacity-50";
|
|
437
471
|
return /* @__PURE__ */ l(
|
|
438
472
|
"div",
|
|
439
473
|
{
|
|
@@ -444,17 +478,17 @@ function fe({
|
|
|
444
478
|
"button",
|
|
445
479
|
{
|
|
446
480
|
type: "button",
|
|
447
|
-
disabled:
|
|
448
|
-
onClick: () =>
|
|
481
|
+
disabled: o.isPending,
|
|
482
|
+
onClick: () => o.mutate({}),
|
|
449
483
|
"data-tip": "Every tab they have open shows a 15-second countdown, then reloads",
|
|
450
|
-
className:
|
|
451
|
-
|
|
484
|
+
className: P(
|
|
485
|
+
r,
|
|
452
486
|
"text-amber-800 hover:bg-amber-50 dark:text-amber-300 dark:hover:bg-amber-500/10"
|
|
453
487
|
),
|
|
454
488
|
"data-user-card-reload": !0,
|
|
455
489
|
children: [
|
|
456
|
-
/* @__PURE__ */ t(
|
|
457
|
-
|
|
490
|
+
/* @__PURE__ */ t(J, { className: P("h-3.5 w-3.5", o.isPending && "animate-spin") }),
|
|
491
|
+
o.isPending ? "Sending…" : "Reload tabs"
|
|
458
492
|
]
|
|
459
493
|
}
|
|
460
494
|
),
|
|
@@ -462,17 +496,17 @@ function fe({
|
|
|
462
496
|
"button",
|
|
463
497
|
{
|
|
464
498
|
type: "button",
|
|
465
|
-
disabled:
|
|
466
|
-
onClick: () =>
|
|
467
|
-
"data-tip":
|
|
468
|
-
className:
|
|
469
|
-
|
|
470
|
-
|
|
499
|
+
disabled: c.isPending,
|
|
500
|
+
onClick: () => i ? c.mutate() : d(!0),
|
|
501
|
+
"data-tip": i ? "Click again to sign them out of every session" : "Ends every session they have, on every app — they can sign in again",
|
|
502
|
+
className: P(
|
|
503
|
+
r,
|
|
504
|
+
i ? "bg-red-600 text-white hover:bg-red-700" : "text-amber-800 hover:bg-amber-50 dark:text-amber-300 dark:hover:bg-amber-500/10"
|
|
471
505
|
),
|
|
472
|
-
"data-user-card-sign-out":
|
|
506
|
+
"data-user-card-sign-out": i ? "armed" : "",
|
|
473
507
|
children: [
|
|
474
|
-
/* @__PURE__ */ t(
|
|
475
|
-
|
|
508
|
+
/* @__PURE__ */ t(Z, { className: "h-3.5 w-3.5" }),
|
|
509
|
+
c.isPending ? "Signing out…" : i ? "Confirm sign out" : "Sign out"
|
|
476
510
|
]
|
|
477
511
|
}
|
|
478
512
|
)
|
|
@@ -480,39 +514,39 @@ function fe({
|
|
|
480
514
|
}
|
|
481
515
|
);
|
|
482
516
|
}
|
|
483
|
-
function
|
|
517
|
+
function be({
|
|
484
518
|
userId: e,
|
|
485
519
|
size: n = "default",
|
|
486
|
-
children:
|
|
520
|
+
children: s
|
|
487
521
|
}) {
|
|
488
|
-
const
|
|
522
|
+
const i = T(), { navigate: d, userUrl: o } = G(), c = o ? o(e) : `/users/${e}`, [r, p] = S(!1), u = R.useId();
|
|
489
523
|
E(
|
|
490
|
-
|
|
491
|
-
(
|
|
492
|
-
var x, h,
|
|
493
|
-
return !!((x =
|
|
494
|
-
!!((
|
|
524
|
+
r,
|
|
525
|
+
(a) => {
|
|
526
|
+
var x, h, f, g;
|
|
527
|
+
return !!((x = a.closest) != null && x.call(a, `[data-nvr-user-card="${CSS.escape(u)}"]`)) || !!((h = a.closest) != null && h.call(a, `[data-nvr-user-chip="${CSS.escape(u)}"]`)) || // Anything else floating above the card (a tooltip, a nested menu).
|
|
528
|
+
!!((f = a.closest) != null && f.call(a, "[data-radix-popper-content-wrapper]")) && !((g = a.closest) != null && g.call(a, "[data-nvr-user-card]"));
|
|
495
529
|
},
|
|
496
|
-
() =>
|
|
530
|
+
() => p(!1)
|
|
497
531
|
);
|
|
498
|
-
const { data:
|
|
499
|
-
...
|
|
500
|
-
enabled: !!
|
|
532
|
+
const { data: b, isLoading: y } = _({
|
|
533
|
+
...M(i, e),
|
|
534
|
+
enabled: !!i && !!e,
|
|
501
535
|
staleTime: 12e4
|
|
502
|
-
}), { data:
|
|
536
|
+
}), { data: m } = _({
|
|
503
537
|
queryKey: ["user-presence", e],
|
|
504
|
-
queryFn: () =>
|
|
505
|
-
enabled: !!
|
|
538
|
+
queryFn: () => i.request(B(`/presence/users/${e}`)).then((a) => a),
|
|
539
|
+
enabled: !!i && !!e && r,
|
|
506
540
|
staleTime: 15e3,
|
|
507
|
-
refetchInterval:
|
|
508
|
-
}),
|
|
509
|
-
return y && !
|
|
541
|
+
refetchInterval: r ? 2e4 : !1
|
|
542
|
+
}), w = b ? [b.first_name, b.last_name].filter(Boolean).join(" ") || b.email : e, v = w.split(" ").map((a) => a[0]).filter(Boolean).slice(0, 2).join("").toUpperCase(), N = (m == null ? void 0 : m.online) ?? !1;
|
|
543
|
+
return y && !s ? n === "compact" ? /* @__PURE__ */ t("span", { className: "animate-pulse inline-block h-3.5 w-16 rounded bg-slate-200 dark:bg-[hsl(var(--nvr-skeleton))]" }) : /* @__PURE__ */ l("span", { className: "inline-flex items-center gap-1.5 rounded-full border border-slate-200 bg-slate-50 py-0.5 pl-0.5 pr-2.5", children: [
|
|
510
544
|
/* @__PURE__ */ t("span", { className: "flex h-6 w-6 shrink-0 rounded-full animate-pulse bg-slate-200 dark:bg-[hsl(var(--nvr-skeleton))]" }),
|
|
511
545
|
/* @__PURE__ */ t("span", { className: "animate-pulse h-2.5 w-16 rounded bg-slate-200 dark:bg-[hsl(var(--nvr-skeleton))] inline-block" })
|
|
512
|
-
] }) : /* @__PURE__ */ l(
|
|
513
|
-
/* @__PURE__ */ t(
|
|
546
|
+
] }) : /* @__PURE__ */ l(le, { open: r, onOpenChange: p, children: [
|
|
547
|
+
/* @__PURE__ */ t(ie, { asChild: !0, "data-nvr-user-chip": u, children: s || (n === "compact" ? /* @__PURE__ */ l("span", { className: "inline-flex cursor-pointer items-center gap-1 rounded-full bg-slate-100 dark:bg-slate-800 py-px pl-px pr-1.5 hover:bg-slate-200 dark:hover:bg-slate-700 transition-colors", children: [
|
|
514
548
|
/* @__PURE__ */ t(
|
|
515
|
-
|
|
549
|
+
j,
|
|
516
550
|
{
|
|
517
551
|
userId: e,
|
|
518
552
|
className: "h-4 w-4",
|
|
@@ -522,15 +556,15 @@ function xe({
|
|
|
522
556
|
"data-copy-skip": !0,
|
|
523
557
|
"aria-hidden": "true",
|
|
524
558
|
className: "flex h-4 w-4 shrink-0 items-center justify-center rounded-full bg-nvr-cyan/20 text-[9px] font-bold text-nvr-navy dark:text-nvr-cyan",
|
|
525
|
-
children:
|
|
559
|
+
children: v
|
|
526
560
|
}
|
|
527
561
|
)
|
|
528
562
|
}
|
|
529
563
|
),
|
|
530
|
-
/* @__PURE__ */ t("span", { className: "text-[11px] font-medium text-slate-600 dark:text-slate-300", children:
|
|
564
|
+
/* @__PURE__ */ t("span", { className: "text-[11px] font-medium text-slate-600 dark:text-slate-300", children: w })
|
|
531
565
|
] }) : /* @__PURE__ */ l("div", { className: "inline-flex cursor-pointer items-center gap-1.5 rounded-full border border-slate-200 bg-slate-50 py-0.5 pl-0.5 pr-2.5 hover:bg-slate-100 dark:border-border dark:bg-card dark:hover:bg-accent transition-colors", children: [
|
|
532
566
|
/* @__PURE__ */ t(
|
|
533
|
-
|
|
567
|
+
j,
|
|
534
568
|
{
|
|
535
569
|
userId: e,
|
|
536
570
|
className: "h-6 w-6",
|
|
@@ -540,35 +574,36 @@ function xe({
|
|
|
540
574
|
"data-copy-skip": !0,
|
|
541
575
|
"aria-hidden": "true",
|
|
542
576
|
className: "flex h-6 w-6 items-center justify-center rounded-full bg-nvr-cyan/15 text-[10px] font-semibold text-nvr-navy dark:text-nvr-cyan",
|
|
543
|
-
children:
|
|
577
|
+
children: v
|
|
544
578
|
}
|
|
545
579
|
)
|
|
546
580
|
}
|
|
547
581
|
),
|
|
548
|
-
/* @__PURE__ */ t("span", { className: "text-[12px] text-slate-700 dark:text-slate-300", children:
|
|
582
|
+
/* @__PURE__ */ t("span", { className: "text-[12px] text-slate-700 dark:text-slate-300", children: w })
|
|
549
583
|
] })) }),
|
|
550
584
|
/* @__PURE__ */ t(
|
|
551
|
-
|
|
585
|
+
fe,
|
|
552
586
|
{
|
|
553
|
-
user:
|
|
587
|
+
user: b,
|
|
554
588
|
userId: e,
|
|
555
|
-
initials:
|
|
589
|
+
initials: v,
|
|
556
590
|
navigate: d,
|
|
557
|
-
profileUrl:
|
|
558
|
-
online:
|
|
559
|
-
cardId:
|
|
560
|
-
onAction: () =>
|
|
561
|
-
open:
|
|
591
|
+
profileUrl: c,
|
|
592
|
+
online: N,
|
|
593
|
+
cardId: u,
|
|
594
|
+
onAction: () => p(!1),
|
|
595
|
+
open: r
|
|
562
596
|
}
|
|
563
597
|
)
|
|
564
598
|
] });
|
|
565
599
|
}
|
|
566
600
|
export {
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
601
|
+
Me as OwnersInline,
|
|
602
|
+
Be as OwnersInlineCompact,
|
|
603
|
+
he as UserCardAdminRow,
|
|
604
|
+
be as UserChip,
|
|
605
|
+
pe as UserRosterCluster,
|
|
606
|
+
oe as rosterInitials,
|
|
607
|
+
me as rosterLabel,
|
|
608
|
+
de as rosterName
|
|
574
609
|
};
|