@nivaro/react 0.3.114 → 0.3.115

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (281) hide show
  1. package/dist/components/ScreenShareHost.js +24 -0
  2. package/dist/full.css +50 -2
  3. package/dist/hooks/useSessionRecorder.js +61 -60
  4. package/dist/index.d.ts +1717 -21
  5. package/dist/index.js +1091 -950
  6. package/dist/shared/components/ActivityEntry.js +209 -97
  7. package/dist/shared/components/AgentPresenceChip.js +51 -0
  8. package/dist/shared/components/AnnouncementBanner.js +56 -41
  9. package/dist/shared/components/AutolinkedText.js +98 -85
  10. package/dist/shared/components/BroadcastView.js +149 -141
  11. package/dist/shared/components/CacheStamp.js +78 -30
  12. package/dist/shared/components/CollectionBrowserView.js +4088 -3592
  13. package/dist/shared/components/ConfigChangeStrip.js +63 -0
  14. package/dist/shared/components/ConfigReachNote.js +107 -0
  15. package/dist/shared/components/ConformanceView.js +389 -319
  16. package/dist/shared/components/DataTable.js +1 -0
  17. package/dist/shared/components/DelegateCoverLine.js +164 -0
  18. package/dist/shared/components/EnvironmentNotice.js +56 -65
  19. package/dist/shared/components/FilePreviewLightbox.js +89 -43
  20. package/dist/shared/components/FindingFixedMark.js +23 -0
  21. package/dist/shared/components/GridPresenceLine.js +100 -0
  22. package/dist/shared/components/IdleReloadWatcher.js +82 -43
  23. package/dist/shared/components/InStep.js +46 -0
  24. package/dist/shared/components/ItemEditForm.js +5504 -4889
  25. package/dist/shared/components/LiveAnnouncer.js +62 -0
  26. package/dist/shared/components/LiveCount.js +54 -0
  27. package/dist/shared/components/LiveFigure.js +28 -0
  28. package/dist/shared/components/LiveListControls.js +114 -0
  29. package/dist/shared/components/LiveNewMatchesPill.js +25 -0
  30. package/dist/shared/components/LiveOffNote.js +44 -0
  31. package/dist/shared/components/LivePreferenceHost.js +42 -0
  32. package/dist/shared/components/LiveRowMark.js +25 -20
  33. package/dist/shared/components/LiveTraceView.js +257 -0
  34. package/dist/shared/components/MapView.js +30 -29
  35. package/dist/shared/components/MatrixEditor.js +497 -462
  36. package/dist/shared/components/MyWorkView.js +346 -272
  37. package/dist/shared/components/NotificationBell.js +215 -201
  38. package/dist/shared/components/PageRenderer.js +636 -599
  39. package/dist/shared/components/PresenceDot.js +21 -0
  40. package/dist/shared/components/ProfileView.js +656 -536
  41. package/dist/shared/components/RealtimeStatusBanner.js +25 -25
  42. package/dist/shared/components/RecentRecordsRail.js +51 -48
  43. package/dist/shared/components/RecordCompare.js +241 -150
  44. package/dist/shared/components/RecordDrilldownSheet.js +66 -64
  45. package/dist/shared/components/RecordGridEditor.js +350 -311
  46. package/dist/shared/components/RecordHoverCard.js +147 -0
  47. package/dist/shared/components/RecordPeekHost.js +111 -0
  48. package/dist/shared/components/RecordReadView.js +414 -412
  49. package/dist/shared/components/RelativeTime.js +16 -0
  50. package/dist/shared/components/ReportView.js +1396 -1304
  51. package/dist/shared/components/ScreenRefreshButton.js +77 -0
  52. package/dist/shared/components/TabCountHost.js +10 -0
  53. package/dist/shared/components/TickerNumber.js +19 -18
  54. package/dist/shared/components/TipLayer.js +70 -58
  55. package/dist/shared/components/WidgetImageMenu.js +59 -0
  56. package/dist/shared/components/WidgetSlot.js +571 -524
  57. package/dist/shared/components/activity/RecordActivityStream.js +317 -0
  58. package/dist/shared/components/bulk/BulkSelectionNotices.js +220 -0
  59. package/dist/shared/components/cbv/approval-changed.js +20 -0
  60. package/dist/shared/components/cbv/changed-by-others.js +251 -0
  61. package/dist/shared/components/change-proposals/ChangeProposalsPanel.js +320 -0
  62. package/dist/shared/components/change-proposals/ProposalValue.js +28 -0
  63. package/dist/shared/components/change-proposals/ProposeChangeButton.js +44 -0
  64. package/dist/shared/components/change-proposals/ProposeChangeDialog.js +359 -0
  65. package/dist/shared/components/change-proposals/types.js +4 -0
  66. package/dist/shared/components/chat/ChatPanel.js +1571 -1528
  67. package/dist/shared/components/chat/Composer.js +276 -298
  68. package/dist/shared/components/chat/room-due.js +13 -0
  69. package/dist/shared/components/collections-directory/CollectionRow.js +76 -75
  70. package/dist/shared/components/collections-directory/CollectionsDirectory.js +415 -395
  71. package/dist/shared/components/collections-directory/directory-data.js +75 -63
  72. package/dist/shared/components/imports/ImportConsole.js +159 -155
  73. package/dist/shared/components/imports/ImportDuplicatesNotice.js +46 -31
  74. package/dist/shared/components/integrations/SendStatus.js +202 -0
  75. package/dist/shared/components/integrations/console/IntegrationsConsole.js +45 -36
  76. package/dist/shared/components/integrations/console/ReadyToSendView.js +453 -0
  77. package/dist/shared/components/integrations/console/api.js +161 -117
  78. package/dist/shared/components/integrations/console/tone.js +15 -12
  79. package/dist/shared/components/item-edit/CatalogPickerField.js +1353 -1245
  80. package/dist/shared/components/item-edit/ChangedAfterApprovalBadge.js +162 -0
  81. package/dist/shared/components/item-edit/CloneDialog.js +208 -206
  82. package/dist/shared/components/item-edit/DerivedCauseNote.js +57 -0
  83. package/dist/shared/components/item-edit/DraftRecoveryBanner.js +81 -70
  84. package/dist/shared/components/item-edit/DuplicateNotice.js +169 -101
  85. package/dist/shared/components/item-edit/FieldAffordances.js +294 -385
  86. package/dist/shared/components/item-edit/FieldComments.js +159 -116
  87. package/dist/shared/components/item-edit/FieldPointer.js +132 -0
  88. package/dist/shared/components/item-edit/FieldRenderer.js +277 -273
  89. package/dist/shared/components/item-edit/FieldRow.js +519 -439
  90. package/dist/shared/components/item-edit/FieldSourceBadge.js +88 -0
  91. package/dist/shared/components/item-edit/FilePickerField.js +454 -369
  92. package/dist/shared/components/item-edit/GroupSection.js +618 -567
  93. package/dist/shared/components/item-edit/HeldEditsChip.js +113 -0
  94. package/dist/shared/components/item-edit/InlineTableField.js +2891 -2723
  95. package/dist/shared/components/item-edit/ListNeighborNav.js +79 -0
  96. package/dist/shared/components/item-edit/LiveTraceSheet.js +26 -0
  97. package/dist/shared/components/item-edit/M2MCombobox.js +284 -273
  98. package/dist/shared/components/item-edit/OutboxReviewTray.js +313 -0
  99. package/dist/shared/components/item-edit/PickerBadges.js +52 -0
  100. package/dist/shared/components/item-edit/PlanGrid.js +434 -439
  101. package/dist/shared/components/item-edit/RecalcValue.js +55 -0
  102. package/dist/shared/components/item-edit/RecordChatActions.js +76 -64
  103. package/dist/shared/components/item-edit/RecordChatMentionsChip.js +103 -0
  104. package/dist/shared/components/item-edit/RecordGrantTools.js +87 -86
  105. package/dist/shared/components/item-edit/RecordHelpChip.js +70 -0
  106. package/dist/shared/components/item-edit/RecordLiveSync.js +230 -217
  107. package/dist/shared/components/item-edit/RecordOutbox.js +53 -52
  108. package/dist/shared/components/item-edit/RecordRecapStrip.js +109 -36
  109. package/dist/shared/components/item-edit/RelationCombobox.js +229 -217
  110. package/dist/shared/components/item-edit/RelationGroupedCombobox.js +105 -100
  111. package/dist/shared/components/item-edit/RemoteChangeUi.js +454 -0
  112. package/dist/shared/components/item-edit/RemoteUploads.js +55 -0
  113. package/dist/shared/components/item-edit/RemovedLineNote.js +92 -0
  114. package/dist/shared/components/item-edit/RichTextEditorImpl.js +298 -223
  115. package/dist/shared/components/item-edit/ScheduledChangeChip.js +244 -0
  116. package/dist/shared/components/item-edit/SectionPresence.js +78 -0
  117. package/dist/shared/components/item-edit/SplitLinesButton.js +166 -0
  118. package/dist/shared/components/item-edit/catalog-line-watch.js +94 -0
  119. package/dist/shared/components/item-edit/coedit/collab.js +84 -0
  120. package/dist/shared/components/item-edit/coedit/context.js +24 -0
  121. package/dist/shared/components/item-edit/coedit/cursors.js +103 -0
  122. package/dist/shared/components/item-edit/coedit/safe-link.js +15 -0
  123. package/dist/shared/components/item-edit/coedit/session.js +382 -0
  124. package/dist/shared/components/item-edit/coedit/useCoedit.js +49 -0
  125. package/dist/shared/components/item-edit/file-live.js +77 -0
  126. package/dist/shared/components/item-edit/file-processing.js +87 -0
  127. package/dist/shared/components/item-edit/layout-switch.js +148 -0
  128. package/dist/shared/components/item-edit/live-related.js +23 -0
  129. package/dist/shared/components/item-edit/live-title.js +66 -0
  130. package/dist/shared/components/item-edit/partner-needs.js +142 -0
  131. package/dist/shared/components/item-edit/removed-line.js +58 -0
  132. package/dist/shared/components/item-edit/render-stability.js +70 -59
  133. package/dist/shared/components/layout-editor/ChangeNote.js +36 -34
  134. package/dist/shared/components/layout-editor/CollabParts.js +72 -70
  135. package/dist/shared/components/layout-editor/LayoutEditor.js +306 -303
  136. package/dist/shared/components/list/InlineEdit.js +504 -208
  137. package/dist/shared/components/list/ListViewers.js +81 -0
  138. package/dist/shared/components/merge/MergeRecordsDialog.js +1227 -0
  139. package/dist/shared/components/merge/MergeWithFlow.js +290 -0
  140. package/dist/shared/components/merge/merge-values.js +110 -0
  141. package/dist/shared/components/monitoring/InactiveUserLinksView.js +285 -258
  142. package/dist/shared/components/notifications/NotificationCenterView.js +388 -321
  143. package/dist/shared/components/notifications/NotificationDetailBits.js +205 -130
  144. package/dist/shared/components/notifications/NotificationRulesEditor.js +72 -52
  145. package/dist/shared/components/notifications/bundles.js +21 -19
  146. package/dist/shared/components/notifications/resolved-line.js +25 -0
  147. package/dist/shared/components/ops/OpsTasksView.js +45 -44
  148. package/dist/shared/components/panels/AccessGrantedNote.js +85 -0
  149. package/dist/shared/components/panels/AlertBanners.js +132 -0
  150. package/dist/shared/components/panels/AsyncUserPicker.js +54 -45
  151. package/dist/shared/components/panels/BranchLanes.js +82 -54
  152. package/dist/shared/components/panels/CommentAwareness.js +332 -0
  153. package/dist/shared/components/panels/CommentImages.js +219 -0
  154. package/dist/shared/components/panels/CommentPanel.js +649 -530
  155. package/dist/shared/components/panels/ExternalRequestsChip.js +98 -80
  156. package/dist/shared/components/panels/NewSinceChip.js +16 -0
  157. package/dist/shared/components/panels/OwnerOpenedLine.js +85 -0
  158. package/dist/shared/components/panels/PipelinePanel.js +1644 -1494
  159. package/dist/shared/components/panels/ResubmissionDiff.js +293 -0
  160. package/dist/shared/components/panels/SlaBreachBanner.js +30 -29
  161. package/dist/shared/components/panels/SlaClock.js +130 -99
  162. package/dist/shared/components/panels/TaskPanel.js +308 -287
  163. package/dist/shared/components/panels/unseen-move-check.js +101 -0
  164. package/dist/shared/components/pipeline/OwnerMatrix.js +80 -71
  165. package/dist/shared/components/pipeline/OwnerMatrixSheet.js +495 -0
  166. package/dist/shared/components/pipeline/PipelineEditorView.js +1855 -1771
  167. package/dist/shared/components/profile/AgentNameField.js +141 -0
  168. package/dist/shared/components/profile/AgentsPanel.js +55 -46
  169. package/dist/shared/components/profile/PersonAccess.js +398 -330
  170. package/dist/shared/components/profile/PersonAdminTools.js +127 -113
  171. package/dist/shared/components/profile/PersonProfile.js +81 -73
  172. package/dist/shared/components/profile/SignInTroubleshooter.js +361 -0
  173. package/dist/shared/components/queue/QueueBulkBar.js +101 -84
  174. package/dist/shared/components/queue/QueueItemSheet.js +66 -66
  175. package/dist/shared/components/queue/QueueTeamStrip.js +279 -0
  176. package/dist/shared/components/queue/QueueWorklist.js +1927 -1635
  177. package/dist/shared/components/send-view/SendViewButton.js +136 -0
  178. package/dist/shared/components/send-view/SentViewCards.js +147 -0
  179. package/dist/shared/components/support/ReportProblem.js +1 -0
  180. package/dist/shared/components/support/ScreenShare.js +554 -0
  181. package/dist/shared/components/support/SupportView.js +160 -129
  182. package/dist/shared/components/support/TicketDetailSheet.js +101 -89
  183. package/dist/shared/components/watch-list/WatchDock.js +1044 -0
  184. package/dist/shared/components/watch-list/WatchExtras.js +723 -0
  185. package/dist/shared/components/watch-list/WatchListButton.js +46 -0
  186. package/dist/shared/components/watch-list/WatchPinButton.js +67 -0
  187. package/dist/shared/components/watch-list/WatchRows.js +348 -0
  188. package/dist/shared/lib/activity-sentence.js +87 -75
  189. package/dist/shared/lib/agent-presence.js +46 -0
  190. package/dist/shared/lib/approval-progress.js +49 -0
  191. package/dist/shared/lib/attention-prefs.js +27 -0
  192. package/dist/shared/lib/cell-locks.js +56 -0
  193. package/dist/shared/lib/co-edit.js +166 -0
  194. package/dist/shared/lib/coedit-registry.js +44 -0
  195. package/dist/shared/lib/comment-awareness.js +124 -0
  196. package/dist/shared/lib/comment-images.js +45 -0
  197. package/dist/shared/lib/config-watch.js +94 -0
  198. package/dist/shared/lib/copy-rules.js +65 -0
  199. package/dist/shared/lib/count-step.js +30 -0
  200. package/dist/shared/lib/deadline-ticker.js +68 -0
  201. package/dist/shared/lib/derived-causes.js +115 -0
  202. package/dist/shared/lib/draft-store.js +114 -85
  203. package/dist/shared/lib/error-hints.js +1 -0
  204. package/dist/shared/lib/field-merge.js +126 -0
  205. package/dist/shared/lib/filter-sentence.js +10 -10
  206. package/dist/shared/lib/focus-mode.js +16 -12
  207. package/dist/shared/lib/grid-cursors.js +77 -0
  208. package/dist/shared/lib/grid-presence.js +182 -0
  209. package/dist/shared/lib/idle-reload.js +100 -73
  210. package/dist/shared/lib/in-step.js +45 -0
  211. package/dist/shared/lib/integration-chip.js +19 -18
  212. package/dist/shared/lib/line-locks.js +141 -0
  213. package/dist/shared/lib/line-split.js +41 -0
  214. package/dist/shared/lib/linked-changes.js +150 -0
  215. package/dist/shared/lib/list-return.js +231 -0
  216. package/dist/shared/lib/list-viewers.js +52 -0
  217. package/dist/shared/lib/live-announcer.js +86 -0
  218. package/dist/shared/lib/live-counts.js +85 -0
  219. package/dist/shared/lib/live-data-changed.js +108 -0
  220. package/dist/shared/lib/live-deltas.js +81 -0
  221. package/dist/shared/lib/live-findings.js +113 -0
  222. package/dist/shared/lib/live-groups.js +122 -0
  223. package/dist/shared/lib/live-link-labels.js +162 -0
  224. package/dist/shared/lib/live-list-flow.js +334 -0
  225. package/dist/shared/lib/live-list.js +143 -129
  226. package/dist/shared/lib/live-moves.js +51 -0
  227. package/dist/shared/lib/live-ops.js +26 -26
  228. package/dist/shared/lib/live-pickers.js +7 -0
  229. package/dist/shared/lib/live-preference.js +184 -0
  230. package/dist/shared/lib/live-queries.js +226 -181
  231. package/dist/shared/lib/live-screen.js +333 -0
  232. package/dist/shared/lib/live-search.js +108 -0
  233. package/dist/shared/lib/live-seen.js +35 -0
  234. package/dist/shared/lib/live-views.js +100 -0
  235. package/dist/shared/lib/live.js +159 -133
  236. package/dist/shared/lib/missed-updates.js +198 -0
  237. package/dist/shared/lib/newer-file.js +56 -0
  238. package/dist/shared/lib/notification-sound.js +42 -20
  239. package/dist/shared/lib/own-writes.js +59 -41
  240. package/dist/shared/lib/picker-badges.js +94 -0
  241. package/dist/shared/lib/presence-signals.js +131 -84
  242. package/dist/shared/lib/realtime.js +49 -24
  243. package/dist/shared/lib/record-gaps.js +85 -0
  244. package/dist/shared/lib/record-outbox.js +369 -222
  245. package/dist/shared/lib/record-peek.js +75 -0
  246. package/dist/shared/lib/record-tabs.js +92 -72
  247. package/dist/shared/lib/relative-ticker.js +42 -0
  248. package/dist/shared/lib/request-gate.js +119 -119
  249. package/dist/shared/lib/rollup-recalc.js +107 -0
  250. package/dist/shared/lib/room-gaps.js +40 -36
  251. package/dist/shared/lib/rum.js +137 -87
  252. package/dist/shared/lib/save-progress.js +20 -0
  253. package/dist/shared/lib/scheduled-countdown.js +67 -0
  254. package/dist/shared/lib/screen-refresh.js +160 -0
  255. package/dist/shared/lib/screen-share.js +234 -0
  256. package/dist/shared/lib/seen-since.js +74 -0
  257. package/dist/shared/lib/selection-watch.js +205 -0
  258. package/dist/shared/lib/send-status.js +132 -0
  259. package/dist/shared/lib/send-view.js +23 -0
  260. package/dist/shared/lib/socket-liveness.js +155 -0
  261. package/dist/shared/lib/socket-realtime.js +168 -140
  262. package/dist/shared/lib/state-census.js +53 -0
  263. package/dist/shared/lib/summary-mode.js +61 -39
  264. package/dist/shared/lib/tab-attention.js +143 -32
  265. package/dist/shared/lib/table-density.js +64 -0
  266. package/dist/shared/lib/track-travel.js +40 -0
  267. package/dist/shared/lib/unseen-changes.js +68 -0
  268. package/dist/shared/lib/upload-file.js +33 -0
  269. package/dist/shared/lib/upload-presence.js +127 -0
  270. package/dist/shared/lib/urgent-chime.js +65 -0
  271. package/dist/shared/lib/use-online-users.js +32 -11
  272. package/dist/shared/lib/user-sync.js +155 -39
  273. package/dist/shared/lib/waiting-count.js +44 -0
  274. package/dist/shared/lib/watch-desktop.js +83 -0
  275. package/dist/shared/lib/watch-list.js +447 -0
  276. package/dist/shared/lib/widget-image-render.js +64 -0
  277. package/dist/shared/lib/widget-image.js +111 -0
  278. package/dist/shared/lib/worker-socket.js +130 -104
  279. package/dist/shared/lib/write-to-screen.js +133 -0
  280. package/package.json +1 -1
  281. 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 H, useQuery as _, useMutation as f } from "@tanstack/react-query";
