@nivaro/react 0.3.139 → 0.3.141

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 (100) hide show
  1. package/dist/components/InlineGridField.js +95 -92
  2. package/dist/full.css +1 -1
  3. package/dist/hooks/useSessionRecorder.js +1 -1
  4. package/dist/index.d.ts +39 -2
  5. package/dist/shared/components/AudienceConfirmPanel.js +19 -19
  6. package/dist/shared/components/BroadcastView.js +213 -211
  7. package/dist/shared/components/CollectionBrowserView.js +2702 -2671
  8. package/dist/shared/components/ConfigHistory.js +45 -45
  9. package/dist/shared/components/ConformanceView.js +110 -110
  10. package/dist/shared/components/DataTable.js +51 -51
  11. package/dist/shared/components/FilePreviewLightbox.js +26 -25
  12. package/dist/shared/components/ItemEditForm.js +3475 -3458
  13. package/dist/shared/components/LiveCount.js +27 -23
  14. package/dist/shared/components/LiveTraceView.js +62 -61
  15. package/dist/shared/components/PageRenderer.js +422 -410
  16. package/dist/shared/components/ProfileView.js +199 -199
  17. package/dist/shared/components/QualityRulesView.js +70 -70
  18. package/dist/shared/components/QueryTable.js +131 -130
  19. package/dist/shared/components/RecordGraph.js +98 -98
  20. package/dist/shared/components/RecordReadView.js +287 -288
  21. package/dist/shared/components/ReportView.js +1279 -1259
  22. package/dist/shared/components/RowPresence.js +83 -76
  23. package/dist/shared/components/SlaRulesView.js +73 -74
  24. package/dist/shared/components/UnseenDot.js +183 -22
  25. package/dist/shared/components/WidgetSlot.js +73 -73
  26. package/dist/shared/components/ai/AiChart.js +36 -32
  27. package/dist/shared/components/ai/AiMarkdown.js +136 -129
  28. package/dist/shared/components/ai/TaskDo.js +87 -87
  29. package/dist/shared/components/ai/answer-formats.js +37 -30
  30. package/dist/shared/components/ai/call-log/format.js +17 -16
  31. package/dist/shared/components/bulk/BulkActionButtons.js +66 -66
  32. package/dist/shared/components/bulk/BulkFieldUpdate.js +59 -59
  33. package/dist/shared/components/bulk/BulkSelectionNotices.js +34 -34
  34. package/dist/shared/components/bulk/MessageStakeholders.js +31 -29
  35. package/dist/shared/components/bulk/PushBulkButtons.js +83 -82
  36. package/dist/shared/components/bulk/bulk-field-options.js +10 -10
  37. package/dist/shared/components/cbv/column-totals.js +53 -51
  38. package/dist/shared/components/chat/ChatAnalyticsView.js +87 -87
  39. package/dist/shared/components/collections-directory/CollectionsToolbar.js +18 -18
  40. package/dist/shared/components/command-center/announce.js +7 -6
  41. package/dist/shared/components/command-center/panels/AttentionPanel.js +32 -31
  42. package/dist/shared/components/command-center/panels/FlowPanel.js +29 -28
  43. package/dist/shared/components/command-center/panels/PeoplePanel.js +39 -39
  44. package/dist/shared/components/delegation/DelegationConsoleView.js +27 -27
  45. package/dist/shared/components/delivery-analytics/drill.js +32 -32
  46. package/dist/shared/components/imports/RunDetailSheet.js +1 -1
  47. package/dist/shared/components/integrations/IntegrationObligationsView.js +119 -119
  48. package/dist/shared/components/integrations/console/EventsView.js +35 -35
  49. package/dist/shared/components/integrations/console/FirefightView.js +15 -14
  50. package/dist/shared/components/integrations/console/PartnerDetail.js +78 -78
  51. package/dist/shared/components/integrations/console/ReadyToSendView.js +103 -103
  52. package/dist/shared/components/integrations/console/SignalCard.js +67 -67
  53. package/dist/shared/components/item-edit/CatalogPickerField.js +536 -527
  54. package/dist/shared/components/item-edit/ChangesTray.js +88 -74
  55. package/dist/shared/components/item-edit/FilePickerField.js +123 -123
  56. package/dist/shared/components/item-edit/GroupSection.js +301 -292
  57. package/dist/shared/components/item-edit/HeaderSummaryChip.js +54 -54
  58. package/dist/shared/components/item-edit/InlineGridField.js +45 -36
  59. package/dist/shared/components/item-edit/InlineTableField.js +1390 -1376
  60. package/dist/shared/components/item-edit/NestedRelationEditor.js +106 -99
  61. package/dist/shared/components/item-edit/RecordChatMentionsChip.js +11 -11
  62. package/dist/shared/components/item-edit/RecordRecapChanges.js +116 -74
  63. package/dist/shared/components/item-edit/RecordRecapStrip.js +148 -160
  64. package/dist/shared/components/item-edit/summary-layout-request.js +15 -0
  65. package/dist/shared/components/layout-editor/ai-forms/SlimPanel.js +43 -44
  66. package/dist/shared/components/layout-editor/parity-keys.json.js +1 -1
  67. package/dist/shared/components/layout-editor/settings/ResolveSettings.js +226 -157
  68. package/dist/shared/components/layout-editor/settings/WhoSection.js +53 -52
  69. package/dist/shared/components/layout-editor/settings/controls.js +98 -90
  70. package/dist/shared/components/layout-editor/settings/settings-registry.js +8 -0
  71. package/dist/shared/components/monitoring/ApiRequestLog.js +35 -35
  72. package/dist/shared/components/notifications/NotificationCenterView.js +268 -268
  73. package/dist/shared/components/ops-report/format.js +37 -36
  74. package/dist/shared/components/panels/ReferencedByPanel.js +21 -20
  75. package/dist/shared/components/panels/RevisionsPanel.js +306 -305
  76. package/dist/shared/components/pipeline/OwnerMatrixVersionsCard.js +12 -12
  77. package/dist/shared/components/pipeline/PipelineEditorView.js +483 -482
  78. package/dist/shared/components/pipeline/PipelineHealthCards.js +33 -32
  79. package/dist/shared/components/pipeline/TeamsView.js +189 -130
  80. package/dist/shared/components/profile/AgentsPanel.js +6 -6
  81. package/dist/shared/components/profile/DelegationCard.js +13 -12
  82. package/dist/shared/components/profile/PersonActivity.js +48 -48
  83. package/dist/shared/components/profile/PersonExtras.js +107 -107
  84. package/dist/shared/components/profile/PersonWeek.js +9 -9
  85. package/dist/shared/components/queue/QueueBulkBar.js +19 -18
  86. package/dist/shared/components/queue/QueueBulkMove.js +21 -20
  87. package/dist/shared/components/queue/QueueItemSheet.js +136 -131
  88. package/dist/shared/components/queue/QueueWorklist.js +884 -872
  89. package/dist/shared/components/queue/worklist-helpers.js +36 -21
  90. package/dist/shared/components/support/RequestList.js +123 -123
  91. package/dist/shared/components/support/SupportAnalytics.js +29 -29
  92. package/dist/shared/lib/activity-sentence.js +251 -229
  93. package/dist/shared/lib/format-value.js +5 -4
  94. package/dist/shared/lib/layout-resolve.js +64 -48
  95. package/dist/shared/lib/number-format.js +87 -0
  96. package/dist/shared/lib/number-kind.js +133 -0
  97. package/dist/shared/lib/utils.js +24 -20
  98. package/dist/shared/lib/watch-list.js +1 -1
  99. package/dist/shared/lib/widget-value-format.js +26 -12
  100. package/package.json +1 -1
