@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,166 +1,190 @@
|
|
|
1
1
|
import { jsxs as t, jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { useQueryClient as
|
|
3
|
-
import { Split as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { toast as
|
|
6
|
-
import { useNivaroClient as
|
|
7
|
-
import { post as
|
|
8
|
-
import {
|
|
9
|
-
import { canOfferLineSplit as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
2
|
+
import { useQueryClient as P, useQuery as Q } from "@tanstack/react-query";
|
|
3
|
+
import { Split as j, Loader2 as _ } from "lucide-react";
|
|
4
|
+
import { useState as v } from "react";
|
|
5
|
+
import { toast as A } from "sonner";
|
|
6
|
+
import { useNivaroClient as E, useItemNavigation as R } from "../../context.js";
|
|
7
|
+
import { post as W } from "../../lib/commands.js";
|
|
8
|
+
import { describeError as z } from "../../lib/error-message.js";
|
|
9
|
+
import { canOfferLineSplit as D, lineSplitBlocker as G, lineSplitPath as H, lineSplitKey as J } from "../../lib/line-split.js";
|
|
10
|
+
import { noteOwnWrite as O } from "../../lib/own-writes.js";
|
|
11
|
+
import { fetchCollectionMeta as V, queryKeys as X } from "../../lib/query-keys.js";
|
|
12
|
+
import { cn as Y } from "../../lib/utils.js";
|
|
13
|
+
import { Popover as Z, PopoverTrigger as F, PopoverContent as U } from "../ui/popover.js";
|
|
14
|
+
function I(e) {
|
|
15
|
+
const n = typeof (e == null ? void 0 : e.singular) == "string" ? e.singular.trim() : "";
|
|
16
|
+
return n ? n.toLowerCase() : "record";
|
|
16
17
|
}
|
|
17
|
-
const
|
|
18
|
-
function
|
|
18
|
+
const f = (e, n) => `${e} ${n}${e === 1 ? "" : "s"}`;
|
|
19
|
+
function pe({
|
|
19
20
|
parentCollection: e,
|
|
20
|
-
parentId:
|
|
21
|
-
lineCollection:
|
|
22
|
-
linkField:
|
|
21
|
+
parentId: n,
|
|
22
|
+
lineCollection: l,
|
|
23
|
+
linkField: b,
|
|
23
24
|
selectedIds: o,
|
|
24
|
-
selectedUnsaved:
|
|
25
|
-
totalSaved:
|
|
26
|
-
unsavedEdits:
|
|
27
|
-
onMoved:
|
|
25
|
+
selectedUnsaved: w,
|
|
26
|
+
totalSaved: k,
|
|
27
|
+
unsavedEdits: B,
|
|
28
|
+
onMoved: C
|
|
28
29
|
}) {
|
|
29
|
-
const
|
|
30
|
-
queryKey:
|
|
31
|
-
queryFn: () =>
|
|
30
|
+
const N = E(), $ = P(), { open: K } = R(), [M, x] = v(!1), [d, S] = v(!1), [r, u] = v(null), { data: y } = Q({
|
|
31
|
+
queryKey: X.collectionMeta(e),
|
|
32
|
+
queryFn: () => V(N, e),
|
|
32
33
|
staleTime: 10 * 6e4
|
|
33
34
|
});
|
|
34
|
-
if (!
|
|
35
|
-
const
|
|
35
|
+
if (!y || !D(y.browser_config, l, b)) return null;
|
|
36
|
+
const a = I(y), c = o.length + w, g = G({
|
|
36
37
|
selectedSaved: o.length,
|
|
37
|
-
selectedUnsaved:
|
|
38
|
-
totalSaved:
|
|
39
|
-
unsavedEdits:
|
|
40
|
-
}),
|
|
41
|
-
var
|
|
42
|
-
|
|
38
|
+
selectedUnsaved: w,
|
|
39
|
+
totalSaved: k,
|
|
40
|
+
unsavedEdits: B
|
|
41
|
+
}), q = Math.max(0, k - o.length), T = async () => {
|
|
42
|
+
var m;
|
|
43
|
+
S(!0), u(null);
|
|
44
|
+
for (const p of o) O(l, p, 6e4);
|
|
43
45
|
try {
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
relation:
|
|
46
|
+
const i = (await N.request(
|
|
47
|
+
W(H(e, n), {
|
|
48
|
+
relation: J(l, b),
|
|
47
49
|
line_ids: o
|
|
48
50
|
})
|
|
49
51
|
)).data;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
for (const L of o) O(l, L, 6e4);
|
|
53
|
+
x(!1), C(o), $.invalidateQueries({ queryKey: ["o2m-rows", l, b, n] }), $.invalidateQueries({ queryKey: ["comments-related"] });
|
|
54
|
+
const h = `a new ${a}`;
|
|
55
|
+
A.success(`Moved ${f(i.moved, "line")} to ${h}`, {
|
|
56
|
+
description: (((m = i.link_failures) == null ? void 0 : m.length) ?? 0) > 0 ? "Some linked values did not copy — check the new one." : "Both now say where the lines went.",
|
|
54
57
|
duration: 1e4,
|
|
55
|
-
...
|
|
58
|
+
...i.readable ? {
|
|
56
59
|
action: {
|
|
57
|
-
label: `Open the new ${
|
|
58
|
-
onClick: () =>
|
|
60
|
+
label: `Open the new ${a}`,
|
|
61
|
+
onClick: () => K({ collection: e, itemId: String(i.id) })
|
|
59
62
|
}
|
|
60
63
|
} : {}
|
|
61
64
|
});
|
|
62
|
-
} catch (
|
|
63
|
-
|
|
65
|
+
} catch (p) {
|
|
66
|
+
const i = z(p, "The lines could not be moved"), h = i.status ?? 0;
|
|
67
|
+
u({ text: i.title, final: h >= 400 && h < 500 });
|
|
64
68
|
} finally {
|
|
65
|
-
|
|
69
|
+
S(!1);
|
|
66
70
|
}
|
|
67
71
|
};
|
|
68
|
-
return /* @__PURE__ */ t(
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
) }),
|
|
89
|
-
/* @__PURE__ */ t(
|
|
90
|
-
X,
|
|
91
|
-
{
|
|
92
|
-
align: "start",
|
|
93
|
-
className: "w-[320px] max-w-[calc(100vw-2rem)] p-0",
|
|
94
|
-
"data-split-lines-panel": !0,
|
|
95
|
-
children: [
|
|
96
|
-
/* @__PURE__ */ t("div", { className: "space-y-2 p-3", children: [
|
|
97
|
-
/* @__PURE__ */ t("p", { className: "text-[13px] font-semibold text-slate-800 dark:text-foreground", children: [
|
|
72
|
+
return /* @__PURE__ */ t(
|
|
73
|
+
Z,
|
|
74
|
+
{
|
|
75
|
+
open: M,
|
|
76
|
+
onOpenChange: (m) => {
|
|
77
|
+
d || (x(m), m || u(null));
|
|
78
|
+
},
|
|
79
|
+
children: [
|
|
80
|
+
/* @__PURE__ */ s(F, { asChild: !0, children: /* @__PURE__ */ t(
|
|
81
|
+
"button",
|
|
82
|
+
{
|
|
83
|
+
type: "button",
|
|
84
|
+
"data-split-lines": !0,
|
|
85
|
+
"data-tip": `Move the ticked lines to a new ${a} with the same details`,
|
|
86
|
+
className: Y(
|
|
87
|
+
"inline-flex h-6 items-center gap-1 rounded border px-2 font-medium transition-colors",
|
|
88
|
+
M ? "border-nvr-cyan bg-nvr-cyan/10 text-nvr-cyan" : "border-slate-200 text-slate-700 hover:border-nvr-cyan hover:text-nvr-cyan dark:border-border dark:text-slate-200"
|
|
89
|
+
),
|
|
90
|
+
children: [
|
|
91
|
+
/* @__PURE__ */ s(j, { className: "h-3 w-3 rotate-90", "aria-hidden": "true" }),
|
|
98
92
|
"Move ",
|
|
99
|
-
c
|
|
93
|
+
c,
|
|
100
94
|
" to a new ",
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
" ",
|
|
115
|
-
|
|
116
|
-
|
|
95
|
+
a,
|
|
96
|
+
"…"
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
) }),
|
|
100
|
+
/* @__PURE__ */ t(
|
|
101
|
+
U,
|
|
102
|
+
{
|
|
103
|
+
align: "start",
|
|
104
|
+
className: "w-[320px] max-w-[calc(100vw-2rem)] p-0",
|
|
105
|
+
"data-split-lines-panel": !0,
|
|
106
|
+
children: [
|
|
107
|
+
/* @__PURE__ */ t("div", { className: "space-y-2 p-3", children: [
|
|
108
|
+
/* @__PURE__ */ t("p", { className: "text-[13px] font-semibold text-slate-800 dark:text-foreground", children: [
|
|
109
|
+
"Move ",
|
|
110
|
+
f(c, "line"),
|
|
111
|
+
" to a new ",
|
|
112
|
+
a
|
|
113
|
+
] }),
|
|
114
|
+
/* @__PURE__ */ t("ul", { className: "space-y-1 text-[12px] leading-snug text-slate-600 dark:text-muted-foreground", children: [
|
|
115
|
+
/* @__PURE__ */ t("li", { children: [
|
|
116
|
+
"A new ",
|
|
117
|
+
a,
|
|
118
|
+
" is made with this one’s details and starts at the first step."
|
|
119
|
+
] }),
|
|
120
|
+
/* @__PURE__ */ t("li", { children: [
|
|
121
|
+
"The ticked ",
|
|
122
|
+
c === 1 ? "line moves" : "lines move",
|
|
123
|
+
" with ",
|
|
124
|
+
c === 1 ? "its" : "their",
|
|
125
|
+
" ",
|
|
126
|
+
"history. ",
|
|
127
|
+
q > 0 ? `${f(q, "line")} stay here.` : ""
|
|
128
|
+
] }),
|
|
129
|
+
/* @__PURE__ */ t("li", { children: [
|
|
130
|
+
"Both ",
|
|
131
|
+
a,
|
|
132
|
+
"s get a note naming the other."
|
|
133
|
+
] })
|
|
134
|
+
] }),
|
|
135
|
+
r && /* @__PURE__ */ s(
|
|
136
|
+
"p",
|
|
137
|
+
{
|
|
138
|
+
role: "alert",
|
|
139
|
+
className: "rounded border border-rose-200 bg-rose-50 px-2 py-1.5 text-[12px] text-rose-800 dark:border-rose-800/60 dark:bg-rose-950/30 dark:text-rose-200",
|
|
140
|
+
"data-split-lines-refused": !0,
|
|
141
|
+
children: r.text
|
|
142
|
+
}
|
|
143
|
+
),
|
|
144
|
+
g && !r && /* @__PURE__ */ s(
|
|
145
|
+
"p",
|
|
146
|
+
{
|
|
147
|
+
className: "rounded border border-amber-200 bg-amber-50 px-2 py-1.5 text-[12px] text-amber-800 dark:border-amber-800/60 dark:bg-amber-950/30 dark:text-amber-200",
|
|
148
|
+
"data-split-lines-blocker": !0,
|
|
149
|
+
children: g
|
|
150
|
+
}
|
|
151
|
+
)
|
|
117
152
|
] }),
|
|
118
|
-
/* @__PURE__ */ t("
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
153
|
+
/* @__PURE__ */ t("div", { className: "flex justify-end gap-2 border-t border-slate-100 px-3 py-2 dark:border-border", children: [
|
|
154
|
+
/* @__PURE__ */ s(
|
|
155
|
+
"button",
|
|
156
|
+
{
|
|
157
|
+
type: "button",
|
|
158
|
+
onClick: () => {
|
|
159
|
+
x(!1), u(null);
|
|
160
|
+
},
|
|
161
|
+
disabled: d,
|
|
162
|
+
className: "h-7 px-2 text-[12px] text-slate-600 hover:text-slate-900 dark:text-muted-foreground dark:hover:text-foreground",
|
|
163
|
+
children: r != null && r.final ? "Close" : "Cancel"
|
|
164
|
+
}
|
|
165
|
+
),
|
|
166
|
+
!(r != null && r.final) && /* @__PURE__ */ t(
|
|
167
|
+
"button",
|
|
168
|
+
{
|
|
169
|
+
type: "button",
|
|
170
|
+
onClick: () => void T(),
|
|
171
|
+
disabled: d || !!g,
|
|
172
|
+
"data-split-lines-confirm": !0,
|
|
173
|
+
className: "inline-flex h-7 items-center gap-1.5 rounded-md bg-nvr-cyan px-3 text-[12px] font-semibold text-white disabled:opacity-50",
|
|
174
|
+
children: [
|
|
175
|
+
d && /* @__PURE__ */ s(_, { className: "h-3 w-3 animate-spin", "aria-hidden": "true" }),
|
|
176
|
+
d ? "Moving…" : r ? "Try again" : `Move ${f(c, "line")}`
|
|
177
|
+
]
|
|
178
|
+
}
|
|
179
|
+
)
|
|
122
180
|
] })
|
|
123
|
-
]
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
children: b
|
|
130
|
-
}
|
|
131
|
-
)
|
|
132
|
-
] }),
|
|
133
|
-
/* @__PURE__ */ t("div", { className: "flex justify-end gap-2 border-t border-slate-100 px-3 py-2 dark:border-border", children: [
|
|
134
|
-
/* @__PURE__ */ s(
|
|
135
|
-
"button",
|
|
136
|
-
{
|
|
137
|
-
type: "button",
|
|
138
|
-
onClick: () => u(!1),
|
|
139
|
-
disabled: a,
|
|
140
|
-
className: "h-7 px-2 text-[12px] text-slate-500 hover:text-slate-800 dark:text-muted-foreground dark:hover:text-foreground",
|
|
141
|
-
children: "Cancel"
|
|
142
|
-
}
|
|
143
|
-
),
|
|
144
|
-
/* @__PURE__ */ t(
|
|
145
|
-
"button",
|
|
146
|
-
{
|
|
147
|
-
type: "button",
|
|
148
|
-
onClick: () => void C(),
|
|
149
|
-
disabled: a || !!b,
|
|
150
|
-
"data-split-lines-confirm": !0,
|
|
151
|
-
className: "inline-flex h-7 items-center gap-1.5 rounded-md bg-nvr-cyan px-3 text-[12px] font-semibold text-white disabled:opacity-50",
|
|
152
|
-
children: [
|
|
153
|
-
a && /* @__PURE__ */ s(P, { className: "h-3 w-3 animate-spin", "aria-hidden": "true" }),
|
|
154
|
-
a ? "Moving…" : `Move ${c(i, "line")}`
|
|
155
|
-
]
|
|
156
|
-
}
|
|
157
|
-
)
|
|
158
|
-
] })
|
|
159
|
-
]
|
|
160
|
-
}
|
|
161
|
-
)
|
|
162
|
-
] });
|
|
181
|
+
]
|
|
182
|
+
}
|
|
183
|
+
)
|
|
184
|
+
]
|
|
185
|
+
}
|
|
186
|
+
);
|
|
163
187
|
}
|
|
164
188
|
export {
|
|
165
|
-
|
|
189
|
+
pe as SplitLinesButton
|
|
166
190
|
};
|
|
@@ -124,7 +124,7 @@ function ve({
|
|
|
124
124
|
},
|
|
125
125
|
className: "inline-flex cursor-pointer items-center",
|
|
126
126
|
children: [
|
|
127
|
-
/* @__PURE__ */ t("span", { className:
|
|
127
|
+
/* @__PURE__ */ t("span", { className: "flex -space-x-1", children: v.map((n) => /* @__PURE__ */ t(ue, { user: n, avatarCls: C }, n.id)) }),
|
|
128
128
|
N > 0 && /* @__PURE__ */ l("span", { className: "ml-1 rounded-full bg-slate-200 px-1.5 py-0.5 text-[10.5px] font-bold leading-none text-slate-600 dark:bg-slate-700 dark:text-slate-300", children: [
|
|
129
129
|
"+",
|
|
130
130
|
N
|
|
@@ -1,77 +1,92 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as x, jsx as v } from "react/jsx-runtime";
|
|
2
2
|
import { FileX as F } from "lucide-react";
|
|
3
|
-
import { useRef as S, useState as
|
|
4
|
-
const
|
|
5
|
-
function
|
|
6
|
-
if (
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
return
|
|
10
|
-
},
|
|
3
|
+
import { useRef as S, useState as h, useEffect as b } from "react";
|
|
4
|
+
const N = 6e3, R = 600, _ = 15e3, a = (e) => e.toLowerCase();
|
|
5
|
+
function k(e, r, l, m = Date.now()) {
|
|
6
|
+
if (e == null) return { arrived: [], gone: [] };
|
|
7
|
+
const c = (o) => {
|
|
8
|
+
const u = l.get(a(o));
|
|
9
|
+
return u != null && m - u < _;
|
|
10
|
+
}, g = new Set(e.map(a)), d = new Set(r.map(a));
|
|
11
11
|
return {
|
|
12
|
-
arrived:
|
|
13
|
-
gone:
|
|
12
|
+
arrived: r.filter((o) => !g.has(a(o)) && !c(o)),
|
|
13
|
+
gone: e.filter((o) => !d.has(a(o)) && !c(o))
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
|
|
16
|
+
function L(e, r) {
|
|
17
|
+
e.current.set(a(r), Date.now());
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
},
|
|
26
|
-
return
|
|
27
|
-
if (
|
|
28
|
-
const { arrived:
|
|
29
|
-
|
|
30
|
-
() =>
|
|
31
|
-
const
|
|
32
|
-
for (const
|
|
33
|
-
return
|
|
19
|
+
function M(e, r) {
|
|
20
|
+
const l = S(null), [m, c] = h(() => /* @__PURE__ */ new Set()), [g, d] = h([]), [o, u] = h(() => /* @__PURE__ */ new Set()), w = S(/* @__PURE__ */ new Set()), p = (s, i) => {
|
|
21
|
+
const t = setTimeout(() => {
|
|
22
|
+
w.current.delete(t), s();
|
|
23
|
+
}, i);
|
|
24
|
+
w.current.add(t);
|
|
25
|
+
}, E = e == null ? null : [...e].map(a).sort().join(",");
|
|
26
|
+
return b(() => {
|
|
27
|
+
if (e == null) return;
|
|
28
|
+
const { arrived: s, gone: i } = k(l.current, e, r.current);
|
|
29
|
+
l.current = [...e], s.length > 0 && (c((t) => /* @__PURE__ */ new Set([...t, ...s])), d((t) => t.filter((n) => !s.some((f) => a(f) === a(n)))), p(
|
|
30
|
+
() => c((t) => {
|
|
31
|
+
const n = new Set(t);
|
|
32
|
+
for (const f of s) n.delete(f);
|
|
33
|
+
return n;
|
|
34
34
|
}),
|
|
35
35
|
2e3
|
|
36
|
-
)),
|
|
37
|
-
() =>
|
|
38
|
-
|
|
39
|
-
),
|
|
40
|
-
|
|
41
|
-
const
|
|
42
|
-
for (const
|
|
43
|
-
return
|
|
36
|
+
)), i.length > 0 && (d((t) => [...t, ...i.filter((n) => !t.includes(n))]), p(
|
|
37
|
+
() => u((t) => /* @__PURE__ */ new Set([...t, ...i])),
|
|
38
|
+
N - R
|
|
39
|
+
), p(() => {
|
|
40
|
+
d((t) => t.filter((n) => !i.includes(n))), u((t) => {
|
|
41
|
+
const n = new Set(t);
|
|
42
|
+
for (const f of i) n.delete(f);
|
|
43
|
+
return n;
|
|
44
44
|
});
|
|
45
|
-
},
|
|
46
|
-
}, [
|
|
47
|
-
const
|
|
45
|
+
}, N));
|
|
46
|
+
}, [E]), b(() => {
|
|
47
|
+
const s = w.current;
|
|
48
48
|
return () => {
|
|
49
|
-
for (const
|
|
50
|
-
|
|
49
|
+
for (const i of s) clearTimeout(i);
|
|
50
|
+
s.clear();
|
|
51
51
|
};
|
|
52
|
-
}, []), { fresh:
|
|
52
|
+
}, []), { fresh: m, removed: g, leaving: o };
|
|
53
53
|
}
|
|
54
|
-
function
|
|
55
|
-
|
|
54
|
+
function O(e) {
|
|
55
|
+
const r = e == null ? void 0 : e.user_name;
|
|
56
|
+
return typeof r == "string" && r.trim() ? r.trim() : null;
|
|
57
|
+
}
|
|
58
|
+
function C({
|
|
59
|
+
name: e,
|
|
60
|
+
leaving: r,
|
|
61
|
+
by: l
|
|
62
|
+
}) {
|
|
63
|
+
return /* @__PURE__ */ x(
|
|
56
64
|
"div",
|
|
57
65
|
{
|
|
58
66
|
"data-file-removed": !0,
|
|
59
67
|
"aria-live": "polite",
|
|
60
|
-
className: `flex items-center gap-2 rounded-lg border border-dashed border-slate-
|
|
68
|
+
className: `flex items-center gap-2 rounded-lg border border-dashed border-slate-300 p-2 transition-opacity duration-500 motion-reduce:transition-none dark:border-border ${r ? "opacity-0" : "opacity-100"}`,
|
|
61
69
|
children: [
|
|
62
|
-
/* @__PURE__ */
|
|
63
|
-
/* @__PURE__ */
|
|
64
|
-
|
|
70
|
+
/* @__PURE__ */ v("div", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded bg-slate-100 dark:bg-muted", children: /* @__PURE__ */ v(F, { className: "h-4 w-4 text-slate-400 dark:text-muted-foreground" }) }),
|
|
71
|
+
/* @__PURE__ */ x("div", { className: "min-w-0 flex-1", children: [
|
|
72
|
+
/* @__PURE__ */ v("p", { className: "truncate text-[12px] text-slate-500 line-through decoration-slate-300 dark:text-muted-foreground dark:decoration-border", children: e }),
|
|
73
|
+
/* @__PURE__ */ x("p", { className: "mt-0.5 text-[10.5px] text-slate-500 dark:text-slate-400", "data-file-removed-by": !0, children: [
|
|
74
|
+
"Removed",
|
|
75
|
+
l ? ` by ${l}` : "",
|
|
76
|
+
" · just now"
|
|
77
|
+
] })
|
|
78
|
+
] })
|
|
65
79
|
]
|
|
66
80
|
}
|
|
67
81
|
);
|
|
68
82
|
}
|
|
69
83
|
export {
|
|
70
|
-
|
|
84
|
+
_ as OWN_FILE_CHANGE_MS,
|
|
71
85
|
R as REMOVED_FADE_MS,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
86
|
+
N as REMOVED_SHOW_MS,
|
|
87
|
+
C as RemovedFileRow,
|
|
88
|
+
k as diffFileIds,
|
|
89
|
+
O as lastWriterName,
|
|
90
|
+
L as noteOwnFileChange,
|
|
91
|
+
M as useLiveFileList
|
|
77
92
|
};
|