3
- import { Loader2 as B, PlayCircle as W, Paperclip as z } from "lucide-react";
4
- import { useState as q } from "react";
5
- import { useNivaroClient as G, useApiFetchConfig as M, useItemNavigation as J, useNavigation as V } from "../../context.js";
6
- import { get as T, post as C, patch as X } from "../../lib/commands.js";
7
- import { useTopicPresence as Y, signalSentence as $ } from "../../lib/presence-signals.js";
8
- import { replayHref as Z } from "../../lib/replay-capture.js";
9
- import { TaskDoButton as I } from "../ai/TaskDo.js";
10
- import { RelationCombobox as ee } from "../item-edit/RelationCombobox.js";
11
- import { SimpleSelect as F } from "../ui/SimpleSelect.js";
12
- import { Sheet as te, SheetContent as ae, SheetTitle as K, SheetDescription as R, SheetHeader as re } from "../ui/sheet.js";
13
- import { isSupportContextFile as b } from "./support-context.js";
14
- import { TicketSlowScreens as se } from "./TicketSlowScreens.js";
15
- import { TicketTraffic as ne } from "./TicketTraffic.js";
16
- import { STATUS_TONE as P } from "./types.js";
17
- const D = [
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 k(s) {
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 le({ status: s, label: d }) {
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 ${P[s] ?? P.open}`,
38
- children: d ?? ((l = D.find((i) => i.value === s)) == null ? void 0 : l.label) ?? s
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 we({
46
+ function Le({
43
47
  ticketId: s,
44
- onOpenChange: d
48
+ onOpenChange: c
45
49
  }) {
46
- const l = G(), i = H(), { apiBase: Q } = M(), { urlFor: j, open: A } = J(), p = V(), [m, v] = q(""), [N, U] = q(null), o = Y(
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: L,
51
- isError: E
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: O = [] } = _({
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"), w = f({
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
- }), c = f({
73
- mutationFn: (t) => l.request(X(`/support/tickets/${s}`, t)),
77
+ }), d = f({
78
+ mutationFn: (t) => l.request(ee(`/support/tickets/${s}`, t)),
74
79
  onSuccess: x,
75
80
  onError: h
76
- }), S = f({
77
- mutationFn: () => l.request(C(`/support/tickets/${s}/comments`, { text: m.trim() })),
81
+ }), _ = f({
82
+ mutationFn: () => l.request(C(`/support/tickets/${s}/comments`, { text: p.trim() })),
78
83
  onSuccess: () => {
79
- v(""), o.signalReplying(!1), x();
84
+ N(""), o.signalReplying(!1), x();
80
85
  },
81
86
  onError: h
82
87
  });
83
- return /* @__PURE__ */ a(te, { open: s != null, onOpenChange: d, children: /* @__PURE__ */ a(
84
- ae,
88
+ return /* @__PURE__ */ a(de, { open: s != null, onOpenChange: c, children: /* @__PURE__ */ a(
89
+ ce,
85
90
  {
86
91
  side: "right",
87
- className: "flex w-[560px] max-w-[96vw] flex-col gap-0 p-0 sm:max-w-[560px] dark:bg-card",
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 || E ? /* @__PURE__ */ r("div", { className: "flex flex-1 flex-col items-center justify-center gap-1 px-6 text-center", children: [
90
- /* @__PURE__ */ a(K, { className: "text-[14px] font-semibold text-slate-800 dark:text-slate-100", children: "Request not found" }),
91
- /* @__PURE__ */ a(R, { 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." })
92
- ] }) : L || !e ? /* @__PURE__ */ a("div", { className: "flex flex-1 items-center justify-center text-slate-400", children: /* @__PURE__ */ a(B, { className: "h-5 w-5 animate-spin" }) }) : /* @__PURE__ */ r(y, { children: [
93
- /* @__PURE__ */ r(re, { className: "space-y-1.5 border-b border-slate-200 px-5 py-4 text-left dark:border-border", children: [
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(le, { status: e.status, label: e.status_label }),
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(K, { className: "text-left text-[16px] font-semibold leading-snug text-slate-900 dark:text-slate-100", children: e.title }),
103
- /* @__PURE__ */ r(R, { className: "text-left text-[12px] text-slate-500 dark:text-muted-foreground", children: [
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
- k(e.created_at),
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: j({ collection: e.collection, itemId: e.item }),
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(), A({ collection: e.collection, itemId: e.item }));
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
- I,
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: w.isPending,
171
- onClick: () => w.mutate(),
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
- F,
186
+ R,
181
187
  {
182
188
  value: e.status,
183
- onChange: (t) => c.mutate({ status: t }),
184
- options: D,
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
- F,
199
+ R,
194
200
  {
195
201
  value: e.category_id != null ? String(e.category_id) : "",
196
- onChange: (t) => c.mutate({ category_id: t ? Number(t) : null }),
202
+ onChange: (t) => d.mutate({ category_id: t ? Number(t) : null }),
197
203
  options: [
198
204
  { value: "", label: "No type" },
199
- ...O.map((t) => ({ value: String(t.id), label: t.name }))
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
- ee,
215
+ oe,
210
216
  {
211
217
  collection: "nivaro_users",
212
218
  value: e.assignee,
213
- onChange: (t) => c.mutate({ assignee: t ? String(t) : null }),
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 = Z(e.replay), n = p.consoleUrl ? p.consoleUrl(t) : 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(W, { className: "h-3.5 w-3.5" }),
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 = p.consoleUrl ? p.consoleUrl(t) : t;
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 || !b(n));
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: `${Q}/files/${n.id}`,
270
+ href: `${D}/files/${n.id}`,
264
271
  target: "_blank",
265
272
  rel: "noreferrer",
266
- "data-tip": b(n) ? "The page they were on, browser errors and their last 20 requests when they asked" : void 0,
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(z, { className: "h-3 w-3" }),
270
- b(n) ? "Technical details" : n.title || n.filename_download || "File"
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(ne, { ticketId: e.id }),
283
+ e.can.work && /* @__PURE__ */ a(xe, { ticketId: e.id }),
277
284
  /* @__PURE__ */ a(
278
- se,
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: k(t.created_at) })
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(), m.trim() && S.mutate();
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: m,
320
+ value: p,
314
321
  onChange: (t) => {
315
- v(t.target.value), o.signalReplying(!!t.target.value.trim());
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: () => c.mutate({ status: "cancelled" }),
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: () => c.mutate({ status: "open" }),
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: !m.trim() || S.isPending,
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
- N && /* @__PURE__ */ a("p", { className: "mt-1 text-[12px] text-red-600 dark:text-red-400", role: "alert", children: N })
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("ol", { className: "space-y-2 border-l border-slate-200 pl-3.5 dark:border-border", children: e.history.map((t) => /* @__PURE__ */ r("li", { className: "text-[12px] text-slate-600 dark:text-slate-300", children: [
374
- /* @__PURE__ */ a("span", { className: "text-slate-800 dark:text-slate-100", children: t.text }),
375
- /* @__PURE__ */ r("span", { className: "text-slate-500 dark:text-slate-400", children: [
376
- " ",
377
- "· ",
378
- t.user_name ?? "System",
379
- " · ",
380
- k(t.at)
381
- ] })
382
- ] }, t.id)) })
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
- le as StatusPill,
391
- we as TicketDetailSheet
402
+ he as StatusPill,
403
+ Le as TicketDetailSheet
392
404
  };