@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,26 +1,30 @@
|
|
|
1
1
|
import { jsx as a, jsxs as r, Fragment as y } from "react/jsx-runtime";
|
|
2
|
-
import { useQueryClient as
|
|
3
|
-
import { Loader2 as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { useNivaroClient as
|
|
6
|
-
import { get as T, post as C, patch as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
|
|
2
|
+
import { useQueryClient as G, useQuery as q, useMutation as f } from "@tanstack/react-query";
|
|
3
|
+
import { Loader2 as M, PlayCircle as J, Paperclip as V } from "lucide-react";
|
|
4
|
+
import { useState as b } from "react";
|
|
5
|
+
import { useNivaroClient as X, useApiFetchConfig as Y, useItemNavigation as Z, useNavigation as I } from "../../context.js";
|
|
6
|
+
import { get as T, post as C, patch as ee } from "../../lib/commands.js";
|
|
7
|
+
import { useLiveFade as te } from "../../lib/live-screen.js";
|
|
8
|
+
import { useBackgroundArm as ae } from "../../lib/live-views.js";
|
|
9
|
+
import { useTopicPresence as re, signalSentence as $ } from "../../lib/presence-signals.js";
|
|
10
|
+
import { replayHref as se } from "../../lib/replay-capture.js";
|
|
11
|
+
import { foldShareHistory as ne, historyLine as le } from "../../lib/screen-share.js";
|
|
12
|
+
import { TaskDoButton as ie } from "../ai/TaskDo.js";
|
|
13
|
+
import { RelationCombobox as oe } from "../item-edit/RelationCombobox.js";
|
|
14
|
+
import { SimpleSelect as R } from "../ui/SimpleSelect.js";
|
|
15
|
+
import { Sheet as de, SheetContent as ce, SheetTitle as F, SheetDescription as K, SheetHeader as me } from "../ui/sheet.js";
|
|
16
|
+
import { ScreenSharePanel as pe } from "./ScreenShare.js";
|
|
17
|
+
import { isSupportContextFile as k } from "./support-context.js";
|
|
18
|
+
import { TicketSlowScreens as ue } from "./TicketSlowScreens.js";
|
|
19
|
+
import { TicketTraffic as xe } from "./TicketTraffic.js";
|
|
20
|
+
import { STATUS_TONE as A } from "./types.js";
|
|
21
|
+
const P = [
|
|
18
22
|
{ value: "open", label: "Open" },
|
|
19
23
|
{ value: "in_progress", label: "In progress" },
|
|
20
24
|
{ value: "done", label: "Done" },
|
|
21
25
|
{ value: "cancelled", label: "Cancelled" }
|
|
22
26
|
];
|
|
23
|
-
function
|
|
27
|
+
function v(s) {
|
|
24
28
|
return s ? new Date(s).toLocaleString(void 0, {
|
|
25
29
|
month: "short",
|
|
26
30
|
day: "numeric",
|
|
@@ -28,28 +32,29 @@ function k(s) {
|
|
|
28
32
|
minute: "2-digit"
|
|
29
33
|
}) : "";
|
|
30
34
|
}
|
|
31
|
-
function
|
|
35
|
+
function he({ status: s, label: c }) {
|
|
32
36
|
var l;
|
|
33
37
|
return /* @__PURE__ */ a(
|
|
34
38
|
"span",
|
|
35
39
|
{
|
|
36
40
|
"data-ticket-status": s,
|
|
37
|
-
className: `inline-flex shrink-0 items-center rounded-full px-2 py-0.5 text-[11px] font-medium ${
|
|
38
|
-
children:
|
|
41
|
+
className: `inline-flex shrink-0 items-center rounded-full px-2 py-0.5 text-[11px] font-medium ${A[s] ?? A.open}`,
|
|
42
|
+
children: c ?? ((l = P.find((i) => i.value === s)) == null ? void 0 : l.label) ?? s
|
|
39
43
|
}
|
|
40
44
|
);
|
|
41
45
|
}
|
|
42
|
-
function
|
|
46
|
+
function Le({
|
|
43
47
|
ticketId: s,
|
|
44
|
-
onOpenChange:
|
|
48
|
+
onOpenChange: c
|
|
45
49
|
}) {
|
|
46
|
-
const l =
|
|
50
|
+
const l = X(), i = G(), { apiBase: D } = Y(), { urlFor: L, open: Q } = Z(), m = I(), [p, N] = b(""), [w, U] = b(null), [j, E] = b(!1), o = re(
|
|
47
51
|
s != null && Number.isSafeInteger(s) && s > 0 ? `ticket:${s}` : null
|
|
48
52
|
), u = s != null && Number.isSafeInteger(s) && s > 0, {
|
|
49
53
|
data: e,
|
|
50
|
-
isLoading:
|
|
51
|
-
isError:
|
|
52
|
-
|
|
54
|
+
isLoading: H,
|
|
55
|
+
isError: O,
|
|
56
|
+
dataUpdatedAt: W
|
|
57
|
+
} = q({
|
|
53
58
|
queryKey: ["support-ticket", s],
|
|
54
59
|
queryFn: () => l.request(T(`/support/tickets/${s}`)).then((t) => t.data),
|
|
55
60
|
enabled: u,
|
|
@@ -57,7 +62,7 @@ function we({
|
|
|
57
62
|
const g = n == null ? void 0 : n.status;
|
|
58
63
|
return g !== 404 && g !== 403 && g !== 400 && t < 2;
|
|
59
64
|
}
|
|
60
|
-
}), { data:
|
|
65
|
+
}), B = te(ae(W, String(s))), { data: z = [] } = q({
|
|
61
66
|
queryKey: ["support-categories", "all-for", (e == null ? void 0 : e.collection) ?? null],
|
|
62
67
|
queryFn: () => l.request(
|
|
63
68
|
T("/support/categories", e != null && e.collection ? { collection: e.collection } : void 0)
|
|
@@ -65,53 +70,54 @@ function we({
|
|
|
65
70
|
enabled: !!(e != null && e.can.work)
|
|
66
71
|
}), x = () => {
|
|
67
72
|
i.invalidateQueries({ queryKey: ["support-ticket", s] }), i.invalidateQueries({ queryKey: ["support-tickets"] }), i.invalidateQueries({ queryKey: ["support-summary"] }), i.invalidateQueries({ queryKey: ["my-work"] });
|
|
68
|
-
}, h = (t) => U(t.message || "That did not work"),
|
|
73
|
+
}, h = (t) => U(t.message || "That did not work"), S = f({
|
|
69
74
|
mutationFn: () => l.request(C(`/support/tickets/${s}/claim`)),
|
|
70
75
|
onSuccess: x,
|
|
71
76
|
onError: h
|
|
72
|
-
}),
|
|
73
|
-
mutationFn: (t) => l.request(
|
|
77
|
+
}), d = f({
|
|
78
|
+
mutationFn: (t) => l.request(ee(`/support/tickets/${s}`, t)),
|
|
74
79
|
onSuccess: x,
|
|
75
80
|
onError: h
|
|
76
|
-
}),
|
|
77
|
-
mutationFn: () => l.request(C(`/support/tickets/${s}/comments`, { text:
|
|
81
|
+
}), _ = f({
|
|
82
|
+
mutationFn: () => l.request(C(`/support/tickets/${s}/comments`, { text: p.trim() })),
|
|
78
83
|
onSuccess: () => {
|
|
79
|
-
|
|
84
|
+
N(""), o.signalReplying(!1), x();
|
|
80
85
|
},
|
|
81
86
|
onError: h
|
|
82
87
|
});
|
|
83
|
-
return /* @__PURE__ */ a(
|
|
84
|
-
|
|
88
|
+
return /* @__PURE__ */ a(de, { open: s != null, onOpenChange: c, children: /* @__PURE__ */ a(
|
|
89
|
+
ce,
|
|
85
90
|
{
|
|
86
91
|
side: "right",
|
|
87
|
-
|
|
92
|
+
ref: B,
|
|
93
|
+
className: `flex max-w-[96vw] flex-col gap-0 p-0 transition-[width] duration-300 ease-out dark:bg-card ${j ? "w-[min(1280px,96vw)] sm:max-w-[min(1280px,96vw)]" : "w-[560px] sm:max-w-[560px]"}`,
|
|
88
94
|
"data-support-ticket": s ?? "",
|
|
89
|
-
children: !u ||
|
|
90
|
-
/* @__PURE__ */ a(
|
|
91
|
-
/* @__PURE__ */ a(
|
|
92
|
-
] }) :
|
|
93
|
-
/* @__PURE__ */ r(
|
|
95
|
+
children: !u || O ? /* @__PURE__ */ r("div", { className: "flex flex-1 flex-col items-center justify-center gap-1 px-6 text-center", children: [
|
|
96
|
+
/* @__PURE__ */ a(F, { className: "text-[14px] font-semibold text-slate-800 dark:text-slate-100", children: "Request not found" }),
|
|
97
|
+
/* @__PURE__ */ a(K, { className: "text-[12.5px] text-slate-500 dark:text-muted-foreground", children: u ? `Request #${s} does not exist, or it is not one you can open.` : "This link does not point to a request." })
|
|
98
|
+
] }) : H || !e ? /* @__PURE__ */ a("div", { className: "flex flex-1 items-center justify-center text-slate-400", children: /* @__PURE__ */ a(M, { className: "h-5 w-5 animate-spin" }) }) : /* @__PURE__ */ r(y, { children: [
|
|
99
|
+
/* @__PURE__ */ r(me, { className: "space-y-1.5 border-b border-slate-200 px-5 py-4 text-left dark:border-border", children: [
|
|
94
100
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-2 pr-6", children: [
|
|
95
101
|
/* @__PURE__ */ r("span", { className: "font-mono text-[11.5px] text-slate-400", children: [
|
|
96
102
|
"#",
|
|
97
103
|
e.id
|
|
98
104
|
] }),
|
|
99
|
-
/* @__PURE__ */ a(
|
|
105
|
+
/* @__PURE__ */ a(he, { status: e.status, label: e.status_label }),
|
|
100
106
|
e.priority === "urgent" && /* @__PURE__ */ a("span", { className: "rounded bg-red-500/10 px-1.5 py-px text-[10px] font-semibold uppercase tracking-wide text-red-600 dark:text-red-400", children: "urgent" })
|
|
101
107
|
] }),
|
|
102
|
-
/* @__PURE__ */ a(
|
|
103
|
-
/* @__PURE__ */ r(
|
|
108
|
+
/* @__PURE__ */ a(F, { className: "text-left text-[16px] font-semibold leading-snug text-slate-900 dark:text-slate-100", children: e.title }),
|
|
109
|
+
/* @__PURE__ */ r(K, { className: "text-left text-[12px] text-slate-500 dark:text-muted-foreground", children: [
|
|
104
110
|
e.requester_name ?? "Someone",
|
|
105
111
|
" · ",
|
|
106
|
-
|
|
112
|
+
v(e.created_at),
|
|
107
113
|
e.category_name ? ` · ${e.category_name}` : ""
|
|
108
114
|
] }),
|
|
109
115
|
/* @__PURE__ */ a("div", { className: "text-left text-[12px]", children: e.collection && e.item ? /* @__PURE__ */ a(
|
|
110
116
|
"a",
|
|
111
117
|
{
|
|
112
|
-
href:
|
|
118
|
+
href: L({ collection: e.collection, itemId: e.item }),
|
|
113
119
|
onClick: (t) => {
|
|
114
|
-
t.metaKey || t.ctrlKey || t.shiftKey || t.button !== 0 || (t.preventDefault(),
|
|
120
|
+
t.metaKey || t.ctrlKey || t.shiftKey || t.button !== 0 || (t.preventDefault(), Q({ collection: e.collection, itemId: e.item }));
|
|
115
121
|
},
|
|
116
122
|
"data-ticket-record": !0,
|
|
117
123
|
className: "inline-flex items-center gap-1 rounded-md bg-slate-100 px-2 py-0.5 font-medium text-[#00789a] hover:bg-slate-200/70 dark:bg-white/[0.06] dark:text-nvr-cyan dark:hover:bg-white/10",
|
|
@@ -133,7 +139,7 @@ function we({
|
|
|
133
139
|
}
|
|
134
140
|
)
|
|
135
141
|
] }),
|
|
136
|
-
/* @__PURE__ */ r("div", { className: "flex-1 space-y-6 overflow-y-auto px-5 py-5", children: [
|
|
142
|
+
/* @__PURE__ */ r("div", { "data-sheet-body": !0, className: "flex-1 space-y-6 overflow-y-auto px-5 py-5", children: [
|
|
137
143
|
e.can.work && /* @__PURE__ */ r(
|
|
138
144
|
"div",
|
|
139
145
|
{
|
|
@@ -149,7 +155,7 @@ function we({
|
|
|
149
155
|
e.team_name ? ` · ${e.team_name}` : " · Administrators"
|
|
150
156
|
] }) }),
|
|
151
157
|
/* @__PURE__ */ a(
|
|
152
|
-
|
|
158
|
+
ie,
|
|
153
159
|
{
|
|
154
160
|
task: {
|
|
155
161
|
id: e.id,
|
|
@@ -167,8 +173,8 @@ function we({
|
|
|
167
173
|
{
|
|
168
174
|
type: "button",
|
|
169
175
|
"data-ticket-claim": !0,
|
|
170
|
-
disabled:
|
|
171
|
-
onClick: () =>
|
|
176
|
+
disabled: S.isPending,
|
|
177
|
+
onClick: () => S.mutate(),
|
|
172
178
|
className: "h-7 rounded-md border border-nvr-cyan/60 bg-nvr-cyan/10 px-2.5 text-[12px] font-medium text-nvr-navy hover:bg-nvr-cyan/15 disabled:opacity-50 dark:text-nvr-cyan",
|
|
173
179
|
children: e.assignee ? "Take it over" : "Pick it up"
|
|
174
180
|
}
|
|
@@ -177,11 +183,11 @@ function we({
|
|
|
177
183
|
/* @__PURE__ */ r("div", { className: "block text-[11.5px] font-medium text-slate-500 dark:text-slate-400", children: [
|
|
178
184
|
"Status",
|
|
179
185
|
/* @__PURE__ */ a(
|
|
180
|
-
|
|
186
|
+
R,
|
|
181
187
|
{
|
|
182
188
|
value: e.status,
|
|
183
|
-
onChange: (t) =>
|
|
184
|
-
options:
|
|
189
|
+
onChange: (t) => d.mutate({ status: t }),
|
|
190
|
+
options: P,
|
|
185
191
|
ariaLabel: "Status",
|
|
186
192
|
className: "mt-1"
|
|
187
193
|
}
|
|
@@ -190,13 +196,13 @@ function we({
|
|
|
190
196
|
/* @__PURE__ */ r("div", { className: "block text-[11.5px] font-medium text-slate-500 dark:text-slate-400", children: [
|
|
191
197
|
"Type",
|
|
192
198
|
/* @__PURE__ */ a(
|
|
193
|
-
|
|
199
|
+
R,
|
|
194
200
|
{
|
|
195
201
|
value: e.category_id != null ? String(e.category_id) : "",
|
|
196
|
-
onChange: (t) =>
|
|
202
|
+
onChange: (t) => d.mutate({ category_id: t ? Number(t) : null }),
|
|
197
203
|
options: [
|
|
198
204
|
{ value: "", label: "No type" },
|
|
199
|
-
...
|
|
205
|
+
...z.map((t) => ({ value: String(t.id), label: t.name }))
|
|
200
206
|
],
|
|
201
207
|
ariaLabel: "Type",
|
|
202
208
|
className: "mt-1"
|
|
@@ -206,11 +212,11 @@ function we({
|
|
|
206
212
|
/* @__PURE__ */ r("div", { className: "col-span-2 text-[11.5px] font-medium text-slate-500 dark:text-slate-400", children: [
|
|
207
213
|
"Assignee",
|
|
208
214
|
/* @__PURE__ */ a("div", { className: "mt-1", children: /* @__PURE__ */ a(
|
|
209
|
-
|
|
215
|
+
oe,
|
|
210
216
|
{
|
|
211
217
|
collection: "nivaro_users",
|
|
212
218
|
value: e.assignee,
|
|
213
|
-
onChange: (t) =>
|
|
219
|
+
onChange: (t) => d.mutate({ assignee: t ? String(t) : null }),
|
|
214
220
|
placeholder: "Nobody yet"
|
|
215
221
|
}
|
|
216
222
|
) })
|
|
@@ -218,11 +224,12 @@ function we({
|
|
|
218
224
|
]
|
|
219
225
|
}
|
|
220
226
|
),
|
|
227
|
+
(e.status === "open" || e.status === "in_progress") && /* @__PURE__ */ a(pe, { ticketId: e.id, onWideChange: E }),
|
|
221
228
|
/* @__PURE__ */ r("section", { children: [
|
|
222
229
|
/* @__PURE__ */ a("h3", { className: "mb-2 text-[12.5px] font-semibold text-slate-800 dark:text-slate-100", children: "Request" }),
|
|
223
230
|
/* @__PURE__ */ a("p", { className: "whitespace-pre-wrap text-[13px] leading-relaxed text-slate-800 dark:text-slate-200", children: e.description || /* @__PURE__ */ a("span", { className: "text-slate-400", children: "No details given." }) }),
|
|
224
231
|
e.replay && e.can.work && (() => {
|
|
225
|
-
const t =
|
|
232
|
+
const t = se(e.replay), n = m.consoleUrl ? m.consoleUrl(t) : t;
|
|
226
233
|
return n ? /* @__PURE__ */ r(
|
|
227
234
|
"a",
|
|
228
235
|
{
|
|
@@ -232,14 +239,14 @@ function we({
|
|
|
232
239
|
"data-ticket-replay": e.replay.recording_id,
|
|
233
240
|
className: "mt-2 inline-flex items-center gap-1.5 rounded-md border border-nvr-cyan/50 bg-nvr-cyan/10 px-2 py-1 text-[12px] font-medium text-nvr-navy hover:bg-nvr-cyan/15 dark:text-nvr-cyan",
|
|
234
241
|
children: [
|
|
235
|
-
/* @__PURE__ */ a(
|
|
242
|
+
/* @__PURE__ */ a(J, { className: "h-3.5 w-3.5" }),
|
|
236
243
|
"Replay their screen"
|
|
237
244
|
]
|
|
238
245
|
}
|
|
239
246
|
) : null;
|
|
240
247
|
})(),
|
|
241
248
|
e.issue_id != null && e.can.work && (() => {
|
|
242
|
-
const t = `/issues/${e.issue_id}`, n =
|
|
249
|
+
const t = `/issues/${e.issue_id}`, n = m.consoleUrl ? m.consoleUrl(t) : t;
|
|
243
250
|
return n ? /* @__PURE__ */ r(
|
|
244
251
|
"a",
|
|
245
252
|
{
|
|
@@ -256,26 +263,26 @@ function we({
|
|
|
256
263
|
) : null;
|
|
257
264
|
})(),
|
|
258
265
|
(() => {
|
|
259
|
-
const t = e.files.filter((n) => e.can.work || !
|
|
266
|
+
const t = e.files.filter((n) => e.can.work || !k(n));
|
|
260
267
|
return t.length === 0 ? null : /* @__PURE__ */ a("ul", { className: "mt-2 flex flex-wrap gap-1.5", children: t.map((n) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ r(
|
|
261
268
|
"a",
|
|
262
269
|
{
|
|
263
|
-
href: `${
|
|
270
|
+
href: `${D}/files/${n.id}`,
|
|
264
271
|
target: "_blank",
|
|
265
272
|
rel: "noreferrer",
|
|
266
|
-
"data-tip":
|
|
273
|
+
"data-tip": k(n) ? "The page they were on, browser errors and their last 20 requests when they asked" : void 0,
|
|
267
274
|
className: "inline-flex items-center gap-1 rounded bg-slate-100 px-2 py-0.5 text-[11.5px] text-slate-700 hover:underline dark:bg-white/10 dark:text-slate-200",
|
|
268
275
|
children: [
|
|
269
|
-
/* @__PURE__ */ a(
|
|
270
|
-
|
|
276
|
+
/* @__PURE__ */ a(V, { className: "h-3 w-3" }),
|
|
277
|
+
k(n) ? "Technical details" : n.title || n.filename_download || "File"
|
|
271
278
|
]
|
|
272
279
|
}
|
|
273
280
|
) }, n.id)) });
|
|
274
281
|
})()
|
|
275
282
|
] }),
|
|
276
|
-
e.can.work && /* @__PURE__ */ a(
|
|
283
|
+
e.can.work && /* @__PURE__ */ a(xe, { ticketId: e.id }),
|
|
277
284
|
/* @__PURE__ */ a(
|
|
278
|
-
|
|
285
|
+
ue,
|
|
279
286
|
{
|
|
280
287
|
userId: e.created_by,
|
|
281
288
|
name: e.requester_name,
|
|
@@ -291,7 +298,7 @@ function we({
|
|
|
291
298
|
children: [
|
|
292
299
|
/* @__PURE__ */ r("div", { className: "mb-0.5 flex items-baseline justify-between gap-2 text-[11.5px]", children: [
|
|
293
300
|
/* @__PURE__ */ a("b", { className: "font-medium text-slate-800 dark:text-slate-100", children: t.user_name ?? "Someone" }),
|
|
294
|
-
/* @__PURE__ */ a("span", { className: "text-slate-400", children:
|
|
301
|
+
/* @__PURE__ */ a("span", { className: "text-slate-400", children: v(t.created_at) })
|
|
295
302
|
] }),
|
|
296
303
|
/* @__PURE__ */ a("p", { className: "whitespace-pre-wrap text-[12.5px] text-slate-700 dark:text-slate-200", children: t.text })
|
|
297
304
|
]
|
|
@@ -303,16 +310,16 @@ function we({
|
|
|
303
310
|
{
|
|
304
311
|
className: "mt-3",
|
|
305
312
|
onSubmit: (t) => {
|
|
306
|
-
t.preventDefault(),
|
|
313
|
+
t.preventDefault(), p.trim() && _.mutate();
|
|
307
314
|
},
|
|
308
315
|
children: [
|
|
309
316
|
/* @__PURE__ */ a(
|
|
310
317
|
"textarea",
|
|
311
318
|
{
|
|
312
319
|
"data-ticket-reply": !0,
|
|
313
|
-
value:
|
|
320
|
+
value: p,
|
|
314
321
|
onChange: (t) => {
|
|
315
|
-
|
|
322
|
+
N(t.target.value), o.signalReplying(!!t.target.value.trim());
|
|
316
323
|
},
|
|
317
324
|
rows: 3,
|
|
318
325
|
placeholder: "Write a reply",
|
|
@@ -337,7 +344,7 @@ function we({
|
|
|
337
344
|
{
|
|
338
345
|
type: "button",
|
|
339
346
|
"data-ticket-cancel": !0,
|
|
340
|
-
onClick: () =>
|
|
347
|
+
onClick: () => d.mutate({ status: "cancelled" }),
|
|
341
348
|
className: "h-7 rounded-md px-2.5 text-[12px] text-slate-500 hover:text-slate-800 dark:hover:text-slate-100",
|
|
342
349
|
children: "Withdraw request"
|
|
343
350
|
}
|
|
@@ -347,7 +354,7 @@ function we({
|
|
|
347
354
|
{
|
|
348
355
|
type: "button",
|
|
349
356
|
"data-ticket-reopen": !0,
|
|
350
|
-
onClick: () =>
|
|
357
|
+
onClick: () => d.mutate({ status: "open" }),
|
|
351
358
|
className: "h-7 rounded-md px-2.5 text-[12px] text-slate-500 hover:text-slate-800 dark:hover:text-slate-100",
|
|
352
359
|
children: "Reopen"
|
|
353
360
|
}
|
|
@@ -357,7 +364,7 @@ function we({
|
|
|
357
364
|
{
|
|
358
365
|
type: "submit",
|
|
359
366
|
"data-ticket-send": !0,
|
|
360
|
-
disabled: !
|
|
367
|
+
disabled: !p.trim() || _.isPending,
|
|
361
368
|
className: "h-8 rounded-md bg-nvr-cyan px-3.5 text-[12.5px] font-medium text-white transition-opacity hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-40",
|
|
362
369
|
children: "Reply"
|
|
363
370
|
}
|
|
@@ -366,20 +373,25 @@ function we({
|
|
|
366
373
|
]
|
|
367
374
|
}
|
|
368
375
|
),
|
|
369
|
-
|
|
376
|
+
w && /* @__PURE__ */ a("p", { className: "mt-1 text-[12px] text-red-600 dark:text-red-400", role: "alert", children: w })
|
|
370
377
|
] }),
|
|
371
378
|
/* @__PURE__ */ r("section", { "data-ticket-history": !0, children: [
|
|
372
379
|
/* @__PURE__ */ a("h3", { className: "mb-2 text-[12.5px] font-semibold text-slate-800 dark:text-slate-100", children: "History" }),
|
|
373
|
-
/* @__PURE__ */ a("
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
"
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
380
|
+
e.history.length === 0 ? /* @__PURE__ */ a("p", { className: "text-[12.5px] text-slate-500 dark:text-slate-400", children: "No history yet." }) : /* @__PURE__ */ a("ol", { className: "space-y-2 border-l border-slate-200 pl-3.5 dark:border-border", children: ne(e.history).map((t) => {
|
|
381
|
+
const n = le(t, {
|
|
382
|
+
isRequester: !e.can.work,
|
|
383
|
+
requesterName: e.requester_name
|
|
384
|
+
});
|
|
385
|
+
return /* @__PURE__ */ r("li", { className: "text-[12px] text-slate-600 dark:text-slate-300", children: [
|
|
386
|
+
/* @__PURE__ */ a("span", { className: "text-slate-800 dark:text-slate-100", children: n.text }),
|
|
387
|
+
/* @__PURE__ */ r("span", { className: "text-slate-500 dark:text-slate-400", children: [
|
|
388
|
+
" ",
|
|
389
|
+
"· ",
|
|
390
|
+
n.showAuthor ? `${t.user_name ?? "System"} · ` : "",
|
|
391
|
+
v(t.at)
|
|
392
|
+
] })
|
|
393
|
+
] }, t.id);
|
|
394
|
+
}) })
|
|
383
395
|
] })
|
|
384
396
|
] })
|
|
385
397
|
] })
|
|
@@ -387,6 +399,6 @@ function we({
|
|
|
387
399
|
) });
|
|
388
400
|
}
|
|
389
401
|
export {
|
|
390
|
-
|
|
391
|
-
|
|
402
|
+
he as StatusPill,
|
|
403
|
+
Le as TicketDetailSheet
|
|
392
404
|
};
|