@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,59 +1,59 @@
1
- import { jsxs as i, Fragment as H, jsx as t } from "react/jsx-runtime";
2
- import { useInfiniteQuery as S } from "@tanstack/react-query";
3
- import { History as C } from "lucide-react";
4
- import { useState as B } from "react";
5
- import { useNivaroClient as T, useNavigation as _ } from "../context.js";
6
- import { get as j } from "../lib/commands.js";
7
- import { cn as m, formatRelative as q, formatDateTime as E } from "../lib/utils.js";
8
- import { AgentBadge as F } from "./AgentBadge.js";
9
- import { Button as N } from "./ui/button.js";
10
- import { Sheet as D, SheetContent as L, SheetHeader as U, SheetTitle as A, SheetDescription as O } from "./ui/sheet.js";
11
- const R = {
1
+ import { jsxs as i, Fragment as S, jsx as t } from "react/jsx-runtime";
2
+ import { useInfiniteQuery as C } from "@tanstack/react-query";
3
+ import { History as B } from "lucide-react";
4
+ import { useState as T } from "react";
5
+ import { useNivaroClient as _, useNavigation as j } from "../context.js";
6
+ import { get as q } from "../lib/commands.js";
7
+ import { cn as m, formatRelative as E, formatDateTime as F, formatNumber as N } from "../lib/utils.js";
8
+ import { AgentBadge as D } from "./AgentBadge.js";
9
+ import { Button as b } from "./ui/button.js";
10
+ import { Sheet as L, SheetContent as U, SheetHeader as A, SheetTitle as O, SheetDescription as R } from "./ui/sheet.js";
11
+ const z = {
12
12
  create: "created this",
13
13
  update: "changed this",
14
14
  delete: "deleted this",
15
15
  revert: "reverted a change",
16
16
  restore: "restored this"
17
17
  };
18
- function z(a) {
18
+ function G(a) {
19
19
  return [a.first_name, a.last_name].filter(Boolean).join(" ").trim() || a.user_email || (a.user ? "Someone" : "The system");
20
20
  }
21
- function G(a) {
21
+ function I(a) {
22
22
  var l;
23
- const n = R[a.action] ?? a.action.replace(/[-_]/g, " "), s = (l = a.comment) != null && l.trim() ? a.comment.trim() : null;
24
- return { who: z(a), what: n, detail: s };
23
+ const n = z[a.action] ?? a.action.replace(/[-_]/g, " "), s = (l = a.comment) != null && l.trim() ? a.comment.trim() : null;
24
+ return { who: G(a), what: n, detail: s };
25
25
  }
26
- const I = 20;
27
- function K({
26
+ const K = 20;
27
+ function M({
28
28
  collection: a,
29
29
  item: n,
30
30
  className: s,
31
- pageSize: l = I
31
+ pageSize: l = K
32
32
  }) {
33
33
  var p, x, g;
34
- const h = T(), d = _(), u = n == null ? "" : String(n), o = S({
34
+ const h = _(), d = j(), u = n == null ? "" : String(n), o = C({
35
35
  queryKey: ["nvr-config-history", a, u, l],
36
36
  enabled: !!u,
37
37
  initialPageParam: 0,
38
38
  queryFn: ({ pageParam: e }) => h.request(
39
- j("/activity", { collection: a, item: u, limit: l, offset: e })
39
+ q("/activity", { collection: a, item: u, limit: l, offset: e })
40
40
  ).then((r) => r),
41
41
  getNextPageParam: (e, r) => {
42
42
  var y;
43
- const c = r.reduce((w, P) => {
43
+ const c = r.reduce((P, H) => {
44
44
  var v;
45
- return w + (((v = P.data) == null ? void 0 : v.length) ?? 0);
45
+ return P + (((v = H.data) == null ? void 0 : v.length) ?? 0);
46
46
  }, 0);
47
47
  return c < (e.total ?? 0) && (((y = e.data) == null ? void 0 : y.length) ?? 0) > 0 ? c : void 0;
48
48
  },
49
49
  staleTime: 15e3
50
- }), f = ((p = o.data) == null ? void 0 : p.pages.flatMap((e) => e.data ?? [])) ?? [], b = ((g = (x = o.data) == null ? void 0 : x.pages[0]) == null ? void 0 : g.total) ?? 0, k = (e) => {
50
+ }), f = ((p = o.data) == null ? void 0 : p.pages.flatMap((e) => e.data ?? [])) ?? [], k = ((g = (x = o.data) == null ? void 0 : x.pages[0]) == null ? void 0 : g.total) ?? 0, w = (e) => {
51
51
  const r = `/activity/${e}`;
52
52
  return d.consoleUrl ? d.consoleUrl(r) : r;
53
53
  };
54
54
  return u ? o.isLoading ? /* @__PURE__ */ t("div", { className: m("space-y-2", s), "aria-busy": "true", "data-config-history-loading": !0, children: [0, 1, 2].map((e) => /* @__PURE__ */ t("div", { className: "h-10 animate-pulse rounded-md bg-slate-100 dark:bg-muted" }, e)) }) : o.isError ? /* @__PURE__ */ t("p", { className: m("text-[12px] text-red-600 dark:text-red-400", s), children: "History could not be loaded." }) : f.length === 0 ? /* @__PURE__ */ t("p", { className: m("text-[12px] text-slate-500 dark:text-slate-400", s), children: "No changes recorded yet." }) : /* @__PURE__ */ i("div", { className: m("flex flex-col gap-2", s), "data-config-history": !0, children: [
55
55
  /* @__PURE__ */ t("ol", { className: "divide-y divide-slate-100 rounded-md border border-slate-200 bg-white dark:divide-border/60 dark:border-border dark:bg-card", children: f.map((e) => {
56
- const r = G(e), c = k(e.id);
56
+ const r = I(e), c = w(e.id);
57
57
  return /* @__PURE__ */ i("li", { className: "px-3 py-2", "data-config-history-entry": e.id, children: [
58
58
  /* @__PURE__ */ i("div", { className: "flex items-baseline gap-2 text-[12.5px]", children: [
59
59
  /* @__PURE__ */ i("span", { className: "min-w-0 truncate text-slate-800 dark:text-slate-100", children: [
@@ -61,14 +61,14 @@ function K({
61
61
  " ",
62
62
  r.what
63
63
  ] }),
64
- /* @__PURE__ */ t(F, { label: e.via_agent }),
64
+ /* @__PURE__ */ t(D, { label: e.via_agent }),
65
65
  /* @__PURE__ */ t(
66
66
  "time",
67
67
  {
68
68
  className: "ml-auto shrink-0 text-[11px] text-slate-500 dark:text-slate-400",
69
69
  dateTime: e.timestamp,
70
- "data-tip": E(e.timestamp),
71
- children: q(e.timestamp)
70
+ "data-tip": F(e.timestamp),
71
+ children: E(e.timestamp)
72
72
  }
73
73
  )
74
74
  ] }),
@@ -88,12 +88,12 @@ function K({
88
88
  }) }),
89
89
  /* @__PURE__ */ i("div", { className: "flex items-center justify-between text-[11.5px] text-slate-500 dark:text-slate-400", children: [
90
90
  /* @__PURE__ */ i("span", { children: [
91
- f.length,
91
+ N(f.length),
92
92
  " of ",
93
- b
93
+ N(k)
94
94
  ] }),
95
95
  o.hasNextPage && /* @__PURE__ */ t(
96
- N,
96
+ b,
97
97
  {
98
98
  variant: "outline",
99
99
  size: "sm",
@@ -106,16 +106,16 @@ function K({
106
106
  ] })
107
107
  ] }) : /* @__PURE__ */ t("p", { className: m("text-[12px] text-slate-500 dark:text-slate-400", s), children: "History starts once this is saved." });
108
108
  }
109
- function te({
109
+ function ae({
110
110
  collection: a,
111
111
  item: n,
112
112
  title: s = "History",
113
113
  className: l
114
114
  }) {
115
- const [h, d] = B(!1);
116
- return n == null || n === "" || n === "new" ? null : /* @__PURE__ */ i(H, { children: [
115
+ const [h, d] = T(!1);
116
+ return n == null || n === "" || n === "new" ? null : /* @__PURE__ */ i(S, { children: [
117
117
  /* @__PURE__ */ i(
118
- N,
118
+ b,
119
119
  {
120
120
  type: "button",
121
121
  variant: "outline",
@@ -124,30 +124,30 @@ function te({
124
124
  onClick: () => d(!0),
125
125
  "data-config-history-button": !0,
126
126
  children: [
127
- /* @__PURE__ */ t(C, { className: "h-3.5 w-3.5" }),
127
+ /* @__PURE__ */ t(B, { className: "h-3.5 w-3.5" }),
128
128
  "History"
129
129
  ]
130
130
  }
131
131
  ),
132
- /* @__PURE__ */ t(D, { open: h, onOpenChange: d, children: /* @__PURE__ */ i(
133
- L,
132
+ /* @__PURE__ */ t(L, { open: h, onOpenChange: d, children: /* @__PURE__ */ i(
133
+ U,
134
134
  {
135
135
  side: "right",
136
136
  className: "flex w-full flex-col gap-3 overflow-y-auto sm:max-w-md",
137
137
  children: [
138
- /* @__PURE__ */ i(U, { children: [
139
- /* @__PURE__ */ t(A, { children: s }),
140
- /* @__PURE__ */ t(O, { children: "Every change recorded for this, newest first." })
138
+ /* @__PURE__ */ i(A, { children: [
139
+ /* @__PURE__ */ t(O, { children: s }),
140
+ /* @__PURE__ */ t(R, { children: "Every change recorded for this, newest first." })
141
141
  ] }),
142
- h && /* @__PURE__ */ t(K, { collection: a, item: n })
142
+ h && /* @__PURE__ */ t(M, { collection: a, item: n })
143
143
  ]
144
144
  }
145
145
  ) })
146
146
  ] });
147
147
  }
148
148
  export {
149
- K as ConfigHistory,
150
- te as ConfigHistoryButton,
151
- G as configHistoryLine,
152
- z as entryPerson
149
+ M as ConfigHistory,
150
+ ae as ConfigHistoryButton,
151
+ I as configHistoryLine,
152
+ G as entryPerson
153
153
  };