@nivaro/react 0.3.111 → 0.3.112
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 +170 -2
- package/dist/index.js +745 -728
- package/dist/shared/components/CollectionBrowserView.js +3097 -2972
- package/dist/shared/components/CollectionImportBanner.js +135 -0
- package/dist/shared/components/ItemEditForm.js +2235 -2218
- package/dist/shared/components/JobsTray.js +54 -47
- package/dist/shared/components/ViewAsPersonButton.js +109 -0
- package/dist/shared/components/bulk/BulkFieldUpdate.js +228 -150
- package/dist/shared/components/bulk/BulkFieldUpdateButton.js +35 -41
- package/dist/shared/components/bulk/BulkLinksValue.js +91 -0
- package/dist/shared/components/bulk/bulk-field-options.js +20 -19
- package/dist/shared/components/bulk/bulk-update-preview.js +39 -0
- package/dist/shared/components/cbv/ColumnHeaderMenu.js +113 -0
- package/dist/shared/components/cbv/column-totals.js +66 -0
- package/dist/shared/components/collections-directory/CollectionHoverCard.js +108 -81
- package/dist/shared/components/collections-directory/CollectionRow.js +164 -148
- package/dist/shared/components/collections-directory/CollectionsDirectory.js +167 -166
- package/dist/shared/components/collections-directory/directory-data.js +70 -58
- package/dist/shared/components/imports/CollectionImportPanel.js +120 -118
- package/dist/shared/components/imports/DefinitionsPanel.js +24 -24
- package/dist/shared/components/imports/ImportDuplicatesNotice.js +65 -0
- package/dist/shared/components/item-edit/CatalogPickerField.js +631 -639
- package/dist/shared/components/item-edit/DuplicateNotice.js +168 -0
- package/dist/shared/components/item-edit/FieldRow.js +248 -246
- package/dist/shared/components/item-edit/InlineGridField.js +34 -33
- package/dist/shared/components/item-edit/InlineTableField.js +3064 -2882
- package/dist/shared/components/item-edit/MembershipSetField.js +165 -169
- package/dist/shared/components/item-edit/NestedRelationEditor.js +184 -189
- package/dist/shared/components/item-edit/PlanGrid.js +2 -1
- package/dist/shared/components/item-edit/QuickPickerDialog.js +35 -34
- package/dist/shared/components/item-edit/RecordLiveSync.js +32 -30
- package/dist/shared/components/item-edit/RelationCombobox.js +101 -100
- package/dist/shared/components/item-edit/RowHistorySheet.js +28 -27
- package/dist/shared/components/item-edit/SummaryPanel.js +133 -135
- package/dist/shared/components/item-edit/ViewAsRole.js +129 -52
- package/dist/shared/components/item-edit/grid-search.js +345 -0
- package/dist/shared/components/item-edit/render-stability.js +61 -54
- package/dist/shared/components/notifications/NotificationRulesEditor.js +25 -20
- package/dist/shared/components/ops-report/DigestSections.js +163 -144
- package/dist/shared/components/ops-report/drill.js +97 -97
- package/dist/shared/components/panels/AddendumLinesDiff.js +52 -51
- package/dist/shared/components/panels/AddendumPanel.js +92 -91
- package/dist/shared/components/panels/AsyncUserPicker.js +108 -0
- package/dist/shared/components/panels/CommentPanel.js +265 -252
- package/dist/shared/components/panels/OwnersSlot.js +47 -35
- package/dist/shared/components/panels/PipelineInsight.js +186 -0
- package/dist/shared/components/panels/PipelinePanel.js +1529 -1492
- package/dist/shared/components/panels/RecordIntegrityBanner.js +39 -38
- package/dist/shared/components/panels/RevisionsPanel.js +261 -260
- package/dist/shared/components/pipeline/FieldPicker.js +41 -40
- package/dist/shared/components/pipeline/OwnerMatrix.js +829 -700
- package/dist/shared/components/pipeline/OwnerRecordTrial.js +362 -0
- package/dist/shared/components/pipeline/PipelineEditorView.js +483 -467
- package/dist/shared/components/pipeline/PipelineStateOwners.js +65 -64
- package/dist/shared/components/pipeline/owner-matrix-draft.js +178 -0
- package/dist/shared/components/profile/MyDefaultsCard.js +36 -35
- package/dist/shared/components/profile/PersonHeader.js +29 -29
- package/dist/shared/components/profile/PersonProfile.js +30 -28
- package/dist/shared/components/profile/SlowScreensCard.js +286 -0
- package/dist/shared/components/queue/QueueWorklist.js +1090 -1071
- package/dist/shared/components/quick-filters/useQuickFilterEditing.js +45 -44
- package/dist/shared/components/support/TicketDetailSheet.js +25 -16
- package/dist/shared/components/support/TicketSlowScreens.js +32 -0
- package/dist/shared/lib/activity-sentence.js +224 -178
- package/dist/shared/lib/collection-import-banner.js +27 -0
- package/dist/shared/lib/crash-report.js +112 -0
- package/dist/shared/lib/export-runs.js +99 -0
- package/dist/shared/lib/jobs-tray.js +89 -67
- package/dist/shared/lib/list-link.js +76 -69
- package/dist/shared/lib/nav-trail.js +180 -76
- package/dist/shared/lib/query-keys.js +26 -0
- package/dist/shared/lib/view-as.js +16 -11
- package/package.json +1 -1
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { jsxs as s, jsx as
|
|
2
|
-
import { useQueryClient as
|
|
3
|
-
import { MessageSquare as
|
|
1
|
+
import { jsxs as s, jsx as t, Fragment as V } from "react/jsx-runtime";
|
|
2
|
+
import { useQueryClient as Ne, useQuery as z, useMutation as j } from "@tanstack/react-query";
|
|
3
|
+
import { MessageSquare as Pe, ChevronDown as Fe, ClipboardPlus as Re, Pencil as Me, Trash2 as Ie, Check as Oe, X as je, SmilePlus as we } from "lucide-react";
|
|
4
4
|
import { useState as _, useRef as Y, useEffect as Z, useMemo as X } from "react";
|
|
5
|
-
import { createPortal as
|
|
5
|
+
import { createPortal as Ae } from "react-dom";
|
|
6
6
|
import { toast as I } from "sonner";
|
|
7
|
-
import { useNivaroClient as
|
|
8
|
-
import { useDebounced as
|
|
9
|
-
import { get as U, post as B, patch as
|
|
10
|
-
import { usePresenceOnlinePoll as
|
|
11
|
-
import { useRecordSignalPeers as
|
|
12
|
-
import { invalidateRecordTasks as
|
|
13
|
-
import { useStartsOpen as
|
|
14
|
-
import { formatRelative as
|
|
15
|
-
import { AgentBadge as
|
|
16
|
-
import { AutolinkedText as
|
|
17
|
-
import { InboundRequestPopover as
|
|
18
|
-
import { useFieldComments as
|
|
19
|
-
import { UserAvatar as
|
|
20
|
-
import { Avatar as
|
|
7
|
+
import { useNivaroClient as se, useItemEditAuth as Le, useDrilldown as Ke } from "../../context.js";
|
|
8
|
+
import { useDebounced as Be } from "../../hooks/useDebounced.js";
|
|
9
|
+
import { get as U, post as B, patch as Qe, del as ze } from "../../lib/commands.js";
|
|
10
|
+
import { usePresenceOnlinePoll as Ue } from "../../lib/presence-live.js";
|
|
11
|
+
import { useRecordSignalPeers as We, useRecordSignalSender as Ge, signalSentence as He } from "../../lib/presence-signals.js";
|
|
12
|
+
import { invalidateRecordTasks as Xe } from "../../lib/record-tasks.js";
|
|
13
|
+
import { useStartsOpen as Je } from "../../lib/use-starts-open.js";
|
|
14
|
+
import { formatRelative as oe, formatDateTime as le, titleCase as Ve } from "../../lib/utils.js";
|
|
15
|
+
import { AgentBadge as Ze } from "../AgentBadge.js";
|
|
16
|
+
import { AutolinkedText as re } from "../AutolinkedText.js";
|
|
17
|
+
import { InboundRequestPopover as Ye } from "../integrations/InboundRequest.js";
|
|
18
|
+
import { useFieldComments as et } from "../item-edit/field-comments-context.js";
|
|
19
|
+
import { UserAvatar as tt } from "../UserAvatar.js";
|
|
20
|
+
import { Avatar as at, AvatarFallback as nt } from "../ui/avatar.js";
|
|
21
21
|
import { Button as J } from "../ui/button.js";
|
|
22
22
|
import { Separator as ge } from "../ui/separator.js";
|
|
23
|
-
import { Textarea as
|
|
24
|
-
import { RecordEventPathSheet as
|
|
25
|
-
const
|
|
26
|
-
function
|
|
23
|
+
import { Textarea as rt } from "../ui/textarea.js";
|
|
24
|
+
import { RecordEventPathSheet as st } from "./IntegrationActivitySection.js";
|
|
25
|
+
const _e = ["👍", "✅", "👀", "🎉", "❤️", "😂"];
|
|
26
|
+
function ot(e) {
|
|
27
27
|
var d, u, b, m;
|
|
28
|
-
return [(d =
|
|
28
|
+
return [(d = e.first_name) == null ? void 0 : d[0], (u = e.last_name) == null ? void 0 : u[0]].filter(Boolean).join("").toUpperCase() || ((m = (b = e.email) == null ? void 0 : b[0]) == null ? void 0 : m.toUpperCase()) || "?";
|
|
29
29
|
}
|
|
30
|
-
function
|
|
31
|
-
const
|
|
30
|
+
function lt({ comment: e }) {
|
|
31
|
+
const l = (e.mentions ?? []).filter(
|
|
32
32
|
(d) => {
|
|
33
33
|
var u;
|
|
34
|
-
return d.id && String(d.id).toUpperCase() !== String(((u =
|
|
34
|
+
return d.id && String(d.id).toUpperCase() !== String(((u = e.user) == null ? void 0 : u.id) ?? "").toUpperCase();
|
|
35
35
|
}
|
|
36
36
|
);
|
|
37
|
-
return
|
|
37
|
+
return l.length === 0 ? null : /* @__PURE__ */ t(
|
|
38
38
|
"p",
|
|
39
39
|
{
|
|
40
40
|
className: "mt-1 flex flex-wrap items-center gap-x-3 gap-y-0.5 text-[11px]",
|
|
41
41
|
"data-mention-receipts": !0,
|
|
42
|
-
children:
|
|
42
|
+
children: l.map((d) => {
|
|
43
43
|
const u = [d.first_name, d.last_name].filter(Boolean).join(" ") || d.email || "Someone";
|
|
44
44
|
return /* @__PURE__ */ s(
|
|
45
45
|
"span",
|
|
46
46
|
{
|
|
47
47
|
"data-mention-seen": d.seen_at ? "seen" : "unseen",
|
|
48
|
-
title: d.seen_at ? `Seen ${
|
|
48
|
+
title: d.seen_at ? `Seen ${le(d.seen_at)}` : "Not seen yet",
|
|
49
49
|
className: d.seen_at ? "text-emerald-600 dark:text-emerald-400" : "text-slate-400",
|
|
50
50
|
children: [
|
|
51
51
|
d.seen_at ? "✓ " : "",
|
|
52
52
|
u,
|
|
53
|
-
d.seen_at ? ` saw this ${
|
|
53
|
+
d.seen_at ? ` saw this ${oe(d.seen_at)}` : " has not seen this yet"
|
|
54
54
|
]
|
|
55
55
|
},
|
|
56
56
|
d.id
|
|
@@ -59,52 +59,57 @@ function st({ comment: t }) {
|
|
|
59
59
|
}
|
|
60
60
|
);
|
|
61
61
|
}
|
|
62
|
-
function
|
|
63
|
-
return [
|
|
62
|
+
function Ce(e) {
|
|
63
|
+
return [e.first_name, e.last_name].filter(Boolean).join(" ") || e.email;
|
|
64
64
|
}
|
|
65
|
-
function
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
function ye(e) {
|
|
66
|
+
var d;
|
|
67
|
+
const l = Ce(e.user);
|
|
68
|
+
return (d = e.acting_admin) != null && d.name ? `${e.acting_admin.name} as ${l}` : l;
|
|
69
|
+
}
|
|
70
|
+
function it({
|
|
71
|
+
field: e,
|
|
72
|
+
label: l,
|
|
68
73
|
resolved: d,
|
|
69
74
|
onJump: u
|
|
70
75
|
}) {
|
|
71
76
|
const b = /* @__PURE__ */ s(V, { children: [
|
|
72
77
|
"on ",
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
-
d && /* @__PURE__ */
|
|
78
|
+
/* @__PURE__ */ t("span", { className: "font-medium", children: l }),
|
|
79
|
+
d && /* @__PURE__ */ t("span", { className: "text-slate-400 dark:text-slate-500", children: " · resolved" })
|
|
75
80
|
] }), m = "inline-flex min-w-0 max-w-[220px] items-center gap-1 truncate rounded-full border border-slate-200 bg-slate-50 px-1.5 py-px text-[10.5px] text-slate-600 dark:border-border dark:bg-muted dark:text-slate-300";
|
|
76
|
-
return u ? /* @__PURE__ */
|
|
81
|
+
return u ? /* @__PURE__ */ t(
|
|
77
82
|
"button",
|
|
78
83
|
{
|
|
79
84
|
type: "button",
|
|
80
|
-
"data-comment-field":
|
|
85
|
+
"data-comment-field": e,
|
|
81
86
|
onClick: u,
|
|
82
|
-
"data-tip": `Go to ${
|
|
87
|
+
"data-tip": `Go to ${l}`,
|
|
83
88
|
className: `${m} transition-colors hover:border-nvr-cyan/50 hover:text-[#0e7490] dark:hover:text-nvr-cyan`,
|
|
84
89
|
children: b
|
|
85
90
|
}
|
|
86
|
-
) : /* @__PURE__ */
|
|
91
|
+
) : /* @__PURE__ */ t("span", { "data-comment-field": e, className: m, children: b });
|
|
87
92
|
}
|
|
88
|
-
function
|
|
89
|
-
const u =
|
|
90
|
-
return u ? { start:
|
|
93
|
+
function dt(e, l) {
|
|
94
|
+
const u = e.slice(0, l).match(/(^|\s)@([a-zA-Z0-9._-]{2,})$/);
|
|
95
|
+
return u ? { start: l - u[2].length - 1, query: u[2] } : null;
|
|
91
96
|
}
|
|
92
|
-
function
|
|
93
|
-
return
|
|
97
|
+
function ve(e) {
|
|
98
|
+
return e.email.split("@")[0];
|
|
94
99
|
}
|
|
95
|
-
function
|
|
96
|
-
value:
|
|
97
|
-
onChange:
|
|
100
|
+
function ne({
|
|
101
|
+
value: e,
|
|
102
|
+
onChange: l,
|
|
98
103
|
...d
|
|
99
104
|
}) {
|
|
100
|
-
const u =
|
|
105
|
+
const u = se(), b = Y(null), [m, C] = _(null), [g, k] = _(0), v = Be((m == null ? void 0 : m.query) ?? "", 200), { data: S = [] } = z({
|
|
101
106
|
queryKey: ["users", "mention-search", v],
|
|
102
107
|
queryFn: () => u.request(
|
|
103
108
|
U("/users", { limit: 8, sort: "first_name", search: v })
|
|
104
109
|
).then((a) => a.data),
|
|
105
110
|
enabled: !!m && v.length >= 2,
|
|
106
111
|
staleTime: 3e4
|
|
107
|
-
}), q =
|
|
112
|
+
}), q = Ue(15e3, !!m), { data: D } = z({
|
|
108
113
|
queryKey: ["presence-online"],
|
|
109
114
|
queryFn: () => u.request(
|
|
110
115
|
U("/presence/online")
|
|
@@ -114,9 +119,9 @@ function re({
|
|
|
114
119
|
staleTime: 5e3
|
|
115
120
|
}), c = (a) => {
|
|
116
121
|
var p;
|
|
117
|
-
const
|
|
118
|
-
return
|
|
119
|
-
}, y = [...S].sort((a,
|
|
122
|
+
const i = (p = D == null ? void 0 : D.data) == null ? void 0 : p.find((f) => String(f.user_id).toUpperCase() === a.toUpperCase());
|
|
123
|
+
return i ? i.is_idle || i.away ? 1 : 0 : 2;
|
|
124
|
+
}, y = [...S].sort((a, i) => c(a.id) - c(i.id)), { data: T = [] } = z({
|
|
120
125
|
queryKey: ["mention-roles"],
|
|
121
126
|
queryFn: () => u.request(U("/chat/roles")).then((a) => a.data).catch(() => []),
|
|
122
127
|
enabled: !!m,
|
|
@@ -131,22 +136,22 @@ function re({
|
|
|
131
136
|
}
|
|
132
137
|
const a = b.current.getBoundingClientRect();
|
|
133
138
|
E({ top: a.bottom + 4, left: a.left, width: Math.min(a.width, 360) });
|
|
134
|
-
const
|
|
139
|
+
const i = (f) => {
|
|
135
140
|
var w;
|
|
136
141
|
(w = W.current) != null && w.contains(f.target) || C(null);
|
|
137
142
|
}, p = () => C(null);
|
|
138
|
-
return window.addEventListener("scroll",
|
|
139
|
-
window.removeEventListener("scroll",
|
|
143
|
+
return window.addEventListener("scroll", i, !0), window.addEventListener("resize", p), () => {
|
|
144
|
+
window.removeEventListener("scroll", i, !0), window.removeEventListener("resize", p);
|
|
140
145
|
};
|
|
141
146
|
}, [P]);
|
|
142
147
|
function A(a) {
|
|
143
|
-
const
|
|
144
|
-
C(
|
|
148
|
+
const i = dt(a.value, a.selectionStart ?? a.value.length);
|
|
149
|
+
C(i), i || k(0);
|
|
145
150
|
}
|
|
146
151
|
function F(a) {
|
|
147
152
|
if (!m || !b.current) return;
|
|
148
|
-
const
|
|
149
|
-
|
|
153
|
+
const i = b.current.selectionStart ?? e.length, p = a === "__owners__" ? "@owners " : typeof a == "object" && "role" in a ? `@${a.role.toLowerCase().replace(/\s+/g, "-")} ` : `@${ve(a)} `, f = e.slice(0, m.start) + p + e.slice(i);
|
|
154
|
+
l(f), C(null), k(0);
|
|
150
155
|
const w = m.start + p.length;
|
|
151
156
|
requestAnimationFrame(() => {
|
|
152
157
|
var O, L;
|
|
@@ -156,35 +161,35 @@ function re({
|
|
|
156
161
|
function Q(a) {
|
|
157
162
|
if (P)
|
|
158
163
|
if (a.key === "ArrowDown")
|
|
159
|
-
a.preventDefault(), k((
|
|
164
|
+
a.preventDefault(), k((i) => (i + 1) % o);
|
|
160
165
|
else if (a.key === "ArrowUp")
|
|
161
|
-
a.preventDefault(), k((
|
|
166
|
+
a.preventDefault(), k((i) => (i - 1 + o) % o);
|
|
162
167
|
else if (a.key === "Enter" || a.key === "Tab") {
|
|
163
168
|
a.preventDefault();
|
|
164
|
-
const
|
|
165
|
-
if (N &&
|
|
166
|
-
else if (
|
|
167
|
-
const w = $[
|
|
169
|
+
const i = Math.min(g, o - 1), p = N ? 1 : 0, f = p + y.length;
|
|
170
|
+
if (N && i === 0) F("__owners__");
|
|
171
|
+
else if (i >= f) {
|
|
172
|
+
const w = $[i - f];
|
|
168
173
|
w && F({ role: w.name });
|
|
169
|
-
} else F(y[
|
|
174
|
+
} else F(y[i - p]);
|
|
170
175
|
} else a.key === "Escape" && (a.preventDefault(), C(null));
|
|
171
176
|
}
|
|
172
177
|
return /* @__PURE__ */ s("div", { className: "relative", children: [
|
|
173
|
-
/* @__PURE__ */
|
|
174
|
-
|
|
178
|
+
/* @__PURE__ */ t(
|
|
179
|
+
rt,
|
|
175
180
|
{
|
|
176
181
|
...d,
|
|
177
182
|
ref: b,
|
|
178
|
-
value:
|
|
183
|
+
value: e,
|
|
179
184
|
onChange: (a) => {
|
|
180
|
-
|
|
185
|
+
l(a.target.value), A(a.target);
|
|
181
186
|
},
|
|
182
187
|
onKeyDown: Q,
|
|
183
188
|
onClick: (a) => A(a.currentTarget),
|
|
184
189
|
onBlur: () => setTimeout(() => C(null), 150)
|
|
185
190
|
}
|
|
186
191
|
),
|
|
187
|
-
P && h &&
|
|
192
|
+
P && h && Ae(
|
|
188
193
|
/* @__PURE__ */ s(
|
|
189
194
|
"div",
|
|
190
195
|
{
|
|
@@ -204,17 +209,17 @@ function re({
|
|
|
204
209
|
onMouseEnter: () => k(0),
|
|
205
210
|
className: `flex w-full items-center gap-2.5 px-2.5 py-1.5 text-left transition-colors ${g === 0 ? "bg-nvr-cyan/10" : ""}`,
|
|
206
211
|
children: [
|
|
207
|
-
/* @__PURE__ */
|
|
212
|
+
/* @__PURE__ */ t("span", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-nvr-cyan/15 text-[10px] font-semibold text-nvr-navy/80 dark:text-nvr-cyan", children: "★" }),
|
|
208
213
|
/* @__PURE__ */ s("span", { className: "min-w-0 flex-1", children: [
|
|
209
|
-
/* @__PURE__ */
|
|
210
|
-
/* @__PURE__ */
|
|
214
|
+
/* @__PURE__ */ t("span", { className: "block truncate text-[12px] font-medium text-slate-700 dark:text-slate-200", children: "Owners" }),
|
|
215
|
+
/* @__PURE__ */ t("span", { className: "block truncate text-[11px] text-slate-400", children: "Everyone currently assigned to this record" })
|
|
211
216
|
] })
|
|
212
217
|
]
|
|
213
218
|
}
|
|
214
219
|
),
|
|
215
|
-
y.map((a,
|
|
220
|
+
y.map((a, i) => {
|
|
216
221
|
var w, O;
|
|
217
|
-
const p = N ?
|
|
222
|
+
const p = N ? i + 1 : i, f = [a.first_name, a.last_name].filter(Boolean).join(" ") || a.email;
|
|
218
223
|
return /* @__PURE__ */ s(
|
|
219
224
|
"button",
|
|
220
225
|
{
|
|
@@ -227,7 +232,7 @@ function re({
|
|
|
227
232
|
children: [
|
|
228
233
|
/* @__PURE__ */ s("span", { className: "relative flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-nvr-cyan/15 text-[10px] font-semibold text-nvr-navy/80 dark:text-nvr-cyan", children: [
|
|
229
234
|
(`${((w = a.first_name) == null ? void 0 : w[0]) ?? ""}${((O = a.last_name) == null ? void 0 : O[0]) ?? ""}`.trim() || a.email[0]).toUpperCase(),
|
|
230
|
-
c(a.id) < 2 && /* @__PURE__ */
|
|
235
|
+
c(a.id) < 2 && /* @__PURE__ */ t(
|
|
231
236
|
"span",
|
|
232
237
|
{
|
|
233
238
|
"data-mention-presence": c(a.id) === 0 ? "online" : "idle",
|
|
@@ -237,14 +242,14 @@ function re({
|
|
|
237
242
|
)
|
|
238
243
|
] }),
|
|
239
244
|
/* @__PURE__ */ s("span", { className: "min-w-0 flex-1", children: [
|
|
240
|
-
/* @__PURE__ */
|
|
245
|
+
/* @__PURE__ */ t("span", { className: "block truncate text-[12px] font-medium text-slate-700 dark:text-slate-200", children: f }),
|
|
241
246
|
/* @__PURE__ */ s("span", { className: "block truncate text-[11px] text-slate-400", children: [
|
|
242
247
|
a.is_out_of_office && /* @__PURE__ */ s("span", { className: "mr-1 rounded bg-amber-100 px-1 py-px text-[9.5px] font-semibold text-amber-700 dark:bg-amber-400/15 dark:text-amber-400", children: [
|
|
243
248
|
"OOO",
|
|
244
249
|
a.ooo_end ? ` until ${String(a.ooo_end).slice(0, 10)}` : ""
|
|
245
250
|
] }),
|
|
246
251
|
"@",
|
|
247
|
-
|
|
252
|
+
ve(a),
|
|
248
253
|
(a.title || a.department) && /* @__PURE__ */ s("span", { className: "text-slate-400 dark:text-slate-500", children: [
|
|
249
254
|
" · ",
|
|
250
255
|
[a.title, a.department].filter(Boolean).join(", ")
|
|
@@ -256,8 +261,8 @@ function re({
|
|
|
256
261
|
a.id
|
|
257
262
|
);
|
|
258
263
|
}),
|
|
259
|
-
$.map((a,
|
|
260
|
-
const p = y.length + (N ? 1 : 0) +
|
|
264
|
+
$.map((a, i) => {
|
|
265
|
+
const p = y.length + (N ? 1 : 0) + i;
|
|
261
266
|
return /* @__PURE__ */ s(
|
|
262
267
|
"button",
|
|
263
268
|
{
|
|
@@ -268,10 +273,10 @@ function re({
|
|
|
268
273
|
onMouseEnter: () => k(p),
|
|
269
274
|
className: `flex w-full items-center gap-2.5 px-2.5 py-1.5 text-left transition-colors ${p === g ? "bg-nvr-cyan/10" : ""}`,
|
|
270
275
|
children: [
|
|
271
|
-
/* @__PURE__ */
|
|
276
|
+
/* @__PURE__ */ t("span", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-violet-500/15 text-[10px] font-semibold text-violet-600 dark:text-violet-300", children: "R" }),
|
|
272
277
|
/* @__PURE__ */ s("span", { className: "min-w-0 flex-1", children: [
|
|
273
|
-
/* @__PURE__ */
|
|
274
|
-
/* @__PURE__ */
|
|
278
|
+
/* @__PURE__ */ t("span", { className: "block truncate text-[12px] font-medium text-slate-700 dark:text-slate-200", children: a.name }),
|
|
279
|
+
/* @__PURE__ */ t("span", { className: "block text-[11px] text-slate-400", children: "Role — notifies every member" })
|
|
275
280
|
] })
|
|
276
281
|
]
|
|
277
282
|
},
|
|
@@ -285,9 +290,9 @@ function re({
|
|
|
285
290
|
)
|
|
286
291
|
] });
|
|
287
292
|
}
|
|
288
|
-
function
|
|
289
|
-
if (
|
|
290
|
-
switch (
|
|
293
|
+
function ke(e) {
|
|
294
|
+
if (e.kind === "comment") return "people";
|
|
295
|
+
switch (e.note.source) {
|
|
291
296
|
case "note":
|
|
292
297
|
return "people";
|
|
293
298
|
case "external":
|
|
@@ -297,32 +302,32 @@ function ve(t) {
|
|
|
297
302
|
return "system";
|
|
298
303
|
}
|
|
299
304
|
}
|
|
300
|
-
const
|
|
305
|
+
const ct = {
|
|
301
306
|
people: "People",
|
|
302
307
|
system: "System",
|
|
303
308
|
integration: "Integration"
|
|
304
309
|
};
|
|
305
|
-
function
|
|
306
|
-
const
|
|
307
|
-
return (
|
|
310
|
+
function mt(e) {
|
|
311
|
+
const l = e.kind === "comment" ? e.comment.text : e.note.text;
|
|
312
|
+
return (e.kind === "comment" ? l.replace(/<[^>]*>/g, " ") : l).replace(/@\[([^\]]+)\]/g, "@$1").replace(/\s+/g, " ").trim();
|
|
308
313
|
}
|
|
309
|
-
const
|
|
310
|
-
function
|
|
311
|
-
note:
|
|
312
|
-
collection:
|
|
314
|
+
const ut = "integrations:";
|
|
315
|
+
function pt({
|
|
316
|
+
note: e,
|
|
317
|
+
collection: l,
|
|
313
318
|
item: d
|
|
314
319
|
}) {
|
|
315
320
|
var P;
|
|
316
|
-
const u =
|
|
317
|
-
mutationFn: (o) => g.request(B(`/comments/${
|
|
321
|
+
const u = Ke(), [b, m] = _(!1), C = e.source === "external" && !!e.provider && !e.provider.startsWith(ut), g = se(), k = Ne(), [v, S] = _(!1), q = j({
|
|
322
|
+
mutationFn: (o) => g.request(B(`/comments/${e.comment_id}/reactions`, { emoji: o })),
|
|
318
323
|
onSuccess: () => {
|
|
319
324
|
S(!1), k.invalidateQueries({ queryKey: ["comments-related"] }), k.invalidateQueries({ queryKey: ["row-comment-counts"] });
|
|
320
325
|
},
|
|
321
326
|
onError: () => I.error("Failed to react")
|
|
322
327
|
}), [D, c] = _(!1), y = j({
|
|
323
328
|
mutationFn: () => g.request(
|
|
324
|
-
B(`/integration-events/${encodeURIComponent(
|
|
325
|
-
entry_id:
|
|
329
|
+
B(`/integration-events/${encodeURIComponent(e.provider ?? "")}/replay`, {
|
|
330
|
+
entry_id: e.id.replace(/^external:/, "")
|
|
326
331
|
})
|
|
327
332
|
),
|
|
328
333
|
onSuccess: (o) => {
|
|
@@ -337,8 +342,8 @@ function mt({
|
|
|
337
342
|
const h = (E = o == null ? void 0 : o.response) == null ? void 0 : E.error;
|
|
338
343
|
I.error(h ?? (o == null ? void 0 : o.message) ?? "Replay failed", { duration: 8e3 });
|
|
339
344
|
}
|
|
340
|
-
}), T =
|
|
341
|
-
const o =
|
|
345
|
+
}), T = e.link ? () => {
|
|
346
|
+
const o = e.link;
|
|
342
347
|
if (!o) return;
|
|
343
348
|
const h = document.querySelector(`[data-o2m-row="${o.collection}:${o.item_id}"]`);
|
|
344
349
|
if (h) {
|
|
@@ -346,23 +351,23 @@ function mt({
|
|
|
346
351
|
return;
|
|
347
352
|
}
|
|
348
353
|
u == null || u.open({ collection: o.collection, itemId: o.item_id });
|
|
349
|
-
} : null, $ =
|
|
350
|
-
return /* @__PURE__ */ s("div", { className: "flex gap-3", "data-recorded-note":
|
|
351
|
-
/* @__PURE__ */
|
|
354
|
+
} : null, $ = e.source === "transition" ? "border-nvr-cyan/30 bg-nvr-cyan/[0.06] text-nvr-navy dark:text-nvr-cyan" : e.source === "addendum" ? "border-amber-200 bg-amber-50/60 text-amber-700 dark:border-amber-900/40 dark:bg-amber-900/10 dark:text-amber-400" : e.source === "external" || e.source === "inbound" ? "border-sky-200 bg-sky-50/70 text-sky-700 dark:border-sky-900/40 dark:bg-sky-900/10 dark:text-sky-300" : e.source === "import" ? "border-emerald-200 bg-emerald-50/70 text-emerald-700 dark:border-emerald-900/40 dark:bg-emerald-900/10 dark:text-emerald-300" : "border-slate-200 bg-slate-50/80 text-slate-600 dark:border-border dark:bg-muted/40 dark:text-slate-300", N = e.source === "import" && ((P = e.import) != null && P.file_id) ? e.import : null;
|
|
355
|
+
return /* @__PURE__ */ s("div", { className: "flex gap-3", "data-recorded-note": e.source, children: [
|
|
356
|
+
/* @__PURE__ */ t("div", { className: "mt-1 h-8 w-8 shrink-0", "aria-hidden": !0 }),
|
|
352
357
|
/* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: [
|
|
353
358
|
/* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-x-2 gap-y-1", children: [
|
|
354
|
-
/* @__PURE__ */
|
|
355
|
-
|
|
356
|
-
|
|
359
|
+
/* @__PURE__ */ t("span", { className: `rounded border px-1.5 py-px text-[10px] font-medium ${$}`, children: e.label }),
|
|
360
|
+
e.user_name && /* @__PURE__ */ t("span", { className: "text-[12px] font-medium text-slate-700 dark:text-slate-200", children: e.user_name }),
|
|
361
|
+
e.context && (T ? /* @__PURE__ */ t(
|
|
357
362
|
"button",
|
|
358
363
|
{
|
|
359
364
|
type: "button",
|
|
360
365
|
onClick: T,
|
|
361
366
|
className: "truncate text-[11px] text-nvr-navy underline-offset-2 hover:underline dark:text-nvr-cyan",
|
|
362
367
|
"data-line-comment-link": !0,
|
|
363
|
-
children:
|
|
368
|
+
children: e.context
|
|
364
369
|
}
|
|
365
|
-
) : N ? /* @__PURE__ */
|
|
370
|
+
) : N ? /* @__PURE__ */ t(
|
|
366
371
|
"a",
|
|
367
372
|
{
|
|
368
373
|
href: `/api/files/${N.file_id}?download=1`,
|
|
@@ -371,23 +376,23 @@ function mt({
|
|
|
371
376
|
onClick: (o) => o.stopPropagation(),
|
|
372
377
|
className: "truncate text-[11px] text-nvr-navy underline decoration-dotted underline-offset-2 dark:text-nvr-cyan",
|
|
373
378
|
"data-note-import-file": N.file_id ?? void 0,
|
|
374
|
-
children:
|
|
379
|
+
children: e.context
|
|
375
380
|
}
|
|
376
|
-
) : /* @__PURE__ */
|
|
377
|
-
/* @__PURE__ */
|
|
378
|
-
|
|
379
|
-
|
|
381
|
+
) : /* @__PURE__ */ t("span", { className: "truncate text-[11px] text-slate-400", children: e.context })),
|
|
382
|
+
/* @__PURE__ */ t("span", { className: "text-[11px] text-slate-400", "data-tip": le(e.created_at), children: oe(e.created_at) }),
|
|
383
|
+
e.source === "inbound" && e.inbound && /* @__PURE__ */ t(
|
|
384
|
+
Ye,
|
|
380
385
|
{
|
|
381
|
-
activityId:
|
|
382
|
-
callerName:
|
|
383
|
-
collection:
|
|
386
|
+
activityId: e.inbound.activity_id,
|
|
387
|
+
callerName: e.label,
|
|
388
|
+
collection: l,
|
|
384
389
|
itemId: d,
|
|
385
390
|
align: "end",
|
|
386
|
-
children: /* @__PURE__ */
|
|
391
|
+
children: /* @__PURE__ */ t(
|
|
387
392
|
"button",
|
|
388
393
|
{
|
|
389
394
|
type: "button",
|
|
390
|
-
"data-note-inbound-request":
|
|
395
|
+
"data-note-inbound-request": e.inbound.activity_id,
|
|
391
396
|
className: "ml-auto rounded px-1.5 py-px text-[10.5px] font-medium text-sky-700 transition-colors hover:bg-sky-50 dark:text-sky-300 dark:hover:bg-sky-900/20",
|
|
392
397
|
"data-tip": "The request this caller sent, and everything it set off",
|
|
393
398
|
children: "Request"
|
|
@@ -395,35 +400,35 @@ function mt({
|
|
|
395
400
|
)
|
|
396
401
|
}
|
|
397
402
|
),
|
|
398
|
-
|
|
399
|
-
C && /* @__PURE__ */
|
|
403
|
+
e.source === "external" && e.status === "error" && /* @__PURE__ */ t("span", { className: "rounded bg-red-50 px-1 text-[10px] font-medium text-red-700 dark:bg-red-500/10 dark:text-red-400", children: "error" }),
|
|
404
|
+
C && /* @__PURE__ */ t(
|
|
400
405
|
"button",
|
|
401
406
|
{
|
|
402
407
|
type: "button",
|
|
403
408
|
onClick: () => m(!0),
|
|
404
|
-
"data-note-show-path":
|
|
409
|
+
"data-note-show-path": e.id,
|
|
405
410
|
className: "ml-auto rounded px-1.5 py-px text-[10.5px] font-medium text-sky-700 transition-colors hover:bg-sky-50 dark:text-sky-300 dark:hover:bg-sky-900/20",
|
|
406
411
|
"data-tip": "Everything this event set off, step by step",
|
|
407
412
|
children: "Show path"
|
|
408
413
|
}
|
|
409
414
|
),
|
|
410
|
-
|
|
415
|
+
e.source === "external" && e.replayable && e.provider && /* @__PURE__ */ t(
|
|
411
416
|
"button",
|
|
412
417
|
{
|
|
413
418
|
type: "button",
|
|
414
419
|
onClick: () => D ? y.mutate() : c(!0),
|
|
415
420
|
onBlur: () => c(!1),
|
|
416
421
|
disabled: y.isPending,
|
|
417
|
-
"data-note-replay":
|
|
422
|
+
"data-note-replay": e.id,
|
|
418
423
|
className: `rounded px-1.5 py-px text-[10.5px] font-medium transition-colors ${D ? "bg-sky-600 text-white" : "text-sky-700 hover:bg-sky-50 dark:text-sky-300 dark:hover:bg-sky-900/20"}`,
|
|
419
424
|
"data-tip": "Re-apply this event from its stored payload",
|
|
420
425
|
children: y.isPending ? "Replaying…" : D ? "Replay this event?" : "Replay"
|
|
421
426
|
}
|
|
422
427
|
)
|
|
423
428
|
] }),
|
|
424
|
-
/* @__PURE__ */
|
|
425
|
-
|
|
426
|
-
(
|
|
429
|
+
/* @__PURE__ */ t("p", { className: "mt-1 whitespace-pre-wrap break-words text-[13px] leading-snug text-slate-600 dark:text-slate-300", children: /* @__PURE__ */ t(re, { text: e.text }) }),
|
|
430
|
+
e.comment_id && /* @__PURE__ */ s("div", { className: "mt-1 flex flex-wrap items-center gap-1", children: [
|
|
431
|
+
(e.reactions ?? []).map((o) => /* @__PURE__ */ s(
|
|
427
432
|
"button",
|
|
428
433
|
{
|
|
429
434
|
type: "button",
|
|
@@ -431,23 +436,23 @@ function mt({
|
|
|
431
436
|
className: `inline-flex items-center gap-1 rounded-full border px-1.5 py-px text-[11px] transition-colors ${o.mine ? "border-nvr-cyan/40 bg-nvr-cyan/10 text-nvr-navy dark:text-nvr-cyan" : "border-slate-200 bg-slate-50 text-slate-600 hover:border-slate-300 dark:border-border dark:bg-muted dark:text-slate-300"}`,
|
|
432
437
|
children: [
|
|
433
438
|
o.emoji,
|
|
434
|
-
/* @__PURE__ */
|
|
439
|
+
/* @__PURE__ */ t("span", { className: "tabular-nums text-[10px] font-semibold", children: o.count })
|
|
435
440
|
]
|
|
436
441
|
},
|
|
437
442
|
o.emoji
|
|
438
443
|
)),
|
|
439
444
|
/* @__PURE__ */ s("span", { className: "relative", children: [
|
|
440
|
-
/* @__PURE__ */
|
|
445
|
+
/* @__PURE__ */ t(
|
|
441
446
|
"button",
|
|
442
447
|
{
|
|
443
448
|
type: "button",
|
|
444
449
|
onClick: () => S((o) => !o),
|
|
445
450
|
className: "rounded p-0.5 text-slate-300 transition-colors hover:bg-slate-100 hover:text-slate-500 dark:hover:bg-muted",
|
|
446
451
|
"aria-label": "Add reaction",
|
|
447
|
-
children: /* @__PURE__ */
|
|
452
|
+
children: /* @__PURE__ */ t(we, { className: "h-3.5 w-3.5" })
|
|
448
453
|
}
|
|
449
454
|
),
|
|
450
|
-
v && /* @__PURE__ */
|
|
455
|
+
v && /* @__PURE__ */ t("span", { className: "absolute bottom-6 left-0 z-20 flex gap-0.5 rounded-full border border-slate-200 bg-white px-1.5 py-1 shadow-lg dark:border-border dark:bg-popover", children: _e.map((o) => /* @__PURE__ */ t(
|
|
451
456
|
"button",
|
|
452
457
|
{
|
|
453
458
|
type: "button",
|
|
@@ -460,30 +465,30 @@ function mt({
|
|
|
460
465
|
] })
|
|
461
466
|
] })
|
|
462
467
|
] }),
|
|
463
|
-
C &&
|
|
464
|
-
|
|
468
|
+
C && e.provider && /* @__PURE__ */ t(
|
|
469
|
+
st,
|
|
465
470
|
{
|
|
466
471
|
target: b ? {
|
|
467
|
-
source:
|
|
468
|
-
id:
|
|
469
|
-
record: { collection:
|
|
472
|
+
source: e.provider,
|
|
473
|
+
id: e.id.replace(/^external:/, ""),
|
|
474
|
+
record: { collection: l, item: d }
|
|
470
475
|
} : null,
|
|
471
|
-
event: { label:
|
|
476
|
+
event: { label: e.label },
|
|
472
477
|
onClose: () => m(!1)
|
|
473
478
|
}
|
|
474
479
|
)
|
|
475
480
|
] });
|
|
476
481
|
}
|
|
477
|
-
function
|
|
478
|
-
collection:
|
|
479
|
-
item:
|
|
482
|
+
function jt({
|
|
483
|
+
collection: e,
|
|
484
|
+
item: l,
|
|
480
485
|
title: d,
|
|
481
486
|
defaultExpanded: u,
|
|
482
487
|
queuedComments: b,
|
|
483
488
|
onQueueComment: m,
|
|
484
489
|
onUnsentDraft: C
|
|
485
490
|
}) {
|
|
486
|
-
const g =
|
|
491
|
+
const g = se(), { userId: k } = Le(), v = Ne(), S = et(), [q, D] = Je(u, !1), [c, y] = _(""), T = Y(C);
|
|
487
492
|
T.current = C, Z(() => {
|
|
488
493
|
var r;
|
|
489
494
|
(r = T.current) == null || r.call(T, c);
|
|
@@ -502,7 +507,7 @@ function It({
|
|
|
502
507
|
N(!1);
|
|
503
508
|
}
|
|
504
509
|
}
|
|
505
|
-
}, o =
|
|
510
|
+
}, o = We(e, l, "note"), h = Ge(e, l, "note"), E = Y(0);
|
|
506
511
|
Z(() => {
|
|
507
512
|
if (!c.trim()) {
|
|
508
513
|
E.current && h("stop"), E.current = 0;
|
|
@@ -511,63 +516,63 @@ function It({
|
|
|
511
516
|
const r = Date.now();
|
|
512
517
|
r - E.current < 2500 || (E.current = r, h("start"));
|
|
513
518
|
}, [c, h]), Z(() => () => h("stop"), [h]);
|
|
514
|
-
const [W, A] = _(null), [F, Q] = _(null), [a,
|
|
519
|
+
const [W, A] = _(null), [F, Q] = _(null), [a, i] = _(""), p = !l || l === "new", f = ["comments", e, String(l)], { data: w, isLoading: O, isError: L } = z({
|
|
515
520
|
queryKey: f,
|
|
516
|
-
queryFn: () => g.request(U("/comments", { collection:
|
|
521
|
+
queryFn: () => g.request(U("/comments", { collection: e, item: l })).then((r) => r.data),
|
|
517
522
|
enabled: !p
|
|
518
|
-
}),
|
|
519
|
-
queryKey: ["comments-related",
|
|
520
|
-
queryFn: () => g.request(U("/comments/related", { collection:
|
|
523
|
+
}), ie = X(() => (w ?? []).filter((r) => !r.deleted), [w]), { data: Se } = z({
|
|
524
|
+
queryKey: ["comments-related", e, String(l)],
|
|
525
|
+
queryFn: () => g.request(U("/comments/related", { collection: e, item: l })).then((r) => r.data ?? []).catch(() => []),
|
|
521
526
|
enabled: !p,
|
|
522
527
|
staleTime: 3e4
|
|
523
|
-
}),
|
|
524
|
-
const r =
|
|
528
|
+
}), de = Se ?? [], R = X(() => {
|
|
529
|
+
const r = ie.map((x) => ({ kind: "comment", at: x.created_at, comment: x })), n = de.map((x) => ({ kind: "related", at: x.created_at, note: x }));
|
|
525
530
|
return [...r, ...n].sort((x, K) => new Date(K.at).getTime() - new Date(x.at).getTime());
|
|
526
|
-
}, [
|
|
531
|
+
}, [ie, de]), [G, $e] = _(() => /* @__PURE__ */ new Set()), [H, Ee] = _(""), ce = X(() => {
|
|
527
532
|
const r = { people: 0, system: 0, integration: 0 };
|
|
528
|
-
for (const n of R) r[
|
|
533
|
+
for (const n of R) r[ke(n)]++;
|
|
529
534
|
return r;
|
|
530
|
-
}, [R]),
|
|
535
|
+
}, [R]), me = p ? (b ?? []).length : ce.people, ee = X(() => {
|
|
531
536
|
const r = H.trim().toLowerCase();
|
|
532
|
-
return R.filter((n) => G.has(
|
|
533
|
-
}, [R, G, H]),
|
|
537
|
+
return R.filter((n) => G.has(ke(n)) ? !1 : r ? (n.kind === "comment" ? `${n.comment.text} ${Ce(n.comment.user)}` : `${n.note.text} ${n.note.user_name ?? ""} ${n.note.label} ${n.note.context ?? ""} ${n.note.provider ?? ""}`).toLowerCase().includes(r) : !0);
|
|
538
|
+
}, [R, G, H]), qe = (r) => $e((n) => {
|
|
534
539
|
const x = new Set(n);
|
|
535
540
|
return x.has(r) ? x.delete(r) : x.add(r), x;
|
|
536
|
-
}),
|
|
537
|
-
mutationFn: (r) => g.request(B("/comments", { collection:
|
|
541
|
+
}), De = G.size > 0 || H.trim() !== "", te = j({
|
|
542
|
+
mutationFn: (r) => g.request(B("/comments", { collection: e, item: l, text: r })),
|
|
538
543
|
onSuccess: () => {
|
|
539
544
|
v.invalidateQueries({ queryKey: f }), y("");
|
|
540
545
|
},
|
|
541
546
|
onError: () => I.error("Failed to post comment")
|
|
542
|
-
}),
|
|
543
|
-
mutationFn: ({ id: r, text: n }) => g.request(
|
|
547
|
+
}), ue = j({
|
|
548
|
+
mutationFn: ({ id: r, text: n }) => g.request(Qe(`/comments/${r}`, { text: n })),
|
|
544
549
|
onSuccess: () => {
|
|
545
|
-
v.invalidateQueries({ queryKey: f }), A(null),
|
|
550
|
+
v.invalidateQueries({ queryKey: f }), A(null), i("");
|
|
546
551
|
},
|
|
547
552
|
onError: () => I.error("Failed to update comment")
|
|
548
553
|
}), ae = j({
|
|
549
|
-
mutationFn: (r) => g.request(
|
|
554
|
+
mutationFn: (r) => g.request(ze(`/comments/${r}`)),
|
|
550
555
|
onSuccess: () => v.invalidateQueries({ queryKey: f }),
|
|
551
556
|
onError: () => I.error("Failed to delete comment")
|
|
552
|
-
}),
|
|
557
|
+
}), pe = j({
|
|
553
558
|
mutationFn: ({ id: r, emoji: n }) => g.request(B(`/comments/${r}/reactions`, { emoji: n })),
|
|
554
559
|
onSuccess: () => v.invalidateQueries({ queryKey: f }),
|
|
555
560
|
onError: () => I.error("Failed to react")
|
|
556
|
-
}), [
|
|
561
|
+
}), [xe, he] = _(null), Te = j({
|
|
557
562
|
mutationFn: (r) => g.request(
|
|
558
563
|
B("/tasks", {
|
|
559
|
-
collection:
|
|
560
|
-
item:
|
|
564
|
+
collection: e,
|
|
565
|
+
item: l,
|
|
561
566
|
title: r.text.replace(/<[^>]*>/g, "").replace(/@\[([^\]]+)\]/g, "@$1").slice(0, 200),
|
|
562
567
|
assignee: k
|
|
563
568
|
})
|
|
564
569
|
),
|
|
565
570
|
onSuccess: () => {
|
|
566
|
-
|
|
571
|
+
Xe(v, e, l), I.success("Task created from comment — assigned to you");
|
|
567
572
|
},
|
|
568
573
|
onError: () => I.error("Could not create a task")
|
|
569
574
|
});
|
|
570
|
-
function
|
|
575
|
+
function be(r) {
|
|
571
576
|
r.preventDefault(), c.trim() && (p && m ? (m(c.trim()), y("")) : te.mutate(c.trim()));
|
|
572
577
|
}
|
|
573
578
|
return (
|
|
@@ -589,41 +594,41 @@ function It({
|
|
|
589
594
|
className: "flex w-full flex-col px-5 py-3.5 text-left transition-colors hover:bg-slate-50/50 dark:hover:bg-white/[0.02]",
|
|
590
595
|
children: [
|
|
591
596
|
/* @__PURE__ */ s("span", { className: "flex w-full items-center gap-2.5", children: [
|
|
592
|
-
/* @__PURE__ */
|
|
593
|
-
/* @__PURE__ */
|
|
594
|
-
|
|
597
|
+
/* @__PURE__ */ t(Pe, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" }),
|
|
598
|
+
/* @__PURE__ */ t("span", { className: "text-[13px] font-medium text-slate-800 dark:text-slate-200", children: d || "Comments" }),
|
|
599
|
+
me > 0 && /* @__PURE__ */ t(
|
|
595
600
|
"span",
|
|
596
601
|
{
|
|
597
602
|
className: "rounded-full bg-slate-100 px-1.5 py-px text-[10.5px] font-semibold tabular-nums text-slate-500 dark:bg-muted dark:text-slate-400",
|
|
598
603
|
"data-notes-badge": !0,
|
|
599
|
-
children:
|
|
604
|
+
children: me
|
|
600
605
|
}
|
|
601
606
|
),
|
|
602
|
-
/* @__PURE__ */
|
|
603
|
-
|
|
607
|
+
/* @__PURE__ */ t(
|
|
608
|
+
Fe,
|
|
604
609
|
{
|
|
605
610
|
className: `ml-auto h-3.5 w-3.5 shrink-0 text-slate-400 transition-transform duration-150${q ? " rotate-180" : ""}`
|
|
606
611
|
}
|
|
607
612
|
)
|
|
608
613
|
] }),
|
|
609
614
|
!q && !p && R.length > 0 && (() => {
|
|
610
|
-
const r = R[0], n = r.kind === "comment" ?
|
|
615
|
+
const r = R[0], n = r.kind === "comment" ? ye(r.comment) : r.note.user_name ?? "System", x = mt(r);
|
|
611
616
|
return x ? /* @__PURE__ */ s("span", { className: "mt-1 w-full truncate pl-6 text-[11.5px] text-slate-400", children: [
|
|
612
617
|
/* @__PURE__ */ s("span", { className: "font-medium text-slate-500 dark:text-slate-400", children: [
|
|
613
618
|
n,
|
|
614
619
|
":"
|
|
615
620
|
] }),
|
|
616
621
|
" ",
|
|
617
|
-
/* @__PURE__ */
|
|
622
|
+
/* @__PURE__ */ t(re, { text: x, plain: !0 })
|
|
618
623
|
] }) : null;
|
|
619
624
|
})()
|
|
620
625
|
]
|
|
621
626
|
}
|
|
622
627
|
),
|
|
623
|
-
q && /* @__PURE__ */
|
|
624
|
-
/* @__PURE__ */ s("form", { onSubmit:
|
|
625
|
-
/* @__PURE__ */
|
|
626
|
-
|
|
628
|
+
q && /* @__PURE__ */ t("div", { className: "border-t border-slate-100 px-5 py-4 dark:border-border/60", children: p ? /* @__PURE__ */ s("div", { className: "space-y-4", children: [
|
|
629
|
+
/* @__PURE__ */ s("form", { onSubmit: be, className: "space-y-2", children: [
|
|
630
|
+
/* @__PURE__ */ t(
|
|
631
|
+
ne,
|
|
627
632
|
{
|
|
628
633
|
value: c,
|
|
629
634
|
onChange: y,
|
|
@@ -633,28 +638,28 @@ function It({
|
|
|
633
638
|
}
|
|
634
639
|
),
|
|
635
640
|
/* @__PURE__ */ s("div", { className: "flex items-center justify-between", children: [
|
|
636
|
-
/* @__PURE__ */
|
|
637
|
-
/* @__PURE__ */
|
|
641
|
+
/* @__PURE__ */ t("p", { className: "text-[11px] text-slate-400", children: "Comment will be posted after the record is saved." }),
|
|
642
|
+
/* @__PURE__ */ t(J, { type: "submit", size: "sm", disabled: !c.trim(), children: "Queue" })
|
|
638
643
|
] })
|
|
639
644
|
] }),
|
|
640
645
|
(b ?? []).length > 0 && /* @__PURE__ */ s("div", { className: "space-y-2", children: [
|
|
641
|
-
/* @__PURE__ */
|
|
646
|
+
/* @__PURE__ */ t(ge, {}),
|
|
642
647
|
(b ?? []).map((r, n) => /* @__PURE__ */ s(
|
|
643
648
|
"div",
|
|
644
649
|
{
|
|
645
650
|
className: "flex items-start gap-2.5 rounded-lg border border-dashed border-amber-200/70 bg-amber-50/40 px-3 py-2 dark:border-amber-500/20 dark:bg-amber-500/5",
|
|
646
651
|
children: [
|
|
647
|
-
/* @__PURE__ */
|
|
648
|
-
/* @__PURE__ */
|
|
652
|
+
/* @__PURE__ */ t("span", { className: "mt-0.5 inline-flex shrink-0 items-center rounded-full bg-amber-100 px-1.5 py-0.5 text-[10px] font-medium text-amber-600 dark:bg-amber-500/15 dark:text-amber-400", children: "Pending" }),
|
|
653
|
+
/* @__PURE__ */ t("p", { className: "text-[13px] leading-relaxed text-slate-600 dark:text-slate-300", children: r })
|
|
649
654
|
]
|
|
650
655
|
},
|
|
651
656
|
n
|
|
652
657
|
))
|
|
653
658
|
] })
|
|
654
659
|
] }) : /* @__PURE__ */ s(V, { children: [
|
|
655
|
-
/* @__PURE__ */ s("form", { onSubmit:
|
|
656
|
-
/* @__PURE__ */
|
|
657
|
-
|
|
660
|
+
/* @__PURE__ */ s("form", { onSubmit: be, className: "space-y-2", children: [
|
|
661
|
+
/* @__PURE__ */ t(
|
|
662
|
+
ne,
|
|
658
663
|
{
|
|
659
664
|
value: c,
|
|
660
665
|
onChange: y,
|
|
@@ -664,9 +669,9 @@ function It({
|
|
|
664
669
|
}
|
|
665
670
|
),
|
|
666
671
|
/* @__PURE__ */ s("div", { className: "flex items-center justify-between", children: [
|
|
667
|
-
/* @__PURE__ */
|
|
672
|
+
/* @__PURE__ */ t("p", { className: "text-[11px] text-slate-400", children: "Type @ plus two letters to mention a teammate, or @owners to notify everyone currently assigned." }),
|
|
668
673
|
/* @__PURE__ */ s("span", { className: "flex items-center gap-1.5", children: [
|
|
669
|
-
/* @__PURE__ */
|
|
674
|
+
/* @__PURE__ */ t(
|
|
670
675
|
"button",
|
|
671
676
|
{
|
|
672
677
|
type: "button",
|
|
@@ -677,7 +682,7 @@ function It({
|
|
|
677
682
|
children: $ ? "…" : "✨ Polish"
|
|
678
683
|
}
|
|
679
684
|
),
|
|
680
|
-
/* @__PURE__ */
|
|
685
|
+
/* @__PURE__ */ t(J, { type: "submit", size: "sm", disabled: !c.trim() || te.isPending, children: te.isPending ? "Posting…" : "Comment" })
|
|
681
686
|
] })
|
|
682
687
|
] })
|
|
683
688
|
] }),
|
|
@@ -687,95 +692,103 @@ function It({
|
|
|
687
692
|
className: "flex items-center gap-1.5 text-[11.5px] italic text-slate-400",
|
|
688
693
|
"data-note-typing": !0,
|
|
689
694
|
children: [
|
|
690
|
-
/* @__PURE__ */
|
|
691
|
-
|
|
695
|
+
/* @__PURE__ */ t("span", { className: "h-1.5 w-1.5 animate-pulse rounded-full bg-nvr-cyan" }),
|
|
696
|
+
He(o, "writing a note"),
|
|
692
697
|
"…"
|
|
693
698
|
]
|
|
694
699
|
}
|
|
695
700
|
),
|
|
696
|
-
/* @__PURE__ */
|
|
701
|
+
/* @__PURE__ */ t(ge, { className: "my-4" }),
|
|
697
702
|
R.length > 0 && /* @__PURE__ */ s("div", { className: "mb-3 flex flex-wrap items-center gap-1.5", "data-notes-filters": !0, children: [
|
|
698
703
|
["people", "system", "integration"].map((r) => {
|
|
699
|
-
const n = !G.has(r), x =
|
|
704
|
+
const n = !G.has(r), x = ce[r];
|
|
700
705
|
return /* @__PURE__ */ s(
|
|
701
706
|
"button",
|
|
702
707
|
{
|
|
703
708
|
type: "button",
|
|
704
|
-
onClick: () =>
|
|
709
|
+
onClick: () => qe(r),
|
|
705
710
|
"aria-pressed": n,
|
|
706
711
|
"data-notes-filter": r,
|
|
707
712
|
disabled: x === 0 && n,
|
|
708
713
|
className: `inline-flex items-center gap-1 rounded-full border px-2 py-px text-[11px] font-medium transition-colors ${n ? "border-nvr-cyan/40 bg-nvr-cyan/10 text-nvr-navy dark:text-nvr-cyan" : "border-slate-200 text-slate-400 line-through decoration-slate-300 dark:border-border"} disabled:opacity-50`,
|
|
709
714
|
title: r === "people" ? "Comments and notes people wrote" : r === "system" ? "State changes, change reasons, addendums and imports" : "Events an integration recorded",
|
|
710
715
|
children: [
|
|
711
|
-
|
|
712
|
-
/* @__PURE__ */
|
|
716
|
+
ct[r],
|
|
717
|
+
/* @__PURE__ */ t("span", { className: "tabular-nums text-[10px] opacity-70", children: x })
|
|
713
718
|
]
|
|
714
719
|
},
|
|
715
720
|
r
|
|
716
721
|
);
|
|
717
722
|
}),
|
|
718
|
-
/* @__PURE__ */
|
|
723
|
+
/* @__PURE__ */ t(
|
|
719
724
|
"input",
|
|
720
725
|
{
|
|
721
726
|
value: H,
|
|
722
|
-
onChange: (r) =>
|
|
727
|
+
onChange: (r) => Ee(r.target.value),
|
|
723
728
|
placeholder: "Search notes…",
|
|
724
729
|
"aria-label": "Search notes",
|
|
725
730
|
"data-notes-search": !0,
|
|
726
731
|
className: "ml-auto h-6 w-[150px] rounded-md border border-slate-200 bg-background px-2 text-[11.5px] dark:border-border"
|
|
727
732
|
}
|
|
728
733
|
),
|
|
729
|
-
|
|
734
|
+
De && /* @__PURE__ */ s("span", { className: "text-[10.5px] tabular-nums text-slate-400", "data-notes-shown": !0, children: [
|
|
730
735
|
ee.length,
|
|
731
736
|
" of ",
|
|
732
737
|
R.length
|
|
733
738
|
] })
|
|
734
739
|
] }),
|
|
735
|
-
O ? /* @__PURE__ */
|
|
736
|
-
/* @__PURE__ */
|
|
740
|
+
O ? /* @__PURE__ */ t("div", { className: "space-y-4", children: ["a", "b"].map((r) => /* @__PURE__ */ s("div", { className: "flex gap-3", children: [
|
|
741
|
+
/* @__PURE__ */ t("div", { className: "h-8 w-8 shrink-0 animate-pulse rounded-full bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" }),
|
|
737
742
|
/* @__PURE__ */ s("div", { className: "flex-1 space-y-1.5", children: [
|
|
738
|
-
/* @__PURE__ */
|
|
739
|
-
/* @__PURE__ */
|
|
743
|
+
/* @__PURE__ */ t("div", { className: "h-3 w-32 animate-pulse rounded bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" }),
|
|
744
|
+
/* @__PURE__ */ t("div", { className: "h-3 w-full animate-pulse rounded bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" })
|
|
740
745
|
] })
|
|
741
|
-
] }, r)) }) : L ? /* @__PURE__ */
|
|
746
|
+
] }, r)) }) : L ? /* @__PURE__ */ t("p", { className: "py-6 text-center text-[12px] text-red-500", children: "Failed to load comments." }) : R.length === 0 ? /* @__PURE__ */ t("p", { className: "py-6 text-center text-[12px] text-slate-400", children: "No notes yet." }) : ee.length === 0 ? /* @__PURE__ */ t("p", { className: "py-6 text-center text-[12px] text-slate-400", children: "No notes match — clear the search or turn a filter back on." }) : /* @__PURE__ */ t("div", { className: "nvr-stagger-direct space-y-4", children: ee.map((r) => {
|
|
747
|
+
var fe;
|
|
742
748
|
if (r.kind === "related")
|
|
743
|
-
return /* @__PURE__ */
|
|
744
|
-
|
|
749
|
+
return /* @__PURE__ */ t("div", { className: "nvr-section-enter", children: /* @__PURE__ */ t(
|
|
750
|
+
pt,
|
|
745
751
|
{
|
|
746
752
|
note: r.note,
|
|
747
|
-
collection:
|
|
748
|
-
item: String(
|
|
753
|
+
collection: e,
|
|
754
|
+
item: String(l)
|
|
749
755
|
}
|
|
750
756
|
) }, r.note.id);
|
|
751
757
|
const n = r.comment, x = k === n.user.id, K = W === n.id;
|
|
752
758
|
return /* @__PURE__ */ s("div", { className: "nvr-section-enter group flex gap-3", children: [
|
|
753
|
-
/* @__PURE__ */
|
|
754
|
-
|
|
759
|
+
/* @__PURE__ */ t(
|
|
760
|
+
tt,
|
|
755
761
|
{
|
|
756
762
|
userId: n.user.id,
|
|
757
763
|
className: "h-8 w-8",
|
|
758
|
-
fallback: /* @__PURE__ */
|
|
764
|
+
fallback: /* @__PURE__ */ t(at, { className: "h-8 w-8 shrink-0", children: /* @__PURE__ */ t(nt, { className: "bg-nvr-cyan/15 text-[11px] font-bold text-nvr-navy", children: ot(n.user) }) })
|
|
759
765
|
}
|
|
760
766
|
),
|
|
761
767
|
/* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: [
|
|
762
768
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
763
|
-
/* @__PURE__ */
|
|
764
|
-
|
|
765
|
-
|
|
769
|
+
/* @__PURE__ */ t(
|
|
770
|
+
"span",
|
|
771
|
+
{
|
|
772
|
+
className: "text-[13px] font-medium text-slate-800",
|
|
773
|
+
"data-comment-acting-admin": ((fe = n.acting_admin) == null ? void 0 : fe.id) || void 0,
|
|
774
|
+
children: ye(n)
|
|
775
|
+
}
|
|
776
|
+
),
|
|
777
|
+
/* @__PURE__ */ t(Ze, { label: n.via_agent }),
|
|
778
|
+
/* @__PURE__ */ t(
|
|
766
779
|
"span",
|
|
767
780
|
{
|
|
768
781
|
className: "text-[11px] text-slate-400",
|
|
769
|
-
"data-tip":
|
|
770
|
-
children:
|
|
782
|
+
"data-tip": le(n.created_at),
|
|
783
|
+
children: oe(n.created_at)
|
|
771
784
|
}
|
|
772
785
|
),
|
|
773
|
-
n.updated_at && n.updated_at !== n.created_at && /* @__PURE__ */
|
|
774
|
-
n.field && /* @__PURE__ */
|
|
775
|
-
|
|
786
|
+
n.updated_at && n.updated_at !== n.created_at && /* @__PURE__ */ t("span", { className: "text-[10px] text-slate-300", children: "(edited)" }),
|
|
787
|
+
n.field && /* @__PURE__ */ t(
|
|
788
|
+
it,
|
|
776
789
|
{
|
|
777
790
|
field: n.field,
|
|
778
|
-
label: (S == null ? void 0 : S.labelOf(n.field)) ??
|
|
791
|
+
label: (S == null ? void 0 : S.labelOf(n.field)) ?? Ve(n.field),
|
|
779
792
|
resolved: !!n.resolved_at,
|
|
780
793
|
onJump: S ? () => S.jump(n.field) : void 0
|
|
781
794
|
}
|
|
@@ -785,19 +798,19 @@ function It({
|
|
|
785
798
|
{
|
|
786
799
|
className: `ml-auto flex items-center gap-1 transition-opacity group-hover:opacity-100 focus-within:opacity-100 ${F === n.id ? "opacity-100" : "opacity-0"}`,
|
|
787
800
|
children: [
|
|
788
|
-
/* @__PURE__ */
|
|
801
|
+
/* @__PURE__ */ t(
|
|
789
802
|
"button",
|
|
790
803
|
{
|
|
791
804
|
type: "button",
|
|
792
805
|
title: "Make a task from this comment",
|
|
793
806
|
"aria-label": "Make a task from this comment",
|
|
794
807
|
className: "rounded p-1 text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-700 dark:hover:bg-muted",
|
|
795
|
-
onClick: () =>
|
|
796
|
-
children: /* @__PURE__ */
|
|
808
|
+
onClick: () => Te.mutate(n),
|
|
809
|
+
children: /* @__PURE__ */ t(Re, { className: "h-3 w-3" })
|
|
797
810
|
}
|
|
798
811
|
),
|
|
799
812
|
x && (F === n.id ? /* @__PURE__ */ s(V, { children: [
|
|
800
|
-
/* @__PURE__ */
|
|
813
|
+
/* @__PURE__ */ t(
|
|
801
814
|
"button",
|
|
802
815
|
{
|
|
803
816
|
type: "button",
|
|
@@ -811,7 +824,7 @@ function It({
|
|
|
811
824
|
children: ae.isPending ? "Deleting…" : "Delete comment?"
|
|
812
825
|
}
|
|
813
826
|
),
|
|
814
|
-
/* @__PURE__ */
|
|
827
|
+
/* @__PURE__ */ t(
|
|
815
828
|
"button",
|
|
816
829
|
{
|
|
817
830
|
type: "button",
|
|
@@ -821,7 +834,7 @@ function It({
|
|
|
821
834
|
}
|
|
822
835
|
)
|
|
823
836
|
] }) : /* @__PURE__ */ s(V, { children: [
|
|
824
|
-
/* @__PURE__ */
|
|
837
|
+
/* @__PURE__ */ t(
|
|
825
838
|
"button",
|
|
826
839
|
{
|
|
827
840
|
type: "button",
|
|
@@ -829,12 +842,12 @@ function It({
|
|
|
829
842
|
"aria-label": "Edit comment",
|
|
830
843
|
className: "rounded p-1 text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-700",
|
|
831
844
|
onClick: () => {
|
|
832
|
-
A(n.id),
|
|
845
|
+
A(n.id), i(n.text);
|
|
833
846
|
},
|
|
834
|
-
children: /* @__PURE__ */
|
|
847
|
+
children: /* @__PURE__ */ t(Me, { className: "h-3 w-3" })
|
|
835
848
|
}
|
|
836
849
|
),
|
|
837
|
-
/* @__PURE__ */
|
|
850
|
+
/* @__PURE__ */ t(
|
|
838
851
|
"button",
|
|
839
852
|
{
|
|
840
853
|
type: "button",
|
|
@@ -842,7 +855,7 @@ function It({
|
|
|
842
855
|
"aria-label": "Delete comment",
|
|
843
856
|
className: "rounded p-1 text-slate-400 transition-colors hover:bg-red-50 hover:text-red-500",
|
|
844
857
|
onClick: () => Q(n.id),
|
|
845
|
-
children: /* @__PURE__ */
|
|
858
|
+
children: /* @__PURE__ */ t(Ie, { className: "h-3 w-3" })
|
|
846
859
|
}
|
|
847
860
|
)
|
|
848
861
|
] }))
|
|
@@ -851,11 +864,11 @@ function It({
|
|
|
851
864
|
)
|
|
852
865
|
] }),
|
|
853
866
|
K ? /* @__PURE__ */ s("div", { className: "mt-1.5 space-y-2", children: [
|
|
854
|
-
/* @__PURE__ */
|
|
855
|
-
|
|
867
|
+
/* @__PURE__ */ t(
|
|
868
|
+
ne,
|
|
856
869
|
{
|
|
857
870
|
value: a,
|
|
858
|
-
onChange:
|
|
871
|
+
onChange: i,
|
|
859
872
|
rows: 3,
|
|
860
873
|
className: "text-[13px]"
|
|
861
874
|
}
|
|
@@ -866,10 +879,10 @@ function It({
|
|
|
866
879
|
{
|
|
867
880
|
size: "sm",
|
|
868
881
|
className: "h-7 gap-1.5",
|
|
869
|
-
disabled: !a.trim() ||
|
|
870
|
-
onClick: () =>
|
|
882
|
+
disabled: !a.trim() || ue.isPending,
|
|
883
|
+
onClick: () => ue.mutate({ id: n.id, text: a.trim() }),
|
|
871
884
|
children: [
|
|
872
|
-
/* @__PURE__ */
|
|
885
|
+
/* @__PURE__ */ t(Oe, { className: "h-3 w-3" }),
|
|
873
886
|
" Save"
|
|
874
887
|
]
|
|
875
888
|
}
|
|
@@ -881,48 +894,48 @@ function It({
|
|
|
881
894
|
variant: "outline",
|
|
882
895
|
className: "h-7 gap-1.5",
|
|
883
896
|
onClick: () => {
|
|
884
|
-
A(null),
|
|
897
|
+
A(null), i("");
|
|
885
898
|
},
|
|
886
899
|
children: [
|
|
887
|
-
/* @__PURE__ */
|
|
900
|
+
/* @__PURE__ */ t(je, { className: "h-3 w-3" }),
|
|
888
901
|
" Cancel"
|
|
889
902
|
]
|
|
890
903
|
}
|
|
891
904
|
)
|
|
892
905
|
] })
|
|
893
|
-
] }) : /* @__PURE__ */
|
|
894
|
-
!K && /* @__PURE__ */
|
|
906
|
+
] }) : /* @__PURE__ */ t("p", { className: "mt-0.5 whitespace-pre-wrap text-[13px] leading-relaxed text-slate-600", children: /* @__PURE__ */ t(re, { text: n.text }) }),
|
|
907
|
+
!K && /* @__PURE__ */ t(lt, { comment: n }),
|
|
895
908
|
!K && /* @__PURE__ */ s("div", { className: "mt-1 flex flex-wrap items-center gap-1", children: [
|
|
896
909
|
(n.reactions ?? []).map((M) => /* @__PURE__ */ s(
|
|
897
910
|
"button",
|
|
898
911
|
{
|
|
899
912
|
type: "button",
|
|
900
|
-
onClick: () =>
|
|
913
|
+
onClick: () => pe.mutate({ id: n.id, emoji: M.emoji }),
|
|
901
914
|
className: `inline-flex items-center gap-1 rounded-full border px-1.5 py-px text-[11px] transition-colors ${M.mine ? "border-nvr-cyan/40 bg-nvr-cyan/10 text-nvr-navy dark:text-nvr-cyan" : "border-slate-200 bg-slate-50 text-slate-600 hover:border-slate-300 dark:border-border dark:bg-muted dark:text-slate-300"}`,
|
|
902
915
|
children: [
|
|
903
916
|
M.emoji,
|
|
904
|
-
/* @__PURE__ */
|
|
917
|
+
/* @__PURE__ */ t("span", { className: "tabular-nums text-[10px] font-semibold", children: M.count })
|
|
905
918
|
]
|
|
906
919
|
},
|
|
907
920
|
M.emoji
|
|
908
921
|
)),
|
|
909
922
|
/* @__PURE__ */ s("span", { className: "relative", children: [
|
|
910
|
-
/* @__PURE__ */
|
|
923
|
+
/* @__PURE__ */ t(
|
|
911
924
|
"button",
|
|
912
925
|
{
|
|
913
926
|
type: "button",
|
|
914
|
-
onClick: () =>
|
|
927
|
+
onClick: () => he(xe === n.id ? null : n.id),
|
|
915
928
|
className: "rounded p-0.5 text-slate-300 transition-colors hover:bg-slate-100 hover:text-slate-500 dark:hover:bg-muted",
|
|
916
929
|
"aria-label": "Add reaction",
|
|
917
|
-
children: /* @__PURE__ */
|
|
930
|
+
children: /* @__PURE__ */ t(we, { className: "h-3.5 w-3.5" })
|
|
918
931
|
}
|
|
919
932
|
),
|
|
920
|
-
|
|
933
|
+
xe === n.id && /* @__PURE__ */ t("span", { className: "absolute bottom-6 left-0 z-20 flex gap-0.5 rounded-full border border-slate-200 bg-white px-1.5 py-1 shadow-lg dark:border-border dark:bg-popover", children: _e.map((M) => /* @__PURE__ */ t(
|
|
921
934
|
"button",
|
|
922
935
|
{
|
|
923
936
|
type: "button",
|
|
924
937
|
onClick: () => {
|
|
925
|
-
|
|
938
|
+
pe.mutate({ id: n.id, emoji: M }), he(null);
|
|
926
939
|
},
|
|
927
940
|
className: "rounded-full px-1 text-[14px] hover:bg-muted",
|
|
928
941
|
children: M
|
|
@@ -941,7 +954,7 @@ function It({
|
|
|
941
954
|
);
|
|
942
955
|
}
|
|
943
956
|
export {
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
957
|
+
jt as CommentPanel,
|
|
958
|
+
ne as MentionTextarea,
|
|
959
|
+
mt as notePreviewText
|
|
947
960
|
};
|