@nivaro/react 0.3.117 → 0.3.119
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 +136 -14
- package/dist/index.js +488 -485
- package/dist/shared/components/ActivityEntry.js +130 -125
- package/dist/shared/components/AgentPresenceChip.js +36 -26
- package/dist/shared/components/CellCopyLayer.js +50 -45
- package/dist/shared/components/CollectionBrowserView.js +3757 -3695
- package/dist/shared/components/FilePreviewLightbox.js +96 -58
- package/dist/shared/components/InStep.js +18 -17
- package/dist/shared/components/ItemEditForm.js +4451 -4385
- package/dist/shared/components/JobsTray.js +8 -8
- package/dist/shared/components/LiveNewMatchesPill.js +21 -14
- package/dist/shared/components/LiveOffNote.js +3 -2
- package/dist/shared/components/LiveRowMark.js +53 -23
- package/dist/shared/components/LiveTraceView.js +162 -123
- package/dist/shared/components/MyWorkView.js +320 -299
- package/dist/shared/components/NotificationBell.js +14 -14
- package/dist/shared/components/OverflowRail.js +1 -1
- package/dist/shared/components/PageRenderer.js +120 -116
- package/dist/shared/components/ProfileView.js +203 -202
- package/dist/shared/components/RealtimeStatusBanner.js +31 -29
- package/dist/shared/components/RecordDrilldownSheet.js +7 -7
- package/dist/shared/components/RecordHoverCard.js +102 -84
- package/dist/shared/components/RecordReadView.js +146 -146
- package/dist/shared/components/ScreenRefreshButton.js +34 -32
- package/dist/shared/components/TipLayer.js +65 -58
- package/dist/shared/components/WidgetImageMenu.js +83 -43
- package/dist/shared/components/activity/RecordActivityStream.js +175 -173
- package/dist/shared/components/bulk/BulkSelectionNotices.js +142 -119
- package/dist/shared/components/change-proposals/ChangeProposalsPanel.js +158 -143
- package/dist/shared/components/change-proposals/ProposeChangeButton.js +17 -11
- package/dist/shared/components/change-proposals/ProposeChangeDialog.js +201 -173
- package/dist/shared/components/chat/ChatAnalyticsView.js +27 -27
- package/dist/shared/components/chat/HuddleAnalyticsTab.js +17 -17
- package/dist/shared/components/collections-directory/CollectionsToolbar.js +39 -41
- package/dist/shared/components/collections-directory/page-model.js +72 -67
- package/dist/shared/components/integrations/RecordIntegrationPreview.js +48 -56
- package/dist/shared/components/integrations/SendStatus.js +65 -59
- package/dist/shared/components/integrations/console/ReadyToSendView.js +275 -209
- package/dist/shared/components/integrations/console/SignalCard.js +237 -230
- package/dist/shared/components/item-edit/CatalogPickerField.js +227 -205
- package/dist/shared/components/item-edit/ChangedAfterApprovalBadge.js +135 -94
- package/dist/shared/components/item-edit/CloneDialog.js +191 -161
- package/dist/shared/components/item-edit/DerivedCauseNote.js +44 -30
- package/dist/shared/components/item-edit/DraftRecoveryBanner.js +153 -134
- package/dist/shared/components/item-edit/FieldComments.js +88 -85
- package/dist/shared/components/item-edit/FieldPointer.js +82 -67
- package/dist/shared/components/item-edit/FieldRow.js +106 -100
- package/dist/shared/components/item-edit/FieldSourceBadge.js +58 -56
- package/dist/shared/components/item-edit/FilePickerField.js +452 -387
- package/dist/shared/components/item-edit/HeaderSummaryChip.js +78 -56
- package/dist/shared/components/item-edit/HeaderTools.js +245 -141
- package/dist/shared/components/item-edit/InlineTableField.js +1242 -1218
- package/dist/shared/components/item-edit/ListNeighborNav.js +47 -50
- package/dist/shared/components/item-edit/LiveTraceSheet.js +15 -10
- package/dist/shared/components/item-edit/MembershipSetField.js +285 -254
- package/dist/shared/components/item-edit/OutboxReviewTray.js +155 -144
- package/dist/shared/components/item-edit/QueueReturnChip.js +15 -36
- package/dist/shared/components/item-edit/RecalcValue.js +57 -32
- package/dist/shared/components/item-edit/RecordHelpChip.js +15 -16
- package/dist/shared/components/item-edit/RecordLiveSync.js +283 -231
- package/dist/shared/components/item-edit/RelationCombobox.js +439 -393
- package/dist/shared/components/item-edit/RemoteChangeUi.js +292 -224
- package/dist/shared/components/item-edit/RemoteUploads.js +26 -20
- package/dist/shared/components/item-edit/RemovedLineNote.js +77 -67
- package/dist/shared/components/item-edit/RichTextEditorImpl.js +184 -179
- package/dist/shared/components/item-edit/ScheduledChangeChip.js +168 -134
- package/dist/shared/components/item-edit/SectionPresence.js +18 -10
- package/dist/shared/components/item-edit/SplitLinesButton.js +163 -139
- package/dist/shared/components/item-edit/UserChip.js +1 -1
- package/dist/shared/components/item-edit/addendum-view.js +6 -0
- package/dist/shared/components/item-edit/file-live.js +69 -54
- package/dist/shared/components/item-edit/layout-switch.js +98 -89
- package/dist/shared/components/item-edit/partner-needs.js +12 -12
- package/dist/shared/components/item-edit/removed-line.js +31 -25
- package/dist/shared/components/layout-editor/pickers/field-picker.js +151 -130
- package/dist/shared/components/list/ListViewers.js +46 -35
- package/dist/shared/components/notifications/NotificationCenterView.js +479 -437
- package/dist/shared/components/panels/AccessDeniedPanel.js +176 -101
- package/dist/shared/components/panels/AlertBanners.js +82 -72
- package/dist/shared/components/panels/BranchLanes.js +22 -22
- package/dist/shared/components/panels/CommentImages.js +123 -102
- package/dist/shared/components/panels/CommentPanel.js +186 -185
- package/dist/shared/components/panels/ExternalRequestsChip.js +111 -119
- package/dist/shared/components/panels/OwnerOpenedLine.js +31 -24
- package/dist/shared/components/panels/PipelinePanel.js +2037 -1885
- package/dist/shared/components/panels/ResubmissionDiff.js +163 -142
- package/dist/shared/components/pipeline/OwnerMatrixSheet.js +400 -288
- package/dist/shared/components/pipeline/PipelineEditorView.js +7 -2
- package/dist/shared/components/profile/AgentNameField.js +107 -81
- package/dist/shared/components/profile/AgentsPanel.js +184 -184
- package/dist/shared/components/profile/PersonAccess.js +599 -495
- package/dist/shared/components/profile/SignInTroubleshooter.js +160 -127
- package/dist/shared/components/profile/SignedInDevices.js +17 -17
- package/dist/shared/components/profile/primitives.js +1 -1
- package/dist/shared/components/queue/OwnerAvatars.js +91 -54
- package/dist/shared/components/queue/QueueTeamStrip.js +56 -46
- package/dist/shared/components/queue/QueueWorklist.js +1002 -983
- package/dist/shared/components/support/AssignRules.js +1733 -0
- package/dist/shared/components/support/PersonPick.js +88 -0
- package/dist/shared/components/support/RequestList.js +790 -0
- package/dist/shared/components/support/ScreenShare.js +158 -152
- package/dist/shared/components/support/SupportRequestDialog.js +50 -48
- package/dist/shared/components/support/SupportView.js +140 -246
- package/dist/shared/components/support/TicketDetailSheet.js +82 -75
- package/dist/shared/components/support/TicketSlowScreens.js +9 -9
- package/dist/shared/components/support/assign-rules-text.js +171 -0
- package/dist/shared/components/support/support-list.js +125 -0
- package/dist/shared/components/ui/SimpleSelect.js +28 -20
- package/dist/shared/components/ui/checkbox.js +6 -6
- package/dist/shared/components/ui/select.js +43 -39
- package/dist/shared/components/ui/sheet.js +9 -9
- package/dist/shared/components/ui/switch.js +12 -11
- package/dist/shared/components/watch-list/WatchDock.js +532 -459
- package/dist/shared/components/watch-list/WatchExtras.js +332 -286
- package/dist/shared/components/watch-list/WatchRows.js +164 -140
- package/dist/shared/lib/activity-sentence.js +103 -91
- package/dist/shared/lib/agent-presence.js +27 -21
- package/dist/shared/lib/approval-progress.js +2 -2
- package/dist/shared/lib/copy-rules.js +31 -24
- package/dist/shared/lib/derived-causes.js +113 -78
- package/dist/shared/lib/grid-cursors.js +26 -26
- package/dist/shared/lib/label-flash.js +27 -0
- package/dist/shared/lib/list-return.js +137 -125
- package/dist/shared/lib/live-deltas.js +40 -34
- package/dist/shared/lib/live-groups.js +56 -52
- package/dist/shared/lib/live-preference.js +64 -59
- package/dist/shared/lib/live-screen.js +223 -192
- package/dist/shared/lib/partner-failure.js +11 -11
- package/dist/shared/lib/rollup-recalc.js +68 -64
- package/dist/shared/lib/screen-refresh.js +74 -68
- package/dist/shared/lib/screen-share.js +108 -104
- package/dist/shared/lib/send-status.js +77 -61
- package/dist/shared/lib/text-diff-window.js +29 -0
- package/dist/shared/lib/watch-list.js +210 -209
- package/dist/shared/lib/widget-image-render.js +72 -49
- package/package.json +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as t, jsxs as a } from "react/jsx-runtime";
|
|
2
|
-
import { useQueryClient as
|
|
3
|
-
import { Loader2 as
|
|
4
|
-
import { useState as l, useRef as
|
|
5
|
-
import { useNivaroClient as
|
|
6
|
-
import { get as
|
|
7
|
-
import { invalidateRecordTasks as
|
|
8
|
-
import { prepareReplayClip as
|
|
9
|
-
import { installReplayTail as
|
|
10
|
-
import { Dialog as
|
|
11
|
-
import { collectSupportContext as
|
|
12
|
-
function
|
|
2
|
+
import { useQueryClient as z, useQuery as G, useMutation as H } from "@tanstack/react-query";
|
|
3
|
+
import { Loader2 as W, Paperclip as X, X as B } from "lucide-react";
|
|
4
|
+
import { useState as l, useRef as $, useEffect as I } from "react";
|
|
5
|
+
import { useNivaroClient as J } from "../../context.js";
|
|
6
|
+
import { get as V, post as Z } from "../../lib/commands.js";
|
|
7
|
+
import { invalidateRecordTasks as O } from "../../lib/record-tasks.js";
|
|
8
|
+
import { prepareReplayClip as ee } from "../../lib/replay-capture.js";
|
|
9
|
+
import { installReplayTail as te } from "../../lib/replay-tail.js";
|
|
10
|
+
import { Dialog as re, DialogContent as ae, DialogHeader as ne, DialogTitle as le, DialogDescription as se } from "../ui/dialog.js";
|
|
11
|
+
import { collectSupportContext as oe } from "./support-context.js";
|
|
12
|
+
function be({
|
|
13
13
|
open: s,
|
|
14
14
|
onOpenChange: c,
|
|
15
15
|
collection: d,
|
|
@@ -17,11 +17,12 @@ function ye({
|
|
|
17
17
|
recordLabel: A,
|
|
18
18
|
initialTitle: f,
|
|
19
19
|
initialDescription: g,
|
|
20
|
+
source: Q,
|
|
20
21
|
onCreated: y
|
|
21
22
|
}) {
|
|
22
|
-
const m =
|
|
23
|
+
const m = J(), i = z(), n = !!d && p != null && p !== "", [u, T] = l(null), [b, v] = l(""), [E, k] = l(""), [w, N] = l([]), [K, F] = l(!1), [M, x] = l(null), [P, j] = l(!0), q = $(null), C = $(!1);
|
|
23
24
|
I(() => {
|
|
24
|
-
|
|
25
|
+
te();
|
|
25
26
|
}, []), I(() => {
|
|
26
27
|
s && (f && v((e) => e || f), g && k((e) => e || g));
|
|
27
28
|
}, [s, f, g]), I(() => {
|
|
@@ -30,46 +31,47 @@ function ye({
|
|
|
30
31
|
return;
|
|
31
32
|
}
|
|
32
33
|
q.current = {
|
|
33
|
-
clip:
|
|
34
|
+
clip: ee("support"),
|
|
34
35
|
route: typeof window < "u" ? window.location.pathname : ""
|
|
35
36
|
};
|
|
36
37
|
}, [s]);
|
|
37
|
-
const { data: S = [] } =
|
|
38
|
+
const { data: S = [] } = G({
|
|
38
39
|
queryKey: ["support-categories", n ? d : null],
|
|
39
40
|
queryFn: () => m.request(
|
|
40
|
-
|
|
41
|
+
V("/support/categories", n ? { collection: d } : void 0)
|
|
41
42
|
).then((e) => e.data ?? []),
|
|
42
43
|
enabled: s
|
|
43
44
|
}), R = () => {
|
|
44
|
-
|
|
45
|
+
T(null), v(""), k(""), N([]), x(null), j(!0);
|
|
45
46
|
};
|
|
46
|
-
async function
|
|
47
|
-
if (!
|
|
47
|
+
async function L() {
|
|
48
|
+
if (!P) return { fileId: null, replay: null };
|
|
48
49
|
const e = q.current;
|
|
49
|
-
return
|
|
50
|
+
return oe({
|
|
50
51
|
clip: (e == null ? void 0 : e.clip) ?? null,
|
|
51
52
|
route: (e == null ? void 0 : e.route) ?? (typeof window < "u" ? window.location.pathname : ""),
|
|
52
53
|
upload: (r) => m.upload(r, { title: "Technical details" }),
|
|
53
54
|
userAgent: typeof navigator < "u" ? navigator.userAgent : null
|
|
54
55
|
});
|
|
55
56
|
}
|
|
56
|
-
const D =
|
|
57
|
+
const D = H({
|
|
57
58
|
mutationFn: async () => {
|
|
58
|
-
const e = await
|
|
59
|
+
const e = await L();
|
|
59
60
|
return m.request(
|
|
60
|
-
|
|
61
|
+
Z("/support/tickets", {
|
|
61
62
|
title: b.trim(),
|
|
62
|
-
description:
|
|
63
|
+
description: E.trim() || null,
|
|
63
64
|
category_id: u,
|
|
64
65
|
collection: n ? d : null,
|
|
65
66
|
item: n ? String(p) : null,
|
|
66
67
|
attachments: [...w.map((r) => r.id), ...e.fileId ? [e.fileId] : []],
|
|
67
|
-
...e.replay ? { replay: e.replay } : {}
|
|
68
|
+
...e.replay ? { replay: e.replay } : {},
|
|
69
|
+
...Q ? { source: Q } : {}
|
|
68
70
|
})
|
|
69
71
|
);
|
|
70
72
|
},
|
|
71
73
|
onSuccess: (e) => {
|
|
72
|
-
i.invalidateQueries({ queryKey: ["support-tickets"] }), i.invalidateQueries({ queryKey: ["support-summary"] }), n &&
|
|
74
|
+
i.invalidateQueries({ queryKey: ["support-tickets"] }), i.invalidateQueries({ queryKey: ["support-summary"] }), n && O(i, d, p), y == null || y(e.data), R(), c(!1);
|
|
73
75
|
},
|
|
74
76
|
onError: (e) => {
|
|
75
77
|
var o;
|
|
@@ -84,40 +86,40 @@ function ye({
|
|
|
84
86
|
C.current = !1;
|
|
85
87
|
}
|
|
86
88
|
});
|
|
87
|
-
async function
|
|
89
|
+
async function Y(e) {
|
|
88
90
|
if (e != null && e.length) {
|
|
89
|
-
|
|
91
|
+
F(!0), x(null);
|
|
90
92
|
try {
|
|
91
93
|
for (const r of Array.from(e).slice(0, 10)) {
|
|
92
94
|
const o = await m.upload(r);
|
|
93
|
-
N((
|
|
95
|
+
N((_) => [..._, { id: String(o.id), name: r.name }]);
|
|
94
96
|
}
|
|
95
97
|
} catch {
|
|
96
98
|
x("A file could not be uploaded");
|
|
97
99
|
} finally {
|
|
98
|
-
|
|
100
|
+
F(!1);
|
|
99
101
|
}
|
|
100
102
|
}
|
|
101
103
|
}
|
|
102
|
-
const h = S.find((e) => e.id === u) ?? null,
|
|
104
|
+
const h = S.find((e) => e.id === u) ?? null, U = b.trim().length > 0 && !D.isPending && !K;
|
|
103
105
|
return /* @__PURE__ */ t(
|
|
104
|
-
|
|
106
|
+
re,
|
|
105
107
|
{
|
|
106
108
|
open: s,
|
|
107
109
|
onOpenChange: (e) => {
|
|
108
110
|
e || R(), c(e);
|
|
109
111
|
},
|
|
110
|
-
children: /* @__PURE__ */ a(
|
|
111
|
-
/* @__PURE__ */ a(
|
|
112
|
-
/* @__PURE__ */ t(
|
|
113
|
-
/* @__PURE__ */ t(
|
|
112
|
+
children: /* @__PURE__ */ a(ae, { className: "max-w-xl dark:bg-card", "data-support-request": !0, children: [
|
|
113
|
+
/* @__PURE__ */ a(ne, { className: "px-6 pt-5", children: [
|
|
114
|
+
/* @__PURE__ */ t(le, { className: "text-[15px] font-semibold text-slate-900 dark:text-slate-100", children: n ? `Request a change${A ? ` · ${A}` : ""}` : "Get help" }),
|
|
115
|
+
/* @__PURE__ */ t(se, { className: "text-[12.5px] text-slate-500 dark:text-muted-foreground", children: n ? "Tell the administrators what needs to change on this record. You can follow the request under My requests." : "Ask the administrators for help. You can follow the request under My requests." })
|
|
114
116
|
] }),
|
|
115
117
|
/* @__PURE__ */ a(
|
|
116
118
|
"form",
|
|
117
119
|
{
|
|
118
120
|
className: "space-y-4 px-6 pb-5 pt-3",
|
|
119
121
|
onSubmit: (e) => {
|
|
120
|
-
e.preventDefault(), !(!
|
|
122
|
+
e.preventDefault(), !(!U || C.current) && (C.current = !0, D.mutate());
|
|
121
123
|
},
|
|
122
124
|
children: [
|
|
123
125
|
S.length > 0 && /* @__PURE__ */ a("fieldset", { children: [
|
|
@@ -128,7 +130,7 @@ function ye({
|
|
|
128
130
|
type: "button",
|
|
129
131
|
"data-support-type": e.id,
|
|
130
132
|
"aria-pressed": u === e.id,
|
|
131
|
-
onClick: () =>
|
|
133
|
+
onClick: () => T(u === e.id ? null : e.id),
|
|
132
134
|
className: u === e.id ? "rounded-full border border-nvr-cyan/60 bg-nvr-cyan/10 px-2.5 py-1 text-[12px] font-medium text-nvr-navy dark:text-nvr-cyan" : "rounded-full border border-slate-200 px-2.5 py-1 text-[12px] text-slate-600 hover:border-slate-300 dark:border-border dark:text-slate-300",
|
|
133
135
|
children: e.name
|
|
134
136
|
},
|
|
@@ -156,7 +158,7 @@ function ye({
|
|
|
156
158
|
"textarea",
|
|
157
159
|
{
|
|
158
160
|
"data-support-description": !0,
|
|
159
|
-
value:
|
|
161
|
+
value: E,
|
|
160
162
|
onChange: (e) => k(e.target.value),
|
|
161
163
|
rows: 5,
|
|
162
164
|
placeholder: "What should change, and why",
|
|
@@ -166,7 +168,7 @@ function ye({
|
|
|
166
168
|
] }),
|
|
167
169
|
/* @__PURE__ */ a("div", { children: [
|
|
168
170
|
/* @__PURE__ */ a("label", { className: "inline-flex cursor-pointer items-center gap-1.5 text-[12px] font-medium text-slate-600 hover:text-slate-900 dark:text-slate-300 dark:hover:text-slate-100", children: [
|
|
169
|
-
|
|
171
|
+
K ? /* @__PURE__ */ t(W, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ t(X, { className: "h-3.5 w-3.5" }),
|
|
170
172
|
"Attach files",
|
|
171
173
|
/* @__PURE__ */ t(
|
|
172
174
|
"input",
|
|
@@ -176,7 +178,7 @@ function ye({
|
|
|
176
178
|
className: "hidden",
|
|
177
179
|
"data-support-files": !0,
|
|
178
180
|
onChange: (e) => {
|
|
179
|
-
|
|
181
|
+
Y(e.target.files), e.target.value = "";
|
|
180
182
|
}
|
|
181
183
|
}
|
|
182
184
|
)
|
|
@@ -194,7 +196,7 @@ function ye({
|
|
|
194
196
|
"aria-label": `Remove ${e.name}`,
|
|
195
197
|
onClick: () => N((r) => r.filter((o) => o.id !== e.id)),
|
|
196
198
|
className: "text-slate-400 hover:text-slate-700 dark:hover:text-slate-100",
|
|
197
|
-
children: /* @__PURE__ */ t(
|
|
199
|
+
children: /* @__PURE__ */ t(B, { className: "h-3 w-3" })
|
|
198
200
|
}
|
|
199
201
|
)
|
|
200
202
|
]
|
|
@@ -212,8 +214,8 @@ function ye({
|
|
|
212
214
|
"input",
|
|
213
215
|
{
|
|
214
216
|
type: "checkbox",
|
|
215
|
-
checked:
|
|
216
|
-
onChange: (e) =>
|
|
217
|
+
checked: P,
|
|
218
|
+
onChange: (e) => j(e.target.checked),
|
|
217
219
|
className: "mt-0.5 accent-[#00ceff]"
|
|
218
220
|
}
|
|
219
221
|
),
|
|
@@ -224,7 +226,7 @@ function ye({
|
|
|
224
226
|
]
|
|
225
227
|
}
|
|
226
228
|
),
|
|
227
|
-
|
|
229
|
+
M && /* @__PURE__ */ t("p", { className: "text-[12px] text-red-600 dark:text-red-400", role: "alert", children: M }),
|
|
228
230
|
/* @__PURE__ */ a("div", { className: "flex justify-end gap-2 pt-1", children: [
|
|
229
231
|
/* @__PURE__ */ t(
|
|
230
232
|
"button",
|
|
@@ -240,10 +242,10 @@ function ye({
|
|
|
240
242
|
{
|
|
241
243
|
type: "submit",
|
|
242
244
|
"data-support-send": !0,
|
|
243
|
-
disabled: !
|
|
245
|
+
disabled: !U,
|
|
244
246
|
className: "inline-flex h-8 items-center gap-1.5 rounded-md border border-nvr-cyan/60 bg-nvr-cyan/10 px-3 text-[12.5px] font-medium text-nvr-navy hover:bg-nvr-cyan/15 disabled:opacity-50 dark:text-nvr-cyan",
|
|
245
247
|
children: [
|
|
246
|
-
D.isPending && /* @__PURE__ */ t(
|
|
248
|
+
D.isPending && /* @__PURE__ */ t(W, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
247
249
|
"Send request"
|
|
248
250
|
]
|
|
249
251
|
}
|
|
@@ -257,5 +259,5 @@ function ye({
|
|
|
257
259
|
);
|
|
258
260
|
}
|
|
259
261
|
export {
|
|
260
|
-
|
|
262
|
+
be as SupportRequestDialog
|
|
261
263
|
};
|