@@ -1,26 +1,26 @@
1
- import { jsxs as s, Fragment as w, jsx as t } from "react/jsx-runtime";
2
- import { useQueryClient as D } from "@tanstack/react-query";
3
- import { Mail as q, X as $, History as P, ChevronDown as F } from "lucide-react";
4
- import { useState as v, useRef as N, useEffect as O } from "react";
5
- import { useNivaroClient as U } from "../../context.js";
6
- import { post as C, get as Q } from "../../lib/commands.js";
7
- import { cn as R, formatDateTime as T } from "../../lib/utils.js";
8
- import { RevisionsPanel as E } from "../panels/RevisionsPanel.js";
9
- import { RelativeTime as j } from "../RelativeTime.js";
1
+ import { jsxs as r, Fragment as v, jsx as n } from "react/jsx-runtime";
2
+ import { useQueryClient as j } from "@tanstack/react-query";
3
+ import { Mail as q, X as $, History as P, ChevronDown as D } from "lucide-react";
4
+ import { useState as x, useRef as N, useEffect as F } from "react";
5
+ import { useNivaroClient as O } from "../../context.js";
6
+ import { post as C, get as U } from "../../lib/commands.js";
7
+ import { cn as R } from "../../lib/utils.js";
8
+ import { RevisionsPanel as Q } from "../panels/RevisionsPanel.js";
9
+ import { RelativeTime as E } from "../RelativeTime.js";
10
10
  import { Button as K } from "../ui/button.js";
