@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.
Files changed (285) 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 +1727 -19
  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 +544 -504
  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/cbv/column-totals.js +75 -67
  62. package/dist/shared/components/change-proposals/ChangeProposalsPanel.js +320 -0
  63. package/dist/shared/components/change-proposals/ProposalValue.js +28 -0
  64. package/dist/shared/components/change-proposals/ProposeChangeButton.js +44 -0
  65. package/dist/shared/components/change-proposals/ProposeChangeDialog.js +359 -0
  66. package/dist/shared/components/change-proposals/types.js +4 -0
  67. package/dist/shared/components/chat/ChatPanel.js +1571 -1528
  68. package/dist/shared/components/chat/Composer.js +276 -298
  69. package/dist/shared/components/chat/room-due.js +13 -0
  70. package/dist/shared/components/collections-directory/CollectionRow.js +76 -75
  71. package/dist/shared/components/collections-directory/CollectionsDirectory.js +415 -395
  72. package/dist/shared/components/collections-directory/directory-data.js +75 -63
  73. package/dist/shared/components/imports/ImportConsole.js +159 -155
  74. package/dist/shared/components/imports/ImportDuplicatesNotice.js +46 -31
  75. package/dist/shared/components/integrations/SendStatus.js +202 -0
  76. package/dist/shared/components/integrations/console/IntegrationsConsole.js +45 -36
  77. package/dist/shared/components/integrations/console/ReadyToSendView.js +453 -0
  78. package/dist/shared/components/integrations/console/api.js +161 -117
  79. package/dist/shared/components/integrations/console/tone.js +15 -12
  80. package/dist/shared/components/item-edit/CatalogPickerField.js +1353 -1245
  81. package/dist/shared/components/item-edit/ChangedAfterApprovalBadge.js +162 -0
  82. package/dist/shared/components/item-edit/CloneDialog.js +208 -206
  83. package/dist/shared/components/item-edit/DerivedCauseNote.js +57 -0
  84. package/dist/shared/components/item-edit/DraftRecoveryBanner.js +81 -70
  85. package/dist/shared/components/item-edit/DuplicateNotice.js +169 -101
  86. package/dist/shared/components/item-edit/FieldAffordances.js +294 -385
  87. package/dist/shared/components/item-edit/FieldComments.js +159 -116
  88. package/dist/shared/components/item-edit/FieldPointer.js +132 -0
  89. package/dist/shared/components/item-edit/FieldRenderer.js +277 -273
  90. package/dist/shared/components/item-edit/FieldRow.js +519 -439
  91. package/dist/shared/components/item-edit/FieldSourceBadge.js +88 -0
  92. package/dist/shared/components/item-edit/FilePickerField.js +454 -369
  93. package/dist/shared/components/item-edit/GroupSection.js +618 -567
  94. package/dist/shared/components/item-edit/HeldEditsChip.js +113 -0
  95. package/dist/shared/components/item-edit/InlineTableField.js +2891 -2723
  96. package/dist/shared/components/item-edit/ListNeighborNav.js +79 -0
  97. package/dist/shared/components/item-edit/LiveTraceSheet.js +26 -0
  98. package/dist/shared/components/item-edit/M2MCombobox.js +284 -273
  99. package/dist/shared/components/item-edit/OutboxReviewTray.js +313 -0
  100. package/dist/shared/components/item-edit/PickerBadges.js +52 -0
  101. package/dist/shared/components/item-edit/PlanGrid.js +434 -439
  102. package/dist/shared/components/item-edit/RecalcValue.js +55 -0
  103. package/dist/shared/components/item-edit/RecordChatActions.js +76 -64
  104. package/dist/shared/components/item-edit/RecordChatMentionsChip.js +103 -0
  105. package/dist/shared/components/item-edit/RecordGrantTools.js +87 -86
  106. package/dist/shared/components/item-edit/RecordHelpChip.js +70 -0
  107. package/dist/shared/components/item-edit/RecordLiveSync.js +230 -217
  108. package/dist/shared/components/item-edit/RecordOutbox.js +53 -52
  109. package/dist/shared/components/item-edit/RecordRecapStrip.js +109 -36
  110. package/dist/shared/components/item-edit/RelationCombobox.js +229 -217
  111. package/dist/shared/components/item-edit/RelationGroupedCombobox.js +105 -100
  112. package/dist/shared/components/item-edit/RemoteChangeUi.js +454 -0
  113. package/dist/shared/components/item-edit/RemoteUploads.js +55 -0
  114. package/dist/shared/components/item-edit/RemovedLineNote.js +92 -0
  115. package/dist/shared/components/item-edit/RichTextEditorImpl.js +298 -223
  116. package/dist/shared/components/item-edit/ScheduledChangeChip.js +244 -0
  117. package/dist/shared/components/item-edit/SectionPresence.js +78 -0
  118. package/dist/shared/components/item-edit/SplitLinesButton.js +166 -0
  119. package/dist/shared/components/item-edit/catalog-line-watch.js +94 -0
  120. package/dist/shared/components/item-edit/coedit/collab.js +84 -0
  121. package/dist/shared/components/item-edit/coedit/context.js +24 -0
  122. package/dist/shared/components/item-edit/coedit/cursors.js +103 -0
  123. package/dist/shared/components/item-edit/coedit/safe-link.js +15 -0
  124. package/dist/shared/components/item-edit/coedit/session.js +382 -0
  125. package/dist/shared/components/item-edit/coedit/useCoedit.js +49 -0
  126. package/dist/shared/components/item-edit/file-live.js +77 -0
  127. package/dist/shared/components/item-edit/file-processing.js +87 -0
  128. package/dist/shared/components/item-edit/layout-switch.js +148 -0
  129. package/dist/shared/components/item-edit/live-related.js +23 -0
  130. package/dist/shared/components/item-edit/live-title.js +66 -0
  131. package/dist/shared/components/item-edit/partner-needs.js +142 -0
  132. package/dist/shared/components/item-edit/removed-line.js +58 -0
  133. package/dist/shared/components/item-edit/render-stability.js +70 -59
  134. package/dist/shared/components/layout-editor/ChangeNote.js +36 -34
  135. package/dist/shared/components/layout-editor/CollabParts.js +72 -70
  136. package/dist/shared/components/layout-editor/LayoutEditor.js +306 -303
  137. package/dist/shared/components/list/InlineEdit.js +504 -208
  138. package/dist/shared/components/list/ListViewers.js +81 -0
  139. package/dist/shared/components/merge/MergeRecordsDialog.js +1227 -0
  140. package/dist/shared/components/merge/MergeWithFlow.js +290 -0
  141. package/dist/shared/components/merge/merge-values.js +110 -0
  142. package/dist/shared/components/monitoring/InactiveUserLinksView.js +285 -258
  143. package/dist/shared/components/notifications/NotificationCenterView.js +388 -321
  144. package/dist/shared/components/notifications/NotificationDetailBits.js +205 -130
  145. package/dist/shared/components/notifications/NotificationRulesEditor.js +72 -52
  146. package/dist/shared/components/notifications/bundles.js +21 -19
  147. package/dist/shared/components/notifications/resolved-line.js +25 -0
  148. package/dist/shared/components/ops/OpsTasksView.js +45 -44
  149. package/dist/shared/components/panels/AccessGrantedNote.js +85 -0
  150. package/dist/shared/components/panels/AlertBanners.js +132 -0
  151. package/dist/shared/components/panels/AsyncUserPicker.js +54 -45
  152. package/dist/shared/components/panels/BranchLanes.js +82 -54
  153. package/dist/shared/components/panels/CommentAwareness.js +332 -0
  154. package/dist/shared/components/panels/CommentImages.js +219 -0
  155. package/dist/shared/components/panels/CommentPanel.js +649 -530
  156. package/dist/shared/components/panels/ExternalRequestsChip.js +98 -80
  157. package/dist/shared/components/panels/NewSinceChip.js +16 -0
  158. package/dist/shared/components/panels/OwnerOpenedLine.js +85 -0
  159. package/dist/shared/components/panels/PipelinePanel.js +1644 -1494
  160. package/dist/shared/components/panels/ResubmissionDiff.js +293 -0
  161. package/dist/shared/components/panels/SlaBreachBanner.js +30 -29
  162. package/dist/shared/components/panels/SlaClock.js +130 -99
  163. package/dist/shared/components/panels/TaskPanel.js +308 -287
  164. package/dist/shared/components/panels/unseen-move-check.js +101 -0
  165. package/dist/shared/components/pipeline/OwnerMatrix.js +80 -71
  166. package/dist/shared/components/pipeline/OwnerMatrixSheet.js +495 -0
  167. package/dist/shared/components/pipeline/PipelineEditorView.js +1855 -1771
  168. package/dist/shared/components/profile/AgentNameField.js +141 -0
  169. package/dist/shared/components/profile/AgentsPanel.js +55 -46
  170. package/dist/shared/components/profile/PersonAccess.js +398 -330
  171. package/dist/shared/components/profile/PersonAdminTools.js +127 -113
  172. package/dist/shared/components/profile/PersonProfile.js +81 -73
  173. package/dist/shared/components/profile/SignInTroubleshooter.js +361 -0
  174. package/dist/shared/components/queue/QueueBulkBar.js +101 -84
  175. package/dist/shared/components/queue/QueueItemSheet.js +66 -66
  176. package/dist/shared/components/queue/QueueTeamStrip.js +279 -0
  177. package/dist/shared/components/queue/QueueWorklist.js +2076 -1686
  178. package/dist/shared/components/queue/queue-totals.js +92 -0
  179. package/dist/shared/components/queue/worklist-helpers.js +18 -14
  180. package/dist/shared/components/send-view/SendViewButton.js +136 -0
  181. package/dist/shared/components/send-view/SentViewCards.js +147 -0
  182. package/dist/shared/components/support/ReportProblem.js +1 -0
  183. package/dist/shared/components/support/ScreenShare.js +554 -0
  184. package/dist/shared/components/support/SupportView.js +160 -129
  185. package/dist/shared/components/support/TicketDetailSheet.js +101 -89
  186. package/dist/shared/components/watch-list/WatchDock.js +1044 -0
  187. package/dist/shared/components/watch-list/WatchExtras.js +723 -0
  188. package/dist/shared/components/watch-list/WatchListButton.js +46 -0
  189. package/dist/shared/components/watch-list/WatchPinButton.js +67 -0
  190. package/dist/shared/components/watch-list/WatchRows.js +348 -0
  191. package/dist/shared/lib/activity-sentence.js +87 -75
  192. package/dist/shared/lib/agent-presence.js +46 -0
  193. package/dist/shared/lib/approval-progress.js +49 -0
  194. package/dist/shared/lib/attention-prefs.js +27 -0
  195. package/dist/shared/lib/cell-locks.js +56 -0
  196. package/dist/shared/lib/co-edit.js +166 -0
  197. package/dist/shared/lib/coedit-registry.js +44 -0
  198. package/dist/shared/lib/comment-awareness.js +124 -0
  199. package/dist/shared/lib/comment-images.js +45 -0
  200. package/dist/shared/lib/config-watch.js +94 -0
  201. package/dist/shared/lib/copy-rules.js +65 -0
  202. package/dist/shared/lib/count-step.js +30 -0
  203. package/dist/shared/lib/deadline-ticker.js +68 -0
  204. package/dist/shared/lib/derived-causes.js +115 -0
  205. package/dist/shared/lib/draft-store.js +114 -85
  206. package/dist/shared/lib/error-hints.js +1 -0
  207. package/dist/shared/lib/field-merge.js +126 -0
  208. package/dist/shared/lib/filter-sentence.js +10 -10
  209. package/dist/shared/lib/focus-mode.js +16 -12
  210. package/dist/shared/lib/grid-cursors.js +77 -0
  211. package/dist/shared/lib/grid-presence.js +182 -0
  212. package/dist/shared/lib/idle-reload.js +100 -73
  213. package/dist/shared/lib/in-step.js +45 -0
  214. package/dist/shared/lib/integration-chip.js +19 -18
  215. package/dist/shared/lib/line-locks.js +141 -0
  216. package/dist/shared/lib/line-split.js +41 -0
  217. package/dist/shared/lib/linked-changes.js +150 -0
  218. package/dist/shared/lib/list-link.js +56 -50
  219. package/dist/shared/lib/list-return.js +231 -0
  220. package/dist/shared/lib/list-viewers.js +52 -0
  221. package/dist/shared/lib/live-announcer.js +86 -0
  222. package/dist/shared/lib/live-counts.js +85 -0
  223. package/dist/shared/lib/live-data-changed.js +108 -0
  224. package/dist/shared/lib/live-deltas.js +81 -0
  225. package/dist/shared/lib/live-findings.js +113 -0
  226. package/dist/shared/lib/live-groups.js +122 -0
  227. package/dist/shared/lib/live-link-labels.js +162 -0
  228. package/dist/shared/lib/live-list-flow.js +334 -0
  229. package/dist/shared/lib/live-list.js +143 -129
  230. package/dist/shared/lib/live-moves.js +51 -0
  231. package/dist/shared/lib/live-ops.js +26 -26
  232. package/dist/shared/lib/live-pickers.js +7 -0
  233. package/dist/shared/lib/live-preference.js +184 -0
  234. package/dist/shared/lib/live-queries.js +226 -181
  235. package/dist/shared/lib/live-screen.js +333 -0
  236. package/dist/shared/lib/live-search.js +108 -0
  237. package/dist/shared/lib/live-seen.js +35 -0
  238. package/dist/shared/lib/live-views.js +100 -0
  239. package/dist/shared/lib/live.js +159 -133
  240. package/dist/shared/lib/missed-updates.js +198 -0
  241. package/dist/shared/lib/newer-file.js +56 -0
  242. package/dist/shared/lib/notification-sound.js +42 -20
  243. package/dist/shared/lib/own-writes.js +59 -41
  244. package/dist/shared/lib/picker-badges.js +94 -0
  245. package/dist/shared/lib/presence-signals.js +131 -84
  246. package/dist/shared/lib/realtime.js +49 -24
  247. package/dist/shared/lib/record-gaps.js +85 -0
  248. package/dist/shared/lib/record-outbox.js +369 -222
  249. package/dist/shared/lib/record-peek.js +75 -0
  250. package/dist/shared/lib/record-tabs.js +92 -72
  251. package/dist/shared/lib/relative-ticker.js +42 -0
  252. package/dist/shared/lib/request-gate.js +119 -119
  253. package/dist/shared/lib/rollup-recalc.js +107 -0
  254. package/dist/shared/lib/room-gaps.js +40 -36
  255. package/dist/shared/lib/rum.js +137 -87
  256. package/dist/shared/lib/save-progress.js +20 -0
  257. package/dist/shared/lib/scheduled-countdown.js +67 -0
  258. package/dist/shared/lib/screen-refresh.js +160 -0
  259. package/dist/shared/lib/screen-share.js +234 -0
  260. package/dist/shared/lib/seen-since.js +74 -0
  261. package/dist/shared/lib/selection-watch.js +205 -0
  262. package/dist/shared/lib/send-status.js +132 -0
  263. package/dist/shared/lib/send-view.js +23 -0
  264. package/dist/shared/lib/socket-liveness.js +155 -0
  265. package/dist/shared/lib/socket-realtime.js +168 -140
  266. package/dist/shared/lib/state-census.js +53 -0
  267. package/dist/shared/lib/summary-mode.js +61 -39
  268. package/dist/shared/lib/tab-attention.js +143 -32
  269. package/dist/shared/lib/table-density.js +64 -0
  270. package/dist/shared/lib/track-travel.js +40 -0
  271. package/dist/shared/lib/unseen-changes.js +68 -0
  272. package/dist/shared/lib/upload-file.js +33 -0
  273. package/dist/shared/lib/upload-presence.js +127 -0
  274. package/dist/shared/lib/urgent-chime.js +65 -0
  275. package/dist/shared/lib/use-online-users.js +32 -11
  276. package/dist/shared/lib/user-sync.js +155 -39
  277. package/dist/shared/lib/waiting-count.js +44 -0
  278. package/dist/shared/lib/watch-desktop.js +83 -0
  279. package/dist/shared/lib/watch-list.js +447 -0
  280. package/dist/shared/lib/widget-image-render.js +64 -0
  281. package/dist/shared/lib/widget-image.js +111 -0
  282. package/dist/shared/lib/worker-socket.js +130 -104
  283. package/dist/shared/lib/write-to-screen.js +133 -0
  284. package/package.json +1 -1
  285. package/styles.css +49 -1
