@nivaro/react 0.3.116 → 0.3.118

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 (142) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +140 -14
  4. package/dist/index.js +488 -485
  5. package/dist/shared/components/ActivityEntry.js +130 -125
  6. package/dist/shared/components/AgentPresenceChip.js +36 -26
  7. package/dist/shared/components/CellCopyLayer.js +50 -45
  8. package/dist/shared/components/CollectionBrowserView.js +3855 -3785
  9. package/dist/shared/components/FilePreviewLightbox.js +96 -58
  10. package/dist/shared/components/InStep.js +18 -17
  11. package/dist/shared/components/ItemEditForm.js +4220 -4175
  12. package/dist/shared/components/JobsTray.js +8 -8
  13. package/dist/shared/components/LiveNewMatchesPill.js +21 -14
  14. package/dist/shared/components/LiveOffNote.js +3 -2
  15. package/dist/shared/components/LiveRowMark.js +53 -23
  16. package/dist/shared/components/LiveTraceView.js +162 -123
  17. package/dist/shared/components/MyWorkView.js +320 -299
  18. package/dist/shared/components/NotificationBell.js +14 -14
  19. package/dist/shared/components/OverflowRail.js +1 -1
  20. package/dist/shared/components/PageRenderer.js +120 -116
  21. package/dist/shared/components/ProfileView.js +203 -202
  22. package/dist/shared/components/RealtimeStatusBanner.js +31 -29
  23. package/dist/shared/components/RecordDrilldownSheet.js +7 -7
  24. package/dist/shared/components/RecordHoverCard.js +102 -84
  25. package/dist/shared/components/RecordReadView.js +146 -146
  26. package/dist/shared/components/ReportView.js +1086 -1091
  27. package/dist/shared/components/ScreenRefreshButton.js +34 -32
  28. package/dist/shared/components/TipLayer.js +65 -58
  29. package/dist/shared/components/WidgetImageMenu.js +83 -43
  30. package/dist/shared/components/activity/RecordActivityStream.js +175 -173
  31. package/dist/shared/components/bulk/BulkSelectionNotices.js +142 -119
  32. package/dist/shared/components/cbv/column-totals.js +62 -57
  33. package/dist/shared/components/change-proposals/ChangeProposalsPanel.js +158 -143
  34. package/dist/shared/components/change-proposals/ProposeChangeButton.js +17 -11
  35. package/dist/shared/components/change-proposals/ProposeChangeDialog.js +201 -173
  36. package/dist/shared/components/charts/category-axis.js +93 -0
  37. package/dist/shared/components/chat/ChatAnalyticsView.js +27 -27
  38. package/dist/shared/components/chat/HuddleAnalyticsTab.js +17 -17
  39. package/dist/shared/components/collections-directory/CollectionsToolbar.js +39 -41
  40. package/dist/shared/components/collections-directory/page-model.js +72 -67
  41. package/dist/shared/components/integrations/RecordIntegrationPreview.js +48 -56
  42. package/dist/shared/components/integrations/SendStatus.js +65 -59
  43. package/dist/shared/components/integrations/console/ReadyToSendView.js +275 -209
  44. package/dist/shared/components/integrations/console/SignalCard.js +237 -230
  45. package/dist/shared/components/item-edit/CatalogPickerField.js +227 -205
  46. package/dist/shared/components/item-edit/ChangedAfterApprovalBadge.js +131 -92
  47. package/dist/shared/components/item-edit/CloneDialog.js +191 -161
  48. package/dist/shared/components/item-edit/DerivedCauseNote.js +44 -30
  49. package/dist/shared/components/item-edit/DraftRecoveryBanner.js +153 -134
  50. package/dist/shared/components/item-edit/FieldComments.js +54 -53
  51. package/dist/shared/components/item-edit/FieldPointer.js +82 -67
  52. package/dist/shared/components/item-edit/FieldRow.js +106 -100
  53. package/dist/shared/components/item-edit/FieldSourceBadge.js +58 -56
  54. package/dist/shared/components/item-edit/FilePickerField.js +452 -387
  55. package/dist/shared/components/item-edit/HeaderSummaryChip.js +78 -56
  56. package/dist/shared/components/item-edit/HeaderTools.js +94 -85
  57. package/dist/shared/components/item-edit/InlineTableField.js +1242 -1218
  58. package/dist/shared/components/item-edit/ListNeighborNav.js +47 -50
  59. package/dist/shared/components/item-edit/LiveTraceSheet.js +15 -10
  60. package/dist/shared/components/item-edit/MembershipSetField.js +285 -254
  61. package/dist/shared/components/item-edit/OutboxReviewTray.js +155 -144
  62. package/dist/shared/components/item-edit/QueueReturnChip.js +15 -36
  63. package/dist/shared/components/item-edit/RecalcValue.js +57 -32
  64. package/dist/shared/components/item-edit/RecordHelpChip.js +21 -22
  65. package/dist/shared/components/item-edit/RecordLiveSync.js +283 -231
  66. package/dist/shared/components/item-edit/RelationCombobox.js +439 -393
  67. package/dist/shared/components/item-edit/RemoteChangeUi.js +292 -224
  68. package/dist/shared/components/item-edit/RemoteUploads.js +26 -20
  69. package/dist/shared/components/item-edit/RemovedLineNote.js +77 -67
  70. package/dist/shared/components/item-edit/RichTextEditorImpl.js +184 -179
  71. package/dist/shared/components/item-edit/ScheduledChangeChip.js +168 -134
  72. package/dist/shared/components/item-edit/SectionPresence.js +18 -10
  73. package/dist/shared/components/item-edit/SplitLinesButton.js +163 -139
  74. package/dist/shared/components/item-edit/UserChip.js +1 -1
  75. package/dist/shared/components/item-edit/file-live.js +69 -54
  76. package/dist/shared/components/item-edit/layout-switch.js +98 -89
  77. package/dist/shared/components/item-edit/partner-needs.js +12 -12
  78. package/dist/shared/components/item-edit/removed-line.js +31 -25
  79. package/dist/shared/components/layout-editor/pickers/field-picker.js +112 -104
  80. package/dist/shared/components/list/ListViewers.js +46 -35
  81. package/dist/shared/components/notifications/NotificationCenterView.js +479 -437
  82. package/dist/shared/components/panels/AccessDeniedPanel.js +176 -101
  83. package/dist/shared/components/panels/AlertBanners.js +82 -72
  84. package/dist/shared/components/panels/BranchLanes.js +22 -22
  85. package/dist/shared/components/panels/CommentImages.js +123 -102
  86. package/dist/shared/components/panels/CommentPanel.js +186 -185
  87. package/dist/shared/components/panels/ExternalRequestsChip.js +111 -119
  88. package/dist/shared/components/panels/OwnerOpenedLine.js +31 -24
  89. package/dist/shared/components/panels/PipelinePanel.js +2037 -1885
  90. package/dist/shared/components/panels/ResubmissionDiff.js +163 -142
  91. package/dist/shared/components/pipeline/BindingStartStateSettings.js +163 -0
  92. package/dist/shared/components/pipeline/OwnerMatrixSheet.js +400 -288
  93. package/dist/shared/components/pipeline/PipelineEditorView.js +320 -299
  94. package/dist/shared/components/profile/AgentNameField.js +107 -81
  95. package/dist/shared/components/profile/AgentsPanel.js +184 -184
  96. package/dist/shared/components/profile/PersonAccess.js +599 -495
  97. package/dist/shared/components/profile/SignInTroubleshooter.js +160 -127
  98. package/dist/shared/components/profile/SignedInDevices.js +17 -17
  99. package/dist/shared/components/profile/primitives.js +1 -1
  100. package/dist/shared/components/queue/OwnerAvatars.js +91 -54
  101. package/dist/shared/components/queue/QueueTeamStrip.js +56 -46
  102. package/dist/shared/components/queue/QueueWorklist.js +1002 -983
  103. package/dist/shared/components/support/AssignRules.js +1733 -0
  104. package/dist/shared/components/support/PersonPick.js +88 -0
  105. package/dist/shared/components/support/RequestList.js +790 -0
  106. package/dist/shared/components/support/ScreenShare.js +158 -152
  107. package/dist/shared/components/support/SupportRequestDialog.js +50 -48
  108. package/dist/shared/components/support/SupportView.js +140 -246
  109. package/dist/shared/components/support/TicketDetailSheet.js +82 -75
  110. package/dist/shared/components/support/TicketSlowScreens.js +9 -9
  111. package/dist/shared/components/support/assign-rules-text.js +171 -0
  112. package/dist/shared/components/support/support-list.js +125 -0
  113. package/dist/shared/components/ui/SimpleSelect.js +28 -20
  114. package/dist/shared/components/ui/checkbox.js +6 -6
  115. package/dist/shared/components/ui/select.js +43 -39
  116. package/dist/shared/components/ui/sheet.js +9 -9
  117. package/dist/shared/components/ui/switch.js +12 -11
  118. package/dist/shared/components/watch-list/WatchDock.js +532 -459
  119. package/dist/shared/components/watch-list/WatchExtras.js +332 -286
  120. package/dist/shared/components/watch-list/WatchRows.js +164 -140
  121. package/dist/shared/lib/activity-sentence.js +103 -91
  122. package/dist/shared/lib/agent-presence.js +27 -21
  123. package/dist/shared/lib/approval-progress.js +2 -2
  124. package/dist/shared/lib/copy-rules.js +31 -24
  125. package/dist/shared/lib/derived-causes.js +113 -78
  126. package/dist/shared/lib/grid-cursors.js +26 -26
  127. package/dist/shared/lib/label-flash.js +27 -0
  128. package/dist/shared/lib/list-return.js +137 -125
  129. package/dist/shared/lib/live-deltas.js +40 -34
  130. package/dist/shared/lib/live-groups.js +56 -52
  131. package/dist/shared/lib/live-preference.js +64 -59
  132. package/dist/shared/lib/live-screen.js +223 -192
  133. package/dist/shared/lib/partner-failure.js +11 -11
  134. package/dist/shared/lib/rollup-recalc.js +68 -64
  135. package/dist/shared/lib/screen-refresh.js +74 -68
  136. package/dist/shared/lib/screen-share.js +108 -104
  137. package/dist/shared/lib/send-status.js +77 -61
  138. package/dist/shared/lib/text-diff-window.js +29 -0
  139. package/dist/shared/lib/use-query-entry.js +17 -0
  140. package/dist/shared/lib/watch-list.js +210 -209
  141. package/dist/shared/lib/widget-image-render.js +72 -49
  142. package/package.json +1 -1