11
- import { Popover as L, PopoverTrigger as H, PopoverContent as z } from "../ui/popover.js";
12
- import { RecordRecapChangesList as A } from "./RecordRecapChanges.js";
11
+ import { Popover as H, PopoverTrigger as L, PopoverContent as T } from "../ui/popover.js";
12
+ import { RecapChangesPanel as z } from "./RecordRecapChanges.js";
13
13
  function B(e) {
14
14
  try {
15
- const n = new URLSearchParams(e).get("since");
16
- return !n || n.length > 40 || !Number.isFinite(Date.parse(n)) ? null : n;
15
+ const t = new URLSearchParams(e).get("since");
16
+ return !t || t.length > 40 || !Number.isFinite(Date.parse(t)) ? null : t;
17
17
  } catch {
18
18
  return null;
19
19
  }
20
20
  }
21
21
  function M(e) {
22
- const n = [];
23
- return e.moved_to && n.push(`moved to ${e.moved_to.label}`), e.field_changes > 0 && n.push(`${e.field_changes} field${e.field_changes === 1 ? "" : "s"} changed`), e.comments > 0 && n.push(`${e.comments} new comment${e.comments === 1 ? "" : "s"}`), n;
22
+ const t = [];
23
+ return e.moved_to && t.push(`moved to ${e.moved_to.label}`), e.field_changes > 0 && t.push(`${e.field_changes} field${e.field_changes === 1 ? "" : "s"} changed`), e.comments > 0 && t.push(`${e.comments} new comment${e.comments === 1 ? "" : "s"}`), t;
24
24
  }