@@ -0,0 +1,92 @@
1
+ import { combineTerms as d, totalTip as m, TOTAL_FNS as h, linearSumTerms as v } from "../cbv/column-totals.js";
2
+ const b = (e) => `nvr_queue_totals_${e}`;
3
+ function y(e) {
4
+ return /^(extra|formula)\.[A-Za-z_][\w.]*$/.test(e);
5
+ }
6
+ const T = "Worked out in the list from a formula that does more than add and subtract number columns, so it has no total.";
7
+ function s(e, r) {
8
+ var t, u;
9
+ const n = (t = r.meta) == null ? void 0 : t.find((o) => o.path === e);
10
+ return n != null && n.multi_value && !n.aggregate ? null : n != null && n.no_total ? { kind: "none", why: n.no_total } : n != null && n.number || (u = r.numberFormatPaths) != null && u.has(e) ? { kind: "server", path: e } : null;
11
+ }
12
+ function _(e, r) {
13
+ var n;
14
+ if (e.startsWith("extra.")) return s(e.slice(6), r);
15
+ if (e.startsWith("formula.")) {
16
+ const t = (n = r.formulas) == null ? void 0 : n.find((i) => `formula.${i.key}` === e);
17
+ if (!t) return null;
18
+ const u = v(t.formula), o = u == null ? void 0 : u.map(
19
+ (i) => i.field.startsWith("extra.") ? i.field.slice(6) : null
20
+ );
21
+ return u && (o != null && o.every((i) => {
22
+ var l;
23
+ return i != null && ((l = s(i, r)) == null ? void 0 : l.kind) === "server";
24
+ })) ? {
25
+ kind: "derived",
26
+ terms: u.map((i, l) => ({ field: o[l], sign: i.sign }))
27
+ } : { kind: "none", why: T };
28
+ }
29
+ return null;
30
+ }
31
+ function g(e, r) {
32
+ return Object.keys(e).filter((n) => {
33
+ const t = r(n);
34
+ return (t == null ? void 0 : t.kind) === "server" || (t == null ? void 0 : t.kind) === "derived" && e[n] === "sum";
35
+ });
36
+ }
37
+ function x(e, r) {
38
+ const n = [];
39
+ for (const t of e) {
40
+ const u = r(t), o = (u == null ? void 0 : u.kind) === "server" ? [u.path] : (u == null ? void 0 : u.kind) === "derived" ? u.terms.map((i) => i.field) : [];
41
+ for (const i of o) n.includes(i) || n.push(i);
42
+ }
43
+ return n.sort().slice(0, 12);
44
+ }
45
+ function c(e, r) {
46
+ return r === "count" ? e.count : e.count <= 0 ? null : r === "sum" ? e.sum : r === "min" ? e.min : r === "max" ? e.max : e.avg ?? (e.count > 0 ? e.sum / e.count : null);
47
+ }
48
+ function $(e, r, n) {
49
+ if (e) {
50
+ if (r.kind === "server") {
51
+ const t = e[r.path];
52
+ return t ? c(t, n) : void 0;
53
+ }
54
+ return r.kind === "derived" ? r.terms.some((t) => !e[t.field]) ? void 0 : r.terms.every((t) => {
55
+ var u;
56
+ return (((u = e[t.field]) == null ? void 0 : u.count) ?? 0) === 0;
57
+ }) ? null : d(r.terms, (t) => {
58
+ var u;
59
+ return ((u = e[t]) == null ? void 0 : u.sum) ?? 0;
60
+ }) : null;
61
+ }
62
+ }
63
+ function q(e) {
64
+ var t;
65
+ let r = m(e.fn, e.label, e.rows);
66
+ e.derivedText && (r += `, worked out as ${e.derivedText}`);
67
+ const n = Object.entries(e.byCollection ?? {});
68
+ if (n.length > 1) {
69
+ const u = ((t = h.find((i) => i.fn === e.fn)) == null ? void 0 : t.short) ?? e.fn, o = n.map(([i, l]) => {
70
+ var f;
71
+ const a = c(l, e.fn);
72
+ return `${((f = e.collectionLabel) == null ? void 0 : f.call(e, i)) ?? i} ${a == null ? "—" : e.format(a)}`;
73
+ }).join(" · ");
74
+ r += `. ${u} by source: ${o}`;
75
+ }
76
+ return e.partial && (r += ". This worklist is past its read limit, so the figure covers the rows it read, not every record."), r;
77
+ }
78
+ function O(e) {
79
+ return e === "currency" ? { type: "number", decimals: 2, thousands: !0, prefix: "$" } : null;
80
+ }
81
+ export {
82
+ T as FORMULA_NO_TOTAL,
83
+ O as formulaTotalFormat,
84
+ c as pickTotal,
85
+ g as queueTotalColumns,
86
+ x as queueTotalPaths,
87
+ q as queueTotalTip,
88
+ $ as queueTotalValue,
89
+ y as queueTotalsEligibleKey,
90
+ b as queueTotalsStoreKey,
91
+ _ as queueTotalsSupport
92
+ };
@@ -1,20 +1,24 @@
1
- import { choiceLabel as i } from "../../lib/utils.js";
2
- function c(e, t) {
1
+ import { choiceLabel as u } from "../../lib/utils.js";
2
+ function l(t, e) {
3
3
  var n;
4
- const r = (n = e == null ? void 0 : e.choices) == null ? void 0 : n.find((o) => o.value === t);
5
- return r ? i(r.text) : t;
4
+ const r = (n = t == null ? void 0 : t.choices) == null ? void 0 : n.find((o) => o.value === e);
5
+ return r ? u(r.text) : e;
6
6
  }
7
- function f(e) {
8
- const t = Object.entries(e ?? {}).filter(([, r]) => r > 0).sort((r, n) => n[1] - r[1] || r[0].localeCompare(n[0]));
9
- return t.length === 0 ? null : t.map(([r, n]) => `${r} ${n.toLocaleString("en-US")}`).join(" · ");
7
+ function a(t) {
8
+ const e = Object.entries(t ?? {}).filter(([, r]) => r > 0).sort((r, n) => n[1] - r[1] || r[0].localeCompare(n[0]));
9
+ return e.length === 0 ? null : e.map(([r, n]) => `${r} ${n.toLocaleString("en-US")}`).join(" · ");
10
10
  }
11
- function l(e) {
12
- if (!e || typeof e.tagName != "string") return !0;
13
- const t = e;
14
- return !!(t === document.body || t === document.documentElement || t.tagName === "TR" && t.hasAttribute("data-row-key"));
11
+ function c(t) {
12
+ if (!t || typeof t.tagName != "string") return !0;
13
+ const e = t;
14
+ return !!(e === document.body || e === document.documentElement || e.tagName === "TR" && e.hasAttribute("data-row-key"));
15
+ }
16
+ function s(t) {
17
+ return (t ?? []).filter((e) => (e == null ? void 0 : e.key) && e.formula).map((e) => `formula.${e.key}`);
15
18
  }
16
19
  export {
17
- f as atRiskBreakdown,
18
- c as extraChoiceText,
19
- l as worklistKeyTarget
20
+ a as atRiskBreakdown,
21
+ l as extraChoiceText,
22
+ s as formulaColumnKeys,
23
+ c as worklistKeyTarget
20
24
  };
@@ -0,0 +1,136 @@
1
+ import { jsxs as n, jsx as t } from "react/jsx-runtime";
2
+ import { useMutation as S } from "@tanstack/react-query";
3
+ import { Send as v } from "lucide-react";
4
+ import { useState as r } from "react";
5
+ import { toast as P } from "sonner";
6
+ import { useNivaroClient as j, useItemEditAuth as T } from "../../context.js";
7
+ import { post as A } from "../../lib/commands.js";
8
+ import { toastError as E } from "../../lib/error-toast.js";
9
+ import { cn as O } from "../../lib/utils.js";
10
+ import { AsyncUserPicker as U } from "../panels/AsyncUserPicker.js";
11
+ import { Popover as I, PopoverTrigger as $, PopoverContent as q } from "../ui/popover.js";
12
+ function L({
13
+ getView: b,
14
+ describe: i,
15
+ compact: g,
16
+ className: w
17
+ }) {
18
+ const y = j(), { userId: m } = T(), [N, l] = r(!1), [o, h] = r(""), [k, u] = r(""), [p, x] = r(""), [d, C] = r(""), s = S({
19
+ mutationFn: () => y.request(
20
+ A("/send-view", { to: o, view: b(), note: p.trim() || void 0 })
21
+ ),
22
+ onSuccess: (e) => {
23
+ var f;
24
+ const a = k || "them";
25
+ P.success(
26
+ ((f = e.data) == null ? void 0 : f.mode) === "live" ? `Sent to ${a}` : `Sent to ${a} — it is waiting in their notifications`
27
+ ), l(!1), h(""), u(""), x("");
28
+ },
29
+ onError: (e) => E(e, "Could not send your view")
30
+ }), c = !!o && !!m && o.toUpperCase() === m.toUpperCase();
31
+ return /* @__PURE__ */ n(
32
+ I,
33
+ {
34
+ open: N,
35
+ onOpenChange: (e) => {
36
+ l(e), e && C((i == null ? void 0 : i()) ?? "");
37
+ },
38
+ children: [
39
+ /* @__PURE__ */ t($, { asChild: !0, children: /* @__PURE__ */ t(
40
+ "button",
41
+ {
42
+ type: "button",
43
+ "aria-label": "Send my view to someone",
44
+ "data-tip": "Send my view to someone",
45
+ "data-send-view": "",
46
+ className: O(
47
+ g ? "inline-flex h-8 w-8 items-center justify-center transition-colors hover:bg-accent hover:text-accent-foreground" : "flex h-8 w-8 items-center justify-center rounded-md border border-slate-200 text-slate-500 hover:bg-slate-100 hover:text-slate-700 dark:border-slate-700 dark:text-slate-400 dark:hover:bg-slate-800 dark:hover:text-slate-200",
48
+ w
49
+ ),
50
+ children: /* @__PURE__ */ t(v, { className: "h-4 w-4" })
51
+ }
52
+ ) }),
53
+ /* @__PURE__ */ t(
54
+ q,
55
+ {
56
+ align: "end",
57
+ sideOffset: 6,
58
+ className: "w-[min(20rem,calc(100vw-2rem))] p-3",
59
+ "data-send-view-panel": "",
60
+ children: /* @__PURE__ */ n(
61
+ "form",
62
+ {
63
+ onSubmit: (e) => {
64
+ e.preventDefault(), o && !c && !s.isPending && s.mutate();
65
+ },
66
+ className: "space-y-2.5",
67
+ children: [
68
+ /* @__PURE__ */ n("div", { children: [
69
+ /* @__PURE__ */ t("p", { className: "text-[13px] font-semibold text-slate-800 dark:text-slate-100", children: "Send my view" }),
70
+ d && /* @__PURE__ */ t(
71
+ "p",
72
+ {
73
+ className: "mt-0.5 truncate text-[12px] text-slate-500 dark:text-slate-400",
74
+ title: d,
75
+ children: d
76
+ }
77
+ )
78
+ ] }),
79
+ /* @__PURE__ */ t(
80
+ U,
81
+ {
82
+ value: o,
83
+ onChange: (e, a) => {
84
+ h(e), u((a == null ? void 0 : a.name) ?? "");
85
+ }
86
+ }
87
+ ),
88
+ c && /* @__PURE__ */ t("p", { className: "text-[11.5px] text-amber-700 dark:text-amber-300", children: "Choose someone other than yourself." }),
89
+ /* @__PURE__ */ t(
90
+ "textarea",
91
+ {
92
+ value: p,
93
+ onChange: (e) => x(e.target.value.slice(0, 280)),
94
+ rows: 2,
95
+ placeholder: "Add a note (optional)",
96
+ "aria-label": "Note",
97
+ className: "block w-full resize-none rounded-md border border-slate-200 bg-white px-2.5 py-1.5 text-[12.5px] text-slate-700 placeholder-slate-400 focus:border-nvr-cyan/60 focus:outline-none focus:ring-1 focus:ring-nvr-cyan/40 dark:border-border dark:bg-background dark:text-slate-200"
98
+ }
99
+ ),
100
+ /* @__PURE__ */ t("p", { className: "text-[11px] leading-snug text-slate-500 dark:text-slate-400", children: "They’ll see this screen with their own access. Nothing they can’t already see is shared." }),
101
+ /* @__PURE__ */ n("div", { className: "flex justify-end gap-2", children: [
102
+ /* @__PURE__ */ t(
103
+ "button",
104
+ {
105
+ type: "button",
106
+ onClick: () => l(!1),
107
+ className: "h-8 rounded-md px-3 text-[12.5px] font-medium text-slate-600 hover:bg-slate-100 dark:text-slate-300 dark:hover:bg-muted",
108
+ children: "Cancel"
109
+ }
110
+ ),
111
+ /* @__PURE__ */ n(
112
+ "button",
113
+ {
114
+ type: "submit",
115
+ disabled: !o || c || s.isPending,
116
+ "data-send-view-submit": "",
117
+ className: "inline-flex h-8 items-center gap-1.5 rounded-md bg-nvr-cyan px-3 text-[12.5px] font-semibold text-white hover:bg-nvr-cyan/90 disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-nvr-cyan",
118
+ children: [
119
+ /* @__PURE__ */ t(v, { className: "h-3.5 w-3.5" }),
120
+ s.isPending ? "Sending…" : "Send"
121
+ ]
122
+ }
123
+ )
124
+ ] })
125
+ ]
126
+ }
127
+ )
128
+ }
129
+ )
130
+ ]
131
+ }
132
+ );
133
+ }
134
+ export {
135
+ L as SendViewButton
136
+ };
@@ -0,0 +1,147 @@
1
+ import { jsx as r, jsxs as d } from "react/jsx-runtime";
2
+ import { ArrowUpRight as g, X as b } from "lucide-react";
3
+ import { useState as v, useRef as w, useCallback as k, useEffect as N } from "react";
4
+ import { useNivaroClient as y } from "../../context.js";
5
+ import { post as C, get as _ } from "../../lib/commands.js";
6
+ import { useLiveEvent as R } from "../../lib/live.js";
7
+ import { resolveNotificationTargetFor as j, runNotificationTarget as A } from "../../lib/notification-target.js";
8
+ import { senderLead as U } from "../../lib/send-view.js";
9
+ import { UserAvatar as L } from "../UserAvatar.js";
10
+ const B = 3, E = "nvr-sent-views";
11
+ function I(m) {
12
+ var i;
13
+ const s = m.trim().split(/\s+/).filter(Boolean);
14
+ return ((((i = s[0]) == null ? void 0 : i[0]) ?? "") + (s.length > 1 ? s[s.length - 1][0] ?? "" : "")).toUpperCase();
15
+ }
16
+ function z({
17
+ routes: m,
18
+ onNavigate: s
19
+ }) {
20
+ const i = y(), [u, p] = v([]), c = w(null), o = k((e, n = !0) => {
21
+ var a;
22
+ if (p((t) => t.filter((l) => l.id !== e)), n)
23
+ try {
24
+ (a = c.current) == null || a.postMessage({ dismiss: e });
25
+ } catch {
26
+ }
27
+ }, []);
28
+ if (N(() => {
29
+ if (typeof BroadcastChannel > "u") return;
30
+ const e = new BroadcastChannel(E);
31
+ return c.current = e, e.onmessage = (n) => {
32
+ var t;
33
+ const a = (t = n.data) == null ? void 0 : t.dismiss;
34
+ typeof a == "string" && o(a, !1);
35
+ }, () => {
36
+ e.close(), c.current = null;
37
+ };
38
+ }, [o]), R(
39
+ "view:sent",
40
+ (e) => {
41
+ const n = typeof (e == null ? void 0 : e.id) == "string" ? e.id : null;
42
+ n && i.request(_(`/send-view/${encodeURIComponent(n)}`)).then((a) => {
43
+ const t = a.data;
44
+ t != null && t.id && p(
45
+ (l) => l.some((h) => h.id === t.id) ? l : [t, ...l].slice(0, B)
46
+ );
47
+ }).catch(() => {
48
+ });
49
+ },
50
+ { includeOwn: !0 }
51
+ ), u.length === 0) return null;
52
+ const f = (e) => {
53
+ o(e.id), i.request(C(`/send-view/${encodeURIComponent(e.id)}/later`)).catch(() => {
54
+ });
55
+ }, x = (e) => {
56
+ const n = j({ target: e.target }, m);
57
+ o(e.id), A(n, s);
58
+ };
59
+ return /* @__PURE__ */ r(
60
+ "section",
61
+ {
62
+ "aria-label": "Views sent to you",
63
+ className: "pointer-events-none fixed bottom-20 right-4 z-[90] flex w-[min(22rem,calc(100vw-2rem))] flex-col gap-2",
64
+ children: u.map((e) => /* @__PURE__ */ d(
65
+ "div",
66
+ {
67
+ "data-sent-view-card": e.id,
68
+ className: "nvr-rise-in pointer-events-auto flex gap-2.5 rounded-lg border border-slate-200 bg-white p-3 shadow-[0_6px_20px_-8px_rgba(15,23,42,0.25)] dark:border-border dark:bg-card dark:shadow-[0_6px_20px_-8px_rgba(0,0,0,0.6)]",
69
+ children: [
70
+ /* @__PURE__ */ r(
71
+ L,
72
+ {
73
+ userId: e.from.id,
74
+ alt: "",
75
+ className: "mt-0.5 h-7 w-7 shrink-0 rounded-full object-cover",
76
+ fallback: /* @__PURE__ */ r("span", { className: "mt-0.5 inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-slate-200 text-[10.5px] font-semibold text-slate-600 dark:bg-slate-700 dark:text-slate-200", children: I(e.from.name) })
77
+ }
78
+ ),
79
+ /* @__PURE__ */ d("div", { className: "min-w-0 flex-1", children: [
80
+ /* @__PURE__ */ r("p", { className: "text-[11.5px] text-slate-500 dark:text-slate-400", children: U(e.from.name) }),
81
+ /* @__PURE__ */ r(
82
+ "p",
83
+ {
84
+ className: "truncate text-[13px] font-semibold text-slate-800 dark:text-slate-100",
85
+ title: e.title,
86
+ children: e.title
87
+ }
88
+ ),
89
+ e.summary && /* @__PURE__ */ r(
90
+ "p",
91
+ {
92
+ className: "truncate text-[12px] text-slate-600 dark:text-slate-300",
93
+ title: e.summary,
94
+ children: e.summary
95
+ }
96
+ ),
97
+ e.note && /* @__PURE__ */ d("p", { className: "mt-1 line-clamp-2 text-[12px] italic text-slate-600 dark:text-slate-300", children: [
98
+ "“",
99
+ e.note,
100
+ "”"
101
+ ] }),
102
+ /* @__PURE__ */ d("div", { className: "mt-2 flex items-center gap-2", children: [
103
+ /* @__PURE__ */ d(
104
+ "button",
105
+ {
106
+ type: "button",
107
+ onClick: () => x(e),
108
+ "data-sent-view-open": "",
109
+ className: "inline-flex h-7 items-center gap-1 rounded-md bg-nvr-cyan px-2.5 text-[12px] font-semibold text-white hover:bg-nvr-cyan/90",
110
+ children: [
111
+ "Open",
112
+ /* @__PURE__ */ r(g, { className: "h-3.5 w-3.5" })
113
+ ]
114
+ }
115
+ ),
116
+ /* @__PURE__ */ r(
117
+ "button",
118
+ {
119
+ type: "button",
120
+ onClick: () => f(e),
121
+ "data-tip": "Keep it in your notifications",
122
+ className: "h-7 rounded-md px-2 text-[12px] font-medium text-slate-500 hover:bg-slate-100 hover:text-slate-700 dark:text-slate-400 dark:hover:bg-muted dark:hover:text-slate-200",
123
+ children: "Later"
124
+ }
125
+ )
126
+ ] })
127
+ ] }),
128
+ /* @__PURE__ */ r(
129
+ "button",
130
+ {
131
+ type: "button",
132
+ "aria-label": "Dismiss",
133
+ onClick: () => o(e.id),
134
+ className: "-mr-1 -mt-1 flex h-6 w-6 shrink-0 items-center justify-center rounded text-slate-400 hover:bg-slate-100 hover:text-slate-600 dark:hover:bg-muted dark:hover:text-slate-300",
135
+ children: /* @__PURE__ */ r(b, { className: "h-3.5 w-3.5" })
136
+ }
137
+ )
138
+ ]
139
+ },
140
+ e.id
141
+ ))
142
+ }
143
+ );
144
+ }
145
+ export {
146
+ z as SentViewCards
147
+ };
@@ -70,6 +70,7 @@ function xe({
70
70
  {
71
71
  type: "button",
72
72
  "data-report-problem": !0,
73
+ "data-floating-help": !0,
73
74
  "data-nvr-recording-hide": !0,
74
75
  onClick: () => void j(),
75
76
  title: "Report a problem",