@nivaro/react 0.3.138 → 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 (88) 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 +36 -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 +2677 -2658
  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 +3038 -3027
  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/SlaRulesView.js +73 -74
  23. package/dist/shared/components/WidgetSlot.js +73 -73
  24. package/dist/shared/components/ai/AiChart.js +36 -32
  25. package/dist/shared/components/ai/AiMarkdown.js +136 -129
  26. package/dist/shared/components/ai/TaskDo.js +87 -87
  27. package/dist/shared/components/ai/answer-formats.js +37 -30
  28. package/dist/shared/components/ai/call-log/format.js +17 -16
  29. package/dist/shared/components/bulk/BulkActionButtons.js +66 -66
  30. package/dist/shared/components/bulk/BulkFieldUpdate.js +59 -59
  31. package/dist/shared/components/bulk/BulkSelectionNotices.js +34 -34
  32. package/dist/shared/components/bulk/MessageStakeholders.js +31 -29
  33. package/dist/shared/components/bulk/PushBulkButtons.js +83 -82
  34. package/dist/shared/components/bulk/bulk-field-options.js +10 -10
  35. package/dist/shared/components/cbv/column-totals.js +53 -51
  36. package/dist/shared/components/chat/ChatAnalyticsView.js +87 -87
  37. package/dist/shared/components/collections-directory/CollectionsToolbar.js +18 -18
  38. package/dist/shared/components/command-center/announce.js +7 -6
  39. package/dist/shared/components/command-center/panels/AttentionPanel.js +32 -31
  40. package/dist/shared/components/command-center/panels/FlowPanel.js +29 -28
  41. package/dist/shared/components/command-center/panels/PeoplePanel.js +39 -39
  42. package/dist/shared/components/delegation/DelegationConsoleView.js +27 -27
  43. package/dist/shared/components/imports/RunDetailSheet.js +1 -1
  44. package/dist/shared/components/integrations/IntegrationObligationsView.js +119 -119
  45. package/dist/shared/components/integrations/console/EventsView.js +35 -35
  46. package/dist/shared/components/integrations/console/FirefightView.js +15 -14
  47. package/dist/shared/components/integrations/console/PartnerDetail.js +78 -78
  48. package/dist/shared/components/integrations/console/ReadyToSendView.js +103 -103
  49. package/dist/shared/components/integrations/console/SignalCard.js +67 -67
  50. package/dist/shared/components/item-edit/CatalogPickerField.js +536 -527
  51. package/dist/shared/components/item-edit/ChangesTray.js +88 -74
  52. package/dist/shared/components/item-edit/FilePickerField.js +123 -123
  53. package/dist/shared/components/item-edit/GroupSection.js +301 -292
  54. package/dist/shared/components/item-edit/HeaderSummaryChip.js +54 -54
  55. package/dist/shared/components/item-edit/InlineGridField.js +45 -36
  56. package/dist/shared/components/item-edit/InlineTableField.js +1167 -1153
  57. package/dist/shared/components/item-edit/NestedRelationEditor.js +106 -99
  58. package/dist/shared/components/item-edit/RecordChatMentionsChip.js +11 -11
  59. package/dist/shared/components/layout-editor/ai-forms/SlimPanel.js +43 -44
  60. package/dist/shared/components/monitoring/ApiRequestLog.js +35 -35
  61. package/dist/shared/components/notifications/NotificationCenterView.js +268 -268
  62. package/dist/shared/components/ops-report/format.js +37 -36
  63. package/dist/shared/components/panels/ReferencedByPanel.js +21 -20
  64. package/dist/shared/components/panels/RevisionsPanel.js +306 -305
  65. package/dist/shared/components/pipeline/OwnerMatrixVersionsCard.js +12 -12
  66. package/dist/shared/components/pipeline/PipelineEditorView.js +483 -482
  67. package/dist/shared/components/pipeline/PipelineHealthCards.js +33 -32
  68. package/dist/shared/components/pipeline/TeamsView.js +189 -130
  69. package/dist/shared/components/profile/AgentsPanel.js +6 -6
  70. package/dist/shared/components/profile/DelegationCard.js +13 -12
  71. package/dist/shared/components/profile/PersonActivity.js +48 -48
  72. package/dist/shared/components/profile/PersonExtras.js +107 -107
  73. package/dist/shared/components/profile/PersonWeek.js +9 -9
  74. package/dist/shared/components/queue/QueueBulkBar.js +19 -18
  75. package/dist/shared/components/queue/QueueBulkMove.js +21 -20
  76. package/dist/shared/components/queue/QueueItemSheet.js +136 -131
  77. package/dist/shared/components/queue/QueueWorklist.js +671 -670
  78. package/dist/shared/components/queue/worklist-helpers.js +36 -21
  79. package/dist/shared/components/support/RequestList.js +121 -121
  80. package/dist/shared/components/support/SupportAnalytics.js +29 -29
  81. package/dist/shared/lib/activity-sentence.js +316 -278
  82. package/dist/shared/lib/format-value.js +5 -4
  83. package/dist/shared/lib/number-format.js +87 -0
  84. package/dist/shared/lib/number-kind.js +133 -0
  85. package/dist/shared/lib/utils.js +24 -20
  86. package/dist/shared/lib/watch-list.js +1 -1
  87. package/dist/shared/lib/widget-value-format.js +26 -12
  88. package/package.json +1 -1