25
25
  function X() {
26
26
  try {
@@ -31,178 +31,166 @@ function X() {
31
31
  }
32
32
  }
33
33
  function S(e) {
34
- const n = [];
35
- return e.comments > 0 && n.push(`${e.comments} new comment${e.comments === 1 ? "" : "s"}`), e.transitions > 0 && n.push(`${e.transitions} workflow transition${e.transitions === 1 ? "" : "s"}`), n.length ? n.join(" · ") : null;
34
+ const t = [];
35
+ return e.comments > 0 && t.push(`${e.comments} new comment${e.comments === 1 ? "" : "s"}`), e.transitions > 0 && t.push(`${e.transitions} workflow transition${e.transitions === 1 ? "" : "s"}`), t.length ? t.join(" · ") : null;
36
36
  }
37
37
  function _({
38
38
  collection: e,
39
- itemId: n,
40
- since: l,
39
+ itemId: t,
40
+ since: h,
41
41
  everyone: u,
42
- title: r,
43
- extras: h,
42
+ title: s,
43
+ extras: y,
44
44
  historyAvailable: a,
45
- onMarkSeen: p,
46
- tone: b,
47
- children: k
45
+ onMarkSeen: m,
46
+ tone: k,
47
+ children: b
48
48
  }) {
49
- const [f, d] = v(!1), [i, y] = v(null), x = N(null), c = N(null), o = D();
50
- return /* @__PURE__ */ s(w, { children: [
51
- /* @__PURE__ */ s(L, { open: f, onOpenChange: d, children: [
52
- /* @__PURE__ */ t(H, { asChild: !0, children: /* @__PURE__ */ s(
49
+ const [p, c] = x(!1), [i, w] = x(null), f = N(null), l = N(null), o = j();
50
+ return /* @__PURE__ */ r(v, { children: [
51
+ /* @__PURE__ */ r(H, { open: p, onOpenChange: c, children: [
52
+ /* @__PURE__ */ n(L, { asChild: !0, children: /* @__PURE__ */ r(
53
53
  "button",
54
54
  {
55
- ref: x,
55
+ ref: f,
56
56
  type: "button",
57
57
  className: R(
58
58
  "group flex min-w-0 flex-1 items-center gap-2.5 rounded-md px-2 py-1 text-left transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 motion-reduce:transition-none",
59
- b === "sky" ? "hover:bg-sky-100/80 focus-visible:ring-sky-400/60 data-[state=open]:bg-sky-100/80 dark:hover:bg-sky-500/15 dark:data-[state=open]:bg-sky-500/15" : "hover:bg-slate-200/50 focus-visible:ring-slate-400/50 data-[state=open]:bg-slate-200/50 dark:hover:bg-white/[0.06] dark:data-[state=open]:bg-white/[0.06]"
59
+ k === "sky" ? "hover:bg-sky-100/80 focus-visible:ring-sky-400/60 data-[state=open]:bg-sky-100/80 dark:hover:bg-sky-500/15 dark:data-[state=open]:bg-sky-500/15" : "hover:bg-slate-200/50 focus-visible:ring-slate-400/50 data-[state=open]:bg-slate-200/50 dark:hover:bg-white/[0.06] dark:data-[state=open]:bg-white/[0.06]"
60
60
  ),
61
61
  "data-recap-trigger": !0,
62
62
  children: [
63
- k,
64
- /* @__PURE__ */ t(
65
- F,
63
+ b,
64
+ /* @__PURE__ */ n(
65
+ D,
66
66
  {
67
67
  "aria-hidden": !0,
68
68
  className: R(
69
69
  "h-3.5 w-3.5 shrink-0 transition-transform duration-150 group-data-[state=open]:rotate-180 motion-reduce:transition-none",
70
- b === "sky" ? "text-sky-500" : "text-slate-400 dark:text-slate-500"
70
+ k === "sky" ? "text-sky-500" : "text-slate-400 dark:text-slate-500"
71
71
  )
72
72
  }
73
73
  )
74
74
  ]
75
75
  }
76
76
  ) }),
77
- /* @__PURE__ */ t(
78
- z,
77
+ /* @__PURE__ */ n(
78
+ T,
79
79
  {
80
80
  align: "start",
81
81
  side: "bottom",
82
82
  sideOffset: 6,
83
83
  collisionPadding: 16,
84
- "aria-label": r,
85
- onOpenAutoFocus: (m) => {
84
+ "aria-label": s,
85
+ onOpenAutoFocus: (d) => {
86
86
  var g;
87
- m.preventDefault(), (g = c.current) == null || g.focus();
87
+ d.preventDefault(), (g = l.current) == null || g.focus();
88
88
  },
89
89
  className: "w-[min(420px,calc(100vw-32px))] p-0 motion-reduce:animate-none",
90
90
  "data-recap-popover": !0,
91
- children: /* @__PURE__ */ s("div", { ref: c, tabIndex: -1, className: "outline-none", children: [
92
- /* @__PURE__ */ s("div", { className: "border-b border-slate-200/80 px-4 pb-2 pt-3 dark:border-border", children: [
93
- /* @__PURE__ */ t("p", { className: "text-[13px] font-semibold text-slate-900 dark:text-slate-100", children: r }),
94
- /* @__PURE__ */ s("p", { className: "mt-0.5 text-[11.5px] text-slate-500 dark:text-slate-400", children: [
95
- /* @__PURE__ */ t("time", { dateTime: l, children: T(l) }),
96
- " ·",
97
- " ",
98
- /* @__PURE__ */ t(j, { value: l })
99
- ] })
100
- ] }),
101
- /* @__PURE__ */ t("div", { className: "max-h-[min(60vh,420px)] overflow-y-auto overscroll-contain px-4 py-1", children: /* @__PURE__ */ t(
102
- A,
103
- {
104
- collection: e,
105
- itemId: n,
106
- since: l,
107
- everyone: u
108
- }
109
- ) }),
110
- h && /* @__PURE__ */ s("p", { className: "border-t border-slate-200/80 px-4 py-2 text-[11.5px] text-slate-500 dark:border-border dark:text-slate-400", children: [
111
- "Also ",
112
- h
113
- ] }),
114
- (a || p) && /* @__PURE__ */ s("div", { className: "flex items-center justify-between gap-2 border-t border-slate-200/80 px-4 py-2 dark:border-border", children: [
115
- a ? /* @__PURE__ */ s(
116
- "button",
117
- {
118
- type: "button",
119
- onClick: () => {
120
- d(!1), y(!0);
121
- },
122
- className: "inline-flex items-center gap-1.5 rounded text-[12px] font-medium text-slate-600 underline-offset-2 hover:text-slate-900 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/50 dark:text-slate-300 dark:hover:text-slate-100",
123
- "data-recap-history": !0,
124
- children: [
125
- /* @__PURE__ */ t(P, { "aria-hidden": !0, className: "h-3.5 w-3.5" }),
126
- "See full history"
127
- ]
128
- }
129
- ) : /* @__PURE__ */ t("span", {}),
130
- p && /* @__PURE__ */ t(
131
- K,
132
- {
133
- type: "button",
134
- size: "sm",
135
- variant: "outline",
136
- className: "h-7 px-2.5 text-[12px]",
137
- onClick: () => {
138
- d(!1), p();
139
- },
140
- "data-recap-mark-seen": !0,
141
- children: "Mark as seen"
142
- }
143
- )
144
- ] })
145
- ] })
91
+ children: /* @__PURE__ */ n(
92
+ z,
93
+ {
94
+ bodyRef: l,
95
+ collection: e,
96
+ itemId: t,
97
+ since: h,
98
+ everyone: u,
99
+ title: s,
100
+ extras: y,
101
+ footer: a || m ? /* @__PURE__ */ r(v, { children: [
102
+ a ? /* @__PURE__ */ r(
103
+ "button",
104
+ {
105
+ type: "button",
106
+ onClick: () => {
107
+ c(!1), w(!0);
108
+ },
109
+ className: "inline-flex items-center gap-1.5 rounded text-[12px] font-medium text-slate-600 underline-offset-2 hover:text-slate-900 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/50 dark:text-slate-300 dark:hover:text-slate-100",
110
+ "data-recap-history": !0,
111
+ children: [
112
+ /* @__PURE__ */ n(P, { "aria-hidden": !0, className: "h-3.5 w-3.5" }),
113
+ "See full history"
114
+ ]
115
+ }
116
+ ) : /* @__PURE__ */ n("span", {}),
117
+ m && /* @__PURE__ */ n(
118
+ K,
119
+ {
120
+ type: "button",
121
+ size: "sm",
122
+ variant: "outline",
123
+ className: "h-7 px-2.5 text-[12px]",
124
+ onClick: () => {
125
+ c(!1), m();
126
+ },
127
+ "data-recap-mark-seen": !0,
128
+ children: "Mark as seen"
129
+ }
130
+ )
131
+ ] }) : null
132
+ }
133
+ )
146
134
  }
147
135
  )
148
136
  ] }),
149
- i !== null && /* @__PURE__ */ t(
150
- E,
137
+ i !== null && /* @__PURE__ */ n(
138
+ Q,
151
139
  {
152
140
  collection: e,
153
- item: n,
141
+ item: t,
154
142
  open: i,
155
- onOpenChange: y,
156
- since: l,
143
+ onOpenChange: w,
144
+ since: h,
157
145
  onRollback: () => {
158
- o.invalidateQueries({ queryKey: ["item", e, n] }), o.invalidateQueries({ queryKey: ["record-recap-changes", e, n] }), o.invalidateQueries({ queryKey: ["revisions", e, n] });
146
+ o.invalidateQueries({ queryKey: ["item", e, t] }), o.invalidateQueries({ queryKey: ["record-recap-changes", e, t] }), o.invalidateQueries({ queryKey: ["revisions", e, t] });
159
147
  },
160
- onCloseAutoFocus: (m) => {
148
+ onCloseAutoFocus: (d) => {
161
149
  var g;
162
- m.preventDefault(), (g = x.current) == null || g.focus();
150
+ d.preventDefault(), (g = f.current) == null || g.focus();
163
151
  }
164
152
  }
165
153
  )
166
154
  ] });
167
155
  }
168
- function ae({
156
+ function re({
169
157
  collection: e,
170
- itemId: n,
171
- historyAvailable: l = !1
158
+ itemId: t,
159
+ historyAvailable: h = !1
172
160
  }) {
173
- const u = U(), [r, h] = v(null), [a, p] = v(null), [b, k] = v(!1), f = N(null);
174
- O(() => {
175
- const c = `${e}|${n}`;
176
- if (f.current === c) return;
177
- f.current = c, h(null), p(null), k(!1), u.request(
178
- C(`/record-views/${e}/${encodeURIComponent(n)}/touch`, {})
179
- ).then((m) => h(m.data ?? null)).catch(() => {
180
- f.current = null;
161
+ const u = O(), [s, y] = x(null), [a, m] = x(null), [k, b] = x(!1), p = N(null);
162
+ F(() => {
163
+ const l = `${e}|${t}`;
164
+ if (p.current === l) return;
165
+ p.current = l, y(null), m(null), b(!1), u.request(
166
+ C(`/record-views/${e}/${encodeURIComponent(t)}/touch`, {})
167
+ ).then((d) => y(d.data ?? null)).catch(() => {
168
+ p.current = null;
181
169
  });
182
170
  const o = typeof window > "u" ? null : B(window.location.search);
183
171
  o && u.request(
184
- Q(`/record-views/${e}/${encodeURIComponent(n)}/since`, { at: o })
185
- ).then((m) => p(m.data ?? null)).catch(() => {
172
+ U(`/record-views/${e}/${encodeURIComponent(t)}/since`, { at: o })
173
+ ).then((d) => m(d.data ?? null)).catch(() => {
186
174
  });
187
- }, [u, e, n]);
188
- const d = () => {
189
- if (k(!0), a) {
175
+ }, [u, e, t]);
176
+ const c = () => {
177
+ if (b(!0), a) {
190
178
  X();
191
179
  return;
192
180
  }
193
- u.request(C(`/record-views/${e}/${encodeURIComponent(n)}/dismiss`, {})).catch(() => {
181
+ u.request(C(`/record-views/${e}/${encodeURIComponent(t)}/dismiss`, {})).catch(() => {
194
182
  });
195
183
  };
196
- if (b) return null;
184
+ if (k) return null;
197
185
  if (a) {
198
- const c = M(a);
199
- if (c.length === 0) return null;
200
- const o = /* @__PURE__ */ s(w, { children: [
201
- /* @__PURE__ */ t(q, { className: "h-3.5 w-3.5 shrink-0 text-slate-400 dark:text-slate-500" }),
202
- /* @__PURE__ */ s("span", { className: "min-w-0 flex-1 truncate text-[12px] text-slate-600 dark:text-slate-300", children: [
203
- /* @__PURE__ */ t("span", { className: "text-slate-500 dark:text-slate-400", children: "Since this email:" }),
186
+ const l = M(a);
187
+ if (l.length === 0) return null;
188
+ const o = /* @__PURE__ */ r(v, { children: [
189
+ /* @__PURE__ */ n(q, { className: "h-3.5 w-3.5 shrink-0 text-slate-400 dark:text-slate-500" }),
190
+ /* @__PURE__ */ r("span", { className: "min-w-0 flex-1 truncate text-[12px] text-slate-600 dark:text-slate-300", children: [
191
+ /* @__PURE__ */ n("span", { className: "text-slate-500 dark:text-slate-400", children: "Since this email:" }),
204
192
  " ",
205
- a.moved_to && /* @__PURE__ */ t(
193
+ a.moved_to && /* @__PURE__ */ n(
206
194
  "span",
207
195
  {
208
196
  "aria-hidden": !0,
@@ -210,91 +198,91 @@ function ae({
210
198
  style: { backgroundColor: a.moved_to.color ?? "#94a3b8" }
211
199
  }
212
200
  ),
213
- /* @__PURE__ */ t("span", { className: "font-medium text-slate-700 dark:text-slate-200", children: c.join(" · ") })
201
+ /* @__PURE__ */ n("span", { className: "font-medium text-slate-700 dark:text-slate-200", children: l.join(" · ") })
214
202
  ] })
215
203
  ] });
216
- return /* @__PURE__ */ s(
204
+ return /* @__PURE__ */ r(
217
205
  "div",
218
206
  {
219
207
  className: "nvr-expand-in flex items-center gap-1 rounded-lg border border-slate-200 bg-slate-50 py-0.5 pl-1 pr-3 dark:border-border dark:bg-white/[0.03]",
220
208
  "data-record-since-email": !0,
221
209
  children: [
222
- a.field_changes > 0 ? /* @__PURE__ */ t(
210
+ a.field_changes > 0 ? /* @__PURE__ */ n(
223
211
  _,
224
212
  {
225
213
  collection: e,
226
- itemId: n,
214
+ itemId: t,
227
215
  since: a.since,
228
216
  everyone: !0,
229
217
  title: "Changes since this email",
230
218
  extras: S({ comments: a.comments, transitions: 0 }),
231
- historyAvailable: l,
219
+ historyAvailable: h,
232
220
  tone: "slate",
233
221
  children: o
234
222
  }
235
- ) : /* @__PURE__ */ t("p", { className: "flex min-w-0 flex-1 items-center gap-2.5 px-2 py-1", children: o }),
236
- /* @__PURE__ */ t(
223
+ ) : /* @__PURE__ */ n("p", { className: "flex min-w-0 flex-1 items-center gap-2.5 px-2 py-1", children: o }),
224
+ /* @__PURE__ */ n(
237
225
  "button",
238
226
  {
239
227
  type: "button",
240
- onClick: d,
228
+ onClick: c,
241
229
  "aria-label": "Dismiss",
242
230
  className: "shrink-0 rounded p-0.5 text-slate-400 hover:bg-slate-200/70 hover:text-slate-600 dark:hover:bg-white/10 dark:hover:text-slate-300",
243
- children: /* @__PURE__ */ t($, { className: "h-3.5 w-3.5" })
231
+ children: /* @__PURE__ */ n($, { className: "h-3.5 w-3.5" })
244
232
  }
245
233
  )
246
234
  ]
247
235
  }
248
236
  );
249
237
  }
250
- if (!r) return null;
238
+ if (!s) return null;
251
239
  const i = [];
252
- r.field_changes > 0 && i.push(`${r.field_changes} field${r.field_changes === 1 ? "" : "s"} changed`), r.comments > 0 && i.push(`${r.comments} new comment${r.comments === 1 ? "" : "s"}`), r.transitions > 0 && i.push(`${r.transitions} workflow transition${r.transitions === 1 ? "" : "s"}`);
253
- const y = r.editors.length > 0 ? ` by ${r.editors.join(", ")}` : "", x = /* @__PURE__ */ s(w, { children: [
254
- /* @__PURE__ */ t(P, { "aria-hidden": !0, className: "h-4 w-4 shrink-0 text-sky-500" }),
255
- /* @__PURE__ */ s("span", { className: "relative min-w-0 flex-1 truncate text-[12px] text-sky-800 dark:text-sky-300", children: [
256
- /* @__PURE__ */ s("span", { className: "max-sm:hidden", children: [
240
+ s.field_changes > 0 && i.push(`${s.field_changes} field${s.field_changes === 1 ? "" : "s"} changed`), s.comments > 0 && i.push(`${s.comments} new comment${s.comments === 1 ? "" : "s"}`), s.transitions > 0 && i.push(`${s.transitions} workflow transition${s.transitions === 1 ? "" : "s"}`);
241
+ const w = s.editors.length > 0 ? ` by ${s.editors.join(", ")}` : "", f = /* @__PURE__ */ r(v, { children: [
242
+ /* @__PURE__ */ n(P, { "aria-hidden": !0, className: "h-4 w-4 shrink-0 text-sky-500" }),
243
+ /* @__PURE__ */ r("span", { className: "relative min-w-0 flex-1 truncate text-[12px] text-sky-800 dark:text-sky-300", children: [
244
+ /* @__PURE__ */ r("span", { className: "max-sm:hidden", children: [
257
245
  "Since you last viewed (",
258
- /* @__PURE__ */ t(j, { value: r.since }),
246
+ /* @__PURE__ */ n(E, { value: s.since }),
259
247
  "):",
260
248
  " "
261
249
  ] }),
262
- /* @__PURE__ */ t("span", { className: "sr-only sm:hidden", children: "Since you last viewed: " }),
263
- /* @__PURE__ */ t("span", { className: "font-medium", children: r.field_changes > 0 ? /* @__PURE__ */ s(w, { children: [
264
- /* @__PURE__ */ t("span", { className: "underline decoration-sky-400/60 decoration-dotted underline-offset-[3px] group-hover:decoration-solid dark:decoration-sky-400/50", children: i[0] }),
250
+ /* @__PURE__ */ n("span", { className: "sr-only sm:hidden", children: "Since you last viewed: " }),
251
+ /* @__PURE__ */ n("span", { className: "font-medium", children: s.field_changes > 0 ? /* @__PURE__ */ r(v, { children: [
252
+ /* @__PURE__ */ n("span", { className: "underline decoration-sky-400/60 decoration-dotted underline-offset-[3px] group-hover:decoration-solid dark:decoration-sky-400/50", children: i[0] }),
265
253
  i.length > 1 ? ` · ${i.slice(1).join(" · ")}` : ""
266
254
  ] }) : i.join(" · ") }),
267
- /* @__PURE__ */ t("span", { className: "max-sm:hidden", children: y })
255
+ /* @__PURE__ */ n("span", { className: "max-sm:hidden", children: w })
268
256
  ] })
269
257
  ] });
270
- return /* @__PURE__ */ s(
258
+ return /* @__PURE__ */ r(
271
259
  "div",
272
260
  {
273
261
  className: "nvr-expand-in flex items-center gap-1 rounded-lg border border-sky-200 bg-sky-50 py-1 pl-1.5 pr-3.5 dark:border-sky-500/30 dark:bg-sky-500/10",
274
262
  "data-record-recap": !0,
275
263
  children: [
276
- r.field_changes > 0 ? /* @__PURE__ */ t(
264
+ s.field_changes > 0 ? /* @__PURE__ */ n(
277
265
  _,
278
266
  {
279
267
  collection: e,
280
- itemId: n,
281
- since: r.since,
268
+ itemId: t,
269
+ since: s.since,
282
270
  title: "Changes since you last viewed",
283
- extras: S(r),
284
- historyAvailable: l,
285
- onMarkSeen: d,
271
+ extras: S(s),
272
+ historyAvailable: h,
273
+ onMarkSeen: c,
286
274
  tone: "sky",
287
- children: x
275
+ children: f
288
276
  }
289
- ) : /* @__PURE__ */ t("p", { className: "flex min-w-0 flex-1 items-center gap-3 px-2 py-1", children: x }),
290
- /* @__PURE__ */ t(
277
+ ) : /* @__PURE__ */ n("p", { className: "flex min-w-0 flex-1 items-center gap-3 px-2 py-1", children: f }),
278
+ /* @__PURE__ */ n(
291
279
  "button",
292
280
  {
293
281
  type: "button",
294
- onClick: d,
282
+ onClick: c,
295
283
  "aria-label": "Dismiss recap",
296
284
  className: "shrink-0 rounded p-0.5 text-sky-400 hover:bg-sky-100 hover:text-sky-600 dark:hover:bg-sky-500/15",
297
- children: /* @__PURE__ */ t($, { className: "h-3.5 w-3.5" })
285
+ children: /* @__PURE__ */ n($, { className: "h-3.5 w-3.5" })
298
286
  }
299
287
  )
300
288
  ]
@@ -302,7 +290,7 @@ function ae({
302
290
  );
303
291
  }
304
292
  export {
305
- ae as RecordRecapStrip,
293
+ re as RecordRecapStrip,
306
294
  B as emailSinceFromSearch,
307
295
  M as emailSinceParts,
308
296
  S as recapExtras
@@ -0,0 +1,15 @@
1
+ function a(n, r, u) {
2
+ return ["summary-layout", n, r ?? "none", ...u ? [u] : []];
3
+ }
4
+ function e(n, r) {
5
+ const u = {};
6
+ return n != null && (u.for_layout = String(n)), r && (u.viewport = r), Object.keys(u).length > 0 ? u : void 0;
7
+ }
8
+ function t(n) {
9
+ return !n.isNew && !n.designOn && n.layoutResolved;
10
+ }
11
+ export {
12
+ t as summaryLayoutEnabled,
13
+ e as summaryLayoutParams,
14
+ a as summaryLayoutQueryKey
15
+ };