@nivaro/react 0.3.41 → 0.3.43
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/components/LayoutForm.js +100 -98
- package/dist/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +733 -15
- package/dist/index.js +820 -775
- package/dist/shared/components/ActivityEntry.js +154 -0
- package/dist/shared/components/AudienceConfirmPanel.js +98 -0
- package/dist/shared/components/BackgroundRunOffer.js +43 -31
- package/dist/shared/components/BroadcastView.js +225 -204
- package/dist/shared/components/CollectionBrowserView.js +3924 -3584
- package/dist/shared/components/ConfigHistory.js +153 -0
- package/dist/shared/components/ConfigReadBack.js +65 -0
- package/dist/shared/components/DataTable.js +379 -346
- package/dist/shared/components/ForceReloadBanner.js +47 -40
- package/dist/shared/components/IdleReloadWatcher.js +69 -0
- package/dist/shared/components/ItemEditForm.js +4041 -3853
- package/dist/shared/components/MyWorkView.js +278 -213
- package/dist/shared/components/NotificationBell.js +130 -121
- package/dist/shared/components/ProfileView.js +776 -1003
- package/dist/shared/components/RecentRecordsRail.js +34 -16
- package/dist/shared/components/RecordReadView.js +500 -477
- package/dist/shared/components/Skeletons.js +199 -0
- package/dist/shared/components/SlowNotice.js +63 -0
- package/dist/shared/components/Term.js +23 -0
- package/dist/shared/components/WidgetSlot.js +350 -353
- package/dist/shared/components/access/PermissionSummary.js +106 -0
- package/dist/shared/components/bulk/BulkActionButtons.js +76 -73
- package/dist/shared/components/chat/ChatPanel.js +902 -886
- package/dist/shared/components/chat/MemberPaging.js +70 -0
- package/dist/shared/components/chat/RoomParts.js +147 -117
- package/dist/shared/components/chat/ScreenClip.js +73 -69
- package/dist/shared/components/chat/chat-core.js +449 -396
- package/dist/shared/components/chat/huddle/huddle-store.js +48 -43
- package/dist/shared/components/help-videos/api.js +2 -5
- package/dist/shared/components/help-videos/viewer/HelpVideoMatchChip.js +79 -0
- package/dist/shared/components/help-videos/viewer/matchChip.js +50 -0
- package/dist/shared/components/imports/CollectionImportPanel.js +139 -133
- package/dist/shared/components/imports/RunDetailSheet.js +222 -227
- package/dist/shared/components/integrations/console/ErrorExplanation.js +121 -0
- package/dist/shared/components/integrations/console/PartnerDetail.js +175 -174
- package/dist/shared/components/integrations/console/SubmissionRow.js +36 -34
- package/dist/shared/components/integrations/console/drill/SubmissionDrill.js +50 -48
- package/dist/shared/components/item-edit/FieldComments.js +212 -0
- package/dist/shared/components/item-edit/FieldRow.js +340 -336
- package/dist/shared/components/item-edit/RecordHeaderActions.js +23 -22
- package/dist/shared/components/item-edit/RelationCombobox.js +231 -222
- package/dist/shared/components/item-edit/RuleHiddenNotes.js +55 -0
- package/dist/shared/components/item-edit/field-comments-context.js +6 -0
- package/dist/shared/components/item-edit/field-sources.js +33 -0
- package/dist/shared/components/item-edit/rule-hidden.js +30 -0
- package/dist/shared/components/layout-editor/HistoryPanel.js +113 -96
- package/dist/shared/components/layout-editor/editors/cascade-filters.js +170 -145
- package/dist/shared/components/layout-editor/inspector/Breadcrumb.js +22 -18
- package/dist/shared/components/layout-editor/inspector/GroupInspector.js +177 -159
- package/dist/shared/components/layout-editor/inspector/PickerTab.js +35 -34
- package/dist/shared/components/layout-editor/inspector/RulesTab.js +124 -111
- package/dist/shared/components/layout-editor/inspector/kit.js +292 -277
- package/dist/shared/components/layout-editor/parity-keys.json.js +1 -1
- package/dist/shared/components/list/CopyListLinkButton.js +41 -0
- package/dist/shared/components/list/InlineEdit.js +363 -0
- package/dist/shared/components/notifications/NotificationCenterView.js +213 -181
- package/dist/shared/components/notifications/NotificationDetailBits.js +205 -82
- package/dist/shared/components/notifications/NotificationRulesEditor.js +515 -0
- package/dist/shared/components/notifications/TestMyRules.js +137 -0
- package/dist/shared/components/notifications/changes-lines.js +24 -0
- package/dist/shared/components/notifications/why-lines.js +64 -0
- package/dist/shared/components/panels/CommentPanel.js +316 -281
- package/dist/shared/components/panels/LegalHoldBanner.js +38 -0
- package/dist/shared/components/panels/PipelinePanel.js +201 -196
- package/dist/shared/components/panels/RevisionsPanel.js +496 -479
- package/dist/shared/components/pipeline/PipelineEditorView.js +1587 -1560
- package/dist/shared/components/pipeline/PipelineStateOwners.js +116 -103
- package/dist/shared/components/profile/PersonDidPanel.js +188 -0
- package/dist/shared/components/profile/PersonProfile.js +57 -52
- package/dist/shared/components/queue/QueueWorklist.js +1526 -1365
- package/dist/shared/hooks/useSlowReason.js +39 -0
- package/dist/shared/lib/activity-sentence.js +670 -0
- package/dist/shared/lib/config-sentences.js +418 -0
- package/dist/shared/lib/core-glossary.js +229 -0
- package/dist/shared/lib/error-hints.js +159 -0
- package/dist/shared/lib/error-message.js +105 -0
- package/dist/shared/lib/error-toast.js +22 -0
- package/dist/shared/lib/field-comments.js +25 -0
- package/dist/shared/lib/filter-sentence.js +261 -0
- package/dist/shared/lib/glossary.js +55 -48
- package/dist/shared/lib/idle-reload.js +138 -0
- package/dist/shared/lib/layout-resolve.js +42 -29
- package/dist/shared/lib/list-inline-edit.js +190 -0
- package/dist/shared/lib/list-link.js +147 -0
- package/dist/shared/lib/nav-trail.js +107 -0
- package/dist/shared/lib/prefetch.js +259 -106
- package/dist/shared/lib/record-ref.js +72 -0
- package/dist/shared/lib/reload-holds.js +25 -0
- package/dist/shared/lib/safe-error.js +52 -24
- package/dist/shared/lib/skeleton-shapes.js +72 -0
- package/dist/shared/lib/slow-reason.js +63 -0
- package/package.json +1 -1
|
@@ -1,31 +1,32 @@
|
|
|
1
|
-
import { jsxs as s, jsx as e, Fragment as
|
|
2
|
-
import { useQueryClient as fe, useQuery as U, useMutation as
|
|
3
|
-
import { MessageSquare as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { createPortal as
|
|
6
|
-
import { toast as
|
|
7
|
-
import { useNivaroClient as oe, useItemEditAuth as
|
|
8
|
-
import { useDebounced as
|
|
9
|
-
import { get as W, post as
|
|
10
|
-
import { usePresenceOnlinePoll as
|
|
11
|
-
import { useRecordSignalPeers as
|
|
12
|
-
import { invalidateRecordTasks as
|
|
13
|
-
import { formatRelative as le } from "../../lib/utils.js";
|
|
14
|
-
import { AgentBadge as
|
|
1
|
+
import { jsxs as s, jsx as e, Fragment as V } from "react/jsx-runtime";
|
|
2
|
+
import { useQueryClient as fe, useQuery as U, useMutation as L } from "@tanstack/react-query";
|
|
3
|
+
import { MessageSquare as $e, ChevronDown as Ee, ClipboardPlus as qe, Pencil as De, Trash2 as Pe, Check as Te, X as Fe, SmilePlus as ge } from "lucide-react";
|
|
4
|
+
import { useState as N, useRef as Y, useEffect as Z, useMemo as X } from "react";
|
|
5
|
+
import { createPortal as Re } from "react-dom";
|
|
6
|
+
import { toast as F } from "sonner";
|
|
7
|
+
import { useNivaroClient as oe, useItemEditAuth as Me, useDrilldown as Ie } from "../../context.js";
|
|
8
|
+
import { useDebounced as je } from "../../hooks/useDebounced.js";
|
|
9
|
+
import { get as W, post as B, patch as Oe, del as Le } from "../../lib/commands.js";
|
|
10
|
+
import { usePresenceOnlinePoll as Ae } from "../../lib/presence-live.js";
|
|
11
|
+
import { useRecordSignalPeers as Ke, useRecordSignalSender as Be, signalSentence as Qe } from "../../lib/presence-signals.js";
|
|
12
|
+
import { invalidateRecordTasks as ze } from "../../lib/record-tasks.js";
|
|
13
|
+
import { formatRelative as le, titleCase as Ue } from "../../lib/utils.js";
|
|
14
|
+
import { AgentBadge as We } from "../AgentBadge.js";
|
|
15
15
|
import { AutolinkedText as se } from "../AutolinkedText.js";
|
|
16
|
-
import { InboundRequestPopover as
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
16
|
+
import { InboundRequestPopover as Ge } from "../integrations/InboundRequest.js";
|
|
17
|
+
import { useFieldComments as He } from "../item-edit/field-comments-context.js";
|
|
18
|
+
import { UserAvatar as Xe } from "../UserAvatar.js";
|
|
19
|
+
import { Avatar as Je, AvatarFallback as Ve } from "../ui/avatar.js";
|
|
19
20
|
import { Button as J } from "../ui/button.js";
|
|
20
21
|
import { Separator as xe } from "../ui/separator.js";
|
|
21
|
-
import { Textarea as
|
|
22
|
-
import { RecordEventPathSheet as
|
|
22
|
+
import { Textarea as Ze } from "../ui/textarea.js";
|
|
23
|
+
import { RecordEventPathSheet as Ye } from "./IntegrationActivitySection.js";
|
|
23
24
|
const ye = ["👍", "✅", "👀", "🎉", "❤️", "😂"];
|
|
24
|
-
function
|
|
25
|
-
var d, c,
|
|
26
|
-
return [(d = t.first_name) == null ? void 0 : d[0], (c = t.last_name) == null ? void 0 : c[0]].filter(Boolean).join("").toUpperCase() || ((m = (
|
|
25
|
+
function et(t) {
|
|
26
|
+
var d, c, h, m;
|
|
27
|
+
return [(d = t.first_name) == null ? void 0 : d[0], (c = t.last_name) == null ? void 0 : c[0]].filter(Boolean).join("").toUpperCase() || ((m = (h = t.email) == null ? void 0 : h[0]) == null ? void 0 : m.toUpperCase()) || "?";
|
|
27
28
|
}
|
|
28
|
-
function
|
|
29
|
+
function tt({ comment: t }) {
|
|
29
30
|
const i = (t.mentions ?? []).filter(
|
|
30
31
|
(d) => {
|
|
31
32
|
var c;
|
|
@@ -57,115 +58,139 @@ function Ze({ comment: t }) {
|
|
|
57
58
|
}
|
|
58
59
|
);
|
|
59
60
|
}
|
|
60
|
-
function
|
|
61
|
+
function ae(t) {
|
|
61
62
|
return [t.first_name, t.last_name].filter(Boolean).join(" ") || t.email;
|
|
62
63
|
}
|
|
63
|
-
function
|
|
64
|
+
function nt({
|
|
65
|
+
field: t,
|
|
66
|
+
label: i,
|
|
67
|
+
resolved: d,
|
|
68
|
+
onJump: c
|
|
69
|
+
}) {
|
|
70
|
+
const h = /* @__PURE__ */ s(V, { children: [
|
|
71
|
+
"on ",
|
|
72
|
+
/* @__PURE__ */ e("span", { className: "font-medium", children: i }),
|
|
73
|
+
d && /* @__PURE__ */ e("span", { className: "text-slate-400 dark:text-slate-500", children: " · resolved" })
|
|
74
|
+
] }), 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";
|
|
75
|
+
return c ? /* @__PURE__ */ e(
|
|
76
|
+
"button",
|
|
77
|
+
{
|
|
78
|
+
type: "button",
|
|
79
|
+
"data-comment-field": t,
|
|
80
|
+
onClick: c,
|
|
81
|
+
"data-tip": `Go to ${i}`,
|
|
82
|
+
className: `${m} transition-colors hover:border-nvr-cyan/50 hover:text-[#0e7490] dark:hover:text-nvr-cyan`,
|
|
83
|
+
children: h
|
|
84
|
+
}
|
|
85
|
+
) : /* @__PURE__ */ e("span", { "data-comment-field": t, className: m, children: h });
|
|
86
|
+
}
|
|
87
|
+
function at(t, i) {
|
|
64
88
|
const c = t.slice(0, i).match(/(^|\s)@([a-zA-Z0-9._-]{2,})$/);
|
|
65
89
|
return c ? { start: i - c[2].length - 1, query: c[2] } : null;
|
|
66
90
|
}
|
|
67
91
|
function he(t) {
|
|
68
92
|
return t.email.split("@")[0];
|
|
69
93
|
}
|
|
70
|
-
function
|
|
94
|
+
function re({
|
|
71
95
|
value: t,
|
|
72
96
|
onChange: i,
|
|
73
97
|
...d
|
|
74
98
|
}) {
|
|
75
|
-
const c = oe(),
|
|
76
|
-
queryKey: ["users", "mention-search",
|
|
99
|
+
const c = oe(), h = Y(null), [m, f] = N(null), [S, g] = N(0), v = je((m == null ? void 0 : m.query) ?? "", 200), { data: D = [] } = U({
|
|
100
|
+
queryKey: ["users", "mention-search", v],
|
|
77
101
|
queryFn: () => c.request(
|
|
78
|
-
W("/users", { limit: 8, sort: "first_name", search:
|
|
102
|
+
W("/users", { limit: 8, sort: "first_name", search: v })
|
|
79
103
|
).then((n) => n.data),
|
|
80
|
-
enabled: !!m &&
|
|
104
|
+
enabled: !!m && v.length >= 2,
|
|
81
105
|
staleTime: 3e4
|
|
82
|
-
}),
|
|
106
|
+
}), M = Ae(15e3, !!m), { data: $ } = U({
|
|
83
107
|
queryKey: ["presence-online"],
|
|
84
108
|
queryFn: () => c.request(
|
|
85
109
|
W("/presence/online")
|
|
86
110
|
),
|
|
87
111
|
enabled: !!m,
|
|
88
|
-
refetchInterval:
|
|
112
|
+
refetchInterval: M,
|
|
89
113
|
staleTime: 5e3
|
|
90
|
-
}),
|
|
91
|
-
var
|
|
92
|
-
const l = (
|
|
114
|
+
}), p = (n) => {
|
|
115
|
+
var u;
|
|
116
|
+
const l = (u = $ == null ? void 0 : $.data) == null ? void 0 : u.find((k) => String(k.user_id).toUpperCase() === n.toUpperCase());
|
|
93
117
|
return l ? l.is_idle || l.away ? 1 : 0 : 2;
|
|
94
|
-
},
|
|
118
|
+
}, y = [...D].sort((n, l) => p(n.id) - p(l.id)), { data: R = [] } = U({
|
|
95
119
|
queryKey: ["mention-roles"],
|
|
96
120
|
queryFn: () => c.request(W("/chat/roles")).then((n) => n.data).catch(() => []),
|
|
97
121
|
enabled: !!m,
|
|
98
122
|
staleTime: 5 * 6e4
|
|
99
|
-
}),
|
|
100
|
-
(n) => n.name.toLowerCase().replace(/\s+/g, "-").startsWith(
|
|
101
|
-
).slice(0, 3) : [], w = !!m &&
|
|
102
|
-
|
|
103
|
-
if (!
|
|
104
|
-
|
|
123
|
+
}), P = m ? R.filter(
|
|
124
|
+
(n) => n.name.toLowerCase().replace(/\s+/g, "-").startsWith(v.toLowerCase())
|
|
125
|
+
).slice(0, 3) : [], w = !!m && v.length >= 2 && "owners".startsWith(v.toLowerCase()), E = !!m && v.length >= 2 && (y.length > 0 || w || P.length > 0), o = y.length + (w ? 1 : 0) + P.length, [b, I] = N(null), A = Y(null);
|
|
126
|
+
Z(() => {
|
|
127
|
+
if (!E || !h.current) {
|
|
128
|
+
I(null);
|
|
105
129
|
return;
|
|
106
130
|
}
|
|
107
|
-
const n =
|
|
108
|
-
|
|
109
|
-
const l = (
|
|
110
|
-
var
|
|
111
|
-
(
|
|
112
|
-
},
|
|
113
|
-
return window.addEventListener("scroll", l, !0), window.addEventListener("resize",
|
|
114
|
-
window.removeEventListener("scroll", l, !0), window.removeEventListener("resize",
|
|
131
|
+
const n = h.current.getBoundingClientRect();
|
|
132
|
+
I({ top: n.bottom + 4, left: n.left, width: Math.min(n.width, 360) });
|
|
133
|
+
const l = (k) => {
|
|
134
|
+
var _;
|
|
135
|
+
(_ = A.current) != null && _.contains(k.target) || f(null);
|
|
136
|
+
}, u = () => f(null);
|
|
137
|
+
return window.addEventListener("scroll", l, !0), window.addEventListener("resize", u), () => {
|
|
138
|
+
window.removeEventListener("scroll", l, !0), window.removeEventListener("resize", u);
|
|
115
139
|
};
|
|
116
|
-
}, [
|
|
117
|
-
function
|
|
118
|
-
const l =
|
|
119
|
-
|
|
140
|
+
}, [E]);
|
|
141
|
+
function Q(n) {
|
|
142
|
+
const l = at(n.value, n.selectionStart ?? n.value.length);
|
|
143
|
+
f(l), l || g(0);
|
|
120
144
|
}
|
|
121
145
|
function q(n) {
|
|
122
|
-
if (!m || !
|
|
123
|
-
const l =
|
|
124
|
-
i(
|
|
125
|
-
const
|
|
146
|
+
if (!m || !h.current) return;
|
|
147
|
+
const l = h.current.selectionStart ?? t.length, u = n === "__owners__" ? "@owners " : typeof n == "object" && "role" in n ? `@${n.role.toLowerCase().replace(/\s+/g, "-")} ` : `@${he(n)} `, k = t.slice(0, m.start) + u + t.slice(l);
|
|
148
|
+
i(k), f(null), g(0);
|
|
149
|
+
const _ = m.start + u.length;
|
|
126
150
|
requestAnimationFrame(() => {
|
|
127
|
-
var
|
|
128
|
-
(
|
|
151
|
+
var j, O;
|
|
152
|
+
(j = h.current) == null || j.focus(), (O = h.current) == null || O.setSelectionRange(_, _);
|
|
129
153
|
});
|
|
130
154
|
}
|
|
131
|
-
function
|
|
132
|
-
if (
|
|
155
|
+
function z(n) {
|
|
156
|
+
if (E)
|
|
133
157
|
if (n.key === "ArrowDown")
|
|
134
|
-
n.preventDefault(),
|
|
158
|
+
n.preventDefault(), g((l) => (l + 1) % o);
|
|
135
159
|
else if (n.key === "ArrowUp")
|
|
136
|
-
n.preventDefault(),
|
|
160
|
+
n.preventDefault(), g((l) => (l - 1 + o) % o);
|
|
137
161
|
else if (n.key === "Enter" || n.key === "Tab") {
|
|
138
162
|
n.preventDefault();
|
|
139
|
-
const l = Math.min(
|
|
163
|
+
const l = Math.min(S, o - 1), u = w ? 1 : 0, k = u + y.length;
|
|
140
164
|
if (w && l === 0) q("__owners__");
|
|
141
|
-
else if (l >=
|
|
142
|
-
const
|
|
143
|
-
|
|
144
|
-
} else q(
|
|
145
|
-
} else n.key === "Escape" && (n.preventDefault(),
|
|
165
|
+
else if (l >= k) {
|
|
166
|
+
const _ = P[l - k];
|
|
167
|
+
_ && q({ role: _.name });
|
|
168
|
+
} else q(y[l - u]);
|
|
169
|
+
} else n.key === "Escape" && (n.preventDefault(), f(null));
|
|
146
170
|
}
|
|
147
171
|
return /* @__PURE__ */ s("div", { className: "relative", children: [
|
|
148
172
|
/* @__PURE__ */ e(
|
|
149
|
-
|
|
173
|
+
Ze,
|
|
150
174
|
{
|
|
151
175
|
...d,
|
|
152
|
-
ref:
|
|
176
|
+
ref: h,
|
|
153
177
|
value: t,
|
|
154
178
|
onChange: (n) => {
|
|
155
|
-
i(n.target.value),
|
|
179
|
+
i(n.target.value), Q(n.target);
|
|
156
180
|
},
|
|
157
|
-
onKeyDown:
|
|
158
|
-
onClick: (n) =>
|
|
159
|
-
onBlur: () => setTimeout(() =>
|
|
181
|
+
onKeyDown: z,
|
|
182
|
+
onClick: (n) => Q(n.currentTarget),
|
|
183
|
+
onBlur: () => setTimeout(() => f(null), 150)
|
|
160
184
|
}
|
|
161
185
|
),
|
|
162
|
-
|
|
186
|
+
E && b && Re(
|
|
163
187
|
/* @__PURE__ */ s(
|
|
164
188
|
"div",
|
|
165
189
|
{
|
|
166
|
-
ref:
|
|
190
|
+
ref: A,
|
|
191
|
+
"data-mention-menu": "",
|
|
167
192
|
className: "fixed z-[110] max-h-60 overflow-y-auto rounded-md border border-slate-200 bg-white shadow-lg dark:border-border dark:bg-popover",
|
|
168
|
-
style: { top:
|
|
193
|
+
style: { top: b.top, left: b.left, width: b.width },
|
|
169
194
|
onMouseDown: (n) => n.preventDefault(),
|
|
170
195
|
children: [
|
|
171
196
|
w && /* @__PURE__ */ s(
|
|
@@ -175,8 +200,8 @@ function ae({
|
|
|
175
200
|
onMouseDown: (n) => {
|
|
176
201
|
n.preventDefault(), q("__owners__");
|
|
177
202
|
},
|
|
178
|
-
onMouseEnter: () =>
|
|
179
|
-
className: `flex w-full items-center gap-2.5 px-2.5 py-1.5 text-left transition-colors ${
|
|
203
|
+
onMouseEnter: () => g(0),
|
|
204
|
+
className: `flex w-full items-center gap-2.5 px-2.5 py-1.5 text-left transition-colors ${S === 0 ? "bg-nvr-cyan/10" : ""}`,
|
|
180
205
|
children: [
|
|
181
206
|
/* @__PURE__ */ e("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: "★" }),
|
|
182
207
|
/* @__PURE__ */ s("span", { className: "min-w-0 flex-1", children: [
|
|
@@ -186,32 +211,32 @@ function ae({
|
|
|
186
211
|
]
|
|
187
212
|
}
|
|
188
213
|
),
|
|
189
|
-
|
|
190
|
-
var
|
|
191
|
-
const
|
|
214
|
+
y.map((n, l) => {
|
|
215
|
+
var _, j;
|
|
216
|
+
const u = w ? l + 1 : l, k = [n.first_name, n.last_name].filter(Boolean).join(" ") || n.email;
|
|
192
217
|
return /* @__PURE__ */ s(
|
|
193
218
|
"button",
|
|
194
219
|
{
|
|
195
220
|
type: "button",
|
|
196
|
-
onMouseDown: (
|
|
197
|
-
|
|
221
|
+
onMouseDown: (O) => {
|
|
222
|
+
O.preventDefault(), q(n);
|
|
198
223
|
},
|
|
199
|
-
onMouseEnter: () =>
|
|
200
|
-
className: `flex w-full items-center gap-2.5 px-2.5 py-1.5 text-left transition-colors ${
|
|
224
|
+
onMouseEnter: () => g(u),
|
|
225
|
+
className: `flex w-full items-center gap-2.5 px-2.5 py-1.5 text-left transition-colors ${u === S ? "bg-nvr-cyan/10" : ""}`,
|
|
201
226
|
children: [
|
|
202
227
|
/* @__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: [
|
|
203
|
-
(`${((
|
|
204
|
-
|
|
228
|
+
(`${((_ = n.first_name) == null ? void 0 : _[0]) ?? ""}${((j = n.last_name) == null ? void 0 : j[0]) ?? ""}`.trim() || n.email[0]).toUpperCase(),
|
|
229
|
+
p(n.id) < 2 && /* @__PURE__ */ e(
|
|
205
230
|
"span",
|
|
206
231
|
{
|
|
207
|
-
"data-mention-presence":
|
|
208
|
-
title:
|
|
209
|
-
className: `absolute -bottom-px -right-px h-2 w-2 rounded-full ring-2 ring-white dark:ring-popover ${
|
|
232
|
+
"data-mention-presence": p(n.id) === 0 ? "online" : "idle",
|
|
233
|
+
title: p(n.id) === 0 ? "Online" : "Idle",
|
|
234
|
+
className: `absolute -bottom-px -right-px h-2 w-2 rounded-full ring-2 ring-white dark:ring-popover ${p(n.id) === 0 ? "bg-emerald-500" : "border border-amber-500 bg-white dark:bg-popover"}`
|
|
210
235
|
}
|
|
211
236
|
)
|
|
212
237
|
] }),
|
|
213
238
|
/* @__PURE__ */ s("span", { className: "min-w-0 flex-1", children: [
|
|
214
|
-
/* @__PURE__ */ e("span", { className: "block truncate text-[12px] font-medium text-slate-700 dark:text-slate-200", children:
|
|
239
|
+
/* @__PURE__ */ e("span", { className: "block truncate text-[12px] font-medium text-slate-700 dark:text-slate-200", children: k }),
|
|
215
240
|
/* @__PURE__ */ s("span", { className: "block truncate text-[11px] text-slate-400", children: [
|
|
216
241
|
n.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: [
|
|
217
242
|
"OOO",
|
|
@@ -230,17 +255,17 @@ function ae({
|
|
|
230
255
|
n.id
|
|
231
256
|
);
|
|
232
257
|
}),
|
|
233
|
-
|
|
234
|
-
const
|
|
258
|
+
P.map((n, l) => {
|
|
259
|
+
const u = y.length + (w ? 1 : 0) + l;
|
|
235
260
|
return /* @__PURE__ */ s(
|
|
236
261
|
"button",
|
|
237
262
|
{
|
|
238
263
|
type: "button",
|
|
239
|
-
onMouseDown: (
|
|
240
|
-
|
|
264
|
+
onMouseDown: (k) => {
|
|
265
|
+
k.preventDefault(), q({ role: n.name });
|
|
241
266
|
},
|
|
242
|
-
onMouseEnter: () =>
|
|
243
|
-
className: `flex w-full items-center gap-2.5 px-2.5 py-1.5 text-left transition-colors ${
|
|
267
|
+
onMouseEnter: () => g(u),
|
|
268
|
+
className: `flex w-full items-center gap-2.5 px-2.5 py-1.5 text-left transition-colors ${u === S ? "bg-nvr-cyan/10" : ""}`,
|
|
244
269
|
children: [
|
|
245
270
|
/* @__PURE__ */ e("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" }),
|
|
246
271
|
/* @__PURE__ */ s("span", { className: "min-w-0 flex-1", children: [
|
|
@@ -271,62 +296,62 @@ function be(t) {
|
|
|
271
296
|
return "system";
|
|
272
297
|
}
|
|
273
298
|
}
|
|
274
|
-
const
|
|
299
|
+
const rt = {
|
|
275
300
|
people: "People",
|
|
276
301
|
system: "System",
|
|
277
302
|
integration: "Integration"
|
|
278
|
-
},
|
|
279
|
-
function
|
|
303
|
+
}, st = "integrations:";
|
|
304
|
+
function ot({
|
|
280
305
|
note: t,
|
|
281
306
|
collection: i,
|
|
282
307
|
item: d
|
|
283
308
|
}) {
|
|
284
|
-
var
|
|
285
|
-
const c =
|
|
286
|
-
mutationFn: (o) =>
|
|
309
|
+
var E;
|
|
310
|
+
const c = Ie(), [h, m] = N(!1), f = t.source === "external" && !!t.provider && !t.provider.startsWith(st), S = oe(), g = fe(), [v, D] = N(!1), M = L({
|
|
311
|
+
mutationFn: (o) => S.request(B(`/comments/${t.comment_id}/reactions`, { emoji: o })),
|
|
287
312
|
onSuccess: () => {
|
|
288
|
-
|
|
313
|
+
D(!1), g.invalidateQueries({ queryKey: ["comments-related"] }), g.invalidateQueries({ queryKey: ["row-comment-counts"] });
|
|
289
314
|
},
|
|
290
|
-
onError: () =>
|
|
291
|
-
}), [p
|
|
292
|
-
mutationFn: () =>
|
|
293
|
-
|
|
315
|
+
onError: () => F.error("Failed to react")
|
|
316
|
+
}), [$, p] = N(!1), y = L({
|
|
317
|
+
mutationFn: () => S.request(
|
|
318
|
+
B(`/integration-events/${encodeURIComponent(t.provider ?? "")}/replay`, {
|
|
294
319
|
entry_id: t.id.replace(/^external:/, "")
|
|
295
320
|
})
|
|
296
321
|
),
|
|
297
322
|
onSuccess: (o) => {
|
|
298
|
-
var
|
|
299
|
-
|
|
300
|
-
description: (
|
|
301
|
-
}),
|
|
323
|
+
var b;
|
|
324
|
+
p(!1), F.success("Event replayed", {
|
|
325
|
+
description: (b = o == null ? void 0 : o.data) == null ? void 0 : b.detail
|
|
326
|
+
}), g.invalidateQueries({ queryKey: ["comments-related"] });
|
|
302
327
|
},
|
|
303
328
|
onError: (o) => {
|
|
304
|
-
var
|
|
305
|
-
|
|
306
|
-
const
|
|
307
|
-
|
|
329
|
+
var I;
|
|
330
|
+
p(!1);
|
|
331
|
+
const b = (I = o == null ? void 0 : o.response) == null ? void 0 : I.error;
|
|
332
|
+
F.error(b ?? (o == null ? void 0 : o.message) ?? "Replay failed", { duration: 8e3 });
|
|
308
333
|
}
|
|
309
|
-
}),
|
|
334
|
+
}), R = t.link ? () => {
|
|
310
335
|
const o = t.link;
|
|
311
336
|
if (!o) return;
|
|
312
|
-
const
|
|
313
|
-
if (
|
|
314
|
-
|
|
337
|
+
const b = document.querySelector(`[data-o2m-row="${o.collection}:${o.item_id}"]`);
|
|
338
|
+
if (b) {
|
|
339
|
+
b.scrollIntoView({ behavior: "smooth", block: "center" }), b.classList.add("nvr-row-flash"), setTimeout(() => b.classList.remove("nvr-row-flash"), 2400);
|
|
315
340
|
return;
|
|
316
341
|
}
|
|
317
342
|
c == null || c.open({ collection: o.collection, itemId: o.item_id });
|
|
318
|
-
} : null,
|
|
343
|
+
} : null, P = t.source === "transition" ? "border-nvr-cyan/30 bg-nvr-cyan/[0.06] text-nvr-navy dark:text-nvr-cyan" : t.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" : t.source === "external" || t.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" : t.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", w = t.source === "import" && ((E = t.import) != null && E.file_id) ? t.import : null;
|
|
319
344
|
return /* @__PURE__ */ s("div", { className: "flex gap-3", "data-recorded-note": t.source, children: [
|
|
320
345
|
/* @__PURE__ */ e("div", { className: "mt-1 h-8 w-8 shrink-0", "aria-hidden": !0 }),
|
|
321
346
|
/* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: [
|
|
322
347
|
/* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-x-2 gap-y-1", children: [
|
|
323
|
-
/* @__PURE__ */ e("span", { className: `rounded border px-1.5 py-px text-[10px] font-medium ${
|
|
348
|
+
/* @__PURE__ */ e("span", { className: `rounded border px-1.5 py-px text-[10px] font-medium ${P}`, children: t.label }),
|
|
324
349
|
t.user_name && /* @__PURE__ */ e("span", { className: "text-[12px] font-medium text-slate-700 dark:text-slate-200", children: t.user_name }),
|
|
325
|
-
t.context && (
|
|
350
|
+
t.context && (R ? /* @__PURE__ */ e(
|
|
326
351
|
"button",
|
|
327
352
|
{
|
|
328
353
|
type: "button",
|
|
329
|
-
onClick:
|
|
354
|
+
onClick: R,
|
|
330
355
|
className: "truncate text-[11px] text-nvr-navy underline-offset-2 hover:underline dark:text-nvr-cyan",
|
|
331
356
|
"data-line-comment-link": !0,
|
|
332
357
|
children: t.context
|
|
@@ -345,7 +370,7 @@ function nt({
|
|
|
345
370
|
) : /* @__PURE__ */ e("span", { className: "truncate text-[11px] text-slate-400", children: t.context })),
|
|
346
371
|
/* @__PURE__ */ e("span", { className: "text-[11px] text-slate-400", children: le(t.created_at) }),
|
|
347
372
|
t.source === "inbound" && t.inbound && /* @__PURE__ */ e(
|
|
348
|
-
|
|
373
|
+
Ge,
|
|
349
374
|
{
|
|
350
375
|
activityId: t.inbound.activity_id,
|
|
351
376
|
callerName: t.label,
|
|
@@ -365,7 +390,7 @@ function nt({
|
|
|
365
390
|
}
|
|
366
391
|
),
|
|
367
392
|
t.source === "external" && t.status === "error" && /* @__PURE__ */ e("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" }),
|
|
368
|
-
|
|
393
|
+
f && /* @__PURE__ */ e(
|
|
369
394
|
"button",
|
|
370
395
|
{
|
|
371
396
|
type: "button",
|
|
@@ -380,13 +405,13 @@ function nt({
|
|
|
380
405
|
"button",
|
|
381
406
|
{
|
|
382
407
|
type: "button",
|
|
383
|
-
onClick: () =>
|
|
384
|
-
onBlur: () =>
|
|
385
|
-
disabled:
|
|
408
|
+
onClick: () => $ ? y.mutate() : p(!0),
|
|
409
|
+
onBlur: () => p(!1),
|
|
410
|
+
disabled: y.isPending,
|
|
386
411
|
"data-note-replay": t.id,
|
|
387
|
-
className: `rounded px-1.5 py-px text-[10.5px] font-medium transition-colors ${
|
|
412
|
+
className: `rounded px-1.5 py-px text-[10.5px] font-medium transition-colors ${$ ? "bg-sky-600 text-white" : "text-sky-700 hover:bg-sky-50 dark:text-sky-300 dark:hover:bg-sky-900/20"}`,
|
|
388
413
|
"data-tip": "Re-apply this event from its stored payload",
|
|
389
|
-
children:
|
|
414
|
+
children: y.isPending ? "Replaying…" : $ ? "Replay this event?" : "Replay"
|
|
390
415
|
}
|
|
391
416
|
)
|
|
392
417
|
] }),
|
|
@@ -396,7 +421,7 @@ function nt({
|
|
|
396
421
|
"button",
|
|
397
422
|
{
|
|
398
423
|
type: "button",
|
|
399
|
-
onClick: () =>
|
|
424
|
+
onClick: () => M.mutate(o.emoji),
|
|
400
425
|
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"}`,
|
|
401
426
|
children: [
|
|
402
427
|
o.emoji,
|
|
@@ -410,17 +435,17 @@ function nt({
|
|
|
410
435
|
"button",
|
|
411
436
|
{
|
|
412
437
|
type: "button",
|
|
413
|
-
onClick: () =>
|
|
438
|
+
onClick: () => D((o) => !o),
|
|
414
439
|
className: "rounded p-0.5 text-slate-300 transition-colors hover:bg-slate-100 hover:text-slate-500 dark:hover:bg-muted",
|
|
415
440
|
"aria-label": "Add reaction",
|
|
416
441
|
children: /* @__PURE__ */ e(ge, { className: "h-3.5 w-3.5" })
|
|
417
442
|
}
|
|
418
443
|
),
|
|
419
|
-
|
|
444
|
+
v && /* @__PURE__ */ e("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: ye.map((o) => /* @__PURE__ */ e(
|
|
420
445
|
"button",
|
|
421
446
|
{
|
|
422
447
|
type: "button",
|
|
423
|
-
onClick: () =>
|
|
448
|
+
onClick: () => M.mutate(o),
|
|
424
449
|
className: "rounded-full px-1 text-[14px] hover:bg-muted",
|
|
425
450
|
children: o
|
|
426
451
|
},
|
|
@@ -429,10 +454,10 @@ function nt({
|
|
|
429
454
|
] })
|
|
430
455
|
] })
|
|
431
456
|
] }),
|
|
432
|
-
|
|
433
|
-
|
|
457
|
+
f && t.provider && /* @__PURE__ */ e(
|
|
458
|
+
Ye,
|
|
434
459
|
{
|
|
435
|
-
target:
|
|
460
|
+
target: h ? {
|
|
436
461
|
source: t.provider,
|
|
437
462
|
id: t.id.replace(/^external:/, ""),
|
|
438
463
|
record: { collection: i, item: d }
|
|
@@ -443,99 +468,99 @@ function nt({
|
|
|
443
468
|
)
|
|
444
469
|
] });
|
|
445
470
|
}
|
|
446
|
-
function
|
|
471
|
+
function Dt({
|
|
447
472
|
collection: t,
|
|
448
473
|
item: i,
|
|
449
474
|
title: d,
|
|
450
475
|
defaultExpanded: c,
|
|
451
|
-
queuedComments:
|
|
476
|
+
queuedComments: h,
|
|
452
477
|
onQueueComment: m
|
|
453
478
|
}) {
|
|
454
|
-
const
|
|
455
|
-
|
|
456
|
-
|
|
479
|
+
const f = oe(), { userId: S } = Me(), g = fe(), v = He(), [D, M] = N(!1), $ = Y(!1);
|
|
480
|
+
Z(() => {
|
|
481
|
+
!$.current && c !== void 0 && ($.current = !0, M(c));
|
|
457
482
|
}, [c]);
|
|
458
|
-
const [p,
|
|
483
|
+
const [p, y] = N(""), [R, P] = N(!1), w = async () => {
|
|
459
484
|
var r;
|
|
460
|
-
if (!(!p.trim() ||
|
|
461
|
-
|
|
485
|
+
if (!(!p.trim() || R)) {
|
|
486
|
+
P(!0);
|
|
462
487
|
try {
|
|
463
|
-
const a = await
|
|
464
|
-
|
|
488
|
+
const a = await f.request(
|
|
489
|
+
B("/ai/cleanup", { text: p })
|
|
465
490
|
);
|
|
466
|
-
(r = a.data) != null && r.text &&
|
|
491
|
+
(r = a.data) != null && r.text && y(a.data.text);
|
|
467
492
|
} catch {
|
|
468
493
|
} finally {
|
|
469
|
-
|
|
494
|
+
P(!1);
|
|
470
495
|
}
|
|
471
496
|
}
|
|
472
|
-
},
|
|
473
|
-
|
|
497
|
+
}, E = Ke(t, i, "note"), o = Be(t, i, "note"), b = Y(0);
|
|
498
|
+
Z(() => {
|
|
474
499
|
if (!p.trim()) {
|
|
475
|
-
|
|
500
|
+
b.current && o("stop"), b.current = 0;
|
|
476
501
|
return;
|
|
477
502
|
}
|
|
478
503
|
const r = Date.now();
|
|
479
|
-
r -
|
|
480
|
-
}, [p,
|
|
481
|
-
const [
|
|
482
|
-
queryKey:
|
|
483
|
-
queryFn: () =>
|
|
484
|
-
enabled: !
|
|
485
|
-
}),
|
|
504
|
+
r - b.current < 2500 || (b.current = r, o("start"));
|
|
505
|
+
}, [p, o]), Z(() => () => o("stop"), [o]);
|
|
506
|
+
const [I, A] = N(null), [Q, q] = N(null), [z, n] = N(""), l = !i || i === "new", u = ["comments", t, String(i)], { data: k, isLoading: _, isError: j } = U({
|
|
507
|
+
queryKey: u,
|
|
508
|
+
queryFn: () => f.request(W("/comments", { collection: t, item: i })).then((r) => r.data),
|
|
509
|
+
enabled: !l
|
|
510
|
+
}), O = X(() => (k ?? []).filter((r) => !r.deleted), [k]), { data: ve } = U({
|
|
486
511
|
queryKey: ["comments-related", t, String(i)],
|
|
487
|
-
queryFn: () =>
|
|
488
|
-
enabled: !
|
|
512
|
+
queryFn: () => f.request(W("/comments/related", { collection: t, item: i })).then((r) => r.data ?? []).catch(() => []),
|
|
513
|
+
enabled: !l,
|
|
489
514
|
staleTime: 3e4
|
|
490
|
-
}), ie =
|
|
491
|
-
const r =
|
|
492
|
-
return [...r, ...a].sort((
|
|
493
|
-
}, [
|
|
515
|
+
}), ie = ve ?? [], C = X(() => {
|
|
516
|
+
const r = O.map((x) => ({ kind: "comment", at: x.created_at, comment: x })), a = ie.map((x) => ({ kind: "related", at: x.created_at, note: x }));
|
|
517
|
+
return [...r, ...a].sort((x, K) => new Date(K.at).getTime() - new Date(x.at).getTime());
|
|
518
|
+
}, [O, ie]), [G, ke] = N(() => /* @__PURE__ */ new Set()), [H, Ne] = N(""), we = X(() => {
|
|
494
519
|
const r = { people: 0, system: 0, integration: 0 };
|
|
495
|
-
for (const a of
|
|
520
|
+
for (const a of C) r[be(a)]++;
|
|
496
521
|
return r;
|
|
497
|
-
}, [
|
|
498
|
-
const r =
|
|
499
|
-
return
|
|
500
|
-
}, [
|
|
501
|
-
const
|
|
502
|
-
return
|
|
503
|
-
}),
|
|
504
|
-
mutationFn: (r) =>
|
|
522
|
+
}, [C]), ee = X(() => {
|
|
523
|
+
const r = H.trim().toLowerCase();
|
|
524
|
+
return C.filter((a) => G.has(be(a)) ? !1 : r ? (a.kind === "comment" ? `${a.comment.text} ${ae(a.comment.user)}` : `${a.note.text} ${a.note.user_name ?? ""} ${a.note.label} ${a.note.context ?? ""} ${a.note.provider ?? ""}`).toLowerCase().includes(r) : !0);
|
|
525
|
+
}, [C, G, H]), _e = (r) => ke((a) => {
|
|
526
|
+
const x = new Set(a);
|
|
527
|
+
return x.has(r) ? x.delete(r) : x.add(r), x;
|
|
528
|
+
}), Ce = G.size > 0 || H.trim() !== "", te = L({
|
|
529
|
+
mutationFn: (r) => f.request(B("/comments", { collection: t, item: i, text: r })),
|
|
505
530
|
onSuccess: () => {
|
|
506
|
-
|
|
531
|
+
g.invalidateQueries({ queryKey: u }), y("");
|
|
507
532
|
},
|
|
508
|
-
onError: () =>
|
|
509
|
-
}), de =
|
|
510
|
-
mutationFn: ({ id: r, text: a }) =>
|
|
533
|
+
onError: () => F.error("Failed to post comment")
|
|
534
|
+
}), de = L({
|
|
535
|
+
mutationFn: ({ id: r, text: a }) => f.request(Oe(`/comments/${r}`, { text: a })),
|
|
511
536
|
onSuccess: () => {
|
|
512
|
-
|
|
537
|
+
g.invalidateQueries({ queryKey: u }), A(null), n("");
|
|
513
538
|
},
|
|
514
|
-
onError: () =>
|
|
515
|
-
}),
|
|
516
|
-
mutationFn: (r) =>
|
|
517
|
-
onSuccess: () =>
|
|
518
|
-
onError: () =>
|
|
519
|
-
}), ce =
|
|
520
|
-
mutationFn: ({ id: r, emoji: a }) =>
|
|
521
|
-
onSuccess: () =>
|
|
522
|
-
onError: () =>
|
|
523
|
-
}), [me,
|
|
524
|
-
mutationFn: (r) =>
|
|
525
|
-
|
|
539
|
+
onError: () => F.error("Failed to update comment")
|
|
540
|
+
}), ne = L({
|
|
541
|
+
mutationFn: (r) => f.request(Le(`/comments/${r}`)),
|
|
542
|
+
onSuccess: () => g.invalidateQueries({ queryKey: u }),
|
|
543
|
+
onError: () => F.error("Failed to delete comment")
|
|
544
|
+
}), ce = L({
|
|
545
|
+
mutationFn: ({ id: r, emoji: a }) => f.request(B(`/comments/${r}/reactions`, { emoji: a })),
|
|
546
|
+
onSuccess: () => g.invalidateQueries({ queryKey: u }),
|
|
547
|
+
onError: () => F.error("Failed to react")
|
|
548
|
+
}), [me, pe] = N(null), Se = L({
|
|
549
|
+
mutationFn: (r) => f.request(
|
|
550
|
+
B("/tasks", {
|
|
526
551
|
collection: t,
|
|
527
552
|
item: i,
|
|
528
553
|
title: r.text.replace(/<[^>]*>/g, "").replace(/@\[([^\]]+)\]/g, "@$1").slice(0, 200),
|
|
529
|
-
assignee:
|
|
554
|
+
assignee: S
|
|
530
555
|
})
|
|
531
556
|
),
|
|
532
557
|
onSuccess: () => {
|
|
533
|
-
|
|
558
|
+
ze(g, t, i), F.success("Task created from comment — assigned to you");
|
|
534
559
|
},
|
|
535
|
-
onError: () =>
|
|
560
|
+
onError: () => F.error("Could not create a task")
|
|
536
561
|
});
|
|
537
|
-
function
|
|
538
|
-
r.preventDefault(), p.trim() && (
|
|
562
|
+
function ue(r) {
|
|
563
|
+
r.preventDefault(), p.trim() && (l && m ? (m(p.trim()), y("")) : te.mutate(p.trim()));
|
|
539
564
|
}
|
|
540
565
|
return (
|
|
541
566
|
// Addressable from elsewhere (the summary panel jumps here), which needs
|
|
@@ -544,7 +569,7 @@ function Ct({
|
|
|
544
569
|
"div",
|
|
545
570
|
{
|
|
546
571
|
"data-panel": "notes",
|
|
547
|
-
"data-panel-expanded":
|
|
572
|
+
"data-panel-expanded": D ? "true" : "false",
|
|
548
573
|
className: "overflow-hidden rounded-xl border border-slate-200 bg-white dark:bg-card dark:border-border",
|
|
549
574
|
children: [
|
|
550
575
|
/* @__PURE__ */ s(
|
|
@@ -556,37 +581,37 @@ function Ct({
|
|
|
556
581
|
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]",
|
|
557
582
|
children: [
|
|
558
583
|
/* @__PURE__ */ s("span", { className: "flex w-full items-center gap-2.5", children: [
|
|
559
|
-
/* @__PURE__ */ e(
|
|
584
|
+
/* @__PURE__ */ e($e, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" }),
|
|
560
585
|
/* @__PURE__ */ e("span", { className: "text-[13px] font-medium text-slate-800 dark:text-slate-200", children: d || "Comments" }),
|
|
561
|
-
(
|
|
586
|
+
(C.length > 0 || (h ?? []).length > 0) && /* @__PURE__ */ e("span", { 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", children: l ? (h ?? []).length : C.length }),
|
|
562
587
|
/* @__PURE__ */ e(
|
|
563
|
-
|
|
588
|
+
Ee,
|
|
564
589
|
{
|
|
565
|
-
className: `ml-auto h-3.5 w-3.5 shrink-0 text-slate-400 transition-transform duration-150${
|
|
590
|
+
className: `ml-auto h-3.5 w-3.5 shrink-0 text-slate-400 transition-transform duration-150${D ? " rotate-180" : ""}`
|
|
566
591
|
}
|
|
567
592
|
)
|
|
568
593
|
] }),
|
|
569
|
-
!
|
|
570
|
-
const r =
|
|
571
|
-
return
|
|
594
|
+
!D && !l && C.length > 0 && (() => {
|
|
595
|
+
const r = C[0], a = r.kind === "comment" ? ae(r.comment.user) : r.note.user_name ?? "System", x = (r.kind === "comment" ? r.comment.text : r.note.text).replace(/<[^>]*>/g, " ").replace(/@\[([^\]]+)\]/g, "@$1").replace(/\s+/g, " ").trim();
|
|
596
|
+
return x ? /* @__PURE__ */ s("span", { className: "mt-1 w-full truncate pl-6 text-[11.5px] text-slate-400", children: [
|
|
572
597
|
/* @__PURE__ */ s("span", { className: "font-medium text-slate-500 dark:text-slate-400", children: [
|
|
573
598
|
a,
|
|
574
599
|
":"
|
|
575
600
|
] }),
|
|
576
601
|
" ",
|
|
577
|
-
/* @__PURE__ */ e(se, { text:
|
|
602
|
+
/* @__PURE__ */ e(se, { text: x, plain: !0 })
|
|
578
603
|
] }) : null;
|
|
579
604
|
})()
|
|
580
605
|
]
|
|
581
606
|
}
|
|
582
607
|
),
|
|
583
|
-
|
|
584
|
-
/* @__PURE__ */ s("form", { onSubmit:
|
|
608
|
+
D && /* @__PURE__ */ e("div", { className: "border-t border-slate-100 px-5 py-4 dark:border-border/60", children: l ? /* @__PURE__ */ s("div", { className: "space-y-4", children: [
|
|
609
|
+
/* @__PURE__ */ s("form", { onSubmit: ue, className: "space-y-2", children: [
|
|
585
610
|
/* @__PURE__ */ e(
|
|
586
|
-
|
|
611
|
+
re,
|
|
587
612
|
{
|
|
588
613
|
value: p,
|
|
589
|
-
onChange:
|
|
614
|
+
onChange: y,
|
|
590
615
|
placeholder: "Write a comment…",
|
|
591
616
|
rows: 3,
|
|
592
617
|
className: "text-[13px]"
|
|
@@ -597,9 +622,9 @@ function Ct({
|
|
|
597
622
|
/* @__PURE__ */ e(J, { type: "submit", size: "sm", disabled: !p.trim(), children: "Queue" })
|
|
598
623
|
] })
|
|
599
624
|
] }),
|
|
600
|
-
(
|
|
625
|
+
(h ?? []).length > 0 && /* @__PURE__ */ s("div", { className: "space-y-2", children: [
|
|
601
626
|
/* @__PURE__ */ e(xe, {}),
|
|
602
|
-
(
|
|
627
|
+
(h ?? []).map((r, a) => /* @__PURE__ */ s(
|
|
603
628
|
"div",
|
|
604
629
|
{
|
|
605
630
|
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",
|
|
@@ -611,13 +636,13 @@ function Ct({
|
|
|
611
636
|
a
|
|
612
637
|
))
|
|
613
638
|
] })
|
|
614
|
-
] }) : /* @__PURE__ */ s(
|
|
615
|
-
/* @__PURE__ */ s("form", { onSubmit:
|
|
639
|
+
] }) : /* @__PURE__ */ s(V, { children: [
|
|
640
|
+
/* @__PURE__ */ s("form", { onSubmit: ue, className: "space-y-2", children: [
|
|
616
641
|
/* @__PURE__ */ e(
|
|
617
|
-
|
|
642
|
+
re,
|
|
618
643
|
{
|
|
619
644
|
value: p,
|
|
620
|
-
onChange:
|
|
645
|
+
onChange: y,
|
|
621
646
|
placeholder: "Write a comment…",
|
|
622
647
|
rows: 3,
|
|
623
648
|
className: "text-[13px]"
|
|
@@ -630,46 +655,46 @@ function Ct({
|
|
|
630
655
|
"button",
|
|
631
656
|
{
|
|
632
657
|
type: "button",
|
|
633
|
-
disabled: !p.trim() ||
|
|
634
|
-
onClick: () => void
|
|
658
|
+
disabled: !p.trim() || R,
|
|
659
|
+
onClick: () => void w(),
|
|
635
660
|
"data-tip": "✨ Fix grammar & clarity (meaning preserved)",
|
|
636
661
|
className: "rounded-md border border-slate-200 px-2 py-1 text-[11.5px] text-slate-500 hover:bg-muted disabled:opacity-50 dark:border-border",
|
|
637
|
-
children:
|
|
662
|
+
children: R ? "…" : "✨ Polish"
|
|
638
663
|
}
|
|
639
664
|
),
|
|
640
|
-
/* @__PURE__ */ e(J, { type: "submit", size: "sm", disabled: !p.trim() ||
|
|
665
|
+
/* @__PURE__ */ e(J, { type: "submit", size: "sm", disabled: !p.trim() || te.isPending, children: te.isPending ? "Posting…" : "Comment" })
|
|
641
666
|
] })
|
|
642
667
|
] })
|
|
643
668
|
] }),
|
|
644
|
-
|
|
669
|
+
E.length > 0 && /* @__PURE__ */ s(
|
|
645
670
|
"p",
|
|
646
671
|
{
|
|
647
672
|
className: "flex items-center gap-1.5 text-[11.5px] italic text-slate-400",
|
|
648
673
|
"data-note-typing": !0,
|
|
649
674
|
children: [
|
|
650
675
|
/* @__PURE__ */ e("span", { className: "h-1.5 w-1.5 animate-pulse rounded-full bg-nvr-cyan" }),
|
|
651
|
-
|
|
676
|
+
Qe(E, "writing a note"),
|
|
652
677
|
"…"
|
|
653
678
|
]
|
|
654
679
|
}
|
|
655
680
|
),
|
|
656
681
|
/* @__PURE__ */ e(xe, { className: "my-4" }),
|
|
657
|
-
|
|
682
|
+
C.length > 0 && /* @__PURE__ */ s("div", { className: "mb-3 flex flex-wrap items-center gap-1.5", "data-notes-filters": !0, children: [
|
|
658
683
|
["people", "system", "integration"].map((r) => {
|
|
659
|
-
const a = !
|
|
684
|
+
const a = !G.has(r), x = we[r];
|
|
660
685
|
return /* @__PURE__ */ s(
|
|
661
686
|
"button",
|
|
662
687
|
{
|
|
663
688
|
type: "button",
|
|
664
|
-
onClick: () =>
|
|
689
|
+
onClick: () => _e(r),
|
|
665
690
|
"aria-pressed": a,
|
|
666
691
|
"data-notes-filter": r,
|
|
667
|
-
disabled:
|
|
692
|
+
disabled: x === 0 && a,
|
|
668
693
|
className: `inline-flex items-center gap-1 rounded-full border px-2 py-px text-[11px] font-medium transition-colors ${a ? "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`,
|
|
669
694
|
title: r === "people" ? "Comments and notes people wrote" : r === "system" ? "State changes, change reasons, addendums and imports" : "Events an integration recorded",
|
|
670
695
|
children: [
|
|
671
|
-
|
|
672
|
-
/* @__PURE__ */ e("span", { className: "tabular-nums text-[10px] opacity-70", children:
|
|
696
|
+
rt[r],
|
|
697
|
+
/* @__PURE__ */ e("span", { className: "tabular-nums text-[10px] opacity-70", children: x })
|
|
673
698
|
]
|
|
674
699
|
},
|
|
675
700
|
r
|
|
@@ -678,18 +703,18 @@ function Ct({
|
|
|
678
703
|
/* @__PURE__ */ e(
|
|
679
704
|
"input",
|
|
680
705
|
{
|
|
681
|
-
value:
|
|
682
|
-
onChange: (r) =>
|
|
706
|
+
value: H,
|
|
707
|
+
onChange: (r) => Ne(r.target.value),
|
|
683
708
|
placeholder: "Search notes…",
|
|
684
709
|
"aria-label": "Search notes",
|
|
685
710
|
"data-notes-search": !0,
|
|
686
711
|
className: "ml-auto h-6 w-[150px] rounded-md border border-slate-200 bg-background px-2 text-[11.5px] dark:border-border"
|
|
687
712
|
}
|
|
688
713
|
),
|
|
689
|
-
|
|
690
|
-
|
|
714
|
+
Ce && /* @__PURE__ */ s("span", { className: "text-[10.5px] tabular-nums text-slate-400", "data-notes-shown": !0, children: [
|
|
715
|
+
ee.length,
|
|
691
716
|
" of ",
|
|
692
|
-
|
|
717
|
+
C.length
|
|
693
718
|
] })
|
|
694
719
|
] }),
|
|
695
720
|
_ ? /* @__PURE__ */ e("div", { className: "space-y-4", children: ["a", "b"].map((r) => /* @__PURE__ */ s("div", { className: "flex gap-3", children: [
|
|
@@ -698,36 +723,45 @@ function Ct({
|
|
|
698
723
|
/* @__PURE__ */ e("div", { className: "h-3 w-32 animate-pulse rounded bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" }),
|
|
699
724
|
/* @__PURE__ */ e("div", { className: "h-3 w-full animate-pulse rounded bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" })
|
|
700
725
|
] })
|
|
701
|
-
] }, r)) }) :
|
|
726
|
+
] }, r)) }) : j ? /* @__PURE__ */ e("p", { className: "py-6 text-center text-[12px] text-red-500", children: "Failed to load comments." }) : C.length === 0 ? /* @__PURE__ */ e("p", { className: "py-6 text-center text-[12px] text-slate-400", children: "No notes yet." }) : ee.length === 0 ? /* @__PURE__ */ e("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__ */ e("div", { className: "nvr-stagger-direct space-y-4", children: ee.map((r) => {
|
|
702
727
|
if (r.kind === "related")
|
|
703
728
|
return /* @__PURE__ */ e("div", { className: "nvr-section-enter", children: /* @__PURE__ */ e(
|
|
704
|
-
|
|
729
|
+
ot,
|
|
705
730
|
{
|
|
706
731
|
note: r.note,
|
|
707
732
|
collection: t,
|
|
708
733
|
item: String(i)
|
|
709
734
|
}
|
|
710
735
|
) }, r.note.id);
|
|
711
|
-
const a = r.comment,
|
|
736
|
+
const a = r.comment, x = S === a.user.id, K = I === a.id;
|
|
712
737
|
return /* @__PURE__ */ s("div", { className: "nvr-section-enter group flex gap-3", children: [
|
|
713
738
|
/* @__PURE__ */ e(
|
|
714
|
-
|
|
739
|
+
Xe,
|
|
715
740
|
{
|
|
716
741
|
userId: a.user.id,
|
|
717
742
|
className: "h-8 w-8",
|
|
718
|
-
fallback: /* @__PURE__ */ e(
|
|
743
|
+
fallback: /* @__PURE__ */ e(Je, { className: "h-8 w-8 shrink-0", children: /* @__PURE__ */ e(Ve, { className: "bg-nvr-cyan/15 text-[11px] font-bold text-nvr-navy", children: et(a.user) }) })
|
|
719
744
|
}
|
|
720
745
|
),
|
|
721
746
|
/* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: [
|
|
722
747
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
723
|
-
/* @__PURE__ */ e("span", { className: "text-[13px] font-medium text-slate-800", children:
|
|
724
|
-
/* @__PURE__ */ e(
|
|
748
|
+
/* @__PURE__ */ e("span", { className: "text-[13px] font-medium text-slate-800", children: ae(a.user) }),
|
|
749
|
+
/* @__PURE__ */ e(We, { label: a.via_agent }),
|
|
725
750
|
/* @__PURE__ */ e("span", { className: "text-[11px] text-slate-400", children: le(a.created_at) }),
|
|
726
751
|
a.updated_at && a.updated_at !== a.created_at && /* @__PURE__ */ e("span", { className: "text-[10px] text-slate-300", children: "(edited)" }),
|
|
727
|
-
|
|
752
|
+
a.field && /* @__PURE__ */ e(
|
|
753
|
+
nt,
|
|
754
|
+
{
|
|
755
|
+
field: a.field,
|
|
756
|
+
label: (v == null ? void 0 : v.labelOf(a.field)) ?? Ue(a.field),
|
|
757
|
+
resolved: !!a.resolved_at,
|
|
758
|
+
onJump: v ? () => v.jump(a.field) : void 0
|
|
759
|
+
}
|
|
760
|
+
),
|
|
761
|
+
!K && /* @__PURE__ */ s(
|
|
728
762
|
"div",
|
|
729
763
|
{
|
|
730
|
-
className: `ml-auto flex items-center gap-1 transition-opacity group-hover:opacity-100 focus-within:opacity-100 ${
|
|
764
|
+
className: `ml-auto flex items-center gap-1 transition-opacity group-hover:opacity-100 focus-within:opacity-100 ${Q === a.id ? "opacity-100" : "opacity-0"}`,
|
|
731
765
|
children: [
|
|
732
766
|
/* @__PURE__ */ e(
|
|
733
767
|
"button",
|
|
@@ -736,23 +770,23 @@ function Ct({
|
|
|
736
770
|
title: "Make a task from this comment",
|
|
737
771
|
"aria-label": "Make a task from this comment",
|
|
738
772
|
className: "rounded p-1 text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-700 dark:hover:bg-muted",
|
|
739
|
-
onClick: () =>
|
|
740
|
-
children: /* @__PURE__ */ e(
|
|
773
|
+
onClick: () => Se.mutate(a),
|
|
774
|
+
children: /* @__PURE__ */ e(qe, { className: "h-3 w-3" })
|
|
741
775
|
}
|
|
742
776
|
),
|
|
743
|
-
|
|
777
|
+
x && (Q === a.id ? /* @__PURE__ */ s(V, { children: [
|
|
744
778
|
/* @__PURE__ */ e(
|
|
745
779
|
"button",
|
|
746
780
|
{
|
|
747
781
|
type: "button",
|
|
748
782
|
autoFocus: !0,
|
|
749
|
-
disabled:
|
|
783
|
+
disabled: ne.isPending,
|
|
750
784
|
"data-comment-delete-confirm": a.id,
|
|
751
785
|
className: "rounded bg-red-600 px-1.5 py-px text-[10.5px] font-medium text-white transition-colors hover:bg-red-700 disabled:opacity-60",
|
|
752
|
-
onClick: () =>
|
|
753
|
-
onSettled: () =>
|
|
786
|
+
onClick: () => ne.mutate(a.id, {
|
|
787
|
+
onSettled: () => q(null)
|
|
754
788
|
}),
|
|
755
|
-
children:
|
|
789
|
+
children: ne.isPending ? "Deleting…" : "Delete comment?"
|
|
756
790
|
}
|
|
757
791
|
),
|
|
758
792
|
/* @__PURE__ */ e(
|
|
@@ -760,11 +794,11 @@ function Ct({
|
|
|
760
794
|
{
|
|
761
795
|
type: "button",
|
|
762
796
|
className: "rounded px-1.5 py-px text-[10.5px] font-medium text-slate-500 transition-colors hover:bg-slate-100 dark:hover:bg-muted",
|
|
763
|
-
onClick: () =>
|
|
797
|
+
onClick: () => q(null),
|
|
764
798
|
children: "Keep"
|
|
765
799
|
}
|
|
766
800
|
)
|
|
767
|
-
] }) : /* @__PURE__ */ s(
|
|
801
|
+
] }) : /* @__PURE__ */ s(V, { children: [
|
|
768
802
|
/* @__PURE__ */ e(
|
|
769
803
|
"button",
|
|
770
804
|
{
|
|
@@ -773,9 +807,9 @@ function Ct({
|
|
|
773
807
|
"aria-label": "Edit comment",
|
|
774
808
|
className: "rounded p-1 text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-700",
|
|
775
809
|
onClick: () => {
|
|
776
|
-
|
|
810
|
+
A(a.id), n(a.text);
|
|
777
811
|
},
|
|
778
|
-
children: /* @__PURE__ */ e(
|
|
812
|
+
children: /* @__PURE__ */ e(De, { className: "h-3 w-3" })
|
|
779
813
|
}
|
|
780
814
|
),
|
|
781
815
|
/* @__PURE__ */ e(
|
|
@@ -785,8 +819,8 @@ function Ct({
|
|
|
785
819
|
title: "Delete comment",
|
|
786
820
|
"aria-label": "Delete comment",
|
|
787
821
|
className: "rounded p-1 text-slate-400 transition-colors hover:bg-red-50 hover:text-red-500",
|
|
788
|
-
onClick: () =>
|
|
789
|
-
children: /* @__PURE__ */ e(
|
|
822
|
+
onClick: () => q(a.id),
|
|
823
|
+
children: /* @__PURE__ */ e(Pe, { className: "h-3 w-3" })
|
|
790
824
|
}
|
|
791
825
|
)
|
|
792
826
|
] }))
|
|
@@ -794,12 +828,12 @@ function Ct({
|
|
|
794
828
|
}
|
|
795
829
|
)
|
|
796
830
|
] }),
|
|
797
|
-
|
|
831
|
+
K ? /* @__PURE__ */ s("div", { className: "mt-1.5 space-y-2", children: [
|
|
798
832
|
/* @__PURE__ */ e(
|
|
799
|
-
|
|
833
|
+
re,
|
|
800
834
|
{
|
|
801
|
-
value:
|
|
802
|
-
onChange:
|
|
835
|
+
value: z,
|
|
836
|
+
onChange: n,
|
|
803
837
|
rows: 3,
|
|
804
838
|
className: "text-[13px]"
|
|
805
839
|
}
|
|
@@ -810,10 +844,10 @@ function Ct({
|
|
|
810
844
|
{
|
|
811
845
|
size: "sm",
|
|
812
846
|
className: "h-7 gap-1.5",
|
|
813
|
-
disabled: !
|
|
814
|
-
onClick: () => de.mutate({ id: a.id, text:
|
|
847
|
+
disabled: !z.trim() || de.isPending,
|
|
848
|
+
onClick: () => de.mutate({ id: a.id, text: z.trim() }),
|
|
815
849
|
children: [
|
|
816
|
-
/* @__PURE__ */ e(
|
|
850
|
+
/* @__PURE__ */ e(Te, { className: "h-3 w-3" }),
|
|
817
851
|
" Save"
|
|
818
852
|
]
|
|
819
853
|
}
|
|
@@ -825,53 +859,53 @@ function Ct({
|
|
|
825
859
|
variant: "outline",
|
|
826
860
|
className: "h-7 gap-1.5",
|
|
827
861
|
onClick: () => {
|
|
828
|
-
|
|
862
|
+
A(null), n("");
|
|
829
863
|
},
|
|
830
864
|
children: [
|
|
831
|
-
/* @__PURE__ */ e(
|
|
865
|
+
/* @__PURE__ */ e(Fe, { className: "h-3 w-3" }),
|
|
832
866
|
" Cancel"
|
|
833
867
|
]
|
|
834
868
|
}
|
|
835
869
|
)
|
|
836
870
|
] })
|
|
837
871
|
] }) : /* @__PURE__ */ e("p", { className: "mt-0.5 whitespace-pre-wrap text-[13px] leading-relaxed text-slate-600", children: /* @__PURE__ */ e(se, { text: a.text }) }),
|
|
838
|
-
!
|
|
839
|
-
!
|
|
840
|
-
(a.reactions ?? []).map((
|
|
872
|
+
!K && /* @__PURE__ */ e(tt, { comment: a }),
|
|
873
|
+
!K && /* @__PURE__ */ s("div", { className: "mt-1 flex flex-wrap items-center gap-1", children: [
|
|
874
|
+
(a.reactions ?? []).map((T) => /* @__PURE__ */ s(
|
|
841
875
|
"button",
|
|
842
876
|
{
|
|
843
877
|
type: "button",
|
|
844
|
-
onClick: () => ce.mutate({ id: a.id, emoji:
|
|
845
|
-
className: `inline-flex items-center gap-1 rounded-full border px-1.5 py-px text-[11px] transition-colors ${
|
|
878
|
+
onClick: () => ce.mutate({ id: a.id, emoji: T.emoji }),
|
|
879
|
+
className: `inline-flex items-center gap-1 rounded-full border px-1.5 py-px text-[11px] transition-colors ${T.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"}`,
|
|
846
880
|
children: [
|
|
847
|
-
|
|
848
|
-
/* @__PURE__ */ e("span", { className: "tabular-nums text-[10px] font-semibold", children:
|
|
881
|
+
T.emoji,
|
|
882
|
+
/* @__PURE__ */ e("span", { className: "tabular-nums text-[10px] font-semibold", children: T.count })
|
|
849
883
|
]
|
|
850
884
|
},
|
|
851
|
-
|
|
885
|
+
T.emoji
|
|
852
886
|
)),
|
|
853
887
|
/* @__PURE__ */ s("span", { className: "relative", children: [
|
|
854
888
|
/* @__PURE__ */ e(
|
|
855
889
|
"button",
|
|
856
890
|
{
|
|
857
891
|
type: "button",
|
|
858
|
-
onClick: () =>
|
|
892
|
+
onClick: () => pe(me === a.id ? null : a.id),
|
|
859
893
|
className: "rounded p-0.5 text-slate-300 transition-colors hover:bg-slate-100 hover:text-slate-500 dark:hover:bg-muted",
|
|
860
894
|
"aria-label": "Add reaction",
|
|
861
895
|
children: /* @__PURE__ */ e(ge, { className: "h-3.5 w-3.5" })
|
|
862
896
|
}
|
|
863
897
|
),
|
|
864
|
-
me === a.id && /* @__PURE__ */ e("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: ye.map((
|
|
898
|
+
me === a.id && /* @__PURE__ */ e("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: ye.map((T) => /* @__PURE__ */ e(
|
|
865
899
|
"button",
|
|
866
900
|
{
|
|
867
901
|
type: "button",
|
|
868
902
|
onClick: () => {
|
|
869
|
-
ce.mutate({ id: a.id, emoji:
|
|
903
|
+
ce.mutate({ id: a.id, emoji: T }), pe(null);
|
|
870
904
|
},
|
|
871
905
|
className: "rounded-full px-1 text-[14px] hover:bg-muted",
|
|
872
|
-
children:
|
|
906
|
+
children: T
|
|
873
907
|
},
|
|
874
|
-
|
|
908
|
+
T
|
|
875
909
|
)) })
|
|
876
910
|
] })
|
|
877
911
|
] })
|
|
@@ -885,5 +919,6 @@ function Ct({
|
|
|
885
919
|
);
|
|
886
920
|
}
|
|
887
921
|
export {
|
|
888
|
-
|
|
922
|
+
Dt as CommentPanel,
|
|
923
|
+
re as MentionTextarea
|
|
889
924
|
};
|