@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,53 +1,53 @@
1
- import { jsxs as s, jsx as a, Fragment as A } from "react/jsx-runtime";
1
+ import { jsxs as s, jsx as a, Fragment as E } from "react/jsx-runtime";
2
2
  import { useState as n } from "react";
3
- import { useNivaroClient as E } from "../../../context.js";
4
- import { cn as N } from "../../../lib/utils.js";
5
- import { SimpleSelect as F } from "../../ui/SimpleSelect.js";
6
- import { createLayout as I } from "../overview/OverviewActions.js";
7
- import { useInvalidateLayouts as K, useRoleNames as O, apiFailure as b } from "../overview/overview-api.js";
8
- import { tintCard as v, inputBase as P } from "../panel-style.js";
9
- import { quiet as i, primaryBtn as k, ghostBtn as H } from "./AiComposer.js";
10
- import { fetchSlim as z } from "./ai-forms-api.js";
11
- import { stashBuild as D } from "./pending.js";
12
- import { listNames as G, planSlimOps as J } from "./plan.js";
13
- function se({
3
+ import { useNivaroClient as F } from "../../../context.js";
4
+ import { formatNumber as y, cn as b } from "../../../lib/utils.js";
5
+ import { SimpleSelect as I } from "../../ui/SimpleSelect.js";
6
+ import { createLayout as K } from "../overview/OverviewActions.js";
7
+ import { useInvalidateLayouts as O, useRoleNames as P, apiFailure as v } from "../overview/overview-api.js";
8
+ import { tintCard as k, inputBase as H } from "../panel-style.js";
9
+ import { quiet as i, primaryBtn as C, ghostBtn as z } from "./AiComposer.js";
10
+ import { fetchSlim as D } from "./ai-forms-api.js";
11
+ import { stashBuild as G } from "./pending.js";
12
+ import { listNames as J, planSlimOps as M } from "./plan.js";
13
+ function le({
14
14
  collection: h,
15
15
  layoutId: u,
16
- parentGroups: C,
17
- onOpenLayout: w,
18
- onBack: L
16
+ parentGroups: w,
17
+ onOpenLayout: L,
18
+ onBack: S
19
19
  }) {
20
- const f = E(), S = K(h), { data: _ = [] } = O(!0), [o, B] = n(""), [t, g] = n(null), [d, x] = n(""), [c, m] = n(!1), [y, p] = n(null), j = async () => {
20
+ const f = F(), _ = O(h), { data: B = [] } = P(!0), [o, j] = n(""), [t, g] = n(null), [d, x] = n(""), [c, m] = n(!1), [N, p] = n(null), R = async () => {
21
21
  if (o) {
22
22
  m(!0), p(null);
23
23
  try {
24
- const e = await z(f, u, o);
24
+ const e = await D(f, u, o);
25
25
  g(e), x(e.name ?? "");
26
26
  } catch (e) {
27
- p(b(e, "Could not read this role’s edits").message);
27
+ p(v(e, "Could not read this role’s edits").message);
28
28
  } finally {
29
29
  m(!1);
30
30
  }
31
31
  }
32
- }, R = async () => {
32
+ }, $ = async () => {
33
33
  const e = t == null ? void 0 : t.plan;
34
34
  if (!(!t || !e || !d.trim())) {
35
35
  m(!0), p(null);
36
36
  try {
37
- const r = await I(f, {
37
+ const r = await K(f, {
38
38
  collection: h,
39
39
  name: d.trim(),
40
40
  layout_type: "grouped"
41
41
  });
42
42
  if (r == null) throw new Error("No id came back");
43
- const $ = { id: u, groups: C };
44
- D(r, {
43
+ const q = { id: u, groups: w };
44
+ G(r, {
45
45
  label: `Lighter version for ${t.role.name}`,
46
- plan: (q) => J(q, $, e, t.role),
46
+ plan: (A) => M(A, q, e, t.role),
47
47
  done: "Lighter version drafted. Check it and Save."
48
- }), S(), w(r);
48
+ }), _(), L(r);
49
49
  } catch (r) {
50
- p(b(r, "Could not create the form").message);
50
+ p(v(r, "Could not create the form").message);
51
51
  } finally {
52
52
  m(!1);
53
53
  }
@@ -58,13 +58,13 @@ function se({
58
58
  /* @__PURE__ */ a("p", { className: i, children: "Keeps the fields that role’s people changed in the last 180 days and hides the rest, on a new form that inherits from this one and is shown to that role." }),
59
59
  /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
60
60
  /* @__PURE__ */ a(
61
- F,
61
+ I,
62
62
  {
63
63
  value: o,
64
64
  onChange: (e) => {
65
- B(e), g(null);
65
+ j(e), g(null);
66
66
  },
67
- options: _.map((e) => ({ value: e.id, label: e.name })),
67
+ options: B.map((e) => ({ value: e.id, label: e.name })),
68
68
  ariaLabel: "Role",
69
69
  className: "h-8 flex-1 text-[12.5px]",
70
70
  triggerProps: { "data-ai-slim-role": "" }
@@ -74,9 +74,9 @@ function se({
74
74
  "button",
75
75
  {
76
76
  type: "button",
77
- className: k,
77
+ className: C,
78
78
  disabled: !o || c,
79
- onClick: () => void j(),
79
+ onClick: () => void R(),
80
80
  "data-ai-slim-look": "",
81
81
  children: c && !t ? "Reading…" : "Look at their edits"
82
82
  }
@@ -94,15 +94,14 @@ function se({
94
94
  t.days,
95
95
  " days: too few to tell which fields they use."
96
96
  ] }),
97
- t && l && /* @__PURE__ */ s(A, { children: [
97
+ t && l && /* @__PURE__ */ s(E, { children: [
98
98
  /* @__PURE__ */ s("p", { className: i, children: [
99
- t.revisions,
99
+ y(t.revisions),
100
100
  " saves by ",
101
- t.people,
101
+ y(t.people),
102
102
  " ",
103
103
  t.people === 1 ? "person" : "people",
104
- " ",
105
- "in the last ",
104
+ " in the last ",
106
105
  t.days,
107
106
  " days. A field counts as used from ",
108
107
  l.min_changes,
@@ -110,7 +109,7 @@ function se({
110
109
  l.min_changes === 1 ? "" : "s",
111
110
  "."
112
111
  ] }),
113
- /* @__PURE__ */ s("div", { className: N(v, "space-y-1 px-2.5 py-2"), "data-ai-slim-keep": "", children: [
112
+ /* @__PURE__ */ s("div", { className: b(k, "space-y-1 px-2.5 py-2"), "data-ai-slim-keep": "", children: [
114
113
  /* @__PURE__ */ s("p", { className: "text-[12px] font-semibold text-slate-700 dark:text-foreground", children: [
115
114
  "Keeps ",
116
115
  l.keep.length
@@ -120,7 +119,7 @@ function se({
120
119
  /* @__PURE__ */ a("span", { className: "shrink-0 text-[11.5px] text-slate-500 dark:text-muted-foreground", children: e.why === "required" ? "required" : `${e.changes} change${e.changes === 1 ? "" : "s"}` })
121
120
  ] }, e.field)) })
122
121
  ] }),
123
- /* @__PURE__ */ s("div", { className: N(v, "space-y-1 px-2.5 py-2"), "data-ai-slim-drop": "", children: [
122
+ /* @__PURE__ */ s("div", { className: b(k, "space-y-1 px-2.5 py-2"), "data-ai-slim-drop": "", children: [
124
123
  /* @__PURE__ */ s("p", { className: "text-[12px] font-semibold text-slate-700 dark:text-foreground", children: [
125
124
  "Hides ",
126
125
  l.drop.length
@@ -131,7 +130,7 @@ function se({
131
130
  ] }, e.field)) }),
132
131
  l.hide_groups.length > 0 && /* @__PURE__ */ s("p", { className: i, children: [
133
132
  "Also hides ",
134
- G(l.hide_groups.map((e) => `“${e.label}”`)),
133
+ J(l.hide_groups.map((e) => `“${e.label}”`)),
135
134
  ": nothing in it is used."
136
135
  ] })
137
136
  ] }),
@@ -142,22 +141,22 @@ function se({
142
141
  {
143
142
  value: d,
144
143
  onChange: (e) => x(e.target.value),
145
- className: P,
144
+ className: H,
146
145
  maxLength: 80
147
146
  }
148
147
  )
149
148
  ] })
150
149
  ] }),
151
- y && /* @__PURE__ */ a("p", { role: "alert", className: "text-[12.5px] leading-snug text-red-700 dark:text-red-300", children: y }),
150
+ N && /* @__PURE__ */ a("p", { role: "alert", className: "text-[12.5px] leading-snug text-red-700 dark:text-red-300", children: N }),
152
151
  /* @__PURE__ */ s("div", { className: "flex items-center justify-end gap-1.5 pt-0.5", children: [
153
- /* @__PURE__ */ a("button", { type: "button", className: H, onClick: L, children: "Back" }),
152
+ /* @__PURE__ */ a("button", { type: "button", className: z, onClick: S, children: "Back" }),
154
153
  l && /* @__PURE__ */ a(
155
154
  "button",
156
155
  {
157
156
  type: "button",
158
- className: k,
157
+ className: C,
159
158
  disabled: c || !d.trim() || l.drop.length === 0,
160
- onClick: () => void R(),
159
+ onClick: () => void $(),
161
160
  "data-ai-slim-create": "",
162
161
  children: c ? "Creating…" : "Create lighter version"
163
162
  }
@@ -166,5 +165,5 @@ function se({
166
165
  ] });
167
166
  }
168
167
  export {
169
- se as SlimPanel
168
+ le as SlimPanel
170
169
  };