@nivaro/react 0.3.113 → 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 +1727 -19
- 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 +544 -504
- 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/cbv/column-totals.js +75 -67
- 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 +2076 -1686
- package/dist/shared/components/queue/queue-totals.js +92 -0
- package/dist/shared/components/queue/worklist-helpers.js +18 -14
- 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-link.js +56 -50
- 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,12 +1,14 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as a, jsx as e, Fragment as J } from "react/jsx-runtime";
|
|
2
2
|
import { useQueryClient as ie, useQuery as K } from "@tanstack/react-query";
|
|
3
3
|
import { RotateCw as ce, Search as ue, UserX as me, ChevronDown as Y, ChevronRight as Z } from "lucide-react";
|
|
4
|
-
import { useState as x, useEffect as xe, useMemo as
|
|
4
|
+
import { useState as x, useEffect as xe, useMemo as A, useCallback as pe } from "react";
|
|
5
5
|
import { useNivaroClient as B, useNavigation as ee, useItemNavigation as te } from "../../context.js";
|
|
6
6
|
import { get as M, post as ae } from "../../lib/commands.js";
|
|
7
|
+
import { useResolvedFindings as he } from "../../lib/live-findings.js";
|
|
7
8
|
import { userErrorMessage as Q } from "../../lib/safe-error.js";
|
|
8
|
-
import { cn as
|
|
9
|
-
import {
|
|
9
|
+
import { cn as F, formatRelative as fe } from "../../lib/utils.js";
|
|
10
|
+
import { FindingFixedMark as be } from "../FindingFixedMark.js";
|
|
11
|
+
import { UserAvatar as ge } from "../UserAvatar.js";
|
|
10
12
|
const re = {
|
|
11
13
|
suspended: "Suspended",
|
|
12
14
|
redacted: "Redacted",
|
|
@@ -18,104 +20,104 @@ const re = {
|
|
|
18
20
|
redacted: "Personal details were removed by a retention policy (or the legacy retention job).",
|
|
19
21
|
anonymised: "Redacted by the legacy retention job — the name and email were replaced.",
|
|
20
22
|
placeholder: "Stands in for a legacy account that no longer exists."
|
|
21
|
-
},
|
|
23
|
+
}, ke = {
|
|
22
24
|
suspended: "bg-[#fef3c7] text-[#92400e] dark:bg-[#3a2a12] dark:text-[#f5c97a]",
|
|
23
25
|
redacted: "bg-[#ffe4e6] text-[#9f1239] dark:bg-[#3d1a20] dark:text-[#f4a3ad]",
|
|
24
26
|
anonymised: "bg-[#ffe4e6] text-[#9f1239] dark:bg-[#3d1a20] dark:text-[#f4a3ad]",
|
|
25
27
|
placeholder: "bg-[#e2e8f0] text-[#334155] dark:bg-[#2c3038] dark:text-[#cbd5e1]"
|
|
26
|
-
}, b = (
|
|
27
|
-
function
|
|
28
|
-
className:
|
|
28
|
+
}, b = (o) => o.toLocaleString(), X = (o) => o === "anonymised" ? "redacted" : o, ve = ["suspended", "redacted", "placeholder"];
|
|
29
|
+
function Fe({
|
|
30
|
+
className: o,
|
|
29
31
|
focusUserId: s,
|
|
30
|
-
onClearFocus:
|
|
32
|
+
onClearFocus: d
|
|
31
33
|
}) {
|
|
32
|
-
var
|
|
33
|
-
const
|
|
34
|
+
var H;
|
|
35
|
+
const $ = B(), R = ie(), [p, i] = x(!0), [u, v] = x(!1), [c, m] = x(!1), [g, E] = x(!0), [w, L] = x(null), [S, j] = x(""), [l, y] = x(s ?? null), [N, k] = x(s ?? null);
|
|
34
36
|
xe(() => {
|
|
35
|
-
|
|
37
|
+
k(s ?? null), s && y(s);
|
|
36
38
|
}, [s]);
|
|
37
|
-
const [n,
|
|
39
|
+
const [n, h] = x(0), r = K({
|
|
38
40
|
queryKey: ["inactive-user-links", n],
|
|
39
|
-
queryFn: () =>
|
|
41
|
+
queryFn: () => $.request(M(`/inactive-user-links${n ? "?fresh=1" : ""}`)).then((t) => t.data),
|
|
40
42
|
staleTime: 6e4
|
|
41
|
-
}), f =
|
|
43
|
+
}), f = A(
|
|
42
44
|
() => {
|
|
43
45
|
var t;
|
|
44
|
-
return new Map((((t =
|
|
46
|
+
return new Map((((t = r.data) == null ? void 0 : t.sources) ?? []).map((q) => [q.key, q]));
|
|
45
47
|
},
|
|
46
|
-
[
|
|
47
|
-
), D =
|
|
48
|
-
(t) => !(!t || t.role === "audit" && !u || t.role === "own" && !
|
|
49
|
-
[
|
|
50
|
-
), T =
|
|
51
|
-
var
|
|
52
|
-
const t =
|
|
53
|
-
return (((
|
|
54
|
-
const P =
|
|
55
|
-
(
|
|
48
|
+
[r.data]
|
|
49
|
+
), D = pe(
|
|
50
|
+
(t) => !(!t || t.role === "audit" && !u || t.role === "own" && !c || t.role === "seat" && !g || p && t.scope !== "open" && t.role !== "seat"),
|
|
51
|
+
[p, u, c, g]
|
|
52
|
+
), T = A(() => {
|
|
53
|
+
var q;
|
|
54
|
+
const t = S.trim().toLowerCase();
|
|
55
|
+
return (((q = r.data) == null ? void 0 : q.users) ?? []).map((C) => {
|
|
56
|
+
const P = C.links.filter((_) => D(f.get(_.source))).sort(
|
|
57
|
+
(_, z) => {
|
|
56
58
|
var G, V;
|
|
57
|
-
return +(((G = f.get(
|
|
59
|
+
return +(((G = f.get(_.source)) == null ? void 0 : G.role) === "seat") - +(((V = f.get(z.source)) == null ? void 0 : V.role) === "seat") || z.count - _.count;
|
|
58
60
|
}
|
|
59
61
|
);
|
|
60
|
-
return { ...
|
|
61
|
-
}).filter((
|
|
62
|
-
(
|
|
63
|
-
).sort((
|
|
64
|
-
}, [
|
|
62
|
+
return { ...C, links: P, total: P.reduce((_, z) => _ + z.count, 0) };
|
|
63
|
+
}).filter((C) => C.total > 0).filter((C) => !N || C.user.id.toUpperCase() === N.toUpperCase()).filter(
|
|
64
|
+
(C) => !t || `${C.user.name} ${C.user.email ?? ""}`.toLowerCase().includes(t)
|
|
65
|
+
).sort((C, P) => P.total - C.total);
|
|
66
|
+
}, [r.data, f, S, D, N]), I = A(() => {
|
|
65
67
|
const t = { suspended: 0, redacted: 0, anonymised: 0, placeholder: 0 };
|
|
66
|
-
for (const
|
|
68
|
+
for (const q of T) t[X(q.user.reason)]++;
|
|
67
69
|
return t;
|
|
68
|
-
}, [T]), O =
|
|
69
|
-
var
|
|
70
|
-
let t = 0,
|
|
70
|
+
}, [T]), O = w ? T.filter((t) => X(t.user.reason) === w) : T, W = A(() => {
|
|
71
|
+
var C;
|
|
72
|
+
let t = 0, q = 0;
|
|
71
73
|
for (const P of O)
|
|
72
|
-
for (const
|
|
73
|
-
((
|
|
74
|
-
return { records: t, seats:
|
|
75
|
-
}, [O, f]),
|
|
76
|
-
|
|
74
|
+
for (const _ of P.links)
|
|
75
|
+
((C = f.get(_.source)) == null ? void 0 : C.role) === "seat" ? q += _.count : t += _.count;
|
|
76
|
+
return { records: t, seats: q };
|
|
77
|
+
}, [O, f]), le = () => {
|
|
78
|
+
h((t) => t + 1), y(null);
|
|
77
79
|
}, de = () => {
|
|
78
|
-
|
|
80
|
+
R.invalidateQueries({ queryKey: ["inactive-user-links"] }), R.invalidateQueries({ queryKey: ["inactive-user-records"] });
|
|
79
81
|
};
|
|
80
|
-
return /* @__PURE__ */
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
-
/* @__PURE__ */
|
|
83
|
-
/* @__PURE__ */
|
|
82
|
+
return /* @__PURE__ */ a("div", { className: F("flex min-h-0 flex-1 flex-col gap-4 p-6", o), "data-inactive-links": !0, children: [
|
|
83
|
+
/* @__PURE__ */ a("div", { className: "flex flex-wrap items-center gap-x-5 gap-y-3", children: [
|
|
84
|
+
/* @__PURE__ */ a("dl", { className: "flex items-baseline gap-5 text-[12px] text-slate-500 dark:text-muted-foreground", children: [
|
|
85
|
+
/* @__PURE__ */ a("div", { className: "flex items-baseline gap-1.5", children: [
|
|
84
86
|
/* @__PURE__ */ e(
|
|
85
87
|
"dd",
|
|
86
88
|
{
|
|
87
89
|
className: "text-[20px] font-semibold tabular-nums text-slate-900 dark:text-foreground",
|
|
88
90
|
"data-inactive-people": !0,
|
|
89
|
-
children:
|
|
91
|
+
children: r.isLoading ? "—" : b(O.length)
|
|
90
92
|
}
|
|
91
93
|
),
|
|
92
94
|
/* @__PURE__ */ e("dt", { children: O.length === 1 ? "person" : "people" })
|
|
93
95
|
] }),
|
|
94
|
-
/* @__PURE__ */
|
|
95
|
-
/* @__PURE__ */ e("dd", { className: "text-[20px] font-semibold tabular-nums text-slate-900 dark:text-foreground", children:
|
|
96
|
-
/* @__PURE__ */ e("dt", { children:
|
|
96
|
+
/* @__PURE__ */ a("div", { className: "flex items-baseline gap-1.5", children: [
|
|
97
|
+
/* @__PURE__ */ e("dd", { className: "text-[20px] font-semibold tabular-nums text-slate-900 dark:text-foreground", children: r.isLoading ? "—" : b(W.records) }),
|
|
98
|
+
/* @__PURE__ */ e("dt", { children: p ? "links on open records" : "record links" })
|
|
97
99
|
] }),
|
|
98
|
-
/* @__PURE__ */
|
|
99
|
-
/* @__PURE__ */ e("dd", { className: "text-[20px] font-semibold tabular-nums text-slate-900 dark:text-foreground", children:
|
|
100
|
+
/* @__PURE__ */ a("div", { className: "flex items-baseline gap-1.5", children: [
|
|
101
|
+
/* @__PURE__ */ e("dd", { className: "text-[20px] font-semibold tabular-nums text-slate-900 dark:text-foreground", children: r.isLoading ? "—" : b(W.seats) }),
|
|
100
102
|
/* @__PURE__ */ e("dt", { children: "owner seats and team places" })
|
|
101
103
|
] })
|
|
102
104
|
] }),
|
|
103
|
-
/* @__PURE__ */
|
|
105
|
+
/* @__PURE__ */ a(
|
|
104
106
|
"button",
|
|
105
107
|
{
|
|
106
108
|
type: "button",
|
|
107
|
-
onClick:
|
|
108
|
-
disabled:
|
|
109
|
+
onClick: le,
|
|
110
|
+
disabled: r.isFetching,
|
|
109
111
|
className: "ml-auto inline-flex h-8 items-center gap-1.5 rounded-md border border-slate-200 px-2.5 text-[12px] font-medium text-slate-600 hover:border-slate-300 hover:text-slate-900 disabled:opacity-60 dark:border-border dark:text-muted-foreground dark:hover:text-foreground",
|
|
110
112
|
"data-inactive-rescan": !0,
|
|
111
113
|
children: [
|
|
112
|
-
/* @__PURE__ */ e(ce, { className:
|
|
114
|
+
/* @__PURE__ */ e(ce, { className: F("h-3.5 w-3.5", r.isFetching && "animate-spin") }),
|
|
113
115
|
"Scan again"
|
|
114
116
|
]
|
|
115
117
|
}
|
|
116
118
|
)
|
|
117
119
|
] }),
|
|
118
|
-
|
|
120
|
+
N && /* @__PURE__ */ a(
|
|
119
121
|
"p",
|
|
120
122
|
{
|
|
121
123
|
className: "flex flex-wrap items-center gap-2 text-[12px] text-slate-600 dark:text-muted-foreground",
|
|
@@ -127,7 +129,7 @@ function Ee({
|
|
|
127
129
|
{
|
|
128
130
|
type: "button",
|
|
129
131
|
onClick: () => {
|
|
130
|
-
|
|
132
|
+
k(null), d == null || d();
|
|
131
133
|
},
|
|
132
134
|
className: "font-medium text-slate-800 underline underline-offset-2 dark:text-foreground",
|
|
133
135
|
children: "Show everyone"
|
|
@@ -136,13 +138,13 @@ function Ee({
|
|
|
136
138
|
]
|
|
137
139
|
}
|
|
138
140
|
),
|
|
139
|
-
/* @__PURE__ */
|
|
140
|
-
/* @__PURE__ */
|
|
141
|
+
/* @__PURE__ */ a("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
142
|
+
/* @__PURE__ */ a("label", { className: "relative", children: [
|
|
141
143
|
/* @__PURE__ */ e(ue, { className: "pointer-events-none absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-slate-400" }),
|
|
142
144
|
/* @__PURE__ */ e(
|
|
143
145
|
"input",
|
|
144
146
|
{
|
|
145
|
-
value:
|
|
147
|
+
value: S,
|
|
146
148
|
onChange: (t) => j(t.target.value),
|
|
147
149
|
placeholder: "Find a person",
|
|
148
150
|
className: "h-8 w-56 rounded-md border border-slate-200 bg-background pl-7 pr-2 text-[12.5px] text-slate-800 placeholder:text-slate-500 focus:border-slate-400 focus:outline-none dark:border-border dark:text-foreground dark:placeholder:text-muted-foreground",
|
|
@@ -150,35 +152,35 @@ function Ee({
|
|
|
150
152
|
}
|
|
151
153
|
)
|
|
152
154
|
] }),
|
|
153
|
-
/* @__PURE__ */ e("span", { className: "flex flex-wrap items-center gap-1", children:
|
|
154
|
-
(t) =>
|
|
155
|
+
/* @__PURE__ */ e("span", { className: "flex flex-wrap items-center gap-1", children: ve.map(
|
|
156
|
+
(t) => I[t] || w === t ? /* @__PURE__ */ a(
|
|
155
157
|
"button",
|
|
156
158
|
{
|
|
157
159
|
type: "button",
|
|
158
|
-
"aria-pressed":
|
|
159
|
-
onClick: () =>
|
|
160
|
+
"aria-pressed": w === t,
|
|
161
|
+
onClick: () => L(w === t ? null : t),
|
|
160
162
|
"data-tip": ne[t],
|
|
161
163
|
"data-inactive-reason": t,
|
|
162
|
-
className:
|
|
164
|
+
className: F(
|
|
163
165
|
"h-7 rounded-md border px-2 text-[11.5px] font-medium transition-colors",
|
|
164
|
-
|
|
166
|
+
w === t ? "border-slate-400 bg-slate-100 text-slate-900 dark:border-border dark:bg-muted dark:text-foreground" : "border-slate-200 text-slate-600 hover:border-slate-300 dark:border-border dark:text-muted-foreground"
|
|
165
167
|
),
|
|
166
168
|
children: [
|
|
167
169
|
re[t],
|
|
168
170
|
" ",
|
|
169
|
-
/* @__PURE__ */ e("span", { className: "tabular-nums text-slate-500 dark:text-muted-foreground", children: b(
|
|
171
|
+
/* @__PURE__ */ e("span", { className: "tabular-nums text-slate-500 dark:text-muted-foreground", children: b(I[t]) })
|
|
170
172
|
]
|
|
171
173
|
},
|
|
172
174
|
t
|
|
173
175
|
) : null
|
|
174
176
|
) }),
|
|
175
|
-
/* @__PURE__ */
|
|
177
|
+
/* @__PURE__ */ a("span", { className: "ml-auto flex flex-wrap items-center gap-x-4 gap-y-1", children: [
|
|
176
178
|
/* @__PURE__ */ e(
|
|
177
179
|
U,
|
|
178
180
|
{
|
|
179
181
|
label: "Only records in an open workflow",
|
|
180
|
-
checked:
|
|
181
|
-
onChange:
|
|
182
|
+
checked: p,
|
|
183
|
+
onChange: i,
|
|
182
184
|
hook: "open"
|
|
183
185
|
}
|
|
184
186
|
),
|
|
@@ -187,7 +189,7 @@ function Ee({
|
|
|
187
189
|
{
|
|
188
190
|
label: "Owner seats and team places",
|
|
189
191
|
checked: g,
|
|
190
|
-
onChange:
|
|
192
|
+
onChange: E,
|
|
191
193
|
hook: "seats"
|
|
192
194
|
}
|
|
193
195
|
),
|
|
@@ -196,7 +198,7 @@ function Ee({
|
|
|
196
198
|
{
|
|
197
199
|
label: "Created by / updated by",
|
|
198
200
|
checked: u,
|
|
199
|
-
onChange:
|
|
201
|
+
onChange: v,
|
|
200
202
|
hook: "audit"
|
|
201
203
|
}
|
|
202
204
|
),
|
|
@@ -204,41 +206,41 @@ function Ee({
|
|
|
204
206
|
U,
|
|
205
207
|
{
|
|
206
208
|
label: "The person's own saved sets",
|
|
207
|
-
checked:
|
|
209
|
+
checked: c,
|
|
208
210
|
onChange: m,
|
|
209
211
|
hook: "own"
|
|
210
212
|
}
|
|
211
213
|
)
|
|
212
214
|
] })
|
|
213
215
|
] }),
|
|
214
|
-
(
|
|
215
|
-
|
|
216
|
+
(H = r.data) != null && H.failed.length ? /* @__PURE__ */ a("p", { className: "text-[11.5px] text-amber-700 dark:text-amber-300", children: [
|
|
217
|
+
r.data.failed.length,
|
|
216
218
|
" link ",
|
|
217
|
-
|
|
219
|
+
r.data.failed.length === 1 ? "type" : "types",
|
|
218
220
|
" could not be read and are left out: ",
|
|
219
|
-
|
|
221
|
+
r.data.failed.join(", ")
|
|
220
222
|
] }) : null,
|
|
221
|
-
/* @__PURE__ */ e("div", { className: "flex min-h-0 flex-1 flex-col overflow-hidden rounded-lg border border-slate-200 bg-white dark:border-border dark:bg-card", children:
|
|
223
|
+
/* @__PURE__ */ e("div", { className: "flex min-h-0 flex-1 flex-col overflow-hidden rounded-lg border border-slate-200 bg-white dark:border-border dark:bg-card", children: r.isLoading ? /* @__PURE__ */ e("div", { className: "space-y-2 p-4", children: [0, 1, 2, 3, 4].map((t) => /* @__PURE__ */ e(
|
|
222
224
|
"div",
|
|
223
225
|
{
|
|
224
226
|
className: "h-9 animate-pulse rounded",
|
|
225
227
|
style: { background: "hsl(var(--nvr-skeleton))" }
|
|
226
228
|
},
|
|
227
229
|
t
|
|
228
|
-
)) }) :
|
|
230
|
+
)) }) : r.isError ? /* @__PURE__ */ a("p", { className: "p-6 text-[12.5px] text-rose-700 dark:text-rose-300", children: [
|
|
229
231
|
"The scan failed. ",
|
|
230
|
-
Q(
|
|
231
|
-
] }) : O.length === 0 ? /* @__PURE__ */
|
|
232
|
+
Q(r.error, "")
|
|
233
|
+
] }) : O.length === 0 ? /* @__PURE__ */ a("div", { className: "flex flex-1 flex-col items-center justify-center gap-2 p-10 text-center", children: [
|
|
232
234
|
/* @__PURE__ */ e(me, { className: "h-6 w-6 text-slate-400" }),
|
|
233
|
-
/* @__PURE__ */ e("p", { className: "text-[13px] font-medium text-slate-800 dark:text-foreground", children:
|
|
234
|
-
/* @__PURE__ */ e("p", { className: "max-w-[52ch] text-[12px] text-slate-500 dark:text-muted-foreground", children:
|
|
235
|
+
/* @__PURE__ */ e("p", { className: "text-[13px] font-medium text-slate-800 dark:text-foreground", children: p ? "Nobody inactive is named on open work" : "Nothing matches" }),
|
|
236
|
+
/* @__PURE__ */ e("p", { className: "max-w-[52ch] text-[12px] text-slate-500 dark:text-muted-foreground", children: p ? "Every contact, owner and task on a record in an open workflow belongs to someone who can still act. Clear the first switch to look at closed records too." : "Change the switches above to widen what counts as a link." })
|
|
235
237
|
] }) : /* @__PURE__ */ e("ul", { className: "min-h-0 flex-1 divide-y divide-slate-100 overflow-y-auto dark:divide-border", children: O.map((t) => /* @__PURE__ */ e(
|
|
236
|
-
|
|
238
|
+
ye,
|
|
237
239
|
{
|
|
238
240
|
person: t,
|
|
239
241
|
sources: f,
|
|
240
|
-
open:
|
|
241
|
-
onToggle: () =>
|
|
242
|
+
open: l === t.user.id,
|
|
243
|
+
onToggle: () => y(l === t.user.id ? null : t.user.id),
|
|
242
244
|
onChanged: de
|
|
243
245
|
},
|
|
244
246
|
t.user.id
|
|
@@ -246,103 +248,103 @@ function Ee({
|
|
|
246
248
|
] });
|
|
247
249
|
}
|
|
248
250
|
function U({
|
|
249
|
-
label:
|
|
251
|
+
label: o,
|
|
250
252
|
checked: s,
|
|
251
|
-
onChange:
|
|
252
|
-
hook:
|
|
253
|
+
onChange: d,
|
|
254
|
+
hook: $
|
|
253
255
|
}) {
|
|
254
|
-
return /* @__PURE__ */
|
|
256
|
+
return /* @__PURE__ */ a("label", { className: "flex cursor-pointer items-center gap-1.5 text-[11.5px] text-slate-600 dark:text-muted-foreground", children: [
|
|
255
257
|
/* @__PURE__ */ e(
|
|
256
258
|
"input",
|
|
257
259
|
{
|
|
258
260
|
type: "checkbox",
|
|
259
261
|
checked: s,
|
|
260
|
-
onChange: (
|
|
262
|
+
onChange: (R) => d(R.target.checked),
|
|
261
263
|
className: "h-3.5 w-3.5 accent-slate-700",
|
|
262
|
-
"data-inactive-switch":
|
|
264
|
+
"data-inactive-switch": $
|
|
263
265
|
}
|
|
264
266
|
),
|
|
265
|
-
|
|
267
|
+
o
|
|
266
268
|
] });
|
|
267
269
|
}
|
|
268
|
-
function se(
|
|
269
|
-
return
|
|
270
|
+
function se(o) {
|
|
271
|
+
return o.kind === "builtin" ? o.label : `${o.collection_label} · ${o.label}`;
|
|
270
272
|
}
|
|
271
|
-
function
|
|
272
|
-
person:
|
|
273
|
+
function ye({
|
|
274
|
+
person: o,
|
|
273
275
|
sources: s,
|
|
274
|
-
open:
|
|
275
|
-
onToggle:
|
|
276
|
-
onChanged:
|
|
276
|
+
open: d,
|
|
277
|
+
onToggle: $,
|
|
278
|
+
onChanged: R
|
|
277
279
|
}) {
|
|
278
|
-
const
|
|
279
|
-
return /* @__PURE__ */
|
|
280
|
-
/* @__PURE__ */
|
|
280
|
+
const p = ee(), i = o.user, u = p.userUrl ? p.userUrl(i.id) : `/users/${i.id}`, v = i.name.split(/\s+/).map((c) => c[0]).join("").slice(0, 2).toUpperCase();
|
|
281
|
+
return /* @__PURE__ */ a("li", { "data-inactive-person": i.id, children: [
|
|
282
|
+
/* @__PURE__ */ a(
|
|
281
283
|
"button",
|
|
282
284
|
{
|
|
283
285
|
type: "button",
|
|
284
|
-
onClick:
|
|
285
|
-
"aria-expanded":
|
|
286
|
+
onClick: $,
|
|
287
|
+
"aria-expanded": d,
|
|
286
288
|
className: "flex w-full items-center gap-3 px-4 py-2.5 text-left hover:bg-muted",
|
|
287
289
|
children: [
|
|
288
|
-
|
|
290
|
+
d ? /* @__PURE__ */ e(Y, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" }) : /* @__PURE__ */ e(Z, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" }),
|
|
289
291
|
/* @__PURE__ */ e(
|
|
290
|
-
|
|
292
|
+
ge,
|
|
291
293
|
{
|
|
292
|
-
userId:
|
|
294
|
+
userId: i.id,
|
|
293
295
|
className: "h-6 w-6 shrink-0 rounded-full object-cover",
|
|
294
|
-
fallback: /* @__PURE__ */ e("span", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-slate-200 text-[9px] font-semibold text-slate-600 dark:bg-muted dark:text-muted-foreground", children:
|
|
296
|
+
fallback: /* @__PURE__ */ e("span", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-slate-200 text-[9px] font-semibold text-slate-600 dark:bg-muted dark:text-muted-foreground", children: v })
|
|
295
297
|
}
|
|
296
298
|
),
|
|
297
|
-
/* @__PURE__ */
|
|
298
|
-
/* @__PURE__ */ e("span", { className: "block truncate text-[12.5px] font-medium text-slate-900 dark:text-foreground", children:
|
|
299
|
-
/* @__PURE__ */ e("span", { className: "block truncate text-[11px] text-slate-500 dark:text-muted-foreground", children:
|
|
299
|
+
/* @__PURE__ */ a("span", { className: "min-w-0 flex-[0_1_260px]", children: [
|
|
300
|
+
/* @__PURE__ */ e("span", { className: "block truncate text-[12.5px] font-medium text-slate-900 dark:text-foreground", children: i.name }),
|
|
301
|
+
/* @__PURE__ */ e("span", { className: "block truncate text-[11px] text-slate-500 dark:text-muted-foreground", children: i.email ?? "—" })
|
|
300
302
|
] }),
|
|
301
303
|
/* @__PURE__ */ e(
|
|
302
304
|
"span",
|
|
303
305
|
{
|
|
304
|
-
className:
|
|
306
|
+
className: F(
|
|
305
307
|
"shrink-0 rounded px-1.5 py-0.5 text-[10.5px] font-medium",
|
|
306
|
-
|
|
308
|
+
ke[i.reason]
|
|
307
309
|
),
|
|
308
|
-
"data-tip": ne[
|
|
309
|
-
children: re[
|
|
310
|
+
"data-tip": ne[i.reason],
|
|
311
|
+
children: re[i.reason]
|
|
310
312
|
}
|
|
311
313
|
),
|
|
312
|
-
/* @__PURE__ */
|
|
313
|
-
|
|
314
|
-
const m = s.get(
|
|
315
|
-
return m ? `${se(m)} ${b(
|
|
314
|
+
/* @__PURE__ */ a("span", { className: "hidden min-w-0 flex-1 truncate text-[11.5px] text-slate-500 md:block dark:text-muted-foreground", children: [
|
|
315
|
+
o.links.slice(0, 3).map((c) => {
|
|
316
|
+
const m = s.get(c.source);
|
|
317
|
+
return m ? `${se(m)} ${b(c.count)}` : "";
|
|
316
318
|
}).filter(Boolean).join(" · "),
|
|
317
|
-
|
|
319
|
+
o.links.length > 3 ? ` · +${o.links.length - 3} more` : ""
|
|
318
320
|
] }),
|
|
319
|
-
/* @__PURE__ */ e("span", { className: "ml-auto shrink-0 text-[11px] text-slate-500 dark:text-muted-foreground", children:
|
|
320
|
-
/* @__PURE__ */ e("span", { className: "w-14 shrink-0 text-right text-[12.5px] font-semibold tabular-nums text-slate-900 dark:text-foreground", children: b(
|
|
321
|
+
/* @__PURE__ */ e("span", { className: "ml-auto shrink-0 text-[11px] text-slate-500 dark:text-muted-foreground", children: i.last_access ? `last active ${fe(i.last_access)}` : "never signed in" }),
|
|
322
|
+
/* @__PURE__ */ e("span", { className: "w-14 shrink-0 text-right text-[12.5px] font-semibold tabular-nums text-slate-900 dark:text-foreground", children: b(o.total) })
|
|
321
323
|
]
|
|
322
324
|
}
|
|
323
325
|
),
|
|
324
|
-
|
|
325
|
-
/* @__PURE__ */ e("ul", { className: "space-y-1", children:
|
|
326
|
-
const m = s.get(
|
|
326
|
+
d && /* @__PURE__ */ a("div", { className: "border-t border-slate-100 bg-slate-50/60 px-4 py-3 pl-11 dark:border-border dark:bg-white/[0.02]", children: [
|
|
327
|
+
/* @__PURE__ */ e("ul", { className: "space-y-1", children: o.links.map((c) => {
|
|
328
|
+
const m = s.get(c.source);
|
|
327
329
|
return m ? /* @__PURE__ */ e(
|
|
328
|
-
|
|
330
|
+
Ne,
|
|
329
331
|
{
|
|
330
|
-
userId:
|
|
332
|
+
userId: i.id,
|
|
331
333
|
source: m,
|
|
332
|
-
count:
|
|
333
|
-
onChanged:
|
|
334
|
+
count: c.count,
|
|
335
|
+
onChanged: R
|
|
334
336
|
},
|
|
335
|
-
|
|
337
|
+
c.source
|
|
336
338
|
) : null;
|
|
337
339
|
}) }),
|
|
338
|
-
u && /* @__PURE__ */
|
|
340
|
+
u && /* @__PURE__ */ a("p", { className: "mt-3 text-[11.5px] text-slate-500 dark:text-muted-foreground", children: [
|
|
339
341
|
"Everything this person holds can also move in one pass from",
|
|
340
342
|
" ",
|
|
341
343
|
/* @__PURE__ */ e(
|
|
342
344
|
"button",
|
|
343
345
|
{
|
|
344
346
|
type: "button",
|
|
345
|
-
onClick: () =>
|
|
347
|
+
onClick: () => p.navigate(u),
|
|
346
348
|
className: "font-medium text-slate-700 underline decoration-dotted underline-offset-2 hover:text-slate-900 dark:text-foreground",
|
|
347
349
|
children: "their account page"
|
|
348
350
|
}
|
|
@@ -353,110 +355,135 @@ function ke({
|
|
|
353
355
|
] })
|
|
354
356
|
] });
|
|
355
357
|
}
|
|
356
|
-
function
|
|
357
|
-
userId:
|
|
358
|
+
function Ne({
|
|
359
|
+
userId: o,
|
|
358
360
|
source: s,
|
|
359
|
-
count:
|
|
360
|
-
onChanged:
|
|
361
|
+
count: d,
|
|
362
|
+
onChanged: $
|
|
361
363
|
}) {
|
|
362
|
-
var
|
|
363
|
-
const
|
|
364
|
-
queryKey: ["inactive-user-records",
|
|
365
|
-
queryFn: () =>
|
|
364
|
+
var L, S, j;
|
|
365
|
+
const R = B(), { open: p } = te(), [i, u] = x(!1), v = !0, c = s.kind === "builtin", m = K({
|
|
366
|
+
queryKey: ["inactive-user-records", o, s.key],
|
|
367
|
+
queryFn: () => R.request(
|
|
368
|
+
M(
|
|
369
|
+
`/inactive-user-links/${o}/records?source=${encodeURIComponent(s.key)}&limit=100`
|
|
370
|
+
)
|
|
371
|
+
).then((l) => l.data),
|
|
372
|
+
enabled: i && v
|
|
373
|
+
}), g = (L = m.data) == null ? void 0 : L.records, E = A(
|
|
374
|
+
() => c ? [] : (g ?? []).map((l) => ({
|
|
375
|
+
key: `${l.collection}:${l.id}`,
|
|
376
|
+
collection: l.collection,
|
|
377
|
+
itemId: l.id
|
|
378
|
+
})),
|
|
379
|
+
[g, c]
|
|
380
|
+
), { resolved: w } = he({
|
|
381
|
+
findings: E,
|
|
382
|
+
enabled: i && !c,
|
|
383
|
+
recheck: (l) => R.request(
|
|
366
384
|
M(
|
|
367
|
-
`/inactive-user-links/${
|
|
385
|
+
`/inactive-user-links/${o}/records?source=${encodeURIComponent(s.key)}&limit=100`
|
|
368
386
|
)
|
|
369
|
-
).then((
|
|
370
|
-
|
|
387
|
+
).then((y) => {
|
|
388
|
+
const N = new Set((y.data.records ?? []).map((k) => `${k.collection}:${k.id}`));
|
|
389
|
+
return l.filter((k) => !N.has(k.key)).map((k) => k.key);
|
|
390
|
+
})
|
|
371
391
|
});
|
|
372
|
-
return /* @__PURE__ */
|
|
373
|
-
/* @__PURE__ */
|
|
374
|
-
/* @__PURE__ */
|
|
392
|
+
return /* @__PURE__ */ a("li", { "data-inactive-source": s.key, children: [
|
|
393
|
+
/* @__PURE__ */ a("div", { className: "flex items-center gap-2 text-[12px]", children: [
|
|
394
|
+
/* @__PURE__ */ a(
|
|
375
395
|
"button",
|
|
376
396
|
{
|
|
377
397
|
type: "button",
|
|
378
|
-
disabled: !
|
|
379
|
-
onClick: () => u((
|
|
380
|
-
"aria-expanded":
|
|
398
|
+
disabled: !v,
|
|
399
|
+
onClick: () => u((l) => !l),
|
|
400
|
+
"aria-expanded": i,
|
|
381
401
|
className: "flex min-w-0 items-center gap-1.5 text-left text-slate-700 enabled:hover:text-slate-900 dark:text-foreground",
|
|
382
402
|
children: [
|
|
383
|
-
|
|
403
|
+
i ? /* @__PURE__ */ e(Y, { className: "h-3 w-3 shrink-0 text-slate-400" }) : /* @__PURE__ */ e(Z, { className: "h-3 w-3 shrink-0 text-slate-400" }),
|
|
384
404
|
/* @__PURE__ */ e("span", { className: "truncate", children: se(s) })
|
|
385
405
|
]
|
|
386
406
|
}
|
|
387
407
|
),
|
|
388
|
-
/* @__PURE__ */ e("span", { className: "tabular-nums text-slate-500 dark:text-muted-foreground", children: b(
|
|
408
|
+
/* @__PURE__ */ e("span", { className: "tabular-nums text-slate-500 dark:text-muted-foreground", children: b(d) }),
|
|
389
409
|
s.scope === "open" && /* @__PURE__ */ e("span", { className: "rounded bg-[#e0f2fe] px-1.5 py-0.5 text-[10px] font-medium text-[#075985] dark:bg-[#15303f] dark:text-[#8fcdf0]", children: "open workflow" }),
|
|
390
|
-
s.reassignable && !
|
|
410
|
+
s.reassignable && !c && /* @__PURE__ */ e("span", { className: "ml-auto", children: /* @__PURE__ */ e(oe, { userId: o, source: s, count: d, onDone: $ }) })
|
|
391
411
|
] }),
|
|
392
|
-
|
|
393
|
-
|
|
412
|
+
i && v && /* @__PURE__ */ e("div", { className: "ml-[18px] mt-1 mb-2", children: m.isLoading ? /* @__PURE__ */ e("p", { className: "text-[11.5px] text-slate-500 dark:text-muted-foreground", children: "Loading…" }) : c ? /* @__PURE__ */ e(
|
|
413
|
+
we,
|
|
394
414
|
{
|
|
395
|
-
userId:
|
|
415
|
+
userId: o,
|
|
396
416
|
source: s,
|
|
397
|
-
entries: ((
|
|
398
|
-
onChanged:
|
|
417
|
+
entries: ((S = m.data) == null ? void 0 : S.entries) ?? [],
|
|
418
|
+
onChanged: $
|
|
399
419
|
}
|
|
400
|
-
) : (
|
|
401
|
-
m.data.records.map((
|
|
402
|
-
var
|
|
403
|
-
|
|
420
|
+
) : (j = m.data) != null && j.records.length ? /* @__PURE__ */ a("ul", { className: "flex flex-wrap gap-1", "data-inactive-records": !0, children: [
|
|
421
|
+
m.data.records.map((l) => {
|
|
422
|
+
var N;
|
|
423
|
+
const y = w.get(`${l.collection}:${l.id}`);
|
|
424
|
+
return /* @__PURE__ */ e("li", { "data-finding-resolved": y ? "" : void 0, children: /* @__PURE__ */ a(
|
|
404
425
|
"button",
|
|
405
426
|
{
|
|
406
427
|
type: "button",
|
|
407
|
-
onClick: () =>
|
|
408
|
-
className:
|
|
409
|
-
|
|
428
|
+
onClick: () => p({ collection: l.collection, itemId: l.id }),
|
|
429
|
+
className: F(
|
|
430
|
+
"inline-flex items-center gap-1.5 rounded border border-slate-200 bg-white px-1.5 py-0.5 text-[11px] text-slate-700 transition-opacity hover:border-slate-400 dark:border-border dark:bg-card dark:text-foreground",
|
|
431
|
+
y && "opacity-60"
|
|
432
|
+
),
|
|
433
|
+
children: [
|
|
434
|
+
((N = l.label) == null ? void 0 : N.trim()) || `#${l.id}`,
|
|
435
|
+
y && /* @__PURE__ */ e(be, { mark: y, className: "text-[10.5px]" })
|
|
436
|
+
]
|
|
410
437
|
}
|
|
411
|
-
) }, `${
|
|
438
|
+
) }, `${l.collection}:${l.id}`);
|
|
412
439
|
}),
|
|
413
|
-
|
|
440
|
+
d > m.data.records.length && /* @__PURE__ */ a("li", { className: "px-1 py-0.5 text-[11px] text-slate-500 dark:text-muted-foreground", children: [
|
|
414
441
|
"+",
|
|
415
|
-
b(
|
|
442
|
+
b(d - m.data.records.length),
|
|
416
443
|
" more"
|
|
417
444
|
] })
|
|
418
445
|
] }) : /* @__PURE__ */ e("p", { className: "text-[11.5px] text-slate-500 dark:text-muted-foreground", children: "Nothing to list." }) })
|
|
419
446
|
] });
|
|
420
447
|
}
|
|
421
|
-
function
|
|
422
|
-
userId:
|
|
448
|
+
function oe({
|
|
449
|
+
userId: o,
|
|
423
450
|
source: s,
|
|
424
|
-
count:
|
|
425
|
-
ids:
|
|
426
|
-
label:
|
|
427
|
-
onDone:
|
|
451
|
+
count: d,
|
|
452
|
+
ids: $,
|
|
453
|
+
label: R = "Hand to…",
|
|
454
|
+
onDone: p
|
|
428
455
|
}) {
|
|
429
|
-
var
|
|
430
|
-
const
|
|
431
|
-
queryKey: ["inactive-reassign-users",
|
|
432
|
-
queryFn: () =>
|
|
433
|
-
enabled: u && !g &&
|
|
456
|
+
var h;
|
|
457
|
+
const i = B(), [u, v] = x(!1), [c, m] = x(""), [g, E] = x(null), [w, L] = x(!1), [S, j] = x(null), [l, y] = x(null), N = K({
|
|
458
|
+
queryKey: ["inactive-reassign-users", c],
|
|
459
|
+
queryFn: () => i.request(M(`/users?search=${encodeURIComponent(c)}&limit=8`)).then((r) => r.data),
|
|
460
|
+
enabled: u && !g && c.trim().length >= 2,
|
|
434
461
|
staleTime: 3e4
|
|
435
|
-
}),
|
|
462
|
+
}), k = (r) => [r.first_name, r.last_name].filter(Boolean).join(" ") || r.email, n = async () => {
|
|
436
463
|
if (g) {
|
|
437
|
-
|
|
464
|
+
L(!0), y(null);
|
|
438
465
|
try {
|
|
439
|
-
const f = (await
|
|
466
|
+
const f = (await i.request(ae(`/inactive-user-links/${o}/reassign`, { source: s.key, to: g.id, ids: $ }))).data;
|
|
440
467
|
j(
|
|
441
|
-
`${b(f.moved)} moved to ${
|
|
442
|
-
),
|
|
443
|
-
} catch (
|
|
444
|
-
const f =
|
|
445
|
-
|
|
468
|
+
`${b(f.moved)} moved to ${k(g)}` + (f.removed ? ` · ${b(f.removed)} already theirs` : "") + (f.failed.length ? ` · ${b(f.failed.length)} refused (${f.failed[0].error})` : "")
|
|
469
|
+
), v(!1), p();
|
|
470
|
+
} catch (r) {
|
|
471
|
+
const f = r.response;
|
|
472
|
+
y((f == null ? void 0 : f.error) ?? Q(r, ""));
|
|
446
473
|
} finally {
|
|
447
|
-
|
|
474
|
+
L(!1);
|
|
448
475
|
}
|
|
449
476
|
}
|
|
450
477
|
};
|
|
451
|
-
return
|
|
478
|
+
return S ? /* @__PURE__ */ e("span", { className: "text-[11px] text-emerald-700 dark:text-emerald-400", "data-inactive-reassigned": !0, children: S }) : /* @__PURE__ */ a("span", { className: "relative inline-block", children: [
|
|
452
479
|
/* @__PURE__ */ e(
|
|
453
480
|
"button",
|
|
454
481
|
{
|
|
455
482
|
type: "button",
|
|
456
|
-
onClick: () =>
|
|
483
|
+
onClick: () => v((r) => !r),
|
|
457
484
|
"data-inactive-reassign": s.key,
|
|
458
485
|
className: "rounded-md border border-slate-200 bg-white px-2 py-0.5 text-[11px] text-slate-600 hover:border-slate-300 hover:text-slate-900 dark:border-border dark:bg-card dark:text-muted-foreground dark:hover:text-foreground",
|
|
459
|
-
children:
|
|
486
|
+
children: R
|
|
460
487
|
}
|
|
461
488
|
),
|
|
462
489
|
u && /* @__PURE__ */ e(
|
|
@@ -464,30 +491,30 @@ function le({
|
|
|
464
491
|
{
|
|
465
492
|
className: "absolute right-0 top-7 z-30 w-72 rounded-md border border-slate-200 bg-white p-2 text-left shadow-md dark:border-border dark:bg-card",
|
|
466
493
|
"data-inactive-reassign-panel": !0,
|
|
467
|
-
children: g ? /* @__PURE__ */
|
|
468
|
-
/* @__PURE__ */
|
|
494
|
+
children: g ? /* @__PURE__ */ a("div", { className: "space-y-2", children: [
|
|
495
|
+
/* @__PURE__ */ a("p", { className: "text-[12px] text-slate-700 dark:text-foreground", children: [
|
|
469
496
|
"Put ",
|
|
470
|
-
/* @__PURE__ */ e("strong", { className: "font-semibold", children:
|
|
497
|
+
/* @__PURE__ */ e("strong", { className: "font-semibold", children: k(g) }),
|
|
471
498
|
" on",
|
|
472
499
|
" ",
|
|
473
|
-
b(Math.min(
|
|
500
|
+
b(Math.min(d, 500)),
|
|
474
501
|
" ",
|
|
475
|
-
s.kind === "builtin" ?
|
|
502
|
+
s.kind === "builtin" ? d === 1 ? "place" : "places" : d === 1 ? "record" : "records",
|
|
476
503
|
" ",
|
|
477
504
|
"as ",
|
|
478
505
|
s.label.toLowerCase(),
|
|
479
|
-
|
|
506
|
+
d > 500 ? " (500 at a time)" : "",
|
|
480
507
|
"?",
|
|
481
508
|
" ",
|
|
482
509
|
s.kind === "builtin" ? "Places they already hold are not doubled." : "Each change is saved to the record's history."
|
|
483
510
|
] }),
|
|
484
|
-
|
|
485
|
-
/* @__PURE__ */
|
|
511
|
+
l && /* @__PURE__ */ e("p", { className: "text-[11.5px] text-rose-700 dark:text-rose-300", children: l }),
|
|
512
|
+
/* @__PURE__ */ a("div", { className: "flex justify-end gap-1.5", children: [
|
|
486
513
|
/* @__PURE__ */ e(
|
|
487
514
|
"button",
|
|
488
515
|
{
|
|
489
516
|
type: "button",
|
|
490
|
-
onClick: () =>
|
|
517
|
+
onClick: () => E(null),
|
|
491
518
|
className: "h-7 rounded-md px-2 text-[11.5px] text-slate-600 hover:text-slate-900 dark:text-muted-foreground",
|
|
492
519
|
children: "Back"
|
|
493
520
|
}
|
|
@@ -497,113 +524,113 @@ function le({
|
|
|
497
524
|
{
|
|
498
525
|
type: "button",
|
|
499
526
|
onClick: n,
|
|
500
|
-
disabled:
|
|
527
|
+
disabled: w,
|
|
501
528
|
"data-inactive-reassign-confirm": !0,
|
|
502
529
|
className: "h-7 rounded-md bg-nvr-cyan px-2.5 text-[11.5px] font-medium text-white disabled:opacity-60",
|
|
503
|
-
children:
|
|
530
|
+
children: w ? "Moving…" : "Move them"
|
|
504
531
|
}
|
|
505
532
|
)
|
|
506
533
|
] })
|
|
507
|
-
] }) : /* @__PURE__ */
|
|
534
|
+
] }) : /* @__PURE__ */ a(J, { children: [
|
|
508
535
|
/* @__PURE__ */ e(
|
|
509
536
|
"input",
|
|
510
537
|
{
|
|
511
538
|
autoFocus: !0,
|
|
512
|
-
value:
|
|
513
|
-
onChange: (
|
|
539
|
+
value: c,
|
|
540
|
+
onChange: (r) => m(r.target.value),
|
|
514
541
|
placeholder: "Search people",
|
|
515
542
|
className: "h-8 w-full rounded-md border border-slate-200 bg-background px-2 text-[12.5px] text-slate-800 placeholder:text-slate-500 focus:border-slate-400 focus:outline-none dark:border-border dark:text-foreground"
|
|
516
543
|
}
|
|
517
544
|
),
|
|
518
|
-
/* @__PURE__ */
|
|
519
|
-
(
|
|
545
|
+
/* @__PURE__ */ a("ul", { className: "mt-1 max-h-56 overflow-y-auto", children: [
|
|
546
|
+
(N.data ?? []).filter((r) => r.id.toLowerCase() !== o.toLowerCase()).map((r) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ a(
|
|
520
547
|
"button",
|
|
521
548
|
{
|
|
522
549
|
type: "button",
|
|
523
|
-
onClick: () =>
|
|
524
|
-
"data-inactive-candidate":
|
|
550
|
+
onClick: () => E(r),
|
|
551
|
+
"data-inactive-candidate": r.id,
|
|
525
552
|
className: "flex w-full flex-col rounded px-2 py-1 text-left hover:bg-muted",
|
|
526
553
|
children: [
|
|
527
|
-
/* @__PURE__ */ e("span", { className: "text-[12px] text-slate-800 dark:text-foreground", children:
|
|
528
|
-
/* @__PURE__ */ e("span", { className: "text-[10.5px] text-slate-500 dark:text-muted-foreground", children:
|
|
554
|
+
/* @__PURE__ */ e("span", { className: "text-[12px] text-slate-800 dark:text-foreground", children: k(r) }),
|
|
555
|
+
/* @__PURE__ */ e("span", { className: "text-[10.5px] text-slate-500 dark:text-muted-foreground", children: r.email })
|
|
529
556
|
]
|
|
530
557
|
}
|
|
531
|
-
) },
|
|
532
|
-
|
|
558
|
+
) }, r.id)),
|
|
559
|
+
c.trim().length >= 2 && !N.isLoading && !((h = N.data) != null && h.length) && /* @__PURE__ */ e("li", { className: "px-2 py-1 text-[11.5px] text-slate-500 dark:text-muted-foreground", children: "No active person matches." })
|
|
533
560
|
] })
|
|
534
561
|
] })
|
|
535
562
|
}
|
|
536
563
|
)
|
|
537
564
|
] });
|
|
538
565
|
}
|
|
539
|
-
function
|
|
540
|
-
userId:
|
|
566
|
+
function we({
|
|
567
|
+
userId: o,
|
|
541
568
|
source: s,
|
|
542
|
-
entries:
|
|
543
|
-
onChanged:
|
|
569
|
+
entries: d,
|
|
570
|
+
onChanged: $
|
|
544
571
|
}) {
|
|
545
|
-
const
|
|
546
|
-
const
|
|
547
|
-
return
|
|
548
|
-
}),
|
|
572
|
+
const R = B(), p = ee(), { open: i } = te(), [u, v] = x(/* @__PURE__ */ new Set()), [c, m] = x(!1), [g, E] = x(!1), [w, L] = x(null), S = s.key !== "builtin:tasks", j = [...u], l = d.length > 0 && u.size === d.length, y = (n) => v((h) => {
|
|
573
|
+
const r = new Set(h);
|
|
574
|
+
return r.has(n) ? r.delete(n) : r.add(n), r;
|
|
575
|
+
}), N = async () => {
|
|
549
576
|
var n;
|
|
550
|
-
|
|
577
|
+
E(!0);
|
|
551
578
|
try {
|
|
552
|
-
const
|
|
553
|
-
ae(`/inactive-user-links/${
|
|
579
|
+
const h = await R.request(
|
|
580
|
+
ae(`/inactive-user-links/${o}/remove`, { source: s.key, ids: j })
|
|
554
581
|
);
|
|
555
|
-
|
|
556
|
-
`${b(
|
|
557
|
-
),
|
|
558
|
-
} catch (
|
|
559
|
-
|
|
582
|
+
L(
|
|
583
|
+
`${b(h.data.removed)} removed${h.data.failed.length ? ` · ${b(h.data.failed.length)} refused` : ""}`
|
|
584
|
+
), v(/* @__PURE__ */ new Set()), m(!1), $();
|
|
585
|
+
} catch (h) {
|
|
586
|
+
L(((n = h.response) == null ? void 0 : n.error) ?? Q(h, ""));
|
|
560
587
|
} finally {
|
|
561
|
-
|
|
588
|
+
E(!1);
|
|
562
589
|
}
|
|
563
590
|
};
|
|
564
|
-
if (!
|
|
591
|
+
if (!d.length)
|
|
565
592
|
return /* @__PURE__ */ e("p", { className: "text-[11.5px] text-slate-500 dark:text-muted-foreground", children: "Nothing to list." });
|
|
566
|
-
const
|
|
567
|
-
return /* @__PURE__ */
|
|
568
|
-
/* @__PURE__ */
|
|
569
|
-
/* @__PURE__ */
|
|
593
|
+
const k = d.filter((n) => n.sole).length;
|
|
594
|
+
return /* @__PURE__ */ a("div", { "data-inactive-entries": s.key, children: [
|
|
595
|
+
/* @__PURE__ */ a("div", { className: "mb-1 flex min-h-7 flex-wrap items-center gap-2 text-[11.5px] text-slate-600 dark:text-muted-foreground", children: [
|
|
596
|
+
/* @__PURE__ */ a("label", { className: "flex cursor-pointer items-center gap-1.5", children: [
|
|
570
597
|
/* @__PURE__ */ e(
|
|
571
598
|
"input",
|
|
572
599
|
{
|
|
573
600
|
type: "checkbox",
|
|
574
|
-
checked:
|
|
575
|
-
onChange: () =>
|
|
601
|
+
checked: l,
|
|
602
|
+
onChange: () => v(l ? /* @__PURE__ */ new Set() : new Set(d.map((n) => n.id))),
|
|
576
603
|
className: "h-3.5 w-3.5 accent-slate-700",
|
|
577
604
|
"data-inactive-entries-all": !0
|
|
578
605
|
}
|
|
579
606
|
),
|
|
580
607
|
u.size ? `${b(u.size)} picked` : "Pick all"
|
|
581
608
|
] }),
|
|
582
|
-
|
|
583
|
-
b(
|
|
609
|
+
k > 0 && /* @__PURE__ */ a("span", { className: "rounded bg-[#ffe4e6] px-1.5 py-0.5 text-[10.5px] font-medium text-[#9f1239] dark:bg-[#3d1a20] dark:text-[#f4a3ad]", children: [
|
|
610
|
+
b(k),
|
|
584
611
|
" with nobody else who can act"
|
|
585
612
|
] }),
|
|
586
|
-
|
|
587
|
-
u.size > 0 && /* @__PURE__ */
|
|
613
|
+
w && /* @__PURE__ */ e("span", { className: "text-emerald-700 dark:text-emerald-400", children: w }),
|
|
614
|
+
u.size > 0 && /* @__PURE__ */ a("span", { className: "ml-auto flex items-center gap-1.5", children: [
|
|
588
615
|
/* @__PURE__ */ e(
|
|
589
|
-
|
|
616
|
+
oe,
|
|
590
617
|
{
|
|
591
|
-
userId:
|
|
618
|
+
userId: o,
|
|
592
619
|
source: s,
|
|
593
620
|
count: u.size,
|
|
594
621
|
ids: j,
|
|
595
622
|
label: `Hand ${b(u.size)} to…`,
|
|
596
623
|
onDone: () => {
|
|
597
|
-
|
|
624
|
+
v(/* @__PURE__ */ new Set()), $();
|
|
598
625
|
}
|
|
599
626
|
}
|
|
600
627
|
),
|
|
601
|
-
|
|
628
|
+
S && (c ? /* @__PURE__ */ a(J, { children: [
|
|
602
629
|
/* @__PURE__ */ e(
|
|
603
630
|
"button",
|
|
604
631
|
{
|
|
605
632
|
type: "button",
|
|
606
|
-
onClick:
|
|
633
|
+
onClick: N,
|
|
607
634
|
disabled: g,
|
|
608
635
|
"data-inactive-remove-confirm": !0,
|
|
609
636
|
className: "h-[22px] rounded-md bg-[#be123c] px-2 text-[11px] font-medium text-white disabled:opacity-60",
|
|
@@ -631,9 +658,9 @@ function Ne({
|
|
|
631
658
|
))
|
|
632
659
|
] })
|
|
633
660
|
] }),
|
|
634
|
-
/* @__PURE__ */ e("ul", { className: "divide-y divide-slate-100 rounded-md border border-slate-200 bg-white dark:divide-border dark:border-border dark:bg-card", children:
|
|
635
|
-
const
|
|
636
|
-
return /* @__PURE__ */
|
|
661
|
+
/* @__PURE__ */ e("ul", { className: "divide-y divide-slate-100 rounded-md border border-slate-200 bg-white dark:divide-border dark:border-border dark:bg-card", children: d.map((n) => {
|
|
662
|
+
const h = n.console_path ? p.consoleUrl ? p.consoleUrl(n.console_path) : n.console_path : null;
|
|
663
|
+
return /* @__PURE__ */ a(
|
|
637
664
|
"li",
|
|
638
665
|
{
|
|
639
666
|
className: "flex items-start gap-2 px-2.5 py-1.5",
|
|
@@ -644,26 +671,26 @@ function Ne({
|
|
|
644
671
|
{
|
|
645
672
|
type: "checkbox",
|
|
646
673
|
checked: u.has(n.id),
|
|
647
|
-
onChange: () =>
|
|
674
|
+
onChange: () => y(n.id),
|
|
648
675
|
"aria-label": `Pick ${n.title}`,
|
|
649
676
|
className: "mt-0.5 h-3.5 w-3.5 shrink-0 accent-slate-700"
|
|
650
677
|
}
|
|
651
678
|
),
|
|
652
|
-
/* @__PURE__ */
|
|
653
|
-
/* @__PURE__ */
|
|
679
|
+
/* @__PURE__ */ a("div", { className: "min-w-0 flex-1", children: [
|
|
680
|
+
/* @__PURE__ */ a("div", { className: "flex flex-wrap items-baseline gap-x-2", children: [
|
|
654
681
|
n.record ? /* @__PURE__ */ e(
|
|
655
682
|
"button",
|
|
656
683
|
{
|
|
657
684
|
type: "button",
|
|
658
|
-
onClick: () => n.record &&
|
|
685
|
+
onClick: () => n.record && i({ collection: n.record.collection, itemId: n.record.id }),
|
|
659
686
|
className: "text-left text-[12px] font-medium text-slate-900 underline decoration-dotted underline-offset-2 dark:text-foreground",
|
|
660
687
|
children: n.title
|
|
661
688
|
}
|
|
662
|
-
) :
|
|
689
|
+
) : h ? /* @__PURE__ */ e(
|
|
663
690
|
"button",
|
|
664
691
|
{
|
|
665
692
|
type: "button",
|
|
666
|
-
onClick: () => /^https?:/.test(
|
|
693
|
+
onClick: () => /^https?:/.test(h) ? window.open(h, "_blank") : p.navigate(h),
|
|
667
694
|
className: "text-left text-[12px] font-medium text-slate-900 underline decoration-dotted underline-offset-2 dark:text-foreground",
|
|
668
695
|
children: n.title
|
|
669
696
|
}
|
|
@@ -674,7 +701,7 @@ function Ne({
|
|
|
674
701
|
(s.key === "builtin:owner_seats" || s.key === "builtin:teams") && /* @__PURE__ */ e(
|
|
675
702
|
"p",
|
|
676
703
|
{
|
|
677
|
-
className:
|
|
704
|
+
className: F(
|
|
678
705
|
"text-[11px]",
|
|
679
706
|
n.sole ? "font-medium text-[#9f1239] dark:text-[#f4a3ad]" : "text-slate-500 dark:text-muted-foreground"
|
|
680
707
|
),
|
|
@@ -690,6 +717,6 @@ function Ne({
|
|
|
690
717
|
] });
|
|
691
718
|
}
|
|
692
719
|
export {
|
|
693
|
-
|
|
720
|
+
Fe as InactiveUserLinksView,
|
|
694
721
|
X as reasonGroup
|
|
695
722
|
};
|