@nivaro/react 0.3.139 → 0.3.140

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 (87) hide show
  1. package/dist/components/InlineGridField.js +95 -92
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +36 -2
  4. package/dist/shared/components/AudienceConfirmPanel.js +19 -19
  5. package/dist/shared/components/BroadcastView.js +213 -211
  6. package/dist/shared/components/CollectionBrowserView.js +2677 -2658
  7. package/dist/shared/components/ConfigHistory.js +45 -45
  8. package/dist/shared/components/ConformanceView.js +110 -110
  9. package/dist/shared/components/DataTable.js +51 -51
  10. package/dist/shared/components/FilePreviewLightbox.js +26 -25
  11. package/dist/shared/components/ItemEditForm.js +3038 -3027
  12. package/dist/shared/components/LiveCount.js +27 -23
  13. package/dist/shared/components/LiveTraceView.js +62 -61
  14. package/dist/shared/components/PageRenderer.js +422 -410
  15. package/dist/shared/components/ProfileView.js +199 -199
  16. package/dist/shared/components/QualityRulesView.js +70 -70
  17. package/dist/shared/components/QueryTable.js +131 -130
  18. package/dist/shared/components/RecordGraph.js +98 -98
  19. package/dist/shared/components/RecordReadView.js +287 -288
  20. package/dist/shared/components/ReportView.js +1279 -1259
  21. package/dist/shared/components/SlaRulesView.js +73 -74
  22. package/dist/shared/components/WidgetSlot.js +73 -73
  23. package/dist/shared/components/ai/AiChart.js +36 -32
  24. package/dist/shared/components/ai/AiMarkdown.js +136 -129
  25. package/dist/shared/components/ai/TaskDo.js +87 -87
  26. package/dist/shared/components/ai/answer-formats.js +37 -30
  27. package/dist/shared/components/ai/call-log/format.js +17 -16
  28. package/dist/shared/components/bulk/BulkActionButtons.js +66 -66
  29. package/dist/shared/components/bulk/BulkFieldUpdate.js +59 -59
  30. package/dist/shared/components/bulk/BulkSelectionNotices.js +34 -34
  31. package/dist/shared/components/bulk/MessageStakeholders.js +31 -29
  32. package/dist/shared/components/bulk/PushBulkButtons.js +83 -82
  33. package/dist/shared/components/bulk/bulk-field-options.js +10 -10
  34. package/dist/shared/components/cbv/column-totals.js +53 -51
  35. package/dist/shared/components/chat/ChatAnalyticsView.js +87 -87
  36. package/dist/shared/components/collections-directory/CollectionsToolbar.js +18 -18
  37. package/dist/shared/components/command-center/announce.js +7 -6
  38. package/dist/shared/components/command-center/panels/AttentionPanel.js +32 -31
  39. package/dist/shared/components/command-center/panels/FlowPanel.js +29 -28
  40. package/dist/shared/components/command-center/panels/PeoplePanel.js +39 -39
  41. package/dist/shared/components/delegation/DelegationConsoleView.js +27 -27
  42. package/dist/shared/components/imports/RunDetailSheet.js +1 -1
  43. package/dist/shared/components/integrations/IntegrationObligationsView.js +119 -119
  44. package/dist/shared/components/integrations/console/EventsView.js +35 -35
  45. package/dist/shared/components/integrations/console/FirefightView.js +15 -14
  46. package/dist/shared/components/integrations/console/PartnerDetail.js +78 -78
  47. package/dist/shared/components/integrations/console/ReadyToSendView.js +103 -103
  48. package/dist/shared/components/integrations/console/SignalCard.js +67 -67
  49. package/dist/shared/components/item-edit/CatalogPickerField.js +536 -527
  50. package/dist/shared/components/item-edit/ChangesTray.js +88 -74
  51. package/dist/shared/components/item-edit/FilePickerField.js +123 -123
  52. package/dist/shared/components/item-edit/GroupSection.js +301 -292
  53. package/dist/shared/components/item-edit/HeaderSummaryChip.js +54 -54
  54. package/dist/shared/components/item-edit/InlineGridField.js +45 -36
  55. package/dist/shared/components/item-edit/InlineTableField.js +1167 -1153
  56. package/dist/shared/components/item-edit/NestedRelationEditor.js +106 -99
  57. package/dist/shared/components/item-edit/RecordChatMentionsChip.js +11 -11
  58. package/dist/shared/components/layout-editor/ai-forms/SlimPanel.js +43 -44
  59. package/dist/shared/components/monitoring/ApiRequestLog.js +35 -35
  60. package/dist/shared/components/notifications/NotificationCenterView.js +268 -268
  61. package/dist/shared/components/ops-report/format.js +37 -36
  62. package/dist/shared/components/panels/ReferencedByPanel.js +21 -20
  63. package/dist/shared/components/panels/RevisionsPanel.js +306 -305
  64. package/dist/shared/components/pipeline/OwnerMatrixVersionsCard.js +12 -12
  65. package/dist/shared/components/pipeline/PipelineEditorView.js +483 -482
  66. package/dist/shared/components/pipeline/PipelineHealthCards.js +33 -32
  67. package/dist/shared/components/pipeline/TeamsView.js +189 -130
  68. package/dist/shared/components/profile/AgentsPanel.js +6 -6
  69. package/dist/shared/components/profile/DelegationCard.js +13 -12
  70. package/dist/shared/components/profile/PersonActivity.js +48 -48
  71. package/dist/shared/components/profile/PersonExtras.js +107 -107
  72. package/dist/shared/components/profile/PersonWeek.js +9 -9
  73. package/dist/shared/components/queue/QueueBulkBar.js +19 -18
  74. package/dist/shared/components/queue/QueueBulkMove.js +21 -20
  75. package/dist/shared/components/queue/QueueItemSheet.js +136 -131
  76. package/dist/shared/components/queue/QueueWorklist.js +671 -670
  77. package/dist/shared/components/queue/worklist-helpers.js +36 -21
  78. package/dist/shared/components/support/RequestList.js +121 -121
  79. package/dist/shared/components/support/SupportAnalytics.js +29 -29
  80. package/dist/shared/lib/activity-sentence.js +251 -229
  81. package/dist/shared/lib/format-value.js +5 -4
  82. package/dist/shared/lib/number-format.js +87 -0
  83. package/dist/shared/lib/number-kind.js +133 -0
  84. package/dist/shared/lib/utils.js +24 -20
  85. package/dist/shared/lib/watch-list.js +1 -1
  86. package/dist/shared/lib/widget-value-format.js +26 -12
  87. package/package.json +1 -1