@@ -1,17 +1,19 @@
1
- import { jsxs as n, jsx as t } from "react/jsx-runtime";
2
- import { Users as I, History as M, ExternalLink as R } from "lucide-react";
3
- import { useMemo as S, useState as $ } from "react";
4
- import { useActorNames as _ } from "../../lib/live-list.js";
5
- import { openNoticeText as E, changedNoticeText as H, changeLineText as B } from "../../lib/selection-watch.js";
6
- import { formatRelative as F } from "../../lib/utils.js";
7
- import { LiveCount as C } from "../LiveCount.js";
8
- const w = {
1
+ import { jsxs as t, jsx as r } from "react/jsx-runtime";
2
+ import { Users as B, History as E, ExternalLink as H } from "lucide-react";
3
+ import { useMemo as T, useState as L } from "react";
4
+ import { useActorNames as K } from "../../lib/live-list.js";
5
+ import { openNoticeText as F, changedNoticeText as P, changeLineText as U } from "../../lib/selection-watch.js";
6
+ import { formatRelative as q } from "../../lib/utils.js";
7
+ import { LiveCount as A } from "../LiveCount.js";
8
+ const S = {
9
9
  dark: {
10
10
  line: "text-slate-200 dark:text-foreground",
11
11
  soft: "text-slate-400 dark:text-muted-foreground",
12
12
  dot: "bg-amber-300 dark:bg-amber-400",
13
- btn: "h-7 rounded-md px-2 text-[12px] font-medium text-slate-200 hover:bg-white/10 hover:text-white dark:text-foreground dark:hover:bg-muted",
14
- btnStrong: "h-7 rounded-md border border-white/20 px-2.5 text-[12px] font-medium text-white hover:bg-white/10 dark:border-border dark:text-foreground dark:hover:bg-muted",
13
+ // Scoped choices read as buttons (a quiet outline), never bare text; Keep all is the
14
+ // filled one.
15
+ btn: "h-7 shrink-0 whitespace-nowrap rounded-md border border-white/15 px-2.5 text-[12px] font-medium text-slate-200 hover:border-white/30 hover:bg-white/10 hover:text-white dark:border-border dark:text-foreground dark:hover:bg-muted",
16
+ btnStrong: "h-7 shrink-0 whitespace-nowrap rounded-md border border-white/25 bg-white/10 px-2.5 text-[12px] font-medium text-white hover:bg-white/20 dark:border-border dark:bg-muted dark:text-foreground dark:hover:bg-muted/70",
15
17
  list: "border-white/10 dark:border-border",
16
18
  link: "text-[#7fe7ff] hover:text-white dark:text-nvr-cyan dark:hover:text-foreground"
17
19
  },
@@ -19,75 +21,96 @@ const w = {
19
21
  line: "text-slate-700 dark:text-slate-200",
20
22
  soft: "text-slate-500 dark:text-slate-400",
21
23
  dot: "bg-amber-500 dark:bg-amber-400",
22
- btn: "h-7 rounded-md px-2 text-[12px] font-medium text-slate-600 hover:bg-slate-100 dark:text-slate-300 dark:hover:bg-muted",
23
- btnStrong: "h-7 rounded-md border border-slate-200 px-2.5 text-[12px] font-medium text-slate-700 hover:bg-slate-50 dark:border-border dark:text-slate-200 dark:hover:bg-muted",
24
+ btn: "h-7 shrink-0 whitespace-nowrap rounded-md border border-slate-200 px-2.5 text-[12px] font-medium text-slate-600 hover:bg-slate-50 hover:text-slate-800 dark:border-border dark:text-slate-300 dark:hover:bg-muted",
25
+ btnStrong: "h-7 shrink-0 whitespace-nowrap rounded-md border border-slate-300 bg-white px-2.5 text-[12px] font-medium text-slate-800 shadow-sm hover:bg-slate-50 dark:border-border dark:bg-muted dark:text-slate-100 dark:hover:bg-muted/70",
24
26
  list: "border-slate-100 dark:border-border",
25
27
  link: "text-nvr-navy hover:text-nvr-cyan dark:text-nvr-cyan dark:hover:text-foreground"
26
28
  }
27
29
  };
28
- function T({
29
- tone: s,
30
- icon: l,
31
- text: r,
32
- children: i,
33
- data: o
30
+ function I({
31
+ tone: i,
32
+ icon: o,
33
+ text: s,
34
+ children: n,
35
+ data: l
34
36
  }) {
35
- const d = w[s];
36
- return /* @__PURE__ */ n(
37
+ const d = S[i];
38
+ return /* @__PURE__ */ t(
37
39
  "div",
38
40
  {
39
- [o]: "",
41
+ [l]: "",
40
42
  role: "status",
41
43
  className: "nvr-fade-in flex min-h-7 flex-wrap items-center gap-x-3 gap-y-1",
42
44
  children: [
43
- /* @__PURE__ */ n("span", { className: "flex min-w-0 flex-1 basis-[15rem] items-start gap-2", children: [
44
- /* @__PURE__ */ t("span", { "aria-hidden": !0, className: `mt-[7px] h-1.5 w-1.5 shrink-0 rounded-full ${d.dot}` }),
45
- /* @__PURE__ */ t("span", { "aria-hidden": !0, className: `mt-[2px] shrink-0 ${d.soft}`, children: l }),
46
- /* @__PURE__ */ t("span", { className: `min-w-0 text-[12.5px] leading-5 ${d.line}`, children: r })
45
+ /* @__PURE__ */ t("span", { className: "flex min-w-0 flex-1 basis-[15rem] items-start gap-2", children: [
46
+ /* @__PURE__ */ r("span", { "aria-hidden": !0, className: `mt-[7px] h-1.5 w-1.5 shrink-0 rounded-full ${d.dot}` }),
47
+ /* @__PURE__ */ r("span", { "aria-hidden": !0, className: `mt-[2px] shrink-0 ${d.soft}`, children: o }),
48
+ /* @__PURE__ */ r("span", { className: `min-w-0 text-[12.5px] leading-5 ${d.line}`, children: s })
47
49
  ] }),
48
- /* @__PURE__ */ t("span", { className: "ml-auto flex shrink-0 items-center gap-1", children: i })
50
+ /* @__PURE__ */ r("span", { className: "ml-auto flex shrink-0 items-center gap-1", children: n })
49
51
  ]
50
52
  }
51
53
  );
52
54
  }
53
- function P({
54
- tone: s,
55
- total: l,
56
- open: r,
57
- changed: i,
58
- labelOf: o,
55
+ function X({
56
+ tone: i,
57
+ total: o,
58
+ open: s,
59
+ changed: n,
60
+ labelOf: l,
59
61
  onSkip: d,
60
- onAcknowledgeChanged: p,
61
- onOpenRecord: m,
62
- framed: c
62
+ onAcknowledgeChanged: k,
63
+ onOpenRecord: c,
64
+ framed: p
63
65
  }) {
64
- const a = w[s], b = S(() => [...new Set(r.flatMap((e) => e.viewerIds))], [r]), N = _(b), x = S(
65
- () => r.map((e) => {
66
- const h = e.viewerIds.map((v) => N.get(v)).filter((v) => !!v), A = e.lockName && !h.includes(e.lockName) ? [e.lockName, ...h] : h;
66
+ const a = S[i], f = T(() => [...new Set(s.flatMap((e) => e.viewerIds))], [s]), $ = K(f), x = T(
67
+ () => s.map((e) => {
68
+ const b = e.viewerIds.map((y) => $.get(y)).filter((y) => !!y), R = e.lockName && !b.includes(e.lockName) ? [e.lockName, ...b] : b;
67
69
  return {
68
70
  key: e.key,
69
- names: A,
70
- unnamed: Math.max(0, e.viewerCount - h.length),
71
+ names: R,
72
+ unnamed: Math.max(0, e.viewerCount - b.length),
71
73
  editing: !!e.lockName
72
74
  };
73
75
  }).filter((e) => e.editing || e.names.length > 0 || e.unnamed > 0),
74
- [r, N]
75
- ), f = x.map((e) => e.key).sort().join(","), [L, j] = $(""), [k, y] = $(!1), g = f && f !== L ? E(x, l) : null, u = H(i.length);
76
- return !g && !u ? null : /* @__PURE__ */ n(
76
+ [s, $]
77
+ ), g = x.map((e) => e.key).sort().join(","), [j, _] = L(""), [u, C] = L(!1), h = g && g !== j ? F(x, o) : null, m = P(n.length);
78
+ if (!h && !m) return null;
79
+ const M = () => {
80
+ h && _(g), m && (C(!1), k(n.map((e) => e.key)));
81
+ }, w = /* @__PURE__ */ t(
82
+ "button",
83
+ {
84
+ type: "button",
85
+ className: a.btnStrong,
86
+ onClick: M,
87
+ "data-bulk-keep-all": "",
88
+ "data-tip": "Keep every selected row and stop these notes. Nothing runs until you pick an action.",
89
+ children: [
90
+ "Keep all ",
91
+ o
92
+ ]
93
+ }
94
+ ), v = !(h && m) && !u, N = 25;
95
+ return /* @__PURE__ */ t(
77
96
  "div",
78
97
  {
79
98
  "data-bulk-notices": "",
80
- className: c ? "nvr-fade-in flex w-[min(640px,calc(100vw-2rem))] flex-col gap-1 rounded-xl border border-slate-200 bg-white px-3 py-2 shadow-[0_6px_20px_rgba(15,30,45,0.12)] dark:border-border dark:bg-card dark:shadow-none" : "flex w-full basis-full flex-col gap-1",
99
+ className: p ? "nvr-fade-in flex w-[min(640px,calc(100vw-2rem))] flex-col gap-1 rounded-xl border border-slate-200 bg-white px-3 py-2 shadow-[0_6px_20px_rgba(15,30,45,0.12)] dark:border-border dark:bg-card dark:shadow-none" : (
100
+ // In a full-width bar the block keeps a reading width, so each choice sits beside
101
+ // its sentence (it ended ~1,100 px away on a wide list page).
102
+ "flex w-full max-w-[760px] basis-full flex-col gap-1"
103
+ ),
81
104
  children: [
82
- g && /* @__PURE__ */ n(
83
- T,
105
+ h && /* @__PURE__ */ t(
106
+ I,
84
107
  {
85
- tone: s,
86
- icon: /* @__PURE__ */ t(I, { className: "h-3.5 w-3.5" }),
87
- text: g,
108
+ tone: i,
109
+ icon: /* @__PURE__ */ r(B, { className: "h-3.5 w-3.5" }),
110
+ text: h,
88
111
  data: "data-bulk-open-notice",
89
112
  children: [
90
- /* @__PURE__ */ n(
113
+ /* @__PURE__ */ t(
91
114
  "button",
92
115
  {
93
116
  type: "button",
@@ -100,112 +123,112 @@ function P({
100
123
  ]
101
124
  }
102
125
  ),
103
- /* @__PURE__ */ t("button", { type: "button", className: a.btnStrong, onClick: () => j(f), children: "Continue" })
126
+ v && w
104
127
  ]
105
128
  }
106
129
  ),
107
- u && /* @__PURE__ */ n(
108
- T,
130
+ m && /* @__PURE__ */ t(
131
+ I,
109
132
  {
110
- tone: s,
111
- icon: /* @__PURE__ */ t(M, { className: "h-3.5 w-3.5" }),
112
- text: u,
133
+ tone: i,
134
+ icon: /* @__PURE__ */ r(E, { className: "h-3.5 w-3.5" }),
135
+ text: m,
113
136
  data: "data-bulk-changed-notice",
114
137
  children: [
115
- /* @__PURE__ */ t(
138
+ /* @__PURE__ */ r(
116
139
  "button",
117
140
  {
118
141
  type: "button",
119
142
  className: a.btn,
120
- "aria-expanded": k,
121
- onClick: () => y((e) => !e),
122
- children: k ? "Hide" : "Review"
143
+ "aria-expanded": u,
144
+ onClick: () => C((e) => !e),
145
+ children: u ? "Hide" : "Review"
123
146
  }
124
147
  ),
125
- /* @__PURE__ */ t(
126
- "button",
127
- {
128
- type: "button",
129
- className: a.btnStrong,
130
- onClick: () => {
131
- y(!1), p(i.map((e) => e.key));
132
- },
133
- children: "Continue"
134
- }
135
- )
148
+ v && w
136
149
  ]
137
150
  }
138
151
  ),
139
- u && k && /* @__PURE__ */ t(
152
+ m && u && // Capped: the bar is pinned to the bottom of the screen, so the list scrolls inside
153
+ // itself (never past ~40% of the screen) instead of growing the bar off the top.
154
+ /* @__PURE__ */ t(
140
155
  "ul",
141
156
  {
142
157
  "data-bulk-changed-list": "",
143
- className: `ml-[22px] max-h-40 overflow-y-auto border-l pl-3 text-[12px] ${a.list}`,
144
- children: i.map((e) => /* @__PURE__ */ n("li", { className: "flex min-w-0 items-baseline gap-2 py-0.5", children: [
145
- /* @__PURE__ */ n("span", { className: "flex min-w-0 flex-1 flex-col sm:flex-row sm:items-baseline sm:gap-2", children: [
146
- /* @__PURE__ */ t("span", { className: `min-w-0 truncate font-medium ${a.line}`, children: e.label ?? (o == null ? void 0 : o(e.key)) ?? `#${e.id}` }),
147
- /* @__PURE__ */ n("span", { className: `min-w-0 truncate ${a.soft}`, children: [
148
- B(e),
149
- " · ",
150
- F(e.at)
151
- ] })
152
- ] }),
153
- m && !e.deleted && /* @__PURE__ */ n(
154
- "button",
155
- {
156
- type: "button",
157
- onClick: () => m({ collection: e.collection, id: e.id }),
158
- className: `ml-auto inline-flex shrink-0 items-center gap-1 ${a.link}`,
159
- children: [
160
- "Open",
161
- /* @__PURE__ */ t(R, { "aria-hidden": !0, className: "h-3 w-3" })
162
- ]
163
- }
164
- )
165
- ] }, e.key))
158
+ className: `ml-[22px] max-h-[min(40vh,15rem)] overflow-y-auto overscroll-contain border-l pl-3 text-[12px] ${a.list}`,
159
+ children: [
160
+ n.slice(0, N).map((e) => /* @__PURE__ */ t("li", { className: "flex min-w-0 items-baseline gap-2 py-0.5", children: [
161
+ /* @__PURE__ */ t("span", { className: "flex min-w-0 flex-1 flex-col sm:flex-row sm:items-baseline sm:gap-2", children: [
162
+ /* @__PURE__ */ r("span", { className: `min-w-0 truncate font-medium ${a.line}`, children: e.label ?? (l == null ? void 0 : l(e.key)) ?? `#${e.id}` }),
163
+ /* @__PURE__ */ t("span", { className: `min-w-0 truncate ${a.soft}`, children: [
164
+ U(e),
165
+ " · ",
166
+ q(e.at)
167
+ ] })
168
+ ] }),
169
+ c && !e.deleted && /* @__PURE__ */ t(
170
+ "button",
171
+ {
172
+ type: "button",
173
+ onClick: () => c({ collection: e.collection, id: e.id }),
174
+ className: `ml-auto inline-flex shrink-0 items-center gap-1 ${a.link}`,
175
+ children: [
176
+ "Open",
177
+ /* @__PURE__ */ r(H, { "aria-hidden": !0, className: "h-3 w-3" })
178
+ ]
179
+ }
180
+ )
181
+ ] }, e.key)),
182
+ n.length > N && /* @__PURE__ */ t("li", { className: `py-0.5 ${a.soft}`, "data-bulk-changed-more": "", children: [
183
+ "+",
184
+ n.length - N,
185
+ " more changed"
186
+ ] })
187
+ ]
166
188
  }
167
- )
189
+ ),
190
+ !v && /* @__PURE__ */ r("div", { className: "flex justify-end pt-0.5", "data-bulk-keep-row": "", children: w })
168
191
  ]
169
192
  }
170
193
  );
171
194
  }
172
- function Q({
173
- tone: s,
174
- total: l,
175
- sums: r,
176
- known: i,
177
- labelOf: o,
195
+ function Y({
196
+ tone: i,
197
+ total: o,
198
+ sums: s,
199
+ known: n,
200
+ labelOf: l,
178
201
  format: d,
179
- noun: p = "item"
202
+ noun: k = "item"
180
203
  }) {
181
- const m = w[s], c = /* @__PURE__ */ n(
204
+ const c = S[i], p = /* @__PURE__ */ t(
182
205
  "span",
183
206
  {
184
- className: s === "dark" ? "text-[13px] font-medium text-nvr-cyan dark:text-nvr-cyan" : "text-[12px] font-semibold text-slate-700 dark:text-slate-200",
207
+ className: i === "dark" ? "text-[13px] font-medium text-nvr-cyan dark:text-nvr-cyan" : "text-[12px] font-semibold text-slate-700 dark:text-slate-200",
185
208
  children: [
186
- /* @__PURE__ */ t(C, { value: l }),
209
+ /* @__PURE__ */ r(A, { value: o }),
187
210
  " ",
188
- p,
189
- l === 1 ? "" : "s",
211
+ k,
212
+ o === 1 ? "" : "s",
190
213
  " selected"
191
214
  ]
192
215
  }
193
216
  );
194
- return r.length === 0 ? c : /* @__PURE__ */ n("span", { "data-selection-figures": "", className: "inline-flex flex-wrap items-baseline gap-x-3", children: [
195
- c,
196
- r.slice(0, 3).map((a) => /* @__PURE__ */ n(
217
+ return s.length === 0 ? p : /* @__PURE__ */ t("span", { "data-selection-figures": "", className: "inline-flex flex-wrap items-baseline gap-x-3", children: [
218
+ p,
219
+ s.slice(0, 3).map((a) => /* @__PURE__ */ t(
197
220
  "span",
198
221
  {
199
222
  className: "inline-flex items-baseline gap-1.5 text-[12px]",
200
- "data-tip": i < l ? `Sum of the ${i} selected rows this list has shown` : `Sum of the ${a.counted} selected rows with a value`,
223
+ "data-tip": n < o ? `Sum of the ${n} selected rows this list has shown` : `Sum of the ${a.counted} selected rows with a value`,
201
224
  children: [
202
- /* @__PURE__ */ t("span", { className: m.soft, children: o(a.key) }),
203
- /* @__PURE__ */ t(
204
- C,
225
+ /* @__PURE__ */ r("span", { className: c.soft, children: l(a.key) }),
226
+ /* @__PURE__ */ r(
227
+ A,
205
228
  {
206
229
  value: a.sum,
207
- format: (b) => d(a.key, Number(b)),
208
- className: `tabular-nums font-medium ${m.line}`
230
+ format: (f) => d(a.key, Number(f)),
231
+ className: `tabular-nums font-medium ${c.line}`
209
232
  }
210
233
  )
211
234
  ]
@@ -215,6 +238,6 @@ function Q({
215
238
  ] });
216
239
  }
217
240
  export {
218
- P as BulkSelectionNotices,
219
- Q as SelectionFigures
241
+ X as BulkSelectionNotices,
242
+ Y as SelectionFigures
220
243
  };
@@ -1,4 +1,4 @@
1
- import { formatValue as S } from "../../lib/format-value.js";
1
+ import { formatValue as b } from "../../lib/format-value.js";
2
2
  const g = [
3
3
  { fn: "sum", label: "Sum", short: "Sum" },
4
4
  { fn: "avg", label: "Average", short: "Avg" },
@@ -6,63 +6,68 @@ const g = [
6
6
  { fn: "max", label: "Maximum", short: "Max" },
7
7
  { fn: "count", label: "Count (filled in)", short: "Count" }
8
8
  ];
9
- function b(e) {
9
+ function S(e) {
10
10
  return typeof e == "string" && g.some((n) => n.fn === e);
11
11
  }
12
12
  function v(e) {
13
13
  return /^[A-Za-z_][A-Za-z0-9_]*$/.test(e);
14
14
  }
15
- function w(e, n, t) {
15
+ function w(e, n) {
16
+ const t = /* @__PURE__ */ new Map();
17
+ for (const r of e) {
18
+ const o = t.get(r.fn) ?? [];
19
+ o.includes(r.key) || o.push(r.key), t.set(r.fn, o);
20
+ }
16
21
  return {
17
- [n]: e,
18
- ...t.search ? { search: t.search } : {},
19
- ...t.conditions ? { conditions: t.conditions } : {}
22
+ ...Object.fromEntries([...t].map(([r, o]) => [r, o.join(",")])),
23
+ ...n.search ? { search: n.search } : {},
24
+ ...n.conditions ? { conditions: n.conditions } : {}
20
25
  };
21
26
  }
22
- function M(e, n, t) {
23
- var i, l, c;
24
- const r = (c = (l = (i = e == null ? void 0 : e.data) == null ? void 0 : i[0]) == null ? void 0 : l[t]) == null ? void 0 : c[n];
27
+ function x(e, n, t) {
28
+ var s, l, c;
29
+ const r = (c = (l = (s = e == null ? void 0 : e.data) == null ? void 0 : s[0]) == null ? void 0 : l[t]) == null ? void 0 : c[n];
25
30
  if (r == null || r === "") return null;
26
31
  const o = Number(r);
27
32
  return Number.isFinite(o) ? o : null;
28
33
  }
29
- function $(e, n, t) {
30
- return n === "count" ? Math.round(e).toLocaleString("en-US") : (t == null ? void 0 : t.type) === "number" ? S(String(e), t) : (Math.round(e * 100) / 100).toLocaleString("en-US", { maximumFractionDigits: 2 });
34
+ function M(e, n, t) {
35
+ return n === "count" ? Math.round(e).toLocaleString("en-US") : (t == null ? void 0 : t.type) === "number" ? b(String(e), t) : (Math.round(e * 100) / 100).toLocaleString("en-US", { maximumFractionDigits: 2 });
31
36
  }
32
- const p = (e) => `nvr_cbv_totals_${e}`, _ = (e) => e === "off" || b(e);
33
- function k(e) {
34
- return y(p(e), v);
37
+ const p = (e) => `nvr_cbv_totals_${e}`, y = (e) => e === "off" || S(e);
38
+ function $(e) {
39
+ return _(p(e), v);
35
40
  }
36
- function z(e, n) {
37
- T(p(e), n);
41
+ function j(e, n) {
42
+ O(p(e), n);
38
43
  }
39
- function y(e, n) {
44
+ function _(e, n) {
40
45
  try {
41
46
  const t = localStorage.getItem(e), r = t ? JSON.parse(t) : null;
42
47
  if (!r || typeof r != "object") return {};
43
- const o = r.v === 2 && r.o && typeof r.o == "object" ? r.o : r, i = {};
44
- for (const [l, c] of Object.entries(o)) n(l) && _(c) && (i[l] = c);
45
- return i;
48
+ const o = r.v === 2 && r.o && typeof r.o == "object" ? r.o : r, s = {};
49
+ for (const [l, c] of Object.entries(o)) n(l) && y(c) && (s[l] = c);
50
+ return s;
46
51
  } catch {
47
52
  return {};
48
53
  }
49
54
  }
50
- function T(e, n) {
55
+ function O(e, n) {
51
56
  try {
52
57
  Object.keys(n).length === 0 ? localStorage.removeItem(e) : localStorage.setItem(e, JSON.stringify({ v: 2, o: n }));
53
58
  } catch {
54
59
  }
55
60
  }
56
- function j(e, n) {
61
+ function z(e, n) {
57
62
  const t = { ...e };
58
63
  for (const [r, o] of Object.entries(n))
59
64
  o === "off" ? delete t[r] : t[r] = o;
60
65
  return t;
61
66
  }
62
- function N(e, n, t) {
67
+ function F(e, n, t) {
63
68
  return { ...e, [n]: t ?? "off" };
64
69
  }
65
- function Z(e, n) {
70
+ function N(e, n) {
66
71
  const t = {};
67
72
  for (const [r, o] of Object.entries(e))
68
73
  (o === "off" ? !n[r] : n[r] === o) || (t[r] = o);
@@ -71,8 +76,8 @@ function Z(e, n) {
71
76
  function h(e) {
72
77
  return !e.computed_formula || !!e.computed_store;
73
78
  }
74
- const A = /* @__PURE__ */ new Set(["integer", "bigInteger", "biginteger", "decimal", "float"]);
75
- function O(e) {
79
+ const T = /* @__PURE__ */ new Set(["integer", "bigInteger", "biginteger", "decimal", "float"]);
80
+ function A(e) {
76
81
  const n = String(e ?? "").trim();
77
82
  if (!n) return null;
78
83
  let t = 0;
@@ -80,9 +85,9 @@ function O(e) {
80
85
  for (; t < n.length && /\s/.test(n[t]); ) t++;
81
86
  }, o = () => {
82
87
  r();
83
- const a = n.slice(t), s = /^item\.([A-Za-z_][A-Za-z0-9_]*)/.exec(a);
84
- if (s)
85
- return t += s[0].length, s[1];
88
+ const a = n.slice(t), i = /^item\.([A-Za-z_][A-Za-z0-9_]*)/.exec(a);
89
+ if (i)
90
+ return t += i[0].length, i[1];
86
91
  const u = /^\{\{\s*([A-Za-z_][A-Za-z0-9_.]*)\s*\}\}/.exec(a);
87
92
  if (u)
88
93
  return t += u[0].length, u[1];
@@ -93,21 +98,21 @@ function O(e) {
93
98
  return !d || !m ? null : (t += m[0].length, d);
94
99
  }
95
100
  return null;
96
- }, i = /* @__PURE__ */ new Map(), l = (a) => {
97
- let s = !0;
101
+ }, s = /* @__PURE__ */ new Map(), l = (a) => {
102
+ let i = !0;
98
103
  for (; ; ) {
99
104
  r();
100
105
  let u = a;
101
106
  if (n[t] === "+" || n[t] === "-")
102
107
  n[t] === "-" && (u = u === 1 ? -1 : 1), t++, r();
103
- else if (!s) return !1;
104
- if (s = !1, n[t] === "(") {
108
+ else if (!i) return !1;
109
+ if (i = !1, n[t] === "(") {
105
110
  if (t++, !l(u) || (r(), n[t] !== ")")) return !1;
106
111
  t++;
107
112
  } else {
108
113
  const f = o();
109
114
  if (!f) return !1;
110
- i.set(f, (i.get(f) ?? 0) + u);
115
+ s.set(f, (s.get(f) ?? 0) + u);
111
116
  }
112
117
  if (r(), t >= n.length || n[t] === ")") return !0;
113
118
  if (n[t] !== "+" && n[t] !== "-") return !1;
@@ -115,18 +120,18 @@ function O(e) {
115
120
  };
116
121
  if (!l(1) || (r(), t !== n.length)) return null;
117
122
  const c = [];
118
- for (const [a, s] of i)
119
- if (s === 1 || s === -1) c.push({ field: a, sign: s });
120
- else if (s !== 0) return null;
123
+ for (const [a, i] of s)
124
+ if (i === 1 || i === -1) c.push({ field: a, sign: i });
125
+ else if (i !== 0) return null;
121
126
  return c.length ? c : null;
122
127
  }
123
- function C(e, n) {
128
+ function Z(e, n) {
124
129
  if (h(e)) return { kind: "server" };
125
130
  if (e.computed_type !== "rollup") {
126
- const t = O(e.computed_formula ?? "");
131
+ const t = A(e.computed_formula ?? "");
127
132
  if (t != null && t.every((r) => {
128
133
  const o = n(r.field);
129
- return !!o && h(o) && A.has(String(o.type ?? ""));
134
+ return !!o && h(o) && T.has(String(o.type ?? ""));
130
135
  }))
131
136
  return { kind: "derived", terms: t };
132
137
  }
@@ -135,7 +140,7 @@ function C(e, n) {
135
140
  why: e.computed_type === "rollup" ? "Worked out from linked records each time the list is read, so it has no total." : "Calculated each time the list is read from a formula that does more than add and subtract stored columns, so it has no total."
136
141
  };
137
142
  }
138
- function F(e, n) {
143
+ function C(e, n) {
139
144
  let t = 0;
140
145
  for (const r of e) {
141
146
  const o = n(r.field);
@@ -145,27 +150,27 @@ function F(e, n) {
145
150
  return Math.round(t * 1e6) / 1e6;
146
151
  }
147
152
  function L(e, n, t) {
148
- var i;
149
- const r = ((i = g.find((l) => l.fn === e)) == null ? void 0 : i.label.toLowerCase()) ?? e, o = t == null ? "all matching records" : `all ${t.toLocaleString("en-US")} matching records`;
153
+ var s;
154
+ const r = ((s = g.find((l) => l.fn === e)) == null ? void 0 : s.label.toLowerCase()) ?? e, o = t == null ? "all matching records" : `all ${t.toLocaleString("en-US")} matching records`;
150
155
  return e === "count" ? `Records with ${n} filled in, across ${o}` : `${r.charAt(0).toUpperCase()}${r.slice(1)} of ${n} across ${o}`;
151
156
  }
152
157
  export {
153
158
  g as TOTAL_FNS,
154
- F as combineTerms,
155
- $ as formatTotal,
159
+ C as combineTerms,
160
+ M as formatTotal,
156
161
  h as isStoredField,
157
- b as isTotalFn,
158
- O as linearSumTerms,
159
- k as loadTotalOverrides,
160
- y as loadTotalOverridesAt,
161
- Z as overridesAfterSave,
162
- M as readTotal,
163
- z as rememberTotalOverrides,
164
- T as rememberTotalOverridesAt,
165
- N as setOverride,
166
- j as shownTotals,
162
+ S as isTotalFn,
163
+ A as linearSumTerms,
164
+ $ as loadTotalOverrides,
165
+ _ as loadTotalOverridesAt,
166
+ N as overridesAfterSave,
167
+ x as readTotal,
168
+ j as rememberTotalOverrides,
169
+ O as rememberTotalOverridesAt,
170
+ F as setOverride,
171
+ z as shownTotals,
167
172
  L as totalTip,
173
+ w as totalsBatchParams,
168
174
  v as totalsEligibleKey,
169
- w as totalsParams,
170
- C as totalsSupport
175
+ Z as totalsSupport
171
176
  };