@nivaro/react 0.3.114 → 0.3.115
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/ScreenShareHost.js +24 -0
- package/dist/full.css +50 -2
- package/dist/hooks/useSessionRecorder.js +61 -60
- package/dist/index.d.ts +1717 -21
- package/dist/index.js +1091 -950
- package/dist/shared/components/ActivityEntry.js +209 -97
- package/dist/shared/components/AgentPresenceChip.js +51 -0
- package/dist/shared/components/AnnouncementBanner.js +56 -41
- package/dist/shared/components/AutolinkedText.js +98 -85
- package/dist/shared/components/BroadcastView.js +149 -141
- package/dist/shared/components/CacheStamp.js +78 -30
- package/dist/shared/components/CollectionBrowserView.js +4088 -3592
- package/dist/shared/components/ConfigChangeStrip.js +63 -0
- package/dist/shared/components/ConfigReachNote.js +107 -0
- package/dist/shared/components/ConformanceView.js +389 -319
- package/dist/shared/components/DataTable.js +1 -0
- package/dist/shared/components/DelegateCoverLine.js +164 -0
- package/dist/shared/components/EnvironmentNotice.js +56 -65
- package/dist/shared/components/FilePreviewLightbox.js +89 -43
- package/dist/shared/components/FindingFixedMark.js +23 -0
- package/dist/shared/components/GridPresenceLine.js +100 -0
- package/dist/shared/components/IdleReloadWatcher.js +82 -43
- package/dist/shared/components/InStep.js +46 -0
- package/dist/shared/components/ItemEditForm.js +5504 -4889
- package/dist/shared/components/LiveAnnouncer.js +62 -0
- package/dist/shared/components/LiveCount.js +54 -0
- package/dist/shared/components/LiveFigure.js +28 -0
- package/dist/shared/components/LiveListControls.js +114 -0
- package/dist/shared/components/LiveNewMatchesPill.js +25 -0
- package/dist/shared/components/LiveOffNote.js +44 -0
- package/dist/shared/components/LivePreferenceHost.js +42 -0
- package/dist/shared/components/LiveRowMark.js +25 -20
- package/dist/shared/components/LiveTraceView.js +257 -0
- package/dist/shared/components/MapView.js +30 -29
- package/dist/shared/components/MatrixEditor.js +497 -462
- package/dist/shared/components/MyWorkView.js +346 -272
- package/dist/shared/components/NotificationBell.js +215 -201
- package/dist/shared/components/PageRenderer.js +636 -599
- package/dist/shared/components/PresenceDot.js +21 -0
- package/dist/shared/components/ProfileView.js +656 -536
- package/dist/shared/components/RealtimeStatusBanner.js +25 -25
- package/dist/shared/components/RecentRecordsRail.js +51 -48
- package/dist/shared/components/RecordCompare.js +241 -150
- package/dist/shared/components/RecordDrilldownSheet.js +66 -64
- package/dist/shared/components/RecordGridEditor.js +350 -311
- package/dist/shared/components/RecordHoverCard.js +147 -0
- package/dist/shared/components/RecordPeekHost.js +111 -0
- package/dist/shared/components/RecordReadView.js +414 -412
- package/dist/shared/components/RelativeTime.js +16 -0
- package/dist/shared/components/ReportView.js +1396 -1304
- package/dist/shared/components/ScreenRefreshButton.js +77 -0
- package/dist/shared/components/TabCountHost.js +10 -0
- package/dist/shared/components/TickerNumber.js +19 -18
- package/dist/shared/components/TipLayer.js +70 -58
- package/dist/shared/components/WidgetImageMenu.js +59 -0
- package/dist/shared/components/WidgetSlot.js +571 -524
- package/dist/shared/components/activity/RecordActivityStream.js +317 -0
- package/dist/shared/components/bulk/BulkSelectionNotices.js +220 -0
- package/dist/shared/components/cbv/approval-changed.js +20 -0
- package/dist/shared/components/cbv/changed-by-others.js +251 -0
- package/dist/shared/components/change-proposals/ChangeProposalsPanel.js +320 -0
- package/dist/shared/components/change-proposals/ProposalValue.js +28 -0
- package/dist/shared/components/change-proposals/ProposeChangeButton.js +44 -0
- package/dist/shared/components/change-proposals/ProposeChangeDialog.js +359 -0
- package/dist/shared/components/change-proposals/types.js +4 -0
- package/dist/shared/components/chat/ChatPanel.js +1571 -1528
- package/dist/shared/components/chat/Composer.js +276 -298
- package/dist/shared/components/chat/room-due.js +13 -0
- package/dist/shared/components/collections-directory/CollectionRow.js +76 -75
- package/dist/shared/components/collections-directory/CollectionsDirectory.js +415 -395
- package/dist/shared/components/collections-directory/directory-data.js +75 -63
- package/dist/shared/components/imports/ImportConsole.js +159 -155
- package/dist/shared/components/imports/ImportDuplicatesNotice.js +46 -31
- package/dist/shared/components/integrations/SendStatus.js +202 -0
- package/dist/shared/components/integrations/console/IntegrationsConsole.js +45 -36
- package/dist/shared/components/integrations/console/ReadyToSendView.js +453 -0
- package/dist/shared/components/integrations/console/api.js +161 -117
- package/dist/shared/components/integrations/console/tone.js +15 -12
- package/dist/shared/components/item-edit/CatalogPickerField.js +1353 -1245
- package/dist/shared/components/item-edit/ChangedAfterApprovalBadge.js +162 -0
- package/dist/shared/components/item-edit/CloneDialog.js +208 -206
- package/dist/shared/components/item-edit/DerivedCauseNote.js +57 -0
- package/dist/shared/components/item-edit/DraftRecoveryBanner.js +81 -70
- package/dist/shared/components/item-edit/DuplicateNotice.js +169 -101
- package/dist/shared/components/item-edit/FieldAffordances.js +294 -385
- package/dist/shared/components/item-edit/FieldComments.js +159 -116
- package/dist/shared/components/item-edit/FieldPointer.js +132 -0
- package/dist/shared/components/item-edit/FieldRenderer.js +277 -273
- package/dist/shared/components/item-edit/FieldRow.js +519 -439
- package/dist/shared/components/item-edit/FieldSourceBadge.js +88 -0
- package/dist/shared/components/item-edit/FilePickerField.js +454 -369
- package/dist/shared/components/item-edit/GroupSection.js +618 -567
- package/dist/shared/components/item-edit/HeldEditsChip.js +113 -0
- package/dist/shared/components/item-edit/InlineTableField.js +2891 -2723
- package/dist/shared/components/item-edit/ListNeighborNav.js +79 -0
- package/dist/shared/components/item-edit/LiveTraceSheet.js +26 -0
- package/dist/shared/components/item-edit/M2MCombobox.js +284 -273
- package/dist/shared/components/item-edit/OutboxReviewTray.js +313 -0
- package/dist/shared/components/item-edit/PickerBadges.js +52 -0
- package/dist/shared/components/item-edit/PlanGrid.js +434 -439
- package/dist/shared/components/item-edit/RecalcValue.js +55 -0
- package/dist/shared/components/item-edit/RecordChatActions.js +76 -64
- package/dist/shared/components/item-edit/RecordChatMentionsChip.js +103 -0
- package/dist/shared/components/item-edit/RecordGrantTools.js +87 -86
- package/dist/shared/components/item-edit/RecordHelpChip.js +70 -0
- package/dist/shared/components/item-edit/RecordLiveSync.js +230 -217
- package/dist/shared/components/item-edit/RecordOutbox.js +53 -52
- package/dist/shared/components/item-edit/RecordRecapStrip.js +109 -36
- package/dist/shared/components/item-edit/RelationCombobox.js +229 -217
- package/dist/shared/components/item-edit/RelationGroupedCombobox.js +105 -100
- package/dist/shared/components/item-edit/RemoteChangeUi.js +454 -0
- package/dist/shared/components/item-edit/RemoteUploads.js +55 -0
- package/dist/shared/components/item-edit/RemovedLineNote.js +92 -0
- package/dist/shared/components/item-edit/RichTextEditorImpl.js +298 -223
- package/dist/shared/components/item-edit/ScheduledChangeChip.js +244 -0
- package/dist/shared/components/item-edit/SectionPresence.js +78 -0
- package/dist/shared/components/item-edit/SplitLinesButton.js +166 -0
- package/dist/shared/components/item-edit/catalog-line-watch.js +94 -0
- package/dist/shared/components/item-edit/coedit/collab.js +84 -0
- package/dist/shared/components/item-edit/coedit/context.js +24 -0
- package/dist/shared/components/item-edit/coedit/cursors.js +103 -0
- package/dist/shared/components/item-edit/coedit/safe-link.js +15 -0
- package/dist/shared/components/item-edit/coedit/session.js +382 -0
- package/dist/shared/components/item-edit/coedit/useCoedit.js +49 -0
- package/dist/shared/components/item-edit/file-live.js +77 -0
- package/dist/shared/components/item-edit/file-processing.js +87 -0
- package/dist/shared/components/item-edit/layout-switch.js +148 -0
- package/dist/shared/components/item-edit/live-related.js +23 -0
- package/dist/shared/components/item-edit/live-title.js +66 -0
- package/dist/shared/components/item-edit/partner-needs.js +142 -0
- package/dist/shared/components/item-edit/removed-line.js +58 -0
- package/dist/shared/components/item-edit/render-stability.js +70 -59
- package/dist/shared/components/layout-editor/ChangeNote.js +36 -34
- package/dist/shared/components/layout-editor/CollabParts.js +72 -70
- package/dist/shared/components/layout-editor/LayoutEditor.js +306 -303
- package/dist/shared/components/list/InlineEdit.js +504 -208
- package/dist/shared/components/list/ListViewers.js +81 -0
- package/dist/shared/components/merge/MergeRecordsDialog.js +1227 -0
- package/dist/shared/components/merge/MergeWithFlow.js +290 -0
- package/dist/shared/components/merge/merge-values.js +110 -0
- package/dist/shared/components/monitoring/InactiveUserLinksView.js +285 -258
- package/dist/shared/components/notifications/NotificationCenterView.js +388 -321
- package/dist/shared/components/notifications/NotificationDetailBits.js +205 -130
- package/dist/shared/components/notifications/NotificationRulesEditor.js +72 -52
- package/dist/shared/components/notifications/bundles.js +21 -19
- package/dist/shared/components/notifications/resolved-line.js +25 -0
- package/dist/shared/components/ops/OpsTasksView.js +45 -44
- package/dist/shared/components/panels/AccessGrantedNote.js +85 -0
- package/dist/shared/components/panels/AlertBanners.js +132 -0
- package/dist/shared/components/panels/AsyncUserPicker.js +54 -45
- package/dist/shared/components/panels/BranchLanes.js +82 -54
- package/dist/shared/components/panels/CommentAwareness.js +332 -0
- package/dist/shared/components/panels/CommentImages.js +219 -0
- package/dist/shared/components/panels/CommentPanel.js +649 -530
- package/dist/shared/components/panels/ExternalRequestsChip.js +98 -80
- package/dist/shared/components/panels/NewSinceChip.js +16 -0
- package/dist/shared/components/panels/OwnerOpenedLine.js +85 -0
- package/dist/shared/components/panels/PipelinePanel.js +1644 -1494
- package/dist/shared/components/panels/ResubmissionDiff.js +293 -0
- package/dist/shared/components/panels/SlaBreachBanner.js +30 -29
- package/dist/shared/components/panels/SlaClock.js +130 -99
- package/dist/shared/components/panels/TaskPanel.js +308 -287
- package/dist/shared/components/panels/unseen-move-check.js +101 -0
- package/dist/shared/components/pipeline/OwnerMatrix.js +80 -71
- package/dist/shared/components/pipeline/OwnerMatrixSheet.js +495 -0
- package/dist/shared/components/pipeline/PipelineEditorView.js +1855 -1771
- package/dist/shared/components/profile/AgentNameField.js +141 -0
- package/dist/shared/components/profile/AgentsPanel.js +55 -46
- package/dist/shared/components/profile/PersonAccess.js +398 -330
- package/dist/shared/components/profile/PersonAdminTools.js +127 -113
- package/dist/shared/components/profile/PersonProfile.js +81 -73
- package/dist/shared/components/profile/SignInTroubleshooter.js +361 -0
- package/dist/shared/components/queue/QueueBulkBar.js +101 -84
- package/dist/shared/components/queue/QueueItemSheet.js +66 -66
- package/dist/shared/components/queue/QueueTeamStrip.js +279 -0
- package/dist/shared/components/queue/QueueWorklist.js +1927 -1635
- package/dist/shared/components/send-view/SendViewButton.js +136 -0
- package/dist/shared/components/send-view/SentViewCards.js +147 -0
- package/dist/shared/components/support/ReportProblem.js +1 -0
- package/dist/shared/components/support/ScreenShare.js +554 -0
- package/dist/shared/components/support/SupportView.js +160 -129
- package/dist/shared/components/support/TicketDetailSheet.js +101 -89
- package/dist/shared/components/watch-list/WatchDock.js +1044 -0
- package/dist/shared/components/watch-list/WatchExtras.js +723 -0
- package/dist/shared/components/watch-list/WatchListButton.js +46 -0
- package/dist/shared/components/watch-list/WatchPinButton.js +67 -0
- package/dist/shared/components/watch-list/WatchRows.js +348 -0
- package/dist/shared/lib/activity-sentence.js +87 -75
- package/dist/shared/lib/agent-presence.js +46 -0
- package/dist/shared/lib/approval-progress.js +49 -0
- package/dist/shared/lib/attention-prefs.js +27 -0
- package/dist/shared/lib/cell-locks.js +56 -0
- package/dist/shared/lib/co-edit.js +166 -0
- package/dist/shared/lib/coedit-registry.js +44 -0
- package/dist/shared/lib/comment-awareness.js +124 -0
- package/dist/shared/lib/comment-images.js +45 -0
- package/dist/shared/lib/config-watch.js +94 -0
- package/dist/shared/lib/copy-rules.js +65 -0
- package/dist/shared/lib/count-step.js +30 -0
- package/dist/shared/lib/deadline-ticker.js +68 -0
- package/dist/shared/lib/derived-causes.js +115 -0
- package/dist/shared/lib/draft-store.js +114 -85
- package/dist/shared/lib/error-hints.js +1 -0
- package/dist/shared/lib/field-merge.js +126 -0
- package/dist/shared/lib/filter-sentence.js +10 -10
- package/dist/shared/lib/focus-mode.js +16 -12
- package/dist/shared/lib/grid-cursors.js +77 -0
- package/dist/shared/lib/grid-presence.js +182 -0
- package/dist/shared/lib/idle-reload.js +100 -73
- package/dist/shared/lib/in-step.js +45 -0
- package/dist/shared/lib/integration-chip.js +19 -18
- package/dist/shared/lib/line-locks.js +141 -0
- package/dist/shared/lib/line-split.js +41 -0
- package/dist/shared/lib/linked-changes.js +150 -0
- package/dist/shared/lib/list-return.js +231 -0
- package/dist/shared/lib/list-viewers.js +52 -0
- package/dist/shared/lib/live-announcer.js +86 -0
- package/dist/shared/lib/live-counts.js +85 -0
- package/dist/shared/lib/live-data-changed.js +108 -0
- package/dist/shared/lib/live-deltas.js +81 -0
- package/dist/shared/lib/live-findings.js +113 -0
- package/dist/shared/lib/live-groups.js +122 -0
- package/dist/shared/lib/live-link-labels.js +162 -0
- package/dist/shared/lib/live-list-flow.js +334 -0
- package/dist/shared/lib/live-list.js +143 -129
- package/dist/shared/lib/live-moves.js +51 -0
- package/dist/shared/lib/live-ops.js +26 -26
- package/dist/shared/lib/live-pickers.js +7 -0
- package/dist/shared/lib/live-preference.js +184 -0
- package/dist/shared/lib/live-queries.js +226 -181
- package/dist/shared/lib/live-screen.js +333 -0
- package/dist/shared/lib/live-search.js +108 -0
- package/dist/shared/lib/live-seen.js +35 -0
- package/dist/shared/lib/live-views.js +100 -0
- package/dist/shared/lib/live.js +159 -133
- package/dist/shared/lib/missed-updates.js +198 -0
- package/dist/shared/lib/newer-file.js +56 -0
- package/dist/shared/lib/notification-sound.js +42 -20
- package/dist/shared/lib/own-writes.js +59 -41
- package/dist/shared/lib/picker-badges.js +94 -0
- package/dist/shared/lib/presence-signals.js +131 -84
- package/dist/shared/lib/realtime.js +49 -24
- package/dist/shared/lib/record-gaps.js +85 -0
- package/dist/shared/lib/record-outbox.js +369 -222
- package/dist/shared/lib/record-peek.js +75 -0
- package/dist/shared/lib/record-tabs.js +92 -72
- package/dist/shared/lib/relative-ticker.js +42 -0
- package/dist/shared/lib/request-gate.js +119 -119
- package/dist/shared/lib/rollup-recalc.js +107 -0
- package/dist/shared/lib/room-gaps.js +40 -36
- package/dist/shared/lib/rum.js +137 -87
- package/dist/shared/lib/save-progress.js +20 -0
- package/dist/shared/lib/scheduled-countdown.js +67 -0
- package/dist/shared/lib/screen-refresh.js +160 -0
- package/dist/shared/lib/screen-share.js +234 -0
- package/dist/shared/lib/seen-since.js +74 -0
- package/dist/shared/lib/selection-watch.js +205 -0
- package/dist/shared/lib/send-status.js +132 -0
- package/dist/shared/lib/send-view.js +23 -0
- package/dist/shared/lib/socket-liveness.js +155 -0
- package/dist/shared/lib/socket-realtime.js +168 -140
- package/dist/shared/lib/state-census.js +53 -0
- package/dist/shared/lib/summary-mode.js +61 -39
- package/dist/shared/lib/tab-attention.js +143 -32
- package/dist/shared/lib/table-density.js +64 -0
- package/dist/shared/lib/track-travel.js +40 -0
- package/dist/shared/lib/unseen-changes.js +68 -0
- package/dist/shared/lib/upload-file.js +33 -0
- package/dist/shared/lib/upload-presence.js +127 -0
- package/dist/shared/lib/urgent-chime.js +65 -0
- package/dist/shared/lib/use-online-users.js +32 -11
- package/dist/shared/lib/user-sync.js +155 -39
- package/dist/shared/lib/waiting-count.js +44 -0
- package/dist/shared/lib/watch-desktop.js +83 -0
- package/dist/shared/lib/watch-list.js +447 -0
- package/dist/shared/lib/widget-image-render.js +64 -0
- package/dist/shared/lib/widget-image.js +111 -0
- package/dist/shared/lib/worker-socket.js +130 -104
- package/dist/shared/lib/write-to-screen.js +133 -0
- package/package.json +1 -1
- package/styles.css +49 -1
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as s, jsx as e, Fragment as I } from "react/jsx-runtime";
|
|
2
2
|
import { useMutation as y, useQuery as q } from "@tanstack/react-query";
|
|
3
|
-
import { RefreshCw as
|
|
4
|
-
import { useState as u, useEffect as
|
|
3
|
+
import { RefreshCw as R, Radio as U, LogOut as T, GitMerge as H, UserMinus as K } from "lucide-react";
|
|
4
|
+
import { useState as u, useEffect as Q } from "react";
|
|
5
5
|
import { toast as x } from "sonner";
|
|
6
6
|
import { useNivaroClient as C } from "../../context.js";
|
|
7
7
|
import { post as N, get as j } from "../../lib/commands.js";
|
|
8
8
|
import { cn as O } from "../../lib/utils.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
import { LiveTraceView as z } from "../LiveTraceView.js";
|
|
10
|
+
import { SectionCard as f, EmptyLine as E } from "./primitives.js";
|
|
11
|
+
import { SignOutMessageInput as V } from "./SignOutMessageInput.js";
|
|
12
|
+
import { useReloadTheirTabs as W, SIGN_OUT_ARM_MS as J, useSignOutEverywhere as X } from "./session-actions.js";
|
|
13
|
+
import { useInvalidatePerson as L, errorText as _ } from "./types.js";
|
|
14
|
+
function ue({ profile: a }) {
|
|
15
|
+
const [c, l] = u("15"), [t, h] = u(""), o = W(a.id);
|
|
16
|
+
return /* @__PURE__ */ s(
|
|
16
17
|
f,
|
|
17
18
|
{
|
|
18
|
-
icon: /* @__PURE__ */ e(
|
|
19
|
+
icon: /* @__PURE__ */ e(R, { className: "h-4 w-4" }),
|
|
19
20
|
title: "Force a reload",
|
|
20
21
|
hint: "Every tab they have open shows a countdown, then reloads onto the current build",
|
|
21
22
|
tone: "danger",
|
|
22
23
|
testId: "force-reload",
|
|
23
24
|
children: [
|
|
24
|
-
/* @__PURE__ */
|
|
25
|
-
/* @__PURE__ */
|
|
25
|
+
/* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-2", "data-user-force-reload": !0, children: [
|
|
26
|
+
/* @__PURE__ */ s("label", { className: "flex items-center gap-1.5 text-[12px] text-slate-600 dark:text-slate-300", children: [
|
|
26
27
|
"Countdown",
|
|
27
28
|
/* @__PURE__ */ e(
|
|
28
29
|
"input",
|
|
@@ -39,21 +40,21 @@ function le({ profile: i }) {
|
|
|
39
40
|
"input",
|
|
40
41
|
{
|
|
41
42
|
value: t,
|
|
42
|
-
onChange: (d) =>
|
|
43
|
+
onChange: (d) => h(d.target.value),
|
|
43
44
|
placeholder: "Optional message in their banner",
|
|
44
45
|
className: "h-7 min-w-[200px] flex-1 rounded-md border border-slate-200 bg-white px-2.5 text-[12px] dark:border-border dark:bg-background"
|
|
45
46
|
}
|
|
46
47
|
),
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ s(
|
|
48
49
|
"button",
|
|
49
50
|
{
|
|
50
51
|
type: "button",
|
|
51
|
-
disabled:
|
|
52
|
-
onClick: () =>
|
|
52
|
+
disabled: o.isPending,
|
|
53
|
+
onClick: () => o.mutate({ seconds: Number(c) || 15, message: t }),
|
|
53
54
|
className: "inline-flex h-7 items-center gap-1.5 rounded-md border border-amber-300 px-2.5 text-[11.5px] font-medium text-amber-800 transition-colors hover:bg-amber-50 disabled:opacity-50 dark:border-amber-500/40 dark:text-amber-300 dark:hover:bg-amber-500/10",
|
|
54
55
|
children: [
|
|
55
|
-
/* @__PURE__ */ e(
|
|
56
|
-
|
|
56
|
+
/* @__PURE__ */ e(R, { className: O("h-3 w-3", o.isPending && "animate-spin") }),
|
|
57
|
+
o.isPending ? "Sending…" : "Reload their tabs"
|
|
57
58
|
]
|
|
58
59
|
}
|
|
59
60
|
)
|
|
@@ -63,35 +64,35 @@ function le({ profile: i }) {
|
|
|
63
64
|
}
|
|
64
65
|
);
|
|
65
66
|
}
|
|
66
|
-
function
|
|
67
|
-
const c = [
|
|
68
|
-
|
|
69
|
-
if (!l ||
|
|
70
|
-
const
|
|
71
|
-
return () => clearTimeout(
|
|
72
|
-
}, [l,
|
|
73
|
-
const d =
|
|
67
|
+
function he({ profile: a }) {
|
|
68
|
+
const c = [a.first_name, a.last_name].filter(Boolean).join(" ") || a.email || "They", [l, t] = u(!1), [h, o] = u("");
|
|
69
|
+
Q(() => {
|
|
70
|
+
if (!l || h.trim()) return;
|
|
71
|
+
const n = setTimeout(() => t(!1), J);
|
|
72
|
+
return () => clearTimeout(n);
|
|
73
|
+
}, [l, h]);
|
|
74
|
+
const d = X(a.id, c, {
|
|
74
75
|
onDone: () => {
|
|
75
|
-
t(!1),
|
|
76
|
+
t(!1), o("");
|
|
76
77
|
}
|
|
77
|
-
}),
|
|
78
|
-
return /* @__PURE__ */
|
|
78
|
+
}), p = () => d.mutate({ message: h });
|
|
79
|
+
return /* @__PURE__ */ s(
|
|
79
80
|
f,
|
|
80
81
|
{
|
|
81
|
-
icon: /* @__PURE__ */ e(
|
|
82
|
+
icon: /* @__PURE__ */ e(T, { className: "h-4 w-4" }),
|
|
82
83
|
title: "Sign out everywhere",
|
|
83
84
|
hint: "Ends every session they have, on every app — each open tab goes back to sign-in",
|
|
84
85
|
tone: "danger",
|
|
85
86
|
testId: "sign-out-everywhere",
|
|
86
87
|
children: [
|
|
87
|
-
/* @__PURE__ */ e("div", { className: "flex flex-wrap items-center gap-2", "data-user-sign-out": !0, children: /* @__PURE__ */
|
|
88
|
+
/* @__PURE__ */ e("div", { className: "flex flex-wrap items-center gap-2", "data-user-sign-out": !0, children: /* @__PURE__ */ s(
|
|
88
89
|
"button",
|
|
89
90
|
{
|
|
90
91
|
type: "button",
|
|
91
92
|
disabled: d.isPending,
|
|
92
|
-
onClick: () => l ?
|
|
93
|
-
onBlur: (
|
|
94
|
-
const m =
|
|
93
|
+
onClick: () => l ? p() : t(!0),
|
|
94
|
+
onBlur: (n) => {
|
|
95
|
+
const m = n.relatedTarget;
|
|
95
96
|
m != null && m.closest("[data-sign-out-message]") || t(!1);
|
|
96
97
|
},
|
|
97
98
|
className: O(
|
|
@@ -99,17 +100,17 @@ function ce({ profile: i }) {
|
|
|
99
100
|
l ? "border-red-600 bg-red-600 text-white hover:bg-red-700" : "border-amber-300 text-amber-800 hover:bg-amber-50 dark:border-amber-500/40 dark:text-amber-300 dark:hover:bg-amber-500/10"
|
|
100
101
|
),
|
|
101
102
|
children: [
|
|
102
|
-
/* @__PURE__ */ e(
|
|
103
|
+
/* @__PURE__ */ e(T, { className: "h-3 w-3" }),
|
|
103
104
|
d.isPending ? "Signing out…" : l ? "Confirm sign out" : "Sign them out"
|
|
104
105
|
]
|
|
105
106
|
}
|
|
106
107
|
) }),
|
|
107
108
|
l && /* @__PURE__ */ e(
|
|
108
|
-
|
|
109
|
+
V,
|
|
109
110
|
{
|
|
110
|
-
value:
|
|
111
|
-
onChange:
|
|
112
|
-
onSubmit:
|
|
111
|
+
value: h,
|
|
112
|
+
onChange: o,
|
|
113
|
+
onSubmit: p,
|
|
113
114
|
className: "mt-2 max-w-md"
|
|
114
115
|
}
|
|
115
116
|
),
|
|
@@ -118,18 +119,18 @@ function ce({ profile: i }) {
|
|
|
118
119
|
}
|
|
119
120
|
);
|
|
120
121
|
}
|
|
121
|
-
function
|
|
122
|
-
excludeId:
|
|
122
|
+
function A({
|
|
123
|
+
excludeId: a,
|
|
123
124
|
value: c,
|
|
124
125
|
label: l,
|
|
125
126
|
onPick: t
|
|
126
127
|
}) {
|
|
127
|
-
const
|
|
128
|
-
queryKey: ["nvr-offboard-user-search",
|
|
129
|
-
queryFn: () =>
|
|
130
|
-
enabled:
|
|
128
|
+
const h = C(), [o, d] = u(""), { data: p = [] } = q({
|
|
129
|
+
queryKey: ["nvr-offboard-user-search", o],
|
|
130
|
+
queryFn: () => h.request(j("/users", { search: o, limit: 8 })).then((n) => n.data),
|
|
131
|
+
enabled: o.length > 1
|
|
131
132
|
});
|
|
132
|
-
return c ? /* @__PURE__ */
|
|
133
|
+
return c ? /* @__PURE__ */ s("span", { className: "inline-flex items-center gap-1.5 rounded-full bg-nvr-cyan/10 px-2.5 py-1 text-[12px] font-medium text-nvr-navy dark:text-nvr-cyan", children: [
|
|
133
134
|
c.name,
|
|
134
135
|
/* @__PURE__ */ e(
|
|
135
136
|
"button",
|
|
@@ -141,37 +142,37 @@ function $({
|
|
|
141
142
|
children: "✕"
|
|
142
143
|
}
|
|
143
144
|
)
|
|
144
|
-
] }) : /* @__PURE__ */
|
|
145
|
+
] }) : /* @__PURE__ */ s("div", { className: "relative", children: [
|
|
145
146
|
/* @__PURE__ */ e(
|
|
146
147
|
"input",
|
|
147
148
|
{
|
|
148
|
-
value:
|
|
149
|
-
onChange: (
|
|
149
|
+
value: o,
|
|
150
|
+
onChange: (n) => d(n.target.value),
|
|
150
151
|
placeholder: l,
|
|
151
152
|
className: "h-8 w-[260px] rounded-md border border-slate-200 bg-white px-2.5 text-[12.5px] dark:border-border dark:bg-background"
|
|
152
153
|
}
|
|
153
154
|
),
|
|
154
|
-
|
|
155
|
-
const m = `${
|
|
156
|
-
return /* @__PURE__ */
|
|
155
|
+
o.length > 1 && p.length > 0 && /* @__PURE__ */ e("div", { className: "absolute z-10 mt-1 w-[260px] rounded-md border border-slate-200 bg-white shadow-lg dark:border-border dark:bg-card", children: p.filter((n) => n.id.toUpperCase() !== a.toUpperCase()).map((n) => {
|
|
156
|
+
const m = `${n.first_name ?? ""} ${n.last_name ?? ""}`.trim() || n.email;
|
|
157
|
+
return /* @__PURE__ */ s(
|
|
157
158
|
"button",
|
|
158
159
|
{
|
|
159
160
|
type: "button",
|
|
160
161
|
onClick: () => {
|
|
161
|
-
t({ id:
|
|
162
|
+
t({ id: n.id, name: m }), d("");
|
|
162
163
|
},
|
|
163
164
|
className: "block w-full px-2.5 py-1.5 text-left text-[12.5px] text-slate-700 hover:bg-muted dark:text-foreground",
|
|
164
165
|
children: [
|
|
165
166
|
m,
|
|
166
|
-
/* @__PURE__ */ e("span", { className: "ml-1.5 text-[11px] text-slate-400", children:
|
|
167
|
+
/* @__PURE__ */ e("span", { className: "ml-1.5 text-[11px] text-slate-400", children: n.email })
|
|
167
168
|
]
|
|
168
169
|
},
|
|
169
|
-
|
|
170
|
+
n.id
|
|
170
171
|
);
|
|
171
172
|
}) })
|
|
172
173
|
] });
|
|
173
174
|
}
|
|
174
|
-
const
|
|
175
|
+
const F = {
|
|
175
176
|
queue_claims: "Queue claims",
|
|
176
177
|
instance_ownerships: "Record ownerships (open pipelines)",
|
|
177
178
|
open_tasks: "Open tasks",
|
|
@@ -180,7 +181,7 @@ const I = {
|
|
|
180
181
|
direct_reports: "Direct reports",
|
|
181
182
|
notification_subscriptions: "Notification subscriptions",
|
|
182
183
|
field_watches: "Field watches"
|
|
183
|
-
},
|
|
184
|
+
}, Y = {
|
|
184
185
|
queue_claims: "queue_claims",
|
|
185
186
|
instance_ownerships: "instance_ownerships",
|
|
186
187
|
open_tasks: "open_tasks",
|
|
@@ -190,70 +191,70 @@ const I = {
|
|
|
190
191
|
notification_subscriptions: "notification_subscriptions",
|
|
191
192
|
field_watches: "notification_subscriptions"
|
|
192
193
|
};
|
|
193
|
-
function
|
|
194
|
-
const c = C(), l =
|
|
195
|
-
queryKey: ["nvr-offboarding",
|
|
196
|
-
queryFn: () => c.request(j(`/offboarding/${
|
|
194
|
+
function pe({ profile: a }) {
|
|
195
|
+
const c = C(), l = L(a.id), [t, h] = u(null), [o, d] = u({}), [p, n] = u(!0), [m, g] = u(null), { data: i, refetch: v } = q({
|
|
196
|
+
queryKey: ["nvr-offboarding", a.id],
|
|
197
|
+
queryFn: () => c.request(j(`/offboarding/${a.id}`)).then((r) => r.data)
|
|
197
198
|
}), w = y({
|
|
198
199
|
mutationFn: () => c.request(
|
|
199
|
-
N(`/offboarding/${
|
|
200
|
+
N(`/offboarding/${a.id}/run`, { successor: t == null ? void 0 : t.id, include: o, suspend: p })
|
|
200
201
|
).then((r) => r.data),
|
|
201
202
|
onSuccess: (r) => {
|
|
202
203
|
g(r), x.success("Offboarding complete"), v(), l();
|
|
203
204
|
},
|
|
204
205
|
onError: (r) => x.error(_(r, "Offboarding failed"))
|
|
205
|
-
}),
|
|
206
|
+
}), $ = Object.values((i == null ? void 0 : i.holdings) ?? {}).reduce((r, b) => r + b, 0), [S, D] = u("");
|
|
206
207
|
return /* @__PURE__ */ e(
|
|
207
208
|
f,
|
|
208
209
|
{
|
|
209
|
-
icon: /* @__PURE__ */ e(
|
|
210
|
+
icon: /* @__PURE__ */ e(K, { className: "h-4 w-4" }),
|
|
210
211
|
title: "Offboarding",
|
|
211
212
|
hint: "Hand everything they hold to a successor in one pass",
|
|
212
213
|
tone: "danger",
|
|
213
214
|
testId: "offboarding",
|
|
214
|
-
children:
|
|
215
|
-
/* @__PURE__ */ e("div", { className: "grid gap-x-6 gap-y-1 sm:grid-cols-2", children: Object.entries(
|
|
216
|
-
const k =
|
|
215
|
+
children: i ? /* @__PURE__ */ s("div", { className: "space-y-3", children: [
|
|
216
|
+
/* @__PURE__ */ e("div", { className: "grid gap-x-6 gap-y-1 sm:grid-cols-2", children: Object.entries(i.holdings).map(([r, b]) => {
|
|
217
|
+
const k = Y[r], P = O(
|
|
217
218
|
"flex items-center gap-2 text-[12.5px]",
|
|
218
219
|
b === 0 ? "text-slate-300 dark:text-slate-600" : "text-slate-700 dark:text-slate-200"
|
|
219
|
-
), M = /* @__PURE__ */
|
|
220
|
-
/* @__PURE__ */ e("span", { className: "flex-1", children:
|
|
220
|
+
), M = /* @__PURE__ */ s(I, { children: [
|
|
221
|
+
/* @__PURE__ */ e("span", { className: "flex-1", children: F[r] ?? r }),
|
|
221
222
|
/* @__PURE__ */ e("span", { className: "font-semibold tabular-nums", children: b })
|
|
222
223
|
] });
|
|
223
|
-
return k ? /* @__PURE__ */
|
|
224
|
+
return k ? /* @__PURE__ */ s("label", { className: P, children: [
|
|
224
225
|
/* @__PURE__ */ e(
|
|
225
226
|
"input",
|
|
226
227
|
{
|
|
227
228
|
type: "checkbox",
|
|
228
|
-
checked:
|
|
229
|
+
checked: o[k] !== !1,
|
|
229
230
|
disabled: b === 0,
|
|
230
231
|
onChange: (G) => d((B) => ({ ...B, [k]: G.target.checked })),
|
|
231
232
|
className: "h-3.5 w-3.5"
|
|
232
233
|
}
|
|
233
234
|
),
|
|
234
235
|
M
|
|
235
|
-
] }, r) : /* @__PURE__ */
|
|
236
|
+
] }, r) : /* @__PURE__ */ s("div", { className: P, children: [
|
|
236
237
|
/* @__PURE__ */ e("span", { className: "w-3.5" }),
|
|
237
238
|
M
|
|
238
239
|
] }, r);
|
|
239
240
|
}) }),
|
|
240
|
-
|
|
241
|
+
$ === 0 ? /* @__PURE__ */ e(E, { children: "Nothing to hand over — this account holds no work." }) : /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-2.5", children: [
|
|
241
242
|
/* @__PURE__ */ e(
|
|
242
|
-
|
|
243
|
+
A,
|
|
243
244
|
{
|
|
244
|
-
excludeId:
|
|
245
|
+
excludeId: a.id,
|
|
245
246
|
value: t,
|
|
246
247
|
label: "Successor (who takes it over)…",
|
|
247
|
-
onPick:
|
|
248
|
+
onPick: h
|
|
248
249
|
}
|
|
249
250
|
),
|
|
250
|
-
/* @__PURE__ */
|
|
251
|
+
/* @__PURE__ */ s("label", { className: "flex items-center gap-1.5 text-[12px] text-slate-600 dark:text-slate-300", children: [
|
|
251
252
|
/* @__PURE__ */ e(
|
|
252
253
|
"input",
|
|
253
254
|
{
|
|
254
255
|
type: "checkbox",
|
|
255
|
-
checked:
|
|
256
|
-
onChange: (r) =>
|
|
256
|
+
checked: p,
|
|
257
|
+
onChange: (r) => n(r.target.checked),
|
|
257
258
|
className: "h-3.5 w-3.5"
|
|
258
259
|
}
|
|
259
260
|
),
|
|
@@ -264,7 +265,7 @@ function me({ profile: i }) {
|
|
|
264
265
|
"input",
|
|
265
266
|
{
|
|
266
267
|
value: S,
|
|
267
|
-
onChange: (r) =>
|
|
268
|
+
onChange: (r) => D(r.target.value),
|
|
268
269
|
placeholder: "Type OFFBOARD",
|
|
269
270
|
"aria-label": "Type OFFBOARD to confirm",
|
|
270
271
|
className: "h-8 w-[150px] rounded-md border border-amber-300 bg-white px-2.5 text-[12.5px] dark:border-amber-500/40 dark:bg-background"
|
|
@@ -281,47 +282,47 @@ function me({ profile: i }) {
|
|
|
281
282
|
}
|
|
282
283
|
)
|
|
283
284
|
] }),
|
|
284
|
-
m && /* @__PURE__ */
|
|
285
|
+
m && /* @__PURE__ */ s("p", { className: "rounded-md bg-emerald-50 px-3 py-2 text-[12px] text-emerald-700 dark:bg-emerald-500/10 dark:text-emerald-400", children: [
|
|
285
286
|
"Done:",
|
|
286
287
|
" ",
|
|
287
|
-
Object.entries(m).map(([r, b]) => `${(
|
|
288
|
+
Object.entries(m).map(([r, b]) => `${(F[r] ?? r).toLowerCase()} ${b}`).join(" · ")
|
|
288
289
|
] })
|
|
289
|
-
] }) : /* @__PURE__ */ e(
|
|
290
|
+
] }) : /* @__PURE__ */ e(E, { children: "Loading what they hold…" })
|
|
290
291
|
}
|
|
291
292
|
);
|
|
292
293
|
}
|
|
293
|
-
function
|
|
294
|
-
const c = C(), l =
|
|
294
|
+
function be({ profile: a }) {
|
|
295
|
+
const c = C(), l = L(a.id), [t, h] = u(null), [o, d] = u(null), [p, n] = u(""), m = y({
|
|
295
296
|
mutationFn: () => c.request(
|
|
296
|
-
N(`/offboarding/${
|
|
297
|
-
).then((
|
|
298
|
-
onSuccess: (
|
|
299
|
-
onError: (
|
|
297
|
+
N(`/offboarding/${a.id}/merge`, { into: t == null ? void 0 : t.id, dry_run: !0 })
|
|
298
|
+
).then((i) => i.data),
|
|
299
|
+
onSuccess: (i) => d(i.references),
|
|
300
|
+
onError: (i) => x.error(_(i, "Preview failed"))
|
|
300
301
|
}), g = y({
|
|
301
|
-
mutationFn: () => c.request(N(`/offboarding/${
|
|
302
|
+
mutationFn: () => c.request(N(`/offboarding/${a.id}/merge`, { into: t == null ? void 0 : t.id })),
|
|
302
303
|
onSuccess: () => {
|
|
303
|
-
x.success("Accounts merged — the duplicate is suspended"), d(null),
|
|
304
|
+
x.success("Accounts merged — the duplicate is suspended"), d(null), n(""), l();
|
|
304
305
|
},
|
|
305
|
-
onError: (
|
|
306
|
+
onError: (i) => x.error(_(i, "Merge failed"))
|
|
306
307
|
});
|
|
307
308
|
return /* @__PURE__ */ e(
|
|
308
309
|
f,
|
|
309
310
|
{
|
|
310
|
-
icon: /* @__PURE__ */ e(
|
|
311
|
+
icon: /* @__PURE__ */ e(H, { className: "h-4 w-4" }),
|
|
311
312
|
title: "Merge into another account",
|
|
312
313
|
hint: "For duplicate or legacy twins: every reference moves to the survivor, then this account is suspended",
|
|
313
314
|
tone: "danger",
|
|
314
315
|
testId: "merge",
|
|
315
|
-
children: /* @__PURE__ */
|
|
316
|
-
/* @__PURE__ */
|
|
316
|
+
children: /* @__PURE__ */ s("div", { className: "space-y-3", children: [
|
|
317
|
+
/* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-2.5", children: [
|
|
317
318
|
/* @__PURE__ */ e(
|
|
318
|
-
|
|
319
|
+
A,
|
|
319
320
|
{
|
|
320
|
-
excludeId:
|
|
321
|
+
excludeId: a.id,
|
|
321
322
|
value: t,
|
|
322
323
|
label: "Survivor account (keeps everything)…",
|
|
323
|
-
onPick: (
|
|
324
|
-
|
|
324
|
+
onPick: (i) => {
|
|
325
|
+
h(i), d(null);
|
|
325
326
|
}
|
|
326
327
|
}
|
|
327
328
|
),
|
|
@@ -336,24 +337,24 @@ function ue({ profile: i }) {
|
|
|
336
337
|
}
|
|
337
338
|
)
|
|
338
339
|
] }),
|
|
339
|
-
|
|
340
|
-
/* @__PURE__ */ e("div", { className: "max-h-[220px] overflow-y-auto rounded-md border border-slate-100 dark:border-border/60", children: Object.keys(
|
|
340
|
+
o && /* @__PURE__ */ s(I, { children: [
|
|
341
|
+
/* @__PURE__ */ e("div", { className: "max-h-[220px] overflow-y-auto rounded-md border border-slate-100 dark:border-border/60", children: Object.keys(o).length === 0 ? /* @__PURE__ */ e("p", { className: "px-3 py-2 text-[12px] text-slate-400", children: "Nothing references this account." }) : Object.entries(o).map(([i, v]) => /* @__PURE__ */ s(
|
|
341
342
|
"div",
|
|
342
343
|
{
|
|
343
344
|
className: "flex items-center justify-between border-b border-slate-50 px-3 py-1 text-[12px] last:border-0 dark:border-border/40",
|
|
344
345
|
children: [
|
|
345
|
-
/* @__PURE__ */ e("span", { className: "font-mono text-slate-600 dark:text-slate-300", children:
|
|
346
|
+
/* @__PURE__ */ e("span", { className: "font-mono text-slate-600 dark:text-slate-300", children: i }),
|
|
346
347
|
/* @__PURE__ */ e("span", { className: "font-semibold tabular-nums text-slate-700 dark:text-slate-200", children: v })
|
|
347
348
|
]
|
|
348
349
|
},
|
|
349
|
-
|
|
350
|
+
i
|
|
350
351
|
)) }),
|
|
351
|
-
/* @__PURE__ */
|
|
352
|
+
/* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
352
353
|
/* @__PURE__ */ e(
|
|
353
354
|
"input",
|
|
354
355
|
{
|
|
355
|
-
value:
|
|
356
|
-
onChange: (
|
|
356
|
+
value: p,
|
|
357
|
+
onChange: (i) => n(i.target.value),
|
|
357
358
|
placeholder: "Type MERGE to confirm",
|
|
358
359
|
"aria-label": "Type MERGE to confirm",
|
|
359
360
|
className: "h-8 w-[180px] rounded-md border border-amber-300 bg-white px-2.5 text-[12.5px] dark:border-amber-500/40 dark:bg-background"
|
|
@@ -363,7 +364,7 @@ function ue({ profile: i }) {
|
|
|
363
364
|
"button",
|
|
364
365
|
{
|
|
365
366
|
type: "button",
|
|
366
|
-
disabled:
|
|
367
|
+
disabled: p !== "MERGE" || g.isPending,
|
|
367
368
|
onClick: () => g.mutate(),
|
|
368
369
|
className: "h-8 rounded-md bg-amber-500 px-4 text-[12.5px] font-semibold text-white hover:bg-amber-600 disabled:opacity-50",
|
|
369
370
|
children: g.isPending ? "Merging…" : `Merge into ${(t == null ? void 0 : t.name) ?? ""}`
|
|
@@ -375,10 +376,23 @@ function ue({ profile: i }) {
|
|
|
375
376
|
}
|
|
376
377
|
);
|
|
377
378
|
}
|
|
379
|
+
function ge({ profile: a }) {
|
|
380
|
+
return /* @__PURE__ */ e(
|
|
381
|
+
f,
|
|
382
|
+
{
|
|
383
|
+
icon: /* @__PURE__ */ e(U, { className: "h-4 w-4" }),
|
|
384
|
+
title: "Why didn't their page update?",
|
|
385
|
+
hint: "Their live connections, the rooms they are in and the events sent to them",
|
|
386
|
+
testId: "live-trace",
|
|
387
|
+
children: /* @__PURE__ */ e(z, { userId: a.id })
|
|
388
|
+
}
|
|
389
|
+
);
|
|
390
|
+
}
|
|
378
391
|
export {
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
392
|
+
ue as ForceReloadCard,
|
|
393
|
+
ge as LiveTraceCard,
|
|
394
|
+
be as MergeCard,
|
|
395
|
+
pe as OffboardingCard,
|
|
396
|
+
he as SignOutEverywhereCard,
|
|
397
|
+
A as UserPicker
|
|
384
398
|
};
|