@@ -1,12 +1,12 @@
1
1
  import { jsxs as t, jsx as e, Fragment as g } from "react/jsx-runtime";
2
- import { useQuery as y } from "@tanstack/react-query";
2
+ import { useQuery as v } from "@tanstack/react-query";
3
3
  import { useState as b } from "react";
4
- import { useNivaroClient as v } from "../../context.js";
5
- import { get as _ } from "../../lib/commands.js";
6
- import { cn as C } from "../../lib/utils.js";
7
- import { Button as S } from "../ui/button.js";
4
+ import { useNivaroClient as _ } from "../../context.js";
5
+ import { get as S } from "../../lib/commands.js";
6
+ import { formatNumber as w, cn as j } from "../../lib/utils.js";
7
+ import { Button as C } from "../ui/button.js";
8
8
  import { Skeleton as p } from "../ui/skeleton.js";
9
- const j = {
9
+ const A = {
10
10
  no_initial: "No starting state",
11
11
  any_state_auto: "Automatic jump from any state",
12
12
  never_entered: "Nothing enters",
@@ -17,10 +17,10 @@ const j = {
17
17
  dead_transition: "Can never fire",
18
18
  terminal_exit: "Terminal state with an exit"
19
19
  };
20
- function I({ templateId: a }) {
21
- const i = v(), [s, h] = b(!1), { data: d, isLoading: u, isFetching: n, refetch: m, isError: x } = y({
20
+ function D({ templateId: a }) {
21
+ const i = _(), [s, h] = b(!1), { data: d, isLoading: u, isFetching: n, refetch: m, isError: x } = v({
22
22
  queryKey: ["pipeline-lint", a],
23
- queryFn: () => i.request(_(`/pipelines/${a}/lint`)).then((r) => r.data),
23
+ queryFn: () => i.request(S(`/pipelines/${a}/lint`)).then((r) => r.data),
24
24
  staleTime: 3e4
25
25
  }), o = ((d == null ? void 0 : d.findings) ?? []).filter((r) => r.severity === "warn"), c = ((d == null ? void 0 : d.findings) ?? []).filter((r) => r.severity === "info");
26
26
  return /* @__PURE__ */ t(
@@ -35,7 +35,7 @@ function I({ templateId: a }) {
35
35
  /* @__PURE__ */ e("p", { className: "mt-0.5 max-w-[68ch] text-[12px] text-slate-500 dark:text-muted-foreground", children: "Can a record get everywhere this template promises? States nothing leads to, transitions whose conditions contradict each other, steps with no way out, and automatic moves that fire before anyone can press a button." })
36
36
  ] }),
37
37
  /* @__PURE__ */ e(
38
- S,
38
+ C,
39
39
  {
40
40
  size: "sm",
41
41
  variant: "outline",
@@ -81,7 +81,7 @@ function I({ templateId: a }) {
81
81
  children: [
82
82
  /* @__PURE__ */ e("span", { className: "mt-1.5 h-2 w-2 shrink-0 rounded-full bg-amber-500" }),
83
83
  /* @__PURE__ */ t("div", { className: "min-w-0", children: [
84
- /* @__PURE__ */ e("p", { className: "text-[11px] font-semibold uppercase tracking-wide text-amber-700 dark:text-amber-400", children: j[r.code] ?? r.code }),
84
+ /* @__PURE__ */ e("p", { className: "text-[11px] font-semibold uppercase tracking-wide text-amber-700 dark:text-amber-400", children: A[r.code] ?? r.code }),
85
85
  /* @__PURE__ */ e("p", { className: "text-[12.5px] text-slate-700 dark:text-foreground", children: r.message })
86
86
  ] })
87
87
  ]
@@ -122,7 +122,7 @@ function I({ templateId: a }) {
122
122
  }
123
123
  );
124
124
  }
125
- const w = {
125
+ const k = {
126
126
  never: {
127
127
  label: "Never fires",
128
128
  cls: "border-amber-300 bg-amber-50 text-amber-800 dark:border-amber-500/40 dark:bg-amber-500/10 dark:text-amber-300"
@@ -140,24 +140,24 @@ const w = {
140
140
  cls: "border-slate-200 bg-white text-slate-400 dark:border-border dark:bg-transparent"
141
141
  }
142
142
  };
143
- function k({ v: a }) {
143
+ function N({ v: a }) {
144
144
  return /* @__PURE__ */ e(
145
145
  "span",
146
146
  {
147
- className: C(
147
+ className: j(
148
148
  "inline-flex shrink-0 items-center rounded border px-1.5 py-px text-[10.5px] font-medium",
149
- w[a].cls
149
+ k[a].cls
150
150
  ),
151
151
  "data-skip-verdict": a,
152
- children: w[a].label
152
+ children: k[a].label
153
153
  }
154
154
  );
155
155
  }
156
- const N = (a, i) => i > 0 ? Math.round(a / i * 100) : 0;
157
- function D({ templateId: a }) {
158
- const i = v(), [s, h] = b(!1), [d, u] = b(!1), { data: n, isFetching: m, refetch: x, isError: o } = y({
156
+ const y = (a, i) => i > 0 ? Math.round(a / i * 100) : 0;
157
+ function H({ templateId: a }) {
158
+ const i = _(), [s, h] = b(!1), [d, u] = b(!1), { data: n, isFetching: m, refetch: x, isError: o } = v({
159
159
  queryKey: ["pipeline-skip-report", a],
160
- queryFn: () => i.request(_(`/pipelines/${a}/skip-report`)).then((l) => l.data),
160
+ queryFn: () => i.request(S(`/pipelines/${a}/skip-report`)).then((l) => l.data),
161
161
  enabled: s,
162
162
  staleTime: 5 * 6e4
163
163
  }), c = ((n == null ? void 0 : n.states) ?? []).filter(
@@ -177,7 +177,7 @@ function D({ templateId: a }) {
177
177
  /* @__PURE__ */ e("p", { className: "mt-0.5 max-w-[68ch] text-[12px] text-slate-500 dark:text-muted-foreground", children: "How often records entered each step versus jumped straight over it in the last 90 days, and which skip rule would fire for the newest open records right now. A threshold that never or always fires is usually set wrong." })
178
178
  ] }),
179
179
  /* @__PURE__ */ e(
180
- S,
180
+ C,
181
181
  {
182
182
  size: "sm",
183
183
  variant: "outline",
@@ -229,7 +229,7 @@ function D({ templateId: a }) {
229
229
  /* @__PURE__ */ e("th", { className: "w-[160px] px-3 py-1.5 text-left font-medium", children: "Skip rate" }),
230
230
  /* @__PURE__ */ e("th", { className: "px-3 py-1.5 text-right font-medium", children: "Would skip now" })
231
231
  ] }) }),
232
- /* @__PURE__ */ e("tbody", { children: c.map((l) => /* @__PURE__ */ e(A, { s: l }, l.id)) })
232
+ /* @__PURE__ */ e("tbody", { children: c.map((l) => /* @__PURE__ */ e(T, { s: l }, l.id)) })
233
233
  ] }) }),
234
234
  /* @__PURE__ */ e(
235
235
  "button",
@@ -246,7 +246,7 @@ function D({ templateId: a }) {
246
246
  }
247
247
  );
248
248
  }
249
- function A({ s: a }) {
249
+ function T({ s: a }) {
250
250
  const i = a.history.skip_rate;
251
251
  return /* @__PURE__ */ t(g, { children: [
252
252
  /* @__PURE__ */ t("tr", { className: "border-t border-slate-100 dark:border-border/60", "data-skip-state": a.label, children: [
@@ -285,16 +285,17 @@ function A({ s: a }) {
285
285
  ] }) : /* @__PURE__ */ e("span", { className: "text-slate-400", children: "—" }) })
286
286
  ] }),
287
287
  a.now.no_owners && /* @__PURE__ */ e("tr", { className: "bg-slate-50/60 dark:bg-muted/10", children: /* @__PURE__ */ e("td", { colSpan: 5, className: "px-3 py-1 pl-7", children: /* @__PURE__ */ t("span", { className: "flex items-center gap-2 text-[11.5px] text-slate-600 dark:text-muted-foreground", children: [
288
- /* @__PURE__ */ e(k, { v: a.now.no_owners.verdict }),
288
+ /* @__PURE__ */ e(N, { v: a.now.no_owners.verdict }),
289
289
  /* @__PURE__ */ t("span", { children: [
290
290
  "Skip when no owner resolves —",
291
291
  " ",
292
292
  /* @__PURE__ */ t("span", { className: "tabular-nums", children: [
293
- a.now.no_owners.matched,
294
- " of ",
295
- a.now.no_owners.evaluated,
293
+ w(a.now.no_owners.matched),
294
+ " of",
295
+ " ",
296
+ w(a.now.no_owners.evaluated),
296
297
  " (",
297
- N(a.now.no_owners.matched, a.now.no_owners.evaluated),
298
+ y(a.now.no_owners.matched, a.now.no_owners.evaluated),
298
299
  "%)"
299
300
  ] })
300
301
  ] })
@@ -305,7 +306,7 @@ function A({ s: a }) {
305
306
  className: "bg-slate-50/60 dark:bg-muted/10",
306
307
  "data-skip-criterion": s.verdict,
307
308
  children: /* @__PURE__ */ e("td", { colSpan: 5, className: "px-3 py-1 pl-7", children: /* @__PURE__ */ t("span", { className: "flex items-center gap-2 text-[11.5px] text-slate-600 dark:text-muted-foreground", children: [
308
- /* @__PURE__ */ e(k, { v: s.verdict }),
309
+ /* @__PURE__ */ e(N, { v: s.verdict }),
309
310
  /* @__PURE__ */ t("span", { className: "min-w-0", children: [
310
311
  s.description,
311
312
  " —",
@@ -315,7 +316,7 @@ function A({ s: a }) {
315
316
  " of ",
316
317
  s.evaluated,
317
318
  " (",
318
- N(s.matched, s.evaluated),
319
+ y(s.matched, s.evaluated),
319
320
  "%)"
320
321
  ] }),
321
322
  a.now.criteria.length > 1 && /* @__PURE__ */ t("span", { className: "text-slate-400", children: [
@@ -331,6 +332,6 @@ function A({ s: a }) {
331
332
  ] });
332
333
  }
333
334
  export {
334
- D as SkipReportCard,
335
- I as TemplateLintCard
335
+ H as SkipReportCard,
336
+ D as TemplateLintCard
336
337
  };