@@ -10,7 +10,7 @@ import { noteReplayIdle as Me, createReplayIdleState as Ne, REPLAY_IDLE_RESTART_
10
10
  import { noteReplayEvent as Ue, createReplayCheckoutState as We } from "../shared/lib/replay-checkout.js";
11
11
  import { instrumentConsole as He, instrumentRequests as Ke, redactSecrets as $e } from "../shared/lib/replay-context.js";
12
12
  import { instrumentSocket as Be } from "../shared/lib/replay-socket.js";
13
- const ze = "nivaro-react@0.3.138", V = 1e4, Ye = 150, xe = 3e3, je = 600, Ge = (o) => `nvr_replay_resume${o ? `:${o}` : ""}`, X = () => typeof navigator > "u" || navigator.onLine !== !1;
13
+ const ze = "nivaro-react@0.3.140", V = 1e4, Ye = 150, xe = 3e3, je = 600, Ge = (o) => `nvr_replay_resume${o ? `:${o}` : ""}`, X = () => typeof navigator > "u" || navigator.onLine !== !1;
14
14
  function Je(o) {
15
15
  return typeof o.url != "string" || typeof fetch != "function" ? null : (f, u) => {
16
16
  const l = typeof o.getToken == "function" ? o.getToken() : void 0, d = { "Content-Type": "application/json" };
package/dist/index.d.ts CHANGED
@@ -316,6 +316,20 @@ export declare interface ActivityLabels {
316
316
  timeZone?: string | null;
317
317
  /** `junction:id` → what a link row links, as the reader may see it. */
318
318
  junctions?: Record<string, ActivityJunctionLabel>;
319
+ /** `collection.field` → how a number field's values read ("$12,345.67", "12,345").
320
+ * Absent = shown as stored. Kinds follow lib/number-kind.ts (the server decides). */
321
+ numbers?: Record<string, ActivityNumberFormat>;
322
+ }
323
+
324
+ /** How a changed number reads: money with its currency, grouped decimals or counts. */
325
+ declare interface ActivityNumberFormat {
326
+ kind: 'money' | 'decimal' | 'count';
327
+ /** ISO code for money (default USD). */
328
+ currency?: string;
329
+ /** Fraction digits the field keeps (default 2). */
330
+ decimals?: number;
331
+ /** A unit other than '$' appended after the number ("days", "%"). */
332
+ unit?: string;
319
333
  }
320
334
 
321
335
  /** One child-row change as the server summarised it for this reader — labels, never ids. */
@@ -1670,6 +1684,8 @@ declare type ChartSpec = {
1670
1684
  label: string;
1671
1685
  value: number;
1672
1686
  }>;
1687
+ /** 'currency' = the values are money: the axis and tooltip read $12.3k / $12,345. */
1688
+ unit?: 'currency';
1673
1689
  };
1674
1690
 
1675
1691
  export declare function ChatAnalyticsView(): JSX.Element;
@@ -4047,6 +4063,22 @@ export declare function ExternalRequestsChip({ collection, itemId }: {
4047
4063
  /** Field paths an expression reads, without evaluating it. */
4048
4064
  export declare function extractExpressionTokens(src: string): string[];
4049
4065
 
4066
+ /** What the server says about an extra column's numbers (extra_field_meta). */
4067
+ declare interface ExtraNumberMeta {
4068
+ path: string;
4069
+ choices?: Array<{
4070
+ value: string;
4071
+ text: string;
4072
+ }>;
4073
+ /** One number per row (a number field, a per-row aggregate, an addendum's cost). */
4074
+ number?: boolean;
4075
+ /** How it reads (lib/number-kind.ts, decided by the server from the field). Older
4076
+ * servers do not send it: the column's name and the value decide. */
4077
+ number_kind?: 'money' | 'decimal' | 'count' | 'plain';
4078
+ currency?: string;
4079
+ decimals?: number;
4080
+ }
4081
+
4050
4082
  /** A folded section the host adds under the list (the admin's unregistered/system tables). */
4051
4083
  declare interface ExtraSectionSpec {
4052
4084
  key: string;
@@ -7405,7 +7437,7 @@ export declare function LiveCount({ value, format, className }: LiveCountProps):
7405
7437
 
7406
7438
  declare interface LiveCountProps {
7407
7439
  value: number | string | null | undefined;
7408
- /** Render the text (e.g. `99+`, a unit); default is the plain number. */
7440
+ /** Render the text (e.g. `99+`, a unit); default is the number grouped (formatNumber). */
7409
7441
  format?: (value: number | string) => ReactNode;
7410
7442
  className?: string;
7411
7443
  }
@@ -10147,7 +10179,7 @@ declare interface QueueItemRow {
10147
10179
  url: string;
10148
10180
  }
10149
10181
 
10150
- export declare function QueueItemSheet({ item, onOpenChange, onClaim, onRelease, workNextActive, onNext, refetchItems, stateLabels, collectionLabel, claimsEnabled, columnFormats, fieldLabel, width, itemLayout, onOpenRecord }: {
10182
+ export declare function QueueItemSheet({ item, onOpenChange, onClaim, onRelease, workNextActive, onNext, refetchItems, stateLabels, collectionLabel, claimsEnabled, columnFormats, extraMeta, fieldLabel, width, itemLayout, onOpenRecord }: {
10151
10183
  item: SheetItem | null;
10152
10184
  onOpenChange: (open: boolean) => void;
10153
10185
  onClaim: (item: SheetItem) => void;
@@ -10163,6 +10195,8 @@ export declare function QueueItemSheet({ item, onOpenChange, onClaim, onRelease,
10163
10195
  claimsEnabled?: boolean;
10164
10196
  /** Extra-field path → display format config (display-only). */
10165
10197
  columnFormats?: Record<string, ColumnFormatConfig>;
10198
+ /** The queue's extra_field_meta: choices and how number columns read. */
10199
+ extraMeta?: ExtraNumberMeta[];
10166
10200
  /** Extra-field path → the label its list column header shows (the queue's column
10167
10201
  * alias); without it the path is spelled out (army 7 N7: "PROJECT TYPE → NAME"). */
10168
10202
  fieldLabel?: (field: string) => string;
@@ -1,23 +1,23 @@
1
1
  import { jsxs as s, jsx as d } from "react/jsx-runtime";
2
- import { cn as i } from "../lib/utils.js";
3
- function x(e) {
2
+ import { cn as i, formatNumber as c } from "../lib/utils.js";
3
+ function h(e) {
4
4
  var l;
5
- const a = e, r = a != null && a.response && "data" in a.response ? a.response.data : a == null ? void 0 : a.response;
6
- return (((l = a == null ? void 0 : a.response) == null ? void 0 : l.status) ?? (a == null ? void 0 : a.status)) !== 409 || (r == null ? void 0 : r.code) !== "AUDIENCE_CONFIRM_REQUIRED" || !r.audience ? null : r.audience;
5
+ const r = e, a = r != null && r.response && "data" in r.response ? r.response.data : r == null ? void 0 : r.response;
6
+ return (((l = r == null ? void 0 : r.response) == null ? void 0 : l.status) ?? (r == null ? void 0 : r.status)) !== 409 || (a == null ? void 0 : a.code) !== "AUDIENCE_CONFIRM_REQUIRED" || !a.audience ? null : a.audience;
7
7
  }
8
- function c(e) {
9
- if (e.includes_everyone) return `Saving this tells everyone (${e.count} people).`;
10
- const a = `${e.count} ${e.count === 1 ? "person" : "people"}`;
8
+ function b(e) {
9
+ if (e.includes_everyone) return `Saving this tells everyone (${c(e.count)} people).`;
10
+ const r = `${e.count} ${e.count === 1 ? "person" : "people"}`;
11
11
  if (e.includes_roles.length > 0) {
12
- const r = e.includes_roles.map((n) => n.name).join(", ");
13
- return `Saving this tells ${a}, including the whole ${r} role${e.includes_roles.length > 1 ? "s" : ""}.`;
12
+ const a = e.includes_roles.map((n) => n.name).join(", ");
13
+ return `Saving this tells ${r}, including the whole ${a} role${e.includes_roles.length > 1 ? "s" : ""}.`;
14
14
  }
15
- return `Saving this tells ${a} — more than ${e.threshold}.`;
15
+ return `Saving this tells ${r} — more than ${e.threshold}.`;
16
16
  }
17
- function h({
17
+ function p({
18
18
  preview: e,
19
- onConfirm: a,
20
- onCancel: r,
19
+ onConfirm: r,
20
+ onCancel: a,
21
21
  busy: n = !1,
22
22
  confirmLabel: l = "Confirm and save",
23
23
  className: m
@@ -33,7 +33,7 @@ function h({
33
33
  m
34
34
  ),
35
35
  children: [
36
- /* @__PURE__ */ d("p", { className: "font-semibold", children: c(e) }),
36
+ /* @__PURE__ */ d("p", { className: "font-semibold", children: b(e) }),
37
37
  e.includes_roles.length > 0 && /* @__PURE__ */ d("div", { className: "mt-2 flex flex-wrap gap-1.5", children: e.includes_roles.map((t) => /* @__PURE__ */ s(
38
38
  "span",
39
39
  {
@@ -71,7 +71,7 @@ function h({
71
71
  {
72
72
  type: "button",
73
73
  disabled: n,
74
- onClick: a,
74
+ onClick: r,
75
75
  className: "h-8 rounded-md bg-nvr-cyan px-3 text-[12.5px] font-medium text-white disabled:opacity-50",
76
76
  children: n ? "Saving…" : l
77
77
  }
@@ -81,7 +81,7 @@ function h({
81
81
  {
82
82
  type: "button",
83
83
  disabled: n,
84
- onClick: r,
84
+ onClick: a,
85
85
  className: "h-8 rounded-md border border-amber-300 bg-white px-3 text-[12.5px] font-medium text-amber-800 hover:bg-amber-100 disabled:opacity-50 dark:border-amber-400/40 dark:bg-transparent dark:text-amber-200 dark:hover:bg-amber-400/15",
86
86
  children: "Cancel"
87
87
  }
@@ -92,7 +92,7 @@ function h({
92
92
  );
93
93
  }
94
94
  export {
95
- h as AudienceConfirmPanel,
96
- x as audienceConfirmFromError,
97
- c as audienceSummary
95
+ p as AudienceConfirmPanel,
96
+ h as audienceConfirmFromError,
97
+ b as audienceSummary
98
98
  };